3.1 Sections
A random map script contains up to seven different sections.
This is the order in which the game will use sections to generate the map:
<PLAYER-SETUP>, <LAND-GENERATION>, <ELEVATION-GENERATION>, <CLIFF-GENERATION>, <TERRAIN-GENERATION>, <CONNECTION-GENERATION> and <OBJECTS-GENERATION>.
The sections can be written in any order, but the game uses them in the order above. The official scripts are not written in the "correct" order. Not all sections are necessary. If you don’t want cliffs, don’t include <CLIFF-GENERATION>. You can have multiple sections of the same type. They should function identically to a single section.
Each section has different commands that can be used in it.
syntax
Attributes: random-placement, grouped-by-team, direct-placement, nomad-resources, force-nomad-treaty, behavior-version, override-map-size, set-gaia-civilization, ai-info-map-type, effect-amount, effect-percent, guard-state, terrain-state, weather-type and water-definition.
Required section. Determines how players will be placed, and modifies global parameters.
syntax
Blocks: create-player-lands and create-land.
Section to place large areas of terrain, including the player starting areas. Required if you want to place players. Land origins (square bases) are placed in order. After all origins are placed, all lands grow simultaneously from their origins outwards in all directions to fill the amount of space specified for each land, or until they run into a border or another land. Land growth happens all at once!
syntax
Optional section used to place hills on your map.
Elevation avoids the origins of player lands by about 9 tiles.
If base-elevation was specified for any lands, you must include this section, even if it is empty.
Elevation provides a combat bonus to higher units, and a debuff to lower units.
Hill positions are noticeably biased towards being placed in the south. In DE, you should always use enable-balanced-elevation to reduce this bias.
syntax
Optional section to include rocky impassible cliffs.
Simply typing the section header will generate default cliffs, so do not include it if you do not want cliffs!
Cliffs avoid the origins of all lands by 22 tiles, and will not be placed on water terrains. They also avoid any slopes.
Cliffs create a terrain under themselves. This is terrain 16, and looks like the normal grass. This terrain turns into terrain 0 (GRASS) prior to object-generation but can be replaced during <TERRAIN-GENERATION>
Cliffs provide a combat bonus to units shooting from the top of a cliff.
syntax
Blocks: create-terrain.
Section to specify terrain replacements.
Often used to place clumps of forest and to make the map look nice by mixing terrains for visual diversity. Terrain generation occurs after lands, elevation and cliffs, but before connections. Terrains are generated sequentially in the order they appear in the script. Terrain positions cannot be directly specified.
syntax
Blocks: create-connect-all-players-land, create-connect-teams-lands, create-connect-all-lands, create-connect-same-land-zones, create-connect-land-zones, and create-connect-to-nonplayer-land.
Optional section to replace terrains with other terrains, specifically along a path between the origins of lands. Can be used to create roads between players, shallows across rivers, and to ensure that forests do not completely separate players.
You can only specify whole systems of connections, not individual connections.
Connections are processed in order.
If the connection between two locations is not possible, that connection will not be produced at all.
syntax
Blocks: create-object, create-object-group.
Place buildings, units, resources, animals, straggler trees, decoration, etc. Objects are placed in order. Normally, only 1 object can be placed per tile. If an object cannot find a valid position, it will not generate at all. So you should place the most important objects first. There are a few unusual cases:
Creating the object VILLAGER without specifying the amount will give each civilization their correct number of starting villagers.
In DE this has changed and everyone gets 3 villagers to start, with the extra ones being spawned by the town center (to prevent Chinese from being too strong on nomad starts).
The object SCOUT will give an eagle to mesoamerican civilizations and a scout to all other civilizations. Walls have some special behavior (see: Walls)