v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "Advanced world generation"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
 
(28 intermediate revisions by 10 users not shown)
Line 1: Line 1:
 
{{migrated article}}
 
{{migrated article}}
{{Quality|Unrated}}
+
{{Quality|Superior}}
 
{{av}}
 
{{av}}
:''This article contains information on advanced world generation. For information on basic world generation, see [[World generation]].''
+
:''This article contains information on advanced world generation. For information on basic world generation, see [[World generation]].'' ''See [[World token]] to more easily find information by the names used in the world_gen.txt file, [[World rejection]] for information on solving problems related to worlds always being rejected, and [[Worldgen examples]] for example worlds.''
:''See [[World token]] to more easily find information by the names used in the world_gen.txt file, [[World rejection]] for information on solving problems related to worlds always being rejected, and [[Worldgen examples]] for example worlds.''
 
  
[[File:adv_worldgen_v50.png|thumb|700px|right|The advanced world generation screen.]]'''Advanced world generation''', also labeled as '''Detailed mode''', allows substantially more detail-oriented options of customization than standard, basic world generation. This gives the player much more control over how their world is generated. To better understand this article, it is advised that one should read about [[World generation|'''basic world generation''']] first.
+
[[File:adv_worldgen_v50.png|thumb|400px|right|The advanced world generation screen.<br><small>''(Click to enlarge)''</small>]]'''Advanced world generation''', also labeled as '''detailed mode''', allows substantially more detail-oriented options of customization than standard, basic world generation. This gives the player much more control over how their world is generated. To better understand this article, it is advised that one should read about [[World generation|'''basic world generation''']] first.
  
 
The advanced world generation screen is reached by clicking "Create new world" at the main menu, then clicking "Detailed mode". Once at that screen, clicking "Basic options" will return the user to the standard world generation screen.
 
The advanced world generation screen is reached by clicking "Create new world" at the main menu, then clicking "Detailed mode". Once at that screen, clicking "Basic options" will return the user to the standard world generation screen.
  
 
== Parameter sets ==
 
== Parameter sets ==
The list of already-defined parameter sets is in the upper-left. You can select the current set that you want to work with using the drop down menu. Any parameter set can be renamed by clicking the quill.
+
The list of already-defined parameter sets is in the upper-left. You can select the current set that you want to work with using the drop down menu. Any parameter set can be renamed by clicking the [[File:Quill.png]].
  
Parameter sets can by made by clicking "New parameter set" or by clicking "Copy" to copy the selected set. This will append the selected set to the drop down menu and automatically select that set for editing.
+
Parameter sets can be made by clicking "New parameter set" or by clicking "Copy" to copy the selected set. This will append the selected set to the drop down menu and automatically select that set for editing.
  
Parameter sets are stored in the <tt>prefs/world_gen.txt</tt> file in the main DF directory. The the "Save" and "Load" buttons in the upper-right of DF will load and save '''all''' of the parameter sets to this file. The <tt>world_gen.txt</tt> file can also be edited with a text editor. This is particularly useful because people will often post their parameter sets on the forum or wiki in text form. (See below for more info.)  
+
Parameter sets are stored in the <tt>prefs/world_gen.txt</tt> file in the main DF directory. The "Save" and "Load" buttons in the upper-right of DF will save or load '''all''' of the parameter sets in this file. The <tt>world_gen.txt</tt> file can also be edited with a text editor. This is useful for parameter sets posted on the forum or wiki in text form. (See [[Advanced_world_generation#Parameter_Set_Examples|Parameter set examples]] below.)  
  
 
The tokens used in <tt>world_gen.txt</tt> are at the bottom of each parameter description. Here's the one for the title.
 
The tokens used in <tt>world_gen.txt</tt> are at the bottom of each parameter description. Here's the one for the title.
Line 31: Line 30:
 
== World name ==
 
== World name ==
  
As previously mentioned, the title of the parameter set doesn't affect the name of the world. You can force a particular name for your world using {{K|n}} or set it back to the default random setting using {{K|N}}.
+
As previously mentioned, the title of the parameter set doesn't affect the name of the world. You can specify a particular name for your world using {{K|n}} or set it back to the default random setting using {{K|N}}.
  
 
{| {{prettytable}}
 
{| {{prettytable}}
Line 93: Line 92:
 
Many other world parameters, such as end year and embark points, can, however, be changed without it having any effect on the geography of the world generated from the seed values.
 
Many other world parameters, such as end year and embark points, can, however, be changed without it having any effect on the geography of the world generated from the seed values.
  
Normally, you don't enter these seed values - the world generation process comes up with seed values based on some sort of "true" random information from things like random values in uninitialized memory, the current date/time, etc. If you have entered a seed value you can revert to all seeds being random using {{K|S}}.
+
Normally, you don't enter these seed values - the world generation process comes up with seed values based on some sort of "true" random information from things like random values in uninitialized memory, the current date/time, etc.
  
 
== Generating a world ==
 
== Generating a world ==
  
Unless you're using an already-defined parameter set, you will probably want to {{K|e}}dit the parameters. Select the set you want to edit using the up/down directional keys and press {{K|e}}. Information about each parameter is documented below.
+
Unless you're using an already-defined parameter set, you will probably want to edit the parameters. Information about each parameter is documented below. Once you are happy with the parameters you should save the values you just edited and proceed to the [[world generation]] process.
 
 
Once you are happy with the parameters you have set, hit {{K|Esc}} to get back to this screen, hit {{K|F6}} to save the values you just edited, and hit {{K|Enter}} to start. The rest of the process is the same as basic [[world generation]].
 
  
 
The phases of the world generation process are (this order is not completely correct):
 
The phases of the world generation process are (this order is not completely correct):
Line 131: Line 128:
 
== Editing the parameters init file ==
 
== Editing the parameters init file ==
  
Parameter sets are stored in the ''prefs/[[world_gen.txt]]'' file, using [[world token]]s. You can copy and paste other players' sets of parameters into your ''world_gen.txt'' to use their parameter sets, and some are provided at [[Main:Pregenerated worlds|Pregenerated worlds]]. Another place to find parameter sets is the [http://www.bay12forums.com/smf/index.php?topic=101280.0 Worldgen cookbook] thread on the official forums.
+
Parameter sets are stored in the ''prefs/[[world_gen.txt]]'' file, using [[world token]]s. You can copy and paste other players' sets of parameters into your ''world_gen.txt'' to use their parameter sets. Another place to find parameter sets is the [http://www.bay12forums.com/smf/index.php?topic=180805.0 Worldgen cookbook] thread on the official forums.
  
 
== Advanced parameters ==
 
== Advanced parameters ==
Line 284: Line 281:
 
Whether or not the game will ignore unimportant figures in history generation. The culling of unimportant historical figures is a CPU-intensive step in history generation but it saves memory and will speed up loading/saving games in fortress mode. This does mean that the "unimportant" figures will not appear in Legends mode or in engravings, but unimportant figures would likely not appear in engravings anyway.
 
Whether or not the game will ignore unimportant figures in history generation. The culling of unimportant historical figures is a CPU-intensive step in history generation but it saves memory and will speed up loading/saving games in fortress mode. This does mean that the "unimportant" figures will not appear in Legends mode or in engravings, but unimportant figures would likely not appear in engravings anyway.
  
Unimportant figures are creatures who suffer early deaths, never have offspring or kill a named creature during world gen. For example, a resident of a goblin tower may get murdered by demons at a young age. After culling unimportant figures, Legends mode would say "In the year 102, the demon Evil Mcevilface killed an unknown creature at Eviltower."
+
Unimportant figures are creatures who suffer early deaths, never have offspring or kill a named creature during world gen. For example, a resident of a goblin tower may get murdered by demons at a young age. After culling unimportant figures, Legends mode would say "In the year 102, the demon Evil McEvilface killed an unknown creature at Eviltower."
  
 
{| {{prettytable}}
 
{| {{prettytable}}
Line 319: Line 316:
  
 
These are the absolute minimum and maximum values that can ever be generated for a particular map square characteristic. Changing these can cause the occurrence of certain [[Biome|biomes]] to become impossible, so modify these with care. Because of this problem, you may want to use [[#Weighted Ranges|Weighted Ranges]] instead.  By ''subtly'' tweaking the min and max values, vastly different maps can be made.
 
These are the absolute minimum and maximum values that can ever be generated for a particular map square characteristic. Changing these can cause the occurrence of certain [[Biome|biomes]] to become impossible, so modify these with care. Because of this problem, you may want to use [[#Weighted Ranges|Weighted Ranges]] instead.  By ''subtly'' tweaking the min and max values, vastly different maps can be made.
 
==== X and Y Variance ====
 
 
These control how wildly things like elevation and rainfall can vary between adjacent map squares. For example, if these values are set to the maximum of 3,200 for elevation then you will end up with more very low areas right next to very high areas. The number for X determines the east-west variance and the number for Y determines the north-south variance. By setting only one of these to a high value you can, for example, create horizontal or vertical bands of areas which are more similar to each other.
 
 
Generally speaking, raising both of these values will create a more random "patchwork" of many small biomes while setting both x and y values to 0 will cause every square on the map to use a single random value for the given characteristic.
 
 
For "patchwork" worlds to avoid being rejected, [[#Maximum_Number_of_Subregions|Maximum Number of Subregions]] will probably need to be increased from the default.
 
  
 
==== Elevation ====
 
==== Elevation ====
Line 340: Line 329:
 
* A low maximum (below 300) means no mountains as mountains need elevations above 300.
 
* A low maximum (below 300) means no mountains as mountains need elevations above 300.
 
* Rivers will be placed when the elevation maximum is 104 or higher. Therefore, keeping both values above 100 and below 104 will prevent all water tiles from appearing.
 
* Rivers will be placed when the elevation maximum is 104 or higher. Therefore, keeping both values above 100 and below 104 will prevent all water tiles from appearing.
*Mountain peaks can only form in squares with an elevation of 400.
+
* Mountain peaks can only form at elevations of 400.
 +
 
 +
==== X and Y Variance ====
 +
 
 +
These control how wildly things like elevation and rainfall can vary between adjacent map squares. For example, if these values are set to the maximum of 3,200 for elevation then you will end up with more very low areas right next to very high areas. The number for X determines the east-west variance and the number for Y determines the north-south variance. By setting only one of these to a high value you can, for example, create horizontal or vertical bands of areas which are more similar to each other.
 +
 
 +
Generally speaking, raising both of these values will create a more random "patchwork" of many small biomes while setting both x and y values to 0 will cause every square on the map to use a single random value for the given characteristic.
 +
 
 +
For "patchwork" worlds to avoid being rejected, [[#Maximum_Number_of_Subregions|Maximum Number of Subregions]] will probably need to be increased from the default.
  
 
==== Rainfall ====
 
==== Rainfall ====
  
Controls the amount of rainfall in each map square/area. Setting the minimum too high or the maximum too low can make the formation of certain biomes impossible. Rainfall causes it to [[rain]] more in a given area, which can have various effects. Also makes more rivers appear on the world map.
+
Controls the amount of rainfall in each map square/area. Setting the minimum or maximum too high or low can make the formation of certain biomes impossible. Rainfall causes it to [[rain]] more in a given area, which can have various effects. Also makes more rivers appear on the world map.
  
 
Note that if [[#Do Orographic Precipitation and Rain Shadows|orographic precipitation and rain shadows]] is on, then mountains will cause additional variance in rainfall, so (for example) rainfall below the specified minimum can occur in the shadow of a mountain.  If you want the minimum and maximum for this parameter to be absolutely respected, you must turn off the orographic precipitation option.
 
Note that if [[#Do Orographic Precipitation and Rain Shadows|orographic precipitation and rain shadows]] is on, then mountains will cause additional variance in rainfall, so (for example) rainfall below the specified minimum can occur in the shadow of a mountain.  If you want the minimum and maximum for this parameter to be absolutely respected, you must turn off the orographic precipitation option.
  
Additionally, with Orthographic Precipitation turned on, orthographic precipitation and rain shadows will only occur in regions with greater than or equal to 50 drainage. [http://www.bay12forums.com/smf/index.php?topic=139916.0 [Report, reproduced 2022]]
+
Additionally, with 'Orthographic Precipitation' turned on, orthographic precipitation and rain shadows will only occur in regions with greater than or equal to 50 drainage. [http://www.bay12forums.com/smf/index.php?topic=139916.0 [Report, reproduced 2022]]
  
 
==== Temperature ====
 
==== Temperature ====
Line 354: Line 351:
 
These parameters control how hot or cold various areas will be. If you lower the minimum and maximum values, the world will be colder overall, for example. As with the others, changing these values too much could make it impossible for certain biomes to exist. See [[Climate]] for more info.
 
These parameters control how hot or cold various areas will be. If you lower the minimum and maximum values, the world will be colder overall, for example. As with the others, changing these values too much could make it impossible for certain biomes to exist. See [[Climate]] for more info.
  
These parameters form the "base" temperature for an area, and describe peak summer temperature in degrees Celsius. This does not correspond 1:1 with the final climate. [[Temperature]] is always influenced by a number of variables, including elevation, time of year, thick forestation, and if [[Advanced_world_generation#Poles|Poles]] are enabled, latitude. These other variables are factored in after the temperature mesh is applied, and frequently bring temperatures above and below their set minimum and maximum values. The inclusion of Poles is particularly strong in this regard, as it allows latitude to raise and/or lower temperatures by more than 75 degrees Celsius! That said, the temperatures aren't raised or lowered by more than about 65 degrees past the set minimum and maximum. Furthermore, for typical ranges the temperature will never be raised more than about 25 degrees past the maximum (but will still drop up to about 65 degrees Celsius below the minimum).
+
These parameters form the "base" temperature for an area, and describe peak summer temperature in a scale that isn't used elsewhere in the game. This number also does not correspond 1:1 with the final climate. [[Temperature]] is always influenced by a number of variables, including elevation, time of year, thick forestation, and if [[Advanced_world_generation#Poles|Poles]] are enabled, latitude. These other variables are factored in after the temperature mesh is applied, and frequently bring temperatures above and below their set minimum and maximum values. ''The inclusion of Poles is particularly strong in this regard, as it allows latitude to raise and/or lower temperatures by more than 75 degrees Celsius! That said, the temperatures aren't raised or lowered by more than about 65 degrees past the set minimum and maximum. Furthermore, for typical ranges, the temperature will never be raised more than about 25 degrees past the maximum (but will still drop up to about 65 degrees Celsius below the minimum).'' (unsure about exact values, research needed)
  
With a maximum temperature of 9 degrees, elf (elven) civilizations won't spawn.
+
Elves can spawn where the temperature is 10 degrees or warmer. Humans can spawn where the temperature is 0 degrees or warmer.
Humans need at least 0 degrees.
 
  
 
==== Drainage ====
 
==== Drainage ====
Line 367: Line 363:
 
==== Volcanism ====
 
==== Volcanism ====
  
Volcanism controls the occurrence of igneous [[Layer|Layers]], and the formation of volcanoes. For a volcano to form, a square must have a volcanism value of 100 so reducing the maximum from 100 will make volcanoes impossible. Raising the minimum will increase the rarity of non-igneous layers.
+
Volcanism controls the occurrence of igneous [[layer]]s, and the formation of volcanoes. For a volcano to form, a square must have a volcanism value of 100, so reducing the maximum from 100 will make volcanoes impossible. Raising the minimum will increase the rarity of non-igneous layers.
  
Setting the minimum to a high value is not a good way to produce multiple volcanoes, as you are likely to get a "Volcanism not evenly distributed" rejection. Instead use the Minimum Number of Volcanoes parameter and possibly adjust the weighted ranges for volcanism as described below.
+
Setting the minimum to a high value is not a good way to produce multiple volcanoes, as you are likely to get a "Volcanism not evenly distributed" rejection. Instead, use the Minimum Number of Volcanoes parameter, and possibly adjust the weighted ranges for volcanism as described below.
  
 
==== Savagery ====
 
==== Savagery ====
  
These parameters control the level of [[Surroundings#Savage|savagery]] on the map. Raising the minimum savagery too high may make it impossible for certain races to exist, and similarly lowering the maximum too far can make it impossible for certain creatures to exist. The largest chance of having unusable maps comes from too high of a savagery value.
+
These parameters control the level of [[Surroundings#Savage|savagery]] on the map. Raising the minimum savagery too high may make it impossible for certain races to exist, and similarly lowering the maximum too far can make it impossible for certain creatures to exist. The largest chance of having unusable maps comes from a too-high savagery value.
  
 
==== Configuration Tokens ====
 
==== Configuration Tokens ====
Line 415: Line 411:
  
 
# Create a grid with 2<sup>''MeshSize'' - 1</sup> tiles in both X and Y direction.
 
# Create a grid with 2<sup>''MeshSize'' - 1</sup> tiles in both X and Y direction.
# Set the intersection points of the grid lines to a random value according to the weighted ranges.
+
# At each grid intersection, set the value according to the weighted ranges.
 
# Smooth out the area between the intersection points.
 
# Smooth out the area between the intersection points.
 
# Add noise according to the variance parameters.
 
# Add noise according to the variance parameters.
Line 647: Line 643:
 
==== Attack Population Requirement ====
 
==== Attack Population Requirement ====
  
[[Titan]]s will begin to attack your fort once at least this many dwarves inhabit it, regardless of whether any other attack criteria have been met. This number defaults to 80, which isn't usually too difficult to deal with.
+
[[Titan]]s will begin to attack your fort once at least this many dwarves inhabit it, regardless of whether any other attack criteria have been met.  
 +
 
 +
This number defaults to 80, which isn't usually too difficult to deal with.
  
 
==== Exported Wealth Requirement ====
 
==== Exported Wealth Requirement ====
Line 1,385: Line 1,383:
 
==== Make Caves Visible ====
 
==== Make Caves Visible ====
  
If set to no (default) then the location of caves will not be marked on the map. If set to yes, caves will appear on the map as {{Raw Tile|•|#808080|#00DD00}} symbols so that they may be sought out or avoided as desired.
+
If set to no (default) then the location of caves will not be marked on the map. If set to yes, caves will appear on the map so that they may be sought out or avoided as desired.
  
 
{| {{prettytable}}
 
{| {{prettytable}}
Line 1,400: Line 1,398:
 
=== Allow Init Options to Show Tunnels ===
 
=== Allow Init Options to Show Tunnels ===
  
This parameter doesn't do anything.
+
If enabled, you will be able to see the underground tunnels often built by dwarves on the world map, and they will appear as black lines, similar to roads.
  
 
{| {{prettytable}}
 
{| {{prettytable}}
Line 1,479: Line 1,477:
 
==World rejection==
 
==World rejection==
  
:''Main article [[World rejection]]''
+
:''Main article: [[World rejection]]''
  
If you are having the common problem of the generated worlds always being rejected by the world generator, see [[v0.31:World rejection|Solving World Rejection Problems (v0.31 page)]] as it contains many detailed suggestions on how to troubleshoot and solve these issues.
+
If you are having the common problem of generated worlds always being rejected by the world generator, see [[v0.31:World rejection|Solving World Rejection Problems (v0.31 page)]] as it contains many detailed suggestions on how to troubleshoot and solve these issues.
  
 
== Default Worldgen Parameters ==
 
== Default Worldgen Parameters ==

Latest revision as of 12:17, 3 April 2024

This article is about the current version of DF.
Note that some content may still need to be updated.

This article contains information on advanced world generation. For information on basic world generation, see World generation. See World token to more easily find information by the names used in the world_gen.txt file, World rejection for information on solving problems related to worlds always being rejected, and Worldgen examples for example worlds.
The advanced world generation screen.
(Click to enlarge)

Advanced world generation, also labeled as detailed mode, allows substantially more detail-oriented options of customization than standard, basic world generation. This gives the player much more control over how their world is generated. To better understand this article, it is advised that one should read about basic world generation first.

The advanced world generation screen is reached by clicking "Create new world" at the main menu, then clicking "Detailed mode". Once at that screen, clicking "Basic options" will return the user to the standard world generation screen.

Parameter sets[edit]

The list of already-defined parameter sets is in the upper-left. You can select the current set that you want to work with using the drop down menu. Any parameter set can be renamed by clicking the Quill.png.

Parameter sets can be made by clicking "New parameter set" or by clicking "Copy" to copy the selected set. This will append the selected set to the drop down menu and automatically select that set for editing.

Parameter sets are stored in the prefs/world_gen.txt file in the main DF directory. The "Save" and "Load" buttons in the upper-right of DF will save or load all of the parameter sets in this file. The world_gen.txt file can also be edited with a text editor. This is useful for parameter sets posted on the forum or wiki in text form. (See Parameter set examples below.)

The tokens used in world_gen.txt are at the bottom of each parameter description. Here's the one for the title.

Token Example Notes
[TITLE: <name>] [TITLE:MEDIUM ISLAND] Required

World name[edit]

As previously mentioned, the title of the parameter set doesn't affect the name of the world. You can specify a particular name for your world using n or set it back to the default random setting using N.

Token Example Notes
[CUSTOM_NAME: <name>] [CUSTOM_NAME:Realm of Cheese Engravings] For a random name, simply don't use this token.

World dimensions[edit]

The size of the map to be generated can be changed by changing the Width and Height values. Larger maps take longer to generate and may limit FPS in-game.

Changing the dimensions of the world will reset the parameters, because many of them have different defaults depending on the surface area available. Creating larger worlds does not necessarily mean longer world generation time - the essential factor for the gen duration is the history. If you restrict the number of historical events, you can significantly speed up the process.

Token Example Notes
[DIM:<width>:<height>] [DIM:129:129] Valid values are 17, 33, 65, 129, and 257. Others may not work. Non-square maps may result in crashesBug:2928.

Seed values[edit]

The world generation process uses a PRNG (Pseudo Random Number Generator) algorithm. A PRNG will produce a sequence of numbers that "looks" random, even though the actual sequence of numbers will always be the same if the PRNG is started with the same seed value. Basically this means that if you run world generation with a certain seed value on your computer, and someone else runs world generation with the same seed value on their computer, the same sequence of random numbers will be generated on both computers. The practical impact of this is that someone else can generate exactly the same world that you generated by entering the same seed value that you used.

In older versions, the same seed value(s) produced identical worlds on every computer at any time (if other parameters were identical, too). In the current version, the seed values for the world itself and the names seem to produce the same result, but you will get changes in events which will result in a very different world history. It seems like the history is partly random and not completely connected to the seed. Keep this in mind if you want to regenerate a particular world.

A specific seed value can be entered with s. This will change all of the seed values to the value you enter. If you need to enter different seed values for each type of seed, use e. In order to find out what seed values were used for the last world you generated, you can look at this screen. If you want to be able to tell someone else how to generate exactly the same world that you just generated, they will need all of the seed values listed under Last Param Set.

When generating a world using a seed, the way that the world is generated is also based at least in part on certain world tokens. As such, you cannot for example, change the minimum and maximum rainfall and get 'the same world but drier or wetter', instead, a different world is generated. That said, it would also seem that certain small changes to these world tokens can occasionally generate a very similar world, however, other tokens are more sensitive. For more information see the forum thread here.

The following are tokens which appear to be involved in the implementation of the seed, and are not safe to change:

  • [DIM:X:X]
  • [ELEVATION:X:X:X:X]
  • [RAINFALL:X:X:X:X]
  • [TEMPERATURE:X:X:X:X]
  • [DRAINAGE:X:X:X:X]
  • [VOLCANISM:X:X:X:X]
  • [SAVAGERY:X:X:X:X]
  • [ELEVATION_FREQUENCY:X:X:X:X:X:X]
  • [RAIN_FREQUENCY:X:X:X:X:X:X]
  • [DRAINAGE_FREQUENCY:X:X:X:X:X:X]
  • [TEMPERATURE_FREQUENCY:X:X:X:X:X:X]
  • [SAVAGERY_FREQUENCY:X:X:X:X:X:X]
  • [VOLCANISM_FREQUENCY:X:X:X:X:X:X]
  • [PARTIAL_OCEAN_EDGE_MIN:X]
  • [COMPLETE_OCEAN_EDGE_MIN:X]
  • [HAVE_BOTTOM_LAYER_1:X]
  • [MINERAL_SCARCITY:X] [1]

Many other world parameters, such as end year and embark points, can, however, be changed without it having any effect on the geography of the world generated from the seed values.

Normally, you don't enter these seed values - the world generation process comes up with seed values based on some sort of "true" random information from things like random values in uninitialized memory, the current date/time, etc.

Generating a world[edit]

Unless you're using an already-defined parameter set, you will probably want to edit the parameters. Information about each parameter is documented below. Once you are happy with the parameters you should save the values you just edited and proceed to the world generation process.

The phases of the world generation process are (this order is not completely correct):

  • Preparing elevation...
  • Setting temperature...
  • Running rivers...
  • Forming lakes and minerals...
  • Growing vegetation...
  • Verifying terrain...
  • Importing wildlife...
  • Recounting legends...
  • Placing civilizations...
  • Making cave civilizations...
  • Making cave pops...
  • Placing other beasts...
  • Placing megabeasts...
  • Placing good/evil...
  • Placing caves...
  • Prehistory generation
  • Finalizing civ mats...
  • Finalizing art...
  • Finalizing uniforms...
  • Finalizing sites...

World painter[edit]

Main article: World painter

The world painter tool allows you to paint features onto a map that is then used when generating a world. It is very difficult to use properly, and tends to result in endless rejected worlds, unless you loosen or remove the restrictions placed on biomes and civilizations in the advanced settings. That being said it is also a very powerful tool, and allows you to generate worlds more to your liking.

To access the world painter, hit e to start editing the advanced parameters and finally hit p to open world painter. How to use the world painter is not entirely obvious so please check out the World painter documentation to avoid frustration. (Losing may be fun, but frustration is not.)

Editing the parameters init file[edit]

Parameter sets are stored in the prefs/world_gen.txt file, using world tokens. You can copy and paste other players' sets of parameters into your world_gen.txt to use their parameter sets. Another place to find parameter sets is the Worldgen cookbook thread on the official forums.

Advanced parameters[edit]

To access advanced parameters, press e when at the "Design New Worlds with Advanced Parameters" screen. This will bring you to an editable list of various guidelines that the world-gen process will use when creating your new world. The parameters are described below in the order that they appear in the list in the UI, not necessarily the order they appear in the configuration file.

See world token for an index that will help you look things up by token name.

There are essentially 4 types of controls for the generation of the surface map;

Terrain Parameters: as described below, these 5 variables define the basic background world, how hot or cold it is, how much rainfall, how high the mountains are. The world automatically goes through the temperature range along the Y axis, although sometimes it will be hotter in the north, other times in the south. Minimum, maximum and X,Y variance can drastically alter the world.

Weighted Meshes: these are a way to fine-tune the amount of the 5 basic variables on the map. It can be used to set the specific distribution of different elevations or rainfall areas for example.

Rejection Parameters: Dwarf Fortress has a 'belt-and-braces' approach to world generation. The above controls allow you to shape the world, then the rejection parameters throw it out if it isn't right! There are a number of rejection parameters for the number and degree of the 5 basic variables, for biome types etc. If the world does not meet the requirements of any one rejection parameter the world is rejected and re-randomised. Also see World Rejection

There are also the feature-placing options such as rivers, mountain peaks, volcanoes and oceans, which can cause rejections if the terrain parameters don't allow enough suitable locations for the features to be placed.

If you are experimenting with world design, one method would be to disable the rejection parameters and use the first two control types. Otherwise, any significant change will likely result in endless rejections.


Seed values[edit]

Here, you can enter specific seed values for different parts of the world generation process - different sequences of pseudorandom numbers are used for different parts, so you can use this to reproduce only the particular part of world generation from some previously generated world, if you want. Normally, you'll want to leave all of these set to Random, unless you're specifically trying to reproduce the results of another world generation run.


Token Example Notes
[SEED:<number>] [SEED:31337]

For each of these not in the config file, a random seed will be used.

[HISTORY_SEED:<number>] [HISTORY_SEED:31337]
[NAME_SEED:<number>] [NAME_SEED:31337]
[CREATURE_SEED:<number>] [CREATURE_SEED:31337]

Embark Points[edit]

This controls the number of points that you have for skills and equipment when you embark in fortress mode. Turning this value up will allow games started in this world to start with more skilled dwarves with better equipment. Normally, you can do just fine by leaving this value set to default, but you might want to turn it up for experimental/testing purposes or to help dwarves survive in a particularly evil world, or turn it down for certain challenges. The highest amount this value can be set to is 10,000.

Token Example Notes
[EMBARK_POINTS:<number>] [EMBARK_POINTS:1504] Required

End year[edit]

This is how many years of history are generated for the world; basically the same as the History parameter in basic world gen, except that you can enter an exact value for the number of years. See History for more info.

History is divided into "ages" which are determined by the percentage of megabeasts and semi-megabeasts killed at various points. One can attempt to make a world go through the ages more quickly by pumping up the ratio of semimegabeast to megabeast caves, the former of which are usually more killable than the regular megabeasts. This will net you more "Age of Legends", "Age of Heroes", etc.

For more information on the history aspect of the game, see Legends and Ages.

Token Example Notes
[END_YEAR:<number>] [END_YEAR:1050] Required

Population cap after civ creation[edit]

This determines the maximum possible population of civilization member historical figures alive at a given time during worldgen. Not all members of a civilization are historical figures. This tag does not directly influence the total population of civilized beings as it once did when populations were all historical figures, so the description is a bit confusing. You can enter -1 to make the historical population unlimited.

Each race may have up to 100 civilizations each, and each civilization a maximum population of 10,000. Civilizations, known as entities in the raw files, have 3 or 4 basic variables that will greatly affect their final placement on the world map. See Population (Entity Token) for more information on interpreting/editing the raws if you need more precise control of civilization placement and total population numbers.

Huge historical figure populations can cause the size of history data to explode, cause history generation to take forever, lower FPS, and generally slow down the game.

Token Example Notes
[TOTAL_CIV_POPULATION:<number>] [TOTAL_CIV_POPULATION:15000] Required

Site cap after civ creation[edit]

This controls the maximum number of towns and similar sites on the entire map. Raising the number will allow for more towns, etc. though the number of sites will ultimately still be limited by things like space, terrain, and population cap. Note that this parameter controls only "civilization" sites like towns - other sites, such as lairs, will be added onto this maximum.

After civilizations reach this cap, they will not spread out any more to place new cities. By default, the raws limit each civilization site to a population of 120, regardless of the race of the civilization - therefore, without editing the raws, the total population on the map can't go above site cap x 120.

Beware; increasing this too high can slow worldgen down by a lot. Another effect can be goblins (or certain other civs) sometimes overwhelming all other civilizations and/or flooding the world with their homes, leaving no good places to build your fortress, be it human or dwarven. If you choose a low cap to hasten world generation, the cap will likely be reached within years, stopping expansion of all civs. If you want a good, long history, you will have to adjust site/population cap and the number of civs many times to find one fulfilling your needs.

Token Example Notes
[SITE_CAP:<number>] [SITE_CAP:1040] Required

Beast control[edit]

These parameters don't usually matter too much, but may matter for small numbers of beasts.

Percentage of Megabeasts and Titans Dead for Stoppage[edit]

The world starts out with a certain number of powerful megabeast and titan entities in existence. If a percentage of the megabeast and titan population dies out during history generation, then history generation will stop early. For example, if the elimination value is 80%, and the generated history starts with 200 entities and 160 of those 200 entities are eliminated by historical events before the End Year is reached, history generation will stop immediately.

If you want to end the creation of your world at the beginning of a certain age, choose the following values:

  • Age of Legends: ~34%
  • Age of Heroes: ~67%

If there are three or fewer titans or megabeasts in your world, the age will be given a special name reflecting the remaining megabeasts/titans, instead.

Year to Begin Checking Megabeast Percentage[edit]

The percentage of dead megabeasts and titans for stoppage will not be checked until this year is reached in history generation. This can be used to ensure that a world reaches a certain year even if all of the megabeasts in the world are slain earlier.

If the number of living megabeasts and titans starts at or drops to less than four, then world generation will always stop if the current year is equal to or greater than the Year to Begin Checking Megabeast Percentage regardless of how many megabeasts and titans are dead — Percentage of Megabeasts and Titans Dead for Stoppage is ignored. The number of megabeasts and titans at the start of the world is set by the sum of the Max Megabeasts Caves and Titan Number parameters.

Token Example Notes
[BEAST_END_YEAR:<year>:<percentage or -1>] [BEAST_END_YEAR:200:80] Use -1 as percentage to disable. Year must still be at least 2.

Cull Unimportant Historical Figures[edit]

Whether or not the game will ignore unimportant figures in history generation. The culling of unimportant historical figures is a CPU-intensive step in history generation but it saves memory and will speed up loading/saving games in fortress mode. This does mean that the "unimportant" figures will not appear in Legends mode or in engravings, but unimportant figures would likely not appear in engravings anyway.

Unimportant figures are creatures who suffer early deaths, never have offspring or kill a named creature during world gen. For example, a resident of a goblin tower may get murdered by demons at a young age. After culling unimportant figures, Legends mode would say "In the year 102, the demon Evil McEvilface killed an unknown creature at Eviltower."

Token Example Notes
[CULL_HISTORICAL_FIGURES:<0 or 1>] [CULL_HISTORICAL_FIGURES:0] 0 = No, 1 = Yes

Reveal All Historical Events[edit]

Setting this to Yes will allow access to most information about the history of the world in Legends mode. All events will be revealed, but some historical figures, sites, regions, and civilizations and other entities may not be, possibly because they are not known to any civilization. If set to No, then you will have to discover historical information in adventure mode or by instructing dwarves to make engravings.[Verify]

Token Example Notes
[REVEAL_ALL_HISTORY:<0 or 1>] [REVEAL_ALL_HISTORY::1] 0 = No, 1 = Yes

Terrain Parameters[edit]

These determine how random values for terrain elevation, rainfall, temperature, drainage, volcanism, and savagery are generated. What biomes exist are then determined by how these factors overlap with each other.

Minima and Maxima[edit]

These are the absolute minimum and maximum values that can ever be generated for a parti