Gen map.xml

Overview
gen_map.xml is used for, surprisingly enough, map generation. This is an explanation of the XML tags in that file.

Die Values
Note: this should probably be explained elsewhere.

Values may either be a number or text. Many numeric values may contain 'die values' instead of static integers. A die value indicates a roll of one or more virtual dice in order to generate a number within a range.

For example, 1d6 indicates a roll of one six-sided die, for a range of 1 through 6. Multiple dice and integer modifiers can be added too. 2d8+5 indicates a roll of two eight-sided dice plus 5, so a range of 7 through 21. (1+1+5 through 8+8+5).

The XML
The document sections are structured based on the same layout as the XML.

The init section deals with the general structure of the map, such as its size, surface terrain, and starting citizens.


Unlike during game play, during map generation the levels are numbered from top town beginning with 0 at the top of the sky. numLevelsOutside is the number of levels above ground level, and so numLevelsOutside + 1 is where the in-game level 0 will be.


The number of levels the map should generate below ground level. numLevelsOutside + numLevelsUnderground will give you the full depth of the map.


''Details unknown. Possibly the list of terrain objects that should make up the ground level?''


The number of starting citizens on the map.


Lets you set the level where your townies spawn, 0 beeing the top of the map, 11 the ground level. Doing higher then 11 seems to spawn them underground and they will all be dead at the beggining of the game.

Variations in the map other than normal grass, dirt, stone or sky are created with seeds.

During map generation the game picks an origin point for the seed based on the level. Then, it will run a number of turns, where each turn the seed has the potential to grow outward based on the percentage chance for each direction (North, South, East, West, Up, Down).

The type of seed. This indicates what material will be generated.

The number of seeds to generate on the map of this type. This can be an integer or a die value.

The level on the map to use for the origin point for each seed. This can be an integer or a die value.

The number of turns to run the growth calculations. Integer or die value.


The percentage chance of the seed growing in the North direction.


See northPCT


See northPCT


See northPCT


See northPCT


See northPCT

Bezier curves are used to generate curving strips of terrain through the map, such as the river on a normal map.

The type of terrain to generate inside the curve.

The level of the map at which to generate the curve. Integer or die value.

The number of levels deep that the curve should be. This is measured down from level.

How wide the curve should be. Integer or die value.

Change blocks are used in a late stage of map generation to alter existing map tiles based on their surroundings. So, for example, grass can be turned to sand near water.

The material to be changed.

What the material should be changed into.

What material needs to be next to the source in order for it to change.


The percentage chance that the change will occur.

If the change occurs, how far out from the origin will the destination terrain type spread.