- 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.
Difference between revisions of "Advanced world generation"
(→World name: added DFHack rename) |
(→Number of Werebeast Curse Types: Wereblob bug) |
||
| (32 intermediate revisions by 4 users not shown) | |||
| Line 9: | Line 9: | ||
== Parameter sets == | == Parameter sets == | ||
| − | There are multiple default sets of all the advanced world generation parameters hard coded in ''Dwarf Fortress'' | + | There are multiple default sets of all the advanced world generation parameters hard-coded in ''Dwarf Fortress'', which will be overridden by the <tt>prefs/world_gen.txt</tt> file in the main ''Dwarf Fortress'' directory, if it exists. It does not exist by default, you must create it, either by saving the default sets, or saving a copy from the [[world_gen.txt]] wiki page or elsewhere. This file can then be edited with a text editor, and you can copy and paste other players' sets of parameters into it. For sources of such parameter sets see [[Advanced_world_generation#Parameter_set_examples|Parameter set examples]] below. |
| − | To get back the default sets | + | To get back the default sets, move the existing <tt>prefs/world_gen.txt</tt> to somewhere else (like Documents), or delete it if you do not want to keep the changes, then load the sets in the game, it will then use the hardcoded defaults. |
== User interface == | == User interface == | ||
| Line 74: | Line 74: | ||
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. | 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 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.{{bug| | + | 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.{{bug|6934}} Keep this in mind if you want to regenerate a particular world. |
The way that a world is generated can also be affected by certain world tokens. Changing them causes that code to use more or fewer PRNG values, causing later uses to get different parts of the sequence. So, 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 [http://www.bay12forums.com/smf/index.php?topic=112132.msg3404199#msg3404199 here]. | The way that a world is generated can also be affected by certain world tokens. Changing them causes that code to use more or fewer PRNG values, causing later uses to get different parts of the sequence. So, 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 [http://www.bay12forums.com/smf/index.php?topic=112132.msg3404199#msg3404199 here]. | ||
| Line 117: | Line 117: | ||
Leaving tokens out of a set in <tt>world_gen.txt</tt> will cause the game to use default values which are not adjusted for smaller world sizes, this may cause smaller worlds to always be rejected. | Leaving tokens out of a set in <tt>world_gen.txt</tt> will cause the game to use default values which are not adjusted for smaller world sizes, this may cause smaller worlds to always be rejected. | ||
| − | If you are experimenting with world design, there is also a [[Settings#Feature_toggles|game setting]] that will log the rejection reasons. With that information you can then either adjust the rejection parameters to allow those worlds, or the other parameters to prevent them from trying to generate. | + | If you are experimenting with world design, there is also a [[Settings#Feature_toggles|game setting]] that will log the rejection reasons to ``[[map_rejection_log.txt]]``. With that information you can then either adjust the rejection parameters to allow those worlds, or the other parameters to prevent them from trying to generate. ''Dwarf Fortress'' will keep adding to the file, so you may want to trim or delete it occasionally. |
The parameters are described below in the order that they appear in the list in the game, which is not necessarily the order they appear in <tt>world_gen.txt</tt>. See [[world token]] for an index that will help you look things up by token name. The tokens used in <tt>world_gen.txt</tt> are at the bottom of each of the following parameter descriptions. | The parameters are described below in the order that they appear in the list in the game, which is not necessarily the order they appear in <tt>world_gen.txt</tt>. See [[world token]] for an index that will help you look things up by token name. The tokens used in <tt>world_gen.txt</tt> are at the bottom of each of the following parameter descriptions. | ||
| Line 199: | Line 199: | ||
=== End year === | === End year === | ||
| − | The maximum number of years generated for the world, although generation can be paused and the world used as is any time after | + | The maximum number of years generated for the world, although generation can be paused and the world used as is any time after the second year; the same as the [[World_generation#History|History]] parameter in basic world gen, except that you can enter an exact value. A too-short history can limit the materials available to civilizations, and [[Chosen|certain adventure mode features]] are only available after certain site events, while too long a history often leads to civilizations dying. |
For more information on the history aspect of the game, see [[Legends]] and [[Calendar#Ages|Ages]]. | For more information on the history aspect of the game, see [[Legends]] and [[Calendar#Ages|Ages]]. | ||
| Line 214: | Line 214: | ||
=== Population cap after civ creation === | === Population cap after civ creation === | ||
| + | A soft limit to the total number of [[historical figure]]s alive at the same time during generation across all civilizations, only preventing the birth of new historical figures.{{cite forum|140544/5701667}} Each civilization is allotted a percentage of the total by the percentage of sites they control.{{cite forum|159164/7553641}} Civilizations also have non-historical populations, and there is no setting to limit those (in early versions, all civilization members were historical figures, this is also why the name of this setting is misleading). Each [[entity]] also has limits from their raws, see the [[Entity_token#Population|population]] entity tokens, and setting this to unlimited will not remove those. | ||
| − | + | Huge historical figure populations can slow generation and the game in general. | |
| − | |||
| − | |||
| − | |||
| − | Huge historical figure populations can | ||
| − | |||
{| {{prettytable}} | {| {{prettytable}} | ||
|- bgcolor="#dddddd" | |- bgcolor="#dddddd" | ||
| Line 229: | Line 225: | ||
| <tt><nowiki>[TOTAL_CIV_POPULATION:<number>]</nowiki></tt> | | <tt><nowiki>[TOTAL_CIV_POPULATION:<number>]</nowiki></tt> | ||
| <tt><nowiki>[TOTAL_CIV_POPULATION:15000]</nowiki></tt> | | <tt><nowiki>[TOTAL_CIV_POPULATION:15000]</nowiki></tt> | ||
| − | | | + | | -1 to 100,000, -1 is no limit |
|} | |} | ||
=== Site cap after civ creation === | === Site cap after civ creation === | ||
| + | Total number of [[site]]s that can be directly created by all civilizations combined like [[hillocks]], [[hamlet]]s, [[dark pits]], [[forest retreat]]s, etc. Does not prevent the placement of initial civilization sites, though they will then be counted for the limit. Does not affect creature sites like [[cave]]s or [[lair]]s, group sites like [[castle]]s, [[monastery|monasteries]], [[tower]]s, [[fort]]s, or [[camp]]s, or unpopulated sites like [[tomb]]s. After this limit is reached, no civilization will be able to place new sites. See the [[Entity_token#Placement|placement]] entity tokens for other ways that civilization site placement can be limited. | ||
| − | + | Increasing this will slow generation down and reduce the available places for player sites. Since the {{token|MAX_SITE_POP_NUMBER|entity}} entity token limits the historical figure population per site, this site cap can also limit the total historical figure population of all civilizations combined, and some expand faster than others getting more sites before the limit is reached. | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
{| {{prettytable}} | {| {{prettytable}} | ||
|- bgcolor="#dddddd" | |- bgcolor="#dddddd" | ||
| Line 247: | Line 239: | ||
|- | |- | ||
| <tt><nowiki>[SITE_CAP:<number>]</nowiki></tt> | | <tt><nowiki>[SITE_CAP:<number>]</nowiki></tt> | ||
| − | | <tt><nowiki>[SITE_CAP: | + | | <tt><nowiki>[SITE_CAP:1500]</nowiki></tt> |
| − | | | + | | -1 to 100,000, -1 is no limit |
|} | |} | ||
| Line 328: | Line 320: | ||
==== Elevation ==== | ==== Elevation ==== | ||
| − | This controls the range of terrain elevations that can occur in the world. | + | This controls the range of terrain elevations that can occur in the world. Usually, you just want to leave the min/max values alone. Raising the minimum elevation can, for example, make it impossible for oceans to exist. This does '''not''' directly control the number of available Z-levels at a particular site, though high maximum values may contribute to peaks, which can raise the number of above ground Z-levels - in other words, a maximum elevation of 400 and minimum of 1 does not mean you get 400 Z-levels, but it might increase the number of Z-levels somewhat in some regions compared to others. Raising the variance will result in a more bumpy, uneven landscape. |
| − | |||
| − | Usually you just want to leave the min/max values alone. Raising the minimum elevation can, for example, make it impossible for oceans to exist. This does '''not''' directly control the number of available Z-levels at a particular site, though high maximum values may contribute to peaks which can raise the number of above ground Z-levels | ||
| − | |||
| − | Raising the variance will result in a more bumpy, uneven landscape. | ||
Some biomes/features that are impacted by elevation: | Some biomes/features that are impacted by elevation: | ||
| − | * A high minimum (above 99) means no oceans as they need elevations below 100. | + | * A high minimum (above 99) means no oceans, as they need elevations below 100. |
| − | * 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 at elevations of 400. | * Mountain peaks can only form at elevations of 400. | ||
| Line 348: | Line 336: | ||
==== Temperature ==== | ==== Temperature ==== | ||
| − | 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. | + | {{main|Climate|Temperature}} |
| + | 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. The temperature scale used in this setting is related to regular degrees Urist by the equation "local temp = world temp * 0.75 + 10000".{{cite forum|169696/8395484}} This scale doesn't seem to be used anywhere else in the game. See [[Climate]] for more info. | ||
| − | 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| | + | 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) |
| − | Elves can spawn where the temperature is 10 degrees or warmer | + | Elves can spawn where the temperature is 10 degrees or warmer, and humans can spawn where the temperature is 0 degrees or warmer. |
==== Drainage ==== | ==== Drainage ==== | ||
| Line 427: | Line 416: | ||
==== Interaction between Mesh Size and Variance ==== | ==== Interaction between Mesh Size and Variance ==== | ||
| − | The end result can vary greatly depending on how the corresponding [[#X_and_Y_Variance|X and Y Variance]] parameters are set. First of all, if the variance is too large the noise it adds can completely negate the effect of the weighted ranges. For instance, with a 2×2 mesh, the default variance parameters are high enough that usually the mesh grid can hardly be recognized. How strong the variance's effect is, is also dependent on the mesh size. Having a larger mesh size (i.e. smaller grid tiles) means the variance also has to be higher for a visible effect. For instance, with a variance of 400, the effects are clearly visible with a 2×2 mesh and barely visible at all with a 8×8 mesh. Note that this effect is directly dependent on the mesh size and not, as one might expect, on the actual size of the grid tiles. This means, that a large world with a | + | The end result can vary greatly depending on how the corresponding [[#X_and_Y_Variance|X and Y Variance]] parameters are set. First of all, if the variance is too large the noise it adds can completely negate the effect of the weighted ranges. For instance, with a 2×2 mesh, the default variance parameters are high enough that usually the mesh grid can hardly be recognized. How strong the variance's effect is, is also dependent on the mesh size. Having a larger mesh size (i.e. smaller grid tiles) means the variance also has to be higher for a visible effect. For instance, with a variance of 400, the effects are clearly visible with a 2×2 mesh and barely visible at all with a 8×8 mesh. Note that this effect is directly dependent on the mesh size and not, as one might expect, on the actual size of the grid tiles. This means, that a large world with a 32×32 mesh will look essentially the same as a pocket world with a 2×2 mesh, only stretched to 256 times the size. |
Also see this [http://www.bay12forums.com/smf/index.php?topic=139916.0 forum post] for more details. | Also see this [http://www.bay12forums.com/smf/index.php?topic=139916.0 forum post] for more details. | ||
| Line 532: | Line 521: | ||
*4 results in one or more island(s) depending on things like elevation variance and weights. Regardless of whether you get one island or multiple islands, the entire map will be surrounded by water. | *4 results in one or more island(s) depending on things like elevation variance and weights. Regardless of whether you get one island or multiple islands, the entire map will be surrounded by water. | ||
| − | Unfortunately, there's no easy way to control which oceans end up on which edges, except perhaps setting X | + | Unfortunately, there's no easy way to control which oceans end up on which edges, except perhaps setting X/Y variance to different values. |
Edge oceans will take up part of the other edges too. For example, a full edge ocean on the east side will have part of the north and south sides underwater, but that does ''not'' add to the ''partial'' edge oceans count. | Edge oceans will take up part of the other edges too. For example, a full edge ocean on the east side will have part of the north and south sides underwater, but that does ''not'' add to the ''partial'' edge oceans count. | ||
| Line 735: | Line 724: | ||
The number of different types of [[werebeast]]s that can exist in the world. It is common for werebeasts, unlike vampires, to assume many different forms and variations, the most well-known of these amount to different species of animals, from lizards, to wolves, to even bears. Setting this to zero means no werebeasts will exist, and will also remove a large amount of [[fun]] from the game. | The number of different types of [[werebeast]]s that can exist in the world. It is common for werebeasts, unlike vampires, to assume many different forms and variations, the most well-known of these amount to different species of animals, from lizards, to wolves, to even bears. Setting this to zero means no werebeasts will exist, and will also remove a large amount of [[fun]] from the game. | ||
| + | |||
| + | In vanilla, there are only 82 possible unique werebeast species. Any further species will generate as wereblobs.{{bug|13308}} | ||
{| {{prettytable}} | {| {{prettytable}} | ||
| Line 817: | Line 808: | ||
=== Number of Evil Cloud / Evil Rain Types === | === Number of Evil Cloud / Evil Rain Types === | ||
| − | This number specifies [[Weather#Evil weather| | + | This number specifies how many [[Weather#Evil weather|various face-melting, eye-boiling, and zombifyingly-fun]] clouds of pure evil may appear in your world. Setting this to zero means you no longer will ever have to deal with encroaching dust walls of doom in that world. It is generally advised to keep this value low... |
{| {{prettytable}} | {| {{prettytable}} | ||
| Line 854: | Line 845: | ||
| <tt><nowiki>[GENERATE_DIVINE_MATERIALS:<1 or 0>]</nowiki></tt> | | <tt><nowiki>[GENERATE_DIVINE_MATERIALS:<1 or 0>]</nowiki></tt> | ||
| <tt><nowiki>[GENERATE_DIVINE_MATERIALS:1]</nowiki></tt> | | <tt><nowiki>[GENERATE_DIVINE_MATERIALS:1]</nowiki></tt> | ||
| + | | 1/0 = Yes/No | ||
| + | |} | ||
| + | |||
| + | === Generate Mythical Materials === | ||
| + | |||
| + | {| {{prettytable}} | ||
| + | |- bgcolor="#dddddd" | ||
| + | ! Token | ||
| + | ! Example | ||
| + | ! Notes | ||
| + | |- | ||
| + | | <tt><nowiki>[GENERATE_MYTHICAL_MATERIALS:<1 or 0>]</nowiki></tt> | ||
| + | | <tt><nowiki>[GENERATE_MYTHICAL_MATERIALS:1]</nowiki></tt> | ||
| + | | 1/0 = Yes/No | ||
| + | |} | ||
| + | |||
| + | === Allow Mythical Healing === | ||
| + | |||
| + | {| {{prettytable}} | ||
| + | |- bgcolor="#dddddd" | ||
| + | ! Token | ||
| + | ! Example | ||
| + | ! Notes | ||
| + | |- | ||
| + | | <tt><nowiki>[ALLOW_MYTHICAL_HEALING:<1 or 0>]</nowiki></tt> | ||
| + | | <tt><nowiki>[ALLOW_MYTHICAL_HEALING:1]</nowiki></tt> | ||
| 1/0 = Yes/No | | 1/0 = Yes/No | ||
|} | |} | ||
| Line 1,157: | Line 1,174: | ||
=== Cavern Parameters === | === Cavern Parameters === | ||
| − | [[Caverns]] are the hollow areas underground, which dwarves tend to encounter when they're digging around. The '''Cavern Layer Number''' parameter determines how many cavern systems will be generated, not including the magma layer or the Bottom layer. Defaults to three | + | [[Caverns]] are the hollow areas underground, which dwarves tend to encounter when they're digging around. The '''Cavern Layer Number''' parameter determines how many cavern systems will be generated, not including the magma layer or the Bottom layer. Defaults to three - setting it to lower values could help FPS. Setting it to 2 will merge cavern 3 species into the 2nd cavern, and setting it to 1 will merge all into one cavern. However, disabling them entirely by setting it to 0 will make it impossible to grow any underground plants, as none will exist for your civilization to cultivate, nor will they be available on embark. |
| − | |||
| − | |||
| − | |||
| − | Setting it to 2 will merge cavern 3 species into the 2nd cavern, and setting it to 1 will merge all into one cavern. However, disabling them entirely by setting it to 0 will make it impossible to grow any underground plants, as none will exist for your civilization to cultivate, nor will they be available on embark. | ||
*Setting caverns to a sub-3 number (Spoiler, highlight to view) <span style='color:#f8f8f8;'>erases about one-third of HFS spires{{Bug|10267}} and prevents dig deep disasters.</span> Additionally, random plant or animal species can be more frequently absent. | *Setting caverns to a sub-3 number (Spoiler, highlight to view) <span style='color:#f8f8f8;'>erases about one-third of HFS spires{{Bug|10267}} and prevents dig deep disasters.</span> Additionally, random plant or animal species can be more frequently absent. | ||
| Line 1,352: | Line 1,365: | ||
|} | |} | ||
| − | ==== Number of | + | ==== Number of Caves ==== |
| − | + | The number of caves generated in mountainous and non-mountainous regions, mountain caves will always be generated on the edge of mountain ranges next to non-mountainous regions. Lurking [[kobold]]s set up shop in caves, and store their stolen items there - a setting of 0 in both will stop kobold civilizations from appearing. Special note: a cave is not initially a [[lair]], although beasts can later use them as their lair. | |
| − | The number of non-mountainous caves | ||
| − | |||
{| {{prettytable}} | {| {{prettytable}} | ||
|- bgcolor="#dddddd" | |- bgcolor="#dddddd" | ||
Latest revision as of 18:25, 17 October 2025
| This article was migrated from DF2014:Advanced world generation and may be inaccurate for the current version of DF (v52.04). See this page for more information. |
v52.04 · v0.47.05 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.
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]
There are multiple default sets of all the advanced world generation parameters hard-coded in Dwarf Fortress, which will be overridden by the prefs/world_gen.txt file in the main Dwarf Fortress directory, if it exists. It does not exist by default, you must create it, either by saving the default sets, or saving a copy from the world_gen.txt wiki page or elsewhere. This file can then be edited with a text editor, and you can copy and paste other players' sets of parameters into it. For sources of such parameter sets see Parameter set examples below.
To get back the default sets, move the existing prefs/world_gen.txt to somewhere else (like Documents), or delete it if you do not want to keep the changes, then load the sets in the game, it will then use the hardcoded defaults.
User interface[edit]
First, there is a line of text inputs and buttons along the top of the screen, from left to right:
- The drop down menu of currently defined parameter sets, click the down arrow to select a set that you want to work with. The currently selected set can be renamed by clicking the current name or the
button. The first set in the file is selected by default, usually "LARGE ISLAND". See Parameter set title. - The dimensions of the world for the selected set, see World dimensions.
- A text entry box to set all of the seed options to the same seed, will show "Random seed", "Various seeds", or, if all four seeds are set to use the same value, that value. See Seed values and Seed notes.
- The Copy Button to make a copy of the currently selected set and appends it to the bottom of the list.
- The red Delete button to delete the currently selected set, you will be prompted to confirm the deletion.
- The New parameter set to create a new parameter set and appends it to the bottom of the list. This seems to just copy the default "LARGE REGION" set.
- The Save button to save all of the current sets to the prefs/world_gen.txt file.
- The Load button to load from the same file, there is no confirmation, any unsaved changes will be lost. If that file does not exist, this resets all of the sets to the defaults.
Most of the middle is the parameters themselves, with a scroll bar to the right. Each row of the list can include:
- The name of the option
- The range of accepted values; not every option has this, and does not always match the displayed value, for example "0 to 1" might show as "No" and "Yes".
- A plus button to increase the value or cycle through options, when applicable (this button will be missing if the range is missing.)
- The current value; can be clicked to edit, to actually set a value you must press enter, without doing that, clicking another entry box or right clicking will instead reset to the currently set value.
- An edit button to show that the previous box is editable, same as clicking on the text box.
- A minus button to decrease the value or cycle through options, when applicable (this button will be missing if the range is missing).
- A red button to disable this parameter, when applicable, usually setting the value to 0, or -1.
At the bottom right are 3 or 4 more buttons:
- The Create world button to do just that using the currently selected set, unsaved changes are lost.
- The Basic options button to go back to the normal world generation screen, unsaved changes are not lost if you come directly back to Detailed mode.
- The Mods button to go to the mod selection screen, unsaved changes are not lost if you come directly back to Detailed mode. Only shown if mods are available.
- Back to main menu button to do just that, unsaved changes are lost.
World painter[edit]
- Main article: World painter
The world painter tool is not in the current version of Dwarf Fortress; it allowed you to paint features onto a map. However, those maps can still be used when generating a world by pasting world painter parameter set maps created in old versions into the prefs/world_gen.txt file. Perfect World DF is a utility that uses the same parameter functionality as the world painter to paint a map, and it also can work with the current version of Dwarf Fortress.
Generating a world[edit]
You can either use an already-defined parameter set, or you can edit them, though it is highly suggested to edit a copy of one of the defaults. Once you are happy with the parameters you should save the values you just edited before you click the Create world button. Information about each parameter is documented below.
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...
Seed notes[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 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.Bug:6934 Keep this in mind if you want to regenerate a particular world.
The way that a world is generated can also be affected by certain world tokens. Changing them causes that code to use more or fewer PRNG values, causing later uses to get different parts of the sequence. So, 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 use the PRNG values in ways that changing them will likely cause broader changes:
- [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 game comes up with values based on some other sort of pseudo-random information from things like the current date and time.
When generating a world, Dwarf Fortress records the seeds it used in gamelog.txt.
Advanced parameters[edit]
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, or cold at both. 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. They can be used to set the specific distribution of different elevations or rainfall areas for example.
Feature parameters: 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.
Rejection parameters: Dwarf Fortress uses 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 does not meet certain criteria. 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.
Leaving tokens out of a set in world_gen.txt will cause the game to use default values which are not adjusted for smaller world sizes, this may cause smaller worlds to always be rejected.
If you are experimenting with world design, there is also a game setting that will log the rejection reasons to map_rejection_log.txt. With that information you can then either adjust the rejection parameters to allow those worlds, or the other parameters to prevent them from trying to generate. Dwarf Fortress will keep adding to the file, so you may want to trim or delete it occasionally.
The parameters are described below in the order that they appear in the list in the game, which is not necessarily the order they appear in world_gen.txt. See world token for an index that will help you look things up by token name. The tokens used in world_gen.txt are at the bottom of each of the following parameter descriptions.
Parameter set title[edit]
This sets the name of the parameter set itself, as used in the list of sets (this has nothing to do with the name of the generated world).
| Token | Example | Notes |
|---|---|---|
| [TITLE:<name>] | [TITLE:MEDIUM ISLAND] | Required |
World dimensions[edit]
The size of the map for the current set can be changed by changing the Width and Height values at the top next to the set title. You will need to confirm this, since changing the dimensions of the world will change other parameters, because many of them have different defaults depending on the surface area available.
Larger maps usually take longer to generate and may reduce FPS in-game, though this is really a matter of larger worlds usually having more civilizations, sites, historical figures, and events; restricting the number of those can speed up the process. Non-square maps may result in crashesBug:2928.
| Token | Example | Notes |
|---|---|---|
| [DIM:<width>:<height>] | [DIM:257:257] | Valid values are 17, 33, 65, 129, and 257, other values will use one of those. Changing the size in the file without adjusting other parameters can cause many rejections. |
Seed values[edit]
Enables the use of, and specifies seed values for, different parts of the world generation process. Just entering a specific seed does not enable it, that must be done separately, although using the box at the top to set all the seeds to the same value does enable them all. Enabling a seed puts the token in using what ever is in the text box below. If you enable a seed, but do not enter a seed, the string "Seed text" will be used ([SEED:Seed text]). Trying to use a ] in the string in the file will end the seed there, since it closes the token, any text after that will be ignored. Normally, just leave these set to Random, unless trying to reproduce the results of a previous world generation. See also the seed notes section above.
| Token | Example | Notes |
|---|---|---|
| [SEED:<text>] | [SEED:31337] |
For each of these not in the config file, a random seed will be used, and the first seed is not used to generate the others. The seeds used are output to gamelog.txt when world generation starts. |
| [HISTORY_SEED:<text>] | [HISTORY_SEED:31337] | |
| [NAME_SEED:<text>] | [NAME_SEED:31337] | |
| [CREATURE_SEED:<text>] | [CREATURE_SEED:31337] |
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, or leave the value blank for a random one. (The DFHack utility adds an option to rename the world using the in-game languages.)
| Token | Example | Notes |
|---|---|---|
| [CUSTOM_NAME:<name>] | [CUSTOM_NAME:Realm of Cheese Engravings] | For a random name, simply don't use this token. |
Embark Points[edit]
The number of points for equipment and animals when embarking in fortress mode (there is no equivalent setting for adventure mode). Normally, the default of 1504 is fine, but can be increased for various purposes like experimentation or to help dwarves survive in a particularly evil world, or reduced for certain challenges.
| Token | Example | Notes |
|---|---|---|
| [EMBARK_POINTS:<number>] | [EMBARK_POINTS:1504] | 0 to 10,000 |
End year[edit]
The maximum number of years generated for the world, although generation can be paused and the world used as is any time after the second year; the same as the History parameter in basic world gen, except that you can enter an exact value. A too-short history can limit the materials available to civilizations, and certain adventure mode features are only available after certain site events, while too long a history often leads to civilizations dying.
For more information on the history aspect of the game, see Legends and Ages.
| Token | Example | Notes |
|---|---|---|
| [END_YEAR:<number>] | [END_YEAR:250] | 2 to 10,000 |
Population cap after civ creation[edit]
A soft limit to the total number of historical figures alive at the same time during generation across all civilizations, only preventing the birth of new historical figures.[2] Each civilization is allotted a percentage of the total by the percentage of sites they control.[3] Civilizations also have non-historical populations, and there is no setting to limit those (in early versions, all civilization members were historical figures, this is also why the name of this setting is misleading). Each entity also has limits from their raws, see the population entity tokens, and setting this to unlimited will not remove those.
Huge historical figure populations can slow generation and the game in general.
| Token | Example | Notes |
|---|---|---|
| [TOTAL_CIV_POPULATION:<number>] | [TOTAL_CIV_POPULATION:15000] | -1 to 100,000, -1 is no limit |
Site cap after civ creation[edit]
Total number of sites that can be directly created by all civilizations combined like hillocks, hamlets, dark pits, forest retreats, etc. Does not prevent the placement of initial civilization sites, though they will then be counted for the limit. Does not affect creature sites like caves or lairs, group sites like castles, monasteries, towers, forts, or camps, or unpopulated sites like tombs. After this limit is reached, no civilization will be able to place new sites. See the