The map types are used to determine how the maps will be generated. It also defines the map sizes that the player can choose when starting a new game. But there is still some research to do because I did not found yet how the computer pickup the right map size.
For those who does not know, there is currently no map generation when you start a new game, the game simply select a random map of the right size in a list of pre-generated maps. The only way to generate a map is to start the map editor and click "create" on the first pop-up dialog.
XML <MultiplayerMap>: This should be the list of maps selected according to the <MapType> internal name, but after some tests it does not seems to work the way I thought. So more testing will need to be done.
XML <TerrainType>: There are some special generator for some <TerrainType>:<Category> like forest and mountains.
XML <ElementalMap>: This is the map file saved by the map editor.
It seems that the internal name of the object can be modified. I suspect that the internal name is used to determine which map to select at game start.
<DisplayName>: This is the name of the map size displayed to the user.
<MapSectorWidth> & <MapSectorHeight>: This is the number of sector a map will have. By default, a sector is 16x16 squares. I am not sure if it can be adjusted, but I know that there is a property called <SectorTileWidth> in <ElementalMap>. The number of sector specified is not the final number of sector the map will have. This is the area where the map will be generated. The game will then add 1 sector all around the map that should be only filled of water. So if your map is 4x2 sectors, it will end up being a 6x4 sector map. But only 4x2 sector will actually contain land.
Sub Object <MapStyle>
For each <MapType>, you can define various map style. By default, the styles are "Islands", "Multiple Continents", and "Single Continents". Each map style have the necessary variables to generate a land scape according to these styles. Take Note that there is a lot of randomness in the map generation and you cannot be entirely sure of what you are going to get.
<DisplayName>: This is the name of the style that will be shown to the user only in the map editor.
<…SpawnSizeMin> & <…SpawnSizeMax>: The land scape is generated with a series of "Spawn" which are chunks of land. These chunks can be of various size and as they are placed randomly on the map, they will be fusion together. It seems that the size of the terrain type will be relative to the spawn size you take, so if you only take small spawn size, you will only have small sized terrain type. But I cannot guaranty completely this information. There are 5 different size of spawn which each has a min and max parameter.
- <IslandSpawnSizeMin> & <IslandSpawnSizeMax>
- <SmallSpawnSizeMin> & <SmallSpawnSizeMax>
- <MediumSpawnSizeMin> & <MediumSpawnSizeMax>
- <LargeSpawnSizeMin> & <LargeSpawnSizeMax>
- <HugeSpawnSizeMin> & <HugeSpawnSizeMax>
<LinkedSeedPercentage>: This is an obscured parameter which I am not entirely sure of it's effects. It should be the probability for a spawn to be linked together. But even if you set the value to 0, the spawns will still get linked together.
**<WaterPercentageMin> & <WaterPercentageMax>: This is the % ratio of water your would like on your map. Again, this is not very precise, and I do not know where in the generator it actually takes effect. So if you want an island world, you could increase the water %.
**<ShardBaseQuantityMin> & <ShardBaseQuantityMax>: This set the minimum and maximum number of shards you want to appear on the map.
<Num…Min> & <Num…Max>: Determined the number of terrain types that will be generated using a special generator. The terrain available right now are: Mountains, Forests and Rivers.
- <NumMountainsMin> & <NumMountainsMax>
- <NumForestsMin> & <NumForestsMax>
- <NumRiversMin> & <NumRiversMax>
Right now, the rivers does not seems to be effective in the game even if there are textures available for them. The generator will use the Terrain which match the corresponding <TerrainType>:<Category>.
Tricks and Tips
Only one style: In my case, I wanted all the maps to be of the same size and only allow the players to chose the style of map. So I renamed the <MapType> with the following names "Island", "Small Continent", "Large Continent", "Pangea", and I set up for each type only one <MapStyle> which I called default. Changing the internal name does not make the game crash but it might influence which map get's randomly selected.
Custom Forest and mountains: Personally, I do not like how the forests and mountains get generated because they are too big. On the <TerrainType> page, I have explained how you can make forests and mountains simply become a "Land" <Category> terrain. To make sure the original Mountains and Forests does not appear on the map, you must set <NumMountainsMin>,<NumMountainsMax>,<NumForestsMin> and <NumForestsMax> to 0.
Spawn Selection: There are various ways to select how you will distribute your spawns. Elemental set spawn of each size. For example they could set a dozen of large, medium and small spawn, if they want a relatively large map. But since the spawn get's connected at some point anyway, you can also use a lot of spawn of the same type. For example, to make my "pangea" out of a 6x3 sector map, I set up 300 to 400 Island Spawn and it worked pretty well.
Back to XML editing