These are the objects used to define what kind of terrain is available on the map of the game. Take note that the map generator is only used during the map editor. The maps "created" when starting a new game are in fact picked up randomly from the map directory. So if you want to see in action the effects of your terrain modifications, you need to use the map editor.
XML <EnvironmentType>: There are some information specific to environment types for each terrain.
XML <MapType>: The map generator use some information from this object.
XML <ElementalMap>: The maps are saved in that objects. Some information are saved in the map object, if you modify the terrain file there will be no effect on the saved file.
<DisplayName>: A text of string that will be shown when looking at the terrain type.
<MinHeight> and <MaxHeight>: Defines the min/max height that the terrain should have on the 3D map. The default height is 50. This is the height the cliffs will have. The sea level is at 25, so if you want terrain under the see, set it at 25 or lower. In the EnvironmentType object, there is a variable that determines the height required to have snow on the top of mountains. You might need to adjust this value. The map generator seem to use a random value between the min and map, but after many tests, it does not create very chaotic relief, there seems to be a logic in how the numbers are selected.The height has no effect on some types of terrain, especially cliffs and oceans.
<Category>: There are 7 category of terrain which each have special functions. There must be at least 1 terrain of each category in the file, else the map generator will not work.
- Land: Basic terrain type which can be used for various purpose. It includes Grasslands, Swamps and Deserts.
- Forest: The terrain is generated using the special forest algorithm and according to the number of forests define in the MapType Object.
- Mountains: The terrain is generated using the special mountain algorithm and according to the number of mountains defined in the MapType Object.
- Beach: Used to border the sea, seems to be allocated randomly around the map. There is no way to control it's occurence.
- Cliff: This is the default terrain used to surround the land of the map.
- City: This is the terrain placed under the building when the player expand his city. If there is at least 1 building in the tile, the whole tile will change of terrain.
- Water: This is the ocean.
<PassableByLandUnits>: If set to 1, ground units will be allowed to move on the terrain.
<PassableByWaterUnits>: If set to 1, sea units will be allowed to move on the terrain.
<PassableByAirUnits>: If set to 1, Air units will be allowed to move on the terrain.
<NextToWaterOnly>: If set to 1, Indicates that the terrain should be used on the edge of the ocean. But personally, I think that this parameter has no effect, it's the "beach" and "Cliff" category that is used by the terrain generator.
<MapGenPlaceChance>: In theory, it should be the probability in % for a terrain to be used. In practice, it does not seems to really work all the time. But, I have found that it is used to determine priority. So for example, you will get different results if 2 terrain are at 75% VS 2 terrains where one is at 75% and the other at 76%. So my suggestion to to consider more the priority rather than the value.
<TerrainObjectType>: There are various terrain types. It determines which cloth map texture will be used and if a city can be built. Forests and mountains are restricted. The texture file used for the cloth map is hard coded in the game.This is completely different from <Category> and yes it does not need to match the category. Consider the type as different type of "Land" category terrain.
- Desert: Used for the desert.
- Hills: Used for the hills.
- Forest: Will spawn trees on the 3D map.
- Swamp: Used for swamps
- Mountain: Used for mountains, needs to be of <category> "Mountain" for the matching cloth map texture to be used.
<GenMethod>: An optional parameter that seems to change the way the generator will create the terrain. There is currently only 1 value possible which is "Linear". This is used to generate hills and could be used for custom mountains. Else you can simply delete the parameter and it will create chunks of terrain.
Sub Object <TerrainTypeEnvData>
Under each terrain type, there is a <TerrainTypeEnvData> entry for each <EnvironmentType> object. It will define specific information for each Environment where that terrain could be used.
<Environment>: This is the name of the environment associated to this entry. If should match the internal name of the <EnvironmentType> object.
<Texture>: This is a link to the texture that will be displayed on the 3D map. The file can either be a .DDS or a .PNG. Other file types has bee untested.
<TextureWeight>: On the 3D map, the texture of the land is applied dynamically. Which means that it will blend with adjacent textures. The weight of the texture determines how much it will "eat" adjacent texture if the value is > 1 or how much it will get eaten by adjacent texture if the value is < 1. The default value is 1.0000. If you want a more aggressive texture, you can raise it up to 2. Else a texture with little impact will have a value lower than 1.
<TerrainPropData>: I am not entirely sure, but it seems to define which tiles are going to be randomly placed on the terrain. The purpose seems strictly decorative. The variable contains 2 values: Filename,probability. The filename has no extension and refers to the files located in "Elemental\data\English\Core Tiles\Props". Here is an example:
<TacticalMap>: This is the tactical map that will be used if a combat take place there. Multiple maps can be defined. I did not test if the matching maps got used. The maps are located in "Elemental\data\Maps\TacticalMaps\" and you only write the file name without extension.
<TacticalMapFortify>: Same thing than <TacticalMap> except it is used when the units are fortified.
Tricks and Tips
Trick Name: Write the description here.
Missing Land Terrain: It is possible to delete some land terrain as long as there is at least 1 "land" terrain left. This is something I did by deleting the rigged terrain. If you generate a map, the deleted the terrain will simply not appear. If you load a map, the terrain will be displayed as a white texture. So as long that all the categories are there, you can delete additional terrain.
Tactical Terrain on World Map: There seems to be a bug where the terrain defined for the tactical map gets used by the world map. The only thing that should prevent them from appearing on the world map is by setting their <MapGenPlaceChance> to 0%, but by default the terrain are not all set at 0%. So either you set them manually all to 0% or either you delete all the tactical terrain. (You will get white maps). There are no special variables that defines a terrain as a tactical terrain. Any "land" terrain can be used on the tactical map.
Forest and mountains of "land" category: It is possible to customize your own forest and mountains. There are various steps you should take. First, duplicate the forest and mountain data. Set the <MapGenPlaceChance> of the original 2 terrain to 0%. Remember that we need 1 terrain of each category for the generator to work. To prevent the generator to use the old mountains and forest, you need to set the following variables to 0 in the <MapType>:<MapStyle> sub object.
<NumMountainsMin>0</NumMountainsMin> <NumMountainsMax>0</NumMountainsMax> <NumForestsMin>0</NumForestsMin> <NumForestsMax>0</NumForestsMax>
This will prevent the special generator to generate system mountains and forest. Now change the <Category> of your new mountain and forest terrain to "Land", and if you want the mountains to appear on the clothmap, set <TerrainObjectType> to "Hills" so that they at least get shown as hills. This will have various effects on the game. First, you will be able to build buildings directly on forest and mountains but you will not be able to create a new city there. Second, you will have goodie huts and shards hidden in the middle of the forest.
Increased terrain variety: After a lot of tweaking with <MapGenPlaceChance>, I often get a dominant terrain (Which means the same terrain over all the map). So to increase the variety of terrain on the map, I set the grassland to 100%. Then, I duplicated all my terrain of <category> "land" and changed their internal name to make sure they are all unique. I tried with up to 4 copies of each terrain type. This has the effect of multiplying the amount of terrain on the board and reduce the large areas where I only got grasslands.
From beaches to shore: Tired of having sand around your contient and want more greesntuff on the map. Simple, replace the beach sand texture by the grassland texture. You will get green shores everywhere.
Changing cliff to shore: There is no way to control the amount of cliff you want on the map. So if you hate cliffs as much as I do, the only way to do it is to make a manual string replacement in the saved map. You simply switch all cliff by beach and set the height to 50 (or whatever your default). Look at the <ElementalMap> object page for more information.
Removing environments: The idea of environment simply overcomplexify the maps for no good reasons. If you feel the same way, there is a way to remove them. In fact you cannot delete them without making the game crash. But you can make them all look the same way so that different environments gives the same results. Most of the modification will be done in the <EnvironmentYpe> object, but some changes needs also to be done here.
In my case, I wanted to only have grassland terrain. So what you need to to is make all terrain types as grasslands. You need to modify the <TerrainTypeEnvData> sub objects which links to the <EnvironmentType>. Leave the name of the environment intact, and copy the data below the grassland environment (or any one you prefer) below each environment types. So in the end all environment will stay there but be the same. Here is an example:
<TerrainTypeEnvData> <Environment>Barren</Environment> <Texture>gfx/terrain/light_grass.dds</Texture> <TextureWeight>1.0000</TextureWeight> <TerrainPropData>P_Grassland_01,100</TerrainPropData> <TacticalMap>T_Land_Grassland_01</TacticalMap> </TerrainTypeEnvData> <TerrainTypeEnvData> <Environment>Dead</Environment> <Texture>gfx/terrain/light_grass.dds</Texture> <TextureWeight>1.0000</TextureWeight> <TerrainPropData>P_Grassland_01,100</TerrainPropData> <TacticalMap>T_Land_Grassland_01</TacticalMap> </TerrainTypeEnvData> <TerrainTypeEnvData> <Environment>Grassland</Environment> <Texture>gfx/terrain/light_grass.dds</Texture> <TextureWeight>1.0000</TextureWeight> <TerrainPropData>P_Grassland_01,100</TerrainPropData> <TacticalMap>T_Land_Grassland_01</TacticalMap> </TerrainTypeEnvData> <TerrainTypeEnvData> <Environment>Desert</Environment> <Texture>gfx/terrain/light_grass.dds</Texture> <TextureWeight>1.0000</TextureWeight> <TerrainPropData>P_Grassland_01,100</TerrainPropData> <TacticalMap>T_Land_Grassland_01</TacticalMap> </TerrainTypeEnvData> <TerrainTypeEnvData> <Environment>Arctic</Environment> <Texture>gfx/terrain/light_grass.dds</Texture> <TextureWeight>1.0000</TextureWeight> <TerrainPropData>P_Grassland_01,100</TerrainPropData> <TacticalMap>T_Land_Grassland_01</TacticalMap> </TerrainTypeEnvData>
Back to XML editing