cave_generator ![code/datums/mapgen/CaveGenerator.dm 4](git.png)
Vars | |
biome_accepted_turfs | The turf types to replace with a biome-related turf, as typecache. Leave empty for all open turfs (but not closed turfs) to be hijacked. |
---|---|
birth_limit | How much neighbours does a dead cell need to become alive |
closed_turf_types | Expanded list of the types that spawns if the turf is closed |
death_limit | How little neighbours does a alive cell need to die |
feature_spawn_chance | Base chance of spawning features |
feature_spawn_list | Expanded list of extra features that can spawn in the area. Reads from the weighted list |
flora_spawn_chance | Base chance of spawning flora |
flora_spawn_list | Expanded list of flora that can spawn in the area. Reads from the weighted list |
generated_turfs_per_biome | An associative list of biome type to the list of turfs that were
generated of that biome specifically. Helps to improve the efficiency
of biome-related operations. Is populated through
generate_terrain_with_biomes() . |
initial_closed_chance | Chance of cells starting closed |
megafauna_spawn_list | Expanded list of Megafauna that can spawn in the area. Reads from the weighted list |
mob_spawn_chance | Base chance of spawning a mob |
mob_spawn_list | Expanded list of mobs that can spawn in the area. Reads from the weighted list |
mob_spawn_no_mega_list | The mob spawn list but with no megafauna markers. autogenerated |
open_turf_types | Expanded list of the types that spawns if the turf is open |
perlin_zoom | Used to select "zoom" level into the perlin noise, higher numbers result in slower transitions |
possible_biomes | 2D list of all biomes based on heat and humidity combos. Associative by
BIOME_X_HEAT and then by BIOME_X_HUMIDITY (i.e.
possible_biomes[BIOME_LOW_HEAT][BIOME_LOWMEDIUM_HUMIDITY] ).
Check /datum/map_generator/cave_generator/jungle for an example
of how to set it up properly. |
smoothing_iterations | Amount of smoothing iterations |
string_gen | Unique ID for this spawner |
weighted_closed_turf_types | Weighted list of the types that spawns if the turf is closed |
weighted_feature_spawn_list | Weighted list of extra features that can spawn in the area, such as geysers. |
weighted_flora_spawn_list | Weighted list of flora that can spawn in the area. |
weighted_mob_spawn_list | Weighted list of mobs that can spawn in the area. |
weighted_open_turf_types | Weighted list of the types that spawns if the turf is open |
Procs | |
generate_terrain_with_biomes | This proc handles including biomes in the cave generation. This is slower than
generate_terrain() , so please use it only if you actually need biomes. |
populate_terrain_with_biomes | This handles the population of terrain with biomes. Should only be called by
populate_terrain() , if you find yourself calling this, you're probably not
doing it right. |
Var Details
biome_accepted_turfs ![code/datums/mapgen/CaveGenerator.dm 36](git.png)
The turf types to replace with a biome-related turf, as typecache. Leave empty for all open turfs (but not closed turfs) to be hijacked.
birth_limit ![code/datums/mapgen/CaveGenerator.dm 66](git.png)
How much neighbours does a dead cell need to become alive
closed_turf_types ![code/datums/mapgen/CaveGenerator.dm 13](git.png)
Expanded list of the types that spawns if the turf is closed
death_limit ![code/datums/mapgen/CaveGenerator.dm 68](git.png)
How little neighbours does a alive cell need to die
feature_spawn_chance ![code/datums/mapgen/CaveGenerator.dm 57](git.png)
Base chance of spawning features
feature_spawn_list ![code/datums/mapgen/CaveGenerator.dm 33](git.png)
Expanded list of extra features that can spawn in the area. Reads from the weighted list
flora_spawn_chance ![code/datums/mapgen/CaveGenerator.dm 55](git.png)
Base chance of spawning flora
flora_spawn_list ![code/datums/mapgen/CaveGenerator.dm 29](git.png)
Expanded list of flora that can spawn in the area. Reads from the weighted list
generated_turfs_per_biome ![code/datums/mapgen/CaveGenerator.dm 41](git.png)
An associative list of biome type to the list of turfs that were
generated of that biome specifically. Helps to improve the efficiency
of biome-related operations. Is populated through
generate_terrain_with_biomes()
.
initial_closed_chance ![code/datums/mapgen/CaveGenerator.dm 62](git.png)
Chance of cells starting closed
megafauna_spawn_list ![code/datums/mapgen/CaveGenerator.dm 25](git.png)
Expanded list of Megafauna that can spawn in the area. Reads from the weighted list
mob_spawn_chance ![code/datums/mapgen/CaveGenerator.dm 53](git.png)
Base chance of spawning a mob
mob_spawn_list ![code/datums/mapgen/CaveGenerator.dm 19](git.png)
Expanded list of mobs that can spawn in the area. Reads from the weighted list
mob_spawn_no_mega_list ![code/datums/mapgen/CaveGenerator.dm 21](git.png)
The mob spawn list but with no megafauna markers. autogenerated
open_turf_types ![code/datums/mapgen/CaveGenerator.dm 9](git.png)
Expanded list of the types that spawns if the turf is open
perlin_zoom ![code/datums/mapgen/CaveGenerator.dm 50](git.png)
Used to select "zoom" level into the perlin noise, higher numbers result in slower transitions
possible_biomes ![code/datums/mapgen/CaveGenerator.dm 47](git.png)
2D list of all biomes based on heat and humidity combos. Associative by
BIOME_X_HEAT
and then by BIOME_X_HUMIDITY
(i.e.
possible_biomes[BIOME_LOW_HEAT][BIOME_LOWMEDIUM_HUMIDITY]
).
Check /datum/map_generator/cave_generator/jungle for an example
of how to set it up properly.
smoothing_iterations ![code/datums/mapgen/CaveGenerator.dm 64](git.png)
Amount of smoothing iterations
string_gen ![code/datums/mapgen/CaveGenerator.dm 59](git.png)
Unique ID for this spawner
weighted_closed_turf_types ![code/datums/mapgen/CaveGenerator.dm 11](git.png)
Weighted list of the types that spawns if the turf is closed
weighted_feature_spawn_list ![code/datums/mapgen/CaveGenerator.dm 31](git.png)
Weighted list of extra features that can spawn in the area, such as geysers.
weighted_flora_spawn_list ![code/datums/mapgen/CaveGenerator.dm 27](git.png)
Weighted list of flora that can spawn in the area.
weighted_mob_spawn_list ![code/datums/mapgen/CaveGenerator.dm 17](git.png)
Weighted list of mobs that can spawn in the area.
weighted_open_turf_types ![code/datums/mapgen/CaveGenerator.dm 7](git.png)
Weighted list of the types that spawns if the turf is open
Proc Details
generate_terrain_with_biomes
This proc handles including biomes in the cave generation. This is slower than
generate_terrain()
, so please use it only if you actually need biomes.
This should only be called by generate_terrain()
, if you have to call this,
you're probably doing something wrong.
populate_terrain_with_biomes
This handles the population of terrain with biomes. Should only be called by
populate_terrain()
, if you find yourself calling this, you're probably not
doing it right.
This proc won't do anything if the area we're trying to generate in does not
have FLORA_ALLOWED
or MOB_SPAWN_ALLOWED
in its area_flags
.