Difference between revisions of "DF2014:World generation"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
m
(The generation process)
Line 265: Line 265:
  
 
In practice, you don't need to worry about this for basic world generation, because the preset hidden values that determine acceptable criteria are designed to decrease the chance of rejections, but certain combinations of basic parameters (especially with very large worlds) may make it harder for the process to generate "acceptable" worlds. Basically, what this amounts to is that world generation will just take longer for certain parameter selections that are more difficult for the generator to satisfy.
 
In practice, you don't need to worry about this for basic world generation, because the preset hidden values that determine acceptable criteria are designed to decrease the chance of rejections, but certain combinations of basic parameters (especially with very large worlds) may make it harder for the process to generate "acceptable" worlds. Basically, what this amounts to is that world generation will just take longer for certain parameter selections that are more difficult for the generator to satisfy.
 +
 +
=== Map generation ===
 +
 +
The game allocates the memory for the map.  Then it chooses what sort of pole (e.g. north, south) it is going to have (or respects the parameters fed by the player, throughout.)  The basic map field values (elevation, rainfall, temperature, drainage, volcanism, wildness) are seeded along a grid of variable size, respecting various settings (oceans, island sizes, other variances, etc.), and then filled in fractally.  The poles vary the temperature, and it selects some points for the highest peaks.  Here it does a first pass to see how it is doing, and attempts to adjust some altitudes to fit the map within the desired parameters if it missed.  The world can be rejected at this point if it is unfixable, and it tries again.
 +
 +
The first derived field, vegetation, is then set based on elevation, rainfall, temperature, etc., and it tests for biome rejections if the map's biomes don't satisfy the ranges set in the parameters.  The mid-level elevations are smoothed at this point to make more plains areas, and volcanoes are placed respecting the hot spots in the volcanism field.
 +
 +
Then we enter the erosion and river stage.  Small oceans are dried out, and it locates edges of mountain sides where it can run test rivers.  It also places the camera on one of these so the player can watch the process.  Many fake rivers flow downward from these points, carving channels in the elevation field if they can't find a path to the sea.  Extreme elevations differences are often smoothed here so that everything isn't canyons.  Mineral types are not yet taken into account for that. Lakes are grown out at several points along the rivers.
 +
 +
Elevations are smoothed again from the mountains down to the sea, and the peaks and volcanoes do some local adjustments.  Now that the elevations are finalized, it makes adjustments to rainfall based on rain shadows and orographic precipitation.  Temperatures are reset based on elevation and rainfall and the dampening effects of forests, and it uses the new values to set the vegetation level one final time.  Salinity values are set for the ocean and tiles neighboring the ocean.
 +
 +
Now that everything has settled down, we can detect the limits of the final biome regions and give them names and their own identity.  Geological layers and the underground layers are also added here.  There's a final verification process against the parameters here, to make sure it hasn't drifted too far afield from what the player wanted.  Once that's done, it generates the initial wildlife populations in each region, and sets some weather variables.
  
 
=== History ===
 
=== History ===
  
Once the world itself has been generated, the process of generating historical events will begin. This can take a ''very'' long time for large, heavily populated worlds with very long, 2,000 year histories.
+
Once the world itself has been generated, history itself can begin at this point.  Civilizations and caves are placed.  It's a bit complicated to go into what happens after that, but the basic idea is that there's a giant zero-player strategy game going on with somewhat loose turn rules and bad AI (but thousands of agents), and history is just a record of that.  Procedurally generating stories by recording a log of a simulation is a valid enough approach, though it has drawbacks, of course.  It's a lot of work, you need to do post-processing or investigation to find any good moments you'd like to highlight, and if you don't have enough dynamics and mechanisms, the output can be boring (in any number of ways.). This can take a ''very'' long time for large, heavily populated worlds with very long, 2,000 year histories.
  
 
=== Finishing ===
 
=== Finishing ===

Revision as of 03:12, 11 June 2019

This article is about the current version of DF.

To begin playing, you must first generate a world to play in. At the main menu, you can choose to:

  • Create New World!, or
  • Design New World With Advanced Parameters

This article will cover basic world generation using the first option. For advanced parameters, see advanced world generation.

World generation can take a long time and may seem like a nuisance, but it is the actual heart of the game. This is where Toady invests most of his time, this is the piece of art that makes Dwarf Fortress unique enough for the Museum of Modern Art in New York City. While you wait for the counter to finish, an entire fantasy world with unique geography, history, and even language is created. Entire civilizations rise, wage war, fall, rise again, and fall. Countless characters, each with a unique appearance and personality, live their lives, some of them calmly, while others go out and influence history. The world's complexity could rival the works of Tolkien himself. Dwarf Fortress is not only a game, it is a gigantic fantasy world simulator. Fortress and adventurer mode allow you to influence a tiny part of that tale and write your own chapter; one chapter in an enormous bookshelf.

A generated world.

Basic world generation menu

The basic world generation menu looks like this:

BasicWorldGen.png

Parameters

Each of the parameters is described below.

World size

"This controls the size of the world map" as it says at the bottom of the screen when this option is highlighted. Also at the bottom of the screen is shown the dimensions of the world that will be generated given the currently selected size. Using Basic World Generation, the size options are:

  • Pocket (17x17 region tiles)
  • Smaller (33x33)
  • Small (65x65)
  • Medium (129x129)
  • Large (257x257)

Each region tile corresponds to 16x16 local area blocks of 48x48 tiles each.

Setting this to a larger value will cause world generation to take longer, as more events will need to be calculated per step. In v0.40 selecting bigger worlds will reduce the framerate (update speed) of the game in fortress mode. Selecting small or smaller worlds is recommended.

The world size also affects the maximum amount of civilizations, new civilization sites limit and the number of existing forgotten beasts.

Pocket Smaller Small Medium Large
Forgotten beasts 12 27 75 243 867

History

"This is the length of pre-generated history." The number of years for the currently selected length will be shown in the lower right. Essentially this means the amount of time that civilizations will have to grow, attack each other, and starve to death before the player can start playing. It also determines the amount of time that megabeasts will have to roam and kill things, get killed, etc. The longer the history, the more historical events will be generated by the time gameplay begins.

Setting this parameter to a higher value will cause world generation to take longer as more events need to be determined. Setting it to a very low value is OK, but will reduce the size of civilizations at game start.

Higher values will also increase the number of abandoned (sacked) towns and fortresses which can matter for adventure mode, but doesn't matter that much for fortress mode. Recommended value for worlds you plan to use for adventure mode are Short or Medium.

History will still progress after world generation, concurrently with normal gameplay, but this will, of course, be much slower. Therefore, it is recommended to set the history length so that the number of sites, megabeasts, and historical events is roughly what one wants it to be during gameplay.

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

Number of civilizations

This controls the number of distinct civilizations that exist in a world.

Civilizations are dwarves, humans, goblins, kobolds and elves.

It should be noted that this would refer to different kingdoms of the same races. A smaller number of civilizations (smaller than 5 - 7) may exclude one or two races from your world but less civilizations will reduce the amount of time history generation takes. Larger numbers of civilizations would increase history generation time and make historical events happen much more often.

The maximum amount of civilizations is affected by the world size. At higher numbers (> 40) humans, kobolds and elves are more frequent than dwarves and goblins.

Pocket Smaller Small Medium Large
Very Low 3 3 5 10 10
Low 4 4 7 20 20
Medium 5 5 10 40 40
High 7 8 15 80 80
Very High 10 12 20 160 160

Maximum number of sites

This affects the maximum number of new sites such as towns, hamlets, forest retreats, etc. existing civilizations can expand to during world generation combined. New sites increase the maximum amount of members of the civilization founding the site.

High site numbers increase the duration of history generation by a huge amount of time. With very low site numbers only the civilization's home settlements may exist after a few years of history with a high probability of getting eradicated by some event.

Turning this up is advised for adventure mode games.

The total amount of sites is affected by the selected world size.

Pocket Smaller Small Medium Large
Very Low 4 17 66 260 375
Low 13 51 198 780 1125
Medium 18 68 264 1040 1500
High 27 102 396 1560 2000
Very High 36 136 528 2000 2000

Number of beasts

This controls the number of megabeasts, semi-megabeasts and titans that exist at the beginning of the world. They can later die (get killed) due to historical events, so the longer the history, the more likely some of these will die.

The number of beasts does not appear to impact how often your fortress will be attacked by beasts in fortress mode. In adventure mode, it means it will be easier to find more megabeasts. If set very low then you may actually run out of beasts during a game.

Since beasts can attack civilizations, more beasts may reduce the population of the world a little bit.

The total amount of beasts is affected by the selected world size.

Pocket Smaller Small Medium Large
Very Low 0 / 1 / 0 0 / 1 / 0 2 / 4 / 1 9 / 18 / 4 37 / 75 / 16
Low 0 / 1 / 0 0 / 1 / 0 3 / 6 / 2 13 / 27 / 6 56 / 112 / 24
Medium 1 / 2 / 1 1 / 2 / 1 4 / 9 / 3 18 / 37 / 9 75 / 150 / 33
High 1 / 3 / 1 1 / 3 / 1 6 / 13 / 4 27 / 55 / 13 112 / 225 / 49
Very High 2 / 4 / 2 2 / 4 / 2 8 / 18 / 6 36 / 74 / 18 150 / 300 / 66
  • Read numbers as: Megabeasts // Semi-megabeasts // Titans

Natural savagery

Increasing this value increases the number of savage biomes in the world. In short, this means that more areas are likely to have aggressive animals which may try to kill dwarves immediately upon embark, and attack adventurers more often while traveling.

New players may want to just leave this at the Medium setting (which isn't that hard) or set it lower. Turn this up to make the game more fun.

Mineral occurrence

This is a rather important parameter for fortress mode. Sparse means that many areas will only have one or two types of metal ore, if any, which can be very annoying to people until the economy is fully implemented and other metals can more easily be obtained via trade. New players should probably turn this up to Frequent.

More details: Mineral Scarcity

In adventure mode this can impact the types of metals that civilizations have access to, which can affect the types of items that are available in shops. Therefore, it may not be a bad idea to turn this up for worlds in which you plan to play adventure mode games.

The generation process

Once you're satisfied with your parameter selections, hit y to proceed.

The screen will show something like this:

WorldGenerationScreen.png

The name of the world will be randomized in basic world generation mode.

Rejections

You may notice that during various phases of the world generation process, worlds will be rejected, leading to the rejection count going up and the process starting over. This happens because certain factors such as number of mountain tiles can't be determined ahead of time by the generation process. Instead, worlds are generated with parameters which are likely to produce worlds that can support a required number of mountains, and are then checked to make sure they meet the criteria. For example, the random generation of the topography of the land may result in too few high-elevation areas to place mountains.

In practice, you don't need to worry about this for basic world generation, because the preset hidden values that determine acceptable criteria are designed to decrease the chance of rejections, but certain combinations of basic parameters (especially with very large worlds) may make it harder for the process to generate "acceptable" worlds. Basically, what this amounts to is that world generation will just take longer for certain parameter selections that are more difficult for the generator to satisfy.

Map generation

The game allocates the memory for the map. Then it chooses what sort of pole (e.g. north, south) it is going to have (or respects the parameters fed by the player, throughout.) The basic map field values (elevation, rainfall, temperature, drainage, volcanism, wildness) are seeded along a grid of variable size, respecting various settings (oceans, island sizes, other variances, etc.), and then filled in fractally. The poles vary the temperature, and it selects some points for the highest peaks. Here it does a first pass to see how it is doing, and attempts to adjust some altitudes to fit the map within the desired parameters if it missed. The world can be rejected at this point if it is unfixable, and it tries again.

The first derived field, vegetation, is then set based on elevation, rainfall, temperature, etc., and it tests for biome rejections if the map's biomes don't satisfy the ranges set in the parameters. The mid-level elevations are smoothed at this point to make more plains areas, and volcanoes are placed respecting the hot spots in the volcanism field.

Then we enter the erosion and river stage. Small oceans are dried out, and it locates edges of mountain sides where it can run test rivers. It also places the camera on one of these so the player can watch the process. Many fake rivers flow downward from these points, carving channels in the elevation field if they can't find a path to the sea. Extreme elevations differences are often smoothed here so that everything isn't canyons. Mineral types are not yet taken into account for that. Lakes are grown out at several points along the rivers.

Elevations are smoothed again from the mountains down to the sea, and the peaks and volcanoes do some local adjustments. Now that the elevations are finalized, it makes adjustments to rainfall based on rain shadows and orographic precipitation. Temperatures are reset based on elevation and rainfall and the dampening effects of forests, and it uses the new values to set the vegetation level one final time. Salinity values are set for the ocean and tiles neighboring the ocean.

Now that everything has settled down, we can detect the limits of the final biome regions and give them names and their own identity. Geological layers and the underground layers are also added here. There's a final verification process against the parameters here, to make sure it hasn't drifted too far afield from what the player wanted. Once that's done, it generates the initial wildlife populations in each region, and sets some weather variables.

History

Once the world itself has been generated, history itself can begin at this point. Civilizations and caves are placed. It's a bit complicated to go into what happens after that, but the basic idea is that there's a giant zero-player strategy game going on with somewhat loose turn rules and bad AI (but thousands of agents), and history is just a record of that. Procedurally generating stories by recording a log of a simulation is a valid enough approach, though it has drawbacks, of course. It's a lot of work, you need to do post-processing or investigation to find any good moments you'd like to highlight, and if you don't have enough dynamics and mechanisms, the output can be boring (in any number of ways.). This can take a very long time for large, heavily populated worlds with very long, 2,000 year histories.

Finishing

Once everything is complete, you can take a look around using the directional keys. (Using Shift+directional key will make this faster.) If you find yourself confused about what all the characters actually mean, you are not alone - check out the map legend. At this point you can either abort the process, or hit Enter to save the world to disk.

Unfortunately, the post-generation-process viewer doesn't give you a way to view much information about the world, so unless you really hate the look of the map or something, you probably want to just save the world and load it up in Legends mode to view more information.

Getting more advanced

At first you will probably be satisfied with basic world generation, but later you may find that you want to create worlds with specific, more extreme conditions - check out the documentation on advanced world generation for help with this.

Easter Eggs

  • On the 86th rejected world an error report will appear with four options, this is in reference to the term "86ing" something, which is defined in the Urban Dictionary as "To remove, end usage, or take something out or away." [1]

Bugs

  • Magma sea breaching into HFSBug:1791
  • Anti-Gravity Ants - Floating ant hills above riverBug:3054
World
General World Generation (Basic / Advanced / Rejections) - Map legend
Climate - Surroundings - Civilization - Holdings - Calendar - World activities
Biomes Chasm - Desert - Forest - Glacier - Grassland - Lake - Mountain
Murky pool - Ocean - River - Savanna - Shrubland - Tundra - Wetland
Underground Cavern - Magma sea - Underworld
Features Aquifer - Brook - Deep pit - Island - Magma pool
Passage - Road - Tunnel - Volcano - Waterfall
Sites Camp - Cave - Dark fortress - Dark pit - Forest retreat - Fortress - Hamlet - Hillock
Labyrinth - Lair - Mountain halls - Ruins - Shrine - Tomb - Tower - Town - Vault
Structures Catacombs - Dungeon - Keep - Library - Market - Mead hall
Sewer - Tavern - Temple - Tomb - Underworld spire