Difference between revisions of "MapGeneratorWML"

From The Battle for Wesnoth Wiki
 
Line 76: Line 76:
 
* [[ReferenceWML]]
 
* [[ReferenceWML]]
  
 +
 +
[[Category: WML Reference]]

Revision as of 11:27, 20 January 2006

the [generator] tag]

The [generator] tag replaces a scenario's map data; in fact it's 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.

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
  • hill_size
  • max_lakes
  • min_lake_height
  • lake_size
  • river_frequency
  • flipx_chance for scenario generation.

Percentage chance to flip map across X axis ???

  • villages
  • village_density tiles per village ???
  • players
  • temperature_iterations
  • temperature_size
  • default_convert
  • roads
  • road_windiness
  • [height] list of common terrain types

which come in at different heights, from highest to lowest

    • height
    • terrain
  • [convert] used to make terrain conversions.

For example water becomes ice at low temperatures, grass snow, etc.

    • min_height
    • max_height
    • min_temperature
    • max_temperature
    • from
    • to
  • [road_cost]
    • terrain
    • cost
    • convert_to_bridge a list of terrains;
 N/S, then NE/SW, then NW/SE.
    • convert_to a terrain
  • [village]
    • terrain
    • convert_to
    • adjacent_liked an unseparated terrain list
    • rating chance of appearing
  • [castle]
    • valid_terrain
    • min_distance
  • [naming]
    • male_names
  • [village_naming]
    • male_names
  • [chamber] for underground maps
    • id
    • x//,//y approximate location of the chamber
    • size
    • jagged
    • [items] See ScenarioWML.

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]

See Also