Difference between revisions of "ReplayWML"

From The Battle for Wesnoth Wiki
(the [command] tag)
(the [command] tag)
Line 1: Line 1:
== the [command] tag ==
+
== The [command] tag ==
  
 
The '''[command]''' tag is used to specify an action in a replay.
 
The '''[command]''' tag is used to specify an action in a replay.

Revision as of 21:48, 12 November 2005

The [command] tag

The [command] tag is used to specify an action in a replay.

The following tags are recognized:

  • [start] is used to initialize the replay so that generated random numbers can be saved.
  • [move] the player moved a unit.
    • [source] the location the unit moved to.
    • [destination] the location the unit moved from.
  • [recruit] the player recruited a unit.
    • value the index number of the recruited unit. (Index numbers start at 0 and include all recruitable units in alphabetical order.)
    • x and y the castle tile the unit is recruited on.
  • [recall] the player recalled a unit. Same keys as [recruit], except that the index is in order of level, followed by required XP to advance.
  • [attack] the player attacked.
    • weapon the index number of the weapon. Weapons are indexed by the unit designer.
    • [source] the location of the attacking unit.
    • [destination] the location of the defending unit.
  • [end_turn] the player ended his turn.
  • [choose] the player was given an option by the scenario.
    • value the index number of the option chosen. Index numbers are given by the scenario designer.
  • [break] is used to break up deep nesting of generated random numbers.
  • [random] if the action required a random number, this describes the random number that was generated.
    • value list of generated random values.
    • [results] used for [attack] commands. Describes the results of the battle.
      • chance the percent chance that the attack had to hit.
      • damage the amount of damage that the attack would do if it hits.
      • dies whether the defender dies from the hit.
      • hits whether the attack hits.
    • [random] additional lists of generated random values. [random] has the same format as the first [random] and describes the other numbers that were generated.

See Also