Difference between revisions of "TerrainWML"

From The Battle for Wesnoth Wiki
 
(the toplevel [terrain] tag)
Line 6: Line 6:
 
the [terrain] tag has the following keys and subtags
 
the [terrain] tag has the following keys and subtags
 
* ''image'' an image used for this terrain in the map editor
 
* ''image'' an image used for this terrain in the map editor
* ''adjacent_image'' a prefix for adjacent terrain images. they will be postfixed with the orientation of the border to
+
* ''adjacent_image'' a prefix for adjacent terrain images. they will be postfixed with the orientation of the border to give the image name that will be used for the border terrain
give the image name that will be used for the border terrain
 
 
* ''name'' the name of the terrain
 
* ''name'' the name of the terrain
 
* ''char'' the character used to represent this terrain in maps and scenarios
 
* ''char'' the character used to represent this terrain in maps and scenarios
 
* ''aliasof'' characters representing terrains that this terrain will be an alias of i.e:
 
* ''aliasof'' characters representing terrains that this terrain will be an alias of i.e:
Units' defense and movement on this terrain is equal to their best defense/movement on one of these aliases.
+
Units' defense and movement on this terrain is equal to their best defense/movement on one of these aliases. (all terrains are aliases of themselves)
(all terrains are aliases of themselves)
 
 
* ''unit_height_adjust'' how much the unit graphic should be moved up or down when on that terrain
 
* ''unit_height_adjust'' how much the unit graphic should be moved up or down when on that terrain
 
* ''submerge'' float, between 0 and 1: stems how much of the unit graphic should be submerged by the terrain
 
* ''submerge'' float, between 0 and 1: stems how much of the unit graphic should be submerged by the terrain
* ''no_overlay'' whether this terrain should be overwritten by other terrain's borders;
+
* ''no_overlay'' whether this terrain should be overwritten by other terrain's borders; 'no_overlay=true' terrains are not overwritten.
'no_overlay=true' terrains are not overwritten.
+
* ''light'' if set to true the text on it will be written in a dark color instead of a light one. This is useful when the terrain is either very light or very clear (like snow).
* ''light'' if set to true the text on it will be written in a dark color instead of a light one. This is useful when the terrain is either very light or very clear
 
(like snow).
 
 
* ''heals'' if set to true a unit on that terrain will be healed at the start of every turn
 
* ''heals'' if set to true a unit on that terrain will be healed at the start of every turn
 
* ''gives_income'' if set to true, this terrain will give income every turn when flagged as if it were a village
 
* ''gives_income'' if set to true, this terrain will give income every turn when flagged as if it were a village
Line 28: Line 24:
 
* [[ReferenceWML]]
 
* [[ReferenceWML]]
 
* [[TerrainLettersWML]]
 
* [[TerrainLettersWML]]
 

Revision as of 17:36, 29 October 2005

the toplevel [terrain] tag

the [terrain] tag describes a terrain in WML. Terrains are usually described in the terrain.cfg file

the [terrain] tag has the following keys and subtags

  • image an image used for this terrain in the map editor
  • adjacent_image a prefix for adjacent terrain images. they will be postfixed with the orientation of the border to give the image name that will be used for the border terrain
  • name the name of the terrain
  • char the character used to represent this terrain in maps and scenarios
  • aliasof characters representing terrains that this terrain will be an alias of i.e:

Units' defense and movement on this terrain is equal to their best defense/movement on one of these aliases. (all terrains are aliases of themselves)

  • unit_height_adjust how much the unit graphic should be moved up or down when on that terrain
  • submerge float, between 0 and 1: stems how much of the unit graphic should be submerged by the terrain
  • no_overlay whether this terrain should be overwritten by other terrain's borders; 'no_overlay=true' terrains are not overwritten.
  • light if set to true the text on it will be written in a dark color instead of a light one. This is useful when the terrain is either very light or very clear (like snow).
  • heals if set to true a unit on that terrain will be healed at the start of every turn
  • gives_income if set to true, this terrain will give income every turn when flagged as if it were a village
  • recruit_onto if set to true, it is possible to recruit or recall on that terrain
  • recruit_from if set to true it is possible to recruit when a unit that can recruit is on that terrain

See Also