Difference between revisions of "MapGeneratorWML"
SkeletonCrew (talk | contribs) (→scenarios/multiplayer/Random_Map.cfg) |
(Remove DevFeature, highlight tags and attributes) |
||
Line 1: | Line 1: | ||
{{WML Tags}} | {{WML Tags}} | ||
+ | |||
+ | '''Note: this page is substantially INCOMPLETE''' | ||
+ | |||
== the [generator] tag] == | == the [generator] tag] == | ||
Line 11: | Line 14: | ||
and '''scenarios/Heir_To_The_Throne/Sceptre.cfg'''. | and '''scenarios/Heir_To_The_Throne/Sceptre.cfg'''. | ||
− | + | Updated with some more info and the changes with the new terrain system | |
The following key is reconized for '''[scenario]'''/'''[multiplayer]''' | The following key is reconized for '''[scenario]'''/'''[multiplayer]''' | ||
− | * ''scenario_generation'' "empty" or "default" will us the default generator, "cave" used the cave generator. Other values are not valid. | + | * '''scenario_generation''': "empty" or "default" will us the default generator, "cave" used the cave generator. Other values are not valid. |
The following key/tags are recognized for [generator]: | The following key/tags are recognized for [generator]: | ||
− | * '''[scenario]'''/'''[settings]''' See [[ScenarioWML]] | + | * '''[scenario]'''/'''[settings]''': See [[ScenarioWML]] |
− | * ''name'' | + | * '''name''' |
− | ** 'default' | + | ** '''default'''' |
− | * ''map_width'',''map_height'' size of the map to generate | + | * '''map_width''','''map_height''': size of the map to generate |
− | * ''iterations'' the number of times an attempt is being made to generate a hill (default only) | + | * '''iterations''': the number of times an attempt is being made to generate a hill (default only) |
− | * ''hill_size'' hills will have a random size between 1 and ''hill_size'' (default only) | + | * '''hill_size''': hills will have a random size between 1 and ''hill_size'' (default only) |
− | * ''max_lakes'' the number of times an attempt is being made to generate a lake (default only) | + | * '''max_lakes''': the number of times an attempt is being made to generate a lake (default only) |
− | * ''min_lake_height'' lakes are the starting point of rivers and need to start above a certain height (default only) | + | * '''min_lake_height''': lakes are the starting point of rivers and need to start above a certain height (default only) |
− | * ''lake_size'' the size of a lake still randomly generated (default only) | + | * '''lake_size''': the size of a lake still randomly generated (default only) |
− | * ''river_frequency'' determine how much a river can run uphill and thus generate more rivers (default only) | + | * '''river_frequency''': determine how much a river can run uphill and thus generate more rivers (default only) |
− | * ''flipx_chance'' for scenario generation. | + | * '''flipx_chance''': for scenario generation. |
Percentage chance to flip map across X axis ??? | Percentage chance to flip map across X axis ??? | ||
− | * ''villages'' | + | * '''villages''' |
− | * ''village_density'' tiles per village ??? | + | * '''village_density''': tiles per village ??? |
− | * ''players'' | + | * '''players''' |
− | * ''temperature_iterations'' | + | * '''temperature_iterations''': |
− | * ''temperature_size'' | + | * '''temperature_size''' |
− | * ''roads'' | + | * '''roads''' |
− | * ''road_windiness'' | + | * '''road_windiness''' |
− | * '''[height]''' list of common terrain types | + | * '''[height]''': list of common terrain types |
which come in at different heights, from highest to lowest (default only) | which come in at different heights, from highest to lowest (default only) | ||
− | ** ''height'' | + | ** '''height''' |
− | ** ''terrain'' | + | ** '''terrain''': 1 terrain code |
− | * '''[convert]''' used to make terrain conversions (default only). | + | * '''[convert]''': used to make terrain conversions (default only). |
For example water becomes ice at low temperatures, grass snow, etc. | For example water becomes ice at low temperatures, grass snow, etc. | ||
If the terrain is between the min_x and max_x it will be converted | If the terrain is between the min_x and max_x it will be converted | ||
if min_x is not defined it will default to a large negative number | if min_x is not defined it will default to a large negative number | ||
if max_x is not defined it will default to a large positive number | if max_x is not defined it will default to a large positive number | ||
− | ** ''min_height'' | + | ** '''min_height''' |
− | ** ''max_height'' | + | ** '''max_height''' |
− | ** ''min_temperature'' | + | ** '''min_temperature''' |
− | ** ''max_temperature'' | + | ** '''max_temperature''' |
− | ** ''from'' | + | ** '''from''': a comma separated terrains to convert from |
− | ** ''to'' | + | ** '''to''': The terrain to convert these terrains to |
* '''[road_cost]''' | * '''[road_cost]''' | ||
− | ** ''terrain'' | + | ** '''terrain''' 1 terrain code |
− | ** ''cost'' how expensive it is the create a road on this terrain, this influences the odds of this terrain getting a road | + | ** '''cost''': how expensive it is the create a road on this terrain, this influences the odds of this terrain getting a road |
− | ** ''convert_to_bridge'' | + | ** '''convert_to_bridge''': a comma separated list of terrains; |
N/S, then NE/SW, then NW/SE. | N/S, then NE/SW, then NW/SE. | ||
− | ** ''convert_to'' | + | ** '''convert_to''': 1 terrain code (note using both ''convert_to_bridge'' and ''convert_to'' might result in unwanted results) |
− | * '''[village]''' The conversion of terrains to villages (default only) | + | * '''[village]''': The conversion of terrains to villages (default only) |
− | ** ''terrain'' | + | ** '''terrain''': 1 terrain code which will be converted to a village |
− | ** ''convert_to'' | + | ** '''convert_to''': 1 terrain code for the village |
− | ** ''adjacent_liked'' | + | ** '''adjacent_liked''': a comma separated terrain list. This list increases the rating for a certain location, every tile around the location will be tested against this list and for every match the rating of the location is increased. The same terrain twice in the list will double the rating increase for that location. |
− | ** ''rating'' chance of appearing | + | ** '''rating''': chance of appearing |
− | * '''[castle]''' the conversion of castles (default only) | + | * '''[castle]''': the conversion of castles (default only) |
− | ** ''valid_terrain'' | + | ** '''valid_terrain''': a comma-separated terrain list with terrains which are allowed to be converted to a castle. |
− | ** ''min_distance'' | + | ** '''min_distance''' |
* '''[naming]''' | * '''[naming]''' | ||
− | ** ''male_names'' | + | ** '''male_names''' |
* '''[village_naming]''' | * '''[village_naming]''' | ||
− | ** ''male_names'' | + | ** '''male_names''' |
− | * '''[chamber]''' for underground maps | + | * '''[chamber]''': for underground maps |
− | ** ''id'' a name used to identify where the passages lead. See the [passage] tag, below. | + | ** '''id''': a name used to identify where the passages lead. See the [passage] tag, below. |
− | ** ''x'',''y'' approximate location of the center hex of the chamber. Unfortunately it isn't always exact. Can be a single number (x=5) or a range (x=10-20) | + | ** '''x''','''y''': approximate location of the center hex of the chamber. Unfortunately it isn't always exact. Can be a single number (x=5) or a range (x=10-20) |
− | ** ''size'' circular radius of the chamber, including the center hex | + | ** '''size''': circular radius of the chamber, including the center hex |
− | ** ''jagged'' a good value is probably between 0-50 (not sure exactly) | + | ** '''jagged''': a good value is probably between 0-50 (not sure exactly) |
− | ** '''[items]''' See [[ScenarioWML]]. This can contain tags normally found under [scenario] like [side], [item], and [event]. Moveto events definitely work here (using the same_location_as_previous key instead of a location filter). Other events can be placed in the [settings] tag, above. Locations of items will be generated randomly. The attribute '''same_location_as_previous=yes''' means that the filter for a moveto event (see [[EventWML]]) is the same as the location of the previous item. | + | ** '''[items]''': See [[ScenarioWML]]. This can contain tags normally found under [scenario] like [side], [item], and [event]. Moveto events definitely work here (using the same_location_as_previous key instead of a location filter). Other events can be placed in the [settings] tag, above. Locations of items will be generated randomly. The attribute '''same_location_as_previous=yes''' means that the filter for a moveto event (see [[EventWML]]) is the same as the location of the previous item. |
− | ** '''[passage]''' defines a pathway between chambers | + | ** '''[passage]''': defines a pathway between chambers |
− | *** ''destination'' the id key of the destination passage | + | *** '''destination''': the id key of the destination passage |
− | *** ''windiness'' a good value is probably between 1-10 | + | *** '''windiness''': a good value is probably between 1-10 |
− | *** ''width'' number of hexes | + | *** '''width''': number of hexes |
− | *** ''jagged'' a good value is probably between 1-10 | + | *** '''jagged''': a good value is probably between 1-10 |
== See Also == | == See Also == |
Revision as of 16:59, 19 February 2008
Note: this page is substantially INCOMPLETE
the [generator] tag]
The [generator] tag replaces a scenario's map data; in fact its whole purpose is to generate the map data given a set of configuration parameters.
The map generator function is not very well documented. The data on this page are taken from
scenarios/multiplayer/Random_Map.cfg
and scenarios/Heir_To_The_Throne/Sceptre.cfg.
Updated with some more info and the changes with the new terrain system
The following key is reconized for [scenario]/[multiplayer]
- scenario_generation: "empty" or "default" will us the default generator, "cave" used the cave generator. Other values are not valid.
The following key/tags are recognized for [generator]:
- [scenario]/[settings]: See ScenarioWML
- name
- default'
- map_width,map_height: size of the map to generate
- iterations: the number of times an attempt is being made to generate a hill (default only)
- hill_size: hills will have a random size between 1 and hill_size (default only)
- max_lakes: the number of times an attempt is being made to generate a lake (default only)
- min_lake_height: lakes are the starting point of rivers and need to start above a certain height (default only)
- lake_size: the size of a lake still randomly generated (default only)
- river_frequency: determine how much a river can run uphill and thus generate more rivers (default only)
- flipx_chance: for scenario generation.
Percentage chance to flip map across X axis ???
- villages
- village_density: tiles per village ???
- players
- temperature_iterations:
- temperature_size
- roads
- road_windiness
- [height]: list of common terrain types
which come in at different heights, from highest to lowest (default only)
- height
- terrain: 1 terrain code
- [convert]: used to make terrain conversions (default only).
For example water becomes ice at low temperatures, grass snow, etc. If the terrain is between the min_x and max_x it will be converted if min_x is not defined it will default to a large negative number if max_x is not defined it will default to a large positive number
- min_height
- max_height
- min_temperature
- max_temperature
- from: a comma separated terrains to convert from
- to: The terrain to convert these terrains to
- [road_cost]
- terrain 1 terrain code
- cost: how expensive it is the create a road on this terrain, this influences the odds of this terrain getting a road
- convert_to_bridge: a comma separated list of terrains;
N/S, then NE/SW, then NW/SE.
- convert_to: 1 terrain code (note using both convert_to_bridge and convert_to might result in unwanted results)
- [village]: The conversion of terrains to villages (default only)
- terrain: 1 terrain code which will be converted to a village
- convert_to: 1 terrain code for the village
- adjacent_liked: a comma separated terrain list. This list increases the rating for a certain location, every tile around the location will be tested against this list and for every match the rating of the location is increased. The same terrain twice in the list will double the rating increase for that location.
- rating: chance of appearing
- [castle]: the conversion of castles (default only)
- valid_terrain: a comma-separated terrain list with terrains which are allowed to be converted to a castle.
- min_distance
- [naming]
- male_names
- [village_naming]
- male_names
- [chamber]: for underground maps
- id: a name used to identify where the passages lead. See the [passage] tag, below.
- x,y: approximate location of the center hex of the chamber. Unfortunately it isn't always exact. Can be a single number (x=5) or a range (x=10-20)
- size: circular radius of the chamber, including the center hex
- jagged: a good value is probably between 0-50 (not sure exactly)
- [items]: See ScenarioWML. This can contain tags normally found under [scenario] like [side], [item], and [event]. Moveto events definitely work here (using the same_location_as_previous key instead of a location filter). Other events can be placed in the [settings] tag, above. Locations of items will be generated randomly. The attribute same_location_as_previous=yes means that the filter for a moveto event (see EventWML) is the same as the location of the previous item.
- [passage]: defines a pathway between chambers
- destination: the id key of the destination passage
- windiness: a good value is probably between 1-10
- width: number of hexes
- jagged: a good value is probably between 1-10