<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.wesnoth.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Anonymissimus</id>
	<title>The Battle for Wesnoth Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.wesnoth.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Anonymissimus"/>
	<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/Special:Contributions/Anonymissimus"/>
	<updated>2026-04-25T00:07:12Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.16</generator>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=EventWML&amp;diff=56838</id>
		<title>EventWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=EventWML&amp;diff=56838"/>
		<updated>2015-11-05T01:53:00Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* id */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== The [event] Tag ==&lt;br /&gt;
&lt;br /&gt;
This tag is a subtag of the [scenario], [unit_type] and [era] tags which is used to describe a set of [[ActionWML|actions]] which trigger at a certain point in a scenario. When used in a [scenario] tag (also includes [multiplayer], [tutorial] and [test]), the event only occurs in that scenario. When used in a [unit_type] tag, the event will occur in all scenarios in which a unit of that type appears in (only after such a unit appears during the scenario, however). When used in an [era], the event will occur in any scenario which is played using that era.&lt;br /&gt;
&lt;br /&gt;
This tag has keys and child tags that control when and if the event actions will be triggered. Most important of these is the '''name''' key. Without it, no error will be raised but the event will never fire. Therefore, from a practical standpoint, it can be considered mandatory. All of the others can be used or not and the event actions will fire either way.&lt;br /&gt;
&lt;br /&gt;
'''Lexicon side note:''' ''The word &amp;quot;event&amp;quot; in the [event] tag itself may be considered an abbreviation of the word &amp;quot;event handler&amp;quot; because it is technically not a game &amp;quot;event&amp;quot; but an event '''handler''' for the game events fired with the given 'name'. However, this distinction is usually unimportant in most discussions and the event handlers are therefore simply referred to as &amp;quot;events&amp;quot; in this documentation.''&lt;br /&gt;
&lt;br /&gt;
=== The 'name' Key (Mandatory) ===&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
 name=&amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This key defines which game event or trigger your [event] tag will be handling. This 'name' key should not be confused with a descriptive comment; it is rather a precise value which must match the predefined game event's name to be valid.&lt;br /&gt;
&lt;br /&gt;
The '''name''' key can accept a list of comma separated values describing when the event will be triggered.*  These values may be either predefined event types or  custom event names not matching any predefined type.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
 name=attacker misses,defender misses&lt;br /&gt;
&lt;br /&gt;
''* Note that unless you use [[#first_time_only|first_time_only=no]], the event will fire only once, '''not''' once for each listed type.''&lt;br /&gt;
&lt;br /&gt;
All predefined event types are listed here along with a description of when this value will cause the event to be triggered. Any value ''not'' listed here is a custom event name which can be triggered only by a '''[fire_event]''' tag somewhere else. &lt;br /&gt;
&lt;br /&gt;
Spaces in event names can be interchanged with ''underscores'' (for example, '''name=new turn''' and '''name=new_turn''' are equivalent).&lt;br /&gt;
&lt;br /&gt;
==== Predefined Events Without Filters ====&lt;br /&gt;
&lt;br /&gt;
These events do not take filter parameters (except [filter_condition] which works for all events).&lt;br /&gt;
&lt;br /&gt;
===== preload =====&lt;br /&gt;
&lt;br /&gt;
Triggers before a scenario 'prestarts' and when loading a savegame -- before anything is shown on the screen at all. Can be used to set up the [[LuaWML|Lua]] environment: loading libraries, defining helper functions, etc.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Unlike prestart and start, the preload event '''must be able to fire more than once!''' This is because it is triggered each time a savegame is loaded in addition to the initial time when it loads before the scenario 'prestart'. This means that it is effectively ''mandatory'' to have the [[#first_time_only|first_time_only=no]] key value in a preload event. &lt;br /&gt;
&lt;br /&gt;
===== prestart =====&lt;br /&gt;
&lt;br /&gt;
Triggers before a scenario 'starts' -- before anything is shown on the screen at all. Can be used to set up things like village ownership. For things displayed on-screen such as character dialog, use '''start''' instead.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' ''This value makes the [[#first_time_only|first_time_only]] key irrelevant since, by definition, it can only fire once.''&lt;br /&gt;
&lt;br /&gt;
===== start =====&lt;br /&gt;
&lt;br /&gt;
Triggers after the map is shown but before the scenario begins -- before players can 'do' anything.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' ''This value makes the [[#first_time_only|first_time_only]] key irrelevant since, by definition, it can only fire once.''&lt;br /&gt;
&lt;br /&gt;
===== new turn =====&lt;br /&gt;
&lt;br /&gt;
Triggers at the start of every turn (not side turn). See also [[#first_time_only|first_time_only=no]]. Before any events of this type trigger, the value of the WML variable '''turn_number''' is set to the number of the turn that is beginning.&lt;br /&gt;
&lt;br /&gt;
===== turn end =====&lt;br /&gt;
&lt;br /&gt;
Triggers at the end of every turn (not side turn). See also [[#first_time_only|first_time_only=no]]. The WML variable '''side_number''' will contain the side that ended their turn.&lt;br /&gt;
&lt;br /&gt;
===== turn ''X'' end =====&lt;br /&gt;
&lt;br /&gt;
Triggers at the end of turn ''X''.&lt;br /&gt;
&lt;br /&gt;
===== side turn =====&lt;br /&gt;
&lt;br /&gt;
Triggers when a side is about to start its turn. Before events of this type trigger, the value of the WML variable '''side_number''' is set to the number of the side of the player about to take their turn. This is before any healing takes place for that side, before calculating income, and before restoring unit movement and status.&lt;br /&gt;
&lt;br /&gt;
===== ai turn =====&lt;br /&gt;
&lt;br /&gt;
Triggered just before the AI is invoked for a side. This is called after ''side turn'', and thus the WML variable '''side_number''' still holds the number of this side. Note that this event might be called several times per turn in case that fallbacks to human or droiding is involved. I.e. it happens at the middle of turn of human side 1 if the human player droids his side. It happens after the selection of ai to play the turn but before AI is told that new turn has come.&lt;br /&gt;
&lt;br /&gt;
'''Note:'''  ''This event currently breaks replays since it is not explicitly saved in a replay and there is no AI involved in replays...''&lt;br /&gt;
&lt;br /&gt;
===== turn refresh =====&lt;br /&gt;
&lt;br /&gt;
Like '''side turn''', triggers just before a side is taking control but '''after''' healing, calculating income, and restoring unit movement and status.&lt;br /&gt;
&lt;br /&gt;
Note that the turn refresh event does occur on turn 1, even though healing, income and unit refreshing do not.&lt;br /&gt;
&lt;br /&gt;
===== turn ''X'' =====&lt;br /&gt;
&lt;br /&gt;
Triggers at the start of turn ''X''. It's the first side initialization event. &lt;br /&gt;
&lt;br /&gt;
Side initialization events go in the order of: &lt;br /&gt;
&lt;br /&gt;
# '''turn ''X''''' &lt;br /&gt;
# '''new turn''' &lt;br /&gt;
# '''side turn''' &lt;br /&gt;
# '''side ''X'' turn''' &lt;br /&gt;
# '''side turn ''X''''' &lt;br /&gt;
# '''side ''X'' turn ''Y''''' &lt;br /&gt;
# '''turn refresh''' &lt;br /&gt;
# '''side ''X'' turn refresh''' &lt;br /&gt;
# '''turn ''X'' refresh''' &lt;br /&gt;
# '''side ''X'' turn ''Y'' refresh'''&lt;br /&gt;
&lt;br /&gt;
===== side ''X'' turn ''Y'' =====&lt;br /&gt;
&lt;br /&gt;
This event triggers at the start of turn ''Y'' of side X &lt;br /&gt;
&lt;br /&gt;
===== side ''X'' turn =====&lt;br /&gt;
&lt;br /&gt;
This event triggers at the start of any turn of side X&lt;br /&gt;
&lt;br /&gt;
'''Note:''' ''Of course, [[#first_time_only|first_time_only=no]] is needed for this event to be triggered more than once.''&lt;br /&gt;
&lt;br /&gt;
===== side turn ''X'' =====&lt;br /&gt;
&lt;br /&gt;
This event triggers at the start of any side on turn X&lt;br /&gt;
&lt;br /&gt;
'''Note:''' ''Of course, [[#first_time_only|first_time_only=no]] is needed for this event to be triggered more than once.''&lt;br /&gt;
&lt;br /&gt;
===== side X turn Y refresh =====&lt;br /&gt;
&lt;br /&gt;
This event triggers at the turn refresh for side X on turn Y&lt;br /&gt;
&lt;br /&gt;
===== side ''X'' turn refresh =====&lt;br /&gt;
&lt;br /&gt;
This event triggers at the turn refresh for side X&lt;br /&gt;
&lt;br /&gt;
'''Note:''' ''Of course, [[#first_time_only|first_time_only=no]] is needed for this event to be triggered more than once.''&lt;br /&gt;
&lt;br /&gt;
===== turn ''X'' refresh =====&lt;br /&gt;
&lt;br /&gt;
This event triggers for any side at the refresh of turn X.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' ''Of course, [[#first_time_only|first_time_only=no]] is needed for this event to be triggered more than once.''&lt;br /&gt;
&lt;br /&gt;
===== side turn end =====&lt;br /&gt;
&lt;br /&gt;
Triggers after a side ends its turn. Like side turn, there are also some variations for specific combinations of side number and turn number. Here is the order in which the turn end events trigger:&lt;br /&gt;
&lt;br /&gt;
# '''side turn end''' &lt;br /&gt;
# '''side ''X'' turn end''' &lt;br /&gt;
# '''side turn ''X'' end''' &lt;br /&gt;
# '''side ''X'' turn ''Y'' end''' &lt;br /&gt;
# '''turn end''' &lt;br /&gt;
# '''turn ''X'' end''' &lt;br /&gt;
&lt;br /&gt;
===== time over =====&lt;br /&gt;
&lt;br /&gt;
Triggers on turn ''turns''. (''turns'' is specified in [scenario])&lt;br /&gt;
&lt;br /&gt;
===== enemies defeated =====&lt;br /&gt;
&lt;br /&gt;
Triggers when all sides that are not defeated are allied and if there is at least one human (or human networked) side among them. Especially this event triggers in a situaltion that would normaly cause a victory due to enemies defeated. (regardless of whether this was disabled with victory_when_enemies_defeated=no). &lt;br /&gt;
&lt;br /&gt;
===== victory =====&lt;br /&gt;
&lt;br /&gt;
In this scenario, any tag of the form '''[endlevel] result=victory [/endlevel]''' will be automatically preceded by all actions in this tag. It helps debugging if the victory event allows you to safely advance to any of the possible next maps after using the &amp;quot;:n&amp;quot; command. Scenarios where key units are picked up before the victory, or where some action chosen earlier determines which map to advance to, make it hard to quickly test scenarios in a campaign. (See also: [endlevel], [[DirectActionsWML]]). This event is not synchonized in networked mp or in replays. The reason is that it is possible to have diffrent results in a mp game (one player wins so a '''victory''' event is fired on that client, other player loses so a '''defeat''' event is fired on his client)&lt;br /&gt;
&lt;br /&gt;
===== defeat =====&lt;br /&gt;
&lt;br /&gt;
In this scenario, any tag of the form '''[endlevel] result=defeat [/endlevel]''' will be automatically preceded by all actions in this tag. (See also [endlevel], [[DirectActionsWML]]). Like  '''victory''', this event is not synchonized in networked mp or in replays.&lt;br /&gt;
&lt;br /&gt;
==== Predefined Events With Filters ====&lt;br /&gt;
&lt;br /&gt;
Filters (except [filter_condition] which is for all sorts of events) can be applied to the following event triggers (see [[FilterWML]]; see also below). The actions specified in the event tag will be executed only if the filter returns true. &lt;br /&gt;
These event triggers are all actions by units ('''moveto''', '''attack''') or things that happen to units ('''recruit''', '''advance'''). When one of these events is triggered, the position of the active unit (referred to as the '''primary unit''') is stored in the variables '''x1''' and '''y1''' and the position of any unit that primary unit does something to is stored in the variables '''x2''' and '''y2''' (this unit is referred to as the '''secondary unit''' below). '' These units are also automatically stored in the variables 'unit' and 'second_unit' as if they had been stored using the '''[store_unit]''' tag. see [[SingleUnitWML]]. weapon and second_weapon variables are available inside attack, attacker_hits, defender_hits, die and last_breath events. See [[VariablesWML#Automatically_Stored_Variables|automatically stored variables]] for more information.&lt;br /&gt;
&lt;br /&gt;
===== moveto =====&lt;br /&gt;
&lt;br /&gt;
Triggers after the primary unit moves. Typically this is used when the primary unit gets to a particular location and a filter for the location of the primary unit is included; remember that this is the location that the primary unit lands on, not the location it started on or any location it travels on. If the unit moves to a village, the capture event will be fired before this event. &amp;lt;br /&amp;gt;''An '''[allow_undo]''' tag anywhere within a moveto event will cancel any lack of undo functionality the event would have caused. Note that undo functionality will only move the unit back to its former location; it will not undo other changes to the game caused by the event. Thus it is up to the scenario designer to use this tag correctly.'' $x2 and $y2 refer to the hex the unit came from.&lt;br /&gt;
&lt;br /&gt;
===== sighted =====&lt;br /&gt;
&lt;br /&gt;
A '''sighted''' event is triggered by a unit becoming visible to a side (other than the unit's own side). This is mostly useful when the side seeing the unit uses [[fog of war]] or [[shroud]], but they still fire even when fog/shroud is not in use, and they do take into account the {{tag2|AbilitiesWML#The_.5Babilities.5D_tag|hides}} ability (for a moving unit and for ambushers). The ''primary unit'' is the unit that became visible, and the ''secondary unit'' belongs to the side that now sees the primary unit. In some cases, sighted events can be delayed from when they &amp;quot;should&amp;quot; occur. If that happens, the secondary unit will be filtered as if it was at the location where the event &amp;quot;should&amp;quot; have occurred, and ''x2,y2'' will store that location (not the current position of the secondary unit). To understand when sighted events fire, it is helpful to distinguish the times the acting unit sights other units from the times when the acting unit is sighted.&lt;br /&gt;
&lt;br /&gt;
An acting unit can sight other units when it is recruited, recalled, leveled, or moved, and when fog or shroud is cleared from occupied hexes as a result. In these cases, the acting unit is always the ''secondary unit''. For the first three actions, there are two events associated with the action; clearing occurs between these events, but any sighted events are fired after the second event. (For example, when a unit is recruited, the ''prerecruit'' event fires, then fog is cleared, then the ''recruit'' event fires, then ''sighted'' events fire.) For movement, the sighted events fire between ''enter_hex'' and ''exit_hex'' events, but sometimes sighted events are postponed until the moving unit reaches a good place to stop (e.g. not in an occupied hex). As a major exception to the above, players have the option to delay shroud (and fog) updates. If the player delays shroud updates, sighted events are also delayed until the shroud is updated.&lt;br /&gt;
&lt;br /&gt;
An acting unit can be sighted by other sides when it is recruited, recalled, leveled (in rare cases), or moved. In these cases, the acting unit is always the ''primary unit''. These events fire after sightings by the acting unit (unless the player delayed shroud updates). For the first two, the sighted event fires for all sides that can see the unit, other than the unit's own side (even if those sides use neither fog nor shroud). For leveling units, sides that could see the unit before it leveled are excluded. (This is why these events are rare &amp;amp;ndash; the leveling unit must have lost a [hides] ability as a result of leveling in order to be seen after, but not before, leveling.) For movement, a sighted event is fired for each side that could see the unit after movement, but not before. In particular, only the starting and ending hexes are considered; a unit that moves through seen hexes but ends movement in a fogged hex does not trigger a sighted event for itself. In all cases where the acting unit is sighted, a (single) ''secondary unit'' is chosen from the sighting team. This choice should be considered arbitrary, but units within their sight range of the acting unit are chosen in preference to units further away.&lt;br /&gt;
&lt;br /&gt;
Sighted events are not triggered by a ''hides'' ability becoming inactive, unless it becomes inactive due to that unit's movement or to that unit ambushing another. (To detect a ''nightstalk'' ability becoming inactive due to time of day, use a ''new_turn'' event. Custom ''hides'' abilities might need similar handling.)&lt;br /&gt;
&lt;br /&gt;
Sighted events have some special caveats for WML authors. First and foremost, {{tag|DirectActionsWML|allow_undo}} should generally be avoided in sighted events. It can be used if current unit positions have no bearing on the event, but otherwise it could cause a replay to go out of sync if a player delays shroud updates and undoes a move. This should not be an onerous restriction, though, as clearing fog will block the ability to undo, regardless of what happens within an event. Secondly, it is currently possible for WML to kill a unit involved in a sighted event before that event fires. If that happens, filters on the killed unit will not match anything and the event may seem to have not fired.&lt;br /&gt;
&lt;br /&gt;
===== enter_hex =====&lt;br /&gt;
&lt;br /&gt;
Triggers for each hex entered during movement, with $x1,$y1 identifying the hex entered and $x2,$y2 identifying the previous hex (just exited). If this event is handled without using {{tag|DirectActionsWML|allow_undo}}, then movement is interrupted, stopping the unit where it is.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' This event behaves a bit unusually if the hex is occupied (and the moving unit is simply passing through). When this happens, $x1,$y1 is still the hex where the event was triggered, but the moving unit (stored in $unit) will be located somewhere earlier in the route (the most recent unoccupied hex). That is, $x1,$y1 will not equal $unit.x,$unit.y (a condition that can be used to detect when the entered hex is occupied). The moving unit will have already spent its movement points to enter the event's hex even though it is has not actually moved from the most recent unoccupied hex.&lt;br /&gt;
&lt;br /&gt;
===== exit_hex =====&lt;br /&gt;
&lt;br /&gt;
Triggers for each hex exited during movement, with $x1,$y1 identifying the hex exited and $x2,$y2 identifying the next hex (to be entered). If this event is handled without using {{tag|DirectActionsWML|allow_undo}}, then movement is interrupted, stopping the unit where it is.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' This event behaves a bit unusually if the hex is occupied (and the moving unit is simply passing through). When this happens, $x1,$y1 is still the hex where the event was triggered, but the moving unit (stored in $unit) will be located somewhere earlier in the route (the most recent unoccupied hex). That is, $x1,$y1 will not equal $unit.x,$unit.y (a condition that can be used to detect when the exited hex is occupied). The moving unit will have already spent its movement points to enter the event's hex even though it is has not actually moved from the most recent unoccupied hex.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== attack =====&lt;br /&gt;
&lt;br /&gt;
Triggers when the primary unit attacks the secondary unit.&lt;br /&gt;
&lt;br /&gt;
===== attack end =====&lt;br /&gt;
&lt;br /&gt;
Similar to '''attack''', but is triggered ''after'' the fight instead of before. Note that if either unit is killed during the fight, this event triggers before any '''die''' events.&lt;br /&gt;
&lt;br /&gt;
===== attacker hits =====&lt;br /&gt;
&lt;br /&gt;
Triggers when the the primary unit (the attacker) hits the secondary unit (the defender). The value of the WML variable '''damage_inflicted''' is set to the number of hitpoints inflicted by the attacker.&lt;br /&gt;
&lt;br /&gt;
===== attacker misses =====&lt;br /&gt;
&lt;br /&gt;
Same as ''attacker hits'', but is triggered when the attacker misses.&lt;br /&gt;
&lt;br /&gt;
===== defender hits =====&lt;br /&gt;
&lt;br /&gt;
Triggers when the primary unit (the attacker) is hit in retaliation by the secondary unit (the defender). The value of the WML variable '''damage_inflicted''' is set to the number of hitpoints inflicted by the defender.&lt;br /&gt;
&lt;br /&gt;
===== defender misses =====&lt;br /&gt;
&lt;br /&gt;
Same as ''defender hits'', but is triggered when the defender misses.&lt;br /&gt;
&lt;br /&gt;
===== petrified =====&lt;br /&gt;
Triggers when the primary unit is hit by an attack with the 'petrifies' ability (See ''stones'', [[AbilitiesWML]]) by the secondary unit (the unit with the 'petrifies' ability).&lt;br /&gt;
&lt;br /&gt;
===== last breath =====&lt;br /&gt;
&lt;br /&gt;
Triggers when the primary unit is killed by the secondary unit, but before the death animation is triggered. Use this instead of name=die when you want the primary unit to make a final [message]. &lt;br /&gt;
&lt;br /&gt;
===== die =====&lt;br /&gt;
&lt;br /&gt;
Triggers when the primary unit is killed by the secondary unit. ''Note: The primary unit is not removed from the game until the end of this event. The primary unit can still be manipulated, will block other units from taking its hex, and will still be found by standard unit filters (except [have_unit]). To prevent this behavior, you can use [kill] to remove the unit immediately. However, this will stop any (still unfired) other events that also match the unit from firing afterwards, so use with caution.'' If you want to the primary unit to make a final [message], use name=last_breath, see above.&lt;br /&gt;
&lt;br /&gt;
===== capture =====&lt;br /&gt;
&lt;br /&gt;
Triggers when the primary unit captures a village. The village may have been previously neutral, or previously owned by another side; merely moving into your own villages does not constitute a capture. This event will be fired before the moveto event. Villages becoming neutral (via [capture_village]) do not fire capture events. The variable $owner_side contains the previous owner side of the village. 0 means neutral.&lt;br /&gt;
&lt;br /&gt;
===== recruit =====&lt;br /&gt;
&lt;br /&gt;
Triggers when the primary unit is recruited (by the secondary unit). (That is, when a unit is recruited it will trigger this event and this event's filter will filter that unit.).&lt;br /&gt;
&lt;br /&gt;
===== prerecruit =====&lt;br /&gt;
&lt;br /&gt;
Triggers when the primary unit is recruited (by the secondary unit) but before it is displayed.&lt;br /&gt;
&lt;br /&gt;
===== recall =====&lt;br /&gt;
&lt;br /&gt;
Triggers after the primary unit is recalled (by the secondary unit).&lt;br /&gt;
&lt;br /&gt;
===== prerecall =====&lt;br /&gt;
&lt;br /&gt;
Triggers when the primary unit is recalled (by the secondary unit) but before it is displayed.&lt;br /&gt;
&lt;br /&gt;
===== advance =====&lt;br /&gt;
&lt;br /&gt;
Triggers just before the primary unit is going to advance to another unit, or advance by AMLA. (This is after the player selects which advancement, if there is a choice). If this event removes the unit, changes the unit's type, or reduces the unit's experience below what it needs to advance, then the advancement is aborted. This also applies to advancement by AMLA.&lt;br /&gt;
&lt;br /&gt;
===== pre advance =====&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|0}} Triggers before the unit advancement dialog is shown. If this event removes the unit or reduces the unit's experience below what it needs to advance, then the advancement is aborted.&lt;br /&gt;
&lt;br /&gt;
===== post advance =====&lt;br /&gt;
&lt;br /&gt;
Triggers just after the primary unit has advanced to another unit, or advance by AMLA.&lt;br /&gt;
&lt;br /&gt;
===== select =====&lt;br /&gt;
&lt;br /&gt;
Triggers when the primary unit is selected. Prior to version 1.11, this also triggered when a move was interrupted, as the game keeps the moving unit selected by selecting it again at the end of movement. ''Note: in networked multiplayer, these events are only executed by the client on which the event is triggered, leading to out of sync errors if you modify the game state in the event.''&lt;br /&gt;
&lt;br /&gt;
===== menu item ''X'' =====&lt;br /&gt;
&lt;br /&gt;
Triggers when a WML menu item with id=''X'' is selected. ''Note: if the menu item has a [command], this event may be executed before or after the command; there is no guarantee.''&lt;br /&gt;
&lt;br /&gt;
==== Custom events ====&lt;br /&gt;
&lt;br /&gt;
An event with a custom name may be invoked using the [[InternalActionsWML#.5Bfire_event.5D|[fire_event]]] tag.  Normally you'll use such custom events as named subroutines to be called by events with predefined types.  One common case of this, for example, is that more than one '''sighted''' events might fire the same custom event that changes the scenario objectives. Also, custom events come very handy in [[Wml_optimisation]].&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 #The following is the definition of a custom event &amp;quot;unit recruited&amp;quot;&lt;br /&gt;
 [event]&lt;br /&gt;
 name=unit_recruited&lt;br /&gt;
 first_time_only=no&lt;br /&gt;
    [message]&lt;br /&gt;
    speaker=unit&lt;br /&gt;
    message=_ &amp;quot;Reporting for duty!&amp;quot;&lt;br /&gt;
    [/message]&lt;br /&gt;
 [/event]&lt;br /&gt;
 &lt;br /&gt;
 #This is a standard recruit event that triggers whenever a unit is recruited by side 1&lt;br /&gt;
 [event]&lt;br /&gt;
 name=recruit&lt;br /&gt;
 first_time_only=no&lt;br /&gt;
    [filter]&lt;br /&gt;
    [/filter]&lt;br /&gt;
    [filter_second]&lt;br /&gt;
    side=1&lt;br /&gt;
    [/filter_second]&lt;br /&gt;
 &lt;br /&gt;
 #And now a fire_event tag is used to trigger the previously defined event&lt;br /&gt;
    [fire_event]&lt;br /&gt;
    name=unit_recruited&lt;br /&gt;
    [/fire_event]&lt;br /&gt;
 &lt;br /&gt;
 #As a result, every time side 1 recruits a unit, this unit says &amp;quot;Reporting for duty!&amp;quot;&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
=== Optional Keys and Tags ===&lt;br /&gt;
&lt;br /&gt;
These keys and tags are more complex ways to filter when an event should trigger:&lt;br /&gt;
&lt;br /&gt;
==== first_time_only ====&lt;br /&gt;
: Whether the event should be removed from the scenario after it is triggered. This key takes a [[ConditionalActionsWML#Boolean_Values|boolean]]; for example:&lt;br /&gt;
: ''first_time_only=yes''&lt;br /&gt;
:: Default behavior if key is omitted. The event will trigger the first time it can and never again.&lt;br /&gt;
: ''first_time_only=no''&lt;br /&gt;
:: The event will trigger every time the criteria are met instead of only the first time.&lt;br /&gt;
&lt;br /&gt;
==== id ====&lt;br /&gt;
: If an id is specified, then the event will not be added if another event with the same id already exists. An id will also allow the event to be removed, see below. Supplying a non-empty id= is mandatory in case of a [unit_type][event].&lt;br /&gt;
&lt;br /&gt;
==== remove ====&lt;br /&gt;
: Whether to remove an event instead of adding a new one. This key takes a [[ConditionalActionsWML#Boolean_Values|boolean]]; if true, then the contents of the event are ignored and the event with the specified id is removed instead. {{DevFeature1.13|0}} May be a comma separated list.&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     id=id_of_event_to_remove&lt;br /&gt;
     remove=yes&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; {{DevFeature1.13|0}} You can now use [[InternalActionsWML#.5Bremove_event.5D|[remove_event]]] instead (the [event] remove= syntax still works). It also accepts a comma separated list.&lt;br /&gt;
&lt;br /&gt;
 [remove_event]&lt;br /&gt;
     id=id_of_event_to_remove&lt;br /&gt;
 [/remove_event]&lt;br /&gt;
&lt;br /&gt;
==== [filter] ====&lt;br /&gt;
: The event will only trigger if the primary unit matches this filter.&lt;br /&gt;
:* [[StandardUnitFilter]]: selection criteria&lt;br /&gt;
&lt;br /&gt;
==== [filter_second] ====&lt;br /&gt;
: Like [filter], but for the secondary unit.&lt;br /&gt;
:* [[StandardUnitFilter]]: selection criteria&lt;br /&gt;
&lt;br /&gt;
==== [filter_attack] ====&lt;br /&gt;
: Can be used to set additional filtering criteria based on the weapon used by the primary unit. This is usable in the events ''attack'', ''attacker hits'', ''attacker misses'', ''defender hits'', ''defender misses'', ''attack end'', ''last breath'', and ''die''. For more information and filter keys, see [[FilterWML#Filtering Weapons|Filtering Weapons]]. The most commonly used keys are the following.&lt;br /&gt;
:* '''name''': the name of the weapon used.&lt;br /&gt;
:* '''range''': the range of the weapon used.&lt;br /&gt;
:* '''special''': filter on the attack's special power.&lt;br /&gt;
&lt;br /&gt;
==== [filter_second_attack] ====&lt;br /&gt;
: Like [filter_attack], but for the weapon used by the secondary unit.&lt;br /&gt;
&lt;br /&gt;
==== [filter_condition] ====&lt;br /&gt;
: This tag makes sense inside any sort of event - even those that don't have units, or custom events,... The event will only trigger if this condition evaluates to true.&lt;br /&gt;
:* [[ConditionalActionsWML#Condition_Tags|Condition Tags]]&lt;br /&gt;
: note: This tag is meant to be used when the firing of an event shall be based on variables/conditions which cannot be retrieved from the filtered units.&lt;br /&gt;
&lt;br /&gt;
==== [filter_side] ====&lt;br /&gt;
: The current side (usually the side $side_number) must match the passed [[StandardSideFilter]] for the event to fire.&lt;br /&gt;
:* SSF tags and keys as arguments as described in [[StandardSideFilter]].&lt;br /&gt;
: note: This tag makes most sense in side turn and turn refresh events. However, all wml events have a current side so one could also prevent e.g. a moveto event from firing if you put a [filter_side] tag there and the moving unit's side doesn't match.&lt;br /&gt;
&lt;br /&gt;
==== delayed_variable_substitution ====&lt;br /&gt;
: This key is only relevant inside of a [[#Delayed Variable Substitution|nested event]] and controls when variable substitution will occur in those special case actions.&lt;br /&gt;
&lt;br /&gt;
=== Actions triggered by [event] ===&lt;br /&gt;
&lt;br /&gt;
After the trigger conditions have been met, all [[ActionWML|action tags]] within the [event] tag are executed in the order they are written in.&lt;br /&gt;
&lt;br /&gt;
There are 3 main types of actions:&lt;br /&gt;
* direct actions ([[DirectActionsWML]]) which have a direct effect on gameplay&lt;br /&gt;
* display actions ([[InterfaceActionsWML]]) which show something to the user&lt;br /&gt;
* internal actions ([[InternalActionsWML]]) which are used by WML internally&lt;br /&gt;
&lt;br /&gt;
More details in [[ActionWML]].&lt;br /&gt;
&lt;br /&gt;
Several actions use standard filters to find out which units&lt;br /&gt;
to execute the command on.  These are denoted by the phrases&lt;br /&gt;
&amp;quot;standard unit filter&amp;quot; and &amp;quot;standard location filter&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Nested Events ===&lt;br /&gt;
&lt;br /&gt;
There is one special type of action: event creation.  By placing an '''[event]''' tag inside another '''[event]''' tag, the nested event is spawned (created) when the parent (outer) event is encountered (when executing the contents of the parent event).&lt;br /&gt;
&lt;br /&gt;
([[#Nested Event Example|See Examples]])&lt;br /&gt;
&lt;br /&gt;
==== Delayed Variable Substitution ====&lt;br /&gt;
&lt;br /&gt;
Variable substitution for a nested event can happen either when it is spawned by the parent event or when it is triggered itself. This is controlled with the key '''delayed_variable_substitution''' which is used in the nested event.&lt;br /&gt;
&lt;br /&gt;
If this key is set to ''yes'', the variables in the nested event will contain values from the turn in which the ''nested'' event was triggered. ''This is the default behavior if the key is omitted.'' If set to ''no'', the variables in the nested event are set at the time the ''parent'' event is triggered.&lt;br /&gt;
&lt;br /&gt;
This behavior can be fine tuned with a special syntax when referencing variables. Instead of the normal '''$variable''' syntax, use '''$|variable''' to cause a variable to contain values relevant to the turn in which the nested event was triggered even when '''delayed_variable_substitution''' is set to ''no''. In this way you can have a mix of variables relevant to the parent and nested event trigger times.&lt;br /&gt;
&lt;br /&gt;
([[#Delayed Variable Substitution Example|See Examples]])&lt;br /&gt;
&lt;br /&gt;
== Multiplayer safety ==&lt;br /&gt;
&lt;br /&gt;
In multiplayer it is only safe to use WML that might require synchronization with other players because of input or random numbers (like [message] with input or options or [unstore_unit] where a unit might advance) in the following events. This is because in these cases WML needs data from other players to work right and/or do the same thing for all players. This data is only available after a network synchronization.&lt;br /&gt;
&lt;br /&gt;
List of synchronized events:&lt;br /&gt;
* moveto&lt;br /&gt;
* enter hex&lt;br /&gt;
* exit hex&lt;br /&gt;
* sighted&lt;br /&gt;
* last breath &lt;br /&gt;
* menu item X&lt;br /&gt;
* die&lt;br /&gt;
* capture &lt;br /&gt;
* recruit&lt;br /&gt;
* prerecruit &lt;br /&gt;
* recall &lt;br /&gt;
* prerecall &lt;br /&gt;
* advance&lt;br /&gt;
* pre advance&lt;br /&gt;
* post advance &lt;br /&gt;
* attack&lt;br /&gt;
* attack end &lt;br /&gt;
* attacker hits &lt;br /&gt;
* attacker misses &lt;br /&gt;
* defender hits&lt;br /&gt;
* defender misses &lt;br /&gt;
* start&lt;br /&gt;
* prestart (prestart are synced but [message][option] &amp;amp; [unstore_unit] advancement choices will do a random decision because UI things don't work during prestart events.)&lt;br /&gt;
* new turn &lt;br /&gt;
* side turn &lt;br /&gt;
* turn X &lt;br /&gt;
* side X turn &lt;br /&gt;
* side X turn Y &lt;br /&gt;
* turn refresh&lt;br /&gt;
* side turn end&lt;br /&gt;
* side X turn end&lt;br /&gt;
* side turn X end&lt;br /&gt;
* side X turn Y end&lt;br /&gt;
* turn end&lt;br /&gt;
* turn X end&lt;br /&gt;
* {{DevFeature1.13|0}} enemies defeated&lt;br /&gt;
* {{DevFeature1.13|0}} time over&lt;br /&gt;
The following are &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; synced:&lt;br /&gt;
* select&lt;br /&gt;
* preload&lt;br /&gt;
* victory&lt;br /&gt;
* defeat&lt;br /&gt;
* ai turn&lt;br /&gt;
&lt;br /&gt;
If an event is not listed here, ask someone to be sure.&lt;br /&gt;
&lt;br /&gt;
There is also the possibility of events that are normally synchronized when fired by the engine but can be non-synchronized when fired by WML tags from non-synchronized event. So when you are using them you must be extra careful. For example [unstore_unit] may trigger a unit advancement that will fire ''advance'' and ''post advance'' events.&lt;br /&gt;
&lt;br /&gt;
== A Trap for the Unwary ==&lt;br /&gt;
&lt;br /&gt;
You need to beware of using macros to generate events. If you include a macro expanding to an event definition twice, the event will be executed twice (not once) each time the trigger condition fires. Consider this code:&lt;br /&gt;
&lt;br /&gt;
 #define DOUBLE&lt;br /&gt;
     [event]&lt;br /&gt;
         name=multiply_by_2&lt;br /&gt;
         {VARIABLE_OP 2_becomes_4 multiply 2}&lt;br /&gt;
     [/event]&lt;br /&gt;
 #enddef&lt;br /&gt;
 &lt;br /&gt;
 {DOUBLE}&lt;br /&gt;
 {DOUBLE}&lt;br /&gt;
 &lt;br /&gt;
 {VARIABLE 2_becomes_4 2}&lt;br /&gt;
 		&lt;br /&gt;
 [fire_event]&lt;br /&gt;
     name=multiply_by_2&lt;br /&gt;
 [/fire_event]&lt;br /&gt;
 &lt;br /&gt;
 {DEBUG_MSG &amp;quot;$2_becomes_4 should be 4&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
After it executes, the debug message will reveal that the variable has been set to 8, not 4.&lt;br /&gt;
&lt;br /&gt;
=== Event IDs ===&lt;br /&gt;
&lt;br /&gt;
This problem can be avoided by setting an '''id''' on the event, i.e.:&lt;br /&gt;
&lt;br /&gt;
 #define DOUBLE&lt;br /&gt;
     [event]&lt;br /&gt;
         name=multiply_by_2&lt;br /&gt;
         id=doubler_event&lt;br /&gt;
         {VARIABLE_OP 2_becomes_4 multiply 2}&lt;br /&gt;
     [/event]&lt;br /&gt;
 #enddef&lt;br /&gt;
&lt;br /&gt;
Events with the same ID will only be accepted once by the engine no matter how many times they are included, and will only be saved once to the scenario's savefile.  Events with an ID can also be removed by using the '''remove''' key, i.e.:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     id=doubler_event&lt;br /&gt;
     remove=yes&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
After that WML is encountered (at toplevel or after created from another event), the event with this ID is removed from the scenario wml, thus firing it has no effect.  After an event is removed, it can still be re-added later.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Notes and Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Primary/Secondary Unit Speaker Example ===&lt;br /&gt;
&lt;br /&gt;
In events, the primary unit can be referred to as '''unit''' and the secondary unit can be referred to as '''second_unit''' in [message] tags using the '''speaker''' key. For example:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=die&lt;br /&gt;
     [message]&lt;br /&gt;
         speaker='''second_unit'''&lt;br /&gt;
         message= _ &amp;quot;Hahaha! I finally killed you!&amp;quot;&lt;br /&gt;
     [/message]&lt;br /&gt;
 &lt;br /&gt;
     [message]&lt;br /&gt;
         speaker='''unit'''&lt;br /&gt;
         message= _ &amp;quot;It's not over yet! I'll come back to haunt you!&amp;quot;&lt;br /&gt;
     [/message]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
=== Nested Event Example ===&lt;br /&gt;
&lt;br /&gt;
An event is created for a portal that opens on turn 10. The parent (or 'outer') event executes on turn 10 at which point the nested moveto event is created. This nested event executes when a player steps on a certain spot.&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=turn 10&lt;br /&gt;
 &lt;br /&gt;
     [event]&lt;br /&gt;
         name=moveto&lt;br /&gt;
 &lt;br /&gt;
         [filter]&lt;br /&gt;
             x,y=5,8&lt;br /&gt;
         [/filter]&lt;br /&gt;
 &lt;br /&gt;
         # moving to 5,8 will trigger this event only on turn 10 and after&lt;br /&gt;
     [/event]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
An equivalent way of doing this would be to create a single moveto event with an '''[if]''' statement to check for turn number but using nested '''[event]''' tags is a convenient shortcut to accomplish this task without resorting to '''[if]''' statements.&lt;br /&gt;
&lt;br /&gt;
=== Delayed Variable Substitution Example ===&lt;br /&gt;
&lt;br /&gt;
This code will display a message showing the turn number on which the nested ''moveto'' event happens.&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=turn 10&lt;br /&gt;
 &lt;br /&gt;
     [event]&lt;br /&gt;
         name=moveto&lt;br /&gt;
         delayed_variable_substitution=yes&lt;br /&gt;
 &lt;br /&gt;
         [filter]&lt;br /&gt;
             x,y=5,8&lt;br /&gt;
         [/filter]&lt;br /&gt;
 &lt;br /&gt;
         {DEBUG_MSG &amp;quot;Turn $turn_number&amp;quot;} &lt;br /&gt;
    [/event]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
Since this is the default behavior for the '''delayed_variable_substitution''' key, the following example is identical.&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=turn 10&lt;br /&gt;
 &lt;br /&gt;
     [event]&lt;br /&gt;
         name=moveto&lt;br /&gt;
 &lt;br /&gt;
         [filter]&lt;br /&gt;
             x,y=5,8&lt;br /&gt;
         [/filter]&lt;br /&gt;
 &lt;br /&gt;
         {DEBUG_MSG &amp;quot;Turn $turn_number&amp;quot;} &lt;br /&gt;
    [/event]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
The following code will always display &amp;quot;Turn 10&amp;quot; when the nested ''moveto'' event happens. This is because the variable substitution is done when the parent event is triggered and spawns the nested event, ''not'' when the nested event is triggered.&lt;br /&gt;
 &lt;br /&gt;
 [event]&lt;br /&gt;
     name=turn 10&lt;br /&gt;
 &lt;br /&gt;
     [event]&lt;br /&gt;
         name=moveto&lt;br /&gt;
         delayed_variable_substitution=no&lt;br /&gt;
 &lt;br /&gt;
         [filter]&lt;br /&gt;
             x,y=5,8&lt;br /&gt;
         [/filter]&lt;br /&gt;
 &lt;br /&gt;
         {DEBUG_MSG &amp;quot;Turn $turn_number&amp;quot;} &lt;br /&gt;
    [/event]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
Finally, the following example is identical to the first two in that it will display a message showing the turn number on which the nested ''moveto'' event happens, despite the fact that the '''delayed_variable_substitution''' key is set to ''no''. This is because the special '''$|variable''' syntax is used.&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=turn 10&lt;br /&gt;
 &lt;br /&gt;
     [event]&lt;br /&gt;
         name=moveto&lt;br /&gt;
         delayed_variable_substitution=no&lt;br /&gt;
 &lt;br /&gt;
         [filter]&lt;br /&gt;
             x,y=5,8&lt;br /&gt;
         [/filter]&lt;br /&gt;
 &lt;br /&gt;
         {DEBUG_MSG &amp;quot;Turn $|turn_number&amp;quot;} &lt;br /&gt;
    [/event]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
=== Multiple Nested Events ===&lt;br /&gt;
&lt;br /&gt;
Every delayed_variable_substitution=no causes a variable substitution run on the subevent where it occurs at the spawn time of this event and on all following subevents. For any specific event, variable substitution happens at least one time when the event is executed. For each delayed=no key appearing in itself or in an event of an &amp;quot;older&amp;quot; generation, which is not the toplevel event, an additional variable substitution run is made.&lt;br /&gt;
 [event]# parent&lt;br /&gt;
     name=turn 2&lt;br /&gt;
     #delayed_variable_substitution=no # In the parent event, delayed= has no effect.&lt;br /&gt;
 &lt;br /&gt;
     [event]# child&lt;br /&gt;
         name=turn 3&lt;br /&gt;
         delayed_variable_substitution=no # Causes variable substitution in the child, grandchild and great-grandchild event&lt;br /&gt;
         # at execution time of the parent event = spawn time of the child event.&lt;br /&gt;
 &lt;br /&gt;
         [event]# grandchild&lt;br /&gt;
             name=turn 4&lt;br /&gt;
             delayed_variable_substitution=yes # no variable substitution in the grandchild and great-grandchild event&lt;br /&gt;
             # at execution time of the child event = spawn time of the grandchild event&lt;br /&gt;
 &lt;br /&gt;
             [event]# great-grandchild&lt;br /&gt;
                 name=turn 5&lt;br /&gt;
                 {DEBUG_MSG $turn_number}# output: 2 - value from the variable substitution at execution time of the parent event,&lt;br /&gt;
                 # caused by delayed=no in the child event&lt;br /&gt;
 &lt;br /&gt;
                 {DEBUG_MSG $||turn_number}# output: &amp;quot;$turn_number&amp;quot;&lt;br /&gt;
                 # Each variable substitution transforms a &amp;quot;$|&amp;quot; to a &amp;quot;$&amp;quot; (except when no | left).&lt;br /&gt;
 &lt;br /&gt;
                 {DEBUG_MSG $|turn_number}# output: 5 - from the variable substitution at execution time&lt;br /&gt;
                 # of the great-grandchild event&lt;br /&gt;
             [/event]&lt;br /&gt;
         [/event]&lt;br /&gt;
     [/event]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[DirectActionsWML]]&lt;br /&gt;
* [[InternalActionsWML]]&lt;br /&gt;
* [[InterfaceActionsWML]]&lt;br /&gt;
* [[FilterWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=FAQ&amp;diff=56447</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=FAQ&amp;diff=56447"/>
		<updated>2015-06-22T22:04:16Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* What are the system requirements? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FAQ/Translations}}&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
===What is Battle for Wesnoth?===&lt;br /&gt;
Battle for Wesnoth is a turn-based tactical strategy game with a high fantasy theme, featuring both single-player, and online/hotseat multiplayer combat.&lt;br /&gt;
&lt;br /&gt;
===What license is the game distributed under?===&lt;br /&gt;
The project is distributed under the [http://www.fsf.org/copyleft/gpl.html GPL]. All contributors retain copyright on the portions of the project that they contribute. For more information, see [[Wesnoth:Copyrights]].&lt;br /&gt;
&lt;br /&gt;
===How to get informed about new releases?===&lt;br /&gt;
Check the front page of the website.&lt;br /&gt;
&lt;br /&gt;
===A new version is out, but where is the download for [Windows, Mac OS X, etc.]?===&lt;br /&gt;
The packages provided, other than the source code tarball, are '''not''' part of the official project.  The BfW team only releases the game's source code.  Binary executables or applications are always contributed by community volunteers.  If not for these volunteers, there would never be any downloads for us to enjoy.  The volunteers compile the game and upload it on their own time, and sometimes they cannot do this in a timely fashion (or at all, at times).  Although there are usual packagers designated for each operating system, there are times when other members of the community are asked to step in and contribute when the usual people cannot.&lt;br /&gt;
&lt;br /&gt;
Every time a new version is released, the usual volunteers are notified by the project leaders.  '''Please refrain from making forum posts asking where your download is''' because it doesn't help anything - the packagers already know, and they will get to it as soon as they can.  In the past, the Windows and Mac communities have come together to produce home-grown unofficial builds for the community to use, and the renewed interest in community and learning how to compile is generally a good thing.&lt;br /&gt;
&lt;br /&gt;
===Why doesn't Wesnoth have my favorite feature?===&lt;br /&gt;
Because we are building this game for ourselves, to suit our own preferences. We're not building the game for you, in large part because this is our hobby, not our job; whether you like it or not is immaterial to us.&lt;br /&gt;
You may wonder, then, what the point is of soliciting ideas, as we do on the forum.  We, the developers, have certainly come up with many good ideas on our own, but our players often do as well, and generally ones we don't think of ourselves.  If a player comes up with an idea we like, we might implement it.  Not because they asked for it, but because of its own merits as an addition to our game.&lt;br /&gt;
&lt;br /&gt;
The beautiful thing about the license our game is distributed under, as compared to closed-source, commercial games, is that if you want that feature badly enough, you can take the code and art of our game and modify it yourself; you are free to re-use any work in Wesnoth, as long as you follow the rules of the [http://www.fsf.org/copyleft/gpl.html GPL].  From this, you can build a game exactly the way that you like. Just don't expect us to build that game for you.  Building this game is our hobby, not our profession, and you did not pay us to make it; rather, we are the ones who have paid for it, in time and labor.&lt;br /&gt;
&lt;br /&gt;
===Do you want help making this game? How can I help?===&lt;br /&gt;
Yes, we want your help. Whether you're a programmer, artist, musician, writer, translator, level designer, playtester, or just have some great suggestions, you're welcome to contribute. How?  You can:&lt;br /&gt;
* join the [http://www.wesnoth.org/wiki/Project project]&lt;br /&gt;
* share your opinions at the [http://www.wesnoth.org/forum/ Forum]&lt;br /&gt;
* talk with us on [[Support#IRC|IRC]]&lt;br /&gt;
* [[ReportingBugs|report]] bugs you find with Wesnoth and its mainline content&lt;br /&gt;
* update the wiki&lt;br /&gt;
* play against other players via the [[GettingStarted#Multiplayer|Multiplayer]] menu&lt;br /&gt;
* vote for Wesnoth at your favorite gaming web site&lt;br /&gt;
* spread the word!&lt;br /&gt;
&lt;br /&gt;
=== What are the system requirements? ===&lt;br /&gt;
'''outdated!'''&lt;br /&gt;
We are not completely certain, but an x86 running at 400 MHz with 128 MB RAM should be adequate for versions 1.0.2 and below. For versions 1.1 and up we recommend a computer with at least 1 GHz and 512 MB RAM if you run KDE or Gnome as Windowmanager (The game itself needs about 100 MB RAM). Slower machines will have trouble scrolling large maps or processing AI turns with many units.  See the [http://www.wesnoth.org/forum/viewtopic.php?t=7384 forum thread] about minimum and recommended system requirements.&lt;br /&gt;
&lt;br /&gt;
=== I'm bored; how do I speed the game up? ===&lt;br /&gt;
&lt;br /&gt;
There are several preferences you can change to shorten the time that the AI takes to make its moves. &amp;quot;Accelerated Speed&amp;quot; will make units move and fight faster. &amp;quot;Skip AI Moves&amp;quot; will not show the AI's units moving from hex to hex. Finally, you can turn off all combat animations via the &amp;quot;Show Combat&amp;quot; option on the Advanced tab.&lt;br /&gt;
&lt;br /&gt;
=== My computer is too slow; how do I speed the game up? ===&lt;br /&gt;
&lt;br /&gt;
First, turn off the music and sound effects. Turning off the color cursors will make your cursor respond faster. If scrolling the map is slow, run the game in &amp;quot;Full Screen&amp;quot; mode, not in a window.  Turn off combat, map, and standing unit animations via the &amp;quot;Show Combat&amp;quot;, &amp;quot;Animate Map&amp;quot; and &amp;quot;Unit Standing Animations&amp;quot; options on the Advanced tab in the game Preferences. You can try turning off halos and combat results, but this might make gameplay more difficult.&lt;br /&gt;
For some tips on tweaking the startup, see [[CustomizingStartup]].&lt;br /&gt;
&lt;br /&gt;
== Gameplay and Controls ==&lt;br /&gt;
&lt;br /&gt;
=== How do I learn to play? ===&lt;br /&gt;
&lt;br /&gt;
If you just want to jump right in, start the game and play the tutorial.  If you like reading documentation, see [[WesnothManual]].  At any time while playing, you can select help from the menu button (or hit F1). The online help is quite extensive and provides information on terrains, weapons, traits, abilities, units and a good overview of how to play.&lt;br /&gt;
&lt;br /&gt;
=== My unit leveled up but didn't improve. What happened? ===&lt;br /&gt;
&lt;br /&gt;
This is called &amp;quot;After Maximum Level Advancement&amp;quot; or AMLA for short. While most level 0, 1, and 2 units can advance, some cannot.  However, some level 3 units can advance to level 4, or even 5. You can see whether a unit can advance further by right clicking and selecting &amp;quot;description.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
After a unit reaches the highest level it can get, every time it reaches a new experience threshold (which increases with each advancement) it gains 3 hitpoints and is restored to a state of full health. This is a minor bonus so that experience gained by maxed out units is not altogether wasted. It is generally better to give experience to lower level units, rather than continue to advance units that have reached their maximum level.&lt;br /&gt;
&lt;br /&gt;
=== I tried to trap an enemy with several weak units, but it still escaped. What happened? ===&lt;br /&gt;
&lt;br /&gt;
Most units exert a zone of control (or ZoC).  If an enemy moves into one of the six adjacent hexes, the zone of control will prevent it from moving any farther.  However some weak units are level 0, meaning they are so weak that they do not have a ZoC. You can still surround an enemy unit entirely with level 0 units to keep it from escaping, but if there is any gap in your ranks, it could escape.&lt;br /&gt;
&lt;br /&gt;
Also, some units have the &amp;quot;skirmish&amp;quot; ability, which allows them to ignore ZoCs.&lt;br /&gt;
&lt;br /&gt;
=== How can I see where an enemy unit can move next turn? ===&lt;br /&gt;
&lt;br /&gt;
During your turn you can click on an enemy unit. Wesnoth will highlight all the hexes the unit can move to in the next turn. This is useful when trying to arrange your units to block an enemy's movement.&lt;br /&gt;
&lt;br /&gt;
=== There's too much luck in this game! ===&lt;br /&gt;
&lt;br /&gt;
Sooner or later, you will become frustrated when your archmage with four 70% attacks misses all four times.  This does not mean that the AI is cheating or the random number generator is futzed.  It means you are noticing random negative events more than positive ones.  During the development of the game, many mathematicians have done sophisticated statistical analysis of the combat system.  Likewise, programmers have examined the random number generator.  No flaws have been found, so streaks of &amp;quot;bad&amp;quot; and &amp;quot;good&amp;quot; luck should just be accepted as part of having randomness in Wesnoth.  A more detailed rational and discussion of the role that randomness plays in Wesnoth can be found [http://www.wesnoth.org/forum/viewtopic.php?f=6&amp;amp;t=21317&amp;amp;start=0&amp;amp;st=0&amp;amp;sk=t&amp;amp;sd=a here].&lt;br /&gt;
&lt;br /&gt;
Since Wesnoth is GPLed, it is possible that a new development team will someday &amp;quot;fork&amp;quot; the source and produce a version more like Heroes of Might &amp;amp; Magic, with less or no randomness.  Until then, don't charge with your horsemen against troll rocklobbers at night...&lt;br /&gt;
&lt;br /&gt;
=== The (random unit) is overpowered/underpowered! ===&lt;br /&gt;
&lt;br /&gt;
The development team has spent years tweaking the units in the game.  Each unit has had its gold cost, attack types, combat damage, defensive values, resistances, upgrade paths, and other stats carefully scrutinized and loudly discussed in the forum.  However, the game code and the units were being modified right up until the 1.0 release, so some unbalanced units may have slipped through.&lt;br /&gt;
&lt;br /&gt;
If you have evidence to back up your claim, search the forum for past discussions about this unit, and then try posting.&lt;br /&gt;
&lt;br /&gt;
=== The (random scenario) is too hard/easy! ===&lt;br /&gt;
&lt;br /&gt;
See above answer about random units.&lt;br /&gt;
&lt;br /&gt;
=== What do the different difficulty levels do? ===&lt;br /&gt;
&lt;br /&gt;
That depends on the scenario. Usually, the opponent will get more money and be able to recruit higher-level units at higher difficulty levels, and you will have fewer turns available.&lt;br /&gt;
&lt;br /&gt;
== Maps, Scenarios and Campaigns ==&lt;br /&gt;
&lt;br /&gt;
=== How do I beat scenario _______ ? ===&lt;br /&gt;
&lt;br /&gt;
If you are stuck on a scenario in a campaign, you'll probably find a walkthrough at [[MainlineCampaigns]].  Or check out the &amp;quot;Strategies and Tips&amp;quot; forum at http://www.wesnoth.org/forum/viewforum.php?f=3&lt;br /&gt;
&lt;br /&gt;
=== How do I download user campaigns? ===&lt;br /&gt;
Choose &amp;quot;Campaigns&amp;quot; in the main Wesnoth menu. Then scroll down to the bottom and choose &amp;quot;Get More Campaigns...&amp;quot; or since 1.1.5 there is a &amp;quot;Get add-ons&amp;quot; button in the main menu. This connects you to the campaign server. In the campaign server you can view a list of all available campaigns and download them, as well as posting or deleting your own campaigns.&lt;br /&gt;
&lt;br /&gt;
If you are behind a firewall you may not be able to connect to the campaign server.  In this case try to download the campaign directly from the campaign server at http://addons.wesnoth.org/. If you know how to change your firewall settings, then you should open port 15003 (version 1.1.1 and up) or port 15002 (versions 1.1.0 and lower).  For added security, you can restrict traffic over those ports to the campaign server's IP address (currently 88.191.12.200).&lt;br /&gt;
&lt;br /&gt;
=== Are there any tools to help me create maps and scenarios? ===&lt;br /&gt;
Yes, the game includes a built-in map editor, that you can use to build the terrain maps for your scenarios.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, there's no simple solution for creating the rest of what constitutes a complete scenario or campaign, which is the [[ReferenceWML|WML]] code. There have been some abandoned attempts at creating complete scenario editors such as [[CampGen]], but they are no longer maintained, nor do they work with the latest stable versions of the game.&lt;br /&gt;
&lt;br /&gt;
You should take a look at the [[Create]] section for information and guides that can help you build your own scenario or campaign. Taking a look at how existing content works is also a good idea.&lt;br /&gt;
&lt;br /&gt;
=== What are the .cfg files and how can I edit them? ===&lt;br /&gt;
&lt;br /&gt;
The .cfg files are plain text files, saved with the file extension &amp;quot;.cfg&amp;quot;. You can create and edit them using normal text editors; just save the files in correct format.&lt;br /&gt;
&lt;br /&gt;
Please note that some Windows programs like to add a &amp;quot;.txt&amp;quot; extension, so the file is instead of &amp;quot;my_scenario.cfg&amp;quot; saved as &amp;quot;my_scenario.cfg.txt&amp;quot;. And then the Windows Explorer will hide the &amp;quot;.txt&amp;quot; extension by default, so you may not notice it.&lt;br /&gt;
&lt;br /&gt;
'''Notepad''': After you create a document, click &amp;quot;File&amp;quot;, &amp;quot;Save as...&amp;quot; and select &amp;quot;Save as type: All files&amp;quot;. To open the document, click &amp;quot;File&amp;quot;, &amp;quot;Open...&amp;quot; and select &amp;quot;Files of type: All files (*.*)&amp;quot;. If you open someone else's document, and the end-of-line symbols are displayed as small rectangles, you have to use another editor.&lt;br /&gt;
&lt;br /&gt;
'''WordPad''': After you create a document, click &amp;quot;File&amp;quot;, &amp;quot;Save as...&amp;quot; and select &amp;quot;Save as type: Text Document&amp;quot;. After the document is saved, close WordPad and remove the &amp;quot;.txt&amp;quot; extension from file. To open the document, click &amp;quot;File&amp;quot;, &amp;quot;Open...&amp;quot; and select &amp;quot;Files of type: All documents (*.*)&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Starting with the 1.9.x branch, there is a new IDE for helping User Made Content Authors to easily develop Wesnoth Add-ons. The website and details can be found at: http://eclipse.wesnoth.org&lt;br /&gt;
&lt;br /&gt;
=== I already created an add-on and published it on the server. How can I get translations for the campaign? ===&lt;br /&gt;
Just have a look at [[WesCamp]]. This project is the easiest way to get translations for your campaign. All the info you need you can find at [[WesCamp]].&lt;br /&gt;
&lt;br /&gt;
===How do I place an object or unit on my map with the map editor?===&lt;br /&gt;
You can't.  You need to make a scenario file.  There are more details on the [[BuildingMaps|maps]] page.&lt;br /&gt;
&lt;br /&gt;
== Multiplayer ==&lt;br /&gt;
&lt;br /&gt;
===How do I connect to a multiplayer server, when I sit behind a restrictive firewall?===&lt;br /&gt;
&lt;br /&gt;
You have to open outgoing TCP port 15000 - 14997 (depending on the version you use) to play multiplayer games over the internet on the official servers.&lt;br /&gt;
&lt;br /&gt;
===How to find players for multiplayer game?===&lt;br /&gt;
Hang around for a while on multiplayer servers and you might find someone to play with. If you observe other people playing you will get informed when someone joins the servers. Maybe you find someone willing to play in the [[Support#IRC|IRC]] channel dedicated to Wesnoth, #wesnoth at irc.freenode.net.&lt;br /&gt;
&lt;br /&gt;
===How to save and load a multiplayer game===&lt;br /&gt;
&lt;br /&gt;
Save the game. Give it a good name, so that you can find it among the other saved games.&lt;br /&gt;
&lt;br /&gt;
Create new game. (Give it a name like &amp;quot;private game for X and Y&amp;quot;, so that other players will not try joining it, and you do not have to explain or kick them.) The first item in the map/scenario list is &amp;quot;Saved games&amp;quot;, select this. Choose the saved game. Wait for the other player(s) to connect. Start the game.&lt;br /&gt;
&lt;br /&gt;
===How can I make my computer into a dedicated Wesnoth server?===&lt;br /&gt;
&lt;br /&gt;
To setup a dedicated Wesnoth server, you have to compile the game with the &amp;quot;--enable-server&amp;quot; flag, and after you install, simply run wesnothd from the console.  This will start the server, listening on TCP port 15000.  To compile the server only you can use the flags &amp;quot;--disable-game --enable-server&amp;quot;.  If you aren't using a linux or mac operating system, there are a few ways you can compile on Windows... [[CompilingWesnoth/CrossCompiling|here is one way]].&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Packages for Wesnoth 1.4 and later include wesnothd by default since it's required by the &amp;quot;Host a network game&amp;quot; option from the Multiplayer menu, which is the preferred option for temporarily hosting a server instance to play in a LAN or privately through the Internet.&lt;br /&gt;
&lt;br /&gt;
===Which versions of Wesnoth can play together?===&lt;br /&gt;
&lt;br /&gt;
You only need to make sure you are using the same minor version number (6 in &amp;quot;1.6.x&amp;quot;, 8 in &amp;quot;1.8.x&amp;quot; and so on) corresponding to stable branch releases. If you are using a development release (odd minor version numbers), you must be using exactly the same version number as other clients, to avoid out-of-sync (OOS) issues in multiplayer.&lt;br /&gt;
&lt;br /&gt;
If you are using user-made eras or MP scenarios, all players should make sure they are using the same, latest version of the add-on.&lt;br /&gt;
&lt;br /&gt;
== Translations ==&lt;br /&gt;
&lt;br /&gt;
===Where can I find more information about translating Wesnoth?===&lt;br /&gt;
See [[WesnothTranslations]] for a list of currently maintained projects, and methods for contacting their maintainers and volunteering for help, and instructions for starting your own translation if it isn't included in the game already. [http://gettext.wesnoth.org] shows the current progress translations for different game development and stable branches, mainline campaigns and user-made add-ons.&lt;br /&gt;
&lt;br /&gt;
== Other Questions You Have ==&lt;br /&gt;
&lt;br /&gt;
The best way to get answers to less-frequently asked questions is by visiting the official [http://forums.wesnoth.org Battle for Wesnoth forums]. There are plenty of people willing to help.  Make sure you read ALL of the forum sticky notes and announcements before posting!&lt;br /&gt;
&lt;br /&gt;
[[Category:Troubleshooting and Bugs]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=FAQ&amp;diff=56446</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=FAQ&amp;diff=56446"/>
		<updated>2015-06-22T21:53:45Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* What are the system requirements? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FAQ/Translations}}&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
===What is Battle for Wesnoth?===&lt;br /&gt;
Battle for Wesnoth is a turn-based tactical strategy game with a high fantasy theme, featuring both single-player, and online/hotseat multiplayer combat.&lt;br /&gt;
&lt;br /&gt;
===What license is the game distributed under?===&lt;br /&gt;
The project is distributed under the [http://www.fsf.org/copyleft/gpl.html GPL]. All contributors retain copyright on the portions of the project that they contribute. For more information, see [[Wesnoth:Copyrights]].&lt;br /&gt;
&lt;br /&gt;
===How to get informed about new releases?===&lt;br /&gt;
Check the front page of the website.&lt;br /&gt;
&lt;br /&gt;
===A new version is out, but where is the download for [Windows, Mac OS X, etc.]?===&lt;br /&gt;
The packages provided, other than the source code tarball, are '''not''' part of the official project.  The BfW team only releases the game's source code.  Binary executables or applications are always contributed by community volunteers.  If not for these volunteers, there would never be any downloads for us to enjoy.  The volunteers compile the game and upload it on their own time, and sometimes they cannot do this in a timely fashion (or at all, at times).  Although there are usual packagers designated for each operating system, there are times when other members of the community are asked to step in and contribute when the usual people cannot.&lt;br /&gt;
&lt;br /&gt;
Every time a new version is released, the usual volunteers are notified by the project leaders.  '''Please refrain from making forum posts asking where your download is''' because it doesn't help anything - the packagers already know, and they will get to it as soon as they can.  In the past, the Windows and Mac communities have come together to produce home-grown unofficial builds for the community to use, and the renewed interest in community and learning how to compile is generally a good thing.&lt;br /&gt;
&lt;br /&gt;
===Why doesn't Wesnoth have my favorite feature?===&lt;br /&gt;
Because we are building this game for ourselves, to suit our own preferences. We're not building the game for you, in large part because this is our hobby, not our job; whether you like it or not is immaterial to us.&lt;br /&gt;
You may wonder, then, what the point is of soliciting ideas, as we do on the forum.  We, the developers, have certainly come up with many good ideas on our own, but our players often do as well, and generally ones we don't think of ourselves.  If a player comes up with an idea we like, we might implement it.  Not because they asked for it, but because of its own merits as an addition to our game.&lt;br /&gt;
&lt;br /&gt;
The beautiful thing about the license our game is distributed under, as compared to closed-source, commercial games, is that if you want that feature badly enough, you can take the code and art of our game and modify it yourself; you are free to re-use any work in Wesnoth, as long as you follow the rules of the [http://www.fsf.org/copyleft/gpl.html GPL].  From this, you can build a game exactly the way that you like. Just don't expect us to build that game for you.  Building this game is our hobby, not our profession, and you did not pay us to make it; rather, we are the ones who have paid for it, in time and labor.&lt;br /&gt;
&lt;br /&gt;
===Do you want help making this game? How can I help?===&lt;br /&gt;
Yes, we want your help. Whether you're a programmer, artist, musician, writer, translator, level designer, playtester, or just have some great suggestions, you're welcome to contribute. How?  You can:&lt;br /&gt;
* join the [http://www.wesnoth.org/wiki/Project project]&lt;br /&gt;
* share your opinions at the [http://www.wesnoth.org/forum/ Forum]&lt;br /&gt;
* talk with us on [[Support#IRC|IRC]]&lt;br /&gt;
* [[ReportingBugs|report]] bugs you find with Wesnoth and its mainline content&lt;br /&gt;
* update the wiki&lt;br /&gt;
* play against other players via the [[GettingStarted#Multiplayer|Multiplayer]] menu&lt;br /&gt;
* vote for Wesnoth at your favorite gaming web site&lt;br /&gt;
* spread the word!&lt;br /&gt;
&lt;br /&gt;
=== What are the system requirements? ===&lt;br /&gt;
'''outdated!'''&lt;br /&gt;
We are not completely certain, but an x86 running at 400 MHz with 128 MB RAM should be adequate for versions 1.0.2 and below. For versions 1.1 and up we recommend a computer with at least 1 GHz and 512 MB RAM if you run KDE or Gnome as Windowmanager (The game itself needs about 100 MB RAM). Slower machines will have trouble scrolling large maps or processing AI turns with many units.  See the [http://www.wesnoth.org/forum/viewtopic.php?t=7384 forum thread] about minimum and recommended system requirements.&lt;br /&gt;
&lt;br /&gt;
'''update'''&lt;br /&gt;
I happened to set up a 1GHz 512MB RAM machine with win xp and a GeForce2 MX/MX 400 with corresponding drivers. This is hardware from about 2000. Scrolling the map is jumpy, but not much, and multiplayer in wesnoth 1.12.3+dev, Isar's Cross, runs fine otherwise. Of course, make sure you reserve as much resources for wesnoth as possible, deactivate animated map and standing animations, and don't have too many AI units on the map. I've played wesnoth on a weaker machine too and would call the above a recommended minimum for enjoyable play. Alternatively, use a lightweight Linux distro. Singleplayer performance seems, for some reason, a good deal better than multiplayer, especially scrolling the map. When in multiplayer lobby, don't filter for games, it's a total CPU eater. -anonymissimus, June 2015&lt;br /&gt;
&lt;br /&gt;
=== I'm bored; how do I speed the game up? ===&lt;br /&gt;
&lt;br /&gt;
There are several preferences you can change to shorten the time that the AI takes to make its moves. &amp;quot;Accelerated Speed&amp;quot; will make units move and fight faster. &amp;quot;Skip AI Moves&amp;quot; will not show the AI's units moving from hex to hex. Finally, you can turn off all combat animations via the &amp;quot;Show Combat&amp;quot; option on the Advanced tab.&lt;br /&gt;
&lt;br /&gt;
=== My computer is too slow; how do I speed the game up? ===&lt;br /&gt;
&lt;br /&gt;
First, turn off the music and sound effects. Turning off the color cursors will make your cursor respond faster. If scrolling the map is slow, run the game in &amp;quot;Full Screen&amp;quot; mode, not in a window.  Turn off combat, map, and standing unit animations via the &amp;quot;Show Combat&amp;quot;, &amp;quot;Animate Map&amp;quot; and &amp;quot;Unit Standing Animations&amp;quot; options on the Advanced tab in the game Preferences. You can try turning off halos and combat results, but this might make gameplay more difficult.&lt;br /&gt;
For some tips on tweaking the startup, see [[CustomizingStartup]].&lt;br /&gt;
&lt;br /&gt;
== Gameplay and Controls ==&lt;br /&gt;
&lt;br /&gt;
=== How do I learn to play? ===&lt;br /&gt;
&lt;br /&gt;
If you just want to jump right in, start the game and play the tutorial.  If you like reading documentation, see [[WesnothManual]].  At any time while playing, you can select help from the menu button (or hit F1). The online help is quite extensive and provides information on terrains, weapons, traits, abilities, units and a good overview of how to play.&lt;br /&gt;
&lt;br /&gt;
=== My unit leveled up but didn't improve. What happened? ===&lt;br /&gt;
&lt;br /&gt;
This is called &amp;quot;After Maximum Level Advancement&amp;quot; or AMLA for short. While most level 0, 1, and 2 units can advance, some cannot.  However, some level 3 units can advance to level 4, or even 5. You can see whether a unit can advance further by right clicking and selecting &amp;quot;description.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
After a unit reaches the highest level it can get, every time it reaches a new experience threshold (which increases with each advancement) it gains 3 hitpoints and is restored to a state of full health. This is a minor bonus so that experience gained by maxed out units is not altogether wasted. It is generally better to give experience to lower level units, rather than continue to advance units that have reached their maximum level.&lt;br /&gt;
&lt;br /&gt;
=== I tried to trap an enemy with several weak units, but it still escaped. What happened? ===&lt;br /&gt;
&lt;br /&gt;
Most units exert a zone of control (or ZoC).  If an enemy moves into one of the six adjacent hexes, the zone of control will prevent it from moving any farther.  However some weak units are level 0, meaning they are so weak that they do not have a ZoC. You can still surround an enemy unit entirely with level 0 units to keep it from escaping, but if there is any gap in your ranks, it could escape.&lt;br /&gt;
&lt;br /&gt;
Also, some units have the &amp;quot;skirmish&amp;quot; ability, which allows them to ignore ZoCs.&lt;br /&gt;
&lt;br /&gt;
=== How can I see where an enemy unit can move next turn? ===&lt;br /&gt;
&lt;br /&gt;
During your turn you can click on an enemy unit. Wesnoth will highlight all the hexes the unit can move to in the next turn. This is useful when trying to arrange your units to block an enemy's movement.&lt;br /&gt;
&lt;br /&gt;
=== There's too much luck in this game! ===&lt;br /&gt;
&lt;br /&gt;
Sooner or later, you will become frustrated when your archmage with four 70% attacks misses all four times.  This does not mean that the AI is cheating or the random number generator is futzed.  It means you are noticing random negative events more than positive ones.  During the development of the game, many mathematicians have done sophisticated statistical analysis of the combat system.  Likewise, programmers have examined the random number generator.  No flaws have been found, so streaks of &amp;quot;bad&amp;quot; and &amp;quot;good&amp;quot; luck should just be accepted as part of having randomness in Wesnoth.  A more detailed rational and discussion of the role that randomness plays in Wesnoth can be found [http://www.wesnoth.org/forum/viewtopic.php?f=6&amp;amp;t=21317&amp;amp;start=0&amp;amp;st=0&amp;amp;sk=t&amp;amp;sd=a here].&lt;br /&gt;
&lt;br /&gt;
Since Wesnoth is GPLed, it is possible that a new development team will someday &amp;quot;fork&amp;quot; the source and produce a version more like Heroes of Might &amp;amp; Magic, with less or no randomness.  Until then, don't charge with your horsemen against troll rocklobbers at night...&lt;br /&gt;
&lt;br /&gt;
=== The (random unit) is overpowered/underpowered! ===&lt;br /&gt;
&lt;br /&gt;
The development team has spent years tweaking the units in the game.  Each unit has had its gold cost, attack types, combat damage, defensive values, resistances, upgrade paths, and other stats carefully scrutinized and loudly discussed in the forum.  However, the game code and the units were being modified right up until the 1.0 release, so some unbalanced units may have slipped through.&lt;br /&gt;
&lt;br /&gt;
If you have evidence to back up your claim, search the forum for past discussions about this unit, and then try posting.&lt;br /&gt;
&lt;br /&gt;
=== The (random scenario) is too hard/easy! ===&lt;br /&gt;
&lt;br /&gt;
See above answer about random units.&lt;br /&gt;
&lt;br /&gt;
=== What do the different difficulty levels do? ===&lt;br /&gt;
&lt;br /&gt;
That depends on the scenario. Usually, the opponent will get more money and be able to recruit higher-level units at higher difficulty levels, and you will have fewer turns available.&lt;br /&gt;
&lt;br /&gt;
== Maps, Scenarios and Campaigns ==&lt;br /&gt;
&lt;br /&gt;
=== How do I beat scenario _______ ? ===&lt;br /&gt;
&lt;br /&gt;
If you are stuck on a scenario in a campaign, you'll probably find a walkthrough at [[MainlineCampaigns]].  Or check out the &amp;quot;Strategies and Tips&amp;quot; forum at http://www.wesnoth.org/forum/viewforum.php?f=3&lt;br /&gt;
&lt;br /&gt;
=== How do I download user campaigns? ===&lt;br /&gt;
Choose &amp;quot;Campaigns&amp;quot; in the main Wesnoth menu. Then scroll down to the bottom and choose &amp;quot;Get More Campaigns...&amp;quot; or since 1.1.5 there is a &amp;quot;Get add-ons&amp;quot; button in the main menu. This connects you to the campaign server. In the campaign server you can view a list of all available campaigns and download them, as well as posting or deleting your own campaigns.&lt;br /&gt;
&lt;br /&gt;
If you are behind a firewall you may not be able to connect to the campaign server.  In this case try to download the campaign directly from the campaign server at http://addons.wesnoth.org/. If you know how to change your firewall settings, then you should open port 15003 (version 1.1.1 and up) or port 15002 (versions 1.1.0 and lower).  For added security, you can restrict traffic over those ports to the campaign server's IP address (currently 88.191.12.200).&lt;br /&gt;
&lt;br /&gt;
=== Are there any tools to help me create maps and scenarios? ===&lt;br /&gt;
Yes, the game includes a built-in map editor, that you can use to build the terrain maps for your scenarios.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, there's no simple solution for creating the rest of what constitutes a complete scenario or campaign, which is the [[ReferenceWML|WML]] code. There have been some abandoned attempts at creating complete scenario editors such as [[CampGen]], but they are no longer maintained, nor do they work with the latest stable versions of the game.&lt;br /&gt;
&lt;br /&gt;
You should take a look at the [[Create]] section for information and guides that can help you build your own scenario or campaign. Taking a look at how existing content works is also a good idea.&lt;br /&gt;
&lt;br /&gt;
=== What are the .cfg files and how can I edit them? ===&lt;br /&gt;
&lt;br /&gt;
The .cfg files are plain text files, saved with the file extension &amp;quot;.cfg&amp;quot;. You can create and edit them using normal text editors; just save the files in correct format.&lt;br /&gt;
&lt;br /&gt;
Please note that some Windows programs like to add a &amp;quot;.txt&amp;quot; extension, so the file is instead of &amp;quot;my_scenario.cfg&amp;quot; saved as &amp;quot;my_scenario.cfg.txt&amp;quot;. And then the Windows Explorer will hide the &amp;quot;.txt&amp;quot; extension by default, so you may not notice it.&lt;br /&gt;
&lt;br /&gt;
'''Notepad''': After you create a document, click &amp;quot;File&amp;quot;, &amp;quot;Save as...&amp;quot; and select &amp;quot;Save as type: All files&amp;quot;. To open the document, click &amp;quot;File&amp;quot;, &amp;quot;Open...&amp;quot; and select &amp;quot;Files of type: All files (*.*)&amp;quot;. If you open someone else's document, and the end-of-line symbols are displayed as small rectangles, you have to use another editor.&lt;br /&gt;
&lt;br /&gt;
'''WordPad''': After you create a document, click &amp;quot;File&amp;quot;, &amp;quot;Save as...&amp;quot; and select &amp;quot;Save as type: Text Document&amp;quot;. After the document is saved, close WordPad and remove the &amp;quot;.txt&amp;quot; extension from file. To open the document, click &amp;quot;File&amp;quot;, &amp;quot;Open...&amp;quot; and select &amp;quot;Files of type: All documents (*.*)&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Starting with the 1.9.x branch, there is a new IDE for helping User Made Content Authors to easily develop Wesnoth Add-ons. The website and details can be found at: http://eclipse.wesnoth.org&lt;br /&gt;
&lt;br /&gt;
=== I already created an add-on and published it on the server. How can I get translations for the campaign? ===&lt;br /&gt;
Just have a look at [[WesCamp]]. This project is the easiest way to get translations for your campaign. All the info you need you can find at [[WesCamp]].&lt;br /&gt;
&lt;br /&gt;
===How do I place an object or unit on my map with the map editor?===&lt;br /&gt;
You can't.  You need to make a scenario file.  There are more details on the [[BuildingMaps|maps]] page.&lt;br /&gt;
&lt;br /&gt;
== Multiplayer ==&lt;br /&gt;
&lt;br /&gt;
===How do I connect to a multiplayer server, when I sit behind a restrictive firewall?===&lt;br /&gt;
&lt;br /&gt;
You have to open outgoing TCP port 15000 - 14997 (depending on the version you use) to play multiplayer games over the internet on the official servers.&lt;br /&gt;
&lt;br /&gt;
===How to find players for multiplayer game?===&lt;br /&gt;
Hang around for a while on multiplayer servers and you might find someone to play with. If you observe other people playing you will get informed when someone joins the servers. Maybe you find someone willing to play in the [[Support#IRC|IRC]] channel dedicated to Wesnoth, #wesnoth at irc.freenode.net.&lt;br /&gt;
&lt;br /&gt;
===How to save and load a multiplayer game===&lt;br /&gt;
&lt;br /&gt;
Save the game. Give it a good name, so that you can find it among the other saved games.&lt;br /&gt;
&lt;br /&gt;
Create new game. (Give it a name like &amp;quot;private game for X and Y&amp;quot;, so that other players will not try joining it, and you do not have to explain or kick them.) The first item in the map/scenario list is &amp;quot;Saved games&amp;quot;, select this. Choose the saved game. Wait for the other player(s) to connect. Start the game.&lt;br /&gt;
&lt;br /&gt;
===How can I make my computer into a dedicated Wesnoth server?===&lt;br /&gt;
&lt;br /&gt;
To setup a dedicated Wesnoth server, you have to compile the game with the &amp;quot;--enable-server&amp;quot; flag, and after you install, simply run wesnothd from the console.  This will start the server, listening on TCP port 15000.  To compile the server only you can use the flags &amp;quot;--disable-game --enable-server&amp;quot;.  If you aren't using a linux or mac operating system, there are a few ways you can compile on Windows... [[CompilingWesnoth/CrossCompiling|here is one way]].&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Packages for Wesnoth 1.4 and later include wesnothd by default since it's required by the &amp;quot;Host a network game&amp;quot; option from the Multiplayer menu, which is the preferred option for temporarily hosting a server instance to play in a LAN or privately through the Internet.&lt;br /&gt;
&lt;br /&gt;
===Which versions of Wesnoth can play together?===&lt;br /&gt;
&lt;br /&gt;
You only need to make sure you are using the same minor version number (6 in &amp;quot;1.6.x&amp;quot;, 8 in &amp;quot;1.8.x&amp;quot; and so on) corresponding to stable branch releases. If you are using a development release (odd minor version numbers), you must be using exactly the same version number as other clients, to avoid out-of-sync (OOS) issues in multiplayer.&lt;br /&gt;
&lt;br /&gt;
If you are using user-made eras or MP scenarios, all players should make sure they are using the same, latest version of the add-on.&lt;br /&gt;
&lt;br /&gt;
== Translations ==&lt;br /&gt;
&lt;br /&gt;
===Where can I find more information about translating Wesnoth?===&lt;br /&gt;
See [[WesnothTranslations]] for a list of currently maintained projects, and methods for contacting their maintainers and volunteering for help, and instructions for starting your own translation if it isn't included in the game already. [http://gettext.wesnoth.org] shows the current progress translations for different game development and stable branches, mainline campaigns and user-made add-ons.&lt;br /&gt;
&lt;br /&gt;
== Other Questions You Have ==&lt;br /&gt;
&lt;br /&gt;
The best way to get answers to less-frequently asked questions is by visiting the official [http://forums.wesnoth.org Battle for Wesnoth forums]. There are plenty of people willing to help.  Make sure you read ALL of the forum sticky notes and announcements before posting!&lt;br /&gt;
&lt;br /&gt;
[[Category:Troubleshooting and Bugs]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=FAQ&amp;diff=56444</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=FAQ&amp;diff=56444"/>
		<updated>2015-06-22T17:12:01Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* What are the system requirements? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FAQ/Translations}}&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
===What is Battle for Wesnoth?===&lt;br /&gt;
Battle for Wesnoth is a turn-based tactical strategy game with a high fantasy theme, featuring both single-player, and online/hotseat multiplayer combat.&lt;br /&gt;
&lt;br /&gt;
===What license is the game distributed under?===&lt;br /&gt;
The project is distributed under the [http://www.fsf.org/copyleft/gpl.html GPL]. All contributors retain copyright on the portions of the project that they contribute. For more information, see [[Wesnoth:Copyrights]].&lt;br /&gt;
&lt;br /&gt;
===How to get informed about new releases?===&lt;br /&gt;
Check the front page of the website.&lt;br /&gt;
&lt;br /&gt;
===A new version is out, but where is the download for [Windows, Mac OS X, etc.]?===&lt;br /&gt;
The packages provided, other than the source code tarball, are '''not''' part of the official project.  The BfW team only releases the game's source code.  Binary executables or applications are always contributed by community volunteers.  If not for these volunteers, there would never be any downloads for us to enjoy.  The volunteers compile the game and upload it on their own time, and sometimes they cannot do this in a timely fashion (or at all, at times).  Although there are usual packagers designated for each operating system, there are times when other members of the community are asked to step in and contribute when the usual people cannot.&lt;br /&gt;
&lt;br /&gt;
Every time a new version is released, the usual volunteers are notified by the project leaders.  '''Please refrain from making forum posts asking where your download is''' because it doesn't help anything - the packagers already know, and they will get to it as soon as they can.  In the past, the Windows and Mac communities have come together to produce home-grown unofficial builds for the community to use, and the renewed interest in community and learning how to compile is generally a good thing.&lt;br /&gt;
&lt;br /&gt;
===Why doesn't Wesnoth have my favorite feature?===&lt;br /&gt;
Because we are building this game for ourselves, to suit our own preferences. We're not building the game for you, in large part because this is our hobby, not our job; whether you like it or not is immaterial to us.&lt;br /&gt;
You may wonder, then, what the point is of soliciting ideas, as we do on the forum.  We, the developers, have certainly come up with many good ideas on our own, but our players often do as well, and generally ones we don't think of ourselves.  If a player comes up with an idea we like, we might implement it.  Not because they asked for it, but because of its own merits as an addition to our game.&lt;br /&gt;
&lt;br /&gt;
The beautiful thing about the license our game is distributed under, as compared to closed-source, commercial games, is that if you want that feature badly enough, you can take the code and art of our game and modify it yourself; you are free to re-use any work in Wesnoth, as long as you follow the rules of the [http://www.fsf.org/copyleft/gpl.html GPL].  From this, you can build a game exactly the way that you like. Just don't expect us to build that game for you.  Building this game is our hobby, not our profession, and you did not pay us to make it; rather, we are the ones who have paid for it, in time and labor.&lt;br /&gt;
&lt;br /&gt;
===Do you want help making this game? How can I help?===&lt;br /&gt;
Yes, we want your help. Whether you're a programmer, artist, musician, writer, translator, level designer, playtester, or just have some great suggestions, you're welcome to contribute. How?  You can:&lt;br /&gt;
* join the [http://www.wesnoth.org/wiki/Project project]&lt;br /&gt;
* share your opinions at the [http://www.wesnoth.org/forum/ Forum]&lt;br /&gt;
* talk with us on [[Support#IRC|IRC]]&lt;br /&gt;
* [[ReportingBugs|report]] bugs you find with Wesnoth and its mainline content&lt;br /&gt;
* update the wiki&lt;br /&gt;
* play against other players via the [[GettingStarted#Multiplayer|Multiplayer]] menu&lt;br /&gt;
* vote for Wesnoth at your favorite gaming web site&lt;br /&gt;
* spread the word!&lt;br /&gt;
&lt;br /&gt;
=== What are the system requirements? ===&lt;br /&gt;
'''outdated!'''&lt;br /&gt;
We are not completely certain, but an x86 running at 400 MHz with 128 MB RAM should be adequate for versions 1.0.2 and below. For versions 1.1 and up we recommend a computer with at least 1 GHz and 512 MB RAM if you run KDE or Gnome as Windowmanager (The game itself needs about 100 MB RAM). Slower machines will have trouble scrolling large maps or processing AI turns with many units.  See the [http://www.wesnoth.org/forum/viewtopic.php?t=7384 forum thread] about minimum and recommended system requirements.&lt;br /&gt;
&lt;br /&gt;
'''update'''&lt;br /&gt;
I happened to set up a 1GHz 512MB RAM machine with win xp and a GeForce2 MX/MX 400 with corresponding drivers. This is hardware from about 2000. Scrolling the map is jumpy, but not much, and multiplayer in wesnoth 1.12.3+dev, Isar's Cross, runs fine otherwise. Of course, make sure you reserve as much resources for wesnoth as possible, deactivate animated map and standing animations, and don't have too many AI units on the map. I've played wesnoth on a weaker machine too and would call the above a recommended minimum for enjoyable play. Alternatively, use a lightweight Linux distro. -anonymissimus, June 2015&lt;br /&gt;
&lt;br /&gt;
=== I'm bored; how do I speed the game up? ===&lt;br /&gt;
&lt;br /&gt;
There are several preferences you can change to shorten the time that the AI takes to make its moves. &amp;quot;Accelerated Speed&amp;quot; will make units move and fight faster. &amp;quot;Skip AI Moves&amp;quot; will not show the AI's units moving from hex to hex. Finally, you can turn off all combat animations via the &amp;quot;Show Combat&amp;quot; option on the Advanced tab.&lt;br /&gt;
&lt;br /&gt;
=== My computer is too slow; how do I speed the game up? ===&lt;br /&gt;
&lt;br /&gt;
First, turn off the music and sound effects. Turning off the color cursors will make your cursor respond faster. If scrolling the map is slow, run the game in &amp;quot;Full Screen&amp;quot; mode, not in a window.  Turn off combat, map, and standing unit animations via the &amp;quot;Show Combat&amp;quot;, &amp;quot;Animate Map&amp;quot; and &amp;quot;Unit Standing Animations&amp;quot; options on the Advanced tab in the game Preferences. You can try turning off halos and combat results, but this might make gameplay more difficult.&lt;br /&gt;
For some tips on tweaking the startup, see [[CustomizingStartup]].&lt;br /&gt;
&lt;br /&gt;
== Gameplay and Controls ==&lt;br /&gt;
&lt;br /&gt;
=== How do I learn to play? ===&lt;br /&gt;
&lt;br /&gt;
If you just want to jump right in, start the game and play the tutorial.  If you like reading documentation, see [[WesnothManual]].  At any time while playing, you can select help from the menu button (or hit F1). The online help is quite extensive and provides information on terrains, weapons, traits, abilities, units and a good overview of how to play.&lt;br /&gt;
&lt;br /&gt;
=== My unit leveled up but didn't improve. What happened? ===&lt;br /&gt;
&lt;br /&gt;
This is called &amp;quot;After Maximum Level Advancement&amp;quot; or AMLA for short. While most level 0, 1, and 2 units can advance, some cannot.  However, some level 3 units can advance to level 4, or even 5. You can see whether a unit can advance further by right clicking and selecting &amp;quot;description.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
After a unit reaches the highest level it can get, every time it reaches a new experience threshold (which increases with each advancement) it gains 3 hitpoints and is restored to a state of full health. This is a minor bonus so that experience gained by maxed out units is not altogether wasted. It is generally better to give experience to lower level units, rather than continue to advance units that have reached their maximum level.&lt;br /&gt;
&lt;br /&gt;
=== I tried to trap an enemy with several weak units, but it still escaped. What happened? ===&lt;br /&gt;
&lt;br /&gt;
Most units exert a zone of control (or ZoC).  If an enemy moves into one of the six adjacent hexes, the zone of control will prevent it from moving any farther.  However some weak units are level 0, meaning they are so weak that they do not have a ZoC. You can still surround an enemy unit entirely with level 0 units to keep it from escaping, but if there is any gap in your ranks, it could escape.&lt;br /&gt;
&lt;br /&gt;
Also, some units have the &amp;quot;skirmish&amp;quot; ability, which allows them to ignore ZoCs.&lt;br /&gt;
&lt;br /&gt;
=== How can I see where an enemy unit can move next turn? ===&lt;br /&gt;
&lt;br /&gt;
During your turn you can click on an enemy unit. Wesnoth will highlight all the hexes the unit can move to in the next turn. This is useful when trying to arrange your units to block an enemy's movement.&lt;br /&gt;
&lt;br /&gt;
=== There's too much luck in this game! ===&lt;br /&gt;
&lt;br /&gt;
Sooner or later, you will become frustrated when your archmage with four 70% attacks misses all four times.  This does not mean that the AI is cheating or the random number generator is futzed.  It means you are noticing random negative events more than positive ones.  During the development of the game, many mathematicians have done sophisticated statistical analysis of the combat system.  Likewise, programmers have examined the random number generator.  No flaws have been found, so streaks of &amp;quot;bad&amp;quot; and &amp;quot;good&amp;quot; luck should just be accepted as part of having randomness in Wesnoth.  A more detailed rational and discussion of the role that randomness plays in Wesnoth can be found [http://www.wesnoth.org/forum/viewtopic.php?f=6&amp;amp;t=21317&amp;amp;start=0&amp;amp;st=0&amp;amp;sk=t&amp;amp;sd=a here].&lt;br /&gt;
&lt;br /&gt;
Since Wesnoth is GPLed, it is possible that a new development team will someday &amp;quot;fork&amp;quot; the source and produce a version more like Heroes of Might &amp;amp; Magic, with less or no randomness.  Until then, don't charge with your horsemen against troll rocklobbers at night...&lt;br /&gt;
&lt;br /&gt;
=== The (random unit) is overpowered/underpowered! ===&lt;br /&gt;
&lt;br /&gt;
The development team has spent years tweaking the units in the game.  Each unit has had its gold cost, attack types, combat damage, defensive values, resistances, upgrade paths, and other stats carefully scrutinized and loudly discussed in the forum.  However, the game code and the units were being modified right up until the 1.0 release, so some unbalanced units may have slipped through.&lt;br /&gt;
&lt;br /&gt;
If you have evidence to back up your claim, search the forum for past discussions about this unit, and then try posting.&lt;br /&gt;
&lt;br /&gt;
=== The (random scenario) is too hard/easy! ===&lt;br /&gt;
&lt;br /&gt;
See above answer about random units.&lt;br /&gt;
&lt;br /&gt;
=== What do the different difficulty levels do? ===&lt;br /&gt;
&lt;br /&gt;
That depends on the scenario. Usually, the opponent will get more money and be able to recruit higher-level units at higher difficulty levels, and you will have fewer turns available.&lt;br /&gt;
&lt;br /&gt;
== Maps, Scenarios and Campaigns ==&lt;br /&gt;
&lt;br /&gt;
=== How do I beat scenario _______ ? ===&lt;br /&gt;
&lt;br /&gt;
If you are stuck on a scenario in a campaign, you'll probably find a walkthrough at [[MainlineCampaigns]].  Or check out the &amp;quot;Strategies and Tips&amp;quot; forum at http://www.wesnoth.org/forum/viewforum.php?f=3&lt;br /&gt;
&lt;br /&gt;
=== How do I download user campaigns? ===&lt;br /&gt;
Choose &amp;quot;Campaigns&amp;quot; in the main Wesnoth menu. Then scroll down to the bottom and choose &amp;quot;Get More Campaigns...&amp;quot; or since 1.1.5 there is a &amp;quot;Get add-ons&amp;quot; button in the main menu. This connects you to the campaign server. In the campaign server you can view a list of all available campaigns and download them, as well as posting or deleting your own campaigns.&lt;br /&gt;
&lt;br /&gt;
If you are behind a firewall you may not be able to connect to the campaign server.  In this case try to download the campaign directly from the campaign server at http://addons.wesnoth.org/. If you know how to change your firewall settings, then you should open port 15003 (version 1.1.1 and up) or port 15002 (versions 1.1.0 and lower).  For added security, you can restrict traffic over those ports to the campaign server's IP address (currently 88.191.12.200).&lt;br /&gt;
&lt;br /&gt;
=== Are there any tools to help me create maps and scenarios? ===&lt;br /&gt;
Yes, the game includes a built-in map editor, that you can use to build the terrain maps for your scenarios.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, there's no simple solution for creating the rest of what constitutes a complete scenario or campaign, which is the [[ReferenceWML|WML]] code. There have been some abandoned attempts at creating complete scenario editors such as [[CampGen]], but they are no longer maintained, nor do they work with the latest stable versions of the game.&lt;br /&gt;
&lt;br /&gt;
You should take a look at the [[Create]] section for information and guides that can help you build your own scenario or campaign. Taking a look at how existing content works is also a good idea.&lt;br /&gt;
&lt;br /&gt;
=== What are the .cfg files and how can I edit them? ===&lt;br /&gt;
&lt;br /&gt;
The .cfg files are plain text files, saved with the file extension &amp;quot;.cfg&amp;quot;. You can create and edit them using normal text editors; just save the files in correct format.&lt;br /&gt;
&lt;br /&gt;
Please note that some Windows programs like to add a &amp;quot;.txt&amp;quot; extension, so the file is instead of &amp;quot;my_scenario.cfg&amp;quot; saved as &amp;quot;my_scenario.cfg.txt&amp;quot;. And then the Windows Explorer will hide the &amp;quot;.txt&amp;quot; extension by default, so you may not notice it.&lt;br /&gt;
&lt;br /&gt;
'''Notepad''': After you create a document, click &amp;quot;File&amp;quot;, &amp;quot;Save as...&amp;quot; and select &amp;quot;Save as type: All files&amp;quot;. To open the document, click &amp;quot;File&amp;quot;, &amp;quot;Open...&amp;quot; and select &amp;quot;Files of type: All files (*.*)&amp;quot;. If you open someone else's document, and the end-of-line symbols are displayed as small rectangles, you have to use another editor.&lt;br /&gt;
&lt;br /&gt;
'''WordPad''': After you create a document, click &amp;quot;File&amp;quot;, &amp;quot;Save as...&amp;quot; and select &amp;quot;Save as type: Text Document&amp;quot;. After the document is saved, close WordPad and remove the &amp;quot;.txt&amp;quot; extension from file. To open the document, click &amp;quot;File&amp;quot;, &amp;quot;Open...&amp;quot; and select &amp;quot;Files of type: All documents (*.*)&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Starting with the 1.9.x branch, there is a new IDE for helping User Made Content Authors to easily develop Wesnoth Add-ons. The website and details can be found at: http://eclipse.wesnoth.org&lt;br /&gt;
&lt;br /&gt;
=== I already created an add-on and published it on the server. How can I get translations for the campaign? ===&lt;br /&gt;
Just have a look at [[WesCamp]]. This project is the easiest way to get translations for your campaign. All the info you need you can find at [[WesCamp]].&lt;br /&gt;
&lt;br /&gt;
===How do I place an object or unit on my map with the map editor?===&lt;br /&gt;
You can't.  You need to make a scenario file.  There are more details on the [[BuildingMaps|maps]] page.&lt;br /&gt;
&lt;br /&gt;
== Multiplayer ==&lt;br /&gt;
&lt;br /&gt;
===How do I connect to a multiplayer server, when I sit behind a restrictive firewall?===&lt;br /&gt;
&lt;br /&gt;
You have to open outgoing TCP port 15000 - 14997 (depending on the version you use) to play multiplayer games over the internet on the official servers.&lt;br /&gt;
&lt;br /&gt;
===How to find players for multiplayer game?===&lt;br /&gt;
Hang around for a while on multiplayer servers and you might find someone to play with. If you observe other people playing you will get informed when someone joins the servers. Maybe you find someone willing to play in the [[Support#IRC|IRC]] channel dedicated to Wesnoth, #wesnoth at irc.freenode.net.&lt;br /&gt;
&lt;br /&gt;
===How to save and load a multiplayer game===&lt;br /&gt;
&lt;br /&gt;
Save the game. Give it a good name, so that you can find it among the other saved games.&lt;br /&gt;
&lt;br /&gt;
Create new game. (Give it a name like &amp;quot;private game for X and Y&amp;quot;, so that other players will not try joining it, and you do not have to explain or kick them.) The first item in the map/scenario list is &amp;quot;Saved games&amp;quot;, select this. Choose the saved game. Wait for the other player(s) to connect. Start the game.&lt;br /&gt;
&lt;br /&gt;
===How can I make my computer into a dedicated Wesnoth server?===&lt;br /&gt;
&lt;br /&gt;
To setup a dedicated Wesnoth server, you have to compile the game with the &amp;quot;--enable-server&amp;quot; flag, and after you install, simply run wesnothd from the console.  This will start the server, listening on TCP port 15000.  To compile the server only you can use the flags &amp;quot;--disable-game --enable-server&amp;quot;.  If you aren't using a linux or mac operating system, there are a few ways you can compile on Windows... [[CompilingWesnoth/CrossCompiling|here is one way]].&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Packages for Wesnoth 1.4 and later include wesnothd by default since it's required by the &amp;quot;Host a network game&amp;quot; option from the Multiplayer menu, which is the preferred option for temporarily hosting a server instance to play in a LAN or privately through the Internet.&lt;br /&gt;
&lt;br /&gt;
===Which versions of Wesnoth can play together?===&lt;br /&gt;
&lt;br /&gt;
You only need to make sure you are using the same minor version number (6 in &amp;quot;1.6.x&amp;quot;, 8 in &amp;quot;1.8.x&amp;quot; and so on) corresponding to stable branch releases. If you are using a development release (odd minor version numbers), you must be using exactly the same version number as other clients, to avoid out-of-sync (OOS) issues in multiplayer.&lt;br /&gt;
&lt;br /&gt;
If you are using user-made eras or MP scenarios, all players should make sure they are using the same, latest version of the add-on.&lt;br /&gt;
&lt;br /&gt;
== Translations ==&lt;br /&gt;
&lt;br /&gt;
===Where can I find more information about translating Wesnoth?===&lt;br /&gt;
See [[WesnothTranslations]] for a list of currently maintained projects, and methods for contacting their maintainers and volunteering for help, and instructions for starting your own translation if it isn't included in the game already. [http://gettext.wesnoth.org] shows the current progress translations for different game development and stable branches, mainline campaigns and user-made add-ons.&lt;br /&gt;
&lt;br /&gt;
== Other Questions You Have ==&lt;br /&gt;
&lt;br /&gt;
The best way to get answers to less-frequently asked questions is by visiting the official [http://forums.wesnoth.org Battle for Wesnoth forums]. There are plenty of people willing to help.  Make sure you read ALL of the forum sticky notes and announcements before posting!&lt;br /&gt;
&lt;br /&gt;
[[Category:Troubleshooting and Bugs]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=FAQ&amp;diff=56443</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=FAQ&amp;diff=56443"/>
		<updated>2015-06-22T14:28:09Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* What are the system requirements? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FAQ/Translations}}&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
===What is Battle for Wesnoth?===&lt;br /&gt;
Battle for Wesnoth is a turn-based tactical strategy game with a high fantasy theme, featuring both single-player, and online/hotseat multiplayer combat.&lt;br /&gt;
&lt;br /&gt;
===What license is the game distributed under?===&lt;br /&gt;
The project is distributed under the [http://www.fsf.org/copyleft/gpl.html GPL]. All contributors retain copyright on the portions of the project that they contribute. For more information, see [[Wesnoth:Copyrights]].&lt;br /&gt;
&lt;br /&gt;
===How to get informed about new releases?===&lt;br /&gt;
Check the front page of the website.&lt;br /&gt;
&lt;br /&gt;
===A new version is out, but where is the download for [Windows, Mac OS X, etc.]?===&lt;br /&gt;
The packages provided, other than the source code tarball, are '''not''' part of the official project.  The BfW team only releases the game's source code.  Binary executables or applications are always contributed by community volunteers.  If not for these volunteers, there would never be any downloads for us to enjoy.  The volunteers compile the game and upload it on their own time, and sometimes they cannot do this in a timely fashion (or at all, at times).  Although there are usual packagers designated for each operating system, there are times when other members of the community are asked to step in and contribute when the usual people cannot.&lt;br /&gt;
&lt;br /&gt;
Every time a new version is released, the usual volunteers are notified by the project leaders.  '''Please refrain from making forum posts asking where your download is''' because it doesn't help anything - the packagers already know, and they will get to it as soon as they can.  In the past, the Windows and Mac communities have come together to produce home-grown unofficial builds for the community to use, and the renewed interest in community and learning how to compile is generally a good thing.&lt;br /&gt;
&lt;br /&gt;
===Why doesn't Wesnoth have my favorite feature?===&lt;br /&gt;
Because we are building this game for ourselves, to suit our own preferences. We're not building the game for you, in large part because this is our hobby, not our job; whether you like it or not is immaterial to us.&lt;br /&gt;
You may wonder, then, what the point is of soliciting ideas, as we do on the forum.  We, the developers, have certainly come up with many good ideas on our own, but our players often do as well, and generally ones we don't think of ourselves.  If a player comes up with an idea we like, we might implement it.  Not because they asked for it, but because of its own merits as an addition to our game.&lt;br /&gt;
&lt;br /&gt;
The beautiful thing about the license our game is distributed under, as compared to closed-source, commercial games, is that if you want that feature badly enough, you can take the code and art of our game and modify it yourself; you are free to re-use any work in Wesnoth, as long as you follow the rules of the [http://www.fsf.org/copyleft/gpl.html GPL].  From this, you can build a game exactly the way that you like. Just don't expect us to build that game for you.  Building this game is our hobby, not our profession, and you did not pay us to make it; rather, we are the ones who have paid for it, in time and labor.&lt;br /&gt;
&lt;br /&gt;
===Do you want help making this game? How can I help?===&lt;br /&gt;
Yes, we want your help. Whether you're a programmer, artist, musician, writer, translator, level designer, playtester, or just have some great suggestions, you're welcome to contribute. How?  You can:&lt;br /&gt;
* join the [http://www.wesnoth.org/wiki/Project project]&lt;br /&gt;
* share your opinions at the [http://www.wesnoth.org/forum/ Forum]&lt;br /&gt;
* talk with us on [[Support#IRC|IRC]]&lt;br /&gt;
* [[ReportingBugs|report]] bugs you find with Wesnoth and its mainline content&lt;br /&gt;
* update the wiki&lt;br /&gt;
* play against other players via the [[GettingStarted#Multiplayer|Multiplayer]] menu&lt;br /&gt;
* vote for Wesnoth at your favorite gaming web site&lt;br /&gt;
* spread the word!&lt;br /&gt;
&lt;br /&gt;
=== What are the system requirements? ===&lt;br /&gt;
'''outdated!'''&lt;br /&gt;
We are not completely certain, but an x86 running at 400 MHz with 128 MB RAM should be adequate for versions 1.0.2 and below. For versions 1.1 and up we recommend a computer with at least 1 GHz and 512 MB RAM if you run KDE or Gnome as Windowmanager (The game itself needs about 100 MB RAM). Slower machines will have trouble scrolling large maps or processing AI turns with many units.  See the [http://www.wesnoth.org/forum/viewtopic.php?t=7384 forum thread] about minimum and recommended system requirements.&lt;br /&gt;
&lt;br /&gt;
'''update'''&lt;br /&gt;
I happened to set up a 1GHz 512MB RAM machine with win xp and a GeForce2 MX/MX 400 with corresponding drivers. This is hardware from about 2000. Scrolling the map is jumpy, but multiplayer in wesnoth 1.12.3+dev, Isar's Cross, runs fine otherwise. Of course, make sure you reserve as much resources for wesnoth as possible, deactivate animated map and standing animations, and don't have too many AI units on the map. -anonymissimus, June 2015&lt;br /&gt;
&lt;br /&gt;
=== I'm bored; how do I speed the game up? ===&lt;br /&gt;
&lt;br /&gt;
There are several preferences you can change to shorten the time that the AI takes to make its moves. &amp;quot;Accelerated Speed&amp;quot; will make units move and fight faster. &amp;quot;Skip AI Moves&amp;quot; will not show the AI's units moving from hex to hex. Finally, you can turn off all combat animations via the &amp;quot;Show Combat&amp;quot; option on the Advanced tab.&lt;br /&gt;
&lt;br /&gt;
=== My computer is too slow; how do I speed the game up? ===&lt;br /&gt;
&lt;br /&gt;
First, turn off the music and sound effects. Turning off the color cursors will make your cursor respond faster. If scrolling the map is slow, run the game in &amp;quot;Full Screen&amp;quot; mode, not in a window.  Turn off combat, map, and standing unit animations via the &amp;quot;Show Combat&amp;quot;, &amp;quot;Animate Map&amp;quot; and &amp;quot;Unit Standing Animations&amp;quot; options on the Advanced tab in the game Preferences. You can try turning off halos and combat results, but this might make gameplay more difficult.&lt;br /&gt;
For some tips on tweaking the startup, see [[CustomizingStartup]].&lt;br /&gt;
&lt;br /&gt;
== Gameplay and Controls ==&lt;br /&gt;
&lt;br /&gt;
=== How do I learn to play? ===&lt;br /&gt;
&lt;br /&gt;
If you just want to jump right in, start the game and play the tutorial.  If you like reading documentation, see [[WesnothManual]].  At any time while playing, you can select help from the menu button (or hit F1). The online help is quite extensive and provides information on terrains, weapons, traits, abilities, units and a good overview of how to play.&lt;br /&gt;
&lt;br /&gt;
=== My unit leveled up but didn't improve. What happened? ===&lt;br /&gt;
&lt;br /&gt;
This is called &amp;quot;After Maximum Level Advancement&amp;quot; or AMLA for short. While most level 0, 1, and 2 units can advance, some cannot.  However, some level 3 units can advance to level 4, or even 5. You can see whether a unit can advance further by right clicking and selecting &amp;quot;description.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
After a unit reaches the highest level it can get, every time it reaches a new experience threshold (which increases with each advancement) it gains 3 hitpoints and is restored to a state of full health. This is a minor bonus so that experience gained by maxed out units is not altogether wasted. It is generally better to give experience to lower level units, rather than continue to advance units that have reached their maximum level.&lt;br /&gt;
&lt;br /&gt;
=== I tried to trap an enemy with several weak units, but it still escaped. What happened? ===&lt;br /&gt;
&lt;br /&gt;
Most units exert a zone of control (or ZoC).  If an enemy moves into one of the six adjacent hexes, the zone of control will prevent it from moving any farther.  However some weak units are level 0, meaning they are so weak that they do not have a ZoC. You can still surround an enemy unit entirely with level 0 units to keep it from escaping, but if there is any gap in your ranks, it could escape.&lt;br /&gt;
&lt;br /&gt;
Also, some units have the &amp;quot;skirmish&amp;quot; ability, which allows them to ignore ZoCs.&lt;br /&gt;
&lt;br /&gt;
=== How can I see where an enemy unit can move next turn? ===&lt;br /&gt;
&lt;br /&gt;
During your turn you can click on an enemy unit. Wesnoth will highlight all the hexes the unit can move to in the next turn. This is useful when trying to arrange your units to block an enemy's movement.&lt;br /&gt;
&lt;br /&gt;
=== There's too much luck in this game! ===&lt;br /&gt;
&lt;br /&gt;
Sooner or later, you will become frustrated when your archmage with four 70% attacks misses all four times.  This does not mean that the AI is cheating or the random number generator is futzed.  It means you are noticing random negative events more than positive ones.  During the development of the game, many mathematicians have done sophisticated statistical analysis of the combat system.  Likewise, programmers have examined the random number generator.  No flaws have been found, so streaks of &amp;quot;bad&amp;quot; and &amp;quot;good&amp;quot; luck should just be accepted as part of having randomness in Wesnoth.  A more detailed rational and discussion of the role that randomness plays in Wesnoth can be found [http://www.wesnoth.org/forum/viewtopic.php?f=6&amp;amp;t=21317&amp;amp;start=0&amp;amp;st=0&amp;amp;sk=t&amp;amp;sd=a here].&lt;br /&gt;
&lt;br /&gt;
Since Wesnoth is GPLed, it is possible that a new development team will someday &amp;quot;fork&amp;quot; the source and produce a version more like Heroes of Might &amp;amp; Magic, with less or no randomness.  Until then, don't charge with your horsemen against troll rocklobbers at night...&lt;br /&gt;
&lt;br /&gt;
=== The (random unit) is overpowered/underpowered! ===&lt;br /&gt;
&lt;br /&gt;
The development team has spent years tweaking the units in the game.  Each unit has had its gold cost, attack types, combat damage, defensive values, resistances, upgrade paths, and other stats carefully scrutinized and loudly discussed in the forum.  However, the game code and the units were being modified right up until the 1.0 release, so some unbalanced units may have slipped through.&lt;br /&gt;
&lt;br /&gt;
If you have evidence to back up your claim, search the forum for past discussions about this unit, and then try posting.&lt;br /&gt;
&lt;br /&gt;
=== The (random scenario) is too hard/easy! ===&lt;br /&gt;
&lt;br /&gt;
See above answer about random units.&lt;br /&gt;
&lt;br /&gt;
=== What do the different difficulty levels do? ===&lt;br /&gt;
&lt;br /&gt;
That depends on the scenario. Usually, the opponent will get more money and be able to recruit higher-level units at higher difficulty levels, and you will have fewer turns available.&lt;br /&gt;
&lt;br /&gt;
== Maps, Scenarios and Campaigns ==&lt;br /&gt;
&lt;br /&gt;
=== How do I beat scenario _______ ? ===&lt;br /&gt;
&lt;br /&gt;
If you are stuck on a scenario in a campaign, you'll probably find a walkthrough at [[MainlineCampaigns]].  Or check out the &amp;quot;Strategies and Tips&amp;quot; forum at http://www.wesnoth.org/forum/viewforum.php?f=3&lt;br /&gt;
&lt;br /&gt;
=== How do I download user campaigns? ===&lt;br /&gt;
Choose &amp;quot;Campaigns&amp;quot; in the main Wesnoth menu. Then scroll down to the bottom and choose &amp;quot;Get More Campaigns...&amp;quot; or since 1.1.5 there is a &amp;quot;Get add-ons&amp;quot; button in the main menu. This connects you to the campaign server. In the campaign server you can view a list of all available campaigns and download them, as well as posting or deleting your own campaigns.&lt;br /&gt;
&lt;br /&gt;
If you are behind a firewall you may not be able to connect to the campaign server.  In this case try to download the campaign directly from the campaign server at http://addons.wesnoth.org/. If you know how to change your firewall settings, then you should open port 15003 (version 1.1.1 and up) or port 15002 (versions 1.1.0 and lower).  For added security, you can restrict traffic over those ports to the campaign server's IP address (currently 88.191.12.200).&lt;br /&gt;
&lt;br /&gt;
=== Are there any tools to help me create maps and scenarios? ===&lt;br /&gt;
Yes, the game includes a built-in map editor, that you can use to build the terrain maps for your scenarios.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, there's no simple solution for creating the rest of what constitutes a complete scenario or campaign, which is the [[ReferenceWML|WML]] code. There have been some abandoned attempts at creating complete scenario editors such as [[CampGen]], but they are no longer maintained, nor do they work with the latest stable versions of the game.&lt;br /&gt;
&lt;br /&gt;
You should take a look at the [[Create]] section for information and guides that can help you build your own scenario or campaign. Taking a look at how existing content works is also a good idea.&lt;br /&gt;
&lt;br /&gt;
=== What are the .cfg files and how can I edit them? ===&lt;br /&gt;
&lt;br /&gt;
The .cfg files are plain text files, saved with the file extension &amp;quot;.cfg&amp;quot;. You can create and edit them using normal text editors; just save the files in correct format.&lt;br /&gt;
&lt;br /&gt;
Please note that some Windows programs like to add a &amp;quot;.txt&amp;quot; extension, so the file is instead of &amp;quot;my_scenario.cfg&amp;quot; saved as &amp;quot;my_scenario.cfg.txt&amp;quot;. And then the Windows Explorer will hide the &amp;quot;.txt&amp;quot; extension by default, so you may not notice it.&lt;br /&gt;
&lt;br /&gt;
'''Notepad''': After you create a document, click &amp;quot;File&amp;quot;, &amp;quot;Save as...&amp;quot; and select &amp;quot;Save as type: All files&amp;quot;. To open the document, click &amp;quot;File&amp;quot;, &amp;quot;Open...&amp;quot; and select &amp;quot;Files of type: All files (*.*)&amp;quot;. If you open someone else's document, and the end-of-line symbols are displayed as small rectangles, you have to use another editor.&lt;br /&gt;
&lt;br /&gt;
'''WordPad''': After you create a document, click &amp;quot;File&amp;quot;, &amp;quot;Save as...&amp;quot; and select &amp;quot;Save as type: Text Document&amp;quot;. After the document is saved, close WordPad and remove the &amp;quot;.txt&amp;quot; extension from file. To open the document, click &amp;quot;File&amp;quot;, &amp;quot;Open...&amp;quot; and select &amp;quot;Files of type: All documents (*.*)&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Starting with the 1.9.x branch, there is a new IDE for helping User Made Content Authors to easily develop Wesnoth Add-ons. The website and details can be found at: http://eclipse.wesnoth.org&lt;br /&gt;
&lt;br /&gt;
=== I already created an add-on and published it on the server. How can I get translations for the campaign? ===&lt;br /&gt;
Just have a look at [[WesCamp]]. This project is the easiest way to get translations for your campaign. All the info you need you can find at [[WesCamp]].&lt;br /&gt;
&lt;br /&gt;
===How do I place an object or unit on my map with the map editor?===&lt;br /&gt;
You can't.  You need to make a scenario file.  There are more details on the [[BuildingMaps|maps]] page.&lt;br /&gt;
&lt;br /&gt;
== Multiplayer ==&lt;br /&gt;
&lt;br /&gt;
===How do I connect to a multiplayer server, when I sit behind a restrictive firewall?===&lt;br /&gt;
&lt;br /&gt;
You have to open outgoing TCP port 15000 - 14997 (depending on the version you use) to play multiplayer games over the internet on the official servers.&lt;br /&gt;
&lt;br /&gt;
===How to find players for multiplayer game?===&lt;br /&gt;
Hang around for a while on multiplayer servers and you might find someone to play with. If you observe other people playing you will get informed when someone joins the servers. Maybe you find someone willing to play in the [[Support#IRC|IRC]] channel dedicated to Wesnoth, #wesnoth at irc.freenode.net.&lt;br /&gt;
&lt;br /&gt;
===How to save and load a multiplayer game===&lt;br /&gt;
&lt;br /&gt;
Save the game. Give it a good name, so that you can find it among the other saved games.&lt;br /&gt;
&lt;br /&gt;
Create new game. (Give it a name like &amp;quot;private game for X and Y&amp;quot;, so that other players will not try joining it, and you do not have to explain or kick them.) The first item in the map/scenario list is &amp;quot;Saved games&amp;quot;, select this. Choose the saved game. Wait for the other player(s) to connect. Start the game.&lt;br /&gt;
&lt;br /&gt;
===How can I make my computer into a dedicated Wesnoth server?===&lt;br /&gt;
&lt;br /&gt;
To setup a dedicated Wesnoth server, you have to compile the game with the &amp;quot;--enable-server&amp;quot; flag, and after you install, simply run wesnothd from the console.  This will start the server, listening on TCP port 15000.  To compile the server only you can use the flags &amp;quot;--disable-game --enable-server&amp;quot;.  If you aren't using a linux or mac operating system, there are a few ways you can compile on Windows... [[CompilingWesnoth/CrossCompiling|here is one way]].&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Packages for Wesnoth 1.4 and later include wesnothd by default since it's required by the &amp;quot;Host a network game&amp;quot; option from the Multiplayer menu, which is the preferred option for temporarily hosting a server instance to play in a LAN or privately through the Internet.&lt;br /&gt;
&lt;br /&gt;
===Which versions of Wesnoth can play together?===&lt;br /&gt;
&lt;br /&gt;
You only need to make sure you are using the same minor version number (6 in &amp;quot;1.6.x&amp;quot;, 8 in &amp;quot;1.8.x&amp;quot; and so on) corresponding to stable branch releases. If you are using a development release (odd minor version numbers), you must be using exactly the same version number as other clients, to avoid out-of-sync (OOS) issues in multiplayer.&lt;br /&gt;
&lt;br /&gt;
If you are using user-made eras or MP scenarios, all players should make sure they are using the same, latest version of the add-on.&lt;br /&gt;
&lt;br /&gt;
== Translations ==&lt;br /&gt;
&lt;br /&gt;
===Where can I find more information about translating Wesnoth?===&lt;br /&gt;
See [[WesnothTranslations]] for a list of currently maintained projects, and methods for contacting their maintainers and volunteering for help, and instructions for starting your own translation if it isn't included in the game already. [http://gettext.wesnoth.org] shows the current progress translations for different game development and stable branches, mainline campaigns and user-made add-ons.&lt;br /&gt;
&lt;br /&gt;
== Other Questions You Have ==&lt;br /&gt;
&lt;br /&gt;
The best way to get answers to less-frequently asked questions is by visiting the official [http://forums.wesnoth.org Battle for Wesnoth forums]. There are plenty of people willing to help.  Make sure you read ALL of the forum sticky notes and announcements before posting!&lt;br /&gt;
&lt;br /&gt;
[[Category:Troubleshooting and Bugs]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=FAQ&amp;diff=56442</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=FAQ&amp;diff=56442"/>
		<updated>2015-06-22T14:25:47Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* What are the system requirements? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FAQ/Translations}}&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
===What is Battle for Wesnoth?===&lt;br /&gt;
Battle for Wesnoth is a turn-based tactical strategy game with a high fantasy theme, featuring both single-player, and online/hotseat multiplayer combat.&lt;br /&gt;
&lt;br /&gt;
===What license is the game distributed under?===&lt;br /&gt;
The project is distributed under the [http://www.fsf.org/copyleft/gpl.html GPL]. All contributors retain copyright on the portions of the project that they contribute. For more information, see [[Wesnoth:Copyrights]].&lt;br /&gt;
&lt;br /&gt;
===How to get informed about new releases?===&lt;br /&gt;
Check the front page of the website.&lt;br /&gt;
&lt;br /&gt;
===A new version is out, but where is the download for [Windows, Mac OS X, etc.]?===&lt;br /&gt;
The packages provided, other than the source code tarball, are '''not''' part of the official project.  The BfW team only releases the game's source code.  Binary executables or applications are always contributed by community volunteers.  If not for these volunteers, there would never be any downloads for us to enjoy.  The volunteers compile the game and upload it on their own time, and sometimes they cannot do this in a timely fashion (or at all, at times).  Although there are usual packagers designated for each operating system, there are times when other members of the community are asked to step in and contribute when the usual people cannot.&lt;br /&gt;
&lt;br /&gt;
Every time a new version is released, the usual volunteers are notified by the project leaders.  '''Please refrain from making forum posts asking where your download is''' because it doesn't help anything - the packagers already know, and they will get to it as soon as they can.  In the past, the Windows and Mac communities have come together to produce home-grown unofficial builds for the community to use, and the renewed interest in community and learning how to compile is generally a good thing.&lt;br /&gt;
&lt;br /&gt;
===Why doesn't Wesnoth have my favorite feature?===&lt;br /&gt;
Because we are building this game for ourselves, to suit our own preferences. We're not building the game for you, in large part because this is our hobby, not our job; whether you like it or not is immaterial to us.&lt;br /&gt;
You may wonder, then, what the point is of soliciting ideas, as we do on the forum.  We, the developers, have certainly come up with many good ideas on our own, but our players often do as well, and generally ones we don't think of ourselves.  If a player comes up with an idea we like, we might implement it.  Not because they asked for it, but because of its own merits as an addition to our game.&lt;br /&gt;
&lt;br /&gt;
The beautiful thing about the license our game is distributed under, as compared to closed-source, commercial games, is that if you want that feature badly enough, you can take the code and art of our game and modify it yourself; you are free to re-use any work in Wesnoth, as long as you follow the rules of the [http://www.fsf.org/copyleft/gpl.html GPL].  From this, you can build a game exactly the way that you like. Just don't expect us to build that game for you.  Building this game is our hobby, not our profession, and you did not pay us to make it; rather, we are the ones who have paid for it, in time and labor.&lt;br /&gt;
&lt;br /&gt;
===Do you want help making this game? How can I help?===&lt;br /&gt;
Yes, we want your help. Whether you're a programmer, artist, musician, writer, translator, level designer, playtester, or just have some great suggestions, you're welcome to contribute. How?  You can:&lt;br /&gt;
* join the [http://www.wesnoth.org/wiki/Project project]&lt;br /&gt;
* share your opinions at the [http://www.wesnoth.org/forum/ Forum]&lt;br /&gt;
* talk with us on [[Support#IRC|IRC]]&lt;br /&gt;
* [[ReportingBugs|report]] bugs you find with Wesnoth and its mainline content&lt;br /&gt;
* update the wiki&lt;br /&gt;
* play against other players via the [[GettingStarted#Multiplayer|Multiplayer]] menu&lt;br /&gt;
* vote for Wesnoth at your favorite gaming web site&lt;br /&gt;
* spread the word!&lt;br /&gt;
&lt;br /&gt;
=== What are the system requirements? ===&lt;br /&gt;
'''outdated!'''&lt;br /&gt;
We are not completely certain, but an x86 running at 400 MHz with 128 MB RAM should be adequate for versions 1.0.2 and below. For versions 1.1 and up we recommend a computer with at least 1 GHz and 512 MB RAM if you run KDE or Gnome as Windowmanager (The game itself needs about 100 MB RAM). Slower machines will have trouble scrolling large maps or processing AI turns with many units.  See the [http://www.wesnoth.org/forum/viewtopic.php?t=7384 forum thread] about minimum and recommended system requirements.&lt;br /&gt;
&lt;br /&gt;
'''update'''&lt;br /&gt;
I happened to set up a 1GHz 512MB RAM machine with win xp and a GeForce2 MX/MX 400 with corresponding drivers. This is hardware from about 2000. Scrolling the map is jumpy, but multiplayer in wesnoth 1.12, Isar's Cross, runs fine otherwise. Of course, make sure you reserve as much resources for wesnoth as possible, deactivate animated map and standing animations, and don't have too many AI units on the map. -anonymissimus, June 2015&lt;br /&gt;
&lt;br /&gt;
=== I'm bored; how do I speed the game up? ===&lt;br /&gt;
&lt;br /&gt;
There are several preferences you can change to shorten the time that the AI takes to make its moves. &amp;quot;Accelerated Speed&amp;quot; will make units move and fight faster. &amp;quot;Skip AI Moves&amp;quot; will not show the AI's units moving from hex to hex. Finally, you can turn off all combat animations via the &amp;quot;Show Combat&amp;quot; option on the Advanced tab.&lt;br /&gt;
&lt;br /&gt;
=== My computer is too slow; how do I speed the game up? ===&lt;br /&gt;
&lt;br /&gt;
First, turn off the music and sound effects. Turning off the color cursors will make your cursor respond faster. If scrolling the map is slow, run the game in &amp;quot;Full Screen&amp;quot; mode, not in a window.  Turn off combat, map, and standing unit animations via the &amp;quot;Show Combat&amp;quot;, &amp;quot;Animate Map&amp;quot; and &amp;quot;Unit Standing Animations&amp;quot; options on the Advanced tab in the game Preferences. You can try turning off halos and combat results, but this might make gameplay more difficult.&lt;br /&gt;
For some tips on tweaking the startup, see [[CustomizingStartup]].&lt;br /&gt;
&lt;br /&gt;
== Gameplay and Controls ==&lt;br /&gt;
&lt;br /&gt;
=== How do I learn to play? ===&lt;br /&gt;
&lt;br /&gt;
If you just want to jump right in, start the game and play the tutorial.  If you like reading documentation, see [[WesnothManual]].  At any time while playing, you can select help from the menu button (or hit F1). The online help is quite extensive and provides information on terrains, weapons, traits, abilities, units and a good overview of how to play.&lt;br /&gt;
&lt;br /&gt;
=== My unit leveled up but didn't improve. What happened? ===&lt;br /&gt;
&lt;br /&gt;
This is called &amp;quot;After Maximum Level Advancement&amp;quot; or AMLA for short. While most level 0, 1, and 2 units can advance, some cannot.  However, some level 3 units can advance to level 4, or even 5. You can see whether a unit can advance further by right clicking and selecting &amp;quot;description.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
After a unit reaches the highest level it can get, every time it reaches a new experience threshold (which increases with each advancement) it gains 3 hitpoints and is restored to a state of full health. This is a minor bonus so that experience gained by maxed out units is not altogether wasted. It is generally better to give experience to lower level units, rather than continue to advance units that have reached their maximum level.&lt;br /&gt;
&lt;br /&gt;
=== I tried to trap an enemy with several weak units, but it still escaped. What happened? ===&lt;br /&gt;
&lt;br /&gt;
Most units exert a zone of control (or ZoC).  If an enemy moves into one of the six adjacent hexes, the zone of control will prevent it from moving any farther.  However some weak units are level 0, meaning they are so weak that they do not have a ZoC. You can still surround an enemy unit entirely with level 0 units to keep it from escaping, but if there is any gap in your ranks, it could escape.&lt;br /&gt;
&lt;br /&gt;
Also, some units have the &amp;quot;skirmish&amp;quot; ability, which allows them to ignore ZoCs.&lt;br /&gt;
&lt;br /&gt;
=== How can I see where an enemy unit can move next turn? ===&lt;br /&gt;
&lt;br /&gt;
During your turn you can click on an enemy unit. Wesnoth will highlight all the hexes the unit can move to in the next turn. This is useful when trying to arrange your units to block an enemy's movement.&lt;br /&gt;
&lt;br /&gt;
=== There's too much luck in this game! ===&lt;br /&gt;
&lt;br /&gt;
Sooner or later, you will become frustrated when your archmage with four 70% attacks misses all four times.  This does not mean that the AI is cheating or the random number generator is futzed.  It means you are noticing random negative events more than positive ones.  During the development of the game, many mathematicians have done sophisticated statistical analysis of the combat system.  Likewise, programmers have examined the random number generator.  No flaws have been found, so streaks of &amp;quot;bad&amp;quot; and &amp;quot;good&amp;quot; luck should just be accepted as part of having randomness in Wesnoth.  A more detailed rational and discussion of the role that randomness plays in Wesnoth can be found [http://www.wesnoth.org/forum/viewtopic.php?f=6&amp;amp;t=21317&amp;amp;start=0&amp;amp;st=0&amp;amp;sk=t&amp;amp;sd=a here].&lt;br /&gt;
&lt;br /&gt;
Since Wesnoth is GPLed, it is possible that a new development team will someday &amp;quot;fork&amp;quot; the source and produce a version more like Heroes of Might &amp;amp; Magic, with less or no randomness.  Until then, don't charge with your horsemen against troll rocklobbers at night...&lt;br /&gt;
&lt;br /&gt;
=== The (random unit) is overpowered/underpowered! ===&lt;br /&gt;
&lt;br /&gt;
The development team has spent years tweaking the units in the game.  Each unit has had its gold cost, attack types, combat damage, defensive values, resistances, upgrade paths, and other stats carefully scrutinized and loudly discussed in the forum.  However, the game code and the units were being modified right up until the 1.0 release, so some unbalanced units may have slipped through.&lt;br /&gt;
&lt;br /&gt;
If you have evidence to back up your claim, search the forum for past discussions about this unit, and then try posting.&lt;br /&gt;
&lt;br /&gt;
=== The (random scenario) is too hard/easy! ===&lt;br /&gt;
&lt;br /&gt;
See above answer about random units.&lt;br /&gt;
&lt;br /&gt;
=== What do the different difficulty levels do? ===&lt;br /&gt;
&lt;br /&gt;
That depends on the scenario. Usually, the opponent will get more money and be able to recruit higher-level units at higher difficulty levels, and you will have fewer turns available.&lt;br /&gt;
&lt;br /&gt;
== Maps, Scenarios and Campaigns ==&lt;br /&gt;
&lt;br /&gt;
=== How do I beat scenario _______ ? ===&lt;br /&gt;
&lt;br /&gt;
If you are stuck on a scenario in a campaign, you'll probably find a walkthrough at [[MainlineCampaigns]].  Or check out the &amp;quot;Strategies and Tips&amp;quot; forum at http://www.wesnoth.org/forum/viewforum.php?f=3&lt;br /&gt;
&lt;br /&gt;
=== How do I download user campaigns? ===&lt;br /&gt;
Choose &amp;quot;Campaigns&amp;quot; in the main Wesnoth menu. Then scroll down to the bottom and choose &amp;quot;Get More Campaigns...&amp;quot; or since 1.1.5 there is a &amp;quot;Get add-ons&amp;quot; button in the main menu. This connects you to the campaign server. In the campaign server you can view a list of all available campaigns and download them, as well as posting or deleting your own campaigns.&lt;br /&gt;
&lt;br /&gt;
If you are behind a firewall you may not be able to connect to the campaign server.  In this case try to download the campaign directly from the campaign server at http://addons.wesnoth.org/. If you know how to change your firewall settings, then you should open port 15003 (version 1.1.1 and up) or port 15002 (versions 1.1.0 and lower).  For added security, you can restrict traffic over those ports to the campaign server's IP address (currently 88.191.12.200).&lt;br /&gt;
&lt;br /&gt;
=== Are there any tools to help me create maps and scenarios? ===&lt;br /&gt;
Yes, the game includes a built-in map editor, that you can use to build the terrain maps for your scenarios.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, there's no simple solution for creating the rest of what constitutes a complete scenario or campaign, which is the [[ReferenceWML|WML]] code. There have been some abandoned attempts at creating complete scenario editors such as [[CampGen]], but they are no longer maintained, nor do they work with the latest stable versions of the game.&lt;br /&gt;
&lt;br /&gt;
You should take a look at the [[Create]] section for information and guides that can help you build your own scenario or campaign. Taking a look at how existing content works is also a good idea.&lt;br /&gt;
&lt;br /&gt;
=== What are the .cfg files and how can I edit them? ===&lt;br /&gt;
&lt;br /&gt;
The .cfg files are plain text files, saved with the file extension &amp;quot;.cfg&amp;quot;. You can create and edit them using normal text editors; just save the files in correct format.&lt;br /&gt;
&lt;br /&gt;
Please note that some Windows programs like to add a &amp;quot;.txt&amp;quot; extension, so the file is instead of &amp;quot;my_scenario.cfg&amp;quot; saved as &amp;quot;my_scenario.cfg.txt&amp;quot;. And then the Windows Explorer will hide the &amp;quot;.txt&amp;quot; extension by default, so you may not notice it.&lt;br /&gt;
&lt;br /&gt;
'''Notepad''': After you create a document, click &amp;quot;File&amp;quot;, &amp;quot;Save as...&amp;quot; and select &amp;quot;Save as type: All files&amp;quot;. To open the document, click &amp;quot;File&amp;quot;, &amp;quot;Open...&amp;quot; and select &amp;quot;Files of type: All files (*.*)&amp;quot;. If you open someone else's document, and the end-of-line symbols are displayed as small rectangles, you have to use another editor.&lt;br /&gt;
&lt;br /&gt;
'''WordPad''': After you create a document, click &amp;quot;File&amp;quot;, &amp;quot;Save as...&amp;quot; and select &amp;quot;Save as type: Text Document&amp;quot;. After the document is saved, close WordPad and remove the &amp;quot;.txt&amp;quot; extension from file. To open the document, click &amp;quot;File&amp;quot;, &amp;quot;Open...&amp;quot; and select &amp;quot;Files of type: All documents (*.*)&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Starting with the 1.9.x branch, there is a new IDE for helping User Made Content Authors to easily develop Wesnoth Add-ons. The website and details can be found at: http://eclipse.wesnoth.org&lt;br /&gt;
&lt;br /&gt;
=== I already created an add-on and published it on the server. How can I get translations for the campaign? ===&lt;br /&gt;
Just have a look at [[WesCamp]]. This project is the easiest way to get translations for your campaign. All the info you need you can find at [[WesCamp]].&lt;br /&gt;
&lt;br /&gt;
===How do I place an object or unit on my map with the map editor?===&lt;br /&gt;
You can't.  You need to make a scenario file.  There are more details on the [[BuildingMaps|maps]] page.&lt;br /&gt;
&lt;br /&gt;
== Multiplayer ==&lt;br /&gt;
&lt;br /&gt;
===How do I connect to a multiplayer server, when I sit behind a restrictive firewall?===&lt;br /&gt;
&lt;br /&gt;
You have to open outgoing TCP port 15000 - 14997 (depending on the version you use) to play multiplayer games over the internet on the official servers.&lt;br /&gt;
&lt;br /&gt;
===How to find players for multiplayer game?===&lt;br /&gt;
Hang around for a while on multiplayer servers and you might find someone to play with. If you observe other people playing you will get informed when someone joins the servers. Maybe you find someone willing to play in the [[Support#IRC|IRC]] channel dedicated to Wesnoth, #wesnoth at irc.freenode.net.&lt;br /&gt;
&lt;br /&gt;
===How to save and load a multiplayer game===&lt;br /&gt;
&lt;br /&gt;
Save the game. Give it a good name, so that you can find it among the other saved games.&lt;br /&gt;
&lt;br /&gt;
Create new game. (Give it a name like &amp;quot;private game for X and Y&amp;quot;, so that other players will not try joining it, and you do not have to explain or kick them.) The first item in the map/scenario list is &amp;quot;Saved games&amp;quot;, select this. Choose the saved game. Wait for the other player(s) to connect. Start the game.&lt;br /&gt;
&lt;br /&gt;
===How can I make my computer into a dedicated Wesnoth server?===&lt;br /&gt;
&lt;br /&gt;
To setup a dedicated Wesnoth server, you have to compile the game with the &amp;quot;--enable-server&amp;quot; flag, and after you install, simply run wesnothd from the console.  This will start the server, listening on TCP port 15000.  To compile the server only you can use the flags &amp;quot;--disable-game --enable-server&amp;quot;.  If you aren't using a linux or mac operating system, there are a few ways you can compile on Windows... [[CompilingWesnoth/CrossCompiling|here is one way]].&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Packages for Wesnoth 1.4 and later include wesnothd by default since it's required by the &amp;quot;Host a network game&amp;quot; option from the Multiplayer menu, which is the preferred option for temporarily hosting a server instance to play in a LAN or privately through the Internet.&lt;br /&gt;
&lt;br /&gt;
===Which versions of Wesnoth can play together?===&lt;br /&gt;
&lt;br /&gt;
You only need to make sure you are using the same minor version number (6 in &amp;quot;1.6.x&amp;quot;, 8 in &amp;quot;1.8.x&amp;quot; and so on) corresponding to stable branch releases. If you are using a development release (odd minor version numbers), you must be using exactly the same version number as other clients, to avoid out-of-sync (OOS) issues in multiplayer.&lt;br /&gt;
&lt;br /&gt;
If you are using user-made eras or MP scenarios, all players should make sure they are using the same, latest version of the add-on.&lt;br /&gt;
&lt;br /&gt;
== Translations ==&lt;br /&gt;
&lt;br /&gt;
===Where can I find more information about translating Wesnoth?===&lt;br /&gt;
See [[WesnothTranslations]] for a list of currently maintained projects, and methods for contacting their maintainers and volunteering for help, and instructions for starting your own translation if it isn't included in the game already. [http://gettext.wesnoth.org] shows the current progress translations for different game development and stable branches, mainline campaigns and user-made add-ons.&lt;br /&gt;
&lt;br /&gt;
== Other Questions You Have ==&lt;br /&gt;
&lt;br /&gt;
The best way to get answers to less-frequently asked questions is by visiting the official [http://forums.wesnoth.org Battle for Wesnoth forums]. There are plenty of people willing to help.  Make sure you read ALL of the forum sticky notes and announcements before posting!&lt;br /&gt;
&lt;br /&gt;
[[Category:Troubleshooting and Bugs]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=HeirToTheThrone&amp;diff=51883</id>
		<title>HeirToTheThrone</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=HeirToTheThrone&amp;diff=51883"/>
		<updated>2013-09-10T23:43:39Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* Scenario 2 - Blackwater Port */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a walkthrough of '''Heir to the Throne''', the campaign featuring Konrad.&lt;br /&gt;
&lt;br /&gt;
Some of the information in this walkthrough may be outdated, as the campaign has seen some changes over the years without the respective updates of the walkthrough. It is generally valid and useful, however.&lt;br /&gt;
&lt;br /&gt;
The suggestions herein are mostly based on the ''Medium'' and ''Hard'' difficulty levels. It should be possible to win on the ''Easy'' difficulty level without trying very hard if you are an accomplished gamer.  If you feel comfortable with turn-based games, especially ones featuring units moving on a hex map, then you can play the Tutorial and then dive right into ''Medium'' to get a feel for the elements of the game. After you have played a few scenarios and are ready to restart from the beginning (and yes, it is  very likely you will have to restart the first time you play Wesnoth), try reading [[AdvancedTactics]]. You should also be familiar with the basics in [[WesnothManual]]—this is a walkthrough, not an exposition of basic game mechanics.&lt;br /&gt;
&lt;br /&gt;
There is a [http://forums.wesnoth.org/viewforum.php?f=39 subforum] for providing feedback on the scenarios of this campaign, with each scenario having its individual thread, where you can post feedback, read other players' comments and sometimes get your questions answered. Note, however, that some of the posts date back to 2004... remember to mind the post dates. The scenario forum threads also have the occasional replay attached to a post (the 'replay' savegame that gets created whenever you complete a scenario).&lt;br /&gt;
&lt;br /&gt;
There are also some personal walkthrough forum posts, such as [http://www.wesnoth.org/forum/viewtopic.php?t=3601 Suggestions for Heir to the Throne walkthrough] and [http://www.wesnoth.org/forum/viewtopic.php?t=4026 Yet another &amp;quot;Heir to the Throne&amp;quot; walktrough]. Finally, [http://www.wesnoth.org/forum/viewtopic.php?t=7064 Ye Compleat Walkthrough to &amp;quot;Heir to the Throne&amp;quot;] is a detailed guide, with illustrations and commentary, to the first six scenarios.&lt;br /&gt;
&lt;br /&gt;
'''Warning - spoilers ahead!'''&lt;br /&gt;
&lt;br /&gt;
== Scenario 1 - The Elves Besieged ==&lt;br /&gt;
* Objective: Move Konrad to the signpost.&lt;br /&gt;
* Lose if: Konrad or Delfador die or turns run out.&lt;br /&gt;
* Turns: 16/14/12 (easy/medium/hard)&lt;br /&gt;
* Starting units: Konrad, Delfador.&lt;br /&gt;
&lt;br /&gt;
The orcs as well as your allies will levy a great many troops, you'll soon find yourself between the lines in a huge battle. All those units slugging it out can take quite some time, you may want to try two options on the Preferences dialog, &amp;quot;Accelerated Speed&amp;quot; or maybe even &amp;quot;Skip AI Moves&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This scenario is a &amp;quot;runner&amp;quot; scenario; on turn one, recruit a castle full of fresh recruits, and immediately make a break for it! If you're new to Wesnoth, getting Konrad out of there in one piece will be difficult enough and may require you to start over a couple of times. Hint: don't keep your units all lumped around Konrad, as a large host will attract the enemies' attention. &lt;br /&gt;
&lt;br /&gt;
Terrain dictates two routes to the signpost: west to the druid and then north, or north over the bridge and then west. Either way, you should send Delfador and most of your army straight north. This is a ruse, the sole purpose is to lure the enemy towards the road  while Konrad (with only one or two level-1 bodyguards) makes his way towards the exit. There's no chance of winning by defeating all enemies, your troops should perform a skirmishing retreat westwards into the forest.&lt;br /&gt;
&lt;br /&gt;
Other than getting Konrad on his way, the secondary objective you should pursue on this scenario is to gain some experience for your troops. Experience is gained by fighting; once a level of experience is reached, your units will &amp;quot;level up&amp;quot; and become more powerful units. Killing an opponent will give much more experience than just fighting, so you should try to arrange it in such a way that the unit you want to upgrade gets to deliver the ''coup de grâce''.&lt;br /&gt;
&lt;br /&gt;
Now a few words about the units at your disposal. In–game, you cannot check the data of unknown units; if you want to take a peek anyway, check the [http://www.wesnoth.org/units/ Wesnoth Unit Tree].&lt;br /&gt;
&lt;br /&gt;
* Fighters and Archers. Melee and ranged, all elvish warriors are capable of both, it's more a matter of emphasis than an actual distinction. When they level up, most should become Heroes and Rangers, repectively; you'll only need one or two Captains, and probably are better off without any Marksmen: spellcasters will serve the same purpose much better.&lt;br /&gt;
&lt;br /&gt;
* Shamans are minor healers. As a rule of thumb, you should never enter into any scenario without at least one healer. Leveling up a Shaman is somewhat tricky, as they can do only very little damage. If you use stronger units to knock an enemy unit's HP down, you can move your shamans up from behind the lines to administer the finishing blow. As difficult as it is to level up a shaman, it is well worth the hassle. Druids will be standard healers, you want one (and possibly only one) of those as soon as possible. A Sorceress cannot heal at all, but is a powerful spellcaster. At their higest level, both will learn to fly and become very mobile.&lt;br /&gt;
&lt;br /&gt;
* Scouts may seem weak, but there's more to them than meets the eye. While most riders suffer severe penalties in difficult terrain, the elvish variant can cross rivers, swamps and even mountains rather quickly and will usually even receive a reasonable defense modifier. Insofar, they're less like horsemen and more like fast infantry. Whether you employ them in numbers is a matter of taste, however, you should always remember that you have these extremely mobile units at your disposal.&lt;br /&gt;
&lt;br /&gt;
* Konrad, your leader, starts most scenarios at a keep where he may recruit some troops, but that doesn't mean that he should stay there forever: Being always on the map, he may just as well make himself useful. Getting him to level two will earn him a bow as well as the &amp;quot;leadership&amp;quot; ability, both will come in handy time and again.&lt;br /&gt;
&lt;br /&gt;
* Delfador, the Elder Mage, is insanely powerful (at least compared to your other troops for the time being). Mages usually aren't very sturdy, but at level 5 he has so many hit points that you don't have to worry too much about him—he'll survive quite a few counterattacks. Don't overcommit him, but the first few scenarios depend on his abilities to instantly slay nearly any opponent and soaking up some damage that would otherwise kill several of your (still minor) units.&lt;br /&gt;
&lt;br /&gt;
Be careful and don't leave Konrad or Delfador on vulnerable positions at the end of your turns (where many enemies may be able to surround them), especially on ''hard'' difficulty, because all enemies will be particularly aggresive towards them. Remember to use the CTRL-v command to see how far all enemy units will be able to move on their next turn. Click on an unoccupied hex and then move the cursor over an enemy unit to see how far that unit will be able to move.&lt;br /&gt;
&lt;br /&gt;
Early finish bonus: 32 gold per turn.&lt;br /&gt;
&lt;br /&gt;
See also the [http://www.wesnoth.org/forum/viewtopic.php?t=2881 forum discussion].&lt;br /&gt;
&lt;br /&gt;
== Scenario 2 - Blackwater Port ==&lt;br /&gt;
* Objectives: Either&lt;br /&gt;
** Resist until the end of the scenario, or..&lt;br /&gt;
** Defeat the enemy leader.&lt;br /&gt;
* Lose if: Konrad, Delfador or Sir Kaylan die or turns run out.&lt;br /&gt;
* Turns: 12/12/9 (easy/medium/hard)&lt;br /&gt;
* Starting units: Konrad, Delfador, Haldiel.&lt;br /&gt;
* Other&lt;br /&gt;
** An extra loyal Knight unit as a bonus if the enemy leader is defeated on ''hard''.&lt;br /&gt;
** You can recruit horseman units now.&lt;br /&gt;
&lt;br /&gt;
The opening dialog will introduce a new friend, Haldiel, a loyal Horseman. The importance of loyalty is explained in [[CampaignStrategies#The_importance_of_loyalty|Campaign Strategies]].&lt;br /&gt;
&lt;br /&gt;
'''Horsemen'''&lt;br /&gt;
:Now that's cavalry as we know it. Their charges can be truly devastating if somewhat suicidal, as your ally will demonstrate soon. Employing charge attacks takes a little getting used to, as it differs so much from ordinary melee. Keep an eye on the &amp;quot;Damage Calculations&amp;quot; until you get the knack of it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Back to topic: If you recall units, choose those that have enough experience to be worth the 2 to 6 gold difference over fresh recruits, or who have specific traits that you need. Hole up in the forest on your side of the road (so the enemy has to stand on the plains to face you). Feel free to seize a few villages from your ally, he won't complain. If you have a unit to spare, you may even take the villages next his castle. Matter of fact, this is a prudent move &amp;amp;ndash; after all, Sir Kaylan would only use the gold to recruit troops that would steal your experience!&lt;br /&gt;
&lt;br /&gt;
You can also send Haldiel west as fast as possible and attempt to take the village due south of the enemy castle.  This will draw some orcs south, reducing the pressure on your actual army and giving you more freedom to shape the battle. However, be careful to not let him get pinned down and killed.&lt;br /&gt;
&lt;br /&gt;
Sir Kaylan will send one or two horsemen to the enemy lines to assist you.  Although these horsemen are not under your direct control, they can serve as a distraction if you manoeuver your forces properly, taking the brunt during the enemy's turn to attack. &lt;br /&gt;
&lt;br /&gt;
The first night will be tough, be prepared to lose some units; but if you use the terrain to your advantage, you should have enough of an army left to launch a serious counterattack during the next day. The momentum should keep you going even through the next night and you may soon find yourself besieging the enemy keep. However, the actual objective is merely to survive &amp;amp;ndash; if everything fails, you may still retreat behind the swordsmen guarding Sir Kaylans fortress.&lt;br /&gt;
&lt;br /&gt;
There is an early finish gold bonus for killing the enemy leader, however, it will probably be small. In other words: rushing it won't be worthwhile, instead you should play it safe: manoeuver carefully and try to get some experience to those units that need it most. By the end of this scenario, you really ought to have a Druid—that's absolutely vital. Next in line should be an elvish Fighter (make him a Captain) and Konrad, anything else is optional. But the more the merrier as they say.&lt;br /&gt;
&lt;br /&gt;
If you're playing on ''hard'' and manage to kill the orc leader, you will receive a special reward: Simyr, a loyal Knight with the ''intelligent'' trait, will join your army. This might very well be worth the effort, but it will not be an easy challenge. There have been, however, reports from users who have achieved this. You need some good luck distracting most the enemies away from the keep, enough to leave an opening for a few horseman units to charge on the leader during the day (on turn 8/9) in order to finish him off.&lt;br /&gt;
&lt;br /&gt;
Hint for the aim of getting the loyal knight (Anonymissimus): The wesnoth AI moves its units into the direction of the enemy *leader* during its move-to-targets phase. This can be exploited in this scenario by moving Konrad towards Kaylan's keep and leaves the field near the enemy keep open for an attack onto the leader with most of your other units. The leader can be lured out, for instance, by taking the village at 8,21 in turn 7 and moving that unit back in turn 8. Leader moves in there during his turn 8, kill him with Delfador and at least one other high damage dealer (better 3) in turn 9, so have them in range.&lt;br /&gt;
&lt;br /&gt;
See also the [http://www.wesnoth.org/forum/viewtopic.php?t=2929 forum discussion].&lt;br /&gt;
&lt;br /&gt;
== Scenario 3 - Isle of Alduin ==&lt;br /&gt;
* Objective: Defeat the enemy leader.&lt;br /&gt;
* Lose if: Konrad or Delfador die or turns run out.&lt;br /&gt;
* Turns: 34/24/21 (easy/medium/hard)&lt;br /&gt;
* Starting units: Konrad, Delfador.&lt;br /&gt;
* Other&lt;br /&gt;
** A loyal mage named Elrian is hiding in a village near your keep.&lt;br /&gt;
** After finding Elrian, you'll be able to recruit magi.&lt;br /&gt;
&lt;br /&gt;
The key to victory is to control the villages, earning the gold you need to recruit or recall troops.  You have the option to send the majority of your army west or south with village grabbers going the opposite direction.  If you choose to send your army west (recommended) send a scout and an archer south, grabbing alternating villages. Done intelligently they will each grab 1 village per turn until they are near the opponents keep. Be careful of engaging the enemy on the west flank near the hills at night: this is where they shine. Back off to the forests and wait for a more favorable time of day if necessary.&lt;br /&gt;
&lt;br /&gt;
The following strategy works well if you take care of your unit placement. Protect units you cannot afford to lose from multiple attacks at night or when weakened, particularly new horsemen and magi.&lt;br /&gt;
&lt;br /&gt;
First recall or recruit 3 elvish scouts. Send two scouts to the southern villages, and the third to the village to the northwest. Recruit 3 fighters; send one to the south and the other two to the southwest. This works best if one scout is &amp;quot;quick&amp;quot; and the fighter recruited to fill the southeastern hex of your castle is also &amp;quot;quick&amp;quot;. If not you may have to modify this strategy. Send Delfador up to the northwest on the first turn to find the mage and send the mage down to the village next to the castle. Konrad should take two nearby villages in the first two turns, because you have no money left anyway.&lt;br /&gt;
&lt;br /&gt;
One of the scouts goes as far south as possible, taking villages and distracting the enemy. This scout is usually destroyed by turn 4. That's OK. The other scout in the south usually has to retreat to survive. You try to take all the villages in the south you can and then reinforce the south slowly and move south. Now your main push is in the west because most villages are there and you need an income of over 20 per turn to recall all of your good troops. I usually use the scout I have sent to the northwest village on the island to take all of the far northwest villages. Delfador can destroy an enemy unit each turn. Horsemen take too long to cross the forest south of your castle but are strong on the western plains during daytime. Send newly-recruited horsemen to the west along with magi. A shaman is useful to the south and later one can be sent to the west.&lt;br /&gt;
&lt;br /&gt;
Approaching turn 10-12, you should have assembled two reasonably powerful forces on each side of the lake. The westerly one usually is based on Delfador and horsemen-mage combos with fighters and archers for ZOC purposes, and the eastern force almost entirely of elves. Remember magi work best against trolls and grunts, and horsemen against archers.&lt;br /&gt;
&lt;br /&gt;
Move south in tight groups, trying not to get too aggressive at night with the west group, until they meet at the far southern end of the island, and assault the castle together.&lt;br /&gt;
&lt;br /&gt;
If you are a new player, you've probably been focusing on game mechanics and how the units and terrain interact. If so, it's time to give serious thought to leveling up some units by allowing them to strike the killing blow. When Konrad or an elven fighter is at level 2, they get the &amp;quot;leadership&amp;quot; skill. When a shaman levels up, they get the &amp;quot;cure&amp;quot; skill.&lt;br /&gt;
&lt;br /&gt;
Hardly any player notices this, but this scenario offers the opportunity for some extra experience at the expense of very little gold. The early finish bonus is 38, but there are 36 villages on the island, so if you control all villages, you only lose 2 gold per turn (or only 1.6 gold, since only 80% can be retained - should be less than 24, since you hardly ever finish more than 15 turns early). So instead of killing the remaining enemies - especially the enemy leader - you might encircle them and reduce their health to a minimum. If you do not attack them in the subsequent turns, they will neither attack nor move, thus regain 2 HP per turn and will eventually be healthy enough to stand an attack of your weaker units. This is a relatively safe way to milk some extra XPs out of them for your weaker units (preferably magi and shamans). While milking level 1 units may not be very rewarding, milking the level 2 leader might easily give 20 extra XPs.&lt;br /&gt;
&lt;br /&gt;
A note about playing with Magi: They are weak units, but become important later in the game. Over the next few levels, you'll want to level at least two Magi to White Magi for later in the game; they have an arcane (or holy) attack which does incredible amounts of damage to the undead. Fire Magi can eventually level up to level 4 Great Magi, which are walking killing machines, and Fire Magi do decent damage to most other units, especially trolls and skeletons. Magi are weak, however, so they need to be guarded by stronger units. Don't let the enemy have more than one attack position on them.&lt;br /&gt;
&lt;br /&gt;
See also the [http://www.wesnoth.org/forum/viewtopic.php?t=2959 forum discussion].&lt;br /&gt;
&lt;br /&gt;
== Scenario 4 - Bay of Pearls ==&lt;br /&gt;
* Objective: Either&lt;br /&gt;
** Defeat one enemy leader, and resist the other until turns run out, or&lt;br /&gt;
** Defeat all enemy leaders (early finish bonus).&lt;br /&gt;
* Lose if: Konrad dies or turns run out.&lt;br /&gt;
* Turns: 27/24/21 (easy/medium/hard)&lt;br /&gt;
* Starting units: Konrad.&lt;br /&gt;
* Other&lt;br /&gt;
** A storm trident is located on the northwest.&lt;br /&gt;
&lt;br /&gt;
Opening moves: On the first turn, have Konrad recruit or recall some units. Which units, and in which order, is your first tactical decision. If you recruit/recall in pairs, with one fast (6 movement points or more) and one slow unit, then one will be able to move onto the island the next turn, while the other is still wading through the river.&lt;br /&gt;
&lt;br /&gt;
Then, move Konrad to the cage on the island just to the east. This will free some mermen. (How many depends on whether you are playing on Easy, Medium, or Hard.) One of these can go open the second cage, and so on: by the end of your very first turn, you should have at least five mermen in the water.&lt;br /&gt;
&lt;br /&gt;
Watch out: there's one cage far out at sea that's easily overlooked. The first Merman you set free tells you as much, but if you skip the message... Anyway, it is guarded by two nagas. Send two or (at most) three Mermen up there and *do not* fight it out: get the cage first, then kill the nagas with the help of the mermen from that cage. It holds at least four Mermen, on of them an Initiate. The latter may become a healer, try to get her experienced as soon as possible.&lt;br /&gt;
&lt;br /&gt;
Even further north than the last cage there's a trident in the water. It will confer a powerful ranged attack to its bearer. Have a &amp;quot;quick&amp;quot; merman pick it up (who should eventually become a Hoplite).&lt;br /&gt;
&lt;br /&gt;
The remaining mermen should try to hold the sea leaders' recruits at bay. Mermen and nagas both have high defense in water, so combat can be a bit slow and frustrating. Concentrate three or four mermen on a single enemy unit at a time, rather than spreading your attacks piecemeal. Don't push too hard, especially not at night when your attacks are weak. Keeping your loyal mermen alive is more important than the possession of a village, and things will look much better on the next day. If that doesn't suffice, the troops from the deep-sea cage may lend a hand.&lt;br /&gt;
&lt;br /&gt;
It will be nigh impossible for your horsemen and elves to wade to the island to fight the sea leader in time, so eventually your need to do this. The Storm Trident and the Initiate both have magic attacks (70% to-hit regardless of terrain) and should go a long way... you better attack him during the day, even if it means that you need to wait for a few turns.&lt;br /&gt;
&lt;br /&gt;
On land, you have to fight off a wave of orcs and wolves. Your decision is how far west to engage the enemy, though really, you have little choice: You are hindered by the limited recruitment you can do each turn, and how long it takes your elves and horsemen to trickle across the river. Some wolves may reach you in the night, but the bulk of his army won't arrive until daybreak. Press hard during the day, and there will be little left of his army when the night comes. &lt;br /&gt;
&lt;br /&gt;
Careful management of your killing blows should allow several units to get to Level 2. A charging horseman does so much damage it will be easy for the horsemen to get all the kills, but try to get at least Konrad, your loyal mage,  and an elven fighter to level-2 (if you haven't already).&lt;br /&gt;
&lt;br /&gt;
The outcome of this battle affects the next scenario you play. If you kill the sea leader you wind up on Isle of the Damned. If you kill the land leader you wind up on Muff Malal's Peninsula. If you kill both, you can choose (and get an early finish bonus).&lt;br /&gt;
&lt;br /&gt;
New players should take the land route to Muff Malal's Peninsula, where you can easily level up many units or collect an early finish bonus. Experienced players or those who are looking for an interesting tactical exercise may wish to consider the sea route to the Isle of the Damned, where you will find a loyal White Mage who *might* join you... if you meet some very tough winning conditions. Either choice will be a battle against undead.&lt;br /&gt;
&lt;br /&gt;
See also the [http://www.wesnoth.org/forum/viewtopic.php?t=3022 forum discussion].&lt;br /&gt;
&lt;br /&gt;
== Diverging campaign path ==&lt;br /&gt;
=== Scenario 5A - Muff Malal's Peninsula ===&lt;br /&gt;
Scenario objectives: Kill the enemy leader.&lt;br /&gt;
&lt;br /&gt;
This is an easy scenario, and your aim here should be to build up your gold by controlling most villages, while earning experience against enemy forces. The enemy recruits bats to capture villages, and hordes of Walking Corpses to keep you busy.  The occasional Dark Adept can be dangerous on Hard difficulty, but is vulnerable to melee attack, especially from knights.&lt;br /&gt;
&lt;br /&gt;
One approach is to recall a few level 2 units supported by a mage. These units build a defensive position in the central part of the map, using hills and forest for cover, and hold off the first wave of Walking Corpses. Mounted troops capture villages in the north and west, and can charge down the flanks at daytime. A merman or two distract enemy bats and capture sea villages. If you can recall the merman that picked up the trident in Bay of Pearls, it will be able to dispatch bats easily on its own.&lt;br /&gt;
&lt;br /&gt;
During daytime, your main force advances to one of the villages in the south-east, where you wait for more Walking Corpses to attack. A level 2 melee unit (eg. Elvish Captain) can use the village defense bonus to survive attacks, and heal between turns. By the time it is low on hit points, it should be advancing to level 3.&lt;br /&gt;
&lt;br /&gt;
You should now control most villages and have some gold, so recruit or recall additional troops. Launch an offensive with your central force, supported by your horsemen advancing at the sides.  Don't forget to use Konrad in the attack.&lt;br /&gt;
&lt;br /&gt;
Try to attack with human units only at day, when the undead are at their weakest, and hold the lines with your elves at night.&lt;br /&gt;
&lt;br /&gt;
Early finish bonus for killing the enemy leader.&lt;br /&gt;
&lt;br /&gt;
See also the [http://www.wesnoth.org/forum/viewtopic.php?t=3178 forum discussion].&lt;br /&gt;
&lt;br /&gt;
=== Scenario 5B - Isle of the Damned ===&lt;br /&gt;
* Objective: Either&lt;br /&gt;
** Resist until turns run out, or&lt;br /&gt;
** Defeat all enemy leaders (special bonus)&lt;br /&gt;
* Lose if: Konrad dies.&lt;br /&gt;
* Turns: 28/26/24 (easy/medium/hard)&lt;br /&gt;
* Starting units: Konrad, Delurin (an Outlaw) and two Merman Fighters&lt;br /&gt;
* Other&lt;br /&gt;
** Thugs, Poachers and Footpads can be recruited in this scenario.&lt;br /&gt;
** Moremirmu, a White Mage with a special melee attack can be found in one of the temples in the middle of the map.&lt;br /&gt;
&lt;br /&gt;
Konrad is washed overboard during a storm, but is rescued by two mermen. You start out with 100 gold and cannot recall any units. You are joined by Delurin, a level 2 Outlaw.  In addition to Mermen, you can recruit his friends: Thugs, Poachers and Footpads. This is the only time in the campaign that these units can be recruited, but any outlaw units surviving this scenario can be recalled later. Your gold from Bay of Pearls (minus the usual 20% discount) is saved for the next scenario.&lt;br /&gt;
&lt;br /&gt;
Moremirmu is a White Mage with a holy sword which is very effective against undead. He is hiding in one of the three temples, and will join your cause if you find him. Beware: Xakae, a Revenant with a retinue of Walking Corpses, is waiting to ambush you in another temple. Moremirmu and Xakae are randomly placed; the third temple is always empty. Xakae and the Corpses can be a useful source of experience if you have the troops to deal with them.&lt;br /&gt;
&lt;br /&gt;
While your new units might seem weaker than your old troops, they are chaotic like their undead opponents and Thugs and Footpads deal useful impact damage. Use the Footpads effectively to hold your line and the Thugs to deal the main portion of the damage.&lt;br /&gt;
&lt;br /&gt;
Mermen can be used successfully to harass the undead in their rear. Typically the undead responds by withdrawing forces to deal with your mermen. Occasionally this tactic can be used to isolate and trap an undead leader while their forces are busy with your land troops. Don't expect the mermen to survive, though - their pierce damage does very little to the undead, especially at night. Mermen are also useful to hold the many isolated villages scattered throughout the map.&lt;br /&gt;
&lt;br /&gt;
Moremirmu is critical to winning but also quite fragile. He will die quickly if he is attacked by multiple undead.&lt;br /&gt;
&lt;br /&gt;
Early finish bonus for killing both enemy leaders. Moremirmu (and his holy sword) will join you in future scenarios only if both are defeated. There are only a few ways to achieve the early finish. One involves recalling mermen from the previous scenario, including the one with the magical trident, and sending them to kill the southern lich, while land troops attack the other.&lt;br /&gt;
&lt;br /&gt;
The other two center on Moremirmu. Get Moremirmu early, and send him along with a few footmen and thugs north, and use other units to draw fire. Meanwhile, secure the rest of the center of the map from the south. If Moremirmu can finish off the first Lich in time, send that group south -- it takes 10 turns to reach the other Lich, so you'll need to accomplish this by Turn 16! The alternative is to simultaneously send a large force south with Konrad, lure the Lich onto bad ground and surround it.&lt;br /&gt;
&lt;br /&gt;
See also the [http://www.wesnoth.org/forum/viewtopic.php?t=3179 forum discussion].&lt;br /&gt;
&lt;br /&gt;
== Scenario 6 - The Siege of Elensefar ==&lt;br /&gt;
* Objective: Defeat all enemy leaders.&lt;br /&gt;
* Lose if: Konrad dies or turns run out.&lt;br /&gt;
* Turns: 40/32/29 (easy/medium/hard)&lt;br /&gt;
* Starting units: Konrad, one veteran unit (typically an elf).&lt;br /&gt;
* Other&lt;br /&gt;
** A group of thieves/rogues join your party in the first few turns.&lt;br /&gt;
&lt;br /&gt;
Konrad arrives at the southern end of a large map. The island city of Elensefar dominates the center, and the cave of the necromancer Muff Jaanal is far to the north. The orcish warlord Agadla has taken the city. You know what to do!&lt;br /&gt;
&lt;br /&gt;
Your first objective is to retake the city. You could choose to charge across the bridges and fight your way onto the island, taking heavy casualties from the level 2 orcish warriors along the way - but casualties will probably be lower than if you do it the slow way. Or, you can lure the orcs into the water where they are easy to hit. Remember that mermen, especially the one with the Storm Trident, move quickly and defend quite well in water or on the bridges.  Whichever strategy you choose, remember that the undead are well on their way to join the orcs occupying the city.  Speed is a factor.&lt;br /&gt;
&lt;br /&gt;
Konrad will receive some help from the Thieves Guild. Apparently, an orcish occupation is bad for business. They will either show you a hidden ford onto the island, or attack the north gate after you take one of the island villages. Whether you choose to storm the city, and which aid to accept, depends in large part on how much of a hurry you are in.  Every turn, the undead march southward, and you'll have quite a fight on your hands after they reinforce the orcs in the city proper.&lt;br /&gt;
&lt;br /&gt;
After you defeat the orcs, you must fight your way north.  Fighting against the undead requires a different mix of units than fighting the orcs. Your mermen are too slow on land.  Horsemen and elvish units do reduced damage to skeletons.  Here, you need... mages.  Lots and lots of mages. And a paladin, if you've leveled a unit that high enough. Expect to spend many turns fighting through the northernmost six hexes. You are fighting in a cave, which slows your units down. Being underground, it is also treated as night for the time of day penalties.  Also, don't forget that mages can't take a lot of abuse, especially from melee attacks.  You will have to figure out how to use your less effective elvish units and horsemen to shield your mages.&lt;br /&gt;
&lt;br /&gt;
By now, you should have either Konrad or a level 2 elven fighter with the Leadership ability. A unit adjacent to a leader receives a +25% bonus to damage. Likewise, carefully position shamen or white mages in your lines so they can heal wounded units.  Two adjacent healers will heal each other.&lt;br /&gt;
&lt;br /&gt;
Early finish bonus for killing both enemy leaders.&lt;br /&gt;
&lt;br /&gt;
See also the [http://www.wesnoth.org/forum/viewtopic.php?t=3224 forum discussion].&lt;br /&gt;
&lt;br /&gt;
== Scenario 7 - Crossroads ==&lt;br /&gt;
* Objective: Defeat the north-eastern enemy leader.&lt;br /&gt;
* Lose if: Konrad, Delfador or Kalenz die, or turns run out.&lt;br /&gt;
* Turns: 37/34/31 (easy/medium/hard)&lt;br /&gt;
* Starting units: Konrad, Delfador, Kalenz.&lt;br /&gt;
* Other&lt;br /&gt;
** There are many enemies hidden in the mountains, placed at random.&lt;br /&gt;
** Two loyal units, an elf fighter and an elf archer, join you.&lt;br /&gt;
&lt;br /&gt;
There are two strategies: either to &amp;quot;run for it&amp;quot;, or &amp;quot;kill them all&amp;quot;.  Which you choose will probably depend on whether you want to earn lots of gold, or level up lots of units.&lt;br /&gt;
&lt;br /&gt;
If you choose to run,  recall two turn's worth of troops.  Most should be level 2, but you should recruit one or two units as sacrifical lambs. Having two healers (who will stay adjacent to each other for mutual healing) is almost a necessity. Move the units in formation (probably in two packs) along the road. Do not be tempted to move units into the mountains.  The increased defence is not worth the risk of triggering ambushes. Drive your way to the leader in the northwest, kill them, and reap the early finish bonus.&lt;br /&gt;
&lt;br /&gt;
The second strategy is to methodically destroy all enemy units on the map. Recruit two turns worth of units, and then drive south.  Overcome the southern leader, and recruit more troops in his castle.  Move back north, moving into every town and through the mountains, in order to trigger ambushes. This strategy is trickier to pull off, but careful management of your kills should allow you to level multiple units. (Just be careful not to run out of turns...)&lt;br /&gt;
&lt;br /&gt;
Note:  The first two villages on the screen that you will likely attempt to grab trigger an Elvish Fighter and Elvish Archer to join your party and warn you about the hills.  Keep in mind that they, too, are Loyal troops.&lt;br /&gt;
&lt;br /&gt;
See also the [http://www.wesnoth.org/forum/viewtopic.php?t=3281 forum discussion].&lt;br /&gt;
&lt;br /&gt;
== Scenario 8 - The Princess of Wesnoth ==&lt;br /&gt;
* Objective: Force Li'sar to surrender.&lt;br /&gt;
* Lose if: Konrad, Delfador or Kalenz die, or turns run out.&lt;br /&gt;
* Turns: 31/28/25 (easy/medium/hard)&lt;br /&gt;
* Starting units: Konrad, Delfador, Kalenz, and one veteran (typically an elf).&lt;br /&gt;
&lt;br /&gt;
Konrad's life now takes an interesting turn, as he meets the Princess of Wesnoth, Li'sar.  Instead of dying when you &amp;quot;kill&amp;quot; her, she surrenders.&lt;br /&gt;
&lt;br /&gt;
Li'sar is supported by troops from the Loyalist faction. Even your tough level 2 units make tempting targets for her lawful horsemen; they will charge and probably kill them.  Use terrain and position sacrificial level 1 screening units while the sun is high. Likewise, you can try for a quick kill by charging Li'sar with your own horsemen or knights.&lt;br /&gt;
&lt;br /&gt;
This otherwise straightforward battle is enlivened by reinforcements that Li'sar summons on turns 5 and 10.  Also, a level 2 Duelist will defend the Princess' honor when you approach her, appearing from the south of your position.  You can trigger his arrival by exploring the mountain with an entrance. Capture the villages on the eastern side as you cross the river, and position units to cover the north-eastern plain to prevent Li'sar's mounted units from capturing these villages.&lt;br /&gt;
&lt;br /&gt;
By the end of this scenario, you should have learned a painful lesson in how the computer player targets its attacks...&lt;br /&gt;
&lt;br /&gt;
See also the [http://www.wesnoth.org/forum/viewtopic.php?t=3401 forum discussion].&lt;br /&gt;
&lt;br /&gt;
[hipparchos] Patience is the key here. I send a couple of L2 horsemen north to take the northern villages, then cover your left flank. A couple of mermen swing south to take the southern ones, then cover your right flank. (The storm-trident merman stays on the village next to the mineshaft will deal with the Duellists.) But I put the bulk of my army on the west bank of the river, ''without crossing it''. Let the enemy come to you, because they will be much easier to defeat when they're standing in the river, and that's especially true as the Princess recruits L2 defenders later in the scenario. The bridge is the northern end of your main line, and Delfador can defend it easily with one other strong unit. Only after all the Princess's defenders have been defeated do you cross the river and take her keep.&lt;br /&gt;
&lt;br /&gt;
== Scenario 9 - The Valley of Death ==&lt;br /&gt;
* Objective: Survive for 12 turns.&lt;br /&gt;
* Lose if: Konrad, Delfador or Kalenz die.&lt;br /&gt;
* Turns: 12/12/12 (easy/medium/hard)&lt;br /&gt;
* Starting units: Konrad, Delfador, Kalenz, Moremirmu (if unlocked on the ''Isle of the Damned'' scenario).&lt;br /&gt;
* Other&lt;br /&gt;
** The map contains two holy water objects, useful for attacking undead enemies.&lt;br /&gt;
&lt;br /&gt;
There are two holy water bottles on the map. The unit which picks them up will have their melee attacks be holy for the duration of this scenario. These are especially useful for powerful melee units like Elvish Heroes or Champions which otherwise do little damage to the undead. Or, you could recruit Horsemen and have them grab the holy water.  They should easily level to level 2 Lancers or Knights, and maybe even to a Level 3 Paladin by the end of the scenario. As in previous scenarios, mages will be effective against most of the undead enemies.&lt;br /&gt;
&lt;br /&gt;
You'll be facing many level-2 undead. They're all dangerous but two kinds require special attention:&lt;br /&gt;
* Spectres (level2 ghosts) are fast in every terrain, somewhat hard to hit, resistant to all common kinds of damage, and have a draining attack. Attacking them in melee is not recommendend, killing them with arrows will eventually work but takes many arrows. They are vulnerable to arcane spells and fireballs, though.&lt;br /&gt;
* Walking Corpses: they're slow, they're weak, they're fragile. Usually nothing to worry about, but this time they're many. Hordes. Night of the Living Dead. A strong fighter will easily slay them, but that can become his downfall: an attacking corpse that gets killed makes room for the next corpse to move in and attack... and the next, and the next, and each one gets a few blows. Even a Paladin or Champion will eventually be overwhelmed, taking around ten or fifteen zombies with him. Whether you consider this to be a good exchange is up to you. Incidentally, something similar can happen between Paladins and level-1 Skeletons.&lt;br /&gt;
&lt;br /&gt;
The castle you start in is a well-defensible position, but all enemies arrive at about the same time. Once surrounded, you'll have very little wiggle room or inside tiles for your wounded units to retreat to. Filling the moat with Mermen might work a bit better, but their tridents won't impress the skeletons.&lt;br /&gt;
&lt;br /&gt;
You should consider attacking the southern enemy, then hole up in his castle and the surrounding hills. This increases the distance to the others: their troops will reach you later and they will be strung out, so you don't have to fight them all at once.&lt;br /&gt;
&lt;br /&gt;
If you don't have the money to recruit a large or powerful army, recruit a few Elvish Fighters and send them to the forest north of your castle. Their job is to slow the Revenant for several turns and then die gloriously. Flee with Konrad and the rest of your army to the south-east corner. If you're lucky, the WC horde will be too slow to reach you before the scenario ends. A cowardly tactic, yes—but you'll survive...&lt;br /&gt;
&lt;br /&gt;
If you played Isle of The Damned without killing both Liches, and Moremirmu survived, then he will reinforce you with three White Mage buddies between turns 7-10. You can't recall them after this scenario, so they are expendable.&lt;br /&gt;
&lt;br /&gt;
Another strategy, which requires to have Moremirmu to help you and allows you to kill the three Liches, is to recruit 2 horsemen (or recall their leveled up units) and as many thieves as you can, send each horsemen to gather the bottles of holy water, and kill with them the northern and eastern Liches; don't send them the horseman to the northern Lich too quick, because if you do his army will focus on it, and it won't reach the Lich. Move Konrad, Delfador, Kalenz, and your thieves towards the southeast corner. The thieves be used as a barrier to protect your more important units; place them in woods, mountains or villages(never in plains) as soon as they can, so that the northern and eastern Liches concentrate on them and leave Konrad and his group alone. With some luck you'll kill the northern and eastern Liches around the same turn that Moremirmu appears, and Konrad and his group will survive enough time to have one of Moremirmu's white mages kill the Southern Lich during day time.&lt;br /&gt;
&lt;br /&gt;
[edit: Viper] On medium, I found that I could only make this strategy work by save/loading &amp;lt;b&amp;gt;and&amp;lt;/b&amp;gt; by using knights or better for the Litches (as horsemen could not do the job in a single turn even hitting on every attack).&lt;br /&gt;
&lt;br /&gt;
Early finish bonus if you somehow manage to defeat all enemy leaders. If you do, feel free to boast about your accomplishment at the [http://www.wesnoth.org/forum/viewtopic.php?t=3402 forum discussion].&lt;br /&gt;
&lt;br /&gt;
== Scenario 10 - Gryphon Mountain ==&lt;br /&gt;
* Objectives: Defeat the mother gryphon and the enemy commander.&lt;br /&gt;
* Lose if: Konrad, Delfador or Kalenz die or turns run out.&lt;br /&gt;
* Turns: 27/24/21 (easy/medium/hard)&lt;br /&gt;
* Starting units: Konrad, Delfador, Kalenz&lt;br /&gt;
* Early finish bonus: 24 gold / turn&lt;br /&gt;
* Other:&lt;br /&gt;
** Killing the mother gryphon is optional, but doing it allows you to recruit gryphon riders in the future.&lt;br /&gt;
&lt;br /&gt;
Konrad starts in the lower left corner of the map.  General Robryn, commanding Loyalist troops, is in the upper right.  In the middle of the map, surrounded by mountains, is the Mother Gryphon and a few sleeping Gryphons.&lt;br /&gt;
&lt;br /&gt;
If you manage to kill the Mother Gryphon before the Loyalists do, you will have access to gryphon eggs, allowing you to to recruit Gryphon Riders in future scenarios.  Opinions differ as to whether their ability to capture far-flung villages, safely lure enemy troops, and ability to pierce the map shroud are worth their high cost.  Even if you decide not to attack the Gryphons, the enemy will—and then the wild beasts of the air might decide to attack you.  &lt;br /&gt;
&lt;br /&gt;
For a quick victory to earn the early finish bonus, head up the right side of the mountains.  To earn experience, head towards the Mother Gryphon, and the enemy will come to you.&lt;br /&gt;
&lt;br /&gt;
== Scenario 11 - The Ford of Abez ==&lt;br /&gt;
* Objective: Move Konrad to the north side of the river.&lt;br /&gt;
* Lose if: Konrad, Delfador or Kalenz die, or turns run out.&lt;br /&gt;
* Turns: 27/24/21 (easy/medium/hard)&lt;br /&gt;
* Starting units: Konrad, Delfador, Kalenz.&lt;br /&gt;
* Other:&lt;br /&gt;
** A storm trident is located in the middle of the river.&lt;br /&gt;
&lt;br /&gt;
The wide Abez river cuts across the middle of the map from left to right, with Konrad starting on the lower right side. Princess Li'sar starts on the lower left, and an orc band is on the north side of the river. Killing the Princess is meant to be impossible: she has plenty of troops as is, and if you actually get near her there will be numerous high-quality reinforcements. Do not even try to attack her, it will be a waste of good troops for no gain. Instead, fill the river with mermen: this is an excellent opportunity to get many of them leveled up.&lt;br /&gt;
&lt;br /&gt;
But first things first: your task is to get Konrad across the river. The chaotic orcs will attack from the north, the Princess's lawful Loyalists will attack from the south, and... a new enemy (alignment: hungry) will be attacking from downstream. All will happily fight each other if they ever meet, but with your army standing right between them in the middle of the river... it will pretty much seem as if everyone was out to get you.&lt;br /&gt;
&lt;br /&gt;
Remember those loyal mermen from in the Bay of Pearls? They should comprise your principal fighting force. Be sure to send one downstream to acquire the Storm Trident there. If you have some of the flying elvish units, they move and fight equally well over land or water. Wait for the Orcs and Humans to get into the water where the mermen have excellent defence while the landlubbers do not. &lt;br /&gt;
&lt;br /&gt;
Even if you have the money, don't recruit for more than two turns, otherwise Konrad might not even make it into the river. The scenario ends as soon as he makes it to the other side (off the beach and onto flat ground) -- by the time he gets there, there will be few orcs left on that shore, Kalenz and Delfador can well deal with them. If you recruit any land troops at all (healers perhaps?), make sure they have at least two moves in shallow water.&lt;br /&gt;
&lt;br /&gt;
This is an excellent opportunity to get your mermen some XP, and you don't really need the early finish bonus. &lt;br /&gt;
&lt;br /&gt;
Early finish bonus for getting Konrad onto dry land.&lt;br /&gt;
&lt;br /&gt;
See also the [http://www.wesnoth.org/forum/viewtopic.php?t=8716 forum discussion]&lt;br /&gt;
&lt;br /&gt;
== Scenario 12 - Northern Winter ==&lt;br /&gt;
* Objective: Defeat all enemy leaders (2 of them).&lt;br /&gt;
* Lose if: Konrad, Delfador or Kalenz die, or turns run out.&lt;br /&gt;
* Turns: 50/40/40 (easy/medium/hard)&lt;br /&gt;
* Starting units: Konrad, Delfador, Kalenz, a veteran (knight or mage).&lt;br /&gt;
* Early finish bonus: 47 / turn&lt;br /&gt;
* Other&lt;br /&gt;
** Snow falls on more and more tiles every turn, until the whole map is covered in snow by the time turns run out.&lt;br /&gt;
&lt;br /&gt;
This is a relatively simple scenario. The enemy will mostly raise level-1 wolf riders and orcish archers, plus the occasional level-2 Ogre or Troll. You can field a similar mix of mostly fresh recruits plus a few veterans. Throughout the scenario, the wolves will attempt to seize villages, often bypassing your forces: a few Elvish Scouts behind your lines will come in handy. Alternatively, your loyal Thieves can play hide-and-seek just as well. Don't overrecruit, though: there's only so many units you can actually bring to bear on the enemy. You've got enough time to win this twice, so you may chose to take it slow and milk this battle for experience. You'll still end this with more than enough gold in your coffers.&lt;br /&gt;
&lt;br /&gt;
== Scenario 13 - The Dwarven Doors ==&lt;br /&gt;
* Objective: Move Konrad to the entrance of the dwarven tunnels.&lt;br /&gt;
* Lose if: Konrad, Delfador or Kalenz die or turns run out.&lt;br /&gt;
* Turns: 26/20/15 (easy/medium/hard)&lt;br /&gt;
* Starting units: Konrad, Delfador, Kalenz, one experienced Rider, one outlaw unit (if you have any).&lt;br /&gt;
&lt;br /&gt;
You may defeat all enemy leaders if you feel like it, but this won't end the scenario. The sole winning condition is to get Konrad to the entrance of the Dwarven Kingdom. Actually, there are two entrances: the &amp;quot;Great Gates&amp;quot;, clearly labeled as such, and a less conspicious side entrance in the north-eastern corner. Only one of these is open, the other is blocked from the inside (determined at random).&lt;br /&gt;
&lt;br /&gt;
You start the scenario with one rider who suggests to scout ahead: that's a good idea, even though you may chose another unit for the task (the game picks the most experienced). If you happen to have a ''quick'' Lancer, it could be a good idea to use it for this purpose, but anyone reaching an entrance will tell you whether it's open or not.&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you played the Isle of the Damned, one of your outlaws will tell you about his uncle who used to have business with the dwarves, hiding in a village along the way (at position [18,24], you'd probably seize it anyway). The uncle is a loyal bandit who joins your troops; he also tells you which entrance to chose, main gate or mine tunnels. It pays off to actually read that dialog.&lt;br /&gt;
&lt;br /&gt;
The most minimalistic approach is to recruit one castle full of cavalry and RUN. The enemies have to cover some distance and cross difficult terrain in order to get in you way -- if Konrad starts running on turn one, he can move past them practically unopposed. It falls to the cavalry to bring up the rear: let them form a line somewhere near the Pillars of Thunedain while Konrad, Delfador and the other walkers keep going. Holding the line for a single turn is enough, then the riders may follow Konrad, leaving the pursuers behind and unable to catch up again (except for the wolves, but there shouldn't be many).&lt;br /&gt;
&lt;br /&gt;
You can still follow this basic principle if you recruit for two turns, adding a healer or two and perhaps some Rangers (their ambushes will stop many opponents). If you recruit for more than two turns, this will become a rather normal battle: your rearguard can no longer disengage, but will have to keep on fighting. There's nothing wrong with that, you can gain quite some experience that way, just don't forget the actual objective.&lt;br /&gt;
&lt;br /&gt;
It's useful to know that moving any unit close to the small lake near the main entrance (any position inside the square between [10, 10] and [15, 15]) will cause an aquatic monster to appear. It will attack anything that moves (including orcs and trolls) and poisons its victims, so watch out.&lt;br /&gt;
&lt;br /&gt;
Konrad needs to get into the mines. Scenario ends with early finish bonus as soon he does so.&lt;br /&gt;
&lt;br /&gt;
== Scenario 14 - Plunging into the Darkness ==&lt;br /&gt;
* Objective: Find the dwarves.&lt;br /&gt;
* Lose if: Konrad, Delfador or Kalenz die.&lt;br /&gt;
* Turns: Unlimited.&lt;br /&gt;
* Starting units: Konrad, Delfador, Kalenz.&lt;br /&gt;
* Other:&lt;br /&gt;
** Secret pasage in south-western part of the tunnel.&lt;br /&gt;
&lt;br /&gt;
In principle, this is quite simple. You cannot recruit and just have to walk down that corridor until you find the dwarves—you can't possibly miss them. You will be attacked by a few bats. They may hurt, that's all. This is mostly a lesson: see how slow Kalenz is in the caves? Notice his abysmal terrain defense? Clearly, this is no place for elves.&lt;br /&gt;
&lt;br /&gt;
Since you're reading this walkthrough, you'll also be interested in locating the secret passage leading to a chest of 200 gold pieces in the southwest. Just stick to the wall, step by step, and you'll eventually find it. However, said chest is guarded by a rather nasty spider: watch out! It's a level-3 beast that poisons and slows.&lt;br /&gt;
&lt;br /&gt;
After you're done with the bats, you can just sit there and wait until your men are healed again. There is no turn limit, after all. Once you found the secret door, do not get in. Step back a bit and the spider will rush out where you can attack her three to one. You should be able to kill her in a single turn, don't worry about getting poisoned—you won't die from poison and there are no other enemies left. However, if you fail to kill her quickly... you saved the game, didn't you?&lt;br /&gt;
&lt;br /&gt;
== Scenario 15 - The Lost General ==&lt;br /&gt;
* Objective: Kill all enemy leaders (there are two).&lt;br /&gt;
* Lose if: Konrad, Delfador or Kalenz die or turns run out.&lt;br /&gt;
* Turns: 64/60/54 (easy/medium/hard)&lt;br /&gt;
* Starting units: Konrad, Delfador, Kalenz.&lt;br /&gt;
* Other&lt;br /&gt;
** A loyal Dwarvish Ulfserker can be found by a merman in this scenario.&lt;br /&gt;
** If the allied dwarf leader is saved in this scenario, you will then be able to recruit Dwarvish Guardsman units.&lt;br /&gt;
&lt;br /&gt;
Moving underground is slow, especially for elves.  Their fighters and archers are also ineffective against undead.  Outriders and slyphs might be worth recalling, if you can afford them.  Likewise, gryphons and horsemen are bogged down.  Recruit dwarves for speed, and mages to back them up. (However, a Gryphon can pass the small pond quickly, and there are four towns on the other side.)&lt;br /&gt;
&lt;br /&gt;
You are fighting Lionel, a former general turned Death Knight, who starts trapped in the south.  To the west is the usual orc/troll force.  In the north is a dwarven ally, although if you are too slow they will be overwhelmed by the orcs. &lt;br /&gt;
&lt;br /&gt;
Dwarven fighters do well against the undead, while the Thunderers do best against the orcs and trolls.    If you choose to go for money, rush troops both south and north, reinforcing the native dwarves and triggering the appearance of the undead.  If you choose to go for experience, ignore the undead until you have killed the orcs, then return en masse to destroy the undead.  Don't take too long, as Lionel will break forth on turn 20.&lt;br /&gt;
&lt;br /&gt;
There are two ways to get to Lionel: an entrance opens in the pond on turn 19/20; and walls collapse when units move into tiles just south of the sign that says &amp;quot;Guest Quarters&amp;quot;, regardless of when this happens.&lt;br /&gt;
&lt;br /&gt;
If the dwarf leader survives (and you actually reveal him), Dwarvish Guardsman will become available. It is easy to underestimate the importance of these units. Their defensive capabilities can be greatly appreciated towards the end of the campaign, especially in the last two scenarios.&lt;br /&gt;
&lt;br /&gt;
Note: If you recall/recruit a merman and send it to the pond, then have it go to the whirlpool, it will arrive in a hidden cavern with a friendly ulfserker. Once your merman returns to the whirlpool through the other end, it will carry the ulf with it.&lt;br /&gt;
&lt;br /&gt;
== Scenario 16 - Hasty Alliance ==&lt;br /&gt;
* Objective: Defeat the enemy leader.&lt;br /&gt;
* Lose if: Konrad, Delfador, Li'sar or Kalenz die or turns run out.&lt;br /&gt;
* Turns: 33/30/27 (easy/medium/hard)&lt;br /&gt;
* Starting units: Konrad, Delfador, Kalenz.&lt;br /&gt;
* Early finish bonus: Killing enemy leader + 200 Gold from Li'sar&lt;br /&gt;
&lt;br /&gt;
Li'sar is about to attack, when you are surrounded by orcs and trolls.  She joins forces with you to defeat the troll leader, bringing her Royal Guards and 500 gold worth of allied troops to the struggle.&lt;br /&gt;
&lt;br /&gt;
Your greatest challenge will be to survive the first few turns, as the death of any of Konrad's companions will end the scenario.  &lt;br /&gt;
Once you have defeated the first wave, it is relatively easy to finish off any remaining trolls and move north to the troll leader.  Try and encourage your allies to go first and take the hefty damage from the Level 2 and Level 3 trolls, while your mages and dwarves get the experience for killing blows.&lt;br /&gt;
&lt;br /&gt;
The way I did it was to recruit a keep of thieves (the cheapest unit) and move Delfador and Kalenz out of the way. Then my allies were able to send help over so that I could get 'real' units on my second turn without suffering casualties. One thief survived and I got a Rogue with 36/56 XP by the end of the scenario! -CountPenguin&lt;br /&gt;
&lt;br /&gt;
== Scenario 17 - The Sceptre of Fire ==&lt;br /&gt;
* Objective: Capture the Sceptre of Fire with Konrad or Li'sar.&lt;br /&gt;
* Lose if: Konrad, Delfador, Li'sar or Kalenz die or turns run out.&lt;br /&gt;
* Turns: 50/45/35 (easy/medium/hard)&lt;br /&gt;
* Starting units: Konrad, Delfador, Kalenz, Li'sar.&lt;br /&gt;
* Early finish bonus: n/a&lt;br /&gt;
* Other:&lt;br /&gt;
** 300 gold gift from Li'sar.&lt;br /&gt;
** Milk this level for experience as there is no early finish bonus.&lt;br /&gt;
** Randomly generated map.&lt;br /&gt;
&lt;br /&gt;
The map changes each time, so if you're save-scumming, be sure to checkpoint right after the scenario starts, and replay once you know where the Sceptre is.&lt;br /&gt;
&lt;br /&gt;
There's three or four enemy leaders, depending on difficulty. The map is randomly generated; there's no telling how many villages there are and where... but more often than not, it's something like 25 villages and most will be placed where you can seize them early. The scenario certainly feels as if you're in for a major underground struggle, but the enemy leaders have little money to begin with and -usually- they won't have much of an income either.&lt;br /&gt;
&lt;br /&gt;
Usually there's two large tunnels going north, and quite often you meet little resistance in one, and quite a lot in the other -- though the latter still doesn't qualify as tough. You can gain quite some XP in the contested tunnel, just form a shieldwall with (mostly) guardians, play it safe, and you can level up some 4-8 dwarves. It's a good idea to station Kalenz here, his faerie fire will help a lot against the occasional lvl-3 Troll.&lt;br /&gt;
&lt;br /&gt;
Meanwhile, The Princess, Delfador, one healer and several of your better dwarves should move up the less contested corridor and scout the map. The Scepter usually is somewhere about 2/3rds up the map. You may encounter the occasional enemy... it's alright to buzz off in all directions, but make sure that everyone has a line of retreat and may receive support within a turn or two. &lt;br /&gt;
&lt;br /&gt;
The scenario ends as soon as Konrad or the Princess gets to the scepter. You may delay this a bit in order to milk a few more XP, but there's not that many more to be gained by then. All things considered, it's better to let Li'sar have the scepter -- she'll be with you until the end, she has no ranged attack, and while Konrad will often be held back by recruiting, Li'sar can be in the frontline from turn one.&lt;br /&gt;
&lt;br /&gt;
Note: When the earth rumbles, something actually happens. There are lava chasms in various places, and these grow when there is a rumble, so keep your units away.&lt;br /&gt;
&lt;br /&gt;
== Scenario 18 - A Choice Must Be Made ==&lt;br /&gt;
* Objective: Defeat either of the leaders.&lt;br /&gt;
* Lose if: Konrad, Delfador, Li'sar or Kalenz die or turns run out.&lt;br /&gt;
* Turns: 33/30/27 (easy/medium/hard)&lt;br /&gt;
* Starting units: Konrad, Delfador, Kalenz, Li'sar.&lt;br /&gt;
* Other:&lt;br /&gt;
** The next two scenarios are three different routes to the Elven kingdom, depending on the enemy leader you kill:&lt;br /&gt;
*** Northern (Orcish) leader: [[#Scenario 19A - Snow Plains | The Snow Plains]] where you can get the Flaming Sword (15-4, magical), followed by [[Scenario 20A - Home of the North Elves|Home of the North Elves]].&lt;br /&gt;
*** Southern (Undead) leader:  [[#Scenario 19B - Swamp Of Dread|The Swamp Of Dread]] where you can get the Void Armor (high resistance to blade, pierce, impact) , followed by [[Scenario 20A - Home of the North Elves|Home of the North Elves]].&lt;br /&gt;
*** If you take a merman east on the river to the edge of the map, you will brave [[Scenario 19C - The Cliffs of Thoria|Cliffs of Thoria]] which (used to be) an insanely difficult battle where you can find a loyal Sergeant (may become a level-4 leader). It will be followed by [[Scenario 20B - Underground Channels|Underground Channels]].&lt;br /&gt;
** Simply decide for one direction and block the bridge in the other direction unless you want to fight on two large fronts.&lt;br /&gt;
** First real chance to level gryphons.&lt;br /&gt;
&lt;br /&gt;
Scenario objectives: Kill either leader.&lt;br /&gt;
&lt;br /&gt;
Going south is the easiest way: the Orcs coming from the north may only cross the river at the bridge, a choke-point that's easy to block. In fact, a determined attack may defeat the undead before the bulk of the Orcs even makes it to the bridge. Fighting the Orcs in the hills will take longer while the undead can walk through deep water or fly over it, crossing the river wherever they like.&lt;br /&gt;
&lt;br /&gt;
Going south will also the most prudent choice when considering the possible goodies: currently, Li'sar goes into battle wearing lingerie. While a magic sword or a loyal leader might come in handy, you don't need them as badly as the Princess needs a suit of armor.&lt;br /&gt;
&lt;br /&gt;
The undead need to be dealt with even if you don't want to kill their leader. Delfador, Kalenz and Li'sar all have undead-killing ranged attacks (you ''did'' give her the scepter, didn't you?) &amp;amp;mdash; add two more Mages (one of them a healer) and three dwarfish Steelclads as bodyguards. Recruit those on turn one and move them to a position where they may receive the Chocobones' attack by dusk. You need at least steelclads in order to survive their charge. However, after the Chocobones are gone the remaining undead ought to be manageable even if you don't throw any more troops that way (though you may do so if you're after the undead and want this to be finished quickly). You may need a few turns' rest before you can tackle the Death Knight, but eventually your spellcasters should dispose of him quickly.&lt;br /&gt;
&lt;br /&gt;
In order to hold back the Orcs, a few elves plus a healer are enough to secure your end of the bridge; the Orcs will be reluctant to attack even level-1 archers during the day, and if you employ more and better troops (like, level-3 loyalists  in the woods and a few mermen in the water) the Orcs may not even attack at night. There's not much experience to be gained that way, though. If you want to actually fight the Orcs, you should get to the other side and meet them there. There's plenty of mountains, an excellent opportunity to get some more experience to your dwarves (you will have good use for high-level Dwarves later on). Dwarves, Gryphons and Orcs all have high defense in the mountains, so fighting will be slow.&lt;br /&gt;
&lt;br /&gt;
It will be a long walk to the northern leader even after you rubbed out his army. You might consider an assassination: send like 4-6 suicidal gryphons to his keep. Bonus points if you have a Silver Mage (teleport!). Of course, you can assassinate him without defeating his host first. just wait until his army is too far away to turn back and help him.&lt;br /&gt;
&lt;br /&gt;
Talking about Gryphons... this is the first time that you can really use them. Gryphons alone won't really impress the Orcs, not even when supported by leaders and healers (they're level-1 units, after all). They may however seize a few villages, harass and distract the enemy, track down wounded units and so on. You should certainly get a few.&lt;br /&gt;
&lt;br /&gt;
They must have changed this scenario. As of v 1.9.5 at medium level it's absurdly easy. I recruited just one keep (two paladins, two mages of light, and two griffons). Then charged for the undead leader (South) and wiped him and his evil minions out by the end of turn 9. The griffons didn't even get in the fight. The Orcs hadn't even reached the river bridge. ~ Sojourner, 4/16/11.&lt;br /&gt;
&lt;br /&gt;
== Diverging campaign path ==&lt;br /&gt;
=== Scenario 19A - Snow Plains ===&lt;br /&gt;
* Objective: Defeat the enemy leader.&lt;br /&gt;
* Lose if: Konrad, Delfador, Kalenz or Li'sar die or turns run out.&lt;br /&gt;
* Turns: 43/40/37 (easy/medium/hard)&lt;br /&gt;
* Starting units: Konrad, Delfador, Kalenz, Li'sar.&lt;br /&gt;
* Other:&lt;br /&gt;
** Obtain the Flaming Sword.&lt;br /&gt;
** Li'sar will tell you about her relationship with her mother.&lt;br /&gt;
&lt;br /&gt;
The main feature of this scenario, as its name suggests, is the terrain. Both armies will be slowed down by the snow. You may try recalling thieves and elves, who are not slowed down as much as other types of units. Another good choice is horsemen (Knights, Paladins, Lancers), which will have a field day, given that the enemy tends to scatter some of its units throughout the map where they will be sitting targets.&lt;br /&gt;
&lt;br /&gt;
You can find the Flaming Sword—a remarkable weapon of type melee-fire, magical, and with damage 15-4—on the great tree at [29,9]. You can equip it to one of your fighter heroes (Konrad, Kalenz, Li'sar) or any unit from the Elvish Fighter line, or to Paladins. A good idea is to give it to the unit you like to use the most in your front lines (but not to the same person with the Sceptre of Fire).&lt;br /&gt;
&lt;br /&gt;
The Orcish leader will have a good flow of income, so once you gain control of the map, you can milk the battle for experience, in case any of your units need it.&lt;br /&gt;
&lt;br /&gt;
=== Scenario 19B - Swamp Of Dread ===&lt;br /&gt;
*Objective: Defeat the main enemy leader (Lich Lord at the SW corner)&lt;br /&gt;
*Bonus Objectives: Defeat all the minor enemy leaders (4 Death Knights)&lt;br /&gt;
*Lose if: Konrad, Delfador, Li'sar or Kalenz die or turns run out&lt;br /&gt;
*Turns: 33/30/27 (easy/medium/hard)&lt;br /&gt;
*Starting units: Konrad, Delfador, Kalenz, Li'sar.&lt;br /&gt;
*Early finish bonus: 26/turn (on Medium difficulty)&lt;br /&gt;
*Other:&lt;br /&gt;
**Void Armor from one of the enemy leaders.&lt;br /&gt;
&lt;br /&gt;
The swamp of dread isn't all that dreadful. This is a 5-castle map and there are lots of undead, but they are mostly levels 0 and 1 - nothing like Princess' Revenge. The terrain is unfavorable (swamp and sand, but hampers the Undead as much as you; and if you have a preference for Gryphons or Merman, the mobility advantage will be yours.&lt;br /&gt;
&lt;br /&gt;
The swamp is good terrain for your Mermen. Those with attacks that hurt the undead (the ones with Storm Tridents, Netcasters, Priestesses...) or any level 3 unit can make quite a difference. However, be aware that the campaign is coming to an end and you'll probably have little use for Mermen in the following battles; so while the Mermen may well lend a hand, any experience they gain will effectively be wasted. (However, the next two levels do include rivers, so if you really insist you could still use Mermen later.)&lt;br /&gt;
 &lt;br /&gt;
One of the Death Knights (chosen randomly) drops the Void Armor when killed. The unit that picks it up will gain high resistance to physical damage (50% blade, 40% impact and 40% pierce, instead of whatever previous values they had). Since Li'sar is very vulnerable to precisely those types of damage, you should probably give her the armor. You might consider keep her in the center at first so she doesn't have to walk across the whole map if the armor appears at the other end. Note, however, that by the time you get the armor you're probably close to clearing the level anyway, so better to think of it as an end-of-scenario perk rather than an intermediary objective playing the scenario.&lt;br /&gt;
&lt;br /&gt;
Some of the Lich's power seems to be tied to the death knights; killing all four will hurt the Lich for about half its hit-points.&lt;br /&gt;
&lt;br /&gt;
Early finish bonus for killing all 5 enemy leaders.&lt;br /&gt;
&lt;br /&gt;
See also the [http://forums.wesnoth.org/viewtopic.php?f=39&amp;amp;t=10269 forum discussion].&lt;br /&gt;
&lt;br /&gt;
=== Scenario 19C - The Cliffs of Thoria ===&lt;br /&gt;
* Objectives:&lt;br /&gt;
*# Make it to the end of the river, to the east.&lt;br /&gt;
*# Reach the cave with Konrad.&lt;br /&gt;
* Bonus Objectives: Rescue the loyal Sergeant.&lt;br /&gt;
* Lose if: Konrad, Delfador, Li'sar or Kalenz die or turns run out.&lt;br /&gt;
* Turns: 55/50/45 (easy/medium/hard)&lt;br /&gt;
* Starting units: Konrad, Delfador, Kalenz, Li'sar, a Merman veteran.&lt;br /&gt;
* Early finish bonus: 27 per turn&lt;br /&gt;
* Other:&lt;br /&gt;
** Loyal Sergeant on SE corner island.&lt;br /&gt;
** A storm trident is located near the first two islands.&lt;br /&gt;
** You find small amounts of gold on each drake base you conquer.&lt;br /&gt;
&lt;br /&gt;
After a little spat between Kalenz and the merman you use to go east, you'll head for the Cliffs of Thoria. You'll find a long water level full of derelict vessels of the Queen. You'll also meet a Drake. After some conversation you discover that the Queens' forces attacked the Drakes, and now the Drakes will stop you from going forward. Since you have to move forward, you'll have to fight them.&lt;br /&gt;
&lt;br /&gt;
There are a number of small islands on this map with Drake bases. Each base will produce one Drake every few turns until one of your units occupies the base. This means that although the drakes may run out of money, they will never run out of reinforcements. In order to win this, you need to kill them faster than they spawn new recruits. No easy task.&lt;br /&gt;
&lt;br /&gt;
Further, if you find that you can't win in a direct assault and want to bypass the drakes by going through the swamps, you'll discover very powerful undead enemies guarding the shoreline. They won't move, but any casualty will be immediately replaced by a new unit. Clearly, that area is cursed. Just avoid the dark blue water. It's impossible to get into the swamps, any attempt will be a waste of time.&lt;br /&gt;
&lt;br /&gt;
There is an opportunity to pick up a wonderful loyal unit, although you may wish to skip the challenge if you don't have good gold reserves and a sufficient number of leveled-up mermen.&lt;br /&gt;
&lt;br /&gt;
Among the choices presented in the previous scenario, this map has historically been intended to be the hardest one of all. However, as of version 1.10.x, this map has been made significantly easier. The main difference is that now the drakes come out at a slower rate from their bases, and they are much more passive in general. With careful strategy and by progressing steadily through the map—not moving your gryphons ahead too quickly—you should be able to beat it without a lot of pain. At any rate, this scenario is no longer the monumental challenge it used to be.&lt;br /&gt;
&lt;br /&gt;
Hire many gryphons and Merfolk. Since each base creates a unit every few turns, to destroy a base you have to kill its occupant or wait until it flies towards one of your units, and then move a unit onto the base as quickly as possible, before a new drake comes out of it. Since Merfolk can't move onto mountains, you'll need  gryphons for that.&lt;br /&gt;
&lt;br /&gt;
Drakes are vulnerable to piercing and arcane damage, so elvish arrows can be useful, as can your healers as spellcasters, but don't get too many landlubbers—most of the fighting will happen in or over the water. Level-1 mermen will either die quickly or level up; high-level mermen will wreak havoc on the drakes. However, you need a good many level-2 mermen to begin with. Rookies alone cannot maintain the constant pressure you need, and the turn limit is short enough as it is.&lt;br /&gt;
&lt;br /&gt;
When you finally make it to the far side, you'll be told that the waterfall is impassable: you need Konrad to reach the marked &amp;quot;cave entrance&amp;quot; in the middle of the northern edge of the map. Start walking early, he'll take a while.&lt;br /&gt;
&lt;br /&gt;
A loyal leader can be found on the island at the South-Eastern corner of the map. He's badly hurt and poisoned, but you will probably have the time to clear the surroundings and level him up using the undead swamp guards.&lt;br /&gt;
&lt;br /&gt;
Comment: The decreased difficulty combined with the easily available XP in shape of the undead guards unbalances the rest of the campaign badly. If this is not intended, choose another road.&lt;br /&gt;
&lt;br /&gt;
== Divergent Campaign Paths ==&lt;br /&gt;
&lt;br /&gt;
=== Scenario 20A - Home of the North Elves ===&lt;br /&gt;
* Objectives:&lt;br /&gt;
* Konrad must reach the Lintanir forest, at the East of the map, and hold that position until a turn is over.&lt;br /&gt;
* Lose if: Konrad, Delfador, Kalenz or Li'sar die or turns run out&lt;br /&gt;
* Turns: 18&lt;br /&gt;
* Starting units: Konrad, Delfador, Kalenz, Li'sar&lt;br /&gt;
* Early finish bonus: 47 Gold per turn&lt;br /&gt;
* Other:&lt;br /&gt;
** Your base will be dismantled after the first turn&lt;br /&gt;
&lt;br /&gt;
You reach this scenario from either [[Scenario 19A - Snow Plains]] or [[Scenario 19B - Swamp Of Dread]].&lt;br /&gt;
&lt;br /&gt;
This is a very large map with some interesting challenges. First, Konrad needs to move all the way across to the right side, and if you're playing on Medium or Hard, you don't have many turns to waste. Second, Fog of War is turned on, so you won't know where the enemy is until you blunder into them.&lt;br /&gt;
&lt;br /&gt;
However, even in the fog you can see the terrain, including the enemy keeps. The Orcs start in the North central part of the map, while the humans begin in the South-East. What you can't see are the large hosts of level-3 units standing near their respective camps: these are the armies, and *they will not move* unless someone walks into their striking range. Getting at an enemy leader will be difficult indeed, but if you're content with moving past the armies you'll only have to cope with the level-2 vanguards seeking each other.&lt;br /&gt;
&lt;br /&gt;
You start with up to 3 loyal units which can move six or more hexes per turn (provided you kept this many alive), in addition to the 4 heroes (Konrad, Li'sar, Kalenz and Deflador). You many recruit an additional encampment of more troops (i.e. 6 more); it's probably best to get only riders, be they human, elf or gryphon. Most of them should be level-2 at least. If you want to bring a healer, get the fastest on your roster (a quick Elvish flyer, perhaps?) and make sure it's spawned at the right side of your keep.&lt;br /&gt;
&lt;br /&gt;
There is some dialogue to remind you that the winning condition is to move Konrad into the forest, while keeping Li'sar, Delfador and Kalenz alive; everyone else is &amp;quot;not important&amp;quot;. During the game, some Elvish riders will show up and happily demonstrate how sacrificing a single unit can keep many others safe; they do it so well that you probably don't need to sacrifice any units of your own, but now you know how it works.&lt;br /&gt;
&lt;br /&gt;
The dialogue makes you expect a large battle between Humans and Orcs, but no one tells you that the Elves (who have a keep in the woods) will also recruit a large force, and attack anyone in sight; you'll probably see your first Human warriors much later than you'd expect and find that they're busy enough fighting the elves. So you only really have to deal with the Orcs; once you're confident that they can't get at Konrad anymore, he can move on pretty much on his own. Your troops may turn around and fight the remaining Orcs, or join the Elves and steal a few kills there, or whatever. Have Konrad stop short of the forest to give your troops more time for fighting if you feel like it.&lt;br /&gt;
&lt;br /&gt;
Delfador will tell you when Konrad enters the domain of the Elves, but the scenario won't end then: you need to finish your turn and let everyone else have one last chance to attack your troops. If Konrad is still alive at the beginning of your next turn, you've won.&lt;br /&gt;
&lt;br /&gt;
See also the [http://forums.wesnoth.org/viewtopic.php?f=39&amp;amp;t=10270 forum discussion].&lt;br /&gt;
&lt;br /&gt;
=== Scenario 20B - Underground Channels ===&lt;br /&gt;
* Objective: Find the exit from the underground and move Konrad to it.&lt;br /&gt;
* Lose if: Death of Konrad, Delfador, Li'sar, Kalenz, or turns run out.&lt;br /&gt;
* Turns: 80/70/60 (easy/medium/hard)&lt;br /&gt;
* Starting units: Delfador, Kondrad, Li'sar and Kalenz.&lt;br /&gt;
* Early finish bonus: 54 per turn&lt;br /&gt;
&lt;br /&gt;
You start at the far South West of a large map, consisting of mostly cave, river and swamp areas. In the North West is a friendly Wose leader who will send a few level one Woses, and at the far North East is the entrance, and some friendly elvish units. In the middle is an ancient Lich who recruits level 2 and 3 undead, and in the South East is a small group of Saurians. &lt;br /&gt;
&lt;br /&gt;
This level is relatively easy, especially with the high-level Mermen you should have from the Cliffs of Thoria. You can recruit on keep of level 2 and 3 Mermen and Dwarves, and either run North and then East for a quick finish, bypassing most enemies, go East and then North, farming some experience from the Saurians, or slowly kill every enemy on the map before continuing. Be careful if you choose to fight the undead though, as the ancient Lich can kill most of your units in one turn, and his recruits, though not numerous, are powerful. If you choose to fight the undead, the mermen who got the tridents in previous scenarios, as well as any Mermaid Priestesses or Diviners will be extremely useful.&lt;br /&gt;
&lt;br /&gt;
See also the [http://forums.wesnoth.org/viewtopic.php?f=39&amp;amp;t=20315 forum discussion].&lt;br /&gt;
&lt;br /&gt;
== Scenario 21 - The Elven Council ==&lt;br /&gt;
This is a cut-scene furthering the storyline.  No combat takes place.&lt;br /&gt;
&lt;br /&gt;
== Scenario 22 - Return to Wesnoth ==&lt;br /&gt;
* Objective: Defeat all enemy leaders: 2 Loyalist Generals, 1 Orcish Warlord.&lt;br /&gt;
* Lose if: Konrad, Delfador, Li'sar or Kalenz die or turns run out.&lt;br /&gt;
* Turns: 31/28/25 (easy/medium/hard)&lt;br /&gt;
* Starting units: Konrad, Delfador, Kalenz, Li'sar.&lt;br /&gt;
&lt;br /&gt;
Three Halbardiers appear as enemy reinforcements in the lower southeastern corner of the map when you slay the nearest general, Josephus (just South of your encampment). The bridge across the river is a good place to establish a defensive position, since attackers have to use the beach and water hexes to attack. &lt;br /&gt;
&lt;br /&gt;
You can use the forests to your advantage: Elven troops are best in forest, while the Loyalists and Orcs are seriously slowed by the trees. On the other hand, nobody said your enemies will be that interested in frolicking in the forest when they have more accessible enemies outside of it.&lt;br /&gt;
&lt;br /&gt;
How about Gryphons? Your enemies will be recruiting level-2 and level-3 units, and the Halbardiers are level-3, so relying on a force of Gryphon riders, or even Gryphon masters, will probably not work out too well. However, a pair of Gryphons (especially quick ones) can work great for village captures, doubling as an effective diversion, especially with respect to the Halbardiers. Watch these heavy-hitters comically wading through the thick brush of the South-East forest as you fly circles around them.&lt;br /&gt;
&lt;br /&gt;
Your enemies aren't very rich, so while their recruits are powerful - they're also few in numbers.  This means their defensive formations will have gaps. Add the fact that, except for the Goblin Knights, your enemies are on the slow side, and you find that using mounted units could be opportune. The downside for these is the Halbardiers' first strike: A lancer or Knight taking ~38 damage before touching his enemy is not a pretty sight. Take these out with your heroes instead (Delfador, Kalenz and whoever has the scepter), or units with ranged attacks.&lt;br /&gt;
&lt;br /&gt;
See also the [http://forums.wesnoth.org/viewtopic.php?f=39&amp;amp;t=10272 forum discussion]&lt;br /&gt;
&lt;br /&gt;
== Scenario 23 - Test of the Clans ==&lt;br /&gt;
* Objectives: Either:&lt;br /&gt;
** Defeat all 4 enemy leaders (Grand Knights), or&lt;br /&gt;
** Kill (25/35/50) enemy units in total (on Easy/Medium/Hard difficulty)&lt;br /&gt;
* Lose if: Konrad, Delfador, Li'sar or Kalenz die or turns run out.&lt;br /&gt;
* Turns: 53/50/47 (easy/medium/hard)&lt;br /&gt;
* Starting units: Konrad, Delfador, Kalenz, Li'sar.&lt;br /&gt;
* Early finish bonus: 54 Gold per turn (on Medium difficulty)&lt;br /&gt;
&lt;br /&gt;
This is a large map against mostly Knights, Lancers, and Bowmen. The map is mostly open plains, which is an ideal battlefield for mounted units. The easiest way to complete the scenario is to keep all your units in one group and take them en mass to the enemy. Fast and powerful units like Grand Knights, Lancers or Paladins are important. Units with pierce attacks (Archers, Shydes, Knights) will deal high damage to the mounted enemy units (which have low pierce resistance).&lt;br /&gt;
&lt;br /&gt;
Expect heavy losses from the charge attacks, but don't fret, because this is the second-to-last scenario. You'll want to finish this scenario quickly to get a nice gold bonus for the next level.&lt;br /&gt;
&lt;br /&gt;
Reportedly, one way to win is to gang up on Bayar with fast units while attacking the south-eastern leader with the rest of your army.&lt;br /&gt;
&lt;br /&gt;
If you want to have a long field battle, you can put groups of Dwarves or Elves in the hills. The enemy will tend to attack the hills, thus giving you some advantage. Hills also make a relatively safe haven for healing your mounted units. Try to kill the South-Eastern leader early so you don't have to divert so many of your resources to the South flank.&lt;br /&gt;
&lt;br /&gt;
If you want to defeat all the clan leaders before killing the maximum allowed number of units (which ends the scenario), recruit a castle of Healers, then recruit a good force of Gryphon Riders. Grab as many villages as is safe, and then position your Gryphons on the deep water in the lake. The next castleful of recruits is your main army and two more Gryphon Rides. March this South, take out the South-Eastern leader, then send the two Gryphons to the group in the lake. &lt;br /&gt;
&lt;br /&gt;
As soon as the majority of the North-Western leader's troops move away from him, assassinate him with your Gryphons.  He should die in 1-2 rounds of attacks, assuming you don't lose too many of your troops.  In the South-East, recruit a couple of castles' worth of Gryphon Riders and send them west to take on the South-West (Black) leader, all the while keeping your main force just out of range of attackers if at all possible.  As your Gryphons cross the river on the offensive, the AI usually moves troops back in to defend with. You should be able to outrun these. Converge all the Gryphons you have left on the middle leader (Purple). I won around turn 25, giving me around 1600 gold to start the last scenario.&lt;br /&gt;
&lt;br /&gt;
An alternative strategy for defeating the enemy leaders relies on Li'sar being equipped with both the Scepter of Fire and the Void Armor. This makes her very difficult to hit and very effective against the mounted units (they have no ranged attacks, plus, if they try to lance her they're up against 26-4). What's more, the AI will tend to ignore her: Individual units will tend to not approach her, and groups will go after her escort if she has any. This means she can mount an effective attack together with a very small escort on the South-Eastern leader right away; and after that, the escort can pretty much leave her to go after the Black leader in the South-West alone. In the mean time, A force of Knights or Gryphons might go forward to dispatch the North-Western leader. Then whoever i's left converges on Bayar in the West.&lt;br /&gt;
&lt;br /&gt;
See also the [http://forums.wesnoth.org/viewtopic.php?f=39&amp;amp;t=10273 forum discussion].&lt;br /&gt;
&lt;br /&gt;
== Scenario 24 - The Battle for Wesnoth ==&lt;br /&gt;
* Objectives: Defeat Asheviere (thus claiming the throne for Li'sar)&lt;br /&gt;
* Lose if: Konrad, Delfador, Kalenz or Li'sar die or turns run out&lt;br /&gt;
* Turns: 60&lt;br /&gt;
* Starting units: Konrad, Delfador, Kalenz, Li'sar, as many Grand Knights as you defeated in the last map&lt;br /&gt;
* Early finish bonus: 46 gold per turn (and what's that good for, exactly?)&lt;br /&gt;
&lt;br /&gt;
One good strategy for this scenario is to set up a defensive line around your fort, and let the enemy come to you. You'll want to make sure the units on your front line can survive the beating they receive for at least one turn, after which you rotate them with freshly healed units. Don't attack the attackers if it means your unit won't have enough HP to survive the next thrashing. Three or Four healers will be needed behind the lines, and keep them fully occupied (remember that healers will heal every unit adjacent to them for 8 HP. They're like walking sets of 6 villages). &lt;br /&gt;
&lt;br /&gt;
For front-line units, Dwarvish Guardsman, even Level-1, are excellent; they'll take a good beating but not lose too many HP because of their steadfast attribute, on top of their basic resistance to Pierce (read: lance) attacks. Because they don't lose many HP, they'll also heal quickly. Only attack the enemy if no HP will be lost. Guardsmen can throw a spear at the attacker on every turn if the attacker has no ranged attack. &lt;br /&gt;
&lt;br /&gt;
Other units that are good for the front line are any unit with more than 50 HP. Elvish Marshals will make your Dwarvish Guardsmen or Stalwarts even more awesome. Dwarvish Lords have an incredible 79HP and can dish it out back to the enemy. Unfortunately, after a good thrashing, these units will take a long time to heal back up because of the large number of HP lost.&lt;br /&gt;
&lt;br /&gt;
If you have any Assassins, rotate them up and down the line, poisoning enemy units. The enemies have very few villages available to them in your vicinity, so with three Assassins you can poison half the army until the enemies have a bunch of level three units walking around with 1HP each.&lt;br /&gt;
&lt;br /&gt;
Once the enemy has no army left, you can just wander up to Asheviere and discuss her resignation over a cup of hot tea. Asheviere has exactly 48 HP, so three hits of a 16-damage weapon, like the Scepter, or four 12-damage hits, is enough for the kill. Or you could surround her with Elvish Shamans and get the last little bit of fun juice out of this game.&lt;br /&gt;
&lt;br /&gt;
A quick assassination can even be performed by Master Gryphons or even sometimes Gryphon Riders: Recruit six of them, right on Turn 1, and send them South. You'll &lt;br /&gt;
easily elude the forces of the Eastern general and reach the river (or just past it). Moving in for the kill, however, might prove more difficult than you think - unless you've used an effective distraction. Sending out six-packs of Knight recruits each turn works well. Asheviere herself will not have many troops surrounding her for protection, and might actually be stupid enough to leave her castle to attack your Gryphons. One has to wonder how she's held on to the throne this long with such a poor sense of judgement. You'll probably want to approach her from the South-West, as right South of her is the bridge on which the loyal Weldyn troops will be coming to get you.&lt;br /&gt;
&lt;br /&gt;
Using this strategy it is possible to win within 6-7 turns, without any significant losses. If, however, you've not distracted well enough, Asheviere may divert up to half of her forces to get your Gryphons. But in this case, again - congratulations, you've won: You should have still about 20 living Knights to storm the city with, while too many of her troops are stuck finishing their roast Gryphon sandwiches. &lt;br /&gt;
&lt;br /&gt;
Of course, in both of the above cases you would be relying on a good bonus from [[Test of the Clans]], which should be enough to win this scenario in any which way.&lt;br /&gt;
&lt;br /&gt;
Another humorous brute-force way to win this battle is by relying purely on the diversion tactic mentioned above: An all-Knight rush. Knights are quite possibly the only Level-2 unit you can ever recruit in the mainline campaigns; with roughly 1,500 Gold from the plains battle, just send out loads of Knights to massacre the enemy with suicidal attacks. Just make sure to keep your heroes out of harm's way... It'll be a very bloody, but relatively short, win.&lt;br /&gt;
&lt;br /&gt;
See also the [http://forums.wesnoth.org/viewtopic.php?f=39&amp;amp;t=10271 forum discussion].&lt;br /&gt;
&lt;br /&gt;
== Scenario 25 - Epilogue ==&lt;br /&gt;
&lt;br /&gt;
[[Category:Campaigns - Walkthroughs]][[Category:Campaigns - Heir to the Throne]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=WesnothRepository&amp;diff=51535</id>
		<title>WesnothRepository</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=WesnothRepository&amp;diff=51535"/>
		<updated>2013-07-01T16:21:19Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: remove a reference to subversion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Compiling Wesnoth}}&lt;br /&gt;
&lt;br /&gt;
The Battle for Wesnoth code base is stored in a version control repository. Version control allows the entire dev team to edit files concurrently. The software tracks revisions, stores a record of all edits, revents simultaneous editing from causing clashes. All changes are stored in the version control repository. &lt;br /&gt;
&lt;br /&gt;
When a release is planned, the current set of the files in the repository is frozen, given a release number, and shipped out to the world at large. Then, as files continue to be edited by the developers, the repository code advances past that point. The repository (or &amp;quot;repo&amp;quot;) version is by definition the most up-to-date version of the code.&lt;br /&gt;
&lt;br /&gt;
The Wesnoth repository uses Git and lives at https://github.com/wesnoth/wesnoth-old&lt;br /&gt;
&lt;br /&gt;
==  Git ==&lt;br /&gt;
&lt;br /&gt;
Git is the most widely used open-source version-control system. You can learn more about it at the Git home page, http://git-scm.com/.&lt;br /&gt;
&lt;br /&gt;
Git replaced Sub&amp;amp;shy;&amp;amp;shy;version as Wesnoth's version control system in March 2013. Sub&amp;amp;shy;&amp;amp;shy;version had itself previously replaced an older program called &amp;quot;CVS&amp;quot; or &amp;quot;concurrent versioning system&amp;quot; in 2005. These earlier systems have left a few traces in the version history which you might encounter; some older documentation and a few files refer to them.&lt;br /&gt;
&lt;br /&gt;
==  Browse the code  ==&lt;br /&gt;
&lt;br /&gt;
There are currently two main streams of development: trunk (1.11.x) and stable branch (1.10.x). Most other branches are only used for a short time to do some testing without disturbing the main development. You can use your web browser to navigate through the source code:&lt;br /&gt;
&lt;br /&gt;
https://github.com/wesnoth/wesnoth-old&lt;br /&gt;
&lt;br /&gt;
==  Download  ==&lt;br /&gt;
&lt;br /&gt;
To check out a read-only copy into a directory called ''wesnoth-code'',&lt;br /&gt;
&lt;br /&gt;
 git clone git://github.com/wesnoth/wesnoth-old.git wesnoth-code&lt;br /&gt;
&lt;br /&gt;
==  Commit access  ==&lt;br /&gt;
&lt;br /&gt;
For commit access, you must have a developer account on GitHub, it must be registered as part of the Wesnoth group, and you must check out with:&lt;br /&gt;
&lt;br /&gt;
 git clone git@github.com:wesnoth/wesnoth-old.git wesnoth-code&lt;br /&gt;
&lt;br /&gt;
==  Update  ==&lt;br /&gt;
&lt;br /&gt;
Do this from inside the ''wesnoth-code'' directory &lt;br /&gt;
&lt;br /&gt;
 git pull&lt;br /&gt;
&lt;br /&gt;
== Reviewing your changes ==&lt;br /&gt;
&lt;br /&gt;
Before committing, it's always wise to run&lt;br /&gt;
&lt;br /&gt;
 git diff&lt;br /&gt;
&lt;br /&gt;
and look at the output. Some kinds of mistakes that are hard to see embedded in all the code you have modified are more easily spotted in the isolated diff lines.&lt;br /&gt;
&lt;br /&gt;
== Generating patches ==&lt;br /&gt;
&lt;br /&gt;
Under Git on a Unix-like operating system, you'll typically do&lt;br /&gt;
&lt;br /&gt;
  git format-patch HEAD~1..HEAD&lt;br /&gt;
&lt;br /&gt;
or something similar; &amp;quot;HEAD~1&amp;quot; may be replaced by a hash or symbolic reference to any earlier revision. This will produce one or more patch files, numbered and endingth with the extension &amp;quot;.patch&amp;quot;.  See [[PatchSubmissionGuidelines]] for more on how to get these merged into the public repository.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[CompilingWesnoth]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=TheRiseOfWesnoth&amp;diff=51467</id>
		<title>TheRiseOfWesnoth</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=TheRiseOfWesnoth&amp;diff=51467"/>
		<updated>2013-06-21T00:29:19Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* Clearwater Port */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Strategy Guide for The Rise of Wesnoth Campaign ==&lt;br /&gt;
&lt;br /&gt;
===Campaign strategy===&lt;br /&gt;
&lt;br /&gt;
Over the course of this campaign, you will need to level up to some:&lt;br /&gt;
&lt;br /&gt;
* Healers: White Mages/Mages of Light (at least four)&lt;br /&gt;
* Undead killers: Paladins (two)&lt;br /&gt;
* Mobile strikers: Silver Mages (at least one, preferably more), Grand Knights (several), Fugitives (one or more helps)&lt;br /&gt;
* Damage sinks: Royal Guards, Iron Maulers, Highwaymen, Halberdiers, level 3 Burin, and again Grand Knights&lt;br /&gt;
* Leaders: level 3 Haldric, level 3 Lady Outlaw, and much later level 3 Commander Aethyr &lt;br /&gt;
* Ranged attackers: Great Mages (can use several in the last scenario), Longbowmen/Master Bowmen (two), Trapper/Huntsman (one is helpful)&lt;br /&gt;
&lt;br /&gt;
A Mage of Light, one Paladin, and five Grand Knights make a perfect assault team!&lt;br /&gt;
&lt;br /&gt;
Although Horsemen are key for the first three or four scenarios, it's important not to be too reliant on horse units through the middle part of the campaign, as there are many hard levels underground, in swamps, in water, or against Saurians; use XP from the scenario ''The Vanguard'' to get to 2 Paladins and 2+ Grand Knights.&lt;br /&gt;
&lt;br /&gt;
Don't overlook Pikemen/Halberdiers, which are useful in many levels; pierce attacks work well against Drakes and against the dragon, and they are handy for defensive roles especially repelling Wolf Riders. They are less good against undead, though, and don't get that +1 MP Royal Guard speed bonus.&lt;br /&gt;
&lt;br /&gt;
Due to many undead opponents, you will want to recruit many Thugs at times, and get a few (the quick ones, since you need them underground) leveled up. Footpads help too, once leveled up. Due to swamps, you will sometimes be spamming Poachers, which get marksmanship once at level 3. These, plus Lady Outlaw, give tactical options at other levels too: some decent chaotic troops form an ideal reserve, since you can attack with your lawful troops at dawn, and by nightfall when you need to heal them, use some chaotic troops to either continue the attack or to shield your healing lawful units.&lt;br /&gt;
&lt;br /&gt;
Here are some recommended units to have obtained by specific scenarios:&lt;br /&gt;
&lt;br /&gt;
2. The Fall - 1 Knight&amp;lt;br&amp;gt;&lt;br /&gt;
3. A Harrowing Escape - 1 White Mage, 2 Knights, plus about-to-level troops&amp;lt;br&amp;gt;&lt;br /&gt;
4a. The Midlands - avoid, go to The Swamp of Eden instead&amp;lt;br&amp;gt;&lt;br /&gt;
4b. The Swamp of Eden - level 2 Haldric, level 2 Lady Outlaw, 2 Knights, 2 Shocktroopers&amp;lt;br&amp;gt;&lt;br /&gt;
6. Temple of the Deep - level 3 Haldric, level 3 Burin, 1-2 Mages of Light or several Outlaws / quick Bandits&amp;lt;br&amp;gt;&lt;br /&gt;
8. Clearwater Port - level 3 Lady Outlaw, 3 White Mages / Mages of Light, 3 Iron Maulers / Royal Guards / Halberdiers&amp;lt;br&amp;gt;&lt;br /&gt;
12. A Final Spring - 1-2 Silver Mages&amp;lt;br&amp;gt;&lt;br /&gt;
14. Rough Landing - the 3 loyal Mermen from the previous scenario, ''Peoples in Decline''[glandis] In 1.8.6, there was no opportunity for 3 loyal mermen - maybe this was in an older version? And only Merman fighters can be recruited - no Netcaster upgardes are possible&amp;lt;br&amp;gt;&lt;br /&gt;
17a. The Dragon - up to 4 White Mages / Mages of Light&amp;lt;br&amp;gt;&lt;br /&gt;
17d. Cursed Island - 1 Paladin&amp;lt;br&amp;gt;&lt;br /&gt;
19. The Vanguard - 4 Knights/Lancers/Grand Knights, 2 Paladins (or about-to-level Knights)&amp;lt;br&amp;gt;&lt;br /&gt;
20. Return of the Fleet - 1 Mermen Entangler, 1 Merman Triton with Storm Trident, level 3 Commander Aethyr desirable&amp;lt;br&amp;gt;&lt;br /&gt;
22. The Rise of Wesnoth - 2 Paladins, 3 Royal Guards, 4 Mages of Light&lt;br /&gt;
&lt;br /&gt;
Because the campaign is long and you won't be able to recall all your level 3's in the final scenario, it pays to create some &amp;quot;uber-units&amp;quot;. An example is a quick, resilient Silver Mage that has been AMLA advanced a few times.&lt;br /&gt;
&lt;br /&gt;
==Scenarios==&lt;br /&gt;
===A Summer Of Storms ===&lt;br /&gt;
&lt;br /&gt;
This is a relatively easy scenario, so gear your recruitment and strategy with an eye towards gathering XP.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
# For the first round, recruit 2-3 Horsemen and the rest can be all Spearmen or a mix of Spearmen and Bowmen as you see fit.&lt;br /&gt;
# Then, you should probably hire Bowmen and more Spearmen. Whatever Bowmen you can get advanced will be useful later on for fighting the many trolls, grunts, and riders you will encounter. Note, however, that you will not have any healers until you level up at least one mage to White Mage status, and the sooner you can do that the better. Red mages will also prove very useful in subsequent scenarios, so consider recruiting at least two mages.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* Players have used at least three strategies with success...&lt;br /&gt;
# The &amp;quot;over the bridge&amp;quot; strategy: Send the horsemen with the king over the bridge, and the others should follow or start going over the mountain, to avoid being attacked from behind. Send subsequent Spearmen and Bowmen on the &amp;quot;over-the-bridge&amp;quot; road, and when the Prince and final troops have just about caught up, march on the enemy camp.&lt;br /&gt;
# The &amp;quot;hide in the swamp&amp;quot; strategy: Proceed much like the above, but send the king with 3 Horsemen to capture the nearest houses, then retreat into the swamp area until you have your lawful bonus to kill off troops during the day. To hold them back, you can use a Spearman and a Mage (to level him.)&lt;br /&gt;
# &amp;quot;Sandbagging&amp;quot; strategy: On the hardest difficulty level, the initial enemy assault will only be easy to handle by entrenching your troops behind the river. Use the king to block the bridge initially, while Spearmen handle the shoreline just north and Horsemen carefully flag villages across the river. Run the king around, lending his leadership as you massacre the stupid enemy troops that have jumped like lemmings into the water. &lt;br /&gt;
* For all these options, you will also need to send a squad north into the mountains and around into the flank of the enemy. A quick Spearman, a quick Bowman, and one other unit, possibly a quick Mage, should be more than sufficient.&lt;br /&gt;
* When you see that the fronts are under control, stop recruiting and send prince Haldric and your Mages over the bridge on a quest for XP, assisted by the leadership of the king, and converge on the enemy camp.&lt;br /&gt;
&lt;br /&gt;
===The Fall===&lt;br /&gt;
&lt;br /&gt;
This is a scenario that looks scary, but it is only moderately difficult with proper recruitment and strategy.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* Recall or recruit Spearmen and Bowmen to man the lines.&lt;br /&gt;
* Horsemen/Knights are desirable, because you probably do not yet have a White Mage, and the villages are widely spaced.&lt;br /&gt;
* Recalling or recruiting Mages for XP gathering is highly advisable for future scenarios.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* There are three basic approaches to take out the outlaw leader...&lt;br /&gt;
# &amp;quot;Brute force&amp;quot; strategy: You can march west with a large army and use part of it to hold northwestern orc. Use the rest to fight outlaws and kill the leader. This strategy requires a lot of troops but it can bring you plenty of experience and can bring a quick victory.&lt;br /&gt;
# &amp;quot;Assassination over the bridge&amp;quot; strategy: You can assassinate the outlaw leader. One way is to wait until the orcs have killed almost all outlaws and then assassinate the outlaw leader with Knights, rushing over the enemy camp's bridge and into the keep. This strategy is risky because orcs can kill the leader before you.&lt;br /&gt;
# &amp;quot;Assassination via the mountain pass&amp;quot; strategy: Another way to assassinate the leader is to send a squad through the southern mountains to the outlaw keep. Two Mages and three Spearmen are enough. You may wish to substitute one of the Spearmen with a Knight or Horseman, though horse units have only a narrow passage devoid of mountains and could get pinned by the enemy.&lt;br /&gt;
* On the hardest difficulty level, you may be forced to assassinate. For either of the assassination strategies, it is a good idea to fight against the northeastern orc nearby your keep. This way, you can secure your back and earn experience.&lt;br /&gt;
&lt;br /&gt;
Hints...&lt;br /&gt;
&lt;br /&gt;
* Saving the loyal Heavy Infantrymen (or Shock Troopers on easy) pays off in later scenarios. To save all three, move them south towards the outlaws.&lt;br /&gt;
&lt;br /&gt;
* Once you eliminate the HP of the Lady Outlaw, she offers to help you. If you say yes, she comes back as a loyal unit in future scenarios and you will be able to recruit outlaw units, plus she cannot be killed in the next couple of scenarios (instead, she disappears when she goes to zero HP, and comes back the next scenario.) This is quite valuable. If you say no and try to kill her, you find out she cannot be killed. However, you do get 200 gold that she leaves behind.&lt;br /&gt;
&lt;br /&gt;
* Heads up: The following scenario (''A Harrowing Escape'') is a handful on the hardest difficulty level. On hard, a carryover of almost 150 gold (so you have 250 starting gold) would be wise, so although Lady Outlaw's assistance is worth much more than 200 gold, you may be forced to choose the gold. Another thing you need to beat the following scenario on hard is a White Mage at or near the start of the scenario. Also, about-to-level units will be especially nice for their self-healing ability and low initial upkeep. Steer XP accordingly.&lt;br /&gt;
&lt;br /&gt;
===A Harrowing Escape===&lt;br /&gt;
&lt;br /&gt;
This scenario is much easier on lower difficulty levels, calling for different strategies.&lt;br /&gt;
&lt;br /&gt;
On easy/medium...&lt;br /&gt;
* Recruitment: You should recruit/recall at least one, possibly two Mages here, and use them for killing Goblin Spearmen and finishing off injured Wolf Riders in the hills &amp;amp; mountains bordering the valley. Other than the Mages, simply recruit what you want, and go along the road. You get enough villages to pay upkeep for quite some army, and can give some of them a bit of experience.&lt;br /&gt;
* Strategy: Leave a few units in the rear, as the enemy can cross hills quickly. Note that Footpads and Outlaws will also cross hills at reasonable speed, if you need to hunt down some units. There are two castle tiles about halfway down, try to send Lady Outlaw and Brunin the Lost to them, they make good guards in case the enemy tries to come straight up. You can also send a couple groups of units down southeast to the lake, so you can prevent the Green team (southeast) from coming up the river. You can also kill the two Orcish Grunts (or Warriors on medium) on the southern castle tiles and then move Lady Outlaw and Brunin to them.&lt;br /&gt;
&lt;br /&gt;
On hard...&lt;br /&gt;
* Recruitment: To beat this scenario on the hardest difficulty level, you need some level 2 (or better yet, about-to-level level 1) units already and a lot of starting gold. It is possible with ~200 starting gold, but only barely. 250+ is better. You can stretch your gold a bit by not going negative on upkeep and waiting until you can't wait any longer to do one last round of recruiting, recalling mostly level 2's. For timing your final recruitment, watch the wolves that are likely trying to flank through the mountains south of your keep. Another requirement for beating this scenario is a White Mage (or two.) If need be, you must promote a Mage (or two) &amp;lt;i&amp;gt;tout de suite&amp;lt;/i&amp;gt;, as you will be dealing with severe damage and assassins, while only having easy access to 2 or 3 villages initially. Horsemen and Knights are useful for dissipating damage by serving as meat shields against blades and then running off to remote villages to heal. Quick Horsemen are especially nice, as they can transfer between two strategically placed villages in one turn, for healing on the go. Horsemen, Knights, and Swordsmen are useful for swatting assassins. &lt;br /&gt;
&lt;br /&gt;
* Strategy: More important than terrain is avoiding getting flanked, so mobility of individual units is key; if you climb up deep into the mountains, you will have a harder time with mobility than staying on or near the valley floor. Additionally, many of your units cannot go on mountain hexes, so it's easier to maintain your lines if everyone stays close to the valley. Near the start of combat, it's crucial to kill units quickly on the road: first the wave of wolves, then the wave of assassins. In contrast to easy and medium, on the hardest difficulty level both pairs of roadside castle tiles are guarded, not just the second pair. As on medium, the guards are Orcish Warriors.&lt;br /&gt;
&lt;br /&gt;
Hints...&lt;br /&gt;
* On medium/hard, you can lure out the roadside guard Warriors one at a time by putting a unit within attack range of one (and out of range of the other.) They mostly come at night. Mostly. That is, the Warriors might not bite bait put out during the day.&lt;br /&gt;
&lt;br /&gt;
* If you have Lady Outlaw, note that she has leadership, which will be useful to help promote Prince Haldric, if he is still level 0. It's worth advancing her to level 2, to continue to provide leadership to level 1 Haldric and your other level 1's. You may also make use of her odd ability &amp;quot;distract&amp;quot;, which allows adjacent allied units to ignore ZOCs. And Lady Outlaw allows you to recruit outlaw types. On hard especially, Thugs can be useful as meat shields and to provide strong attacks at night when your lawful forces are crippled. Remember too that Lady Outlaw cannot be permanently killed (at least not yet), so when desperate times call for desperate measures, you can move her into a suicidal position.&lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
&lt;br /&gt;
* The scenario can be beaten on hard with 154 gold only (I decided to trust the lady). Key points in the strategy I used:&lt;br /&gt;
** Underrecruited as heavily as possible, so that the upkeep of my current units was completely offset by my villages. Only 2 footpads to go for Burin and villages down the path right at the start. Only level 2 unit I recalled initially was a white mage. Recalled the 3 loyal HI and tried to arrange it so that they aren't attacked by archers. Recruited several thieves, since they are cheap and the grunts are font of attacking them instead of my mages (and they still often survive on 70% def).&lt;br /&gt;
** During the main phase of the battle, stayed on the safe side of the river (this was the actual key point). Used the river, mountains, castle and swamp to have good defense for myself and bad one for the orcs. As shortly as possible before my income turned negative, recruited/recalled an additional 5 units. Needed to give up the village abroad the river as well (so only 3 villages left).&lt;br /&gt;
** What also helps as well is the fact that there are two enemy sides as opposed to a twice as strong single enemy side. If one of your units could be attacked by 3 enemies, but 1 of these hexes is currently blocked by the other side, the currently moving enemy decides to attack units which it (they) is (are) actually less likely to kill than that one. AIs don't cooperate, that is.&lt;br /&gt;
&lt;br /&gt;
* There is Dwarf Steelclad in the village at 8,5. It's not far from your camp, so send Lady Outlaw there. Dwarf joins you because &amp;quot;It has been a long time since he felt the satisfying crunch of Orcs under his Axe.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* After you kill the first orc leader, an Orcish Slayer and two Assassins will pop out of nowhere, so you would be wise not to have any wounded units stuck without movement points at that point. Also, the other leader will get an infusion of gold and start recruiting on all available hexes, so if you can sit on some of those hexes first, it will help keep the situation from getting out of control.&lt;br /&gt;
&lt;br /&gt;
* At the end, you will be given the choice of the river/swamp road or the midlands/orc road. These fork to the scenarios ''The Swamp of Esten'' and ''The Midlands'', respectively. The swamp scenario is relatively easy, while ''The Midlands'' could cost you some leveled units or even prove impossible to beat if you are low on gold. Also, the swamp gives you a free loyal White Mage, so it's a no brainer, unless you want more of a challenge.&lt;br /&gt;
&lt;br /&gt;
* Heads up: it would be wise to have at least 1 Mage either levelled up to White or about to level up before going to the scenario ''The Swamp of Esten''.&lt;br /&gt;
&lt;br /&gt;
===Diverging Campaign Path===&lt;br /&gt;
====The Midlands====&lt;br /&gt;
&lt;br /&gt;
Orcs again. But you chose that way. This scenario may appear impossible, but with a lot of gold and a little strategy, it can be beat. &lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* You are given plenty of time, so use it wisely. The enemies send lots of orcs, mostly weak ones. So recruit and recall everything you can.&lt;br /&gt;
* Recall any White Mages you have. You'll need them.&lt;br /&gt;
* Bowmen are good for the wolf units you will be facing.&lt;br /&gt;
* The rest depends on your strategy.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* The &amp;quot;Fast Assault&amp;quot; option: use an assassination team. If you go west, only your Knights and Horsemen will arrive and fight at daytime. So go south. Take the bridge and defend against the enemy closing in from the west. Take out Yellow with a fast assault team (they should take a healer along), but be careful about the leader. Your main force moves west, takes and holds the second bridge, and takes out Blue. Your assault team stays in the south and goes for the last enemy leader - they won't face any serious resistance. The enemy moves north to support Blue. The HI guarding the bridge might gain a level or die, but hopefully not the latter, as they are loyal units in a long campaign. With this approach, you can finish early (around 25 turns) and keep your losses low.&lt;br /&gt;
* The &amp;quot;Dark Assault&amp;quot; option: use Footpads.  If you chose to work with the the outlaws in the last round, then this works well.  Footpads are cheap.  And they are fast.  And they have good defensive abilities.  Plus they fight well in the dark and in the forest.  So recruit lots of Footpads-pawns and quickly dispatch them to the upper west and south, followed by more powerful units: Mages, Horsemen, etc.  For the time being, leave the middle enemy alone.  To the upper west, send several Footpads into the forest and capture the village and set up a defensive line.  This cuts down the enemy's gold and increases yours.  Don't attack at first, just defend, until more of your slow higher powered units arrive. The strategy here is to pick off the orcs, and send the Horsemen to capture villages.  While this is going, to the south you send your Footpads to capture any villages you can and, more importantly, put a Footpad on the hex that is adjacent to the bridge, thereby stopping easy advancement of their greater numbered troops. A White Mage, a couple Trappers and some Bowmen would make a good escort. Probably sending a Thief or two would be good too, to help dispatch any enemy that infiltrate the villages north of the river. one enemy got into one of the villages on the north of river, and it took a lot to dislodge him.  The intention is to engage the enemy so that they are fighting from the river squares, at a huge disadvantage.&lt;br /&gt;
&lt;br /&gt;
====The Swamp Of Esten====&lt;br /&gt;
&lt;br /&gt;
This scenario is not too hard if you are conservative and don't send important units off alone.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
# First round, recall 1-2 quick Knights (or Paladins, if you have them), recruit 1-2 Horsemen, and recall your loyal Shocktroopers or whatever they are now.&lt;br /&gt;
# Next round, recruit/recall Mages to kill Scorpions (and Bats) and at least one White Mage to deal with poison, plus maybe a Poacher, as they are good in swamp (and you would like a Huntsman eventually, for its markmanship.)&lt;br /&gt;
# A little Thug spam can come next, but you don't need a full third round of recruitment. Then send Prince Haldric off to lend his leadership.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
# You must blitz the northeastern leader, or risk getting bogged down on bad terrain facing a swarm of undead spam, which can be nasty at night. Quickly send Knights (or Paladins) and Burin over the ford to start wailing on undead. A disposable Horseman can try to take out Scorpions in this area at first. On the way is your proper Scorpion disposal unit, the Mages and White Mage. Try to kill Dark Adepts with Burin or horse units before they have chance to attack you. As you close in on the leader, hover your mouse over him to watch where he can go, as his ranged attack is nasty and can be followed up by waves of kamikaze Walking Corpses, which can take out a Knight.&lt;br /&gt;
# After you have killed the northeastern leader and eliminated troops there, you can either send your whole army back across the ford and south or split your army into two halves, sending one part to each leader. If you have lost several units but have lots of turns left, it's probably safer to stick together. This is not a simple mop-up operation, as powerful undead can take out some of your valuable units if you're not careful. On hard, Shadows are a constant threat at night.&lt;br /&gt;
&lt;br /&gt;
Spoiler...&lt;br /&gt;
&lt;br /&gt;
* Searching the temples is a good idea. Some have gold. There is a free loyal White Mage hiding in (a random) one of the temples - visit the temple close to the keep ASAP, and if not there, try rushing a horse unit or Lady Outlaw to the temple at 19,5. However, some of the temples contain undead, so keep extra troops nearby when you enter one.&lt;br /&gt;
&lt;br /&gt;
===The Oldwood===&lt;br /&gt;
&lt;br /&gt;
This is a relatively easy scenario.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
# First round, recall your (probably leveled up) Heavy Infantry from The Fall and some quick fighters.&lt;br /&gt;
# Second round, recall White Mages and quick Mages.&lt;br /&gt;
# Third round, round out with Thugs, Bowmen, and Spearmen, preferably quick.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* Your forces will have three main combat arenas: the northeast, the south, and the middle.&lt;br /&gt;
# The main bulk of your force, including at least one White Mage, should head east to the orc in the northeastern castle. The leader there recruits a lot of units, and most of them are level 2, so watch out.&lt;br /&gt;
# Haldric, a White Mage, your loyal Heavy Infantry types, and a couple of level 1's (maybe a Mage and a Thug) should head south to the other orc leader. A few effective melee units can easily counter the riders they send early on, and then with a little forethought and patience you can take out their Archers and Crossbowmen without giving them time to shoot. &lt;br /&gt;
# The castle in the middle is inhabited by the tree folk, so don't bother sending troops there; however, you might want to keep a couple speedy units not far off to watch their backs, in case the allied leader gets into trouble, as is usually the case.   &lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
* The temple contains the entrance to the catacombs, but you need the leader Wose's help to open it, and to get that help you have to win the current scenario, so there is no point in visiting this temple.&lt;br /&gt;
&lt;br /&gt;
* Heads up: The next scenario is in the catacombs, i.e., underground, and it's a tough one, so you need to groom your roster accordingly. Two Mages of Light would make it a whole lot easier. Failing that, level up your fearless loyal Shocktrooper and chaotic outlaw types. Bandits/Highwaymen and Fugitives are especially nice. Quick units of almost any type (except horse units) will be helpful, if leveled and possessing high HP (&amp;gt;50).&lt;br /&gt;
&lt;br /&gt;
===Temple in the Deep===&lt;br /&gt;
&lt;br /&gt;
You will be facing undead underground. This is a difficult situation that will prove much easier with proper recruitment. Then the strategy will be fairly straightforward.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
&lt;br /&gt;
* All in all, what you need is a small elite force. Two rounds of recalls is enough, if you didn't lose Burin in a prior scenario.&lt;br /&gt;
# First round, recall your loyal Shocktroopers / Iron Maulers, especially the fearless one, though their slow movement will prove frustrating. Also on the first round, recall a fast &amp;quot;tank&amp;quot; and someone to grab the holy water (if Burin is not your choice.)&lt;br /&gt;
# Second round, recall any Mages of Light you might already have, and a total of at least two White Mages or Mages of Light, preferably quick. For the rest of your recruitment, what you need are high movement (6+ MP) non-horse units with high hitpoints (&amp;gt;50 HP), preferably chaotic, preferably with a ranged attack, and preferably impact attacks. Put all the requirements together and it points to Fugitives. Outlaws and quick Arch Mages are worth recalling too. Fill out the rest with Bandits/Highwaymen, Trappers/Huntsmen, and Longbowmen/Master Bowmen, preferably quick. You might think that Red Mages would be good, but they attract melee attacks that they likely will not survive. Note that Horse units are too sluggish to be useful here and should not be recalled/recruited.&lt;br /&gt;
# Third round (optional), you can add a unit or two for a safety margin.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
&lt;br /&gt;
# There are two ways north, but they will meet up together before you meet any enemies besides the Tentacles. Ignore the tentacles for the most part and only kill them when it's convenient, as you will need to have a strong line set up by the time you engage the undead. Watch out for the enemy's Bone Shooters, Revenants and Deathblades, as they could easily mess up a level 3 unit. Once you see the two choke points, hold them so one of their units is facing 2 of yours (preferably with a White Mage behind them). You may be able to level up a White Mage to a Mage of Light while fighting in the choke point. If your troops are too slow to grab both choke points, you can send Burin and others to the west choke point while your slow troops line up at the southeast shoreline and bridge.&lt;br /&gt;
# Gradually progress northwards once the flow of baddies has tapered off, and once you get into the final chamber, the boss should be a piece of cake, although his ranged attack is devastating, so try to attack him with melee units. Be careful if he has recruits around, as their combined damage can take down one of your level 3's. Note that the Ruby can only be picked up by Haldric.&lt;br /&gt;
&lt;br /&gt;
Hints...&lt;br /&gt;
&lt;br /&gt;
* Holy water: Burin is very effective if you give him the holy water; however, it's more helpful to send Burin running to the west choke point without delay. A good alternative is a Highwayman - or a Bandit, who should level quickly. Compared to a Highwayman/Bandit, Prince Haldric or a Royal Guard is not that great a choice for the holy water due to their lawful alignment and -25% penalty, unless you have (or will soon get) a Mage of Light.&lt;br /&gt;
&lt;br /&gt;
* XP: Use this level to get experience. The early-finish bonus is tiny. The tentacles are perfect for leveling up units. If you're hurting for leveled chaotic units, you can even level up two raw recruit Thugs (use Haldric's leadership to assist). Keep Burin away from the water at this stage, or he'll kill all tentacles as they attack, depriving those who could benefit from the XP.&lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
&lt;br /&gt;
* Your killed units will be turned into Walking Corpses (or Soulless on hard.) Therefore, spam is not helpful. A Mage or two can be okay, if used with great care, but mostly you need to recall leveled troops here.&lt;br /&gt;
&lt;br /&gt;
===Return to Oldwood===&lt;br /&gt;
&lt;br /&gt;
Plot only.&lt;br /&gt;
&lt;br /&gt;
===Clearwater Port===&lt;br /&gt;
&lt;br /&gt;
This scenario is easy if you take the first boat out, more and more challenging for the second and third boats, and very difficult (on hard) if you want to take out all three leaders.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
# First turn, recall your loyal Shocktroopers / Iron Maulers from ''The Fall.'' You will also want several Footpads, for speedy village snatching, coastline defending (under leader supervision), and possibly for filling castle hexes if your lines get too thin.&lt;br /&gt;
# Second turn, recruit/recall more low maintenance units. It's a good scenario for leveling troops, so recalling acouple half-leveled Spearmen or similar is a good idea.&lt;br /&gt;
# Third and later turns, start recalling your high maintenance units. The key to winning this scenario is to recall several advanced units that can take a lot of damage and get good defense in castles (no Horsemen). You will also want at least 3 White Mages or Mages of Light.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
# Backstab your ally, stealing all his villages. Your ally is useless anyway, except for the entertainment value from his troops' suicide runs. The income is much better in your hands.&lt;br /&gt;
# Send your heavy duty troops with some White Mages over to the line of castle near Lt. Aethyr. (Optionally, you can rush forward past the castle, but you will need to return almost as quickly before the main enemy wave and night arrive.) Aethyr will usually be done recruiting by the second or third turn, before the enemy reaches you, so fill the entire line with your units, and put Knight Sir Rudry in the one non castled tile (or leave it empty, if no enemy are adjacent.) Place the White Mages behind this line. After the enemy has reached you and it is your turn to attack, go mostly for the assasins, as they have a weak melee attack and their poison can be a huge problem. Alternatively to using the castle (from (26,18) to (24,15)) to defend, the front line can lead through the villages at (30,17) and (30,18). This will make your line much shorter, it becomes much more of a bottleneck fight and offsets your enemy's superior numbers, since some of their units just move around with all spots to attack occupied; you only have to give up 1 village and 2 front units instaheal without mages. Place your strongest units on the weakest spot (29,20) and a Mage of Light on (30,19), he will hardly be attacked as the hex before him is used to attack (29,20). This shorter line requires less units on your side and also has the great advantage that there are much less 40% defense spots to attack you. They will flank you at the sides but stand on ice or sand then.&lt;br /&gt;
# Meanwhile, on the northeastern coast, the northern enemy leader will send lots of units to catch your flank unguarded. Send 2 Footpads, a Spearman, Lady Jessene, and Haldric to guard the coast. If Lady Jessene is already level 3, you can substitute a Royal Guard, Swordsman, or Javelineer for Haldric. This coastline defense squad may need help later, so be ready to divert a speedy powerful unit there. If you keep a healthy unit on the village at the tip of the land, then, unless you are very unlucky, you will be able to hold off everything the northern leader sends. After the assault from the water has been crushed, some of your troops may be able to cross the ford north, but be careful not to get attacked in the water with only 20% defense. (Certain of your chaotic units do have 40% defense in water; now is a good time to pay attention to that.) Also, notice that the lighthouse has a similar effect as a Mage of Light.&lt;br /&gt;
# You have two options for the endgame:&lt;br /&gt;
## &amp;quot;Total victory&amp;quot; strategy: Once you've thinned the enemy to where they only have a few units that are close to your line, usually this happens conveniently around dawn, move your people out and start heading for their leaders. Split your force, sending a few down the southern path, to distract the eney and most of them toward the middle leader, to kill him. Once he's dead, send some of your army down to kill the southern leader and devote a few units to defending the bridge until the rest of your army can rejoin you. A unit or two with a lot of HP with a white mage are usually enough to do this.&lt;br /&gt;
## &amp;quot;Run like hell&amp;quot; strategy: Alternatively, you can leave your leader near the docks and take one of the boats to end the scenario.&lt;br /&gt;
&lt;br /&gt;
===Fallen Lich Point===&lt;br /&gt;
&lt;br /&gt;
This is a high variance scenario. It may be very easy or very hard, depending on events beyond your control.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* Recruit fairly lightly initially, as you will likely have a chance to use the Lich's keep to recruit again.&lt;br /&gt;
* Mages, White Mages, and Mages of Light are good, and as are all the other advancements of Mages.&lt;br /&gt;
* You automatically should have your loyal Knight. Because of the mountains around &amp;quot;lichland&amp;quot; and frozen ground everywhere else, additional horse units are not recommended, except a single Paladin will come in handy.&lt;br /&gt;
* Some Thugs or a Bandit or Highwayman will provide a little extra undead bashing power.&lt;br /&gt;
* Footpads will help with village flagging, after the Wolf Rider types are taken care of, but you can postpone buying Footpads until after killing the Lich.&lt;br /&gt;
&lt;br /&gt;
Strategy... &lt;br /&gt;
# The Orcs will be busy with the Yetis, so you can walk with a big group south and kill the Lich-Lord. Move Haldric to the stone monument to de-petrify the Lich. It may help to post some units around the undead before doing so. Use several mages to make a hole or two in the ring of undead, and then push in a burly fighter or two and/or Paladin to kill the Lich.&lt;br /&gt;
# After killing the Lich, assess the Orc/Yeti situation (as well as the empty village situation) and decide if you need to use the Lich's keep to recruit some reinforcements.&lt;br /&gt;
# After that, head north and walk into the sewer entrance (the &amp;quot;cave&amp;quot;) or else kill the orc leaders.&lt;br /&gt;
&lt;br /&gt;
Hints...&lt;br /&gt;
* It is also possible, if you recruit heavily, to split your force and head north to attack the eastern Orcs before they finish with the Yetis.  However, be careful not to be attacked by a Yeti yourself; a Yeti is dangerous even if heavily wounded. A Yeti will attack you if it can get to a unit within one turn (and it doesn't have a more appealing orc target.)&lt;br /&gt;
* When dealing with the Lich, be aware that he has money; if you let him vacate any of his encampment tiles, or if you kill any of his units but do not occupy their tiles, he will be able to recruit.  (This is not necessarily all bad, as it can mean more experience, but depending on the strength of your force you may want to be careful.) &lt;br /&gt;
* Note that this level becomes a lot tougher if the Yetis get poisoned early on and quickly die. If this happens you basically have no other choice than to kill the orc leaders first.&lt;br /&gt;
&lt;br /&gt;
===Sewer of Southbay===&lt;br /&gt;
&lt;br /&gt;
This is a swampy underground scenario, but with attention to recruitment, it's not very difficult.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* As always underground, you want non-horse units with 6+ MP.&lt;br /&gt;
* Recall White Mages / Mages of Light, at least two, three is probably the optimal number.&lt;br /&gt;
* There are quite a few villages in this cave, so an expensive force is supportable, though not necessary. Some players recruit a large and spammy force, while others go with small and elite:&lt;br /&gt;
** Option 1, &amp;quot;Large and spammy&amp;quot; recruitment: Recruit four each of Mages, Thugs, and Poachers. Yes, Poachers normally stink, but here they really shine in a swamp that is permanently dark, underground. If you recruit four Poachers, you could finish with three Trappers and a Huntsman - or you could finish with four dead Poachers. The Thugs are especially likely to die, as they will be facing off against Red Mages, but somebody has to do it.&lt;br /&gt;
** Option 2, &amp;quot;Small and elite&amp;quot; recruitment: Recall something like one Red Mage, one Arch Mage, one Silver Mage, 2 twooyal Guards/Highwaymen/etc, and a Trapper or Huntsman, plus three regular Mages and a Poacher.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
# After leaving your initial chamber, you will be in a large swamp room with three entrances, through which will be a flood of bad guys. Use two Poachers and a Thug or similar to blockade the southeast, a small elite group to block the north, and then a mix of fighters and mages to handle the west entrance. Give each group a White Mage or Mage of Light, as well as at least one regular Mage. Try to keep the Mages of Light away from your chaotic forces on the front lines, though. Use the leadership of Haldric and Lady Jessene - and Mage of Light illumination or lack thereof - to get the most from each attack.&lt;br /&gt;
# When the initial battle has died down, you have two options:&lt;br /&gt;
## If you have enough forces, you can divide into two groups and attack both brothers simultanously, east and west.&lt;br /&gt;
## Otherwise, do them one after the other, and then look for the exit.&lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
* Danger: there is a Giant Spider at the exit. You may wish to keep one or two cannon fodder units in order to be able to save your advanced units.  It is best to use ranged attacks against the spider, so leveled mages are good here.&lt;br /&gt;
* Heads up: the next scenario is a lot easier with a lot of gold, especially on the hardest difficulty level.&lt;br /&gt;
&lt;br /&gt;
===Southbay in Winter===&lt;br /&gt;
&lt;br /&gt;
Plot only.&lt;br /&gt;
&lt;br /&gt;
===A Final Spring===&lt;br /&gt;
&lt;br /&gt;
This is a large battle, and any mistake on any front can spell doom, but overall it will be fairly easy on the easier difficulty levels. On hard, it will only be a cakewalk with a lot of starting gold (more than 450 or so.)&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
# On the first turn, recall a Silver Mage to teleport to the island, recruit Footpads for village snatching, recall one or more of your loyal Iron Maulers (leveled up Heavy Infantrymen from ''The Fall''), and recall one or more Knights or similar.&lt;br /&gt;
# Second turn, continue with this theme, but it will be nightfall soon, so recall Outlaws, Bandits, Assassins, etc.&lt;br /&gt;
# Turn three is a bit more of the same, but you need to start thinking about preserving your income and also keeping a gold reserve. You can spam some peasants to preserve cash and income.&lt;br /&gt;
# Turn four turn is more of the same.&lt;br /&gt;
# Turn five is similar, but it will be day soon, so lawfuls like Knights and level 1 Mages are a good idea.&lt;br /&gt;
# Turn six, you will have new recruitment options (see spoiler at walkthrough end.)&lt;br /&gt;
&lt;br /&gt;
Strategy is broken into four fronts...&lt;br /&gt;
# The first front is the south land area. Do a counter-clockwise sweep with mounted units, optionally augmented with Footpads, which can help pad out your lines with forest and village hexes. Note that it will be nightfall soon after game start, so it might be wise to delay any serious mounted assault until the next day, and you can delay your recalls for this.&lt;br /&gt;
# The second front is the walled city. Move slower units and your loyal White Mage / Mage of Light to defend here. Take your ally's villages; your ally wouldn't do much useful with the money anyway. When your mounted units from the second front complete their sweep, you can break the remaining southern forces against the city wall in a hammer and anvil. Then your united forces can move north. On easy, you may be able to push north more quickly than that using just part of your city troops.&lt;br /&gt;
# The third front is the bay and peninsula north of your keep. If you don't protect this area well, Wolf Riders and others will mount an amphibious assault in an effort to flank your troops. On the easier difficulty levels, you may wish to beat the punch and quickly establish a bridgehead on the other side of the bay.&lt;br /&gt;
# The fourth front is the two small islands. Send a Silver Mage there ASAP. (You should have a village already there, so the Silver Mage can teleport over.) Footpads/Outlaws/Fugitives and others will help later. Lady Jessene could be used. A quick White Mage would be useful, either on the coast or on the islands. Do not use Assassins on this front. Assassins have relatively weak defense in water against Orcs and Nagas, they're very weak against blade, which is all orcs and nagas use, and their relatively slow movement in water makes backstab hard to use reliably. Overall, you need to devote more resources to this front than you might think.&lt;br /&gt;
&lt;br /&gt;
Hints...&lt;br /&gt;
* You should have lots of high-level units now, so concentrate on recruiting new ones and levelling them up to fill needs.&lt;br /&gt;
* Peasants are useful as placeholders for villages and distractions for the enemy.&lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
* On turn 5, a gang of nasty undead show up in the east. So, for your city taskforce, you'll want to recruit/recall units with impact and arcane attacks. Note that if undead capture villages, they will be flagged with the Orc island boss' black flag! This can result in an overwhelming number of Nagas, and it's one reason that you must devote a lot of resources to the island campaign. Flag any black flag villages you can.&lt;br /&gt;
* On turn 6, a gang of nasty Mermen show up in the west. Fortunately, they are on your side. You can now recruit Mermen. This is the real reason to keep a gold reserve until this time.&lt;br /&gt;
&lt;br /&gt;
===Peoples in Decline===&lt;br /&gt;
&lt;br /&gt;
This is a bloody scenario versus Drakes. It can be a real challenge on the hardest difficulty setting, less so on the easier levels. Proper recruitment is more important than strategy here, as you will have little opportunity to maneuver.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* Drakes can be dangerous, so this is a great scenario to use the time honored technique of cannon fodder. Now that you can recruit level 0 units for cheap, you can protect your higher level units by recruiting endless Peasants to distract the Drakes' firepower.&lt;br /&gt;
* Drakes are vulnerable to pierce attacks, so spam cheap pierce attack units. In addition to Peasants, there are Poachers, Bowmen, Peasants, Spearmen, Merman Fighters, and Merman Hunters. Poachers are key here, due to the swampy terrain and their chaotic alignment.&lt;br /&gt;
* You will need about 3 White Mages / Mages of Light in all.&lt;br /&gt;
* On your last turn of recruitment when you have about 80 gold, recall some advanced units, like Master Bowmen.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* Since you will have a lot of level 1 and 0 units, make sure to use the leadership of Prince Haldric and Lady Jessene.&lt;br /&gt;
* Look for opportunities to heal via leveling up.&lt;br /&gt;
* Pay attention to the day-night cycle in this scenario. Drakes will be strong during day, but become very weak in the night.&lt;br /&gt;
* Take advantage of the mountains for defense, but note that on hard, you need to set up a relatively small perimeter around your base, as you will be hard pressed to even hold a small area.&lt;br /&gt;
* Be careful with your loyals.&lt;br /&gt;
* Because most Drakes have powerful ranged attacks, the roles of your melee and ranged units are reversed from the norm. Whereas usually you would use fighters to protect archers, here you will use archers to protect fighters. Melee-only units should hide behind the lines until they attack, preferably at night (with a Mage of Light supplying illumination.)&lt;br /&gt;
&lt;br /&gt;
Spoiler...&lt;br /&gt;
* Make sure you get the Storm Trident in the middle of the sea, but be certain that you've cleared most of the Drakes first, since a Sea Serpent will appear. It's best to have some strong units ready to kill it in 1 or 2 turns. You can give the trident to Lord Typhon, but since he leaves a bit later, you may want to give it to another Merman Fighter. Movement over land is important for Mermen in the campaign as a whole.  If the Merman Fighter to whom you give the storm trident has the Quick attribute, you can make him a Hoplite when he gets to level 3.  Otherwise, make him a Triton, because movement over land is important for Mermen in this campaign as a whole.&lt;br /&gt;
&lt;br /&gt;
===Rough Landing===&lt;br /&gt;
&lt;br /&gt;
You will be fighting Nagas and Vampire Bats, primarily. This is a scenario that may be frustrating on the easier difficulty levels, though on hard it is just par for the course. Good recruitment and strategy will save you from getting slaughtered.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* You are probably going to go negative on gold and be unable to rectify that with the paultry early finish bonus, so you might as will go very negative and be resigned to start the next scenario with minimum gold.&lt;br /&gt;
* Recruit/recall many Mermen and 1 or 2 White Mages or Mages of Light. A few Peasants can be useful to pad out your force, distract the enemy, and protect villages from stray Bats. A Silver Mage can be useful for island hopping but is not essential. Thieves/Assassins are blade vulnerable, and Nagas only use blades, so it's probably best not to recall them.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
# Knock out the southeastern leader in a blitz. It's important to get that out of the way, because a wave of Nagas is advancing at light speed from the north.&lt;br /&gt;
# Next, hurriedly set up a line in the water alongside your fortress island. Your fortress troops can anchor one flank, while Burin the Dwarf can go to the island to the northeast to anchor the other end of your line. Nobody messes with Burin. Move Lady Jessene behind the lines to lend her support to the Mermen. Your loyal Mage of Light will be able to move back and forth more (to lend illumination) if kept in the fortress area.&lt;br /&gt;
# Finally, once the enemy assault wave has been broken, advance northward to kill the final two leaders in a straightforward mop-up operation. Just be careful not leave isolated units where they can get swarmed.&lt;br /&gt;
&lt;br /&gt;
Hints/Spoilers...&lt;br /&gt;
* Try to level up the mermen; they can be useful in another scenario later.&lt;br /&gt;
* Beware of Sea Serpents. Three of them will appear, one on each of the three turns following your first kill of an enemy unit. Make sure to kill them at once. The Storm Trident from the previous scenario and the Ruby of Fire will come in handy against the Serpents.&lt;br /&gt;
&lt;br /&gt;
===A New Land===&lt;br /&gt;
&lt;br /&gt;
This is a non-scenario. The scenario objectives tell you to avoid all confrontation for as long as possible, but actually the faster your units encounter the others the faster the scenario will end.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* None necessary.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* The optimal strategy for gold carryover is to grab the three closest villages, then retreat to your keep and wait. Once one attack occurs, the non-scenario will be over.&lt;br /&gt;
&lt;br /&gt;
Spoiler...&lt;br /&gt;
* One thing to keep in mind is that this the last chance you have to grab some more Mermen as their king leaves.  They are quite helpful in a later scenario so grabbing a few extra here cannot hurt if you can spare the gold.&lt;br /&gt;
&lt;br /&gt;
===The Ka'lian===&lt;br /&gt;
&lt;br /&gt;
Story, with your choice of four battles next.  You have to beat them all in whatever order.  The amount of gold you have should be the factor in deciding when you choose to play Cursed Isle (the undead problem).&lt;br /&gt;
&lt;br /&gt;
===Diverging Campaign Path===&lt;br /&gt;
&lt;br /&gt;
All four scenarios have to be beaten, but in whatever order you choose.&lt;br /&gt;
====The Dragon====&lt;br /&gt;
&lt;br /&gt;
This scenario is not as difficult as it looks, though your recruitment and strategy need to be tailored to fight the Saurian Skirmishers and other foes you will face here.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* Saurians use piercing attacks mostly, so it's better to use units resistant to pierce. Pikemen and Halberdiers have 40% pierce resistance. Javelineers are ideal as Saurians use ranged attacks a lot.&lt;br /&gt;
* You may wish to bench some or all of your loyal Iron Maulers. They are ineffective against the 70% impact resistant Mudcrawlers, while also vulnerable to the ranged attacks of both Mudcrawlers and Saurians.&lt;br /&gt;
* Consider adopting a force of all units with ranged attacks, save for horse and thief units, which can be kept behind the lines when not in use. It is amusing when Saurian Augers are forced to tap your units with their little staffs.&lt;br /&gt;
* Healers are a necessity to deal with the heavy damage your units will be sustaining. Depending on the strategy you adopt, you will want 2-4 healers. Mages of Light rock here, as they can easily do front line duty in pairs and their illumination blinds the Saurians, reducing their damage.&lt;br /&gt;
* You need something to clean up mud. Versus level 0 Mudcrawlers, Horsemen and their advancements can charge with no counterattack, and likewise Thieves and their advancements can backstab with no counterattack. Mages can be used as well on the fire vulnerable mud.&lt;br /&gt;
* A Merman or two will help with water hexes. An Entangler's slow ability will help tame the dragon.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* Players have used many different strategies with success:&lt;br /&gt;
** &amp;quot;Hedgehog&amp;quot; strategy: Fighting Saurians requires a disciplined formation.  If you're used to stringing out troops to move them into position as they get there, that won't work after Turn 2 or 3. You can use a &amp;quot;healing hedgehog&amp;quot; of ten troops--two white mages next to each other and eight troops completely encircling them.  If someone gets badly injured, move them to the inside and put a white mage on one of the long edges, fighting as you go.  If you're trying for the big bonus, you'll need two hedgehogs.  Try to keep reserves back a bit in cities.  If the terrain favorably protects you, or the wounded is a fast unit, you can try moving wounded back to cities too.  Once the main wave of Saurians is broken, you can string non-wounded troops out a bit in the rush for the leaders. &lt;br /&gt;
** &amp;quot;Triangular Hedgehog&amp;quot; strategy: Switching wounded units to the inside of the hedgehog can be a problem if you are surrounded. ZOC prevents you from creating an open hex to move the inner unit into. You can fix this by creating a triangle with three hexes inside, instead of the standard two of the hedgehog. If you do this on your castle, only three units are in grasslands. If you set it right, you can make most of the hexes adjacent to your triangle be grassland as well, forcing the Saurians into a bad defensive position. In terms of unit positioning, the simplest way is to fill two inner spaces with Mages of Light, a but a better tactic is to put one of the mages on an edge, thereby ensuring that all but one of your units are healing. The remaining unit can either be a Merman Hoplite, (prefereably resilient and carrying a Storm Trident) or Lady Jessene, since she has excellent defense and is chaotic and therefore benefits by not being in the Mages' light. &lt;br /&gt;
** &amp;quot;Giant Hedgehog&amp;quot; strategy: Recruit a lot of units, and then move the whole army as one big bulk. Keep healers in the middle (about four), rotate stronger units outwards, and make sure you leave no gaps. The Saurians will slip through the tiniest gap and kill your weak units. Head first for the east or wast leader, but steer for good terrain, because your force will soon be swarmed until about turn 10, when there should be many few Saurians alive.&lt;br /&gt;
** &amp;quot;Standard Line&amp;quot; strategy: Form a line from the west board edge diagonally up towards your keep across the two villages just in front of the forest. You will probably wish to bend upwards at the forest, rather than running the line all the way to the keep. Whenever the Saurians have a small number of troops at your line and you have enough strength to kill them all, you can advance your whole line one hex south, allowing you to get additional attacks on them from non-frontline troops. Once you advance a unit to the first water hex at west board edge, the west leader will probably come out to greet it, so be ready to fry him with Haldric's ruby. After killing the leader, back up into good terrain to prepare to meet the dragon.&lt;br /&gt;
** &amp;quot;Wake the Dragon&amp;quot; strategy: Prematurely wake the dragon (see spoiler below) and back up your troops to north of your keep. When the dragon comes, kill him. The scenario can be over on turn 7. There is no early finish bonus for this, but you can recruit lightly so that you still have gold at the end and will carry-over 40%, if you need it for your next scenario.&lt;br /&gt;
* With all these strategies, the Saurians may hold back for quite a while. This is okay, as the Dragon will eventually appear and come to you. Kill it. Then you are given a choice of whether to end the scenario or to try to kill all the enemy leaders before time runs out. You can choose to finish the remaining Saurians for a nice bonus. However, on the hardest difficulty setting the turn limit (33 turns) is insufficient for you to plow through the vast hordes of level 0 spam to get to the leaders, so it's best to simply end the scenario after killing the dragon.&lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
* The dragon will awake on turn 15 or when you move a unit down around the road north of the mountains. If you wish to wake the dragon prematurely, you can recruit a Horseman on turn 1 and run him down. It's a suicide mission for him, however.&lt;br /&gt;
* If you have a fast non-horse unit in position, rush it to the mountain cave after the Dragon leaves to grab the 200 in gold, though that's nothing compared to the Hero bonus for defeating all the Saurian leaders. So focus on killing all of them first.&lt;br /&gt;
&lt;br /&gt;
====Lizard Beach====&lt;br /&gt;
&lt;br /&gt;
This is a scenario versus Saurians, Giant Scorpions, and Mudcrawlers, where good recruiting and strategy will save you from massive bloodshed.&lt;br /&gt;
&lt;br /&gt;
Recruiting...&lt;br /&gt;
* Mermen are helpful for the swamp and water areas.&lt;br /&gt;
* Bench some or all of your loyal Iron Maulers, veterans from ''The Fall.'' They are laughably ineffective against the impact resistant Mudcrawlers - and laughably vulnerable to their ranged attacks.&lt;br /&gt;
* Thieves, Horsemen, and their advancements are good for mud cleanup, though you must keep them out of range of Saurian skirmishers. Swordsmen and Royal Guards are also good, though overkill.&lt;br /&gt;
* Recall a lot of fairly high HP units, preferably with strong non-impact ranged and melee attacks.&lt;br /&gt;
* Mages are good. Mages of Light are especially useful, since they can do front line duty. Lots of healing may be necessary, about 3 healers are good, so White Mages can be used too. Raw recruit Mages can be used as well, for disposal of Giant Scorpions and the occasional Saurian Skirmisher that wanders too far. At least one Silver Mage is highly desirable, along with a speedy unit (e.g., Fugitive, Footpad, or Horseman) to capture villages for the Silver Mage to use north of the river.&lt;br /&gt;
* [fredbobsmith2] An alternative strategy that works surprisingly well is to simply use a very mage-heavy army. Recall most or all of your high-level mages, throw in a few peasants, and spend the rest of your gold on recruiting mages. Victory will come with shocking ease.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* General strategy: as Saurians have skirmishers and a lot of movement, be sure to protect your wounded units well. Because of the Saurians unnerving ability to concentrate their fire on one unit, be sure to keep several healers around and try to keep your line straight so only two can mob one guy. Hedgehog tactic also seems to work well.&lt;br /&gt;
* Opening strategy: here are some specific strategies that players have used with success in the early part of the scenario:&lt;br /&gt;
# &amp;quot;Mermen in center&amp;quot; strategy: Recall 2-4 Mermen, 1-2 Trappers/Huntsmen, and a lot of high HP troops, then form a line. Initially, you can either form a north-south line around the lake area with one flank at the south board edge, or, if you want to be conservative, you can do a diagonal line in the southeast corner, with both flanks tied to board edges. You'll need the Mermen to handle the lake area, and Trappers/Huntsmen/Mermen for the swamp areas. Keep troops in reserve, so that when a few Saurians meet your line, you can advance your whole line over them. Do not be too conservative/defensive on hard, as your time is limited. &lt;br /&gt;
# &amp;quot;Mermen on flank&amp;quot; strategy: Recall several decent land melee units &amp;amp; then 4-5 level 2 Mermen on rounds 2-3. Most of your force forms a line of battle near your keep, Mermen on the north flank in the river, land units extending south, flanks bent back with strongest units at the corners - then let the Saurians break on it. Once their first wave has broken, the rest of their troops come in drips and are no problem, so now you can split up and wipe out the stragglers and claim villages; any L2 units you start with should level up. After you defeat the main force from the south send just one or two guys north to capture towns so your Silver Mages can teleport into the fray. &lt;br /&gt;
# &amp;quot;Mermen feint&amp;quot; strategy: Recall most of your Mermen from before and send them along the river towards the sea. This will harry the saurian troops coming down from the north, allowing your main force to advance on the southern enemy  undisturbed. Beware, though as your mermen will encounter the Saurians at night time (giving you -25% and them +25%), so try to minimize conflict until dawn, just get in their way.&lt;br /&gt;
# &amp;quot;No Mermen&amp;quot; strategy: On your first two turns recall two keeps of strong, fast veterans like mounted units (not Paladins though; they're pretty ineffective against saurians), Outlaws/Assassins, and Silver Magi along with some other veterans, preferably with a lot of HP: if all goes well (at least on easy and medium) that may be all you need. Dash them across the swamp directly west of your keep, south of the sands, and form a line with strong units at the ends. They'll flank you, but you're stronger than them and you can use your slower units to crush the flanking saurians in a hammer and anvil. The first wave of southern Saurians should get itself killed before the northern Saurians arrive in force. Once the northern Saurians arrive, take them out with your slower units while your quicker ones go for the southern leader.&lt;br /&gt;
# &amp;quot;Sacrificial lamb&amp;quot; strategy: In addition to a couple mages, 2 healers, and some other fighters, recruit a castle-full of peasants to draw the Saurians out onto open ground.  Surround a single peasant on 5 sides, with 2 healers behind him. Build your formation around that.&lt;br /&gt;
* Closing strategy: The enemy's onslaught tapers out after their initial wave, so the final push for the southern leader should be quick and clean. Taking out the northern leader is harder, because all of your units will be stuck south of the marshes and the river. If you want to go for a quick win, just march forth with Silver Mages, Mermen, and anyone who's close enough to be a help. If you don't want to lose any of your better units, patience may be the key.&lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
* When one of your units gets as far west as the second bridge, a wave of Nagas will arrive out at sea. You may wish to delay going that far until the second watch, so that the Nagas will make contact with your forces during the day.&lt;br /&gt;
* Killing one leader gives more gold to the other, so when you've defeated pretty much all the southern leader's forces, just plant a level 3 or two in his keep and leave him alive; kill them both in the same turn.&lt;br /&gt;
&lt;br /&gt;
====The Troll Hole====&lt;br /&gt;
&lt;br /&gt;
This is a scenario that you cannot win by brute force, because the trolls have more brute force than you. Wise recruitment and strategy are necessary.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* It's underground time again, so as before, mainly recruit mages. The trolls are strong, so hopefully you have lots of levelled up mages. Mages of Light are especially nice, because they are tough enough to survive an attack from most trolls, while simultaneously reducing the damage sustained (due to illumination blinding the trolls.) Level 1 Mages can be used to good effect too, especially if quick. If only attacked by a single Troll Whelp, a healthy level 1 Mage will survive.&lt;br /&gt;
* In addition to mages, your chaotic units can be helpful here again, especially against the occasional Rocklobber, which you will not want to attack with mages.&lt;br /&gt;
* Forget about your loyal Iron Maulers (leveled up Heavy Infantrymen from ''the Fall''). They are too slow. It's not that you'll be running around, but you will be rotating troops due to heavy damage, and they will only get in the way.&lt;br /&gt;
* Putting Mermen in the moat will really help you fend off the first wave of attacks.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* There are 4 castles, and two of them (randomly placed it seems) are the troll leaders you need to kill.&lt;br /&gt;
* Try to use the narrow corridors to your advantage, so the enemy can only place one attack against a strong unit of yours, but you can kill a troll at a time with two mages or Haldric. Also keep an eye at your back since they will try to surround you. And resist the temptation to send single units wandering around in what seems empty caves - they will all die, probably by the fangs of a Giant Spider.&lt;br /&gt;
* Try to arrange it so one troll can enter to be attacked by many troops.  Have regular troops in front initially.  Move mages forward to finish the troll, plug the gap where the troll was with Burin or a Royal Guard or an Iron Mauler, and reset the trap on the next turn.  When you've whittled down the enemy, go the direction they came from and kill the leaders, ignoring spider keeps.&lt;br /&gt;
* Alternative: This could be a good choice if you have low gold: recall 2 quick red mages, and 3 quick tough melee units (say 2 royal guards &amp;amp; a L3 chaotic unit like a Fugitive). Play expedition style: abandon the start island, stay fairly close together, with your troops roughly divided in two between those moving forward and those fighting rearguard. Provided you knock out one troll leader early, the rest is manageable, just work your way carefully over to the other.&lt;br /&gt;
&lt;br /&gt;
====Cursed Isle====&lt;br /&gt;
&lt;br /&gt;
You will be fighting undead, mostly of the incorporeal and ghoulish lineages. Victory comes surprisingly easily.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* Recruit lightly, certainly no more than two castles of troops. You could use 1-3 Paladins, 1-2 Mages, and 1-2 White Mages / Mages of Light.&lt;br /&gt;
* Recall your loyal Merman Triton or similar and have him pick up the holy water.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* This can be the first or last quest you choose.  If you can wait, do it last, as you will come out of it with a lot of gold, which you will need for the first scenario after the quests, ''The Vanguard''. &lt;br /&gt;
* Keep a very tight formation for the first night, as Shadows will hit hard and you don't want to get backstabbed or swarmed. By dawn, it should be smooth sailing.&lt;br /&gt;
* If you get anywhere near the enemy leaders' keeps, expect to get rushed by a leader.&lt;br /&gt;
&lt;br /&gt;
Spoiler...&lt;br /&gt;
* In one of the three temples there is a Vampire Lady. All you really need is a Paladin or three to rush the temples. Kill her. Game over, you win. One of the other temples has some gold; grab that first.&lt;br /&gt;
&lt;br /&gt;
===A Spy In The Woods===&lt;br /&gt;
&lt;br /&gt;
Plot only.&lt;br /&gt;
&lt;br /&gt;
===The Vanguard===&lt;br /&gt;
&lt;br /&gt;
You will be fighting a large number of orcs, trolls and other enemies in a location with a natural defensive line, where presumably an underground river has carved a line of sinkholes. This scenario will be difficult or impossible with minimum gold (200), but quite doable with a large amount of gold (450+) even on the hardest difficulty setting. Recruitment and strategy are fairly straightforward, given the board layout.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* Recruit a lot of units; you will need them.&lt;br /&gt;
# First turn, recall/recruit speedy units: Knights, Lancers, Paladins, Horsemen, Outlaws, and similar.&lt;br /&gt;
# Second turn, recall your loyal Iron Maulers (leveled up from ''The Fall'') and Spearmen/Swordsmen/Royal Guards.&lt;br /&gt;
# On subsequent turns, recall/recruit healers and other sorts of Mages, Thugs and their advancements, and Longbowmen. You will need quite a lot of healing power: 3-4 White Mages / Mages of Light and 1-2 Paladins. A Silver Mage would come in handy, since your forces will be widely spaced, but you could start with a couple of Red Mages and try to level up one or both to Silver Mage.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
# This map is smaller than fog of war and sinkholes make it appear.  Rush the west and northwest gaps with mounted units, but slow &amp;amp; strong will carry the day once the sun rises and the odds are in your favor.  &lt;br /&gt;
# Seal of all the gaps in the ring of sinkholes. When the onslaught begins, wounded units can retreat back into villages or be cared for by healers - or actually both, since soon you will be out of non-wounded units.&lt;br /&gt;
# A &amp;quot;Sitzkrieg&amp;quot; may develop, where neither side can make progress. Shift units to the southwest and break out there, using the west board edge defensively. From there, sweep northwards, taking out the western orc leader first and then the next orc leader.&lt;br /&gt;
# Don't forget the chest of gold, which you can see even in fog.&lt;br /&gt;
# End the scenario with the kill of the final leader, a level 3 troll.&lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
* Once you kill more than half the units of any side, a few tough undead units will appear near that side's stronghold at the edge of the map. So, this will happen three times. Beware the Chocobones. Their double damage from charge means they can take out Commander Aethyr at night just by hitting 2 for 2, and they will certainly try if they get the opportunity.&lt;br /&gt;
* Heads up: the next scenario is much less difficult with extra gold. You can use Peasants to avoid going negative on gold, promoting them to Spearmen only when needed.&lt;br /&gt;
&lt;br /&gt;
===Return of the Fleet===&lt;br /&gt;
&lt;br /&gt;
Welcome to the &amp;quot;kitchen sink&amp;quot; defense.  You've made it this far; now the enemy will launch a desperate defense, throwing a little bit of everything at you.  The effect is mostly psychological, but it could be a problem if you came into the scenario with minimum gold or your initial assessment causes you to drastically under-recruit. Time is money.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* On medium, at least, you don't want to overrecruit. First turn, recall Mermen to assassinate the undead leader; 2 Entanglers/Netcasters and the Triton with the Storm Trident. Later, you should recruit 1 or more Silver Mages also for this taskforce as well as for causing general mayhem. It's also worth recruiting 5-10 L1/L0 units to take the brunt of the first wave of attacks; you can use any combination of Footpads, Poachers, Thugs, Spearmen, and Peasants, as you see fit. You'll want some decent L2 and L3 recalls for healing, to flank your lines, and to start kicking some butt at daybreak. A Mage or Red Mage to blast Trolls and Chocobones will level up by end of scenario. Paladins are good too. In addition to your loyal Mage of Light, you will need a bare minimum of 1 more healer.&lt;br /&gt;
* On medium, don't recruit too much for fighting the undead - 2 Paladins at most, 1 or 2 Thugs, the stormy Merman, and the nearest Mage working with your land force are sufficient - the undead commander only gets 5-6 L2 recruits and they come ashore scattered (on medium, anyway). Paladins are so effective against undead that you can wade into the water after them. Just remember, Paladins can't go into deep water and undead can.&lt;br /&gt;
* On hard, you also don't want to recruit too much for fighting the undead, but it's only because going on an offensive early against them will get you crushed by a Chocobone armada.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
# Move the Mermen (including the storm trident) as quickly as possible pretty much straight to the West. (There is a village and swamp hex that can aid your travel if you pick the best route).  Move these guys up the West side once they get there to get to the Undead Leader as quickly as possible.&lt;br /&gt;
# Your loyal units can do a little village grabbing, but it would be unwise to venture too far north.&lt;br /&gt;
# After nightfall, fog will appear; for the rest of the scenario, the map will become shrouded, like in a cave scenario.  So while you're still amazingly able to see, note the key terrain features, castle and city locations, and troop dispositions (especially Chocobones.)  Also, visually explore the avenues of approach you want to be able to see later.&lt;br /&gt;
# The first wave is largely at night and will have Goblin Knights and Pillagers, and later Chocobones and Troll Warriors. The damage they can cause is bone chilling, so make sure to divert their attention with plenty of spam. You want to meet them on the edge of the woodland, while inducing the orcs to fight from the grassland. Footpads and Poachers are handy here, as they have high defense in woodland. Players have had success setting up the initial line in either the north and northeast woodlands, with respect to the castle. Others have succeeded by fighting mostly from the open plain, retaining mobility by leaving the woodlands to their Footpads.&lt;br /&gt;
# Once your Mermen have taken an island city, teleport over one or more Silver Mages to help kill the undead leader - in addition to a Silver Mage, you will want the storm trident, a Netcaster/Entangler, plus one more leveled unit to be fairly sure to knock him out in one round. Quick striking like this you end up fighting a lot less undead.  You probably end up foddering one of the mermen to the Undead Archers, but the trade off is well worth it.  You can keep cycling your mermen up to fight with any orcs or trolls that come into the water. Silver Mages can assist, since they are not needed much in the other part of the fight.&lt;br /&gt;
# After the undead leader is assassinated and the first wave is broken, you may advance cautiously due north or to the northwest along the coast and ultimately finish off the two orc leaders.&lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
* When you are close to the break in the woods at the east board edge, tighten your formation and keep wounded units well away, as a small force of high-level Saurians will appear. Trigger them in daylight if possible, and knock them out fast. Alternatively, you can delay triggering the Saurians as long as possible by moving your force northwest near the water and then onto the small island, though even then it is possible to trigger the Saurians if you are not careful where you step. (Stepping to 10 hexes or less from 34,15 triggers the Saurians.) You can fight the final wave of orcs from the island, then move northeast to the mainland, finally triggering the Saurians.&lt;br /&gt;
* Two cuttlefish appear when you approach the north-central island. Assuming you're sending a strike force through the water to knock out the undead commander, you really don't want to trigger these until that force is on the island - the storm trident Merman is the only thing that can stand up to them in water, and they will avoid him to attack more vulnerable units.&lt;br /&gt;
* Once you kill one enemy leader, the other gets more gold &amp;amp; recruits a new wave of L2s. This can be useful if you need to kill off surplus L1 units to improve the finish bonus, or if you need the XP more than the gold; otherwise, try to knock out both leaders on the same turn before they can recruit more. Alternatively, if you kill the first one at dawn, the second will be reluctant to attack with his L2s in daylight, and you might jump in and kill him before he uses them.&lt;br /&gt;
* Heads up: The next scenario is the final one. Therefore, loyal units are now somewhat disposable. However, you will need plenty of gold. Recruit some Peasants in the current scenario if you need to save some gold. Not only are they cheap, but they have no upkeep and Chocobones love 'em. Send a unit with leadership with them and they can even deal some amount of damage and be used to finish off wounded enemy, though at night you should just let them take the beating passively since otherwise they die too quickly.&lt;br /&gt;
&lt;br /&gt;
===Rise of Wesnoth===&lt;br /&gt;
&lt;br /&gt;
It's the final battle: be patient, recall everybody - the early finish bonus doesn't mean anything. Also, loyal units are no better than other units after your recruitment is finished.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* You will need at least 300 starting gold, maybe more like 400 on the hardest difficulty level, so if need be, replay the previous scenario.&lt;br /&gt;
* To stretch your money, start with loyal Iron Maulers and a couple ready-to-level level 1's and level 2's. Finally, recall as many level 3's as possible.&lt;br /&gt;
* Healers: 3-6 Mages of Light / White Mages. Your few chaotic units will appreciate a White Mage.&lt;br /&gt;
* Horse units: 2-4 Paladins, 3-4 Knights / Grand Knights.&lt;br /&gt;
* Horse escorts: about 3 speedy units, like Royal Guards, Fugitives, and Silver Mages.&lt;br /&gt;
* Tanks: at least 6 high HP units, such as Royal Guards, Highwayman, Master Bowmen, and the loyal Iron Maulers.&lt;br /&gt;
* Mages: at least 3 high level Mages aside from your basic healers, so Arch Mages, Great Mages, and Silver Mages. Additional Mages of Light can be substituted.&lt;br /&gt;
* Some Mermen might be useful here, but surprisingly, they're not really necessary.&lt;br /&gt;
* On 1.9.3 and earlier, you can recruit Saurian Skirmishers on medium and Skirmishers plus Ambushers on hard. This appears to be a bug, so ignore the option.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* You will launch a two pronged assault: mounted units will race to the west and then south, while the main army heads due south.&lt;br /&gt;
* With your mounted units, race forwards by day and backwards by night.&lt;br /&gt;
* Along with the mounted units should go some escorts, speedy foot units intended to kill things like Goblin Impalers, which make even Grand Knights nervous. They would also benefit from a quick Mage of Light.&lt;br /&gt;
* Meanwhile, with your tanks and the rest of your healers and support units, form a line or hedgehog in the woods just south of your keep or next to the river. &lt;br /&gt;
* Keep your leaders with the main army, to avoid drawing too much attention to the mounted detachment.&lt;br /&gt;
* Maintain awareness of the overall battlefield. If the main army gets in trouble, you can send some or all of the mounted units to assist. There may be an opportunity to hammer-and-anvil enemy forces trapped in the middle. And you may wish to transfer units, like Paladins may be useful to the main army after it is on the move.&lt;br /&gt;
* You'll need at least two Paladins to kill Jevyan himself; nothing else is half as effective (except perhaps Mages of Light and suicidal Lancers).  Or you can use a pair of Great Mages (unless you are very unlucky, you should be able to kill him in a single turn). Don't forget to sacrifice Aethyr to Jevyan.  If he doesn't want to come out and play, march up to Jevyan and use a crossbow attack.  When Jevyan is dead, the yellow and green leaders may still be alive. You'll have to kill one, leaving at least one orc leader alive. You pick.  Congratulations!  Enjoy the ending!&lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
* When one of your units is within 8 hexes of a bridge, but you have no units within 2 hexes of the bridge, and there are no units on the bridge, then a Cuttle Fish will appear and destroy the bridge. This is usually disadvantageous. Not only does it leave you with a Cuttle Fish to fight, but it slows your progress south and the bad guys progress north. At least on the hardest difficulty level, it's hard to kill all the spam in time, so you don't want to impede their advance by removing the bridge.&lt;br /&gt;
* When any of your units is killed, it becomes a Walking Corpse. On hard, it becomes a Soulless, which makes it important to be careful with your level 2's, especially Lancers.&lt;br /&gt;
* After the first orc leader is killed, then some gold goes to mister Lich. It's 40, 80, or 120 gold, for easy, medium, and hard, respectively.  The lich will receive some gold once you kill his Familiar.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[MainlineCampaigns]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Campaigns - The Rise of Wesnoth]]&lt;br /&gt;
[[Category:Campaigns - Walkthroughs]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=TheRiseOfWesnoth&amp;diff=51428</id>
		<title>TheRiseOfWesnoth</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=TheRiseOfWesnoth&amp;diff=51428"/>
		<updated>2013-06-17T20:09:41Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* A Harrowing Escape */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Strategy Guide for The Rise of Wesnoth Campaign ==&lt;br /&gt;
&lt;br /&gt;
===Campaign strategy===&lt;br /&gt;
&lt;br /&gt;
Over the course of this campaign, you will need to level up to some:&lt;br /&gt;
&lt;br /&gt;
* Healers: White Mages/Mages of Light (at least four)&lt;br /&gt;
* Undead killers: Paladins (two)&lt;br /&gt;
* Mobile strikers: Silver Mages (at least one, preferably more), Grand Knights (several), Fugitives (one or more helps)&lt;br /&gt;
* Damage sinks: Royal Guards, Iron Maulers, Highwaymen, Halberdiers, level 3 Burin, and again Grand Knights&lt;br /&gt;
* Leaders: level 3 Haldric, level 3 Lady Outlaw, and much later level 3 Commander Aethyr &lt;br /&gt;
* Ranged attackers: Great Mages (can use several in the last scenario), Longbowmen/Master Bowmen (two), Trapper/Huntsman (one is helpful)&lt;br /&gt;
&lt;br /&gt;
A Mage of Light, one Paladin, and five Grand Knights make a perfect assault team!&lt;br /&gt;
&lt;br /&gt;
Although Horsemen are key for the first three or four scenarios, it's important not to be too reliant on horse units through the middle part of the campaign, as there are many hard levels underground, in swamps, in water, or against Saurians; use XP from the scenario ''The Vanguard'' to get to 2 Paladins and 2+ Grand Knights.&lt;br /&gt;
&lt;br /&gt;
Don't overlook Pikemen/Halberdiers, which are useful in many levels; pierce attacks work well against Drakes and against the dragon, and they are handy for defensive roles especially repelling Wolf Riders. They are less good against undead, though, and don't get that +1 MP Royal Guard speed bonus.&lt;br /&gt;
&lt;br /&gt;
Due to many undead opponents, you will want to recruit many Thugs at times, and get a few (the quick ones, since you need them underground) leveled up. Footpads help too, once leveled up. Due to swamps, you will sometimes be spamming Poachers, which get marksmanship once at level 3. These, plus Lady Outlaw, give tactical options at other levels too: some decent chaotic troops form an ideal reserve, since you can attack with your lawful troops at dawn, and by nightfall when you need to heal them, use some chaotic troops to either continue the attack or to shield your healing lawful units.&lt;br /&gt;
&lt;br /&gt;
Here are some recommended units to have obtained by specific scenarios:&lt;br /&gt;
&lt;br /&gt;
2. The Fall - 1 Knight&amp;lt;br&amp;gt;&lt;br /&gt;
3. A Harrowing Escape - 1 White Mage, 2 Knights, plus about-to-level troops&amp;lt;br&amp;gt;&lt;br /&gt;
4a. The Midlands - avoid, go to The Swamp of Eden instead&amp;lt;br&amp;gt;&lt;br /&gt;
4b. The Swamp of Eden - level 2 Haldric, level 2 Lady Outlaw, 2 Knights, 2 Shocktroopers&amp;lt;br&amp;gt;&lt;br /&gt;
6. Temple of the Deep - level 3 Haldric, level 3 Burin, 1-2 Mages of Light or several Outlaws / quick Bandits&amp;lt;br&amp;gt;&lt;br /&gt;
8. Clearwater Port - level 3 Lady Outlaw, 3 White Mages / Mages of Light, 3 Iron Maulers / Royal Guards / Halberdiers&amp;lt;br&amp;gt;&lt;br /&gt;
12. A Final Spring - 1-2 Silver Mages&amp;lt;br&amp;gt;&lt;br /&gt;
14. Rough Landing - the 3 loyal Mermen from the previous scenario, ''Peoples in Decline''[glandis] In 1.8.6, there was no opportunity for 3 loyal mermen - maybe this was in an older version? And only Merman fighters can be recruited - no Netcaster upgardes are possible&amp;lt;br&amp;gt;&lt;br /&gt;
17a. The Dragon - up to 4 White Mages / Mages of Light&amp;lt;br&amp;gt;&lt;br /&gt;
17d. Cursed Island - 1 Paladin&amp;lt;br&amp;gt;&lt;br /&gt;
19. The Vanguard - 4 Knights/Lancers/Grand Knights, 2 Paladins (or about-to-level Knights)&amp;lt;br&amp;gt;&lt;br /&gt;
20. Return of the Fleet - 1 Mermen Entangler, 1 Merman Triton with Storm Trident, level 3 Commander Aethyr desirable&amp;lt;br&amp;gt;&lt;br /&gt;
22. The Rise of Wesnoth - 2 Paladins, 3 Royal Guards, 4 Mages of Light&lt;br /&gt;
&lt;br /&gt;
Because the campaign is long and you won't be able to recall all your level 3's in the final scenario, it pays to create some &amp;quot;uber-units&amp;quot;. An example is a quick, resilient Silver Mage that has been AMLA advanced a few times.&lt;br /&gt;
&lt;br /&gt;
==Scenarios==&lt;br /&gt;
===A Summer Of Storms ===&lt;br /&gt;
&lt;br /&gt;
This is a relatively easy scenario, so gear your recruitment and strategy with an eye towards gathering XP.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
# For the first round, recruit 2-3 Horsemen and the rest can be all Spearmen or a mix of Spearmen and Bowmen as you see fit.&lt;br /&gt;
# Then, you should probably hire Bowmen and more Spearmen. Whatever Bowmen you can get advanced will be useful later on for fighting the many trolls, grunts, and riders you will encounter. Note, however, that you will not have any healers until you level up at least one mage to White Mage status, and the sooner you can do that the better. Red mages will also prove very useful in subsequent scenarios, so consider recruiting at least two mages.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* Players have used at least three strategies with success...&lt;br /&gt;
# The &amp;quot;over the bridge&amp;quot; strategy: Send the horsemen with the king over the bridge, and the others should follow or start going over the mountain, to avoid being attacked from behind. Send subsequent Spearmen and Bowmen on the &amp;quot;over-the-bridge&amp;quot; road, and when the Prince and final troops have just about caught up, march on the enemy camp.&lt;br /&gt;
# The &amp;quot;hide in the swamp&amp;quot; strategy: Proceed much like the above, but send the king with 3 Horsemen to capture the nearest houses, then retreat into the swamp area until you have your lawful bonus to kill off troops during the day. To hold them back, you can use a Spearman and a Mage (to level him.)&lt;br /&gt;
# &amp;quot;Sandbagging&amp;quot; strategy: On the hardest difficulty level, the initial enemy assault will only be easy to handle by entrenching your troops behind the river. Use the king to block the bridge initially, while Spearmen handle the shoreline just north and Horsemen carefully flag villages across the river. Run the king around, lending his leadership as you massacre the stupid enemy troops that have jumped like lemmings into the water. &lt;br /&gt;
* For all these options, you will also need to send a squad north into the mountains and around into the flank of the enemy. A quick Spearman, a quick Bowman, and one other unit, possibly a quick Mage, should be more than sufficient.&lt;br /&gt;
* When you see that the fronts are under control, stop recruiting and send prince Haldric and your Mages over the bridge on a quest for XP, assisted by the leadership of the king, and converge on the enemy camp.&lt;br /&gt;
&lt;br /&gt;
===The Fall===&lt;br /&gt;
&lt;br /&gt;
This is a scenario that looks scary, but it is only moderately difficult with proper recruitment and strategy.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* Recall or recruit Spearmen and Bowmen to man the lines.&lt;br /&gt;
* Horsemen/Knights are desirable, because you probably do not yet have a White Mage, and the villages are widely spaced.&lt;br /&gt;
* Recalling or recruiting Mages for XP gathering is highly advisable for future scenarios.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* There are three basic approaches to take out the outlaw leader...&lt;br /&gt;
# &amp;quot;Brute force&amp;quot; strategy: You can march west with a large army and use part of it to hold northwestern orc. Use the rest to fight outlaws and kill the leader. This strategy requires a lot of troops but it can bring you plenty of experience and can bring a quick victory.&lt;br /&gt;
# &amp;quot;Assassination over the bridge&amp;quot; strategy: You can assassinate the outlaw leader. One way is to wait until the orcs have killed almost all outlaws and then assassinate the outlaw leader with Knights, rushing over the enemy camp's bridge and into the keep. This strategy is risky because orcs can kill the leader before you.&lt;br /&gt;
# &amp;quot;Assassination via the mountain pass&amp;quot; strategy: Another way to assassinate the leader is to send a squad through the southern mountains to the outlaw keep. Two Mages and three Spearmen are enough. You may wish to substitute one of the Spearmen with a Knight or Horseman, though horse units have only a narrow passage devoid of mountains and could get pinned by the enemy.&lt;br /&gt;
* On the hardest difficulty level, you may be forced to assassinate. For either of the assassination strategies, it is a good idea to fight against the northeastern orc nearby your keep. This way, you can secure your back and earn experience.&lt;br /&gt;
&lt;br /&gt;
Hints...&lt;br /&gt;
&lt;br /&gt;
* Saving the loyal Heavy Infantrymen (or Shock Troopers on easy) pays off in later scenarios. To save all three, move them south towards the outlaws.&lt;br /&gt;
&lt;br /&gt;
* Once you eliminate the HP of the Lady Outlaw, she offers to help you. If you say yes, she comes back as a loyal unit in future scenarios and you will be able to recruit outlaw units, plus she cannot be killed in the next couple of scenarios (instead, she disappears when she goes to zero HP, and comes back the next scenario.) This is quite valuable. If you say no and try to kill her, you find out she cannot be killed. However, you do get 200 gold that she leaves behind.&lt;br /&gt;
&lt;br /&gt;
* Heads up: The following scenario (''A Harrowing Escape'') is a handful on the hardest difficulty level. On hard, a carryover of almost 150 gold (so you have 250 starting gold) would be wise, so although Lady Outlaw's assistance is worth much more than 200 gold, you may be forced to choose the gold. Another thing you need to beat the following scenario on hard is a White Mage at or near the start of the scenario. Also, about-to-level units will be especially nice for their self-healing ability and low initial upkeep. Steer XP accordingly.&lt;br /&gt;
&lt;br /&gt;
===A Harrowing Escape===&lt;br /&gt;
&lt;br /&gt;
This scenario is much easier on lower difficulty levels, calling for different strategies.&lt;br /&gt;
&lt;br /&gt;
On easy/medium...&lt;br /&gt;
* Recruitment: You should recruit/recall at least one, possibly two Mages here, and use them for killing Goblin Spearmen and finishing off injured Wolf Riders in the hills &amp;amp; mountains bordering the valley. Other than the Mages, simply recruit what you want, and go along the road. You get enough villages to pay upkeep for quite some army, and can give some of them a bit of experience.&lt;br /&gt;
* Strategy: Leave a few units in the rear, as the enemy can cross hills quickly. Note that Footpads and Outlaws will also cross hills at reasonable speed, if you need to hunt down some units. There are two castle tiles about halfway down, try to send Lady Outlaw and Brunin the Lost to them, they make good guards in case the enemy tries to come straight up. You can also send a couple groups of units down southeast to the lake, so you can prevent the Green team (southeast) from coming up the river. You can also kill the two Orcish Grunts (or Warriors on medium) on the southern castle tiles and then move Lady Outlaw and Brunin to them.&lt;br /&gt;
&lt;br /&gt;
On hard...&lt;br /&gt;
* Recruitment: To beat this scenario on the hardest difficulty level, you need some level 2 (or better yet, about-to-level level 1) units already and a lot of starting gold. It is possible with ~200 starting gold, but only barely. 250+ is better. You can stretch your gold a bit by not going negative on upkeep and waiting until you can't wait any longer to do one last round of recruiting, recalling mostly level 2's. For timing your final recruitment, watch the wolves that are likely trying to flank through the mountains south of your keep. Another requirement for beating this scenario is a White Mage (or two.) If need be, you must promote a Mage (or two) &amp;lt;i&amp;gt;tout de suite&amp;lt;/i&amp;gt;, as you will be dealing with severe damage and assassins, while only having easy access to 2 or 3 villages initially. Horsemen and Knights are useful for dissipating damage by serving as meat shields against blades and then running off to remote villages to heal. Quick Horsemen are especially nice, as they can transfer between two strategically placed villages in one turn, for healing on the go. Horsemen, Knights, and Swordsmen are useful for swatting assassins. &lt;br /&gt;
&lt;br /&gt;
* Strategy: More important than terrain is avoiding getting flanked, so mobility of individual units is key; if you climb up deep into the mountains, you will have a harder time with mobility than staying on or near the valley floor. Additionally, many of your units cannot go on mountain hexes, so it's easier to maintain your lines if everyone stays close to the valley. Near the start of combat, it's crucial to kill units quickly on the road: first the wave of wolves, then the wave of assassins. In contrast to easy and medium, on the hardest difficulty level both pairs of roadside castle tiles are guarded, not just the second pair. As on medium, the guards are Orcish Warriors.&lt;br /&gt;
&lt;br /&gt;
Hints...&lt;br /&gt;
* On medium/hard, you can lure out the roadside guard Warriors one at a time by putting a unit within attack range of one (and out of range of the other.) They mostly come at night. Mostly. That is, the Warriors might not bite bait put out during the day.&lt;br /&gt;
&lt;br /&gt;
* If you have Lady Outlaw, note that she has leadership, which will be useful to help promote Prince Haldric, if he is still level 0. It's worth advancing her to level 2, to continue to provide leadership to level 1 Haldric and your other level 1's. You may also make use of her odd ability &amp;quot;distract&amp;quot;, which allows adjacent allied units to ignore ZOCs. And Lady Outlaw allows you to recruit outlaw types. On hard especially, Thugs can be useful as meat shields and to provide strong attacks at night when your lawful forces are crippled. Remember too that Lady Outlaw cannot be permanently killed (at least not yet), so when desperate times call for desperate measures, you can move her into a suicidal position.&lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
&lt;br /&gt;
* The scenario can be beaten on hard with 154 gold only (I decided to trust the lady). Key points in the strategy I used:&lt;br /&gt;
** Underrecruited as heavily as possible, so that the upkeep of my current units was completely offset by my villages. Only 2 footpads to go for Burin and villages down the path right at the start. Only level 2 unit I recalled initially was a white mage. Recalled the 3 loyal HI and tried to arrange it so that they aren't attacked by archers. Recruited several thieves, since they are cheap and the grunts are font of attacking them instead of my mages (and they still often survive on 70% def).&lt;br /&gt;
** During the main phase of the battle, stayed on the safe side of the river (this was the actual key point). Used the river, mountains, castle and swamp to have good defense for myself and bad one for the orcs. As shortly as possible before my income turned negative, recruited/recalled an additional 5 units. Needed to give up the village abroad the river as well (so only 3 villages left).&lt;br /&gt;
** What also helps as well is the fact that there are two enemy sides as opposed to a twice as strong single enemy side. If one of your units could be attacked by 3 enemies, but 1 of these hexes is currently blocked by the other side, the currently moving enemy decides to attack units which it (they) is (are) actually less likely to kill than that one. AIs don't cooperate, that is.&lt;br /&gt;
&lt;br /&gt;
* There is Dwarf Steelclad in the village at 8,5. It's not far from your camp, so send Lady Outlaw there. Dwarf joins you because &amp;quot;It has been a long time since he felt the satisfying crunch of Orcs under his Axe.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* After you kill the first orc leader, an Orcish Slayer and two Assassins will pop out of nowhere, so you would be wise not to have any wounded units stuck without movement points at that point. Also, the other leader will get an infusion of gold and start recruiting on all available hexes, so if you can sit on some of those hexes first, it will help keep the situation from getting out of control.&lt;br /&gt;
&lt;br /&gt;
* At the end, you will be given the choice of the river/swamp road or the midlands/orc road. These fork to the scenarios ''The Swamp of Esten'' and ''The Midlands'', respectively. The swamp scenario is relatively easy, while ''The Midlands'' could cost you some leveled units or even prove impossible to beat if you are low on gold. Also, the swamp gives you a free loyal White Mage, so it's a no brainer, unless you want more of a challenge.&lt;br /&gt;
&lt;br /&gt;
* Heads up: it would be wise to have at least 1 Mage either levelled up to White or about to level up before going to the scenario ''The Swamp of Esten''.&lt;br /&gt;
&lt;br /&gt;
===Diverging Campaign Path===&lt;br /&gt;
====The Midlands====&lt;br /&gt;
&lt;br /&gt;
Orcs again. But you chose that way. This scenario may appear impossible, but with a lot of gold and a little strategy, it can be beat. &lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* You are given plenty of time, so use it wisely. The enemies send lots of orcs, mostly weak ones. So recruit and recall everything you can.&lt;br /&gt;
* Recall any White Mages you have. You'll need them.&lt;br /&gt;
* Bowmen are good for the wolf units you will be facing.&lt;br /&gt;
* The rest depends on your strategy.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* The &amp;quot;Fast Assault&amp;quot; option: use an assassination team. If you go west, only your Knights and Horsemen will arrive and fight at daytime. So go south. Take the bridge and defend against the enemy closing in from the west. Take out Yellow with a fast assault team (they should take a healer along), but be careful about the leader. Your main force moves west, takes and holds the second bridge, and takes out Blue. Your assault team stays in the south and goes for the last enemy leader - they won't face any serious resistance. The enemy moves north to support Blue. The HI guarding the bridge might gain a level or die, but hopefully not the latter, as they are loyal units in a long campaign. With this approach, you can finish early (around 25 turns) and keep your losses low.&lt;br /&gt;
* The &amp;quot;Dark Assault&amp;quot; option: use Footpads.  If you chose to work with the the outlaws in the last round, then this works well.  Footpads are cheap.  And they are fast.  And they have good defensive abilities.  Plus they fight well in the dark and in the forest.  So recruit lots of Footpads-pawns and quickly dispatch them to the upper west and south, followed by more powerful units: Mages, Horsemen, etc.  For the time being, leave the middle enemy alone.  To the upper west, send several Footpads into the forest and capture the village and set up a defensive line.  This cuts down the enemy's gold and increases yours.  Don't attack at first, just defend, until more of your slow higher powered units arrive. The strategy here is to pick off the orcs, and send the Horsemen to capture villages.  While this is going, to the south you send your Footpads to capture any villages you can and, more importantly, put a Footpad on the hex that is adjacent to the bridge, thereby stopping easy advancement of their greater numbered troops. A White Mage, a couple Trappers and some Bowmen would make a good escort. Probably sending a Thief or two would be good too, to help dispatch any enemy that infiltrate the villages north of the river. one enemy got into one of the villages on the north of river, and it took a lot to dislodge him.  The intention is to engage the enemy so that they are fighting from the river squares, at a huge disadvantage.&lt;br /&gt;
&lt;br /&gt;
====The Swamp Of Esten====&lt;br /&gt;
&lt;br /&gt;
This scenario is not too hard if you are conservative and don't send important units off alone.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
# First round, recall 1-2 quick Knights (or Paladins, if you have them), recruit 1-2 Horsemen, and recall your loyal Shocktroopers or whatever they are now.&lt;br /&gt;
# Next round, recruit/recall Mages to kill Scorpions (and Bats) and at least one White Mage to deal with poison, plus maybe a Poacher, as they are good in swamp (and you would like a Huntsman eventually, for its markmanship.)&lt;br /&gt;
# A little Thug spam can come next, but you don't need a full third round of recruitment. Then send Prince Haldric off to lend his leadership.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
# You must blitz the northeastern leader, or risk getting bogged down on bad terrain facing a swarm of undead spam, which can be nasty at night. Quickly send Knights (or Paladins) and Burin over the ford to start wailing on undead. A disposable Horseman can try to take out Scorpions in this area at first. On the way is your proper Scorpion disposal unit, the Mages and White Mage. Try to kill Dark Adepts with Burin or horse units before they have chance to attack you. As you close in on the leader, hover your mouse over him to watch where he can go, as his ranged attack is nasty and can be followed up by waves of kamikaze Walking Corpses, which can take out a Knight.&lt;br /&gt;
# After you have killed the northeastern leader and eliminated troops there, you can either send your whole army back across the ford and south or split your army into two halves, sending one part to each leader. If you have lost several units but have lots of turns left, it's probably safer to stick together. This is not a simple mop-up operation, as powerful undead can take out some of your valuable units if you're not careful. On hard, Shadows are a constant threat at night.&lt;br /&gt;
&lt;br /&gt;
Spoiler...&lt;br /&gt;
&lt;br /&gt;
* Searching the temples is a good idea. Some have gold. There is a free loyal White Mage hiding in (a random) one of the temples - visit the temple close to the keep ASAP, and if not there, try rushing a horse unit or Lady Outlaw to the temple at 19,5. However, some of the temples contain undead, so keep extra troops nearby when you enter one.&lt;br /&gt;
&lt;br /&gt;
===The Oldwood===&lt;br /&gt;
&lt;br /&gt;
This is a relatively easy scenario.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
# First round, recall your (probably leveled up) Heavy Infantry from The Fall and some quick fighters.&lt;br /&gt;
# Second round, recall White Mages and quick Mages.&lt;br /&gt;
# Third round, round out with Thugs, Bowmen, and Spearmen, preferably quick.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* Your forces will have three main combat arenas: the northeast, the south, and the middle.&lt;br /&gt;
# The main bulk of your force, including at least one White Mage, should head east to the orc in the northeastern castle. The leader there recruits a lot of units, and most of them are level 2, so watch out.&lt;br /&gt;
# Haldric, a White Mage, your loyal Heavy Infantry types, and a couple of level 1's (maybe a Mage and a Thug) should head south to the other orc leader. A few effective melee units can easily counter the riders they send early on, and then with a little forethought and patience you can take out their Archers and Crossbowmen without giving them time to shoot. &lt;br /&gt;
# The castle in the middle is inhabited by the tree folk, so don't bother sending troops there; however, you might want to keep a couple speedy units not far off to watch their backs, in case the allied leader gets into trouble, as is usually the case.   &lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
* The temple contains the entrance to the catacombs, but you need the leader Wose's help to open it, and to get that help you have to win the current scenario, so there is no point in visiting this temple.&lt;br /&gt;
&lt;br /&gt;
* Heads up: The next scenario is in the catacombs, i.e., underground, and it's a tough one, so you need to groom your roster accordingly. Two Mages of Light would make it a whole lot easier. Failing that, level up your fearless loyal Shocktrooper and chaotic outlaw types. Bandits/Highwaymen and Fugitives are especially nice. Quick units of almost any type (except horse units) will be helpful, if leveled and possessing high HP (&amp;gt;50).&lt;br /&gt;
&lt;br /&gt;
===Temple in the Deep===&lt;br /&gt;
&lt;br /&gt;
You will be facing undead underground. This is a difficult situation that will prove much easier with proper recruitment. Then the strategy will be fairly straightforward.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
&lt;br /&gt;
* All in all, what you need is a small elite force. Two rounds of recalls is enough, if you didn't lose Burin in a prior scenario.&lt;br /&gt;
# First round, recall your loyal Shocktroopers / Iron Maulers, especially the fearless one, though their slow movement will prove frustrating. Also on the first round, recall a fast &amp;quot;tank&amp;quot; and someone to grab the holy water (if Burin is not your choice.)&lt;br /&gt;
# Second round, recall any Mages of Light you might already have, and a total of at least two White Mages or Mages of Light, preferably quick. For the rest of your recruitment, what you need are high movement (6+ MP) non-horse units with high hitpoints (&amp;gt;50 HP), preferably chaotic, preferably with a ranged attack, and preferably impact attacks. Put all the requirements together and it points to Fugitives. Outlaws and quick Arch Mages are worth recalling too. Fill out the rest with Bandits/Highwaymen, Trappers/Huntsmen, and Longbowmen/Master Bowmen, preferably quick. You might think that Red Mages would be good, but they attract melee attacks that they likely will not survive. Note that Horse units are too sluggish to be useful here and should not be recalled/recruited.&lt;br /&gt;
# Third round (optional), you can add a unit or two for a safety margin.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
&lt;br /&gt;
# There are two ways north, but they will meet up together before you meet any enemies besides the Tentacles. Ignore the tentacles for the most part and only kill them when it's convenient, as you will need to have a strong line set up by the time you engage the undead. Watch out for the enemy's Bone Shooters, Revenants and Deathblades, as they could easily mess up a level 3 unit. Once you see the two choke points, hold them so one of their units is facing 2 of yours (preferably with a White Mage behind them). You may be able to level up a White Mage to a Mage of Light while fighting in the choke point. If your troops are too slow to grab both choke points, you can send Burin and others to the west choke point while your slow troops line up at the southeast shoreline and bridge.&lt;br /&gt;
# Gradually progress northwards once the flow of baddies has tapered off, and once you get into the final chamber, the boss should be a piece of cake, although his ranged attack is devastating, so try to attack him with melee units. Be careful if he has recruits around, as their combined damage can take down one of your level 3's. Note that the Ruby can only be picked up by Haldric.&lt;br /&gt;
&lt;br /&gt;
Hints...&lt;br /&gt;
&lt;br /&gt;
* Holy water: Burin is very effective if you give him the holy water; however, it's more helpful to send Burin running to the west choke point without delay. A good alternative is a Highwayman - or a Bandit, who should level quickly. Compared to a Highwayman/Bandit, Prince Haldric or a Royal Guard is not that great a choice for the holy water due to their lawful alignment and -25% penalty, unless you have (or will soon get) a Mage of Light.&lt;br /&gt;
&lt;br /&gt;
* XP: Use this level to get experience. The early-finish bonus is tiny. The tentacles are perfect for leveling up units. If you're hurting for leveled chaotic units, you can even level up two raw recruit Thugs (use Haldric's leadership to assist). Keep Burin away from the water at this stage, or he'll kill all tentacles as they attack, depriving those who could benefit from the XP.&lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
&lt;br /&gt;
* Your killed units will be turned into Walking Corpses (or Soulless on hard.) Therefore, spam is not helpful. A Mage or two can be okay, if used with great care, but mostly you need to recall leveled troops here.&lt;br /&gt;
&lt;br /&gt;
===Return to Oldwood===&lt;br /&gt;
&lt;br /&gt;
Plot only.&lt;br /&gt;
&lt;br /&gt;
===Clearwater Port===&lt;br /&gt;
&lt;br /&gt;
This scenario is easy if you take the first boat out, more and more challenging for the second and third boats, and very difficult (on hard) if you want to take out all three leaders.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
# First turn, recall your loyal Shocktroopers / Iron Maulers from ''The Fall.'' You will also want several Footpads, for speedy village snatching, coastline defending (under leader supervision), and possibly for filling castle hexes if your lines get too thin.&lt;br /&gt;
# Second turn, recruit/recall more low maintenance units. It's a good scenario for leveling troops, so recalling acouple half-leveled Spearmen or similar is a good idea.&lt;br /&gt;
# Third and later turns, start recalling your high maintenance units. The key to winning this scenario is to recall several advanced units that can take a lot of damage and get good defense in castles (no Horsemen). You will also want at least 3 White Mages or Mages of Light.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
# Backstab your ally, stealing all his villages. Your ally is useless anyway, except for the entertainment value from his troops' suicide runs. The income is much better in your hands.&lt;br /&gt;
# Send your heavy duty troops with some White Mages over to the line of castle near Lt. Aethyr. (Optionally, you can rush forward past the castle, but you will need to return almost as quickly before the main enemy wave and night arrive.) Aethyr will usually be done recruiting by the second or third turn, before the enemy reaches you, so fill the entire line with your units, and put Knight Sir Rudry in the one non castled tile (or leave it empty, if no enemy are adjacent.) Place the White Mages behind this line. After the enemy has reached you and it is your turn to attack, go mostly for the assasins, as they have a weak melee attack and their poison can be a huge problem.&lt;br /&gt;
# Meanwhile, on the northeastern coast, the northern enemy leader will send lots of units to catch your flank unguarded. Send 2 Footpads, a Spearman, Lady Jessene, and Haldric to guard the coast. If Lady Jessene is already level 3, you can substitute a Royal Guard, Swordsman, or Javelineer for Haldric. This coastline defense squad may need help later, so be ready to divert a speedy powerful unit there. If you keep a healthy unit on the village at the tip of the land, then, unless you are very unlucky, you will be able to hold off everything the northern leader sends. After the assault from the water has been crushed, some of your troops may be able to cross the ford north, but be careful not to get attacked in the water with only 20% defense. (Certain of your chaotic units do have 40% defense in water; now is a good time to pay attention to that.) Also, notice that the lighthouse has a similar effect as a Mage of Light.&lt;br /&gt;
# You have two options for the endgame:&lt;br /&gt;
## &amp;quot;Total victory&amp;quot; strategy: Once you've thinned the enemy to where they only have a few units that are close to your line, usually this happens conveniently around dawn, move your people out and start heading for their leaders. Split your force, sending a few down the southern path, to distract the eney and most of them toward the middle leader, to kill him. Once he's dead, send some of your army down to kill the southern leader and devote a few units to defending the bridge until the rest of your army can rejoin you. A unit or two with a lot of HP with a white mage are usually enough to do this.&lt;br /&gt;
## &amp;quot;Run like hell&amp;quot; strategy: Alternatively, you can leave your leader near the docks and take one of the boats to end the scenario.&lt;br /&gt;
&lt;br /&gt;
===Fallen Lich Point===&lt;br /&gt;
&lt;br /&gt;
This is a high variance scenario. It may be very easy or very hard, depending on events beyond your control.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* Recruit fairly lightly initially, as you will likely have a chance to use the Lich's keep to recruit again.&lt;br /&gt;
* Mages, White Mages, and Mages of Light are good, and as are all the other advancements of Mages.&lt;br /&gt;
* You automatically should have your loyal Knight. Because of the mountains around &amp;quot;lichland&amp;quot; and frozen ground everywhere else, additional horse units are not recommended, except a single Paladin will come in handy.&lt;br /&gt;
* Some Thugs or a Bandit or Highwayman will provide a little extra undead bashing power.&lt;br /&gt;
* Footpads will help with village flagging, after the Wolf Rider types are taken care of, but you can postpone buying Footpads until after killing the Lich.&lt;br /&gt;
&lt;br /&gt;
Strategy... &lt;br /&gt;
# The Orcs will be busy with the Yetis, so you can walk with a big group south and kill the Lich-Lord. Move Haldric to the stone monument to de-petrify the Lich. It may help to post some units around the undead before doing so. Use several mages to make a hole or two in the ring of undead, and then push in a burly fighter or two and/or Paladin to kill the Lich.&lt;br /&gt;
# After killing the Lich, assess the Orc/Yeti situation (as well as the empty village situation) and decide if you need to use the Lich's keep to recruit some reinforcements.&lt;br /&gt;
# After that, head north and walk into the sewer entrance (the &amp;quot;cave&amp;quot;) or else kill the orc leaders.&lt;br /&gt;
&lt;br /&gt;
Hints...&lt;br /&gt;
* It is also possible, if you recruit heavily, to split your force and head north to attack the eastern Orcs before they finish with the Yetis.  However, be careful not to be attacked by a Yeti yourself; a Yeti is dangerous even if heavily wounded. A Yeti will attack you if it can get to a unit within one turn (and it doesn't have a more appealing orc target.)&lt;br /&gt;
* When dealing with the Lich, be aware that he has money; if you let him vacate any of his encampment tiles, or if you kill any of his units but do not occupy their tiles, he will be able to recruit.  (This is not necessarily all bad, as it can mean more experience, but depending on the strength of your force you may want to be careful.) &lt;br /&gt;
* Note that this level becomes a lot tougher if the Yetis get poisoned early on and quickly die. If this happens you basically have no other choice than to kill the orc leaders first.&lt;br /&gt;
&lt;br /&gt;
===Sewer of Southbay===&lt;br /&gt;
&lt;br /&gt;
This is a swampy underground scenario, but with attention to recruitment, it's not very difficult.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* As always underground, you want non-horse units with 6+ MP.&lt;br /&gt;
* Recall White Mages / Mages of Light, at least two, three is probably the optimal number.&lt;br /&gt;
* There are quite a few villages in this cave, so an expensive force is supportable, though not necessary. Some players recruit a large and spammy force, while others go with small and elite:&lt;br /&gt;
** Option 1, &amp;quot;Large and spammy&amp;quot; recruitment: Recruit four each of Mages, Thugs, and Poachers. Yes, Poachers normally stink, but here they really shine in a swamp that is permanently dark, underground. If you recruit four Poachers, you could finish with three Trappers and a Huntsman - or you could finish with four dead Poachers. The Thugs are especially likely to die, as they will be facing off against Red Mages, but somebody has to do it.&lt;br /&gt;
** Option 2, &amp;quot;Small and elite&amp;quot; recruitment: Recall something like one Red Mage, one Arch Mage, one Silver Mage, 2 twooyal Guards/Highwaymen/etc, and a Trapper or Huntsman, plus three regular Mages and a Poacher.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
# After leaving your initial chamber, you will be in a large swamp room with three entrances, through which will be a flood of bad guys. Use two Poachers and a Thug or similar to blockade the southeast, a small elite group to block the north, and then a mix of fighters and mages to handle the west entrance. Give each group a White Mage or Mage of Light, as well as at least one regular Mage. Try to keep the Mages of Light away from your chaotic forces on the front lines, though. Use the leadership of Haldric and Lady Jessene - and Mage of Light illumination or lack thereof - to get the most from each attack.&lt;br /&gt;
# When the initial battle has died down, you have two options:&lt;br /&gt;
## If you have enough forces, you can divide into two groups and attack both brothers simultanously, east and west.&lt;br /&gt;
## Otherwise, do them one after the other, and then look for the exit.&lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
* Danger: there is a Giant Spider at the exit. You may wish to keep one or two cannon fodder units in order to be able to save your advanced units.  It is best to use ranged attacks against the spider, so leveled mages are good here.&lt;br /&gt;
* Heads up: the next scenario is a lot easier with a lot of gold, especially on the hardest difficulty level.&lt;br /&gt;
&lt;br /&gt;
===Southbay in Winter===&lt;br /&gt;
&lt;br /&gt;
Plot only.&lt;br /&gt;
&lt;br /&gt;
===A Final Spring===&lt;br /&gt;
&lt;br /&gt;
This is a large battle, and any mistake on any front can spell doom, but overall it will be fairly easy on the easier difficulty levels. On hard, it will only be a cakewalk with a lot of starting gold (more than 450 or so.)&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
# On the first turn, recall a Silver Mage to teleport to the island, recruit Footpads for village snatching, recall one or more of your loyal Iron Maulers (leveled up Heavy Infantrymen from ''The Fall''), and recall one or more Knights or similar.&lt;br /&gt;
# Second turn, continue with this theme, but it will be nightfall soon, so recall Outlaws, Bandits, Assassins, etc.&lt;br /&gt;
# Turn three is a bit more of the same, but you need to start thinking about preserving your income and also keeping a gold reserve. You can spam some peasants to preserve cash and income.&lt;br /&gt;
# Turn four turn is more of the same.&lt;br /&gt;
# Turn five is similar, but it will be day soon, so lawfuls like Knights and level 1 Mages are a good idea.&lt;br /&gt;
# Turn six, you will have new recruitment options (see spoiler at walkthrough end.)&lt;br /&gt;
&lt;br /&gt;
Strategy is broken into four fronts...&lt;br /&gt;
# The first front is the south land area. Do a counter-clockwise sweep with mounted units, optionally augmented with Footpads, which can help pad out your lines with forest and village hexes. Note that it will be nightfall soon after game start, so it might be wise to delay any serious mounted assault until the next day, and you can delay your recalls for this.&lt;br /&gt;
# The second front is the walled city. Move slower units and your loyal White Mage / Mage of Light to defend here. Take your ally's villages; your ally wouldn't do much useful with the money anyway. When your mounted units from the second front complete their sweep, you can break the remaining southern forces against the city wall in a hammer and anvil. Then your united forces can move north. On easy, you may be able to push north more quickly than that using just part of your city troops.&lt;br /&gt;
# The third front is the bay and peninsula north of your keep. If you don't protect this area well, Wolf Riders and others will mount an amphibious assault in an effort to flank your troops. On the easier difficulty levels, you may wish to beat the punch and quickly establish a bridgehead on the other side of the bay.&lt;br /&gt;
# The fourth front is the two small islands. Send a Silver Mage there ASAP. (You should have a village already there, so the Silver Mage can teleport over.) Footpads/Outlaws/Fugitives and others will help later. Lady Jessene could be used. A quick White Mage would be useful, either on the coast or on the islands. Do not use Assassins on this front. Assassins have relatively weak defense in water against Orcs and Nagas, they're very weak against blade, which is all orcs and nagas use, and their relatively slow movement in water makes backstab hard to use reliably. Overall, you need to devote more resources to this front than you might think.&lt;br /&gt;
&lt;br /&gt;
Hints...&lt;br /&gt;
* You should have lots of high-level units now, so concentrate on recruiting new ones and levelling them up to fill needs.&lt;br /&gt;
* Peasants are useful as placeholders for villages and distractions for the enemy.&lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
* On turn 5, a gang of nasty undead show up in the east. So, for your city taskforce, you'll want to recruit/recall units with impact and arcane attacks. Note that if undead capture villages, they will be flagged with the Orc island boss' black flag! This can result in an overwhelming number of Nagas, and it's one reason that you must devote a lot of resources to the island campaign. Flag any black flag villages you can.&lt;br /&gt;
* On turn 6, a gang of nasty Mermen show up in the west. Fortunately, they are on your side. You can now recruit Mermen. This is the real reason to keep a gold reserve until this time.&lt;br /&gt;
&lt;br /&gt;
===Peoples in Decline===&lt;br /&gt;
&lt;br /&gt;
This is a bloody scenario versus Drakes. It can be a real challenge on the hardest difficulty setting, less so on the easier levels. Proper recruitment is more important than strategy here, as you will have little opportunity to maneuver.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* Drakes can be dangerous, so this is a great scenario to use the time honored technique of cannon fodder. Now that you can recruit level 0 units for cheap, you can protect your higher level units by recruiting endless Peasants to distract the Drakes' firepower.&lt;br /&gt;
* Drakes are vulnerable to pierce attacks, so spam cheap pierce attack units. In addition to Peasants, there are Poachers, Bowmen, Peasants, Spearmen, Merman Fighters, and Merman Hunters. Poachers are key here, due to the swampy terrain and their chaotic alignment.&lt;br /&gt;
* You will need about 3 White Mages / Mages of Light in all.&lt;br /&gt;
* On your last turn of recruitment when you have about 80 gold, recall some advanced units, like Master Bowmen.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* Since you will have a lot of level 1 and 0 units, make sure to use the leadership of Prince Haldric and Lady Jessene.&lt;br /&gt;
* Look for opportunities to heal via leveling up.&lt;br /&gt;
* Pay attention to the day-night cycle in this scenario. Drakes will be strong during day, but become very weak in the night.&lt;br /&gt;
* Take advantage of the mountains for defense, but note that on hard, you need to set up a relatively small perimeter around your base, as you will be hard pressed to even hold a small area.&lt;br /&gt;
* Be careful with your loyals.&lt;br /&gt;
* Because most Drakes have powerful ranged attacks, the roles of your melee and ranged units are reversed from the norm. Whereas usually you would use fighters to protect archers, here you will use archers to protect fighters. Melee-only units should hide behind the lines until they attack, preferably at night (with a Mage of Light supplying illumination.)&lt;br /&gt;
&lt;br /&gt;
Spoiler...&lt;br /&gt;
* Make sure you get the Storm Trident in the middle of the sea, but be certain that you've cleared most of the Drakes first, since a Sea Serpent will appear. It's best to have some strong units ready to kill it in 1 or 2 turns. You can give the trident to Lord Typhon, but since he leaves a bit later, you may want to give it to another Merman Fighter. Movement over land is important for Mermen in the campaign as a whole.  If the Merman Fighter to whom you give the storm trident has the Quick attribute, you can make him a Hoplite when he gets to level 3.  Otherwise, make him a Triton, because movement over land is important for Mermen in this campaign as a whole.&lt;br /&gt;
&lt;br /&gt;
===Rough Landing===&lt;br /&gt;
&lt;br /&gt;
You will be fighting Nagas and Vampire Bats, primarily. This is a scenario that may be frustrating on the easier difficulty levels, though on hard it is just par for the course. Good recruitment and strategy will save you from getting slaughtered.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* You are probably going to go negative on gold and be unable to rectify that with the paultry early finish bonus, so you might as will go very negative and be resigned to start the next scenario with minimum gold.&lt;br /&gt;
* Recruit/recall many Mermen and 1 or 2 White Mages or Mages of Light. A few Peasants can be useful to pad out your force, distract the enemy, and protect villages from stray Bats. A Silver Mage can be useful for island hopping but is not essential. Thieves/Assassins are blade vulnerable, and Nagas only use blades, so it's probably best not to recall them.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
# Knock out the southeastern leader in a blitz. It's important to get that out of the way, because a wave of Nagas is advancing at light speed from the north.&lt;br /&gt;
# Next, hurriedly set up a line in the water alongside your fortress island. Your fortress troops can anchor one flank, while Burin the Dwarf can go to the island to the northeast to anchor the other end of your line. Nobody messes with Burin. Move Lady Jessene behind the lines to lend her support to the Mermen. Your loyal Mage of Light will be able to move back and forth more (to lend illumination) if kept in the fortress area.&lt;br /&gt;
# Finally, once the enemy assault wave has been broken, advance northward to kill the final two leaders in a straightforward mop-up operation. Just be careful not leave isolated units where they can get swarmed.&lt;br /&gt;
&lt;br /&gt;
Hints/Spoilers...&lt;br /&gt;
* Try to level up the mermen; they can be useful in another scenario later.&lt;br /&gt;
* Beware of Sea Serpents. Three of them will appear, one on each of the three turns following your first kill of an enemy unit. Make sure to kill them at once. The Storm Trident from the previous scenario and the Ruby of Fire will come in handy against the Serpents.&lt;br /&gt;
&lt;br /&gt;
===A New Land===&lt;br /&gt;
&lt;br /&gt;
This is a non-scenario. The scenario objectives tell you to avoid all confrontation for as long as possible, but actually the faster your units encounter the others the faster the scenario will end.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* None necessary.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* The optimal strategy for gold carryover is to grab the three closest villages, then retreat to your keep and wait. Once one attack occurs, the non-scenario will be over.&lt;br /&gt;
&lt;br /&gt;
Spoiler...&lt;br /&gt;
* One thing to keep in mind is that this the last chance you have to grab some more Mermen as their king leaves.  They are quite helpful in a later scenario so grabbing a few extra here cannot hurt if you can spare the gold.&lt;br /&gt;
&lt;br /&gt;
===The Ka'lian===&lt;br /&gt;
&lt;br /&gt;
Story, with your choice of four battles next.  You have to beat them all in whatever order.  The amount of gold you have should be the factor in deciding when you choose to play Cursed Isle (the undead problem).&lt;br /&gt;
&lt;br /&gt;
===Diverging Campaign Path===&lt;br /&gt;
&lt;br /&gt;
All four scenarios have to be beaten, but in whatever order you choose.&lt;br /&gt;
====The Dragon====&lt;br /&gt;
&lt;br /&gt;
This scenario is not as difficult as it looks, though your recruitment and strategy need to be tailored to fight the Saurian Skirmishers and other foes you will face here.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* Saurians use piercing attacks mostly, so it's better to use units resistant to pierce. Pikemen and Halberdiers have 40% pierce resistance. Javelineers are ideal as Saurians use ranged attacks a lot.&lt;br /&gt;
* You may wish to bench some or all of your loyal Iron Maulers. They are ineffective against the 70% impact resistant Mudcrawlers, while also vulnerable to the ranged attacks of both Mudcrawlers and Saurians.&lt;br /&gt;
* Consider adopting a force of all units with ranged attacks, save for horse and thief units, which can be kept behind the lines when not in use. It is amusing when Saurian Augers are forced to tap your units with their little staffs.&lt;br /&gt;
* Healers are a necessity to deal with the heavy damage your units will be sustaining. Depending on the strategy you adopt, you will want 2-4 healers. Mages of Light rock here, as they can easily do front line duty in pairs and their illumination blinds the Saurians, reducing their damage.&lt;br /&gt;
* You need something to clean up mud. Versus level 0 Mudcrawlers, Horsemen and their advancements can charge with no counterattack, and likewise Thieves and their advancements can backstab with no counterattack. Mages can be used as well on the fire vulnerable mud.&lt;br /&gt;
* A Merman or two will help with water hexes. An Entangler's slow ability will help tame the dragon.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* Players have used many different strategies with success:&lt;br /&gt;
** &amp;quot;Hedgehog&amp;quot; strategy: Fighting Saurians requires a disciplined formation.  If you're used to stringing out troops to move them into position as they get there, that won't work after Turn 2 or 3. You can use a &amp;quot;healing hedgehog&amp;quot; of ten troops--two white mages next to each other and eight troops completely encircling them.  If someone gets badly injured, move them to the inside and put a white mage on one of the long edges, fighting as you go.  If you're trying for the big bonus, you'll need two hedgehogs.  Try to keep reserves back a bit in cities.  If the terrain favorably protects you, or the wounded is a fast unit, you can try moving wounded back to cities too.  Once the main wave of Saurians is broken, you can string non-wounded troops out a bit in the rush for the leaders. &lt;br /&gt;
** &amp;quot;Triangular Hedgehog&amp;quot; strategy: Switching wounded units to the inside of the hedgehog can be a problem if you are surrounded. ZOC prevents you from creating an open hex to move the inner unit into. You can fix this by creating a triangle with three hexes inside, instead of the standard two of the hedgehog. If you do this on your castle, only three units are in grasslands. If you set it right, you can make most of the hexes adjacent to your triangle be grassland as well, forcing the Saurians into a bad defensive position. In terms of unit positioning, the simplest way is to fill two inner spaces with Mages of Light, a but a better tactic is to put one of the mages on an edge, thereby ensuring that all but one of your units are healing. The remaining unit can either be a Merman Hoplite, (prefereably resilient and carrying a Storm Trident) or Lady Jessene, since she has excellent defense and is chaotic and therefore benefits by not being in the Mages' light. &lt;br /&gt;
** &amp;quot;Giant Hedgehog&amp;quot; strategy: Recruit a lot of units, and then move the whole army as one big bulk. Keep healers in the middle (about four), rotate stronger units outwards, and make sure you leave no gaps. The Saurians will slip through the tiniest gap and kill your weak units. Head first for the east or wast leader, but steer for good terrain, because your force will soon be swarmed until about turn 10, when there should be many few Saurians alive.&lt;br /&gt;
** &amp;quot;Standard Line&amp;quot; strategy: Form a line from the west board edge diagonally up towards your keep across the two villages just in front of the forest. You will probably wish to bend upwards at the forest, rather than running the line all the way to the keep. Whenever the Saurians have a small number of troops at your line and you have enough strength to kill them all, you can advance your whole line one hex south, allowing you to get additional attacks on them from non-frontline troops. Once you advance a unit to the first water hex at west board edge, the west leader will probably come out to greet it, so be ready to fry him with Haldric's ruby. After killing the leader, back up into good terrain to prepare to meet the dragon.&lt;br /&gt;
** &amp;quot;Wake the Dragon&amp;quot; strategy: Prematurely wake the dragon (see spoiler below) and back up your troops to north of your keep. When the dragon comes, kill him. The scenario can be over on turn 7. There is no early finish bonus for this, but you can recruit lightly so that you still have gold at the end and will carry-over 40%, if you need it for your next scenario.&lt;br /&gt;
* With all these strategies, the Saurians may hold back for quite a while. This is okay, as the Dragon will eventually appear and come to you. Kill it. Then you are given a choice of whether to end the scenario or to try to kill all the enemy leaders before time runs out. You can choose to finish the remaining Saurians for a nice bonus. However, on the hardest difficulty setting the turn limit (33 turns) is insufficient for you to plow through the vast hordes of level 0 spam to get to the leaders, so it's best to simply end the scenario after killing the dragon.&lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
* The dragon will awake on turn 15 or when you move a unit down around the road north of the mountains. If you wish to wake the dragon prematurely, you can recruit a Horseman on turn 1 and run him down. It's a suicide mission for him, however.&lt;br /&gt;
* If you have a fast non-horse unit in position, rush it to the mountain cave after the Dragon leaves to grab the 200 in gold, though that's nothing compared to the Hero bonus for defeating all the Saurian leaders. So focus on killing all of them first.&lt;br /&gt;
&lt;br /&gt;
====Lizard Beach====&lt;br /&gt;
&lt;br /&gt;
This is a scenario versus Saurians, Giant Scorpions, and Mudcrawlers, where good recruiting and strategy will save you from massive bloodshed.&lt;br /&gt;
&lt;br /&gt;
Recruiting...&lt;br /&gt;
* Mermen are helpful for the swamp and water areas.&lt;br /&gt;
* Bench some or all of your loyal Iron Maulers, veterans from ''The Fall.'' They are laughably ineffective against the impact resistant Mudcrawlers - and laughably vulnerable to their ranged attacks.&lt;br /&gt;
* Thieves, Horsemen, and their advancements are good for mud cleanup, though you must keep them out of range of Saurian skirmishers. Swordsmen and Royal Guards are also good, though overkill.&lt;br /&gt;
* Recall a lot of fairly high HP units, preferably with strong non-impact ranged and melee attacks.&lt;br /&gt;
* Mages are good. Mages of Light are especially useful, since they can do front line duty. Lots of healing may be necessary, about 3 healers are good, so White Mages can be used too. Raw recruit Mages can be used as well, for disposal of Giant Scorpions and the occasional Saurian Skirmisher that wanders too far. At least one Silver Mage is highly desirable, along with a speedy unit (e.g., Fugitive, Footpad, or Horseman) to capture villages for the Silver Mage to use north of the river.&lt;br /&gt;
* [fredbobsmith2] An alternative strategy that works surprisingly well is to simply use a very mage-heavy army. Recall most or all of your high-level mages, throw in a few peasants, and spend the rest of your gold on recruiting mages. Victory will come with shocking ease.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* General strategy: as Saurians have skirmishers and a lot of movement, be sure to protect your wounded units well. Because of the Saurians unnerving ability to concentrate their fire on one unit, be sure to keep several healers around and try to keep your line straight so only two can mob one guy. Hedgehog tactic also seems to work well.&lt;br /&gt;
* Opening strategy: here are some specific strategies that players have used with success in the early part of the scenario:&lt;br /&gt;
# &amp;quot;Mermen in center&amp;quot; strategy: Recall 2-4 Mermen, 1-2 Trappers/Huntsmen, and a lot of high HP troops, then form a line. Initially, you can either form a north-south line around the lake area with one flank at the south board edge, or, if you want to be conservative, you can do a diagonal line in the southeast corner, with both flanks tied to board edges. You'll need the Mermen to handle the lake area, and Trappers/Huntsmen/Mermen for the swamp areas. Keep troops in reserve, so that when a few Saurians meet your line, you can advance your whole line over them. Do not be too conservative/defensive on hard, as your time is limited. &lt;br /&gt;
# &amp;quot;Mermen on flank&amp;quot; strategy: Recall several decent land melee units &amp;amp; then 4-5 level 2 Mermen on rounds 2-3. Most of your force forms a line of battle near your keep, Mermen on the north flank in the river, land units extending south, flanks bent back with strongest units at the corners - then let the Saurians break on it. Once their first wave has broken, the rest of their troops come in drips and are no problem, so now you can split up and wipe out the stragglers and claim villages; any L2 units you start with should level up. After you defeat the main force from the south send just one or two guys north to capture towns so your Silver Mages can teleport into the fray. &lt;br /&gt;
# &amp;quot;Mermen feint&amp;quot; strategy: Recall most of your Mermen from before and send them along the river towards the sea. This will harry the saurian troops coming down from the north, allowing your main force to advance on the southern enemy  undisturbed. Beware, though as your mermen will encounter the Saurians at night time (giving you -25% and them +25%), so try to minimize conflict until dawn, just get in their way.&lt;br /&gt;
# &amp;quot;No Mermen&amp;quot; strategy: On your first two turns recall two keeps of strong, fast veterans like mounted units (not Paladins though; they're pretty ineffective against saurians), Outlaws/Assassins, and Silver Magi along with some other veterans, preferably with a lot of HP: if all goes well (at least on easy and medium) that may be all you need. Dash them across the swamp directly west of your keep, south of the sands, and form a line with strong units at the ends. They'll flank you, but you're stronger than them and you can use your slower units to crush the flanking saurians in a hammer and anvil. The first wave of southern Saurians should get itself killed before the northern Saurians arrive in force. Once the northern Saurians arrive, take them out with your slower units while your quicker ones go for the southern leader.&lt;br /&gt;
# &amp;quot;Sacrificial lamb&amp;quot; strategy: In addition to a couple mages, 2 healers, and some other fighters, recruit a castle-full of peasants to draw the Saurians out onto open ground.  Surround a single peasant on 5 sides, with 2 healers behind him. Build your formation around that.&lt;br /&gt;
* Closing strategy: The enemy's onslaught tapers out after their initial wave, so the final push for the southern leader should be quick and clean. Taking out the northern leader is harder, because all of your units will be stuck south of the marshes and the river. If you want to go for a quick win, just march forth with Silver Mages, Mermen, and anyone who's close enough to be a help. If you don't want to lose any of your better units, patience may be the key.&lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
* When one of your units gets as far west as the second bridge, a wave of Nagas will arrive out at sea. You may wish to delay going that far until the second watch, so that the Nagas will make contact with your forces during the day.&lt;br /&gt;
* Killing one leader gives more gold to the other, so when you've defeated pretty much all the southern leader's forces, just plant a level 3 or two in his keep and leave him alive; kill them both in the same turn.&lt;br /&gt;
&lt;br /&gt;
====The Troll Hole====&lt;br /&gt;
&lt;br /&gt;
This is a scenario that you cannot win by brute force, because the trolls have more brute force than you. Wise recruitment and strategy are necessary.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* It's underground time again, so as before, mainly recruit mages. The trolls are strong, so hopefully you have lots of levelled up mages. Mages of Light are especially nice, because they are tough enough to survive an attack from most trolls, while simultaneously reducing the damage sustained (due to illumination blinding the trolls.) Level 1 Mages can be used to good effect too, especially if quick. If only attacked by a single Troll Whelp, a healthy level 1 Mage will survive.&lt;br /&gt;
* In addition to mages, your chaotic units can be helpful here again, especially against the occasional Rocklobber, which you will not want to attack with mages.&lt;br /&gt;
* Forget about your loyal Iron Maulers (leveled up Heavy Infantrymen from ''the Fall''). They are too slow. It's not that you'll be running around, but you will be rotating troops due to heavy damage, and they will only get in the way.&lt;br /&gt;
* Putting Mermen in the moat will really help you fend off the first wave of attacks.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* There are 4 castles, and two of them (randomly placed it seems) are the troll leaders you need to kill.&lt;br /&gt;
* Try to use the narrow corridors to your advantage, so the enemy can only place one attack against a strong unit of yours, but you can kill a troll at a time with two mages or Haldric. Also keep an eye at your back since they will try to surround you. And resist the temptation to send single units wandering around in what seems empty caves - they will all die, probably by the fangs of a Giant Spider.&lt;br /&gt;
* Try to arrange it so one troll can enter to be attacked by many troops.  Have regular troops in front initially.  Move mages forward to finish the troll, plug the gap where the troll was with Burin or a Royal Guard or an Iron Mauler, and reset the trap on the next turn.  When you've whittled down the enemy, go the direction they came from and kill the leaders, ignoring spider keeps.&lt;br /&gt;
* Alternative: This could be a good choice if you have low gold: recall 2 quick red mages, and 3 quick tough melee units (say 2 royal guards &amp;amp; a L3 chaotic unit like a Fugitive). Play expedition style: abandon the start island, stay fairly close together, with your troops roughly divided in two between those moving forward and those fighting rearguard. Provided you knock out one troll leader early, the rest is manageable, just work your way carefully over to the other.&lt;br /&gt;
&lt;br /&gt;
====Cursed Isle====&lt;br /&gt;
&lt;br /&gt;
You will be fighting undead, mostly of the incorporeal and ghoulish lineages. Victory comes surprisingly easily.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* Recruit lightly, certainly no more than two castles of troops. You could use 1-3 Paladins, 1-2 Mages, and 1-2 White Mages / Mages of Light.&lt;br /&gt;
* Recall your loyal Merman Triton or similar and have him pick up the holy water.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* This can be the first or last quest you choose.  If you can wait, do it last, as you will come out of it with a lot of gold, which you will need for the first scenario after the quests, ''The Vanguard''. &lt;br /&gt;
* Keep a very tight formation for the first night, as Shadows will hit hard and you don't want to get backstabbed or swarmed. By dawn, it should be smooth sailing.&lt;br /&gt;
* If you get anywhere near the enemy leaders' keeps, expect to get rushed by a leader.&lt;br /&gt;
&lt;br /&gt;
Spoiler...&lt;br /&gt;
* In one of the three temples there is a Vampire Lady. All you really need is a Paladin or three to rush the temples. Kill her. Game over, you win. One of the other temples has some gold; grab that first.&lt;br /&gt;
&lt;br /&gt;
===A Spy In The Woods===&lt;br /&gt;
&lt;br /&gt;
Plot only.&lt;br /&gt;
&lt;br /&gt;
===The Vanguard===&lt;br /&gt;
&lt;br /&gt;
You will be fighting a large number of orcs, trolls and other enemies in a location with a natural defensive line, where presumably an underground river has carved a line of sinkholes. This scenario will be difficult or impossible with minimum gold (200), but quite doable with a large amount of gold (450+) even on the hardest difficulty setting. Recruitment and strategy are fairly straightforward, given the board layout.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* Recruit a lot of units; you will need them.&lt;br /&gt;
# First turn, recall/recruit speedy units: Knights, Lancers, Paladins, Horsemen, Outlaws, and similar.&lt;br /&gt;
# Second turn, recall your loyal Iron Maulers (leveled up from ''The Fall'') and Spearmen/Swordsmen/Royal Guards.&lt;br /&gt;
# On subsequent turns, recall/recruit healers and other sorts of Mages, Thugs and their advancements, and Longbowmen. You will need quite a lot of healing power: 3-4 White Mages / Mages of Light and 1-2 Paladins. A Silver Mage would come in handy, since your forces will be widely spaced, but you could start with a couple of Red Mages and try to level up one or both to Silver Mage.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
# This map is smaller than fog of war and sinkholes make it appear.  Rush the west and northwest gaps with mounted units, but slow &amp;amp; strong will carry the day once the sun rises and the odds are in your favor.  &lt;br /&gt;
# Seal of all the gaps in the ring of sinkholes. When the onslaught begins, wounded units can retreat back into villages or be cared for by healers - or actually both, since soon you will be out of non-wounded units.&lt;br /&gt;
# A &amp;quot;Sitzkrieg&amp;quot; may develop, where neither side can make progress. Shift units to the southwest and break out there, using the west board edge defensively. From there, sweep northwards, taking out the western orc leader first and then the next orc leader.&lt;br /&gt;
# Don't forget the chest of gold, which you can see even in fog.&lt;br /&gt;
# End the scenario with the kill of the final leader, a level 3 troll.&lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
* Once you kill more than half the units of any side, a few tough undead units will appear near that side's stronghold at the edge of the map. So, this will happen three times. Beware the Chocobones. Their double damage from charge means they can take out Commander Aethyr at night just by hitting 2 for 2, and they will certainly try if they get the opportunity.&lt;br /&gt;
* Heads up: the next scenario is much less difficult with extra gold. You can use Peasants to avoid going negative on gold, promoting them to Spearmen only when needed.&lt;br /&gt;
&lt;br /&gt;
===Return of the Fleet===&lt;br /&gt;
&lt;br /&gt;
Welcome to the &amp;quot;kitchen sink&amp;quot; defense.  You've made it this far; now the enemy will launch a desperate defense, throwing a little bit of everything at you.  The effect is mostly psychological, but it could be a problem if you came into the scenario with minimum gold or your initial assessment causes you to drastically under-recruit. Time is money.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* On medium, at least, you don't want to overrecruit. First turn, recall Mermen to assassinate the undead leader; 2 Entanglers/Netcasters and the Triton with the Storm Trident. Later, you should recruit 1 or more Silver Mages also for this taskforce as well as for causing general mayhem. It's also worth recruiting 5-10 L1/L0 units to take the brunt of the first wave of attacks; you can use any combination of Footpads, Poachers, Thugs, Spearmen, and Peasants, as you see fit. You'll want some decent L2 and L3 recalls for healing, to flank your lines, and to start kicking some butt at daybreak. A Mage or Red Mage to blast Trolls and Chocobones will level up by end of scenario. Paladins are good too. In addition to your loyal Mage of Light, you will need a bare minimum of 1 more healer.&lt;br /&gt;
* On medium, don't recruit too much for fighting the undead - 2 Paladins at most, 1 or 2 Thugs, the stormy Merman, and the nearest Mage working with your land force are sufficient - the undead commander only gets 5-6 L2 recruits and they come ashore scattered (on medium, anyway). Paladins are so effective against undead that you can wade into the water after them. Just remember, Paladins can't go into deep water and undead can.&lt;br /&gt;
* On hard, you also don't want to recruit too much for fighting the undead, but it's only because going on an offensive early against them will get you crushed by a Chocobone armada.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
# Move the Mermen (including the storm trident) as quickly as possible pretty much straight to the West. (There is a village and swamp hex that can aid your travel if you pick the best route).  Move these guys up the West side once they get there to get to the Undead Leader as quickly as possible.&lt;br /&gt;
# Your loyal units can do a little village grabbing, but it would be unwise to venture too far north.&lt;br /&gt;
# After nightfall, fog will appear; for the rest of the scenario, the map will become shrouded, like in a cave scenario.  So while you're still amazingly able to see, note the key terrain features, castle and city locations, and troop dispositions (especially Chocobones.)  Also, visually explore the avenues of approach you want to be able to see later.&lt;br /&gt;
# The first wave is largely at night and will have Goblin Knights and Pillagers, and later Chocobones and Troll Warriors. The damage they can cause is bone chilling, so make sure to divert their attention with plenty of spam. You want to meet them on the edge of the woodland, while inducing the orcs to fight from the grassland. Footpads and Poachers are handy here, as they have high defense in woodland. Players have had success setting up the initial line in either the north and northeast woodlands, with respect to the castle. Others have succeeded by fighting mostly from the open plain, retaining mobility by leaving the woodlands to their Footpads.&lt;br /&gt;
# Once your Mermen have taken an island city, teleport over one or more Silver Mages to help kill the undead leader - in addition to a Silver Mage, you will want the storm trident, a Netcaster/Entangler, plus one more leveled unit to be fairly sure to knock him out in one round. Quick striking like this you end up fighting a lot less undead.  You probably end up foddering one of the mermen to the Undead Archers, but the trade off is well worth it.  You can keep cycling your mermen up to fight with any orcs or trolls that come into the water. Silver Mages can assist, since they are not needed much in the other part of the fight.&lt;br /&gt;
# After the undead leader is assassinated and the first wave is broken, you may advance cautiously due north or to the northwest along the coast and ultimately finish off the two orc leaders.&lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
* When you are close to the break in the woods at the east board edge, tighten your formation and keep wounded units well away, as a small force of high-level Saurians will appear. Trigger them in daylight if possible, and knock them out fast. Alternatively, you can delay triggering the Saurians as long as possible by moving your force northwest near the water and then onto the small island, though even then it is possible to trigger the Saurians if you are not careful where you step. (Stepping to 10 hexes or less from 34,15 triggers the Saurians.) You can fight the final wave of orcs from the island, then move northeast to the mainland, finally triggering the Saurians.&lt;br /&gt;
* Two cuttlefish appear when you approach the north-central island. Assuming you're sending a strike force through the water to knock out the undead commander, you really don't want to trigger these until that force is on the island - the storm trident Merman is the only thing that can stand up to them in water, and they will avoid him to attack more vulnerable units.&lt;br /&gt;
* Once you kill one enemy leader, the other gets more gold &amp;amp; recruits a new wave of L2s. This can be useful if you need to kill off surplus L1 units to improve the finish bonus, or if you need the XP more than the gold; otherwise, try to knock out both leaders on the same turn before they can recruit more. Alternatively, if you kill the first one at dawn, the second will be reluctant to attack with his L2s in daylight, and you might jump in and kill him before he uses them.&lt;br /&gt;
* Heads up: The next scenario is the final one. Therefore, loyal units are now somewhat disposable. However, you will need plenty of gold. Recruit some Peasants in the current scenario if you need to save some gold. Not only are they cheap, but they have no upkeep and Chocobones love 'em. Send a unit with leadership with them and they can even deal some amount of damage and be used to finish off wounded enemy, though at night you should just let them take the beating passively since otherwise they die too quickly.&lt;br /&gt;
&lt;br /&gt;
===Rise of Wesnoth===&lt;br /&gt;
&lt;br /&gt;
It's the final battle: be patient, recall everybody - the early finish bonus doesn't mean anything. Also, loyal units are no better than other units after your recruitment is finished.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* You will need at least 300 starting gold, maybe more like 400 on the hardest difficulty level, so if need be, replay the previous scenario.&lt;br /&gt;
* To stretch your money, start with loyal Iron Maulers and a couple ready-to-level level 1's and level 2's. Finally, recall as many level 3's as possible.&lt;br /&gt;
* Healers: 3-6 Mages of Light / White Mages. Your few chaotic units will appreciate a White Mage.&lt;br /&gt;
* Horse units: 2-4 Paladins, 3-4 Knights / Grand Knights.&lt;br /&gt;
* Horse escorts: about 3 speedy units, like Royal Guards, Fugitives, and Silver Mages.&lt;br /&gt;
* Tanks: at least 6 high HP units, such as Royal Guards, Highwayman, Master Bowmen, and the loyal Iron Maulers.&lt;br /&gt;
* Mages: at least 3 high level Mages aside from your basic healers, so Arch Mages, Great Mages, and Silver Mages. Additional Mages of Light can be substituted.&lt;br /&gt;
* Some Mermen might be useful here, but surprisingly, they're not really necessary.&lt;br /&gt;
* On 1.9.3 and earlier, you can recruit Saurian Skirmishers on medium and Skirmishers plus Ambushers on hard. This appears to be a bug, so ignore the option.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* You will launch a two pronged assault: mounted units will race to the west and then south, while the main army heads due south.&lt;br /&gt;
* With your mounted units, race forwards by day and backwards by night.&lt;br /&gt;
* Along with the mounted units should go some escorts, speedy foot units intended to kill things like Goblin Impalers, which make even Grand Knights nervous. They would also benefit from a quick Mage of Light.&lt;br /&gt;
* Meanwhile, with your tanks and the rest of your healers and support units, form a line or hedgehog in the woods just south of your keep or next to the river. &lt;br /&gt;
* Keep your leaders with the main army, to avoid drawing too much attention to the mounted detachment.&lt;br /&gt;
* Maintain awareness of the overall battlefield. If the main army gets in trouble, you can send some or all of the mounted units to assist. There may be an opportunity to hammer-and-anvil enemy forces trapped in the middle. And you may wish to transfer units, like Paladins may be useful to the main army after it is on the move.&lt;br /&gt;
* You'll need at least two Paladins to kill Jevyan himself; nothing else is half as effective (except perhaps Mages of Light and suicidal Lancers).  Or you can use a pair of Great Mages (unless you are very unlucky, you should be able to kill him in a single turn). Don't forget to sacrifice Aethyr to Jevyan.  If he doesn't want to come out and play, march up to Jevyan and use a crossbow attack.  When Jevyan is dead, the yellow and green leaders may still be alive. You'll have to kill one, leaving at least one orc leader alive. You pick.  Congratulations!  Enjoy the ending!&lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
* When one of your units is within 8 hexes of a bridge, but you have no units within 2 hexes of the bridge, and there are no units on the bridge, then a Cuttle Fish will appear and destroy the bridge. This is usually disadvantageous. Not only does it leave you with a Cuttle Fish to fight, but it slows your progress south and the bad guys progress north. At least on the hardest difficulty level, it's hard to kill all the spam in time, so you don't want to impede their advance by removing the bridge.&lt;br /&gt;
* When any of your units is killed, it becomes a Walking Corpse. On hard, it becomes a Soulless, which makes it important to be careful with your level 2's, especially Lancers.&lt;br /&gt;
* After the first orc leader is killed, then some gold goes to mister Lich. It's 40, 80, or 120 gold, for easy, medium, and hard, respectively.  The lich will receive some gold once you kill his Familiar.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[MainlineCampaigns]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Campaigns - The Rise of Wesnoth]]&lt;br /&gt;
[[Category:Campaigns - Walkthroughs]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=TheRiseOfWesnoth&amp;diff=51427</id>
		<title>TheRiseOfWesnoth</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=TheRiseOfWesnoth&amp;diff=51427"/>
		<updated>2013-06-17T20:06:00Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* A Harrowing Escape */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Strategy Guide for The Rise of Wesnoth Campaign ==&lt;br /&gt;
&lt;br /&gt;
===Campaign strategy===&lt;br /&gt;
&lt;br /&gt;
Over the course of this campaign, you will need to level up to some:&lt;br /&gt;
&lt;br /&gt;
* Healers: White Mages/Mages of Light (at least four)&lt;br /&gt;
* Undead killers: Paladins (two)&lt;br /&gt;
* Mobile strikers: Silver Mages (at least one, preferably more), Grand Knights (several), Fugitives (one or more helps)&lt;br /&gt;
* Damage sinks: Royal Guards, Iron Maulers, Highwaymen, Halberdiers, level 3 Burin, and again Grand Knights&lt;br /&gt;
* Leaders: level 3 Haldric, level 3 Lady Outlaw, and much later level 3 Commander Aethyr &lt;br /&gt;
* Ranged attackers: Great Mages (can use several in the last scenario), Longbowmen/Master Bowmen (two), Trapper/Huntsman (one is helpful)&lt;br /&gt;
&lt;br /&gt;
A Mage of Light, one Paladin, and five Grand Knights make a perfect assault team!&lt;br /&gt;
&lt;br /&gt;
Although Horsemen are key for the first three or four scenarios, it's important not to be too reliant on horse units through the middle part of the campaign, as there are many hard levels underground, in swamps, in water, or against Saurians; use XP from the scenario ''The Vanguard'' to get to 2 Paladins and 2+ Grand Knights.&lt;br /&gt;
&lt;br /&gt;
Don't overlook Pikemen/Halberdiers, which are useful in many levels; pierce attacks work well against Drakes and against the dragon, and they are handy for defensive roles especially repelling Wolf Riders. They are less good against undead, though, and don't get that +1 MP Royal Guard speed bonus.&lt;br /&gt;
&lt;br /&gt;
Due to many undead opponents, you will want to recruit many Thugs at times, and get a few (the quick ones, since you need them underground) leveled up. Footpads help too, once leveled up. Due to swamps, you will sometimes be spamming Poachers, which get marksmanship once at level 3. These, plus Lady Outlaw, give tactical options at other levels too: some decent chaotic troops form an ideal reserve, since you can attack with your lawful troops at dawn, and by nightfall when you need to heal them, use some chaotic troops to either continue the attack or to shield your healing lawful units.&lt;br /&gt;
&lt;br /&gt;
Here are some recommended units to have obtained by specific scenarios:&lt;br /&gt;
&lt;br /&gt;
2. The Fall - 1 Knight&amp;lt;br&amp;gt;&lt;br /&gt;
3. A Harrowing Escape - 1 White Mage, 2 Knights, plus about-to-level troops&amp;lt;br&amp;gt;&lt;br /&gt;
4a. The Midlands - avoid, go to The Swamp of Eden instead&amp;lt;br&amp;gt;&lt;br /&gt;
4b. The Swamp of Eden - level 2 Haldric, level 2 Lady Outlaw, 2 Knights, 2 Shocktroopers&amp;lt;br&amp;gt;&lt;br /&gt;
6. Temple of the Deep - level 3 Haldric, level 3 Burin, 1-2 Mages of Light or several Outlaws / quick Bandits&amp;lt;br&amp;gt;&lt;br /&gt;
8. Clearwater Port - level 3 Lady Outlaw, 3 White Mages / Mages of Light, 3 Iron Maulers / Royal Guards / Halberdiers&amp;lt;br&amp;gt;&lt;br /&gt;
12. A Final Spring - 1-2 Silver Mages&amp;lt;br&amp;gt;&lt;br /&gt;
14. Rough Landing - the 3 loyal Mermen from the previous scenario, ''Peoples in Decline''[glandis] In 1.8.6, there was no opportunity for 3 loyal mermen - maybe this was in an older version? And only Merman fighters can be recruited - no Netcaster upgardes are possible&amp;lt;br&amp;gt;&lt;br /&gt;
17a. The Dragon - up to 4 White Mages / Mages of Light&amp;lt;br&amp;gt;&lt;br /&gt;
17d. Cursed Island - 1 Paladin&amp;lt;br&amp;gt;&lt;br /&gt;
19. The Vanguard - 4 Knights/Lancers/Grand Knights, 2 Paladins (or about-to-level Knights)&amp;lt;br&amp;gt;&lt;br /&gt;
20. Return of the Fleet - 1 Mermen Entangler, 1 Merman Triton with Storm Trident, level 3 Commander Aethyr desirable&amp;lt;br&amp;gt;&lt;br /&gt;
22. The Rise of Wesnoth - 2 Paladins, 3 Royal Guards, 4 Mages of Light&lt;br /&gt;
&lt;br /&gt;
Because the campaign is long and you won't be able to recall all your level 3's in the final scenario, it pays to create some &amp;quot;uber-units&amp;quot;. An example is a quick, resilient Silver Mage that has been AMLA advanced a few times.&lt;br /&gt;
&lt;br /&gt;
==Scenarios==&lt;br /&gt;
===A Summer Of Storms ===&lt;br /&gt;
&lt;br /&gt;
This is a relatively easy scenario, so gear your recruitment and strategy with an eye towards gathering XP.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
# For the first round, recruit 2-3 Horsemen and the rest can be all Spearmen or a mix of Spearmen and Bowmen as you see fit.&lt;br /&gt;
# Then, you should probably hire Bowmen and more Spearmen. Whatever Bowmen you can get advanced will be useful later on for fighting the many trolls, grunts, and riders you will encounter. Note, however, that you will not have any healers until you level up at least one mage to White Mage status, and the sooner you can do that the better. Red mages will also prove very useful in subsequent scenarios, so consider recruiting at least two mages.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* Players have used at least three strategies with success...&lt;br /&gt;
# The &amp;quot;over the bridge&amp;quot; strategy: Send the horsemen with the king over the bridge, and the others should follow or start going over the mountain, to avoid being attacked from behind. Send subsequent Spearmen and Bowmen on the &amp;quot;over-the-bridge&amp;quot; road, and when the Prince and final troops have just about caught up, march on the enemy camp.&lt;br /&gt;
# The &amp;quot;hide in the swamp&amp;quot; strategy: Proceed much like the above, but send the king with 3 Horsemen to capture the nearest houses, then retreat into the swamp area until you have your lawful bonus to kill off troops during the day. To hold them back, you can use a Spearman and a Mage (to level him.)&lt;br /&gt;
# &amp;quot;Sandbagging&amp;quot; strategy: On the hardest difficulty level, the initial enemy assault will only be easy to handle by entrenching your troops behind the river. Use the king to block the bridge initially, while Spearmen handle the shoreline just north and Horsemen carefully flag villages across the river. Run the king around, lending his leadership as you massacre the stupid enemy troops that have jumped like lemmings into the water. &lt;br /&gt;
* For all these options, you will also need to send a squad north into the mountains and around into the flank of the enemy. A quick Spearman, a quick Bowman, and one other unit, possibly a quick Mage, should be more than sufficient.&lt;br /&gt;
* When you see that the fronts are under control, stop recruiting and send prince Haldric and your Mages over the bridge on a quest for XP, assisted by the leadership of the king, and converge on the enemy camp.&lt;br /&gt;
&lt;br /&gt;
===The Fall===&lt;br /&gt;
&lt;br /&gt;
This is a scenario that looks scary, but it is only moderately difficult with proper recruitment and strategy.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* Recall or recruit Spearmen and Bowmen to man the lines.&lt;br /&gt;
* Horsemen/Knights are desirable, because you probably do not yet have a White Mage, and the villages are widely spaced.&lt;br /&gt;
* Recalling or recruiting Mages for XP gathering is highly advisable for future scenarios.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* There are three basic approaches to take out the outlaw leader...&lt;br /&gt;
# &amp;quot;Brute force&amp;quot; strategy: You can march west with a large army and use part of it to hold northwestern orc. Use the rest to fight outlaws and kill the leader. This strategy requires a lot of troops but it can bring you plenty of experience and can bring a quick victory.&lt;br /&gt;
# &amp;quot;Assassination over the bridge&amp;quot; strategy: You can assassinate the outlaw leader. One way is to wait until the orcs have killed almost all outlaws and then assassinate the outlaw leader with Knights, rushing over the enemy camp's bridge and into the keep. This strategy is risky because orcs can kill the leader before you.&lt;br /&gt;
# &amp;quot;Assassination via the mountain pass&amp;quot; strategy: Another way to assassinate the leader is to send a squad through the southern mountains to the outlaw keep. Two Mages and three Spearmen are enough. You may wish to substitute one of the Spearmen with a Knight or Horseman, though horse units have only a narrow passage devoid of mountains and could get pinned by the enemy.&lt;br /&gt;
* On the hardest difficulty level, you may be forced to assassinate. For either of the assassination strategies, it is a good idea to fight against the northeastern orc nearby your keep. This way, you can secure your back and earn experience.&lt;br /&gt;
&lt;br /&gt;
Hints...&lt;br /&gt;
&lt;br /&gt;
* Saving the loyal Heavy Infantrymen (or Shock Troopers on easy) pays off in later scenarios. To save all three, move them south towards the outlaws.&lt;br /&gt;
&lt;br /&gt;
* Once you eliminate the HP of the Lady Outlaw, she offers to help you. If you say yes, she comes back as a loyal unit in future scenarios and you will be able to recruit outlaw units, plus she cannot be killed in the next couple of scenarios (instead, she disappears when she goes to zero HP, and comes back the next scenario.) This is quite valuable. If you say no and try to kill her, you find out she cannot be killed. However, you do get 200 gold that she leaves behind.&lt;br /&gt;
&lt;br /&gt;
* Heads up: The following scenario (''A Harrowing Escape'') is a handful on the hardest difficulty level. On hard, a carryover of almost 150 gold (so you have 250 starting gold) would be wise, so although Lady Outlaw's assistance is worth much more than 200 gold, you may be forced to choose the gold. Another thing you need to beat the following scenario on hard is a White Mage at or near the start of the scenario. Also, about-to-level units will be especially nice for their self-healing ability and low initial upkeep. Steer XP accordingly.&lt;br /&gt;
&lt;br /&gt;
===A Harrowing Escape===&lt;br /&gt;
&lt;br /&gt;
This scenario is much easier on lower difficulty levels, calling for different strategies.&lt;br /&gt;
&lt;br /&gt;
On easy/medium...&lt;br /&gt;
* Recruitment: You should recruit/recall at least one, possibly two Mages here, and use them for killing Goblin Spearmen and finishing off injured Wolf Riders in the hills &amp;amp; mountains bordering the valley. Other than the Mages, simply recruit what you want, and go along the road. You get enough villages to pay upkeep for quite some army, and can give some of them a bit of experience.&lt;br /&gt;
* Strategy: Leave a few units in the rear, as the enemy can cross hills quickly. Note that Footpads and Outlaws will also cross hills at reasonable speed, if you need to hunt down some units. There are two castle tiles about halfway down, try to send Lady Outlaw and Brunin the Lost to them, they make good guards in case the enemy tries to come straight up. You can also send a couple groups of units down southeast to the lake, so you can prevent the Green team (southeast) from coming up the river. You can also kill the two Orcish Grunts (or Warriors on medium) on the southern castle tiles and then move Lady Outlaw and Brunin to them.&lt;br /&gt;
&lt;br /&gt;
On hard...&lt;br /&gt;
* Recruitment: To beat this scenario on the hardest difficulty level, you need some level 2 (or better yet, about-to-level level 1) units already and a lot of starting gold. It is possible with ~200 starting gold, but only barely. 250+ is better. You can stretch your gold a bit by not going negative on upkeep and waiting until you can't wait any longer to do one last round of recruiting, recalling mostly level 2's. For timing your final recruitment, watch the wolves that are likely trying to flank through the mountains south of your keep. Another requirement for beating this scenario is a White Mage (or two.) If need be, you must promote a Mage (or two) &amp;lt;i&amp;gt;tout de suite&amp;lt;/i&amp;gt;, as you will be dealing with severe damage and assassins, while only having easy access to 2 or 3 villages initially. Horsemen and Knights are useful for dissipating damage by serving as meat shields against blades and then running off to remote villages to heal. Quick Horsemen are especially nice, as they can transfer between two strategically placed villages in one turn, for healing on the go. Horsemen, Knights, and Swordsmen are useful for swatting assassins. &lt;br /&gt;
&lt;br /&gt;
* Strategy: More important than terrain is avoiding getting flanked, so mobility of individual units is key; if you climb up deep into the mountains, you will have a harder time with mobility than staying on or near the valley floor. Additionally, many of your units cannot go on mountain hexes, so it's easier to maintain your lines if everyone stays close to the valley. Near the start of combat, it's crucial to kill units quickly on the road: first the wave of wolves, then the wave of assassins. In contrast to easy and medium, on the hardest difficulty level both pairs of roadside castle tiles are guarded, not just the second pair. As on medium, the guards are Orcish Warriors.&lt;br /&gt;
&lt;br /&gt;
Hints...&lt;br /&gt;
* On medium/hard, you can lure out the roadside guard Warriors one at a time by putting a unit within attack range of one (and out of range of the other.) They mostly come at night. Mostly. That is, the Warriors might not bite bait put out during the day.&lt;br /&gt;
&lt;br /&gt;
* If you have Lady Outlaw, note that she has leadership, which will be useful to help promote Prince Haldric, if he is still level 0. It's worth advancing her to level 2, to continue to provide leadership to level 1 Haldric and your other level 1's. You may also make use of her odd ability &amp;quot;distract&amp;quot;, which allows adjacent allied units to ignore ZOCs. And Lady Outlaw allows you to recruit outlaw types. On hard especially, Thugs can be useful as meat shields and to provide strong attacks at night when your lawful forces are crippled. Remember too that Lady Outlaw cannot be permanently killed (at least not yet), so when desperate times call for desperate measures, you can move her into a suicidal position.&lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
&lt;br /&gt;
* The scenario can be beaten with 154 gold only (I decided to trust the lady). Key points in the strategy I used:&lt;br /&gt;
** Underrecruited as heavily as possible, so that the upkeep of my current units is completely offset by my villages. Only 2 footpads to go for Burin and villages down the path right at the start. Only level 2 unit I recalled initially was a white mage. Recalled the 3 loyal HI and tried to arrange it so that they aren't attacked by archers. Recruited several thieves, since they are cheap and the grunts are font of attacking them instead of my mages (and they still often survive on 70% def).&lt;br /&gt;
** During the main phase of the battle, stayed on the safe side of the river (this was the actual key point). Used the river, mountains, castle and swamp to have good defense for myself and bad one for the orcs. As shortly as possible before my income turned negative, recruited/recalled an additional 5 units. Needed to give up the village abroad the river as well (so only 3 villages left).&lt;br /&gt;
** What also helps as well is the fact that there are two enemy sides as opposed to a twice as strong single enemy side. If one of your units could be attacked by 3 enemies, but 1 of these hexes is currently blocked by the other side, the currently moving enemy decides to attack units which it (they) is (are) actually less likely to kill than that one. AIs don't cooperate, that is.&lt;br /&gt;
&lt;br /&gt;
* There is Dwarf Steelclad in the village at 8,5. It's not far from your camp, so send Lady Outlaw there. Dwarf joins you because &amp;quot;It has been a long time since he felt the satisfying crunch of Orcs under his Axe.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* After you kill the first orc leader, an Orcish Slayer and two Assassins will pop out of nowhere, so you would be wise not to have any wounded units stuck without movement points at that point. Also, the other leader will get an infusion of gold and start recruiting on all available hexes, so if you can sit on some of those hexes first, it will help keep the situation from getting out of control.&lt;br /&gt;
&lt;br /&gt;
* At the end, you will be given the choice of the river/swamp road or the midlands/orc road. These fork to the scenarios ''The Swamp of Esten'' and ''The Midlands'', respectively. The swamp scenario is relatively easy, while ''The Midlands'' could cost you some leveled units or even prove impossible to beat if you are low on gold. Also, the swamp gives you a free loyal White Mage, so it's a no brainer, unless you want more of a challenge.&lt;br /&gt;
&lt;br /&gt;
* Heads up: it would be wise to have at least 1 Mage either levelled up to White or about to level up before going to the scenario ''The Swamp of Esten''.&lt;br /&gt;
&lt;br /&gt;
===Diverging Campaign Path===&lt;br /&gt;
====The Midlands====&lt;br /&gt;
&lt;br /&gt;
Orcs again. But you chose that way. This scenario may appear impossible, but with a lot of gold and a little strategy, it can be beat. &lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* You are given plenty of time, so use it wisely. The enemies send lots of orcs, mostly weak ones. So recruit and recall everything you can.&lt;br /&gt;
* Recall any White Mages you have. You'll need them.&lt;br /&gt;
* Bowmen are good for the wolf units you will be facing.&lt;br /&gt;
* The rest depends on your strategy.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* The &amp;quot;Fast Assault&amp;quot; option: use an assassination team. If you go west, only your Knights and Horsemen will arrive and fight at daytime. So go south. Take the bridge and defend against the enemy closing in from the west. Take out Yellow with a fast assault team (they should take a healer along), but be careful about the leader. Your main force moves west, takes and holds the second bridge, and takes out Blue. Your assault team stays in the south and goes for the last enemy leader - they won't face any serious resistance. The enemy moves north to support Blue. The HI guarding the bridge might gain a level or die, but hopefully not the latter, as they are loyal units in a long campaign. With this approach, you can finish early (around 25 turns) and keep your losses low.&lt;br /&gt;
* The &amp;quot;Dark Assault&amp;quot; option: use Footpads.  If you chose to work with the the outlaws in the last round, then this works well.  Footpads are cheap.  And they are fast.  And they have good defensive abilities.  Plus they fight well in the dark and in the forest.  So recruit lots of Footpads-pawns and quickly dispatch them to the upper west and south, followed by more powerful units: Mages, Horsemen, etc.  For the time being, leave the middle enemy alone.  To the upper west, send several Footpads into the forest and capture the village and set up a defensive line.  This cuts down the enemy's gold and increases yours.  Don't attack at first, just defend, until more of your slow higher powered units arrive. The strategy here is to pick off the orcs, and send the Horsemen to capture villages.  While this is going, to the south you send your Footpads to capture any villages you can and, more importantly, put a Footpad on the hex that is adjacent to the bridge, thereby stopping easy advancement of their greater numbered troops. A White Mage, a couple Trappers and some Bowmen would make a good escort. Probably sending a Thief or two would be good too, to help dispatch any enemy that infiltrate the villages north of the river. one enemy got into one of the villages on the north of river, and it took a lot to dislodge him.  The intention is to engage the enemy so that they are fighting from the river squares, at a huge disadvantage.&lt;br /&gt;
&lt;br /&gt;
====The Swamp Of Esten====&lt;br /&gt;
&lt;br /&gt;
This scenario is not too hard if you are conservative and don't send important units off alone.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
# First round, recall 1-2 quick Knights (or Paladins, if you have them), recruit 1-2 Horsemen, and recall your loyal Shocktroopers or whatever they are now.&lt;br /&gt;
# Next round, recruit/recall Mages to kill Scorpions (and Bats) and at least one White Mage to deal with poison, plus maybe a Poacher, as they are good in swamp (and you would like a Huntsman eventually, for its markmanship.)&lt;br /&gt;
# A little Thug spam can come next, but you don't need a full third round of recruitment. Then send Prince Haldric off to lend his leadership.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
# You must blitz the northeastern leader, or risk getting bogged down on bad terrain facing a swarm of undead spam, which can be nasty at night. Quickly send Knights (or Paladins) and Burin over the ford to start wailing on undead. A disposable Horseman can try to take out Scorpions in this area at first. On the way is your proper Scorpion disposal unit, the Mages and White Mage. Try to kill Dark Adepts with Burin or horse units before they have chance to attack you. As you close in on the leader, hover your mouse over him to watch where he can go, as his ranged attack is nasty and can be followed up by waves of kamikaze Walking Corpses, which can take out a Knight.&lt;br /&gt;
# After you have killed the northeastern leader and eliminated troops there, you can either send your whole army back across the ford and south or split your army into two halves, sending one part to each leader. If you have lost several units but have lots of turns left, it's probably safer to stick together. This is not a simple mop-up operation, as powerful undead can take out some of your valuable units if you're not careful. On hard, Shadows are a constant threat at night.&lt;br /&gt;
&lt;br /&gt;
Spoiler...&lt;br /&gt;
&lt;br /&gt;
* Searching the temples is a good idea. Some have gold. There is a free loyal White Mage hiding in (a random) one of the temples - visit the temple close to the keep ASAP, and if not there, try rushing a horse unit or Lady Outlaw to the temple at 19,5. However, some of the temples contain undead, so keep extra troops nearby when you enter one.&lt;br /&gt;
&lt;br /&gt;
===The Oldwood===&lt;br /&gt;
&lt;br /&gt;
This is a relatively easy scenario.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
# First round, recall your (probably leveled up) Heavy Infantry from The Fall and some quick fighters.&lt;br /&gt;
# Second round, recall White Mages and quick Mages.&lt;br /&gt;
# Third round, round out with Thugs, Bowmen, and Spearmen, preferably quick.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* Your forces will have three main combat arenas: the northeast, the south, and the middle.&lt;br /&gt;
# The main bulk of your force, including at least one White Mage, should head east to the orc in the northeastern castle. The leader there recruits a lot of units, and most of them are level 2, so watch out.&lt;br /&gt;
# Haldric, a White Mage, your loyal Heavy Infantry types, and a couple of level 1's (maybe a Mage and a Thug) should head south to the other orc leader. A few effective melee units can easily counter the riders they send early on, and then with a little forethought and patience you can take out their Archers and Crossbowmen without giving them time to shoot. &lt;br /&gt;
# The castle in the middle is inhabited by the tree folk, so don't bother sending troops there; however, you might want to keep a couple speedy units not far off to watch their backs, in case the allied leader gets into trouble, as is usually the case.   &lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
* The temple contains the entrance to the catacombs, but you need the leader Wose's help to open it, and to get that help you have to win the current scenario, so there is no point in visiting this temple.&lt;br /&gt;
&lt;br /&gt;
* Heads up: The next scenario is in the catacombs, i.e., underground, and it's a tough one, so you need to groom your roster accordingly. Two Mages of Light would make it a whole lot easier. Failing that, level up your fearless loyal Shocktrooper and chaotic outlaw types. Bandits/Highwaymen and Fugitives are especially nice. Quick units of almost any type (except horse units) will be helpful, if leveled and possessing high HP (&amp;gt;50).&lt;br /&gt;
&lt;br /&gt;
===Temple in the Deep===&lt;br /&gt;
&lt;br /&gt;
You will be facing undead underground. This is a difficult situation that will prove much easier with proper recruitment. Then the strategy will be fairly straightforward.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
&lt;br /&gt;
* All in all, what you need is a small elite force. Two rounds of recalls is enough, if you didn't lose Burin in a prior scenario.&lt;br /&gt;
# First round, recall your loyal Shocktroopers / Iron Maulers, especially the fearless one, though their slow movement will prove frustrating. Also on the first round, recall a fast &amp;quot;tank&amp;quot; and someone to grab the holy water (if Burin is not your choice.)&lt;br /&gt;
# Second round, recall any Mages of Light you might already have, and a total of at least two White Mages or Mages of Light, preferably quick. For the rest of your recruitment, what you need are high movement (6+ MP) non-horse units with high hitpoints (&amp;gt;50 HP), preferably chaotic, preferably with a ranged attack, and preferably impact attacks. Put all the requirements together and it points to Fugitives. Outlaws and quick Arch Mages are worth recalling too. Fill out the rest with Bandits/Highwaymen, Trappers/Huntsmen, and Longbowmen/Master Bowmen, preferably quick. You might think that Red Mages would be good, but they attract melee attacks that they likely will not survive. Note that Horse units are too sluggish to be useful here and should not be recalled/recruited.&lt;br /&gt;
# Third round (optional), you can add a unit or two for a safety margin.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
&lt;br /&gt;
# There are two ways north, but they will meet up together before you meet any enemies besides the Tentacles. Ignore the tentacles for the most part and only kill them when it's convenient, as you will need to have a strong line set up by the time you engage the undead. Watch out for the enemy's Bone Shooters, Revenants and Deathblades, as they could easily mess up a level 3 unit. Once you see the two choke points, hold them so one of their units is facing 2 of yours (preferably with a White Mage behind them). You may be able to level up a White Mage to a Mage of Light while fighting in the choke point. If your troops are too slow to grab both choke points, you can send Burin and others to the west choke point while your slow troops line up at the southeast shoreline and bridge.&lt;br /&gt;
# Gradually progress northwards once the flow of baddies has tapered off, and once you get into the final chamber, the boss should be a piece of cake, although his ranged attack is devastating, so try to attack him with melee units. Be careful if he has recruits around, as their combined damage can take down one of your level 3's. Note that the Ruby can only be picked up by Haldric.&lt;br /&gt;
&lt;br /&gt;
Hints...&lt;br /&gt;
&lt;br /&gt;
* Holy water: Burin is very effective if you give him the holy water; however, it's more helpful to send Burin running to the west choke point without delay. A good alternative is a Highwayman - or a Bandit, who should level quickly. Compared to a Highwayman/Bandit, Prince Haldric or a Royal Guard is not that great a choice for the holy water due to their lawful alignment and -25% penalty, unless you have (or will soon get) a Mage of Light.&lt;br /&gt;
&lt;br /&gt;
* XP: Use this level to get experience. The early-finish bonus is tiny. The tentacles are perfect for leveling up units. If you're hurting for leveled chaotic units, you can even level up two raw recruit Thugs (use Haldric's leadership to assist). Keep Burin away from the water at this stage, or he'll kill all tentacles as they attack, depriving those who could benefit from the XP.&lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
&lt;br /&gt;
* Your killed units will be turned into Walking Corpses (or Soulless on hard.) Therefore, spam is not helpful. A Mage or two can be okay, if used with great care, but mostly you need to recall leveled troops here.&lt;br /&gt;
&lt;br /&gt;
===Return to Oldwood===&lt;br /&gt;
&lt;br /&gt;
Plot only.&lt;br /&gt;
&lt;br /&gt;
===Clearwater Port===&lt;br /&gt;
&lt;br /&gt;
This scenario is easy if you take the first boat out, more and more challenging for the second and third boats, and very difficult (on hard) if you want to take out all three leaders.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
# First turn, recall your loyal Shocktroopers / Iron Maulers from ''The Fall.'' You will also want several Footpads, for speedy village snatching, coastline defending (under leader supervision), and possibly for filling castle hexes if your lines get too thin.&lt;br /&gt;
# Second turn, recruit/recall more low maintenance units. It's a good scenario for leveling troops, so recalling acouple half-leveled Spearmen or similar is a good idea.&lt;br /&gt;
# Third and later turns, start recalling your high maintenance units. The key to winning this scenario is to recall several advanced units that can take a lot of damage and get good defense in castles (no Horsemen). You will also want at least 3 White Mages or Mages of Light.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
# Backstab your ally, stealing all his villages. Your ally is useless anyway, except for the entertainment value from his troops' suicide runs. The income is much better in your hands.&lt;br /&gt;
# Send your heavy duty troops with some White Mages over to the line of castle near Lt. Aethyr. (Optionally, you can rush forward past the castle, but you will need to return almost as quickly before the main enemy wave and night arrive.) Aethyr will usually be done recruiting by the second or third turn, before the enemy reaches you, so fill the entire line with your units, and put Knight Sir Rudry in the one non castled tile (or leave it empty, if no enemy are adjacent.) Place the White Mages behind this line. After the enemy has reached you and it is your turn to attack, go mostly for the assasins, as they have a weak melee attack and their poison can be a huge problem.&lt;br /&gt;
# Meanwhile, on the northeastern coast, the northern enemy leader will send lots of units to catch your flank unguarded. Send 2 Footpads, a Spearman, Lady Jessene, and Haldric to guard the coast. If Lady Jessene is already level 3, you can substitute a Royal Guard, Swordsman, or Javelineer for Haldric. This coastline defense squad may need help later, so be ready to divert a speedy powerful unit there. If you keep a healthy unit on the village at the tip of the land, then, unless you are very unlucky, you will be able to hold off everything the northern leader sends. After the assault from the water has been crushed, some of your troops may be able to cross the ford north, but be careful not to get attacked in the water with only 20% defense. (Certain of your chaotic units do have 40% defense in water; now is a good time to pay attention to that.) Also, notice that the lighthouse has a similar effect as a Mage of Light.&lt;br /&gt;
# You have two options for the endgame:&lt;br /&gt;
## &amp;quot;Total victory&amp;quot; strategy: Once you've thinned the enemy to where they only have a few units that are close to your line, usually this happens conveniently around dawn, move your people out and start heading for their leaders. Split your force, sending a few down the southern path, to distract the eney and most of them toward the middle leader, to kill him. Once he's dead, send some of your army down to kill the southern leader and devote a few units to defending the bridge until the rest of your army can rejoin you. A unit or two with a lot of HP with a white mage are usually enough to do this.&lt;br /&gt;
## &amp;quot;Run like hell&amp;quot; strategy: Alternatively, you can leave your leader near the docks and take one of the boats to end the scenario.&lt;br /&gt;
&lt;br /&gt;
===Fallen Lich Point===&lt;br /&gt;
&lt;br /&gt;
This is a high variance scenario. It may be very easy or very hard, depending on events beyond your control.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* Recruit fairly lightly initially, as you will likely have a chance to use the Lich's keep to recruit again.&lt;br /&gt;
* Mages, White Mages, and Mages of Light are good, and as are all the other advancements of Mages.&lt;br /&gt;
* You automatically should have your loyal Knight. Because of the mountains around &amp;quot;lichland&amp;quot; and frozen ground everywhere else, additional horse units are not recommended, except a single Paladin will come in handy.&lt;br /&gt;
* Some Thugs or a Bandit or Highwayman will provide a little extra undead bashing power.&lt;br /&gt;
* Footpads will help with village flagging, after the Wolf Rider types are taken care of, but you can postpone buying Footpads until after killing the Lich.&lt;br /&gt;
&lt;br /&gt;
Strategy... &lt;br /&gt;
# The Orcs will be busy with the Yetis, so you can walk with a big group south and kill the Lich-Lord. Move Haldric to the stone monument to de-petrify the Lich. It may help to post some units around the undead before doing so. Use several mages to make a hole or two in the ring of undead, and then push in a burly fighter or two and/or Paladin to kill the Lich.&lt;br /&gt;
# After killing the Lich, assess the Orc/Yeti situation (as well as the empty village situation) and decide if you need to use the Lich's keep to recruit some reinforcements.&lt;br /&gt;
# After that, head north and walk into the sewer entrance (the &amp;quot;cave&amp;quot;) or else kill the orc leaders.&lt;br /&gt;
&lt;br /&gt;
Hints...&lt;br /&gt;
* It is also possible, if you recruit heavily, to split your force and head north to attack the eastern Orcs before they finish with the Yetis.  However, be careful not to be attacked by a Yeti yourself; a Yeti is dangerous even if heavily wounded. A Yeti will attack you if it can get to a unit within one turn (and it doesn't have a more appealing orc target.)&lt;br /&gt;
* When dealing with the Lich, be aware that he has money; if you let him vacate any of his encampment tiles, or if you kill any of his units but do not occupy their tiles, he will be able to recruit.  (This is not necessarily all bad, as it can mean more experience, but depending on the strength of your force you may want to be careful.) &lt;br /&gt;
* Note that this level becomes a lot tougher if the Yetis get poisoned early on and quickly die. If this happens you basically have no other choice than to kill the orc leaders first.&lt;br /&gt;
&lt;br /&gt;
===Sewer of Southbay===&lt;br /&gt;
&lt;br /&gt;
This is a swampy underground scenario, but with attention to recruitment, it's not very difficult.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* As always underground, you want non-horse units with 6+ MP.&lt;br /&gt;
* Recall White Mages / Mages of Light, at least two, three is probably the optimal number.&lt;br /&gt;
* There are quite a few villages in this cave, so an expensive force is supportable, though not necessary. Some players recruit a large and spammy force, while others go with small and elite:&lt;br /&gt;
** Option 1, &amp;quot;Large and spammy&amp;quot; recruitment: Recruit four each of Mages, Thugs, and Poachers. Yes, Poachers normally stink, but here they really shine in a swamp that is permanently dark, underground. If you recruit four Poachers, you could finish with three Trappers and a Huntsman - or you could finish with four dead Poachers. The Thugs are especially likely to die, as they will be facing off against Red Mages, but somebody has to do it.&lt;br /&gt;
** Option 2, &amp;quot;Small and elite&amp;quot; recruitment: Recall something like one Red Mage, one Arch Mage, one Silver Mage, 2 twooyal Guards/Highwaymen/etc, and a Trapper or Huntsman, plus three regular Mages and a Poacher.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
# After leaving your initial chamber, you will be in a large swamp room with three entrances, through which will be a flood of bad guys. Use two Poachers and a Thug or similar to blockade the southeast, a small elite group to block the north, and then a mix of fighters and mages to handle the west entrance. Give each group a White Mage or Mage of Light, as well as at least one regular Mage. Try to keep the Mages of Light away from your chaotic forces on the front lines, though. Use the leadership of Haldric and Lady Jessene - and Mage of Light illumination or lack thereof - to get the most from each attack.&lt;br /&gt;
# When the initial battle has died down, you have two options:&lt;br /&gt;
## If you have enough forces, you can divide into two groups and attack both brothers simultanously, east and west.&lt;br /&gt;
## Otherwise, do them one after the other, and then look for the exit.&lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
* Danger: there is a Giant Spider at the exit. You may wish to keep one or two cannon fodder units in order to be able to save your advanced units.  It is best to use ranged attacks against the spider, so leveled mages are good here.&lt;br /&gt;
* Heads up: the next scenario is a lot easier with a lot of gold, especially on the hardest difficulty level.&lt;br /&gt;
&lt;br /&gt;
===Southbay in Winter===&lt;br /&gt;
&lt;br /&gt;
Plot only.&lt;br /&gt;
&lt;br /&gt;
===A Final Spring===&lt;br /&gt;
&lt;br /&gt;
This is a large battle, and any mistake on any front can spell doom, but overall it will be fairly easy on the easier difficulty levels. On hard, it will only be a cakewalk with a lot of starting gold (more than 450 or so.)&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
# On the first turn, recall a Silver Mage to teleport to the island, recruit Footpads for village snatching, recall one or more of your loyal Iron Maulers (leveled up Heavy Infantrymen from ''The Fall''), and recall one or more Knights or similar.&lt;br /&gt;
# Second turn, continue with this theme, but it will be nightfall soon, so recall Outlaws, Bandits, Assassins, etc.&lt;br /&gt;
# Turn three is a bit more of the same, but you need to start thinking about preserving your income and also keeping a gold reserve. You can spam some peasants to preserve cash and income.&lt;br /&gt;
# Turn four turn is more of the same.&lt;br /&gt;
# Turn five is similar, but it will be day soon, so lawfuls like Knights and level 1 Mages are a good idea.&lt;br /&gt;
# Turn six, you will have new recruitment options (see spoiler at walkthrough end.)&lt;br /&gt;
&lt;br /&gt;
Strategy is broken into four fronts...&lt;br /&gt;
# The first front is the south land area. Do a counter-clockwise sweep with mounted units, optionally augmented with Footpads, which can help pad out your lines with forest and village hexes. Note that it will be nightfall soon after game start, so it might be wise to delay any serious mounted assault until the next day, and you can delay your recalls for this.&lt;br /&gt;
# The second front is the walled city. Move slower units and your loyal White Mage / Mage of Light to defend here. Take your ally's villages; your ally wouldn't do much useful with the money anyway. When your mounted units from the second front complete their sweep, you can break the remaining southern forces against the city wall in a hammer and anvil. Then your united forces can move north. On easy, you may be able to push north more quickly than that using just part of your city troops.&lt;br /&gt;
# The third front is the bay and peninsula north of your keep. If you don't protect this area well, Wolf Riders and others will mount an amphibious assault in an effort to flank your troops. On the easier difficulty levels, you may wish to beat the punch and quickly establish a bridgehead on the other side of the bay.&lt;br /&gt;
# The fourth front is the two small islands. Send a Silver Mage there ASAP. (You should have a village already there, so the Silver Mage can teleport over.) Footpads/Outlaws/Fugitives and others will help later. Lady Jessene could be used. A quick White Mage would be useful, either on the coast or on the islands. Do not use Assassins on this front. Assassins have relatively weak defense in water against Orcs and Nagas, they're very weak against blade, which is all orcs and nagas use, and their relatively slow movement in water makes backstab hard to use reliably. Overall, you need to devote more resources to this front than you might think.&lt;br /&gt;
&lt;br /&gt;
Hints...&lt;br /&gt;
* You should have lots of high-level units now, so concentrate on recruiting new ones and levelling them up to fill needs.&lt;br /&gt;
* Peasants are useful as placeholders for villages and distractions for the enemy.&lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
* On turn 5, a gang of nasty undead show up in the east. So, for your city taskforce, you'll want to recruit/recall units with impact and arcane attacks. Note that if undead capture villages, they will be flagged with the Orc island boss' black flag! This can result in an overwhelming number of Nagas, and it's one reason that you must devote a lot of resources to the island campaign. Flag any black flag villages you can.&lt;br /&gt;
* On turn 6, a gang of nasty Mermen show up in the west. Fortunately, they are on your side. You can now recruit Mermen. This is the real reason to keep a gold reserve until this time.&lt;br /&gt;
&lt;br /&gt;
===Peoples in Decline===&lt;br /&gt;
&lt;br /&gt;
This is a bloody scenario versus Drakes. It can be a real challenge on the hardest difficulty setting, less so on the easier levels. Proper recruitment is more important than strategy here, as you will have little opportunity to maneuver.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* Drakes can be dangerous, so this is a great scenario to use the time honored technique of cannon fodder. Now that you can recruit level 0 units for cheap, you can protect your higher level units by recruiting endless Peasants to distract the Drakes' firepower.&lt;br /&gt;
* Drakes are vulnerable to pierce attacks, so spam cheap pierce attack units. In addition to Peasants, there are Poachers, Bowmen, Peasants, Spearmen, Merman Fighters, and Merman Hunters. Poachers are key here, due to the swampy terrain and their chaotic alignment.&lt;br /&gt;
* You will need about 3 White Mages / Mages of Light in all.&lt;br /&gt;
* On your last turn of recruitment when you have about 80 gold, recall some advanced units, like Master Bowmen.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* Since you will have a lot of level 1 and 0 units, make sure to use the leadership of Prince Haldric and Lady Jessene.&lt;br /&gt;
* Look for opportunities to heal via leveling up.&lt;br /&gt;
* Pay attention to the day-night cycle in this scenario. Drakes will be strong during day, but become very weak in the night.&lt;br /&gt;
* Take advantage of the mountains for defense, but note that on hard, you need to set up a relatively small perimeter around your base, as you will be hard pressed to even hold a small area.&lt;br /&gt;
* Be careful with your loyals.&lt;br /&gt;
* Because most Drakes have powerful ranged attacks, the roles of your melee and ranged units are reversed from the norm. Whereas usually you would use fighters to protect archers, here you will use archers to protect fighters. Melee-only units should hide behind the lines until they attack, preferably at night (with a Mage of Light supplying illumination.)&lt;br /&gt;
&lt;br /&gt;
Spoiler...&lt;br /&gt;
* Make sure you get the Storm Trident in the middle of the sea, but be certain that you've cleared most of the Drakes first, since a Sea Serpent will appear. It's best to have some strong units ready to kill it in 1 or 2 turns. You can give the trident to Lord Typhon, but since he leaves a bit later, you may want to give it to another Merman Fighter. Movement over land is important for Mermen in the campaign as a whole.  If the Merman Fighter to whom you give the storm trident has the Quick attribute, you can make him a Hoplite when he gets to level 3.  Otherwise, make him a Triton, because movement over land is important for Mermen in this campaign as a whole.&lt;br /&gt;
&lt;br /&gt;
===Rough Landing===&lt;br /&gt;
&lt;br /&gt;
You will be fighting Nagas and Vampire Bats, primarily. This is a scenario that may be frustrating on the easier difficulty levels, though on hard it is just par for the course. Good recruitment and strategy will save you from getting slaughtered.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* You are probably going to go negative on gold and be unable to rectify that with the paultry early finish bonus, so you might as will go very negative and be resigned to start the next scenario with minimum gold.&lt;br /&gt;
* Recruit/recall many Mermen and 1 or 2 White Mages or Mages of Light. A few Peasants can be useful to pad out your force, distract the enemy, and protect villages from stray Bats. A Silver Mage can be useful for island hopping but is not essential. Thieves/Assassins are blade vulnerable, and Nagas only use blades, so it's probably best not to recall them.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
# Knock out the southeastern leader in a blitz. It's important to get that out of the way, because a wave of Nagas is advancing at light speed from the north.&lt;br /&gt;
# Next, hurriedly set up a line in the water alongside your fortress island. Your fortress troops can anchor one flank, while Burin the Dwarf can go to the island to the northeast to anchor the other end of your line. Nobody messes with Burin. Move Lady Jessene behind the lines to lend her support to the Mermen. Your loyal Mage of Light will be able to move back and forth more (to lend illumination) if kept in the fortress area.&lt;br /&gt;
# Finally, once the enemy assault wave has been broken, advance northward to kill the final two leaders in a straightforward mop-up operation. Just be careful not leave isolated units where they can get swarmed.&lt;br /&gt;
&lt;br /&gt;
Hints/Spoilers...&lt;br /&gt;
* Try to level up the mermen; they can be useful in another scenario later.&lt;br /&gt;
* Beware of Sea Serpents. Three of them will appear, one on each of the three turns following your first kill of an enemy unit. Make sure to kill them at once. The Storm Trident from the previous scenario and the Ruby of Fire will come in handy against the Serpents.&lt;br /&gt;
&lt;br /&gt;
===A New Land===&lt;br /&gt;
&lt;br /&gt;
This is a non-scenario. The scenario objectives tell you to avoid all confrontation for as long as possible, but actually the faster your units encounter the others the faster the scenario will end.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* None necessary.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* The optimal strategy for gold carryover is to grab the three closest villages, then retreat to your keep and wait. Once one attack occurs, the non-scenario will be over.&lt;br /&gt;
&lt;br /&gt;
Spoiler...&lt;br /&gt;
* One thing to keep in mind is that this the last chance you have to grab some more Mermen as their king leaves.  They are quite helpful in a later scenario so grabbing a few extra here cannot hurt if you can spare the gold.&lt;br /&gt;
&lt;br /&gt;
===The Ka'lian===&lt;br /&gt;
&lt;br /&gt;
Story, with your choice of four battles next.  You have to beat them all in whatever order.  The amount of gold you have should be the factor in deciding when you choose to play Cursed Isle (the undead problem).&lt;br /&gt;
&lt;br /&gt;
===Diverging Campaign Path===&lt;br /&gt;
&lt;br /&gt;
All four scenarios have to be beaten, but in whatever order you choose.&lt;br /&gt;
====The Dragon====&lt;br /&gt;
&lt;br /&gt;
This scenario is not as difficult as it looks, though your recruitment and strategy need to be tailored to fight the Saurian Skirmishers and other foes you will face here.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* Saurians use piercing attacks mostly, so it's better to use units resistant to pierce. Pikemen and Halberdiers have 40% pierce resistance. Javelineers are ideal as Saurians use ranged attacks a lot.&lt;br /&gt;
* You may wish to bench some or all of your loyal Iron Maulers. They are ineffective against the 70% impact resistant Mudcrawlers, while also vulnerable to the ranged attacks of both Mudcrawlers and Saurians.&lt;br /&gt;
* Consider adopting a force of all units with ranged attacks, save for horse and thief units, which can be kept behind the lines when not in use. It is amusing when Saurian Augers are forced to tap your units with their little staffs.&lt;br /&gt;
* Healers are a necessity to deal with the heavy damage your units will be sustaining. Depending on the strategy you adopt, you will want 2-4 healers. Mages of Light rock here, as they can easily do front line duty in pairs and their illumination blinds the Saurians, reducing their damage.&lt;br /&gt;
* You need something to clean up mud. Versus level 0 Mudcrawlers, Horsemen and their advancements can charge with no counterattack, and likewise Thieves and their advancements can backstab with no counterattack. Mages can be used as well on the fire vulnerable mud.&lt;br /&gt;
* A Merman or two will help with water hexes. An Entangler's slow ability will help tame the dragon.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* Players have used many different strategies with success:&lt;br /&gt;
** &amp;quot;Hedgehog&amp;quot; strategy: Fighting Saurians requires a disciplined formation.  If you're used to stringing out troops to move them into position as they get there, that won't work after Turn 2 or 3. You can use a &amp;quot;healing hedgehog&amp;quot; of ten troops--two white mages next to each other and eight troops completely encircling them.  If someone gets badly injured, move them to the inside and put a white mage on one of the long edges, fighting as you go.  If you're trying for the big bonus, you'll need two hedgehogs.  Try to keep reserves back a bit in cities.  If the terrain favorably protects you, or the wounded is a fast unit, you can try moving wounded back to cities too.  Once the main wave of Saurians is broken, you can string non-wounded troops out a bit in the rush for the leaders. &lt;br /&gt;
** &amp;quot;Triangular Hedgehog&amp;quot; strategy: Switching wounded units to the inside of the hedgehog can be a problem if you are surrounded. ZOC prevents you from creating an open hex to move the inner unit into. You can fix this by creating a triangle with three hexes inside, instead of the standard two of the hedgehog. If you do this on your castle, only three units are in grasslands. If you set it right, you can make most of the hexes adjacent to your triangle be grassland as well, forcing the Saurians into a bad defensive position. In terms of unit positioning, the simplest way is to fill two inner spaces with Mages of Light, a but a better tactic is to put one of the mages on an edge, thereby ensuring that all but one of your units are healing. The remaining unit can either be a Merman Hoplite, (prefereably resilient and carrying a Storm Trident) or Lady Jessene, since she has excellent defense and is chaotic and therefore benefits by not being in the Mages' light. &lt;br /&gt;
** &amp;quot;Giant Hedgehog&amp;quot; strategy: Recruit a lot of units, and then move the whole army as one big bulk. Keep healers in the middle (about four), rotate stronger units outwards, and make sure you leave no gaps. The Saurians will slip through the tiniest gap and kill your weak units. Head first for the east or wast leader, but steer for good terrain, because your force will soon be swarmed until about turn 10, when there should be many few Saurians alive.&lt;br /&gt;
** &amp;quot;Standard Line&amp;quot; strategy: Form a line from the west board edge diagonally up towards your keep across the two villages just in front of the forest. You will probably wish to bend upwards at the forest, rather than running the line all the way to the keep. Whenever the Saurians have a small number of troops at your line and you have enough strength to kill them all, you can advance your whole line one hex south, allowing you to get additional attacks on them from non-frontline troops. Once you advance a unit to the first water hex at west board edge, the west leader will probably come out to greet it, so be ready to fry him with Haldric's ruby. After killing the leader, back up into good terrain to prepare to meet the dragon.&lt;br /&gt;
** &amp;quot;Wake the Dragon&amp;quot; strategy: Prematurely wake the dragon (see spoiler below) and back up your troops to north of your keep. When the dragon comes, kill him. The scenario can be over on turn 7. There is no early finish bonus for this, but you can recruit lightly so that you still have gold at the end and will carry-over 40%, if you need it for your next scenario.&lt;br /&gt;
* With all these strategies, the Saurians may hold back for quite a while. This is okay, as the Dragon will eventually appear and come to you. Kill it. Then you are given a choice of whether to end the scenario or to try to kill all the enemy leaders before time runs out. You can choose to finish the remaining Saurians for a nice bonus. However, on the hardest difficulty setting the turn limit (33 turns) is insufficient for you to plow through the vast hordes of level 0 spam to get to the leaders, so it's best to simply end the scenario after killing the dragon.&lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
* The dragon will awake on turn 15 or when you move a unit down around the road north of the mountains. If you wish to wake the dragon prematurely, you can recruit a Horseman on turn 1 and run him down. It's a suicide mission for him, however.&lt;br /&gt;
* If you have a fast non-horse unit in position, rush it to the mountain cave after the Dragon leaves to grab the 200 in gold, though that's nothing compared to the Hero bonus for defeating all the Saurian leaders. So focus on killing all of them first.&lt;br /&gt;
&lt;br /&gt;
====Lizard Beach====&lt;br /&gt;
&lt;br /&gt;
This is a scenario versus Saurians, Giant Scorpions, and Mudcrawlers, where good recruiting and strategy will save you from massive bloodshed.&lt;br /&gt;
&lt;br /&gt;
Recruiting...&lt;br /&gt;
* Mermen are helpful for the swamp and water areas.&lt;br /&gt;
* Bench some or all of your loyal Iron Maulers, veterans from ''The Fall.'' They are laughably ineffective against the impact resistant Mudcrawlers - and laughably vulnerable to their ranged attacks.&lt;br /&gt;
* Thieves, Horsemen, and their advancements are good for mud cleanup, though you must keep them out of range of Saurian skirmishers. Swordsmen and Royal Guards are also good, though overkill.&lt;br /&gt;
* Recall a lot of fairly high HP units, preferably with strong non-impact ranged and melee attacks.&lt;br /&gt;
* Mages are good. Mages of Light are especially useful, since they can do front line duty. Lots of healing may be necessary, about 3 healers are good, so White Mages can be used too. Raw recruit Mages can be used as well, for disposal of Giant Scorpions and the occasional Saurian Skirmisher that wanders too far. At least one Silver Mage is highly desirable, along with a speedy unit (e.g., Fugitive, Footpad, or Horseman) to capture villages for the Silver Mage to use north of the river.&lt;br /&gt;
* [fredbobsmith2] An alternative strategy that works surprisingly well is to simply use a very mage-heavy army. Recall most or all of your high-level mages, throw in a few peasants, and spend the rest of your gold on recruiting mages. Victory will come with shocking ease.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* General strategy: as Saurians have skirmishers and a lot of movement, be sure to protect your wounded units well. Because of the Saurians unnerving ability to concentrate their fire on one unit, be sure to keep several healers around and try to keep your line straight so only two can mob one guy. Hedgehog tactic also seems to work well.&lt;br /&gt;
* Opening strategy: here are some specific strategies that players have used with success in the early part of the scenario:&lt;br /&gt;
# &amp;quot;Mermen in center&amp;quot; strategy: Recall 2-4 Mermen, 1-2 Trappers/Huntsmen, and a lot of high HP troops, then form a line. Initially, you can either form a north-south line around the lake area with one flank at the south board edge, or, if you want to be conservative, you can do a diagonal line in the southeast corner, with both flanks tied to board edges. You'll need the Mermen to handle the lake area, and Trappers/Huntsmen/Mermen for the swamp areas. Keep troops in reserve, so that when a few Saurians meet your line, you can advance your whole line over them. Do not be too conservative/defensive on hard, as your time is limited. &lt;br /&gt;
# &amp;quot;Mermen on flank&amp;quot; strategy: Recall several decent land melee units &amp;amp; then 4-5 level 2 Mermen on rounds 2-3. Most of your force forms a line of battle near your keep, Mermen on the north flank in the river, land units extending south, flanks bent back with strongest units at the corners - then let the Saurians break on it. Once their first wave has broken, the rest of their troops come in drips and are no problem, so now you can split up and wipe out the stragglers and claim villages; any L2 units you start with should level up. After you defeat the main force from the south send just one or two guys north to capture towns so your Silver Mages can teleport into the fray. &lt;br /&gt;
# &amp;quot;Mermen feint&amp;quot; strategy: Recall most of your Mermen from before and send them along the river towards the sea. This will harry the saurian troops coming down from the north, allowing your main force to advance on the southern enemy  undisturbed. Beware, though as your mermen will encounter the Saurians at night time (giving you -25% and them +25%), so try to minimize conflict until dawn, just get in their way.&lt;br /&gt;
# &amp;quot;No Mermen&amp;quot; strategy: On your first two turns recall two keeps of strong, fast veterans like mounted units (not Paladins though; they're pretty ineffective against saurians), Outlaws/Assassins, and Silver Magi along with some other veterans, preferably with a lot of HP: if all goes well (at least on easy and medium) that may be all you need. Dash them across the swamp directly west of your keep, south of the sands, and form a line with strong units at the ends. They'll flank you, but you're stronger than them and you can use your slower units to crush the flanking saurians in a hammer and anvil. The first wave of southern Saurians should get itself killed before the northern Saurians arrive in force. Once the northern Saurians arrive, take them out with your slower units while your quicker ones go for the southern leader.&lt;br /&gt;
# &amp;quot;Sacrificial lamb&amp;quot; strategy: In addition to a couple mages, 2 healers, and some other fighters, recruit a castle-full of peasants to draw the Saurians out onto open ground.  Surround a single peasant on 5 sides, with 2 healers behind him. Build your formation around that.&lt;br /&gt;
* Closing strategy: The enemy's onslaught tapers out after their initial wave, so the final push for the southern leader should be quick and clean. Taking out the northern leader is harder, because all of your units will be stuck south of the marshes and the river. If you want to go for a quick win, just march forth with Silver Mages, Mermen, and anyone who's close enough to be a help. If you don't want to lose any of your better units, patience may be the key.&lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
* When one of your units gets as far west as the second bridge, a wave of Nagas will arrive out at sea. You may wish to delay going that far until the second watch, so that the Nagas will make contact with your forces during the day.&lt;br /&gt;
* Killing one leader gives more gold to the other, so when you've defeated pretty much all the southern leader's forces, just plant a level 3 or two in his keep and leave him alive; kill them both in the same turn.&lt;br /&gt;
&lt;br /&gt;
====The Troll Hole====&lt;br /&gt;
&lt;br /&gt;
This is a scenario that you cannot win by brute force, because the trolls have more brute force than you. Wise recruitment and strategy are necessary.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* It's underground time again, so as before, mainly recruit mages. The trolls are strong, so hopefully you have lots of levelled up mages. Mages of Light are especially nice, because they are tough enough to survive an attack from most trolls, while simultaneously reducing the damage sustained (due to illumination blinding the trolls.) Level 1 Mages can be used to good effect too, especially if quick. If only attacked by a single Troll Whelp, a healthy level 1 Mage will survive.&lt;br /&gt;
* In addition to mages, your chaotic units can be helpful here again, especially against the occasional Rocklobber, which you will not want to attack with mages.&lt;br /&gt;
* Forget about your loyal Iron Maulers (leveled up Heavy Infantrymen from ''the Fall''). They are too slow. It's not that you'll be running around, but you will be rotating troops due to heavy damage, and they will only get in the way.&lt;br /&gt;
* Putting Mermen in the moat will really help you fend off the first wave of attacks.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* There are 4 castles, and two of them (randomly placed it seems) are the troll leaders you need to kill.&lt;br /&gt;
* Try to use the narrow corridors to your advantage, so the enemy can only place one attack against a strong unit of yours, but you can kill a troll at a time with two mages or Haldric. Also keep an eye at your back since they will try to surround you. And resist the temptation to send single units wandering around in what seems empty caves - they will all die, probably by the fangs of a Giant Spider.&lt;br /&gt;
* Try to arrange it so one troll can enter to be attacked by many troops.  Have regular troops in front initially.  Move mages forward to finish the troll, plug the gap where the troll was with Burin or a Royal Guard or an Iron Mauler, and reset the trap on the next turn.  When you've whittled down the enemy, go the direction they came from and kill the leaders, ignoring spider keeps.&lt;br /&gt;
* Alternative: This could be a good choice if you have low gold: recall 2 quick red mages, and 3 quick tough melee units (say 2 royal guards &amp;amp; a L3 chaotic unit like a Fugitive). Play expedition style: abandon the start island, stay fairly close together, with your troops roughly divided in two between those moving forward and those fighting rearguard. Provided you knock out one troll leader early, the rest is manageable, just work your way carefully over to the other.&lt;br /&gt;
&lt;br /&gt;
====Cursed Isle====&lt;br /&gt;
&lt;br /&gt;
You will be fighting undead, mostly of the incorporeal and ghoulish lineages. Victory comes surprisingly easily.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* Recruit lightly, certainly no more than two castles of troops. You could use 1-3 Paladins, 1-2 Mages, and 1-2 White Mages / Mages of Light.&lt;br /&gt;
* Recall your loyal Merman Triton or similar and have him pick up the holy water.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* This can be the first or last quest you choose.  If you can wait, do it last, as you will come out of it with a lot of gold, which you will need for the first scenario after the quests, ''The Vanguard''. &lt;br /&gt;
* Keep a very tight formation for the first night, as Shadows will hit hard and you don't want to get backstabbed or swarmed. By dawn, it should be smooth sailing.&lt;br /&gt;
* If you get anywhere near the enemy leaders' keeps, expect to get rushed by a leader.&lt;br /&gt;
&lt;br /&gt;
Spoiler...&lt;br /&gt;
* In one of the three temples there is a Vampire Lady. All you really need is a Paladin or three to rush the temples. Kill her. Game over, you win. One of the other temples has some gold; grab that first.&lt;br /&gt;
&lt;br /&gt;
===A Spy In The Woods===&lt;br /&gt;
&lt;br /&gt;
Plot only.&lt;br /&gt;
&lt;br /&gt;
===The Vanguard===&lt;br /&gt;
&lt;br /&gt;
You will be fighting a large number of orcs, trolls and other enemies in a location with a natural defensive line, where presumably an underground river has carved a line of sinkholes. This scenario will be difficult or impossible with minimum gold (200), but quite doable with a large amount of gold (450+) even on the hardest difficulty setting. Recruitment and strategy are fairly straightforward, given the board layout.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* Recruit a lot of units; you will need them.&lt;br /&gt;
# First turn, recall/recruit speedy units: Knights, Lancers, Paladins, Horsemen, Outlaws, and similar.&lt;br /&gt;
# Second turn, recall your loyal Iron Maulers (leveled up from ''The Fall'') and Spearmen/Swordsmen/Royal Guards.&lt;br /&gt;
# On subsequent turns, recall/recruit healers and other sorts of Mages, Thugs and their advancements, and Longbowmen. You will need quite a lot of healing power: 3-4 White Mages / Mages of Light and 1-2 Paladins. A Silver Mage would come in handy, since your forces will be widely spaced, but you could start with a couple of Red Mages and try to level up one or both to Silver Mage.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
# This map is smaller than fog of war and sinkholes make it appear.  Rush the west and northwest gaps with mounted units, but slow &amp;amp; strong will carry the day once the sun rises and the odds are in your favor.  &lt;br /&gt;
# Seal of all the gaps in the ring of sinkholes. When the onslaught begins, wounded units can retreat back into villages or be cared for by healers - or actually both, since soon you will be out of non-wounded units.&lt;br /&gt;
# A &amp;quot;Sitzkrieg&amp;quot; may develop, where neither side can make progress. Shift units to the southwest and break out there, using the west board edge defensively. From there, sweep northwards, taking out the western orc leader first and then the next orc leader.&lt;br /&gt;
# Don't forget the chest of gold, which you can see even in fog.&lt;br /&gt;
# End the scenario with the kill of the final leader, a level 3 troll.&lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
* Once you kill more than half the units of any side, a few tough undead units will appear near that side's stronghold at the edge of the map. So, this will happen three times. Beware the Chocobones. Their double damage from charge means they can take out Commander Aethyr at night just by hitting 2 for 2, and they will certainly try if they get the opportunity.&lt;br /&gt;
* Heads up: the next scenario is much less difficult with extra gold. You can use Peasants to avoid going negative on gold, promoting them to Spearmen only when needed.&lt;br /&gt;
&lt;br /&gt;
===Return of the Fleet===&lt;br /&gt;
&lt;br /&gt;
Welcome to the &amp;quot;kitchen sink&amp;quot; defense.  You've made it this far; now the enemy will launch a desperate defense, throwing a little bit of everything at you.  The effect is mostly psychological, but it could be a problem if you came into the scenario with minimum gold or your initial assessment causes you to drastically under-recruit. Time is money.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* On medium, at least, you don't want to overrecruit. First turn, recall Mermen to assassinate the undead leader; 2 Entanglers/Netcasters and the Triton with the Storm Trident. Later, you should recruit 1 or more Silver Mages also for this taskforce as well as for causing general mayhem. It's also worth recruiting 5-10 L1/L0 units to take the brunt of the first wave of attacks; you can use any combination of Footpads, Poachers, Thugs, Spearmen, and Peasants, as you see fit. You'll want some decent L2 and L3 recalls for healing, to flank your lines, and to start kicking some butt at daybreak. A Mage or Red Mage to blast Trolls and Chocobones will level up by end of scenario. Paladins are good too. In addition to your loyal Mage of Light, you will need a bare minimum of 1 more healer.&lt;br /&gt;
* On medium, don't recruit too much for fighting the undead - 2 Paladins at most, 1 or 2 Thugs, the stormy Merman, and the nearest Mage working with your land force are sufficient - the undead commander only gets 5-6 L2 recruits and they come ashore scattered (on medium, anyway). Paladins are so effective against undead that you can wade into the water after them. Just remember, Paladins can't go into deep water and undead can.&lt;br /&gt;
* On hard, you also don't want to recruit too much for fighting the undead, but it's only because going on an offensive early against them will get you crushed by a Chocobone armada.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
# Move the Mermen (including the storm trident) as quickly as possible pretty much straight to the West. (There is a village and swamp hex that can aid your travel if you pick the best route).  Move these guys up the West side once they get there to get to the Undead Leader as quickly as possible.&lt;br /&gt;
# Your loyal units can do a little village grabbing, but it would be unwise to venture too far north.&lt;br /&gt;
# After nightfall, fog will appear; for the rest of the scenario, the map will become shrouded, like in a cave scenario.  So while you're still amazingly able to see, note the key terrain features, castle and city locations, and troop dispositions (especially Chocobones.)  Also, visually explore the avenues of approach you want to be able to see later.&lt;br /&gt;
# The first wave is largely at night and will have Goblin Knights and Pillagers, and later Chocobones and Troll Warriors. The damage they can cause is bone chilling, so make sure to divert their attention with plenty of spam. You want to meet them on the edge of the woodland, while inducing the orcs to fight from the grassland. Footpads and Poachers are handy here, as they have high defense in woodland. Players have had success setting up the initial line in either the north and northeast woodlands, with respect to the castle. Others have succeeded by fighting mostly from the open plain, retaining mobility by leaving the woodlands to their Footpads.&lt;br /&gt;
# Once your Mermen have taken an island city, teleport over one or more Silver Mages to help kill the undead leader - in addition to a Silver Mage, you will want the storm trident, a Netcaster/Entangler, plus one more leveled unit to be fairly sure to knock him out in one round. Quick striking like this you end up fighting a lot less undead.  You probably end up foddering one of the mermen to the Undead Archers, but the trade off is well worth it.  You can keep cycling your mermen up to fight with any orcs or trolls that come into the water. Silver Mages can assist, since they are not needed much in the other part of the fight.&lt;br /&gt;
# After the undead leader is assassinated and the first wave is broken, you may advance cautiously due north or to the northwest along the coast and ultimately finish off the two orc leaders.&lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
* When you are close to the break in the woods at the east board edge, tighten your formation and keep wounded units well away, as a small force of high-level Saurians will appear. Trigger them in daylight if possible, and knock them out fast. Alternatively, you can delay triggering the Saurians as long as possible by moving your force northwest near the water and then onto the small island, though even then it is possible to trigger the Saurians if you are not careful where you step. (Stepping to 10 hexes or less from 34,15 triggers the Saurians.) You can fight the final wave of orcs from the island, then move northeast to the mainland, finally triggering the Saurians.&lt;br /&gt;
* Two cuttlefish appear when you approach the north-central island. Assuming you're sending a strike force through the water to knock out the undead commander, you really don't want to trigger these until that force is on the island - the storm trident Merman is the only thing that can stand up to them in water, and they will avoid him to attack more vulnerable units.&lt;br /&gt;
* Once you kill one enemy leader, the other gets more gold &amp;amp; recruits a new wave of L2s. This can be useful if you need to kill off surplus L1 units to improve the finish bonus, or if you need the XP more than the gold; otherwise, try to knock out both leaders on the same turn before they can recruit more. Alternatively, if you kill the first one at dawn, the second will be reluctant to attack with his L2s in daylight, and you might jump in and kill him before he uses them.&lt;br /&gt;
* Heads up: The next scenario is the final one. Therefore, loyal units are now somewhat disposable. However, you will need plenty of gold. Recruit some Peasants in the current scenario if you need to save some gold. Not only are they cheap, but they have no upkeep and Chocobones love 'em. Send a unit with leadership with them and they can even deal some amount of damage and be used to finish off wounded enemy, though at night you should just let them take the beating passively since otherwise they die too quickly.&lt;br /&gt;
&lt;br /&gt;
===Rise of Wesnoth===&lt;br /&gt;
&lt;br /&gt;
It's the final battle: be patient, recall everybody - the early finish bonus doesn't mean anything. Also, loyal units are no better than other units after your recruitment is finished.&lt;br /&gt;
&lt;br /&gt;
Recruitment...&lt;br /&gt;
* You will need at least 300 starting gold, maybe more like 400 on the hardest difficulty level, so if need be, replay the previous scenario.&lt;br /&gt;
* To stretch your money, start with loyal Iron Maulers and a couple ready-to-level level 1's and level 2's. Finally, recall as many level 3's as possible.&lt;br /&gt;
* Healers: 3-6 Mages of Light / White Mages. Your few chaotic units will appreciate a White Mage.&lt;br /&gt;
* Horse units: 2-4 Paladins, 3-4 Knights / Grand Knights.&lt;br /&gt;
* Horse escorts: about 3 speedy units, like Royal Guards, Fugitives, and Silver Mages.&lt;br /&gt;
* Tanks: at least 6 high HP units, such as Royal Guards, Highwayman, Master Bowmen, and the loyal Iron Maulers.&lt;br /&gt;
* Mages: at least 3 high level Mages aside from your basic healers, so Arch Mages, Great Mages, and Silver Mages. Additional Mages of Light can be substituted.&lt;br /&gt;
* Some Mermen might be useful here, but surprisingly, they're not really necessary.&lt;br /&gt;
* On 1.9.3 and earlier, you can recruit Saurian Skirmishers on medium and Skirmishers plus Ambushers on hard. This appears to be a bug, so ignore the option.&lt;br /&gt;
&lt;br /&gt;
Strategy...&lt;br /&gt;
* You will launch a two pronged assault: mounted units will race to the west and then south, while the main army heads due south.&lt;br /&gt;
* With your mounted units, race forwards by day and backwards by night.&lt;br /&gt;
* Along with the mounted units should go some escorts, speedy foot units intended to kill things like Goblin Impalers, which make even Grand Knights nervous. They would also benefit from a quick Mage of Light.&lt;br /&gt;
* Meanwhile, with your tanks and the rest of your healers and support units, form a line or hedgehog in the woods just south of your keep or next to the river. &lt;br /&gt;
* Keep your leaders with the main army, to avoid drawing too much attention to the mounted detachment.&lt;br /&gt;
* Maintain awareness of the overall battlefield. If the main army gets in trouble, you can send some or all of the mounted units to assist. There may be an opportunity to hammer-and-anvil enemy forces trapped in the middle. And you may wish to transfer units, like Paladins may be useful to the main army after it is on the move.&lt;br /&gt;
* You'll need at least two Paladins to kill Jevyan himself; nothing else is half as effective (except perhaps Mages of Light and suicidal Lancers).  Or you can use a pair of Great Mages (unless you are very unlucky, you should be able to kill him in a single turn). Don't forget to sacrifice Aethyr to Jevyan.  If he doesn't want to come out and play, march up to Jevyan and use a crossbow attack.  When Jevyan is dead, the yellow and green leaders may still be alive. You'll have to kill one, leaving at least one orc leader alive. You pick.  Congratulations!  Enjoy the ending!&lt;br /&gt;
&lt;br /&gt;
Spoilers...&lt;br /&gt;
* When one of your units is within 8 hexes of a bridge, but you have no units within 2 hexes of the bridge, and there are no units on the bridge, then a Cuttle Fish will appear and destroy the bridge. This is usually disadvantageous. Not only does it leave you with a Cuttle Fish to fight, but it slows your progress south and the bad guys progress north. At least on the hardest difficulty level, it's hard to kill all the spam in time, so you don't want to impede their advance by removing the bridge.&lt;br /&gt;
* When any of your units is killed, it becomes a Walking Corpse. On hard, it becomes a Soulless, which makes it important to be careful with your level 2's, especially Lancers.&lt;br /&gt;
* After the first orc leader is killed, then some gold goes to mister Lich. It's 40, 80, or 120 gold, for easy, medium, and hard, respectively.  The lich will receive some gold once you kill his Familiar.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[MainlineCampaigns]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Campaigns - The Rise of Wesnoth]]&lt;br /&gt;
[[Category:Campaigns - Walkthroughs]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Guide_to_UMC_Content&amp;diff=51389</id>
		<title>Guide to UMC Content</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Guide_to_UMC_Content&amp;diff=51389"/>
		<updated>2013-06-11T16:58:40Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* The Earth's Gut */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''This is a guide to the current (1.10.x/1.11.x) UMC campaigns for players. It aims to provide all the information not only about the story, but also about completion, difficulty and playing style of the campaign. See also [[Guide_to_UMC_Campaigns/Players_Reviews|Players Reviews]], as well as http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=37476 for further information and http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=36733 (for currently non-available UMC-content). Please edit, it is a wiki.''&lt;br /&gt;
&lt;br /&gt;
=== Blueprint ===&lt;br /&gt;
&lt;br /&gt;
'''Status:'''&lt;br /&gt;
* Broken = Does not work at all&lt;br /&gt;
* Incomplete = Partially written, no progress&lt;br /&gt;
* WIP = Partially written, progress&lt;br /&gt;
* Complete = Completely written, but buggy as well as potential balance issues.&lt;br /&gt;
* Finished = Completely written, minimal to no bugs, slight balance issues possible. &lt;br /&gt;
&lt;br /&gt;
'''Length:'''&lt;br /&gt;
&lt;br /&gt;
'''Author:'''&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' if not maintained by the author anymore.&lt;br /&gt;
&lt;br /&gt;
'''Description:'''&lt;br /&gt;
&lt;br /&gt;
'''Version: '''&lt;br /&gt;
&lt;br /&gt;
'''Requirements:'''&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:'''&lt;br /&gt;
&lt;br /&gt;
Please note: Often campaigns introducing new mechanics are listed as expert level on the add-on server, here difficulty means the raw difficulty after the mechanics are understood.&lt;br /&gt;
&lt;br /&gt;
* Unbalanced = If you can't beat the hard mode, it isn't necessarily unbalanced, but if the difficulty changes erraticly from one scenario to the next and only people using the debug mode have seen the final, then it is.&lt;br /&gt;
* Easy&lt;br /&gt;
* Normal&lt;br /&gt;
* Hard&lt;br /&gt;
&lt;br /&gt;
'''Style:''' &lt;br /&gt;
&lt;br /&gt;
Please note: Many campaigns will feature more than one style. Please list the most significant ones.&lt;br /&gt;
&lt;br /&gt;
* Skirmish = small to medium sized armies, your standard Wesnoth gameplay&lt;br /&gt;
* Dungeon = long and narrow tunnels (not every underground scenario is a dungeon, a dungeon isn't necessarily underground)&lt;br /&gt;
* RPG = role playing game elements such as talking with non-player-characters, item collection, dependency on a party of very few adventurers without or limited recruits&lt;br /&gt;
* Survival = being exposed to changing, spawning enemies while remaining on the same map&lt;br /&gt;
* Large Battle = large number of units on the battlefield, sizely maps&lt;br /&gt;
* Simulation = campaigns feat. terrain modification, alternative resources&lt;br /&gt;
* Boss battle = the challenge is to defeat a single powerful enemy unit&lt;br /&gt;
* Minigames = there are puzzles and minigames in the campaign that significantly differ from standard Wesnoth gameplay&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:'''&lt;br /&gt;
&lt;br /&gt;
* Era for the whole campaign and more specifically the faction or unit composition you field.&lt;br /&gt;
&lt;br /&gt;
'''Custom units:'''&lt;br /&gt;
&lt;br /&gt;
* Link to the unit tree for cases that don't feel sufficiently described by Faction / Era entry.&lt;br /&gt;
&lt;br /&gt;
'''Forum:'''&lt;br /&gt;
&lt;br /&gt;
* Links to the feedback and development threads at forums.wesnoth.org&lt;br /&gt;
&lt;br /&gt;
== Battle for Wesnoth 1.10.x - stable ==&lt;br /&gt;
&lt;br /&gt;
''Campaigns available in the 1.10.x stable version.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== After the Storm ===&lt;br /&gt;
&lt;br /&gt;
''Follow the journey of Elynia and her band following the events of &amp;lt;i&amp;gt;Invasion from the Unknown&amp;lt;/i&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' shadowmaster/ShikadiLord&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 3 episodes of approximately 12 scenarios each, some of which are multi-part&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Medium-hard&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Boss Battle, Dungeon&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Many custom units&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.9.1&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=32091&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (vultraz) Long, very enjoyable campaign with great story.&lt;br /&gt;
&lt;br /&gt;
=== Aldur The Great ===&lt;br /&gt;
&lt;br /&gt;
''This is a story about Aldur the Great.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' pintercsabi&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete, but unbalanced&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 5 playable scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Unbalanced&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.2.2&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' -&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Adamant14) Short unbalanced campaign, maybe abandoned. You fight with Peasants, Ruffians and Woodsman against Orcs&lt;br /&gt;
&lt;br /&gt;
=== Alfhelm the Wise ===&lt;br /&gt;
&lt;br /&gt;
''This is the tale of Alfhelm, called by some the Wise, son of Alfric Conqueror. This is the tale of his victories over his enemies, and his rise to power in the clans of Marauderdom. This is the tale of his journey south and his destruction of the Lavinian Empire. And this is the tale of his demise in the dark forests far to the east of his homeland.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' turin&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' UnwiseOwl&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 15 gameplay scenarios &lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Moderate&lt;br /&gt;
&lt;br /&gt;
'''Style:'''  Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Imperial Era, Marauders.&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.6.0&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=17144&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Maintainer) Though this campaign is complete and playable the whole way through, the code is four years old and pretty buggy. If you notice any errors while playing, please let me know and I'll incorporate the fixes into my next revision as soon as possible.]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== A New Order ===&lt;br /&gt;
&lt;br /&gt;
'''Author:''' szopen&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished. &lt;br /&gt;
&lt;br /&gt;
'''Length:''' 45 scenarios.&lt;br /&gt;
&lt;br /&gt;
'''Description:''' The old kingdom of Wesnoth has fallen before barbarian hordes. The occupying barbarians are on the brink of civil war, the seeds of Wesnothian rebellion are kept alive by old legends, while bandits and Khalifate mercenaries roam the land. Can Gawen Hagarthen unite these disparate factions against a common foe?&lt;br /&gt;
Note: This campaign contains mature themes, some of which may be unsuitable for children.&lt;br /&gt;
&lt;br /&gt;
'''Version: ''' 1.2.15&lt;br /&gt;
&lt;br /&gt;
'''Requirements:''' Requires BfW 1.10. In addition, you have to install Era Khalifate add-on; the Akladian Music package is optional&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Large Battle&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Akladians, Khalifate&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=6486&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Pyrophorus) Certainly one of the most mature and well designed campaign in add-ons. A must.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Antar, Son of Rheor ===&lt;br /&gt;
&lt;br /&gt;
''This is the story about a young Lord and his first mission; sent by his father the young Lord Antar has to relieve his neighbours; he has to convince the Elves and Dwarves to ally him; he has to fight against hordes of Orcs and Endless Undead; and finally he has to defeat Mal Kazur, the mastermind who is behind all the evil.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Adamant14&lt;br /&gt;
&lt;br /&gt;
'''Status:''' WIP&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 9 playable scenarios / 1 cutscene&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default, Loyalists and Elves (feat. fencer as main hero + various allies)&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.9.9&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=36075&lt;br /&gt;
&lt;br /&gt;
'''[http://wiki.wesnoth.org/Guide_to_UMC_Campaigns/Players_Reviews#Antar.2C_Son_of_Rheor Players Review]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== A Story of the Northlands ===&lt;br /&gt;
&lt;br /&gt;
''A story of life and death in a remote village of the Northlands. Your village has been overrun by an orcish raid. You fight for its freedom while you wait for help to arrive.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' zepko&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 10 playable scenarios + 1 dialogue-only&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default + additions: you play with a custom faction of outlaws and with a custom party of loyalist knights.&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/A_Story_of_the_Northlands/en_US/A_Story_of_the_Northlands.html Custom Units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== A Vision Blinded ===&lt;br /&gt;
&lt;br /&gt;
''Defend the northern forest against what appeared like a routine orcish raid, and unravel the greater conspiracies that lie below its waves.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' LemonTea&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' AxalaraFlame&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 13 playable scenarios + 1 dialogue-only&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default, Elves (+ Trolls, Outlaws)&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/A_Vision_Blinded/en_US/A_Vision_Blinded.html Custom units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.6.6&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=23463&amp;amp;hilit=a+vision+blinded&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Bad Moon Rising ===&lt;br /&gt;
&lt;br /&gt;
''An expedition to gather treasure from the cold north sets off compounding disaster.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Doofus-01&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 20 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Hard&lt;br /&gt;
&lt;br /&gt;
'''Style:'''  Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Archaic Era&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.4.4.a&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=31348&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Battle Against Time===&lt;br /&gt;
&lt;br /&gt;
''Rescue fellow orcish warchief before he is executed. (This is not a normal campaign. It is experiment with carryover system. You will start with defined number of turns and gold. You will only have that many turns to play through the whole campaign. There is no finish bonus and gold carryover is always 100%.)''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Wonderboy&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 4 playable scenarios + 1 prologue scenario&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Hard&lt;br /&gt;
&lt;br /&gt;
'''Style:'''  Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default: Orcs&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.0&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://wesnoth.org/forum/viewtopic.php?f=8&amp;amp;t=27319&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Besieged Druids ===&lt;br /&gt;
&lt;br /&gt;
''A elvish school for druids comes under attack by goblins. It seems more than just a routine raid; is there something more sinister behind this attack? - In Beseiged Druids, you control Eärendil, the surviving teacher at the school, and the many and varied initiates. Not all of these are ordinary students; many have been experimenting with other forms of magic, while others are simply overachievers in some area of study. Unfortunately, they are not especially good at combat, at least initially. Together with a very small contingent of surviving guards, it is up to these students to save the island of Aleron from disaster.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Celtic Minstrel&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 9 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Unbalanced&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default, Elves&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/DruidSiege/en_US/celmin-druid-siege.html Custom units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=37342&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Birth of a Lich ===&lt;br /&gt;
&lt;br /&gt;
''This is the life story of the dreaded lich Malifor, his struggle as a mage outcast, the orcish conquest of the northlands and his transformation to quench the thirst for revenge''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' chak_abhi&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 12 playable scenarios / 2 dialogue only&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Large Battle, Dungeon&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Human outlaws, dwarves, undead&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/Birth_of_a_Lich/en_US/Birth_of_a_Lich.html Custom Units]&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.3&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=37057&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Bitter Revenge===&lt;br /&gt;
&lt;br /&gt;
''Amidst the strife and turmoil of the first Dark Age of Wesnoth, a time of transient monarchies and conspiracies against the Crown, the boy Darith witnesses the murder of his father by a general of Wesnoth. Follow Darith's quest for retribution in this treacherous tale of betrayal, deceit, love, remorse, and vengeance.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Wonderboy&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 11 playable scenarios + 4 dialogue only&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Hard&lt;br /&gt;
&lt;br /&gt;
'''Style:'''  Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default (mostly outlaws and undead, custom units)&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.1.0&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://wesnoth.org/forum/viewtopic.php?f=8&amp;amp;t=26699&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Cavanagh The Conqueror ===&lt;br /&gt;
&lt;br /&gt;
''This is the tale of Cavanagh Orc-Foundling, who was blessed by the gods to conquer and unite all of the Great Continent. Orcs and elves, gods and men, queens and sorcerers populate this epic tale of revenge and redemption.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' TheEmptyLord (Programming, Map-making, Editing), Scott_Free(Story)&lt;br /&gt;
&lt;br /&gt;
'''Status:''' WIP&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 10 Playable Scenarios so far&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:'''  Skirmish, limited RPG, limited Large Battle&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default (Units from Northerners, Outlaws, Loyalists as well as other factions interspersed. Several custom units.)&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.1.2&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=35927&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Cities of the Frontier ===&lt;br /&gt;
&lt;br /&gt;
''Settle a new town in the wilds north of the Great River.''&lt;br /&gt;
	&lt;br /&gt;
''This campaign makes several changes to the standard Wesnoth game mechanics, and focuses on city-building and gold management.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' esci&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' Not fixed, approximately 6-10 seasons of 36 turns each&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Simulation, Survival&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default, Loyalist&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/Cities_of_the_Frontier/en_US/Cities_of_the_Frontier.html Custom units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.5.1&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=36004&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Considerate Dead ===&lt;br /&gt;
&lt;br /&gt;
''As the wind goes on and on, people discover necromancer aren't always bad. Made by tribes45 - No scenarios are done, 4 playable out of ??.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' tribes45 aka tribes55&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Incomplete, unbalanced, abandoned&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 5 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Unbalanced&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default&lt;br /&gt;
&lt;br /&gt;
'''Version:''' .009&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=36522&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Count Kromire ===&lt;br /&gt;
&lt;br /&gt;
''You are the blood son of a vampire lord, however when the might of the celestial crusades comes knocking, and your father is slain, you flee your lands. However you intend to return, to restore the lands of Kromire to the Kromires, to avenge your father, and most importantly, to make sure that no celestial ever dares come into your mountains again.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Velensk&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' currently none&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 9 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Era of Myths, Vampires&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.3.2&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=21560&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Elvish Dynasty RPG ===&lt;br /&gt;
&lt;br /&gt;
''You are the new ruler of an elvish kingdom! Can you lead your people to glory? This campaign is highly randomized so it will be different every time you play!''&lt;br /&gt;
&lt;br /&gt;
''Sequel to Ooze Mini-Campaign''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' spencelack&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' Wesbane&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 10 years, in each year choice between dialogue and fighting scenario (selected out of a large pool of possible scenarios)&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' RPG, Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default, Elves&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.9.9b&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=28627&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Fall of Silvium ===&lt;br /&gt;
&lt;br /&gt;
''You are Caius Regilius, Tribune of the province of Silvia, located in the northmost reaches of the Lavinian Empire at the height of its power. But the Empire has overextended itself, The city of Silvium lies seperated from the rest of the Empire by the mountains of Arendia, and is sandwiched between the Marauders and the Sidhe... war is inevitable, and the province of Silvia will almost certainly fall.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' turin&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' UnwiseOwl&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 8 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Medium&lt;br /&gt;
&lt;br /&gt;
'''Style:'''  Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Imperial Era, Lavinian Legion.&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.6&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=31&amp;amp;t=24356&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The final level of this campaign is not supposed to be winnable. It's a final blaze of glory and chance to use all your high-powered units, but to 'win' the campaign, you must lose...the ending is similar to a certain mainline campaign, but predates it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Fate of a Princess ===&lt;br /&gt;
&lt;br /&gt;
''Part I: Baldres, a notorious robber baron, flees Wesnoth with his followers and sets off into the northlands to evade the king's justice. The baron's deeds and misdeeds are to change the balance of power between orcs and non-orcs throughout the northlands, and will carry consequences long after his eventual death.''&lt;br /&gt;
&lt;br /&gt;
''Part II: The Greenwood elves face a crisis which demands the return of the queen's estranged half-elven half-sister, Baldres' daughter. Two brave young elves must make a perilous journey to find her and bring her back to her former home. If they fail, the whole northlands will be engulfed in war with the resurgent orcs...''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' SkyOne, mich, simonsmith&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 26-29 scenarios (some dialogue-only), 2 parts&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Dungeon&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default with additions. You play two different, unique cross-faction combinations in each part.&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/Fate_of_a_Princess/en_US/Fate_of_a_Princess.html Custom units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.9.17&lt;br /&gt;
&lt;br /&gt;
'''Required Wesnoth version:''' 1.9.12 or later&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=26327&lt;br /&gt;
&lt;br /&gt;
'''[http://wiki.wesnoth.org/Guide_to_UMC_Campaigns/Players_Reviews#Fate_of_a_princess Players Review]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Forgotten Kingdom ===&lt;br /&gt;
&lt;br /&gt;
''Help Orlog, a troll chieftan, lead his people to safety in the underground and discover an ancient power long forgotten.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Limabean&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' Chrysophylax&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Incomplete ( but all scenarios playable and balanced )&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 9 playable scenarios + 1 dialogue-only&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Goblins, Trolls&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/Forgotten_Kingdom/en_US/Forgotten_Kingdom.html Custom units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.1.7&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=23483&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Adamant14) This campaign includes a custom Troll line. A good campaign, I hope Limabean and/or Chrysophylax will finish it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Forward they Cried ===&lt;br /&gt;
&lt;br /&gt;
''You are the leader of an advanced detachment that has been tasked with capturing a bridgehead while the main army prepares to attack. It should be a simple enough assignment.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Glowing Fish&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' Lord-Knightmare &lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 1 scenario ( rather a single scenario than a campaign )&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Hard&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default Loyalists&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=23656&amp;amp;p=350126&amp;amp;hilit=forward+they+cried#p350126&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.0&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Adamant14) Only a single scenario, but a great scenario.&lt;br /&gt;
(UnwiseOwl) You wouldn't want to stop thinking for a turn, and it's good for the first few turns, but this one leaves me wanting more.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Galuldur's First Journey ===&lt;br /&gt;
&lt;br /&gt;
''While the belligerence of orcs is nothing new, their intensifying attacks on a fledgling colony of elves in Pindir Forest begin to show signs of a deeper malice, forcing Galuldur, the young son of the colony's adventurous founder Galur, to venture out of his forest's friendly trees in search of help. His simple errand quickly turns into a frantic quest to unearth the roots of the mysterious evil threatening his people. As you lead him through unknown lands, Galuldur, forced to match wits with unexpected adversaries at nearly every turn in a desperate attempt to save his world, quickly learns that the world is neither a friendly nor a simple place.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' mattsc&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 8-9 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default, Elves&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/Galuldur/en_US/Galuldur.html Custom units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.1.1&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=31895&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Grnk the Mighty ===&lt;br /&gt;
&lt;br /&gt;
''All his life, puny little goblin Grnk the Frail had been dreaming about leaving the orcs and starting a better life.  When he finally arrives in the human town of Shmaltupp, he realizes that the world is not as black and white as he had imagined.  He also discovers that he is no ordinary goblin.  Follow Grnk the Frail on his path to becoming Grnk the Mighty.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' mattsc&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Part I complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 13 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Hard&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, RPG&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default, changing (no standard army building gameplay)&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/Grnk/en_US/Grnk.html Custom units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.5&lt;br /&gt;
&lt;br /&gt;
'''Required Wesnoth version:''' 1.9.5 or later&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=34970&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Invasion from the Unknown ===&lt;br /&gt;
&lt;br /&gt;
''Episode I - Seeking the Light: Long after the Fall, the last forest elves are forced to abandon their safe valley, and find themselves resorting to the dark means of necromancy in order to survive the perils and challenges of this new harsh world. May they finally free the Great Continent from its chaos, or perish in the foolish attempt of restoring peace and life to the lands.''&lt;br /&gt;
&lt;br /&gt;
''Episode II - Armageddon: As the shadow of Chaos covers the entire continent, an assorted group of foolish heroes prepares a counter-attack to the Empire, with one unique goal in their minds: defeat the evil Emperor, whoever it is. Lead these courageous living and non-living warriors to victory, and rediscover lost secrets of the history.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' shadowmaster &lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' Espreon&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 26 scenarios in two episodes&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Dungeon, Boss battle&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Unique. You play Elves and Undead throughout the campaign + in the 2nd part Northerners and Aragwaithi.&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.90.6&lt;br /&gt;
&lt;br /&gt;
'''[http://wiki.wesnoth.org/Guide_to_UMC_Campaigns/Players_Reviews#Invasion_from_the_Unknown Players Review]'''&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (taptap) Despite its acknowledged flaws (generic hero, plot holes, deus ex machina moments, gameplay issues in the 2nd part) this is undoubtedly the most iconic campaign in UMC. It single-handedly redefines the elvish history and sketches a cosmology for the ages after the fall. With the Chaos empire and its various allies it introduces an era worth of factions to single-player play. At the same time it features some of the most beautiful maps in Wesnoth and stunning art on par with mainline campaigns.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Invasion of Eliador ===&lt;br /&gt;
&lt;br /&gt;
''A peaceful island is about to be invaded by unknadd-ons foes travelling towards the eastern shore. It is up to a family of outlaws to warn the island's inhabitants before it's too late.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Sam M. (Genosuke)&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' trewe&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.4&lt;br /&gt;
&lt;br /&gt;
'''Style:''' RPG, Skirmish, Puzzle&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 10 scenarios + epilogue&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Easy&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Faction:''' Default (outlaws)&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=6556&lt;br /&gt;
&lt;br /&gt;
'''Wiki:''' [[Invasion_of_Eliador]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Langrisser Sample Campaign ===&lt;br /&gt;
&lt;br /&gt;
''The Imperial Knights of the Rayguard Empire have disrupted the peace of the village that was Hein's hometown, seeking only a girl named Liana. Fight to rescue Liana.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Morath&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 1 playable scenario&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default, Elves&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.1.0.5&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=36417&amp;amp;hilit=Langrisser&lt;br /&gt;
&lt;br /&gt;
'''Wikipedia:''' [http://en.wikipedia.org/wiki/Langrisser What is Langrisser]&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Adamant14) Single scenario, different from usual Wesnoth behaviour.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Legend of Far North ===&lt;br /&gt;
&lt;br /&gt;
''The tale of the legendary Black Eye Karun,depicting his rise to power, his successes and his brutal assassination.'&lt;br /&gt;
&lt;br /&gt;
'''Author:''' chak_abhi&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 16 playable scenarios / 1 dialogue only,1 cutscene&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Large Battle&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Orcs, Trolls, Saurians, Nagas&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/Legend_of_Far_North/en_US/Legend_of_Far_North.html Custom Units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.2&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=34769&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Legend of the Invincibles ===&lt;br /&gt;
&lt;br /&gt;
'''''Part I: Shrouded in Darkness''' (5 chapters, 90 scenarios) - A pair of heroes, after stopping an orcish thread, are outcast into caves, where they have no other choice than to become liches in order to survive. They preserved their original appearance and moral principles, and fight in various skirmishes against evil (although using evil methods sometimes), until the Fall, when they are buried alive under the ashes of the third sun.''&lt;br /&gt;
&lt;br /&gt;
'''''Part II: Into the Light''' (4 chapters, 96 scenarios at the moment) - Long after the Fall, the lich heroes awaken. Searching for more power, they manage to resurrect themselves as living beings, but this time more powerful and ridden of the evil within. But the evil from inside them did not cease to exist, and started a campaign to conquer the world. Stopping the campaign caused an even worse disaster...''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Dugi &lt;br /&gt;
&lt;br /&gt;
'''Status:''' WiP (but Part I might be considered complete)&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 185 (+7 talk-only) scenarios at the moment&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' mostly Skirmish and Dungeon (all other styles are present as well, but less frequently)&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Elves, Loyalists, Undead, Dwarves; but they advance past their usual maximum level&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 2.5.0&lt;br /&gt;
&lt;br /&gt;
'''[http://wiki.wesnoth.org/Guide_to_UMC_Campaigns/Players_Reviews#Legends_of_the_Invincibles Players Review]'''&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The most unique feature of this campaign is its RPG-like unit development system, enemies drop items units can use, leaders are stronger than most usual units and all units get AMLA (after maximum level advancement) after reaching their maximum level (that is also increased by a load of additional level 4 units).&lt;br /&gt;
&lt;br /&gt;
=== Panther Lord ===&lt;br /&gt;
&lt;br /&gt;
''The Imperialists ambitions of pushing into the Sea States have been repeatedly thwarted and now they turn their attentions elsewhere. You are an outcast Darklander now living as a mercenary in the Sea States and the rumors you hear indicate that they will be coming to your people. Though an outcast you do not wish to see them subjugated. The spirit whose friendship caused you to be an outcast has a plan that might allow you to save them.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Velensk &lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' Lavender&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 14 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Hard&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Era of Four Moons, Darklanders (+ a wide variety of mercenaries)&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.2&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=34318&lt;br /&gt;
&lt;br /&gt;
'''[http://wiki.wesnoth.org/Guide_to_UMC_Campaigns/Players_Reviews#Panther_Lord Players Review]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Random Campaign ===&lt;br /&gt;
&lt;br /&gt;
''Gain experience playing the Default Era faction of your choice in a campaign setting''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' SigurdFireDragon&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 7 playable scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default, Age of Heroes, &amp;amp; Era of Legends&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.0&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=32922&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Author) A 4 scenario version is under the multiplayer button, which lets you choose any era.&lt;br /&gt;
Intended for players to gain practice with a faction and learn sound strategies using faction specific adjustments against random factions from the chosen era.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Rebellion in the North ===&lt;br /&gt;
&lt;br /&gt;
''A great orcish uprising tends to destabilise the Northlands. As the future Lord Protector of the Northern Alliance you have to crush the rebellion and establish peace again.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Author:''' chak_abhi&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 24 playable scenarios / 3 dialogue only,2 cutscenes&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Large Battle&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Loyalists, Dwarves, Gryphons, Merfolk&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.1.12&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=33059&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Return of the Monster ===&lt;br /&gt;
&lt;br /&gt;
''It was time for Amailoss, born from the naga queen's last egg, to leave home. Time for him to grow into a leader in his own right, and eventually become the guardian and leader of another naga city. But along the way, he became friends with an unusual mud-crawler, they met a strange young monster, discovered that a spirit had escaped from an orc prison, and the mystery of that spirit became a grave challenge for Amailoss and the many races in the region....''&lt;br /&gt;
&lt;br /&gt;
''A naga campaign, involving elves, orcs, saurians, turtle-like races, and some monsters.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' SkyOne&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 16 playable, 2 dialog scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Dungeon&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default with additions. You play a custom naga faction and carapaces (a turtle-like race).&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/Return_of_the_Monster/en_US/Return_of_the_Monster.html Custom units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.7.1&lt;br /&gt;
&lt;br /&gt;
'''Required Wesnoth version:''' 1.10.x&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=36438&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Return to Noelren ===&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete.&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 26 scenarios + 7 cut scenes&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Pyrophorus&lt;br /&gt;
&lt;br /&gt;
'''Description:''' ''A story in the first Dark Age of Wesnoth. See how various heroes stick together to shun the threat of black magics, restore the secret kingdom of Noelren and install Garard I on the throne of Wesnoth. This campaign features complex scenarios, unusual objectives and units, emphasizing more on story and adventures than hardcore fighting.''&lt;br /&gt;
&lt;br /&gt;
'''Version: ''' 0.7.6&lt;br /&gt;
&lt;br /&gt;
'''Requirements:''' BfW 1.10 (not tested on 1.11)&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Easy, unbalanced&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, RPG, Large Battle, Simulation&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default + custom units&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/ReturnToNoelren/en_US/ReturnToNoelren.html Custom Units]'''&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=34685#p501026&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Adamant14) I never saw so much fantastic and new ideas in one single UMC, wow!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Return to Ruins ===&lt;br /&gt;
&lt;br /&gt;
''The humble farmers of Vertegris are summoned by Erik the General of Weldyn to put an end to an orcish raiding party. If they knew what would befall their former home... They never would have left. This is a relatively short campaign with 8 scenarios, It is still undergoing changes.''&lt;br /&gt;
&lt;br /&gt;
'''Author:'''  Jeff Stevens (Ulfsark)&lt;br /&gt;
&lt;br /&gt;
'''Composer:''' Paul Fredericks (paulfredericksmusic.com)&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 7 scenarios + 1 dialogue-only&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Easy,Normal,Hard&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default,(Loyalists, Outlaws)&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.5.1&lt;br /&gt;
&lt;br /&gt;
'''Required Wesnoth version:''' 1.10.x &lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=37790&amp;amp;sid=9059f18497cda1219f42a626544d0ffd&amp;amp;p=540646#p540646&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Adamant14) You play a short campaign with just a few units. Playable in a few hours, nevertheless it is fun to play.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Salt Wars ===&lt;br /&gt;
&lt;br /&gt;
''Introductory campaign for the Era of Four Moons.''&lt;br /&gt;
&lt;br /&gt;
''As an officer of one of the Sea States you must defend your organization from aggressive rivals.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Velensk &lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' Lavender&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 5 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Easy&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Era of Four Moons, Sea States&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.2.1&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=31498&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Saving Elensefar ===&lt;br /&gt;
&lt;br /&gt;
''Meneldur, elvish mariner of Elensefar, is driven to sea by the same orcs who attacked the city. He must gather an army willing to fight for him to regain Elensefar, his adopted homeland.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Turin&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' trewe&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 1 year (around 12 scenarios)&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, RPG, Simulation&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.5.2&lt;br /&gt;
&lt;br /&gt;
'''Faction:''' Default Era&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://wesnoth.org/forum/viewtopic.php?t=3072&amp;amp;start=0&lt;br /&gt;
&lt;br /&gt;
'''Wiki:''' [[SeafaringCampaign]]&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Labeled as Expert, recruit list changes in all scenarios.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shameless Crossover Excuse ===&lt;br /&gt;
&lt;br /&gt;
''Fugitive dark sorcerer Gwiti Ha'atel discovers he has the power to mess with Wesnoth's continuity. His quest for revenge on the NPCs who have used his portraits will lead him through perils untold and in-jokes unnumbered, but shall pale before the horror he finds at his quest's end.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Orcish Shyde, Mountain_King&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 9 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.1.0&lt;br /&gt;
&lt;br /&gt;
'''Faction:''' Undead&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=32016&amp;amp;start=15&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Swamplings ===&lt;br /&gt;
&lt;br /&gt;
''Banished by Yushnak the Ponderer, a tribe of lowly swamp goblins endure in the deadly mire of Pogo Bog. Four centuries before the founding of Wesnoth, this is the story of the goblins' struggle against the intrigues and betrayals of the greater races, and the rise of the first wolf rider.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' John Rawlins (boru)&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 14 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.1.7n&lt;br /&gt;
&lt;br /&gt;
'''Faction:''' Goblins&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=29784&lt;br /&gt;
&lt;br /&gt;
'''[http://wiki.wesnoth.org/Guide_to_UMC_Campaigns/Players_Reviews#Swamplings Players Review]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Talentless Mage===&lt;br /&gt;
&lt;br /&gt;
''Humorous and silly campaign about mage apprentice who has managed to learn only one simple spell in thirty years.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Wonderboy&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 11 playable scenarios + 3 dialogue scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Hard&lt;br /&gt;
&lt;br /&gt;
'''Style:'''  Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Noob Faction&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.1.0&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://wesnoth.org/forum/viewtopic.php?f=8&amp;amp;t=27608]&lt;br /&gt;
&lt;br /&gt;
'''[http://wiki.wesnoth.org/index.php?title=Guide_to_UMC_Campaigns/Players_Reviews&amp;amp;action=submit#Talentless_Mage Players Review]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Dark Alliance===&lt;br /&gt;
&lt;br /&gt;
''Prince Terhar lived two years with elves. Little did he expect what would happen when he returned back to Weldyn.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Wonderboy&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 11 or 10 playable scenarios depending on the branch you take (+ 5 dialogue scenarios)&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Hard&lt;br /&gt;
&lt;br /&gt;
'''Style:'''  Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default: Recruit list changes in almost every scenario&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.3&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://wesnoth.org/forum/viewtopic.php?f=8&amp;amp;t=26924&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Dark Hordes ===&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Incomplete/WIP&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 11/?&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Circon&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' Various&lt;br /&gt;
&lt;br /&gt;
'''Description:''' Lead fugitive dark sorcerer Gwiti Ha’atel to mastery of the undead hordes.&lt;br /&gt;
&lt;br /&gt;
'''Version: '''&lt;br /&gt;
&lt;br /&gt;
'''Requirements:'''&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:'''&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default undead&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/The_Dark_Hordes/en_US/The_Dark_Hordes_1.html Custom Units]'''&lt;br /&gt;
&lt;br /&gt;
'''Walkthrough:''' [[TheDarkHordes]]&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' [[http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=16576&amp;amp;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Devil's Flute ===&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete, unmaintained&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 10 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Author:''' lipk&lt;br /&gt;
&lt;br /&gt;
'''Description:''' Creona, the well-known assassin, gets a strange job from a strange person. So, in fact, it's no surprise that things take a strange turn...&lt;br /&gt;
&lt;br /&gt;
'''Version:'''  0.1.4c&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Unbalanced&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Minigames&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Outlaws&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=36044&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Earth's Gut ===&lt;br /&gt;
&lt;br /&gt;
''The year is 515YW. You are the young dwarven leader Hamel. Your tribe in the caves of Knalga is under pressure from its enemies, and resources are growing scarce. In order to forge the weapons required to resist your enemies, you must set forth and collect what ores and minerals remain.''&lt;br /&gt;
&lt;br /&gt;
'''Author:'''  Anonymissimus&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' Anonymissimus&lt;br /&gt;
&lt;br /&gt;
'''Status:''' WIP, story is unfinished (I didn't add any scenario since long, but that doesn't mean nothing is added to the campaign. My addons tend to be in good shape and bug-free which means also WIP as I'm updating it since 1.4 days.)&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 23 scenarios, 5 of which are cutscene only, some others have changing objectives&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:'''  Dungeon, Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default, dwarves, woses, mages, a few custom units&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/The_Earths_Gut/en_US/the_earths_gut.html Custom units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.2.14&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=26800&lt;br /&gt;
&lt;br /&gt;
'''Note:''' This campaign is a &amp;quot;Dwarvish dungeon crawler&amp;quot; (It currently contains about as many surface scenarios as underground though.) and is intended to be challenging for experienced players on hard whilst suitably easy on easy. I develop the campaign with the wesnoth development version and I advise to play with that, but it is intended to work almost equally well with the stable wesnoth version (except for features only available in the wesnoth development version).&lt;br /&gt;
&lt;br /&gt;
=== The Epic of Vaniyera ===&lt;br /&gt;
&lt;br /&gt;
''The expansionist Lavinian Legion, led by the Imperator himself, has invaded the northern forests of the Sidhe, or Wild Elves. It is up to Leithan the Thunderblade and his advisor Vaniyera to push its armies back where they came from...''&lt;br /&gt;
&lt;br /&gt;
'''Author:'''  oreb, turin&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' UnwiseOwl&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 6 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Hard (Don't be fooled by &amp;quot;novice level&amp;quot; in the campaign description, this one is very hard.) &lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Maintainer) Working on this issue, the next release (due at the end of November, hah!) should bring easy difficulty back to the level of a reasonable introduction to the IE, while the hard difficulty will also become slightly easier. With any luck, this will be the last release before version 1.0 of the campaign].&lt;br /&gt;
&lt;br /&gt;
'''Style:'''  Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Imperial Era, Sidhe.&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.9.0&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=19490&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Fall of Wesnoth ===&lt;br /&gt;
&lt;br /&gt;
''As the beloved human empire of Wesnoth becomes lazy and arrogant in its peaceful state of happiness, Emperor Dantair demands the creation of another sun in a bid to destroy all evil. Or is it all for a different purpose? A man named Alitar sees it that way, and now he must survive the most evil inhabited lands if he is to stop chaos from rising, and Wesnoth from falling... This is the story of The Fall of Wesnoth.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Pewskeepski&lt;br /&gt;
&lt;br /&gt;
'''Status:''' 1st part complete, 2nd WIP.&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 10 playable scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default, Outlaws&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/The_Fall_of_Wesnoth/en_US/The_Fall_of_Wesnoth-1.html Custom units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.8&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Founding of Borstep ===&lt;br /&gt;
&lt;br /&gt;
''The chieftain of your tribe has become decadent and weak. Take over, and lead your people to a better home--whether it is already occupied or not. The Northlands in year 9W are a barbaric place, but anyone who stands in your way will learn the power of orcs!''	&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Beetlenaut&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 10 and 1 dialogue only&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Hard&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default, Northerners&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/The_Founding_of_Borstep/en_US/The_Founding_of_Borstep.html Custom units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.1.1b&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Kanzil) I find the protagonist hard to sympathise with. Also, most scenarios contain interesting twists. For example, in one, each time you killed a boar it gives you extra health.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (beetlenaut--author) In most Orcish campaigns the leader is heroic or just wants peace. Krag-Ubor wants plunder and battle like all enemy Orcs in other campaigns. I '''hope''' you don't sympathize too strongly, but I don't think you need to in order to enjoy the game play.&lt;br /&gt;
&lt;br /&gt;
=== The Library of Kratemaqht ===&lt;br /&gt;
&lt;br /&gt;
''An ancient story from the old continent.''&lt;br /&gt;
&lt;br /&gt;
'''Author:'''  Rich Marinaccio (cephalo)&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 17 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Unbalanced (some scenarios are Easy - some rather Hard) &lt;br /&gt;
&lt;br /&gt;
'''Style:'''  Skirmish, RPG&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Loyalists and custom units.&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/Library_Of_Kratemaqht/en_US/The_Library_Of_Kratemaqht.html Custom units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.0&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=37798&lt;br /&gt;
&lt;br /&gt;
'''[http://wiki.wesnoth.org/Guide_to_UMC_Campaigns/Players_Reviews#The_Library_of_Kratemaqht Players Review]'''&lt;br /&gt;
&lt;br /&gt;
'''Notes:''' (Adamant14) This campaign has a thought-out story, shows a great love for detail;&lt;br /&gt;
It includes a great custom Dragon, some brilliant custom images (fire, burning houses, burning forest) that makes the scenery / maps look very nice.&lt;br /&gt;
&lt;br /&gt;
=== The Roar of the Woses ===&lt;br /&gt;
&lt;br /&gt;
''When the construction of a dam threatens the existence of her home, Kylix is forced on a journey to stop it.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Alarantalara&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 10-11 scenarios + 1 dialogue-only&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default with Additions (primarily Saurians, Nagas, Woses)&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.2.7&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=29830&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (author) Potentially unbalanced on Hard difficulty due to experiments with non-standard ways to increase difficulty. This issue does not exist on the lower difficulty levels.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Three Elves ===&lt;br /&gt;
&lt;br /&gt;
''Three elves have just begun their adventure in the northern swampland. Will they become heroes or will they be responsible for another undead expansion?''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Stanislav Hoferek&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' trewe&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.9&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Easy&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 8 scenarios + 2 dialogue&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction:''' Default (Elves)&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' (does it have one?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Sojournings of Grog ===&lt;br /&gt;
&lt;br /&gt;
''Grog (as starred in Under the Burning Suns) goes home.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Peter Christopher, Thomas Hockings &lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' Elvish_Hunter&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 18 playable scenarios in 2 parts&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Dungeon, Large Battle&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/The_Sojournings_of_Grog/en_US/The_Sojournings_of_Grog.html Custom units]'''&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default. Most of the time you play trolls and some desert elves accompanying Grog.&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 3.0.1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Unstoppable Legion ===&lt;br /&gt;
&lt;br /&gt;
''Horseback campaign. The kingdom of Suveran, far away from Wesnoth, is under attack. Only Deuterus, a Great Druid, knows their weakness and only Viktor, a young noble, dares go on the quest to stop them.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Chris Neville-Smith (Chris NS)&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' Chris Neville-Smith (Chris NS)&lt;br /&gt;
&lt;br /&gt;
'''Status:''' WIP&lt;br /&gt;
&lt;br /&gt;
'''Length:''' Currently 15 playable sceanrios, including a fork of three paths near the beginning, and another fork of two paths later on.&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Mainly Skirmish&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/The_Unstoppable_Legion/en_US/The_Unstoppable_Legion.html Custom units]'''&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Play mounted units, including expanded Cavalryman line, and completely new Bowrider line. Joined later by Dwarves. Main enemies are the dark fighters and dark cultists.&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.8.7&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The White Troll ===&lt;br /&gt;
&lt;br /&gt;
''The story of a white troll whelp with strange magic powers, who is raised in an elvish village.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Wesnoth Italian Forum&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 8 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default: you play with elves and trolls. Also features custom units with special advancements and abilities.&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/White_Troll/en_US/white_troll.html Custom Units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.7.5&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=38828&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== To Lands Unknown ===&lt;br /&gt;
&lt;br /&gt;
''This is the story of Mehir, the Summoner, and his journey to lands unknown.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' inferno8&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 20 scenarios, 4 dialogue only&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Intermediate (Era of Magic)&lt;br /&gt;
&lt;br /&gt;
'''Style''': Skirmish, Dungeon&lt;br /&gt;
&lt;br /&gt;
'''Era:''' Era of Magic&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.6.0&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=31799&lt;br /&gt;
&lt;br /&gt;
'''[http://wiki.wesnoth.org/Guide_to_UMC_Campaigns/Players_Reviews#To_Lands_Unknown Players Review]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Unlikely Alliance ===&lt;br /&gt;
&lt;br /&gt;
''Play as the members of an alliance between the elves, drakes, and undead after the Fall of Wesnoth.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Creativity&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Broken ( Abandoned )&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 2 broken scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Unbalanced&lt;br /&gt;
&lt;br /&gt;
'''Style:''' -&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' -&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.1&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' -&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Adamant14) Did not work at all. Seems abandoned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Up from Slavery ===&lt;br /&gt;
&lt;br /&gt;
''The Orcei are captives in the imperial city of Lavinium, gladiators performing for the emperor Optus Maximus. All it will take, however, is one orc to lead his people to freedom. The Samnis called Sparxus may be that orc.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' turin&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' UnwiseOwl&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 7 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Arena (= No recruit, small group gladiator fights)&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Imperial Era, Orcei Gladiatores&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.6.0&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Maintainer) At some point, I am intending to completely re-work this campaign to be a multi-player campaign, with one side led by Sparxus and one by Gravirivus. If anyone would like to take this on or has ideas for how to accomplish this, let us know. Nevertheless, its playable as a single player campaign now with some nice ideas that could be developed further.]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Warmaster ===&lt;br /&gt;
&lt;br /&gt;
''One day the scout of your king brings a mysterious little stone, called Zrai-Stone, back from one of his trips. Soon that stone causes a lot of trouble...''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Conkinator&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' trewe&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.3.5&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 16 battle + 2 bonus + 1 epilogue scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Hard&lt;br /&gt;
&lt;br /&gt;
'''Faction:''' Default (loyalists)&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Survival&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=15527&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Way of Dragon ===&lt;br /&gt;
&lt;br /&gt;
''The story of what might happen if a person against his will transform into a dragon...''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' DrakeDragon&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete &lt;br /&gt;
&lt;br /&gt;
'''Length:''' 7 playable scenarios + 1 dialogue-only&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish/RPG&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default Loyalists&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.2.0&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' [http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=37876 Wesnoth Forum]    [http://uporoom.ru/index.php/topic,179.0.html Russian Forum]&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Adamant14) Promising short campaign, you play with just a few units.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Battle for Wesnoth 1.11.x - development ==&lt;br /&gt;
&lt;br /&gt;
''Campaigns available in the 1.11.x development version.''&lt;br /&gt;
&lt;br /&gt;
''Please note: Battle for Wesnoth 1.11.0 features a bug that messes up the selection of difficulty levels.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Antar, Son of Rheor ===&lt;br /&gt;
&lt;br /&gt;
''This is the story about a young Lord and his first mission; sent by his father the young Lord Antar has to relieve his neighbours; he has to convince the Elves and Dwarves to ally him; he has to fight against hordes of Orcs and Endless Undead; and finally he has to defeat Mal Kazur, the mastermind who is behind all the evil.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Adamant14&lt;br /&gt;
&lt;br /&gt;
'''Status:''' WIP&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 9 playable scenarios / 1 cutscene &lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default, Loyalists and Elves (feat. fencer as main hero + various allies)&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.9.9&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=36075&lt;br /&gt;
&lt;br /&gt;
'''[http://wiki.wesnoth.org/Guide_to_UMC_Campaigns/Players_Reviews#Antar.2C_Son_of_Rheor Players Review]'''&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Adamant14) The campaign did not work with BfW version 1.11.0, or BfW version 1.11.1, so please use BfW version 1.11.2 or later!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== A Song of Fire ===&lt;br /&gt;
&lt;br /&gt;
''''''Part I: The Last War''' - In a long-forgotten era, at the heart of the Great Continent, an ancestral evil is awakened, threatening to destroy the whole world. Follow young Myra in the war that will alter the future of Irdya and its peoples forever.''&lt;br /&gt;
&lt;br /&gt;
''''''Part II: Towards the Rising Sun''' - After the vicious Last War, Myra has become the new leader of Aragwaithi and Windsong alike. Albeit young and shaken by many losses, she must steel herself to lead her people through the vast and hostile Hannuk Steppes. However, her journey will take them all farther than in their wildest dreams. Furthermore, Myra must deal with the evil influence of the mysterious red gem she found after the last battle.''&lt;br /&gt;
&lt;br /&gt;
''''''Part III: Raging Skies''' - The refugees have finally found a new home: families are built, allies are made and, for the first time in years, Myra and her friends know peace. However, when everything seems normal, ambition and thirst for power cause the break out of a continental war. And, amidst this new storm, an old foe rises agan, more powerful than ever. Witness the end of the song of Irdya's first great heroine.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' revansurik&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 36 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Large Battle&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default+War of Legends&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.3.4&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=38210&lt;br /&gt;
&lt;br /&gt;
=== Bad Moon Rising ===&lt;br /&gt;
&lt;br /&gt;
''An expedition to gather treasure from the cold north sets off compounding disaster.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Doofus-01&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 20 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Hard&lt;br /&gt;
&lt;br /&gt;
'''Style:'''  Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Archaic Era&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.5.8&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=31348&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Birth of a Lich ===&lt;br /&gt;
&lt;br /&gt;
''This is the life story of the dreaded lich Malifor, his struggle as a mage outcast, the orcish conquest of the northlands and his transformation to quench the thirst for revenge''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' chak_abhi&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 12 playable scenarios / 2 dialogue only&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Large Battle, Dungeon&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Human outlaws, dwarves, undead&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/Birth_of_a_Lich/en_US/Birth_of_a_Lich.html Custom Units]&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.3&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=37057&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Coming of the Storm ===&lt;br /&gt;
&lt;br /&gt;
''A new recruit joins the imperial army, eager to change the world and see combat. Little does he realise just how much action he will get and where his journey will take him. ''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' TrashMan&lt;br /&gt;
&lt;br /&gt;
'''Status:''' WIP&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 26 playable scenarios / 4 dialogue only&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Large Battle, Dungeon&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.2.1&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=23361&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Legend of Far North ===&lt;br /&gt;
&lt;br /&gt;
''The tale of the legendary Black Eye Karun,depicting his rise to power, his successes and his brutal assassination.'&lt;br /&gt;
&lt;br /&gt;
'''Author:''' chak_abhi&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 16 playable scenarios / 1 dialogue only,1 cutscene&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Large Battle&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Orcs, Trolls, Saurians, Nagas&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/Legend_of_Far_North/en_US/Legend_of_Far_North.html Custom Units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.2&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=34769&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Legend of the Invincibles ===&lt;br /&gt;
&lt;br /&gt;
'''''Part I: Shrouded in Darkness''' (5 chapters, 90 scenarios) - A pair of heroes, after stopping an orcish thread, are outcast into caves, where they have no other choice than to become liches in order to survive. They preserved their original appearance and moral principles, and fight in various skirmishes against evil (although using evil methods sometimes), until the Fall, when they are buried alive under the ashes of the third sun.''&lt;br /&gt;
&lt;br /&gt;
'''''Part II: Into the Light''' (4 chapters, 96 scenarios at the moment) - Long after the Fall, the lich heroes awaken. Searching for more power, they manage to resurrect themselves as living beings, but this time more powerful and ridden of the evil within. But the evil from inside them did not cease to exist, and started a campaign to conquer the world. Stopping the campaign caused an even worse disaster...''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Dugi &lt;br /&gt;
&lt;br /&gt;
'''Status:''' WiP (but Part I might be considered complete)&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 185 (+7 talk-only) scenarios at the moment&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' mostly Skirmish and Dungeon (all other styles are present as well, but less frequently)&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Elves, Loyalists, Undead, Dwarves; but they advance past their usual maximum level&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 2.5.0&lt;br /&gt;
&lt;br /&gt;
'''[http://wiki.wesnoth.org/Guide_to_UMC_Campaigns/Players_Reviews#Legends_of_the_Invincibles Players Review]'''&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The most unique feature of this campaign is its RPG-like unit development system, enemies drop items units can use, leaders are stronger than most usual units and all units get AMLA (after maximum level advancement) after reaching their maximum level (that is also increased by a load of additional level 4 units).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Rebellion in the North ===&lt;br /&gt;
&lt;br /&gt;
''A great orcish uprising tends to destabilise the Northlands. As the future Lord Protector of the Northern Alliance you have to crush the rebellion and establish peace again.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Author:''' chak_abhi&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 24 playable scenarios / 3 dialogue only,2 cutscenes&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Large Battle&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Loyalists, Dwarves, Gryphons, Merfolk&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.1.12&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=33059&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Ruthless ===&lt;br /&gt;
&lt;br /&gt;
''A bard (an aging criminal) is walking in wasteland. Nothing but two hands in his pockets, and nothing but stones around. Suddenly he sees a knight on errand--a dangerous opponent, especially in broad daylight. The two strangers are soon sitting by the campfire, and the bard is telling a story.&lt;br /&gt;
(Beginner level, 10+ fights).''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' homunculus&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 12 playable scenarios + 5 cutscene scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal &lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default (Orcs)&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.4&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=37874&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Adamant14) Recommendable campaign, with smart unusual ideas and a good detailed story.&lt;br /&gt;
You fight with few units on small but perfect maps. About the difficulty: The author describes his campaign as 'beginner level', but for me the difficulty is rather NORMAL than EASY.&lt;br /&gt;
&lt;br /&gt;
== [[Guide_to_UMC_Campaigns/Players_Reviews|Player Reviews]] ==&lt;br /&gt;
&lt;br /&gt;
[[Category:Campaigns|*]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Guide_to_UMC_Content&amp;diff=51388</id>
		<title>Guide to UMC Content</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Guide_to_UMC_Content&amp;diff=51388"/>
		<updated>2013-06-11T16:53:36Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* The Earth's Gut */ update and enhance my campaign description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''This is a guide to the current (1.10.x/1.11.x) UMC campaigns for players. It aims to provide all the information not only about the story, but also about completion, difficulty and playing style of the campaign. See also [[Guide_to_UMC_Campaigns/Players_Reviews|Players Reviews]], as well as http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=37476 for further information and http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=36733 (for currently non-available UMC-content). Please edit, it is a wiki.''&lt;br /&gt;
&lt;br /&gt;
=== Blueprint ===&lt;br /&gt;
&lt;br /&gt;
'''Status:'''&lt;br /&gt;
* Broken = Does not work at all&lt;br /&gt;
* Incomplete = Partially written, no progress&lt;br /&gt;
* WIP = Partially written, progress&lt;br /&gt;
* Complete = Completely written, but buggy as well as potential balance issues.&lt;br /&gt;
* Finished = Completely written, minimal to no bugs, slight balance issues possible. &lt;br /&gt;
&lt;br /&gt;
'''Length:'''&lt;br /&gt;
&lt;br /&gt;
'''Author:'''&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' if not maintained by the author anymore.&lt;br /&gt;
&lt;br /&gt;
'''Description:'''&lt;br /&gt;
&lt;br /&gt;
'''Version: '''&lt;br /&gt;
&lt;br /&gt;
'''Requirements:'''&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:'''&lt;br /&gt;
&lt;br /&gt;
Please note: Often campaigns introducing new mechanics are listed as expert level on the add-on server, here difficulty means the raw difficulty after the mechanics are understood.&lt;br /&gt;
&lt;br /&gt;
* Unbalanced = If you can't beat the hard mode, it isn't necessarily unbalanced, but if the difficulty changes erraticly from one scenario to the next and only people using the debug mode have seen the final, then it is.&lt;br /&gt;
* Easy&lt;br /&gt;
* Normal&lt;br /&gt;
* Hard&lt;br /&gt;
&lt;br /&gt;
'''Style:''' &lt;br /&gt;
&lt;br /&gt;
Please note: Many campaigns will feature more than one style. Please list the most significant ones.&lt;br /&gt;
&lt;br /&gt;
* Skirmish = small to medium sized armies, your standard Wesnoth gameplay&lt;br /&gt;
* Dungeon = long and narrow tunnels (not every underground scenario is a dungeon, a dungeon isn't necessarily underground)&lt;br /&gt;
* RPG = role playing game elements such as talking with non-player-characters, item collection, dependency on a party of very few adventurers without or limited recruits&lt;br /&gt;
* Survival = being exposed to changing, spawning enemies while remaining on the same map&lt;br /&gt;
* Large Battle = large number of units on the battlefield, sizely maps&lt;br /&gt;
* Simulation = campaigns feat. terrain modification, alternative resources&lt;br /&gt;
* Boss battle = the challenge is to defeat a single powerful enemy unit&lt;br /&gt;
* Minigames = there are puzzles and minigames in the campaign that significantly differ from standard Wesnoth gameplay&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:'''&lt;br /&gt;
&lt;br /&gt;
* Era for the whole campaign and more specifically the faction or unit composition you field.&lt;br /&gt;
&lt;br /&gt;
'''Custom units:'''&lt;br /&gt;
&lt;br /&gt;
* Link to the unit tree for cases that don't feel sufficiently described by Faction / Era entry.&lt;br /&gt;
&lt;br /&gt;
'''Forum:'''&lt;br /&gt;
&lt;br /&gt;
* Links to the feedback and development threads at forums.wesnoth.org&lt;br /&gt;
&lt;br /&gt;
== Battle for Wesnoth 1.10.x - stable ==&lt;br /&gt;
&lt;br /&gt;
''Campaigns available in the 1.10.x stable version.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== After the Storm ===&lt;br /&gt;
&lt;br /&gt;
''Follow the journey of Elynia and her band following the events of &amp;lt;i&amp;gt;Invasion from the Unknown&amp;lt;/i&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' shadowmaster/ShikadiLord&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 3 episodes of approximately 12 scenarios each, some of which are multi-part&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Medium-hard&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Boss Battle, Dungeon&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Many custom units&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.9.1&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=32091&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (vultraz) Long, very enjoyable campaign with great story.&lt;br /&gt;
&lt;br /&gt;
=== Aldur The Great ===&lt;br /&gt;
&lt;br /&gt;
''This is a story about Aldur the Great.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' pintercsabi&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete, but unbalanced&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 5 playable scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Unbalanced&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.2.2&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' -&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Adamant14) Short unbalanced campaign, maybe abandoned. You fight with Peasants, Ruffians and Woodsman against Orcs&lt;br /&gt;
&lt;br /&gt;
=== Alfhelm the Wise ===&lt;br /&gt;
&lt;br /&gt;
''This is the tale of Alfhelm, called by some the Wise, son of Alfric Conqueror. This is the tale of his victories over his enemies, and his rise to power in the clans of Marauderdom. This is the tale of his journey south and his destruction of the Lavinian Empire. And this is the tale of his demise in the dark forests far to the east of his homeland.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' turin&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' UnwiseOwl&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 15 gameplay scenarios &lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Moderate&lt;br /&gt;
&lt;br /&gt;
'''Style:'''  Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Imperial Era, Marauders.&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.6.0&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=17144&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Maintainer) Though this campaign is complete and playable the whole way through, the code is four years old and pretty buggy. If you notice any errors while playing, please let me know and I'll incorporate the fixes into my next revision as soon as possible.]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== A New Order ===&lt;br /&gt;
&lt;br /&gt;
'''Author:''' szopen&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished. &lt;br /&gt;
&lt;br /&gt;
'''Length:''' 45 scenarios.&lt;br /&gt;
&lt;br /&gt;
'''Description:''' The old kingdom of Wesnoth has fallen before barbarian hordes. The occupying barbarians are on the brink of civil war, the seeds of Wesnothian rebellion are kept alive by old legends, while bandits and Khalifate mercenaries roam the land. Can Gawen Hagarthen unite these disparate factions against a common foe?&lt;br /&gt;
Note: This campaign contains mature themes, some of which may be unsuitable for children.&lt;br /&gt;
&lt;br /&gt;
'''Version: ''' 1.2.15&lt;br /&gt;
&lt;br /&gt;
'''Requirements:''' Requires BfW 1.10. In addition, you have to install Era Khalifate add-on; the Akladian Music package is optional&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Large Battle&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Akladians, Khalifate&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=6486&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Pyrophorus) Certainly one of the most mature and well designed campaign in add-ons. A must.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Antar, Son of Rheor ===&lt;br /&gt;
&lt;br /&gt;
''This is the story about a young Lord and his first mission; sent by his father the young Lord Antar has to relieve his neighbours; he has to convince the Elves and Dwarves to ally him; he has to fight against hordes of Orcs and Endless Undead; and finally he has to defeat Mal Kazur, the mastermind who is behind all the evil.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Adamant14&lt;br /&gt;
&lt;br /&gt;
'''Status:''' WIP&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 9 playable scenarios / 1 cutscene&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default, Loyalists and Elves (feat. fencer as main hero + various allies)&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.9.9&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=36075&lt;br /&gt;
&lt;br /&gt;
'''[http://wiki.wesnoth.org/Guide_to_UMC_Campaigns/Players_Reviews#Antar.2C_Son_of_Rheor Players Review]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== A Story of the Northlands ===&lt;br /&gt;
&lt;br /&gt;
''A story of life and death in a remote village of the Northlands. Your village has been overrun by an orcish raid. You fight for its freedom while you wait for help to arrive.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' zepko&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 10 playable scenarios + 1 dialogue-only&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default + additions: you play with a custom faction of outlaws and with a custom party of loyalist knights.&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/A_Story_of_the_Northlands/en_US/A_Story_of_the_Northlands.html Custom Units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== A Vision Blinded ===&lt;br /&gt;
&lt;br /&gt;
''Defend the northern forest against what appeared like a routine orcish raid, and unravel the greater conspiracies that lie below its waves.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' LemonTea&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' AxalaraFlame&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 13 playable scenarios + 1 dialogue-only&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default, Elves (+ Trolls, Outlaws)&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/A_Vision_Blinded/en_US/A_Vision_Blinded.html Custom units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.6.6&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=23463&amp;amp;hilit=a+vision+blinded&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Bad Moon Rising ===&lt;br /&gt;
&lt;br /&gt;
''An expedition to gather treasure from the cold north sets off compounding disaster.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Doofus-01&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 20 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Hard&lt;br /&gt;
&lt;br /&gt;
'''Style:'''  Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Archaic Era&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.4.4.a&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=31348&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Battle Against Time===&lt;br /&gt;
&lt;br /&gt;
''Rescue fellow orcish warchief before he is executed. (This is not a normal campaign. It is experiment with carryover system. You will start with defined number of turns and gold. You will only have that many turns to play through the whole campaign. There is no finish bonus and gold carryover is always 100%.)''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Wonderboy&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 4 playable scenarios + 1 prologue scenario&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Hard&lt;br /&gt;
&lt;br /&gt;
'''Style:'''  Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default: Orcs&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.0&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://wesnoth.org/forum/viewtopic.php?f=8&amp;amp;t=27319&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Besieged Druids ===&lt;br /&gt;
&lt;br /&gt;
''A elvish school for druids comes under attack by goblins. It seems more than just a routine raid; is there something more sinister behind this attack? - In Beseiged Druids, you control Eärendil, the surviving teacher at the school, and the many and varied initiates. Not all of these are ordinary students; many have been experimenting with other forms of magic, while others are simply overachievers in some area of study. Unfortunately, they are not especially good at combat, at least initially. Together with a very small contingent of surviving guards, it is up to these students to save the island of Aleron from disaster.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Celtic Minstrel&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 9 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Unbalanced&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default, Elves&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/DruidSiege/en_US/celmin-druid-siege.html Custom units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=37342&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Birth of a Lich ===&lt;br /&gt;
&lt;br /&gt;
''This is the life story of the dreaded lich Malifor, his struggle as a mage outcast, the orcish conquest of the northlands and his transformation to quench the thirst for revenge''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' chak_abhi&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 12 playable scenarios / 2 dialogue only&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Large Battle, Dungeon&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Human outlaws, dwarves, undead&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/Birth_of_a_Lich/en_US/Birth_of_a_Lich.html Custom Units]&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.3&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=37057&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Bitter Revenge===&lt;br /&gt;
&lt;br /&gt;
''Amidst the strife and turmoil of the first Dark Age of Wesnoth, a time of transient monarchies and conspiracies against the Crown, the boy Darith witnesses the murder of his father by a general of Wesnoth. Follow Darith's quest for retribution in this treacherous tale of betrayal, deceit, love, remorse, and vengeance.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Wonderboy&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 11 playable scenarios + 4 dialogue only&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Hard&lt;br /&gt;
&lt;br /&gt;
'''Style:'''  Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default (mostly outlaws and undead, custom units)&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.1.0&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://wesnoth.org/forum/viewtopic.php?f=8&amp;amp;t=26699&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Cavanagh The Conqueror ===&lt;br /&gt;
&lt;br /&gt;
''This is the tale of Cavanagh Orc-Foundling, who was blessed by the gods to conquer and unite all of the Great Continent. Orcs and elves, gods and men, queens and sorcerers populate this epic tale of revenge and redemption.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' TheEmptyLord (Programming, Map-making, Editing), Scott_Free(Story)&lt;br /&gt;
&lt;br /&gt;
'''Status:''' WIP&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 10 Playable Scenarios so far&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:'''  Skirmish, limited RPG, limited Large Battle&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default (Units from Northerners, Outlaws, Loyalists as well as other factions interspersed. Several custom units.)&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.1.2&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=35927&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Cities of the Frontier ===&lt;br /&gt;
&lt;br /&gt;
''Settle a new town in the wilds north of the Great River.''&lt;br /&gt;
	&lt;br /&gt;
''This campaign makes several changes to the standard Wesnoth game mechanics, and focuses on city-building and gold management.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' esci&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' Not fixed, approximately 6-10 seasons of 36 turns each&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Simulation, Survival&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default, Loyalist&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/Cities_of_the_Frontier/en_US/Cities_of_the_Frontier.html Custom units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.5.1&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=36004&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Considerate Dead ===&lt;br /&gt;
&lt;br /&gt;
''As the wind goes on and on, people discover necromancer aren't always bad. Made by tribes45 - No scenarios are done, 4 playable out of ??.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' tribes45 aka tribes55&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Incomplete, unbalanced, abandoned&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 5 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Unbalanced&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default&lt;br /&gt;
&lt;br /&gt;
'''Version:''' .009&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=36522&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Count Kromire ===&lt;br /&gt;
&lt;br /&gt;
''You are the blood son of a vampire lord, however when the might of the celestial crusades comes knocking, and your father is slain, you flee your lands. However you intend to return, to restore the lands of Kromire to the Kromires, to avenge your father, and most importantly, to make sure that no celestial ever dares come into your mountains again.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Velensk&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' currently none&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 9 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Era of Myths, Vampires&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.3.2&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=21560&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Elvish Dynasty RPG ===&lt;br /&gt;
&lt;br /&gt;
''You are the new ruler of an elvish kingdom! Can you lead your people to glory? This campaign is highly randomized so it will be different every time you play!''&lt;br /&gt;
&lt;br /&gt;
''Sequel to Ooze Mini-Campaign''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' spencelack&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' Wesbane&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 10 years, in each year choice between dialogue and fighting scenario (selected out of a large pool of possible scenarios)&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' RPG, Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default, Elves&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.9.9b&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=28627&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Fall of Silvium ===&lt;br /&gt;
&lt;br /&gt;
''You are Caius Regilius, Tribune of the province of Silvia, located in the northmost reaches of the Lavinian Empire at the height of its power. But the Empire has overextended itself, The city of Silvium lies seperated from the rest of the Empire by the mountains of Arendia, and is sandwiched between the Marauders and the Sidhe... war is inevitable, and the province of Silvia will almost certainly fall.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' turin&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' UnwiseOwl&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 8 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Medium&lt;br /&gt;
&lt;br /&gt;
'''Style:'''  Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Imperial Era, Lavinian Legion.&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.6&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=31&amp;amp;t=24356&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The final level of this campaign is not supposed to be winnable. It's a final blaze of glory and chance to use all your high-powered units, but to 'win' the campaign, you must lose...the ending is similar to a certain mainline campaign, but predates it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Fate of a Princess ===&lt;br /&gt;
&lt;br /&gt;
''Part I: Baldres, a notorious robber baron, flees Wesnoth with his followers and sets off into the northlands to evade the king's justice. The baron's deeds and misdeeds are to change the balance of power between orcs and non-orcs throughout the northlands, and will carry consequences long after his eventual death.''&lt;br /&gt;
&lt;br /&gt;
''Part II: The Greenwood elves face a crisis which demands the return of the queen's estranged half-elven half-sister, Baldres' daughter. Two brave young elves must make a perilous journey to find her and bring her back to her former home. If they fail, the whole northlands will be engulfed in war with the resurgent orcs...''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' SkyOne, mich, simonsmith&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 26-29 scenarios (some dialogue-only), 2 parts&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Dungeon&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default with additions. You play two different, unique cross-faction combinations in each part.&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/Fate_of_a_Princess/en_US/Fate_of_a_Princess.html Custom units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.9.17&lt;br /&gt;
&lt;br /&gt;
'''Required Wesnoth version:''' 1.9.12 or later&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=26327&lt;br /&gt;
&lt;br /&gt;
'''[http://wiki.wesnoth.org/Guide_to_UMC_Campaigns/Players_Reviews#Fate_of_a_princess Players Review]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Forgotten Kingdom ===&lt;br /&gt;
&lt;br /&gt;
''Help Orlog, a troll chieftan, lead his people to safety in the underground and discover an ancient power long forgotten.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Limabean&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' Chrysophylax&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Incomplete ( but all scenarios playable and balanced )&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 9 playable scenarios + 1 dialogue-only&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Goblins, Trolls&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/Forgotten_Kingdom/en_US/Forgotten_Kingdom.html Custom units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.1.7&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=23483&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Adamant14) This campaign includes a custom Troll line. A good campaign, I hope Limabean and/or Chrysophylax will finish it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Forward they Cried ===&lt;br /&gt;
&lt;br /&gt;
''You are the leader of an advanced detachment that has been tasked with capturing a bridgehead while the main army prepares to attack. It should be a simple enough assignment.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Glowing Fish&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' Lord-Knightmare &lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 1 scenario ( rather a single scenario than a campaign )&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Hard&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default Loyalists&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=23656&amp;amp;p=350126&amp;amp;hilit=forward+they+cried#p350126&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.0&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Adamant14) Only a single scenario, but a great scenario.&lt;br /&gt;
(UnwiseOwl) You wouldn't want to stop thinking for a turn, and it's good for the first few turns, but this one leaves me wanting more.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Galuldur's First Journey ===&lt;br /&gt;
&lt;br /&gt;
''While the belligerence of orcs is nothing new, their intensifying attacks on a fledgling colony of elves in Pindir Forest begin to show signs of a deeper malice, forcing Galuldur, the young son of the colony's adventurous founder Galur, to venture out of his forest's friendly trees in search of help. His simple errand quickly turns into a frantic quest to unearth the roots of the mysterious evil threatening his people. As you lead him through unknown lands, Galuldur, forced to match wits with unexpected adversaries at nearly every turn in a desperate attempt to save his world, quickly learns that the world is neither a friendly nor a simple place.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' mattsc&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 8-9 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default, Elves&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/Galuldur/en_US/Galuldur.html Custom units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.1.1&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=31895&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Grnk the Mighty ===&lt;br /&gt;
&lt;br /&gt;
''All his life, puny little goblin Grnk the Frail had been dreaming about leaving the orcs and starting a better life.  When he finally arrives in the human town of Shmaltupp, he realizes that the world is not as black and white as he had imagined.  He also discovers that he is no ordinary goblin.  Follow Grnk the Frail on his path to becoming Grnk the Mighty.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' mattsc&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Part I complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 13 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Hard&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, RPG&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default, changing (no standard army building gameplay)&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/Grnk/en_US/Grnk.html Custom units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.5&lt;br /&gt;
&lt;br /&gt;
'''Required Wesnoth version:''' 1.9.5 or later&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=34970&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Invasion from the Unknown ===&lt;br /&gt;
&lt;br /&gt;
''Episode I - Seeking the Light: Long after the Fall, the last forest elves are forced to abandon their safe valley, and find themselves resorting to the dark means of necromancy in order to survive the perils and challenges of this new harsh world. May they finally free the Great Continent from its chaos, or perish in the foolish attempt of restoring peace and life to the lands.''&lt;br /&gt;
&lt;br /&gt;
''Episode II - Armageddon: As the shadow of Chaos covers the entire continent, an assorted group of foolish heroes prepares a counter-attack to the Empire, with one unique goal in their minds: defeat the evil Emperor, whoever it is. Lead these courageous living and non-living warriors to victory, and rediscover lost secrets of the history.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' shadowmaster &lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' Espreon&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 26 scenarios in two episodes&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Dungeon, Boss battle&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Unique. You play Elves and Undead throughout the campaign + in the 2nd part Northerners and Aragwaithi.&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.90.6&lt;br /&gt;
&lt;br /&gt;
'''[http://wiki.wesnoth.org/Guide_to_UMC_Campaigns/Players_Reviews#Invasion_from_the_Unknown Players Review]'''&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (taptap) Despite its acknowledged flaws (generic hero, plot holes, deus ex machina moments, gameplay issues in the 2nd part) this is undoubtedly the most iconic campaign in UMC. It single-handedly redefines the elvish history and sketches a cosmology for the ages after the fall. With the Chaos empire and its various allies it introduces an era worth of factions to single-player play. At the same time it features some of the most beautiful maps in Wesnoth and stunning art on par with mainline campaigns.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Invasion of Eliador ===&lt;br /&gt;
&lt;br /&gt;
''A peaceful island is about to be invaded by unknadd-ons foes travelling towards the eastern shore. It is up to a family of outlaws to warn the island's inhabitants before it's too late.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Sam M. (Genosuke)&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' trewe&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.4&lt;br /&gt;
&lt;br /&gt;
'''Style:''' RPG, Skirmish, Puzzle&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 10 scenarios + epilogue&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Easy&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Faction:''' Default (outlaws)&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=6556&lt;br /&gt;
&lt;br /&gt;
'''Wiki:''' [[Invasion_of_Eliador]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Langrisser Sample Campaign ===&lt;br /&gt;
&lt;br /&gt;
''The Imperial Knights of the Rayguard Empire have disrupted the peace of the village that was Hein's hometown, seeking only a girl named Liana. Fight to rescue Liana.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Morath&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 1 playable scenario&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default, Elves&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.1.0.5&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=36417&amp;amp;hilit=Langrisser&lt;br /&gt;
&lt;br /&gt;
'''Wikipedia:''' [http://en.wikipedia.org/wiki/Langrisser What is Langrisser]&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Adamant14) Single scenario, different from usual Wesnoth behaviour.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Legend of Far North ===&lt;br /&gt;
&lt;br /&gt;
''The tale of the legendary Black Eye Karun,depicting his rise to power, his successes and his brutal assassination.'&lt;br /&gt;
&lt;br /&gt;
'''Author:''' chak_abhi&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 16 playable scenarios / 1 dialogue only,1 cutscene&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Large Battle&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Orcs, Trolls, Saurians, Nagas&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/Legend_of_Far_North/en_US/Legend_of_Far_North.html Custom Units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.2&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=34769&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Legend of the Invincibles ===&lt;br /&gt;
&lt;br /&gt;
'''''Part I: Shrouded in Darkness''' (5 chapters, 90 scenarios) - A pair of heroes, after stopping an orcish thread, are outcast into caves, where they have no other choice than to become liches in order to survive. They preserved their original appearance and moral principles, and fight in various skirmishes against evil (although using evil methods sometimes), until the Fall, when they are buried alive under the ashes of the third sun.''&lt;br /&gt;
&lt;br /&gt;
'''''Part II: Into the Light''' (4 chapters, 96 scenarios at the moment) - Long after the Fall, the lich heroes awaken. Searching for more power, they manage to resurrect themselves as living beings, but this time more powerful and ridden of the evil within. But the evil from inside them did not cease to exist, and started a campaign to conquer the world. Stopping the campaign caused an even worse disaster...''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Dugi &lt;br /&gt;
&lt;br /&gt;
'''Status:''' WiP (but Part I might be considered complete)&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 185 (+7 talk-only) scenarios at the moment&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' mostly Skirmish and Dungeon (all other styles are present as well, but less frequently)&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Elves, Loyalists, Undead, Dwarves; but they advance past their usual maximum level&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 2.5.0&lt;br /&gt;
&lt;br /&gt;
'''[http://wiki.wesnoth.org/Guide_to_UMC_Campaigns/Players_Reviews#Legends_of_the_Invincibles Players Review]'''&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The most unique feature of this campaign is its RPG-like unit development system, enemies drop items units can use, leaders are stronger than most usual units and all units get AMLA (after maximum level advancement) after reaching their maximum level (that is also increased by a load of additional level 4 units).&lt;br /&gt;
&lt;br /&gt;
=== Panther Lord ===&lt;br /&gt;
&lt;br /&gt;
''The Imperialists ambitions of pushing into the Sea States have been repeatedly thwarted and now they turn their attentions elsewhere. You are an outcast Darklander now living as a mercenary in the Sea States and the rumors you hear indicate that they will be coming to your people. Though an outcast you do not wish to see them subjugated. The spirit whose friendship caused you to be an outcast has a plan that might allow you to save them.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Velensk &lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' Lavender&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 14 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Hard&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Era of Four Moons, Darklanders (+ a wide variety of mercenaries)&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.2&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=34318&lt;br /&gt;
&lt;br /&gt;
'''[http://wiki.wesnoth.org/Guide_to_UMC_Campaigns/Players_Reviews#Panther_Lord Players Review]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Random Campaign ===&lt;br /&gt;
&lt;br /&gt;
''Gain experience playing the Default Era faction of your choice in a campaign setting''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' SigurdFireDragon&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 7 playable scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default, Age of Heroes, &amp;amp; Era of Legends&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.0&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=32922&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Author) A 4 scenario version is under the multiplayer button, which lets you choose any era.&lt;br /&gt;
Intended for players to gain practice with a faction and learn sound strategies using faction specific adjustments against random factions from the chosen era.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Rebellion in the North ===&lt;br /&gt;
&lt;br /&gt;
''A great orcish uprising tends to destabilise the Northlands. As the future Lord Protector of the Northern Alliance you have to crush the rebellion and establish peace again.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Author:''' chak_abhi&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 24 playable scenarios / 3 dialogue only,2 cutscenes&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Large Battle&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Loyalists, Dwarves, Gryphons, Merfolk&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.1.12&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=33059&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Return of the Monster ===&lt;br /&gt;
&lt;br /&gt;
''It was time for Amailoss, born from the naga queen's last egg, to leave home. Time for him to grow into a leader in his own right, and eventually become the guardian and leader of another naga city. But along the way, he became friends with an unusual mud-crawler, they met a strange young monster, discovered that a spirit had escaped from an orc prison, and the mystery of that spirit became a grave challenge for Amailoss and the many races in the region....''&lt;br /&gt;
&lt;br /&gt;
''A naga campaign, involving elves, orcs, saurians, turtle-like races, and some monsters.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' SkyOne&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 16 playable, 2 dialog scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Dungeon&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default with additions. You play a custom naga faction and carapaces (a turtle-like race).&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/Return_of_the_Monster/en_US/Return_of_the_Monster.html Custom units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.7.1&lt;br /&gt;
&lt;br /&gt;
'''Required Wesnoth version:''' 1.10.x&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=36438&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Return to Noelren ===&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete.&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 26 scenarios + 7 cut scenes&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Pyrophorus&lt;br /&gt;
&lt;br /&gt;
'''Description:''' ''A story in the first Dark Age of Wesnoth. See how various heroes stick together to shun the threat of black magics, restore the secret kingdom of Noelren and install Garard I on the throne of Wesnoth. This campaign features complex scenarios, unusual objectives and units, emphasizing more on story and adventures than hardcore fighting.''&lt;br /&gt;
&lt;br /&gt;
'''Version: ''' 0.7.6&lt;br /&gt;
&lt;br /&gt;
'''Requirements:''' BfW 1.10 (not tested on 1.11)&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Easy, unbalanced&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, RPG, Large Battle, Simulation&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default + custom units&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/ReturnToNoelren/en_US/ReturnToNoelren.html Custom Units]'''&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=34685#p501026&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Adamant14) I never saw so much fantastic and new ideas in one single UMC, wow!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Return to Ruins ===&lt;br /&gt;
&lt;br /&gt;
''The humble farmers of Vertegris are summoned by Erik the General of Weldyn to put an end to an orcish raiding party. If they knew what would befall their former home... They never would have left. This is a relatively short campaign with 8 scenarios, It is still undergoing changes.''&lt;br /&gt;
&lt;br /&gt;
'''Author:'''  Jeff Stevens (Ulfsark)&lt;br /&gt;
&lt;br /&gt;
'''Composer:''' Paul Fredericks (paulfredericksmusic.com)&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 7 scenarios + 1 dialogue-only&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Easy,Normal,Hard&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default,(Loyalists, Outlaws)&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.5.1&lt;br /&gt;
&lt;br /&gt;
'''Required Wesnoth version:''' 1.10.x &lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=37790&amp;amp;sid=9059f18497cda1219f42a626544d0ffd&amp;amp;p=540646#p540646&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Adamant14) You play a short campaign with just a few units. Playable in a few hours, nevertheless it is fun to play.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Salt Wars ===&lt;br /&gt;
&lt;br /&gt;
''Introductory campaign for the Era of Four Moons.''&lt;br /&gt;
&lt;br /&gt;
''As an officer of one of the Sea States you must defend your organization from aggressive rivals.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Velensk &lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' Lavender&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 5 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Easy&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Era of Four Moons, Sea States&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.2.1&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=31498&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Saving Elensefar ===&lt;br /&gt;
&lt;br /&gt;
''Meneldur, elvish mariner of Elensefar, is driven to sea by the same orcs who attacked the city. He must gather an army willing to fight for him to regain Elensefar, his adopted homeland.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Turin&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' trewe&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 1 year (around 12 scenarios)&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, RPG, Simulation&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.5.2&lt;br /&gt;
&lt;br /&gt;
'''Faction:''' Default Era&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://wesnoth.org/forum/viewtopic.php?t=3072&amp;amp;start=0&lt;br /&gt;
&lt;br /&gt;
'''Wiki:''' [[SeafaringCampaign]]&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Labeled as Expert, recruit list changes in all scenarios.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shameless Crossover Excuse ===&lt;br /&gt;
&lt;br /&gt;
''Fugitive dark sorcerer Gwiti Ha'atel discovers he has the power to mess with Wesnoth's continuity. His quest for revenge on the NPCs who have used his portraits will lead him through perils untold and in-jokes unnumbered, but shall pale before the horror he finds at his quest's end.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Orcish Shyde, Mountain_King&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 9 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.1.0&lt;br /&gt;
&lt;br /&gt;
'''Faction:''' Undead&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=32016&amp;amp;start=15&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Swamplings ===&lt;br /&gt;
&lt;br /&gt;
''Banished by Yushnak the Ponderer, a tribe of lowly swamp goblins endure in the deadly mire of Pogo Bog. Four centuries before the founding of Wesnoth, this is the story of the goblins' struggle against the intrigues and betrayals of the greater races, and the rise of the first wolf rider.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' John Rawlins (boru)&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 14 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.1.7n&lt;br /&gt;
&lt;br /&gt;
'''Faction:''' Goblins&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=29784&lt;br /&gt;
&lt;br /&gt;
'''[http://wiki.wesnoth.org/Guide_to_UMC_Campaigns/Players_Reviews#Swamplings Players Review]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Talentless Mage===&lt;br /&gt;
&lt;br /&gt;
''Humorous and silly campaign about mage apprentice who has managed to learn only one simple spell in thirty years.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Wonderboy&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 11 playable scenarios + 3 dialogue scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Hard&lt;br /&gt;
&lt;br /&gt;
'''Style:'''  Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Noob Faction&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.1.0&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://wesnoth.org/forum/viewtopic.php?f=8&amp;amp;t=27608]&lt;br /&gt;
&lt;br /&gt;
'''[http://wiki.wesnoth.org/index.php?title=Guide_to_UMC_Campaigns/Players_Reviews&amp;amp;action=submit#Talentless_Mage Players Review]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Dark Alliance===&lt;br /&gt;
&lt;br /&gt;
''Prince Terhar lived two years with elves. Little did he expect what would happen when he returned back to Weldyn.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Wonderboy&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 11 or 10 playable scenarios depending on the branch you take (+ 5 dialogue scenarios)&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Hard&lt;br /&gt;
&lt;br /&gt;
'''Style:'''  Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default: Recruit list changes in almost every scenario&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.3&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://wesnoth.org/forum/viewtopic.php?f=8&amp;amp;t=26924&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Dark Hordes ===&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Incomplete/WIP&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 11/?&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Circon&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' Various&lt;br /&gt;
&lt;br /&gt;
'''Description:''' Lead fugitive dark sorcerer Gwiti Ha’atel to mastery of the undead hordes.&lt;br /&gt;
&lt;br /&gt;
'''Version: '''&lt;br /&gt;
&lt;br /&gt;
'''Requirements:'''&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:'''&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default undead&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/The_Dark_Hordes/en_US/The_Dark_Hordes_1.html Custom Units]'''&lt;br /&gt;
&lt;br /&gt;
'''Walkthrough:''' [[TheDarkHordes]]&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' [[http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=16576&amp;amp;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Devil's Flute ===&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete, unmaintained&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 10 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Author:''' lipk&lt;br /&gt;
&lt;br /&gt;
'''Description:''' Creona, the well-known assassin, gets a strange job from a strange person. So, in fact, it's no surprise that things take a strange turn...&lt;br /&gt;
&lt;br /&gt;
'''Version:'''  0.1.4c&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Unbalanced&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Minigames&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Outlaws&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=36044&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Earth's Gut ===&lt;br /&gt;
&lt;br /&gt;
''The year is 515YW. You are the young dwarven leader Hamel. Your tribe in the caves of Knalga is under pressure from its enemies, and resources are growing scarce. In order to forge the weapons required to resist your enemies, you must set forth and collect what ores and minerals remain.''&lt;br /&gt;
&lt;br /&gt;
'''Author:'''  Anonymissimus&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' Anonymissimus&lt;br /&gt;
&lt;br /&gt;
'''Status:''' WIP, story is unfinished (I didn't add any scenario since long, but that doesn't mean nothing is added to the campaign. My addons tend to be in good shape and bug-free which means also WIP as I'm updating it since 1.4 days.)&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 23 scenarios, 5 of which are cutscene only, some others have changing objectives&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:'''  Dungeon, Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default, dwarves, woses, mages, a few custom units&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/The_Earths_Gut/en_US/the_earths_gut.html Custom units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.2.14&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=26800&lt;br /&gt;
&lt;br /&gt;
'''Note:''' This campaign is a &amp;quot;Dwarvish dungeon crawler&amp;quot; (It currently contains about as many surface scenarios as underground though.) and is intended to be challenging for experienced players on hard whilst suitably easy on easy.&lt;br /&gt;
&lt;br /&gt;
=== The Epic of Vaniyera ===&lt;br /&gt;
&lt;br /&gt;
''The expansionist Lavinian Legion, led by the Imperator himself, has invaded the northern forests of the Sidhe, or Wild Elves. It is up to Leithan the Thunderblade and his advisor Vaniyera to push its armies back where they came from...''&lt;br /&gt;
&lt;br /&gt;
'''Author:'''  oreb, turin&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' UnwiseOwl&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 6 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Hard (Don't be fooled by &amp;quot;novice level&amp;quot; in the campaign description, this one is very hard.) &lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Maintainer) Working on this issue, the next release (due at the end of November, hah!) should bring easy difficulty back to the level of a reasonable introduction to the IE, while the hard difficulty will also become slightly easier. With any luck, this will be the last release before version 1.0 of the campaign].&lt;br /&gt;
&lt;br /&gt;
'''Style:'''  Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Imperial Era, Sidhe.&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.9.0&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=19490&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Fall of Wesnoth ===&lt;br /&gt;
&lt;br /&gt;
''As the beloved human empire of Wesnoth becomes lazy and arrogant in its peaceful state of happiness, Emperor Dantair demands the creation of another sun in a bid to destroy all evil. Or is it all for a different purpose? A man named Alitar sees it that way, and now he must survive the most evil inhabited lands if he is to stop chaos from rising, and Wesnoth from falling... This is the story of The Fall of Wesnoth.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Pewskeepski&lt;br /&gt;
&lt;br /&gt;
'''Status:''' 1st part complete, 2nd WIP.&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 10 playable scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default, Outlaws&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/The_Fall_of_Wesnoth/en_US/The_Fall_of_Wesnoth-1.html Custom units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.8&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Founding of Borstep ===&lt;br /&gt;
&lt;br /&gt;
''The chieftain of your tribe has become decadent and weak. Take over, and lead your people to a better home--whether it is already occupied or not. The Northlands in year 9W are a barbaric place, but anyone who stands in your way will learn the power of orcs!''	&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Beetlenaut&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 10 and 1 dialogue only&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Hard&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default, Northerners&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/The_Founding_of_Borstep/en_US/The_Founding_of_Borstep.html Custom units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.1.1b&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Kanzil) I find the protagonist hard to sympathise with. Also, most scenarios contain interesting twists. For example, in one, each time you killed a boar it gives you extra health.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (beetlenaut--author) In most Orcish campaigns the leader is heroic or just wants peace. Krag-Ubor wants plunder and battle like all enemy Orcs in other campaigns. I '''hope''' you don't sympathize too strongly, but I don't think you need to in order to enjoy the game play.&lt;br /&gt;
&lt;br /&gt;
=== The Library of Kratemaqht ===&lt;br /&gt;
&lt;br /&gt;
''An ancient story from the old continent.''&lt;br /&gt;
&lt;br /&gt;
'''Author:'''  Rich Marinaccio (cephalo)&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 17 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Unbalanced (some scenarios are Easy - some rather Hard) &lt;br /&gt;
&lt;br /&gt;
'''Style:'''  Skirmish, RPG&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Loyalists and custom units.&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/Library_Of_Kratemaqht/en_US/The_Library_Of_Kratemaqht.html Custom units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.0&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=37798&lt;br /&gt;
&lt;br /&gt;
'''[http://wiki.wesnoth.org/Guide_to_UMC_Campaigns/Players_Reviews#The_Library_of_Kratemaqht Players Review]'''&lt;br /&gt;
&lt;br /&gt;
'''Notes:''' (Adamant14) This campaign has a thought-out story, shows a great love for detail;&lt;br /&gt;
It includes a great custom Dragon, some brilliant custom images (fire, burning houses, burning forest) that makes the scenery / maps look very nice.&lt;br /&gt;
&lt;br /&gt;
=== The Roar of the Woses ===&lt;br /&gt;
&lt;br /&gt;
''When the construction of a dam threatens the existence of her home, Kylix is forced on a journey to stop it.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Alarantalara&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 10-11 scenarios + 1 dialogue-only&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default with Additions (primarily Saurians, Nagas, Woses)&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.2.7&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=29830&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (author) Potentially unbalanced on Hard difficulty due to experiments with non-standard ways to increase difficulty. This issue does not exist on the lower difficulty levels.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Three Elves ===&lt;br /&gt;
&lt;br /&gt;
''Three elves have just begun their adventure in the northern swampland. Will they become heroes or will they be responsible for another undead expansion?''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Stanislav Hoferek&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' trewe&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.9&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Easy&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 8 scenarios + 2 dialogue&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction:''' Default (Elves)&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' (does it have one?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Sojournings of Grog ===&lt;br /&gt;
&lt;br /&gt;
''Grog (as starred in Under the Burning Suns) goes home.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Peter Christopher, Thomas Hockings &lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' Elvish_Hunter&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 18 playable scenarios in 2 parts&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Dungeon, Large Battle&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/The_Sojournings_of_Grog/en_US/The_Sojournings_of_Grog.html Custom units]'''&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default. Most of the time you play trolls and some desert elves accompanying Grog.&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 3.0.1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Unstoppable Legion ===&lt;br /&gt;
&lt;br /&gt;
''Horseback campaign. The kingdom of Suveran, far away from Wesnoth, is under attack. Only Deuterus, a Great Druid, knows their weakness and only Viktor, a young noble, dares go on the quest to stop them.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Chris Neville-Smith (Chris NS)&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' Chris Neville-Smith (Chris NS)&lt;br /&gt;
&lt;br /&gt;
'''Status:''' WIP&lt;br /&gt;
&lt;br /&gt;
'''Length:''' Currently 15 playable sceanrios, including a fork of three paths near the beginning, and another fork of two paths later on.&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Mainly Skirmish&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/The_Unstoppable_Legion/en_US/The_Unstoppable_Legion.html Custom units]'''&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Play mounted units, including expanded Cavalryman line, and completely new Bowrider line. Joined later by Dwarves. Main enemies are the dark fighters and dark cultists.&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.8.7&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The White Troll ===&lt;br /&gt;
&lt;br /&gt;
''The story of a white troll whelp with strange magic powers, who is raised in an elvish village.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Wesnoth Italian Forum&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 8 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default: you play with elves and trolls. Also features custom units with special advancements and abilities.&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/White_Troll/en_US/white_troll.html Custom Units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.7.5&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=38828&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== To Lands Unknown ===&lt;br /&gt;
&lt;br /&gt;
''This is the story of Mehir, the Summoner, and his journey to lands unknown.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' inferno8&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 20 scenarios, 4 dialogue only&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Intermediate (Era of Magic)&lt;br /&gt;
&lt;br /&gt;
'''Style''': Skirmish, Dungeon&lt;br /&gt;
&lt;br /&gt;
'''Era:''' Era of Magic&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.6.0&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=31799&lt;br /&gt;
&lt;br /&gt;
'''[http://wiki.wesnoth.org/Guide_to_UMC_Campaigns/Players_Reviews#To_Lands_Unknown Players Review]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Unlikely Alliance ===&lt;br /&gt;
&lt;br /&gt;
''Play as the members of an alliance between the elves, drakes, and undead after the Fall of Wesnoth.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Creativity&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Broken ( Abandoned )&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 2 broken scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Unbalanced&lt;br /&gt;
&lt;br /&gt;
'''Style:''' -&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' -&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.1&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' -&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Adamant14) Did not work at all. Seems abandoned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Up from Slavery ===&lt;br /&gt;
&lt;br /&gt;
''The Orcei are captives in the imperial city of Lavinium, gladiators performing for the emperor Optus Maximus. All it will take, however, is one orc to lead his people to freedom. The Samnis called Sparxus may be that orc.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' turin&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' UnwiseOwl&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 7 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Arena (= No recruit, small group gladiator fights)&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Imperial Era, Orcei Gladiatores&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.6.0&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Maintainer) At some point, I am intending to completely re-work this campaign to be a multi-player campaign, with one side led by Sparxus and one by Gravirivus. If anyone would like to take this on or has ideas for how to accomplish this, let us know. Nevertheless, its playable as a single player campaign now with some nice ideas that could be developed further.]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Warmaster ===&lt;br /&gt;
&lt;br /&gt;
''One day the scout of your king brings a mysterious little stone, called Zrai-Stone, back from one of his trips. Soon that stone causes a lot of trouble...''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Conkinator&lt;br /&gt;
&lt;br /&gt;
'''Maintainer:''' trewe&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.3.5&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 16 battle + 2 bonus + 1 epilogue scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Hard&lt;br /&gt;
&lt;br /&gt;
'''Faction:''' Default (loyalists)&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Survival&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=15527&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Way of Dragon ===&lt;br /&gt;
&lt;br /&gt;
''The story of what might happen if a person against his will transform into a dragon...''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' DrakeDragon&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete &lt;br /&gt;
&lt;br /&gt;
'''Length:''' 7 playable scenarios + 1 dialogue-only&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish/RPG&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default Loyalists&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.2.0&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' [http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=37876 Wesnoth Forum]    [http://uporoom.ru/index.php/topic,179.0.html Russian Forum]&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Adamant14) Promising short campaign, you play with just a few units.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Battle for Wesnoth 1.11.x - development ==&lt;br /&gt;
&lt;br /&gt;
''Campaigns available in the 1.11.x development version.''&lt;br /&gt;
&lt;br /&gt;
''Please note: Battle for Wesnoth 1.11.0 features a bug that messes up the selection of difficulty levels.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Antar, Son of Rheor ===&lt;br /&gt;
&lt;br /&gt;
''This is the story about a young Lord and his first mission; sent by his father the young Lord Antar has to relieve his neighbours; he has to convince the Elves and Dwarves to ally him; he has to fight against hordes of Orcs and Endless Undead; and finally he has to defeat Mal Kazur, the mastermind who is behind all the evil.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Adamant14&lt;br /&gt;
&lt;br /&gt;
'''Status:''' WIP&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 9 playable scenarios / 1 cutscene &lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default, Loyalists and Elves (feat. fencer as main hero + various allies)&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.9.9&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=36075&lt;br /&gt;
&lt;br /&gt;
'''[http://wiki.wesnoth.org/Guide_to_UMC_Campaigns/Players_Reviews#Antar.2C_Son_of_Rheor Players Review]'''&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Adamant14) The campaign did not work with BfW version 1.11.0, or BfW version 1.11.1, so please use BfW version 1.11.2 or later!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== A Song of Fire ===&lt;br /&gt;
&lt;br /&gt;
''''''Part I: The Last War''' - In a long-forgotten era, at the heart of the Great Continent, an ancestral evil is awakened, threatening to destroy the whole world. Follow young Myra in the war that will alter the future of Irdya and its peoples forever.''&lt;br /&gt;
&lt;br /&gt;
''''''Part II: Towards the Rising Sun''' - After the vicious Last War, Myra has become the new leader of Aragwaithi and Windsong alike. Albeit young and shaken by many losses, she must steel herself to lead her people through the vast and hostile Hannuk Steppes. However, her journey will take them all farther than in their wildest dreams. Furthermore, Myra must deal with the evil influence of the mysterious red gem she found after the last battle.''&lt;br /&gt;
&lt;br /&gt;
''''''Part III: Raging Skies''' - The refugees have finally found a new home: families are built, allies are made and, for the first time in years, Myra and her friends know peace. However, when everything seems normal, ambition and thirst for power cause the break out of a continental war. And, amidst this new storm, an old foe rises agan, more powerful than ever. Witness the end of the song of Irdya's first great heroine.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' revansurik&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Complete&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 36 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Large Battle&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default+War of Legends&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 0.3.4&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=38210&lt;br /&gt;
&lt;br /&gt;
=== Bad Moon Rising ===&lt;br /&gt;
&lt;br /&gt;
''An expedition to gather treasure from the cold north sets off compounding disaster.''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Doofus-01&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 20 scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Hard&lt;br /&gt;
&lt;br /&gt;
'''Style:'''  Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Archaic Era&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.5.8&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=31348&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Birth of a Lich ===&lt;br /&gt;
&lt;br /&gt;
''This is the life story of the dreaded lich Malifor, his struggle as a mage outcast, the orcish conquest of the northlands and his transformation to quench the thirst for revenge''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' chak_abhi&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 12 playable scenarios / 2 dialogue only&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Large Battle, Dungeon&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Human outlaws, dwarves, undead&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/Birth_of_a_Lich/en_US/Birth_of_a_Lich.html Custom Units]&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.3&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=37057&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Coming of the Storm ===&lt;br /&gt;
&lt;br /&gt;
''A new recruit joins the imperial army, eager to change the world and see combat. Little does he realise just how much action he will get and where his journey will take him. ''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' TrashMan&lt;br /&gt;
&lt;br /&gt;
'''Status:''' WIP&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 26 playable scenarios / 4 dialogue only&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Large Battle, Dungeon&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.2.1&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=23361&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Legend of Far North ===&lt;br /&gt;
&lt;br /&gt;
''The tale of the legendary Black Eye Karun,depicting his rise to power, his successes and his brutal assassination.'&lt;br /&gt;
&lt;br /&gt;
'''Author:''' chak_abhi&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 16 playable scenarios / 1 dialogue only,1 cutscene&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Large Battle&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Orcs, Trolls, Saurians, Nagas&lt;br /&gt;
&lt;br /&gt;
'''[http://units.wesnoth.org/1.10/Legend_of_Far_North/en_US/Legend_of_Far_North.html Custom Units]'''&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.2&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=34769&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Legend of the Invincibles ===&lt;br /&gt;
&lt;br /&gt;
'''''Part I: Shrouded in Darkness''' (5 chapters, 90 scenarios) - A pair of heroes, after stopping an orcish thread, are outcast into caves, where they have no other choice than to become liches in order to survive. They preserved their original appearance and moral principles, and fight in various skirmishes against evil (although using evil methods sometimes), until the Fall, when they are buried alive under the ashes of the third sun.''&lt;br /&gt;
&lt;br /&gt;
'''''Part II: Into the Light''' (4 chapters, 96 scenarios at the moment) - Long after the Fall, the lich heroes awaken. Searching for more power, they manage to resurrect themselves as living beings, but this time more powerful and ridden of the evil within. But the evil from inside them did not cease to exist, and started a campaign to conquer the world. Stopping the campaign caused an even worse disaster...''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Dugi &lt;br /&gt;
&lt;br /&gt;
'''Status:''' WiP (but Part I might be considered complete)&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 185 (+7 talk-only) scenarios at the moment&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' mostly Skirmish and Dungeon (all other styles are present as well, but less frequently)&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Elves, Loyalists, Undead, Dwarves; but they advance past their usual maximum level&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 2.5.0&lt;br /&gt;
&lt;br /&gt;
'''[http://wiki.wesnoth.org/Guide_to_UMC_Campaigns/Players_Reviews#Legends_of_the_Invincibles Players Review]'''&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The most unique feature of this campaign is its RPG-like unit development system, enemies drop items units can use, leaders are stronger than most usual units and all units get AMLA (after maximum level advancement) after reaching their maximum level (that is also increased by a load of additional level 4 units).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Rebellion in the North ===&lt;br /&gt;
&lt;br /&gt;
''A great orcish uprising tends to destabilise the Northlands. As the future Lord Protector of the Northern Alliance you have to crush the rebellion and establish peace again.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Author:''' chak_abhi&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 24 playable scenarios / 3 dialogue only,2 cutscenes&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal&lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish, Large Battle&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Loyalists, Dwarves, Gryphons, Merfolk&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.1.12&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=33059&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Ruthless ===&lt;br /&gt;
&lt;br /&gt;
''A bard (an aging criminal) is walking in wasteland. Nothing but two hands in his pockets, and nothing but stones around. Suddenly he sees a knight on errand--a dangerous opponent, especially in broad daylight. The two strangers are soon sitting by the campfire, and the bard is telling a story.&lt;br /&gt;
(Beginner level, 10+ fights).''&lt;br /&gt;
&lt;br /&gt;
'''Author:''' homunculus&lt;br /&gt;
&lt;br /&gt;
'''Status:''' Finished&lt;br /&gt;
&lt;br /&gt;
'''Length:''' 12 playable scenarios + 5 cutscene scenarios&lt;br /&gt;
&lt;br /&gt;
'''Difficulty:''' Normal &lt;br /&gt;
&lt;br /&gt;
'''Style:''' Skirmish&lt;br /&gt;
&lt;br /&gt;
'''Faction/Era:''' Default (Orcs)&lt;br /&gt;
&lt;br /&gt;
'''Version:''' 1.0.4&lt;br /&gt;
&lt;br /&gt;
'''Forum:''' http://forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=37874&lt;br /&gt;
&lt;br /&gt;
'''Note:''' (Adamant14) Recommendable campaign, with smart unusual ideas and a good detailed story.&lt;br /&gt;
You fight with few units on small but perfect maps. About the difficulty: The author describes his campaign as 'beginner level', but for me the difficulty is rather NORMAL than EASY.&lt;br /&gt;
&lt;br /&gt;
== [[Guide_to_UMC_Campaigns/Players_Reviews|Player Reviews]] ==&lt;br /&gt;
&lt;br /&gt;
[[Category:Campaigns|*]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=StandardSideFilter&amp;diff=50668</id>
		<title>StandardSideFilter</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=StandardSideFilter&amp;diff=50668"/>
		<updated>2013-04-30T14:49:02Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: document controller= in SSFs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
&lt;br /&gt;
From [[FilterWML]], this is the standard way of filtering on sides. Often a SSF needs to be included in a [filter_side] tag. There are however also many tags that take the SSF tags and keys directly as arguments.&lt;br /&gt;
&lt;br /&gt;
The following attributes and sub-tags are permitted:&lt;br /&gt;
&lt;br /&gt;
* '''side''': filter matches only if side number is contained in a comma-separated list. Note that as opposed to the usual inline side= key in wml action tags, which defaults to 1, the side= key in a SSF defaults to all sides (similarly, the id= key in SUFs defaults to all ids)&lt;br /&gt;
**{{DevFeature1.11}}: This key accepts ranges (i.e. &amp;quot;1,3-4,6&amp;quot;)&lt;br /&gt;
* '''[has_unit]''':  &lt;br /&gt;
**'''[[StandardUnitFilter]]''': filter matches only if side controls a unit matched by it&lt;br /&gt;
**'''search_recall_list''': (boolean yes|no, default no) whether to include recall list units when trying to match this [[StandardUnitFilter]] against a unit&lt;br /&gt;
&lt;br /&gt;
* '''team_name''': The currently filtered side matches only if this passed team_name is contained in its (the filtered side's) team_name= string. Note that a side can be allied/on the same team like 2 (more...) other sides which can be enemies at the same time. (achieved by defining a side via [side]team_name=1,2 etc.)&lt;br /&gt;
&lt;br /&gt;
* '''[enemy_of]''': The currently filtered side must be an enemy of all of the sides matching this StandardSideFilter for it to match. If this inner StandardSideFilter matches no sides, the outer filter also doesn't. Note that a side is not an enemy of itself.&lt;br /&gt;
**StandardSideFilter tags and keys&lt;br /&gt;
&lt;br /&gt;
* '''[allied_with]''': The currently filtered side must be allied with all of the sides matching this StandardSideFilter for it to match. If this inner StandardSideFilter matches no sides, the outer filter also doesn't. Note that a side is allied with itself.&lt;br /&gt;
**StandardSideFilter tags and keys&lt;br /&gt;
&lt;br /&gt;
* '''controller''': The currently filtered side matches only if it has this controller string. Sensible values are ai, human, human_ai (:droided human side) and null. This key is disabled for networked multiplayer, since there the controller value of a side differs between the clients. Thus using this key would inevitably lead to OOS errors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also, [and], [or], and [not] subfilters are supported.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Interaction of SSF and side= in tags like [remove_shroud] :&lt;br /&gt;
In case that inline side= and [filter_side] are given, inline side= is ignored and [filter_side]side= gets priority:&lt;br /&gt;
&lt;br /&gt;
selects side 4 and 5:&lt;br /&gt;
 [remove_shroud]&lt;br /&gt;
   side=2&lt;br /&gt;
   [filter_side]&lt;br /&gt;
     side=4,5  &lt;br /&gt;
   [/filter_side]&lt;br /&gt;
 [remove_shroud]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=EventWML&amp;diff=48477</id>
		<title>EventWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=EventWML&amp;diff=48477"/>
		<updated>2013-02-04T19:03:46Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* The 'name' Key (Mandatory) */ Add a comment about [event]name= vs [event]id=&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== The [event] Tag ==&lt;br /&gt;
&lt;br /&gt;
This tag is a subtag of the [scenario], [unit_type] and [era] tags which is used to describe a set of [[ActionWML|actions]] which trigger at a certain point in a scenario. When used in a [scenario] tag (also includes [multiplayer], [tutorial] and [test]), the event only occurs in that scenario. When used in a [unit_type] tag, the event will occur in all scenarios in which a unit of that type appears in (only after such a unit appears during the scenario, however). When used in an [era], the event will occur in any scenario which is played using that era.&lt;br /&gt;
&lt;br /&gt;
This tag has keys and child tags that control when and if the event actions will be triggered. Most important of these is the '''name''' key. Without it, no error will be raised but the event will never fire. Therefore, from a practical standpoint, it can be considered mandatory. All of the others can be used or not and the event actions will fire either way.&lt;br /&gt;
&lt;br /&gt;
'''Lexicon side note:''' ''The word &amp;quot;event&amp;quot; in the [event] tag itself may be considered an abbreviation of the word &amp;quot;event handler&amp;quot; because it is technically not a game &amp;quot;event&amp;quot; but an event '''handler''' for the game events fired with the given 'name'. However, this distinction is usually unimportant in most discussions and the event handlers are therefore simply referred to as &amp;quot;events&amp;quot; in this documentation.''&lt;br /&gt;
&lt;br /&gt;
=== The 'name' Key (Mandatory) ===&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
 name=&amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This key defines which game event or trigger your [event] tag will be handling. This 'name' key should not be confused with a descriptive comment; it is rather a precise value which must match the predefined game event's name to be valid.&lt;br /&gt;
&lt;br /&gt;
'''Lexicon side note:''' ''It is not uncommon to refer to these values as the 'trigger' for an event and, furthermore, to call an event by its 'trigger' name. For example, in an event containing '''name=moveto''', a person might refer to the event as a ''''moveto''' event' and/or refer to the ''''moveto''' trigger' in the event or even talk about the 'event trigger' when referring to the '''moveto''' value of the 'name' key in that event. Some or all of this usage can, in fact, be found throughout this page.''&lt;br /&gt;
&lt;br /&gt;
The '''name''' key can accept a list of comma separated values describing when the event will be triggered.*  These values may be either predefined event types or  custom event names not matching any predefined type.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
 name=attacker misses,defender misses&lt;br /&gt;
&lt;br /&gt;
''* Note that unless you use [[#first_time_only|first_time_only=no]], the event will fire only once, '''not''' once for each listed type.''&lt;br /&gt;
&lt;br /&gt;
''* A better name for the [event]name= attribute could be [event]class= or [event]type=, these describe much better their functionality. The attribute determines to which group of events the event belongs and all of them are fired by the same action. This is opposed to [event][[EventWML#Optional Keys and Tags|id]]=, which refers only to the event in which it appears.''&lt;br /&gt;
&lt;br /&gt;
==== Predefined 'name' Key Values ====&lt;br /&gt;
&lt;br /&gt;
All predefined event types are listed here along with a description of when this value will cause the event to be triggered. Any value ''not'' listed here is a custom event name which can be triggered only by a '''[fire_event]''' tag somewhere else. Spaces in event names can be interchanged with underscores (for example, '''name=new turn''' and '''name=new_turn''' are equivalent).&lt;br /&gt;
&lt;br /&gt;
; preload&lt;br /&gt;
: Triggers before a scenario 'prestarts' and when loading a savegame -- before anything is shown on the screen at all. Can be used to set up the [[LuaWML|Lua]] environment: loading libraries, defining helper functions, etc.&lt;br /&gt;
: '''Note:''' Unlike prestart and start, the preload event '''must be able to fire more than once!''' This is because it is triggered each time a savegame is loaded in addition to the initial time when it loads before the scenario 'prestart'. This means that it is effectively ''mandatory'' to have the [[#first_time_only|first_time_only=no]] key value in a preload event. &lt;br /&gt;
&lt;br /&gt;
; prestart&lt;br /&gt;
: Triggers before a scenario 'starts' -- before anything is shown on the screen at all. Can be used to set up things like village ownership. For things displayed on-screen such as character dialog, use '''start''' instead.&lt;br /&gt;
: '''Note:''' ''This value makes the [[#first_time_only|first_time_only]] key irrelevant since, by definition, it can only fire once.''&lt;br /&gt;
&lt;br /&gt;
; start&lt;br /&gt;
: Triggers after the map is shown but before the scenario begins -- before players can 'do' anything.&lt;br /&gt;
: '''Note:''' ''This value makes the [[#first_time_only|first_time_only]] key irrelevant since, by definition, it can only fire once.''&lt;br /&gt;
&lt;br /&gt;
; new turn&lt;br /&gt;
: Triggers at the start of every turn (not side turn). See also [[#first_time_only|first_time_only=no]]. Before any events of this type trigger, the value of the WML variable '''turn_number''' is set to the number of the turn that is beginning.&lt;br /&gt;
&lt;br /&gt;
; turn end&lt;br /&gt;
: Triggers at the end of every turn (not side turn). See also [[#first_time_only|first_time_only=no]]. The WML variable '''side_number''' will contain the side that ended their turn.&lt;br /&gt;
&lt;br /&gt;
; turn ''X'' end&lt;br /&gt;
: Triggers at the end of turn ''X''.&lt;br /&gt;
&lt;br /&gt;
; side turn&lt;br /&gt;
: Triggers when a side is about to start its turn. Before events of this type trigger, the value of the WML variable '''side_number''' is set to the number of the side of the player about to take their turn. This is before any healing takes place for that side, before calculating income, and before restoring unit movement and status.&lt;br /&gt;
&lt;br /&gt;
; ai turn&lt;br /&gt;
: Triggered just before the AI is invoked for a side. This is called after ''side turn'', and thus the WML variable '''side_number''' still holds the number of this side. Note that this event might be called several times per turn in case that fallbacks to human or droiding is involved. I.e. it happens at the middle of turn of human side 1 if the human player droids his side. It happens after the selection of ai to play the turn but before AI is told that new turn has come.&lt;br /&gt;
: '''Note:'''  ''This event currently breaks replays since it is not explicitly saved in a replay and there is no AI involved in replays...''&lt;br /&gt;
&lt;br /&gt;
; turn refresh&lt;br /&gt;
: Like '''side turn''', triggers just before a side is taking control but '''after''' healing, calculating income, and restoring unit movement and status.&lt;br /&gt;
: Note that the turn refresh event does occur on turn 1, even though healing, income and unit refreshing do not.&lt;br /&gt;
&lt;br /&gt;
; turn ''X''&lt;br /&gt;
: Triggers at the start of turn ''X''. It's the first side initialization event. &lt;br /&gt;
:Side initialization events go in the order of: &lt;br /&gt;
: 1) '''turn ''X''''' &lt;br /&gt;
:2) '''new turn''' &lt;br /&gt;
:3) '''side turn''' &lt;br /&gt;
:4) '''side ''X'' turn''' &lt;br /&gt;
:5) '''side turn ''X''''' &lt;br /&gt;
:6) '''side ''X'' turn ''Y''''' &lt;br /&gt;
:7) '''turn refresh''' &lt;br /&gt;
:8) '''side ''X'' turn refresh''' &lt;br /&gt;
:9) '''turn ''X'' refresh''' &lt;br /&gt;
:10) '''side ''X'' turn ''Y'' refresh'''&lt;br /&gt;
&lt;br /&gt;
; side ''X'' turn ''Y''&lt;br /&gt;
: This event triggers at the start of turn ''Y'' of side X &lt;br /&gt;
&lt;br /&gt;
; side ''X'' turn&lt;br /&gt;
: This event triggers at the start of any turn of side X&lt;br /&gt;
: '''Note:''' ''Of course, [[#first_time_only|first_time_only=no]] is needed for this event to be triggered more than once.''&lt;br /&gt;
&lt;br /&gt;
; side turn ''X''&lt;br /&gt;
: This event triggers at the start of any side on turn X&lt;br /&gt;
: '''Note:''' ''Of course, [[#first_time_only|first_time_only=no]] is needed for this event to be triggered more than once.''&lt;br /&gt;
&lt;br /&gt;
; side X turn Y refresh&lt;br /&gt;
: This event triggers at the turn refresh for side X on turn Y&lt;br /&gt;
&lt;br /&gt;
; side ''X'' turn refresh&lt;br /&gt;
: This event triggers at the turn refresh for side X&lt;br /&gt;
: '''Note:''' ''Of course, [[#first_time_only|first_time_only=no]] is needed for this event to be triggered more than once.''&lt;br /&gt;
&lt;br /&gt;
; turn ''X'' refresh&lt;br /&gt;
: This event triggers for any side at the refresh of turn X.&lt;br /&gt;
: '''Note:''' ''Of course, [[#first_time_only|first_time_only=no]] is needed for this event to be triggered more than once.''&lt;br /&gt;
&lt;br /&gt;
; side turn end&lt;br /&gt;
: Triggers after a side ends its turn. Like side turn, there are also some variations for specific combinations of side number and turn number. Here is the order in which the turn end events trigger:&lt;br /&gt;
:1) '''side turn end''' &lt;br /&gt;
:2) '''side ''X'' turn end''' &lt;br /&gt;
:3) '''side turn ''X'' end''' &lt;br /&gt;
:4) '''side ''X'' turn ''Y'' end''' &lt;br /&gt;
:5) '''turn end''' &lt;br /&gt;
:6) '''turn ''X'' end''' &lt;br /&gt;
&lt;br /&gt;
; time over&lt;br /&gt;
: Triggers on turn ''turns''. (''turns'' is specified in [scenario])&lt;br /&gt;
&lt;br /&gt;
; enemies defeated&lt;br /&gt;
: Triggers when all units with '''canrecruit=yes''' (that is, all leaders) not allied with side 1 are killed.&lt;br /&gt;
&lt;br /&gt;
; victory&lt;br /&gt;
: In this scenario, any tag of the form '''[endlevel] result=victory [/endlevel]''' will be automatically preceded by all actions in this tag. It helps debugging if the victory event allows you to safely advance to any of the possible next maps after using the &amp;quot;:n&amp;quot; command. Scenarios where key units are picked up before the victory, or where some action chosen earlier determines which map to advance to, make it hard to quickly test scenarios in a campaign. (See also: [endlevel], [[DirectActionsWML]])&lt;br /&gt;
&lt;br /&gt;
; defeat&lt;br /&gt;
: In this scenario, any tag of the form '''[endlevel] result=defeat [/endlevel]''' will be automatically preceded by all actions in this tag. (See also [endlevel], [[DirectActionsWML]])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Filters (except [filter_condition] which is for all sorts of events) can be applied to the following event triggers (see [[FilterWML]]; see also below). The actions specified in the event tag will be executed only if the filter returns true. &lt;br /&gt;
These event triggers are all actions by units ('''moveto''', '''attack''') or things that happen to units ('''recruit''', '''advance'''). When one of these events is triggered, the position of the active unit (referred to as the '''primary unit''') is stored in the variables '''x1''' and '''y1''' and the position of any unit that primary unit does something to is stored in the variables '''x2''' and '''y2''' (this unit is referred to as the '''secondary unit''' below). '' These units are also automatically stored in the variables 'unit' and 'second_unit' as if they had been stored using the '''[store_unit]''' tag. see [[SingleUnitWML]]. weapon and second_weapon variables are available inside attack, attacker_hits, defender_hits, die and last_breath events. See [[VariablesWML#Automatically_Stored_Variables|automatically stored variables]] for more information.&lt;br /&gt;
&lt;br /&gt;
; moveto&lt;br /&gt;
: Triggers after the primary unit moves. Typically this is used when the primary unit gets to a particular location and a filter for the location of the primary unit is included; remember that this is the location that the primary unit lands on, not the location it started on or any location it travels on. If the unit moves to a village, the capture event will be fired before this event. &amp;lt;br /&amp;gt;''An '''[allow_undo]''' tag anywhere within a moveto event will cancel any lack of undo functionality the event would have caused. Note that undo functionality will only move the unit back to its former location; it will not undo other changes to the game caused by the event. Thus it is up to the scenario designer to use this tag correctly.'' $x2 and $y2 refer to the hex the unit came from.&lt;br /&gt;
&lt;br /&gt;
; sighted&lt;br /&gt;
: '''important: &amp;quot;sighted&amp;quot; events are very buggy in general, especially if &amp;quot;delay shroud updates&amp;quot; is set to &amp;quot;yes&amp;quot;. It is recommended to avoid using them at all costs, especially if you want to change the gamestate in that event (such as setting variables). Trying to document all the exceptions under which a sighted event doesn't fire or does not work as expected is futile - please keep that in mind.'''&lt;br /&gt;
: '''Alternatives:''' It is sometimes possible to replace a sighted event by a moveto event with a [[StandardLocationFilter|location filter]] matching a nearby location. A [[FilterWML#Filtering_Vision|filter_vision]] filter may be useful in some cases. There exists a macro in mainline which provides a workaround: ON_SIGHTING, see http://www.wesnoth.org/macro-reference.xhtml&lt;br /&gt;
: A '''sighted''' event is triggered when a fog or shroud is lifted from the primary ''unit''. This can happen when a ''second_unit'' moves to a nearby location and discovers the primary ''unit''. It does not, however, fire if the primary unit emerges &amp;quot;out of the mist&amp;quot;. (This is part of the sighted event's bugs.)&lt;br /&gt;
: '''Note:''' The sighted event is ''only'' triggered when a unit moves from one location to another. When the player moves to attack an enemy unit and, in the process, removes the fog/shroud over an enemy unit, the sighted event does ''not'' fire. This makes the sighted event unreliable: It may or may not fire, depending on the user actions. (This may be part of the sighted event's bugs.)&lt;br /&gt;
&lt;br /&gt;
: {{DevFeature1.11}} Sighted events have been fixed. A '''sighted''' event is triggered by a unit becoming visible to a side (other than the unit's own side). This is mostly useful when the side seeing the unit uses [[fog of war]] or [[shroud]], but they still fire even when fog/shroud is not in use, and they do take into account the {{tag2|AbilitiesWML#The_.5Babilities.5D_tag|hides}} ability. The ''primary unit'' is the unit that became visible, and the ''secondary unit'' belongs to the side that now sees the primary unit. In some cases, sighted events can be delayed from when they &amp;quot;should&amp;quot; occur. If that happens, the secondary unit will be filtered as if it was at the location where the event &amp;quot;should&amp;quot; have occurred, and ''x2,y2'' will store that location (not the current position of the secondary unit). To understand when sighted events fire, it is helpful to distinguish the times the acting unit sights other units from the times when the acting unit is sighted.&lt;br /&gt;
: An acting unit can sight other units when it is recruited, recalled, leveled, or moved, and when fog or shroud is cleared from occupied hexes as a result. In these cases, the acting unit is always the ''secondary unit''. For the first three actions, there are two events associated with the action; clearing occurs between these events, but any sighted events are fired after the second event. (For example, when a unit is recruited, the ''prerecruit'' event fires, then fog is cleared, then the ''recruit'' event fires, then ''sighted'' events fire.) For movement, the sighted events fire between ''enter_hex'' and ''exit_hex'' events, but sometimes sighted events are postponed until the moving unit reaches a good place to stop (e.g. not in an occupied hex). As a major exception to the above, players have the option to delay shroud (and fog) updates. If the player delays shroud updates, sighted events are also delayed until the shroud is updated.&lt;br /&gt;
: An acting unit can be sighted by other sides when it is recruited, recalled, leveled (in rare cases), or moved. In these cases, the acting unit is always the ''primary unit''. These events fire after sightings by the acting unit (unless the player delayed shroud updates). For the first two, the sighted event fires for all sides that can see the unit, other than the unit's own side (even if those sides use neither fog nor shroud). For leveling units, sides that could see the unit before it leveled are excluded. (This is why these events are rare &amp;amp;ndash; the leveling unit must have lost a [hides] ability as a result of leveling in order to be seen after, but not before, leveling.) For movement, a sighted event is fired for each side that could see the unit after movement, but not before. In particular, only the starting and ending hexes are considered; a unit that moves through seen hexes but ends movement in a fogged hex does not trigger a sighted event for itself. In all cases where the acting unit is sighted, a (single) ''secondary unit'' is chosen from the sighting team. This choice should be considered arbitrary, but units within their sight range of the acting unit are chosen in preference to units further away.&lt;br /&gt;
: Sighted events have some special caveats for WML authors. First and foremost, {{tag|DirectActionsWML|allow_undo}} should generally be avoided in sighted events. It can be used if current unit positions have no bearing on the event, but otherwise it could cause a replay to go out of sync if a player delays shroud updates and undoes a move. This should not be an onerous restriction, though, as clearing fog will block the ability to undo, regardless of what happens within an event. Secondly, it is currently possible for WML to kill a unit involved in a sighted event before that event fires. If that happens, filters on the killed unit will not match anything and the event may seem to have not fired.&lt;br /&gt;
&lt;br /&gt;
; enter_hex&lt;br /&gt;
: {{DevFeature1.11}} Triggers for each hex entered during movement, with $x1,$y1 identifying the hex entered and $x2,$y2 identifying the previous hex (just exited). If this event is handled without using {{tag|DirectActionsWML|allow_undo}}, then movement is interrupted, stopping the unit where it is.&lt;br /&gt;
: '''Note:''' This event behaves a bit unusually if the hex is occupied (and the moving unit is simply passing through). When this happens, $x1,$y1 is still the hex where the event was triggered, but the moving unit (stored in $unit) will be located somewhere earlier in the route (the most recent unoccupied hex). That is, $x1,$y1 will not equal $unit.x,$unit.y (a condition that can be used to detect when the entered hex is occupied). The moving unit will have already spent its movement points to enter the event's hex even though it is has not actually moved from the most recent unoccupied hex.&lt;br /&gt;
&lt;br /&gt;
; exit_hex&lt;br /&gt;
: {{DevFeature1.11}} Triggers for each hex exited during movement, with $x1,$y1 identifying the hex exited and $x2,$y2 identifying the next hex (to be entered). If this event is handled without using {{tag|DirectActionsWML|allow_undo}}, then movement is interrupted, stopping the unit where it is.&lt;br /&gt;
: '''Note:''' This event behaves a bit unusually if the hex is occupied (and the moving unit is simply passing through). When this happens, $x1,$y1 is still the hex where the event was triggered, but the moving unit (stored in $unit) will be located somewhere earlier in the route (the most recent unoccupied hex). That is, $x1,$y1 will not equal $unit.x,$unit.y (a condition that can be used to detect when the exited hex is occupied). The moving unit will have already spent its movement points to enter the event's hex even though it is has not actually moved from the most recent unoccupied hex.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; attack&lt;br /&gt;
: Triggers when the primary unit attacks the secondary unit.&lt;br /&gt;
&lt;br /&gt;
; attack end&lt;br /&gt;
: Similar to '''attack''', but is triggered ''after'' the fight instead of before. Note that if either unit is killed during the fight, this event triggers before any '''die''' events.&lt;br /&gt;
&lt;br /&gt;
; attacker hits&lt;br /&gt;
: Triggers when the the primary unit (the attacker) hits the secondary unit (the defender). The value of the WML variable '''damage_inflicted''' is set to the number of hitpoints inflicted by the attacker.&lt;br /&gt;
&lt;br /&gt;
; attacker misses&lt;br /&gt;
: Same as ''attacker hits'', but is triggered when the attacker misses.&lt;br /&gt;
&lt;br /&gt;
; defender hits&lt;br /&gt;
: Triggers when the primary unit (the attacker) is hit in retaliation by the secondary unit (the defender). The value of the WML variable '''damage_inflicted''' is set to the number of hitpoints inflicted by the defender.&lt;br /&gt;
&lt;br /&gt;
; defender misses&lt;br /&gt;
: Same as ''defender hits'', but is triggered when the defender misses.&lt;br /&gt;
&lt;br /&gt;
; petrified&lt;br /&gt;
: Triggers when the primary unit is hit by an attack with the 'petrifies' ability (See ''stones'', [[AbilitiesWML]]) by the secondary unit (the unit with the 'petrifies' ability).&lt;br /&gt;
&lt;br /&gt;
; last breath&lt;br /&gt;
: Triggers when the primary unit is killed by the secondary unit, but before the death animation is triggered. Use this instead of name=die when you want the primary unit to make a final [message]. &lt;br /&gt;
&lt;br /&gt;
; die&lt;br /&gt;
: Triggers when the primary unit is killed by the secondary unit. ''Note: The primary unit is not removed from the game until the end of this event. The primary unit can still be manipulated, will block other units from taking its hex, and will still be found by standard unit filters (except [have_unit]). To prevent this behavior, you can use [kill] to remove the unit immediately. However, this will stop any (still unfired) other events that also match the unit from firing afterwards, so use with caution.'' If you want to the primary unit to make a final [message], use name=last_breath, see above.&lt;br /&gt;
&lt;br /&gt;
; capture&lt;br /&gt;
: Triggers when the primary unit captures a village. The village may have been previously neutral, or previously owned by another side; merely moving into your own villages does not constitute a capture. This event will be fired before the moveto event. Villages becoming neutral (via [capture_village]) do not fire capture events. The variable $owner_side contains the previous owner side of the village. 0 means neutral.&lt;br /&gt;
&lt;br /&gt;
; recruit&lt;br /&gt;
: Triggers when the primary unit is recruited (by the secondary unit). (That is, when a unit is recruited it will trigger this event and this event's filter will filter that unit.).&lt;br /&gt;
&lt;br /&gt;
; prerecruit&lt;br /&gt;
: Triggers when the primary unit is recruited (by the secondary unit) but before it is displayed.&lt;br /&gt;
&lt;br /&gt;
; recall&lt;br /&gt;
: Triggers after the primary unit is recalled (by the secondary unit).&lt;br /&gt;
&lt;br /&gt;
; prerecall&lt;br /&gt;
: Triggers when the primary unit is recalled (by the secondary unit) but before it is displayed.&lt;br /&gt;
&lt;br /&gt;
; advance&lt;br /&gt;
: Triggers just before the primary unit is going to advance to another unit, or advance by AMLA. (This is after the player selects which advancement, if there is a choice). If this event removes the unit, changes the unit's type, or reduces the unit's experience below what it needs to advance, then the advancement is aborted. Due to a bug, the preceding does not apply to advancement by AMLA. {{DevFeature1.11}} The bug has been fixed. (The fix is not in earlier versions because it could introduce an incompatibility.)&lt;br /&gt;
&lt;br /&gt;
; post advance&lt;br /&gt;
: Triggers just after the primary unit has advanced to another unit, or advance by AMLA.&lt;br /&gt;
&lt;br /&gt;
; select&lt;br /&gt;
: Triggers when the primary unit is selected. Prior to version 1.11, this also triggered when a move was interrupted, as the game keeps the moving unit selected by selecting it again at the end of movement. ''Note: in networked multiplayer, these events are only executed by the client on which the event is triggered, leading to out of sync errors if you modify the game state in the event.''&lt;br /&gt;
&lt;br /&gt;
; menu item ''X''&lt;br /&gt;
: Triggers when a WML menu item with id=''X'' is selected. ''Note: if the menu item has a [command], this event may be executed before or after the command; there is no guarantee.''&lt;br /&gt;
&lt;br /&gt;
==== Custom events ====&lt;br /&gt;
&lt;br /&gt;
An event with a custom name may be invoked using the [[InternalActionsWML#.5Bfire_event.5D|[fire_event]]] tag.  Normally you'll use such custom events as named subroutines to be called by events with predefined types.  One common case of this, for example, is that more than one '''sighted''' events might fire the same custom event that changes the scenario objectives.&lt;br /&gt;
&lt;br /&gt;
=== Optional Keys and Tags ===&lt;br /&gt;
&lt;br /&gt;
These keys and tags are more complex ways to filter when an event should trigger:&lt;br /&gt;
&lt;br /&gt;
==== first_time_only ====&lt;br /&gt;
: Whether the event should be removed from the scenario after it is triggered. This key takes a [[ConditionalActionsWML#Boolean_Values|boolean]]; for example:&lt;br /&gt;
: ''first_time_only=yes''&lt;br /&gt;
:: Default behavior if key is omitted. The event will trigger the first time it can and never again.&lt;br /&gt;
: ''first_time_only=no''&lt;br /&gt;
:: The event will trigger every time the criteria are met instead of only the first time.&lt;br /&gt;
&lt;br /&gt;
==== id ====&lt;br /&gt;
: If an id is specified, then the event will not be added if another event with the same id already exists. An id will also allow the event to be removed, see below.&lt;br /&gt;
&lt;br /&gt;
==== remove ====&lt;br /&gt;
: Whether to remove an event instead of adding a new one. This key takes a [[ConditionalActionsWML#Boolean_Values|boolean]]; if true, then the contents of the event are ignored and the event with the specified id is removed instead. for example:&lt;br /&gt;
 [event]&lt;br /&gt;
     id=id_of_event_to_remove&lt;br /&gt;
     remove=yes&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
==== [filter] ====&lt;br /&gt;
: The event will only trigger if the primary unit matches this filter.&lt;br /&gt;
:* [[StandardUnitFilter]]: selection criteria&lt;br /&gt;
&lt;br /&gt;
==== [filter_second] ====&lt;br /&gt;
: Like [filter], but for the secondary unit.&lt;br /&gt;
:* [[StandardUnitFilter]]: selection criteria&lt;br /&gt;
&lt;br /&gt;
==== [filter_attack] ====&lt;br /&gt;
: Can be used to set additional filtering criteria based on the weapon used by the primary unit. This is usable in the events ''attack'', ''attacker hits'', ''attacker misses'', ''defender hits'', ''defender misses'' and ''attack end''. For more information and filter keys, see [[FilterWML#Filtering Weapons|Filtering Weapons]]. The most commonly used keys are the following.&lt;br /&gt;
:* '''name''': the name of the weapon used.&lt;br /&gt;
:* '''range''': the range of the weapon used.&lt;br /&gt;
:* '''special''': filter on the attack's special power.&lt;br /&gt;
&lt;br /&gt;
==== [filter_second_attack] ====&lt;br /&gt;
: Like [filter_attack], but for the weapon used by the secondary unit.&lt;br /&gt;
&lt;br /&gt;
==== [filter_condition] ====&lt;br /&gt;
: This tag makes sense inside any sort of event - even those that don't have units, or custom events,... The event will only trigger if this condition evaluates to true.&lt;br /&gt;
:* [[ConditionalActionsWML#Condition_Tags|Condition Tags]]&lt;br /&gt;
: note: This tag is meant to be used when the firing of an event shall be based on variables/conditions which cannot be retrieved from the filtered units.&lt;br /&gt;
&lt;br /&gt;
==== [filter_side] ====&lt;br /&gt;
: The current side (usually the side $side_number) must match the passed [[StandardSideFilter]] for the event to fire.&lt;br /&gt;
:* SSF tags and keys as arguments as described in [[StandardSideFilter]].&lt;br /&gt;
: note: This tag makes most sense in side turn and turn refresh events. However, all wml events have a current side so one could also prevent e.g. a moveto event from firing if you put a [filter_side] tag there and the moving unit's side doesn't match.&lt;br /&gt;
&lt;br /&gt;
==== delayed_variable_substitution ====&lt;br /&gt;
: This key is only relevant inside of a [[#Delayed Variable Substitution|nested event]] and controls when variable substitution will occur in those special case actions.&lt;br /&gt;
&lt;br /&gt;
=== Actions triggered by [event] ===&lt;br /&gt;
&lt;br /&gt;
After the trigger conditions have been met, all [[ActionWML|action tags]] within the [event] tag are executed in the order they are written in.&lt;br /&gt;
&lt;br /&gt;
There are 3 main types of actions:&lt;br /&gt;
* direct actions ([[DirectActionsWML]]) which have a direct effect on gameplay&lt;br /&gt;
* display actions ([[InterfaceActionsWML]]) which show something to the user&lt;br /&gt;
* internal actions ([[InternalActionsWML]]) which are used by WML internally&lt;br /&gt;
&lt;br /&gt;
More details in [[ActionWML]].&lt;br /&gt;
&lt;br /&gt;
Several actions use standard filters to find out which units&lt;br /&gt;
to execute the command on.  These are denoted by the phrases&lt;br /&gt;
&amp;quot;standard unit filter&amp;quot; and &amp;quot;standard location filter&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Nested Events ===&lt;br /&gt;
&lt;br /&gt;
There is one special type of action: event creation.  By placing an '''[event]''' tag inside another '''[event]''' tag, the nested event is spawned (created) when the parent (outer) event is encountered (when executing the contents of the parent event).&lt;br /&gt;
&lt;br /&gt;
([[#Nested Event Example|See Examples]])&lt;br /&gt;
&lt;br /&gt;
==== Delayed Variable Substitution ====&lt;br /&gt;
&lt;br /&gt;
Variable substitution for a nested event can happen either when it is spawned by the parent event or when it is triggered itself. This is controlled with the key '''delayed_variable_substitution''' which is used in the nested event.&lt;br /&gt;
&lt;br /&gt;
If this key is set to ''yes'', the variables in the nested event will contain values from the turn in which the ''nested'' event was triggered. ''This is the default behavior if the key is omitted.'' If set to ''no'', the variables in the nested event are set at the time the ''parent'' event is triggered.&lt;br /&gt;
&lt;br /&gt;
This behavior can be fine tuned with a special syntax when referencing variables. Instead of the normal '''$variable''' syntax, use '''$|variable''' to cause a variable to contain values relevant to the turn in which the nested event was triggered even when '''delayed_variable_substitution''' is set to ''no''. In this way you can have a mix of variables relevant to the parent and nested event trigger times.&lt;br /&gt;
&lt;br /&gt;
([[#Delayed Variable Substitution Example|See Examples]])&lt;br /&gt;
&lt;br /&gt;
== Multiplayer safety ==&lt;br /&gt;
&lt;br /&gt;
In multiplayer it is only safe to use WML that might require synchronization with other players because of input or random numbers (like [message] with input or options or [unstore_unit] where a unit might advance) in the following events. This is because in these cases WML needs data from other players to work right and/or do the same thing for all players. This data is only available after a network synchronization.&lt;br /&gt;
&lt;br /&gt;
List of synchronized events:&lt;br /&gt;
* moveto&lt;br /&gt;
* sighted &lt;br /&gt;
* attack&lt;br /&gt;
* attack_end &lt;br /&gt;
* attacker hits &lt;br /&gt;
* attacker misses &lt;br /&gt;
* defender hits&lt;br /&gt;
* defender misses &lt;br /&gt;
* stone&lt;br /&gt;
* last breath &lt;br /&gt;
* menu item X&lt;br /&gt;
* die&lt;br /&gt;
* capture &lt;br /&gt;
* recruit&lt;br /&gt;
* prerecruit &lt;br /&gt;
* recall &lt;br /&gt;
* prerecall &lt;br /&gt;
* advance &lt;br /&gt;
* post_advance &lt;br /&gt;
* new turn &lt;br /&gt;
* side turn &lt;br /&gt;
* turn X &lt;br /&gt;
* side X turn &lt;br /&gt;
* side X turn Y &lt;br /&gt;
* turn refresh &lt;br /&gt;
&lt;br /&gt;
There is also the possibility of events that are normally synchronized when fired by the engine but can be non-synchronized when fired by WML tags from non-synchronized event. So when you are using them you must be extra careful. For example [unstore_unit] may trigger a unit advancement that will fire ''advance'' and ''post advance'' events.&lt;br /&gt;
&lt;br /&gt;
== A Trap for the Unwary ==&lt;br /&gt;
&lt;br /&gt;
You need to beware of using macros to generate events. If you include a macro expanding to an event definition twice, the event will be executed twice (not once) each time the trigger condition fires. Consider this code:&lt;br /&gt;
&lt;br /&gt;
 #define DOUBLE&lt;br /&gt;
     [event]&lt;br /&gt;
         name=multiply_by_2&lt;br /&gt;
         {VARIABLE_OP 2_becomes_4 multiply 2}&lt;br /&gt;
     [/event]&lt;br /&gt;
 #enddef&lt;br /&gt;
 &lt;br /&gt;
 {DOUBLE}&lt;br /&gt;
 {DOUBLE}&lt;br /&gt;
 &lt;br /&gt;
 {VARIABLE 2_becomes_4 2}&lt;br /&gt;
 		&lt;br /&gt;
 [fire_event]&lt;br /&gt;
     name=multiply_by_2&lt;br /&gt;
 [/fire_event]&lt;br /&gt;
 &lt;br /&gt;
 {DEBUG_MSG &amp;quot;$2_becomes_4 should be 4&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
After it executes, the debug message will reveal that the variable has been set to 8, not 4.&lt;br /&gt;
&lt;br /&gt;
=== Event IDs ===&lt;br /&gt;
&lt;br /&gt;
This problem can be avoided by setting an '''id''' on the event, i.e.:&lt;br /&gt;
&lt;br /&gt;
 #define DOUBLE&lt;br /&gt;
     [event]&lt;br /&gt;
         name=multiply_by_2&lt;br /&gt;
         id=doubler_event&lt;br /&gt;
         {VARIABLE_OP 2_becomes_4 multiply 2}&lt;br /&gt;
     [/event]&lt;br /&gt;
 #enddef&lt;br /&gt;
&lt;br /&gt;
Events with the same ID will only be accepted once by the engine no matter how many times they are included, and will only be saved once to the scenario's savefile.  Events with an ID can also be removed by using the '''remove''' key, i.e.:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     id=doubler_event&lt;br /&gt;
     remove=yes&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
After that WML is encountered (at toplevel or after created from another event), the event with this ID is removed from the scenario wml, thus firing it has no effect.  After an event is removed, it can still be re-added later.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Notes and Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Primary/Secondary Unit Speaker Example ===&lt;br /&gt;
&lt;br /&gt;
In events, the primary unit can be referred to as '''unit''' and the secondary unit can be referred to as '''second_unit''' in [message] tags using the '''speaker''' key. For example:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=die&lt;br /&gt;
     [message]&lt;br /&gt;
         speaker='''second_unit'''&lt;br /&gt;
         message= _ &amp;quot;Hahaha! I finally killed you!&amp;quot;&lt;br /&gt;
     [/message]&lt;br /&gt;
 &lt;br /&gt;
     [message]&lt;br /&gt;
         speaker='''unit'''&lt;br /&gt;
         message= _ &amp;quot;It's not over yet! I'll come back to haunt you!&amp;quot;&lt;br /&gt;
     [/message]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
=== Nested Event Example ===&lt;br /&gt;
&lt;br /&gt;
An event is created for a portal that opens on turn 10. The parent (or 'outer') event executes on turn 10 at which point the nested moveto event is created. This nested event executes when a player steps on a certain spot.&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=turn 10&lt;br /&gt;
 &lt;br /&gt;
     [event]&lt;br /&gt;
         name=moveto&lt;br /&gt;
 &lt;br /&gt;
         [filter]&lt;br /&gt;
             x,y=5,8&lt;br /&gt;
         [/filter]&lt;br /&gt;
 &lt;br /&gt;
         # moving to 5,8 will trigger this event only on turn 10 and after&lt;br /&gt;
     [/event]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
An equivalent way of doing this would be to create a single moveto event with an '''[if]''' statement to check for turn number but using nested '''[event]''' tags is a convenient shortcut to accomplish this task without resorting to '''[if]''' statements.&lt;br /&gt;
&lt;br /&gt;
=== Delayed Variable Substitution Example ===&lt;br /&gt;
&lt;br /&gt;
This code will display a message showing the turn number on which the nested ''moveto'' event happens.&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=turn 10&lt;br /&gt;
 &lt;br /&gt;
     [event]&lt;br /&gt;
         name=moveto&lt;br /&gt;
         delayed_variable_substitution=yes&lt;br /&gt;
 &lt;br /&gt;
         [filter]&lt;br /&gt;
             x,y=5,8&lt;br /&gt;
         [/filter]&lt;br /&gt;
 &lt;br /&gt;
         {DEBUG_MSG &amp;quot;Turn $turn_number&amp;quot;} &lt;br /&gt;
    [/event]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
Since this is the default behavior for the '''delayed_variable_substitution''' key, the following example is identical.&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=turn 10&lt;br /&gt;
 &lt;br /&gt;
     [event]&lt;br /&gt;
         name=moveto&lt;br /&gt;
 &lt;br /&gt;
         [filter]&lt;br /&gt;
             x,y=5,8&lt;br /&gt;
         [/filter]&lt;br /&gt;
 &lt;br /&gt;
         {DEBUG_MSG &amp;quot;Turn $turn_number&amp;quot;} &lt;br /&gt;
    [/event]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
The following code will always display &amp;quot;Turn 10&amp;quot; when the nested ''moveto'' event happens. This is because the variable substitution is done when the parent event is triggered and spawns the nested event, ''not'' when the nested event is triggered.&lt;br /&gt;
 &lt;br /&gt;
 [event]&lt;br /&gt;
     name=turn 10&lt;br /&gt;
 &lt;br /&gt;
     [event]&lt;br /&gt;
         name=moveto&lt;br /&gt;
         delayed_variable_substitution=no&lt;br /&gt;
 &lt;br /&gt;
         [filter]&lt;br /&gt;
             x,y=5,8&lt;br /&gt;
         [/filter]&lt;br /&gt;
 &lt;br /&gt;
         {DEBUG_MSG &amp;quot;Turn $turn_number&amp;quot;} &lt;br /&gt;
    [/event]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
Finally, the following example is identical to the first two in that it will display a message showing the turn number on which the nested ''moveto'' event happens, despite the fact that the '''delayed_variable_substitution''' key is set to ''no''. This is because the special '''$|variable''' syntax is used.&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=turn 10&lt;br /&gt;
 &lt;br /&gt;
     [event]&lt;br /&gt;
         name=moveto&lt;br /&gt;
         delayed_variable_substitution=no&lt;br /&gt;
 &lt;br /&gt;
         [filter]&lt;br /&gt;
             x,y=5,8&lt;br /&gt;
         [/filter]&lt;br /&gt;
 &lt;br /&gt;
         {DEBUG_MSG &amp;quot;Turn $|turn_number&amp;quot;} &lt;br /&gt;
    [/event]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
=== Multiple Nested Events ===&lt;br /&gt;
&lt;br /&gt;
Every delayed_variable_substitution=no causes a variable substitution run on the subevent where it occurs at the spawn time of this event and on all following subevents. For any specific event, variable substitution happens at least one time when the event is executed. For each delayed=no key appearing in itself or in an event of an &amp;quot;older&amp;quot; generation, which is not the toplevel event, an additional variable substitution run is made.&lt;br /&gt;
 [event]# parent&lt;br /&gt;
     name=turn 2&lt;br /&gt;
     #delayed_variable_substitution=no # In the parent event, delayed= has no effect.&lt;br /&gt;
 &lt;br /&gt;
     [event]# child&lt;br /&gt;
         name=turn 3&lt;br /&gt;
         delayed_variable_substitution=no # Causes variable substitution in the child, grandchild and great-grandchild event&lt;br /&gt;
         # at execution time of the parent event = spawn time of the child event.&lt;br /&gt;
 &lt;br /&gt;
         [event]# grandchild&lt;br /&gt;
             name=turn 4&lt;br /&gt;
             delayed_variable_substitution=yes # no variable substitution in the grandchild and great-grandchild event&lt;br /&gt;
             # at execution time of the child event = spawn time of the grandchild event&lt;br /&gt;
 &lt;br /&gt;
             [event]# great-grandchild&lt;br /&gt;
                 name=turn 5&lt;br /&gt;
                 {DEBUG_MSG $turn_number}# output: 2 - value from the variable substitution at execution time of the parent event,&lt;br /&gt;
                 # caused by delayed=no in the child event&lt;br /&gt;
 &lt;br /&gt;
                 {DEBUG_MSG $||turn_number}# output: &amp;quot;$turn_number&amp;quot;&lt;br /&gt;
                 # Each variable substitution transforms a &amp;quot;$|&amp;quot; to a &amp;quot;$&amp;quot; (except when no | left).&lt;br /&gt;
 &lt;br /&gt;
                 {DEBUG_MSG $|turn_number}# output: 5 - from the variable substitution at execution time&lt;br /&gt;
                 # of the great-grandchild event&lt;br /&gt;
             [/event]&lt;br /&gt;
         [/event]&lt;br /&gt;
     [/event]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[DirectActionsWML]]&lt;br /&gt;
* [[InternalActionsWML]]&lt;br /&gt;
* [[InterfaceActionsWML]]&lt;br /&gt;
* [[FilterWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=EffectWML&amp;diff=47820</id>
		<title>EffectWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=EffectWML&amp;diff=47820"/>
		<updated>2012-11-12T22:36:52Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: removal of [effect]unit_type/gender=&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
&lt;br /&gt;
The tag [effect] is used to describe one modification to a unit. Any number of [effect] tags can be used to describe a complete modification. Modifications are permanent changes to a unit; currently there is no way of removing a modification.&lt;br /&gt;
&lt;br /&gt;
The following keys and subtags are always recognized:&lt;br /&gt;
* '''[filter]''': only apply this effect if the affected unit matches. See [[StandardUnitFilter]] for details.&lt;br /&gt;
* '''unit_type''': only apply this effect if the affected unit's type name matches the value. (can be a list) {{DevFeature1.11}} Support for the key is removed in favor of [effect][filter]type=.&lt;br /&gt;
* '''unit_gender''': only apply this effect if the affected unit's gender name matches the value. (can be a list) {{DevFeature1.11}} Support for the key is removed in favor of [effect][filter]gender=.&lt;br /&gt;
* '''times''': describes how many times the effect is applied. The default is to apply the effect once. Other possible value : &amp;quot;per level&amp;quot; which means that the effect is applied level times, where level is the unit level.&lt;br /&gt;
* '''apply_to''': describes what the effect actually affects.&lt;br /&gt;
[effect] uses different keys depending on the value of '''apply_to'''.  '''apply_to''' can take the following values:&lt;br /&gt;
* '''new_attack''': will use all other keys and tags as the description of an attack that will be added to the unit. See [attack] in [[UnitTypeWML#Attacks|UnitTypeWML]].&lt;br /&gt;
* '''remove_attacks''': remove the matching attacks. All tags from the attack filter construct will be used to match the attack; see [[FilterWML#Filtering Weapons|FilterWML]]. Do not use a [filter] tag otherwise it will not work properly.&lt;br /&gt;
* '''attack''': find an attack and modify it.  All tags from the attack filter construct will be used to match the attack; see [[FilterWML#Filtering Weapons|FilterWML]].  After that, the following keys and tags can be used to modify the attack.  Note: do not use a [filter] tag.  Just put the keys you want to filter on inside the [effect] tag.&lt;br /&gt;
** '''set_name''': change the attack's name (ie identifier).&lt;br /&gt;
** '''set_description''': change the attack's description (ie displayed name). &lt;br /&gt;
** '''set_type''': change the attack type. The standard values are '''blade''', '''pierce''', '''impact''', '''fire''', '''cold''', and '''arcane'''.&lt;br /&gt;
** '''[set_specials]''': change the attack's specials. The specials to add are given exactly as in the [specials] tag.&lt;br /&gt;
*** '''mode''': if '''append''', adds the given specials to the attack. If '''replace''', replaces the existing specials with the given ones. Default '''replace'''.&lt;br /&gt;
** '''remove_specials''': remove the listed specials. The value of this key is the coma-separated list of the id of the specials to remove. This key is always evaluated before a [set_specials] tags in the same [effect]&lt;br /&gt;
** '''increase_damage''': increases the attack's damage.  This can be positive or negative, so you can use it to decrease damage as well.  If it ends in a percent(''''%''''), the change in damage will be a percentage ratio of the attack's original damage.&lt;br /&gt;
** '''increase_attacks''': increases the number of attack strikes. Like '''increase_damage''', it can be positive or negative, or a percentage.&lt;br /&gt;
** '''attack_weight''': change the attack's attack_weight. See [attack] in [[UnitTypeWML#Attacks|UnitTypeWML]] for explanations about attack_weight.&lt;br /&gt;
** '''defense_weight''': change the attack's defense_weight. See [attack] in [[UnitTypeWML#Attacks|UnitTypeWML]] for explanations about defense_weight.&lt;br /&gt;
* '''hitpoints''': modifies the unit's HP and/or max HP.&lt;br /&gt;
** '''increase''': the amount to increase the unit's HP.&lt;br /&gt;
** '''heal_full''': if present  and not set to &amp;quot;no&amp;quot; the unit will be put back to full HP.&lt;br /&gt;
** '''increase_total''': will increase the total HP of the unit.  Can be specified either as a negative or a positive value.  It can also be specified as a percentage of the current total; i.e. &amp;quot;-50%&amp;quot; will cut max HP in half.&lt;br /&gt;
** '''violate_maximum''': it the unit ends up with more than its max HP after these modifications, and this key is present (set to any non-null value, ex. '''yes'''), the unit's HP won't be lowered to its max HP.&lt;br /&gt;
* '''movement''': modifies the unit's movement points.&lt;br /&gt;
** '''increase''': maximum movement is increased by this amount. It can be positive, negative, or specified as a percentage.&lt;br /&gt;
** '''set''': maximum movement is set to a specific value.&lt;br /&gt;
* {{DevFeature1.11}} '''experience''': affects the unit's current XP.&lt;br /&gt;
** '''increase''': current XP is increased by this amount. It can be positive, negative, or specified as a percentage.&lt;br /&gt;
** '''set''': current XP is set to a specific value.&lt;br /&gt;
* '''max_experience''': affects the amount of XP the unit needs for the next level.&lt;br /&gt;
** '''increase''': how to change the xp; again it can be negative, positive or a percentage.&lt;br /&gt;
* '''loyal''': no keys associated. The affected unit will be loyal i.e have an upkeep of 0.&lt;br /&gt;
* '''movement_costs''': speed through specific terrain is modified&lt;br /&gt;
** '''replace''': If set to &amp;quot;true&amp;quot;, any new values replace the old ones. Otherwise, new values are added to old values (negative values allowed).&lt;br /&gt;
** '''[movement_costs]''': a subtag that describes the new movement costs just like in [[UnitsWML#.5Bmovetype.5D|UnitsWML]]&lt;br /&gt;
* '''defense''': Sets unit chance to be hit in specific terrain (100 - defense value)&lt;br /&gt;
** '''replace''': If set to &amp;quot;true&amp;quot;, any new values replace the old ones. Otherwise, new values are added to old values (negative values allowed).&lt;br /&gt;
** '''[defense]''': a subtag that describes the new defense just like in [[UnitsWML#.5Bmovetype.5D|UnitsWML]]&lt;br /&gt;
* '''resistance''': Sets percent damage taken from combat&lt;br /&gt;
** '''replace''': If set to &amp;quot;true&amp;quot;, any new values replace the old ones. Otherwise, new values are added to old values (negative values allowed).&lt;br /&gt;
** '''[resistance]''': a subtag that describes the new resistance just like in [[UnitsWML#.5Bmovetype.5D|UnitsWML]]&lt;br /&gt;
* '''variation''': switches the unit into one of its variations.&lt;br /&gt;
** '''name''': the id of the variation to invoke.&lt;br /&gt;
* '''type''': transforms the unit into a new unit_type.&lt;br /&gt;
** '''name''': the id of the unit_type to invoke.&lt;br /&gt;
* '''status''': modifies the status affecting the unit.&lt;br /&gt;
** '''add''': a list of status modifications to add. Beware, these may be reapplied later, such as when the unit is recalled or levels up; if in an event, you can use [[InternalActionsWML|[store_unit]]] and [[DirectActionsWML|[unstore_unit]]], modifying unit.status.name directly, to avoid this, or if you are creating the unit, you can just add it to the unit's [status] tag in the [unit] tag.  These are listed in [status], [[SingleUnitWML]].&lt;br /&gt;
** '''remove''': a list of status modifications to remove.&lt;br /&gt;
* '''zoc''': toggle the zone of control.&lt;br /&gt;
** '''value''': new value for zoc (0=disable, other=enable).&lt;br /&gt;
* '''profile''': customize the profile of the unit. See [[UnitTypeWML]].&lt;br /&gt;
** '''portrait''': new image to display when the unit speaks.&lt;br /&gt;
** '''small_portrait''': new image to display in unit reports.&lt;br /&gt;
** '''description''': sets the text to display when hovering over the unit's type in the righthand pane.&lt;br /&gt;
* '''new_ability''': Adds one or more abilities to a unit.&lt;br /&gt;
** '''[abilities]''': A subtag that contains the ability definitions.&lt;br /&gt;
* '''remove_ability''': Removes one or more abilities from a unit. Abilities are not reference counted: added, added, removed = gone.&lt;br /&gt;
** '''[abilities]''': A subtag that contains the ability definitions. Strictly speaking, all that is needed is the id= inside some tag.&lt;br /&gt;
* '''new_animation''': contain animations that will be added to the unit, it can contain multiple animation blocks, and a single &amp;quot;id=&amp;quot; line. That Id should be unique for each effect block and is used by the engine to reuse WML parsing, making the loading faster.&lt;br /&gt;
* '''image_mod''': modify the image path function ([[ImagePathFunctionWML]]) of all the unit's frames.&lt;br /&gt;
** '''replace''': replaces the image path function(s) to be used, e.g. &amp;quot;RC(magenta&amp;gt;red)&amp;quot;&lt;br /&gt;
** '''add''': adds an image path function without removing any existing ones.&lt;br /&gt;
* '''ellipse''': Change the image used for the unit's ellipse.&lt;br /&gt;
**'''ellipse''' : the new image to use.&lt;br /&gt;
* {{DevFeature1.11}} '''halo''': Change the image used for the unit's halo.&lt;br /&gt;
**'''halo''': the new image to use.&lt;br /&gt;
* {{DevFeature1.11}} '''overlay''': Change the unit's overlays.&lt;br /&gt;
**'''add''': the specified overlay will be added to the unit's overlays. It can be a comma separated list with multiple overlays. ''Note: overlays added in this way cannot be removed by [remove_unit_overlay] until the effect's duration is over.''&lt;br /&gt;
**'''replace''': all the unit's overlays will be removed and replaced with the specified one. Again, it can be a comma separated list. ''Note: overlays replaced in this way cannot be modified by [unit_overlay] or [remove_unit_overlay] until the effect's duration is over.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[UnitTypeWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
* [[AnimationWML]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=46922</id>
		<title>DirectActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=46922"/>
		<updated>2012-08-04T18:28:09Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* [unstore_unit] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== Direct actions ==&lt;br /&gt;
&lt;br /&gt;
Direct actions are actions that have a direct effect on gameplay. They can be used inside of [[EventWML|events]].&lt;br /&gt;
&lt;br /&gt;
The following tags are actions:&lt;br /&gt;
&lt;br /&gt;
=== [endlevel] ===&lt;br /&gt;
Ends the scenario.&lt;br /&gt;
* '''result''': before the scenario is over, all events with ''name=result'' are triggered. If ''result=victory'', the player progresses to the next level; if ''result=defeat'', the game returns to the main menu. &lt;br /&gt;
&lt;br /&gt;
When the result is &amp;quot;victory&amp;quot; the following keys can be used:&lt;br /&gt;
* '''bonus''': whether the player should get bonus gold (maximum possible gold that could have been earned by waiting the level out). The default is bonus=yes.&lt;br /&gt;
* '''carryover_report''': whether the player should receive a summary of the scenario outcome, the default is carryover_report=yes.&lt;br /&gt;
* '''save''': whether a start-of-scenario save should be created for the next scenario, the default is save=yes. Do not confuse this with saving of replays for the current scenario.&lt;br /&gt;
* '''replay_save''': whether a replay save for the current scenario is allowed, the default is replay_save=yes. If yes, the player's settings in preferences will be used to determine if a replay is saved. If no, will override and not save a replay.&lt;br /&gt;
* '''linger_mode''': If ...=yes, the screen is greyed out and there's the possibility to save before advancing to the next scenario, the default is linger_mode=yes.&lt;br /&gt;
* '''reveal_map''': (Multiplayer only) (Default is 'yes') If 'no', shroud doesn't disappear when game ended.&lt;br /&gt;
* '''next_scenario''': (default specified in '''[scenario]''' tag) the ID of the next scenario that should be played.  All units that side 1 controls at this point become available for recall in ''next_scenario''.&lt;br /&gt;
* '''carryover_percentage''': by default 80% of the gold is carried over to the next scenario, with this key the amount can be changed.&lt;br /&gt;
* '''carryover_add''': if true the gold will be added to the starting gold the next scenario, if false the next scenario will start with the amount of the current scenario (after taxes) or the minimum in the next scenario. Default is false.&lt;br /&gt;
* '''music''': (default specified in '''[scenario]''' or '''[game_config]''' tags) a comma-separated list of music tracks from which one will be chosen and played once after any events related to the end of level result are executed; by default, victory_music is used on victory, and defeat_music on defeat.&lt;br /&gt;
* '''end_credits''': {{DevFeature1.11}} Whether to display the credits screen at the end of a single-player campaign. Defaults to ''yes''. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
* '''end_text''': (translatable) Text that is shown centered in a black screen at the end of a campaign. Defaults to &amp;quot;The End&amp;quot;. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
* '''end_text_duration''': Delay, in milliseconds, before displaying the game credits at the end of a campaign. In other words, for how much time '''end_text''' is displayed on screen. Defaults to 3500. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
&lt;br /&gt;
=== [unit] ===&lt;br /&gt;
Places a unit on the map.  For syntax see [[SingleUnitWML]].&lt;br /&gt;
* {{Short Note:Predefined Macro|GENERIC_UNIT}}&lt;br /&gt;
* '''to_variable''':  spawn directly into a variable instead of on the map.&lt;br /&gt;
&lt;br /&gt;
=== [recall] ===&lt;br /&gt;
Recalls a unit.  The unit is recalled free of charge, and is placed near the leader.&lt;br /&gt;
* [[StandardUnitFilter]]: the first matching unit will be recalled.  If no units match this tag is ignored. Do not use a [filter] tag. If a comma separated list is given, every unit currently considered for recall is checked against all the types (not each single one of the types against all units).&lt;br /&gt;
* '''x,y''': the unit is placed here instead of next to the leader.&lt;br /&gt;
* '''show''': yes/no, default yes: whether the unit is animated (faded in) or instantly displayed&lt;br /&gt;
* '''fire_event''': boolean yes|no (default no); whether any according prerecall or recall events shall be fired.&lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): If yes, checks for terrain passability when placing the unit (a nearby passable hex is chosen).&lt;br /&gt;
&lt;br /&gt;
=== [teleport] ===&lt;br /&gt;
Teleports a unit on map. {{Short Note:Predefined Macro|TELEPORT_UNIT}}&lt;br /&gt;
* '''[filter]''': [[StandardUnitFilter]] the first unit matching this filter will be teleported.&lt;br /&gt;
* '''x,y''': the position to teleport to.&lt;br /&gt;
* '''clear_shroud''': should shroud be cleared on arrival&lt;br /&gt;
* '''animate''': should a teleport animation be played (if the unit doesn't have a teleport animation, it will fade out/fade in)&lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): normally, units will not be teleported into terrain that is impassable for them. Setting this attribute to &amp;quot;no&amp;quot; permits it.&lt;br /&gt;
&lt;br /&gt;
(Note: There is also a ability named teleport, see [[AbilitiesWML]].)&lt;br /&gt;
&lt;br /&gt;
=== [terrain_mask] ===&lt;br /&gt;
Changes the terrain on the map.  See [[TerrainMaskWML]].&lt;br /&gt;
&lt;br /&gt;
=== [terrain] ===&lt;br /&gt;
Changes the terrain on the map.&lt;br /&gt;
* '''terrain''': the character of the terrain to use.  See [[TerrainCodesWML]] to see what letter a type of terrain uses.&lt;br /&gt;
* [[StandardLocationFilter]]. This [[StandardLocationFilter]]'s terrain= key is used for the new terrain, filtering by terrain can be done with a nested [[StandardLocationFilter]]: [and]terrain=terrain_string_to_be_filtered_for.&lt;br /&gt;
* '''layer''': (overlay|base|both, default=both) only change the specified layer.&lt;br /&gt;
* '''replace_if_failed''': (default=no) When replacing just one layer failed, try to replace the whole terrain. If '''terrain''' is an overlay only terrain, use the default_base as base layer. If the terrain has no default base, do nothing.&lt;br /&gt;
&lt;br /&gt;
=== [gold] ===&lt;br /&gt;
Gives sides gold.&lt;br /&gt;
* '''amount''': the amount of gold to give.&lt;br /&gt;
* '''side''': (default=1) the number of the side to give the gold to. Can be a comma-separated list of sides. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument {{DevFeature1.11}}: [gold][filter_side] is deprecated, use the new inline SSF.&lt;br /&gt;
&lt;br /&gt;
=== [unstore_unit] ===&lt;br /&gt;
Creates a unit from a game variable, and activates it on the playing field.  This must be a specific variable describing a unit, and may not be an array -- to unstore an entire array, iterate over it.  The variable is not cleared.  See also [[InternalActionsWML#.5Bstore_unit.5D|[store_unit]]], [[ConditionalActionsWML#.5Bwhile.5D|[while]]] and [[InternalActionsWML#.5Bclear_variable.5D|[clear_variable]]].&lt;br /&gt;
* '''variable''': the name of the variable.&lt;br /&gt;
* '''find_vacant''': whether the unit should be placed on the nearest vacant tile to its specified location.  If this is set to 'no'(default), then any unit on the same tile as the unit being unstored will be destroyed. &lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): If yes, checks for terrain passability when placing the unit. This key has no effect if find_vacant=no (no check performed then). Before 1.9 this key is always &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''text''': (translatable) floating text to display above the unit, such as a damage amount&lt;br /&gt;
* '''red''', '''green''', '''blue''': (default=0,0,0) the color to display the text in. Values vary from 0-255. You may find it convenient to use the {COLOR_HARM} or {COLOR_HEAL} macro instead. (Use {COLOR_HARM} or {COLOR_HEAL} instead of the whole red,green,blue= line.)&lt;br /&gt;
* '''advance''': (default=true) if true the unit is advanced if it has enough XP. When modifying XP make sure to do it from inside a [[EventWML#Multiplayer_safety|synchronized event]] or it may lead to OOS errors especially when several advancement paths exist. Note that advance and post advance events are called, so infinite loops can happen.&lt;br /&gt;
* '''fire_event''': (boolean yes|no, default no) Whether any advance/post advance events shall be fired if an advancement takes place, no effect otherwise.&lt;br /&gt;
* '''animate''': {{DevFeature1.11}} (boolean yes|no, default yes) Whether &amp;quot;levelout&amp;quot; and &amp;quot;levelin&amp;quot; (or fade to white and back) animations shall be played if an advancement takes place, no effect otherwise.&lt;br /&gt;
* '''x''' ,'''y''': override unit location, &amp;quot;x,y=recall,recall&amp;quot; will put the unit on the unit's side's recall list.&lt;br /&gt;
Units can be unstored with negative (or zero) hit points. Such units will be automatically hit (and killed) in combat, but if given the chance to heal, they will have a minimum of one hit point after healing (regardless of how negative their hit points were). This is unusual-looking behavior, so often should be avoided.&amp;lt;!-- A known use-case is using [unstore_unit] to modify a unit during its last_breath event. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [allow_recruit] ===&lt;br /&gt;
Allows a side to recruit units it couldn't previously recruit.&lt;br /&gt;
* '''type''': the types of units that the side can now recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that is being allowed to recruit the units. This can be a comma-separated list note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [allow_extra_recruit] ===&lt;br /&gt;
Allows a leader to recruit units it couldn't previously recruit.&lt;br /&gt;
These types add to the types the leader can recruit because of [side]recruit=.&lt;br /&gt;
* '''extra_recruit''': the types of units that the unit can now recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_recruit] ===&lt;br /&gt;
Prevents a side from recruiting units it could previously recruit.&lt;br /&gt;
* '''type''': the types of units that the side can no longer recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that may no longer recruit the units. This can be a comma-separated list note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_extra_recruit] ===&lt;br /&gt;
Prevents a leader from recruiting units it could previously recruit.&lt;br /&gt;
* '''extra_recruit''': the types of units that the side can no longer recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [set_recruit] ===&lt;br /&gt;
Sets the units a side can recruit.&lt;br /&gt;
* '''recruit''': the types of units that the side can now recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that is having its recruitment set. This can be a comma-separated list. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [set_extra_recruit] === &lt;br /&gt;
Sets the units a leader can recruit.&lt;br /&gt;
* '''extra_recruit''': the types of units that the leader can now recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [modify_side] ===&lt;br /&gt;
Modifies some details of a given side in the middle of a scenario.  '''The following listed properties are the only properties that [modify_side] can affect!'''&lt;br /&gt;
* '''side''': (default=1) the number of the side that is to be changed. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* '''income''': the income given at the begining of each turn.&lt;br /&gt;
* '''recruit''': a list of unit types, replacing the side's current recruitment list.&lt;br /&gt;
* '''team_name''': the team in which the side plays the scenario.&lt;br /&gt;
* '''user_team_name''': a translatable string representing the team's description. This has no effect on alliances. Defaults to ''team_name''.&lt;br /&gt;
* '''gold''': the amount of gold the side owns.&lt;br /&gt;
* '''village_gold''': the income setting per village for the side.&lt;br /&gt;
* '''controller''': the identifier string of the side's controller. Uses the same syntax of the ''controller'' key in the [[SideWML|[side]]] tag.&lt;br /&gt;
* '''fog''': a boolean string (yes/no) describing the status of Fog for the side.&lt;br /&gt;
* '''shroud''': a boolean string describing the status of Shroud for the side.&lt;br /&gt;
* '''hidden''': a boolean string specifying whether side is shown in status table.&lt;br /&gt;
* '''color''': {{DevFeature1.11}} a team color range specification, name (e.g. &amp;quot;red&amp;quot;, &amp;quot;blue&amp;quot;), or number (e.g. &amp;quot;1&amp;quot;, &amp;quot;2&amp;quot;) for this side. The default color range names, numbers, and definitions can be found in data/core/team_colors.cfg.&lt;br /&gt;
* '''[ai]''': replaces a side's AI parameters with the new specified ones. Uses the same syntax described in [[AiWML]].&lt;br /&gt;
* '''switch_ai''': replaces a side ai with a new AI from specified file(ignoring those AI parameters above). Path to file follows the usual WML convention.&lt;br /&gt;
* '''reset_maps''': {{DevFeature1.11}} If set to &amp;quot;yes&amp;quot;, then the shroud is spread to all hexes, covering the parts of the map that had already been explored by the side, including hexes currently seen. (Seen hexes will be cleared at the end of most events; they can also be manually cleared with {{tag|InterfaceActionsWML|redraw}}.) This is only effective if shroud is on, but this is evaluated after shroud= (and before shroud_data=).&lt;br /&gt;
* '''reset_view''': {{DevFeature1.11}} If set to &amp;quot;yes&amp;quot;, then the fog of war is spread to all hexes, covering the parts of the map that had already been seen this turn by the side, including hexes currently seen, excluding hexes affected by multi-turn {{tag|DirectActionsWML|lift_fog}}. (Seen hexes will be cleared at the end of most events; they can also be manually cleared with {{tag|InterfaceActionsWML|redraw}}.) This is only effective if fog is on, but this is evaluated after fog=.&lt;br /&gt;
* '''share_maps''': change the share_maps side attribute. Be sure to use shroud=yes for that side and have it as an ally&lt;br /&gt;
* '''share_view''': change the share_view side attribute. Be sure to use fog=yes for that side and have it as an ally&lt;br /&gt;
* '''shroud_data''': changes to the side's shroud, using the same format as when defining the [side].&lt;br /&gt;
&lt;br /&gt;
=== [modify_turns] ===&lt;br /&gt;
Modifies the turn limit in the middle of a scenario.&lt;br /&gt;
* '''value''': the new turn limit.&lt;br /&gt;
* '''add''': if used instead of ''value'', specifies the number of turns to add to the current limit (can be negative).&lt;br /&gt;
* '''current''': changes the current turn number after applying turn limit modifications, if any. It is not possible to change the turn number to exceed the turn limit (1 &amp;lt;= current turns &amp;lt;= max turns).&lt;br /&gt;
&lt;br /&gt;
=== [allow_end_turn] ===&lt;br /&gt;
Allows human players to end their turn through the user interface if they were previously affected by the '''[disallow_end_turn]''' action. This action doesn't take any arguments.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_end_turn] ===&lt;br /&gt;
Disallows human players to end their turn through the user interface. This action doesn't take any arguments.&lt;br /&gt;
&lt;br /&gt;
=== [capture_village] ===&lt;br /&gt;
Changes the ownership of a village.&lt;br /&gt;
* [[StandardLocationFilter]]: all village locations matching the filter are affected.&lt;br /&gt;
* '''side''': the side that takes control of the village. This side needs to have a leader (canrecruit=yes). If the side key is not given, the village will become neutral (unless [filter_side] is present, in which case that side fiter decides, see below).&lt;br /&gt;
* '''[filter_side]''' with [[StandardSideFilter]] tags and keys as arguments; if both this tag and inline side= are present it's an error. Otherwise, the first matching side gets ownership (or the village becomes neutral if none match).&lt;br /&gt;
* '''fire_event''' (boolean yes|no, default: no): Whether any capture events shall be fired.&lt;br /&gt;
&lt;br /&gt;
=== [kill] ===&lt;br /&gt;
Removes all units (including units in a recall list) that match the filter from the game.&lt;br /&gt;
* [[StandardUnitFilter]]: Selection criterion; do not use a [filter] tag.&lt;br /&gt;
* '''animate''': if 'yes', displays the unit dying (fading away).&lt;br /&gt;
* '''fire_event''': if 'yes', triggers any appropriate 'die' events (See [[EventWML]]). Note that events are only fired for killed units that have been on the map (as opposed to recall list).&lt;br /&gt;
* '''[secondary_unit]''' with a [[StandardUnitFilter]] as argument. Do not use a [filter] tag. Has an effect only if fire_event=yes. The first on-map unit matching the filter becomes second_unit in any fired die and last breath events. If an on-map unit matches and if there are several units killed with a single [kill] tag, second_unit is this same unit for all of them. If no on-map unit matches or [secondary_unit] isn't present, the variable second_unit in each of the die and last breath events is always the same as the variable unit (the dying unit).&lt;br /&gt;
&lt;br /&gt;
=== [move_unit] ===&lt;br /&gt;
works like the MOVE_UNIT macro.&lt;br /&gt;
* [[StandardUnitFilter]] as argument; do not use a [filter] tag. All units matching the filter are moved. If the target location is occupied, the nearest free location is chosen.&lt;br /&gt;
* '''to_x''' (unsigned integer): The units are moved to this x coordinate. Can be a comma-separated list, in which case the unit follows this given path during the move.&lt;br /&gt;
* '''to_y''' (unsigned integer): The units are moved to this y coordinate. Can be a comma-separated list.&lt;br /&gt;
* '''fire_event''' (optional, boolean yes|no, default no): Whether any according moveto events shall be fired. The target location ($x1, $y1 in the event) may not be the same location that the unit was tried to be moved to, if the original target location is occupied or impassable.&lt;br /&gt;
* '''check_passability''' (boolean yes|no, default yes): Whether the terrain the unit is moved to should be checked for suiting the unit. (If it does not, a nearby suitable hex is chosen.)&lt;br /&gt;
&lt;br /&gt;
=== [modify_ai] ===&lt;br /&gt;
Changes AI objects (aspects, goals, candidate actions or stages) for a specified side. See [[AiWML#Adding_and_Deleting_Aspects_with_the_.5Bmodify_ai.5D_Tag|AiWML]] for full description.&lt;br /&gt;
&lt;br /&gt;
* '''action''' (string): Takes values 'add', 'change', 'delete' or 'try_delete' to do just that for the AI object.&lt;br /&gt;
* '''path''' (string): Describes which AI object is to be modified.  &lt;br /&gt;
* '''[facet]''', '''[goal]''', '''[candidate_action]''' or '''[stage]''': Details about the AI object to be modified.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument {{DevFeature1.11}}: [modify_ai][filter_side] is deprecated, use the new inline SSF.&lt;br /&gt;
&lt;br /&gt;
=== [modify_unit] ===&lt;br /&gt;
works similar to the MODIFY_UNIT macro.&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. All units matching this filter are modified. Matches on recall list units too.&lt;br /&gt;
* Accepts generally the syntax inside of wml unit variables created by [store_unit] which can be viewed in a savefile or by using the :inspect command. Can add traits with immediate effect. Cannot remove things. Subtags with the same name must be written in the correct order to match them with the tag they are supposed to modify.&lt;br /&gt;
example usage (see also the test scenario):&lt;br /&gt;
 [modify_unit]&lt;br /&gt;
   [filter]&lt;br /&gt;
     x,y=38,6&lt;br /&gt;
   [/filter]&lt;br /&gt;
   hitpoints=10&lt;br /&gt;
   {TRAIT_HEALTHY}&lt;br /&gt;
 [/modify_unit]&lt;br /&gt;
&lt;br /&gt;
The unit which is currently modified is accessible via $this_unit, e.g. hitpoints = &amp;quot;$($this_unit.hitpoints / 2)&amp;quot; to set the hitpoints of all units to half of their particular maxima. This this_unit variable is independent from the this_unit variable available in the SUF used to determine which units to modify (first all matching units are gathered, and then all those are modified).&lt;br /&gt;
&lt;br /&gt;
note: The syntax allowed is somehow vague. Just try things and possibly correct/add/modify this documentation. (a [http://forums.wesnoth.org/viewtopic.php?f=21&amp;amp;t=31676&amp;amp; forum thread] discusses some related issues).&lt;br /&gt;
&lt;br /&gt;
=== [transform_unit] ===&lt;br /&gt;
transforms every unit matching the filter to the given unit type. Keeps intact hitpoints, experience and status. If the unit is transformed to a non-living type (undead or mechanical), it will be also unpoisoned.&lt;br /&gt;
* [[StandardUnitFilter]]: do not use a [filter] tag.&lt;br /&gt;
* '''transform_to''': the unit type in which all the units matching the filter will be transformed. If missing, the units will follow their normal advancement.&lt;br /&gt;
&lt;br /&gt;
=== [petrify] ===&lt;br /&gt;
&lt;br /&gt;
* [[StandardUnitFilter]] as an argument. Do not use a [filter] tag. All units matching this filter are petrified. Recall list units are included.&lt;br /&gt;
&lt;br /&gt;
=== [unpetrify] ===&lt;br /&gt;
* [[StandardUnitFilter]] as an argument. Do not use a [filter] tag. All units matching this filter are unpetrified. Recall list units are included.&lt;br /&gt;
&lt;br /&gt;
=== [object] ===&lt;br /&gt;
Gives some unit an object and removes all items on the tile the unit is on.&lt;br /&gt;
* '''id''': (Optional) when the object is picked up, a flag is set for ''id''.  The object cannot be picked up if a flag for ''id'' has been set.  This means that any object with an id can only be used once, even if first_time_only=no is set for the event. This restriction is per level. In a campaign objects with the same id can be assigned once per level.&lt;br /&gt;
* '''delayed_variable_substitution''' (boolean yes|no, default no): If set to &amp;quot;yes&amp;quot;, the wml block contained in this [object] is not variable-substituted at execution time of the event where this [object] is within. You need this to work around a bug when adding ABILITY_TELEPORT via an [object] or when using [object][effect][filter]with a $this_unit (see http://gna.org/bugs/index.php?18893).&lt;br /&gt;
* '''[effect]''': one or more effect elements may be listed.  See [[EffectWML]] for a description of [effect].&lt;br /&gt;
* '''duration''':&lt;br /&gt;
**if 'level', effects only last until the end of the level (note : 'level' is the scenario, so this doesn't mean it last until the unit levels-up). {{DevFeature1.11}} 'level' has been renamed to 'scenario'.&lt;br /&gt;
**if 'forever' or not set, effects never wear off.&lt;br /&gt;
** {{DevFeature1.11}} if 'turn', effects only last until the start of the units next turn (when the unit refreshes movement and attacks). (Like other start-of-turn behavior, objects with a duration of &amp;quot;turn&amp;quot; won't expire before turn 2.)&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. The first unit found that matches the filter will be given the object. Only on-map units are considered. If no unit matches or no [filter] is supplied, it is tried to apply the object to the unit at the $x1,$y1 location of the event where this [object] is in. The case of no unit being at that spot is handled in the same way as no unit matching a given filter ([else] commands executed, cannot_use_message displayed)&lt;br /&gt;
* '''[then]''': a subtag that lets you execute actions if the filter conditions are met.  The most common action that should be inside here is a '''[remove_item]''' tag, but you could probably put any tags that otherwise work in a [then] tag.&lt;br /&gt;
* '''[else]''': a subtag that lets you execute actions if the filter conditions are *not* met.&lt;br /&gt;
* '''silent''': whether or not messages should be suppressed. Default is &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''image''': the displayed image of the object.&lt;br /&gt;
* '''name''': (translatable) displayed as a caption of the image.&lt;br /&gt;
&lt;br /&gt;
* '''description''': (translatable) displayed as a message of the image.&lt;br /&gt;
* '''cannot_use_message''': (translatable) displayed instead of '''description''' if no unit passes the filter test.&lt;br /&gt;
&lt;br /&gt;
=== [remove_shroud] ===&lt;br /&gt;
Removes some shroud from the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
* '''side''': (default=1) the side for which to remove shroud. This can be a comma-separated list of sides. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* [[StandardLocationFilter]]: the range of tiles for which shroud should be removed&lt;br /&gt;
&lt;br /&gt;
=== [place_shroud] ===&lt;br /&gt;
Places some shroud on the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
* '''side''': (default=1) the side for which to place shroud. This can be a comma-separated list. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* [[StandardLocationFilter]]: the range of tiles on which shroud should be placed&lt;br /&gt;
&lt;br /&gt;
=== [lift_fog] ===&lt;br /&gt;
{{DevFeature1.11}}Lifts the fog of war from parts of the map for a certain side (only relevant for sides that have fog=yes), allowing a player to witness what occurs there even if that player has no units within vision range.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] indicating which sides should be affected.&lt;br /&gt;
* [[StandardLocationFilter]]: the tiles from which fog should be lifted.&lt;br /&gt;
* '''multiturn''': ''yes/no, default:no''. The default (not multiturn) causes fog to be removed in the same way that normal vision works; the cleared tiles will remain cleared until fog is recalculated (which normally happens when a side ends its turn). When multiturn is set to &amp;quot;yes&amp;quot;, the cleared tiles remain clear until {{tag||reset_fog}} cancels the clearing. This allows tiles to remain clear for multiple turns, or to be refogged before the end of the current turn (without also refogging all tiles). Multiturn lifted fog is not shared with allies (even when share_view=yes).&lt;br /&gt;
&lt;br /&gt;
=== [reset_fog] ===&lt;br /&gt;
{{DevFeature1.11}}The primary use of this tag is to remove multiturn lifted fog (created by {{tag||lift_fog}}), which causes the fog to reset to what it would have been had WML not interfered. (That is, hexes that a side's units could not see at any point this turn will be re-fogged, while seen hexes remain defogged.)&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] indicating which sides should be affected.&lt;br /&gt;
* [[StandardLocationFilter]]: the fog reset will be restricted to these tiles.&lt;br /&gt;
* '''reset_view''': ''yes/no, default: no'' If set to &amp;quot;yes&amp;quot;, then in addition to removing multiturn fog, the side's current view is canceled (independent of the SLF). This means that all hexes will become fogged for the side unless multiturn fog exists outside the tiles selected by the SLF. Normally, one would want the currently seen hexes to become clear of fog; this is done automatically at the end of many events, and it can be done manually with {{tag|InterfaceActionsWML|redraw}}.&lt;br /&gt;
Omitting both the SSF and the SLF would cancel all earlier uses of [lift_fog].&lt;br /&gt;
Additionally setting reset_view=&amp;quot;yes&amp;quot; would cause the side's entire map to be fogged (unless an ally keeps hexes clear by sharing its view).&lt;br /&gt;
&lt;br /&gt;
=== [allow_undo] ===&lt;br /&gt;
Allows the player to undo the event that this tag is inside.  Has an effect only inside moveto events.  If the move is undone, only the position of the unit will be restored; any altered variables or changes to the game will remain changed after the move is undone.  It is up to the scenario designer to avoid abusing this command.&lt;br /&gt;
* Technically, if '''[allow_undo]''' is inside an '''[event]''' with ''first_time_only=yes'' (the default setting), and the user undoes the event, then the state of the game has changed in this way: the event will not fire a second time, even though the user undid the move the first time.&lt;br /&gt;
&lt;br /&gt;
=== [heal_unit] ===&lt;br /&gt;
Heal a unit. The variable '''$heal_amount''' will be set to the exact number of points healed (i.e can be lesser than the parameter '''amount''' if the unit is fully healed). $heal_amount contains only the number of hitpoints the first unit that was found got healed.&lt;br /&gt;
*  '''[filter]''': [[StandardUnitFilter]] All matching on-map units are healed. If no filter is supplied, it is tried to take the unit at $x1, $y1.&lt;br /&gt;
*  '''[filter_second]''': [[StandardUnitFilter]] all the units matching the filter ''and'' having the ''heals'' ability will have their animation played (if ''animate'' is set to true) for each of the units healed.&lt;br /&gt;
*  '''amount''': (integer, default full) the maximum points the unit(s) will be healed. Can't set below 1 or above max_hitpoints. If &amp;quot;full&amp;quot;, sets hitpoints to max_hitpoints. Before 1.9 the default is 0.&lt;br /&gt;
*  '''animate''': a boolean which indicate if the healing animations must be played. (default no)&lt;br /&gt;
*  '''moves''': (integer, default 0) The maximum current movement points the units will be &amp;quot;healed&amp;quot;. Can't set below 0 or above max_moves. If &amp;quot;full&amp;quot;, sets moves to max_moves.&lt;br /&gt;
* '''restore_attacks''': (boolean, default no) Whether the units' attacks_left should be reset to their max_attacks (usually 1).&lt;br /&gt;
* '''restore_statuses''': (boolean, default yes) Whether standard statuses should be reset to &amp;quot;no&amp;quot;. This affects poisoned, slowed, petrified and unhealable. Before 1.9 this is always &amp;quot;no&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== [harm_unit] ===&lt;br /&gt;
Harms every unit matching the filter, for the specific damage amount.&lt;br /&gt;
*  '''[filter]''': [[StandardUnitFilter]] all matching units will be harmed (required).&lt;br /&gt;
*  '''[filter_second]''': [[StandardUnitFilter]] if present, the first matching unit will attack all the units matching the filter above.&lt;br /&gt;
*  '''amount''': the amount of damage that will be done (required).&lt;br /&gt;
*  '''alignment''': (default neutral) applies an alignment to the damage, this means that if alignment=chaotic, the damage will be increased at night and reduced at day.&lt;br /&gt;
*  '''damage_type''': if present, amount will be altered by unit resistance to the damage type specified.&lt;br /&gt;
*  '''kill''': (default yes) if yes, when an harmed unit goes to or below 0 HP, it is killed; if no its HP are set to 1.&lt;br /&gt;
*  '''fire_event''': (default no) if yes, when a unit is killed by harming, the corresponding events are fired.&lt;br /&gt;
*  '''animate''': (default no) if yes, scrolls to each unit before harming it and plays its defense (or attack, if it's the harmer) and death animations. Special values supported, other than the usual yes and no, are &amp;quot;attacker&amp;quot;, that means only the harmer will be animated, and &amp;quot;defender&amp;quot;, that means only the harmed units will be animated.&lt;br /&gt;
*  '''[primary_attack], [secondary_attack]''': these set the weapon against which the harmed units will defend, and that the harming unit will use to attack, respectively (notice this is the opposite of '''[filter]''' and '''[filter_second]''' above). This allows for playing specific defense and attack animations. Both tags are expected to contain a [[FilterWML#Filtering_Weapons|Standard Weapon Filter]].&lt;br /&gt;
*  '''delay''': if animate=yes, sets the delay (in milliseconds, default 500) between each unit harming.&lt;br /&gt;
*  '''variable''': if present, the damage caused to the unit, altered by resistances, will be stored in a WML array with the given name, under the &amp;quot;harm_amount&amp;quot; key.&lt;br /&gt;
*  '''poisoned, slowed, petrified, unhealable''': (default no) if yes, every harmed unit that doesn't already have such status will have it set.&lt;br /&gt;
*  '''experience''': if yes, and there is an harmer, experience will be attributed like in regular combat.&lt;br /&gt;
*  '''resistance_multiplier''': {{DevFeature1.11}} the harmed unit's resistance is multiplied by the supplied value; this means that a value lower than 1 increases it, and a value greater than 1 decreases it. Default value is 1, that means no modification.&lt;br /&gt;
&lt;br /&gt;
=== [time_area] ===&lt;br /&gt;
How a day should progress in a given area. Everywhere not specified in a [time_area] tag is affected by the [time] tags in the [scenario] tag.&lt;br /&gt;
* [[StandardLocationFilter]]: the locations to affect. ''note: only for [event][time_area]s - at scenario toplevel [time_area] does not support [[StandardLocationFilter]], only location ranges''&lt;br /&gt;
* [[TimeWML]]: the new schedule.&lt;br /&gt;
* '''id''': an unique identifier assigned to a time_area. Optional, unless you want to remove the time_area later. Can be a comma-separated list when removing time_areas, see below.&lt;br /&gt;
* '''remove''': (boolean) yes/no value. Indicates whether the specified time_area should be removed. Requires an identifier. If no identifier is used, however, all time_areas are removed.&lt;br /&gt;
&lt;br /&gt;
=== [end_turn] ===&lt;br /&gt;
End the current side's turn. The current event is finished before the turn is ended. Also, if the current event (where the tag appears) has been fired by another event, that event (and the complete stack of other possible parent events) is ended before [end_turn] comes into affect. Also, events following the event stack that fired [end_turn] are not omitted (e.g. [end_turn] is used by a side turn event and a turn refresh event does something afterwards).&lt;br /&gt;
&lt;br /&gt;
=== [replace_map] ===&lt;br /&gt;
&lt;br /&gt;
Replaces the entire map.&lt;br /&gt;
* '''map''': Content of a wesnoth map file. example:&lt;br /&gt;
 map=&amp;quot;{campaigns/Heir_To_The_Throne/maps/01_The_Elves_Besieged.map}&amp;quot;&lt;br /&gt;
* '''expand''': if 'yes', allows the map size to increase. The expansion direction is currently always bottom-right.&lt;br /&gt;
* '''shrink''': if 'yes', allows the map size to decrease. If the map size is reduced, any units that would no longer be on the map due to its coordinates no longer existing will be put into the recall list.&lt;br /&gt;
&lt;br /&gt;
=== [replace_schedule] ===&lt;br /&gt;
Replace the time of day schedule of the entire scenario.&lt;br /&gt;
* [[TimeWML]]: the new schedule.&lt;br /&gt;
&lt;br /&gt;
=== [tunnel] ===&lt;br /&gt;
&lt;br /&gt;
Create a tunnel between some locations, later usable by units to move from source hex to target hex (using the movement cost of unit on the target terrain). ([http://forums.wesnoth.org/viewtopic.php?f=21&amp;amp;t=14749&amp;amp;p=405667&amp;amp;hilit=tunnel#p405667 source])&lt;br /&gt;
&lt;br /&gt;
* '''id''' identifier for the tunnel, to allow removing (optional).&lt;br /&gt;
* '''remove''': (boolean) yes/no value. If yes, removes all defined tunnels with the same ID (then only id= is necessary). (default: no)&lt;br /&gt;
* '''bidirectional''': (boolean) if yes, creates also a tunnel in the other direction. (default: yes)&lt;br /&gt;
* '''always_visible''': (boolean) if yes, the possible movement of enemies under fog can be seen. (default: no)&lt;br /&gt;
* '''[source]''': [[StandardLocationFilter]] the source hex(es) (required).&lt;br /&gt;
* '''[target]''': [[StandardLocationFilter]] the target hex(es) (required).&lt;br /&gt;
* '''[filter]''': [[StandardUnitFilter]] the units which can use the tunnel (required). Leave empty for &amp;quot;all units&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(Note: The tunnel tag can also be used inside the [[AbilitiesWML|[teleport]]] ability, without remove= and id=).&lt;br /&gt;
&lt;br /&gt;
== Useful Macros ==&lt;br /&gt;
There are some predefined macros that you find useful for direct actions. You can find a complete list along with a detailed explanation of how they work [http://www.wesnoth.org/macro-reference.xhtml here].&lt;br /&gt;
* '''{MOVE_UNIT}''': Moves a unit to another location in the map and the player sees the movement (unlike [teleport])&lt;br /&gt;
* '''{FULL_HEAL}''': Brings a unit to full HP&lt;br /&gt;
* '''{LOYAL_UNIT}''': Create a loyal unit&lt;br /&gt;
* '''{MODIFY_TERRAIN_MASK}''': Modify an area of terrain&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[InternalActionsWML]]&lt;br /&gt;
* [[InterfaceActionsWML]]&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;br /&gt;
[[Category: ActionsWML]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=46921</id>
		<title>DirectActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=46921"/>
		<updated>2012-08-04T18:27:14Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* [unstore_unit] */ document [unstore_unit]animate=&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== Direct actions ==&lt;br /&gt;
&lt;br /&gt;
Direct actions are actions that have a direct effect on gameplay. They can be used inside of [[EventWML|events]].&lt;br /&gt;
&lt;br /&gt;
The following tags are actions:&lt;br /&gt;
&lt;br /&gt;
=== [endlevel] ===&lt;br /&gt;
Ends the scenario.&lt;br /&gt;
* '''result''': before the scenario is over, all events with ''name=result'' are triggered. If ''result=victory'', the player progresses to the next level; if ''result=defeat'', the game returns to the main menu. &lt;br /&gt;
&lt;br /&gt;
When the result is &amp;quot;victory&amp;quot; the following keys can be used:&lt;br /&gt;
* '''bonus''': whether the player should get bonus gold (maximum possible gold that could have been earned by waiting the level out). The default is bonus=yes.&lt;br /&gt;
* '''carryover_report''': whether the player should receive a summary of the scenario outcome, the default is carryover_report=yes.&lt;br /&gt;
* '''save''': whether a start-of-scenario save should be created for the next scenario, the default is save=yes. Do not confuse this with saving of replays for the current scenario.&lt;br /&gt;
* '''replay_save''': whether a replay save for the current scenario is allowed, the default is replay_save=yes. If yes, the player's settings in preferences will be used to determine if a replay is saved. If no, will override and not save a replay.&lt;br /&gt;
* '''linger_mode''': If ...=yes, the screen is greyed out and there's the possibility to save before advancing to the next scenario, the default is linger_mode=yes.&lt;br /&gt;
* '''reveal_map''': (Multiplayer only) (Default is 'yes') If 'no', shroud doesn't disappear when game ended.&lt;br /&gt;
* '''next_scenario''': (default specified in '''[scenario]''' tag) the ID of the next scenario that should be played.  All units that side 1 controls at this point become available for recall in ''next_scenario''.&lt;br /&gt;
* '''carryover_percentage''': by default 80% of the gold is carried over to the next scenario, with this key the amount can be changed.&lt;br /&gt;
* '''carryover_add''': if true the gold will be added to the starting gold the next scenario, if false the next scenario will start with the amount of the current scenario (after taxes) or the minimum in the next scenario. Default is false.&lt;br /&gt;
* '''music''': (default specified in '''[scenario]''' or '''[game_config]''' tags) a comma-separated list of music tracks from which one will be chosen and played once after any events related to the end of level result are executed; by default, victory_music is used on victory, and defeat_music on defeat.&lt;br /&gt;
* '''end_credits''': {{DevFeature1.11}} Whether to display the credits screen at the end of a single-player campaign. Defaults to ''yes''. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
* '''end_text''': (translatable) Text that is shown centered in a black screen at the end of a campaign. Defaults to &amp;quot;The End&amp;quot;. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
* '''end_text_duration''': Delay, in milliseconds, before displaying the game credits at the end of a campaign. In other words, for how much time '''end_text''' is displayed on screen. Defaults to 3500. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
&lt;br /&gt;
=== [unit] ===&lt;br /&gt;
Places a unit on the map.  For syntax see [[SingleUnitWML]].&lt;br /&gt;
* {{Short Note:Predefined Macro|GENERIC_UNIT}}&lt;br /&gt;
* '''to_variable''':  spawn directly into a variable instead of on the map.&lt;br /&gt;
&lt;br /&gt;
=== [recall] ===&lt;br /&gt;
Recalls a unit.  The unit is recalled free of charge, and is placed near the leader.&lt;br /&gt;
* [[StandardUnitFilter]]: the first matching unit will be recalled.  If no units match this tag is ignored. Do not use a [filter] tag. If a comma separated list is given, every unit currently considered for recall is checked against all the types (not each single one of the types against all units).&lt;br /&gt;
* '''x,y''': the unit is placed here instead of next to the leader.&lt;br /&gt;
* '''show''': yes/no, default yes: whether the unit is animated (faded in) or instantly displayed&lt;br /&gt;
* '''fire_event''': boolean yes|no (default no); whether any according prerecall or recall events shall be fired.&lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): If yes, checks for terrain passability when placing the unit (a nearby passable hex is chosen).&lt;br /&gt;
&lt;br /&gt;
=== [teleport] ===&lt;br /&gt;
Teleports a unit on map. {{Short Note:Predefined Macro|TELEPORT_UNIT}}&lt;br /&gt;
* '''[filter]''': [[StandardUnitFilter]] the first unit matching this filter will be teleported.&lt;br /&gt;
* '''x,y''': the position to teleport to.&lt;br /&gt;
* '''clear_shroud''': should shroud be cleared on arrival&lt;br /&gt;
* '''animate''': should a teleport animation be played (if the unit doesn't have a teleport animation, it will fade out/fade in)&lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): normally, units will not be teleported into terrain that is impassable for them. Setting this attribute to &amp;quot;no&amp;quot; permits it.&lt;br /&gt;
&lt;br /&gt;
(Note: There is also a ability named teleport, see [[AbilitiesWML]].)&lt;br /&gt;
&lt;br /&gt;
=== [terrain_mask] ===&lt;br /&gt;
Changes the terrain on the map.  See [[TerrainMaskWML]].&lt;br /&gt;
&lt;br /&gt;
=== [terrain] ===&lt;br /&gt;
Changes the terrain on the map.&lt;br /&gt;
* '''terrain''': the character of the terrain to use.  See [[TerrainCodesWML]] to see what letter a type of terrain uses.&lt;br /&gt;
* [[StandardLocationFilter]]. This [[StandardLocationFilter]]'s terrain= key is used for the new terrain, filtering by terrain can be done with a nested [[StandardLocationFilter]]: [and]terrain=terrain_string_to_be_filtered_for.&lt;br /&gt;
* '''layer''': (overlay|base|both, default=both) only change the specified layer.&lt;br /&gt;
* '''replace_if_failed''': (default=no) When replacing just one layer failed, try to replace the whole terrain. If '''terrain''' is an overlay only terrain, use the default_base as base layer. If the terrain has no default base, do nothing.&lt;br /&gt;
&lt;br /&gt;
=== [gold] ===&lt;br /&gt;
Gives sides gold.&lt;br /&gt;
* '''amount''': the amount of gold to give.&lt;br /&gt;
* '''side''': (default=1) the number of the side to give the gold to. Can be a comma-separated list of sides. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument {{DevFeature1.11}}: [gold][filter_side] is deprecated, use the new inline SSF.&lt;br /&gt;
&lt;br /&gt;
=== [unstore_unit] ===&lt;br /&gt;
Creates a unit from a game variable, and activates it on the playing field.  This must be a specific variable describing a unit, and may not be an array -- to unstore an entire array, iterate over it.  The variable is not cleared.  See also [[InternalActionsWML#.5Bstore_unit.5D|[store_unit]]], [[ConditionalActionsWML#.5Bwhile.5D|[while]]] and [[InternalActionsWML#.5Bclear_variable.5D|[clear_variable]]].&lt;br /&gt;
* '''variable''': the name of the variable.&lt;br /&gt;
* '''find_vacant''': whether the unit should be placed on the nearest vacant tile to its specified location.  If this is set to 'no'(default), then any unit on the same tile as the unit being unstored will be destroyed. &lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): If yes, checks for terrain passability when placing the unit. This key has no effect if find_vacant=no (no check performed then). Before 1.9 this key is always &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''text''': (translatable) floating text to display above the unit, such as a damage amount&lt;br /&gt;
* '''red''', '''green''', '''blue''': (default=0,0,0) the color to display the text in. Values vary from 0-255. You may find it convenient to use the {COLOR_HARM} or {COLOR_HEAL} macro instead. (Use {COLOR_HARM} or {COLOR_HEAL} instead of the whole red,green,blue= line.)&lt;br /&gt;
* '''advance''': (default=true) if true the unit is advanced if it has enough XP. When modifying XP make sure to do it from inside a [[EventWML#Multiplayer_safety|synchronized event]] or it may lead to OOS errors especially when several advancement paths exist. Note that advance and post advance events are called, so infinite loops can happen.&lt;br /&gt;
* '''fire_event''': (boolean yes|no, default no) Whether any advance/post advance events shall be fired if an advancement takes place, no effect otherwise.&lt;br /&gt;
* '''animate''': (boolean yes|no, default yes) Whether &amp;quot;levelout&amp;quot; and &amp;quot;levelin&amp;quot; (or fade to white and back) animations shall be played if an advancement takes place, no effect otherwise.&lt;br /&gt;
* '''x''' ,'''y''': override unit location, &amp;quot;x,y=recall,recall&amp;quot; will put the unit on the unit's side's recall list.&lt;br /&gt;
Units can be unstored with negative (or zero) hit points. Such units will be automatically hit (and killed) in combat, but if given the chance to heal, they will have a minimum of one hit point after healing (regardless of how negative their hit points were). This is unusual-looking behavior, so often should be avoided.&amp;lt;!-- A known use-case is using [unstore_unit] to modify a unit during its last_breath event. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [allow_recruit] ===&lt;br /&gt;
Allows a side to recruit units it couldn't previously recruit.&lt;br /&gt;
* '''type''': the types of units that the side can now recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that is being allowed to recruit the units. This can be a comma-separated list note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [allow_extra_recruit] ===&lt;br /&gt;
Allows a leader to recruit units it couldn't previously recruit.&lt;br /&gt;
These types add to the types the leader can recruit because of [side]recruit=.&lt;br /&gt;
* '''extra_recruit''': the types of units that the unit can now recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_recruit] ===&lt;br /&gt;
Prevents a side from recruiting units it could previously recruit.&lt;br /&gt;
* '''type''': the types of units that the side can no longer recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that may no longer recruit the units. This can be a comma-separated list note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_extra_recruit] ===&lt;br /&gt;
Prevents a leader from recruiting units it could previously recruit.&lt;br /&gt;
* '''extra_recruit''': the types of units that the side can no longer recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [set_recruit] ===&lt;br /&gt;
Sets the units a side can recruit.&lt;br /&gt;
* '''recruit''': the types of units that the side can now recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that is having its recruitment set. This can be a comma-separated list. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [set_extra_recruit] === &lt;br /&gt;
Sets the units a leader can recruit.&lt;br /&gt;
* '''extra_recruit''': the types of units that the leader can now recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [modify_side] ===&lt;br /&gt;
Modifies some details of a given side in the middle of a scenario.  '''The following listed properties are the only properties that [modify_side] can affect!'''&lt;br /&gt;
* '''side''': (default=1) the number of the side that is to be changed. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* '''income''': the income given at the begining of each turn.&lt;br /&gt;
* '''recruit''': a list of unit types, replacing the side's current recruitment list.&lt;br /&gt;
* '''team_name''': the team in which the side plays the scenario.&lt;br /&gt;
* '''user_team_name''': a translatable string representing the team's description. This has no effect on alliances. Defaults to ''team_name''.&lt;br /&gt;
* '''gold''': the amount of gold the side owns.&lt;br /&gt;
* '''village_gold''': the income setting per village for the side.&lt;br /&gt;
* '''controller''': the identifier string of the side's controller. Uses the same syntax of the ''controller'' key in the [[SideWML|[side]]] tag.&lt;br /&gt;
* '''fog''': a boolean string (yes/no) describing the status of Fog for the side.&lt;br /&gt;
* '''shroud''': a boolean string describing the status of Shroud for the side.&lt;br /&gt;
* '''hidden''': a boolean string specifying whether side is shown in status table.&lt;br /&gt;
* '''color''': {{DevFeature1.11}} a team color range specification, name (e.g. &amp;quot;red&amp;quot;, &amp;quot;blue&amp;quot;), or number (e.g. &amp;quot;1&amp;quot;, &amp;quot;2&amp;quot;) for this side. The default color range names, numbers, and definitions can be found in data/core/team_colors.cfg.&lt;br /&gt;
* '''[ai]''': replaces a side's AI parameters with the new specified ones. Uses the same syntax described in [[AiWML]].&lt;br /&gt;
* '''switch_ai''': replaces a side ai with a new AI from specified file(ignoring those AI parameters above). Path to file follows the usual WML convention.&lt;br /&gt;
* '''reset_maps''': {{DevFeature1.11}} If set to &amp;quot;yes&amp;quot;, then the shroud is spread to all hexes, covering the parts of the map that had already been explored by the side, including hexes currently seen. (Seen hexes will be cleared at the end of most events; they can also be manually cleared with {{tag|InterfaceActionsWML|redraw}}.) This is only effective if shroud is on, but this is evaluated after shroud= (and before shroud_data=).&lt;br /&gt;
* '''reset_view''': {{DevFeature1.11}} If set to &amp;quot;yes&amp;quot;, then the fog of war is spread to all hexes, covering the parts of the map that had already been seen this turn by the side, including hexes currently seen, excluding hexes affected by multi-turn {{tag|DirectActionsWML|lift_fog}}. (Seen hexes will be cleared at the end of most events; they can also be manually cleared with {{tag|InterfaceActionsWML|redraw}}.) This is only effective if fog is on, but this is evaluated after fog=.&lt;br /&gt;
* '''share_maps''': change the share_maps side attribute. Be sure to use shroud=yes for that side and have it as an ally&lt;br /&gt;
* '''share_view''': change the share_view side attribute. Be sure to use fog=yes for that side and have it as an ally&lt;br /&gt;
* '''shroud_data''': changes to the side's shroud, using the same format as when defining the [side].&lt;br /&gt;
&lt;br /&gt;
=== [modify_turns] ===&lt;br /&gt;
Modifies the turn limit in the middle of a scenario.&lt;br /&gt;
* '''value''': the new turn limit.&lt;br /&gt;
* '''add''': if used instead of ''value'', specifies the number of turns to add to the current limit (can be negative).&lt;br /&gt;
* '''current''': changes the current turn number after applying turn limit modifications, if any. It is not possible to change the turn number to exceed the turn limit (1 &amp;lt;= current turns &amp;lt;= max turns).&lt;br /&gt;
&lt;br /&gt;
=== [allow_end_turn] ===&lt;br /&gt;
Allows human players to end their turn through the user interface if they were previously affected by the '''[disallow_end_turn]''' action. This action doesn't take any arguments.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_end_turn] ===&lt;br /&gt;
Disallows human players to end their turn through the user interface. This action doesn't take any arguments.&lt;br /&gt;
&lt;br /&gt;
=== [capture_village] ===&lt;br /&gt;
Changes the ownership of a village.&lt;br /&gt;
* [[StandardLocationFilter]]: all village locations matching the filter are affected.&lt;br /&gt;
* '''side''': the side that takes control of the village. This side needs to have a leader (canrecruit=yes). If the side key is not given, the village will become neutral (unless [filter_side] is present, in which case that side fiter decides, see below).&lt;br /&gt;
* '''[filter_side]''' with [[StandardSideFilter]] tags and keys as arguments; if both this tag and inline side= are present it's an error. Otherwise, the first matching side gets ownership (or the village becomes neutral if none match).&lt;br /&gt;
* '''fire_event''' (boolean yes|no, default: no): Whether any capture events shall be fired.&lt;br /&gt;
&lt;br /&gt;
=== [kill] ===&lt;br /&gt;
Removes all units (including units in a recall list) that match the filter from the game.&lt;br /&gt;
* [[StandardUnitFilter]]: Selection criterion; do not use a [filter] tag.&lt;br /&gt;
* '''animate''': if 'yes', displays the unit dying (fading away).&lt;br /&gt;
* '''fire_event''': if 'yes', triggers any appropriate 'die' events (See [[EventWML]]). Note that events are only fired for killed units that have been on the map (as opposed to recall list).&lt;br /&gt;
* '''[secondary_unit]''' with a [[StandardUnitFilter]] as argument. Do not use a [filter] tag. Has an effect only if fire_event=yes. The first on-map unit matching the filter becomes second_unit in any fired die and last breath events. If an on-map unit matches and if there are several units killed with a single [kill] tag, second_unit is this same unit for all of them. If no on-map unit matches or [secondary_unit] isn't present, the variable second_unit in each of the die and last breath events is always the same as the variable unit (the dying unit).&lt;br /&gt;
&lt;br /&gt;
=== [move_unit] ===&lt;br /&gt;
works like the MOVE_UNIT macro.&lt;br /&gt;
* [[StandardUnitFilter]] as argument; do not use a [filter] tag. All units matching the filter are moved. If the target location is occupied, the nearest free location is chosen.&lt;br /&gt;
* '''to_x''' (unsigned integer): The units are moved to this x coordinate. Can be a comma-separated list, in which case the unit follows this given path during the move.&lt;br /&gt;
* '''to_y''' (unsigned integer): The units are moved to this y coordinate. Can be a comma-separated list.&lt;br /&gt;
* '''fire_event''' (optional, boolean yes|no, default no): Whether any according moveto events shall be fired. The target location ($x1, $y1 in the event) may not be the same location that the unit was tried to be moved to, if the original target location is occupied or impassable.&lt;br /&gt;
* '''check_passability''' (boolean yes|no, default yes): Whether the terrain the unit is moved to should be checked for suiting the unit. (If it does not, a nearby suitable hex is chosen.)&lt;br /&gt;
&lt;br /&gt;
=== [modify_ai] ===&lt;br /&gt;
Changes AI objects (aspects, goals, candidate actions or stages) for a specified side. See [[AiWML#Adding_and_Deleting_Aspects_with_the_.5Bmodify_ai.5D_Tag|AiWML]] for full description.&lt;br /&gt;
&lt;br /&gt;
* '''action''' (string): Takes values 'add', 'change', 'delete' or 'try_delete' to do just that for the AI object.&lt;br /&gt;
* '''path''' (string): Describes which AI object is to be modified.  &lt;br /&gt;
* '''[facet]''', '''[goal]''', '''[candidate_action]''' or '''[stage]''': Details about the AI object to be modified.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument {{DevFeature1.11}}: [modify_ai][filter_side] is deprecated, use the new inline SSF.&lt;br /&gt;
&lt;br /&gt;
=== [modify_unit] ===&lt;br /&gt;
works similar to the MODIFY_UNIT macro.&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. All units matching this filter are modified. Matches on recall list units too.&lt;br /&gt;
* Accepts generally the syntax inside of wml unit variables created by [store_unit] which can be viewed in a savefile or by using the :inspect command. Can add traits with immediate effect. Cannot remove things. Subtags with the same name must be written in the correct order to match them with the tag they are supposed to modify.&lt;br /&gt;
example usage (see also the test scenario):&lt;br /&gt;
 [modify_unit]&lt;br /&gt;
   [filter]&lt;br /&gt;
     x,y=38,6&lt;br /&gt;
   [/filter]&lt;br /&gt;
   hitpoints=10&lt;br /&gt;
   {TRAIT_HEALTHY}&lt;br /&gt;
 [/modify_unit]&lt;br /&gt;
&lt;br /&gt;
The unit which is currently modified is accessible via $this_unit, e.g. hitpoints = &amp;quot;$($this_unit.hitpoints / 2)&amp;quot; to set the hitpoints of all units to half of their particular maxima. This this_unit variable is independent from the this_unit variable available in the SUF used to determine which units to modify (first all matching units are gathered, and then all those are modified).&lt;br /&gt;
&lt;br /&gt;
note: The syntax allowed is somehow vague. Just try things and possibly correct/add/modify this documentation. (a [http://forums.wesnoth.org/viewtopic.php?f=21&amp;amp;t=31676&amp;amp; forum thread] discusses some related issues).&lt;br /&gt;
&lt;br /&gt;
=== [transform_unit] ===&lt;br /&gt;
transforms every unit matching the filter to the given unit type. Keeps intact hitpoints, experience and status. If the unit is transformed to a non-living type (undead or mechanical), it will be also unpoisoned.&lt;br /&gt;
* [[StandardUnitFilter]]: do not use a [filter] tag.&lt;br /&gt;
* '''transform_to''': the unit type in which all the units matching the filter will be transformed. If missing, the units will follow their normal advancement.&lt;br /&gt;
&lt;br /&gt;
=== [petrify] ===&lt;br /&gt;
&lt;br /&gt;
* [[StandardUnitFilter]] as an argument. Do not use a [filter] tag. All units matching this filter are petrified. Recall list units are included.&lt;br /&gt;
&lt;br /&gt;
=== [unpetrify] ===&lt;br /&gt;
* [[StandardUnitFilter]] as an argument. Do not use a [filter] tag. All units matching this filter are unpetrified. Recall list units are included.&lt;br /&gt;
&lt;br /&gt;
=== [object] ===&lt;br /&gt;
Gives some unit an object and removes all items on the tile the unit is on.&lt;br /&gt;
* '''id''': (Optional) when the object is picked up, a flag is set for ''id''.  The object cannot be picked up if a flag for ''id'' has been set.  This means that any object with an id can only be used once, even if first_time_only=no is set for the event. This restriction is per level. In a campaign objects with the same id can be assigned once per level.&lt;br /&gt;
* '''delayed_variable_substitution''' (boolean yes|no, default no): If set to &amp;quot;yes&amp;quot;, the wml block contained in this [object] is not variable-substituted at execution time of the event where this [object] is within. You need this to work around a bug when adding ABILITY_TELEPORT via an [object] or when using [object][effect][filter]with a $this_unit (see http://gna.org/bugs/index.php?18893).&lt;br /&gt;
* '''[effect]''': one or more effect elements may be listed.  See [[EffectWML]] for a description of [effect].&lt;br /&gt;
* '''duration''':&lt;br /&gt;
**if 'level', effects only last until the end of the level (note : 'level' is the scenario, so this doesn't mean it last until the unit levels-up). {{DevFeature1.11}} 'level' has been renamed to 'scenario'.&lt;br /&gt;
**if 'forever' or not set, effects never wear off.&lt;br /&gt;
** {{DevFeature1.11}} if 'turn', effects only last until the start of the units next turn (when the unit refreshes movement and attacks). (Like other start-of-turn behavior, objects with a duration of &amp;quot;turn&amp;quot; won't expire before turn 2.)&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. The first unit found that matches the filter will be given the object. Only on-map units are considered. If no unit matches or no [filter] is supplied, it is tried to apply the object to the unit at the $x1,$y1 location of the event where this [object] is in. The case of no unit being at that spot is handled in the same way as no unit matching a given filter ([else] commands executed, cannot_use_message displayed)&lt;br /&gt;
* '''[then]''': a subtag that lets you execute actions if the filter conditions are met.  The most common action that should be inside here is a '''[remove_item]''' tag, but you could probably put any tags that otherwise work in a [then] tag.&lt;br /&gt;
* '''[else]''': a subtag that lets you execute actions if the filter conditions are *not* met.&lt;br /&gt;
* '''silent''': whether or not messages should be suppressed. Default is &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''image''': the displayed image of the object.&lt;br /&gt;
* '''name''': (translatable) displayed as a caption of the image.&lt;br /&gt;
&lt;br /&gt;
* '''description''': (translatable) displayed as a message of the image.&lt;br /&gt;
* '''cannot_use_message''': (translatable) displayed instead of '''description''' if no unit passes the filter test.&lt;br /&gt;
&lt;br /&gt;
=== [remove_shroud] ===&lt;br /&gt;
Removes some shroud from the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
* '''side''': (default=1) the side for which to remove shroud. This can be a comma-separated list of sides. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* [[StandardLocationFilter]]: the range of tiles for which shroud should be removed&lt;br /&gt;
&lt;br /&gt;
=== [place_shroud] ===&lt;br /&gt;
Places some shroud on the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
* '''side''': (default=1) the side for which to place shroud. This can be a comma-separated list. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* [[StandardLocationFilter]]: the range of tiles on which shroud should be placed&lt;br /&gt;
&lt;br /&gt;
=== [lift_fog] ===&lt;br /&gt;
{{DevFeature1.11}}Lifts the fog of war from parts of the map for a certain side (only relevant for sides that have fog=yes), allowing a player to witness what occurs there even if that player has no units within vision range.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] indicating which sides should be affected.&lt;br /&gt;
* [[StandardLocationFilter]]: the tiles from which fog should be lifted.&lt;br /&gt;
* '''multiturn''': ''yes/no, default:no''. The default (not multiturn) causes fog to be removed in the same way that normal vision works; the cleared tiles will remain cleared until fog is recalculated (which normally happens when a side ends its turn). When multiturn is set to &amp;quot;yes&amp;quot;, the cleared tiles remain clear until {{tag||reset_fog}} cancels the clearing. This allows tiles to remain clear for multiple turns, or to be refogged before the end of the current turn (without also refogging all tiles). Multiturn lifted fog is not shared with allies (even when share_view=yes).&lt;br /&gt;
&lt;br /&gt;
=== [reset_fog] ===&lt;br /&gt;
{{DevFeature1.11}}The primary use of this tag is to remove multiturn lifted fog (created by {{tag||lift_fog}}), which causes the fog to reset to what it would have been had WML not interfered. (That is, hexes that a side's units could not see at any point this turn will be re-fogged, while seen hexes remain defogged.)&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] indicating which sides should be affected.&lt;br /&gt;
* [[StandardLocationFilter]]: the fog reset will be restricted to these tiles.&lt;br /&gt;
* '''reset_view''': ''yes/no, default: no'' If set to &amp;quot;yes&amp;quot;, then in addition to removing multiturn fog, the side's current view is canceled (independent of the SLF). This means that all hexes will become fogged for the side unless multiturn fog exists outside the tiles selected by the SLF. Normally, one would want the currently seen hexes to become clear of fog; this is done automatically at the end of many events, and it can be done manually with {{tag|InterfaceActionsWML|redraw}}.&lt;br /&gt;
Omitting both the SSF and the SLF would cancel all earlier uses of [lift_fog].&lt;br /&gt;
Additionally setting reset_view=&amp;quot;yes&amp;quot; would cause the side's entire map to be fogged (unless an ally keeps hexes clear by sharing its view).&lt;br /&gt;
&lt;br /&gt;
=== [allow_undo] ===&lt;br /&gt;
Allows the player to undo the event that this tag is inside.  Has an effect only inside moveto events.  If the move is undone, only the position of the unit will be restored; any altered variables or changes to the game will remain changed after the move is undone.  It is up to the scenario designer to avoid abusing this command.&lt;br /&gt;
* Technically, if '''[allow_undo]''' is inside an '''[event]''' with ''first_time_only=yes'' (the default setting), and the user undoes the event, then the state of the game has changed in this way: the event will not fire a second time, even though the user undid the move the first time.&lt;br /&gt;
&lt;br /&gt;
=== [heal_unit] ===&lt;br /&gt;
Heal a unit. The variable '''$heal_amount''' will be set to the exact number of points healed (i.e can be lesser than the parameter '''amount''' if the unit is fully healed). $heal_amount contains only the number of hitpoints the first unit that was found got healed.&lt;br /&gt;
*  '''[filter]''': [[StandardUnitFilter]] All matching on-map units are healed. If no filter is supplied, it is tried to take the unit at $x1, $y1.&lt;br /&gt;
*  '''[filter_second]''': [[StandardUnitFilter]] all the units matching the filter ''and'' having the ''heals'' ability will have their animation played (if ''animate'' is set to true) for each of the units healed.&lt;br /&gt;
*  '''amount''': (integer, default full) the maximum points the unit(s) will be healed. Can't set below 1 or above max_hitpoints. If &amp;quot;full&amp;quot;, sets hitpoints to max_hitpoints. Before 1.9 the default is 0.&lt;br /&gt;
*  '''animate''': a boolean which indicate if the healing animations must be played. (default no)&lt;br /&gt;
*  '''moves''': (integer, default 0) The maximum current movement points the units will be &amp;quot;healed&amp;quot;. Can't set below 0 or above max_moves. If &amp;quot;full&amp;quot;, sets moves to max_moves.&lt;br /&gt;
* '''restore_attacks''': (boolean, default no) Whether the units' attacks_left should be reset to their max_attacks (usually 1).&lt;br /&gt;
* '''restore_statuses''': (boolean, default yes) Whether standard statuses should be reset to &amp;quot;no&amp;quot;. This affects poisoned, slowed, petrified and unhealable. Before 1.9 this is always &amp;quot;no&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== [harm_unit] ===&lt;br /&gt;
Harms every unit matching the filter, for the specific damage amount.&lt;br /&gt;
*  '''[filter]''': [[StandardUnitFilter]] all matching units will be harmed (required).&lt;br /&gt;
*  '''[filter_second]''': [[StandardUnitFilter]] if present, the first matching unit will attack all the units matching the filter above.&lt;br /&gt;
*  '''amount''': the amount of damage that will be done (required).&lt;br /&gt;
*  '''alignment''': (default neutral) applies an alignment to the damage, this means that if alignment=chaotic, the damage will be increased at night and reduced at day.&lt;br /&gt;
*  '''damage_type''': if present, amount will be altered by unit resistance to the damage type specified.&lt;br /&gt;
*  '''kill''': (default yes) if yes, when an harmed unit goes to or below 0 HP, it is killed; if no its HP are set to 1.&lt;br /&gt;
*  '''fire_event''': (default no) if yes, when a unit is killed by harming, the corresponding events are fired.&lt;br /&gt;
*  '''animate''': (default no) if yes, scrolls to each unit before harming it and plays its defense (or attack, if it's the harmer) and death animations. Special values supported, other than the usual yes and no, are &amp;quot;attacker&amp;quot;, that means only the harmer will be animated, and &amp;quot;defender&amp;quot;, that means only the harmed units will be animated.&lt;br /&gt;
*  '''[primary_attack], [secondary_attack]''': these set the weapon against which the harmed units will defend, and that the harming unit will use to attack, respectively (notice this is the opposite of '''[filter]''' and '''[filter_second]''' above). This allows for playing specific defense and attack animations. Both tags are expected to contain a [[FilterWML#Filtering_Weapons|Standard Weapon Filter]].&lt;br /&gt;
*  '''delay''': if animate=yes, sets the delay (in milliseconds, default 500) between each unit harming.&lt;br /&gt;
*  '''variable''': if present, the damage caused to the unit, altered by resistances, will be stored in a WML array with the given name, under the &amp;quot;harm_amount&amp;quot; key.&lt;br /&gt;
*  '''poisoned, slowed, petrified, unhealable''': (default no) if yes, every harmed unit that doesn't already have such status will have it set.&lt;br /&gt;
*  '''experience''': if yes, and there is an harmer, experience will be attributed like in regular combat.&lt;br /&gt;
*  '''resistance_multiplier''': {{DevFeature1.11}} the harmed unit's resistance is multiplied by the supplied value; this means that a value lower than 1 increases it, and a value greater than 1 decreases it. Default value is 1, that means no modification.&lt;br /&gt;
&lt;br /&gt;
=== [time_area] ===&lt;br /&gt;
How a day should progress in a given area. Everywhere not specified in a [time_area] tag is affected by the [time] tags in the [scenario] tag.&lt;br /&gt;
* [[StandardLocationFilter]]: the locations to affect. ''note: only for [event][time_area]s - at scenario toplevel [time_area] does not support [[StandardLocationFilter]], only location ranges''&lt;br /&gt;
* [[TimeWML]]: the new schedule.&lt;br /&gt;
* '''id''': an unique identifier assigned to a time_area. Optional, unless you want to remove the time_area later. Can be a comma-separated list when removing time_areas, see below.&lt;br /&gt;
* '''remove''': (boolean) yes/no value. Indicates whether the specified time_area should be removed. Requires an identifier. If no identifier is used, however, all time_areas are removed.&lt;br /&gt;
&lt;br /&gt;
=== [end_turn] ===&lt;br /&gt;
End the current side's turn. The current event is finished before the turn is ended. Also, if the current event (where the tag appears) has been fired by another event, that event (and the complete stack of other possible parent events) is ended before [end_turn] comes into affect. Also, events following the event stack that fired [end_turn] are not omitted (e.g. [end_turn] is used by a side turn event and a turn refresh event does something afterwards).&lt;br /&gt;
&lt;br /&gt;
=== [replace_map] ===&lt;br /&gt;
&lt;br /&gt;
Replaces the entire map.&lt;br /&gt;
* '''map''': Content of a wesnoth map file. example:&lt;br /&gt;
 map=&amp;quot;{campaigns/Heir_To_The_Throne/maps/01_The_Elves_Besieged.map}&amp;quot;&lt;br /&gt;
* '''expand''': if 'yes', allows the map size to increase. The expansion direction is currently always bottom-right.&lt;br /&gt;
* '''shrink''': if 'yes', allows the map size to decrease. If the map size is reduced, any units that would no longer be on the map due to its coordinates no longer existing will be put into the recall list.&lt;br /&gt;
&lt;br /&gt;
=== [replace_schedule] ===&lt;br /&gt;
Replace the time of day schedule of the entire scenario.&lt;br /&gt;
* [[TimeWML]]: the new schedule.&lt;br /&gt;
&lt;br /&gt;
=== [tunnel] ===&lt;br /&gt;
&lt;br /&gt;
Create a tunnel between some locations, later usable by units to move from source hex to target hex (using the movement cost of unit on the target terrain). ([http://forums.wesnoth.org/viewtopic.php?f=21&amp;amp;t=14749&amp;amp;p=405667&amp;amp;hilit=tunnel#p405667 source])&lt;br /&gt;
&lt;br /&gt;
* '''id''' identifier for the tunnel, to allow removing (optional).&lt;br /&gt;
* '''remove''': (boolean) yes/no value. If yes, removes all defined tunnels with the same ID (then only id= is necessary). (default: no)&lt;br /&gt;
* '''bidirectional''': (boolean) if yes, creates also a tunnel in the other direction. (default: yes)&lt;br /&gt;
* '''always_visible''': (boolean) if yes, the possible movement of enemies under fog can be seen. (default: no)&lt;br /&gt;
* '''[source]''': [[StandardLocationFilter]] the source hex(es) (required).&lt;br /&gt;
* '''[target]''': [[StandardLocationFilter]] the target hex(es) (required).&lt;br /&gt;
* '''[filter]''': [[StandardUnitFilter]] the units which can use the tunnel (required). Leave empty for &amp;quot;all units&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(Note: The tunnel tag can also be used inside the [[AbilitiesWML|[teleport]]] ability, without remove= and id=).&lt;br /&gt;
&lt;br /&gt;
== Useful Macros ==&lt;br /&gt;
There are some predefined macros that you find useful for direct actions. You can find a complete list along with a detailed explanation of how they work [http://www.wesnoth.org/macro-reference.xhtml here].&lt;br /&gt;
* '''{MOVE_UNIT}''': Moves a unit to another location in the map and the player sees the movement (unlike [teleport])&lt;br /&gt;
* '''{FULL_HEAL}''': Brings a unit to full HP&lt;br /&gt;
* '''{LOYAL_UNIT}''': Create a loyal unit&lt;br /&gt;
* '''{MODIFY_TERRAIN_MASK}''': Modify an area of terrain&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[InternalActionsWML]]&lt;br /&gt;
* [[InterfaceActionsWML]]&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;br /&gt;
[[Category: ActionsWML]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=46839</id>
		<title>DirectActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=46839"/>
		<updated>2012-07-24T17:24:33Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* [modify_unit] */ correct trait adding example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== Direct actions ==&lt;br /&gt;
&lt;br /&gt;
Direct actions are actions that have a direct effect on gameplay. They can be used inside of [[EventWML|events]].&lt;br /&gt;
&lt;br /&gt;
The following tags are actions:&lt;br /&gt;
&lt;br /&gt;
=== [endlevel] ===&lt;br /&gt;
Ends the scenario.&lt;br /&gt;
* '''result''': before the scenario is over, all events with ''name=result'' are triggered. If ''result=victory'', the player progresses to the next level; if ''result=defeat'', the game returns to the main menu. &lt;br /&gt;
&lt;br /&gt;
When the result is &amp;quot;victory&amp;quot; the following keys can be used:&lt;br /&gt;
* '''bonus''': whether the player should get bonus gold (maximum possible gold that could have been earned by waiting the level out). The default is bonus=yes.&lt;br /&gt;
* '''carryover_report''': whether the player should receive a summary of the scenario outcome, the default is carryover_report=yes.&lt;br /&gt;
* '''save''': whether a start-of-scenario save should be created for the next scenario, the default is save=yes. Do not confuse this with saving of replays for the current scenario.&lt;br /&gt;
* '''replay_save''': whether a replay save for the current scenario is allowed, the default is replay_save=yes. If yes, the player's settings in preferences will be used to determine if a replay is saved. If no, will override and not save a replay.&lt;br /&gt;
* '''linger_mode''': If ...=yes, the screen is greyed out and there's the possibility to save before advancing to the next scenario, the default is linger_mode=yes.&lt;br /&gt;
* '''reveal_map''': (Multiplayer only) (Default is 'yes') If 'no', shroud doesn't disappear when game ended.&lt;br /&gt;
* '''next_scenario''': (default specified in '''[scenario]''' tag) the ID of the next scenario that should be played.  All units that side 1 controls at this point become available for recall in ''next_scenario''.&lt;br /&gt;
* '''carryover_percentage''': by default 80% of the gold is carried over to the next scenario, with this key the amount can be changed.&lt;br /&gt;
* '''carryover_add''': if true the gold will be added to the starting gold the next scenario, if false the next scenario will start with the amount of the current scenario (after taxes) or the minimum in the next scenario. Default is false.&lt;br /&gt;
* '''music''': (default specified in '''[scenario]''' or '''[game_config]''' tags) a comma-separated list of music tracks from which one will be chosen and played once after any events related to the end of level result are executed; by default, victory_music is used on victory, and defeat_music on defeat.&lt;br /&gt;
* '''end_credits''': {{DevFeature1.11}} Whether to display the credits screen at the end of a single-player campaign. Defaults to ''yes''. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
* '''end_text''': (translatable) Text that is shown centered in a black screen at the end of a campaign. Defaults to &amp;quot;The End&amp;quot;. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
* '''end_text_duration''': Delay, in milliseconds, before displaying the game credits at the end of a campaign. In other words, for how much time '''end_text''' is displayed on screen. Defaults to 3500. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
&lt;br /&gt;
=== [unit] ===&lt;br /&gt;
Places a unit on the map.  For syntax see [[SingleUnitWML]].&lt;br /&gt;
* {{Short Note:Predefined Macro|GENERIC_UNIT}}&lt;br /&gt;
* '''to_variable''':  spawn directly into a variable instead of on the map.&lt;br /&gt;
&lt;br /&gt;
=== [recall] ===&lt;br /&gt;
Recalls a unit.  The unit is recalled free of charge, and is placed near the leader.&lt;br /&gt;
* [[StandardUnitFilter]]: the first matching unit will be recalled.  If no units match this tag is ignored. Do not use a [filter] tag. If a comma separated list is given, every unit currently considered for recall is checked against all the types (not each single one of the types against all units).&lt;br /&gt;
* '''x,y''': the unit is placed here instead of next to the leader.&lt;br /&gt;
* '''show''': yes/no, default yes: whether the unit is animated (faded in) or instantly displayed&lt;br /&gt;
* '''fire_event''': boolean yes|no (default no); whether any according prerecall or recall events shall be fired.&lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): If yes, checks for terrain passability when placing the unit (a nearby passable hex is chosen).&lt;br /&gt;
&lt;br /&gt;
=== [teleport] ===&lt;br /&gt;
Teleports a unit on map. {{Short Note:Predefined Macro|TELEPORT_UNIT}}&lt;br /&gt;
* '''[filter]''': [[StandardUnitFilter]] the first unit matching this filter will be teleported.&lt;br /&gt;
* '''x,y''': the position to teleport to.&lt;br /&gt;
* '''clear_shroud''': should shroud be cleared on arrival&lt;br /&gt;
* '''animate''': should a teleport animation be played (if the unit doesn't have a teleport animation, it will fade out/fade in)&lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): normally, units will not be teleported into terrain that is impassable for them. Setting this attribute to &amp;quot;no&amp;quot; permits it.&lt;br /&gt;
&lt;br /&gt;
(Note: There is also a ability named teleport, see [[AbilitiesWML]].)&lt;br /&gt;
&lt;br /&gt;
=== [terrain_mask] ===&lt;br /&gt;
Changes the terrain on the map.  See [[TerrainMaskWML]].&lt;br /&gt;
&lt;br /&gt;
=== [terrain] ===&lt;br /&gt;
Changes the terrain on the map.&lt;br /&gt;
* '''terrain''': the character of the terrain to use.  See [[TerrainCodesWML]] to see what letter a type of terrain uses.&lt;br /&gt;
* [[StandardLocationFilter]]. This [[StandardLocationFilter]]'s terrain= key is used for the new terrain, filtering by terrain can be done with a nested [[StandardLocationFilter]]: [and]terrain=terrain_string_to_be_filtered_for.&lt;br /&gt;
* '''layer''': (overlay|base|both, default=both) only change the specified layer.&lt;br /&gt;
* '''replace_if_failed''': (default=no) When replacing just one layer failed, try to replace the whole terrain. If '''terrain''' is an overlay only terrain, use the default_base as base layer. If the terrain has no default base, do nothing.&lt;br /&gt;
&lt;br /&gt;
=== [gold] ===&lt;br /&gt;
Gives sides gold.&lt;br /&gt;
* '''amount''': the amount of gold to give.&lt;br /&gt;
* '''side''': (default=1) the number of the side to give the gold to. Can be a comma-separated list of sides. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument {{DevFeature1.11}}: [gold][filter_side] is deprecated, use the new inline SSF.&lt;br /&gt;
&lt;br /&gt;
=== [unstore_unit] ===&lt;br /&gt;
Creates a unit from a game variable, and activates it on the playing field.  This must be a specific variable describing a unit, and may not be an array -- to unstore an entire array, iterate over it.  The variable is not cleared.  See also [[InternalActionsWML#.5Bstore_unit.5D|[store_unit]]], [[ConditionalActionsWML#.5Bwhile.5D|[while]]] and [[InternalActionsWML#.5Bclear_variable.5D|[clear_variable]]].&lt;br /&gt;
* '''variable''': the name of the variable.&lt;br /&gt;
* '''find_vacant''': whether the unit should be placed on the nearest vacant tile to its specified location.  If this is set to 'no'(default), then any unit on the same tile as the unit being unstored will be destroyed. &lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): If yes, checks for terrain passability when placing the unit. This key has no effect if find_vacant=no (no check performed then). Before 1.9 this key is always &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''text''': (translatable) floating text to display above the unit, such as a damage amount&lt;br /&gt;
* '''red''', '''green''', '''blue''': (default=0,0,0) the color to display the text in. Values vary from 0-255. You may find it convenient to use the {COLOR_HARM} or {COLOR_HEAL} macro instead. (Use {COLOR_HARM} or {COLOR_HEAL} instead of the whole red,green,blue= line.)&lt;br /&gt;
* '''advance''': (default=true) if true the unit is advanced if it has enough XP. When modifying XP make sure to do it from inside a [[EventWML#Multiplayer_safety|synchronized event]] or it may lead to OOS errors especially when several advancement paths exist. Note that advance and post advance events are called, so infinite loops can happen.&lt;br /&gt;
* '''fire_event''': (boolean yes|no, default no) Whether any advance/post advance events shall be fired if an advancement takes place, no effect otherwise.&lt;br /&gt;
* '''x''' ,'''y''': override unit location, &amp;quot;x,y=recall,recall&amp;quot; will put the unit on the unit's side's recall list.&lt;br /&gt;
Units can be unstored with negative (or zero) hit points. Such units will be automatically hit (and killed) in combat, but if given the chance to heal, they will have a minimum of one hit point after healing (regardless of how negative their hit points were). This is unusual-looking behavior, so often should be avoided.&amp;lt;!-- A known use-case is using [unstore_unit] to modify a unit during its last_breath event. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [allow_recruit] ===&lt;br /&gt;
Allows a side to recruit units it couldn't previously recruit.&lt;br /&gt;
* '''type''': the types of units that the side can now recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that is being allowed to recruit the units. This can be a comma-separated list note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [allow_extra_recruit] ===&lt;br /&gt;
Allows a leader to recruit units it couldn't previously recruit.&lt;br /&gt;
These types add to the types the leader can recruit because of [side]recruit=.&lt;br /&gt;
* '''extra_recruit''': the types of units that the unit can now recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_recruit] ===&lt;br /&gt;
Prevents a side from recruiting units it could previously recruit.&lt;br /&gt;
* '''type''': the types of units that the side can no longer recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that may no longer recruit the units. This can be a comma-separated list note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_extra_recruit] ===&lt;br /&gt;
Prevents a leader from recruiting units it could previously recruit.&lt;br /&gt;
* '''extra_recruit''': the types of units that the side can no longer recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [set_recruit] ===&lt;br /&gt;
Sets the units a side can recruit.&lt;br /&gt;
* '''recruit''': the types of units that the side can now recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that is having its recruitment set. This can be a comma-separated list. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [set_extra_recruit] === &lt;br /&gt;
Sets the units a leader can recruit.&lt;br /&gt;
* '''extra_recruit''': the types of units that the leader can now recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [modify_side] ===&lt;br /&gt;
Modifies some details of a given side in the middle of a scenario.  '''The following listed properties are the only properties that [modify_side] can affect!'''&lt;br /&gt;
* '''side''': (default=1) the number of the side that is to be changed. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* '''income''': the income given at the begining of each turn.&lt;br /&gt;
* '''recruit''': a list of unit types, replacing the side's current recruitment list.&lt;br /&gt;
* '''team_name''': the team in which the side plays the scenario.&lt;br /&gt;
* '''user_team_name''': a translatable string representing the team's description. This has no effect on alliances. Defaults to ''team_name''.&lt;br /&gt;
* '''gold''': the amount of gold the side owns.&lt;br /&gt;
* '''village_gold''': the income setting per village for the side.&lt;br /&gt;
* '''controller''': the identifier string of the side's controller. Uses the same syntax of the ''controller'' key in the [[SideWML|[side]]] tag.&lt;br /&gt;
* '''fog''': a boolean string (yes/no) describing the status of Fog for the side.&lt;br /&gt;
* '''shroud''': a boolean string describing the status of Shroud for the side.&lt;br /&gt;
* '''hidden''': a boolean string specifying whether side is shown in status table.&lt;br /&gt;
* '''color''': {{DevFeature1.11}} a team color range specification, name (e.g. &amp;quot;red&amp;quot;, &amp;quot;blue&amp;quot;), or number (e.g. &amp;quot;1&amp;quot;, &amp;quot;2&amp;quot;) for this side. The default color range names, numbers, and definitions can be found in data/core/team_colors.cfg.&lt;br /&gt;
* '''[ai]''': replaces a side's AI parameters with the new specified ones. Uses the same syntax described in [[AiWML]].&lt;br /&gt;
* '''switch_ai''': replaces a side ai with a new AI from specified file(ignoring those AI parameters above). Path to file follows the usual WML convention.&lt;br /&gt;
* '''reset_maps''': {{DevFeature1.11}} If set to &amp;quot;yes&amp;quot;, then the shroud is spread to all hexes, covering the parts of the map that had already been explored by the side, including hexes currently seen. (Seen hexes will be cleared at the end of most events; they can also be manually cleared with {{tag|InterfaceActionsWML|redraw}}.) This is only effective if shroud is on, but this is evaluated after shroud= (and before shroud_data=).&lt;br /&gt;
* '''reset_view''': {{DevFeature1.11}} If set to &amp;quot;yes&amp;quot;, then the fog of war is spread to all hexes, covering the parts of the map that had already been seen this turn by the side, including hexes currently seen, excluding hexes affected by multi-turn {{tag|DirectActionsWML|lift_fog}}. (Seen hexes will be cleared at the end of most events; they can also be manually cleared with {{tag|InterfaceActionsWML|redraw}}.) This is only effective if fog is on, but this is evaluated after fog=.&lt;br /&gt;
* '''share_maps''': change the share_maps side attribute. Be sure to use shroud=yes for that side and have it as an ally&lt;br /&gt;
* '''share_view''': change the share_view side attribute. Be sure to use fog=yes for that side and have it as an ally&lt;br /&gt;
* '''shroud_data''': changes to the side's shroud, using the same format as when defining the [side].&lt;br /&gt;
&lt;br /&gt;
=== [modify_turns] ===&lt;br /&gt;
Modifies the turn limit in the middle of a scenario.&lt;br /&gt;
* '''value''': the new turn limit.&lt;br /&gt;
* '''add''': if used instead of ''value'', specifies the number of turns to add to the current limit (can be negative).&lt;br /&gt;
* '''current''': changes the current turn number after applying turn limit modifications, if any. It is not possible to change the turn number to exceed the turn limit (1 &amp;lt;= current turns &amp;lt;= max turns).&lt;br /&gt;
&lt;br /&gt;
=== [allow_end_turn] ===&lt;br /&gt;
Allows human players to end their turn through the user interface if they were previously affected by the '''[disallow_end_turn]''' action. This action doesn't take any arguments.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_end_turn] ===&lt;br /&gt;
Disallows human players to end their turn through the user interface. This action doesn't take any arguments.&lt;br /&gt;
&lt;br /&gt;
=== [capture_village] ===&lt;br /&gt;
Changes the ownership of a village.&lt;br /&gt;
* [[StandardLocationFilter]]: all village locations matching the filter are affected.&lt;br /&gt;
* '''side''': the side that takes control of the village. This side needs to have a leader (canrecruit=yes). If the side key is not given, the village will become neutral (unless [filter_side] is present, in which case that side fiter decides, see below).&lt;br /&gt;
* '''[filter_side]''' with [[StandardSideFilter]] tags and keys as arguments; if both this tag and inline side= are present it's an error. Otherwise, the first matching side gets ownership (or the village becomes neutral if none match).&lt;br /&gt;
* '''fire_event''' (boolean yes|no, default: no): Whether any capture events shall be fired.&lt;br /&gt;
&lt;br /&gt;
=== [kill] ===&lt;br /&gt;
Removes all units (including units in a recall list) that match the filter from the game.&lt;br /&gt;
* [[StandardUnitFilter]]: Selection criterion; do not use a [filter] tag.&lt;br /&gt;
* '''animate''': if 'yes', displays the unit dying (fading away).&lt;br /&gt;
* '''fire_event''': if 'yes', triggers any appropriate 'die' events (See [[EventWML]]). Note that events are only fired for killed units that have been on the map (as opposed to recall list).&lt;br /&gt;
* '''[secondary_unit]''' with a [[StandardUnitFilter]] as argument. Do not use a [filter] tag. Has an effect only if fire_event=yes. The first on-map unit matching the filter becomes second_unit in any fired die and last breath events. If an on-map unit matches and if there are several units killed with a single [kill] tag, second_unit is this same unit for all of them. If no on-map unit matches or [secondary_unit] isn't present, the variable second_unit in each of the die and last breath events is always the same as the variable unit (the dying unit).&lt;br /&gt;
&lt;br /&gt;
=== [move_unit] ===&lt;br /&gt;
works like the MOVE_UNIT macro.&lt;br /&gt;
* [[StandardUnitFilter]] as argument; do not use a [filter] tag. All units matching the filter are moved. If the target location is occupied, the nearest free location is chosen.&lt;br /&gt;
* '''to_x''' (unsigned integer): The units are moved to this x coordinate. Can be a comma-separated list, in which case the unit follows this given path during the move.&lt;br /&gt;
* '''to_y''' (unsigned integer): The units are moved to this y coordinate. Can be a comma-separated list.&lt;br /&gt;
* '''fire_event''' (optional, boolean yes|no, default no): Whether any according moveto events shall be fired. The target location ($x1, $y1 in the event) may not be the same location that the unit was tried to be moved to, if the original target location is occupied or impassable.&lt;br /&gt;
* '''check_passability''' (boolean yes|no, default yes): Whether the terrain the unit is moved to should be checked for suiting the unit. (If it does not, a nearby suitable hex is chosen.)&lt;br /&gt;
&lt;br /&gt;
=== [modify_ai] ===&lt;br /&gt;
Changes AI objects (aspects, goals, candidate actions or stages) for a specified side. See [[AiWML#Adding_and_Deleting_Aspects_with_the_.5Bmodify_ai.5D_Tag|AiWML]] for full description.&lt;br /&gt;
&lt;br /&gt;
* '''action''' (string): Takes values 'add', 'change', 'delete' or 'try_delete' to do just that for the AI object.&lt;br /&gt;
* '''path''' (string): Describes which AI object is to be modified.  &lt;br /&gt;
* '''[facet]''', '''[goal]''', '''[candidate_action]''' or '''[stage]''': Details about the AI object to be modified.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument {{DevFeature1.11}}: [modify_ai][filter_side] is deprecated, use the new inline SSF.&lt;br /&gt;
&lt;br /&gt;
=== [modify_unit] ===&lt;br /&gt;
works similar to the MODIFY_UNIT macro.&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. All units matching this filter are modified. Matches on recall list units too.&lt;br /&gt;
* Accepts generally the syntax inside of wml unit variables created by [store_unit] which can be viewed in a savefile or by using the :inspect command. Can add traits with immediate effect. Cannot remove things. Subtags with the same name must be written in the correct order to match them with the tag they are supposed to modify.&lt;br /&gt;
example usage (see also the test scenario):&lt;br /&gt;
 [modify_unit]&lt;br /&gt;
   [filter]&lt;br /&gt;
     x,y=38,6&lt;br /&gt;
   [/filter]&lt;br /&gt;
   hitpoints=10&lt;br /&gt;
   {TRAIT_HEALTHY}&lt;br /&gt;
 [/modify_unit]&lt;br /&gt;
&lt;br /&gt;
The unit which is currently modified is accessible via $this_unit, e.g. hitpoints = &amp;quot;$($this_unit.hitpoints / 2)&amp;quot; to set the hitpoints of all units to half of their particular maxima. This this_unit variable is independent from the this_unit variable available in the SUF used to determine which units to modify (first all matching units are gathered, and then all those are modified).&lt;br /&gt;
&lt;br /&gt;
note: The syntax allowed is somehow vague. Just try things and possibly correct/add/modify this documentation. (a [http://forums.wesnoth.org/viewtopic.php?f=21&amp;amp;t=31676&amp;amp; forum thread] discusses some related issues).&lt;br /&gt;
&lt;br /&gt;
=== [transform_unit] ===&lt;br /&gt;
transforms every unit matching the filter to the given unit type. Keeps intact hitpoints, experience and status. If the unit is transformed to a non-living type (undead or mechanical), it will be also unpoisoned.&lt;br /&gt;
* [[StandardUnitFilter]]: do not use a [filter] tag.&lt;br /&gt;
* '''transform_to''': the unit type in which all the units matching the filter will be transformed. If missing, the units will follow their normal advancement.&lt;br /&gt;
&lt;br /&gt;
=== [petrify] ===&lt;br /&gt;
&lt;br /&gt;
* [[StandardUnitFilter]] as an argument. Do not use a [filter] tag. All units matching this filter are petrified. Recall list units are included.&lt;br /&gt;
&lt;br /&gt;
=== [unpetrify] ===&lt;br /&gt;
* [[StandardUnitFilter]] as an argument. Do not use a [filter] tag. All units matching this filter are unpetrified. Recall list units are included.&lt;br /&gt;
&lt;br /&gt;
=== [object] ===&lt;br /&gt;
Gives some unit an object and removes all items on the tile the unit is on.&lt;br /&gt;
* '''id''': (Optional) when the object is picked up, a flag is set for ''id''.  The object cannot be picked up if a flag for ''id'' has been set.  This means that any object with an id can only be used once, even if first_time_only=no is set for the event. This restriction is per level. In a campaign objects with the same id can be assigned once per level.&lt;br /&gt;
* '''delayed_variable_substitution''' (boolean yes|no, default no): If set to &amp;quot;yes&amp;quot;, the wml block contained in this [object] is not variable-substituted at execution time of the event where this [object] is within. You need this to work around a bug when adding ABILITY_TELEPORT via an [object] or when using [object][effect][filter]with a $this_unit (see http://gna.org/bugs/index.php?18893).&lt;br /&gt;
* '''[effect]''': one or more effect elements may be listed.  See [[EffectWML]] for a description of [effect].&lt;br /&gt;
* '''duration''':&lt;br /&gt;
**if 'level', effects only last until the end of the level (note : 'level' is the scenario, so this doesn't mean it last until the unit levels-up). {{DevFeature1.11}} 'level' has been renamed to 'scenario'.&lt;br /&gt;
**if 'forever' or not set, effects never wear off.&lt;br /&gt;
** {{DevFeature1.11}} if 'turn', effects only last until the start of the units next turn (when the unit refreshes movement and attacks). (Like other start-of-turn behavior, objects with a duration of &amp;quot;turn&amp;quot; won't expire before turn 2.)&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. The first unit found that matches the filter will be given the object. Only on-map units are considered. If no unit matches or no [filter] is supplied, it is tried to apply the object to the unit at the $x1,$y1 location of the event where this [object] is in. The case of no unit being at that spot is handled in the same way as no unit matching a given filter ([else] commands executed, cannot_use_message displayed)&lt;br /&gt;
* '''[then]''': a subtag that lets you execute actions if the filter conditions are met.  The most common action that should be inside here is a '''[remove_item]''' tag, but you could probably put any tags that otherwise work in a [then] tag.&lt;br /&gt;
* '''[else]''': a subtag that lets you execute actions if the filter conditions are *not* met.&lt;br /&gt;
* '''silent''': whether or not messages should be suppressed. Default is &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''image''': the displayed image of the object.&lt;br /&gt;
* '''name''': (translatable) displayed as a caption of the image.&lt;br /&gt;
&lt;br /&gt;
* '''description''': (translatable) displayed as a message of the image.&lt;br /&gt;
* '''cannot_use_message''': (translatable) displayed instead of '''description''' if no unit passes the filter test.&lt;br /&gt;
&lt;br /&gt;
=== [remove_shroud] ===&lt;br /&gt;
Removes some shroud from the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
* '''side''': (default=1) the side for which to remove shroud. This can be a comma-separated list of sides. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* [[StandardLocationFilter]]: the range of tiles for which shroud should be removed&lt;br /&gt;
&lt;br /&gt;
=== [place_shroud] ===&lt;br /&gt;
Places some shroud on the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
* '''side''': (default=1) the side for which to place shroud. This can be a comma-separated list. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* [[StandardLocationFilter]]: the range of tiles on which shroud should be placed&lt;br /&gt;
&lt;br /&gt;
=== [lift_fog] ===&lt;br /&gt;
{{DevFeature1.11}}Lifts the fog of war from parts of the map for a certain side (only relevant for sides that have fog=yes), allowing a player to witness what occurs there even if that player has no units within vision range.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] indicating which sides should be affected.&lt;br /&gt;
* [[StandardLocationFilter]]: the tiles from which fog should be lifted.&lt;br /&gt;
* '''multiturn''': ''yes/no, default:no''. The default (not multiturn) causes fog to be removed in the same way that normal vision works; the cleared tiles will remain cleared until fog is recalculated (which normally happens when a side ends its turn). When multiturn is set to &amp;quot;yes&amp;quot;, the cleared tiles remain clear until {{tag||reset_fog}} cancels the clearing. This allows tiles to remain clear for multiple turns, or to be refogged before the end of the current turn (without also refogging all tiles). Multiturn lifted fog is not shared with allies (even when share_view=yes).&lt;br /&gt;
&lt;br /&gt;
=== [reset_fog] ===&lt;br /&gt;
{{DevFeature1.11}}The primary use of this tag is to remove multiturn lifted fog (created by {{tag||lift_fog}}), which causes the fog to reset to what it would have been had WML not interfered. (That is, hexes that a side's units could not see at any point this turn will be re-fogged, while seen hexes remain defogged.)&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] indicating which sides should be affected.&lt;br /&gt;
* [[StandardLocationFilter]]: the fog reset will be restricted to these tiles.&lt;br /&gt;
* '''reset_view''': ''yes/no, default: no'' If set to &amp;quot;yes&amp;quot;, then in addition to removing multiturn fog, the side's current view is canceled (independent of the SLF). This means that all hexes will become fogged for the side unless multiturn fog exists outside the tiles selected by the SLF. Normally, one would want the currently seen hexes to become clear of fog; this is done automatically at the end of many events, and it can be done manually with {{tag|InterfaceActionsWML|redraw}}.&lt;br /&gt;
Omitting both the SSF and the SLF would cancel all earlier uses of [lift_fog].&lt;br /&gt;
Additionally setting reset_view=&amp;quot;yes&amp;quot; would cause the side's entire map to be fogged (unless an ally keeps hexes clear by sharing its view).&lt;br /&gt;
&lt;br /&gt;
=== [allow_undo] ===&lt;br /&gt;
Allows the player to undo the event that this tag is inside.  Has an effect only inside moveto events.  If the move is undone, only the position of the unit will be restored; any altered variables or changes to the game will remain changed after the move is undone.  It is up to the scenario designer to avoid abusing this command.&lt;br /&gt;
* Technically, if '''[allow_undo]''' is inside an '''[event]''' with ''first_time_only=yes'' (the default setting), and the user undoes the event, then the state of the game has changed in this way: the event will not fire a second time, even though the user undid the move the first time.&lt;br /&gt;
&lt;br /&gt;
=== [heal_unit] ===&lt;br /&gt;
Heal a unit. The variable '''$heal_amount''' will be set to the exact number of points healed (i.e can be lesser than the parameter '''amount''' if the unit is fully healed). $heal_amount contains only the number of hitpoints the first unit that was found got healed.&lt;br /&gt;
*  '''[filter]''': [[StandardUnitFilter]] All matching on-map units are healed. If no filter is supplied, it is tried to take the unit at $x1, $y1.&lt;br /&gt;
*  '''[filter_second]''': [[StandardUnitFilter]] all the units matching the filter ''and'' having the ''heals'' ability will have their animation played (if ''animate'' is set to true) for each of the units healed.&lt;br /&gt;
*  '''amount''': (integer, default full) the maximum points the unit(s) will be healed. Can't set below 1 or above max_hitpoints. If &amp;quot;full&amp;quot;, sets hitpoints to max_hitpoints. Before 1.9 the default is 0.&lt;br /&gt;
*  '''animate''': a boolean which indicate if the healing animations must be played. (default no)&lt;br /&gt;
*  '''moves''': (integer, default 0) The maximum current movement points the units will be &amp;quot;healed&amp;quot;. Can't set below 0 or above max_moves. If &amp;quot;full&amp;quot;, sets moves to max_moves.&lt;br /&gt;
* '''restore_attacks''': (boolean, default no) Whether the units' attacks_left should be reset to their max_attacks (usually 1).&lt;br /&gt;
* '''restore_statuses''': (boolean, default yes) Whether standard statuses should be reset to &amp;quot;no&amp;quot;. This affects poisoned, slowed, petrified and unhealable. Before 1.9 this is always &amp;quot;no&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== [harm_unit] ===&lt;br /&gt;
Harms every unit matching the filter, for the specific damage amount.&lt;br /&gt;
*  '''[filter]''': [[StandardUnitFilter]] all matching units will be harmed (required).&lt;br /&gt;
*  '''[filter_second]''': [[StandardUnitFilter]] if present, the first matching unit will attack all the units matching the filter above.&lt;br /&gt;
*  '''amount''': the amount of damage that will be done (required).&lt;br /&gt;
*  '''alignment''': (default neutral) applies an alignment to the damage, this means that if alignment=chaotic, the damage will be increased at night and reduced at day.&lt;br /&gt;
*  '''damage_type''': if present, amount will be altered by unit resistance to the damage type specified.&lt;br /&gt;
*  '''kill''': (default yes) if yes, when an harmed unit goes to or below 0 HP, it is killed; if no its HP are set to 1.&lt;br /&gt;
*  '''fire_event''': (default no) if yes, when a unit is killed by harming, the corresponding events are fired.&lt;br /&gt;
*  '''animate''': (default no) if yes, scrolls to each unit before harming it and plays its defense (or attack, if it's the harmer) and death animations. Special values supported, other than the usual yes and no, are &amp;quot;attacker&amp;quot;, that means only the harmer will be animated, and &amp;quot;defender&amp;quot;, that means only the harmed units will be animated.&lt;br /&gt;
*  '''[primary_attack], [secondary_attack]''': these set the weapon against which the harmed units will defend, and that the harming unit will use to attack, respectively (notice this is the opposite of '''[filter]''' and '''[filter_second]''' above). This allows for playing specific defense and attack animations. Both tags are expected to contain a [[FilterWML#Filtering_Weapons|Standard Weapon Filter]].&lt;br /&gt;
*  '''delay''': if animate=yes, sets the delay (in milliseconds, default 500) between each unit harming.&lt;br /&gt;
*  '''variable''': if present, the damage caused to the unit, altered by resistances, will be stored in a WML array with the given name, under the &amp;quot;harm_amount&amp;quot; key.&lt;br /&gt;
*  '''poisoned, slowed, petrified, unhealable''': (default no) if yes, every harmed unit that doesn't already have such status will have it set.&lt;br /&gt;
*  '''experience''': if yes, and there is an harmer, experience will be attributed like in regular combat.&lt;br /&gt;
*  '''resistance_multiplier''': {{DevFeature1.11}} the harmed unit's resistance is multiplied by the supplied value; this means that a value lower than 1 increases it, and a value greater than 1 decreases it. Default value is 1, that means no modification.&lt;br /&gt;
&lt;br /&gt;
=== [time_area] ===&lt;br /&gt;
How a day should progress in a given area. Everywhere not specified in a [time_area] tag is affected by the [time] tags in the [scenario] tag.&lt;br /&gt;
* [[StandardLocationFilter]]: the locations to affect. ''note: only for [event][time_area]s - at scenario toplevel [time_area] does not support [[StandardLocationFilter]], only location ranges''&lt;br /&gt;
* [[TimeWML]]: the new schedule.&lt;br /&gt;
* '''id''': an unique identifier assigned to a time_area. Optional, unless you want to remove the time_area later. Can be a comma-separated list when removing time_areas, see below.&lt;br /&gt;
* '''remove''': (boolean) yes/no value. Indicates whether the specified time_area should be removed. Requires an identifier. If no identifier is used, however, all time_areas are removed.&lt;br /&gt;
&lt;br /&gt;
=== [end_turn] ===&lt;br /&gt;
End the current side's turn. The current event is finished before the turn is ended. Also, if the current event (where the tag appears) has been fired by another event, that event (and the complete stack of other possible parent events) is ended before [end_turn] comes into affect. Also, events following the event stack that fired [end_turn] are not omitted (e.g. [end_turn] is used by a side turn event and a turn refresh event does something afterwards).&lt;br /&gt;
&lt;br /&gt;
=== [replace_map] ===&lt;br /&gt;
&lt;br /&gt;
Replaces the entire map.&lt;br /&gt;
* '''map''': Content of a wesnoth map file. example:&lt;br /&gt;
 map=&amp;quot;{campaigns/Heir_To_The_Throne/maps/01_The_Elves_Besieged.map}&amp;quot;&lt;br /&gt;
* '''expand''': if 'yes', allows the map size to increase. The expansion direction is currently always bottom-right.&lt;br /&gt;
* '''shrink''': if 'yes', allows the map size to decrease. If the map size is reduced, any units that would no longer be on the map due to its coordinates no longer existing will be put into the recall list.&lt;br /&gt;
&lt;br /&gt;
=== [replace_schedule] ===&lt;br /&gt;
Replace the time of day schedule of the entire scenario.&lt;br /&gt;
* [[TimeWML]]: the new schedule.&lt;br /&gt;
&lt;br /&gt;
=== [tunnel] ===&lt;br /&gt;
&lt;br /&gt;
Create a tunnel between some locations, later usable by units to move from source hex to target hex (using the movement cost of unit on the target terrain). ([http://forums.wesnoth.org/viewtopic.php?f=21&amp;amp;t=14749&amp;amp;p=405667&amp;amp;hilit=tunnel#p405667 source])&lt;br /&gt;
&lt;br /&gt;
* '''id''' identifier for the tunnel, to allow removing (optional).&lt;br /&gt;
* '''remove''': (boolean) yes/no value. If yes, removes all defined tunnels with the same ID (then only id= is necessary). (default: no)&lt;br /&gt;
* '''bidirectional''': (boolean) if yes, creates also a tunnel in the other direction. (default: yes)&lt;br /&gt;
* '''always_visible''': (boolean) if yes, the possible movement of enemies under fog can be seen. (default: no)&lt;br /&gt;
* '''[source]''': [[StandardLocationFilter]] the source hex(es) (required).&lt;br /&gt;
* '''[target]''': [[StandardLocationFilter]] the target hex(es) (required).&lt;br /&gt;
* '''[filter]''': [[StandardUnitFilter]] the units which can use the tunnel (required). Leave empty for &amp;quot;all units&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(Note: The tunnel tag can also be used inside the [[AbilitiesWML|[teleport]]] ability, without remove= and id=).&lt;br /&gt;
&lt;br /&gt;
== Useful Macros ==&lt;br /&gt;
There are some predefined macros that you find useful for direct actions. You can find a complete list along with a detailed explanation of how they work [http://www.wesnoth.org/macro-reference.xhtml here].&lt;br /&gt;
* '''{MOVE_UNIT}''': Moves a unit to another location in the map and the player sees the movement (unlike [teleport])&lt;br /&gt;
* '''{FULL_HEAL}''': Brings a unit to full HP&lt;br /&gt;
* '''{LOYAL_UNIT}''': Create a loyal unit&lt;br /&gt;
* '''{MODIFY_TERRAIN_MASK}''': Modify an area of terrain&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[InternalActionsWML]]&lt;br /&gt;
* [[InterfaceActionsWML]]&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;br /&gt;
[[Category: ActionsWML]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=InternalActionsWML&amp;diff=46745</id>
		<title>InternalActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=InternalActionsWML&amp;diff=46745"/>
		<updated>2012-07-05T13:08:27Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* [store_time_of_day] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
&lt;br /&gt;
Part of [[ActionWML]], Internal actions are actions that WML uses internally that do not directly affect game play (or, at least, are not readily apparent to the player). For example, storing a variable is an internal action.&lt;br /&gt;
&lt;br /&gt;
== Variable Actions ==&lt;br /&gt;
&lt;br /&gt;
These actions are focused, in one way or another, on [[VariablesWML|variables]]. Creating them, modifying them, capturing game data to them, you name it, these actions are all about the variables.&lt;br /&gt;
&lt;br /&gt;
=== [set_variable] ===&lt;br /&gt;
&lt;br /&gt;
The '''[set_variable]''' tag is used to create and manipulate WML variables. The [http://www.wesnoth.org/macro-reference.xhtml#VARIABLE VARIABLE] macro is a quick syntactic shortcut for simple variable creation and the [http://www.wesnoth.org/macro-reference.xhtml#VARIABLE_OP VARIABLE_OP] macro is a quick syntactic shortcut for performing simple mathematical operations on variables.&lt;br /&gt;
&lt;br /&gt;
* '''name''': the name of the variable to manipulate&lt;br /&gt;
&lt;br /&gt;
* '''value''': set the variable to the given value (can be numeric or string).Use literal for no substitution. (see [[VariablesWML]])&lt;br /&gt;
&lt;br /&gt;
* '''literal''': set the variable to the given value (can be numeric or string). This does not interpret any dollars signs.&lt;br /&gt;
&lt;br /&gt;
* '''to_variable''': set the variable to the value of the given variable, e.g. 'to_variable=temp' would be equivalent to 'value=$temp'.&lt;br /&gt;
&lt;br /&gt;
* '''add''': add the given amount to the variable.&lt;br /&gt;
&lt;br /&gt;
* '''sub''': subtract the given amount from the variable.&lt;br /&gt;
&lt;br /&gt;
* '''multiply''': multiply the variable by the given number. The result is a float.&amp;lt;br /&amp;gt;To negate a number, multiply by -1. If you negate 0, the result is a floating-point negative zero -0. To display -0 as 0, use a second tag with add=0; it will flip -0 to 0 but not affect other numbers.&lt;br /&gt;
&lt;br /&gt;
* '''divide''': divide the variable by the given number. The result is a float. Wesnoth 1.9 and later no longer uses integer division. Use a second tag with round=floor if you relied on this.&lt;br /&gt;
&lt;br /&gt;
* '''modulo''': returns the remainder of a division.&lt;br /&gt;
&lt;br /&gt;
* '''rand''': the variable will be randomly set.&amp;lt;br&amp;gt;You may provide a comma separated list of possibilities, e.g. 'random=Bob,Bill,Bella'.&amp;lt;br&amp;gt;You may provide a range of numbers (integers), e.g. 'random=3..5'.&amp;lt;br&amp;gt;You may combine these, e.g. 'random=100,1..9', in which case there would be 1/10th chance of getting 100, just like for each of 1 to 9. See [[BuildingMultiplayerExamples]] for more info on the MP case.&lt;br /&gt;
&lt;br /&gt;
* '''time=stamp''': Retrieves a timestamp in milliseconds since wesnoth was started, can be used as timing aid. Don't try to use this as random value in MP since it will cause an OOS.&lt;br /&gt;
&lt;br /&gt;
* '''string_length''': Retrieves the length in characters of the string passed as this attribute's value; such string is parsed and variable substitution applied automatically (see [[VariablesWML]] for details).&lt;br /&gt;
&lt;br /&gt;
* '''[join]''' joins an array of strings to create a textual list&lt;br /&gt;
** '''variable''': name of the array&lt;br /&gt;
** '''key''': the key of each array element(array[$i].foo) in which the strings are stored&lt;br /&gt;
** '''separator''': separator to connect the elements&lt;br /&gt;
** '''remove_empty''': whether to ignore empty elements&lt;br /&gt;
&lt;br /&gt;
* '''ipart''': Assigns the integer part (the part to the left of the comma) of the referenced variable.&lt;br /&gt;
&lt;br /&gt;
* '''fpart''': Assigns the decimal part (the part to the right of the comma) of the referenced variable.&lt;br /&gt;
&lt;br /&gt;
* '''round''': Rounds the variable to the specified number of digits of precision. Negative precision works as expected (rounding 19517 to -2 = 19500). Special values:&lt;br /&gt;
**'''round=ceil''': Rounds upward to the nearest integer.&lt;br /&gt;
**'''round=floor''': Rounds down to the nearest integer.&lt;br /&gt;
&lt;br /&gt;
=== [set_variables] ===&lt;br /&gt;
&lt;br /&gt;
Manipulates a WML array or container&lt;br /&gt;
&lt;br /&gt;
* '''name''': the name of the array or container to manipulate&lt;br /&gt;
&lt;br /&gt;
* '''mode''': one of the following values:&lt;br /&gt;
** ''replace'': will clean the array '''name''' and replace it with given data&lt;br /&gt;
** ''append'': will append given data to the current array&lt;br /&gt;
** ''merge'': will merge in the given data into '''name'''&lt;br /&gt;
** ''insert'': will insert the given data at the index specified in the '''name''' attribute, such as name=my_array[1]. The default index is zero, which will insert to the front of the array. '''Note:''' if an invalid index is used, empty containers will be created before the insertion is performed. In other words, do not attempt to insert at an index greater than (or equal to) the array's current length. This limitation may be removed in future versions.&lt;br /&gt;
&lt;br /&gt;
* '''to_variable''': data will be set to the given array&lt;br /&gt;
&lt;br /&gt;
* '''[value]''': the WML inside the [value] tags will be stored in data, variables will be interpolated directly, use $| in order to escape the $ sign, you can store arrays of WML by supplying multiple [value] tags. ([[#Using_.5Bset_variables.5D_to_Create_Arrays_of_WML|See Example]])&lt;br /&gt;
&lt;br /&gt;
* '''[literal]''': same as '''[value]''', but variables will not be substituted, '''[literal]''' and '''[value]''' can not be used in the same [set_variables] tag, i.e. you can not create arrays by piling a mix of '''[value]''' and '''[literal]''' tags&lt;br /&gt;
&lt;br /&gt;
*'''[split]''' splits a textual list into an array which will then be set to data&lt;br /&gt;
** '''list''': textual list to split&lt;br /&gt;
** '''key''': the key of each array element(array[$i].foo) in which the strings are stored&lt;br /&gt;
** '''separator''': separator to separate the elements&lt;br /&gt;
** '''remove_empty''': whether to ignore empty elements&lt;br /&gt;
&lt;br /&gt;
=== Capturing Game Data ===&lt;br /&gt;
&lt;br /&gt;
These actions capture different bits of game data and store them to variables so they can be examined and/or manipulated.&lt;br /&gt;
&lt;br /&gt;
==== [store_gold] ====&lt;br /&gt;
&lt;br /&gt;
Stores a side's gold into a variable.&lt;br /&gt;
&lt;br /&gt;
* '''[[StandardSideFilter]]''': The first matching side's gold will be stored in the variable &amp;quot;variable&amp;quot;.&lt;br /&gt;
* '''variable''': (default='gold') the name of the variable to store the gold in&lt;br /&gt;
&lt;br /&gt;
==== [store_locations] ====&lt;br /&gt;
&lt;br /&gt;
Stores a series of locations that pass certain criteria into an array. Each member of the array has members 'x' and 'y' (the position) and 'terrain' (the terrain type) and 'owner_side' (villages only). The array will include any unreachable border hexes, if applicable.&lt;br /&gt;
&lt;br /&gt;
* [[StandardLocationFilter]]: a location or location range which specifies the locations to store. By default, all locations on the map are stored.&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable (array) into which to store the locations.&lt;br /&gt;
&lt;br /&gt;
==== [store_reachable_locations] ====&lt;br /&gt;
&lt;br /&gt;
Stores locations reachable by the given units. Can store either the movement, attack or vision ranges.&lt;br /&gt;
&lt;br /&gt;
* '''[filter]''': a [[StandardUnitFilter]]. The locations reachable by any of the matching units will be stored.&lt;br /&gt;
* '''[filter_location]''': (optional) a [[StandardLocationFilter]]. Only locations which also match this filter will be stored.&lt;br /&gt;
* '''range''': possible values ''movement'' (default), ''attack'', ''vision''. If ''movement'', stores the locations within the movement range of the unit, taking Zone of Control into account. If ''attack'', stores the attack range (movement range + 1 hex). If ''vision'', stores the vision range (movement range ignoring Zone of Control + 1 hex).&lt;br /&gt;
* '''moves''':  possible values ''current'' (default), ''max''. Specifies whether to use the current or maximum movement points when calculating the range.&lt;br /&gt;
* '''viewing_side''': (optional) the side whose vision to use when calculating the reach. This only has meaning in the presence of fog, shroud, or units with the ambush ability. If left out, then fog, shroud and ambushers are ignored and the real reach of the units is stored.&lt;br /&gt;
* '''variable''': the name of the variable (array) into which to store the locations.&lt;br /&gt;
&lt;br /&gt;
==== [store_map_dimensions] ====&lt;br /&gt;
&lt;br /&gt;
Stores the map dimensions in a variable.&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable where the values will be saved into. If it is skipped, a variable 'map_size' is used, and its contents overridden, if they existed already. The result is a container variable, with members ''width'' and ''height''.&lt;br /&gt;
&lt;br /&gt;
==== [store_side] ====&lt;br /&gt;
&lt;br /&gt;
Stores information about a certain side in a variable. The variable will contain the member variables 'name', 'team_name', 'gold' and 'income', 'fog', 'shroud', 'hidden', 'user_team_name', 'color', 'controller', 'village_gold', 'recruit', and 'side' (the $side_number of the side belonging to this container).&lt;br /&gt;
&lt;br /&gt;
* '''[[StandardSideFilter]]''': All matching sides are stored. (An array is created if several sides match - access it with side[2].team_name and so on.)&lt;br /&gt;
* '''variable''': the name of the variable to store the information in (default: &amp;quot;side&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
''note: In networked multiplayer, the controller attribute is ambiguous. Be very careful or you have OOS errors.''&lt;br /&gt;
&lt;br /&gt;
==== [store_starting_location] ====&lt;br /&gt;
&lt;br /&gt;
Stores the starting location of a side's leader in a variable. The variable is a composite type which will have members 'x', 'y', 'terrain' and 'owner_side' (villages only)&lt;br /&gt;
&lt;br /&gt;
* [[StandardSideFilter]]: The starting locations of all matching sides will be stored. If multiple sides are matched, a WML array will be created.&lt;br /&gt;
* '''variable''': (default='location'): the name of the variable to store the location in&lt;br /&gt;
&lt;br /&gt;
==== [store_time_of_day] ====&lt;br /&gt;
&lt;br /&gt;
Stores time of day information from the current scenario into a WML variable container.&lt;br /&gt;
&lt;br /&gt;
* '''x, y''': Location to store the time for. Time areas matter, illumination does not.&lt;br /&gt;
&lt;br /&gt;
* '''variable''': (default='time_of_day') name of the container on which to store the information. The container will be filled with the same attributes found on [[TimeWML]].&lt;br /&gt;
&lt;br /&gt;
* '''turn''': (defaults to the current turn number) changes the turn number for which time of day information should be retrieved.&lt;br /&gt;
&lt;br /&gt;
==== [store_turns] ====&lt;br /&gt;
&lt;br /&gt;
Stores the turn limit (the maximum number of turns). If there is no limit, this stores ''-1''.&lt;br /&gt;
&lt;br /&gt;
* '''variable''': (default='turns') the name of the variable in which to store the turn limit.&lt;br /&gt;
&lt;br /&gt;
==== [store_unit] ====&lt;br /&gt;
&lt;br /&gt;
Stores details about units into a [[VariablesWML#Container|container]] variable. When a unit is stored, all keys and tags in the unit definition may be manipulated, including some others, with [[InternalActionsWML#.5Bset_variable.5D|[set_variable]]]. A sample list of these tags and keys can be found [[InternalActionsWMLUnitTags|here]]. If you have a doubt about what keys are valid or what the valid value range is for each key, code a [store_unit] event, save the game, and examine what keys are in the file (or just examine the '''[unit]''' tag(s) in any save file).&lt;br /&gt;
&lt;br /&gt;
Common usage is to manipulate a unit by using '''[store_unit]''' to store it into a variable, followed by manipulation of the variable, and then [[DirectActionsWML#.5Bunstore_unit.5D|[unstore_unit]]] to re-create the unit with the modified variables.&lt;br /&gt;
&lt;br /&gt;
''Note: stored units also exist on the field, and modifying the stored variable will not automatically change the stats of the units. You need to use [unstore_unit]. See also [[DirectActionsWML#.5Bunstore_unit.5D|[unstore_unit]]] and [http://www.wesnoth.org/macro-reference.xhtml#FOREACH FOREACH].''&lt;br /&gt;
&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. All units matching this filter will be stored. If there are multiple units, they will be stored into an array of variables. The units will be stored in order of their internal ''underlying_id'' attribute, which is usually in creation order (but you normally should not depend on the order).&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable into which to store the unit(s)&lt;br /&gt;
&lt;br /&gt;
* '''mode''': defaults to ''always_clear'', which clears the variable, whether or not a match is found. If mode is set to ''replace'', the variable will not be cleared, and units which match the filter will overwrite existing elements at the start of the array, leaving any additional elements intact if the original array contained more elements than there are units matching the filter. If mode is set to ''append'', the variable will not be cleared, and units which match the filter will be added to the array after the existing elements.&lt;br /&gt;
&lt;br /&gt;
* '''kill''': if 'yes' the units that are stored will be removed from play. This is useful for instance to remove access to a player's recall list, with the intent to restore the recall list later.&lt;br /&gt;
&lt;br /&gt;
==== [store_unit_type] ====&lt;br /&gt;
&lt;br /&gt;
* '''type''': (required) the defined ID of the unit type, for example &amp;quot;Goblin Knight&amp;quot;. Do not use a translation mark or it will not work correctly for different languages. A comma-separated list of IDs may also be used to store an array of unit types.&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable into which to store the unit type information (default &amp;quot;unit_type&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==== [store_unit_type_ids] ====&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable into which to store a comma-separated list of all unit type IDs&lt;br /&gt;
&lt;br /&gt;
==== [store_villages] ====&lt;br /&gt;
&lt;br /&gt;
Stores a series of locations of villages that pass certain criteria into an array. Each member of the result array will have members 'x' and 'y' (the position) and 'terrain' (the terrain type) and 'owner_side'. note: The only advantage/difference this tag has, in comparison to using [store_locations]terrain=*^V*, is that the amount of hexes which are considered for a possible match is previously restricted to those with villages.&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable (array) into which to store the locations (default: &amp;quot;location&amp;quot;)&lt;br /&gt;
* '''[[StandardLocationFilter]]''' tags and keys as arguments&lt;br /&gt;
&lt;br /&gt;
==== [store_items] ====&lt;br /&gt;
&lt;br /&gt;
Stores current items in the scenario into an array. Each entry has at least members x and y and can have all of the other keys listed in the documentation of [[InterfaceActionsWML#.5Bitem.5D|[item]]] (depending on what was set during creating the item).&lt;br /&gt;
&lt;br /&gt;
*'''variable''': name of the wml variable array to use (default &amp;quot;items&amp;quot;)&lt;br /&gt;
*'''[[StandardLocationFilter]]''' keys as arguments: only items on locations matching this [[StandardLocationFilter]] will be stored&lt;br /&gt;
&lt;br /&gt;
==== [find_path] ====&lt;br /&gt;
&lt;br /&gt;
A WML interface to the pathfinder. Calculates the path between a unit and a location and returns the result in a WML variable, that contains also an array for every step of the path.&lt;br /&gt;
&lt;br /&gt;
*'''[traveler]''': [[StandardUnitFilter]], only the first matching unit will be used for calculation&lt;br /&gt;
*'''[destination]''': [[StandardLocationFilter]], only the first matching nearest hex will be used&lt;br /&gt;
*'''variable''': the variable name where the result will be stored, if no value is supplied 'path' will be used as default name. Each step will be stored in a [step] array inside that variable.&lt;br /&gt;
*'''allow_multiple_turns''': default no, if yes also moves that require more than one turn will be calculated.&lt;br /&gt;
*'''check_visibility''': default no, if yes the path will not be computed if some hexes are not visible due to shroud.&lt;br /&gt;
*'''check_teleport''': default yes, if no teleport won't be taken in account while computing path.&lt;br /&gt;
*'''check_zoc''': default yes, if no unit ZOCs won't be considered while calculating the path.&lt;br /&gt;
This is the structure of the variable returned by [find_path]:&lt;br /&gt;
 [path]&lt;br /&gt;
 	length = the total length of the path&lt;br /&gt;
 		if the path is calculated to an impassable hex, or the move requires multiple turns&lt;br /&gt;
 		and allow_multiple_turns is no, its value will be 0.&lt;br /&gt;
 	hexes = in 1.11, this will replace the length key above&lt;br /&gt;
 	from_x, from_y = location of the unit&lt;br /&gt;
 	to_x, to_y = destination&lt;br /&gt;
 	movement_cost = total movement cost required by unit to reach that hex&lt;br /&gt;
 	required_turns = total turns required by unit to reach that hex&lt;br /&gt;
 	[step]&lt;br /&gt;
 		x, y = location of the step&lt;br /&gt;
 		terrain = terrain of the step&lt;br /&gt;
 		movement_cost = movement cost required by unit to reach that hex&lt;br /&gt;
 		required_turns = turns required by unit to reach that hex&lt;br /&gt;
 	[/step]&lt;br /&gt;
 [/path]&lt;br /&gt;
To read the total length of the path on 1.10, use ''path.step.length''.&amp;lt;br&amp;gt;&lt;br /&gt;
{{DevFeature1.11}} ''length'' is replaced by ''hexes'' in the output array.&lt;br /&gt;
&lt;br /&gt;
=== [clear_variable] ===&lt;br /&gt;
&lt;br /&gt;
This will delete the given variable. This tag can delete a scalar or an entire array; it can also delete one container at an array index. The macro [http://www.wesnoth.org/macro-reference.xhtml#CLEAR_VARIABLE CLEAR_VARIABLE] is a shortcut for this tag.&lt;br /&gt;
&lt;br /&gt;
This action is good to use to clean up the set of variables; for example, a well-behaved scenario will delete any variables that should not be kept for the next scenario before the end of the scenario. One can also clear tags and variables of stored units; for example, one can remove [trait]s and [object]s.&lt;br /&gt;
&lt;br /&gt;
* '''name''': the name of the variable to clear. This can also be a comma-separated list of multiple variable names.&lt;br /&gt;
** If a name ends with an array index, then it deletes that one container, and shifts the indexes of all subsequent containers. For example, &amp;lt;code&amp;gt;{CLEAR_VARIABLE my_awesome_array[2]}&amp;lt;/code&amp;gt; deletes &amp;lt;code&amp;gt;my_awesome_array[2]&amp;lt;/code&amp;gt;, but then moves &amp;lt;code&amp;gt;my_awesome_array[3]&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;my_awesome_array[2]&amp;lt;/code&amp;gt;, moves &amp;lt;code&amp;gt;my_awesome_array[4]&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;my_awesome_array[3]&amp;lt;/code&amp;gt;, and so on until the end of the array.&lt;br /&gt;
** Note that &amp;lt;code&amp;gt;{CLEAR_VARIABLE my_awesome_array}&amp;lt;/code&amp;gt; deletes the entire array, but &amp;lt;code&amp;gt;{CLEAR_VARIABLE my_awesome_array[0]}&amp;lt;/code&amp;gt; deletes only the first container.&lt;br /&gt;
&lt;br /&gt;
== Other Internal Actions ==&lt;br /&gt;
&lt;br /&gt;
Believe it or not, there are some internal actions that are not focused primarily on variables. They are all grouped here.&lt;br /&gt;
&lt;br /&gt;
=== [fire_event] ===&lt;br /&gt;
&lt;br /&gt;
Trigger a WML event&lt;br /&gt;
&lt;br /&gt;
* '''name''': the name of event to trigger&lt;br /&gt;
&lt;br /&gt;
* '''[primary_unit]''': ''(Optional)'' Primary unit for the event. Will never match on a recall list unit. The first unit matching the filter will be chosen.&lt;br /&gt;
**[[StandardUnitFilter]] as argument. Do not use a [filter] tag.&lt;br /&gt;
&lt;br /&gt;
* '''[secondary_unit]''': ''(Optional)'' Same as '''[primary_unit]''' except for the secondary unit.&lt;br /&gt;
**[[StandardUnitFilter]] as argument. Do not use a [filter] tag.&lt;br /&gt;
&lt;br /&gt;
* '''[primary_attack]''': Information passed to the primary attack filter and $weapon variable on the new event.&lt;br /&gt;
&lt;br /&gt;
* '''[secondary_attack]''': Information passed to the second attack filter and $second_weapon variable on the new event.&lt;br /&gt;
&lt;br /&gt;
=== [insert_tag] ===&lt;br /&gt;
&lt;br /&gt;
Inserts a variable as WML. In other words, the value of the passed [[VariablesWML#Container|container variable]] will be injected into the game as if they had been written out in WML form. ([[#.5Binsert_tag.5D_Example|See Example]]).&lt;br /&gt;
&lt;br /&gt;
Tag insertion is a special case in that it can be used in places where other ActionWML cannot be used. The basic rule is that anywhere that $variable syntax works, tag insertion will also work. In practice this means pretty much everywhere except directly within top-level scenario tags.&lt;br /&gt;
&lt;br /&gt;
*'''name''': The [&amp;quot;name&amp;quot;] to be given to the tag. This must be a tag which would be valid at the place where [insert_tag] is used, for anything to happen. (For example, if used as ActionWML, it should be a [[ActionWML]] tag name, and it may be a recognized subtag such as &amp;quot;option&amp;quot; when used within a [message]).&lt;br /&gt;
&lt;br /&gt;
*'''variable''': Name of the container variable which will have its value inserted into the tag.&lt;br /&gt;
&lt;br /&gt;
=== [role] ===&lt;br /&gt;
&lt;br /&gt;
Tries to find a unit to assign a role to.&amp;lt;br&amp;gt;This is useful if you want to choose a non-major character to say some things during the game. Once a role is assigned, you can use '''role=''' in a unit filter to identify the unit with that role (See [[FilterWML]]).&amp;lt;br&amp;gt;However, there is no guarantee that roles will ever be assigned. You can use '''[have_unit]''' (see [[ConditionalActionsWML#Condition_Tags|Condition Tags]]) to see whether a role was assigned. This tag uses a [[StandardUnitFilter]] (without [filter]) with the modification to order the search by type, mark only the first unit found with the role, and the role attribute is not used in the search. If for some reason you want to search for units that have or don't have existing roles, you can use one or more [not] filters. The will check recall lists in addition to units on the map. In normal use, you will probably want to include a ''side'' attribute to force the unit to be on a particular side.&lt;br /&gt;
&lt;br /&gt;
* '''role''': the value to store as the unit's role. This role is not used in the [[StandardUnitFilter]] when doing the search for the unit to assign this role to.&lt;br /&gt;
&lt;br /&gt;
* '''type''': a comma-separated list of possible types the unit can be. If any types are given, then units will be searched by type in the order listed. If no type is given, then no particular order with respect to type is guaranteed.&lt;br /&gt;
&lt;br /&gt;
* [[StandardUnitFilter]], do not use a [filter] sub-tag. SUF's role= and type= keys are not used: if you want to use them, use a nested SUF wrapped inside a [and] tag.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Using [set_variables] to Create Arrays of WML ===&lt;br /&gt;
&lt;br /&gt;
 [set_variables]&lt;br /&gt;
     name=arr&lt;br /&gt;
     mode=replace&lt;br /&gt;
     [value]&lt;br /&gt;
         foo=bar&lt;br /&gt;
     [/value]&lt;br /&gt;
     [value]&lt;br /&gt;
        foo=more&lt;br /&gt;
     [/value]&lt;br /&gt;
 [/set_variables]&lt;br /&gt;
 {DEBUG_MSG $arr[0].foo}&lt;br /&gt;
 {DEBUG_MSG $arr[1].foo}&lt;br /&gt;
&lt;br /&gt;
This will produce two output messages, first one saying '''bar''' and next one saying '''more'''.&lt;br /&gt;
&lt;br /&gt;
=== [insert_tag] Example ===&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=moveto&lt;br /&gt;
     &lt;br /&gt;
     [set_variable]&lt;br /&gt;
         name=temp.speaker&lt;br /&gt;
         value=Konrad&lt;br /&gt;
     [/set_variable]&lt;br /&gt;
     &lt;br /&gt;
     [set_variable]&lt;br /&gt;
         name=temp.message&lt;br /&gt;
         value= _ &amp;quot;Yo Kalenz!&amp;quot;&lt;br /&gt;
     [/set_variable]    &lt;br /&gt;
     &lt;br /&gt;
     [insert_tag]&lt;br /&gt;
         name=message&lt;br /&gt;
         variable=temp&lt;br /&gt;
     [/insert_tag]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
This is effectively identical to:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=moveto&lt;br /&gt;
     &lt;br /&gt;
     [message]&lt;br /&gt;
         speaker=Konrad&lt;br /&gt;
         message= _ &amp;quot;Yo Kalenz!&amp;quot;&lt;br /&gt;
     [/message]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[VariablesWML]]&lt;br /&gt;
* [[ActionWML]]&lt;br /&gt;
** [[ConditionalWML]]&lt;br /&gt;
** [[DirectActionsWML]]&lt;br /&gt;
** [[InterfaceActionsWML]]&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;br /&gt;
[[Category: ActionsWML]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=InterfaceActionsWML&amp;diff=46365</id>
		<title>InterfaceActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=InterfaceActionsWML&amp;diff=46365"/>
		<updated>2012-04-09T19:56:14Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* [item] */ document [item]redraw=&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== Interface actions ==&lt;br /&gt;
&lt;br /&gt;
Part of [[ActionWML]], interface actions are actions that do not have a direct effect on gameplay;&lt;br /&gt;
instead, they show something to the player.  The main interface tags&lt;br /&gt;
are '''[message]''' and '''[objectives]''', but several other tags affect&lt;br /&gt;
the interface also.&lt;br /&gt;
&lt;br /&gt;
== [inspect] ==&lt;br /&gt;
This user interface action only works in debug mode. It displays the gamestate inspector dialog (the same one which can be brought up with '':inspect'' ), which can be used to inspect the values of WML variables, AI configuration, recall lists, and more.&lt;br /&gt;
&lt;br /&gt;
* '''name''': optional attribute to specify the name of this gamestate inspector dialog. It is just a label to help differentiate between different invocations of gamestate inspector dialog.&lt;br /&gt;
&lt;br /&gt;
== [message] ==&lt;br /&gt;
The most commonly used interface action is [message], which displays a message to the user in a dialog box. It can also be used to take input from the user.&lt;br /&gt;
&lt;br /&gt;
The following key/tags are accepted for [message]:&lt;br /&gt;
* [[StandardUnitFilter]]: The unit whose profile and name are displayed. Do not use a [filter] tag. If no unit matching this filter is found, the message is not displayed (The unit has probably been killed).&amp;lt;br&amp;gt;'''[message]''' elements should be constructed so that it is either guaranteed that a certain unit is alive, or so that dialog flows smoothly even if the message isn't displayed.&lt;br /&gt;
&lt;br /&gt;
* '''speaker''': an alternative to standard unit filter. You may specify as the value of the speaker attribute a unit id or any of the following special values:&lt;br /&gt;
** '''narrator''': the dialog box is displayed without a caption for the unit speaking or a unit image&lt;br /&gt;
** '''unit''': the primary unit for the event is speaking&lt;br /&gt;
** '''second_unit''': the secondary unit for the event is speaking&lt;br /&gt;
&lt;br /&gt;
* '''message''': (translatable) the text to display to the right of the image. ''message'' is sometimes multiple lines; if it is, be sure to use quotes(''' ' ''' or ''' &amp;quot; ''')&lt;br /&gt;
* '''[show_if]''': if present then this message will only be displayed if the conditional statement in this tag is passed (see [[ConditionalActionsWML#Condition_Tags|ConditionalActionsWML]])&lt;br /&gt;
* '''side_for''': (default: all sides) comma-separated list of sides for who message is shown.&lt;br /&gt;
* '''image''': (default: profile image of speaker) the image to display next to the message.&lt;br /&gt;
* '''caption''': (default: name of speaker) the caption to display beside the image. Name to be displayed. Note: use a translation mark to avoid wmllint errors.&lt;br /&gt;
* '''scroll''': Boolean specifying whether the game view should scroll to the speaking unit. Defaults to ''yes''.&lt;br /&gt;
* '''duration''': (default: 10) the minimum number of frames for this message to be displayed. (A frame lasts about 30 milliseconds.) During this time any dialog decisions will be disregarded.&lt;br /&gt;
* '''sound''': a sound effect (wav file) to play as the message is displayed. This can be a comma-separated list, from which one will be randomly chosen.&lt;br /&gt;
* '''[option]''': No '''[option]''' elements have to be used. If '''[option]''' elements are present, then each option will be displayed in a menu for the user to select one option.&lt;br /&gt;
** '''message''': (translatable) the text displayed for the option (see [[DescriptionWML]])&lt;br /&gt;
** '''[show_if]''': if present then this option will only be displayed if the conditional statement in this tag is passed (see [[InternalActionsWML]])&lt;br /&gt;
** '''[command]''': an element containing actions which are executed if the option is selected.&lt;br /&gt;
* '''[text_input]''': there can be only one [text_input] tag. this adds a text input field to the message.&lt;br /&gt;
** '''variable''': the variable that the user's input will be written to&lt;br /&gt;
** '''label''': a text label to the left of the input field&lt;br /&gt;
** '''max_length''': the maximum number of characters that may be typed into the field&lt;br /&gt;
** '''text''': text that is written into the field in the beginning&lt;br /&gt;
* Check [[EventWML#Multiplayer_safety]] to find out in which events you can safely use '''[option]''' and '''[text_input]''' without causing OOS.&lt;br /&gt;
&lt;br /&gt;
=== Formatting ===&lt;br /&gt;
In 1.8, [http://developer.gnome.org/pango/unstable/PangoMarkupFormat.html Pango markup formatting codes] have been adopted for '''[message]'''. These can also be used in unit names (user_description), objectives, and such. Note that you'll probably want to use a single quote ' instead of a double quote &amp;quot; as double quotes cannot be escaped, otherwise the string will appear fragmented and you may also encounter errors. Running wmllint on your campaign will up-convert it, warning you about unusual cases you must fix by hand.&lt;br /&gt;
&lt;br /&gt;
For example, if you wanted to write &amp;quot;You are victorious!&amp;quot; in large, italic, gold letters, you might write it this way:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;span color='#BCB088' size='large' font-style='italic'&amp;gt;You are victorious!&amp;lt;/span&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These are the codes taken from the Pango markup formatting guide:&lt;br /&gt;
&lt;br /&gt;
*'''font''', '''font_desc''': A font description string, such as &amp;quot;Sans Italic 12&amp;quot;.&lt;br /&gt;
*'''font_family''', '''face''': A font family name.&lt;br /&gt;
*'''font_size''', '''size''': Font size in 1024ths of a point, or one of the absolute sizes 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', or one of the relative sizes 'smaller' or 'larger'.&lt;br /&gt;
*'''font_style''', '''style''': One of 'normal', 'oblique', 'italic'.&lt;br /&gt;
*'''font_weight''', '''weight''': One of 'ultralight', 'light', 'normal', 'bold', 'ultrabold', 'heavy', or a numeric weight.&lt;br /&gt;
*'''font_variant''', '''variant''': One of 'normal' or 'smallcaps'.&lt;br /&gt;
*'''font_stretch''', '''stretch''': One of 'ultracondensed', 'extracondensed', 'condensed', 'semicondensed', 'normal', 'semiexpanded', 'expanded', 'extraexpanded', 'ultraexpanded'.&lt;br /&gt;
*'''foreground''', '''fgcolor''', '''color''': An RGB color specification such as '#00FF00' or a color name such as 'red'.&lt;br /&gt;
*'''background, bgcolor''': An RGB color specification such as '#00FF00' or a color name such as 'red'.&lt;br /&gt;
*'''underline''': One of 'none', 'single', 'double', 'low', 'error'.&lt;br /&gt;
*'''underline_color''': The color of underlines; an RGB color specification such as '#00FF00' or a color name such as 'red'.&lt;br /&gt;
*'''rise''': Vertical displacement, in 10000ths of an em. Can be negative for subscript, positive for superscript.&lt;br /&gt;
*'''strikethrough''': 'true' or 'false' whether to strike through the text.&lt;br /&gt;
*'''strikethrough_color''': The color of strikethrough lines; an RGB color specification such as '#00FF00' or a color name such as 'red'&lt;br /&gt;
*'''fallback''': 'true' or 'false' whether to enable fallback. If disabled, then characters will only be used from the closest matching font on the system. No fallback will be done to other fonts on the system that might contain the characters in the text. Fallback is enabled by default. Most applications should not disable fallback.&lt;br /&gt;
*'''letter_spacing''': Inter-letter spacing in 1024ths of a point.&lt;br /&gt;
*'''gravity''': One of 'south', 'east', 'north', 'west', 'auto'.&lt;br /&gt;
*'''gravity_hint''': One of 'natural', 'strong', 'line'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In 1.6, Wesnoth uses older text formatting options&lt;br /&gt;
* A tilde (~) as the first character causes the line to be boldfaced.&lt;br /&gt;
* An at symbol (@) as the first character causes the line to be green, as done with victory conditions.&lt;br /&gt;
* A pound symbol (#) as the first character causes the line to be red, as done with defeat conditions.&lt;br /&gt;
* An asterisk (*) as the first character causes the line to be bigger.&lt;br /&gt;
* A backquote (`) as the first character causes the line to be smaller.&lt;br /&gt;
* If used, the caption key text is boldfaced.&lt;br /&gt;
* An RGB colour code in the beginning causes the line to be the given colour. This can still be preceded by the above characters. Example: ''message=_&amp;quot;&amp;lt;255,0,0&amp;gt;Red!&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
== [objectives] ==&lt;br /&gt;
The other tag used for plot development is '''[objectives]'''.&lt;br /&gt;
The '''[objectives]''' tag overwrites any previously set objectives,&lt;br /&gt;
and displays text which should describe the objectives of the scenario.&lt;br /&gt;
Scenario objectives are displayed on the player's first turn after the tag is used,&lt;br /&gt;
or as part of the event if it triggers during that player's turn.&lt;br /&gt;
Objectives can also be accessed at any time in a scenario using the&lt;br /&gt;
&amp;quot;Scenario Objectives&amp;quot; game menu option, making this tag useful for&lt;br /&gt;
scenario-specific information that the player may need to refer to during play.&lt;br /&gt;
&lt;br /&gt;
Attributes of '''[objectives]''':&lt;br /&gt;
* '''side''': Default '0'. The side to set the objectives for. A value of 0 sets objectives for all sides. note: There are side-specific objectives and default objectives, which are used in case a side doesn't have specific ones. Specifying 0 sets the default ones.&lt;br /&gt;
* '''[[StandardSideFilter]]''' {{DevFeature1.11}} tags and keys: Sets the objectives of all matching sides to these passed specifications (the rest of this [objectives] tag). If no sides (such as when passing side=0) or all sides match, sets the default objectives, and the side specific ones for the matching sides otherwise.&lt;br /&gt;
* '''bullet''': Default '• '. Replaces the default bullet, with whatever is passed, for all objectives, gold carryover notes, and notes defined with [note].&lt;br /&gt;
* '''summary''': Displayed first in the objectives text, this should describe the basic objective for the overall scenario.  Can be omitted.&lt;br /&gt;
* '''note''': Displayed last in the objectives text, this is sometimes used for hints or additional information.  Can be omitted.&lt;br /&gt;
* '''victory_string''': Default ' _ &amp;quot;Victory:&amp;quot;', this text precedes the victory objectives.&lt;br /&gt;
* '''defeat_string''': Default ' _ &amp;quot;Defeat:&amp;quot;', this text precedes the defeat objectives.&lt;br /&gt;
* '''gold_carryover_string''': Default ' _ &amp;quot;Gold carryover:&amp;quot;', this text precedes the gold carryover information.&lt;br /&gt;
* '''notes_string''': Default ' _ &amp;quot;Notes:&amp;quot;', this text precedes the notes.&lt;br /&gt;
* '''silent''': Default: not present. If set to &amp;quot;yes&amp;quot;, the objectives are silently changed. Else, they will be shown to the user when appropriate.&lt;br /&gt;
&lt;br /&gt;
Tags of '''[objectives]''':&lt;br /&gt;
* '''[objective]''': describes a win or loss condition. Most scenarios have multiple win or loss conditions, so use a separate [objective] subtag for each line; this helps with translations.&lt;br /&gt;
** '''bullet''': Default '• ' or whatever is set in the parent [objectives] block. Replaces the default bullet, with whatever is provided, for the objective defined by the [objective] block.&lt;br /&gt;
** '''red''': Default '0' for winning objectives, '255' for losing objectives. Overrides the default red coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''green''': Default '255' for winning objectives, '0' for losing objectives. Overrides the default green coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''blue''': Default '0'. Overrides the default blue coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''description''': text for the specific win or loss condition.&lt;br /&gt;
** '''condition''': The color and placement of the text. Values are 'win'(colored green, placed after ''victory_string'') and 'lose'(colored red, placed after ''defeat_string'')&lt;br /&gt;
** '''show_turn_counter''': If set to yes, displays the number of turns remaining in the scenario. Default is no.&lt;br /&gt;
** '''[show_if]''': A condition that disables the objective if it doesn't hold. Conditional objectives are refreshed at '''[show_objectives]''' time only.&lt;br /&gt;
* '''[gold_carryover]''': describes how the gold carryover works in this scenario. This is intended to be a more convenient way of displaying carryover information than using the note= key in [objectives].&lt;br /&gt;
** '''bullet''': Default '• ' or whatever is set in the parent [objectives] block. Replaces the default bullet with whatever is provided.&lt;br /&gt;
** '''red''': Default '255'. Overrides the default red coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''green''': Default '255'. Overrides the default green coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''blue''': Default '192'. Overrides the default blue coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''bonus''' (boolean): whether an early finish bonus is granted. If omitted, early finish bonus is not mentioned.&lt;br /&gt;
** '''carryover_percentage''': the amount of carryover gold. If omitted, the amount is not mentioned.&lt;br /&gt;
* '''[note]''': describes a note, usually used for hints or additional information. This is an easier way of adding several notes than concatenating them together into a single string to use with the ''note='' key.&lt;br /&gt;
** '''bullet''': Default '• ' or whatever is set in the parent [objectives] block. Replaces the default bullet with whatever is provided for the note defined by the [note] block.&lt;br /&gt;
** '''red''': Default '255'. Overrides the default red coloring of the entire note, including the bullet.&lt;br /&gt;
** '''green''': Default '255'. Overrides the default green coloring of the entire note, including the bullet.&lt;br /&gt;
** '''blue''': Default '255'. Overrides the default blue coloring of the entire note, including the bullet.&lt;br /&gt;
** '''description''': the text of the note.&lt;br /&gt;
** {{DevFeature1.11}} '''[show_if]''': The note will not be shown if the specified condition isn't met. Conditional notes are refreshed at '''[show_objectives]''' time only.&lt;br /&gt;
&lt;br /&gt;
=== Macros ===&lt;br /&gt;
There are a few predefined macros for Objectives that you can use to shorten the code: [http://www.wesnoth.org/macro-reference.xhtml#SET_OBJECTIVES SET_OBJECTIVES], [http://www.wesnoth.org/macro-reference.xhtml#VICTORY_CONDITION VICTORY_CONDITION], and [http://www.wesnoth.org/macro-reference.xhtml#DEFEAT_CONDITION DEFEAT_CONDITION]. Follow the links for each one to see complete syntax and example usage.&lt;br /&gt;
&lt;br /&gt;
== [set_menu_item] ==&lt;br /&gt;
This tag is used to add a custom option in the right-click context menu which can then be used to trigger arbitrary WML commands.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Due to limitations in portable devices where there are no scroll bars for context menus, there is a hard-coded limit of 7 custom WML menu items. If you really need to have more than 7 menu items, try combining some of them in a submenu.&lt;br /&gt;
&lt;br /&gt;
* '''id''': the unique id for this menu item. If a menu item with this id already exists, it allows you to set specific changes to that item.&lt;br /&gt;
* '''description''': the in-game text that will appear for this item in the menu.&lt;br /&gt;
* '''image''': the image to display next to this item.&lt;br /&gt;
* '''needs_select''': if ''yes'' (default ''no''), then the latest select event (see [[EventWML]]) that triggered before this menu item was chosen will be transmitted over the network before this menu item action will be. This only has any effect in networked multiplayer, and is intended to allow more elaborate menu item behaviour there without causing out of sync errors. If you don't know what this means, just leave it false.&lt;br /&gt;
* '''[show_if]''': If present, the menu item will only be available if the conditional statement (see [[ConditionalActionsWML#Condition_Tags|ConditionalActionsWML]]) within evaluates to true. When this is evaluated, the WML variables ''$x1'' and ''$y1'' will point to the location on which the context menu was invoked, so it's possible to for example only enable the option on empty hexes or on a particular unit.&lt;br /&gt;
* '''[filter_location]''': contains a location filter similar to the one found inside Single Unit Filters (see [[FilterWML]]). The menu item will only be available on matching locations.&lt;br /&gt;
* '''[command]''': contains the WML actions to be executed when the menu item is selected. Again, the WML variables ''$x1'' and ''$y1'' will point to the location on which the context menu was invoked on.&lt;br /&gt;
** '''delayed_variable_substitution ''' {{DevFeature1.11}} (boolean yes|no, default: yes): If no, forces a variable substitution run onto the wml included in this [command] block. Use this, if you want variables which are to substitute to get the values they have at execution time of the event where this set_menu_item appears. Other than that, they get the values they have at invocation time of the menu item.&lt;br /&gt;
&lt;br /&gt;
== [clear_menu_item] ==&lt;br /&gt;
{{DevFeature1.11}}&lt;br /&gt;
&lt;br /&gt;
Removes a menu item from the scenario.&lt;br /&gt;
Normally menu items are, including all their defining wml, automatically carried over between scenarios. This tag prevents this. (The behavior is comparable to set_variable/clear_variable).&lt;br /&gt;
* '''id''': (string): id of the menu item to clear. Can be a comma-separated list.&lt;br /&gt;
&lt;br /&gt;
== Other interface tags ==&lt;br /&gt;
&lt;br /&gt;
The following tags are also action tags:&lt;br /&gt;
=== [item] ===&lt;br /&gt;
Makes a graphical item appear on a certain hex. Note this only places the graphics for an item. It does not make the item do anything. Use a moveto event to make moving onto the item do something. &amp;lt;tt&amp;gt;''('''Hint:''' There are a number of predefined items that are used in various campaigns that you can make use of. You can find [http://www.wesnoth.org/macro-reference.xhtml#file:items.cfg a list of them] if you look into the items.cfg file in the wesnoth install directory (under /data/core/macros))''&amp;lt;/tt&amp;gt;&lt;br /&gt;
* '''x''', '''y''': the location to place the item. (only for [event][item]: full [[StandardLocationFilter|SLF]] support)&lt;br /&gt;
* '''image''': the image (in ''images/'' as .png) to place on the hex.&lt;br /&gt;
* '''halo''': an image to place centered on the hex. Use this instead of ''image'' if the image is bigger than the hex or if you want to animate an image. ''Example (where the integer after the colon is the duration of each frame): halo=scenery/fire1.png:100,scenery/fire2.png:100,scenery/fire3.png:100,scenery/fire4.png:100,scenery/fire5.png:100,scenery/fire6.png:100,scenery/fire7.png:100,scenery/fire8.png:100''&lt;br /&gt;
* '''team_name''': name of the team for which the item is to be displayed (hidden for others). For multiple teams just put all the names in one string, for example separated by commas.&lt;br /&gt;
* '''visible_in_fog''': whether the item should be visible through fog or not. Default yes.&lt;br /&gt;
* '''redraw''': {{DevFeature1.11}}(boolean yes|no, default: yes): If no, disables implicit calls to [[InterfaceActionsWML#.5Bredraw.5D|[redraw]]] when placing the items.&lt;br /&gt;
&lt;br /&gt;
=== [remove_item] ===&lt;br /&gt;
Removes any graphical items on a given hex.&lt;br /&gt;
* [[StandardLocationFilter]]: the hexes to remove items off&lt;br /&gt;
* '''image''' if specified, only removes the given image item (This image name must include any [[ImagePathFunctionWML|image path functions]] appended to the original image name.)&lt;br /&gt;
&lt;br /&gt;
=== [print] ===&lt;br /&gt;
Displays a message across the screen. The message will disappear after a certain time.&lt;br /&gt;
* '''text''': (translatable) the text to display.&lt;br /&gt;
* '''size''': (default=12) the pointsize of the font to use&lt;br /&gt;
* '''duration''': (default=50) the length of time to display the text for. This is measured in the number of 'frames'. A frame in Wesnoth is usually displayed for around 30ms.&lt;br /&gt;
* '''red''', '''green''', '''blue''': (default=0,0,0) the color to display the text in. Values vary from 0-255.&lt;br /&gt;
=== [move_unit_fake] ===&lt;br /&gt;
Moves an image of a unit along a certain path on the map. The path does not need to be a continuous list of adjacent hexes, so for example only the start and end points can be given, in which case the straightest line between those points will be calculated and used.&lt;br /&gt;
* '''type''': the type of the unit whose image to use&lt;br /&gt;
* '''x''': a comma-separated list of x locations to move along&lt;br /&gt;
* '''y''': a comma-separated list of y locations to move along (x and y values are matched pairs)&lt;br /&gt;
* '''side''': the side of the fake unit, used for team-coloring the fake unit&lt;br /&gt;
* '''gender''': the gender of the fake unit. Example: gender=female&lt;br /&gt;
* '''variation''': the variation of the fake unit. Example: variation=undead&lt;br /&gt;
* '''image_mods''': [[ImagePathFunctionWML|image path functions]] sequence to be applied on the fake unit.&lt;br /&gt;
=== [move_units_fake] ===&lt;br /&gt;
moves multiple images of units along paths on the map. These units are moved in lockstep.&lt;br /&gt;
* '''[fake_unit]''': A fake unit to move&lt;br /&gt;
** '''type''': the type of unit whose image to use&lt;br /&gt;
** '''x''': a comma-separated list of x locations to move along&lt;br /&gt;
** '''y''': a comma-separated list of y locations to move along (x and y values are matched pairs)&lt;br /&gt;
** '''side''': the side of the fake unit, used for team-coloring the fake unit&lt;br /&gt;
** '''skip_steps''': the number of steps to skip before this unit starts moving&lt;br /&gt;
=== [hide_unit] ===&lt;br /&gt;
Temporarily prevents the engine from displaying the given unit. The unit does not become invisible, as it would be with the '''[hides]''' ability; it is still the same plain unit, but without an image. Useful in conjunction with '''[move_unit_fake]''': to move a leader unit into position on-screen. Until 1.8 each '''[hide_unit]''' tag only hides one unit.&lt;br /&gt;
* [[StandardUnitFilter]]: All matching units will be hidden&lt;br /&gt;
&lt;br /&gt;
=== [unhide_unit] ===&lt;br /&gt;
Stops the currently hidden units from being hidden.&lt;br /&gt;
* [[StandardUnitFilter]]: Only the matching units will be unhidden&lt;br /&gt;
&lt;br /&gt;
=== [scroll] ===&lt;br /&gt;
Scroll a certain number of pixels in a given direction. Useful for earthquake/shaking effects.&lt;br /&gt;
* '''x''', '''y''': the number of pixels to scroll along the x and y axis&lt;br /&gt;
=== '''[scroll_to]''' ===&lt;br /&gt;
Scroll to a given hex&lt;br /&gt;
* '''x''', '''y''': the hex to scroll to&lt;br /&gt;
* {{DevFeature1.11}} [[StandardLocationFilter]], do not use a [filter_location] sub-tag. If more than one location matches the filter, only the first matching location will be used.&lt;br /&gt;
* '''check_fogged''': whether to scroll even to locations covered in fog or shroud. Possible values ''true'' (don't scroll to fog) and ''false'' (scroll even to fog), with ''false'' as the default.&lt;br /&gt;
&lt;br /&gt;
=== [scroll_to_unit] ===&lt;br /&gt;
Scroll to a given unit&lt;br /&gt;
* [[StandardUnitFilter]]&lt;br /&gt;
* '''check_fogged''': whether to scroll even to locations covered in fog or shroud. Possible values ''true'' (don't scroll to fog) and ''false'' (scroll even to fog), with ''false'' as the default.&lt;br /&gt;
=== [select_unit] ===&lt;br /&gt;
Selects a given unit.&lt;br /&gt;
* [[StandardUnitFilter]]: The first unit found will be selected.&lt;br /&gt;
* '''fire_event''': whether a ''select'' event should be triggered or not (def. ''no''). (Note that select events aren't multiplayer save.)&lt;br /&gt;
* '''highlight''': whether the unit's current hex should be highlighted (def. ''yes'').&lt;br /&gt;
&lt;br /&gt;
=== [sound]===&lt;br /&gt;
Plays a sound&lt;br /&gt;
* '''name''': the filename of the sound to play (in ''sounds/'' as .wav or .ogg)&lt;br /&gt;
* '''repeat''': repeats the sound for a specified additional number of times (default=0)&lt;br /&gt;
=== [sound_source] ===&lt;br /&gt;
Creates a sound source. &amp;quot;Sound sources&amp;quot; is a general name for a mechanism which makes possible for map elements to emit sounds according to some rules, where &amp;quot;map elements&amp;quot; can be specific locations or terrain types. For now, only sound sources tied to locations are supported.&lt;br /&gt;
* '''id''': a unique identification key of the sound source&lt;br /&gt;
* '''sounds''': a list of comma separated, randomly played sounds associated with the sound source&lt;br /&gt;
* '''delay''': a numerical value (in milliseconds) of the minimal delay between two playbacks of the source's sound if the source remains visible on the screen; if one scrolls out and back in, the source will be considered as ready to play&lt;br /&gt;
* '''chance''': a percentage (a value from 0 to 100) describing the chance of the source being activated every second after the delay has passed or when the source's location appears on the screen (note that it cannot play more than one file at the same time)&lt;br /&gt;
* '''check_fogged''': possible values &amp;quot;true&amp;quot; and &amp;quot;false&amp;quot; - if true the source will not play if its locations are fogged&lt;br /&gt;
* '''check_shrouded''': possible values &amp;quot;true&amp;quot; and &amp;quot;false&amp;quot; - if true the source will not play if its locations are shrouded&lt;br /&gt;
* '''x,y''': similar to x,y as found in a [[StandardLocationFilter]], these are the locations associated with the sound source&lt;br /&gt;
* '''fade_range''' (default = 3): distance in hexes that determines a &amp;quot;circular&amp;quot; area around the one specified by '''full_range''' where sound volume fades out linearly&lt;br /&gt;
* '''full_range''' (default = 14): distance in hexes that determines a &amp;quot;circular&amp;quot; area where source plays with full volume, relative to screen center&lt;br /&gt;
* '''loop''': number of times a sound sample should be looped if it stays visible. -1 means infinite (~65000)&lt;br /&gt;
&lt;br /&gt;
=== [remove_sound_source] ===&lt;br /&gt;
Removes a previously defined sound source.&lt;br /&gt;
* '''id''': the identification key of the sound source to remove&lt;br /&gt;
&lt;br /&gt;
=== [music]===&lt;br /&gt;
Switches to playing different music&lt;br /&gt;
* '''name''': the filename of the music to play (in ''music/'' as .ogg)&lt;br /&gt;
* see [[MusicListWML]] for the correct syntax&lt;br /&gt;
===[volume]===&lt;br /&gt;
Changes the game volume to a percent of the preferences volume for the game being played. Values can go from 0 to 100:  &lt;br /&gt;
* '''music''':  Changes the music volume.&lt;br /&gt;
* '''sound''':  Changes the sound volume.&lt;br /&gt;
=== [color_adjust]===&lt;br /&gt;
Tints the color of the screen.&lt;br /&gt;
* '''red''', '''green''', '''blue''': values from -255 to 255, the amount to tint by for each color&lt;br /&gt;
=== [delay] ===&lt;br /&gt;
Pauses the game.&lt;br /&gt;
* '''time''': the time to pause in milliseconds&lt;br /&gt;
=== [redraw] ===&lt;br /&gt;
Redraws the screen (this normally isn't done during events, although some of the other interface actions cause the screen or parts of it to be redrawn).&lt;br /&gt;
* '''clear_shroud''' (boolean yes|no, default no): If yes, recalculates fog and shroud.  Useful if you for example spawn friendly units in the middle of an event and want the shroud to update accordingly (otherwise units that spawn inside fog would remain invisible for the duration of the event, since the fog would not automatically get cleared around them).&lt;br /&gt;
* '''[[StandardSideFilter]]''': the sides for which to recalculate fog and shroud.&lt;br /&gt;
* '''side''': If used (forces clear_shroud=yes), recalculates fog and shroud for that side.&lt;br /&gt;
&lt;br /&gt;
=== [unit_overlay] ===&lt;br /&gt;
Sets an image that will be drawn over a particular unit, and follow it around&lt;br /&gt;
* [[StandardUnitFilter]]: All matching units will get the overlay&lt;br /&gt;
* '''image''': the image to place on the unit&lt;br /&gt;
&lt;br /&gt;
=== [remove_unit_overlay] ===&lt;br /&gt;
removes a particular overlayed image from a unit&lt;br /&gt;
* [[StandardUnitFilter]]: The overlay will get removed from all matching units&lt;br /&gt;
* '''image''': the image to remove from the unit&lt;br /&gt;
&lt;br /&gt;
=== [animate_unit] ===&lt;br /&gt;
Uses an animation of a unit to animate it on screen (if the unit has the corresponding animation).&lt;br /&gt;
* '''flag''': The key to find the custom animation in the unit description (see the '''[extra_anim]''' description in [[AnimationWML]]). Standard animations can be triggered with the following keywords: ''leading recruited standing idling levelout levelin healing healed poisoned movement defend attack death victory pre_teleport post_teleport''&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument, see [[FilterWML]]. By default, the unit at the event location will be animated. You can use this tag to choose any other unit to animate.&lt;br /&gt;
* '''[primary_attack]''': If this tag is not present, the filter for animation will be triggered with no attack. If it is here, all attacks from the unit will be filtered, and a matching one will be used to filter the animation. Takes a weapon filter as argument, see [[FilterWML]].&lt;br /&gt;
* '''[secondary_attack]''': Similar to '''[primary_attack]'''. May be needed to trigger a defense animation correctly, if there are more than one animations available for the defending unit.&lt;br /&gt;
* '''hits''': yes/no/hit/miss/kill: which according variation of a attack/defense animation shall be chosen (required)&lt;br /&gt;
* '''text''': a text to hover during the animation &lt;br /&gt;
* '''red''': red value for the text color (0-255)&lt;br /&gt;
* '''green''': green value for the text color&lt;br /&gt;
* '''blue''': blue value for the text color&lt;br /&gt;
* '''with_bars''': yes/no: whether to display the status bars during the animation (e.g. the hitpoint bar)&lt;br /&gt;
* '''[animate]''': a sub block with the same syntax as '''[animate_unit]''' except that the '''[filter]''' block is mandatory to find the unit. This block will find and animate another unit simultaneously.&lt;br /&gt;
* '''[facing]''': a [[StandardLocationFilter]] specifying what direction the unit should be facing when animated&lt;br /&gt;
&lt;br /&gt;
=== [label] ===&lt;br /&gt;
Places a label on the map.&lt;br /&gt;
* '''x''', '''y''': the location of the label&lt;br /&gt;
* '''text''': what the label should say&lt;br /&gt;
* '''team_name''': if specified, the label will only be visible to the given team.&lt;br /&gt;
* '''color''': color of the label. The format is r,g,b; r, g and b are numbers between 0 and 255.&lt;br /&gt;
* '''visible_in_fog''': whether the label should be visible through fog or not. Default yes.&lt;br /&gt;
* '''visible_in_shroud''': whether the label should be visible through shroud or not. Default no.&lt;br /&gt;
* '''immutable''': whether this label is protected from being removed or changed by players. Default yes.&lt;br /&gt;
=== [floating_text]===&lt;br /&gt;
Floats text (similar to the damage and healing numbers) on the given locations.&lt;br /&gt;
* [[StandardLocationFilter]]: the text will be floated on all matching locations simultaneously.&lt;br /&gt;
* '''text''': the text to display.&lt;br /&gt;
&lt;br /&gt;
The default text color is &amp;lt;span style=&amp;quot;color: #6b8cff;&amp;quot;&amp;gt;'''#6b8cff'''&amp;lt;/span&amp;gt;. To change the color, use [[#Formatting|Pango markup]]. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Float some golden yellow text at 20,20.&lt;br /&gt;
[floating_text]&lt;br /&gt;
   x,y=20,20&lt;br /&gt;
   text=&amp;quot;&amp;lt;span color='#cccc33'&amp;gt;Your text here&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
[/floating_text]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [deprecated_message] ===&lt;br /&gt;
Shows a deprecated message in the message area, this feature is only intended to be used to warn about deprecated macros in mainline. The message is not translatable.&lt;br /&gt;
* '''message''': the message to show.&lt;br /&gt;
=== [wml_message] ===&lt;br /&gt;
Outputs a message to Wesnoth's console output. Intended for campaign designers to output silent text to the console, without annoying the player; then, that text might contain information useful for later bug-reporting. The log domain for it is '''wml''', and the '''debug/dbg''' log level is available for use with the '''logger''' attribute. Depending on the current log level ('''error''' by default), which may be changed with the in-game :log command, or the --log-&amp;lt;level&amp;gt;=wml command line switch, the messages are echoed to the in-game chat.&lt;br /&gt;
* '''message''': the message to show.&lt;br /&gt;
* '''logger''': the Wesnoth engine output logger that should catch the text; this might be 'err' (the errors log level), 'warn'/'wrn' (the warnings log level) or anything else (the information log level). Not all information will be displayed depending on the log level chosen when starting Wesnoth.&lt;br /&gt;
&lt;br /&gt;
Note: As of 1.9.4/1.9.5 (r48805) the following &amp;quot;loggers&amp;quot; should work: If in [wml_message]: err/error, warn/wrn/warning, debug/dbg; using the :log command: Only the long forms error, warning, info and debug (this part gathered by trying rather than source inspecting). The long forms are most likely also the only ones working when starting wesnoth with --log-&amp;lt;level&amp;gt;=wml.&lt;br /&gt;
For log level warning or error (as during normal play), only wml_messages with logger error or warning display (for both). With logger info or debug, additionally wml_messages with logger info or debug display (for both).&lt;br /&gt;
&lt;br /&gt;
=== [open_help] ===&lt;br /&gt;
Opens the in-game help.&lt;br /&gt;
* '''topic''': the id of the topic to open&lt;br /&gt;
=== [show_objectives] ===&lt;br /&gt;
refreshes the objectives defined by [objectives] and its [show_if] tags, and displays them. (It is also called whenever the user explicitly asks for the objectives; this matters only if the tag was overridden by a [[LuaWML#register_wml_action|Lua]] script.)&lt;br /&gt;
* '''side''': the side to show the objectives. If not set, all sides are used.&lt;br /&gt;
* '''[[StandardSideFilter]]''' {{DevFeature1.11}} tags and keys: Tag affects the matching sides instead of just all or the one given by the integer value of the side= key.&lt;br /&gt;
&lt;br /&gt;
=== [chat] ===&lt;br /&gt;
Displays a message in the chat area.&lt;br /&gt;
* '''speaker''': (default=&amp;quot;WML&amp;quot;) A string for the name of the sender of the message.&lt;br /&gt;
* '''message''': The message that should be displayed.&lt;br /&gt;
* '''[[StandardSideFilter]]''' tags and keys as argument; if the same client controls multiple sides that match, then the message will only be displayed once.&lt;br /&gt;
&lt;br /&gt;
== Useful Macros ==&lt;br /&gt;
There are some predefined macros that you find useful for interface actions. You can find a complete list along with a detailed explanation of how they work [http://www.wesnoth.org/macro-reference.xhtml here].&lt;br /&gt;
* '''{FLOATING_TEXT}''' Float some text over a unit similar to the damage numbers.&lt;br /&gt;
* '''{HIGHLIGHT_UNIT}''' Highlight a unit on the map. Use this to show important units&lt;br /&gt;
* '''{HIGHLIGHT_IMAGE}''' Places and highlights an image on the map. Use this to show important items or locations&lt;br /&gt;
* '''{SET_IMAGE}''' Places an image on the map which has no other function.&lt;br /&gt;
* '''{QUAKE &amp;lt;soundfile&amp;gt;}''' Creates a tremor like screenshake and plays &amp;lt;soundfile&amp;gt;. ('''{TREMOR}''' is a deprecated version, equivalent to '''{QUAKE (rumble.ogg)}''')&lt;br /&gt;
* '''{FLASH_WHITE}''' Flash the screen white momentarily. You can also replace WHITE with RED, BLUE or GREEN for a different colour.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[DirectActionsWML]]&lt;br /&gt;
* [[InternalActionsWML]]&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;br /&gt;
[[Category: ActionsWML]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=45913</id>
		<title>DirectActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=45913"/>
		<updated>2012-03-29T14:15:27Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* [object] */ clean and improve [object] documentation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== Direct actions ==&lt;br /&gt;
&lt;br /&gt;
Direct actions are actions that have a direct effect on gameplay. They can be used inside of [[EventWML|events]].&lt;br /&gt;
&lt;br /&gt;
The following tags are actions:&lt;br /&gt;
&lt;br /&gt;
=== [endlevel] ===&lt;br /&gt;
Ends the scenario.&lt;br /&gt;
* '''result''': before the scenario is over, all events with ''name=result'' are triggered. If ''result=victory'', the player progresses to the next level; if ''result=defeat'', the game returns to the main menu. &lt;br /&gt;
&lt;br /&gt;
When the result is &amp;quot;victory&amp;quot; the following keys can be used:&lt;br /&gt;
* '''bonus''': whether the player should get bonus gold (maximum possible gold that could have been earned by waiting the level out). The default is bonus=yes.&lt;br /&gt;
* '''carryover_report''': whether the player should receive a summary of the scenario outcome, the default is carryover_report=yes.&lt;br /&gt;
* '''save''': whether a start-of-scenario save should be created for the next scenario, the default is save=yes. Do not confuse this with saving of replays for the current scenario.&lt;br /&gt;
* '''replay_save''': whether a replay save for the current scenario is allowed, the default is replay_save=yes. If yes, the player's settings in preferences will be used to determine if a replay is saved. If no, will override and not save a replay.&lt;br /&gt;
* '''linger_mode''': If ...=yes, the screen is greyed out and there's the possibility to save before advancing to the next scenario, the default is linger_mode=yes.&lt;br /&gt;
* '''reveal_map''': (Multiplayer only) (Default is 'yes') If 'no', shroud doesn't disappear when game ended.&lt;br /&gt;
* '''next_scenario''': (default specified in '''[scenario]''' tag) the ID of the next scenario that should be played.  All units that side 1 controls at this point become available for recall in ''next_scenario''.&lt;br /&gt;
* '''carryover_percentage''': by default 80% of the gold is carried over to the next scenario, with this key the amount can be changed.&lt;br /&gt;
* '''carryover_add''': if true the gold will be added to the starting gold the next scenario, if false the next scenario will start with the amount of the current scenario (after taxes) or the minimum in the next scenario. Default is false.&lt;br /&gt;
* '''music''': (default specified in '''[scenario]''' or '''[game_config]''' tags) a comma-separated list of music tracks from which one will be chosen and played once after any events related to the end of level result are executed; by default, victory_music is used on victory, and defeat_music on defeat.&lt;br /&gt;
* '''end_credits''': {{DevFeature1.11}} Whether to display the credits screen at the end of a single-player campaign. Defaults to ''yes''. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
* '''end_text''': (translatable) Text that is shown centered in a black screen at the end of a campaign. Defaults to &amp;quot;The End&amp;quot;. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
* '''end_text_duration''': Delay, in milliseconds, before displaying the game credits at the end of a campaign. In other words, for how much time '''end_text''' is displayed on screen. Defaults to 3500. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
&lt;br /&gt;
=== [unit] ===&lt;br /&gt;
Places a unit on the map.  For syntax see [[SingleUnitWML]].&lt;br /&gt;
* {{Short Note:Predefined Macro|GENERIC_UNIT}}&lt;br /&gt;
* '''to_variable''':  spawn directly into a variable instead of on the map.&lt;br /&gt;
&lt;br /&gt;
=== [recall] ===&lt;br /&gt;
Recalls a unit.  The unit is recalled free of charge, and is placed near the leader.&lt;br /&gt;
* [[StandardUnitFilter]]: the first matching unit will be recalled.  If no units match this tag is ignored. Do not use a [filter] tag. If a comma separated list is given, every unit currently considered for recall is checked against all the types (not each single one of the types against all units).&lt;br /&gt;
* '''x,y''': the unit is placed here instead of next to the leader.&lt;br /&gt;
* '''show''': yes/no, default yes: whether the unit is animated (faded in) or instantly displayed&lt;br /&gt;
* '''fire_event''': boolean yes|no (default no); whether any according prerecall or recall events shall be fired.&lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): If yes, checks for terrain passability when placing the unit (a nearby passable hex is chosen).&lt;br /&gt;
&lt;br /&gt;
=== [teleport] ===&lt;br /&gt;
Teleports a unit on map. {{Short Note:Predefined Macro|TELEPORT_UNIT}}&lt;br /&gt;
* '''[filter]''': [[StandardUnitFilter]] the first unit matching this filter will be teleported.&lt;br /&gt;
* '''x,y''': the position to teleport to.&lt;br /&gt;
* '''clear_shroud''': should shroud be cleared on arrival&lt;br /&gt;
* '''animate''': should a teleport animation be played (if the unit doesn't have a teleport animation, it will fade out/fade in)&lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): normally, units will not be teleported into terrain that is impassable for them. Setting this attribute to &amp;quot;no&amp;quot; permits it.&lt;br /&gt;
&lt;br /&gt;
(Note: There is also a ability named teleport, see [[AbilitiesWML]].)&lt;br /&gt;
&lt;br /&gt;
=== [terrain_mask] ===&lt;br /&gt;
Changes the terrain on the map.  See [[TerrainMaskWML]].&lt;br /&gt;
&lt;br /&gt;
=== [terrain] ===&lt;br /&gt;
Changes the terrain on the map.&lt;br /&gt;
* '''terrain''': the character of the terrain to use.  See [[TerrainCodesWML]] to see what letter a type of terrain uses.&lt;br /&gt;
* [[StandardLocationFilter]]. This [[StandardLocationFilter]]'s terrain= key is used for the new terrain, filtering by terrain can be done with a nested [[StandardLocationFilter]]: [and]terrain=terrain_string_to_be_filtered_for.&lt;br /&gt;
* '''layer''': (overlay|base|both, default=both) only change the specified layer.&lt;br /&gt;
* '''replace_if_failed''': (default=no) When replacing just one layer failed, try to replace the whole terrain. If '''terrain''' is an overlay only terrain, use the default_base as base layer. If the terrain has no default base, do nothing.&lt;br /&gt;
&lt;br /&gt;
=== [gold] ===&lt;br /&gt;
Gives sides gold.&lt;br /&gt;
* '''amount''': the amount of gold to give.&lt;br /&gt;
* '''side''': (default=1) the number of the side to give the gold to. Can be a comma-separated list of sides. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument {{DevFeature1.11}}: [gold][filter_side] is deprecated, use the new inline SSF.&lt;br /&gt;
&lt;br /&gt;
=== [unstore_unit] ===&lt;br /&gt;
Creates a unit from a game variable, and activates it on the playing field.  This must be a specific variable describing a unit, and may not be an array -- to unstore an entire array, iterate over it.  The variable is not cleared.  See also [[InternalActionsWML#.5Bstore_unit.5D|[store_unit]]], [[ConditionalActionsWML#.5Bwhile.5D|[while]]] and [[InternalActionsWML#.5Bclear_variable.5D|[clear_variable]]].&lt;br /&gt;
* '''variable''': the name of the variable.&lt;br /&gt;
* '''find_vacant''': whether the unit should be placed on the nearest vacant tile to its specified location.  If this is set to 'no'(default), then any unit on the same tile as the unit being unstored will be destroyed. &lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): If yes, checks for terrain passability when placing the unit. This key has no effect if find_vacant=no (no check performed then). Before 1.9 this key is always &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''text''': (translatable) floating text to display above the unit, such as a damage amount&lt;br /&gt;
* '''red''', '''green''', '''blue''': (default=0,0,0) the color to display the text in. Values vary from 0-255. You may find it convenient to use the {COLOR_HARM} or {COLOR_HEAL} macro instead. (Use {COLOR_HARM} or {COLOR_HEAL} instead of the whole red,green,blue= line.)&lt;br /&gt;
* '''advance''': (default=true) if true the unit is advanced if it has enough XP. When modifying XP make sure to do it from inside a [[EventWML#Multiplayer_safety|synchronized event]] or it may lead to OOS errors especially when several advancement paths exist. Note that advance and post advance events are called, so infinite loops can happen.&lt;br /&gt;
* '''fire_event''': (boolean yes|no, default no) Whether any advance/post advance events shall be fired if an advancement takes place, no effect otherwise.&lt;br /&gt;
* '''x''' ,'''y''': override unit location, &amp;quot;x,y=recall,recall&amp;quot; will put the unit on the unit's side's recall list.&lt;br /&gt;
Units can be unstored with negative (or zero) hit points. Such units will be automatically hit (and killed) in combat, but if given the chance to heal, they will have a minimum of one hit point after healing (regardless of how negative their hit points were). This is unusual-looking behavior, so often should be avoided.&amp;lt;!-- A known use-case is using [unstore_unit] to modify a unit during its last_breath event. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [allow_recruit] ===&lt;br /&gt;
Allows a side to recruit units it couldn't previously recruit.&lt;br /&gt;
* '''type''': the types of units that the side can now recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that is being allowed to recruit the units. This can be a comma-separated list note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [allow_extra_recruit] ===&lt;br /&gt;
Allows a leader to recruit units it couldn't previously recruit.&lt;br /&gt;
These types add to the types the leader can recruit because of [side]recruit=.&lt;br /&gt;
* '''extra_recruit''': the types of units that the unit can now recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_recruit] ===&lt;br /&gt;
Prevents a side from recruiting units it could previously recruit.&lt;br /&gt;
* '''type''': the types of units that the side can no longer recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that may no longer recruit the units. This can be a comma-separated list note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_extra_recruit] ===&lt;br /&gt;
Prevents a leader from recruiting units it could previously recruit.&lt;br /&gt;
* '''extra_recruit''': the types of units that the side can no longer recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [set_recruit] ===&lt;br /&gt;
Sets the units a side can recruit.&lt;br /&gt;
* '''recruit''': the types of units that the side can now recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that is having its recruitment set. This can be a comma-separated list. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [set_extra_recruit] === &lt;br /&gt;
Sets the units a leader can recruit.&lt;br /&gt;
* '''extra_recruit''': the types of units that the leader can now recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [modify_side] ===&lt;br /&gt;
Modifies some details of a given side in the middle of a scenario.  '''The following listed properties are the only properties that [modify_side] can affect!'''&lt;br /&gt;
* '''side''': (default=1) the number of the side that is to be changed. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* '''income''': the income given at the begining of each turn.&lt;br /&gt;
* '''recruit''': a list of unit types, replacing the side's current recruitment list.&lt;br /&gt;
* '''team_name''': the team in which the side plays the scenario.&lt;br /&gt;
* '''user_team_name''': a translatable string representing the team's description. This has no effect on alliances. Defaults to ''team_name''.&lt;br /&gt;
* '''gold''': the amount of gold the side owns.&lt;br /&gt;
* '''village_gold''': the income setting per village for the side.&lt;br /&gt;
* '''controller''': the identifier string of the side's controller. Uses the same syntax of the ''controller'' key in the [[SideWML|[side]]] tag.&lt;br /&gt;
* '''fog''': a boolean string (yes/no) describing the status of Fog for the side.&lt;br /&gt;
* '''shroud''': a boolean string describing the status of Shroud for the side.&lt;br /&gt;
* '''hidden''': a boolean string specifying whether side is shown in status table.&lt;br /&gt;
* '''color''': {{DevFeature1.11}} a team color range specification, name (e.g. &amp;quot;red&amp;quot;, &amp;quot;blue&amp;quot;), or number (e.g. &amp;quot;1&amp;quot;, &amp;quot;2&amp;quot;) for this side. The default color range names, numbers, and definitions can be found in data/core/team_colors.cfg.&lt;br /&gt;
* '''[ai]''': replaces a side's AI parameters with the new specified ones. Uses the same syntax described in [[AiWML]].&lt;br /&gt;
* '''switch_ai''': replaces a side ai with a new AI from specified file(ignoring those AI parameters above). Path to file follows the usual WML convention.&lt;br /&gt;
* '''share_maps''': change the share_maps side attribute. Be sure to use shroud=yes for that side and have it as an ally&lt;br /&gt;
* '''share_view''': change the share_view side attribute. Be sure to use fog=yes for that side and have it as an ally&lt;br /&gt;
* '''shroud_data''': changes to the side's shroud, using the same format as when defining the [side].&lt;br /&gt;
&lt;br /&gt;
=== [modify_turns] ===&lt;br /&gt;
Modifies the turn limit in the middle of a scenario.&lt;br /&gt;
* '''value''': the new turn limit.&lt;br /&gt;
* '''add''': if used instead of ''value'', specifies the number of turns to add to the current limit (can be negative).&lt;br /&gt;
* '''current''': changes the current turn number after applying turn limit modifications, if any. It is not possible to change the turn number to exceed the turn limit (1 &amp;lt;= current turns &amp;lt;= max turns).&lt;br /&gt;
&lt;br /&gt;
=== [allow_end_turn] ===&lt;br /&gt;
Allows human players to end their turn through the user interface if they were previously affected by the '''[disallow_end_turn]''' action. This action doesn't take any arguments.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_end_turn] ===&lt;br /&gt;
Disallows human players to end their turn through the user interface. This action doesn't take any arguments.&lt;br /&gt;
&lt;br /&gt;
=== [capture_village] ===&lt;br /&gt;
Changes the ownership of a village.&lt;br /&gt;
* [[StandardLocationFilter]]: all village locations matching the filter are affected.&lt;br /&gt;
* '''side''': the side that takes control of the village. This side needs to have a leader (canrecruit=yes). If the side key is not given, the village will become neutral (unless [filter_side] is present, in which case that side fiter decides, see below).&lt;br /&gt;
* '''[filter_side]''' with [[StandardSideFilter]] tags and keys as arguments; if both this tag and inline side= are present it's an error. Otherwise, the first matching side gets ownership (or the village becomes neutral if none match).&lt;br /&gt;
* '''fire_event''' (boolean yes|no, default: no): Whether any capture events shall be fired.&lt;br /&gt;
&lt;br /&gt;
=== [kill] ===&lt;br /&gt;
Removes all units (including units in a recall list) that match the filter from the game.&lt;br /&gt;
* [[StandardUnitFilter]]: Selection criterion; do not use a [filter] tag.&lt;br /&gt;
* '''animate''': if 'yes', displays the unit dying (fading away).&lt;br /&gt;
* '''fire_event''': if 'yes', triggers any appropriate 'die' events (See [[EventWML]]). Note that events are only fired for killed units that have been on the map (as opposed to recall list).&lt;br /&gt;
* '''[secondary_unit]''' with a [[StandardUnitFilter]] as argument. Do not use a [filter] tag. Has an effect only if fire_event=yes. The first on-map unit matching the filter becomes second_unit in any fired die and last breath events. If an on-map unit matches and if there are several units killed with a single [kill] tag, second_unit is this same unit for all of them. If no on-map unit matches or [secondary_unit] isn't present, the variable second_unit in each of the die and last breath events is always the same as the variable unit (the dying unit).&lt;br /&gt;
&lt;br /&gt;
=== [move_unit] ===&lt;br /&gt;
works like the MOVE_UNIT macro.&lt;br /&gt;
* [[StandardUnitFilter]] as argument; do not use a [filter] tag. All units matching the filter are moved. If the target location is occupied, the nearest free location is chosen.&lt;br /&gt;
* '''to_x''' (unsigned integer): The units are moved to this x coordinate. Can be a comma-separated list, in which case the unit follows this given path during the move.&lt;br /&gt;
* '''to_y''' (unsigned integer): The units are moved to this y coordinate. Can be a comma-separated list.&lt;br /&gt;
* '''fire_event''' (optional, boolean yes|no, default no): Whether any according moveto events shall be fired. The target location ($x1, $y1 in the event) may not be the same location that the unit was tried to be moved to, if the original target location is occupied or impassable.&lt;br /&gt;
* '''check_passability''' (boolean yes|no, default yes): Whether the terrain the unit is moved to should be checked for suiting the unit. (If it does not, a nearby suitable hex is chosen.)&lt;br /&gt;
&lt;br /&gt;
=== [modify_ai] ===&lt;br /&gt;
Changes AI objects (aspects, goals, candidate actions or stages) for a specified side. See [[AiWML#Adding_and_Deleting_Aspects_with_the_.5Bmodify_ai.5D_Tag|AiWML]] for full description.&lt;br /&gt;
&lt;br /&gt;
* '''action''' (string): Takes values 'add', 'change', 'delete' or 'try_delete' to do just that for the AI object.&lt;br /&gt;
* '''path''' (string): Describes which AI object is to be modified.  &lt;br /&gt;
* '''[facet]''', '''[goal]''', '''[candidate_action]''' or '''[stage]''': Details about the AI object to be modified.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument {{DevFeature1.11}}: [modify_ai][filter_side] is deprecated, use the new inline SSF.&lt;br /&gt;
&lt;br /&gt;
=== [modify_unit] ===&lt;br /&gt;
works similar to the MODIFY_UNIT macro.&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. All units matching this filter are modified. Matches on recall list units too.&lt;br /&gt;
* Accepts generally the syntax inside of wml unit variables created by [store_unit] which can be viewed in a savefile or by using the :inspect command. Can add traits with immediate effect. Cannot remove things. Subtags with the same name must be written in the correct order to match them with the tag they are supposed to modify.&lt;br /&gt;
example usage (see also the test scenario):&lt;br /&gt;
 [modify_unit]&lt;br /&gt;
     [filter]&lt;br /&gt;
         type=Troll Rocklobber&lt;br /&gt;
     [/filter]&lt;br /&gt;
     hitpoints=10&lt;br /&gt;
     [modifications]&lt;br /&gt;
         [trait]&lt;br /&gt;
             # first trait is unmodified&lt;br /&gt;
         [/trait]&lt;br /&gt;
         {TRAIT_HEALTHY}# second trait is replaced with the healthy trait&lt;br /&gt;
     [/modifications]&lt;br /&gt;
 [/modify_unit]&lt;br /&gt;
&lt;br /&gt;
The unit which is currently modified is accessible via $this_unit, e.g. hitpoints = &amp;quot;$($this_unit.hitpoints / 2)&amp;quot; to set the hitpoints of all units to half of their particular maxima. This this_unit variable is independent from the this_unit variable available in the SUF used to determine which units to modify (first all matching units are gathered, and then all those are modified).&lt;br /&gt;
&lt;br /&gt;
note: The syntax allowed is somehow vague. Just try things and possibly correct/add/modify this documentation. (a [http://forums.wesnoth.org/viewtopic.php?f=21&amp;amp;t=31676&amp;amp; forum thread] discusses some related issues).&lt;br /&gt;
&lt;br /&gt;
=== [transform_unit] ===&lt;br /&gt;
transforms every unit matching the filter to the given unit type. Keeps intact hitpoints, experience and status. If the unit is transformed to a non-living type (undead or mechanical), it will be also unpoisoned.&lt;br /&gt;
* [[StandardUnitFilter]]: do not use a [filter] tag.&lt;br /&gt;
* '''transform_to''': the unit type in which all the units matching the filter will be transformed. If missing, the units will follow their normal advancement.&lt;br /&gt;
&lt;br /&gt;
=== [petrify] ===&lt;br /&gt;
&lt;br /&gt;
* [[StandardUnitFilter]] as an argument. Do not use a [filter] tag. All units matching this filter are petrified. Recall list units are included.&lt;br /&gt;
&lt;br /&gt;
=== [unpetrify] ===&lt;br /&gt;
* [[StandardUnitFilter]] as an argument. Do not use a [filter] tag. All units matching this filter are unpetrified. Recall list units are included.&lt;br /&gt;
&lt;br /&gt;
=== [object] ===&lt;br /&gt;
Gives some unit an object and removes all items on the tile the unit is on.&lt;br /&gt;
* '''id''': (Optional) when the object is picked up, a flag is set for ''id''.  The object cannot be picked up if a flag for ''id'' has been set.  This means that any object with an id can only be used once, even if first_time_only=no is set for the event. This restriction is per level. In a campaign objects with the same id can be assigned once per level.&lt;br /&gt;
* '''delayed_variable_substitution''' (boolean yes|no, default no): If set to &amp;quot;yes&amp;quot;, the wml block contained in this [object] is not variable-substituted at execution time of the event where this [object] is within. You need this to work around a bug when adding ABILITY_TELEPORT via an [object] or when using [object][effect][filter]with a $this_unit (see http://gna.org/bugs/index.php?18893).&lt;br /&gt;
* '''[effect]''': one or more effect elements may be listed.  See [[EffectWML]] for a description of [effect].&lt;br /&gt;
* '''duration''': if 'level', effects only last until the end of the level (note : 'level' is the scenario, so this doesn't mean it last until the unit levels-up).&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. The first unit found that matches the filter will be given the object. Only on-map units are considered. If no unit matches or no [filter] is supplied, it is tried to apply the object to the unit at the $x1,$y1 location of the event where this [object] is in. The case of no unit being at that spot is handled in the same way as no unit matching a given filter ([else] commands executed, cannot_use_message displayed)&lt;br /&gt;
* '''[then]''': a subtag that lets you execute actions if the filter conditions are met.  The most common action that should be inside here is a '''[removeitem]''' tag, but you could probably put any tags that otherwise work in a [then] tag.&lt;br /&gt;
* '''[else]''': a subtag that lets you execute actions if the filter conditions are *not* met.&lt;br /&gt;
* '''silent''': whether or not messages should be suppressed. Default is &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''image''': the displayed image of the object.&lt;br /&gt;
* '''name''': (translatable) displayed as a caption of the image.&lt;br /&gt;
&lt;br /&gt;
* '''description''': (translatable) displayed as a message of the image.&lt;br /&gt;
* '''cannot_use_message''': (translatable) displayed instead of '''description''' if no unit passes the filter test.&lt;br /&gt;
&lt;br /&gt;
=== [remove_shroud] ===&lt;br /&gt;
Removes some shroud from the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
* '''side''': (default=1) the side for which to remove shroud. This can be a comma-separated list of sides. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* [[StandardLocationFilter]]: the range of tiles for which shroud should be removed&lt;br /&gt;
&lt;br /&gt;
=== [place_shroud] ===&lt;br /&gt;
Places some shroud on the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
* '''side''': (default=1) the side for which to place shroud. This can be a comma-separated list. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* [[StandardLocationFilter]]: the range of tiles on which shroud should be placed&lt;br /&gt;
&lt;br /&gt;
=== [lift_fog] ===&lt;br /&gt;
{{DevFeature1.11}}Lifts the fog of war from parts of the map for a certain side (only relevant for sides that have fog=yes), allowing a player to witness what occurs there. This is not shared with allies (even if share_view=yes), but multiple sides can be specified at once. The fog will remain cleared from these hexes until canceled by [reset_fog].&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] indicating which sides should be affected.&lt;br /&gt;
* [[StandardLocationFilter]]: the tiles from which fog should be lifted.&lt;br /&gt;
&lt;br /&gt;
=== [reset_fog] ===&lt;br /&gt;
{{DevFeature1.11}}Cancels the effects of an earlier invocation of [lift_fog], causing fog to reset to what it would have been had WML not interfered. (That is, hexes that a side's units could not see this turn will be re-fogged, while other hexes remain unchanged.)&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] indicating which sides should be affected.&lt;br /&gt;
* [[StandardLocationFilter]]: the fog reset will be restricted to these tiles.&lt;br /&gt;
Omitting both the SSF and the SLF would cancel all earlier uses of [lift_fog].&lt;br /&gt;
&lt;br /&gt;
=== [allow_undo] ===&lt;br /&gt;
Allows the player to undo the event that this tag is inside.  Has an effect only inside moveto events.  If the move is undone, only the position of the unit will be restored; any altered variables or changes to the game will remain changed after the move is undone.  It is up to the scenario designer to avoid abusing this command.&lt;br /&gt;
* Technically, if '''[allow_undo]''' is inside an '''[event]''' with ''first_time_only=yes'' (the default setting), and the user undoes the event, then the state of the game has changed in this way: the event will not fire a second time, even though the user undid the move the first time.&lt;br /&gt;
&lt;br /&gt;
=== [heal_unit] ===&lt;br /&gt;
Heal a unit. The variable '''$heal_amount''' will be set to the exact number of points healed (i.e can be lesser than the parameter '''amount''' if the unit is fully healed). $heal_amount contains only the number of hitpoints the first unit that was found got healed.&lt;br /&gt;
*  '''[filter]''': [[StandardUnitFilter]] All matching on-map units are healed. If no filter is supplied, it is tried to take the unit at $x1, $y1.&lt;br /&gt;
*  '''[filter_second]''': [[StandardUnitFilter]] all the units matching the filter ''and'' having the ''heals'' ability will have their animation played (if ''animate'' is set to true) for each of the units healed.&lt;br /&gt;
*  '''amount''': (integer, default full) the maximum points the unit(s) will be healed. Can't set below 1 or above max_hitpoints. If &amp;quot;full&amp;quot;, sets hitpoints to max_hitpoints. Before 1.9 the default is 0.&lt;br /&gt;
*  '''animate''': a boolean which indicate if the healing animations must be played. (default no)&lt;br /&gt;
*  '''moves''': (integer, default 0) The maximum current movement points the units will be &amp;quot;healed&amp;quot;. Can't set below 0 or above max_moves. If &amp;quot;full&amp;quot;, sets moves to max_moves.&lt;br /&gt;
* '''restore_attacks''': (boolean, default no) Whether the units' attacks_left should be reset to their max_attacks (usually 1).&lt;br /&gt;
* '''restore_statuses''': (boolean, default yes) Whether standard statuses should be reset to &amp;quot;no&amp;quot;. This affects poisoned, slowed, petrified and unhealable. Before 1.9 this is always &amp;quot;no&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== [harm_unit] ===&lt;br /&gt;
Harms every unit matching the filter, for the specific damage amount.&lt;br /&gt;
*  '''[filter]''': [[StandardUnitFilter]] all matching units will be harmed (required).&lt;br /&gt;
*  '''[filter_second]''': [[StandardUnitFilter]] if present, the first matching unit will attack all the units matching the filter above.&lt;br /&gt;
*  '''amount''': the amount of damage that will be done (required).&lt;br /&gt;
*  '''alignment''': (default neutral) applies an alignment to the damage, this means that if alignment=chaotic, the damage will be increased at night and reduced at day.&lt;br /&gt;
*  '''damage_type''': if present, amount will be altered by unit resistance to the damage type specified.&lt;br /&gt;
*  '''kill''': (default yes) if yes, when an harmed unit goes to or below 0 HP, it is killed; if no its HP are set to 1.&lt;br /&gt;
*  '''fire_event''': (default no) if yes, when a unit is killed by harming, the corresponding events are fired.&lt;br /&gt;
*  '''animate''': (default no) if yes, scrolls to each unit before harming it and plays its defense (or attack, if it's the harmer) and death animations. Special values supported, other than the usual yes and no, are &amp;quot;attacker&amp;quot;, that means only the harmer will be animated, and &amp;quot;defender&amp;quot;, that means only the harmed units will be animated.&lt;br /&gt;
*  '''[primary_attack], [secondary_attack]''': these set the weapon against which the harmed units will defend, and that the harming unit will use to attack, respectively (notice this is the opposite of '''[filter]''' and '''[filter_second]''' above). This allows for playing specific defense and attack animations. Both tags are expected to contain a [[FilterWML#Filtering_Weapons|Standard Weapon Filter]].&lt;br /&gt;
*  '''delay''': if animate=yes, sets the delay (in milliseconds, default 500) between each unit harming.&lt;br /&gt;
*  '''variable''': if present, the damage caused to the unit, altered by resistances, will be stored in a WML array with the given name, under the &amp;quot;harm_amount&amp;quot; key.&lt;br /&gt;
*  '''poisoned, slowed, petrified, unhealable''': (default no) if yes, every harmed unit that doesn't already have such status will have it set.&lt;br /&gt;
*  '''experience''': if yes, and there is an harmer, experience will be attributed like in regular combat.&lt;br /&gt;
*  '''resistance_multiplier''': {{DevFeature1.11}} the harmed unit's resistance is multiplied by the supplied value; this means that a value lower than 1 increases it, and a value greater than 1 decreases it. Default value is 1, that means no modification.&lt;br /&gt;
&lt;br /&gt;
=== [time_area] ===&lt;br /&gt;
How a day should progress in a given area. Everywhere not specified in a [time_area] tag is affected by the [time] tags in the [scenario] tag.&lt;br /&gt;
* [[StandardLocationFilter]]: the locations to affect. ''note: only for [event][time_area]s - at scenario toplevel [time_area] does not support [[StandardLocationFilter]], only location ranges''&lt;br /&gt;
* [[TimeWML]]: the new schedule.&lt;br /&gt;
* '''id''': an unique identifier assigned to a time_area. Optional, unless you want to remove the time_area later. Can be a comma-separated list when removing time_areas, see below.&lt;br /&gt;
* '''remove''': (boolean) yes/no value. Indicates whether the specified time_area should be removed. Requires an identifier. If no identifier is used, however, all time_areas are removed.&lt;br /&gt;
&lt;br /&gt;
=== [end_turn] ===&lt;br /&gt;
End the current side's turn. The current event is finished before the turn is ended. Also, if the current event (where the tag appears) has been fired by another event, that event (and the complete stack of other possible parent events) is ended before [end_turn] comes into affect. Also, events following the event stack that fired [end_turn] are not omitted (e.g. [end_turn] is used by a side turn event and a turn refresh event does something afterwards).&lt;br /&gt;
&lt;br /&gt;
=== [replace_map] ===&lt;br /&gt;
&lt;br /&gt;
Replaces the entire map.&lt;br /&gt;
* '''map''': Content of a wesnoth map file. example:&lt;br /&gt;
 map=&amp;quot;{campaigns/Heir_To_The_Throne/maps/01_The_Elves_Besieged.map}&amp;quot;&lt;br /&gt;
* '''expand''': if 'yes', allows the map size to increase. The expansion direction is currently always bottom-right.&lt;br /&gt;
* '''shrink''': if 'yes', allows the map size to decrease. If the map size is reduced, any units that would no longer be on the map due to its coordinates no longer existing will be put into the recall list.&lt;br /&gt;
&lt;br /&gt;
=== [replace_schedule] ===&lt;br /&gt;
Replace the time of day schedule of the entire scenario.&lt;br /&gt;
* [[TimeWML]]: the new schedule.&lt;br /&gt;
&lt;br /&gt;
=== [tunnel] ===&lt;br /&gt;
&lt;br /&gt;
Create a tunnel between some locations, later usable by units to move from source hex to target hex (using the movement cost of unit on the target terrain). ([http://forums.wesnoth.org/viewtopic.php?f=21&amp;amp;t=14749&amp;amp;p=405667&amp;amp;hilit=tunnel#p405667 source])&lt;br /&gt;
&lt;br /&gt;
* '''id''' identifier for the tunnel, to allow removing (optional).&lt;br /&gt;
* '''remove''': (boolean) yes/no value. If yes, removes all defined tunnels with the same ID (then only id= is necessary). (default: no)&lt;br /&gt;
* '''bidirectional''': (boolean) if yes, creates also a tunnel in the other direction. (default: yes)&lt;br /&gt;
* '''always_visible''': (boolean) if yes, the possible movement of enemies under fog can be seen. (default: no)&lt;br /&gt;
* '''[source]''': [[StandardLocationFilter]] the source hex(es) (required).&lt;br /&gt;
* '''[target]''': [[StandardLocationFilter]] the target hex(es) (required).&lt;br /&gt;
* '''[filter]''': [[StandardUnitFilter]] the units which can use the tunnel (required). Leave empty for &amp;quot;all units&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(Note: The tunnel tag can also be used inside the [[AbilitiesWML|[teleport]]] ability, without remove= and id=).&lt;br /&gt;
&lt;br /&gt;
== Useful Macros ==&lt;br /&gt;
There are some predefined macros that you find useful for direct actions. You can find a complete list along with a detailed explanation of how they work [http://www.wesnoth.org/macro-reference.xhtml here].&lt;br /&gt;
* '''{MOVE_UNIT}''': Moves a unit to another location in the map and the player sees the movement (unlike [teleport])&lt;br /&gt;
* '''{FULL_HEAL}''': Brings a unit to full HP&lt;br /&gt;
* '''{LOYAL_UNIT}''': Create a loyal unit&lt;br /&gt;
* '''{MODIFY_TERRAIN_MASK}''': Modify an area of terrain&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[InternalActionsWML]]&lt;br /&gt;
* [[InterfaceActionsWML]]&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;br /&gt;
[[Category: ActionsWML]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=FilterWML&amp;diff=45908</id>
		<title>FilterWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=FilterWML&amp;diff=45908"/>
		<updated>2012-03-28T15:05:28Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* Filtering Vision */ update a redundant section about filter_vision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== Filtering in WML ==&lt;br /&gt;
&lt;br /&gt;
A ''filter'' is a special WML block.&lt;br /&gt;
Filters are used to describe a set of units, hexes, weapons or something else.&lt;br /&gt;
Filters are defined as matching something if all the keys in the filter match that thing.&lt;br /&gt;
For example, if a unit filter contains two keys,&lt;br /&gt;
a unit must match both of the keys in order to match the filter.&lt;br /&gt;
&lt;br /&gt;
A StandardUnit(Location, Side, ...)Filter is the place where the set of such keys and tags can appear. A StandardFilter sometimes needs an according surrounding tag but often doesn't. It should be mentioned at the place in the wiki where it's said that you can use at a certain code position a StandardFilter whether you need a surrounding tag or not.&lt;br /&gt;
&lt;br /&gt;
== Filtering Units ==&lt;br /&gt;
&lt;br /&gt;
Filters are often used in action tags (see [[EventWML]]).&lt;br /&gt;
In this case the phrase &amp;quot;standard unit filter&amp;quot; is used in place of the set of standard keys.&lt;br /&gt;
Sometimes a filter is used to find the first unit that matches the filter;&lt;br /&gt;
for example, the '''[recall]''' tag recalls that unit.&lt;br /&gt;
&lt;br /&gt;
Standard unit filters are also used in the tags '''[filter]''' and '''[filter_second]'''.&lt;br /&gt;
These are subtags of '''[event]''' which describe when the event should trigger.&lt;br /&gt;
Most event names (see [[EventWML]]) have units related to them called &amp;quot;primary unit&amp;quot; and &amp;quot;secondary unit&amp;quot;.&lt;br /&gt;
In order for an event to be triggered, ''primary unit'' must match the filter contained in '''[filter]''',&lt;br /&gt;
and ''secondary unit'' must match the filter contained in '''[filter_second]'''.&lt;br /&gt;
&lt;br /&gt;
See [[StandardUnitFilter]] for details.&lt;br /&gt;
&lt;br /&gt;
== Filtering Locations ==&lt;br /&gt;
&lt;br /&gt;
As you have seen, standard unit filter can contain a location filter.&lt;br /&gt;
Several actions, such as '''[terrain]''', also use location filters.&lt;br /&gt;
Location filters are represented on this site by the phrase &amp;quot;standard location filter&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
See [[StandardLocationFilter]] for details.&lt;br /&gt;
&lt;br /&gt;
== Filtering Sides ==&lt;br /&gt;
Sometimes, it's needed to get a list of sides which satisfy certain criteria. For this, a side filter can be used.&lt;br /&gt;
Side filters are represented on this site by the phrase &amp;quot;standard side filter&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
See [[StandardSideFilter]] for details.&lt;br /&gt;
&lt;br /&gt;
== Filtering Weapons ==&lt;br /&gt;
&lt;br /&gt;
Sometimes weapons are filtered on in WML.  See also [[EventWML]], [[EffectWML]], [[AnimationWML]].&lt;br /&gt;
&lt;br /&gt;
These keys are used as filter input for weapon filters.&lt;br /&gt;
&lt;br /&gt;
* '''range''': a range to filter&lt;br /&gt;
** '''melee''': only melee weapons pass &lt;br /&gt;
** '''ranged''': only ranged weapons pass &lt;br /&gt;
* '''name''': filter on the attack's name.&lt;br /&gt;
See '''data/units/''' or http://www.wesnoth.org/units/&lt;br /&gt;
to find the name of a particular unit's attack.&lt;br /&gt;
* '''type''': filter on the attack's type.&lt;br /&gt;
Values are 'blade', 'pierce', 'impact', 'fire', 'cold', and 'arcane'.&lt;br /&gt;
* '''damage''': filter on damage value. Can be a specific number or a list of ranges like 'damage=0-5,7-99'&lt;br /&gt;
* '''special''': filter on the attack's special power.&lt;br /&gt;
For values see [[AbilitiesWML]].&lt;br /&gt;
&lt;br /&gt;
== Filtering Terrains ==&lt;br /&gt;
&lt;br /&gt;
''This section describes basically the same as &amp;quot;Filtering Locations&amp;quot; above, namely a [[StandardLocationFilter]].''&lt;br /&gt;
&lt;br /&gt;
Use '''[filter_location]''' within '''[filter]''' , for example:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     [filter]&lt;br /&gt;
         [filter_location]&lt;br /&gt;
             terrain=Ch &lt;br /&gt;
         [/filter_location]&lt;br /&gt;
     [/filter]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
At some places the terrains can be filtered with a &lt;br /&gt;
match list. The list is a comma separated list and matching will stop&lt;br /&gt;
at the first matched [[TerrainCodesWML|terrain string]]. There's one special character&lt;br /&gt;
''!'' which inverts the meaning of a match. Terrain strings can &lt;br /&gt;
use the wildcard * to match zero or more following letters, characters&lt;br /&gt;
behind the * are not allowed and the result is undefined.&lt;br /&gt;
&lt;br /&gt;
Example 1: &amp;lt;br&amp;gt;&lt;br /&gt;
ww* matches ww, www, wwW but not WWW &amp;lt;br&amp;gt;&lt;br /&gt;
!, ww returns false if ww found and true if not &amp;lt;br&amp;gt;&lt;br /&gt;
!, ww, wa, !, aa returns false if ww or wa found and true if aa found and false if none found.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example 2: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;^V* matches all village-terrain &amp;lt;br&amp;gt;&lt;br /&gt;
Notice how the * can be used separately for both layers (base and overlay layers are separated by the ^-character).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For a list of terrain types and their string codes see [[TerrainCodesWML|TerrainCodesWML]].&lt;br /&gt;
&lt;br /&gt;
== Filtering Vision ==&lt;br /&gt;
&lt;br /&gt;
The '''[filter_vision]''' tag allows you to filter locations based on whether or not the hex is obscured by fog or shroud from the point-of-view of a viewing side.&lt;br /&gt;
&lt;br /&gt;
* '''visible''':&lt;br /&gt;
** '''yes''' (default): matches when the location is not obscured by fog or shroud for the ''viewing_side''&lt;br /&gt;
** '''no''': matches when the location is obscured by fog or shroud for the ''viewing_side''&lt;br /&gt;
* '''viewing_side''': the observing side, or list of observing sides&lt;br /&gt;
** When multiple viewing sides are listed, all of the sides must pass the visibility check in order for the [filter_vision] filter to return a successful match.&lt;br /&gt;
** When no viewing sides are listed, all enemy sides must pass the visibility check.&lt;br /&gt;
*'''[[StandardSideFilter]]''' {{DevFeature1.11}} tags and keys; all matching sides must be able to see the unit/location. If an empty filter, all sides (instead of only all enemy sides) match. viewing_side= is renamed to just the [[StandardSideFilter]]'s side=.&lt;br /&gt;
&lt;br /&gt;
'''Example:''' This event will fire when the enemy (side 2) moves to a location within the player's field of vision:&lt;br /&gt;
 [event]&lt;br /&gt;
     name=moveto&lt;br /&gt;
     first_time_only=yes&lt;br /&gt;
     [filter]&lt;br /&gt;
         side=2&lt;br /&gt;
         [filter_vision]&lt;br /&gt;
             viewing_side=1 &lt;br /&gt;
         [/filter_vision]&lt;br /&gt;
     [/filter]&lt;br /&gt;
     [message]&lt;br /&gt;
         speaker=unit&lt;br /&gt;
         message=&amp;quot;I am your enemy. I know that you can see me here.&amp;quot;&lt;br /&gt;
     [/message]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
'''Note:''' This filter is only useful when the viewing side is under a fog or shroud. You ''can'' set a shroud over an AI side. This will allow you to use the vision filter from the point-of-view of an AI side. The fog/shroud does not currently affect AI movement patterns, but the AI algorithm may become constrained by fog/shroud in the future.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[UnitTypeWML]]&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=LuaWML/Pathfinder&amp;diff=45680</id>
		<title>LuaWML/Pathfinder</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=LuaWML/Pathfinder&amp;diff=45680"/>
		<updated>2012-03-17T18:09:50Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* wesnoth.find_vacant_tile */ adapt find_vacant_tile docu for changes I made in r48649&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the [[LuaWML]] functions and helpers for finding paths.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.find_path ====&lt;br /&gt;
&lt;br /&gt;
Returns the shortest path from one location to another. The source location is given either by coordinates as two arguments x and y; there must be a unit at the source location when using the standard path calculator. The source location can also be given by a unit as a single argument (as returned by the functions from [[LuaWML:Units]]). The second location is given by its coordinates. The last argument is an optional table that can be used to parametrize the pathfinder. Its options are:&lt;br /&gt;
* '''max_cost''': if set, the pathfinder will ignore paths longer than its value&lt;br /&gt;
* '''ignore_units''': if set, the path will go through units and ignore zones of control&lt;br /&gt;
* '''ignore_teleport''': if set, the teleport ability of the unit is ignored&lt;br /&gt;
* '''viewing_side''': if set to a valid side number, fog and shroud for this side will be taken into account; if set to an invalid number (e.g. 0), fog and shroud will be ignored; if left unset, the viewing side will be the unit side&lt;br /&gt;
&lt;br /&gt;
The path is returned as a table of coordinate pairs. It contains both the source and destination tile if a path was found. The total cost of the path is also available as a second return value, if needed.&lt;br /&gt;
&lt;br /&gt;
 -- Display some items along the path from (x1,y1) to (x2,y2).&lt;br /&gt;
 local u = wesnoth.get_units({ x = x1, y = y1 })[1]&lt;br /&gt;
 local path, cost = wesnoth.find_path(u, x2, y2, { ignore_units = true, viewing_side = 0 })&lt;br /&gt;
 if cost &amp;gt; u.moves then&lt;br /&gt;
     wesnoth.message(&amp;quot;That's too far!&amp;quot;)&lt;br /&gt;
 else&lt;br /&gt;
     for i, loc in ipairs(path) do&lt;br /&gt;
         wesnoth.fire(&amp;quot;item&amp;quot;, { x = loc[1], y = loc[2], image = &amp;quot;items/buckler.png&amp;quot; })&lt;br /&gt;
     end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
Instead of a parameter table, a cost function can be passed to the pathfinder. It will be called for all the tiles the computed path may possibly go through. It receives three arguments. The first two are the coordinates of the tile, the last one is the current cost for reaching that tile. The function should return a floating-point value that is the cost for entering the given tile. This cost should be greater or equal to one.&lt;br /&gt;
&lt;br /&gt;
 -- Count how many turns it would take, assuming the worst case (3 movement points per tile)&lt;br /&gt;
 local max_moves = wesnoth.get_units({ x = x1, y = y1 })[1].max_moves&lt;br /&gt;
 local path, cost = wesnoth.find_path(x1, y2, x2, y2,&lt;br /&gt;
     function(x, y, current_cost)&lt;br /&gt;
         local remaining_moves = max_moves - (current_cost % max_moves)&lt;br /&gt;
         if remaining_moves &amp;lt; 3 then current_cost = current_cost + remaining_moves end&lt;br /&gt;
         return current_cost + 3&lt;br /&gt;
     end)&lt;br /&gt;
 wesnoth.message(string.format(&amp;quot;It would take %d turns.&amp;quot;, math.ceil(cost / 3)))&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.find_vacant_tile ====&lt;br /&gt;
&lt;br /&gt;
Returns the two coordinates of an empty tile the closest to the tile passed by coordinates. An optional unit (either a WML table or a proxy object) can be passed as a third argument; if so, the returned tile has terrain which is passable for the passed unit.&lt;br /&gt;
&lt;br /&gt;
 function teleport(src_x, src_y, dst_x, dst_y)&lt;br /&gt;
   local u = wesnoth.get_units({x = src_x, y = src_y })[1]&lt;br /&gt;
   local ut = u.__cfg&lt;br /&gt;
   dst_x, dst_y = wesnoth.find_vacant_tile(dst_x, dst_y, u)&lt;br /&gt;
   wesnoth.put_unit(src_x, src_y)&lt;br /&gt;
   wesnoth.put_unit(dst_x, dst_y, ut)&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.find_reach ====&lt;br /&gt;
&lt;br /&gt;
Returns all the locations reachable by a unit. The unit is given either by its two coordinates or by a proxy object.  The last argument is an optional table that can be used to parametrize the pathfinder. Its options are:&lt;br /&gt;
* '''additional_turns''': if set to an integer n, the pathfinder will consider tiles that can be reached in n+1 turns&lt;br /&gt;
* '''ignore_units''': if set, the paths will go through units and ignore zones of control&lt;br /&gt;
* '''ignore_teleport''': if set, the teleport ability of the unit is ignored&lt;br /&gt;
* '''viewing_side''': if set to a valid side number, fog and shroud for this side will be taken into account; if set to an invalid number (e.g. 0), fog and shroud will be ignored; if left unset, the viewing side will be the unit side&lt;br /&gt;
The locations are stored as triples in an array. The first two elements of a triple are the coordinates of a reachable tile, the third one is the number of movement points left when reaching the tile.&lt;br /&gt;
&lt;br /&gt;
 -- overlay the number of turns needed to reach each tile&lt;br /&gt;
 local t = wesnoth.find_reach(u, { additional_turns = 8 })&lt;br /&gt;
 local m = u.max_moves&lt;br /&gt;
 for i,l in ipairs(t) do&lt;br /&gt;
   wesnoth.fire(&amp;quot;label&amp;quot;, { x = l[1], y = l[2], text = math.ceil(9 - l[3]/m) })&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
==== helper.distance_between ====&lt;br /&gt;
&lt;br /&gt;
Returns the distance between two tiles given by their coordinates.&lt;br /&gt;
&lt;br /&gt;
 local d = distance_between(x1, y1, x2, y2)&lt;br /&gt;
&lt;br /&gt;
==== helper.adjacent_tiles ====&lt;br /&gt;
&lt;br /&gt;
Returns an iterator on the (at most six) tiles around a given location that are on the map. If the third argument is ''true'', tiles on the map border are also visited.&lt;br /&gt;
&lt;br /&gt;
 -- remove all the units next to the (a,b) tile&lt;br /&gt;
 for x, y in helper.adjacent_tiles(a, b) do&lt;br /&gt;
     wesnoth.put_unit(x, y)&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
[[Category: Lua Reference]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=InterfaceActionsWML&amp;diff=45545</id>
		<title>InterfaceActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=InterfaceActionsWML&amp;diff=45545"/>
		<updated>2012-03-07T20:03:23Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* [show_objectives] */ document SSF in show_objectives&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== Interface actions ==&lt;br /&gt;
&lt;br /&gt;
Part of [[ActionWML]], interface actions are actions that do not have a direct effect on gameplay;&lt;br /&gt;
instead, they show something to the player.  The main interface tags&lt;br /&gt;
are '''[message]''' and '''[objectives]''', but several other tags affect&lt;br /&gt;
the interface also.&lt;br /&gt;
&lt;br /&gt;
== [inspect] ==&lt;br /&gt;
This user interface action only works in debug mode. It displays the gamestate inspector dialog (the same one which can be brought up with '':inspect'' ), which can be used to inspect the values of WML variables, AI configuration, recall lists, and more.&lt;br /&gt;
&lt;br /&gt;
* '''name''': optional attribute to specify the name of this gamestate inspector dialog. It is just a label to help differentiate between different invocations of gamestate inspector dialog.&lt;br /&gt;
&lt;br /&gt;
== [message] ==&lt;br /&gt;
The most commonly used interface action is [message], which displays a message to the user in a dialog box. It can also be used to take input from the user.&lt;br /&gt;
&lt;br /&gt;
The following key/tags are accepted for [message]:&lt;br /&gt;
* [[StandardUnitFilter]]: The unit whose profile and name are displayed. Do not use a [filter] tag. If no unit matching this filter is found, the message is not displayed (The unit has probably been killed).&amp;lt;br&amp;gt;'''[message]''' elements should be constructed so that it is either guaranteed that a certain unit is alive, or so that dialog flows smoothly even if the message isn't displayed.&lt;br /&gt;
&lt;br /&gt;
* '''speaker''': an alternative to standard unit filter. You may specify as the value of the speaker attribute a unit id or any of the following special values:&lt;br /&gt;
** '''narrator''': the dialog box is displayed without a caption for the unit speaking or a unit image&lt;br /&gt;
** '''unit''': the primary unit for the event is speaking&lt;br /&gt;
** '''second_unit''': the secondary unit for the event is speaking&lt;br /&gt;
&lt;br /&gt;
* '''message''': (translatable) the text to display to the right of the image. ''message'' is sometimes multiple lines; if it is, be sure to use quotes(''' ' ''' or ''' &amp;quot; ''')&lt;br /&gt;
* '''[show_if]''': if present then this message will only be displayed if the conditional statement in this tag is passed (see [[ConditionalActionsWML#Condition_Tags|ConditionalActionsWML]])&lt;br /&gt;
* '''side_for''': (default: all sides) comma-separated list of sides for who message is shown.&lt;br /&gt;
* '''image''': (default: profile image of speaker) the image to display next to the message.&lt;br /&gt;
* '''caption''': (default: name of speaker) the caption to display beside the image. Name to be displayed. Note: use a translation mark to avoid wmllint errors.&lt;br /&gt;
* '''scroll''': Boolean specifying whether the game view should scroll to the speaking unit. Defaults to ''yes''.&lt;br /&gt;
* '''duration''': (default: 10) the minimum number of frames for this message to be displayed. (A frame lasts about 30 milliseconds.) During this time any dialog decisions will be disregarded.&lt;br /&gt;
* '''sound''': a sound effect (wav file) to play as the message is displayed. This can be a comma-separated list, from which one will be randomly chosen.&lt;br /&gt;
* '''[option]''': No '''[option]''' elements have to be used. If '''[option]''' elements are present, then each option will be displayed in a menu for the user to select one option.&lt;br /&gt;
** '''message''': (translatable) the text displayed for the option (see [[DescriptionWML]])&lt;br /&gt;
** '''[show_if]''': if present then this option will only be displayed if the conditional statement in this tag is passed (see [[InternalActionsWML]])&lt;br /&gt;
** '''[command]''': an element containing actions which are executed if the option is selected.&lt;br /&gt;
* '''[text_input]''': there can be only one [text_input] tag. this adds a text input field to the message.&lt;br /&gt;
** '''variable''': the variable that the user's input will be written to&lt;br /&gt;
** '''label''': a text label to the left of the input field&lt;br /&gt;
** '''max_length''': the maximum number of characters that may be typed into the field&lt;br /&gt;
** '''text''': text that is written into the field in the beginning&lt;br /&gt;
* Check [[EventWML#Multiplayer_safety]] to find out in which events you can safely use '''[option]''' and '''[text_input]''' without causing OOS.&lt;br /&gt;
&lt;br /&gt;
=== Formatting ===&lt;br /&gt;
In 1.8, [http://developer.gnome.org/pango/unstable/PangoMarkupFormat.html Pango markup formatting codes] have been adopted for '''[message]'''. These can also be used in unit names (user_description), objectives, and such. Note that you'll probably want to use a single quote ' instead of a double quote &amp;quot; as double quotes cannot be escaped, otherwise the string will appear fragmented and you may also encounter errors. Running wmllint on your campaign will up-convert it, warning you about unusual cases you must fix by hand.&lt;br /&gt;
&lt;br /&gt;
For example, if you wanted to write &amp;quot;You are victorious!&amp;quot; in large, italic, gold letters, you might write it this way:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;span color='#BCB088' size='large' font-style='italic'&amp;gt;You are victorious!&amp;lt;/span&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These are the codes taken from the Pango markup formatting guide:&lt;br /&gt;
&lt;br /&gt;
*'''font''', '''font_desc''': A font description string, such as &amp;quot;Sans Italic 12&amp;quot;.&lt;br /&gt;
*'''font_family''', '''face''': A font family name.&lt;br /&gt;
*'''font_size''', '''size''': Font size in 1024ths of a point, or one of the absolute sizes 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', or one of the relative sizes 'smaller' or 'larger'.&lt;br /&gt;
*'''font_style''', '''style''': One of 'normal', 'oblique', 'italic'.&lt;br /&gt;
*'''font_weight''', '''weight''': One of 'ultralight', 'light', 'normal', 'bold', 'ultrabold', 'heavy', or a numeric weight.&lt;br /&gt;
*'''font_variant''', '''variant''': One of 'normal' or 'smallcaps'.&lt;br /&gt;
*'''font_stretch''', '''stretch''': One of 'ultracondensed', 'extracondensed', 'condensed', 'semicondensed', 'normal', 'semiexpanded', 'expanded', 'extraexpanded', 'ultraexpanded'.&lt;br /&gt;
*'''foreground''', '''fgcolor''', '''color''': An RGB color specification such as '#00FF00' or a color name such as 'red'.&lt;br /&gt;
*'''background, bgcolor''': An RGB color specification such as '#00FF00' or a color name such as 'red'.&lt;br /&gt;
*'''underline''': One of 'none', 'single', 'double', 'low', 'error'.&lt;br /&gt;
*'''underline_color''': The color of underlines; an RGB color specification such as '#00FF00' or a color name such as 'red'.&lt;br /&gt;
*'''rise''': Vertical displacement, in 10000ths of an em. Can be negative for subscript, positive for superscript.&lt;br /&gt;
*'''strikethrough''': 'true' or 'false' whether to strike through the text.&lt;br /&gt;
*'''strikethrough_color''': The color of strikethrough lines; an RGB color specification such as '#00FF00' or a color name such as 'red'&lt;br /&gt;
*'''fallback''': 'true' or 'false' whether to enable fallback. If disabled, then characters will only be used from the closest matching font on the system. No fallback will be done to other fonts on the system that might contain the characters in the text. Fallback is enabled by default. Most applications should not disable fallback.&lt;br /&gt;
*'''letter_spacing''': Inter-letter spacing in 1024ths of a point.&lt;br /&gt;
*'''gravity''': One of 'south', 'east', 'north', 'west', 'auto'.&lt;br /&gt;
*'''gravity_hint''': One of 'natural', 'strong', 'line'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In 1.6, Wesnoth uses older text formatting options&lt;br /&gt;
* A tilde (~) as the first character causes the line to be boldfaced.&lt;br /&gt;
* An at symbol (@) as the first character causes the line to be green, as done with victory conditions.&lt;br /&gt;
* A pound symbol (#) as the first character causes the line to be red, as done with defeat conditions.&lt;br /&gt;
* An asterisk (*) as the first character causes the line to be bigger.&lt;br /&gt;
* A backquote (`) as the first character causes the line to be smaller.&lt;br /&gt;
* If used, the caption key text is boldfaced.&lt;br /&gt;
* An RGB colour code in the beginning causes the line to be the given colour. This can still be preceded by the above characters. Example: ''message=_&amp;quot;&amp;lt;255,0,0&amp;gt;Red!&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
== [objectives] ==&lt;br /&gt;
The other tag used for plot development is '''[objectives]'''.&lt;br /&gt;
The '''[objectives]''' tag overwrites any previously set objectives,&lt;br /&gt;
and displays text which should describe the objectives of the scenario.&lt;br /&gt;
Scenario objectives are displayed on the player's first turn after the tag is used,&lt;br /&gt;
or as part of the event if it triggers during that player's turn.&lt;br /&gt;
Objectives can also be accessed at any time in a scenario using the&lt;br /&gt;
&amp;quot;Scenario Objectives&amp;quot; game menu option, making this tag useful for&lt;br /&gt;
scenario-specific information that the player may need to refer to during play.&lt;br /&gt;
&lt;br /&gt;
Attributes of '''[objectives]''':&lt;br /&gt;
* '''side''': Default '0'. The side to set the objectives for. A value of 0 sets objectives for all sides. note: There are side-specific objectives and default objectives, which are used in case a side doesn't have specific ones. Specifying 0 sets the default ones.&lt;br /&gt;
* '''[[StandardSideFilter]]''' {{DevFeature1.11}} tags and keys: Sets the objectives of all matching sides to these passed specifications (the rest of this [objectives] tag). If no sides (such as when passing side=0) or all sides match, sets the default objectives, and the side specific ones for the matching sides otherwise.&lt;br /&gt;
* '''bullet''': Default '• '. Replaces the default bullet, with whatever is passed, for all objectives, gold carryover notes, and notes defined with [note].&lt;br /&gt;
* '''summary''': Displayed first in the objectives text, this should describe the basic objective for the overall scenario.  Can be omitted.&lt;br /&gt;
* '''note''': Displayed last in the objectives text, this is sometimes used for hints or additional information.  Can be omitted.&lt;br /&gt;
* '''victory_string''': Default ' _ &amp;quot;Victory:&amp;quot;', this text precedes the victory objectives.&lt;br /&gt;
* '''defeat_string''': Default ' _ &amp;quot;Defeat:&amp;quot;', this text precedes the defeat objectives.&lt;br /&gt;
* '''gold_carryover_string''': Default ' _ &amp;quot;Gold carryover:&amp;quot;', this text precedes the gold carryover information.&lt;br /&gt;
* '''notes_string''': Default ' _ &amp;quot;Notes:&amp;quot;', this text precedes the notes.&lt;br /&gt;
* '''silent''': Default: not present. If set to &amp;quot;yes&amp;quot;, the objectives are silently changed. Else, they will be shown to the user when appropriate.&lt;br /&gt;
&lt;br /&gt;
Tags of '''[objectives]''':&lt;br /&gt;
* '''[objective]''': describes a win or loss condition. Most scenarios have multiple win or loss conditions, so use a separate [objective] subtag for each line; this helps with translations.&lt;br /&gt;
** '''bullet''': Default '• ' or whatever is set in the parent [objectives] block. Replaces the default bullet, with whatever is provided, for the objective defined by the [objective] block.&lt;br /&gt;
** '''red''': Default '0' for winning objectives, '255' for losing objectives. Overrides the default red coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''green''': Default '255' for winning objectives, '0' for losing objectives. Overrides the default green coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''blue''': Default '0'. Overrides the default blue coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''description''': text for the specific win or loss condition.&lt;br /&gt;
** '''condition''': The color and placement of the text. Values are 'win'(colored green, placed after ''victory_string'') and 'lose'(colored red, placed after ''defeat_string'')&lt;br /&gt;
** '''show_turn_counter''': If set to yes, displays the number of turns remaining in the scenario. Default is no.&lt;br /&gt;
** '''[show_if]''': A condition that disables the objective if it doesn't hold. Conditional objectives are refreshed at '''[show_objectives]''' time only.&lt;br /&gt;
* '''[gold_carryover]''': describes how the gold carryover works in this scenario. This is intended to be a more convenient way of displaying carryover information than using the note= key in [objectives].&lt;br /&gt;
** '''bullet''': Default '• ' or whatever is set in the parent [objectives] block. Replaces the default bullet with whatever is provided.&lt;br /&gt;
** '''red''': Default '255'. Overrides the default red coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''green''': Default '255'. Overrides the default green coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''blue''': Default '192'. Overrides the default blue coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''bonus''' (boolean): whether an early finish bonus is granted. If omitted, early finish bonus is not mentioned.&lt;br /&gt;
** '''carryover_percentage''': the amount of carryover gold. If omitted, the amount is not mentioned.&lt;br /&gt;
* '''[note]''': describes a note, usually used for hints or additional information. This is an easier way of adding several notes than concatenating them together into a single string to use with the ''note='' key.&lt;br /&gt;
** '''bullet''': Default '• ' or whatever is set in the parent [objectives] block. Replaces the default bullet with whatever is provided for the note defined by the [note] block.&lt;br /&gt;
** '''red''': Default '255'. Overrides the default red coloring of the entire note, including the bullet.&lt;br /&gt;
** '''green''': Default '255'. Overrides the default green coloring of the entire note, including the bullet.&lt;br /&gt;
** '''blue''': Default '255'. Overrides the default blue coloring of the entire note, including the bullet.&lt;br /&gt;
** '''description''': the text of the note.&lt;br /&gt;
&lt;br /&gt;
=== Macros ===&lt;br /&gt;
There are a few predefined macros for Objectives that you can use to shorten the code: [http://www.wesnoth.org/macro-reference.xhtml#SET_OBJECTIVES SET_OBJECTIVES], [http://www.wesnoth.org/macro-reference.xhtml#VICTORY_CONDITION VICTORY_CONDITION], and [http://www.wesnoth.org/macro-reference.xhtml#DEFEAT_CONDITION DEFEAT_CONDITION]. Follow the links for each one to see complete syntax and example usage.&lt;br /&gt;
&lt;br /&gt;
== [set_menu_item] ==&lt;br /&gt;
This tag is used to add a custom option in the right-click context menu which can then be used to trigger arbitrary WML commands.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Due to limitations in portable devices where there are no scroll bars for context menus, there is a hard-coded limit of 7 custom WML menu items. If you really need to have more than 7 menu items, try combining some of them in a submenu.&lt;br /&gt;
&lt;br /&gt;
* '''id''': the unique id for this menu item. If a menu item with this id already exists, it allows you to set specific changes to that item.&lt;br /&gt;
* '''description''': the in-game text that will appear for this item in the menu.&lt;br /&gt;
* '''image''': the image to display next to this item.&lt;br /&gt;
* '''needs_select''': if ''yes'' (default ''no''), then the latest select event (see [[EventWML]]) that triggered before this menu item was chosen will be transmitted over the network before this menu item action will be. This only has any effect in networked multiplayer, and is intended to allow more elaborate menu item behaviour there without causing out of sync errors. If you don't know what this means, just leave it false.&lt;br /&gt;
* '''[show_if]''': If present, the menu item will only be available if the conditional statement (see [[ConditionalActionsWML#Condition_Tags|ConditionalActionsWML]]) within evaluates to true. When this is evaluated, the WML variables ''$x1'' and ''$y1'' will point to the location on which the context menu was invoked, so it's possible to for example only enable the option on empty hexes or on a particular unit.&lt;br /&gt;
* '''[filter_location]''': contains a location filter similar to the one found inside Single Unit Filters (see [[FilterWML]]). The menu item will only be available on matching locations.&lt;br /&gt;
* '''[command]''': contains the WML actions to be executed when the menu item is selected. Again, the WML variables ''$x1'' and ''$y1'' will point to the location on which the context menu was invoked on.&lt;br /&gt;
** '''delayed_variable_substitution ''' {{DevFeature1.11}} (boolean yes|no, default: yes): If no, forces a variable substitution run onto the wml included in this [command] block. Use this, if you want variables which are to substitute to get the values they have at execution time of the event where this set_menu_item appears. Other than that, they get the values they have at invocation time of the menu item.&lt;br /&gt;
&lt;br /&gt;
== [clear_menu_item] ==&lt;br /&gt;
{{DevFeature1.11}}&lt;br /&gt;
&lt;br /&gt;
Removes a menu item from the scenario.&lt;br /&gt;
Normally menu items are, including all their defining wml, automatically carried over between scenarios. This tag prevents this. (The behavior is comparable to set_variable/clear_variable).&lt;br /&gt;
* '''id''': (string): id of the menu item to clear. Can be a comma-separated list.&lt;br /&gt;
&lt;br /&gt;
== Other interface tags ==&lt;br /&gt;
&lt;br /&gt;
The following tags are also action tags:&lt;br /&gt;
=== [item] ===&lt;br /&gt;
Makes a graphical item appear on a certain hex. Note this only places the graphics for an item. It does not make the item do anything. Use a moveto event to make moving onto the item do something. &amp;lt;tt&amp;gt;''('''Hint:''' There are a number of predefined items that are used in various campaigns that you can make use of. You can find [http://www.wesnoth.org/macro-reference.xhtml#file:items.cfg a list of them] if you look into the items.cfg file in the wesnoth install directory (under /data/core/macros))''&amp;lt;/tt&amp;gt;&lt;br /&gt;
* '''x''', '''y''': the location to place the item. (only for [event][item]: full [[StandardLocationFilter|SLF]] support)&lt;br /&gt;
* '''image''': the image (in ''images/'' as .png) to place on the hex.&lt;br /&gt;
* '''halo''': an image to place centered on the hex. Use this instead of ''image'' if the image is bigger than the hex or if you want to animate an image. ''Example (where the integer after the colon is the duration of each frame): halo=scenery/fire1.png:100,scenery/fire2.png:100,scenery/fire3.png:100,scenery/fire4.png:100,scenery/fire5.png:100,scenery/fire6.png:100,scenery/fire7.png:100,scenery/fire8.png:100''&lt;br /&gt;
* '''team_name''': name of the team for which the item is to be displayed (hidden for others). For multiple teams just put all the names in one string, for example separated by commas.&lt;br /&gt;
* '''visible_in_fog''': whether the item should be visible through fog or not. Default yes.&lt;br /&gt;
&lt;br /&gt;
=== [remove_item] ===&lt;br /&gt;
Removes any graphical items on a given hex.&lt;br /&gt;
* [[StandardLocationFilter]]: the hexes to remove items off&lt;br /&gt;
* '''image''' if specified, only removes the given image item (This image name must include any [[ImagePathFunctionWML|image path functions]] appended to the original image name.)&lt;br /&gt;
&lt;br /&gt;
=== [print] ===&lt;br /&gt;
Displays a message across the screen. The message will disappear after a certain time.&lt;br /&gt;
* '''text''': (translatable) the text to display.&lt;br /&gt;
* '''size''': (default=12) the pointsize of the font to use&lt;br /&gt;
* '''duration''': (default=50) the length of time to display the text for. This is measured in the number of 'frames'. A frame in Wesnoth is usually displayed for around 30ms.&lt;br /&gt;
* '''red''', '''green''', '''blue''': (default=0,0,0) the color to display the text in. Values vary from 0-255.&lt;br /&gt;
=== [move_unit_fake] ===&lt;br /&gt;
Moves an image of a unit along a certain path on the map. The path does not need to be a continuous list of adjacent hexes, so for example only the start and end points can be given, in which case the straightest line between those points will be calculated and used.&lt;br /&gt;
* '''type''': the type of the unit whose image to use&lt;br /&gt;
* '''x''': a comma-separated list of x locations to move along&lt;br /&gt;
* '''y''': a comma-separated list of y locations to move along (x and y values are matched pairs)&lt;br /&gt;
* '''side''': the side of the fake unit, used for team-coloring the fake unit&lt;br /&gt;
* '''gender''': the gender of the fake unit. Example: gender=female&lt;br /&gt;
* '''variation''': the variation of the fake unit. Example: variation=undead&lt;br /&gt;
* '''image_mods''': [[ImagePathFunctionWML|image path functions]] sequence to be applied on the fake unit.&lt;br /&gt;
=== [move_units_fake] ===&lt;br /&gt;
moves multiple images of units along paths on the map. These units are moved in lockstep.&lt;br /&gt;
* '''[fake_unit]''': A fake unit to move&lt;br /&gt;
** '''type''': the type of unit whose image to use&lt;br /&gt;
** '''x''': a comma-separated list of x locations to move along&lt;br /&gt;
** '''y''': a comma-separated list of y locations to move along (x and y values are matched pairs)&lt;br /&gt;
** '''side''': the side of the fake unit, used for team-coloring the fake unit&lt;br /&gt;
** '''skip_steps''': the number of steps to skip before this unit starts moving&lt;br /&gt;
=== [hide_unit] ===&lt;br /&gt;
Temporarily prevents the engine from displaying the given unit. The unit does not become invisible, as it would be with the '''[hides]''' ability; it is still the same plain unit, but without an image. Useful in conjunction with '''[move_unit_fake]''': to move a leader unit into position on-screen. Until 1.8 each '''[hide_unit]''' tag only hides one unit.&lt;br /&gt;
* [[StandardUnitFilter]]: All matching units will be hidden&lt;br /&gt;
&lt;br /&gt;
=== [unhide_unit] ===&lt;br /&gt;
Stops the currently hidden units from being hidden.&lt;br /&gt;
* [[StandardUnitFilter]]: Only the matching units will be unhidden&lt;br /&gt;
&lt;br /&gt;
=== [scroll] ===&lt;br /&gt;
Scroll a certain number of pixels in a given direction. Useful for earthquake/shaking effects.&lt;br /&gt;
* '''x''', '''y''': the number of pixels to scroll along the x and y axis&lt;br /&gt;
=== '''[scroll_to]''' ===&lt;br /&gt;
Scroll to a given hex&lt;br /&gt;
* '''x''', '''y''': the hex to scroll to&lt;br /&gt;
* {{DevFeature1.11}} [[StandardLocationFilter]], do not use a [filter_location] sub-tag. If more than one location matches the filter, only the first matching location will be used.&lt;br /&gt;
* '''check_fogged''': whether to scroll even to locations covered in fog or shroud. Possible values ''true'' (don't scroll to fog) and ''false'' (scroll even to fog), with ''false'' as the default.&lt;br /&gt;
&lt;br /&gt;
=== [scroll_to_unit] ===&lt;br /&gt;
Scroll to a given unit&lt;br /&gt;
* [[StandardUnitFilter]]&lt;br /&gt;
* '''check_fogged''': whether to scroll even to locations covered in fog or shroud. Possible values ''true'' (don't scroll to fog) and ''false'' (scroll even to fog), with ''false'' as the default.&lt;br /&gt;
=== [select_unit] ===&lt;br /&gt;
Selects a given unit.&lt;br /&gt;
* [[StandardUnitFilter]]: The first unit found will be selected.&lt;br /&gt;
* '''fire_event''': whether a ''select'' event should be triggered or not (def. ''no''). (Note that select events aren't multiplayer save.)&lt;br /&gt;
* '''highlight''': whether the unit's current hex should be highlighted (def. ''yes'').&lt;br /&gt;
&lt;br /&gt;
=== [sound]===&lt;br /&gt;
Plays a sound&lt;br /&gt;
* '''name''': the filename of the sound to play (in ''sounds/'' as .wav or .ogg)&lt;br /&gt;
* '''repeat''': repeats the sound for a specified additional number of times (default=0)&lt;br /&gt;
=== [sound_source] ===&lt;br /&gt;
Creates a sound source. &amp;quot;Sound sources&amp;quot; is a general name for a mechanism which makes possible for map elements to emit sounds according to some rules, where &amp;quot;map elements&amp;quot; can be specific locations or terrain types. For now, only sound sources tied to locations are supported.&lt;br /&gt;
* '''id''': a unique identification key of the sound source&lt;br /&gt;
* '''sounds''': a list of comma separated, randomly played sounds associated with the sound source&lt;br /&gt;
* '''delay''': a numerical value (in milliseconds) of the minimal delay between two playbacks of the source's sound if the source remains visible on the screen; if one scrolls out and back in, the source will be considered as ready to play&lt;br /&gt;
* '''chance''': a percentage (a value from 0 to 100) describing the chance of the source being activated every second after the delay has passed or when the source's location appears on the screen (note that it cannot play more than one file at the same time)&lt;br /&gt;
* '''check_fogged''': possible values &amp;quot;true&amp;quot; and &amp;quot;false&amp;quot; - if true the source will not play if its locations are fogged&lt;br /&gt;
* '''check_shrouded''': possible values &amp;quot;true&amp;quot; and &amp;quot;false&amp;quot; - if true the source will not play if its locations are shrouded&lt;br /&gt;
* '''x,y''': similar to x,y as found in a [[StandardLocationFilter]], these are the locations associated with the sound source&lt;br /&gt;
* '''fade_range''' (default = 3): distance in hexes that determines a &amp;quot;circular&amp;quot; area around the one specified by '''full_range''' where sound volume fades out linearly&lt;br /&gt;
* '''full_range''' (default = 14): distance in hexes that determines a &amp;quot;circular&amp;quot; area where source plays with full volume, relative to screen center&lt;br /&gt;
* '''loop''': number of times a sound sample should be looped if it stays visible. -1 means infinite (~65000)&lt;br /&gt;
&lt;br /&gt;
=== [remove_sound_source] ===&lt;br /&gt;
Removes a previously defined sound source.&lt;br /&gt;
* '''id''': the identification key of the sound source to remove&lt;br /&gt;
&lt;br /&gt;
=== [music]===&lt;br /&gt;
Switches to playing different music&lt;br /&gt;
* '''name''': the filename of the music to play (in ''music/'' as .ogg)&lt;br /&gt;
* see [[MusicListWML]] for the correct syntax&lt;br /&gt;
===[volume]===&lt;br /&gt;
Changes the game volume to a percent of the preferences volume for the game being played. Values can go from 0 to 100:  &lt;br /&gt;
* '''music''':  Changes the music volume.&lt;br /&gt;
* '''sound''':  Changes the sound volume.&lt;br /&gt;
=== [color_adjust]===&lt;br /&gt;
Tints the color of the screen.&lt;br /&gt;
* '''red''', '''green''', '''blue''': values from -255 to 255, the amount to tint by for each color&lt;br /&gt;
=== [delay] ===&lt;br /&gt;
Pauses the game.&lt;br /&gt;
* '''time''': the time to pause in milliseconds&lt;br /&gt;
=== [redraw] ===&lt;br /&gt;
Redraws the screen (this normally isn't done during events, although some of the other interface actions cause the screen or parts of it to be redrawn).&lt;br /&gt;
* '''clear_shroud''' (boolean yes|no, default no): If yes, recalculates fog and shroud.  Useful if you for example spawn friendly units in the middle of an event and want the shroud to update accordingly (otherwise units that spawn inside fog would remain invisible for the duration of the event, since the fog would not automatically get cleared around them).&lt;br /&gt;
* '''[[StandardSideFilter]]''': the sides for which to recalculate fog and shroud.&lt;br /&gt;
* '''side''': If used (forces clear_shroud=yes), recalculates fog and shroud for that side.&lt;br /&gt;
&lt;br /&gt;
=== [unit_overlay] ===&lt;br /&gt;
Sets an image that will be drawn over a particular unit, and follow it around&lt;br /&gt;
* [[StandardUnitFilter]]: All matching units will get the overlay&lt;br /&gt;
* '''image''': the image to place on the unit&lt;br /&gt;
&lt;br /&gt;
=== [remove_unit_overlay] ===&lt;br /&gt;
removes a particular overlayed image from a unit&lt;br /&gt;
* [[StandardUnitFilter]]: The overlay will get removed from all matching units&lt;br /&gt;
* '''image''': the image to remove from the unit&lt;br /&gt;
&lt;br /&gt;
=== [animate_unit] ===&lt;br /&gt;
Uses an animation of a unit to animate it on screen (if the unit has the corresponding animation).&lt;br /&gt;
* '''flag''': The key to find the custom animation in the unit description (see the '''[extra_anim]''' description in [[AnimationWML]]). Standard animations can be triggered with the following keywords: ''leading recruited standing idling levelout levelin healing healed poisoned movement defend attack death victory pre_teleport post_teleport''&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument, see [[FilterWML]]. By default, the unit at the event location will be animated. You can use this tag to choose any other unit to animate.&lt;br /&gt;
* '''[primary_attack]''': If this tag is not present, the filter for animation will be triggered with no attack. If it is here, all attacks from the unit will be filtered, and a matching one will be used to filter the animation. Takes a weapon filter as argument, see [[FilterWML]].&lt;br /&gt;
* '''[secondary_attack]''': Similar to '''[primary_attack]'''. May be needed to trigger a defense animation correctly, if there are more than one animations available for the defending unit.&lt;br /&gt;
* '''hits''': yes/no/hit/miss/kill: which according variation of a attack/defense animation shall be chosen (required)&lt;br /&gt;
* '''text''': a text to hover during the animation &lt;br /&gt;
* '''red''': red value for the text color (0-255)&lt;br /&gt;
* '''green''': green value for the text color&lt;br /&gt;
* '''blue''': blue value for the text color&lt;br /&gt;
* '''with_bars''': yes/no: whether to display the status bars during the animation (e.g. the hitpoint bar)&lt;br /&gt;
* '''[animate]''': a sub block with the same syntax as '''[animate_unit]''' except that the '''[filter]''' block is mandatory to find the unit. This block will find and animate another unit simultaneously.&lt;br /&gt;
* '''[facing]''': a [[StandardLocationFilter]] specifying what direction the unit should be facing when animated&lt;br /&gt;
&lt;br /&gt;
=== [label] ===&lt;br /&gt;
Places a label on the map.&lt;br /&gt;
* '''x''', '''y''': the location of the label&lt;br /&gt;
* '''text''': what the label should say&lt;br /&gt;
* '''team_name''': if specified, the label will only be visible to the given team.&lt;br /&gt;
* '''color''': color of the label. The format is r,g,b; r, g and b are numbers between 0 and 255.&lt;br /&gt;
* '''visible_in_fog''': whether the label should be visible through fog or not. Default yes.&lt;br /&gt;
* '''visible_in_shroud''': whether the label should be visible through shroud or not. Default no.&lt;br /&gt;
* '''immutable''': whether this label is protected from being removed or changed by players. Default yes.&lt;br /&gt;
=== [floating_text]===&lt;br /&gt;
Floats text (similar to the damage and healing numbers) on the given locations.&lt;br /&gt;
* [[StandardLocationFilter]]: the text will be floated on all matching locations simultaneously.&lt;br /&gt;
* '''text''': the text to display.&lt;br /&gt;
&lt;br /&gt;
The default text color is &amp;lt;span style=&amp;quot;color: #6b8cff;&amp;quot;&amp;gt;'''#6b8cff'''&amp;lt;/span&amp;gt;. To change the color, use [[#Formatting|Pango markup]]. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Float some golden yellow text at 20,20.&lt;br /&gt;
[floating_text]&lt;br /&gt;
   x,y=20,20&lt;br /&gt;
   text=&amp;quot;&amp;lt;span color='#cccc33'&amp;gt;Your text here&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
[/floating_text]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [deprecated_message] ===&lt;br /&gt;
Shows a deprecated message in the message area, this feature is only intended to be used to warn about deprecated macros in mainline. The message is not translatable.&lt;br /&gt;
* '''message''': the message to show.&lt;br /&gt;
=== [wml_message] ===&lt;br /&gt;
Outputs a message to Wesnoth's console output. Intended for campaign designers to output silent text to the console, without annoying the player; then, that text might contain information useful for later bug-reporting. The log domain for it is '''wml''', and the '''debug/dbg''' log level is available for use with the '''logger''' attribute. Depending on the current log level ('''error''' by default), which may be changed with the in-game :log command, or the --log-&amp;lt;level&amp;gt;=wml command line switch, the messages are echoed to the in-game chat.&lt;br /&gt;
* '''message''': the message to show.&lt;br /&gt;
* '''logger''': the Wesnoth engine output logger that should catch the text; this might be 'err' (the errors log level), 'warn'/'wrn' (the warnings log level) or anything else (the information log level). Not all information will be displayed depending on the log level chosen when starting Wesnoth.&lt;br /&gt;
&lt;br /&gt;
Note: As of 1.9.4/1.9.5 (r48805) the following &amp;quot;loggers&amp;quot; should work: If in [wml_message]: err/error, warn/wrn/warning, debug/dbg; using the :log command: Only the long forms error, warning, info and debug (this part gathered by trying rather than source inspecting). The long forms are most likely also the only ones working when starting wesnoth with --log-&amp;lt;level&amp;gt;=wml.&lt;br /&gt;
For log level warning or error (as during normal play), only wml_messages with logger error or warning display (for both). With logger info or debug, additionally wml_messages with logger info or debug display (for both).&lt;br /&gt;
&lt;br /&gt;
=== [open_help] ===&lt;br /&gt;
Opens the in-game help.&lt;br /&gt;
* '''topic''': the id of the topic to open&lt;br /&gt;
=== [show_objectives] ===&lt;br /&gt;
refreshes the objectives defined by [objectives] and its [show_if] tags, and displays them. (It is also called whenever the user explicitly asks for the objectives; this matters only if the tag was overridden by a [[LuaWML#register_wml_action|Lua]] script.)&lt;br /&gt;
* '''side''': the side to show the objectives. If not set, all sides are used.&lt;br /&gt;
* '''[[StandardSideFilter]]''' {{DevFeature1.11}} tags and keys: Tag affects the matching sides instead of just all or the one given by the integer value of the side= key.&lt;br /&gt;
&lt;br /&gt;
=== [chat] ===&lt;br /&gt;
Displays a message in the chat area.&lt;br /&gt;
* '''speaker''': (default=&amp;quot;WML&amp;quot;) A string for the name of the sender of the message.&lt;br /&gt;
* '''message''': The message that should be displayed.&lt;br /&gt;
* '''[[StandardSideFilter]]''' tags and keys as argument; if the same client controls multiple sides that match, then the message will only be displayed once.&lt;br /&gt;
&lt;br /&gt;
== Useful Macros ==&lt;br /&gt;
There are some predefined macros that you find useful for interface actions. You can find a complete list along with a detailed explanation of how they work [http://www.wesnoth.org/macro-reference.xhtml here].&lt;br /&gt;
* '''{FLOATING_TEXT}''' Float some text over a unit similar to the damage numbers.&lt;br /&gt;
* '''{HIGHLIGHT_UNIT}''' Highlight a unit on the map. Use this to show important units&lt;br /&gt;
* '''{HIGHLIGHT_IMAGE}''' Places and highlights an image on the map. Use this to show important items or locations&lt;br /&gt;
* '''{SET_IMAGE}''' Places an image on the map which has no other function.&lt;br /&gt;
* '''{QUAKE &amp;lt;soundfile&amp;gt;}''' Creates a tremor like screenshake and plays &amp;lt;soundfile&amp;gt;. ('''{TREMOR}''' is a deprecated version, equivalent to '''{QUAKE (rumble.ogg)}''')&lt;br /&gt;
* '''{FLASH_WHITE}''' Flash the screen white momentarily. You can also replace WHITE with RED, BLUE or GREEN for a different colour.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[DirectActionsWML]]&lt;br /&gt;
* [[InternalActionsWML]]&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;br /&gt;
[[Category: ActionsWML]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=InterfaceActionsWML&amp;diff=45544</id>
		<title>InterfaceActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=InterfaceActionsWML&amp;diff=45544"/>
		<updated>2012-03-07T19:51:15Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* [objectives] */ document inline SSF in [objectives]&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== Interface actions ==&lt;br /&gt;
&lt;br /&gt;
Part of [[ActionWML]], interface actions are actions that do not have a direct effect on gameplay;&lt;br /&gt;
instead, they show something to the player.  The main interface tags&lt;br /&gt;
are '''[message]''' and '''[objectives]''', but several other tags affect&lt;br /&gt;
the interface also.&lt;br /&gt;
&lt;br /&gt;
== [inspect] ==&lt;br /&gt;
This user interface action only works in debug mode. It displays the gamestate inspector dialog (the same one which can be brought up with '':inspect'' ), which can be used to inspect the values of WML variables, AI configuration, recall lists, and more.&lt;br /&gt;
&lt;br /&gt;
* '''name''': optional attribute to specify the name of this gamestate inspector dialog. It is just a label to help differentiate between different invocations of gamestate inspector dialog.&lt;br /&gt;
&lt;br /&gt;
== [message] ==&lt;br /&gt;
The most commonly used interface action is [message], which displays a message to the user in a dialog box. It can also be used to take input from the user.&lt;br /&gt;
&lt;br /&gt;
The following key/tags are accepted for [message]:&lt;br /&gt;
* [[StandardUnitFilter]]: The unit whose profile and name are displayed. Do not use a [filter] tag. If no unit matching this filter is found, the message is not displayed (The unit has probably been killed).&amp;lt;br&amp;gt;'''[message]''' elements should be constructed so that it is either guaranteed that a certain unit is alive, or so that dialog flows smoothly even if the message isn't displayed.&lt;br /&gt;
&lt;br /&gt;
* '''speaker''': an alternative to standard unit filter. You may specify as the value of the speaker attribute a unit id or any of the following special values:&lt;br /&gt;
** '''narrator''': the dialog box is displayed without a caption for the unit speaking or a unit image&lt;br /&gt;
** '''unit''': the primary unit for the event is speaking&lt;br /&gt;
** '''second_unit''': the secondary unit for the event is speaking&lt;br /&gt;
&lt;br /&gt;
* '''message''': (translatable) the text to display to the right of the image. ''message'' is sometimes multiple lines; if it is, be sure to use quotes(''' ' ''' or ''' &amp;quot; ''')&lt;br /&gt;
* '''[show_if]''': if present then this message will only be displayed if the conditional statement in this tag is passed (see [[ConditionalActionsWML#Condition_Tags|ConditionalActionsWML]])&lt;br /&gt;
* '''side_for''': (default: all sides) comma-separated list of sides for who message is shown.&lt;br /&gt;
* '''image''': (default: profile image of speaker) the image to display next to the message.&lt;br /&gt;
* '''caption''': (default: name of speaker) the caption to display beside the image. Name to be displayed. Note: use a translation mark to avoid wmllint errors.&lt;br /&gt;
* '''scroll''': Boolean specifying whether the game view should scroll to the speaking unit. Defaults to ''yes''.&lt;br /&gt;
* '''duration''': (default: 10) the minimum number of frames for this message to be displayed. (A frame lasts about 30 milliseconds.) During this time any dialog decisions will be disregarded.&lt;br /&gt;
* '''sound''': a sound effect (wav file) to play as the message is displayed. This can be a comma-separated list, from which one will be randomly chosen.&lt;br /&gt;
* '''[option]''': No '''[option]''' elements have to be used. If '''[option]''' elements are present, then each option will be displayed in a menu for the user to select one option.&lt;br /&gt;
** '''message''': (translatable) the text displayed for the option (see [[DescriptionWML]])&lt;br /&gt;
** '''[show_if]''': if present then this option will only be displayed if the conditional statement in this tag is passed (see [[InternalActionsWML]])&lt;br /&gt;
** '''[command]''': an element containing actions which are executed if the option is selected.&lt;br /&gt;
* '''[text_input]''': there can be only one [text_input] tag. this adds a text input field to the message.&lt;br /&gt;
** '''variable''': the variable that the user's input will be written to&lt;br /&gt;
** '''label''': a text label to the left of the input field&lt;br /&gt;
** '''max_length''': the maximum number of characters that may be typed into the field&lt;br /&gt;
** '''text''': text that is written into the field in the beginning&lt;br /&gt;
* Check [[EventWML#Multiplayer_safety]] to find out in which events you can safely use '''[option]''' and '''[text_input]''' without causing OOS.&lt;br /&gt;
&lt;br /&gt;
=== Formatting ===&lt;br /&gt;
In 1.8, [http://developer.gnome.org/pango/unstable/PangoMarkupFormat.html Pango markup formatting codes] have been adopted for '''[message]'''. These can also be used in unit names (user_description), objectives, and such. Note that you'll probably want to use a single quote ' instead of a double quote &amp;quot; as double quotes cannot be escaped, otherwise the string will appear fragmented and you may also encounter errors. Running wmllint on your campaign will up-convert it, warning you about unusual cases you must fix by hand.&lt;br /&gt;
&lt;br /&gt;
For example, if you wanted to write &amp;quot;You are victorious!&amp;quot; in large, italic, gold letters, you might write it this way:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;span color='#BCB088' size='large' font-style='italic'&amp;gt;You are victorious!&amp;lt;/span&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These are the codes taken from the Pango markup formatting guide:&lt;br /&gt;
&lt;br /&gt;
*'''font''', '''font_desc''': A font description string, such as &amp;quot;Sans Italic 12&amp;quot;.&lt;br /&gt;
*'''font_family''', '''face''': A font family name.&lt;br /&gt;
*'''font_size''', '''size''': Font size in 1024ths of a point, or one of the absolute sizes 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', or one of the relative sizes 'smaller' or 'larger'.&lt;br /&gt;
*'''font_style''', '''style''': One of 'normal', 'oblique', 'italic'.&lt;br /&gt;
*'''font_weight''', '''weight''': One of 'ultralight', 'light', 'normal', 'bold', 'ultrabold', 'heavy', or a numeric weight.&lt;br /&gt;
*'''font_variant''', '''variant''': One of 'normal' or 'smallcaps'.&lt;br /&gt;
*'''font_stretch''', '''stretch''': One of 'ultracondensed', 'extracondensed', 'condensed', 'semicondensed', 'normal', 'semiexpanded', 'expanded', 'extraexpanded', 'ultraexpanded'.&lt;br /&gt;
*'''foreground''', '''fgcolor''', '''color''': An RGB color specification such as '#00FF00' or a color name such as 'red'.&lt;br /&gt;
*'''background, bgcolor''': An RGB color specification such as '#00FF00' or a color name such as 'red'.&lt;br /&gt;
*'''underline''': One of 'none', 'single', 'double', 'low', 'error'.&lt;br /&gt;
*'''underline_color''': The color of underlines; an RGB color specification such as '#00FF00' or a color name such as 'red'.&lt;br /&gt;
*'''rise''': Vertical displacement, in 10000ths of an em. Can be negative for subscript, positive for superscript.&lt;br /&gt;
*'''strikethrough''': 'true' or 'false' whether to strike through the text.&lt;br /&gt;
*'''strikethrough_color''': The color of strikethrough lines; an RGB color specification such as '#00FF00' or a color name such as 'red'&lt;br /&gt;
*'''fallback''': 'true' or 'false' whether to enable fallback. If disabled, then characters will only be used from the closest matching font on the system. No fallback will be done to other fonts on the system that might contain the characters in the text. Fallback is enabled by default. Most applications should not disable fallback.&lt;br /&gt;
*'''letter_spacing''': Inter-letter spacing in 1024ths of a point.&lt;br /&gt;
*'''gravity''': One of 'south', 'east', 'north', 'west', 'auto'.&lt;br /&gt;
*'''gravity_hint''': One of 'natural', 'strong', 'line'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In 1.6, Wesnoth uses older text formatting options&lt;br /&gt;
* A tilde (~) as the first character causes the line to be boldfaced.&lt;br /&gt;
* An at symbol (@) as the first character causes the line to be green, as done with victory conditions.&lt;br /&gt;
* A pound symbol (#) as the first character causes the line to be red, as done with defeat conditions.&lt;br /&gt;
* An asterisk (*) as the first character causes the line to be bigger.&lt;br /&gt;
* A backquote (`) as the first character causes the line to be smaller.&lt;br /&gt;
* If used, the caption key text is boldfaced.&lt;br /&gt;
* An RGB colour code in the beginning causes the line to be the given colour. This can still be preceded by the above characters. Example: ''message=_&amp;quot;&amp;lt;255,0,0&amp;gt;Red!&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
== [objectives] ==&lt;br /&gt;
The other tag used for plot development is '''[objectives]'''.&lt;br /&gt;
The '''[objectives]''' tag overwrites any previously set objectives,&lt;br /&gt;
and displays text which should describe the objectives of the scenario.&lt;br /&gt;
Scenario objectives are displayed on the player's first turn after the tag is used,&lt;br /&gt;
or as part of the event if it triggers during that player's turn.&lt;br /&gt;
Objectives can also be accessed at any time in a scenario using the&lt;br /&gt;
&amp;quot;Scenario Objectives&amp;quot; game menu option, making this tag useful for&lt;br /&gt;
scenario-specific information that the player may need to refer to during play.&lt;br /&gt;
&lt;br /&gt;
Attributes of '''[objectives]''':&lt;br /&gt;
* '''side''': Default '0'. The side to set the objectives for. A value of 0 sets objectives for all sides. note: There are side-specific objectives and default objectives, which are used in case a side doesn't have specific ones. Specifying 0 sets the default ones.&lt;br /&gt;
* '''[[StandardSideFilter]]''' {{DevFeature1.11}} tags and keys: Sets the objectives of all matching sides to these passed specifications (the rest of this [objectives] tag). If no sides (such as when passing side=0) or all sides match, sets the default objectives, and the side specific ones for the matching sides otherwise.&lt;br /&gt;
* '''bullet''': Default '• '. Replaces the default bullet, with whatever is passed, for all objectives, gold carryover notes, and notes defined with [note].&lt;br /&gt;
* '''summary''': Displayed first in the objectives text, this should describe the basic objective for the overall scenario.  Can be omitted.&lt;br /&gt;
* '''note''': Displayed last in the objectives text, this is sometimes used for hints or additional information.  Can be omitted.&lt;br /&gt;
* '''victory_string''': Default ' _ &amp;quot;Victory:&amp;quot;', this text precedes the victory objectives.&lt;br /&gt;
* '''defeat_string''': Default ' _ &amp;quot;Defeat:&amp;quot;', this text precedes the defeat objectives.&lt;br /&gt;
* '''gold_carryover_string''': Default ' _ &amp;quot;Gold carryover:&amp;quot;', this text precedes the gold carryover information.&lt;br /&gt;
* '''notes_string''': Default ' _ &amp;quot;Notes:&amp;quot;', this text precedes the notes.&lt;br /&gt;
* '''silent''': Default: not present. If set to &amp;quot;yes&amp;quot;, the objectives are silently changed. Else, they will be shown to the user when appropriate.&lt;br /&gt;
&lt;br /&gt;
Tags of '''[objectives]''':&lt;br /&gt;
* '''[objective]''': describes a win or loss condition. Most scenarios have multiple win or loss conditions, so use a separate [objective] subtag for each line; this helps with translations.&lt;br /&gt;
** '''bullet''': Default '• ' or whatever is set in the parent [objectives] block. Replaces the default bullet, with whatever is provided, for the objective defined by the [objective] block.&lt;br /&gt;
** '''red''': Default '0' for winning objectives, '255' for losing objectives. Overrides the default red coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''green''': Default '255' for winning objectives, '0' for losing objectives. Overrides the default green coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''blue''': Default '0'. Overrides the default blue coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''description''': text for the specific win or loss condition.&lt;br /&gt;
** '''condition''': The color and placement of the text. Values are 'win'(colored green, placed after ''victory_string'') and 'lose'(colored red, placed after ''defeat_string'')&lt;br /&gt;
** '''show_turn_counter''': If set to yes, displays the number of turns remaining in the scenario. Default is no.&lt;br /&gt;
** '''[show_if]''': A condition that disables the objective if it doesn't hold. Conditional objectives are refreshed at '''[show_objectives]''' time only.&lt;br /&gt;
* '''[gold_carryover]''': describes how the gold carryover works in this scenario. This is intended to be a more convenient way of displaying carryover information than using the note= key in [objectives].&lt;br /&gt;
** '''bullet''': Default '• ' or whatever is set in the parent [objectives] block. Replaces the default bullet with whatever is provided.&lt;br /&gt;
** '''red''': Default '255'. Overrides the default red coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''green''': Default '255'. Overrides the default green coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''blue''': Default '192'. Overrides the default blue coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''bonus''' (boolean): whether an early finish bonus is granted. If omitted, early finish bonus is not mentioned.&lt;br /&gt;
** '''carryover_percentage''': the amount of carryover gold. If omitted, the amount is not mentioned.&lt;br /&gt;
* '''[note]''': describes a note, usually used for hints or additional information. This is an easier way of adding several notes than concatenating them together into a single string to use with the ''note='' key.&lt;br /&gt;
** '''bullet''': Default '• ' or whatever is set in the parent [objectives] block. Replaces the default bullet with whatever is provided for the note defined by the [note] block.&lt;br /&gt;
** '''red''': Default '255'. Overrides the default red coloring of the entire note, including the bullet.&lt;br /&gt;
** '''green''': Default '255'. Overrides the default green coloring of the entire note, including the bullet.&lt;br /&gt;
** '''blue''': Default '255'. Overrides the default blue coloring of the entire note, including the bullet.&lt;br /&gt;
** '''description''': the text of the note.&lt;br /&gt;
&lt;br /&gt;
=== Macros ===&lt;br /&gt;
There are a few predefined macros for Objectives that you can use to shorten the code: [http://www.wesnoth.org/macro-reference.xhtml#SET_OBJECTIVES SET_OBJECTIVES], [http://www.wesnoth.org/macro-reference.xhtml#VICTORY_CONDITION VICTORY_CONDITION], and [http://www.wesnoth.org/macro-reference.xhtml#DEFEAT_CONDITION DEFEAT_CONDITION]. Follow the links for each one to see complete syntax and example usage.&lt;br /&gt;
&lt;br /&gt;
== [set_menu_item] ==&lt;br /&gt;
This tag is used to add a custom option in the right-click context menu which can then be used to trigger arbitrary WML commands.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Due to limitations in portable devices where there are no scroll bars for context menus, there is a hard-coded limit of 7 custom WML menu items. If you really need to have more than 7 menu items, try combining some of them in a submenu.&lt;br /&gt;
&lt;br /&gt;
* '''id''': the unique id for this menu item. If a menu item with this id already exists, it allows you to set specific changes to that item.&lt;br /&gt;
* '''description''': the in-game text that will appear for this item in the menu.&lt;br /&gt;
* '''image''': the image to display next to this item.&lt;br /&gt;
* '''needs_select''': if ''yes'' (default ''no''), then the latest select event (see [[EventWML]]) that triggered before this menu item was chosen will be transmitted over the network before this menu item action will be. This only has any effect in networked multiplayer, and is intended to allow more elaborate menu item behaviour there without causing out of sync errors. If you don't know what this means, just leave it false.&lt;br /&gt;
* '''[show_if]''': If present, the menu item will only be available if the conditional statement (see [[ConditionalActionsWML#Condition_Tags|ConditionalActionsWML]]) within evaluates to true. When this is evaluated, the WML variables ''$x1'' and ''$y1'' will point to the location on which the context menu was invoked, so it's possible to for example only enable the option on empty hexes or on a particular unit.&lt;br /&gt;
* '''[filter_location]''': contains a location filter similar to the one found inside Single Unit Filters (see [[FilterWML]]). The menu item will only be available on matching locations.&lt;br /&gt;
* '''[command]''': contains the WML actions to be executed when the menu item is selected. Again, the WML variables ''$x1'' and ''$y1'' will point to the location on which the context menu was invoked on.&lt;br /&gt;
** '''delayed_variable_substitution ''' {{DevFeature1.11}} (boolean yes|no, default: yes): If no, forces a variable substitution run onto the wml included in this [command] block. Use this, if you want variables which are to substitute to get the values they have at execution time of the event where this set_menu_item appears. Other than that, they get the values they have at invocation time of the menu item.&lt;br /&gt;
&lt;br /&gt;
== [clear_menu_item] ==&lt;br /&gt;
{{DevFeature1.11}}&lt;br /&gt;
&lt;br /&gt;
Removes a menu item from the scenario.&lt;br /&gt;
Normally menu items are, including all their defining wml, automatically carried over between scenarios. This tag prevents this. (The behavior is comparable to set_variable/clear_variable).&lt;br /&gt;
* '''id''': (string): id of the menu item to clear. Can be a comma-separated list.&lt;br /&gt;
&lt;br /&gt;
== Other interface tags ==&lt;br /&gt;
&lt;br /&gt;
The following tags are also action tags:&lt;br /&gt;
=== [item] ===&lt;br /&gt;
Makes a graphical item appear on a certain hex. Note this only places the graphics for an item. It does not make the item do anything. Use a moveto event to make moving onto the item do something. &amp;lt;tt&amp;gt;''('''Hint:''' There are a number of predefined items that are used in various campaigns that you can make use of. You can find [http://www.wesnoth.org/macro-reference.xhtml#file:items.cfg a list of them] if you look into the items.cfg file in the wesnoth install directory (under /data/core/macros))''&amp;lt;/tt&amp;gt;&lt;br /&gt;
* '''x''', '''y''': the location to place the item. (only for [event][item]: full [[StandardLocationFilter|SLF]] support)&lt;br /&gt;
* '''image''': the image (in ''images/'' as .png) to place on the hex.&lt;br /&gt;
* '''halo''': an image to place centered on the hex. Use this instead of ''image'' if the image is bigger than the hex or if you want to animate an image. ''Example (where the integer after the colon is the duration of each frame): halo=scenery/fire1.png:100,scenery/fire2.png:100,scenery/fire3.png:100,scenery/fire4.png:100,scenery/fire5.png:100,scenery/fire6.png:100,scenery/fire7.png:100,scenery/fire8.png:100''&lt;br /&gt;
* '''team_name''': name of the team for which the item is to be displayed (hidden for others). For multiple teams just put all the names in one string, for example separated by commas.&lt;br /&gt;
* '''visible_in_fog''': whether the item should be visible through fog or not. Default yes.&lt;br /&gt;
&lt;br /&gt;
=== [remove_item] ===&lt;br /&gt;
Removes any graphical items on a given hex.&lt;br /&gt;
* [[StandardLocationFilter]]: the hexes to remove items off&lt;br /&gt;
* '''image''' if specified, only removes the given image item (This image name must include any [[ImagePathFunctionWML|image path functions]] appended to the original image name.)&lt;br /&gt;
&lt;br /&gt;
=== [print] ===&lt;br /&gt;
Displays a message across the screen. The message will disappear after a certain time.&lt;br /&gt;
* '''text''': (translatable) the text to display.&lt;br /&gt;
* '''size''': (default=12) the pointsize of the font to use&lt;br /&gt;
* '''duration''': (default=50) the length of time to display the text for. This is measured in the number of 'frames'. A frame in Wesnoth is usually displayed for around 30ms.&lt;br /&gt;
* '''red''', '''green''', '''blue''': (default=0,0,0) the color to display the text in. Values vary from 0-255.&lt;br /&gt;
=== [move_unit_fake] ===&lt;br /&gt;
Moves an image of a unit along a certain path on the map. The path does not need to be a continuous list of adjacent hexes, so for example only the start and end points can be given, in which case the straightest line between those points will be calculated and used.&lt;br /&gt;
* '''type''': the type of the unit whose image to use&lt;br /&gt;
* '''x''': a comma-separated list of x locations to move along&lt;br /&gt;
* '''y''': a comma-separated list of y locations to move along (x and y values are matched pairs)&lt;br /&gt;
* '''side''': the side of the fake unit, used for team-coloring the fake unit&lt;br /&gt;
* '''gender''': the gender of the fake unit. Example: gender=female&lt;br /&gt;
* '''variation''': the variation of the fake unit. Example: variation=undead&lt;br /&gt;
* '''image_mods''': [[ImagePathFunctionWML|image path functions]] sequence to be applied on the fake unit.&lt;br /&gt;
=== [move_units_fake] ===&lt;br /&gt;
moves multiple images of units along paths on the map. These units are moved in lockstep.&lt;br /&gt;
* '''[fake_unit]''': A fake unit to move&lt;br /&gt;
** '''type''': the type of unit whose image to use&lt;br /&gt;
** '''x''': a comma-separated list of x locations to move along&lt;br /&gt;
** '''y''': a comma-separated list of y locations to move along (x and y values are matched pairs)&lt;br /&gt;
** '''side''': the side of the fake unit, used for team-coloring the fake unit&lt;br /&gt;
** '''skip_steps''': the number of steps to skip before this unit starts moving&lt;br /&gt;
=== [hide_unit] ===&lt;br /&gt;
Temporarily prevents the engine from displaying the given unit. The unit does not become invisible, as it would be with the '''[hides]''' ability; it is still the same plain unit, but without an image. Useful in conjunction with '''[move_unit_fake]''': to move a leader unit into position on-screen. Until 1.8 each '''[hide_unit]''' tag only hides one unit.&lt;br /&gt;
* [[StandardUnitFilter]]: All matching units will be hidden&lt;br /&gt;
&lt;br /&gt;
=== [unhide_unit] ===&lt;br /&gt;
Stops the currently hidden units from being hidden.&lt;br /&gt;
* [[StandardUnitFilter]]: Only the matching units will be unhidden&lt;br /&gt;
&lt;br /&gt;
=== [scroll] ===&lt;br /&gt;
Scroll a certain number of pixels in a given direction. Useful for earthquake/shaking effects.&lt;br /&gt;
* '''x''', '''y''': the number of pixels to scroll along the x and y axis&lt;br /&gt;
=== '''[scroll_to]''' ===&lt;br /&gt;
Scroll to a given hex&lt;br /&gt;
* '''x''', '''y''': the hex to scroll to&lt;br /&gt;
* {{DevFeature1.11}} [[StandardLocationFilter]], do not use a [filter_location] sub-tag. If more than one location matches the filter, only the first matching location will be used.&lt;br /&gt;
* '''check_fogged''': whether to scroll even to locations covered in fog or shroud. Possible values ''true'' (don't scroll to fog) and ''false'' (scroll even to fog), with ''false'' as the default.&lt;br /&gt;
&lt;br /&gt;
=== [scroll_to_unit] ===&lt;br /&gt;
Scroll to a given unit&lt;br /&gt;
* [[StandardUnitFilter]]&lt;br /&gt;
* '''check_fogged''': whether to scroll even to locations covered in fog or shroud. Possible values ''true'' (don't scroll to fog) and ''false'' (scroll even to fog), with ''false'' as the default.&lt;br /&gt;
=== [select_unit] ===&lt;br /&gt;
Selects a given unit.&lt;br /&gt;
* [[StandardUnitFilter]]: The first unit found will be selected.&lt;br /&gt;
* '''fire_event''': whether a ''select'' event should be triggered or not (def. ''no''). (Note that select events aren't multiplayer save.)&lt;br /&gt;
* '''highlight''': whether the unit's current hex should be highlighted (def. ''yes'').&lt;br /&gt;
&lt;br /&gt;
=== [sound]===&lt;br /&gt;
Plays a sound&lt;br /&gt;
* '''name''': the filename of the sound to play (in ''sounds/'' as .wav or .ogg)&lt;br /&gt;
* '''repeat''': repeats the sound for a specified additional number of times (default=0)&lt;br /&gt;
=== [sound_source] ===&lt;br /&gt;
Creates a sound source. &amp;quot;Sound sources&amp;quot; is a general name for a mechanism which makes possible for map elements to emit sounds according to some rules, where &amp;quot;map elements&amp;quot; can be specific locations or terrain types. For now, only sound sources tied to locations are supported.&lt;br /&gt;
* '''id''': a unique identification key of the sound source&lt;br /&gt;
* '''sounds''': a list of comma separated, randomly played sounds associated with the sound source&lt;br /&gt;
* '''delay''': a numerical value (in milliseconds) of the minimal delay between two playbacks of the source's sound if the source remains visible on the screen; if one scrolls out and back in, the source will be considered as ready to play&lt;br /&gt;
* '''chance''': a percentage (a value from 0 to 100) describing the chance of the source being activated every second after the delay has passed or when the source's location appears on the screen (note that it cannot play more than one file at the same time)&lt;br /&gt;
* '''check_fogged''': possible values &amp;quot;true&amp;quot; and &amp;quot;false&amp;quot; - if true the source will not play if its locations are fogged&lt;br /&gt;
* '''check_shrouded''': possible values &amp;quot;true&amp;quot; and &amp;quot;false&amp;quot; - if true the source will not play if its locations are shrouded&lt;br /&gt;
* '''x,y''': similar to x,y as found in a [[StandardLocationFilter]], these are the locations associated with the sound source&lt;br /&gt;
* '''fade_range''' (default = 3): distance in hexes that determines a &amp;quot;circular&amp;quot; area around the one specified by '''full_range''' where sound volume fades out linearly&lt;br /&gt;
* '''full_range''' (default = 14): distance in hexes that determines a &amp;quot;circular&amp;quot; area where source plays with full volume, relative to screen center&lt;br /&gt;
* '''loop''': number of times a sound sample should be looped if it stays visible. -1 means infinite (~65000)&lt;br /&gt;
&lt;br /&gt;
=== [remove_sound_source] ===&lt;br /&gt;
Removes a previously defined sound source.&lt;br /&gt;
* '''id''': the identification key of the sound source to remove&lt;br /&gt;
&lt;br /&gt;
=== [music]===&lt;br /&gt;
Switches to playing different music&lt;br /&gt;
* '''name''': the filename of the music to play (in ''music/'' as .ogg)&lt;br /&gt;
* see [[MusicListWML]] for the correct syntax&lt;br /&gt;
===[volume]===&lt;br /&gt;
Changes the game volume to a percent of the preferences volume for the game being played. Values can go from 0 to 100:  &lt;br /&gt;
* '''music''':  Changes the music volume.&lt;br /&gt;
* '''sound''':  Changes the sound volume.&lt;br /&gt;
=== [color_adjust]===&lt;br /&gt;
Tints the color of the screen.&lt;br /&gt;
* '''red''', '''green''', '''blue''': values from -255 to 255, the amount to tint by for each color&lt;br /&gt;
=== [delay] ===&lt;br /&gt;
Pauses the game.&lt;br /&gt;
* '''time''': the time to pause in milliseconds&lt;br /&gt;
=== [redraw] ===&lt;br /&gt;
Redraws the screen (this normally isn't done during events, although some of the other interface actions cause the screen or parts of it to be redrawn).&lt;br /&gt;
* '''clear_shroud''' (boolean yes|no, default no): If yes, recalculates fog and shroud.  Useful if you for example spawn friendly units in the middle of an event and want the shroud to update accordingly (otherwise units that spawn inside fog would remain invisible for the duration of the event, since the fog would not automatically get cleared around them).&lt;br /&gt;
* '''[[StandardSideFilter]]''': the sides for which to recalculate fog and shroud.&lt;br /&gt;
* '''side''': If used (forces clear_shroud=yes), recalculates fog and shroud for that side.&lt;br /&gt;
&lt;br /&gt;
=== [unit_overlay] ===&lt;br /&gt;
Sets an image that will be drawn over a particular unit, and follow it around&lt;br /&gt;
* [[StandardUnitFilter]]: All matching units will get the overlay&lt;br /&gt;
* '''image''': the image to place on the unit&lt;br /&gt;
&lt;br /&gt;
=== [remove_unit_overlay] ===&lt;br /&gt;
removes a particular overlayed image from a unit&lt;br /&gt;
* [[StandardUnitFilter]]: The overlay will get removed from all matching units&lt;br /&gt;
* '''image''': the image to remove from the unit&lt;br /&gt;
&lt;br /&gt;
=== [animate_unit] ===&lt;br /&gt;
Uses an animation of a unit to animate it on screen (if the unit has the corresponding animation).&lt;br /&gt;
* '''flag''': The key to find the custom animation in the unit description (see the '''[extra_anim]''' description in [[AnimationWML]]). Standard animations can be triggered with the following keywords: ''leading recruited standing idling levelout levelin healing healed poisoned movement defend attack death victory pre_teleport post_teleport''&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument, see [[FilterWML]]. By default, the unit at the event location will be animated. You can use this tag to choose any other unit to animate.&lt;br /&gt;
* '''[primary_attack]''': If this tag is not present, the filter for animation will be triggered with no attack. If it is here, all attacks from the unit will be filtered, and a matching one will be used to filter the animation. Takes a weapon filter as argument, see [[FilterWML]].&lt;br /&gt;
* '''[secondary_attack]''': Similar to '''[primary_attack]'''. May be needed to trigger a defense animation correctly, if there are more than one animations available for the defending unit.&lt;br /&gt;
* '''hits''': yes/no/hit/miss/kill: which according variation of a attack/defense animation shall be chosen (required)&lt;br /&gt;
* '''text''': a text to hover during the animation &lt;br /&gt;
* '''red''': red value for the text color (0-255)&lt;br /&gt;
* '''green''': green value for the text color&lt;br /&gt;
* '''blue''': blue value for the text color&lt;br /&gt;
* '''with_bars''': yes/no: whether to display the status bars during the animation (e.g. the hitpoint bar)&lt;br /&gt;
* '''[animate]''': a sub block with the same syntax as '''[animate_unit]''' except that the '''[filter]''' block is mandatory to find the unit. This block will find and animate another unit simultaneously.&lt;br /&gt;
* '''[facing]''': a [[StandardLocationFilter]] specifying what direction the unit should be facing when animated&lt;br /&gt;
&lt;br /&gt;
=== [label] ===&lt;br /&gt;
Places a label on the map.&lt;br /&gt;
* '''x''', '''y''': the location of the label&lt;br /&gt;
* '''text''': what the label should say&lt;br /&gt;
* '''team_name''': if specified, the label will only be visible to the given team.&lt;br /&gt;
* '''color''': color of the label. The format is r,g,b; r, g and b are numbers between 0 and 255.&lt;br /&gt;
* '''visible_in_fog''': whether the label should be visible through fog or not. Default yes.&lt;br /&gt;
* '''visible_in_shroud''': whether the label should be visible through shroud or not. Default no.&lt;br /&gt;
* '''immutable''': whether this label is protected from being removed or changed by players. Default yes.&lt;br /&gt;
=== [floating_text]===&lt;br /&gt;
Floats text (similar to the damage and healing numbers) on the given locations.&lt;br /&gt;
* [[StandardLocationFilter]]: the text will be floated on all matching locations simultaneously.&lt;br /&gt;
* '''text''': the text to display.&lt;br /&gt;
&lt;br /&gt;
The default text color is &amp;lt;span style=&amp;quot;color: #6b8cff;&amp;quot;&amp;gt;'''#6b8cff'''&amp;lt;/span&amp;gt;. To change the color, use [[#Formatting|Pango markup]]. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Float some golden yellow text at 20,20.&lt;br /&gt;
[floating_text]&lt;br /&gt;
   x,y=20,20&lt;br /&gt;
   text=&amp;quot;&amp;lt;span color='#cccc33'&amp;gt;Your text here&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
[/floating_text]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [deprecated_message] ===&lt;br /&gt;
Shows a deprecated message in the message area, this feature is only intended to be used to warn about deprecated macros in mainline. The message is not translatable.&lt;br /&gt;
* '''message''': the message to show.&lt;br /&gt;
=== [wml_message] ===&lt;br /&gt;
Outputs a message to Wesnoth's console output. Intended for campaign designers to output silent text to the console, without annoying the player; then, that text might contain information useful for later bug-reporting. The log domain for it is '''wml''', and the '''debug/dbg''' log level is available for use with the '''logger''' attribute. Depending on the current log level ('''error''' by default), which may be changed with the in-game :log command, or the --log-&amp;lt;level&amp;gt;=wml command line switch, the messages are echoed to the in-game chat.&lt;br /&gt;
* '''message''': the message to show.&lt;br /&gt;
* '''logger''': the Wesnoth engine output logger that should catch the text; this might be 'err' (the errors log level), 'warn'/'wrn' (the warnings log level) or anything else (the information log level). Not all information will be displayed depending on the log level chosen when starting Wesnoth.&lt;br /&gt;
&lt;br /&gt;
Note: As of 1.9.4/1.9.5 (r48805) the following &amp;quot;loggers&amp;quot; should work: If in [wml_message]: err/error, warn/wrn/warning, debug/dbg; using the :log command: Only the long forms error, warning, info and debug (this part gathered by trying rather than source inspecting). The long forms are most likely also the only ones working when starting wesnoth with --log-&amp;lt;level&amp;gt;=wml.&lt;br /&gt;
For log level warning or error (as during normal play), only wml_messages with logger error or warning display (for both). With logger info or debug, additionally wml_messages with logger info or debug display (for both).&lt;br /&gt;
&lt;br /&gt;
=== [open_help] ===&lt;br /&gt;
Opens the in-game help.&lt;br /&gt;
* '''topic''': the id of the topic to open&lt;br /&gt;
=== [show_objectives] ===&lt;br /&gt;
refreshes the objectives defined by [objectives] and its [show_if] tags, and displays them. (It is also called whenever the user explicitly asks for the objectives; this matters only if the tag was overridden by a [[LuaWML#register_wml_action|Lua]] script.)&lt;br /&gt;
* '''side''': the side to show the objectives. If not set, all sides are used.&lt;br /&gt;
=== [chat] ===&lt;br /&gt;
Displays a message in the chat area.&lt;br /&gt;
* '''speaker''': (default=&amp;quot;WML&amp;quot;) A string for the name of the sender of the message.&lt;br /&gt;
* '''message''': The message that should be displayed.&lt;br /&gt;
* '''[[StandardSideFilter]]''' tags and keys as argument; if the same client controls multiple sides that match, then the message will only be displayed once.&lt;br /&gt;
&lt;br /&gt;
== Useful Macros ==&lt;br /&gt;
There are some predefined macros that you find useful for interface actions. You can find a complete list along with a detailed explanation of how they work [http://www.wesnoth.org/macro-reference.xhtml here].&lt;br /&gt;
* '''{FLOATING_TEXT}''' Float some text over a unit similar to the damage numbers.&lt;br /&gt;
* '''{HIGHLIGHT_UNIT}''' Highlight a unit on the map. Use this to show important units&lt;br /&gt;
* '''{HIGHLIGHT_IMAGE}''' Places and highlights an image on the map. Use this to show important items or locations&lt;br /&gt;
* '''{SET_IMAGE}''' Places an image on the map which has no other function.&lt;br /&gt;
* '''{QUAKE &amp;lt;soundfile&amp;gt;}''' Creates a tremor like screenshake and plays &amp;lt;soundfile&amp;gt;. ('''{TREMOR}''' is a deprecated version, equivalent to '''{QUAKE (rumble.ogg)}''')&lt;br /&gt;
* '''{FLASH_WHITE}''' Flash the screen white momentarily. You can also replace WHITE with RED, BLUE or GREEN for a different colour.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[DirectActionsWML]]&lt;br /&gt;
* [[InternalActionsWML]]&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;br /&gt;
[[Category: ActionsWML]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=45356</id>
		<title>DirectActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=45356"/>
		<updated>2012-02-25T15:08:57Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* [move_unit] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== Direct actions ==&lt;br /&gt;
&lt;br /&gt;
Direct actions are actions that have a direct effect on gameplay. They can be used inside of [[EventWML|events]].&lt;br /&gt;
&lt;br /&gt;
The following tags are actions:&lt;br /&gt;
&lt;br /&gt;
=== [endlevel] ===&lt;br /&gt;
Ends the scenario.&lt;br /&gt;
* '''result''': before the scenario is over, all events with ''name=result'' are triggered. If ''result=victory'', the player progresses to the next level; if ''result=defeat'', the game returns to the main menu. &lt;br /&gt;
&lt;br /&gt;
When the result is &amp;quot;victory&amp;quot; the following keys can be used:&lt;br /&gt;
* '''bonus''': whether the player should get bonus gold (maximum possible gold that could have been earned by waiting the level out). The default is bonus=yes.&lt;br /&gt;
* '''carryover_report''': whether the player should receive a summary of the scenario outcome, the default is carryover_report=yes.&lt;br /&gt;
* '''save''': whether a start-of-scenario save should be created for the next scenario, the default is save=yes. Do not confuse this with saving of replays for the current scenario.&lt;br /&gt;
* '''replay_save''': whether a replay save for the current scenario is allowed, the default is replay_save=yes. If yes, the player's settings in preferences will be used to determine if a replay is saved. If no, will override and not save a replay.&lt;br /&gt;
* '''linger_mode''': If ...=yes, the screen is greyed out and there's the possibility to save before advancing to the next scenario, the default is linger_mode=yes.&lt;br /&gt;
* '''reveal_map''': (Multiplayer only) (Default is 'yes') If 'no', shroud doesn't disappear when game ended.&lt;br /&gt;
* '''next_scenario''': (default specified in '''[scenario]''' tag) the ID of the next scenario that should be played.  All units that side 1 controls at this point become available for recall in ''next_scenario''.&lt;br /&gt;
* '''carryover_percentage''': by default 80% of the gold is carried over to the next scenario, with this key the amount can be changed.&lt;br /&gt;
* '''carryover_add''': if true the gold will be added to the starting gold the next scenario, if false the next scenario will start with the amount of the current scenario (after taxes) or the minimum in the next scenario. Default is false.&lt;br /&gt;
* '''music''': (default specified in '''[scenario]''' or '''[game_config]''' tags) a comma-separated list of music tracks from which one will be chosen and played once after any events related to the end of level result are executed; by default, victory_music is used on victory, and defeat_music on defeat.&lt;br /&gt;
* '''end_credits''': {{DevFeature1.11}} Whether to display the credits screen at the end of a single-player campaign. Defaults to ''yes''. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
* '''end_text''': (translatable) Text that is shown centered in a black screen at the end of a campaign. Defaults to &amp;quot;The End&amp;quot;. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
* '''end_text_duration''': Delay, in milliseconds, before displaying the game credits at the end of a campaign. In other words, for how much time '''end_text''' is displayed on screen. Defaults to 3500. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
&lt;br /&gt;
=== [unit] ===&lt;br /&gt;
Places a unit on the map.  For syntax see [[SingleUnitWML]].&lt;br /&gt;
* {{Short Note:Predefined Macro|GENERIC_UNIT}}&lt;br /&gt;
* '''to_variable''':  spawn directly into a variable instead of on the map.&lt;br /&gt;
&lt;br /&gt;
=== [recall] ===&lt;br /&gt;
Recalls a unit.  The unit is recalled free of charge, and is placed near the leader.&lt;br /&gt;
* [[StandardUnitFilter]]: the first matching unit will be recalled.  If no units match this tag is ignored. Do not use a [filter] tag. If a comma separated list is given, every unit currently considered for recall is checked against all the types (not each single one of the types against all units).&lt;br /&gt;
* '''x,y''': the unit is placed here instead of next to the leader.&lt;br /&gt;
* '''show''': yes/no, default yes: whether the unit is animated (faded in) or instantly displayed&lt;br /&gt;
* '''fire_event''': boolean yes|no (default no); whether any according prerecall or recall events shall be fired.&lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): If yes, checks for terrain passability when placing the unit (a nearby passable hex is chosen).&lt;br /&gt;
&lt;br /&gt;
=== [teleport] ===&lt;br /&gt;
Teleports a unit on map. {{Short Note:Predefined Macro|TELEPORT_UNIT}}&lt;br /&gt;
* '''[filter]''': [[StandardUnitFilter]] the first unit matching this filter will be teleported.&lt;br /&gt;
* '''x,y''': the position to teleport to.&lt;br /&gt;
* '''clear_shroud''': should shroud be cleared on arrival&lt;br /&gt;
* '''animate''': should a teleport animation be played (if the unit doesn't have a teleport animation, it will fade out/fade in)&lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): normally, units will not be teleported into terrain that is impassable for them. Setting this attribute to &amp;quot;no&amp;quot; permits it.&lt;br /&gt;
&lt;br /&gt;
(Note: There is also a ability named teleport, see [[AbilitiesWML]].)&lt;br /&gt;
&lt;br /&gt;
=== [terrain_mask] ===&lt;br /&gt;
Changes the terrain on the map.  See [[TerrainMaskWML]].&lt;br /&gt;
&lt;br /&gt;
=== [terrain] ===&lt;br /&gt;
Changes the terrain on the map.&lt;br /&gt;
* '''terrain''': the character of the terrain to use.  See [[TerrainCodesWML]] to see what letter a type of terrain uses.&lt;br /&gt;
* [[StandardLocationFilter]]. This [[StandardLocationFilter]]'s terrain= key is used for the new terrain, filtering by terrain can be done with a nested [[StandardLocationFilter]]: [and]terrain=terrain_string_to_be_filtered_for.&lt;br /&gt;
* '''layer''': (overlay|base|both, default=both) only change the specified layer.&lt;br /&gt;
* '''replace_if_failed''': (default=no) When replacing just one layer failed, try to replace the whole terrain. If '''terrain''' is an overlay only terrain, use the default_base as base layer. If the terrain has no default base, do nothing.&lt;br /&gt;
&lt;br /&gt;
=== [gold] ===&lt;br /&gt;
Gives sides gold.&lt;br /&gt;
* '''amount''': the amount of gold to give.&lt;br /&gt;
* '''side''': (default=1) the number of the side to give the gold to. Can be a comma-separated list of sides. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument {{DevFeature1.11}}: [gold][filter_side] is deprecated, use the new inline SSF.&lt;br /&gt;
&lt;br /&gt;
=== [unstore_unit] ===&lt;br /&gt;
Creates a unit from a game variable, and activates it on the playing field.  This must be a specific variable describing a unit, and may not be an array -- to unstore an entire array, iterate over it.  The variable is not cleared.  See also [[InternalActionsWML#.5Bstore_unit.5D|[store_unit]]], [[ConditionalActionsWML#.5Bwhile.5D|[while]]] and [[InternalActionsWML#.5Bclear_variable.5D|[clear_variable]]].&lt;br /&gt;
* '''variable''': the name of the variable.&lt;br /&gt;
* '''find_vacant''': whether the unit should be placed on the nearest vacant tile to its specified location.  If this is set to 'no'(default), then any unit on the same tile as the unit being unstored will be destroyed. &lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): If yes, checks for terrain passability when placing the unit. This key has no effect if find_vacant=no (no check performed then). Before 1.9 this key is always &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''text''': (translatable) floating text to display above the unit, such as a damage amount&lt;br /&gt;
* '''red''', '''green''', '''blue''': (default=0,0,0) the color to display the text in. Values vary from 0-255. You may find it convenient to use the {COLOR_HARM} or {COLOR_HEAL} macro instead. (Use {COLOR_HARM} or {COLOR_HEAL} instead of the whole red,green,blue= line.)&lt;br /&gt;
* '''advance''': (default=true) if true the unit is advanced if it has enough XP. When modifying XP make sure to do it from inside a [[EventWML#Multiplayer_safety|synchronized event]] or it may lead to OOS errors especially when several advancement paths exist. Note that advance and post advance events are called, so infinite loops can happen.&lt;br /&gt;
* '''fire_event''': (boolean yes|no, default no) Whether any advance/post advance events shall be fired if an advancement takes place, no effect otherwise.&lt;br /&gt;
* '''x''' ,'''y''': override unit location, &amp;quot;x,y=recall,recall&amp;quot; will put the unit on the unit's side's recall list.&lt;br /&gt;
&lt;br /&gt;
=== [allow_recruit] ===&lt;br /&gt;
Allows a side to recruit units it couldn't previously recruit.&lt;br /&gt;
* '''type''': the types of units that the side can now recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that is being allowed to recruit the units. This can be a comma-separated list note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [allow_extra_recruit] ===&lt;br /&gt;
Allows a leader to recruit units it couldn't previously recruit.&lt;br /&gt;
These types add to the types the leader can recruit because of [side]recruit=.&lt;br /&gt;
* '''extra_recruit''': the types of units that the unit can now recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_recruit] ===&lt;br /&gt;
Prevents a side from recruiting units it could previously recruit.&lt;br /&gt;
* '''type''': the types of units that the side can no longer recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that may no longer recruit the units. This can be a comma-separated list note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_extra_recruit] ===&lt;br /&gt;
Prevents a leader from recruiting units it could previously recruit.&lt;br /&gt;
* '''extra_recruit''': the types of units that the side can no longer recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [set_recruit] ===&lt;br /&gt;
Sets the units a side can recruit.&lt;br /&gt;
* '''recruit''': the types of units that the side can now recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that is having its recruitment set. This can be a comma-separated list. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [set_extra_recruit] === &lt;br /&gt;
Sets the units a leader can recruit.&lt;br /&gt;
* '''extra_recruit''': the types of units that the leader can now recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [modify_side] ===&lt;br /&gt;
Modifies some details of a given side in the middle of a scenario.  '''The following listed properties are the only properties that [modify_side] can affect!'''&lt;br /&gt;
* '''side''': (default=1) the number of the side that is to be changed. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* '''income''': the income given at the begining of each turn.&lt;br /&gt;
* '''team_name''': the team in which the side plays the scenario.&lt;br /&gt;
* '''user_team_name''': a translatable string representing the team's description. This has no effect on alliances. Defaults to ''team_name''.&lt;br /&gt;
* '''gold''': the amount of gold the side owns.&lt;br /&gt;
* '''village_gold''': the income setting per village for the side.&lt;br /&gt;
* '''controller''': the identifier string of the side's controller. Uses the same syntax of the ''controller'' key in the [[SideWML|[side]]] tag.&lt;br /&gt;
* '''fog''': a boolean string (yes/no) describing the status of Fog for the side.&lt;br /&gt;
* '''shroud''': a boolean string describing the status of Shroud for the side.&lt;br /&gt;
* '''hidden''': a boolean string specifying whether side is shown in status table.&lt;br /&gt;
* '''color''': {{DevFeature1.11}} a team color range specification, name (e.g. &amp;quot;red&amp;quot;, &amp;quot;blue&amp;quot;), or number (e.g. &amp;quot;1&amp;quot;, &amp;quot;2&amp;quot;) for this side. The default color range names, numbers, and definitions can be found in data/core/team_colors.cfg.&lt;br /&gt;
* '''[ai]''': replaces a side's AI parameters with the new specified ones. Uses the same syntax described in [[AiWML]].&lt;br /&gt;
* '''switch_ai''': replaces a side ai with a new AI from specified file(ignoring those AI parameters above). Path to file follows the usual WML convention.&lt;br /&gt;
* '''share_maps''': change the share_maps side attribute. Be sure to use shroud=yes for that side and have it as an ally&lt;br /&gt;
* '''share_view''': change the share_view side attribute. Be sure to use fog=yes for that side and have it as an ally&lt;br /&gt;
&lt;br /&gt;
=== [modify_turns] ===&lt;br /&gt;
Modifies the turn limit in the middle of a scenario.&lt;br /&gt;
* '''value''': the new turn limit.&lt;br /&gt;
* '''add''': if used instead of ''value'', specifies the number of turns to add to the current limit (can be negative).&lt;br /&gt;
* '''current''': changes the current turn number after applying turn limit modifications, if any. It is not possible to change the turn number to exceed the turn limit (1 &amp;lt;= current turns &amp;lt;= max turns).&lt;br /&gt;
&lt;br /&gt;
=== [allow_end_turn] ===&lt;br /&gt;
Allows human players to end their turn through the user interface if they were previously affected by the '''[disallow_end_turn]''' action. This action doesn't take any arguments.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_end_turn] ===&lt;br /&gt;
Disallows human players to end their turn through the user interface. This action doesn't take any arguments.&lt;br /&gt;
&lt;br /&gt;
=== [capture_village] ===&lt;br /&gt;
Changes the ownership of a village.&lt;br /&gt;
* [[StandardLocationFilter]]: all village locations matching the filter are affected.&lt;br /&gt;
* '''side''': the side that takes control of the village. This side needs to have a leader (canrecruit=yes). If the side key is not given, the village will become neutral (unless [filter_side] is present, in which case that side fiter decides, see below).&lt;br /&gt;
* '''[filter_side]''' with [[StandardSideFilter]] tags and keys as arguments; if both this tag and inline side= are present it's an error. Otherwise, the first matching side gets ownership (or the village becomes neutral if none match).&lt;br /&gt;
* '''fire_event''' (boolean yes|no, default: no): Whether any capture events shall be fired.&lt;br /&gt;
&lt;br /&gt;
=== [kill] ===&lt;br /&gt;
Removes all units (including units in a recall list) that match the filter from the game.&lt;br /&gt;
* [[StandardUnitFilter]]: Selection criterion; do not use a [filter] tag.&lt;br /&gt;
* '''animate''': if 'yes', displays the unit dying (fading away).&lt;br /&gt;
* '''fire_event''': if 'yes', triggers any appropriate 'die' events (See [[EventWML]]). Note that events are only fired for killed units that have been on the map (as opposed to recall list).&lt;br /&gt;
* '''[secondary_unit]''' with a [[StandardUnitFilter]] as argument. Do not use a [filter] tag. Has an effect only if fire_event=yes. The first on-map unit matching the filter becomes second_unit in any fired die and last breath events. If an on-map unit matches and if there are several units killed with a single [kill] tag, second_unit is this same unit for all of them. If no on-map unit matches or [secondary_unit] isn't present, the variable second_unit in each of the die and last breath events is always the same as the variable unit (the dying unit).&lt;br /&gt;
&lt;br /&gt;
=== [move_unit] ===&lt;br /&gt;
works like the MOVE_UNIT macro.&lt;br /&gt;
* [[StandardUnitFilter]] as argument; do not use a [filter] tag. All units matching the filter are moved. If the target location is occupied, the nearest free location is chosen.&lt;br /&gt;
* '''to_x''' (unsigned integer): The units are moved to this x coordinate. Can be a comma-separated list, in which case the unit follows this given path during the move.&lt;br /&gt;
* '''to_y''' (unsigned integer): The units are moved to this y coordinate. Can be a comma-separated list.&lt;br /&gt;
* '''fire_event''' (optional, boolean yes|no, default no): Whether any according moveto events shall be fired. The target location ($x1, $y1 in the event) may not be the same location that the unit was tried to be moved to, if the original target location is occupied or impassable.&lt;br /&gt;
* '''check_passability''' (boolean yes|no, default yes): Whether the terrain the unit is moved to should be checked for suiting the unit. (If it does not, a nearby suitable hex is chosen.)&lt;br /&gt;
&lt;br /&gt;
=== [modify_ai] ===&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument {{DevFeature1.11}}: [modify_ai][filter_side] is deprecated, use the new inline SSF.&lt;br /&gt;
Changes the AI for a specified side. See [[Customizing_AI_in_Wesnoth_1.8#.5Bmodify_ai.5D_tag]]&lt;br /&gt;
&lt;br /&gt;
=== [modify_unit] ===&lt;br /&gt;
works similar to the MODIFY_UNIT macro.&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. All units matching this filter are modified. Matches on recall list units too.&lt;br /&gt;
* Accepts generally the syntax inside of wml unit variables created by [store_unit] which can be viewed in a savefile or by using the :inspect command. Can add traits with immediate effect. Cannot remove things. Subtags with the same name must be written in the correct order to match them with the tag they are supposed to modify.&lt;br /&gt;
example usage (see also the test scenario):&lt;br /&gt;
 [modify_unit]&lt;br /&gt;
     [filter]&lt;br /&gt;
         type=Troll Rocklobber&lt;br /&gt;
     [/filter]&lt;br /&gt;
     hitpoints=10&lt;br /&gt;
     [modifications]&lt;br /&gt;
         [trait]&lt;br /&gt;
             # first trait is unmodified&lt;br /&gt;
         [/trait]&lt;br /&gt;
         {TRAIT_HEALTHY}# second trait is replaced with the healthy trait&lt;br /&gt;
     [/modifications]&lt;br /&gt;
 [/modify_unit]&lt;br /&gt;
&lt;br /&gt;
The unit which is currently modified is accessible via $this_unit, e.g. hitpoints = &amp;quot;$($this_unit.hitpoints / 2)&amp;quot; to set the hitpoints of all units to half of their particular maxima. This this_unit variable is independent from the this_unit variable available in the SUF used to determine which units to modify (first all matching units are gathered, and then all those are modified).&lt;br /&gt;
&lt;br /&gt;
note: The syntax allowed is somehow vague. Just try things and possibly correct/add/modify this documentation. (a [http://forums.wesnoth.org/viewtopic.php?f=21&amp;amp;t=31676&amp;amp; forum thread] discusses some related issues).&lt;br /&gt;
&lt;br /&gt;
=== [transform_unit] ===&lt;br /&gt;
transforms every unit matching the filter to the given unit type. Keeps intact hitpoints, experience and status. If the unit is transformed to a non-living type (undead or mechanical), it will be also unpoisoned.&lt;br /&gt;
* [[StandardUnitFilter]]: do not use a [filter] tag.&lt;br /&gt;
* '''transform_to''': the unit type in which all the units matching the filter will be transformed. If missing, the units will follow their normal advancement.&lt;br /&gt;
&lt;br /&gt;
=== [petrify] ===&lt;br /&gt;
&lt;br /&gt;
* [[StandardUnitFilter]] as an argument. Do not use a [filter] tag. All units matching this filter are petrified. Recall list units are included.&lt;br /&gt;
&lt;br /&gt;
=== [unpetrify] ===&lt;br /&gt;
* [[StandardUnitFilter]] as an argument. Do not use a [filter] tag. All units matching this filter are unpetrified. Recall list units are included.&lt;br /&gt;
&lt;br /&gt;
=== [object] ===&lt;br /&gt;
Gives some unit an object and removes all items on the tile the unit is on.&lt;br /&gt;
* '''id''': (Optional) when the object is picked up, a flag is set for ''id''.  The object cannot be picked up if a flag for ''id'' has been set.  This means that any object with an id can only be used once, even if first_time_only=no is set for the event. This restriction is per level. In a campaign objects with the same id can be assigned once per level.&lt;br /&gt;
* '''delayed_variable_substitution''' (boolean yes|no, default no): If set to &amp;quot;yes&amp;quot;, the wml block contained in this [object] is not variable-substituted at execution time of the event where this [object] is within. You need this to work around a bug when adding ABILITY_TELEPORT via an [object] or when using [object][effect][filter]with a $this_unit (see http://gna.org/bugs/index.php?18893).&lt;br /&gt;
* '''[effect]''': one or more effect elements may be listed.  See [[EffectWML]] for a description of [effect].&lt;br /&gt;
* '''duration''': if 'level', effects only last until the end of the level (note : 'level' is the scenario, so this doesn't mean it last until the unit levels-up).&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. The first unit found that matches the filter will be given the object.  If no unit matches the filter, then a message is displayed and the object is not removed.&lt;br /&gt;
* '''[then]''': a subtag that lets you execute actions if the filter conditions are met.  The most common action that should be inside here is a '''[removeitem]''' tag, but you could probably put any tags that otherwise work in a [then] tag.&lt;br /&gt;
* '''silent''': whether or not messages should be suppressed. Default is &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''image''': the displayed image of the object.&lt;br /&gt;
* '''name''': (translatable) displayed as a caption of the image.&lt;br /&gt;
&lt;br /&gt;
* '''description''': (translatable) displayed as a message of the image.&lt;br /&gt;
* '''cannot_use_message''': (translatable) displayed instead of '''description''' if no unit passes the filter test.&lt;br /&gt;
* If you do not supply a filter, the object action will be applied to a unit at the location of the moveto event. Currently this isn't recommended as it is not clear that this will continue working this way. Instead it is better to explicitly include a location filter.&lt;br /&gt;
* The object action does not act on units in the recall list. There is a feature request in to allow this, but it is not clear whether or not it will be accepted.&lt;br /&gt;
&lt;br /&gt;
=== [remove_shroud] ===&lt;br /&gt;
Removes some shroud from the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
* '''side''': (default=1) the side for which to remove shroud. This can be a comma-separated list of sides. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* [[StandardLocationFilter]]: the range of tiles for which shroud should be removed&lt;br /&gt;
&lt;br /&gt;
=== [place_shroud] ===&lt;br /&gt;
Places some shroud on the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
* '''side''': (default=1) the side for which to place shroud. This can be a comma-separated list. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* [[StandardLocationFilter]]: the range of tiles on which shroud should be placed&lt;br /&gt;
&lt;br /&gt;
=== [allow_undo] ===&lt;br /&gt;
Allows the player to undo the event that this tag is inside.  Has an effect only inside moveto events.  If the move is undone, only the position of the unit will be restored; any altered variables or changes to the game will remain changed after the move is undone.  It is up to the scenario designer to avoid abusing this command.&lt;br /&gt;
* Technically, if '''[allow_undo]''' is inside an '''[event]''' with ''first_time_only=yes'' (the default setting), and the user undoes the event, then the state of the game has changed in this way: the event will not fire a second time, even though the user undid the move the first time.&lt;br /&gt;
&lt;br /&gt;
=== [heal_unit] ===&lt;br /&gt;
Heal a unit. The variable '''$heal_amount''' will be set to the exact number of points healed (i.e can be lesser than the parameter '''amount''' if the unit is fully healed). $heal_amount contains only the number of hitpoints the first unit that was found got healed.&lt;br /&gt;
*  '''[filter]''': [[StandardUnitFilter]] All matching on-map units are healed. If no filter is supplied, it is tried to take the unit at $x1, $y1.&lt;br /&gt;
*  '''[filter_second]''': [[StandardUnitFilter]] all the units matching the filter ''and'' having the ''heals'' ability will have their animation played (if ''animate'' is set to true) for each of the units healed.&lt;br /&gt;
*  '''amount''': (integer, default full) the maximum points the unit(s) will be healed. Can't set below 1 or above max_hitpoints. If &amp;quot;full&amp;quot;, sets hitpoints to max_hitpoints. Before 1.9 the default is 0.&lt;br /&gt;
*  '''animate''': a boolean which indicate if the healing animations must be played. (default no)&lt;br /&gt;
*  '''moves''': (integer, default 0) The maximum current movement points the units will be &amp;quot;healed&amp;quot;. Can't set below 0 or above max_moves. If &amp;quot;full&amp;quot;, sets moves to max_moves.&lt;br /&gt;
* '''restore_attacks''': (boolean, default no) Whether the units' attacks_left should be reset to their max_attacks (usually 1).&lt;br /&gt;
* '''restore_statuses''': (boolean, default yes) Whether standard statuses should be reset to &amp;quot;no&amp;quot;. This affects poisoned, slowed, petrified and unhealable. Before 1.9 this is always &amp;quot;no&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== [harm_unit] ===&lt;br /&gt;
Harms every unit matching the filter, for the specific damage amount.&lt;br /&gt;
*  '''[filter]''': [[StandardUnitFilter]] all matching units will be harmed (required).&lt;br /&gt;
*  '''[filter_second]''': [[StandardUnitFilter]] if present, the first matching unit will attack all the units matching the filter above.&lt;br /&gt;
*  '''amount''': the amount of damage that will be done (required).&lt;br /&gt;
*  '''alignment''': (default neutral) applies an alignment to the damage, this means that if alignment=chaotic, the damage will be increased at night and reduced at day.&lt;br /&gt;
*  '''damage_type''': if present, amount will be altered by unit resistance to the damage type specified.&lt;br /&gt;
*  '''kill''': (default yes) if yes, when an harmed unit goes to or below 0 HP, it is killed; if no its HP are set to 1.&lt;br /&gt;
*  '''fire_event''': (default no) if yes, when a unit is killed by harming, the corresponding events are fired.&lt;br /&gt;
*  '''animate''': (default no) if yes, scrolls to each unit before harming it and plays its defense (or attack, if it's the harmer) and death animations. Special values supported, other than the usual yes and no, are &amp;quot;attacker&amp;quot;, that means only the harmer will be animated, and &amp;quot;defender&amp;quot;, that means only the harmed units will be animated.&lt;br /&gt;
*  '''[primary_attack], [secondary_attack]''': these set the weapon against which the harmed units will defend, and that the harming unit will use to attack, respectively (notice this is the opposite of '''[filter]''' and '''[filter_second]''' above). This allows for playing specific defense and attack animations. Both tags are expected to contain a [[FilterWML#Filtering_Weapons|Standard Weapon Filter]].&lt;br /&gt;
*  '''delay''': if animate=yes, sets the delay (in milliseconds, default 500) between each unit harming.&lt;br /&gt;
*  '''variable''': if present, the damage caused to the unit, altered by resistances, will be stored in a WML array with the given name, under the &amp;quot;harm_amount&amp;quot; key.&lt;br /&gt;
*  '''poisoned, slowed, petrified, unhealable''': (default no) if yes, every harmed unit that doesn't already have such status will have it set.&lt;br /&gt;
*  '''experience''': if yes, and there is an harmer, experience will be attributed like in regular combat.&lt;br /&gt;
*  '''resistance_multiplier''': {{DevFeature1.11}} the harmed unit's resistance is multiplied by the supplied value; this means that a value lower than 1 increases it, and a value greater than 1 decreases it. Default value is 1, that means no modification.&lt;br /&gt;
&lt;br /&gt;
=== [time_area] ===&lt;br /&gt;
How a day should progress in a given area. Everywhere not specified in a [time_area] tag is affected by the [time] tags in the [scenario] tag.&lt;br /&gt;
* [[StandardLocationFilter]]: the locations to affect. ''note: only for [event][time_area]s - at scenario toplevel [time_area] does not support [[StandardLocationFilter]], only location ranges''&lt;br /&gt;
* [[TimeWML]]: the new schedule.&lt;br /&gt;
* '''id''': an unique identifier assigned to a time_area. Optional, unless you want to remove the time_area later. Can be a comma-separated list when removing time_areas, see below.&lt;br /&gt;
* '''remove''': (boolean) yes/no value. Indicates whether the specified time_area should be removed. Requires an identifier. If no identifier is used, however, all time_areas are removed.&lt;br /&gt;
&lt;br /&gt;
=== [end_turn] ===&lt;br /&gt;
End the current side's turn. The current event is finished before the turn is ended. Also, if the current event (where the tag appears) has been fired by another event, that event (and the complete stack of other possible parent events) is ended before [end_turn] comes into affect. Also, events following the event stack that fired [end_turn] are not omitted (e.g. [end_turn] is used by a side turn event and a turn refresh event does something afterwards).&lt;br /&gt;
&lt;br /&gt;
=== [replace_map] ===&lt;br /&gt;
&lt;br /&gt;
Replaces the entire map.&lt;br /&gt;
* '''map''': Content of a wesnoth map file. example:&lt;br /&gt;
 map=&amp;quot;{campaigns/Heir_To_The_Throne/maps/01_The_Elves_Besieged.map}&amp;quot;&lt;br /&gt;
* '''expand''': if 'yes', allows the map size to increase. The expansion direction is currently always bottom-right.&lt;br /&gt;
* '''shrink''': if 'yes', allows the map size to decrease. If the map size is reduced, any units that would no longer be on the map due to its coordinates no longer existing will be put into the recall list.&lt;br /&gt;
&lt;br /&gt;
=== [replace_schedule] ===&lt;br /&gt;
Replace the time of day schedule of the entire scenario.&lt;br /&gt;
* [[TimeWML]]: the new schedule.&lt;br /&gt;
&lt;br /&gt;
=== [tunnel] ===&lt;br /&gt;
&lt;br /&gt;
Create a tunnel between some locations, later usable by units to move from source hex to target hex (using the movement cost of unit on the target terrain). ([http://forums.wesnoth.org/viewtopic.php?f=21&amp;amp;t=14749&amp;amp;p=405667&amp;amp;hilit=tunnel#p405667 source])&lt;br /&gt;
&lt;br /&gt;
* '''id''' identifier for the tunnel, to allow removing (optional).&lt;br /&gt;
* '''remove''': (boolean) yes/no value. If yes, removes all defined tunnels with the same ID (then only id= is necessary). (default: no)&lt;br /&gt;
* '''bidirectional''': (boolean) if yes, creates also a tunnel in the other direction. (default: yes)&lt;br /&gt;
* '''always_visible''': (boolean) if yes, the possible movement of enemies under fog can be seen. (default: no)&lt;br /&gt;
* '''[source]''': [[StandardLocationFilter]] the source hex(es) (required).&lt;br /&gt;
* '''[target]''': [[StandardLocationFilter]] the target hex(es) (required).&lt;br /&gt;
* '''[filter]''': [[StandardUnitFilter]] the units which can use the tunnel (required). Leave empty for &amp;quot;all units&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(Note: The tunnel tag can also be used inside the [[AbilitiesWML|[teleport]]] ability, without remove= and id=).&lt;br /&gt;
&lt;br /&gt;
== Useful Macros ==&lt;br /&gt;
There are some predefined macros that you find useful for direct actions. You can find a complete list along with a detailed explanation of how they work [http://www.wesnoth.org/macro-reference.xhtml here].&lt;br /&gt;
* '''{MOVE_UNIT}''': Moves a unit to another location in the map and the player sees the movement (unlike [teleport])&lt;br /&gt;
* '''{FULL_HEAL}''': Brings a unit to full HP&lt;br /&gt;
* '''{LOYAL_UNIT}''': Create a loyal unit&lt;br /&gt;
* '''{MODIFY_TERRAIN_MASK}''': Modify an area of terrain&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[InternalActionsWML]]&lt;br /&gt;
* [[InterfaceActionsWML]]&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;br /&gt;
[[Category: ActionsWML]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=45348</id>
		<title>DirectActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=45348"/>
		<updated>2012-02-24T20:47:50Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* [unstore_unit] */ remove note about units always unstored with &amp;gt;= 1 hps; see https://gna.org/bugs/index.php?19324&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== Direct actions ==&lt;br /&gt;
&lt;br /&gt;
Direct actions are actions that have a direct effect on gameplay. They can be used inside of [[EventWML|events]].&lt;br /&gt;
&lt;br /&gt;
The following tags are actions:&lt;br /&gt;
&lt;br /&gt;
=== [endlevel] ===&lt;br /&gt;
Ends the scenario.&lt;br /&gt;
* '''result''': before the scenario is over, all events with ''name=result'' are triggered. If ''result=victory'', the player progresses to the next level; if ''result=defeat'', the game returns to the main menu. &lt;br /&gt;
&lt;br /&gt;
When the result is &amp;quot;victory&amp;quot; the following keys can be used:&lt;br /&gt;
* '''bonus''': whether the player should get bonus gold (maximum possible gold that could have been earned by waiting the level out). The default is bonus=yes.&lt;br /&gt;
* '''carryover_report''': whether the player should receive a summary of the scenario outcome, the default is carryover_report=yes.&lt;br /&gt;
* '''save''': whether a start-of-scenario save should be created for the next scenario, the default is save=yes. Do not confuse this with saving of replays for the current scenario.&lt;br /&gt;
* '''replay_save''': whether a replay save for the current scenario is allowed, the default is replay_save=yes. If yes, the player's settings in preferences will be used to determine if a replay is saved. If no, will override and not save a replay.&lt;br /&gt;
* '''linger_mode''': If ...=yes, the screen is greyed out and there's the possibility to save before advancing to the next scenario, the default is linger_mode=yes.&lt;br /&gt;
* '''reveal_map''': (Multiplayer only) (Default is 'yes') If 'no', shroud doesn't disappear when game ended.&lt;br /&gt;
* '''next_scenario''': (default specified in '''[scenario]''' tag) the ID of the next scenario that should be played.  All units that side 1 controls at this point become available for recall in ''next_scenario''.&lt;br /&gt;
* '''carryover_percentage''': by default 80% of the gold is carried over to the next scenario, with this key the amount can be changed.&lt;br /&gt;
* '''carryover_add''': if true the gold will be added to the starting gold the next scenario, if false the next scenario will start with the amount of the current scenario (after taxes) or the minimum in the next scenario. Default is false.&lt;br /&gt;
* '''music''': (default specified in '''[scenario]''' or '''[game_config]''' tags) a comma-separated list of music tracks from which one will be chosen and played once after any events related to the end of level result are executed; by default, victory_music is used on victory, and defeat_music on defeat.&lt;br /&gt;
* '''end_credits''': {{DevFeature1.11}} Whether to display the credits screen at the end of a single-player campaign. Defaults to ''yes''. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
* '''end_text''': (translatable) Text that is shown centered in a black screen at the end of a campaign. Defaults to &amp;quot;The End&amp;quot;. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
* '''end_text_duration''': Delay, in milliseconds, before displaying the game credits at the end of a campaign. In other words, for how much time '''end_text''' is displayed on screen. Defaults to 3500. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
&lt;br /&gt;
=== [unit] ===&lt;br /&gt;
Places a unit on the map.  For syntax see [[SingleUnitWML]].&lt;br /&gt;
* {{Short Note:Predefined Macro|GENERIC_UNIT}}&lt;br /&gt;
* '''to_variable''':  spawn directly into a variable instead of on the map.&lt;br /&gt;
&lt;br /&gt;
=== [recall] ===&lt;br /&gt;
Recalls a unit.  The unit is recalled free of charge, and is placed near the leader.&lt;br /&gt;
* [[StandardUnitFilter]]: the first matching unit will be recalled.  If no units match this tag is ignored. Do not use a [filter] tag. If a comma separated list is given, every unit currently considered for recall is checked against all the types (not each single one of the types against all units).&lt;br /&gt;
* '''x,y''': the unit is placed here instead of next to the leader.&lt;br /&gt;
* '''show''': yes/no, default yes: whether the unit is animated (faded in) or instantly displayed&lt;br /&gt;
* '''fire_event''': boolean yes|no (default no); whether any according prerecall or recall events shall be fired.&lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): If yes, checks for terrain passability when placing the unit (a nearby passable hex is chosen).&lt;br /&gt;
&lt;br /&gt;
=== [teleport] ===&lt;br /&gt;
Teleports a unit on map. {{Short Note:Predefined Macro|TELEPORT_UNIT}}&lt;br /&gt;
* '''[filter]''': [[StandardUnitFilter]] the first unit matching this filter will be teleported.&lt;br /&gt;
* '''x,y''': the position to teleport to.&lt;br /&gt;
* '''clear_shroud''': should shroud be cleared on arrival&lt;br /&gt;
* '''animate''': should a teleport animation be played (if the unit doesn't have a teleport animation, it will fade out/fade in)&lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): normally, units will not be teleported into terrain that is impassable for them. Setting this attribute to &amp;quot;no&amp;quot; permits it.&lt;br /&gt;
&lt;br /&gt;
(Note: There is also a ability named teleport, see [[AbilitiesWML]].)&lt;br /&gt;
&lt;br /&gt;
=== [terrain_mask] ===&lt;br /&gt;
Changes the terrain on the map.  See [[TerrainMaskWML]].&lt;br /&gt;
&lt;br /&gt;
=== [terrain] ===&lt;br /&gt;
Changes the terrain on the map.&lt;br /&gt;
* '''terrain''': the character of the terrain to use.  See [[TerrainCodesWML]] to see what letter a type of terrain uses.&lt;br /&gt;
* [[StandardLocationFilter]]. This [[StandardLocationFilter]]'s terrain= key is used for the new terrain, filtering by terrain can be done with a nested [[StandardLocationFilter]]: [and]terrain=terrain_string_to_be_filtered_for.&lt;br /&gt;
* '''layer''': (overlay|base|both, default=both) only change the specified layer.&lt;br /&gt;
* '''replace_if_failed''': (default=no) When replacing just one layer failed, try to replace the whole terrain. If '''terrain''' is an overlay only terrain, use the default_base as base layer. If the terrain has no default base, do nothing.&lt;br /&gt;
&lt;br /&gt;
=== [gold] ===&lt;br /&gt;
Gives sides gold.&lt;br /&gt;
* '''amount''': the amount of gold to give.&lt;br /&gt;
* '''side''': (default=1) the number of the side to give the gold to. Can be a comma-separated list of sides. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument {{DevFeature1.11}}: [gold][filter_side] is deprecated, use the new inline SSF.&lt;br /&gt;
&lt;br /&gt;
=== [unstore_unit] ===&lt;br /&gt;
Creates a unit from a game variable, and activates it on the playing field.  This must be a specific variable describing a unit, and may not be an array -- to unstore an entire array, iterate over it.  The variable is not cleared.  See also [[InternalActionsWML#.5Bstore_unit.5D|[store_unit]]], [[ConditionalActionsWML#.5Bwhile.5D|[while]]] and [[InternalActionsWML#.5Bclear_variable.5D|[clear_variable]]].&lt;br /&gt;
* '''variable''': the name of the variable.&lt;br /&gt;
* '''find_vacant''': whether the unit should be placed on the nearest vacant tile to its specified location.  If this is set to 'no'(default), then any unit on the same tile as the unit being unstored will be destroyed. &lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): If yes, checks for terrain passability when placing the unit. This key has no effect if find_vacant=no (no check performed then). Before 1.9 this key is always &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''text''': (translatable) floating text to display above the unit, such as a damage amount&lt;br /&gt;
* '''red''', '''green''', '''blue''': (default=0,0,0) the color to display the text in. Values vary from 0-255. You may find it convenient to use the {COLOR_HARM} or {COLOR_HEAL} macro instead. (Use {COLOR_HARM} or {COLOR_HEAL} instead of the whole red,green,blue= line.)&lt;br /&gt;
* '''advance''': (default=true) if true the unit is advanced if it has enough XP. When modifying XP make sure to do it from inside a [[EventWML#Multiplayer_safety|synchronized event]] or it may lead to OOS errors especially when several advancement paths exist. Note that advance and post advance events are called, so infinite loops can happen.&lt;br /&gt;
* '''fire_event''': (boolean yes|no, default no) Whether any advance/post advance events shall be fired if an advancement takes place, no effect otherwise.&lt;br /&gt;
* '''x''' ,'''y''': override unit location, &amp;quot;x,y=recall,recall&amp;quot; will put the unit on the unit's side's recall list.&lt;br /&gt;
&lt;br /&gt;
=== [allow_recruit] ===&lt;br /&gt;
Allows a side to recruit units it couldn't previously recruit.&lt;br /&gt;
* '''type''': the types of units that the side can now recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that is being allowed to recruit the units. This can be a comma-separated list note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [allow_extra_recruit] ===&lt;br /&gt;
Allows a leader to recruit units it couldn't previously recruit.&lt;br /&gt;
These types add to the types the leader can recruit because of [side]recruit=.&lt;br /&gt;
* '''extra_recruit''': the types of units that the unit can now recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_recruit] ===&lt;br /&gt;
Prevents a side from recruiting units it could previously recruit.&lt;br /&gt;
* '''type''': the types of units that the side can no longer recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that may no longer recruit the units. This can be a comma-separated list note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_extra_recruit] ===&lt;br /&gt;
Prevents a leader from recruiting units it could previously recruit.&lt;br /&gt;
* '''extra_recruit''': the types of units that the side can no longer recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [set_recruit] ===&lt;br /&gt;
Sets the units a side can recruit.&lt;br /&gt;
* '''recruit''': the types of units that the side can now recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that is having its recruitment set. This can be a comma-separated list. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [set_extra_recruit] === &lt;br /&gt;
Sets the units a leader can recruit.&lt;br /&gt;
* '''extra_recruit''': the types of units that the leader can now recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [modify_side] ===&lt;br /&gt;
Modifies some details of a given side in the middle of a scenario.  '''The following listed properties are the only properties that [modify_side] can affect!'''&lt;br /&gt;
* '''side''': (default=1) the number of the side that is to be changed. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* '''income''': the income given at the begining of each turn.&lt;br /&gt;
* '''team_name''': the team in which the side plays the scenario.&lt;br /&gt;
* '''user_team_name''': a translatable string representing the team's description. This has no effect on alliances. Defaults to ''team_name''.&lt;br /&gt;
* '''gold''': the amount of gold the side owns.&lt;br /&gt;
* '''village_gold''': the income setting per village for the side.&lt;br /&gt;
* '''controller''': the identifier string of the side's controller. Uses the same syntax of the ''controller'' key in the [[SideWML|[side]]] tag.&lt;br /&gt;
* '''fog''': a boolean string (yes/no) describing the status of Fog for the side.&lt;br /&gt;
* '''shroud''': a boolean string describing the status of Shroud for the side.&lt;br /&gt;
* '''hidden''': a boolean string specifying whether side is shown in status table.&lt;br /&gt;
* '''color''': {{DevFeature1.11}} a team color range specification, name (e.g. &amp;quot;red&amp;quot;, &amp;quot;blue&amp;quot;), or number (e.g. &amp;quot;1&amp;quot;, &amp;quot;2&amp;quot;) for this side. The default color range names, numbers, and definitions can be found in data/core/team_colors.cfg.&lt;br /&gt;
* '''[ai]''': replaces a side's AI parameters with the new specified ones. Uses the same syntax described in [[AiWML]].&lt;br /&gt;
* '''switch_ai''': replaces a side ai with a new AI from specified file(ignoring those AI parameters above). Path to file follows the usual WML convention.&lt;br /&gt;
* '''share_maps''': change the share_maps side attribute. Be sure to use shroud=yes for that side and have it as an ally&lt;br /&gt;
* '''share_view''': change the share_view side attribute. Be sure to use fog=yes for that side and have it as an ally&lt;br /&gt;
&lt;br /&gt;
=== [modify_turns] ===&lt;br /&gt;
Modifies the turn limit in the middle of a scenario.&lt;br /&gt;
* '''value''': the new turn limit.&lt;br /&gt;
* '''add''': if used instead of ''value'', specifies the number of turns to add to the current limit (can be negative).&lt;br /&gt;
* '''current''': changes the current turn number after applying turn limit modifications, if any. It is not possible to change the turn number to exceed the turn limit (1 &amp;lt;= current turns &amp;lt;= max turns).&lt;br /&gt;
&lt;br /&gt;
=== [allow_end_turn] ===&lt;br /&gt;
Allows human players to end their turn through the user interface if they were previously affected by the '''[disallow_end_turn]''' action. This action doesn't take any arguments.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_end_turn] ===&lt;br /&gt;
Disallows human players to end their turn through the user interface. This action doesn't take any arguments.&lt;br /&gt;
&lt;br /&gt;
=== [capture_village] ===&lt;br /&gt;
Changes the ownership of a village.&lt;br /&gt;
* [[StandardLocationFilter]]: all village locations matching the filter are affected.&lt;br /&gt;
* '''side''': the side that takes control of the village. This side needs to have a leader (canrecruit=yes). If the side key is not given, the village will become neutral (unless [filter_side] is present, in which case that side fiter decides, see below).&lt;br /&gt;
* '''[filter_side]''' with [[StandardSideFilter]] tags and keys as arguments; if both this tag and inline side= are present it's an error. Otherwise, the first matching side gets ownership (or the village becomes neutral if none match).&lt;br /&gt;
* '''fire_event''' (boolean yes|no, default: no): Whether any capture events shall be fired.&lt;br /&gt;
&lt;br /&gt;
=== [kill] ===&lt;br /&gt;
Removes all units (including units in a recall list) that match the filter from the game.&lt;br /&gt;
* [[StandardUnitFilter]]: Selection criterion; do not use a [filter] tag.&lt;br /&gt;
* '''animate''': if 'yes', displays the unit dying (fading away).&lt;br /&gt;
* '''fire_event''': if 'yes', triggers any appropriate 'die' events (See [[EventWML]]). Note that events are only fired for killed units that have been on the map (as opposed to recall list).&lt;br /&gt;
* '''[secondary_unit]''' with a [[StandardUnitFilter]] as argument. Do not use a [filter] tag. Has an effect only if fire_event=yes. The first on-map unit matching the filter becomes second_unit in any fired die and last breath events. If an on-map unit matches and if there are several units killed with a single [kill] tag, second_unit is this same unit for all of them. If no on-map unit matches or [secondary_unit] isn't present, the variable second_unit in each of the die and last breath events is always the same as the variable unit (the dying unit).&lt;br /&gt;
&lt;br /&gt;
=== [move_unit] ===&lt;br /&gt;
works like the MOVE_UNIT macro.&lt;br /&gt;
* [[StandardUnitFilter]] as argument; do not use a [filter] tag. All units matching the filter are moved. If the target location is occupied, the nearest free passable location is chosen. All target locations passed (see below) need to be passable hexes for the particular moved units.&lt;br /&gt;
* '''to_x''' (unsigned integer): The units are moved to this x coordinate. Can be a comma-separated list, in which case the unit follows this given path during the move.&lt;br /&gt;
* '''to_y''' (unsigned integer): The units are moved to this y coordinate. Can be a comma-separated list.&lt;br /&gt;
* '''fire_event''' (optional, boolean yes|no, default no): Whether any according moveto events shall be fired. The target location ($x1, $y1 in the event) may not be the same location that the unit was tried to be moved to, if the original target location is occupied or impassable.&lt;br /&gt;
* '''check_passability''' (boolean yes|no, default yes): Whether the terrain the unit is moved to should be checked for suiting the unit. (If it does not, a nearby suitable hex is chosen.)&lt;br /&gt;
&lt;br /&gt;
=== [modify_ai] ===&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument {{DevFeature1.11}}: [modify_ai][filter_side] is deprecated, use the new inline SSF.&lt;br /&gt;
Changes the AI for a specified side. See [[Customizing_AI_in_Wesnoth_1.8#.5Bmodify_ai.5D_tag]]&lt;br /&gt;
&lt;br /&gt;
=== [modify_unit] ===&lt;br /&gt;
works similar to the MODIFY_UNIT macro.&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. All units matching this filter are modified. Matches on recall list units too.&lt;br /&gt;
* Accepts generally the syntax inside of wml unit variables created by [store_unit] which can be viewed in a savefile or by using the :inspect command. Can add traits with immediate effect. Cannot remove things. Subtags with the same name must be written in the correct order to match them with the tag they are supposed to modify.&lt;br /&gt;
example usage (see also the test scenario):&lt;br /&gt;
 [modify_unit]&lt;br /&gt;
     [filter]&lt;br /&gt;
         type=Troll Rocklobber&lt;br /&gt;
     [/filter]&lt;br /&gt;
     hitpoints=10&lt;br /&gt;
     [modifications]&lt;br /&gt;
         [trait]&lt;br /&gt;
             # first trait is unmodified&lt;br /&gt;
         [/trait]&lt;br /&gt;
         {TRAIT_HEALTHY}# second trait is replaced with the healthy trait&lt;br /&gt;
     [/modifications]&lt;br /&gt;
 [/modify_unit]&lt;br /&gt;
&lt;br /&gt;
The unit which is currently modified is accessible via $this_unit, e.g. hitpoints = &amp;quot;$($this_unit.hitpoints / 2)&amp;quot; to set the hitpoints of all units to half of their particular maxima. This this_unit variable is independent from the this_unit variable available in the SUF used to determine which units to modify (first all matching units are gathered, and then all those are modified).&lt;br /&gt;
&lt;br /&gt;
note: The syntax allowed is somehow vague. Just try things and possibly correct/add/modify this documentation. (a [http://forums.wesnoth.org/viewtopic.php?f=21&amp;amp;t=31676&amp;amp; forum thread] discusses some related issues).&lt;br /&gt;
&lt;br /&gt;
=== [transform_unit] ===&lt;br /&gt;
transforms every unit matching the filter to the given unit type. Keeps intact hitpoints, experience and status. If the unit is transformed to a non-living type (undead or mechanical), it will be also unpoisoned.&lt;br /&gt;
* [[StandardUnitFilter]]: do not use a [filter] tag.&lt;br /&gt;
* '''transform_to''': the unit type in which all the units matching the filter will be transformed. If missing, the units will follow their normal advancement.&lt;br /&gt;
&lt;br /&gt;
=== [petrify] ===&lt;br /&gt;
&lt;br /&gt;
* [[StandardUnitFilter]] as an argument. Do not use a [filter] tag. All units matching this filter are petrified. Recall list units are included.&lt;br /&gt;
&lt;br /&gt;
=== [unpetrify] ===&lt;br /&gt;
* [[StandardUnitFilter]] as an argument. Do not use a [filter] tag. All units matching this filter are unpetrified. Recall list units are included.&lt;br /&gt;
&lt;br /&gt;
=== [object] ===&lt;br /&gt;
Gives some unit an object and removes all items on the tile the unit is on.&lt;br /&gt;
* '''id''': (Optional) when the object is picked up, a flag is set for ''id''.  The object cannot be picked up if a flag for ''id'' has been set.  This means that any object with an id can only be used once, even if first_time_only=no is set for the event. This restriction is per level. In a campaign objects with the same id can be assigned once per level.&lt;br /&gt;
* '''delayed_variable_substitution''' (boolean yes|no, default no): If set to &amp;quot;yes&amp;quot;, the wml block contained in this [object] is not variable-substituted at execution time of the event where this [object] is within. You need this to work around a bug when adding ABILITY_TELEPORT via an [object] or when using [object][effect][filter]with a $this_unit (see http://gna.org/bugs/index.php?18893).&lt;br /&gt;
* '''[effect]''': one or more effect elements may be listed.  See [[EffectWML]] for a description of [effect].&lt;br /&gt;
* '''duration''': if 'level', effects only last until the end of the level (note : 'level' is the scenario, so this doesn't mean it last until the unit levels-up).&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. The first unit found that matches the filter will be given the object.  If no unit matches the filter, then a message is displayed and the object is not removed.&lt;br /&gt;
* '''[then]''': a subtag that lets you execute actions if the filter conditions are met.  The most common action that should be inside here is a '''[removeitem]''' tag, but you could probably put any tags that otherwise work in a [then] tag.&lt;br /&gt;
* '''silent''': whether or not messages should be suppressed. Default is &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''image''': the displayed image of the object.&lt;br /&gt;
* '''name''': (translatable) displayed as a caption of the image.&lt;br /&gt;
&lt;br /&gt;
* '''description''': (translatable) displayed as a message of the image.&lt;br /&gt;
* '''cannot_use_message''': (translatable) displayed instead of '''description''' if no unit passes the filter test.&lt;br /&gt;
* If you do not supply a filter, the object action will be applied to a unit at the location of the moveto event. Currently this isn't recommended as it is not clear that this will continue working this way. Instead it is better to explicitly include a location filter.&lt;br /&gt;
* The object action does not act on units in the recall list. There is a feature request in to allow this, but it is not clear whether or not it will be accepted.&lt;br /&gt;
&lt;br /&gt;
=== [remove_shroud] ===&lt;br /&gt;
Removes some shroud from the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
* '''side''': (default=1) the side for which to remove shroud. This can be a comma-separated list of sides. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* [[StandardLocationFilter]]: the range of tiles for which shroud should be removed&lt;br /&gt;
&lt;br /&gt;
=== [place_shroud] ===&lt;br /&gt;
Places some shroud on the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
* '''side''': (default=1) the side for which to place shroud. This can be a comma-separated list. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* [[StandardLocationFilter]]: the range of tiles on which shroud should be placed&lt;br /&gt;
&lt;br /&gt;
=== [allow_undo] ===&lt;br /&gt;
Allows the player to undo the event that this tag is inside.  Has an effect only inside moveto events.  If the move is undone, only the position of the unit will be restored; any altered variables or changes to the game will remain changed after the move is undone.  It is up to the scenario designer to avoid abusing this command.&lt;br /&gt;
* Technically, if '''[allow_undo]''' is inside an '''[event]''' with ''first_time_only=yes'' (the default setting), and the user undoes the event, then the state of the game has changed in this way: the event will not fire a second time, even though the user undid the move the first time.&lt;br /&gt;
&lt;br /&gt;
=== [heal_unit] ===&lt;br /&gt;
Heal a unit. The variable '''$heal_amount''' will be set to the exact number of points healed (i.e can be lesser than the parameter '''amount''' if the unit is fully healed). $heal_amount contains only the number of hitpoints the first unit that was found got healed.&lt;br /&gt;
*  '''[filter]''': [[StandardUnitFilter]] All matching on-map units are healed. If no filter is supplied, it is tried to take the unit at $x1, $y1.&lt;br /&gt;
*  '''[filter_second]''': [[StandardUnitFilter]] all the units matching the filter ''and'' having the ''heals'' ability will have their animation played (if ''animate'' is set to true) for each of the units healed.&lt;br /&gt;
*  '''amount''': (integer, default full) the maximum points the unit(s) will be healed. Can't set below 1 or above max_hitpoints. If &amp;quot;full&amp;quot;, sets hitpoints to max_hitpoints. Before 1.9 the default is 0.&lt;br /&gt;
*  '''animate''': a boolean which indicate if the healing animations must be played. (default no)&lt;br /&gt;
*  '''moves''': (integer, default 0) The maximum current movement points the units will be &amp;quot;healed&amp;quot;. Can't set below 0 or above max_moves. If &amp;quot;full&amp;quot;, sets moves to max_moves.&lt;br /&gt;
* '''restore_attacks''': (boolean, default no) Whether the units' attacks_left should be reset to their max_attacks (usually 1).&lt;br /&gt;
* '''restore_statuses''': (boolean, default yes) Whether standard statuses should be reset to &amp;quot;no&amp;quot;. This affects poisoned, slowed, petrified and unhealable. Before 1.9 this is always &amp;quot;no&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== [harm_unit] ===&lt;br /&gt;
Harms every unit matching the filter, for the specific damage amount.&lt;br /&gt;
*  '''[filter]''': [[StandardUnitFilter]] all matching units will be harmed (required).&lt;br /&gt;
*  '''[filter_second]''': [[StandardUnitFilter]] if present, the first matching unit will attack all the units matching the filter above.&lt;br /&gt;
*  '''amount''': the amount of damage that will be done (required).&lt;br /&gt;
*  '''alignment''': (default neutral) applies an alignment to the damage, this means that if alignment=chaotic, the damage will be increased at night and reduced at day.&lt;br /&gt;
*  '''damage_type''': if present, amount will be altered by unit resistance to the damage type specified.&lt;br /&gt;
*  '''kill''': (default yes) if yes, when an harmed unit goes to or below 0 HP, it is killed; if no its HP are set to 1.&lt;br /&gt;
*  '''fire_event''': (default no) if yes, when a unit is killed by harming, the corresponding events are fired.&lt;br /&gt;
*  '''animate''': (default no) if yes, scrolls to each unit before harming it and plays its defense (or attack, if it's the harmer) and death animations. Special values supported, other than the usual yes and no, are &amp;quot;attacker&amp;quot;, that means only the harmer will be animated, and &amp;quot;defender&amp;quot;, that means only the harmed units will be animated.&lt;br /&gt;
*  '''[primary_attack], [secondary_attack]''': these set the weapon against which the harmed units will defend, and that the harming unit will use to attack, respectively (notice this is the opposite of '''[filter]''' and '''[filter_second]''' above). This allows for playing specific defense and attack animations. Both tags are expected to contain a [[FilterWML#Filtering_Weapons|Standard Weapon Filter]].&lt;br /&gt;
*  '''delay''': if animate=yes, sets the delay (in milliseconds, default 500) between each unit harming.&lt;br /&gt;
*  '''variable''': if present, the damage caused to the unit, altered by resistances, will be stored in a WML array with the given name, under the &amp;quot;harm_amount&amp;quot; key.&lt;br /&gt;
*  '''poisoned, slowed, petrified, unhealable''': (default no) if yes, every harmed unit that doesn't already have such status will have it set.&lt;br /&gt;
*  '''experience''': if yes, and there is an harmer, experience will be attributed like in regular combat.&lt;br /&gt;
*  '''resistance_multiplier''': {{DevFeature1.11}} the harmed unit's resistance is multiplied by the supplied value; this means that a value lower than 1 increases it, and a value greater than 1 decreases it. Default value is 1, that means no modification.&lt;br /&gt;
&lt;br /&gt;
=== [time_area] ===&lt;br /&gt;
How a day should progress in a given area. Everywhere not specified in a [time_area] tag is affected by the [time] tags in the [scenario] tag.&lt;br /&gt;
* [[StandardLocationFilter]]: the locations to affect. ''note: only for [event][time_area]s - at scenario toplevel [time_area] does not support [[StandardLocationFilter]], only location ranges''&lt;br /&gt;
* [[TimeWML]]: the new schedule.&lt;br /&gt;
* '''id''': an unique identifier assigned to a time_area. Optional, unless you want to remove the time_area later. Can be a comma-separated list when removing time_areas, see below.&lt;br /&gt;
* '''remove''': (boolean) yes/no value. Indicates whether the specified time_area should be removed. Requires an identifier. If no identifier is used, however, all time_areas are removed.&lt;br /&gt;
&lt;br /&gt;
=== [end_turn] ===&lt;br /&gt;
End the current side's turn. The current event is finished before the turn is ended. Also, if the current event (where the tag appears) has been fired by another event, that event (and the complete stack of other possible parent events) is ended before [end_turn] comes into affect. Also, events following the event stack that fired [end_turn] are not omitted (e.g. [end_turn] is used by a side turn event and a turn refresh event does something afterwards).&lt;br /&gt;
&lt;br /&gt;
=== [replace_map] ===&lt;br /&gt;
&lt;br /&gt;
Replaces the entire map.&lt;br /&gt;
* '''map''': Content of a wesnoth map file. example:&lt;br /&gt;
 map=&amp;quot;{campaigns/Heir_To_The_Throne/maps/01_The_Elves_Besieged.map}&amp;quot;&lt;br /&gt;
* '''expand''': if 'yes', allows the map size to increase. The expansion direction is currently always bottom-right.&lt;br /&gt;
* '''shrink''': if 'yes', allows the map size to decrease. If the map size is reduced, any units that would no longer be on the map due to its coordinates no longer existing will be put into the recall list.&lt;br /&gt;
&lt;br /&gt;
=== [replace_schedule] ===&lt;br /&gt;
Replace the time of day schedule of the entire scenario.&lt;br /&gt;
* [[TimeWML]]: the new schedule.&lt;br /&gt;
&lt;br /&gt;
=== [tunnel] ===&lt;br /&gt;
&lt;br /&gt;
Create a tunnel between some locations, later usable by units to move from source hex to target hex (using the movement cost of unit on the target terrain). ([http://forums.wesnoth.org/viewtopic.php?f=21&amp;amp;t=14749&amp;amp;p=405667&amp;amp;hilit=tunnel#p405667 source])&lt;br /&gt;
&lt;br /&gt;
* '''id''' identifier for the tunnel, to allow removing (optional).&lt;br /&gt;
* '''remove''': (boolean) yes/no value. If yes, removes all defined tunnels with the same ID (then only id= is necessary). (default: no)&lt;br /&gt;
* '''bidirectional''': (boolean) if yes, creates also a tunnel in the other direction. (default: yes)&lt;br /&gt;
* '''always_visible''': (boolean) if yes, the possible movement of enemies under fog can be seen. (default: no)&lt;br /&gt;
* '''[source]''': [[StandardLocationFilter]] the source hex(es) (required).&lt;br /&gt;
* '''[target]''': [[StandardLocationFilter]] the target hex(es) (required).&lt;br /&gt;
* '''[filter]''': [[StandardUnitFilter]] the units which can use the tunnel (required). Leave empty for &amp;quot;all units&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(Note: The tunnel tag can also be used inside the [[AbilitiesWML|[teleport]]] ability, without remove= and id=).&lt;br /&gt;
&lt;br /&gt;
== Useful Macros ==&lt;br /&gt;
There are some predefined macros that you find useful for direct actions. You can find a complete list along with a detailed explanation of how they work [http://www.wesnoth.org/macro-reference.xhtml here].&lt;br /&gt;
* '''{MOVE_UNIT}''': Moves a unit to another location in the map and the player sees the movement (unlike [teleport])&lt;br /&gt;
* '''{FULL_HEAL}''': Brings a unit to full HP&lt;br /&gt;
* '''{LOYAL_UNIT}''': Create a loyal unit&lt;br /&gt;
* '''{MODIFY_TERRAIN_MASK}''': Modify an area of terrain&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[InternalActionsWML]]&lt;br /&gt;
* [[InterfaceActionsWML]]&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;br /&gt;
[[Category: ActionsWML]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=StandardLocationFilter&amp;diff=45265</id>
		<title>StandardLocationFilter</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=StandardLocationFilter&amp;diff=45265"/>
		<updated>2012-02-16T17:57:04Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
&lt;br /&gt;
From [[FilterWML]], this is the standard way of filtering on locations.&lt;br /&gt;
The term [[StandardLocationFilter]] means that the set of such keys and tags (see below) can appear at that point. Sometimes a [[StandardLocationFilter]] needs to be included in a [filter_location] tag. There are however many tags which accept the [[StandardLocationFilter]] directly as an argument such as [store_locations]. Generally, if the tag [filter_location] is not mentioned to be a possible subtag of the outer tag in question, then don't put it.&lt;br /&gt;
&lt;br /&gt;
The following attributes and sub-tags are permitted:&lt;br /&gt;
&lt;br /&gt;
* '''time_of_day''': filter matches only on a given time of day (one of lawful, chaotic, neutral or liminal). Note: ''chaotic'', ''lawful'', ''neutral'' and ''liminal''; these are not times of day, these are ''alignments''. To match against 'dawn', 'dusk', 'first watch' etc., use the '''time_of_day_id''' key described below.&lt;br /&gt;
* '''time_of_day_id''': this accepts a list of one or more actual times of day, separated by commas. These IDs are taken from '''data/core/macros/schedules.cfg'''. Permissible values are case-sensitive: dawn, morning, afternoon, dusk, first_watch, second_watch, indoors, underground and deep_underground. &lt;br /&gt;
* '''terrain''': comma separated list of terrains. (See also: [http://www.wesnoth.org/wiki/FilterWML#Filtering_Terrains Filtering Terrains]).&lt;br /&gt;
* '''x,y''': the same as in the unit filter; supports any range ([http://www.wesnoth.org/wiki/StandardLocationFilter#Notes_about_Coordinate_Usage notes])&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument; if present a unit must also be there&lt;br /&gt;
* '''owner_side''': If a valid side number, restricts stored locations to villages belonging to this side. If 0, restricts to all unowned locations (the whole map except villages which belong to some valid side). A hex is considered a village if and only if its [ [[TerrainWML|terrain_type]] ]gives_income= parameter was set to yes (which means a side can own that hex).&lt;br /&gt;
*'''[filter_owner]''': {{DevFeature1.11}}: If present, inline owner_side= is ignored. Restricts stored locations to villages, each of which must belong to any of the matching sides. If no sides match, restricts to unowned villages (and only these).&lt;br /&gt;
**'''[[StandardSideFilter]]''' tags and keys as arguments&lt;br /&gt;
* '''find_in''': name of an array or container variable; if present, the location will not match unless it is also found stored in the variable&lt;br /&gt;
* '''radius''': matches if any location within the radius matches this filter ([http://www.wesnoth.org/wiki/StandardLocationFilter#Notes_about_Radius_Usage notes])&lt;br /&gt;
* '''[filter_radius]''': a standard location filter; normally the radius extends outwards from matching locations one step at a time without checking any additional information-- however, if this tag is present, the radius will be restricted so that it can only expand outwards in the directions where it passes the given location filter&lt;br /&gt;
* '''[and]''': an extra location filter. Unless a location matches the [and] filter, then it will be excluded. ''Note: [and],[or],and [not] extra location filters are considered after everything else in the containing filter (except radius, which is considered last in 1.3.8 and greater); they are then processed in the order encountered.''&lt;br /&gt;
* '''[or]''': an extra location filter. If a location matches the [or] filter, then it will count as a match regardless of conditions in previous filters or the containing filter.&lt;br /&gt;
* '''[not]''': an extra location filter. If a location matches the [not] filter, then that location will be excluded.&lt;br /&gt;
* '''[filter_adjacent_location]''': a standard location filter; if present the correct number of adjacent locations must match this filter&lt;br /&gt;
** '''count''': a number, range, or comma separated range; default &amp;quot;1-6&amp;quot;&lt;br /&gt;
** '''adjacent''': a comma separated list of directions; default &amp;quot;n,ne,se,s,sw,nw&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Notes about Coordinate Usage==&lt;br /&gt;
When specifying coordinates, the following keys are used:&lt;br /&gt;
* '''x''': the first coordinate&lt;br /&gt;
* '''y''': the second coordinate&lt;br /&gt;
&lt;br /&gt;
While some locations should only be one hex (like the starting position of a unit),&lt;br /&gt;
others filter over multiple hexes.&lt;br /&gt;
The following syntax is used to filter over multiple hexes:&lt;br /&gt;
&lt;br /&gt;
Dashes('''-''') are used to have the location be a range of hexes.&lt;br /&gt;
There must be values before and after the dash;&lt;br /&gt;
everything in between these numbers (inclusively) is part of the range.&lt;br /&gt;
&lt;br /&gt;
Commas(''',''') are used to separate coordinates into a list.&lt;br /&gt;
The '''x''' and '''y''' lists are then paired up, with each pair representing one hex or range.&lt;br /&gt;
&lt;br /&gt;
Note: although the ordering of locations in a list generally does not matter,&lt;br /&gt;
the action '''[move_unit_fake]''' takes in a list of hexes,&lt;br /&gt;
and moves an image onto each of those hexes in order.&lt;br /&gt;
&lt;br /&gt;
==Notes about Radius Usage==&lt;br /&gt;
:If you aren't storing any locations successfully, it may be because you put the radius or filters in the wrong place for them to combine correctly.&lt;br /&gt;
  [have_location]&lt;br /&gt;
  terrain=Gg^Vh&lt;br /&gt;
  [and]&lt;br /&gt;
    x=$x1&lt;br /&gt;
    y=$y1&lt;br /&gt;
    radius=1&lt;br /&gt;
  [/and]&lt;br /&gt;
  [/have_location]&lt;br /&gt;
Note that the use of [and] here causes the radius to have a very different meaning. Normally, all of the criteria besides radius are checked, producing a set of hexes to which the radius is applied. This means, for example, that if you're trying to find &amp;quot;a hex without a unit on it within 5 hexes of (15, 23)&amp;quot;, the code:&lt;br /&gt;
  [have_location]&lt;br /&gt;
  x,y=15,23&lt;br /&gt;
  radius=5&lt;br /&gt;
  [not]&lt;br /&gt;
    [filter]&lt;br /&gt;
    [/filter]&lt;br /&gt;
  [/not]&lt;br /&gt;
  [have_location]&lt;br /&gt;
will not work! First, it looks for a hex with x=15, y=23 without a unit on it. Then, it returns that hex and all hexes within 5 of it. If (15, 23) happens to be occupied, then it will return no hexes, because &amp;quot;all hexes within 5 hexes of (no hexes)&amp;quot; is still &amp;quot;no hexes&amp;quot;. Instead, put an [and] around the x,y and radius requirements, and it will separately find &amp;quot;(15, 23) and all hexes within 5 of it&amp;quot; and &amp;quot;each of those hexes that doesn't have a unit on it&amp;quot;, producing the desired result.&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Template:WML_Tags&amp;diff=45253</id>
		<title>Template:WML Tags</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Template:WML_Tags&amp;diff=45253"/>
		<updated>2012-02-14T22:48:46Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| class=&amp;quot;gallery&amp;quot; style=&amp;quot;width:225px;float: right;border: 1px solid #B48648; color:#B48648; font-size: 7pt;margin-left;10px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;span style=&amp;quot;float: right;&amp;quot;&amp;gt;&amp;lt;small class=&amp;quot;editlink noprint plainlinksneverexpand&amp;quot;&amp;gt;[{{SERVER}}{{localurl:Template:WML Tags|action=edit}} edit ]&amp;lt;/small&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
'''WML Tags'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|''A:'' &lt;br /&gt;
[[AbilitiesWML|abilities]],&lt;br /&gt;
[[CampaignWML|about]],&lt;br /&gt;
[[AdvancedPreferenceWML|advanced_preference]],&lt;br /&gt;
[[UnitTypeWML|advancefrom]],&lt;br /&gt;
[[UnitTypeWML|advancement]],&lt;br /&gt;
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|advances]],&lt;br /&gt;
[[AiWML#the_.5Bai.5D_tag|ai]],&lt;br /&gt;
[[DirectActionsWML#.5Ballow_end_turn.5D|allow_end_turn]],&lt;br /&gt;
[[DirectActionsWML#.5Ballow_extra_recruit.5D|allow_extra_recruit]],&lt;br /&gt;
[[DirectActionsWML#.5Ballow_recruit.5D|allow_recruit]],&lt;br /&gt;
[[DirectActionsWML#.5Ballow_undo.5D|allow_undo]],&lt;br /&gt;
[[ConditionalActionsWML#Meta_Condition_Tags|and]],&lt;br /&gt;
[[InterfaceActionsWML#.5Banimate_unit.5D|animate_unit]],&lt;br /&gt;
[[AnimationWML|animation]],&lt;br /&gt;
[[VariablesWML#Array|array]],&lt;br /&gt;
[[UnitTypeWML#Attacks|attack]],&lt;br /&gt;
[[AnimationWML|attack_filter]], &lt;br /&gt;
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|attacks]],&lt;br /&gt;
[[AiWML#the_.5Bai.5D_tag|avoid]];&lt;br /&gt;
|-&lt;br /&gt;
|''B:'' &lt;br /&gt;
[[UnitTypeWML#Other_tags|base_unit]], [[BinaryPathWML|binary_path]], [[HelpWML#Help_System_Topic_Markup|bold]], [[EditorWML#The_.5Bbrush.5D_tag|brush]];&lt;br /&gt;
|-&lt;br /&gt;
|''C:'' &lt;br /&gt;
[[CampaignWML#The_.5Bcampaign.5D_tag|campaign]],&lt;br /&gt;
[[DirectActionsWML#.5Bcapture_village.5D|capture_village]],&lt;br /&gt;
[[ConditionalActionsWML#.5Bswitch.5D|case]],&lt;br /&gt;
[[InterfaceActionsWML#.5Bchat.5D|chat]],&lt;br /&gt;
[[ReplayWML|choose]],&lt;br /&gt;
[[PersistenceWML|clear_global_variable]],&lt;br /&gt;
[[InterfaceActionsWML#.5Bclear_menu_item.5D|clear_menu_item]],&lt;br /&gt;
[[InternalActionsWML|clear_variable]],&lt;br /&gt;
[[InterfaceActionsWML#.5Bcolour_adjust.5D|colour_adjust]],&lt;br /&gt;
command([[ConditionalActionsWML#.5Bcommand.5D|action]], [[ReplayWML|replay]]);&lt;br /&gt;
|-&lt;br /&gt;
|''D:'' &lt;br /&gt;
[[AbilitiesWML|damage]],&lt;br /&gt;
[[StatisticalScenarioWML|deaths]],&lt;br /&gt;
[[AnimationWML|defend]],&lt;br /&gt;
[[StatisticalScenarioWML|defends]],&lt;br /&gt;
[[UnitTypeWML|defense]],&lt;br /&gt;
[[InterfaceActionsWML#.5Bdelay.5D|delay]],&lt;br /&gt;
[[InterfaceActionsWML#.5Bdeprecated_message.5D|deprecated_message]],&lt;br /&gt;
[[ReplayWML|destination]],&lt;br /&gt;
[[DirectActionsWML#.5Bdisallow_end_turn.5D|disallow_end_turn]],&lt;br /&gt;
[[DirectActionsWML#.5Bdisallow_extra_recruit.5D|disallow_extra_recruit]],&lt;br /&gt;
[[DirectActionsWML#.5Bdisallow_recruit.5D|disallow_recruit]],&lt;br /&gt;
[[ConditionalActionsWML#.5Bwhile.5D|do]];&lt;br /&gt;
|-&lt;br /&gt;
|''E:'' &lt;br /&gt;
[[EditorWML|editor_group]],&lt;br /&gt;
[[EditorWML|editor_music]], &lt;br /&gt;
[[EditorWML|editor_times]],&lt;br /&gt;
[[EditorWML|editor_tool_hint]],&lt;br /&gt;
[[EffectWML|effect]],&lt;br /&gt;
else ([[ConditionalActionsWML#.5Bif.5D|action]], [[AnimationWML#.5Bif.5D_and_.5Belse.5D|animation]]),&lt;br /&gt;
[[DirectActionsWML#.5Bendlevel.5D|endlevel]],&lt;br /&gt;
end_turn&amp;amp;nbsp;([[DirectActionsWML#.5Bend_turn.5D|action]], [[ReplayWML|replay]]),&lt;br /&gt;
[[EraWML|era]],&lt;br /&gt;
[[EventWML|event]],&lt;br /&gt;
[[ThemeWML|expenses]];&lt;br /&gt;
|-&lt;br /&gt;
|''F:'' &lt;br /&gt;
[[EventWML#.5Bfilter.5D|filter]],&lt;br /&gt;
[[FilterWML|filter]],&lt;br /&gt;
[[AnimationWML|filter_attack]],&lt;br /&gt;
[[EventWML#.5Bfilter_attack.5D|filter_attack]],&lt;br /&gt;
[[EventWML#.5Bfilter_condition.5D|filter_condition]],&lt;br /&gt;
[[FilterWML|filter_location]],&lt;br /&gt;
[[EventWML#.5Bfilter_second.5D|filter_second]],&lt;br /&gt;
[[FilterWML|filter_second]],&lt;br /&gt;
[[AnimationWML|filter_second_attack]],&lt;br /&gt;
[[EventWML#.5Bfilter_second_attack.5D|filter_second_attack]],&lt;br /&gt;
[[EventWML#.5Bfilter_side.5D|filter_side]],&lt;br /&gt;
[[FilterWML#Filtering_Vision|filter_vision]],&lt;br /&gt;
[[StandardUnitFilter|filter_wml]],&lt;br /&gt;
[[InternalActionsWML#.5Bfind_path.5D|find_path]],&lt;br /&gt;
[[InternalActionsWML|fire_event]],&lt;br /&gt;
[[InterfaceActionsWML#.5Bfloating_text.5D|floating_text]],&lt;br /&gt;
[[HelpWML|format]],&lt;br /&gt;
[[AnimationWML|frame]];&lt;br /&gt;
|-&lt;br /&gt;
|''G:'' &lt;br /&gt;
[[GameConfigWML|game_config]],&lt;br /&gt;
[[ScenarioWML|generator]],&lt;br /&gt;
[[PersistenceWML|get_global_variable]],&lt;br /&gt;
gold([[DirectActionsWML#.5Bgold.5D|action]], [[ThemeWML|theme]]);&lt;br /&gt;
|-&lt;br /&gt;
|''H:'' &lt;br /&gt;
[[DirectActionsWML#.5Bharm_unit.5D|harm_unit]],&lt;br /&gt;
[[ConditionalActionsWML#Condition_Tags|have_location]],&lt;br /&gt;
[[ConditionalActionsWML#Condition_Tags|have_unit]],&lt;br /&gt;
[[HelpWML|header]],&lt;br /&gt;
[[DirectActionsWML#.5Bheal_unit.5D|heal_unit]],&lt;br /&gt;
[[UnitsWML|hide_help]],&lt;br /&gt;
[[InterfaceActionsWML#.5Bhide_unit.5D|hide_unit]];&lt;br /&gt;
|-&lt;br /&gt;
|''I:'' &lt;br /&gt;
if ([[ConditionalActionsWML#.5Bif.5D|action]], [[AnimationWML#.5Bif.5D_and_.5Belse.5D|animation]]),&lt;br /&gt;
[[TerrainGraphicsWML|image]],&lt;br /&gt;
[[HelpWML|img]],&lt;br /&gt;
[[ThemeWML|income]],&lt;br /&gt;
[[ReplayWML|init_side]],&lt;br /&gt;
[[InternalActionsWML#.5Binsert_tag.5D|insert_tag]],&lt;br /&gt;
[[InterfaceActionsWML#.5Binspect.5D|inspect]],&lt;br /&gt;
[[HelpWML|italic]],&lt;br /&gt;
[[InterfaceActionsWML#.5Bitem.5D|item]];&lt;br /&gt;
|-&lt;br /&gt;
|''J:''&lt;br /&gt;
[[HelpWML|jump]],&lt;br /&gt;
[[InternalActionsWML|join]];&lt;br /&gt;
|-&lt;br /&gt;
|''K:'' &lt;br /&gt;
[[DirectActionsWML#.5Bkill.5D|kill]],&lt;br /&gt;
[[StatisticalScenarioWML|killed]];&lt;br /&gt;
|-&lt;br /&gt;
|''L:'' &lt;br /&gt;
label&amp;amp;nbsp;([[InterfaceActionsWML#.5Blabel.5D|map]], [[ThemeWML|theme]]),&lt;br /&gt;
[[LanguageWML|language]],&lt;br /&gt;
[[AiWML|leader_goal]],&lt;br /&gt;
[[LocaleWML|locale]],&lt;br /&gt;
[[LuaWML|lua]];&lt;br /&gt;
|-&lt;br /&gt;
|''M:'' &lt;br /&gt;
[[ThemeWML|main_map]],&lt;br /&gt;
[[ThemeWML|menu]],&lt;br /&gt;
[[InterfaceActionsWML#.5Bmessage.5D|message]],&lt;br /&gt;
[[ThemeWML|mini_map]],&lt;br /&gt;
[[AnimationWML|missile_frame]],&lt;br /&gt;
[[SingleUnitWML|modifications]],&lt;br /&gt;
[[DirectActionsWML#.5Bmodify_ai.5D|modify_ai]],&lt;br /&gt;
[[DirectActionsWML#.5Bmodify_side.5D|modify_side]],&lt;br /&gt;
[[DirectActionsWML#.5Bmodify_turns.5D|modify_turns]],&lt;br /&gt;
[[DirectActionsWML#.5Bmodify_unit.5D|modify_unit]],&lt;br /&gt;
[[ReplayWML|move]],&lt;br /&gt;
[[DirectActionsWML#.5Bmove_unit.5D|move_unit]],&lt;br /&gt;
[[InterfaceActionsWML#.5Bmove_unit_fake.5D|move_unit_fake]],&lt;br /&gt;
[[InterfaceActionsWML#.5Bmove_units_fake.5D|move_units_fake]],&lt;br /&gt;
[[UnitTypeWML|movement costs]],&lt;br /&gt;
[[UnitsWML|movetype]],&lt;br /&gt;
[[ScenarioWML|multiplayer]],&lt;br /&gt;
[[EraWML|multiplayer_side]],&lt;br /&gt;
[[MusicListWML#.5Bmusic.5D|music]];&lt;br /&gt;
|-&lt;br /&gt;
|''N:'' &lt;br /&gt;
not ([[ConditionalActionsWML#Meta_Condition_Tags|condition]],&lt;br /&gt;
[[FilterWML|filter]]),&lt;br /&gt;
[[ThemeWML|num_units]];&lt;br /&gt;
|-&lt;br /&gt;
|''O:'' &lt;br /&gt;
[[DirectActionsWML#.5Bobject.5D|object]],&lt;br /&gt;
[[InterfaceActionsWML#.5Bobjectives.5D|objectives]],&lt;br /&gt;
[[InterfaceActionsWML#.5Bobjectives.5D|objective]],&lt;br /&gt;
[[ThemeWML|observers]],&lt;br /&gt;
[[InterfaceActionsWML#.5Bopen_help.5D|open_help]],&lt;br /&gt;
[[InterfaceActionsWML|option]],&lt;br /&gt;
[[ConditionalActionsWML#Meta_Condition_Tags|or]];&lt;br /&gt;
|-&lt;br /&gt;
|''P:'' &lt;br /&gt;
[[ThemeWML|panel]], [[IntroWML|part]], [[DirectActionsWML#.5Bpetrify.5D|petrify]], [[DirectActionsWML#.5Bplace_shroud.5D|place_shroud]], [[ThemeWML|position]],&lt;br /&gt;
[[InterfaceActionsWML#.5Bprint.5D|print]], [[AiWML|protect_location]], [[AiWML|protect_unit]];&lt;br /&gt;
|-&lt;br /&gt;
|''R:'' &lt;br /&gt;
[[UnitsWML|race]], [[ReplayWML|random]], recall&amp;amp;nbsp;([[DirectActionsWML#.5Brecall.5D|action]], &lt;br /&gt;
[[ReplayWML|replay]]), [[StatisticalScenarioWML|recalls]],&lt;br /&gt;
[[ReplayWML|recruit]], [[StatisticalScenarioWML|recruits]], [[InterfaceActionsWML#.5Bredraw.5D|redraw]],&lt;br /&gt;
[[HelpWML|ref]], [[DirectActionsWML|remove_shroud]], [[InterfaceActionsWML#.5Bremove_unit_overlay.5D|remove_unit_overlay]],&lt;br /&gt;
[[InterfaceActionsWML#.5Bremoveitem.5D|removeitem]], [[InterfaceActionsWML#.5Bremove_sound_source.5D|remove_sound_source]], &lt;br /&gt;
[[DirectActionsWML#.5Breplace_map.5D|replace_map]], [[DirectActionsWML#.5Breplace_schedule.5D|replace_schedule]], [[SavefileWML|replay]], [[SavefileWML|replay_start]],&lt;br /&gt;
[[UnitTypeWML|resistance]], [[ThemeWML|resolution]], [[ReplayWML|results]], [[InternalActionsWML|role]];&lt;br /&gt;
|-&lt;br /&gt;
|''S:'' &lt;br /&gt;
[[SavefileWML|save]], [[ScenarioWML|scenario]],&lt;br /&gt;
[[InterfaceActionsWML#.5Bscroll.5D|scroll]], [[InterfaceActionsWML#.5Bscroll_to.5D|scroll_to]],&lt;br /&gt;
[[InterfaceActionsWML#.5Bscroll_to_unit.5D|scroll_to_unit]], [[AnimationWML|secondary_attack_filter]], [[AnimationWML|secondary_unit_filter]], [[HelpWML|section]], [[InterfaceActionsWML#.5Bselect_unit.5D|select_unit]], [[PersistenceWML|set_global_variable]],&lt;br /&gt;
[[InterfaceActionsWML#.5Bset_menu_item.5D|set_menu_item]], [[DirectActionsWML#.5Bset_recruit.5D|set_recruit]],&lt;br /&gt;
[[DirectActionsWML#.5Bset_extra_recruit.5D|set_extra_recruit]],&lt;br /&gt;
[[InternalActionsWML|set_variable]], [[InternalActionsWML|set_variables]], [[InterfaceActionsWML#.5Bshow_objectives.5D|show_objectives]],&lt;br /&gt;
[[SideWML|side]], [[ThemeWML|side_playing]], [[SavefileWML|snapshot]],&lt;br /&gt;
[[InterfaceActionsWML#.5Bsound.5D|sound]], [[InterfaceActionsWML#.5Bsound_source.5D|sound_source]], [[ReplayWML|source]],&lt;br /&gt;
[[InternalActionsWML|split]],&lt;br /&gt;
[[StatisticalScenarioWML#The_.5Bstatistics.5D_tag|statistics]],&lt;br /&gt;
status([[SingleUnitWML|single unit]], [[ThemeWML|theme]]), [[InternalActionsWML#.5Bstore_gold.5D|store_gold]], &lt;br /&gt;
[[InternalActionsWML#.5Bstore_items.5D|store_items]], &lt;br /&gt;
[[InternalActionsWML#.5Bstore_locations.5D|store_locations]],&lt;br /&gt;
[[InternalActionsWML#.5Bstore_map_dimensions.5D|store_map_dimensions]],&lt;br /&gt;
[[InternalActionsWML#.5Bstore_reachable_locations.5D|store_reachable_locations]],&lt;br /&gt;
[[InternalActionsWML#.5Bstore_side.5D|store_side]], [[InternalActionsWML#.5Bstore_starting_location.5D|store_starting_location]], [[InternalActionsWML#.5Bstore_time_of_day.5D|store_time_of_day]], [[InternalActionsWML#.5Bstore_unit.5D|store_unit]], [[InternalActionsWML#.5Bstore_unit_type.5D|store_unit_type]], &lt;br /&gt;
[[InternalActionsWML#.5Bstore_unit_type_ids.5D|store_unit_type_ids]], &lt;br /&gt;
[[InternalActionsWML#.5Bstore_villages.5D|store_villages]],[[IntroWML|story]],&lt;br /&gt;
[[ConditionalActionsWML#.5Bswitch.5D|switch]];&lt;br /&gt;
|-&lt;br /&gt;
|''T:'' &lt;br /&gt;
[[AiWML|target]],&lt;br /&gt;
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|team]],&lt;br /&gt;
teleport ([[DirectActionsWML#.5Bteleport.5D|action]], [[AbilitiesWML|ability]]), [[AnimationWML|teleport_anim]],&lt;br /&gt;
[[DirectActionsWML#.5Bterrain.5D|terrain]], [[TerrainGraphicsWML|terrain_graphics]], [[TerrainMaskWML|terrain_mask]], [[TerrainWML|terrain_type]], [[ScenarioWML#Test_scenario|test]],&lt;br /&gt;
[[WesCamp#The_textdomain_declaration|textdomain]], [[InterfaceActionsWML|text_input]], [[ThemeWML|theme]], [[ConditionalActionsWML#.5Bif.5D|then]],&lt;br /&gt;
[[TerrainGraphicsWML|tile]], [[TimeWML|time]], time_area&amp;amp;nbsp;([[DirectActionsWML#.5Btime_area.5D|action]], [[ScenarioWML|scenario]]), &lt;br /&gt;
[[ThemeWML|time_of_day]],&lt;br /&gt;
[[HelpWML|topic]], [[HelpWML|toplevel]], [[SingleUnitWML|trait]], [[DirectActionsWML#.5Btransform_unit.5D|transform_unit]], [[DirectActionsWML#.5Btunnel.5D|tunnel]], [[ThemeWML|turn]], [[ScenarioWML|tutorial]];&lt;br /&gt;
|-&lt;br /&gt;
|''U:'' &lt;br /&gt;
[[InterfaceActionsWML#.5Bunhide_unit.5D|unhide_unit]], [[SingleUnitWML|unit]],&lt;br /&gt;
[[ThemeWML|unit_abilities]], [[ThemeWML|unit_alignment]], [[ThemeWML|unit_description]], [[AnimationWML|unit_filter]], [[ThemeWML|unit_hp]], [[ThemeWML|unit_image]], [[ThemeWML|unit_level]], [[ThemeWML|unit_moves]],&lt;br /&gt;
[[InterfaceActionsWML#.5Bunit_overlay.5D|unit_overlay]], [[ThemeWML|unit_profile]], [[ThemeWML|unit_status]],&lt;br /&gt;
[[ThemeWML|unit_traits]], [[UnitTypeWML|unit_type]], [[ThemeWML|unit_weapons]], [[ThemeWML|unit_xp]],&lt;br /&gt;
[[UnitsWML|units]], [[DirectActionsWML#.5Bunpetrify.5D|unpetrify]], [[DirectActionsWML#.5Bunstore_unit.5D|unstore_unit]], [[ThemeWML|upkeep]];&lt;br /&gt;
|-&lt;br /&gt;
| ''V:'' &lt;br /&gt;
[[ConditionalActionsWML#Condition_Tags|variable]],&lt;br /&gt;
[[VariablesWML|variables]],&lt;br /&gt;
[[SideWML|village]],&lt;br /&gt;
[[ThemeWML|villages]],&lt;br /&gt;
[[InterfaceActionsWML#.5Bvolume.5D|volume]];&lt;br /&gt;
|-&lt;br /&gt;
| ''W:'' &lt;br /&gt;
[[ConditionalActionsWML#.5Bwhile.5D|while]],&lt;br /&gt;
[[InterfaceActionsWML#.5Bwml_message.5D|wml_message]];&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;[[Category:WML Reference]]&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;A box with all the WML tags, each one linking to the page and section they are described in. This box should be included in each of the WML reference pages.&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=StandardLocationFilter&amp;diff=45252</id>
		<title>StandardLocationFilter</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=StandardLocationFilter&amp;diff=45252"/>
		<updated>2012-02-14T22:23:32Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
&lt;br /&gt;
From [[FilterWML]], this is the standard way of filtering on locations.&lt;br /&gt;
The term [[StandardLocationFilter]] means that the set of such keys and tags (see below) can appear at that point. Sometimes a [[StandardLocationFilter]] needs to be included in a [filter_location] tag. There are however many tags which accept the [[StandardLocationFilter]] directly as an argument such as [store_locations]. Generally, if the tag [filter_location] is not mentioned to be a possible subtag of the outer tag in question, then don't put it.&lt;br /&gt;
&lt;br /&gt;
The following attributes and sub-tags are permitted:&lt;br /&gt;
&lt;br /&gt;
* '''time_of_day''': filter matches only on a given time of day (one of lawful, chaotic, neutral or liminal). Note: ''chaotic'', ''lawful'', ''neutral'' and ''liminal''; these are not times of day, these are ''alignments''. To match against 'dawn', 'dusk', 'first watch' etc., use the '''time_of_day_id''' key described below.&lt;br /&gt;
* '''time_of_day_id''': this accepts a list of one or more actual times of day, separated by commas. These IDs are taken from '''data/core/macros/schedules.cfg'''. Permissible values are case-sensitive: dawn, morning, afternoon, dusk, first_watch, second_watch, indoors, underground and deep_underground. &lt;br /&gt;
* '''terrain''': comma separated list of terrains. (See also: [http://www.wesnoth.org/wiki/FilterWML#Filtering_Terrains Filtering Terrains]).&lt;br /&gt;
* '''x,y''': the same as in the unit filter; supports any range ([http://www.wesnoth.org/wiki/StandardLocationFilter#Notes_about_Coordinate_Usage notes])&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument; if present a unit must also be there&lt;br /&gt;
* '''owner_side''': If a valid side number, restricts stored locations to villages belonging to this side. If 0, restricts to all unowned locations (the whole map except villages which belong to some valid side). A hex is considered a village if and only if its [ [[TerrainWML|terrain_type]] ]gives_income= parameter was set to yes (which means a side can own that hex).&lt;br /&gt;
*'''[filter_side]''': {{DevFeature1.11}}: If present, inline owner_side= is ignored. Restricts stored locations to villages, each of which must belong to any of the matching sides. If no sides match, restricts to unowned villages (and only these).&lt;br /&gt;
**'''[[StandardSideFilter]]''' tags and keys as arguments&lt;br /&gt;
* '''find_in''': name of an array or container variable; if present, the location will not match unless it is also found stored in the variable&lt;br /&gt;
* '''radius''': matches if any location within the radius matches this filter ([http://www.wesnoth.org/wiki/StandardLocationFilter#Notes_about_Radius_Usage notes])&lt;br /&gt;
* '''[filter_radius]''': a standard location filter; normally the radius extends outwards from matching locations one step at a time without checking any additional information-- however, if this tag is present, the radius will be restricted so that it can only expand outwards in the directions where it passes the given location filter&lt;br /&gt;
* '''[and]''': an extra location filter. Unless a location matches the [and] filter, then it will be excluded. ''Note: [and],[or],and [not] extra location filters are considered after everything else in the containing filter (except radius, which is considered last in 1.3.8 and greater); they are then processed in the order encountered.''&lt;br /&gt;
* '''[or]''': an extra location filter. If a location matches the [or] filter, then it will count as a match regardless of conditions in previous filters or the containing filter.&lt;br /&gt;
* '''[not]''': an extra location filter. If a location matches the [not] filter, then that location will be excluded.&lt;br /&gt;
* '''[filter_adjacent_location]''': a standard location filter; if present the correct number of adjacent locations must match this filter&lt;br /&gt;
** '''count''': a number, range, or comma separated range; default &amp;quot;1-6&amp;quot;&lt;br /&gt;
** '''adjacent''': a comma separated list of directions; default &amp;quot;n,ne,se,s,sw,nw&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Notes about Coordinate Usage==&lt;br /&gt;
When specifying coordinates, the following keys are used:&lt;br /&gt;
* '''x''': the first coordinate&lt;br /&gt;
* '''y''': the second coordinate&lt;br /&gt;
&lt;br /&gt;
While some locations should only be one hex (like the starting position of a unit),&lt;br /&gt;
others filter over multiple hexes.&lt;br /&gt;
The following syntax is used to filter over multiple hexes:&lt;br /&gt;
&lt;br /&gt;
Dashes('''-''') are used to have the location be a range of hexes.&lt;br /&gt;
There must be values before and after the dash;&lt;br /&gt;
everything in between these numbers (inclusively) is part of the range.&lt;br /&gt;
&lt;br /&gt;
Commas(''',''') are used to separate coordinates into a list.&lt;br /&gt;
The '''x''' and '''y''' lists are then paired up, with each pair representing one hex or range.&lt;br /&gt;
&lt;br /&gt;
Note: although the ordering of locations in a list generally does not matter,&lt;br /&gt;
the action '''[move_unit_fake]''' takes in a list of hexes,&lt;br /&gt;
and moves an image onto each of those hexes in order.&lt;br /&gt;
&lt;br /&gt;
==Notes about Radius Usage==&lt;br /&gt;
:If you aren't storing any locations successfully, it may be because you put the radius or filters in the wrong place for them to combine correctly.&lt;br /&gt;
  [have_location]&lt;br /&gt;
  terrain=Gg^Vh&lt;br /&gt;
  [and]&lt;br /&gt;
    x=$x1&lt;br /&gt;
    y=$y1&lt;br /&gt;
    radius=1&lt;br /&gt;
  [/and]&lt;br /&gt;
  [/have_location]&lt;br /&gt;
Note that the use of [and] here causes the radius to have a very different meaning. Normally, all of the criteria besides radius are checked, producing a set of hexes to which the radius is applied. This means, for example, that if you're trying to find &amp;quot;a hex without a unit on it within 5 hexes of (15, 23)&amp;quot;, the code:&lt;br /&gt;
  [have_location]&lt;br /&gt;
  x,y=15,23&lt;br /&gt;
  radius=5&lt;br /&gt;
  [not]&lt;br /&gt;
    [filter]&lt;br /&gt;
    [/filter]&lt;br /&gt;
  [/not]&lt;br /&gt;
  [have_location]&lt;br /&gt;
will not work! First, it looks for a hex with x=15, y=23 without a unit on it. Then, it returns that hex and all hexes within 5 of it. If (15, 23) happens to be occupied, then it will return no hexes, because &amp;quot;all hexes within 5 hexes of (no hexes)&amp;quot; is still &amp;quot;no hexes&amp;quot;. Instead, put an [and] around the x,y and radius requirements, and it will separately find &amp;quot;(15, 23) and all hexes within 5 of it&amp;quot; and &amp;quot;each of those hexes that doesn't have a unit on it&amp;quot;, producing the desired result.&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=StandardLocationFilter&amp;diff=45251</id>
		<title>StandardLocationFilter</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=StandardLocationFilter&amp;diff=45251"/>
		<updated>2012-02-14T22:20:24Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
&lt;br /&gt;
From [[FilterWML]], this is the standard way of filtering on locations.&lt;br /&gt;
The term [[StandardLocationFilter]] means that the set of such keys and tags (see below) can appear at that point. Sometimes a [[StandardLocationFilter]] needs to be included in a [filter_location] tag. There are however many tags which accept the [[StandardLocationFilter]] directly as an argument such as [store_locations]. Generally, if the tag [filter_location] is not mentioned to be a possible subtag of the outer tag in question, then don't put it.&lt;br /&gt;
&lt;br /&gt;
The following attributes and sub-tags are permitted:&lt;br /&gt;
&lt;br /&gt;
* '''time_of_day''': filter matches only on a given time of day (one of lawful, chaotic, neutral or liminal). Note: ''chaotic'', ''lawful'', ''neutral'' and ''liminal''; these are not times of day, these are ''alignments''. To match against 'dawn', 'dusk', 'first watch' etc., use the '''time_of_day_id''' key described below.&lt;br /&gt;
* '''time_of_day_id''': this accepts a list of one or more actual times of day, separated by commas. These IDs are taken from '''data/core/macros/schedules.cfg'''. Permissible values are case-sensitive: dawn, morning, afternoon, dusk, first_watch, second_watch, indoors, underground and deep_underground. &lt;br /&gt;
* '''terrain''': comma separated list of terrains. (See also: [http://www.wesnoth.org/wiki/FilterWML#Filtering_Terrains Filtering Terrains]).&lt;br /&gt;
* '''x,y''': the same as in the unit filter; supports any range ([http://www.wesnoth.org/wiki/StandardLocationFilter#Notes_about_Coordinate_Usage notes])&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument; if present a unit must also be there&lt;br /&gt;
* '''owner_side''': If a valid side number, restricts stored locations to villages belonging to this side. If 0, restricts to all unowned locations (the whole map except villages which belong to some valid side). A hex is considered a village if its [ [[TerrainWML|terrain_type]] ]gives_income= parameter was set to yes.&lt;br /&gt;
*'''[filter_side]''': {{DevFeature1.11}}: If present, inline owner_side= is ignored. Restricts stored locations to villages, each of which must belong to any of the matching sides. If no sides match, restricts to unowned villages (and only these).&lt;br /&gt;
**'''[[StandardSideFilter]]''' tags and keys as arguments&lt;br /&gt;
* '''find_in''': name of an array or container variable; if present, the location will not match unless it is also found stored in the variable&lt;br /&gt;
* '''radius''': matches if any location within the radius matches this filter ([http://www.wesnoth.org/wiki/StandardLocationFilter#Notes_about_Radius_Usage notes])&lt;br /&gt;
* '''[filter_radius]''': a standard location filter; normally the radius extends outwards from matching locations one step at a time without checking any additional information-- however, if this tag is present, the radius will be restricted so that it can only expand outwards in the directions where it passes the given location filter&lt;br /&gt;
* '''[and]''': an extra location filter. Unless a location matches the [and] filter, then it will be excluded. ''Note: [and],[or],and [not] extra location filters are considered after everything else in the containing filter (except radius, which is considered last in 1.3.8 and greater); they are then processed in the order encountered.''&lt;br /&gt;
* '''[or]''': an extra location filter. If a location matches the [or] filter, then it will count as a match regardless of conditions in previous filters or the containing filter.&lt;br /&gt;
* '''[not]''': an extra location filter. If a location matches the [not] filter, then that location will be excluded.&lt;br /&gt;
* '''[filter_adjacent_location]''': a standard location filter; if present the correct number of adjacent locations must match this filter&lt;br /&gt;
** '''count''': a number, range, or comma separated range; default &amp;quot;1-6&amp;quot;&lt;br /&gt;
** '''adjacent''': a comma separated list of directions; default &amp;quot;n,ne,se,s,sw,nw&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Notes about Coordinate Usage==&lt;br /&gt;
When specifying coordinates, the following keys are used:&lt;br /&gt;
* '''x''': the first coordinate&lt;br /&gt;
* '''y''': the second coordinate&lt;br /&gt;
&lt;br /&gt;
While some locations should only be one hex (like the starting position of a unit),&lt;br /&gt;
others filter over multiple hexes.&lt;br /&gt;
The following syntax is used to filter over multiple hexes:&lt;br /&gt;
&lt;br /&gt;
Dashes('''-''') are used to have the location be a range of hexes.&lt;br /&gt;
There must be values before and after the dash;&lt;br /&gt;
everything in between these numbers (inclusively) is part of the range.&lt;br /&gt;
&lt;br /&gt;
Commas(''',''') are used to separate coordinates into a list.&lt;br /&gt;
The '''x''' and '''y''' lists are then paired up, with each pair representing one hex or range.&lt;br /&gt;
&lt;br /&gt;
Note: although the ordering of locations in a list generally does not matter,&lt;br /&gt;
the action '''[move_unit_fake]''' takes in a list of hexes,&lt;br /&gt;
and moves an image onto each of those hexes in order.&lt;br /&gt;
&lt;br /&gt;
==Notes about Radius Usage==&lt;br /&gt;
:If you aren't storing any locations successfully, it may be because you put the radius or filters in the wrong place for them to combine correctly.&lt;br /&gt;
  [have_location]&lt;br /&gt;
  terrain=Gg^Vh&lt;br /&gt;
  [and]&lt;br /&gt;
    x=$x1&lt;br /&gt;
    y=$y1&lt;br /&gt;
    radius=1&lt;br /&gt;
  [/and]&lt;br /&gt;
  [/have_location]&lt;br /&gt;
Note that the use of [and] here causes the radius to have a very different meaning. Normally, all of the criteria besides radius are checked, producing a set of hexes to which the radius is applied. This means, for example, that if you're trying to find &amp;quot;a hex without a unit on it within 5 hexes of (15, 23)&amp;quot;, the code:&lt;br /&gt;
  [have_location]&lt;br /&gt;
  x,y=15,23&lt;br /&gt;
  radius=5&lt;br /&gt;
  [not]&lt;br /&gt;
    [filter]&lt;br /&gt;
    [/filter]&lt;br /&gt;
  [/not]&lt;br /&gt;
  [have_location]&lt;br /&gt;
will not work! First, it looks for a hex with x=15, y=23 without a unit on it. Then, it returns that hex and all hexes within 5 of it. If (15, 23) happens to be occupied, then it will return no hexes, because &amp;quot;all hexes within 5 hexes of (no hexes)&amp;quot; is still &amp;quot;no hexes&amp;quot;. Instead, put an [and] around the x,y and radius requirements, and it will separately find &amp;quot;(15, 23) and all hexes within 5 of it&amp;quot; and &amp;quot;each of those hexes that doesn't have a unit on it&amp;quot;, producing the desired result.&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=StandardLocationFilter&amp;diff=45250</id>
		<title>StandardLocationFilter</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=StandardLocationFilter&amp;diff=45250"/>
		<updated>2012-02-14T22:03:31Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
&lt;br /&gt;
From [[FilterWML]], this is the standard way of filtering on locations.&lt;br /&gt;
The term [[StandardLocationFilter]] means that the set of such keys and tags (see below) can appear at that point. Sometimes a [[StandardLocationFilter]] needs to be included in a [filter_location] tag. There are however many tags which accept the [[StandardLocationFilter]] directly as an argument such as [store_locations]. Generally, if the tag [filter_location] is not mentioned to be a possible subtag of the outer tag in question, then don't put it.&lt;br /&gt;
&lt;br /&gt;
The following attributes and sub-tags are permitted:&lt;br /&gt;
&lt;br /&gt;
* '''time_of_day''': filter matches only on a given time of day (one of lawful, chaotic, neutral or liminal). Note: ''chaotic'', ''lawful'', ''neutral'' and ''liminal''; these are not times of day, these are ''alignments''. To match against 'dawn', 'dusk', 'first watch' etc., use the '''time_of_day_id''' key described below.&lt;br /&gt;
* '''time_of_day_id''': this accepts a list of one or more actual times of day, separated by commas. These IDs are taken from '''data/core/macros/schedules.cfg'''. Permissible values are case-sensitive: dawn, morning, afternoon, dusk, first_watch, second_watch, indoors, underground and deep_underground. &lt;br /&gt;
* '''terrain''': comma separated list of terrains. (See also: [http://www.wesnoth.org/wiki/FilterWML#Filtering_Terrains Filtering Terrains]).&lt;br /&gt;
* '''x,y''': the same as in the unit filter; supports any range ([http://www.wesnoth.org/wiki/StandardLocationFilter#Notes_about_Coordinate_Usage notes])&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument; if present a unit must also be there&lt;br /&gt;
* '''owner_side''': If a valid side number, restricts stored locations to villages belonging to this side. If 0, restricts to all unowned locations (the whole map except villages which belong to some side).&lt;br /&gt;
*'''[filter_side]''': {{DevFeature1.11}}: If present, inline owner_side= is ignored. Restricts stored locations to villages, each of which must belong to any of the matching sides. If no sides match, restricts to unowned villages (and only these).&lt;br /&gt;
**'''[[StandardSideFilter]]''' tags and keys as arguments&lt;br /&gt;
* '''find_in''': name of an array or container variable; if present, the location will not match unless it is also found stored in the variable&lt;br /&gt;
* '''radius''': matches if any location within the radius matches this filter ([http://www.wesnoth.org/wiki/StandardLocationFilter#Notes_about_Radius_Usage notes])&lt;br /&gt;
* '''[filter_radius]''': a standard location filter; normally the radius extends outwards from matching locations one step at a time without checking any additional information-- however, if this tag is present, the radius will be restricted so that it can only expand outwards in the directions where it passes the given location filter&lt;br /&gt;
* '''[and]''': an extra location filter. Unless a location matches the [and] filter, then it will be excluded. ''Note: [and],[or],and [not] extra location filters are considered after everything else in the containing filter (except radius, which is considered last in 1.3.8 and greater); they are then processed in the order encountered.''&lt;br /&gt;
* '''[or]''': an extra location filter. If a location matches the [or] filter, then it will count as a match regardless of conditions in previous filters or the containing filter.&lt;br /&gt;
* '''[not]''': an extra location filter. If a location matches the [not] filter, then that location will be excluded.&lt;br /&gt;
* '''[filter_adjacent_location]''': a standard location filter; if present the correct number of adjacent locations must match this filter&lt;br /&gt;
** '''count''': a number, range, or comma separated range; default &amp;quot;1-6&amp;quot;&lt;br /&gt;
** '''adjacent''': a comma separated list of directions; default &amp;quot;n,ne,se,s,sw,nw&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Notes about Coordinate Usage==&lt;br /&gt;
When specifying coordinates, the following keys are used:&lt;br /&gt;
* '''x''': the first coordinate&lt;br /&gt;
* '''y''': the second coordinate&lt;br /&gt;
&lt;br /&gt;
While some locations should only be one hex (like the starting position of a unit),&lt;br /&gt;
others filter over multiple hexes.&lt;br /&gt;
The following syntax is used to filter over multiple hexes:&lt;br /&gt;
&lt;br /&gt;
Dashes('''-''') are used to have the location be a range of hexes.&lt;br /&gt;
There must be values before and after the dash;&lt;br /&gt;
everything in between these numbers (inclusively) is part of the range.&lt;br /&gt;
&lt;br /&gt;
Commas(''',''') are used to separate coordinates into a list.&lt;br /&gt;
The '''x''' and '''y''' lists are then paired up, with each pair representing one hex or range.&lt;br /&gt;
&lt;br /&gt;
Note: although the ordering of locations in a list generally does not matter,&lt;br /&gt;
the action '''[move_unit_fake]''' takes in a list of hexes,&lt;br /&gt;
and moves an image onto each of those hexes in order.&lt;br /&gt;
&lt;br /&gt;
==Notes about Radius Usage==&lt;br /&gt;
:If you aren't storing any locations successfully, it may be because you put the radius or filters in the wrong place for them to combine correctly.&lt;br /&gt;
  [have_location]&lt;br /&gt;
  terrain=Gg^Vh&lt;br /&gt;
  [and]&lt;br /&gt;
    x=$x1&lt;br /&gt;
    y=$y1&lt;br /&gt;
    radius=1&lt;br /&gt;
  [/and]&lt;br /&gt;
  [/have_location]&lt;br /&gt;
Note that the use of [and] here causes the radius to have a very different meaning. Normally, all of the criteria besides radius are checked, producing a set of hexes to which the radius is applied. This means, for example, that if you're trying to find &amp;quot;a hex without a unit on it within 5 hexes of (15, 23)&amp;quot;, the code:&lt;br /&gt;
  [have_location]&lt;br /&gt;
  x,y=15,23&lt;br /&gt;
  radius=5&lt;br /&gt;
  [not]&lt;br /&gt;
    [filter]&lt;br /&gt;
    [/filter]&lt;br /&gt;
  [/not]&lt;br /&gt;
  [have_location]&lt;br /&gt;
will not work! First, it looks for a hex with x=15, y=23 without a unit on it. Then, it returns that hex and all hexes within 5 of it. If (15, 23) happens to be occupied, then it will return no hexes, because &amp;quot;all hexes within 5 hexes of (no hexes)&amp;quot; is still &amp;quot;no hexes&amp;quot;. Instead, put an [and] around the x,y and radius requirements, and it will separately find &amp;quot;(15, 23) and all hexes within 5 of it&amp;quot; and &amp;quot;each of those hexes that doesn't have a unit on it&amp;quot;, producing the desired result.&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=45249</id>
		<title>DirectActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=45249"/>
		<updated>2012-02-14T21:49:34Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* [modify_ai] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== Direct actions ==&lt;br /&gt;
&lt;br /&gt;
Direct actions are actions that have a direct effect on gameplay. They can be used inside of [[EventWML|events]].&lt;br /&gt;
&lt;br /&gt;
The following tags are actions:&lt;br /&gt;
&lt;br /&gt;
=== [endlevel] ===&lt;br /&gt;
Ends the scenario.&lt;br /&gt;
* '''result''': before the scenario is over, all events with ''name=result'' are triggered. If ''result=victory'', the player progresses to the next level; if ''result=defeat'', the game returns to the main menu. &lt;br /&gt;
&lt;br /&gt;
When the result is &amp;quot;victory&amp;quot; the following keys can be used:&lt;br /&gt;
* '''bonus''': whether the player should get bonus gold (maximum possible gold that could have been earned by waiting the level out). The default is bonus=yes.&lt;br /&gt;
* '''carryover_report''': whether the player should receive a summary of the scenario outcome, the default is carryover_report=yes.&lt;br /&gt;
* '''save''': whether a start-of-scenario save should be created for the next scenario, the default is save=yes. Do not confuse this with saving of replays for the current scenario.&lt;br /&gt;
* '''replay_save''': whether a replay save for the current scenario is allowed, the default is replay_save=yes. If yes, the player's settings in preferences will be used to determine if a replay is saved. If no, will override and not save a replay.&lt;br /&gt;
* '''linger_mode''': If ...=yes, the screen is greyed out and there's the possibility to save before advancing to the next scenario, the default is linger_mode=yes.&lt;br /&gt;
* '''reveal_map''': (Multiplayer only) (Default is 'yes') If 'no', shroud doesn't disappear when game ended.&lt;br /&gt;
* '''next_scenario''': (default specified in '''[scenario]''' tag) the ID of the next scenario that should be played.  All units that side 1 controls at this point become available for recall in ''next_scenario''.&lt;br /&gt;
* '''carryover_percentage''': by default 80% of the gold is carried over to the next scenario, with this key the amount can be changed.&lt;br /&gt;
* '''carryover_add''': if true the gold will be added to the starting gold the next scenario, if false the next scenario will start with the amount of the current scenario (after taxes) or the minimum in the next scenario. Default is false.&lt;br /&gt;
* '''music''': (default specified in '''[scenario]''' or '''[game_config]''' tags) a comma-separated list of music tracks from which one will be chosen and played once after any events related to the end of level result are executed; by default, victory_music is used on victory, and defeat_music on defeat.&lt;br /&gt;
* '''end_credits''': {{DevFeature1.11}} Whether to display the credits screen at the end of a single-player campaign. Defaults to ''yes''. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
* '''end_text''': (translatable) Text that is shown centered in a black screen at the end of a campaign. Defaults to &amp;quot;The End&amp;quot;. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
* '''end_text_duration''': Delay, in milliseconds, before displaying the game credits at the end of a campaign. In other words, for how much time '''end_text''' is displayed on screen. Defaults to 3500. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
&lt;br /&gt;
=== [unit] ===&lt;br /&gt;
Places a unit on the map.  For syntax see [[SingleUnitWML]].&lt;br /&gt;
* {{Short Note:Predefined Macro|GENERIC_UNIT}}&lt;br /&gt;
* '''to_variable''':  spawn directly into a variable instead of on the map.&lt;br /&gt;
&lt;br /&gt;
=== [recall] ===&lt;br /&gt;
Recalls a unit.  The unit is recalled free of charge, and is placed near the leader.&lt;br /&gt;
* [[StandardUnitFilter]]: the first matching unit will be recalled.  If no units match this tag is ignored. Do not use a [filter] tag. If a comma separated list is given, every unit currently considered for recall is checked against all the types (not each single one of the types against all units).&lt;br /&gt;
* '''x,y''': the unit is placed here instead of next to the leader.&lt;br /&gt;
* '''show''': yes/no, default yes: whether the unit is animated (faded in) or instantly displayed&lt;br /&gt;
* '''fire_event''': boolean yes|no (default no); whether any according prerecall or recall events shall be fired.&lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): If yes, checks for terrain passability when placing the unit (a nearby passable hex is chosen).&lt;br /&gt;
&lt;br /&gt;
=== [teleport] ===&lt;br /&gt;
Teleports a unit on map. {{Short Note:Predefined Macro|TELEPORT_UNIT}}&lt;br /&gt;
* '''[filter]''': [[StandardUnitFilter]] the first unit matching this filter will be teleported.&lt;br /&gt;
* '''x,y''': the position to teleport to.&lt;br /&gt;
* '''clear_shroud''': should shroud be cleared on arrival&lt;br /&gt;
* '''animate''': should a teleport animation be played (if the unit doesn't have a teleport animation, it will fade out/fade in)&lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): normally, units will not be teleported into terrain that is impassable for them. Setting this attribute to &amp;quot;no&amp;quot; permits it.&lt;br /&gt;
&lt;br /&gt;
(Note: There is also a ability named teleport, see [[AbilitiesWML]].)&lt;br /&gt;
&lt;br /&gt;
=== [terrain_mask] ===&lt;br /&gt;
Changes the terrain on the map.  See [[TerrainMaskWML]].&lt;br /&gt;
&lt;br /&gt;
=== [terrain] ===&lt;br /&gt;
Changes the terrain on the map.&lt;br /&gt;
* '''terrain''': the character of the terrain to use.  See [[TerrainCodesWML]] to see what letter a type of terrain uses.&lt;br /&gt;
* [[StandardLocationFilter]]. This [[StandardLocationFilter]]'s terrain= key is used for the new terrain, filtering by terrain can be done with a nested [[StandardLocationFilter]]: [and]terrain=terrain_string_to_be_filtered_for.&lt;br /&gt;
* '''layer''': (overlay|base|both, default=both) only change the specified layer.&lt;br /&gt;
* '''replace_if_failed''': (default=no) When replacing just one layer failed, try to replace the whole terrain. If '''terrain''' is an overlay only terrain, use the default_base as base layer. If the terrain has no default base, do nothing.&lt;br /&gt;
&lt;br /&gt;
=== [gold] ===&lt;br /&gt;
Gives sides gold.&lt;br /&gt;
* '''amount''': the amount of gold to give.&lt;br /&gt;
* '''side''': (default=1) the number of the side to give the gold to. Can be a comma-separated list of sides. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument {{DevFeature1.11}}: [gold][filter_side] is deprecated, use the new inline SSF.&lt;br /&gt;
&lt;br /&gt;
=== [unstore_unit] ===&lt;br /&gt;
Creates a unit from a game variable, and activates it on the playing field.  This must be a specific variable describing a unit, and may not be an array -- to unstore an entire array, iterate over it.  The variable is not cleared.  See also [[InternalActionsWML#.5Bstore_unit.5D|[store_unit]]], [[ConditionalActionsWML#.5Bwhile.5D|[while]]] and [[InternalActionsWML#.5Bclear_variable.5D|[clear_variable]]]. Note units with a negative amount of hitpoints will be unstored with 1 hitpoint.&lt;br /&gt;
* '''variable''': the name of the variable.&lt;br /&gt;
* '''find_vacant''': whether the unit should be placed on the nearest vacant tile to its specified location.  If this is set to 'no'(default), then any unit on the same tile as the unit being unstored will be destroyed. &lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): If yes, checks for terrain passability when placing the unit. This key has no effect if find_vacant=no (no check performed then). Before 1.9 this key is always &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''text''': (translatable) floating text to display above the unit, such as a damage amount&lt;br /&gt;
* '''red''', '''green''', '''blue''': (default=0,0,0) the color to display the text in. Values vary from 0-255. You may find it convenient to use the {COLOR_HARM} or {COLOR_HEAL} macro instead. (Use {COLOR_HARM} or {COLOR_HEAL} instead of the whole red,green,blue= line.)&lt;br /&gt;
* '''advance''': (default=true) if true the unit is advanced if it has enough XP. When modifying XP make sure to do it from inside a [[EventWML#Multiplayer_safety|synchronized event]] or it may lead to OOS errors especially when several advancement paths exist. Note that advance and post advance events are called, so infinite loops can happen.&lt;br /&gt;
* '''fire_event''': (boolean yes|no, default no) Whether any advance/post advance events shall be fired if an advancement takes place, no effect otherwise.&lt;br /&gt;
* '''x''' ,'''y''': override unit location, &amp;quot;x,y=recall,recall&amp;quot; will put the unit on the unit's side's recall list.&lt;br /&gt;
&lt;br /&gt;
=== [allow_recruit] ===&lt;br /&gt;
Allows a side to recruit units it couldn't previously recruit.&lt;br /&gt;
* '''type''': the types of units that the side can now recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that is being allowed to recruit the units. This can be a comma-separated list note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [allow_extra_recruit] ===&lt;br /&gt;
Allows a leader to recruit units it couldn't previously recruit.&lt;br /&gt;
These types add to the types the leader can recruit because of [side]recruit=.&lt;br /&gt;
* '''extra_recruit''': the types of units that the unit can now recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_recruit] ===&lt;br /&gt;
Prevents a side from recruiting units it could previously recruit.&lt;br /&gt;
* '''type''': the types of units that the side can no longer recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that may no longer recruit the units. This can be a comma-separated list note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_extra_recruit] ===&lt;br /&gt;
Prevents a leader from recruiting units it could previously recruit.&lt;br /&gt;
* '''extra_recruit''': the types of units that the side can no longer recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [set_recruit] ===&lt;br /&gt;
Sets the units a side can recruit.&lt;br /&gt;
* '''recruit''': the types of units that the side can now recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that is having its recruitment set. This can be a comma-separated list. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [set_extra_recruit] === &lt;br /&gt;
Sets the units a leader can recruit.&lt;br /&gt;
* '''extra_recruit''': the types of units that the leader can now recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [modify_side] ===&lt;br /&gt;
Modifies some details of a given side in the middle of a scenario.  '''The following listed properties are the only properties that [modify_side] can affect!'''&lt;br /&gt;
* '''side''': (default=1) the number of the side that is to be changed. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* '''income''': the income given at the begining of each turn.&lt;br /&gt;
* '''team_name''': the team in which the side plays the scenario.&lt;br /&gt;
* '''user_team_name''': a translatable string representing the team's description. This has no effect on alliances. Defaults to ''team_name''.&lt;br /&gt;
* '''gold''': the amount of gold the side owns.&lt;br /&gt;
* '''village_gold''': the income setting per village for the side.&lt;br /&gt;
* '''controller''': the identifier string of the side's controller. Uses the same syntax of the ''controller'' key in the [[SideWML|[side]]] tag.&lt;br /&gt;
* '''fog''': a boolean string (yes/no) describing the status of Fog for the side.&lt;br /&gt;
* '''shroud''': a boolean string describing the status of Shroud for the side.&lt;br /&gt;
* '''hidden''': a boolean string specifying whether side is shown in status table.&lt;br /&gt;
* '''color''': {{DevFeature1.11}} a team color range specification, name (e.g. &amp;quot;red&amp;quot;, &amp;quot;blue&amp;quot;), or number (e.g. &amp;quot;1&amp;quot;, &amp;quot;2&amp;quot;) for this side. The default color range names, numbers, and definitions can be found in data/core/team_colors.cfg.&lt;br /&gt;
* '''[ai]''': replaces a side's AI parameters with the new specified ones. Uses the same syntax described in [[AiWML]].&lt;br /&gt;
* '''switch_ai''': replaces a side ai with a new AI from specified file(ignoring those AI parameters above). Path to file follows the usual WML convention.&lt;br /&gt;
* '''share_maps''': change the share_maps side attribute. Be sure to use shroud=yes for that side and have it as an ally&lt;br /&gt;
* '''share_view''': change the share_view side attribute. Be sure to use fog=yes for that side and have it as an ally&lt;br /&gt;
&lt;br /&gt;
=== [modify_turns] ===&lt;br /&gt;
Modifies the turn limit in the middle of a scenario.&lt;br /&gt;
* '''value''': the new turn limit.&lt;br /&gt;
* '''add''': if used instead of ''value'', specifies the number of turns to add to the current limit (can be negative).&lt;br /&gt;
* '''current''': changes the current turn number after applying turn limit modifications, if any. It is not possible to change the turn number to exceed the turn limit (1 &amp;lt;= current turns &amp;lt;= max turns).&lt;br /&gt;
&lt;br /&gt;
=== [allow_end_turn] ===&lt;br /&gt;
Allows human players to end their turn through the user interface if they were previously affected by the '''[disallow_end_turn]''' action. This action doesn't take any arguments.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_end_turn] ===&lt;br /&gt;
Disallows human players to end their turn through the user interface. This action doesn't take any arguments.&lt;br /&gt;
&lt;br /&gt;
=== [capture_village] ===&lt;br /&gt;
Changes the ownership of a village.&lt;br /&gt;
* [[StandardLocationFilter]]: all village locations matching the filter are affected.&lt;br /&gt;
* '''side''': the side that takes control of the village. This side needs to have a leader (canrecruit=yes). If the side key is not given, the village will become neutral (unless [filter_side] is present, in which case that side fiter decides, see below).&lt;br /&gt;
* '''[filter_side]''' with [[StandardSideFilter]] tags and keys as arguments; if both this tag and inline side= are present it's an error. Otherwise, the first matching side gets ownership (or the village becomes neutral if none match).&lt;br /&gt;
* '''fire_event''' (boolean yes|no, default: no): Whether any capture events shall be fired.&lt;br /&gt;
&lt;br /&gt;
=== [kill] ===&lt;br /&gt;
Removes all units (including units in a recall list) that match the filter from the game.&lt;br /&gt;
* [[StandardUnitFilter]]: Selection criterion; do not use a [filter] tag.&lt;br /&gt;
* '''animate''': if 'yes', displays the unit dying (fading away).&lt;br /&gt;
* '''fire_event''': if 'yes', triggers any appropriate 'die' events (See [[EventWML]]). Note that events are only fired for killed units that have been on the map (as opposed to recall list).&lt;br /&gt;
* '''[secondary_unit]''' with a [[StandardUnitFilter]] as argument. Do not use a [filter] tag. Has an effect only if fire_event=yes. The first on-map unit matching the filter becomes second_unit in any fired die and last breath events. If an on-map unit matches and if there are several units killed with a single [kill] tag, second_unit is this same unit for all of them. If no on-map unit matches or [secondary_unit] isn't present, the variable second_unit in each of the die and last breath events is always the same as the variable unit (the dying unit).&lt;br /&gt;
&lt;br /&gt;
=== [move_unit] ===&lt;br /&gt;
works like the MOVE_UNIT macro.&lt;br /&gt;
* [[StandardUnitFilter]] as argument; do not use a [filter] tag. All units matching the filter are moved. If the target location is occupied, the nearest free passable location is chosen. All target locations passed (see below) need to be passable hexes for the particular moved units.&lt;br /&gt;
* '''to_x''' (unsigned integer): The units are moved to this x coordinate. Can be a comma-separated list, in which case the unit follows this given path during the move.&lt;br /&gt;
* '''to_y''' (unsigned integer): The units are moved to this y coordinate. Can be a comma-separated list.&lt;br /&gt;
* '''fire_event''' (optional, boolean yes|no, default no): Whether any according moveto events shall be fired. The target location ($x1, $y1 in the event) may not be the same location that the unit was tried to be moved to, if the original target location is occupied or impassable.&lt;br /&gt;
* '''check_passability''' (boolean yes|no, default yes): Whether the terrain the unit is moved to should be checked for suiting the unit. (If it does not, a nearby suitable hex is chosen.)&lt;br /&gt;
&lt;br /&gt;
=== [modify_ai] ===&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument {{DevFeature1.11}}: [modify_ai][filter_side] is deprecated, use the new inline SSF.&lt;br /&gt;
Changes the AI for a specified side. See [[Customizing_AI_in_Wesnoth_1.8#.5Bmodify_ai.5D_tag]]&lt;br /&gt;
&lt;br /&gt;
=== [modify_unit] ===&lt;br /&gt;
works similar to the MODIFY_UNIT macro.&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. All units matching this filter are modified. Matches on recall list units too.&lt;br /&gt;
* Accepts generally the syntax inside of wml unit variables created by [store_unit] which can be viewed in a savefile or by using the :inspect command. Can add traits with immediate effect. Cannot remove things. Subtags with the same name must be written in the correct order to match them with the tag they are supposed to modify.&lt;br /&gt;
example usage (see also the test scenario):&lt;br /&gt;
 [modify_unit]&lt;br /&gt;
     [filter]&lt;br /&gt;
         type=Troll Rocklobber&lt;br /&gt;
     [/filter]&lt;br /&gt;
     hitpoints=10&lt;br /&gt;
     [modifications]&lt;br /&gt;
         [trait]&lt;br /&gt;
             # first trait is unmodified&lt;br /&gt;
         [/trait]&lt;br /&gt;
         {TRAIT_HEALTHY}# second trait is replaced with the healthy trait&lt;br /&gt;
     [/modifications]&lt;br /&gt;
 [/modify_unit]&lt;br /&gt;
&lt;br /&gt;
The unit which is currently modified is accessible via $this_unit, e.g. hitpoints = &amp;quot;$($this_unit.hitpoints / 2)&amp;quot; to set the hitpoints of all units to half of their particular maxima. This this_unit variable is independent from the this_unit variable available in the SUF used to determine which units to modify (first all matching units are gathered, and then all those are modified).&lt;br /&gt;
&lt;br /&gt;
note: The syntax allowed is somehow vague. Just try things and possibly correct/add/modify this documentation. (a [http://forums.wesnoth.org/viewtopic.php?f=21&amp;amp;t=31676&amp;amp; forum thread] discusses some related issues).&lt;br /&gt;
&lt;br /&gt;
=== [transform_unit] ===&lt;br /&gt;
transforms every unit matching the filter to the given unit type. Keeps intact hitpoints, experience and status. If the unit is transformed to a non-living type (undead or mechanical), it will be also unpoisoned.&lt;br /&gt;
* [[StandardUnitFilter]]: do not use a [filter] tag.&lt;br /&gt;
* '''transform_to''': the unit type in which all the units matching the filter will be transformed. If missing, the units will follow their normal advancement.&lt;br /&gt;
&lt;br /&gt;
=== [petrify] ===&lt;br /&gt;
&lt;br /&gt;
* [[StandardUnitFilter]] as an argument. Do not use a [filter] tag. All units matching this filter are petrified. Recall list units are included.&lt;br /&gt;
&lt;br /&gt;
=== [unpetrify] ===&lt;br /&gt;
* [[StandardUnitFilter]] as an argument. Do not use a [filter] tag. All units matching this filter are unpetrified. Recall list units are included.&lt;br /&gt;
&lt;br /&gt;
=== [object] ===&lt;br /&gt;
Gives some unit an object and removes all items on the tile the unit is on.&lt;br /&gt;
* '''id''': (Optional) when the object is picked up, a flag is set for ''id''.  The object cannot be picked up if a flag for ''id'' has been set.  This means that any object with an id can only be used once, even if first_time_only=no is set for the event. This restriction is per level. In a campaign objects with the same id can be assigned once per level.&lt;br /&gt;
* '''delayed_variable_substitution''' (boolean yes|no, default no): If set to &amp;quot;yes&amp;quot;, the wml block contained in this [object] is not variable-substituted at execution time of the event where this [object] is within. You need this to work around a bug when adding ABILITY_TELEPORT via an [object] or when using [object][effect][filter]with a $this_unit (see http://gna.org/bugs/index.php?18893).&lt;br /&gt;
* '''[effect]''': one or more effect elements may be listed.  See [[EffectWML]] for a description of [effect].&lt;br /&gt;
* '''duration''': if 'level', effects only last until the end of the level (note : 'level' is the scenario, so this doesn't mean it last until the unit levels-up).&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. The first unit found that matches the filter will be given the object.  If no unit matches the filter, then a message is displayed and the object is not removed.&lt;br /&gt;
* '''[then]''': a subtag that lets you execute actions if the filter conditions are met.  The most common action that should be inside here is a '''[removeitem]''' tag, but you could probably put any tags that otherwise work in a [then] tag.&lt;br /&gt;
* '''silent''': whether or not messages should be suppressed. Default is &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''image''': the displayed image of the object.&lt;br /&gt;
* '''name''': (translatable) displayed as a caption of the image.&lt;br /&gt;
&lt;br /&gt;
* '''description''': (translatable) displayed as a message of the image.&lt;br /&gt;
* '''cannot_use_message''': (translatable) displayed instead of '''description''' if no unit passes the filter test.&lt;br /&gt;
* If you do not supply a filter, the object action will be applied to a unit at the location of the moveto event. Currently this isn't recommended as it is not clear that this will continue working this way. Instead it is better to explicitly include a location filter.&lt;br /&gt;
* The object action does not act on units in the recall list. There is a feature request in to allow this, but it is not clear whether or not it will be accepted.&lt;br /&gt;
&lt;br /&gt;
=== [remove_shroud] ===&lt;br /&gt;
Removes some shroud from the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
* '''side''': (default=1) the side for which to remove shroud. This can be a comma-separated list of sides. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* [[StandardLocationFilter]]: the range of tiles for which shroud should be removed&lt;br /&gt;
&lt;br /&gt;
=== [place_shroud] ===&lt;br /&gt;
Places some shroud on the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
* '''side''': (default=1) the side for which to place shroud. This can be a comma-separated list. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* [[StandardLocationFilter]]: the range of tiles on which shroud should be placed&lt;br /&gt;
&lt;br /&gt;
=== [allow_undo] ===&lt;br /&gt;
Allows the player to undo the event that this tag is inside.  Has an effect only inside moveto events.  If the move is undone, only the position of the unit will be restored; any altered variables or changes to the game will remain changed after the move is undone.  It is up to the scenario designer to avoid abusing this command.&lt;br /&gt;
* Technically, if '''[allow_undo]''' is inside an '''[event]''' with ''first_time_only=yes'' (the default setting), and the user undoes the event, then the state of the game has changed in this way: the event will not fire a second time, even though the user undid the move the first time.&lt;br /&gt;
&lt;br /&gt;
=== [heal_unit] ===&lt;br /&gt;
Heal a unit. The variable '''$heal_amount''' will be set to the exact number of points healed (i.e can be lesser than the parameter '''amount''' if the unit is fully healed). $heal_amount contains only the number of hitpoints the first unit that was found got healed.&lt;br /&gt;
*  '''[filter]''': [[StandardUnitFilter]] All matching on-map units are healed. If no filter is supplied, it is tried to take the unit at $x1, $y1.&lt;br /&gt;
*  '''[filter_second]''': [[StandardUnitFilter]] all the units matching the filter ''and'' having the ''heals'' ability will have their animation played (if ''animate'' is set to true) for each of the units healed.&lt;br /&gt;
*  '''amount''': (integer, default full) the maximum points the unit(s) will be healed. Can't set below 1 or above max_hitpoints. If &amp;quot;full&amp;quot;, sets hitpoints to max_hitpoints. Before 1.9 the default is 0.&lt;br /&gt;
*  '''animate''': a boolean which indicate if the healing animations must be played. (default no)&lt;br /&gt;
*  '''moves''': (integer, default 0) The maximum current movement points the units will be &amp;quot;healed&amp;quot;. Can't set below 0 or above max_moves. If &amp;quot;full&amp;quot;, sets moves to max_moves.&lt;br /&gt;
* '''restore_attacks''': (boolean, default no) Whether the units' attacks_left should be reset to their max_attacks (usually 1).&lt;br /&gt;
* '''restore_statuses''': (boolean, default yes) Whether standard statuses should be reset to &amp;quot;no&amp;quot;. This affects poisoned, slowed, petrified and unhealable. Before 1.9 this is always &amp;quot;no&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== [harm_unit] ===&lt;br /&gt;
Harms every unit matching the filter, for the specific damage amount.&lt;br /&gt;
*  '''[filter]''': [[StandardUnitFilter]] all matching units will be harmed (required).&lt;br /&gt;
*  '''[filter_second]''': [[StandardUnitFilter]] if present, the first matching unit will attack all the units matching the filter above.&lt;br /&gt;
*  '''amount''': the amount of damage that will be done (required).&lt;br /&gt;
*  '''alignment''': (default neutral) applies an alignment to the damage, this means that if alignment=chaotic, the damage will be increased at night and reduced at day.&lt;br /&gt;
*  '''damage_type''': if present, amount will be altered by unit resistance to the damage type specified.&lt;br /&gt;
*  '''kill''': (default yes) if yes, when an harmed unit goes to or below 0 HP, it is killed; if no its HP are set to 1.&lt;br /&gt;
*  '''fire_event''': (default no) if yes, when a unit is killed by harming, the corresponding events are fired.&lt;br /&gt;
*  '''animate''': (default no) if yes, scrolls to each unit before harming it and plays its defense (or attack, if it's the harmer) and death animations. Special values supported, other than the usual yes and no, are &amp;quot;attacker&amp;quot;, that means only the harmer will be animated, and &amp;quot;defender&amp;quot;, that means only the harmed units will be animated.&lt;br /&gt;
*  '''[primary_attack], [secondary_attack]''': these set the weapon against which the harmed units will defend, and that the harming unit will use to attack, respectively (notice this is the opposite of '''[filter]''' and '''[filter_second]''' above). This allows for playing specific defense and attack animations. Both tags are expected to contain a [[FilterWML#Filtering_Weapons|Standard Weapon Filter]].&lt;br /&gt;
*  '''delay''': if animate=yes, sets the delay (in milliseconds, default 500) between each unit harming.&lt;br /&gt;
*  '''variable''': if present, the damage caused to the unit, altered by resistances, will be stored in a WML array with the given name, under the &amp;quot;harm_amount&amp;quot; key.&lt;br /&gt;
*  '''poisoned, slowed, petrified, unhealable''': (default no) if yes, every harmed unit that doesn't already have such status will have it set.&lt;br /&gt;
*  '''experience''': if yes, and there is an harmer, experience will be attributed like in regular combat.&lt;br /&gt;
&lt;br /&gt;
=== [time_area] ===&lt;br /&gt;
How a day should progress in a given area. Everywhere not specified in a [time_area] tag is affected by the [time] tags in the [scenario] tag.&lt;br /&gt;
* [[StandardLocationFilter]]: the locations to affect. ''note: only for [event][time_area]s - at scenario toplevel [time_area] does not support [[StandardLocationFilter]], only location ranges''&lt;br /&gt;
* [[TimeWML]]: the new schedule.&lt;br /&gt;
* '''id''': an unique identifier assigned to a time_area. Optional, unless you want to remove the time_area later. Can be a comma-separated list when removing time_areas, see below.&lt;br /&gt;
* '''remove''': (boolean) yes/no value. Indicates whether the specified time_area should be removed. Requires an identifier. If no identifier is used, however, all time_areas are removed.&lt;br /&gt;
&lt;br /&gt;
=== [end_turn] ===&lt;br /&gt;
End the current side's turn. The current event is finished before the turn is ended. Also, if the current event (where the tag appears) has been fired by another event, that event (and the complete stack of other possible parent events) is ended before [end_turn] comes into affect. Also, events following the event stack that fired [end_turn] are not omitted (e.g. [end_turn] is used by a side turn event and a turn refresh event does something afterwards).&lt;br /&gt;
&lt;br /&gt;
=== [replace_map] ===&lt;br /&gt;
&lt;br /&gt;
Replaces the entire map.&lt;br /&gt;
* '''map''': Content of a wesnoth map file. example:&lt;br /&gt;
 map=&amp;quot;{campaigns/Heir_To_The_Throne/maps/01_The_Elves_Besieged.map}&amp;quot;&lt;br /&gt;
* '''expand''': if 'yes', allows the map size to increase. The expansion direction is currently always bottom-right.&lt;br /&gt;
* '''shrink''': if 'yes', allows the map size to decrease. If the map size is reduced, any units that would no longer be on the map due to its coordinates no longer existing will be put into the recall list.&lt;br /&gt;
&lt;br /&gt;
=== [replace_schedule] ===&lt;br /&gt;
Replace the time of day schedule of the entire scenario.&lt;br /&gt;
* [[TimeWML]]: the new schedule.&lt;br /&gt;
&lt;br /&gt;
=== [tunnel] ===&lt;br /&gt;
&lt;br /&gt;
Create a tunnel between some locations, later usable by units to move from source hex to target hex (using the movement cost of unit on the target terrain). ([http://forums.wesnoth.org/viewtopic.php?f=21&amp;amp;t=14749&amp;amp;p=405667&amp;amp;hilit=tunnel#p405667 source])&lt;br /&gt;
&lt;br /&gt;
* '''id''' identifier for the tunnel, to allow removing (optional).&lt;br /&gt;
* '''remove''': (boolean) yes/no value. If yes, removes all defined tunnels with the same ID (then only id= is necessary). (default: no)&lt;br /&gt;
* '''bidirectional''': (boolean) if yes, creates also a tunnel in the other direction. (default: yes)&lt;br /&gt;
* '''always_visible''': (boolean) if yes, the possible movement of enemies under fog can be seen. (default: no)&lt;br /&gt;
* '''[source]''': [[StandardLocationFilter]] the source hex(es) (required).&lt;br /&gt;
* '''[target]''': [[StandardLocationFilter]] the target hex(es) (required).&lt;br /&gt;
* '''[filter]''': [[StandardUnitFilter]] the units which can use the tunnel (required). Leave empty for &amp;quot;all units&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(Note: The tunnel tag can also be used inside the [[AbilitiesWML|[teleport]]] ability, without remove= and id=).&lt;br /&gt;
&lt;br /&gt;
== Useful Macros ==&lt;br /&gt;
There are some predefined macros that you find useful for direct actions. You can find a complete list along with a detailed explanation of how they work [http://www.wesnoth.org/macro-reference.xhtml here].&lt;br /&gt;
* '''{MOVE_UNIT}''': Moves a unit to another location in the map and the player sees the movement (unlike [teleport])&lt;br /&gt;
* '''{FULL_HEAL}''': Brings a unit to full HP&lt;br /&gt;
* '''{LOYAL_UNIT}''': Create a loyal unit&lt;br /&gt;
* '''{MODIFY_TERRAIN_MASK}''': Modify an area of terrain&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[InternalActionsWML]]&lt;br /&gt;
* [[InterfaceActionsWML]]&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;br /&gt;
[[Category: ActionsWML]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=45248</id>
		<title>DirectActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=45248"/>
		<updated>2012-02-14T21:49:07Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* [modify_ai] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== Direct actions ==&lt;br /&gt;
&lt;br /&gt;
Direct actions are actions that have a direct effect on gameplay. They can be used inside of [[EventWML|events]].&lt;br /&gt;
&lt;br /&gt;
The following tags are actions:&lt;br /&gt;
&lt;br /&gt;
=== [endlevel] ===&lt;br /&gt;
Ends the scenario.&lt;br /&gt;
* '''result''': before the scenario is over, all events with ''name=result'' are triggered. If ''result=victory'', the player progresses to the next level; if ''result=defeat'', the game returns to the main menu. &lt;br /&gt;
&lt;br /&gt;
When the result is &amp;quot;victory&amp;quot; the following keys can be used:&lt;br /&gt;
* '''bonus''': whether the player should get bonus gold (maximum possible gold that could have been earned by waiting the level out). The default is bonus=yes.&lt;br /&gt;
* '''carryover_report''': whether the player should receive a summary of the scenario outcome, the default is carryover_report=yes.&lt;br /&gt;
* '''save''': whether a start-of-scenario save should be created for the next scenario, the default is save=yes. Do not confuse this with saving of replays for the current scenario.&lt;br /&gt;
* '''replay_save''': whether a replay save for the current scenario is allowed, the default is replay_save=yes. If yes, the player's settings in preferences will be used to determine if a replay is saved. If no, will override and not save a replay.&lt;br /&gt;
* '''linger_mode''': If ...=yes, the screen is greyed out and there's the possibility to save before advancing to the next scenario, the default is linger_mode=yes.&lt;br /&gt;
* '''reveal_map''': (Multiplayer only) (Default is 'yes') If 'no', shroud doesn't disappear when game ended.&lt;br /&gt;
* '''next_scenario''': (default specified in '''[scenario]''' tag) the ID of the next scenario that should be played.  All units that side 1 controls at this point become available for recall in ''next_scenario''.&lt;br /&gt;
* '''carryover_percentage''': by default 80% of the gold is carried over to the next scenario, with this key the amount can be changed.&lt;br /&gt;
* '''carryover_add''': if true the gold will be added to the starting gold the next scenario, if false the next scenario will start with the amount of the current scenario (after taxes) or the minimum in the next scenario. Default is false.&lt;br /&gt;
* '''music''': (default specified in '''[scenario]''' or '''[game_config]''' tags) a comma-separated list of music tracks from which one will be chosen and played once after any events related to the end of level result are executed; by default, victory_music is used on victory, and defeat_music on defeat.&lt;br /&gt;
* '''end_credits''': {{DevFeature1.11}} Whether to display the credits screen at the end of a single-player campaign. Defaults to ''yes''. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
* '''end_text''': (translatable) Text that is shown centered in a black screen at the end of a campaign. Defaults to &amp;quot;The End&amp;quot;. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
* '''end_text_duration''': Delay, in milliseconds, before displaying the game credits at the end of a campaign. In other words, for how much time '''end_text''' is displayed on screen. Defaults to 3500. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
&lt;br /&gt;
=== [unit] ===&lt;br /&gt;
Places a unit on the map.  For syntax see [[SingleUnitWML]].&lt;br /&gt;
* {{Short Note:Predefined Macro|GENERIC_UNIT}}&lt;br /&gt;
* '''to_variable''':  spawn directly into a variable instead of on the map.&lt;br /&gt;
&lt;br /&gt;
=== [recall] ===&lt;br /&gt;
Recalls a unit.  The unit is recalled free of charge, and is placed near the leader.&lt;br /&gt;
* [[StandardUnitFilter]]: the first matching unit will be recalled.  If no units match this tag is ignored. Do not use a [filter] tag. If a comma separated list is given, every unit currently considered for recall is checked against all the types (not each single one of the types against all units).&lt;br /&gt;
* '''x,y''': the unit is placed here instead of next to the leader.&lt;br /&gt;
* '''show''': yes/no, default yes: whether the unit is animated (faded in) or instantly displayed&lt;br /&gt;
* '''fire_event''': boolean yes|no (default no); whether any according prerecall or recall events shall be fired.&lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): If yes, checks for terrain passability when placing the unit (a nearby passable hex is chosen).&lt;br /&gt;
&lt;br /&gt;
=== [teleport] ===&lt;br /&gt;
Teleports a unit on map. {{Short Note:Predefined Macro|TELEPORT_UNIT}}&lt;br /&gt;
* '''[filter]''': [[StandardUnitFilter]] the first unit matching this filter will be teleported.&lt;br /&gt;
* '''x,y''': the position to teleport to.&lt;br /&gt;
* '''clear_shroud''': should shroud be cleared on arrival&lt;br /&gt;
* '''animate''': should a teleport animation be played (if the unit doesn't have a teleport animation, it will fade out/fade in)&lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): normally, units will not be teleported into terrain that is impassable for them. Setting this attribute to &amp;quot;no&amp;quot; permits it.&lt;br /&gt;
&lt;br /&gt;
(Note: There is also a ability named teleport, see [[AbilitiesWML]].)&lt;br /&gt;
&lt;br /&gt;
=== [terrain_mask] ===&lt;br /&gt;
Changes the terrain on the map.  See [[TerrainMaskWML]].&lt;br /&gt;
&lt;br /&gt;
=== [terrain] ===&lt;br /&gt;
Changes the terrain on the map.&lt;br /&gt;
* '''terrain''': the character of the terrain to use.  See [[TerrainCodesWML]] to see what letter a type of terrain uses.&lt;br /&gt;
* [[StandardLocationFilter]]. This [[StandardLocationFilter]]'s terrain= key is used for the new terrain, filtering by terrain can be done with a nested [[StandardLocationFilter]]: [and]terrain=terrain_string_to_be_filtered_for.&lt;br /&gt;
* '''layer''': (overlay|base|both, default=both) only change the specified layer.&lt;br /&gt;
* '''replace_if_failed''': (default=no) When replacing just one layer failed, try to replace the whole terrain. If '''terrain''' is an overlay only terrain, use the default_base as base layer. If the terrain has no default base, do nothing.&lt;br /&gt;
&lt;br /&gt;
=== [gold] ===&lt;br /&gt;
Gives sides gold.&lt;br /&gt;
* '''amount''': the amount of gold to give.&lt;br /&gt;
* '''side''': (default=1) the number of the side to give the gold to. Can be a comma-separated list of sides. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument {{DevFeature1.11}}: [gold][filter_side] is deprecated, use the new inline SSF.&lt;br /&gt;
&lt;br /&gt;
=== [unstore_unit] ===&lt;br /&gt;
Creates a unit from a game variable, and activates it on the playing field.  This must be a specific variable describing a unit, and may not be an array -- to unstore an entire array, iterate over it.  The variable is not cleared.  See also [[InternalActionsWML#.5Bstore_unit.5D|[store_unit]]], [[ConditionalActionsWML#.5Bwhile.5D|[while]]] and [[InternalActionsWML#.5Bclear_variable.5D|[clear_variable]]]. Note units with a negative amount of hitpoints will be unstored with 1 hitpoint.&lt;br /&gt;
* '''variable''': the name of the variable.&lt;br /&gt;
* '''find_vacant''': whether the unit should be placed on the nearest vacant tile to its specified location.  If this is set to 'no'(default), then any unit on the same tile as the unit being unstored will be destroyed. &lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): If yes, checks for terrain passability when placing the unit. This key has no effect if find_vacant=no (no check performed then). Before 1.9 this key is always &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''text''': (translatable) floating text to display above the unit, such as a damage amount&lt;br /&gt;
* '''red''', '''green''', '''blue''': (default=0,0,0) the color to display the text in. Values vary from 0-255. You may find it convenient to use the {COLOR_HARM} or {COLOR_HEAL} macro instead. (Use {COLOR_HARM} or {COLOR_HEAL} instead of the whole red,green,blue= line.)&lt;br /&gt;
* '''advance''': (default=true) if true the unit is advanced if it has enough XP. When modifying XP make sure to do it from inside a [[EventWML#Multiplayer_safety|synchronized event]] or it may lead to OOS errors especially when several advancement paths exist. Note that advance and post advance events are called, so infinite loops can happen.&lt;br /&gt;
* '''fire_event''': (boolean yes|no, default no) Whether any advance/post advance events shall be fired if an advancement takes place, no effect otherwise.&lt;br /&gt;
* '''x''' ,'''y''': override unit location, &amp;quot;x,y=recall,recall&amp;quot; will put the unit on the unit's side's recall list.&lt;br /&gt;
&lt;br /&gt;
=== [allow_recruit] ===&lt;br /&gt;
Allows a side to recruit units it couldn't previously recruit.&lt;br /&gt;
* '''type''': the types of units that the side can now recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that is being allowed to recruit the units. This can be a comma-separated list note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [allow_extra_recruit] ===&lt;br /&gt;
Allows a leader to recruit units it couldn't previously recruit.&lt;br /&gt;
These types add to the types the leader can recruit because of [side]recruit=.&lt;br /&gt;
* '''extra_recruit''': the types of units that the unit can now recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_recruit] ===&lt;br /&gt;
Prevents a side from recruiting units it could previously recruit.&lt;br /&gt;
* '''type''': the types of units that the side can no longer recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that may no longer recruit the units. This can be a comma-separated list note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_extra_recruit] ===&lt;br /&gt;
Prevents a leader from recruiting units it could previously recruit.&lt;br /&gt;
* '''extra_recruit''': the types of units that the side can no longer recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [set_recruit] ===&lt;br /&gt;
Sets the units a side can recruit.&lt;br /&gt;
* '''recruit''': the types of units that the side can now recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that is having its recruitment set. This can be a comma-separated list. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [set_extra_recruit] === &lt;br /&gt;
Sets the units a leader can recruit.&lt;br /&gt;
* '''extra_recruit''': the types of units that the leader can now recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [modify_side] ===&lt;br /&gt;
Modifies some details of a given side in the middle of a scenario.  '''The following listed properties are the only properties that [modify_side] can affect!'''&lt;br /&gt;
* '''side''': (default=1) the number of the side that is to be changed. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* '''income''': the income given at the begining of each turn.&lt;br /&gt;
* '''team_name''': the team in which the side plays the scenario.&lt;br /&gt;
* '''user_team_name''': a translatable string representing the team's description. This has no effect on alliances. Defaults to ''team_name''.&lt;br /&gt;
* '''gold''': the amount of gold the side owns.&lt;br /&gt;
* '''village_gold''': the income setting per village for the side.&lt;br /&gt;
* '''controller''': the identifier string of the side's controller. Uses the same syntax of the ''controller'' key in the [[SideWML|[side]]] tag.&lt;br /&gt;
* '''fog''': a boolean string (yes/no) describing the status of Fog for the side.&lt;br /&gt;
* '''shroud''': a boolean string describing the status of Shroud for the side.&lt;br /&gt;
* '''hidden''': a boolean string specifying whether side is shown in status table.&lt;br /&gt;
* '''color''': {{DevFeature1.11}} a team color range specification, name (e.g. &amp;quot;red&amp;quot;, &amp;quot;blue&amp;quot;), or number (e.g. &amp;quot;1&amp;quot;, &amp;quot;2&amp;quot;) for this side. The default color range names, numbers, and definitions can be found in data/core/team_colors.cfg.&lt;br /&gt;
* '''[ai]''': replaces a side's AI parameters with the new specified ones. Uses the same syntax described in [[AiWML]].&lt;br /&gt;
* '''switch_ai''': replaces a side ai with a new AI from specified file(ignoring those AI parameters above). Path to file follows the usual WML convention.&lt;br /&gt;
* '''share_maps''': change the share_maps side attribute. Be sure to use shroud=yes for that side and have it as an ally&lt;br /&gt;
* '''share_view''': change the share_view side attribute. Be sure to use fog=yes for that side and have it as an ally&lt;br /&gt;
&lt;br /&gt;
=== [modify_turns] ===&lt;br /&gt;
Modifies the turn limit in the middle of a scenario.&lt;br /&gt;
* '''value''': the new turn limit.&lt;br /&gt;
* '''add''': if used instead of ''value'', specifies the number of turns to add to the current limit (can be negative).&lt;br /&gt;
* '''current''': changes the current turn number after applying turn limit modifications, if any. It is not possible to change the turn number to exceed the turn limit (1 &amp;lt;= current turns &amp;lt;= max turns).&lt;br /&gt;
&lt;br /&gt;
=== [allow_end_turn] ===&lt;br /&gt;
Allows human players to end their turn through the user interface if they were previously affected by the '''[disallow_end_turn]''' action. This action doesn't take any arguments.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_end_turn] ===&lt;br /&gt;
Disallows human players to end their turn through the user interface. This action doesn't take any arguments.&lt;br /&gt;
&lt;br /&gt;
=== [capture_village] ===&lt;br /&gt;
Changes the ownership of a village.&lt;br /&gt;
* [[StandardLocationFilter]]: all village locations matching the filter are affected.&lt;br /&gt;
* '''side''': the side that takes control of the village. This side needs to have a leader (canrecruit=yes). If the side key is not given, the village will become neutral (unless [filter_side] is present, in which case that side fiter decides, see below).&lt;br /&gt;
* '''[filter_side]''' with [[StandardSideFilter]] tags and keys as arguments; if both this tag and inline side= are present it's an error. Otherwise, the first matching side gets ownership (or the village becomes neutral if none match).&lt;br /&gt;
* '''fire_event''' (boolean yes|no, default: no): Whether any capture events shall be fired.&lt;br /&gt;
&lt;br /&gt;
=== [kill] ===&lt;br /&gt;
Removes all units (including units in a recall list) that match the filter from the game.&lt;br /&gt;
* [[StandardUnitFilter]]: Selection criterion; do not use a [filter] tag.&lt;br /&gt;
* '''animate''': if 'yes', displays the unit dying (fading away).&lt;br /&gt;
* '''fire_event''': if 'yes', triggers any appropriate 'die' events (See [[EventWML]]). Note that events are only fired for killed units that have been on the map (as opposed to recall list).&lt;br /&gt;
* '''[secondary_unit]''' with a [[StandardUnitFilter]] as argument. Do not use a [filter] tag. Has an effect only if fire_event=yes. The first on-map unit matching the filter becomes second_unit in any fired die and last breath events. If an on-map unit matches and if there are several units killed with a single [kill] tag, second_unit is this same unit for all of them. If no on-map unit matches or [secondary_unit] isn't present, the variable second_unit in each of the die and last breath events is always the same as the variable unit (the dying unit).&lt;br /&gt;
&lt;br /&gt;
=== [move_unit] ===&lt;br /&gt;
works like the MOVE_UNIT macro.&lt;br /&gt;
* [[StandardUnitFilter]] as argument; do not use a [filter] tag. All units matching the filter are moved. If the target location is occupied, the nearest free passable location is chosen. All target locations passed (see below) need to be passable hexes for the particular moved units.&lt;br /&gt;
* '''to_x''' (unsigned integer): The units are moved to this x coordinate. Can be a comma-separated list, in which case the unit follows this given path during the move.&lt;br /&gt;
* '''to_y''' (unsigned integer): The units are moved to this y coordinate. Can be a comma-separated list.&lt;br /&gt;
* '''fire_event''' (optional, boolean yes|no, default no): Whether any according moveto events shall be fired. The target location ($x1, $y1 in the event) may not be the same location that the unit was tried to be moved to, if the original target location is occupied or impassable.&lt;br /&gt;
* '''check_passability''' (boolean yes|no, default yes): Whether the terrain the unit is moved to should be checked for suiting the unit. (If it does not, a nearby suitable hex is chosen.)&lt;br /&gt;
&lt;br /&gt;
=== [modify_ai] ===&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument {{DevFeature1.11}}: [modify_ai][filter_side] is deprecated, use the new inline SSF.&lt;br /&gt;
Changes the AI for a specified side. See [[Customizing_AI_in_Wesnoth_1.8#.5Bmodify_ai.5D_tag]]&lt;br /&gt;
&lt;br /&gt;
=== [modify_unit] ===&lt;br /&gt;
works similar to the MODIFY_UNIT macro.&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. All units matching this filter are modified. Matches on recall list units too.&lt;br /&gt;
* Accepts generally the syntax inside of wml unit variables created by [store_unit] which can be viewed in a savefile or by using the :inspect command. Can add traits with immediate effect. Cannot remove things. Subtags with the same name must be written in the correct order to match them with the tag they are supposed to modify.&lt;br /&gt;
example usage (see also the test scenario):&lt;br /&gt;
 [modify_unit]&lt;br /&gt;
     [filter]&lt;br /&gt;
         type=Troll Rocklobber&lt;br /&gt;
     [/filter]&lt;br /&gt;
     hitpoints=10&lt;br /&gt;
     [modifications]&lt;br /&gt;
         [trait]&lt;br /&gt;
             # first trait is unmodified&lt;br /&gt;
         [/trait]&lt;br /&gt;
         {TRAIT_HEALTHY}# second trait is replaced with the healthy trait&lt;br /&gt;
     [/modifications]&lt;br /&gt;
 [/modify_unit]&lt;br /&gt;
&lt;br /&gt;
The unit which is currently modified is accessible via $this_unit, e.g. hitpoints = &amp;quot;$($this_unit.hitpoints / 2)&amp;quot; to set the hitpoints of all units to half of their particular maxima. This this_unit variable is independent from the this_unit variable available in the SUF used to determine which units to modify (first all matching units are gathered, and then all those are modified).&lt;br /&gt;
&lt;br /&gt;
note: The syntax allowed is somehow vague. Just try things and possibly correct/add/modify this documentation. (a [http://forums.wesnoth.org/viewtopic.php?f=21&amp;amp;t=31676&amp;amp; forum thread] discusses some related issues).&lt;br /&gt;
&lt;br /&gt;
=== [transform_unit] ===&lt;br /&gt;
transforms every unit matching the filter to the given unit type. Keeps intact hitpoints, experience and status. If the unit is transformed to a non-living type (undead or mechanical), it will be also unpoisoned.&lt;br /&gt;
* [[StandardUnitFilter]]: do not use a [filter] tag.&lt;br /&gt;
* '''transform_to''': the unit type in which all the units matching the filter will be transformed. If missing, the units will follow their normal advancement.&lt;br /&gt;
&lt;br /&gt;
=== [petrify] ===&lt;br /&gt;
&lt;br /&gt;
* [[StandardUnitFilter]] as an argument. Do not use a [filter] tag. All units matching this filter are petrified. Recall list units are included.&lt;br /&gt;
&lt;br /&gt;
=== [unpetrify] ===&lt;br /&gt;
* [[StandardUnitFilter]] as an argument. Do not use a [filter] tag. All units matching this filter are unpetrified. Recall list units are included.&lt;br /&gt;
&lt;br /&gt;
=== [object] ===&lt;br /&gt;
Gives some unit an object and removes all items on the tile the unit is on.&lt;br /&gt;
* '''id''': (Optional) when the object is picked up, a flag is set for ''id''.  The object cannot be picked up if a flag for ''id'' has been set.  This means that any object with an id can only be used once, even if first_time_only=no is set for the event. This restriction is per level. In a campaign objects with the same id can be assigned once per level.&lt;br /&gt;
* '''delayed_variable_substitution''' (boolean yes|no, default no): If set to &amp;quot;yes&amp;quot;, the wml block contained in this [object] is not variable-substituted at execution time of the event where this [object] is within. You need this to work around a bug when adding ABILITY_TELEPORT via an [object] or when using [object][effect][filter]with a $this_unit (see http://gna.org/bugs/index.php?18893).&lt;br /&gt;
* '''[effect]''': one or more effect elements may be listed.  See [[EffectWML]] for a description of [effect].&lt;br /&gt;
* '''duration''': if 'level', effects only last until the end of the level (note : 'level' is the scenario, so this doesn't mean it last until the unit levels-up).&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. The first unit found that matches the filter will be given the object.  If no unit matches the filter, then a message is displayed and the object is not removed.&lt;br /&gt;
* '''[then]''': a subtag that lets you execute actions if the filter conditions are met.  The most common action that should be inside here is a '''[removeitem]''' tag, but you could probably put any tags that otherwise work in a [then] tag.&lt;br /&gt;
* '''silent''': whether or not messages should be suppressed. Default is &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''image''': the displayed image of the object.&lt;br /&gt;
* '''name''': (translatable) displayed as a caption of the image.&lt;br /&gt;
&lt;br /&gt;
* '''description''': (translatable) displayed as a message of the image.&lt;br /&gt;
* '''cannot_use_message''': (translatable) displayed instead of '''description''' if no unit passes the filter test.&lt;br /&gt;
* If you do not supply a filter, the object action will be applied to a unit at the location of the moveto event. Currently this isn't recommended as it is not clear that this will continue working this way. Instead it is better to explicitly include a location filter.&lt;br /&gt;
* The object action does not act on units in the recall list. There is a feature request in to allow this, but it is not clear whether or not it will be accepted.&lt;br /&gt;
&lt;br /&gt;
=== [remove_shroud] ===&lt;br /&gt;
Removes some shroud from the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
* '''side''': (default=1) the side for which to remove shroud. This can be a comma-separated list of sides. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* [[StandardLocationFilter]]: the range of tiles for which shroud should be removed&lt;br /&gt;
&lt;br /&gt;
=== [place_shroud] ===&lt;br /&gt;
Places some shroud on the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
* '''side''': (default=1) the side for which to place shroud. This can be a comma-separated list. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* [[StandardLocationFilter]]: the range of tiles on which shroud should be placed&lt;br /&gt;
&lt;br /&gt;
=== [allow_undo] ===&lt;br /&gt;
Allows the player to undo the event that this tag is inside.  Has an effect only inside moveto events.  If the move is undone, only the position of the unit will be restored; any altered variables or changes to the game will remain changed after the move is undone.  It is up to the scenario designer to avoid abusing this command.&lt;br /&gt;
* Technically, if '''[allow_undo]''' is inside an '''[event]''' with ''first_time_only=yes'' (the default setting), and the user undoes the event, then the state of the game has changed in this way: the event will not fire a second time, even though the user undid the move the first time.&lt;br /&gt;
&lt;br /&gt;
=== [heal_unit] ===&lt;br /&gt;
Heal a unit. The variable '''$heal_amount''' will be set to the exact number of points healed (i.e can be lesser than the parameter '''amount''' if the unit is fully healed). $heal_amount contains only the number of hitpoints the first unit that was found got healed.&lt;br /&gt;
*  '''[filter]''': [[StandardUnitFilter]] All matching on-map units are healed. If no filter is supplied, it is tried to take the unit at $x1, $y1.&lt;br /&gt;
*  '''[filter_second]''': [[StandardUnitFilter]] all the units matching the filter ''and'' having the ''heals'' ability will have their animation played (if ''animate'' is set to true) for each of the units healed.&lt;br /&gt;
*  '''amount''': (integer, default full) the maximum points the unit(s) will be healed. Can't set below 1 or above max_hitpoints. If &amp;quot;full&amp;quot;, sets hitpoints to max_hitpoints. Before 1.9 the default is 0.&lt;br /&gt;
*  '''animate''': a boolean which indicate if the healing animations must be played. (default no)&lt;br /&gt;
*  '''moves''': (integer, default 0) The maximum current movement points the units will be &amp;quot;healed&amp;quot;. Can't set below 0 or above max_moves. If &amp;quot;full&amp;quot;, sets moves to max_moves.&lt;br /&gt;
* '''restore_attacks''': (boolean, default no) Whether the units' attacks_left should be reset to their max_attacks (usually 1).&lt;br /&gt;
* '''restore_statuses''': (boolean, default yes) Whether standard statuses should be reset to &amp;quot;no&amp;quot;. This affects poisoned, slowed, petrified and unhealable. Before 1.9 this is always &amp;quot;no&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== [harm_unit] ===&lt;br /&gt;
Harms every unit matching the filter, for the specific damage amount.&lt;br /&gt;
*  '''[filter]''': [[StandardUnitFilter]] all matching units will be harmed (required).&lt;br /&gt;
*  '''[filter_second]''': [[StandardUnitFilter]] if present, the first matching unit will attack all the units matching the filter above.&lt;br /&gt;
*  '''amount''': the amount of damage that will be done (required).&lt;br /&gt;
*  '''alignment''': (default neutral) applies an alignment to the damage, this means that if alignment=chaotic, the damage will be increased at night and reduced at day.&lt;br /&gt;
*  '''damage_type''': if present, amount will be altered by unit resistance to the damage type specified.&lt;br /&gt;
*  '''kill''': (default yes) if yes, when an harmed unit goes to or below 0 HP, it is killed; if no its HP are set to 1.&lt;br /&gt;
*  '''fire_event''': (default no) if yes, when a unit is killed by harming, the corresponding events are fired.&lt;br /&gt;
*  '''animate''': (default no) if yes, scrolls to each unit before harming it and plays its defense (or attack, if it's the harmer) and death animations. Special values supported, other than the usual yes and no, are &amp;quot;attacker&amp;quot;, that means only the harmer will be animated, and &amp;quot;defender&amp;quot;, that means only the harmed units will be animated.&lt;br /&gt;
*  '''[primary_attack], [secondary_attack]''': these set the weapon against which the harmed units will defend, and that the harming unit will use to attack, respectively (notice this is the opposite of '''[filter]''' and '''[filter_second]''' above). This allows for playing specific defense and attack animations. Both tags are expected to contain a [[FilterWML#Filtering_Weapons|Standard Weapon Filter]].&lt;br /&gt;
*  '''delay''': if animate=yes, sets the delay (in milliseconds, default 500) between each unit harming.&lt;br /&gt;
*  '''variable''': if present, the damage caused to the unit, altered by resistances, will be stored in a WML array with the given name, under the &amp;quot;harm_amount&amp;quot; key.&lt;br /&gt;
*  '''poisoned, slowed, petrified, unhealable''': (default no) if yes, every harmed unit that doesn't already have such status will have it set.&lt;br /&gt;
*  '''experience''': if yes, and there is an harmer, experience will be attributed like in regular combat.&lt;br /&gt;
&lt;br /&gt;
=== [time_area] ===&lt;br /&gt;
How a day should progress in a given area. Everywhere not specified in a [time_area] tag is affected by the [time] tags in the [scenario] tag.&lt;br /&gt;
* [[StandardLocationFilter]]: the locations to affect. ''note: only for [event][time_area]s - at scenario toplevel [time_area] does not support [[StandardLocationFilter]], only location ranges''&lt;br /&gt;
* [[TimeWML]]: the new schedule.&lt;br /&gt;
* '''id''': an unique identifier assigned to a time_area. Optional, unless you want to remove the time_area later. Can be a comma-separated list when removing time_areas, see below.&lt;br /&gt;
* '''remove''': (boolean) yes/no value. Indicates whether the specified time_area should be removed. Requires an identifier. If no identifier is used, however, all time_areas are removed.&lt;br /&gt;
&lt;br /&gt;
=== [end_turn] ===&lt;br /&gt;
End the current side's turn. The current event is finished before the turn is ended. Also, if the current event (where the tag appears) has been fired by another event, that event (and the complete stack of other possible parent events) is ended before [end_turn] comes into affect. Also, events following the event stack that fired [end_turn] are not omitted (e.g. [end_turn] is used by a side turn event and a turn refresh event does something afterwards).&lt;br /&gt;
&lt;br /&gt;
=== [replace_map] ===&lt;br /&gt;
&lt;br /&gt;
Replaces the entire map.&lt;br /&gt;
* '''map''': Content of a wesnoth map file. example:&lt;br /&gt;
 map=&amp;quot;{campaigns/Heir_To_The_Throne/maps/01_The_Elves_Besieged.map}&amp;quot;&lt;br /&gt;
* '''expand''': if 'yes', allows the map size to increase. The expansion direction is currently always bottom-right.&lt;br /&gt;
* '''shrink''': if 'yes', allows the map size to decrease. If the map size is reduced, any units that would no longer be on the map due to its coordinates no longer existing will be put into the recall list.&lt;br /&gt;
&lt;br /&gt;
=== [replace_schedule] ===&lt;br /&gt;
Replace the time of day schedule of the entire scenario.&lt;br /&gt;
* [[TimeWML]]: the new schedule.&lt;br /&gt;
&lt;br /&gt;
=== [tunnel] ===&lt;br /&gt;
&lt;br /&gt;
Create a tunnel between some locations, later usable by units to move from source hex to target hex (using the movement cost of unit on the target terrain). ([http://forums.wesnoth.org/viewtopic.php?f=21&amp;amp;t=14749&amp;amp;p=405667&amp;amp;hilit=tunnel#p405667 source])&lt;br /&gt;
&lt;br /&gt;
* '''id''' identifier for the tunnel, to allow removing (optional).&lt;br /&gt;
* '''remove''': (boolean) yes/no value. If yes, removes all defined tunnels with the same ID (then only id= is necessary). (default: no)&lt;br /&gt;
* '''bidirectional''': (boolean) if yes, creates also a tunnel in the other direction. (default: yes)&lt;br /&gt;
* '''always_visible''': (boolean) if yes, the possible movement of enemies under fog can be seen. (default: no)&lt;br /&gt;
* '''[source]''': [[StandardLocationFilter]] the source hex(es) (required).&lt;br /&gt;
* '''[target]''': [[StandardLocationFilter]] the target hex(es) (required).&lt;br /&gt;
* '''[filter]''': [[StandardUnitFilter]] the units which can use the tunnel (required). Leave empty for &amp;quot;all units&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(Note: The tunnel tag can also be used inside the [[AbilitiesWML|[teleport]]] ability, without remove= and id=).&lt;br /&gt;
&lt;br /&gt;
== Useful Macros ==&lt;br /&gt;
There are some predefined macros that you find useful for direct actions. You can find a complete list along with a detailed explanation of how they work [http://www.wesnoth.org/macro-reference.xhtml here].&lt;br /&gt;
* '''{MOVE_UNIT}''': Moves a unit to another location in the map and the player sees the movement (unlike [teleport])&lt;br /&gt;
* '''{FULL_HEAL}''': Brings a unit to full HP&lt;br /&gt;
* '''{LOYAL_UNIT}''': Create a loyal unit&lt;br /&gt;
* '''{MODIFY_TERRAIN_MASK}''': Modify an area of terrain&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[InternalActionsWML]]&lt;br /&gt;
* [[InterfaceActionsWML]]&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;br /&gt;
[[Category: ActionsWML]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=45247</id>
		<title>DirectActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=45247"/>
		<updated>2012-02-14T21:45:24Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* [gold] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== Direct actions ==&lt;br /&gt;
&lt;br /&gt;
Direct actions are actions that have a direct effect on gameplay. They can be used inside of [[EventWML|events]].&lt;br /&gt;
&lt;br /&gt;
The following tags are actions:&lt;br /&gt;
&lt;br /&gt;
=== [endlevel] ===&lt;br /&gt;
Ends the scenario.&lt;br /&gt;
* '''result''': before the scenario is over, all events with ''name=result'' are triggered. If ''result=victory'', the player progresses to the next level; if ''result=defeat'', the game returns to the main menu. &lt;br /&gt;
&lt;br /&gt;
When the result is &amp;quot;victory&amp;quot; the following keys can be used:&lt;br /&gt;
* '''bonus''': whether the player should get bonus gold (maximum possible gold that could have been earned by waiting the level out). The default is bonus=yes.&lt;br /&gt;
* '''carryover_report''': whether the player should receive a summary of the scenario outcome, the default is carryover_report=yes.&lt;br /&gt;
* '''save''': whether a start-of-scenario save should be created for the next scenario, the default is save=yes. Do not confuse this with saving of replays for the current scenario.&lt;br /&gt;
* '''replay_save''': whether a replay save for the current scenario is allowed, the default is replay_save=yes. If yes, the player's settings in preferences will be used to determine if a replay is saved. If no, will override and not save a replay.&lt;br /&gt;
* '''linger_mode''': If ...=yes, the screen is greyed out and there's the possibility to save before advancing to the next scenario, the default is linger_mode=yes.&lt;br /&gt;
* '''reveal_map''': (Multiplayer only) (Default is 'yes') If 'no', shroud doesn't disappear when game ended.&lt;br /&gt;
* '''next_scenario''': (default specified in '''[scenario]''' tag) the ID of the next scenario that should be played.  All units that side 1 controls at this point become available for recall in ''next_scenario''.&lt;br /&gt;
* '''carryover_percentage''': by default 80% of the gold is carried over to the next scenario, with this key the amount can be changed.&lt;br /&gt;
* '''carryover_add''': if true the gold will be added to the starting gold the next scenario, if false the next scenario will start with the amount of the current scenario (after taxes) or the minimum in the next scenario. Default is false.&lt;br /&gt;
* '''music''': (default specified in '''[scenario]''' or '''[game_config]''' tags) a comma-separated list of music tracks from which one will be chosen and played once after any events related to the end of level result are executed; by default, victory_music is used on victory, and defeat_music on defeat.&lt;br /&gt;
* '''end_credits''': {{DevFeature1.11}} Whether to display the credits screen at the end of a single-player campaign. Defaults to ''yes''. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
* '''end_text''': (translatable) Text that is shown centered in a black screen at the end of a campaign. Defaults to &amp;quot;The End&amp;quot;. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
* '''end_text_duration''': Delay, in milliseconds, before displaying the game credits at the end of a campaign. In other words, for how much time '''end_text''' is displayed on screen. Defaults to 3500. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
&lt;br /&gt;
=== [unit] ===&lt;br /&gt;
Places a unit on the map.  For syntax see [[SingleUnitWML]].&lt;br /&gt;
* {{Short Note:Predefined Macro|GENERIC_UNIT}}&lt;br /&gt;
* '''to_variable''':  spawn directly into a variable instead of on the map.&lt;br /&gt;
&lt;br /&gt;
=== [recall] ===&lt;br /&gt;
Recalls a unit.  The unit is recalled free of charge, and is placed near the leader.&lt;br /&gt;
* [[StandardUnitFilter]]: the first matching unit will be recalled.  If no units match this tag is ignored. Do not use a [filter] tag. If a comma separated list is given, every unit currently considered for recall is checked against all the types (not each single one of the types against all units).&lt;br /&gt;
* '''x,y''': the unit is placed here instead of next to the leader.&lt;br /&gt;
* '''show''': yes/no, default yes: whether the unit is animated (faded in) or instantly displayed&lt;br /&gt;
* '''fire_event''': boolean yes|no (default no); whether any according prerecall or recall events shall be fired.&lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): If yes, checks for terrain passability when placing the unit (a nearby passable hex is chosen).&lt;br /&gt;
&lt;br /&gt;
=== [teleport] ===&lt;br /&gt;
Teleports a unit on map. {{Short Note:Predefined Macro|TELEPORT_UNIT}}&lt;br /&gt;
* '''[filter]''': [[StandardUnitFilter]] the first unit matching this filter will be teleported.&lt;br /&gt;
* '''x,y''': the position to teleport to.&lt;br /&gt;
* '''clear_shroud''': should shroud be cleared on arrival&lt;br /&gt;
* '''animate''': should a teleport animation be played (if the unit doesn't have a teleport animation, it will fade out/fade in)&lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): normally, units will not be teleported into terrain that is impassable for them. Setting this attribute to &amp;quot;no&amp;quot; permits it.&lt;br /&gt;
&lt;br /&gt;
(Note: There is also a ability named teleport, see [[AbilitiesWML]].)&lt;br /&gt;
&lt;br /&gt;
=== [terrain_mask] ===&lt;br /&gt;
Changes the terrain on the map.  See [[TerrainMaskWML]].&lt;br /&gt;
&lt;br /&gt;
=== [terrain] ===&lt;br /&gt;
Changes the terrain on the map.&lt;br /&gt;
* '''terrain''': the character of the terrain to use.  See [[TerrainCodesWML]] to see what letter a type of terrain uses.&lt;br /&gt;
* [[StandardLocationFilter]]. This [[StandardLocationFilter]]'s terrain= key is used for the new terrain, filtering by terrain can be done with a nested [[StandardLocationFilter]]: [and]terrain=terrain_string_to_be_filtered_for.&lt;br /&gt;
* '''layer''': (overlay|base|both, default=both) only change the specified layer.&lt;br /&gt;
* '''replace_if_failed''': (default=no) When replacing just one layer failed, try to replace the whole terrain. If '''terrain''' is an overlay only terrain, use the default_base as base layer. If the terrain has no default base, do nothing.&lt;br /&gt;
&lt;br /&gt;
=== [gold] ===&lt;br /&gt;
Gives sides gold.&lt;br /&gt;
* '''amount''': the amount of gold to give.&lt;br /&gt;
* '''side''': (default=1) the number of the side to give the gold to. Can be a comma-separated list of sides. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument {{DevFeature1.11}}: [gold][filter_side] is deprecated, use the new inline SSF.&lt;br /&gt;
&lt;br /&gt;
=== [unstore_unit] ===&lt;br /&gt;
Creates a unit from a game variable, and activates it on the playing field.  This must be a specific variable describing a unit, and may not be an array -- to unstore an entire array, iterate over it.  The variable is not cleared.  See also [[InternalActionsWML#.5Bstore_unit.5D|[store_unit]]], [[ConditionalActionsWML#.5Bwhile.5D|[while]]] and [[InternalActionsWML#.5Bclear_variable.5D|[clear_variable]]]. Note units with a negative amount of hitpoints will be unstored with 1 hitpoint.&lt;br /&gt;
* '''variable''': the name of the variable.&lt;br /&gt;
* '''find_vacant''': whether the unit should be placed on the nearest vacant tile to its specified location.  If this is set to 'no'(default), then any unit on the same tile as the unit being unstored will be destroyed. &lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): If yes, checks for terrain passability when placing the unit. This key has no effect if find_vacant=no (no check performed then). Before 1.9 this key is always &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''text''': (translatable) floating text to display above the unit, such as a damage amount&lt;br /&gt;
* '''red''', '''green''', '''blue''': (default=0,0,0) the color to display the text in. Values vary from 0-255. You may find it convenient to use the {COLOR_HARM} or {COLOR_HEAL} macro instead. (Use {COLOR_HARM} or {COLOR_HEAL} instead of the whole red,green,blue= line.)&lt;br /&gt;
* '''advance''': (default=true) if true the unit is advanced if it has enough XP. When modifying XP make sure to do it from inside a [[EventWML#Multiplayer_safety|synchronized event]] or it may lead to OOS errors especially when several advancement paths exist. Note that advance and post advance events are called, so infinite loops can happen.&lt;br /&gt;
* '''fire_event''': (boolean yes|no, default no) Whether any advance/post advance events shall be fired if an advancement takes place, no effect otherwise.&lt;br /&gt;
* '''x''' ,'''y''': override unit location, &amp;quot;x,y=recall,recall&amp;quot; will put the unit on the unit's side's recall list.&lt;br /&gt;
&lt;br /&gt;
=== [allow_recruit] ===&lt;br /&gt;
Allows a side to recruit units it couldn't previously recruit.&lt;br /&gt;
* '''type''': the types of units that the side can now recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that is being allowed to recruit the units. This can be a comma-separated list note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [allow_extra_recruit] ===&lt;br /&gt;
Allows a leader to recruit units it couldn't previously recruit.&lt;br /&gt;
These types add to the types the leader can recruit because of [side]recruit=.&lt;br /&gt;
* '''extra_recruit''': the types of units that the unit can now recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_recruit] ===&lt;br /&gt;
Prevents a side from recruiting units it could previously recruit.&lt;br /&gt;
* '''type''': the types of units that the side can no longer recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that may no longer recruit the units. This can be a comma-separated list note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_extra_recruit] ===&lt;br /&gt;
Prevents a leader from recruiting units it could previously recruit.&lt;br /&gt;
* '''extra_recruit''': the types of units that the side can no longer recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [set_recruit] ===&lt;br /&gt;
Sets the units a side can recruit.&lt;br /&gt;
* '''recruit''': the types of units that the side can now recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that is having its recruitment set. This can be a comma-separated list. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [set_extra_recruit] === &lt;br /&gt;
Sets the units a leader can recruit.&lt;br /&gt;
* '''extra_recruit''': the types of units that the leader can now recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [modify_side] ===&lt;br /&gt;
Modifies some details of a given side in the middle of a scenario.  '''The following listed properties are the only properties that [modify_side] can affect!'''&lt;br /&gt;
* '''side''': (default=1) the number of the side that is to be changed. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* '''income''': the income given at the begining of each turn.&lt;br /&gt;
* '''team_name''': the team in which the side plays the scenario.&lt;br /&gt;
* '''user_team_name''': a translatable string representing the team's description. This has no effect on alliances. Defaults to ''team_name''.&lt;br /&gt;
* '''gold''': the amount of gold the side owns.&lt;br /&gt;
* '''village_gold''': the income setting per village for the side.&lt;br /&gt;
* '''controller''': the identifier string of the side's controller. Uses the same syntax of the ''controller'' key in the [[SideWML|[side]]] tag.&lt;br /&gt;
* '''fog''': a boolean string (yes/no) describing the status of Fog for the side.&lt;br /&gt;
* '''shroud''': a boolean string describing the status of Shroud for the side.&lt;br /&gt;
* '''hidden''': a boolean string specifying whether side is shown in status table.&lt;br /&gt;
* '''color''': {{DevFeature1.11}} a team color range specification, name (e.g. &amp;quot;red&amp;quot;, &amp;quot;blue&amp;quot;), or number (e.g. &amp;quot;1&amp;quot;, &amp;quot;2&amp;quot;) for this side. The default color range names, numbers, and definitions can be found in data/core/team_colors.cfg.&lt;br /&gt;
* '''[ai]''': replaces a side's AI parameters with the new specified ones. Uses the same syntax described in [[AiWML]].&lt;br /&gt;
* '''switch_ai''': replaces a side ai with a new AI from specified file(ignoring those AI parameters above). Path to file follows the usual WML convention.&lt;br /&gt;
* '''share_maps''': change the share_maps side attribute. Be sure to use shroud=yes for that side and have it as an ally&lt;br /&gt;
* '''share_view''': change the share_view side attribute. Be sure to use fog=yes for that side and have it as an ally&lt;br /&gt;
&lt;br /&gt;
=== [modify_turns] ===&lt;br /&gt;
Modifies the turn limit in the middle of a scenario.&lt;br /&gt;
* '''value''': the new turn limit.&lt;br /&gt;
* '''add''': if used instead of ''value'', specifies the number of turns to add to the current limit (can be negative).&lt;br /&gt;
* '''current''': changes the current turn number after applying turn limit modifications, if any. It is not possible to change the turn number to exceed the turn limit (1 &amp;lt;= current turns &amp;lt;= max turns).&lt;br /&gt;
&lt;br /&gt;
=== [allow_end_turn] ===&lt;br /&gt;
Allows human players to end their turn through the user interface if they were previously affected by the '''[disallow_end_turn]''' action. This action doesn't take any arguments.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_end_turn] ===&lt;br /&gt;
Disallows human players to end their turn through the user interface. This action doesn't take any arguments.&lt;br /&gt;
&lt;br /&gt;
=== [capture_village] ===&lt;br /&gt;
Changes the ownership of a village.&lt;br /&gt;
* [[StandardLocationFilter]]: all village locations matching the filter are affected.&lt;br /&gt;
* '''side''': the side that takes control of the village. This side needs to have a leader (canrecruit=yes). If the side key is not given, the village will become neutral (unless [filter_side] is present, in which case that side fiter decides, see below).&lt;br /&gt;
* '''[filter_side]''' with [[StandardSideFilter]] tags and keys as arguments; if both this tag and inline side= are present it's an error. Otherwise, the first matching side gets ownership (or the village becomes neutral if none match).&lt;br /&gt;
* '''fire_event''' (boolean yes|no, default: no): Whether any capture events shall be fired.&lt;br /&gt;
&lt;br /&gt;
=== [kill] ===&lt;br /&gt;
Removes all units (including units in a recall list) that match the filter from the game.&lt;br /&gt;
* [[StandardUnitFilter]]: Selection criterion; do not use a [filter] tag.&lt;br /&gt;
* '''animate''': if 'yes', displays the unit dying (fading away).&lt;br /&gt;
* '''fire_event''': if 'yes', triggers any appropriate 'die' events (See [[EventWML]]). Note that events are only fired for killed units that have been on the map (as opposed to recall list).&lt;br /&gt;
* '''[secondary_unit]''' with a [[StandardUnitFilter]] as argument. Do not use a [filter] tag. Has an effect only if fire_event=yes. The first on-map unit matching the filter becomes second_unit in any fired die and last breath events. If an on-map unit matches and if there are several units killed with a single [kill] tag, second_unit is this same unit for all of them. If no on-map unit matches or [secondary_unit] isn't present, the variable second_unit in each of the die and last breath events is always the same as the variable unit (the dying unit).&lt;br /&gt;
&lt;br /&gt;
=== [move_unit] ===&lt;br /&gt;
works like the MOVE_UNIT macro.&lt;br /&gt;
* [[StandardUnitFilter]] as argument; do not use a [filter] tag. All units matching the filter are moved. If the target location is occupied, the nearest free passable location is chosen. All target locations passed (see below) need to be passable hexes for the particular moved units.&lt;br /&gt;
* '''to_x''' (unsigned integer): The units are moved to this x coordinate. Can be a comma-separated list, in which case the unit follows this given path during the move.&lt;br /&gt;
* '''to_y''' (unsigned integer): The units are moved to this y coordinate. Can be a comma-separated list.&lt;br /&gt;
* '''fire_event''' (optional, boolean yes|no, default no): Whether any according moveto events shall be fired. The target location ($x1, $y1 in the event) may not be the same location that the unit was tried to be moved to, if the original target location is occupied or impassable.&lt;br /&gt;
* '''check_passability''' (boolean yes|no, default yes): Whether the terrain the unit is moved to should be checked for suiting the unit. (If it does not, a nearby suitable hex is chosen.)&lt;br /&gt;
&lt;br /&gt;
=== [modify_ai] ===&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
Changes the AI for a specified side. See [[Customizing_AI_in_Wesnoth_1.8#.5Bmodify_ai.5D_tag]]&lt;br /&gt;
&lt;br /&gt;
=== [modify_unit] ===&lt;br /&gt;
works similar to the MODIFY_UNIT macro.&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. All units matching this filter are modified. Matches on recall list units too.&lt;br /&gt;
* Accepts generally the syntax inside of wml unit variables created by [store_unit] which can be viewed in a savefile or by using the :inspect command. Can add traits with immediate effect. Cannot remove things. Subtags with the same name must be written in the correct order to match them with the tag they are supposed to modify.&lt;br /&gt;
example usage (see also the test scenario):&lt;br /&gt;
 [modify_unit]&lt;br /&gt;
     [filter]&lt;br /&gt;
         type=Troll Rocklobber&lt;br /&gt;
     [/filter]&lt;br /&gt;
     hitpoints=10&lt;br /&gt;
     [modifications]&lt;br /&gt;
         [trait]&lt;br /&gt;
             # first trait is unmodified&lt;br /&gt;
         [/trait]&lt;br /&gt;
         {TRAIT_HEALTHY}# second trait is replaced with the healthy trait&lt;br /&gt;
     [/modifications]&lt;br /&gt;
 [/modify_unit]&lt;br /&gt;
&lt;br /&gt;
The unit which is currently modified is accessible via $this_unit, e.g. hitpoints = &amp;quot;$($this_unit.hitpoints / 2)&amp;quot; to set the hitpoints of all units to half of their particular maxima. This this_unit variable is independent from the this_unit variable available in the SUF used to determine which units to modify (first all matching units are gathered, and then all those are modified).&lt;br /&gt;
&lt;br /&gt;
note: The syntax allowed is somehow vague. Just try things and possibly correct/add/modify this documentation. (a [http://forums.wesnoth.org/viewtopic.php?f=21&amp;amp;t=31676&amp;amp; forum thread] discusses some related issues).&lt;br /&gt;
&lt;br /&gt;
=== [transform_unit] ===&lt;br /&gt;
transforms every unit matching the filter to the given unit type. Keeps intact hitpoints, experience and status. If the unit is transformed to a non-living type (undead or mechanical), it will be also unpoisoned.&lt;br /&gt;
* [[StandardUnitFilter]]: do not use a [filter] tag.&lt;br /&gt;
* '''transform_to''': the unit type in which all the units matching the filter will be transformed. If missing, the units will follow their normal advancement.&lt;br /&gt;
&lt;br /&gt;
=== [petrify] ===&lt;br /&gt;
&lt;br /&gt;
* [[StandardUnitFilter]] as an argument. Do not use a [filter] tag. All units matching this filter are petrified. Recall list units are included.&lt;br /&gt;
&lt;br /&gt;
=== [unpetrify] ===&lt;br /&gt;
* [[StandardUnitFilter]] as an argument. Do not use a [filter] tag. All units matching this filter are unpetrified. Recall list units are included.&lt;br /&gt;
&lt;br /&gt;
=== [object] ===&lt;br /&gt;
Gives some unit an object and removes all items on the tile the unit is on.&lt;br /&gt;
* '''id''': (Optional) when the object is picked up, a flag is set for ''id''.  The object cannot be picked up if a flag for ''id'' has been set.  This means that any object with an id can only be used once, even if first_time_only=no is set for the event. This restriction is per level. In a campaign objects with the same id can be assigned once per level.&lt;br /&gt;
* '''delayed_variable_substitution''' (boolean yes|no, default no): If set to &amp;quot;yes&amp;quot;, the wml block contained in this [object] is not variable-substituted at execution time of the event where this [object] is within. You need this to work around a bug when adding ABILITY_TELEPORT via an [object] or when using [object][effect][filter]with a $this_unit (see http://gna.org/bugs/index.php?18893).&lt;br /&gt;
* '''[effect]''': one or more effect elements may be listed.  See [[EffectWML]] for a description of [effect].&lt;br /&gt;
* '''duration''': if 'level', effects only last until the end of the level (note : 'level' is the scenario, so this doesn't mean it last until the unit levels-up).&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. The first unit found that matches the filter will be given the object.  If no unit matches the filter, then a message is displayed and the object is not removed.&lt;br /&gt;
* '''[then]''': a subtag that lets you execute actions if the filter conditions are met.  The most common action that should be inside here is a '''[removeitem]''' tag, but you could probably put any tags that otherwise work in a [then] tag.&lt;br /&gt;
* '''silent''': whether or not messages should be suppressed. Default is &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''image''': the displayed image of the object.&lt;br /&gt;
* '''name''': (translatable) displayed as a caption of the image.&lt;br /&gt;
&lt;br /&gt;
* '''description''': (translatable) displayed as a message of the image.&lt;br /&gt;
* '''cannot_use_message''': (translatable) displayed instead of '''description''' if no unit passes the filter test.&lt;br /&gt;
* If you do not supply a filter, the object action will be applied to a unit at the location of the moveto event. Currently this isn't recommended as it is not clear that this will continue working this way. Instead it is better to explicitly include a location filter.&lt;br /&gt;
* The object action does not act on units in the recall list. There is a feature request in to allow this, but it is not clear whether or not it will be accepted.&lt;br /&gt;
&lt;br /&gt;
=== [remove_shroud] ===&lt;br /&gt;
Removes some shroud from the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
* '''side''': (default=1) the side for which to remove shroud. This can be a comma-separated list of sides. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* [[StandardLocationFilter]]: the range of tiles for which shroud should be removed&lt;br /&gt;
&lt;br /&gt;
=== [place_shroud] ===&lt;br /&gt;
Places some shroud on the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
* '''side''': (default=1) the side for which to place shroud. This can be a comma-separated list. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* [[StandardLocationFilter]]: the range of tiles on which shroud should be placed&lt;br /&gt;
&lt;br /&gt;
=== [allow_undo] ===&lt;br /&gt;
Allows the player to undo the event that this tag is inside.  Has an effect only inside moveto events.  If the move is undone, only the position of the unit will be restored; any altered variables or changes to the game will remain changed after the move is undone.  It is up to the scenario designer to avoid abusing this command.&lt;br /&gt;
* Technically, if '''[allow_undo]''' is inside an '''[event]''' with ''first_time_only=yes'' (the default setting), and the user undoes the event, then the state of the game has changed in this way: the event will not fire a second time, even though the user undid the move the first time.&lt;br /&gt;
&lt;br /&gt;
=== [heal_unit] ===&lt;br /&gt;
Heal a unit. The variable '''$heal_amount''' will be set to the exact number of points healed (i.e can be lesser than the parameter '''amount''' if the unit is fully healed). $heal_amount contains only the number of hitpoints the first unit that was found got healed.&lt;br /&gt;
*  '''[filter]''': [[StandardUnitFilter]] All matching on-map units are healed. If no filter is supplied, it is tried to take the unit at $x1, $y1.&lt;br /&gt;
*  '''[filter_second]''': [[StandardUnitFilter]] all the units matching the filter ''and'' having the ''heals'' ability will have their animation played (if ''animate'' is set to true) for each of the units healed.&lt;br /&gt;
*  '''amount''': (integer, default full) the maximum points the unit(s) will be healed. Can't set below 1 or above max_hitpoints. If &amp;quot;full&amp;quot;, sets hitpoints to max_hitpoints. Before 1.9 the default is 0.&lt;br /&gt;
*  '''animate''': a boolean which indicate if the healing animations must be played. (default no)&lt;br /&gt;
*  '''moves''': (integer, default 0) The maximum current movement points the units will be &amp;quot;healed&amp;quot;. Can't set below 0 or above max_moves. If &amp;quot;full&amp;quot;, sets moves to max_moves.&lt;br /&gt;
* '''restore_attacks''': (boolean, default no) Whether the units' attacks_left should be reset to their max_attacks (usually 1).&lt;br /&gt;
* '''restore_statuses''': (boolean, default yes) Whether standard statuses should be reset to &amp;quot;no&amp;quot;. This affects poisoned, slowed, petrified and unhealable. Before 1.9 this is always &amp;quot;no&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== [harm_unit] ===&lt;br /&gt;
Harms every unit matching the filter, for the specific damage amount.&lt;br /&gt;
*  '''[filter]''': [[StandardUnitFilter]] all matching units will be harmed (required).&lt;br /&gt;
*  '''[filter_second]''': [[StandardUnitFilter]] if present, the first matching unit will attack all the units matching the filter above.&lt;br /&gt;
*  '''amount''': the amount of damage that will be done (required).&lt;br /&gt;
*  '''alignment''': (default neutral) applies an alignment to the damage, this means that if alignment=chaotic, the damage will be increased at night and reduced at day.&lt;br /&gt;
*  '''damage_type''': if present, amount will be altered by unit resistance to the damage type specified.&lt;br /&gt;
*  '''kill''': (default yes) if yes, when an harmed unit goes to or below 0 HP, it is killed; if no its HP are set to 1.&lt;br /&gt;
*  '''fire_event''': (default no) if yes, when a unit is killed by harming, the corresponding events are fired.&lt;br /&gt;
*  '''animate''': (default no) if yes, scrolls to each unit before harming it and plays its defense (or attack, if it's the harmer) and death animations. Special values supported, other than the usual yes and no, are &amp;quot;attacker&amp;quot;, that means only the harmer will be animated, and &amp;quot;defender&amp;quot;, that means only the harmed units will be animated.&lt;br /&gt;
*  '''[primary_attack], [secondary_attack]''': these set the weapon against which the harmed units will defend, and that the harming unit will use to attack, respectively (notice this is the opposite of '''[filter]''' and '''[filter_second]''' above). This allows for playing specific defense and attack animations. Both tags are expected to contain a [[FilterWML#Filtering_Weapons|Standard Weapon Filter]].&lt;br /&gt;
*  '''delay''': if animate=yes, sets the delay (in milliseconds, default 500) between each unit harming.&lt;br /&gt;
*  '''variable''': if present, the damage caused to the unit, altered by resistances, will be stored in a WML array with the given name, under the &amp;quot;harm_amount&amp;quot; key.&lt;br /&gt;
*  '''poisoned, slowed, petrified, unhealable''': (default no) if yes, every harmed unit that doesn't already have such status will have it set.&lt;br /&gt;
*  '''experience''': if yes, and there is an harmer, experience will be attributed like in regular combat.&lt;br /&gt;
&lt;br /&gt;
=== [time_area] ===&lt;br /&gt;
How a day should progress in a given area. Everywhere not specified in a [time_area] tag is affected by the [time] tags in the [scenario] tag.&lt;br /&gt;
* [[StandardLocationFilter]]: the locations to affect. ''note: only for [event][time_area]s - at scenario toplevel [time_area] does not support [[StandardLocationFilter]], only location ranges''&lt;br /&gt;
* [[TimeWML]]: the new schedule.&lt;br /&gt;
* '''id''': an unique identifier assigned to a time_area. Optional, unless you want to remove the time_area later. Can be a comma-separated list when removing time_areas, see below.&lt;br /&gt;
* '''remove''': (boolean) yes/no value. Indicates whether the specified time_area should be removed. Requires an identifier. If no identifier is used, however, all time_areas are removed.&lt;br /&gt;
&lt;br /&gt;
=== [end_turn] ===&lt;br /&gt;
End the current side's turn. The current event is finished before the turn is ended. Also, if the current event (where the tag appears) has been fired by another event, that event (and the complete stack of other possible parent events) is ended before [end_turn] comes into affect. Also, events following the event stack that fired [end_turn] are not omitted (e.g. [end_turn] is used by a side turn event and a turn refresh event does something afterwards).&lt;br /&gt;
&lt;br /&gt;
=== [replace_map] ===&lt;br /&gt;
&lt;br /&gt;
Replaces the entire map.&lt;br /&gt;
* '''map''': Content of a wesnoth map file. example:&lt;br /&gt;
 map=&amp;quot;{campaigns/Heir_To_The_Throne/maps/01_The_Elves_Besieged.map}&amp;quot;&lt;br /&gt;
* '''expand''': if 'yes', allows the map size to increase. The expansion direction is currently always bottom-right.&lt;br /&gt;
* '''shrink''': if 'yes', allows the map size to decrease. If the map size is reduced, any units that would no longer be on the map due to its coordinates no longer existing will be put into the recall list.&lt;br /&gt;
&lt;br /&gt;
=== [replace_schedule] ===&lt;br /&gt;
Replace the time of day schedule of the entire scenario.&lt;br /&gt;
* [[TimeWML]]: the new schedule.&lt;br /&gt;
&lt;br /&gt;
=== [tunnel] ===&lt;br /&gt;
&lt;br /&gt;
Create a tunnel between some locations, later usable by units to move from source hex to target hex (using the movement cost of unit on the target terrain). ([http://forums.wesnoth.org/viewtopic.php?f=21&amp;amp;t=14749&amp;amp;p=405667&amp;amp;hilit=tunnel#p405667 source])&lt;br /&gt;
&lt;br /&gt;
* '''id''' identifier for the tunnel, to allow removing (optional).&lt;br /&gt;
* '''remove''': (boolean) yes/no value. If yes, removes all defined tunnels with the same ID (then only id= is necessary). (default: no)&lt;br /&gt;
* '''bidirectional''': (boolean) if yes, creates also a tunnel in the other direction. (default: yes)&lt;br /&gt;
* '''always_visible''': (boolean) if yes, the possible movement of enemies under fog can be seen. (default: no)&lt;br /&gt;
* '''[source]''': [[StandardLocationFilter]] the source hex(es) (required).&lt;br /&gt;
* '''[target]''': [[StandardLocationFilter]] the target hex(es) (required).&lt;br /&gt;
* '''[filter]''': [[StandardUnitFilter]] the units which can use the tunnel (required). Leave empty for &amp;quot;all units&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(Note: The tunnel tag can also be used inside the [[AbilitiesWML|[teleport]]] ability, without remove= and id=).&lt;br /&gt;
&lt;br /&gt;
== Useful Macros ==&lt;br /&gt;
There are some predefined macros that you find useful for direct actions. You can find a complete list along with a detailed explanation of how they work [http://www.wesnoth.org/macro-reference.xhtml here].&lt;br /&gt;
* '''{MOVE_UNIT}''': Moves a unit to another location in the map and the player sees the movement (unlike [teleport])&lt;br /&gt;
* '''{FULL_HEAL}''': Brings a unit to full HP&lt;br /&gt;
* '''{LOYAL_UNIT}''': Create a loyal unit&lt;br /&gt;
* '''{MODIFY_TERRAIN_MASK}''': Modify an area of terrain&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[InternalActionsWML]]&lt;br /&gt;
* [[InterfaceActionsWML]]&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;br /&gt;
[[Category: ActionsWML]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=45246</id>
		<title>DirectActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=45246"/>
		<updated>2012-02-14T21:44:05Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* [gold] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== Direct actions ==&lt;br /&gt;
&lt;br /&gt;
Direct actions are actions that have a direct effect on gameplay. They can be used inside of [[EventWML|events]].&lt;br /&gt;
&lt;br /&gt;
The following tags are actions:&lt;br /&gt;
&lt;br /&gt;
=== [endlevel] ===&lt;br /&gt;
Ends the scenario.&lt;br /&gt;
* '''result''': before the scenario is over, all events with ''name=result'' are triggered. If ''result=victory'', the player progresses to the next level; if ''result=defeat'', the game returns to the main menu. &lt;br /&gt;
&lt;br /&gt;
When the result is &amp;quot;victory&amp;quot; the following keys can be used:&lt;br /&gt;
* '''bonus''': whether the player should get bonus gold (maximum possible gold that could have been earned by waiting the level out). The default is bonus=yes.&lt;br /&gt;
* '''carryover_report''': whether the player should receive a summary of the scenario outcome, the default is carryover_report=yes.&lt;br /&gt;
* '''save''': whether a start-of-scenario save should be created for the next scenario, the default is save=yes. Do not confuse this with saving of replays for the current scenario.&lt;br /&gt;
* '''replay_save''': whether a replay save for the current scenario is allowed, the default is replay_save=yes. If yes, the player's settings in preferences will be used to determine if a replay is saved. If no, will override and not save a replay.&lt;br /&gt;
* '''linger_mode''': If ...=yes, the screen is greyed out and there's the possibility to save before advancing to the next scenario, the default is linger_mode=yes.&lt;br /&gt;
* '''reveal_map''': (Multiplayer only) (Default is 'yes') If 'no', shroud doesn't disappear when game ended.&lt;br /&gt;
* '''next_scenario''': (default specified in '''[scenario]''' tag) the ID of the next scenario that should be played.  All units that side 1 controls at this point become available for recall in ''next_scenario''.&lt;br /&gt;
* '''carryover_percentage''': by default 80% of the gold is carried over to the next scenario, with this key the amount can be changed.&lt;br /&gt;
* '''carryover_add''': if true the gold will be added to the starting gold the next scenario, if false the next scenario will start with the amount of the current scenario (after taxes) or the minimum in the next scenario. Default is false.&lt;br /&gt;
* '''music''': (default specified in '''[scenario]''' or '''[game_config]''' tags) a comma-separated list of music tracks from which one will be chosen and played once after any events related to the end of level result are executed; by default, victory_music is used on victory, and defeat_music on defeat.&lt;br /&gt;
* '''end_credits''': {{DevFeature1.11}} Whether to display the credits screen at the end of a single-player campaign. Defaults to ''yes''. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
* '''end_text''': (translatable) Text that is shown centered in a black screen at the end of a campaign. Defaults to &amp;quot;The End&amp;quot;. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
* '''end_text_duration''': Delay, in milliseconds, before displaying the game credits at the end of a campaign. In other words, for how much time '''end_text''' is displayed on screen. Defaults to 3500. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
&lt;br /&gt;
=== [unit] ===&lt;br /&gt;
Places a unit on the map.  For syntax see [[SingleUnitWML]].&lt;br /&gt;
* {{Short Note:Predefined Macro|GENERIC_UNIT}}&lt;br /&gt;
* '''to_variable''':  spawn directly into a variable instead of on the map.&lt;br /&gt;
&lt;br /&gt;
=== [recall] ===&lt;br /&gt;
Recalls a unit.  The unit is recalled free of charge, and is placed near the leader.&lt;br /&gt;
* [[StandardUnitFilter]]: the first matching unit will be recalled.  If no units match this tag is ignored. Do not use a [filter] tag. If a comma separated list is given, every unit currently considered for recall is checked against all the types (not each single one of the types against all units).&lt;br /&gt;
* '''x,y''': the unit is placed here instead of next to the leader.&lt;br /&gt;
* '''show''': yes/no, default yes: whether the unit is animated (faded in) or instantly displayed&lt;br /&gt;
* '''fire_event''': boolean yes|no (default no); whether any according prerecall or recall events shall be fired.&lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): If yes, checks for terrain passability when placing the unit (a nearby passable hex is chosen).&lt;br /&gt;
&lt;br /&gt;
=== [teleport] ===&lt;br /&gt;
Teleports a unit on map. {{Short Note:Predefined Macro|TELEPORT_UNIT}}&lt;br /&gt;
* '''[filter]''': [[StandardUnitFilter]] the first unit matching this filter will be teleported.&lt;br /&gt;
* '''x,y''': the position to teleport to.&lt;br /&gt;
* '''clear_shroud''': should shroud be cleared on arrival&lt;br /&gt;
* '''animate''': should a teleport animation be played (if the unit doesn't have a teleport animation, it will fade out/fade in)&lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): normally, units will not be teleported into terrain that is impassable for them. Setting this attribute to &amp;quot;no&amp;quot; permits it.&lt;br /&gt;
&lt;br /&gt;
(Note: There is also a ability named teleport, see [[AbilitiesWML]].)&lt;br /&gt;
&lt;br /&gt;
=== [terrain_mask] ===&lt;br /&gt;
Changes the terrain on the map.  See [[TerrainMaskWML]].&lt;br /&gt;
&lt;br /&gt;
=== [terrain] ===&lt;br /&gt;
Changes the terrain on the map.&lt;br /&gt;
* '''terrain''': the character of the terrain to use.  See [[TerrainCodesWML]] to see what letter a type of terrain uses.&lt;br /&gt;
* [[StandardLocationFilter]]. This [[StandardLocationFilter]]'s terrain= key is used for the new terrain, filtering by terrain can be done with a nested [[StandardLocationFilter]]: [and]terrain=terrain_string_to_be_filtered_for.&lt;br /&gt;
* '''layer''': (overlay|base|both, default=both) only change the specified layer.&lt;br /&gt;
* '''replace_if_failed''': (default=no) When replacing just one layer failed, try to replace the whole terrain. If '''terrain''' is an overlay only terrain, use the default_base as base layer. If the terrain has no default base, do nothing.&lt;br /&gt;
&lt;br /&gt;
=== [gold] ===&lt;br /&gt;
Gives one side gold.&lt;br /&gt;
* '''amount''': the amount of gold to give.&lt;br /&gt;
* '''side''': (default=1) the number of the side to give the gold to. Can be a comma-separated list of sides. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument {{DevFeature1.11}}: [gold][filter_side] is deprecated, use the new inline SSF.&lt;br /&gt;
&lt;br /&gt;
=== [unstore_unit] ===&lt;br /&gt;
Creates a unit from a game variable, and activates it on the playing field.  This must be a specific variable describing a unit, and may not be an array -- to unstore an entire array, iterate over it.  The variable is not cleared.  See also [[InternalActionsWML#.5Bstore_unit.5D|[store_unit]]], [[ConditionalActionsWML#.5Bwhile.5D|[while]]] and [[InternalActionsWML#.5Bclear_variable.5D|[clear_variable]]]. Note units with a negative amount of hitpoints will be unstored with 1 hitpoint.&lt;br /&gt;
* '''variable''': the name of the variable.&lt;br /&gt;
* '''find_vacant''': whether the unit should be placed on the nearest vacant tile to its specified location.  If this is set to 'no'(default), then any unit on the same tile as the unit being unstored will be destroyed. &lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): If yes, checks for terrain passability when placing the unit. This key has no effect if find_vacant=no (no check performed then). Before 1.9 this key is always &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''text''': (translatable) floating text to display above the unit, such as a damage amount&lt;br /&gt;
* '''red''', '''green''', '''blue''': (default=0,0,0) the color to display the text in. Values vary from 0-255. You may find it convenient to use the {COLOR_HARM} or {COLOR_HEAL} macro instead. (Use {COLOR_HARM} or {COLOR_HEAL} instead of the whole red,green,blue= line.)&lt;br /&gt;
* '''advance''': (default=true) if true the unit is advanced if it has enough XP. When modifying XP make sure to do it from inside a [[EventWML#Multiplayer_safety|synchronized event]] or it may lead to OOS errors especially when several advancement paths exist. Note that advance and post advance events are called, so infinite loops can happen.&lt;br /&gt;
* '''fire_event''': (boolean yes|no, default no) Whether any advance/post advance events shall be fired if an advancement takes place, no effect otherwise.&lt;br /&gt;
* '''x''' ,'''y''': override unit location, &amp;quot;x,y=recall,recall&amp;quot; will put the unit on the unit's side's recall list.&lt;br /&gt;
&lt;br /&gt;
=== [allow_recruit] ===&lt;br /&gt;
Allows a side to recruit units it couldn't previously recruit.&lt;br /&gt;
* '''type''': the types of units that the side can now recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that is being allowed to recruit the units. This can be a comma-separated list note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [allow_extra_recruit] ===&lt;br /&gt;
Allows a leader to recruit units it couldn't previously recruit.&lt;br /&gt;
These types add to the types the leader can recruit because of [side]recruit=.&lt;br /&gt;
* '''extra_recruit''': the types of units that the unit can now recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_recruit] ===&lt;br /&gt;
Prevents a side from recruiting units it could previously recruit.&lt;br /&gt;
* '''type''': the types of units that the side can no longer recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that may no longer recruit the units. This can be a comma-separated list note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_extra_recruit] ===&lt;br /&gt;
Prevents a leader from recruiting units it could previously recruit.&lt;br /&gt;
* '''extra_recruit''': the types of units that the side can no longer recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [set_recruit] ===&lt;br /&gt;
Sets the units a side can recruit.&lt;br /&gt;
* '''recruit''': the types of units that the side can now recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that is having its recruitment set. This can be a comma-separated list. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [set_extra_recruit] === &lt;br /&gt;
Sets the units a leader can recruit.&lt;br /&gt;
* '''extra_recruit''': the types of units that the leader can now recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [modify_side] ===&lt;br /&gt;
Modifies some details of a given side in the middle of a scenario.  '''The following listed properties are the only properties that [modify_side] can affect!'''&lt;br /&gt;
* '''side''': (default=1) the number of the side that is to be changed. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* '''income''': the income given at the begining of each turn.&lt;br /&gt;
* '''team_name''': the team in which the side plays the scenario.&lt;br /&gt;
* '''user_team_name''': a translatable string representing the team's description. This has no effect on alliances. Defaults to ''team_name''.&lt;br /&gt;
* '''gold''': the amount of gold the side owns.&lt;br /&gt;
* '''village_gold''': the income setting per village for the side.&lt;br /&gt;
* '''controller''': the identifier string of the side's controller. Uses the same syntax of the ''controller'' key in the [[SideWML|[side]]] tag.&lt;br /&gt;
* '''fog''': a boolean string (yes/no) describing the status of Fog for the side.&lt;br /&gt;
* '''shroud''': a boolean string describing the status of Shroud for the side.&lt;br /&gt;
* '''hidden''': a boolean string specifying whether side is shown in status table.&lt;br /&gt;
* '''color''': {{DevFeature1.11}} a team color range specification, name (e.g. &amp;quot;red&amp;quot;, &amp;quot;blue&amp;quot;), or number (e.g. &amp;quot;1&amp;quot;, &amp;quot;2&amp;quot;) for this side. The default color range names, numbers, and definitions can be found in data/core/team_colors.cfg.&lt;br /&gt;
* '''[ai]''': replaces a side's AI parameters with the new specified ones. Uses the same syntax described in [[AiWML]].&lt;br /&gt;
* '''switch_ai''': replaces a side ai with a new AI from specified file(ignoring those AI parameters above). Path to file follows the usual WML convention.&lt;br /&gt;
* '''share_maps''': change the share_maps side attribute. Be sure to use shroud=yes for that side and have it as an ally&lt;br /&gt;
* '''share_view''': change the share_view side attribute. Be sure to use fog=yes for that side and have it as an ally&lt;br /&gt;
&lt;br /&gt;
=== [modify_turns] ===&lt;br /&gt;
Modifies the turn limit in the middle of a scenario.&lt;br /&gt;
* '''value''': the new turn limit.&lt;br /&gt;
* '''add''': if used instead of ''value'', specifies the number of turns to add to the current limit (can be negative).&lt;br /&gt;
* '''current''': changes the current turn number after applying turn limit modifications, if any. It is not possible to change the turn number to exceed the turn limit (1 &amp;lt;= current turns &amp;lt;= max turns).&lt;br /&gt;
&lt;br /&gt;
=== [allow_end_turn] ===&lt;br /&gt;
Allows human players to end their turn through the user interface if they were previously affected by the '''[disallow_end_turn]''' action. This action doesn't take any arguments.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_end_turn] ===&lt;br /&gt;
Disallows human players to end their turn through the user interface. This action doesn't take any arguments.&lt;br /&gt;
&lt;br /&gt;
=== [capture_village] ===&lt;br /&gt;
Changes the ownership of a village.&lt;br /&gt;
* [[StandardLocationFilter]]: all village locations matching the filter are affected.&lt;br /&gt;
* '''side''': the side that takes control of the village. This side needs to have a leader (canrecruit=yes). If the side key is not given, the village will become neutral (unless [filter_side] is present, in which case that side fiter decides, see below).&lt;br /&gt;
* '''[filter_side]''' with [[StandardSideFilter]] tags and keys as arguments; if both this tag and inline side= are present it's an error. Otherwise, the first matching side gets ownership (or the village becomes neutral if none match).&lt;br /&gt;
* '''fire_event''' (boolean yes|no, default: no): Whether any capture events shall be fired.&lt;br /&gt;
&lt;br /&gt;
=== [kill] ===&lt;br /&gt;
Removes all units (including units in a recall list) that match the filter from the game.&lt;br /&gt;
* [[StandardUnitFilter]]: Selection criterion; do not use a [filter] tag.&lt;br /&gt;
* '''animate''': if 'yes', displays the unit dying (fading away).&lt;br /&gt;
* '''fire_event''': if 'yes', triggers any appropriate 'die' events (See [[EventWML]]). Note that events are only fired for killed units that have been on the map (as opposed to recall list).&lt;br /&gt;
* '''[secondary_unit]''' with a [[StandardUnitFilter]] as argument. Do not use a [filter] tag. Has an effect only if fire_event=yes. The first on-map unit matching the filter becomes second_unit in any fired die and last breath events. If an on-map unit matches and if there are several units killed with a single [kill] tag, second_unit is this same unit for all of them. If no on-map unit matches or [secondary_unit] isn't present, the variable second_unit in each of the die and last breath events is always the same as the variable unit (the dying unit).&lt;br /&gt;
&lt;br /&gt;
=== [move_unit] ===&lt;br /&gt;
works like the MOVE_UNIT macro.&lt;br /&gt;
* [[StandardUnitFilter]] as argument; do not use a [filter] tag. All units matching the filter are moved. If the target location is occupied, the nearest free passable location is chosen. All target locations passed (see below) need to be passable hexes for the particular moved units.&lt;br /&gt;
* '''to_x''' (unsigned integer): The units are moved to this x coordinate. Can be a comma-separated list, in which case the unit follows this given path during the move.&lt;br /&gt;
* '''to_y''' (unsigned integer): The units are moved to this y coordinate. Can be a comma-separated list.&lt;br /&gt;
* '''fire_event''' (optional, boolean yes|no, default no): Whether any according moveto events shall be fired. The target location ($x1, $y1 in the event) may not be the same location that the unit was tried to be moved to, if the original target location is occupied or impassable.&lt;br /&gt;
* '''check_passability''' (boolean yes|no, default yes): Whether the terrain the unit is moved to should be checked for suiting the unit. (If it does not, a nearby suitable hex is chosen.)&lt;br /&gt;
&lt;br /&gt;
=== [modify_ai] ===&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
Changes the AI for a specified side. See [[Customizing_AI_in_Wesnoth_1.8#.5Bmodify_ai.5D_tag]]&lt;br /&gt;
&lt;br /&gt;
=== [modify_unit] ===&lt;br /&gt;
works similar to the MODIFY_UNIT macro.&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. All units matching this filter are modified. Matches on recall list units too.&lt;br /&gt;
* Accepts generally the syntax inside of wml unit variables created by [store_unit] which can be viewed in a savefile or by using the :inspect command. Can add traits with immediate effect. Cannot remove things. Subtags with the same name must be written in the correct order to match them with the tag they are supposed to modify.&lt;br /&gt;
example usage (see also the test scenario):&lt;br /&gt;
 [modify_unit]&lt;br /&gt;
     [filter]&lt;br /&gt;
         type=Troll Rocklobber&lt;br /&gt;
     [/filter]&lt;br /&gt;
     hitpoints=10&lt;br /&gt;
     [modifications]&lt;br /&gt;
         [trait]&lt;br /&gt;
             # first trait is unmodified&lt;br /&gt;
         [/trait]&lt;br /&gt;
         {TRAIT_HEALTHY}# second trait is replaced with the healthy trait&lt;br /&gt;
     [/modifications]&lt;br /&gt;
 [/modify_unit]&lt;br /&gt;
&lt;br /&gt;
The unit which is currently modified is accessible via $this_unit, e.g. hitpoints = &amp;quot;$($this_unit.hitpoints / 2)&amp;quot; to set the hitpoints of all units to half of their particular maxima. This this_unit variable is independent from the this_unit variable available in the SUF used to determine which units to modify (first all matching units are gathered, and then all those are modified).&lt;br /&gt;
&lt;br /&gt;
note: The syntax allowed is somehow vague. Just try things and possibly correct/add/modify this documentation. (a [http://forums.wesnoth.org/viewtopic.php?f=21&amp;amp;t=31676&amp;amp; forum thread] discusses some related issues).&lt;br /&gt;
&lt;br /&gt;
=== [transform_unit] ===&lt;br /&gt;
transforms every unit matching the filter to the given unit type. Keeps intact hitpoints, experience and status. If the unit is transformed to a non-living type (undead or mechanical), it will be also unpoisoned.&lt;br /&gt;
* [[StandardUnitFilter]]: do not use a [filter] tag.&lt;br /&gt;
* '''transform_to''': the unit type in which all the units matching the filter will be transformed. If missing, the units will follow their normal advancement.&lt;br /&gt;
&lt;br /&gt;
=== [petrify] ===&lt;br /&gt;
&lt;br /&gt;
* [[StandardUnitFilter]] as an argument. Do not use a [filter] tag. All units matching this filter are petrified. Recall list units are included.&lt;br /&gt;
&lt;br /&gt;
=== [unpetrify] ===&lt;br /&gt;
* [[StandardUnitFilter]] as an argument. Do not use a [filter] tag. All units matching this filter are unpetrified. Recall list units are included.&lt;br /&gt;
&lt;br /&gt;
=== [object] ===&lt;br /&gt;
Gives some unit an object and removes all items on the tile the unit is on.&lt;br /&gt;
* '''id''': (Optional) when the object is picked up, a flag is set for ''id''.  The object cannot be picked up if a flag for ''id'' has been set.  This means that any object with an id can only be used once, even if first_time_only=no is set for the event. This restriction is per level. In a campaign objects with the same id can be assigned once per level.&lt;br /&gt;
* '''delayed_variable_substitution''' (boolean yes|no, default no): If set to &amp;quot;yes&amp;quot;, the wml block contained in this [object] is not variable-substituted at execution time of the event where this [object] is within. You need this to work around a bug when adding ABILITY_TELEPORT via an [object] or when using [object][effect][filter]with a $this_unit (see http://gna.org/bugs/index.php?18893).&lt;br /&gt;
* '''[effect]''': one or more effect elements may be listed.  See [[EffectWML]] for a description of [effect].&lt;br /&gt;
* '''duration''': if 'level', effects only last until the end of the level (note : 'level' is the scenario, so this doesn't mean it last until the unit levels-up).&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. The first unit found that matches the filter will be given the object.  If no unit matches the filter, then a message is displayed and the object is not removed.&lt;br /&gt;
* '''[then]''': a subtag that lets you execute actions if the filter conditions are met.  The most common action that should be inside here is a '''[removeitem]''' tag, but you could probably put any tags that otherwise work in a [then] tag.&lt;br /&gt;
* '''silent''': whether or not messages should be suppressed. Default is &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''image''': the displayed image of the object.&lt;br /&gt;
* '''name''': (translatable) displayed as a caption of the image.&lt;br /&gt;
&lt;br /&gt;
* '''description''': (translatable) displayed as a message of the image.&lt;br /&gt;
* '''cannot_use_message''': (translatable) displayed instead of '''description''' if no unit passes the filter test.&lt;br /&gt;
* If you do not supply a filter, the object action will be applied to a unit at the location of the moveto event. Currently this isn't recommended as it is not clear that this will continue working this way. Instead it is better to explicitly include a location filter.&lt;br /&gt;
* The object action does not act on units in the recall list. There is a feature request in to allow this, but it is not clear whether or not it will be accepted.&lt;br /&gt;
&lt;br /&gt;
=== [remove_shroud] ===&lt;br /&gt;
Removes some shroud from the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
* '''side''': (default=1) the side for which to remove shroud. This can be a comma-separated list of sides. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* [[StandardLocationFilter]]: the range of tiles for which shroud should be removed&lt;br /&gt;
&lt;br /&gt;
=== [place_shroud] ===&lt;br /&gt;
Places some shroud on the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
* '''side''': (default=1) the side for which to place shroud. This can be a comma-separated list. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* [[StandardLocationFilter]]: the range of tiles on which shroud should be placed&lt;br /&gt;
&lt;br /&gt;
=== [allow_undo] ===&lt;br /&gt;
Allows the player to undo the event that this tag is inside.  Has an effect only inside moveto events.  If the move is undone, only the position of the unit will be restored; any altered variables or changes to the game will remain changed after the move is undone.  It is up to the scenario designer to avoid abusing this command.&lt;br /&gt;
* Technically, if '''[allow_undo]''' is inside an '''[event]''' with ''first_time_only=yes'' (the default setting), and the user undoes the event, then the state of the game has changed in this way: the event will not fire a second time, even though the user undid the move the first time.&lt;br /&gt;
&lt;br /&gt;
=== [heal_unit] ===&lt;br /&gt;
Heal a unit. The variable '''$heal_amount''' will be set to the exact number of points healed (i.e can be lesser than the parameter '''amount''' if the unit is fully healed). $heal_amount contains only the number of hitpoints the first unit that was found got healed.&lt;br /&gt;
*  '''[filter]''': [[StandardUnitFilter]] All matching on-map units are healed. If no filter is supplied, it is tried to take the unit at $x1, $y1.&lt;br /&gt;
*  '''[filter_second]''': [[StandardUnitFilter]] all the units matching the filter ''and'' having the ''heals'' ability will have their animation played (if ''animate'' is set to true) for each of the units healed.&lt;br /&gt;
*  '''amount''': (integer, default full) the maximum points the unit(s) will be healed. Can't set below 1 or above max_hitpoints. If &amp;quot;full&amp;quot;, sets hitpoints to max_hitpoints. Before 1.9 the default is 0.&lt;br /&gt;
*  '''animate''': a boolean which indicate if the healing animations must be played. (default no)&lt;br /&gt;
*  '''moves''': (integer, default 0) The maximum current movement points the units will be &amp;quot;healed&amp;quot;. Can't set below 0 or above max_moves. If &amp;quot;full&amp;quot;, sets moves to max_moves.&lt;br /&gt;
* '''restore_attacks''': (boolean, default no) Whether the units' attacks_left should be reset to their max_attacks (usually 1).&lt;br /&gt;
* '''restore_statuses''': (boolean, default yes) Whether standard statuses should be reset to &amp;quot;no&amp;quot;. This affects poisoned, slowed, petrified and unhealable. Before 1.9 this is always &amp;quot;no&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== [harm_unit] ===&lt;br /&gt;
Harms every unit matching the filter, for the specific damage amount.&lt;br /&gt;
*  '''[filter]''': [[StandardUnitFilter]] all matching units will be harmed (required).&lt;br /&gt;
*  '''[filter_second]''': [[StandardUnitFilter]] if present, the first matching unit will attack all the units matching the filter above.&lt;br /&gt;
*  '''amount''': the amount of damage that will be done (required).&lt;br /&gt;
*  '''alignment''': (default neutral) applies an alignment to the damage, this means that if alignment=chaotic, the damage will be increased at night and reduced at day.&lt;br /&gt;
*  '''damage_type''': if present, amount will be altered by unit resistance to the damage type specified.&lt;br /&gt;
*  '''kill''': (default yes) if yes, when an harmed unit goes to or below 0 HP, it is killed; if no its HP are set to 1.&lt;br /&gt;
*  '''fire_event''': (default no) if yes, when a unit is killed by harming, the corresponding events are fired.&lt;br /&gt;
*  '''animate''': (default no) if yes, scrolls to each unit before harming it and plays its defense (or attack, if it's the harmer) and death animations. Special values supported, other than the usual yes and no, are &amp;quot;attacker&amp;quot;, that means only the harmer will be animated, and &amp;quot;defender&amp;quot;, that means only the harmed units will be animated.&lt;br /&gt;
*  '''[primary_attack], [secondary_attack]''': these set the weapon against which the harmed units will defend, and that the harming unit will use to attack, respectively (notice this is the opposite of '''[filter]''' and '''[filter_second]''' above). This allows for playing specific defense and attack animations. Both tags are expected to contain a [[FilterWML#Filtering_Weapons|Standard Weapon Filter]].&lt;br /&gt;
*  '''delay''': if animate=yes, sets the delay (in milliseconds, default 500) between each unit harming.&lt;br /&gt;
*  '''variable''': if present, the damage caused to the unit, altered by resistances, will be stored in a WML array with the given name, under the &amp;quot;harm_amount&amp;quot; key.&lt;br /&gt;
*  '''poisoned, slowed, petrified, unhealable''': (default no) if yes, every harmed unit that doesn't already have such status will have it set.&lt;br /&gt;
*  '''experience''': if yes, and there is an harmer, experience will be attributed like in regular combat.&lt;br /&gt;
&lt;br /&gt;
=== [time_area] ===&lt;br /&gt;
How a day should progress in a given area. Everywhere not specified in a [time_area] tag is affected by the [time] tags in the [scenario] tag.&lt;br /&gt;
* [[StandardLocationFilter]]: the locations to affect. ''note: only for [event][time_area]s - at scenario toplevel [time_area] does not support [[StandardLocationFilter]], only location ranges''&lt;br /&gt;
* [[TimeWML]]: the new schedule.&lt;br /&gt;
* '''id''': an unique identifier assigned to a time_area. Optional, unless you want to remove the time_area later. Can be a comma-separated list when removing time_areas, see below.&lt;br /&gt;
* '''remove''': (boolean) yes/no value. Indicates whether the specified time_area should be removed. Requires an identifier. If no identifier is used, however, all time_areas are removed.&lt;br /&gt;
&lt;br /&gt;
=== [end_turn] ===&lt;br /&gt;
End the current side's turn. The current event is finished before the turn is ended. Also, if the current event (where the tag appears) has been fired by another event, that event (and the complete stack of other possible parent events) is ended before [end_turn] comes into affect. Also, events following the event stack that fired [end_turn] are not omitted (e.g. [end_turn] is used by a side turn event and a turn refresh event does something afterwards).&lt;br /&gt;
&lt;br /&gt;
=== [replace_map] ===&lt;br /&gt;
&lt;br /&gt;
Replaces the entire map.&lt;br /&gt;
* '''map''': Content of a wesnoth map file. example:&lt;br /&gt;
 map=&amp;quot;{campaigns/Heir_To_The_Throne/maps/01_The_Elves_Besieged.map}&amp;quot;&lt;br /&gt;
* '''expand''': if 'yes', allows the map size to increase. The expansion direction is currently always bottom-right.&lt;br /&gt;
* '''shrink''': if 'yes', allows the map size to decrease. If the map size is reduced, any units that would no longer be on the map due to its coordinates no longer existing will be put into the recall list.&lt;br /&gt;
&lt;br /&gt;
=== [replace_schedule] ===&lt;br /&gt;
Replace the time of day schedule of the entire scenario.&lt;br /&gt;
* [[TimeWML]]: the new schedule.&lt;br /&gt;
&lt;br /&gt;
=== [tunnel] ===&lt;br /&gt;
&lt;br /&gt;
Create a tunnel between some locations, later usable by units to move from source hex to target hex (using the movement cost of unit on the target terrain). ([http://forums.wesnoth.org/viewtopic.php?f=21&amp;amp;t=14749&amp;amp;p=405667&amp;amp;hilit=tunnel#p405667 source])&lt;br /&gt;
&lt;br /&gt;
* '''id''' identifier for the tunnel, to allow removing (optional).&lt;br /&gt;
* '''remove''': (boolean) yes/no value. If yes, removes all defined tunnels with the same ID (then only id= is necessary). (default: no)&lt;br /&gt;
* '''bidirectional''': (boolean) if yes, creates also a tunnel in the other direction. (default: yes)&lt;br /&gt;
* '''always_visible''': (boolean) if yes, the possible movement of enemies under fog can be seen. (default: no)&lt;br /&gt;
* '''[source]''': [[StandardLocationFilter]] the source hex(es) (required).&lt;br /&gt;
* '''[target]''': [[StandardLocationFilter]] the target hex(es) (required).&lt;br /&gt;
* '''[filter]''': [[StandardUnitFilter]] the units which can use the tunnel (required). Leave empty for &amp;quot;all units&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(Note: The tunnel tag can also be used inside the [[AbilitiesWML|[teleport]]] ability, without remove= and id=).&lt;br /&gt;
&lt;br /&gt;
== Useful Macros ==&lt;br /&gt;
There are some predefined macros that you find useful for direct actions. You can find a complete list along with a detailed explanation of how they work [http://www.wesnoth.org/macro-reference.xhtml here].&lt;br /&gt;
* '''{MOVE_UNIT}''': Moves a unit to another location in the map and the player sees the movement (unlike [teleport])&lt;br /&gt;
* '''{FULL_HEAL}''': Brings a unit to full HP&lt;br /&gt;
* '''{LOYAL_UNIT}''': Create a loyal unit&lt;br /&gt;
* '''{MODIFY_TERRAIN_MASK}''': Modify an area of terrain&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[InternalActionsWML]]&lt;br /&gt;
* [[InterfaceActionsWML]]&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;br /&gt;
[[Category: ActionsWML]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=45245</id>
		<title>DirectActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=45245"/>
		<updated>2012-02-14T21:40:51Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* [set_recruit] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== Direct actions ==&lt;br /&gt;
&lt;br /&gt;
Direct actions are actions that have a direct effect on gameplay. They can be used inside of [[EventWML|events]].&lt;br /&gt;
&lt;br /&gt;
The following tags are actions:&lt;br /&gt;
&lt;br /&gt;
=== [endlevel] ===&lt;br /&gt;
Ends the scenario.&lt;br /&gt;
* '''result''': before the scenario is over, all events with ''name=result'' are triggered. If ''result=victory'', the player progresses to the next level; if ''result=defeat'', the game returns to the main menu. &lt;br /&gt;
&lt;br /&gt;
When the result is &amp;quot;victory&amp;quot; the following keys can be used:&lt;br /&gt;
* '''bonus''': whether the player should get bonus gold (maximum possible gold that could have been earned by waiting the level out). The default is bonus=yes.&lt;br /&gt;
* '''carryover_report''': whether the player should receive a summary of the scenario outcome, the default is carryover_report=yes.&lt;br /&gt;
* '''save''': whether a start-of-scenario save should be created for the next scenario, the default is save=yes. Do not confuse this with saving of replays for the current scenario.&lt;br /&gt;
* '''replay_save''': whether a replay save for the current scenario is allowed, the default is replay_save=yes. If yes, the player's settings in preferences will be used to determine if a replay is saved. If no, will override and not save a replay.&lt;br /&gt;
* '''linger_mode''': If ...=yes, the screen is greyed out and there's the possibility to save before advancing to the next scenario, the default is linger_mode=yes.&lt;br /&gt;
* '''reveal_map''': (Multiplayer only) (Default is 'yes') If 'no', shroud doesn't disappear when game ended.&lt;br /&gt;
* '''next_scenario''': (default specified in '''[scenario]''' tag) the ID of the next scenario that should be played.  All units that side 1 controls at this point become available for recall in ''next_scenario''.&lt;br /&gt;
* '''carryover_percentage''': by default 80% of the gold is carried over to the next scenario, with this key the amount can be changed.&lt;br /&gt;
* '''carryover_add''': if true the gold will be added to the starting gold the next scenario, if false the next scenario will start with the amount of the current scenario (after taxes) or the minimum in the next scenario. Default is false.&lt;br /&gt;
* '''music''': (default specified in '''[scenario]''' or '''[game_config]''' tags) a comma-separated list of music tracks from which one will be chosen and played once after any events related to the end of level result are executed; by default, victory_music is used on victory, and defeat_music on defeat.&lt;br /&gt;
* '''end_credits''': {{DevFeature1.11}} Whether to display the credits screen at the end of a single-player campaign. Defaults to ''yes''. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
* '''end_text''': (translatable) Text that is shown centered in a black screen at the end of a campaign. Defaults to &amp;quot;The End&amp;quot;. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
* '''end_text_duration''': Delay, in milliseconds, before displaying the game credits at the end of a campaign. In other words, for how much time '''end_text''' is displayed on screen. Defaults to 3500. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
&lt;br /&gt;
=== [unit] ===&lt;br /&gt;
Places a unit on the map.  For syntax see [[SingleUnitWML]].&lt;br /&gt;
* {{Short Note:Predefined Macro|GENERIC_UNIT}}&lt;br /&gt;
* '''to_variable''':  spawn directly into a variable instead of on the map.&lt;br /&gt;
&lt;br /&gt;
=== [recall] ===&lt;br /&gt;
Recalls a unit.  The unit is recalled free of charge, and is placed near the leader.&lt;br /&gt;
* [[StandardUnitFilter]]: the first matching unit will be recalled.  If no units match this tag is ignored. Do not use a [filter] tag. If a comma separated list is given, every unit currently considered for recall is checked against all the types (not each single one of the types against all units).&lt;br /&gt;
* '''x,y''': the unit is placed here instead of next to the leader.&lt;br /&gt;
* '''show''': yes/no, default yes: whether the unit is animated (faded in) or instantly displayed&lt;br /&gt;
* '''fire_event''': boolean yes|no (default no); whether any according prerecall or recall events shall be fired.&lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): If yes, checks for terrain passability when placing the unit (a nearby passable hex is chosen).&lt;br /&gt;
&lt;br /&gt;
=== [teleport] ===&lt;br /&gt;
Teleports a unit on map. {{Short Note:Predefined Macro|TELEPORT_UNIT}}&lt;br /&gt;
* '''[filter]''': [[StandardUnitFilter]] the first unit matching this filter will be teleported.&lt;br /&gt;
* '''x,y''': the position to teleport to.&lt;br /&gt;
* '''clear_shroud''': should shroud be cleared on arrival&lt;br /&gt;
* '''animate''': should a teleport animation be played (if the unit doesn't have a teleport animation, it will fade out/fade in)&lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): normally, units will not be teleported into terrain that is impassable for them. Setting this attribute to &amp;quot;no&amp;quot; permits it.&lt;br /&gt;
&lt;br /&gt;
(Note: There is also a ability named teleport, see [[AbilitiesWML]].)&lt;br /&gt;
&lt;br /&gt;
=== [terrain_mask] ===&lt;br /&gt;
Changes the terrain on the map.  See [[TerrainMaskWML]].&lt;br /&gt;
&lt;br /&gt;
=== [terrain] ===&lt;br /&gt;
Changes the terrain on the map.&lt;br /&gt;
* '''terrain''': the character of the terrain to use.  See [[TerrainCodesWML]] to see what letter a type of terrain uses.&lt;br /&gt;
* [[StandardLocationFilter]]. This [[StandardLocationFilter]]'s terrain= key is used for the new terrain, filtering by terrain can be done with a nested [[StandardLocationFilter]]: [and]terrain=terrain_string_to_be_filtered_for.&lt;br /&gt;
* '''layer''': (overlay|base|both, default=both) only change the specified layer.&lt;br /&gt;
* '''replace_if_failed''': (default=no) When replacing just one layer failed, try to replace the whole terrain. If '''terrain''' is an overlay only terrain, use the default_base as base layer. If the terrain has no default base, do nothing.&lt;br /&gt;
&lt;br /&gt;
=== [gold] ===&lt;br /&gt;
Gives one side gold.&lt;br /&gt;
* '''amount''': the amount of gold to give.&lt;br /&gt;
* '''side''': (default=1) the number of the side to give the gold to. Can be a comma-separated list of sides. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
&lt;br /&gt;
=== [unstore_unit] ===&lt;br /&gt;
Creates a unit from a game variable, and activates it on the playing field.  This must be a specific variable describing a unit, and may not be an array -- to unstore an entire array, iterate over it.  The variable is not cleared.  See also [[InternalActionsWML#.5Bstore_unit.5D|[store_unit]]], [[ConditionalActionsWML#.5Bwhile.5D|[while]]] and [[InternalActionsWML#.5Bclear_variable.5D|[clear_variable]]]. Note units with a negative amount of hitpoints will be unstored with 1 hitpoint.&lt;br /&gt;
* '''variable''': the name of the variable.&lt;br /&gt;
* '''find_vacant''': whether the unit should be placed on the nearest vacant tile to its specified location.  If this is set to 'no'(default), then any unit on the same tile as the unit being unstored will be destroyed. &lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): If yes, checks for terrain passability when placing the unit. This key has no effect if find_vacant=no (no check performed then). Before 1.9 this key is always &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''text''': (translatable) floating text to display above the unit, such as a damage amount&lt;br /&gt;
* '''red''', '''green''', '''blue''': (default=0,0,0) the color to display the text in. Values vary from 0-255. You may find it convenient to use the {COLOR_HARM} or {COLOR_HEAL} macro instead. (Use {COLOR_HARM} or {COLOR_HEAL} instead of the whole red,green,blue= line.)&lt;br /&gt;
* '''advance''': (default=true) if true the unit is advanced if it has enough XP. When modifying XP make sure to do it from inside a [[EventWML#Multiplayer_safety|synchronized event]] or it may lead to OOS errors especially when several advancement paths exist. Note that advance and post advance events are called, so infinite loops can happen.&lt;br /&gt;
* '''fire_event''': (boolean yes|no, default no) Whether any advance/post advance events shall be fired if an advancement takes place, no effect otherwise.&lt;br /&gt;
* '''x''' ,'''y''': override unit location, &amp;quot;x,y=recall,recall&amp;quot; will put the unit on the unit's side's recall list.&lt;br /&gt;
&lt;br /&gt;
=== [allow_recruit] ===&lt;br /&gt;
Allows a side to recruit units it couldn't previously recruit.&lt;br /&gt;
* '''type''': the types of units that the side can now recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that is being allowed to recruit the units. This can be a comma-separated list note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [allow_extra_recruit] ===&lt;br /&gt;
Allows a leader to recruit units it couldn't previously recruit.&lt;br /&gt;
These types add to the types the leader can recruit because of [side]recruit=.&lt;br /&gt;
* '''extra_recruit''': the types of units that the unit can now recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_recruit] ===&lt;br /&gt;
Prevents a side from recruiting units it could previously recruit.&lt;br /&gt;
* '''type''': the types of units that the side can no longer recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that may no longer recruit the units. This can be a comma-separated list note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_extra_recruit] ===&lt;br /&gt;
Prevents a leader from recruiting units it could previously recruit.&lt;br /&gt;
* '''extra_recruit''': the types of units that the side can no longer recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [set_recruit] ===&lt;br /&gt;
Sets the units a side can recruit.&lt;br /&gt;
* '''recruit''': the types of units that the side can now recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that is having its recruitment set. This can be a comma-separated list. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [set_extra_recruit] === &lt;br /&gt;
Sets the units a leader can recruit.&lt;br /&gt;
* '''extra_recruit''': the types of units that the leader can now recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [modify_side] ===&lt;br /&gt;
Modifies some details of a given side in the middle of a scenario.  '''The following listed properties are the only properties that [modify_side] can affect!'''&lt;br /&gt;
* '''side''': (default=1) the number of the side that is to be changed. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* '''income''': the income given at the begining of each turn.&lt;br /&gt;
* '''team_name''': the team in which the side plays the scenario.&lt;br /&gt;
* '''user_team_name''': a translatable string representing the team's description. This has no effect on alliances. Defaults to ''team_name''.&lt;br /&gt;
* '''gold''': the amount of gold the side owns.&lt;br /&gt;
* '''village_gold''': the income setting per village for the side.&lt;br /&gt;
* '''controller''': the identifier string of the side's controller. Uses the same syntax of the ''controller'' key in the [[SideWML|[side]]] tag.&lt;br /&gt;
* '''fog''': a boolean string (yes/no) describing the status of Fog for the side.&lt;br /&gt;
* '''shroud''': a boolean string describing the status of Shroud for the side.&lt;br /&gt;
* '''hidden''': a boolean string specifying whether side is shown in status table.&lt;br /&gt;
* '''color''': {{DevFeature1.11}} a team color range specification, name (e.g. &amp;quot;red&amp;quot;, &amp;quot;blue&amp;quot;), or number (e.g. &amp;quot;1&amp;quot;, &amp;quot;2&amp;quot;) for this side. The default color range names, numbers, and definitions can be found in data/core/team_colors.cfg.&lt;br /&gt;
* '''[ai]''': replaces a side's AI parameters with the new specified ones. Uses the same syntax described in [[AiWML]].&lt;br /&gt;
* '''switch_ai''': replaces a side ai with a new AI from specified file(ignoring those AI parameters above). Path to file follows the usual WML convention.&lt;br /&gt;
* '''share_maps''': change the share_maps side attribute. Be sure to use shroud=yes for that side and have it as an ally&lt;br /&gt;
* '''share_view''': change the share_view side attribute. Be sure to use fog=yes for that side and have it as an ally&lt;br /&gt;
&lt;br /&gt;
=== [modify_turns] ===&lt;br /&gt;
Modifies the turn limit in the middle of a scenario.&lt;br /&gt;
* '''value''': the new turn limit.&lt;br /&gt;
* '''add''': if used instead of ''value'', specifies the number of turns to add to the current limit (can be negative).&lt;br /&gt;
* '''current''': changes the current turn number after applying turn limit modifications, if any. It is not possible to change the turn number to exceed the turn limit (1 &amp;lt;= current turns &amp;lt;= max turns).&lt;br /&gt;
&lt;br /&gt;
=== [allow_end_turn] ===&lt;br /&gt;
Allows human players to end their turn through the user interface if they were previously affected by the '''[disallow_end_turn]''' action. This action doesn't take any arguments.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_end_turn] ===&lt;br /&gt;
Disallows human players to end their turn through the user interface. This action doesn't take any arguments.&lt;br /&gt;
&lt;br /&gt;
=== [capture_village] ===&lt;br /&gt;
Changes the ownership of a village.&lt;br /&gt;
* [[StandardLocationFilter]]: all village locations matching the filter are affected.&lt;br /&gt;
* '''side''': the side that takes control of the village. This side needs to have a leader (canrecruit=yes). If the side key is not given, the village will become neutral (unless [filter_side] is present, in which case that side fiter decides, see below).&lt;br /&gt;
* '''[filter_side]''' with [[StandardSideFilter]] tags and keys as arguments; if both this tag and inline side= are present it's an error. Otherwise, the first matching side gets ownership (or the village becomes neutral if none match).&lt;br /&gt;
* '''fire_event''' (boolean yes|no, default: no): Whether any capture events shall be fired.&lt;br /&gt;
&lt;br /&gt;
=== [kill] ===&lt;br /&gt;
Removes all units (including units in a recall list) that match the filter from the game.&lt;br /&gt;
* [[StandardUnitFilter]]: Selection criterion; do not use a [filter] tag.&lt;br /&gt;
* '''animate''': if 'yes', displays the unit dying (fading away).&lt;br /&gt;
* '''fire_event''': if 'yes', triggers any appropriate 'die' events (See [[EventWML]]). Note that events are only fired for killed units that have been on the map (as opposed to recall list).&lt;br /&gt;
* '''[secondary_unit]''' with a [[StandardUnitFilter]] as argument. Do not use a [filter] tag. Has an effect only if fire_event=yes. The first on-map unit matching the filter becomes second_unit in any fired die and last breath events. If an on-map unit matches and if there are several units killed with a single [kill] tag, second_unit is this same unit for all of them. If no on-map unit matches or [secondary_unit] isn't present, the variable second_unit in each of the die and last breath events is always the same as the variable unit (the dying unit).&lt;br /&gt;
&lt;br /&gt;
=== [move_unit] ===&lt;br /&gt;
works like the MOVE_UNIT macro.&lt;br /&gt;
* [[StandardUnitFilter]] as argument; do not use a [filter] tag. All units matching the filter are moved. If the target location is occupied, the nearest free passable location is chosen. All target locations passed (see below) need to be passable hexes for the particular moved units.&lt;br /&gt;
* '''to_x''' (unsigned integer): The units are moved to this x coordinate. Can be a comma-separated list, in which case the unit follows this given path during the move.&lt;br /&gt;
* '''to_y''' (unsigned integer): The units are moved to this y coordinate. Can be a comma-separated list.&lt;br /&gt;
* '''fire_event''' (optional, boolean yes|no, default no): Whether any according moveto events shall be fired. The target location ($x1, $y1 in the event) may not be the same location that the unit was tried to be moved to, if the original target location is occupied or impassable.&lt;br /&gt;
* '''check_passability''' (boolean yes|no, default yes): Whether the terrain the unit is moved to should be checked for suiting the unit. (If it does not, a nearby suitable hex is chosen.)&lt;br /&gt;
&lt;br /&gt;
=== [modify_ai] ===&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
Changes the AI for a specified side. See [[Customizing_AI_in_Wesnoth_1.8#.5Bmodify_ai.5D_tag]]&lt;br /&gt;
&lt;br /&gt;
=== [modify_unit] ===&lt;br /&gt;
works similar to the MODIFY_UNIT macro.&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. All units matching this filter are modified. Matches on recall list units too.&lt;br /&gt;
* Accepts generally the syntax inside of wml unit variables created by [store_unit] which can be viewed in a savefile or by using the :inspect command. Can add traits with immediate effect. Cannot remove things. Subtags with the same name must be written in the correct order to match them with the tag they are supposed to modify.&lt;br /&gt;
example usage (see also the test scenario):&lt;br /&gt;
 [modify_unit]&lt;br /&gt;
     [filter]&lt;br /&gt;
         type=Troll Rocklobber&lt;br /&gt;
     [/filter]&lt;br /&gt;
     hitpoints=10&lt;br /&gt;
     [modifications]&lt;br /&gt;
         [trait]&lt;br /&gt;
             # first trait is unmodified&lt;br /&gt;
         [/trait]&lt;br /&gt;
         {TRAIT_HEALTHY}# second trait is replaced with the healthy trait&lt;br /&gt;
     [/modifications]&lt;br /&gt;
 [/modify_unit]&lt;br /&gt;
&lt;br /&gt;
The unit which is currently modified is accessible via $this_unit, e.g. hitpoints = &amp;quot;$($this_unit.hitpoints / 2)&amp;quot; to set the hitpoints of all units to half of their particular maxima. This this_unit variable is independent from the this_unit variable available in the SUF used to determine which units to modify (first all matching units are gathered, and then all those are modified).&lt;br /&gt;
&lt;br /&gt;
note: The syntax allowed is somehow vague. Just try things and possibly correct/add/modify this documentation. (a [http://forums.wesnoth.org/viewtopic.php?f=21&amp;amp;t=31676&amp;amp; forum thread] discusses some related issues).&lt;br /&gt;
&lt;br /&gt;
=== [transform_unit] ===&lt;br /&gt;
transforms every unit matching the filter to the given unit type. Keeps intact hitpoints, experience and status. If the unit is transformed to a non-living type (undead or mechanical), it will be also unpoisoned.&lt;br /&gt;
* [[StandardUnitFilter]]: do not use a [filter] tag.&lt;br /&gt;
* '''transform_to''': the unit type in which all the units matching the filter will be transformed. If missing, the units will follow their normal advancement.&lt;br /&gt;
&lt;br /&gt;
=== [petrify] ===&lt;br /&gt;
&lt;br /&gt;
* [[StandardUnitFilter]] as an argument. Do not use a [filter] tag. All units matching this filter are petrified. Recall list units are included.&lt;br /&gt;
&lt;br /&gt;
=== [unpetrify] ===&lt;br /&gt;
* [[StandardUnitFilter]] as an argument. Do not use a [filter] tag. All units matching this filter are unpetrified. Recall list units are included.&lt;br /&gt;
&lt;br /&gt;
=== [object] ===&lt;br /&gt;
Gives some unit an object and removes all items on the tile the unit is on.&lt;br /&gt;
* '''id''': (Optional) when the object is picked up, a flag is set for ''id''.  The object cannot be picked up if a flag for ''id'' has been set.  This means that any object with an id can only be used once, even if first_time_only=no is set for the event. This restriction is per level. In a campaign objects with the same id can be assigned once per level.&lt;br /&gt;
* '''delayed_variable_substitution''' (boolean yes|no, default no): If set to &amp;quot;yes&amp;quot;, the wml block contained in this [object] is not variable-substituted at execution time of the event where this [object] is within. You need this to work around a bug when adding ABILITY_TELEPORT via an [object] or when using [object][effect][filter]with a $this_unit (see http://gna.org/bugs/index.php?18893).&lt;br /&gt;
* '''[effect]''': one or more effect elements may be listed.  See [[EffectWML]] for a description of [effect].&lt;br /&gt;
* '''duration''': if 'level', effects only last until the end of the level (note : 'level' is the scenario, so this doesn't mean it last until the unit levels-up).&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. The first unit found that matches the filter will be given the object.  If no unit matches the filter, then a message is displayed and the object is not removed.&lt;br /&gt;
* '''[then]''': a subtag that lets you execute actions if the filter conditions are met.  The most common action that should be inside here is a '''[removeitem]''' tag, but you could probably put any tags that otherwise work in a [then] tag.&lt;br /&gt;
* '''silent''': whether or not messages should be suppressed. Default is &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''image''': the displayed image of the object.&lt;br /&gt;
* '''name''': (translatable) displayed as a caption of the image.&lt;br /&gt;
&lt;br /&gt;
* '''description''': (translatable) displayed as a message of the image.&lt;br /&gt;
* '''cannot_use_message''': (translatable) displayed instead of '''description''' if no unit passes the filter test.&lt;br /&gt;
* If you do not supply a filter, the object action will be applied to a unit at the location of the moveto event. Currently this isn't recommended as it is not clear that this will continue working this way. Instead it is better to explicitly include a location filter.&lt;br /&gt;
* The object action does not act on units in the recall list. There is a feature request in to allow this, but it is not clear whether or not it will be accepted.&lt;br /&gt;
&lt;br /&gt;
=== [remove_shroud] ===&lt;br /&gt;
Removes some shroud from the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
* '''side''': (default=1) the side for which to remove shroud. This can be a comma-separated list of sides. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* [[StandardLocationFilter]]: the range of tiles for which shroud should be removed&lt;br /&gt;
&lt;br /&gt;
=== [place_shroud] ===&lt;br /&gt;
Places some shroud on the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
* '''side''': (default=1) the side for which to place shroud. This can be a comma-separated list. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* [[StandardLocationFilter]]: the range of tiles on which shroud should be placed&lt;br /&gt;
&lt;br /&gt;
=== [allow_undo] ===&lt;br /&gt;
Allows the player to undo the event that this tag is inside.  Has an effect only inside moveto events.  If the move is undone, only the position of the unit will be restored; any altered variables or changes to the game will remain changed after the move is undone.  It is up to the scenario designer to avoid abusing this command.&lt;br /&gt;
* Technically, if '''[allow_undo]''' is inside an '''[event]''' with ''first_time_only=yes'' (the default setting), and the user undoes the event, then the state of the game has changed in this way: the event will not fire a second time, even though the user undid the move the first time.&lt;br /&gt;
&lt;br /&gt;
=== [heal_unit] ===&lt;br /&gt;
Heal a unit. The variable '''$heal_amount''' will be set to the exact number of points healed (i.e can be lesser than the parameter '''amount''' if the unit is fully healed). $heal_amount contains only the number of hitpoints the first unit that was found got healed.&lt;br /&gt;
*  '''[filter]''': [[StandardUnitFilter]] All matching on-map units are healed. If no filter is supplied, it is tried to take the unit at $x1, $y1.&lt;br /&gt;
*  '''[filter_second]''': [[StandardUnitFilter]] all the units matching the filter ''and'' having the ''heals'' ability will have their animation played (if ''animate'' is set to true) for each of the units healed.&lt;br /&gt;
*  '''amount''': (integer, default full) the maximum points the unit(s) will be healed. Can't set below 1 or above max_hitpoints. If &amp;quot;full&amp;quot;, sets hitpoints to max_hitpoints. Before 1.9 the default is 0.&lt;br /&gt;
*  '''animate''': a boolean which indicate if the healing animations must be played. (default no)&lt;br /&gt;
*  '''moves''': (integer, default 0) The maximum current movement points the units will be &amp;quot;healed&amp;quot;. Can't set below 0 or above max_moves. If &amp;quot;full&amp;quot;, sets moves to max_moves.&lt;br /&gt;
* '''restore_attacks''': (boolean, default no) Whether the units' attacks_left should be reset to their max_attacks (usually 1).&lt;br /&gt;
* '''restore_statuses''': (boolean, default yes) Whether standard statuses should be reset to &amp;quot;no&amp;quot;. This affects poisoned, slowed, petrified and unhealable. Before 1.9 this is always &amp;quot;no&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== [harm_unit] ===&lt;br /&gt;
Harms every unit matching the filter, for the specific damage amount.&lt;br /&gt;
*  '''[filter]''': [[StandardUnitFilter]] all matching units will be harmed (required).&lt;br /&gt;
*  '''[filter_second]''': [[StandardUnitFilter]] if present, the first matching unit will attack all the units matching the filter above.&lt;br /&gt;
*  '''amount''': the amount of damage that will be done (required).&lt;br /&gt;
*  '''alignment''': (default neutral) applies an alignment to the damage, this means that if alignment=chaotic, the damage will be increased at night and reduced at day.&lt;br /&gt;
*  '''damage_type''': if present, amount will be altered by unit resistance to the damage type specified.&lt;br /&gt;
*  '''kill''': (default yes) if yes, when an harmed unit goes to or below 0 HP, it is killed; if no its HP are set to 1.&lt;br /&gt;
*  '''fire_event''': (default no) if yes, when a unit is killed by harming, the corresponding events are fired.&lt;br /&gt;
*  '''animate''': (default no) if yes, scrolls to each unit before harming it and plays its defense (or attack, if it's the harmer) and death animations. Special values supported, other than the usual yes and no, are &amp;quot;attacker&amp;quot;, that means only the harmer will be animated, and &amp;quot;defender&amp;quot;, that means only the harmed units will be animated.&lt;br /&gt;
*  '''[primary_attack], [secondary_attack]''': these set the weapon against which the harmed units will defend, and that the harming unit will use to attack, respectively (notice this is the opposite of '''[filter]''' and '''[filter_second]''' above). This allows for playing specific defense and attack animations. Both tags are expected to contain a [[FilterWML#Filtering_Weapons|Standard Weapon Filter]].&lt;br /&gt;
*  '''delay''': if animate=yes, sets the delay (in milliseconds, default 500) between each unit harming.&lt;br /&gt;
*  '''variable''': if present, the damage caused to the unit, altered by resistances, will be stored in a WML array with the given name, under the &amp;quot;harm_amount&amp;quot; key.&lt;br /&gt;
*  '''poisoned, slowed, petrified, unhealable''': (default no) if yes, every harmed unit that doesn't already have such status will have it set.&lt;br /&gt;
*  '''experience''': if yes, and there is an harmer, experience will be attributed like in regular combat.&lt;br /&gt;
&lt;br /&gt;
=== [time_area] ===&lt;br /&gt;
How a day should progress in a given area. Everywhere not specified in a [time_area] tag is affected by the [time] tags in the [scenario] tag.&lt;br /&gt;
* [[StandardLocationFilter]]: the locations to affect. ''note: only for [event][time_area]s - at scenario toplevel [time_area] does not support [[StandardLocationFilter]], only location ranges''&lt;br /&gt;
* [[TimeWML]]: the new schedule.&lt;br /&gt;
* '''id''': an unique identifier assigned to a time_area. Optional, unless you want to remove the time_area later. Can be a comma-separated list when removing time_areas, see below.&lt;br /&gt;
* '''remove''': (boolean) yes/no value. Indicates whether the specified time_area should be removed. Requires an identifier. If no identifier is used, however, all time_areas are removed.&lt;br /&gt;
&lt;br /&gt;
=== [end_turn] ===&lt;br /&gt;
End the current side's turn. The current event is finished before the turn is ended. Also, if the current event (where the tag appears) has been fired by another event, that event (and the complete stack of other possible parent events) is ended before [end_turn] comes into affect. Also, events following the event stack that fired [end_turn] are not omitted (e.g. [end_turn] is used by a side turn event and a turn refresh event does something afterwards).&lt;br /&gt;
&lt;br /&gt;
=== [replace_map] ===&lt;br /&gt;
&lt;br /&gt;
Replaces the entire map.&lt;br /&gt;
* '''map''': Content of a wesnoth map file. example:&lt;br /&gt;
 map=&amp;quot;{campaigns/Heir_To_The_Throne/maps/01_The_Elves_Besieged.map}&amp;quot;&lt;br /&gt;
* '''expand''': if 'yes', allows the map size to increase. The expansion direction is currently always bottom-right.&lt;br /&gt;
* '''shrink''': if 'yes', allows the map size to decrease. If the map size is reduced, any units that would no longer be on the map due to its coordinates no longer existing will be put into the recall list.&lt;br /&gt;
&lt;br /&gt;
=== [replace_schedule] ===&lt;br /&gt;
Replace the time of day schedule of the entire scenario.&lt;br /&gt;
* [[TimeWML]]: the new schedule.&lt;br /&gt;
&lt;br /&gt;
=== [tunnel] ===&lt;br /&gt;
&lt;br /&gt;
Create a tunnel between some locations, later usable by units to move from source hex to target hex (using the movement cost of unit on the target terrain). ([http://forums.wesnoth.org/viewtopic.php?f=21&amp;amp;t=14749&amp;amp;p=405667&amp;amp;hilit=tunnel#p405667 source])&lt;br /&gt;
&lt;br /&gt;
* '''id''' identifier for the tunnel, to allow removing (optional).&lt;br /&gt;
* '''remove''': (boolean) yes/no value. If yes, removes all defined tunnels with the same ID (then only id= is necessary). (default: no)&lt;br /&gt;
* '''bidirectional''': (boolean) if yes, creates also a tunnel in the other direction. (default: yes)&lt;br /&gt;
* '''always_visible''': (boolean) if yes, the possible movement of enemies under fog can be seen. (default: no)&lt;br /&gt;
* '''[source]''': [[StandardLocationFilter]] the source hex(es) (required).&lt;br /&gt;
* '''[target]''': [[StandardLocationFilter]] the target hex(es) (required).&lt;br /&gt;
* '''[filter]''': [[StandardUnitFilter]] the units which can use the tunnel (required). Leave empty for &amp;quot;all units&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(Note: The tunnel tag can also be used inside the [[AbilitiesWML|[teleport]]] ability, without remove= and id=).&lt;br /&gt;
&lt;br /&gt;
== Useful Macros ==&lt;br /&gt;
There are some predefined macros that you find useful for direct actions. You can find a complete list along with a detailed explanation of how they work [http://www.wesnoth.org/macro-reference.xhtml here].&lt;br /&gt;
* '''{MOVE_UNIT}''': Moves a unit to another location in the map and the player sees the movement (unlike [teleport])&lt;br /&gt;
* '''{FULL_HEAL}''': Brings a unit to full HP&lt;br /&gt;
* '''{LOYAL_UNIT}''': Create a loyal unit&lt;br /&gt;
* '''{MODIFY_TERRAIN_MASK}''': Modify an area of terrain&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[InternalActionsWML]]&lt;br /&gt;
* [[InterfaceActionsWML]]&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;br /&gt;
[[Category: ActionsWML]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=45244</id>
		<title>DirectActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=45244"/>
		<updated>2012-02-14T21:40:02Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* [disallow_recruit] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== Direct actions ==&lt;br /&gt;
&lt;br /&gt;
Direct actions are actions that have a direct effect on gameplay. They can be used inside of [[EventWML|events]].&lt;br /&gt;
&lt;br /&gt;
The following tags are actions:&lt;br /&gt;
&lt;br /&gt;
=== [endlevel] ===&lt;br /&gt;
Ends the scenario.&lt;br /&gt;
* '''result''': before the scenario is over, all events with ''name=result'' are triggered. If ''result=victory'', the player progresses to the next level; if ''result=defeat'', the game returns to the main menu. &lt;br /&gt;
&lt;br /&gt;
When the result is &amp;quot;victory&amp;quot; the following keys can be used:&lt;br /&gt;
* '''bonus''': whether the player should get bonus gold (maximum possible gold that could have been earned by waiting the level out). The default is bonus=yes.&lt;br /&gt;
* '''carryover_report''': whether the player should receive a summary of the scenario outcome, the default is carryover_report=yes.&lt;br /&gt;
* '''save''': whether a start-of-scenario save should be created for the next scenario, the default is save=yes. Do not confuse this with saving of replays for the current scenario.&lt;br /&gt;
* '''replay_save''': whether a replay save for the current scenario is allowed, the default is replay_save=yes. If yes, the player's settings in preferences will be used to determine if a replay is saved. If no, will override and not save a replay.&lt;br /&gt;
* '''linger_mode''': If ...=yes, the screen is greyed out and there's the possibility to save before advancing to the next scenario, the default is linger_mode=yes.&lt;br /&gt;
* '''reveal_map''': (Multiplayer only) (Default is 'yes') If 'no', shroud doesn't disappear when game ended.&lt;br /&gt;
* '''next_scenario''': (default specified in '''[scenario]''' tag) the ID of the next scenario that should be played.  All units that side 1 controls at this point become available for recall in ''next_scenario''.&lt;br /&gt;
* '''carryover_percentage''': by default 80% of the gold is carried over to the next scenario, with this key the amount can be changed.&lt;br /&gt;
* '''carryover_add''': if true the gold will be added to the starting gold the next scenario, if false the next scenario will start with the amount of the current scenario (after taxes) or the minimum in the next scenario. Default is false.&lt;br /&gt;
* '''music''': (default specified in '''[scenario]''' or '''[game_config]''' tags) a comma-separated list of music tracks from which one will be chosen and played once after any events related to the end of level result are executed; by default, victory_music is used on victory, and defeat_music on defeat.&lt;br /&gt;
* '''end_credits''': {{DevFeature1.11}} Whether to display the credits screen at the end of a single-player campaign. Defaults to ''yes''. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
* '''end_text''': (translatable) Text that is shown centered in a black screen at the end of a campaign. Defaults to &amp;quot;The End&amp;quot;. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
* '''end_text_duration''': Delay, in milliseconds, before displaying the game credits at the end of a campaign. In other words, for how much time '''end_text''' is displayed on screen. Defaults to 3500. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
&lt;br /&gt;
=== [unit] ===&lt;br /&gt;
Places a unit on the map.  For syntax see [[SingleUnitWML]].&lt;br /&gt;
* {{Short Note:Predefined Macro|GENERIC_UNIT}}&lt;br /&gt;
* '''to_variable''':  spawn directly into a variable instead of on the map.&lt;br /&gt;
&lt;br /&gt;
=== [recall] ===&lt;br /&gt;
Recalls a unit.  The unit is recalled free of charge, and is placed near the leader.&lt;br /&gt;
* [[StandardUnitFilter]]: the first matching unit will be recalled.  If no units match this tag is ignored. Do not use a [filter] tag. If a comma separated list is given, every unit currently considered for recall is checked against all the types (not each single one of the types against all units).&lt;br /&gt;
* '''x,y''': the unit is placed here instead of next to the leader.&lt;br /&gt;
* '''show''': yes/no, default yes: whether the unit is animated (faded in) or instantly displayed&lt;br /&gt;
* '''fire_event''': boolean yes|no (default no); whether any according prerecall or recall events shall be fired.&lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): If yes, checks for terrain passability when placing the unit (a nearby passable hex is chosen).&lt;br /&gt;
&lt;br /&gt;
=== [teleport] ===&lt;br /&gt;
Teleports a unit on map. {{Short Note:Predefined Macro|TELEPORT_UNIT}}&lt;br /&gt;
* '''[filter]''': [[StandardUnitFilter]] the first unit matching this filter will be teleported.&lt;br /&gt;
* '''x,y''': the position to teleport to.&lt;br /&gt;
* '''clear_shroud''': should shroud be cleared on arrival&lt;br /&gt;
* '''animate''': should a teleport animation be played (if the unit doesn't have a teleport animation, it will fade out/fade in)&lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): normally, units will not be teleported into terrain that is impassable for them. Setting this attribute to &amp;quot;no&amp;quot; permits it.&lt;br /&gt;
&lt;br /&gt;
(Note: There is also a ability named teleport, see [[AbilitiesWML]].)&lt;br /&gt;
&lt;br /&gt;
=== [terrain_mask] ===&lt;br /&gt;
Changes the terrain on the map.  See [[TerrainMaskWML]].&lt;br /&gt;
&lt;br /&gt;
=== [terrain] ===&lt;br /&gt;
Changes the terrain on the map.&lt;br /&gt;
* '''terrain''': the character of the terrain to use.  See [[TerrainCodesWML]] to see what letter a type of terrain uses.&lt;br /&gt;
* [[StandardLocationFilter]]. This [[StandardLocationFilter]]'s terrain= key is used for the new terrain, filtering by terrain can be done with a nested [[StandardLocationFilter]]: [and]terrain=terrain_string_to_be_filtered_for.&lt;br /&gt;
* '''layer''': (overlay|base|both, default=both) only change the specified layer.&lt;br /&gt;
* '''replace_if_failed''': (default=no) When replacing just one layer failed, try to replace the whole terrain. If '''terrain''' is an overlay only terrain, use the default_base as base layer. If the terrain has no default base, do nothing.&lt;br /&gt;
&lt;br /&gt;
=== [gold] ===&lt;br /&gt;
Gives one side gold.&lt;br /&gt;
* '''amount''': the amount of gold to give.&lt;br /&gt;
* '''side''': (default=1) the number of the side to give the gold to. Can be a comma-separated list of sides. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
&lt;br /&gt;
=== [unstore_unit] ===&lt;br /&gt;
Creates a unit from a game variable, and activates it on the playing field.  This must be a specific variable describing a unit, and may not be an array -- to unstore an entire array, iterate over it.  The variable is not cleared.  See also [[InternalActionsWML#.5Bstore_unit.5D|[store_unit]]], [[ConditionalActionsWML#.5Bwhile.5D|[while]]] and [[InternalActionsWML#.5Bclear_variable.5D|[clear_variable]]]. Note units with a negative amount of hitpoints will be unstored with 1 hitpoint.&lt;br /&gt;
* '''variable''': the name of the variable.&lt;br /&gt;
* '''find_vacant''': whether the unit should be placed on the nearest vacant tile to its specified location.  If this is set to 'no'(default), then any unit on the same tile as the unit being unstored will be destroyed. &lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): If yes, checks for terrain passability when placing the unit. This key has no effect if find_vacant=no (no check performed then). Before 1.9 this key is always &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''text''': (translatable) floating text to display above the unit, such as a damage amount&lt;br /&gt;
* '''red''', '''green''', '''blue''': (default=0,0,0) the color to display the text in. Values vary from 0-255. You may find it convenient to use the {COLOR_HARM} or {COLOR_HEAL} macro instead. (Use {COLOR_HARM} or {COLOR_HEAL} instead of the whole red,green,blue= line.)&lt;br /&gt;
* '''advance''': (default=true) if true the unit is advanced if it has enough XP. When modifying XP make sure to do it from inside a [[EventWML#Multiplayer_safety|synchronized event]] or it may lead to OOS errors especially when several advancement paths exist. Note that advance and post advance events are called, so infinite loops can happen.&lt;br /&gt;
* '''fire_event''': (boolean yes|no, default no) Whether any advance/post advance events shall be fired if an advancement takes place, no effect otherwise.&lt;br /&gt;
* '''x''' ,'''y''': override unit location, &amp;quot;x,y=recall,recall&amp;quot; will put the unit on the unit's side's recall list.&lt;br /&gt;
&lt;br /&gt;
=== [allow_recruit] ===&lt;br /&gt;
Allows a side to recruit units it couldn't previously recruit.&lt;br /&gt;
* '''type''': the types of units that the side can now recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that is being allowed to recruit the units. This can be a comma-separated list note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [allow_extra_recruit] ===&lt;br /&gt;
Allows a leader to recruit units it couldn't previously recruit.&lt;br /&gt;
These types add to the types the leader can recruit because of [side]recruit=.&lt;br /&gt;
* '''extra_recruit''': the types of units that the unit can now recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_recruit] ===&lt;br /&gt;
Prevents a side from recruiting units it could previously recruit.&lt;br /&gt;
* '''type''': the types of units that the side can no longer recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that may no longer recruit the units. This can be a comma-separated list note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_extra_recruit] ===&lt;br /&gt;
Prevents a leader from recruiting units it could previously recruit.&lt;br /&gt;
* '''extra_recruit''': the types of units that the side can no longer recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [set_recruit] ===&lt;br /&gt;
Sets the units a side can recruit.&lt;br /&gt;
* '''recruit''': the types of units that the side can now recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that is having its recruitment set. This can be a comma-separated list. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
&lt;br /&gt;
=== [set_extra_recruit] === &lt;br /&gt;
Sets the units a leader can recruit.&lt;br /&gt;
* '''extra_recruit''': the types of units that the leader can now recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [modify_side] ===&lt;br /&gt;
Modifies some details of a given side in the middle of a scenario.  '''The following listed properties are the only properties that [modify_side] can affect!'''&lt;br /&gt;
* '''side''': (default=1) the number of the side that is to be changed. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* '''income''': the income given at the begining of each turn.&lt;br /&gt;
* '''team_name''': the team in which the side plays the scenario.&lt;br /&gt;
* '''user_team_name''': a translatable string representing the team's description. This has no effect on alliances. Defaults to ''team_name''.&lt;br /&gt;
* '''gold''': the amount of gold the side owns.&lt;br /&gt;
* '''village_gold''': the income setting per village for the side.&lt;br /&gt;
* '''controller''': the identifier string of the side's controller. Uses the same syntax of the ''controller'' key in the [[SideWML|[side]]] tag.&lt;br /&gt;
* '''fog''': a boolean string (yes/no) describing the status of Fog for the side.&lt;br /&gt;
* '''shroud''': a boolean string describing the status of Shroud for the side.&lt;br /&gt;
* '''hidden''': a boolean string specifying whether side is shown in status table.&lt;br /&gt;
* '''color''': {{DevFeature1.11}} a team color range specification, name (e.g. &amp;quot;red&amp;quot;, &amp;quot;blue&amp;quot;), or number (e.g. &amp;quot;1&amp;quot;, &amp;quot;2&amp;quot;) for this side. The default color range names, numbers, and definitions can be found in data/core/team_colors.cfg.&lt;br /&gt;
* '''[ai]''': replaces a side's AI parameters with the new specified ones. Uses the same syntax described in [[AiWML]].&lt;br /&gt;
* '''switch_ai''': replaces a side ai with a new AI from specified file(ignoring those AI parameters above). Path to file follows the usual WML convention.&lt;br /&gt;
* '''share_maps''': change the share_maps side attribute. Be sure to use shroud=yes for that side and have it as an ally&lt;br /&gt;
* '''share_view''': change the share_view side attribute. Be sure to use fog=yes for that side and have it as an ally&lt;br /&gt;
&lt;br /&gt;
=== [modify_turns] ===&lt;br /&gt;
Modifies the turn limit in the middle of a scenario.&lt;br /&gt;
* '''value''': the new turn limit.&lt;br /&gt;
* '''add''': if used instead of ''value'', specifies the number of turns to add to the current limit (can be negative).&lt;br /&gt;
* '''current''': changes the current turn number after applying turn limit modifications, if any. It is not possible to change the turn number to exceed the turn limit (1 &amp;lt;= current turns &amp;lt;= max turns).&lt;br /&gt;
&lt;br /&gt;
=== [allow_end_turn] ===&lt;br /&gt;
Allows human players to end their turn through the user interface if they were previously affected by the '''[disallow_end_turn]''' action. This action doesn't take any arguments.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_end_turn] ===&lt;br /&gt;
Disallows human players to end their turn through the user interface. This action doesn't take any arguments.&lt;br /&gt;
&lt;br /&gt;
=== [capture_village] ===&lt;br /&gt;
Changes the ownership of a village.&lt;br /&gt;
* [[StandardLocationFilter]]: all village locations matching the filter are affected.&lt;br /&gt;
* '''side''': the side that takes control of the village. This side needs to have a leader (canrecruit=yes). If the side key is not given, the village will become neutral (unless [filter_side] is present, in which case that side fiter decides, see below).&lt;br /&gt;
* '''[filter_side]''' with [[StandardSideFilter]] tags and keys as arguments; if both this tag and inline side= are present it's an error. Otherwise, the first matching side gets ownership (or the village becomes neutral if none match).&lt;br /&gt;
* '''fire_event''' (boolean yes|no, default: no): Whether any capture events shall be fired.&lt;br /&gt;
&lt;br /&gt;
=== [kill] ===&lt;br /&gt;
Removes all units (including units in a recall list) that match the filter from the game.&lt;br /&gt;
* [[StandardUnitFilter]]: Selection criterion; do not use a [filter] tag.&lt;br /&gt;
* '''animate''': if 'yes', displays the unit dying (fading away).&lt;br /&gt;
* '''fire_event''': if 'yes', triggers any appropriate 'die' events (See [[EventWML]]). Note that events are only fired for killed units that have been on the map (as opposed to recall list).&lt;br /&gt;
* '''[secondary_unit]''' with a [[StandardUnitFilter]] as argument. Do not use a [filter] tag. Has an effect only if fire_event=yes. The first on-map unit matching the filter becomes second_unit in any fired die and last breath events. If an on-map unit matches and if there are several units killed with a single [kill] tag, second_unit is this same unit for all of them. If no on-map unit matches or [secondary_unit] isn't present, the variable second_unit in each of the die and last breath events is always the same as the variable unit (the dying unit).&lt;br /&gt;
&lt;br /&gt;
=== [move_unit] ===&lt;br /&gt;
works like the MOVE_UNIT macro.&lt;br /&gt;
* [[StandardUnitFilter]] as argument; do not use a [filter] tag. All units matching the filter are moved. If the target location is occupied, the nearest free passable location is chosen. All target locations passed (see below) need to be passable hexes for the particular moved units.&lt;br /&gt;
* '''to_x''' (unsigned integer): The units are moved to this x coordinate. Can be a comma-separated list, in which case the unit follows this given path during the move.&lt;br /&gt;
* '''to_y''' (unsigned integer): The units are moved to this y coordinate. Can be a comma-separated list.&lt;br /&gt;
* '''fire_event''' (optional, boolean yes|no, default no): Whether any according moveto events shall be fired. The target location ($x1, $y1 in the event) may not be the same location that the unit was tried to be moved to, if the original target location is occupied or impassable.&lt;br /&gt;
* '''check_passability''' (boolean yes|no, default yes): Whether the terrain the unit is moved to should be checked for suiting the unit. (If it does not, a nearby suitable hex is chosen.)&lt;br /&gt;
&lt;br /&gt;
=== [modify_ai] ===&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
Changes the AI for a specified side. See [[Customizing_AI_in_Wesnoth_1.8#.5Bmodify_ai.5D_tag]]&lt;br /&gt;
&lt;br /&gt;
=== [modify_unit] ===&lt;br /&gt;
works similar to the MODIFY_UNIT macro.&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. All units matching this filter are modified. Matches on recall list units too.&lt;br /&gt;
* Accepts generally the syntax inside of wml unit variables created by [store_unit] which can be viewed in a savefile or by using the :inspect command. Can add traits with immediate effect. Cannot remove things. Subtags with the same name must be written in the correct order to match them with the tag they are supposed to modify.&lt;br /&gt;
example usage (see also the test scenario):&lt;br /&gt;
 [modify_unit]&lt;br /&gt;
     [filter]&lt;br /&gt;
         type=Troll Rocklobber&lt;br /&gt;
     [/filter]&lt;br /&gt;
     hitpoints=10&lt;br /&gt;
     [modifications]&lt;br /&gt;
         [trait]&lt;br /&gt;
             # first trait is unmodified&lt;br /&gt;
         [/trait]&lt;br /&gt;
         {TRAIT_HEALTHY}# second trait is replaced with the healthy trait&lt;br /&gt;
     [/modifications]&lt;br /&gt;
 [/modify_unit]&lt;br /&gt;
&lt;br /&gt;
The unit which is currently modified is accessible via $this_unit, e.g. hitpoints = &amp;quot;$($this_unit.hitpoints / 2)&amp;quot; to set the hitpoints of all units to half of their particular maxima. This this_unit variable is independent from the this_unit variable available in the SUF used to determine which units to modify (first all matching units are gathered, and then all those are modified).&lt;br /&gt;
&lt;br /&gt;
note: The syntax allowed is somehow vague. Just try things and possibly correct/add/modify this documentation. (a [http://forums.wesnoth.org/viewtopic.php?f=21&amp;amp;t=31676&amp;amp; forum thread] discusses some related issues).&lt;br /&gt;
&lt;br /&gt;
=== [transform_unit] ===&lt;br /&gt;
transforms every unit matching the filter to the given unit type. Keeps intact hitpoints, experience and status. If the unit is transformed to a non-living type (undead or mechanical), it will be also unpoisoned.&lt;br /&gt;
* [[StandardUnitFilter]]: do not use a [filter] tag.&lt;br /&gt;
* '''transform_to''': the unit type in which all the units matching the filter will be transformed. If missing, the units will follow their normal advancement.&lt;br /&gt;
&lt;br /&gt;
=== [petrify] ===&lt;br /&gt;
&lt;br /&gt;
* [[StandardUnitFilter]] as an argument. Do not use a [filter] tag. All units matching this filter are petrified. Recall list units are included.&lt;br /&gt;
&lt;br /&gt;
=== [unpetrify] ===&lt;br /&gt;
* [[StandardUnitFilter]] as an argument. Do not use a [filter] tag. All units matching this filter are unpetrified. Recall list units are included.&lt;br /&gt;
&lt;br /&gt;
=== [object] ===&lt;br /&gt;
Gives some unit an object and removes all items on the tile the unit is on.&lt;br /&gt;
* '''id''': (Optional) when the object is picked up, a flag is set for ''id''.  The object cannot be picked up if a flag for ''id'' has been set.  This means that any object with an id can only be used once, even if first_time_only=no is set for the event. This restriction is per level. In a campaign objects with the same id can be assigned once per level.&lt;br /&gt;
* '''delayed_variable_substitution''' (boolean yes|no, default no): If set to &amp;quot;yes&amp;quot;, the wml block contained in this [object] is not variable-substituted at execution time of the event where this [object] is within. You need this to work around a bug when adding ABILITY_TELEPORT via an [object] or when using [object][effect][filter]with a $this_unit (see http://gna.org/bugs/index.php?18893).&lt;br /&gt;
* '''[effect]''': one or more effect elements may be listed.  See [[EffectWML]] for a description of [effect].&lt;br /&gt;
* '''duration''': if 'level', effects only last until the end of the level (note : 'level' is the scenario, so this doesn't mean it last until the unit levels-up).&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. The first unit found that matches the filter will be given the object.  If no unit matches the filter, then a message is displayed and the object is not removed.&lt;br /&gt;
* '''[then]''': a subtag that lets you execute actions if the filter conditions are met.  The most common action that should be inside here is a '''[removeitem]''' tag, but you could probably put any tags that otherwise work in a [then] tag.&lt;br /&gt;
* '''silent''': whether or not messages should be suppressed. Default is &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''image''': the displayed image of the object.&lt;br /&gt;
* '''name''': (translatable) displayed as a caption of the image.&lt;br /&gt;
&lt;br /&gt;
* '''description''': (translatable) displayed as a message of the image.&lt;br /&gt;
* '''cannot_use_message''': (translatable) displayed instead of '''description''' if no unit passes the filter test.&lt;br /&gt;
* If you do not supply a filter, the object action will be applied to a unit at the location of the moveto event. Currently this isn't recommended as it is not clear that this will continue working this way. Instead it is better to explicitly include a location filter.&lt;br /&gt;
* The object action does not act on units in the recall list. There is a feature request in to allow this, but it is not clear whether or not it will be accepted.&lt;br /&gt;
&lt;br /&gt;
=== [remove_shroud] ===&lt;br /&gt;
Removes some shroud from the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
* '''side''': (default=1) the side for which to remove shroud. This can be a comma-separated list of sides. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* [[StandardLocationFilter]]: the range of tiles for which shroud should be removed&lt;br /&gt;
&lt;br /&gt;
=== [place_shroud] ===&lt;br /&gt;
Places some shroud on the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
* '''side''': (default=1) the side for which to place shroud. This can be a comma-separated list. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* [[StandardLocationFilter]]: the range of tiles on which shroud should be placed&lt;br /&gt;
&lt;br /&gt;
=== [allow_undo] ===&lt;br /&gt;
Allows the player to undo the event that this tag is inside.  Has an effect only inside moveto events.  If the move is undone, only the position of the unit will be restored; any altered variables or changes to the game will remain changed after the move is undone.  It is up to the scenario designer to avoid abusing this command.&lt;br /&gt;
* Technically, if '''[allow_undo]''' is inside an '''[event]''' with ''first_time_only=yes'' (the default setting), and the user undoes the event, then the state of the game has changed in this way: the event will not fire a second time, even though the user undid the move the first time.&lt;br /&gt;
&lt;br /&gt;
=== [heal_unit] ===&lt;br /&gt;
Heal a unit. The variable '''$heal_amount''' will be set to the exact number of points healed (i.e can be lesser than the parameter '''amount''' if the unit is fully healed). $heal_amount contains only the number of hitpoints the first unit that was found got healed.&lt;br /&gt;
*  '''[filter]''': [[StandardUnitFilter]] All matching on-map units are healed. If no filter is supplied, it is tried to take the unit at $x1, $y1.&lt;br /&gt;
*  '''[filter_second]''': [[StandardUnitFilter]] all the units matching the filter ''and'' having the ''heals'' ability will have their animation played (if ''animate'' is set to true) for each of the units healed.&lt;br /&gt;
*  '''amount''': (integer, default full) the maximum points the unit(s) will be healed. Can't set below 1 or above max_hitpoints. If &amp;quot;full&amp;quot;, sets hitpoints to max_hitpoints. Before 1.9 the default is 0.&lt;br /&gt;
*  '''animate''': a boolean which indicate if the healing animations must be played. (default no)&lt;br /&gt;
*  '''moves''': (integer, default 0) The maximum current movement points the units will be &amp;quot;healed&amp;quot;. Can't set below 0 or above max_moves. If &amp;quot;full&amp;quot;, sets moves to max_moves.&lt;br /&gt;
* '''restore_attacks''': (boolean, default no) Whether the units' attacks_left should be reset to their max_attacks (usually 1).&lt;br /&gt;
* '''restore_statuses''': (boolean, default yes) Whether standard statuses should be reset to &amp;quot;no&amp;quot;. This affects poisoned, slowed, petrified and unhealable. Before 1.9 this is always &amp;quot;no&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== [harm_unit] ===&lt;br /&gt;
Harms every unit matching the filter, for the specific damage amount.&lt;br /&gt;
*  '''[filter]''': [[StandardUnitFilter]] all matching units will be harmed (required).&lt;br /&gt;
*  '''[filter_second]''': [[StandardUnitFilter]] if present, the first matching unit will attack all the units matching the filter above.&lt;br /&gt;
*  '''amount''': the amount of damage that will be done (required).&lt;br /&gt;
*  '''alignment''': (default neutral) applies an alignment to the damage, this means that if alignment=chaotic, the damage will be increased at night and reduced at day.&lt;br /&gt;
*  '''damage_type''': if present, amount will be altered by unit resistance to the damage type specified.&lt;br /&gt;
*  '''kill''': (default yes) if yes, when an harmed unit goes to or below 0 HP, it is killed; if no its HP are set to 1.&lt;br /&gt;
*  '''fire_event''': (default no) if yes, when a unit is killed by harming, the corresponding events are fired.&lt;br /&gt;
*  '''animate''': (default no) if yes, scrolls to each unit before harming it and plays its defense (or attack, if it's the harmer) and death animations. Special values supported, other than the usual yes and no, are &amp;quot;attacker&amp;quot;, that means only the harmer will be animated, and &amp;quot;defender&amp;quot;, that means only the harmed units will be animated.&lt;br /&gt;
*  '''[primary_attack], [secondary_attack]''': these set the weapon against which the harmed units will defend, and that the harming unit will use to attack, respectively (notice this is the opposite of '''[filter]''' and '''[filter_second]''' above). This allows for playing specific defense and attack animations. Both tags are expected to contain a [[FilterWML#Filtering_Weapons|Standard Weapon Filter]].&lt;br /&gt;
*  '''delay''': if animate=yes, sets the delay (in milliseconds, default 500) between each unit harming.&lt;br /&gt;
*  '''variable''': if present, the damage caused to the unit, altered by resistances, will be stored in a WML array with the given name, under the &amp;quot;harm_amount&amp;quot; key.&lt;br /&gt;
*  '''poisoned, slowed, petrified, unhealable''': (default no) if yes, every harmed unit that doesn't already have such status will have it set.&lt;br /&gt;
*  '''experience''': if yes, and there is an harmer, experience will be attributed like in regular combat.&lt;br /&gt;
&lt;br /&gt;
=== [time_area] ===&lt;br /&gt;
How a day should progress in a given area. Everywhere not specified in a [time_area] tag is affected by the [time] tags in the [scenario] tag.&lt;br /&gt;
* [[StandardLocationFilter]]: the locations to affect. ''note: only for [event][time_area]s - at scenario toplevel [time_area] does not support [[StandardLocationFilter]], only location ranges''&lt;br /&gt;
* [[TimeWML]]: the new schedule.&lt;br /&gt;
* '''id''': an unique identifier assigned to a time_area. Optional, unless you want to remove the time_area later. Can be a comma-separated list when removing time_areas, see below.&lt;br /&gt;
* '''remove''': (boolean) yes/no value. Indicates whether the specified time_area should be removed. Requires an identifier. If no identifier is used, however, all time_areas are removed.&lt;br /&gt;
&lt;br /&gt;
=== [end_turn] ===&lt;br /&gt;
End the current side's turn. The current event is finished before the turn is ended. Also, if the current event (where the tag appears) has been fired by another event, that event (and the complete stack of other possible parent events) is ended before [end_turn] comes into affect. Also, events following the event stack that fired [end_turn] are not omitted (e.g. [end_turn] is used by a side turn event and a turn refresh event does something afterwards).&lt;br /&gt;
&lt;br /&gt;
=== [replace_map] ===&lt;br /&gt;
&lt;br /&gt;
Replaces the entire map.&lt;br /&gt;
* '''map''': Content of a wesnoth map file. example:&lt;br /&gt;
 map=&amp;quot;{campaigns/Heir_To_The_Throne/maps/01_The_Elves_Besieged.map}&amp;quot;&lt;br /&gt;
* '''expand''': if 'yes', allows the map size to increase. The expansion direction is currently always bottom-right.&lt;br /&gt;
* '''shrink''': if 'yes', allows the map size to decrease. If the map size is reduced, any units that would no longer be on the map due to its coordinates no longer existing will be put into the recall list.&lt;br /&gt;
&lt;br /&gt;
=== [replace_schedule] ===&lt;br /&gt;
Replace the time of day schedule of the entire scenario.&lt;br /&gt;
* [[TimeWML]]: the new schedule.&lt;br /&gt;
&lt;br /&gt;
=== [tunnel] ===&lt;br /&gt;
&lt;br /&gt;
Create a tunnel between some locations, later usable by units to move from source hex to target hex (using the movement cost of unit on the target terrain). ([http://forums.wesnoth.org/viewtopic.php?f=21&amp;amp;t=14749&amp;amp;p=405667&amp;amp;hilit=tunnel#p405667 source])&lt;br /&gt;
&lt;br /&gt;
* '''id''' identifier for the tunnel, to allow removing (optional).&lt;br /&gt;
* '''remove''': (boolean) yes/no value. If yes, removes all defined tunnels with the same ID (then only id= is necessary). (default: no)&lt;br /&gt;
* '''bidirectional''': (boolean) if yes, creates also a tunnel in the other direction. (default: yes)&lt;br /&gt;
* '''always_visible''': (boolean) if yes, the possible movement of enemies under fog can be seen. (default: no)&lt;br /&gt;
* '''[source]''': [[StandardLocationFilter]] the source hex(es) (required).&lt;br /&gt;
* '''[target]''': [[StandardLocationFilter]] the target hex(es) (required).&lt;br /&gt;
* '''[filter]''': [[StandardUnitFilter]] the units which can use the tunnel (required). Leave empty for &amp;quot;all units&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(Note: The tunnel tag can also be used inside the [[AbilitiesWML|[teleport]]] ability, without remove= and id=).&lt;br /&gt;
&lt;br /&gt;
== Useful Macros ==&lt;br /&gt;
There are some predefined macros that you find useful for direct actions. You can find a complete list along with a detailed explanation of how they work [http://www.wesnoth.org/macro-reference.xhtml here].&lt;br /&gt;
* '''{MOVE_UNIT}''': Moves a unit to another location in the map and the player sees the movement (unlike [teleport])&lt;br /&gt;
* '''{FULL_HEAL}''': Brings a unit to full HP&lt;br /&gt;
* '''{LOYAL_UNIT}''': Create a loyal unit&lt;br /&gt;
* '''{MODIFY_TERRAIN_MASK}''': Modify an area of terrain&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[InternalActionsWML]]&lt;br /&gt;
* [[InterfaceActionsWML]]&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;br /&gt;
[[Category: ActionsWML]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=45243</id>
		<title>DirectActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=45243"/>
		<updated>2012-02-14T21:39:32Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* [allow_recruit] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== Direct actions ==&lt;br /&gt;
&lt;br /&gt;
Direct actions are actions that have a direct effect on gameplay. They can be used inside of [[EventWML|events]].&lt;br /&gt;
&lt;br /&gt;
The following tags are actions:&lt;br /&gt;
&lt;br /&gt;
=== [endlevel] ===&lt;br /&gt;
Ends the scenario.&lt;br /&gt;
* '''result''': before the scenario is over, all events with ''name=result'' are triggered. If ''result=victory'', the player progresses to the next level; if ''result=defeat'', the game returns to the main menu. &lt;br /&gt;
&lt;br /&gt;
When the result is &amp;quot;victory&amp;quot; the following keys can be used:&lt;br /&gt;
* '''bonus''': whether the player should get bonus gold (maximum possible gold that could have been earned by waiting the level out). The default is bonus=yes.&lt;br /&gt;
* '''carryover_report''': whether the player should receive a summary of the scenario outcome, the default is carryover_report=yes.&lt;br /&gt;
* '''save''': whether a start-of-scenario save should be created for the next scenario, the default is save=yes. Do not confuse this with saving of replays for the current scenario.&lt;br /&gt;
* '''replay_save''': whether a replay save for the current scenario is allowed, the default is replay_save=yes. If yes, the player's settings in preferences will be used to determine if a replay is saved. If no, will override and not save a replay.&lt;br /&gt;
* '''linger_mode''': If ...=yes, the screen is greyed out and there's the possibility to save before advancing to the next scenario, the default is linger_mode=yes.&lt;br /&gt;
* '''reveal_map''': (Multiplayer only) (Default is 'yes') If 'no', shroud doesn't disappear when game ended.&lt;br /&gt;
* '''next_scenario''': (default specified in '''[scenario]''' tag) the ID of the next scenario that should be played.  All units that side 1 controls at this point become available for recall in ''next_scenario''.&lt;br /&gt;
* '''carryover_percentage''': by default 80% of the gold is carried over to the next scenario, with this key the amount can be changed.&lt;br /&gt;
* '''carryover_add''': if true the gold will be added to the starting gold the next scenario, if false the next scenario will start with the amount of the current scenario (after taxes) or the minimum in the next scenario. Default is false.&lt;br /&gt;
* '''music''': (default specified in '''[scenario]''' or '''[game_config]''' tags) a comma-separated list of music tracks from which one will be chosen and played once after any events related to the end of level result are executed; by default, victory_music is used on victory, and defeat_music on defeat.&lt;br /&gt;
* '''end_credits''': {{DevFeature1.11}} Whether to display the credits screen at the end of a single-player campaign. Defaults to ''yes''. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
* '''end_text''': (translatable) Text that is shown centered in a black screen at the end of a campaign. Defaults to &amp;quot;The End&amp;quot;. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
* '''end_text_duration''': Delay, in milliseconds, before displaying the game credits at the end of a campaign. In other words, for how much time '''end_text''' is displayed on screen. Defaults to 3500. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].&lt;br /&gt;
&lt;br /&gt;
=== [unit] ===&lt;br /&gt;
Places a unit on the map.  For syntax see [[SingleUnitWML]].&lt;br /&gt;
* {{Short Note:Predefined Macro|GENERIC_UNIT}}&lt;br /&gt;
* '''to_variable''':  spawn directly into a variable instead of on the map.&lt;br /&gt;
&lt;br /&gt;
=== [recall] ===&lt;br /&gt;
Recalls a unit.  The unit is recalled free of charge, and is placed near the leader.&lt;br /&gt;
* [[StandardUnitFilter]]: the first matching unit will be recalled.  If no units match this tag is ignored. Do not use a [filter] tag. If a comma separated list is given, every unit currently considered for recall is checked against all the types (not each single one of the types against all units).&lt;br /&gt;
* '''x,y''': the unit is placed here instead of next to the leader.&lt;br /&gt;
* '''show''': yes/no, default yes: whether the unit is animated (faded in) or instantly displayed&lt;br /&gt;
* '''fire_event''': boolean yes|no (default no); whether any according prerecall or recall events shall be fired.&lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): If yes, checks for terrain passability when placing the unit (a nearby passable hex is chosen).&lt;br /&gt;
&lt;br /&gt;
=== [teleport] ===&lt;br /&gt;
Teleports a unit on map. {{Short Note:Predefined Macro|TELEPORT_UNIT}}&lt;br /&gt;
* '''[filter]''': [[StandardUnitFilter]] the first unit matching this filter will be teleported.&lt;br /&gt;
* '''x,y''': the position to teleport to.&lt;br /&gt;
* '''clear_shroud''': should shroud be cleared on arrival&lt;br /&gt;
* '''animate''': should a teleport animation be played (if the unit doesn't have a teleport animation, it will fade out/fade in)&lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): normally, units will not be teleported into terrain that is impassable for them. Setting this attribute to &amp;quot;no&amp;quot; permits it.&lt;br /&gt;
&lt;br /&gt;
(Note: There is also a ability named teleport, see [[AbilitiesWML]].)&lt;br /&gt;
&lt;br /&gt;
=== [terrain_mask] ===&lt;br /&gt;
Changes the terrain on the map.  See [[TerrainMaskWML]].&lt;br /&gt;
&lt;br /&gt;
=== [terrain] ===&lt;br /&gt;
Changes the terrain on the map.&lt;br /&gt;
* '''terrain''': the character of the terrain to use.  See [[TerrainCodesWML]] to see what letter a type of terrain uses.&lt;br /&gt;
* [[StandardLocationFilter]]. This [[StandardLocationFilter]]'s terrain= key is used for the new terrain, filtering by terrain can be done with a nested [[StandardLocationFilter]]: [and]terrain=terrain_string_to_be_filtered_for.&lt;br /&gt;
* '''layer''': (overlay|base|both, default=both) only change the specified layer.&lt;br /&gt;
* '''replace_if_failed''': (default=no) When replacing just one layer failed, try to replace the whole terrain. If '''terrain''' is an overlay only terrain, use the default_base as base layer. If the terrain has no default base, do nothing.&lt;br /&gt;
&lt;br /&gt;
=== [gold] ===&lt;br /&gt;
Gives one side gold.&lt;br /&gt;
* '''amount''': the amount of gold to give.&lt;br /&gt;
* '''side''': (default=1) the number of the side to give the gold to. Can be a comma-separated list of sides. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
&lt;br /&gt;
=== [unstore_unit] ===&lt;br /&gt;
Creates a unit from a game variable, and activates it on the playing field.  This must be a specific variable describing a unit, and may not be an array -- to unstore an entire array, iterate over it.  The variable is not cleared.  See also [[InternalActionsWML#.5Bstore_unit.5D|[store_unit]]], [[ConditionalActionsWML#.5Bwhile.5D|[while]]] and [[InternalActionsWML#.5Bclear_variable.5D|[clear_variable]]]. Note units with a negative amount of hitpoints will be unstored with 1 hitpoint.&lt;br /&gt;
* '''variable''': the name of the variable.&lt;br /&gt;
* '''find_vacant''': whether the unit should be placed on the nearest vacant tile to its specified location.  If this is set to 'no'(default), then any unit on the same tile as the unit being unstored will be destroyed. &lt;br /&gt;
* '''check_passability''': (boolean yes|no, default yes): If yes, checks for terrain passability when placing the unit. This key has no effect if find_vacant=no (no check performed then). Before 1.9 this key is always &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''text''': (translatable) floating text to display above the unit, such as a damage amount&lt;br /&gt;
* '''red''', '''green''', '''blue''': (default=0,0,0) the color to display the text in. Values vary from 0-255. You may find it convenient to use the {COLOR_HARM} or {COLOR_HEAL} macro instead. (Use {COLOR_HARM} or {COLOR_HEAL} instead of the whole red,green,blue= line.)&lt;br /&gt;
* '''advance''': (default=true) if true the unit is advanced if it has enough XP. When modifying XP make sure to do it from inside a [[EventWML#Multiplayer_safety|synchronized event]] or it may lead to OOS errors especially when several advancement paths exist. Note that advance and post advance events are called, so infinite loops can happen.&lt;br /&gt;
* '''fire_event''': (boolean yes|no, default no) Whether any advance/post advance events shall be fired if an advancement takes place, no effect otherwise.&lt;br /&gt;
* '''x''' ,'''y''': override unit location, &amp;quot;x,y=recall,recall&amp;quot; will put the unit on the unit's side's recall list.&lt;br /&gt;
&lt;br /&gt;
=== [allow_recruit] ===&lt;br /&gt;
Allows a side to recruit units it couldn't previously recruit.&lt;br /&gt;
* '''type''': the types of units that the side can now recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that is being allowed to recruit the units. This can be a comma-separated list note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* [[StandardSideFilter]] {{DevFeature1.11}} tags and keys; default for empty side= is all sides, as usual in a SSF.&lt;br /&gt;
&lt;br /&gt;
=== [allow_extra_recruit] ===&lt;br /&gt;
Allows a leader to recruit units it couldn't previously recruit.&lt;br /&gt;
These types add to the types the leader can recruit because of [side]recruit=.&lt;br /&gt;
* '''extra_recruit''': the types of units that the unit can now recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_recruit] ===&lt;br /&gt;
Prevents a side from recruiting units it could previously recruit.&lt;br /&gt;
* '''type''': the types of units that the side can no longer recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that may no longer recruit the units. This can be a comma-separated list note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_extra_recruit] ===&lt;br /&gt;
Prevents a leader from recruiting units it could previously recruit.&lt;br /&gt;
* '''extra_recruit''': the types of units that the side can no longer recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [set_recruit] ===&lt;br /&gt;
Sets the units a side can recruit.&lt;br /&gt;
* '''recruit''': the types of units that the side can now recruit.&lt;br /&gt;
* '''side''': (default=1) the number of the side that is having its recruitment set. This can be a comma-separated list. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
&lt;br /&gt;
=== [set_extra_recruit] === &lt;br /&gt;
Sets the units a leader can recruit.&lt;br /&gt;
* '''extra_recruit''': the types of units that the leader can now recruit.&lt;br /&gt;
* '''[[StandardUnitFilter]]''': All units matching this filter are modified. Does not match on recall list units.&lt;br /&gt;
&lt;br /&gt;
=== [modify_side] ===&lt;br /&gt;
Modifies some details of a given side in the middle of a scenario.  '''The following listed properties are the only properties that [modify_side] can affect!'''&lt;br /&gt;
* '''side''': (default=1) the number of the side that is to be changed. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* '''income''': the income given at the begining of each turn.&lt;br /&gt;
* '''team_name''': the team in which the side plays the scenario.&lt;br /&gt;
* '''user_team_name''': a translatable string representing the team's description. This has no effect on alliances. Defaults to ''team_name''.&lt;br /&gt;
* '''gold''': the amount of gold the side owns.&lt;br /&gt;
* '''village_gold''': the income setting per village for the side.&lt;br /&gt;
* '''controller''': the identifier string of the side's controller. Uses the same syntax of the ''controller'' key in the [[SideWML|[side]]] tag.&lt;br /&gt;
* '''fog''': a boolean string (yes/no) describing the status of Fog for the side.&lt;br /&gt;
* '''shroud''': a boolean string describing the status of Shroud for the side.&lt;br /&gt;
* '''hidden''': a boolean string specifying whether side is shown in status table.&lt;br /&gt;
* '''color''': {{DevFeature1.11}} a team color range specification, name (e.g. &amp;quot;red&amp;quot;, &amp;quot;blue&amp;quot;), or number (e.g. &amp;quot;1&amp;quot;, &amp;quot;2&amp;quot;) for this side. The default color range names, numbers, and definitions can be found in data/core/team_colors.cfg.&lt;br /&gt;
* '''[ai]''': replaces a side's AI parameters with the new specified ones. Uses the same syntax described in [[AiWML]].&lt;br /&gt;
* '''switch_ai''': replaces a side ai with a new AI from specified file(ignoring those AI parameters above). Path to file follows the usual WML convention.&lt;br /&gt;
* '''share_maps''': change the share_maps side attribute. Be sure to use shroud=yes for that side and have it as an ally&lt;br /&gt;
* '''share_view''': change the share_view side attribute. Be sure to use fog=yes for that side and have it as an ally&lt;br /&gt;
&lt;br /&gt;
=== [modify_turns] ===&lt;br /&gt;
Modifies the turn limit in the middle of a scenario.&lt;br /&gt;
* '''value''': the new turn limit.&lt;br /&gt;
* '''add''': if used instead of ''value'', specifies the number of turns to add to the current limit (can be negative).&lt;br /&gt;
* '''current''': changes the current turn number after applying turn limit modifications, if any. It is not possible to change the turn number to exceed the turn limit (1 &amp;lt;= current turns &amp;lt;= max turns).&lt;br /&gt;
&lt;br /&gt;
=== [allow_end_turn] ===&lt;br /&gt;
Allows human players to end their turn through the user interface if they were previously affected by the '''[disallow_end_turn]''' action. This action doesn't take any arguments.&lt;br /&gt;
&lt;br /&gt;
=== [disallow_end_turn] ===&lt;br /&gt;
Disallows human players to end their turn through the user interface. This action doesn't take any arguments.&lt;br /&gt;
&lt;br /&gt;
=== [capture_village] ===&lt;br /&gt;
Changes the ownership of a village.&lt;br /&gt;
* [[StandardLocationFilter]]: all village locations matching the filter are affected.&lt;br /&gt;
* '''side''': the side that takes control of the village. This side needs to have a leader (canrecruit=yes). If the side key is not given, the village will become neutral (unless [filter_side] is present, in which case that side fiter decides, see below).&lt;br /&gt;
* '''[filter_side]''' with [[StandardSideFilter]] tags and keys as arguments; if both this tag and inline side= are present it's an error. Otherwise, the first matching side gets ownership (or the village becomes neutral if none match).&lt;br /&gt;
* '''fire_event''' (boolean yes|no, default: no): Whether any capture events shall be fired.&lt;br /&gt;
&lt;br /&gt;
=== [kill] ===&lt;br /&gt;
Removes all units (including units in a recall list) that match the filter from the game.&lt;br /&gt;
* [[StandardUnitFilter]]: Selection criterion; do not use a [filter] tag.&lt;br /&gt;
* '''animate''': if 'yes', displays the unit dying (fading away).&lt;br /&gt;
* '''fire_event''': if 'yes', triggers any appropriate 'die' events (See [[EventWML]]). Note that events are only fired for killed units that have been on the map (as opposed to recall list).&lt;br /&gt;
* '''[secondary_unit]''' with a [[StandardUnitFilter]] as argument. Do not use a [filter] tag. Has an effect only if fire_event=yes. The first on-map unit matching the filter becomes second_unit in any fired die and last breath events. If an on-map unit matches and if there are several units killed with a single [kill] tag, second_unit is this same unit for all of them. If no on-map unit matches or [secondary_unit] isn't present, the variable second_unit in each of the die and last breath events is always the same as the variable unit (the dying unit).&lt;br /&gt;
&lt;br /&gt;
=== [move_unit] ===&lt;br /&gt;
works like the MOVE_UNIT macro.&lt;br /&gt;
* [[StandardUnitFilter]] as argument; do not use a [filter] tag. All units matching the filter are moved. If the target location is occupied, the nearest free passable location is chosen. All target locations passed (see below) need to be passable hexes for the particular moved units.&lt;br /&gt;
* '''to_x''' (unsigned integer): The units are moved to this x coordinate. Can be a comma-separated list, in which case the unit follows this given path during the move.&lt;br /&gt;
* '''to_y''' (unsigned integer): The units are moved to this y coordinate. Can be a comma-separated list.&lt;br /&gt;
* '''fire_event''' (optional, boolean yes|no, default no): Whether any according moveto events shall be fired. The target location ($x1, $y1 in the event) may not be the same location that the unit was tried to be moved to, if the original target location is occupied or impassable.&lt;br /&gt;
* '''check_passability''' (boolean yes|no, default yes): Whether the terrain the unit is moved to should be checked for suiting the unit. (If it does not, a nearby suitable hex is chosen.)&lt;br /&gt;
&lt;br /&gt;
=== [modify_ai] ===&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
Changes the AI for a specified side. See [[Customizing_AI_in_Wesnoth_1.8#.5Bmodify_ai.5D_tag]]&lt;br /&gt;
&lt;br /&gt;
=== [modify_unit] ===&lt;br /&gt;
works similar to the MODIFY_UNIT macro.&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. All units matching this filter are modified. Matches on recall list units too.&lt;br /&gt;
* Accepts generally the syntax inside of wml unit variables created by [store_unit] which can be viewed in a savefile or by using the :inspect command. Can add traits with immediate effect. Cannot remove things. Subtags with the same name must be written in the correct order to match them with the tag they are supposed to modify.&lt;br /&gt;
example usage (see also the test scenario):&lt;br /&gt;
 [modify_unit]&lt;br /&gt;
     [filter]&lt;br /&gt;
         type=Troll Rocklobber&lt;br /&gt;
     [/filter]&lt;br /&gt;
     hitpoints=10&lt;br /&gt;
     [modifications]&lt;br /&gt;
         [trait]&lt;br /&gt;
             # first trait is unmodified&lt;br /&gt;
         [/trait]&lt;br /&gt;
         {TRAIT_HEALTHY}# second trait is replaced with the healthy trait&lt;br /&gt;
     [/modifications]&lt;br /&gt;
 [/modify_unit]&lt;br /&gt;
&lt;br /&gt;
The unit which is currently modified is accessible via $this_unit, e.g. hitpoints = &amp;quot;$($this_unit.hitpoints / 2)&amp;quot; to set the hitpoints of all units to half of their particular maxima. This this_unit variable is independent from the this_unit variable available in the SUF used to determine which units to modify (first all matching units are gathered, and then all those are modified).&lt;br /&gt;
&lt;br /&gt;
note: The syntax allowed is somehow vague. Just try things and possibly correct/add/modify this documentation. (a [http://forums.wesnoth.org/viewtopic.php?f=21&amp;amp;t=31676&amp;amp; forum thread] discusses some related issues).&lt;br /&gt;
&lt;br /&gt;
=== [transform_unit] ===&lt;br /&gt;
transforms every unit matching the filter to the given unit type. Keeps intact hitpoints, experience and status. If the unit is transformed to a non-living type (undead or mechanical), it will be also unpoisoned.&lt;br /&gt;
* [[StandardUnitFilter]]: do not use a [filter] tag.&lt;br /&gt;
* '''transform_to''': the unit type in which all the units matching the filter will be transformed. If missing, the units will follow their normal advancement.&lt;br /&gt;
&lt;br /&gt;
=== [petrify] ===&lt;br /&gt;
&lt;br /&gt;
* [[StandardUnitFilter]] as an argument. Do not use a [filter] tag. All units matching this filter are petrified. Recall list units are included.&lt;br /&gt;
&lt;br /&gt;
=== [unpetrify] ===&lt;br /&gt;
* [[StandardUnitFilter]] as an argument. Do not use a [filter] tag. All units matching this filter are unpetrified. Recall list units are included.&lt;br /&gt;
&lt;br /&gt;
=== [object] ===&lt;br /&gt;
Gives some unit an object and removes all items on the tile the unit is on.&lt;br /&gt;
* '''id''': (Optional) when the object is picked up, a flag is set for ''id''.  The object cannot be picked up if a flag for ''id'' has been set.  This means that any object with an id can only be used once, even if first_time_only=no is set for the event. This restriction is per level. In a campaign objects with the same id can be assigned once per level.&lt;br /&gt;
* '''delayed_variable_substitution''' (boolean yes|no, default no): If set to &amp;quot;yes&amp;quot;, the wml block contained in this [object] is not variable-substituted at execution time of the event where this [object] is within. You need this to work around a bug when adding ABILITY_TELEPORT via an [object] or when using [object][effect][filter]with a $this_unit (see http://gna.org/bugs/index.php?18893).&lt;br /&gt;
* '''[effect]''': one or more effect elements may be listed.  See [[EffectWML]] for a description of [effect].&lt;br /&gt;
* '''duration''': if 'level', effects only last until the end of the level (note : 'level' is the scenario, so this doesn't mean it last until the unit levels-up).&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. The first unit found that matches the filter will be given the object.  If no unit matches the filter, then a message is displayed and the object is not removed.&lt;br /&gt;
* '''[then]''': a subtag that lets you execute actions if the filter conditions are met.  The most common action that should be inside here is a '''[removeitem]''' tag, but you could probably put any tags that otherwise work in a [then] tag.&lt;br /&gt;
* '''silent''': whether or not messages should be suppressed. Default is &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''image''': the displayed image of the object.&lt;br /&gt;
* '''name''': (translatable) displayed as a caption of the image.&lt;br /&gt;
&lt;br /&gt;
* '''description''': (translatable) displayed as a message of the image.&lt;br /&gt;
* '''cannot_use_message''': (translatable) displayed instead of '''description''' if no unit passes the filter test.&lt;br /&gt;
* If you do not supply a filter, the object action will be applied to a unit at the location of the moveto event. Currently this isn't recommended as it is not clear that this will continue working this way. Instead it is better to explicitly include a location filter.&lt;br /&gt;
* The object action does not act on units in the recall list. There is a feature request in to allow this, but it is not clear whether or not it will be accepted.&lt;br /&gt;
&lt;br /&gt;
=== [remove_shroud] ===&lt;br /&gt;
Removes some shroud from the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
* '''side''': (default=1) the side for which to remove shroud. This can be a comma-separated list of sides. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* [[StandardLocationFilter]]: the range of tiles for which shroud should be removed&lt;br /&gt;
&lt;br /&gt;
=== [place_shroud] ===&lt;br /&gt;
Places some shroud on the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
* '''side''': (default=1) the side for which to place shroud. This can be a comma-separated list. note: Default side=1 for empty side= is deprecated.&lt;br /&gt;
* '''[filter_side]''' with a [[StandardSideFilter]] as argument&lt;br /&gt;
* [[StandardLocationFilter]]: the range of tiles on which shroud should be placed&lt;br /&gt;
&lt;br /&gt;
=== [allow_undo] ===&lt;br /&gt;
Allows the player to undo the event that this tag is inside.  Has an effect only inside moveto events.  If the move is undone, only the position of the unit will be restored; any altered variables or changes to the game will remain changed after the move is undone.  It is up to the scenario designer to avoid abusing this command.&lt;br /&gt;
* Technically, if '''[allow_undo]''' is inside an '''[event]''' with ''first_time_only=yes'' (the default setting), and the user undoes the event, then the state of the game has changed in this way: the event will not fire a second time, even though the user undid the move the first time.&lt;br /&gt;
&lt;br /&gt;
=== [heal_unit] ===&lt;br /&gt;
Heal a unit. The variable '''$heal_amount''' will be set to the exact number of points healed (i.e can be lesser than the parameter '''amount''' if the unit is fully healed). $heal_amount contains only the number of hitpoints the first unit that was found got healed.&lt;br /&gt;
*  '''[filter]''': [[StandardUnitFilter]] All matching on-map units are healed. If no filter is supplied, it is tried to take the unit at $x1, $y1.&lt;br /&gt;
*  '''[filter_second]''': [[StandardUnitFilter]] all the units matching the filter ''and'' having the ''heals'' ability will have their animation played (if ''animate'' is set to true) for each of the units healed.&lt;br /&gt;
*  '''amount''': (integer, default full) the maximum points the unit(s) will be healed. Can't set below 1 or above max_hitpoints. If &amp;quot;full&amp;quot;, sets hitpoints to max_hitpoints. Before 1.9 the default is 0.&lt;br /&gt;
*  '''animate''': a boolean which indicate if the healing animations must be played. (default no)&lt;br /&gt;
*  '''moves''': (integer, default 0) The maximum current movement points the units will be &amp;quot;healed&amp;quot;. Can't set below 0 or above max_moves. If &amp;quot;full&amp;quot;, sets moves to max_moves.&lt;br /&gt;
* '''restore_attacks''': (boolean, default no) Whether the units' attacks_left should be reset to their max_attacks (usually 1).&lt;br /&gt;
* '''restore_statuses''': (boolean, default yes) Whether standard statuses should be reset to &amp;quot;no&amp;quot;. This affects poisoned, slowed, petrified and unhealable. Before 1.9 this is always &amp;quot;no&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== [harm_unit] ===&lt;br /&gt;
Harms every unit matching the filter, for the specific damage amount.&lt;br /&gt;
*  '''[filter]''': [[StandardUnitFilter]] all matching units will be harmed (required).&lt;br /&gt;
*  '''[filter_second]''': [[StandardUnitFilter]] if present, the first matching unit will attack all the units matching the filter above.&lt;br /&gt;
*  '''amount''': the amount of damage that will be done (required).&lt;br /&gt;
*  '''alignment''': (default neutral) applies an alignment to the damage, this means that if alignment=chaotic, the damage will be increased at night and reduced at day.&lt;br /&gt;
*  '''damage_type''': if present, amount will be altered by unit resistance to the damage type specified.&lt;br /&gt;
*  '''kill''': (default yes) if yes, when an harmed unit goes to or below 0 HP, it is killed; if no its HP are set to 1.&lt;br /&gt;
*  '''fire_event''': (default no) if yes, when a unit is killed by harming, the corresponding events are fired.&lt;br /&gt;
*  '''animate''': (default no) if yes, scrolls to each unit before harming it and plays its defense (or attack, if it's the harmer) and death animations. Special values supported, other than the usual yes and no, are &amp;quot;attacker&amp;quot;, that means only the harmer will be animated, and &amp;quot;defender&amp;quot;, that means only the harmed units will be animated.&lt;br /&gt;
*  '''[primary_attack], [secondary_attack]''': these set the weapon against which the harmed units will defend, and that the harming unit will use to attack, respectively (notice this is the opposite of '''[filter]''' and '''[filter_second]''' above). This allows for playing specific defense and attack animations. Both tags are expected to contain a [[FilterWML#Filtering_Weapons|Standard Weapon Filter]].&lt;br /&gt;
*  '''delay''': if animate=yes, sets the delay (in milliseconds, default 500) between each unit harming.&lt;br /&gt;
*  '''variable''': if present, the damage caused to the unit, altered by resistances, will be stored in a WML array with the given name, under the &amp;quot;harm_amount&amp;quot; key.&lt;br /&gt;
*  '''poisoned, slowed, petrified, unhealable''': (default no) if yes, every harmed unit that doesn't already have such status will have it set.&lt;br /&gt;
*  '''experience''': if yes, and there is an harmer, experience will be attributed like in regular combat.&lt;br /&gt;
&lt;br /&gt;
=== [time_area] ===&lt;br /&gt;
How a day should progress in a given area. Everywhere not specified in a [time_area] tag is affected by the [time] tags in the [scenario] tag.&lt;br /&gt;
* [[StandardLocationFilter]]: the locations to affect. ''note: only for [event][time_area]s - at scenario toplevel [time_area] does not support [[StandardLocationFilter]], only location ranges''&lt;br /&gt;
* [[TimeWML]]: the new schedule.&lt;br /&gt;
* '''id''': an unique identifier assigned to a time_area. Optional, unless you want to remove the time_area later. Can be a comma-separated list when removing time_areas, see below.&lt;br /&gt;
* '''remove''': (boolean) yes/no value. Indicates whether the specified time_area should be removed. Requires an identifier. If no identifier is used, however, all time_areas are removed.&lt;br /&gt;
&lt;br /&gt;
=== [end_turn] ===&lt;br /&gt;
End the current side's turn. The current event is finished before the turn is ended. Also, if the current event (where the tag appears) has been fired by another event, that event (and the complete stack of other possible parent events) is ended before [end_turn] comes into affect. Also, events following the event stack that fired [end_turn] are not omitted (e.g. [end_turn] is used by a side turn event and a turn refresh event does something afterwards).&lt;br /&gt;
&lt;br /&gt;
=== [replace_map] ===&lt;br /&gt;
&lt;br /&gt;
Replaces the entire map.&lt;br /&gt;
* '''map''': Content of a wesnoth map file. example:&lt;br /&gt;
 map=&amp;quot;{campaigns/Heir_To_The_Throne/maps/01_The_Elves_Besieged.map}&amp;quot;&lt;br /&gt;
* '''expand''': if 'yes', allows the map size to increase. The expansion direction is currently always bottom-right.&lt;br /&gt;
* '''shrink''': if 'yes', allows the map size to decrease. If the map size is reduced, any units that would no longer be on the map due to its coordinates no longer existing will be put into the recall list.&lt;br /&gt;
&lt;br /&gt;
=== [replace_schedule] ===&lt;br /&gt;
Replace the time of day schedule of the entire scenario.&lt;br /&gt;
* [[TimeWML]]: the new schedule.&lt;br /&gt;
&lt;br /&gt;
=== [tunnel] ===&lt;br /&gt;
&lt;br /&gt;
Create a tunnel between some locations, later usable by units to move from source hex to target hex (using the movement cost of unit on the target terrain). ([http://forums.wesnoth.org/viewtopic.php?f=21&amp;amp;t=14749&amp;amp;p=405667&amp;amp;hilit=tunnel#p405667 source])&lt;br /&gt;
&lt;br /&gt;
* '''id''' identifier for the tunnel, to allow removing (optional).&lt;br /&gt;
* '''remove''': (boolean) yes/no value. If yes, removes all defined tunnels with the same ID (then only id= is necessary). (default: no)&lt;br /&gt;
* '''bidirectional''': (boolean) if yes, creates also a tunnel in the other direction. (default: yes)&lt;br /&gt;
* '''always_visible''': (boolean) if yes, the possible movement of enemies under fog can be seen. (default: no)&lt;br /&gt;
* '''[source]''': [[StandardLocationFilter]] the source hex(es) (required).&lt;br /&gt;
* '''[target]''': [[StandardLocationFilter]] the target hex(es) (required).&lt;br /&gt;
* '''[filter]''': [[StandardUnitFilter]] the units which can use the tunnel (required). Leave empty for &amp;quot;all units&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(Note: The tunnel tag can also be used inside the [[AbilitiesWML|[teleport]]] ability, without remove= and id=).&lt;br /&gt;
&lt;br /&gt;
== Useful Macros ==&lt;br /&gt;
There are some predefined macros that you find useful for direct actions. You can find a complete list along with a detailed explanation of how they work [http://www.wesnoth.org/macro-reference.xhtml here].&lt;br /&gt;
* '''{MOVE_UNIT}''': Moves a unit to another location in the map and the player sees the movement (unlike [teleport])&lt;br /&gt;
* '''{FULL_HEAL}''': Brings a unit to full HP&lt;br /&gt;
* '''{LOYAL_UNIT}''': Create a loyal unit&lt;br /&gt;
* '''{MODIFY_TERRAIN_MASK}''': Modify an area of terrain&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[InternalActionsWML]]&lt;br /&gt;
* [[InterfaceActionsWML]]&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;br /&gt;
[[Category: ActionsWML]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=StandardLocationFilter&amp;diff=45204</id>
		<title>StandardLocationFilter</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=StandardLocationFilter&amp;diff=45204"/>
		<updated>2012-02-10T19:38:36Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: document owner_side again better/correctly...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
&lt;br /&gt;
From [[FilterWML]], this is the standard way of filtering on locations.&lt;br /&gt;
The term [[StandardLocationFilter]] means that the set of such keys and tags (see below) can appear at that point. Sometimes a [[StandardLocationFilter]] needs to be included in a [filter_location] tag. There are however many tags which accept the [[StandardLocationFilter]] directly as an argument such as [store_locations]. Generally, if the tag [filter_location] is not mentioned to be a possible subtag of the outer tag in question, then don't put it.&lt;br /&gt;
&lt;br /&gt;
The following attributes and sub-tags are permitted:&lt;br /&gt;
&lt;br /&gt;
* '''time_of_day''': filter matches only on a given time of day (one of lawful, chaotic, neutral or liminal). Note: ''chaotic'', ''lawful'', ''neutral'' and ''liminal''; these are not times of day, these are ''alignments''. To match against 'dawn', 'dusk', 'first watch' etc., use the '''time_of_day_id''' key described below.&lt;br /&gt;
* '''time_of_day_id''': this accepts a list of one or more actual times of day, separated by commas. These IDs are taken from '''data/core/macros/schedules.cfg'''. Permissible values are case-sensitive: dawn, morning, afternoon, dusk, first_watch, second_watch, indoors, underground and deep_underground. &lt;br /&gt;
* '''terrain''': comma separated list of terrains. (See also: [http://www.wesnoth.org/wiki/FilterWML#Filtering_Terrains Filtering Terrains]).&lt;br /&gt;
* '''x,y''': the same as in the unit filter; supports any range ([http://www.wesnoth.org/wiki/StandardLocationFilter#Notes_about_Coordinate_Usage notes])&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument; if present a unit must also be there&lt;br /&gt;
* '''owner_side''': If a valid side number, restricts stored locations to villages belonging to this side. If 0, restricts to all unowned locations (the whole map except villages which belong to some side).&lt;br /&gt;
* '''find_in''': name of an array or container variable; if present, the location will not match unless it is also found stored in the variable&lt;br /&gt;
* '''radius''': matches if any location within the radius matches this filter ([http://www.wesnoth.org/wiki/StandardLocationFilter#Notes_about_Radius_Usage notes])&lt;br /&gt;
* '''[filter_radius]''': a standard location filter; normally the radius extends outwards from matching locations one step at a time without checking any additional information-- however, if this tag is present, the radius will be restricted so that it can only expand outwards in the directions where it passes the given location filter&lt;br /&gt;
* '''[and]''': an extra location filter. Unless a location matches the [and] filter, then it will be excluded. ''Note: [and],[or],and [not] extra location filters are considered after everything else in the containing filter (except radius, which is considered last in 1.3.8 and greater); they are then processed in the order encountered.''&lt;br /&gt;
* '''[or]''': an extra location filter. If a location matches the [or] filter, then it will count as a match regardless of conditions in previous filters or the containing filter.&lt;br /&gt;
* '''[not]''': an extra location filter. If a location matches the [not] filter, then that location will be excluded.&lt;br /&gt;
* '''[filter_adjacent_location]''': a standard location filter; if present the correct number of adjacent locations must match this filter&lt;br /&gt;
** '''count''': a number, range, or comma separated range; default &amp;quot;1-6&amp;quot;&lt;br /&gt;
** '''adjacent''': a comma separated list of directions; default &amp;quot;n,ne,se,s,sw,nw&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Notes about Coordinate Usage==&lt;br /&gt;
When specifying coordinates, the following keys are used:&lt;br /&gt;
* '''x''': the first coordinate&lt;br /&gt;
* '''y''': the second coordinate&lt;br /&gt;
&lt;br /&gt;
While some locations should only be one hex (like the starting position of a unit),&lt;br /&gt;
others filter over multiple hexes.&lt;br /&gt;
The following syntax is used to filter over multiple hexes:&lt;br /&gt;
&lt;br /&gt;
Dashes('''-''') are used to have the location be a range of hexes.&lt;br /&gt;
There must be values before and after the dash;&lt;br /&gt;
everything in between these numbers (inclusively) is part of the range.&lt;br /&gt;
&lt;br /&gt;
Commas(''',''') are used to separate coordinates into a list.&lt;br /&gt;
The '''x''' and '''y''' lists are then paired up, with each pair representing one hex or range.&lt;br /&gt;
&lt;br /&gt;
Note: although the ordering of locations in a list generally does not matter,&lt;br /&gt;
the action '''[move_unit_fake]''' takes in a list of hexes,&lt;br /&gt;
and moves an image onto each of those hexes in order.&lt;br /&gt;
&lt;br /&gt;
==Notes about Radius Usage==&lt;br /&gt;
:If you aren't storing any locations successfully, it may be because you put the radius or filters in the wrong place for them to combine correctly.&lt;br /&gt;
  [have_location]&lt;br /&gt;
  terrain=Gg^Vh&lt;br /&gt;
  [and]&lt;br /&gt;
    x=$x1&lt;br /&gt;
    y=$y1&lt;br /&gt;
    radius=1&lt;br /&gt;
  [/and]&lt;br /&gt;
  [/have_location]&lt;br /&gt;
Note that the use of [and] here causes the radius to have a very different meaning. Normally, all of the criteria besides radius are checked, producing a set of hexes to which the radius is applied. This means, for example, that if you're trying to find &amp;quot;a hex without a unit on it within 5 hexes of (15, 23)&amp;quot;, the code:&lt;br /&gt;
  [have_location]&lt;br /&gt;
  x,y=15,23&lt;br /&gt;
  radius=5&lt;br /&gt;
  [not]&lt;br /&gt;
    [filter]&lt;br /&gt;
    [/filter]&lt;br /&gt;
  [/not]&lt;br /&gt;
  [have_location]&lt;br /&gt;
will not work! First, it looks for a hex with x=15, y=23 without a unit on it. Then, it returns that hex and all hexes within 5 of it. If (15, 23) happens to be occupied, then it will return no hexes, because &amp;quot;all hexes within 5 hexes of (no hexes)&amp;quot; is still &amp;quot;no hexes&amp;quot;. Instead, put an [and] around the x,y and radius requirements, and it will separately find &amp;quot;(15, 23) and all hexes within 5 of it&amp;quot; and &amp;quot;each of those hexes that doesn't have a unit on it&amp;quot;, producing the desired result.&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=InternalActionsWML&amp;diff=45184</id>
		<title>InternalActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=InternalActionsWML&amp;diff=45184"/>
		<updated>2012-02-09T21:45:34Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* [store_villages] */ simplify/improve documentation for store_villages&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
&lt;br /&gt;
Part of [[ActionWML]], Internal actions are actions that WML uses internally that do not directly affect game play (or, at least, are not readily apparent to the player). For example, storing a variable is an internal action.&lt;br /&gt;
&lt;br /&gt;
== Variable Actions ==&lt;br /&gt;
&lt;br /&gt;
These actions are focused, in one way or another, on [[VariablesWML|variables]]. Creating them, modifying them, capturing game data to them, you name it, these actions are all about the variables.&lt;br /&gt;
&lt;br /&gt;
=== [set_variable] ===&lt;br /&gt;
&lt;br /&gt;
The '''[set_variable]''' tag is used to create and manipulate WML variables. The [http://www.wesnoth.org/macro-reference.xhtml#VARIABLE VARIABLE] macro is a quick syntactic shortcut for simple variable creation and the [http://www.wesnoth.org/macro-reference.xhtml#VARIABLE_OP VARIABLE_OP] macro is a quick syntactic shortcut for performing simple mathematical operations on variables.&lt;br /&gt;
&lt;br /&gt;
* '''name''': the name of the variable to manipulate&lt;br /&gt;
&lt;br /&gt;
* '''value''': set the variable to the given value (can be numeric or string).Use literal for no substitution. (see [[VariablesWML]])&lt;br /&gt;
&lt;br /&gt;
* '''literal''': set the variable to the given value (can be numeric or string). This does not interpret any dollars signs.&lt;br /&gt;
&lt;br /&gt;
* '''to_variable''': set the variable to the value of the given variable, e.g. 'to_variable=temp' would be equivalent to 'value=$temp'.&lt;br /&gt;
&lt;br /&gt;
* '''add''': add the given amount to the variable.&lt;br /&gt;
&lt;br /&gt;
* '''sub''': subtract the given amount from the variable.&lt;br /&gt;
&lt;br /&gt;
* '''multiply''': multiply the variable by the given number. The result is a float.&amp;lt;br /&amp;gt;To negate a number, multiply by -1. If you negate 0, the result is a floating-point negative zero -0. To display -0 as 0, use a second tag with add=0; it will flip -0 to 0 but not affect other numbers.&lt;br /&gt;
&lt;br /&gt;
* '''divide''': divide the variable by the given number. The result is a float. Wesnoth 1.9 and later no longer uses integer division. Use a second tag with round=floor if you relied on this.&lt;br /&gt;
&lt;br /&gt;
* '''modulo''': returns the remainder of a division.&lt;br /&gt;
&lt;br /&gt;
* '''rand''': the variable will be randomly set.&amp;lt;br&amp;gt;You may provide a comma separated list of possibilities, e.g. 'random=Bob,Bill,Bella'.&amp;lt;br&amp;gt;You may provide a range of numbers (integers), e.g. 'random=3..5'.&amp;lt;br&amp;gt;You may combine these, e.g. 'random=100,1..9', in which case there would be 1/10th chance of getting 100, just like for each of 1 to 9. See [[BuildingMultiplayerExamples]] for more info on the MP case.&lt;br /&gt;
&lt;br /&gt;
* '''time=stamp''': Retrieves a timestamp in milliseconds since wesnoth was started, can be used as timing aid. Don't try to use this as random value in MP since it will cause an OOS.&lt;br /&gt;
&lt;br /&gt;
* '''string_length''': Retrieves the length in characters of the string passed as this attribute's value; such string is parsed and variable substitution applied automatically (see [[VariablesWML]] for details).&lt;br /&gt;
&lt;br /&gt;
* '''[join]''' joins an array of strings to create a textual list&lt;br /&gt;
** '''variable''': name of the array&lt;br /&gt;
** '''key''': the key of each array element(array[$i].foo) in which the strings are stored&lt;br /&gt;
** '''separator''': separator to connect the elements&lt;br /&gt;
** '''remove_empty''': whether to ignore empty elements&lt;br /&gt;
&lt;br /&gt;
* '''ipart''': Assigns the integer part (the part to the left of the comma) of the referenced variable.&lt;br /&gt;
&lt;br /&gt;
* '''fpart''': Assigns the decimal part (the part to the right of the comma) of the referenced variable.&lt;br /&gt;
&lt;br /&gt;
* '''round''': Rounds the variable to the specified number of digits of precision. Negative precision works as expected (rounding 19517 to -2 = 19500). Special values:&lt;br /&gt;
**'''round=ceil''': Rounds upward to the nearest integer.&lt;br /&gt;
**'''round=floor''': Rounds down to the nearest integer.&lt;br /&gt;
&lt;br /&gt;
=== [set_variables] ===&lt;br /&gt;
&lt;br /&gt;
Manipulates a WML array or container&lt;br /&gt;
&lt;br /&gt;
* '''name''': the name of the array or container to manipulate&lt;br /&gt;
&lt;br /&gt;
* '''mode''': one of the following values:&lt;br /&gt;
** ''replace'': will clean the array '''name''' and replace it with given data&lt;br /&gt;
** ''append'': will append given data to the current array&lt;br /&gt;
** ''merge'': will merge in the given data into '''name'''&lt;br /&gt;
** ''insert'': will insert the given data at the index specified in the '''name''' attribute, such as name=my_array[1]. The default index is zero, which will insert to the front of the array. '''Note:''' if an invalid index is used, empty containers will be created before the insertion is performed. In other words, do not attempt to insert at an index greater than (or equal to) the array's current length. This limitation may be removed in future versions.&lt;br /&gt;
&lt;br /&gt;
* '''to_variable''': data will be set to the given array&lt;br /&gt;
&lt;br /&gt;
* '''[value]''': the WML inside the [value] tags will be stored in data, variables will be interpolated directly, use $| in order to escape the $ sign, you can store arrays of WML by supplying multiple [value] tags. ([[#Using_.5Bset_variables.5D_to_Create_Arrays_of_WML|See Example]])&lt;br /&gt;
&lt;br /&gt;
* '''[literal]''': same as '''[value]''', but variables will not be substituted, '''[literal]''' and '''[value]''' can not be used in the same [set_variables] tag, i.e. you can not create arrays by piling a mix of '''[value]''' and '''[literal]''' tags&lt;br /&gt;
&lt;br /&gt;
*'''[split]''' splits a textual list into an array which will then be set to data&lt;br /&gt;
** '''list''': textual list to split&lt;br /&gt;
** '''key''': the key of each array element(array[$i].foo) in which the strings are stored&lt;br /&gt;
** '''separator''': separator to separate the elements&lt;br /&gt;
** '''remove_empty''': whether to ignore empty elements&lt;br /&gt;
&lt;br /&gt;
=== Capturing Game Data ===&lt;br /&gt;
&lt;br /&gt;
These actions capture different bits of game data and store them to variables so they can be examined and/or manipulated.&lt;br /&gt;
&lt;br /&gt;
==== [store_gold] ====&lt;br /&gt;
&lt;br /&gt;
Stores a side's gold into a variable.&lt;br /&gt;
&lt;br /&gt;
* '''[[StandardSideFilter]]''': The first matching side's gold will be stored in the variable &amp;quot;variable&amp;quot;.&lt;br /&gt;
* '''variable''': (default='gold') the name of the variable to store the gold in&lt;br /&gt;
&lt;br /&gt;
==== [store_locations] ====&lt;br /&gt;
&lt;br /&gt;
Stores a series of locations that pass certain criteria into an array. Each member of the array has members 'x' and 'y' (the position) and 'terrain' (the terrain type) and 'owner_side' (villages only). The array will include any unreachable border hexes, if applicable.&lt;br /&gt;
&lt;br /&gt;
* [[StandardLocationFilter]]: a location or location range which specifies the locations to store. By default, all locations on the map are stored.&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable (array) into which to store the locations.&lt;br /&gt;
&lt;br /&gt;
==== [store_reachable_locations] ====&lt;br /&gt;
&lt;br /&gt;
Stores locations reachable by the given units. Can store either the movement, attack or vision ranges.&lt;br /&gt;
&lt;br /&gt;
* '''[filter]''': a [[StandardUnitFilter]]. The locations reachable by any of the matching units will be stored.&lt;br /&gt;
* '''[filter_location]''': (optional) a [[StandardLocationFilter]]. Only locations which also match this filter will be stored.&lt;br /&gt;
* '''range''': possible values ''movement'' (default), ''attack'', ''vision''. If ''movement'', stores the locations within the movement range of the unit, taking Zone of Control into account. If ''attack'', stores the attack range (movement range + 1 hex). If ''vision'', stores the vision range (movement range ignoring Zone of Control + 1 hex).&lt;br /&gt;
* '''moves''':  possible values ''current'' (default), ''max''. Specifies whether to use the current or maximum movement points when calculating the range.&lt;br /&gt;
* '''viewing_side''': (optional) the side whose vision to use when calculating the reach. This only has meaning in the presence of fog, shroud, or units with the ambush ability. If left out, then fog, shroud and ambushers are ignored and the real reach of the units is stored.&lt;br /&gt;
* '''variable''': the name of the variable (array) into which to store the locations.&lt;br /&gt;
&lt;br /&gt;
==== [store_map_dimensions] ====&lt;br /&gt;
&lt;br /&gt;
Stores the map dimensions in a variable.&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable where the values will be saved into. If it is skipped, a variable 'map_size' is used, and its contents overridden, if they existed already. The result is a container variable, with members ''width'' and ''height''.&lt;br /&gt;
&lt;br /&gt;
==== [store_side] ====&lt;br /&gt;
&lt;br /&gt;
Stores information about a certain side in a variable. The variable will contain the member variables 'name', 'team_name', 'gold' and 'income', 'fog', 'shroud', 'hidden', 'user_team_name', 'color', 'controller', 'village_gold', 'recruit', and 'side' (the $side_number of the side belonging to this container).&lt;br /&gt;
&lt;br /&gt;
* '''[[StandardSideFilter]]''': All matching sides are stored. (An array is created if several sides match - access it with side[2].team_name and so on.)&lt;br /&gt;
* '''variable''': the name of the variable to store the information in (default: &amp;quot;side&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
''note: In networked multiplayer, the controller attribute is ambiguous. Be very careful or you have OOS errors.''&lt;br /&gt;
&lt;br /&gt;
==== [store_starting_location] ====&lt;br /&gt;
&lt;br /&gt;
Stores the starting location of a side's leader in a variable. The variable is a composite type which will have members 'x', 'y', 'terrain' and 'owner_side' (villages only)&lt;br /&gt;
&lt;br /&gt;
* [[StandardSideFilter]]: The starting locations of all matching sides will be stored. If multiple sides are matched, a WML array will be created.&lt;br /&gt;
* '''variable''': (default='location'): the name of the variable to store the location in&lt;br /&gt;
&lt;br /&gt;
==== [store_time_of_day] ====&lt;br /&gt;
&lt;br /&gt;
Stores time of day information from the current scenario into a WML variable container.&lt;br /&gt;
&lt;br /&gt;
* '''variable''': (default='time_of_day') name of the container on which to store the information. The container will be filled with the same attributes found on [[TimeWML]].&lt;br /&gt;
&lt;br /&gt;
* '''turn''': (defaults to the current turn number) changes the turn number for which time of day information should be retrieved.&lt;br /&gt;
&lt;br /&gt;
==== [store_unit] ====&lt;br /&gt;
&lt;br /&gt;
Stores details about units into a [[VariablesWML#Container|container]] variable. When a unit is stored, all keys and tags in the unit definition may be manipulated, including some others, with [[InternalActionsWML#.5Bset_variable.5D|[set_variable]]]. A sample list of these tags and keys can be found [[InternalActionsWMLUnitTags|here]]. If you have a doubt about what keys are valid or what the valid value range is for each key, code a [store_unit] event, save the game, and examine what keys are in the file (or just examine the '''[unit]''' tag(s) in any save file).&lt;br /&gt;
&lt;br /&gt;
Common usage is to manipulate a unit by using '''[store_unit]''' to store it into a variable, followed by manipulation of the variable, and then [[DirectActionsWML#.5Bunstore_unit.5D|[unstore_unit]]] to re-create the unit with the modified variables.&lt;br /&gt;
&lt;br /&gt;
''Note: stored units also exist on the field, and modifying the stored variable will not automatically change the stats of the units. You need to use [unstore_unit]. See also [[DirectActionsWML#.5Bunstore_unit.5D|[unstore_unit]]] and [http://www.wesnoth.org/macro-reference.xhtml#FOREACH FOREACH].''&lt;br /&gt;
&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. All units matching this filter will be stored. If there are multiple units, they will be stored into an array of variables. The units will be stored in order of their internal ''underlying_id'' attribute, which is usually in creation order (but you normally should not depend on the order).&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable into which to store the unit(s)&lt;br /&gt;
&lt;br /&gt;
* '''mode''': defaults to ''always_clear'', which clears the variable, whether or not a match is found. If mode is set to ''replace'', the variable will not be cleared, and units which match the filter will overwrite existing elements at the start of the array, leaving any additional elements intact if the original array contained more elements than there are units matching the filter. If mode is set to ''append'', the variable will not be cleared, and units which match the filter will be added to the array after the existing elements.&lt;br /&gt;
&lt;br /&gt;
* '''kill''': if 'yes' the units that are stored will be removed from play. This is useful for instance to remove access to a player's recall list, with the intent to restore the recall list later.&lt;br /&gt;
&lt;br /&gt;
==== [store_unit_type] ====&lt;br /&gt;
&lt;br /&gt;
* '''type''': (required) the defined ID of the unit type, for example &amp;quot;Goblin Knight&amp;quot;. Do not use a translation mark or it will not work correctly for different languages. A comma-separated list of IDs may also be used to store an array of unit types.&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable into which to store the unit type information (default &amp;quot;unit_type&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==== [store_unit_type_ids] ====&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable into which to store a comma-separated list of all unit type IDs&lt;br /&gt;
&lt;br /&gt;
==== [store_villages] ====&lt;br /&gt;
&lt;br /&gt;
Stores a series of locations of villages that pass certain criteria into an array. Each member of the result array will have members 'x' and 'y' (the position) and 'terrain' (the terrain type) and 'owner_side'. note: The only advantage/difference this tag has, in comparison to using [store_locations]terrain=*^V*, is that the amount of hexes which are considered for a possible match is previously restricted to those with villages.&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable (array) into which to store the locations (default: &amp;quot;location&amp;quot;)&lt;br /&gt;
* '''[[StandardLocationFilter]]''' tags and keys as arguments&lt;br /&gt;
&lt;br /&gt;
==== [store_items] ====&lt;br /&gt;
&lt;br /&gt;
Stores current items in the scenario into an array. Each entry has at least members x and y and can have all of the other keys listed in the documentation of [[InterfaceActionsWML#.5Bitem.5D|[item]]] (depending on what was set during creating the item).&lt;br /&gt;
&lt;br /&gt;
*'''variable''': name of the wml variable array to use (default &amp;quot;items&amp;quot;)&lt;br /&gt;
*'''[[StandardLocationFilter]]''' keys as arguments: only items on locations matching this [[StandardLocationFilter]] will be stored&lt;br /&gt;
&lt;br /&gt;
==== [find_path] ====&lt;br /&gt;
&lt;br /&gt;
A WML interface to the pathfinder. Calculates the path between a unit and a location and returns the result in a WML variable, that contains also an array for every step of the path.&lt;br /&gt;
&lt;br /&gt;
*'''[traveler]''': [[StandardUnitFilter]], only the first matching unit will be used for calculation&lt;br /&gt;
*'''[destination]''': [[StandardLocationFilter]], only the first matching nearest hex will be used&lt;br /&gt;
*'''variable''': the variable name where the result will be stored, if no value is supplied 'path' will be used as default name. Each step will be stored in a [step] array inside that variable.&lt;br /&gt;
*'''allow_multiple_turns''': default no, if yes also moves that require more than one turn will be calculated.&lt;br /&gt;
*'''check_visibility''': default no, if yes the path will not be computed if some hexes are not visible due to shroud.&lt;br /&gt;
*'''check_teleport''': default yes, if no teleport won't be taken in account while computing path.&lt;br /&gt;
*'''check_zoc''': default yes, if no unit ZOCs won't be considered while calculating the path.&lt;br /&gt;
This is the structure of the variable returned by [find_path]:&lt;br /&gt;
 [path]&lt;br /&gt;
 	length = the total length of the path&lt;br /&gt;
 		if the path is calculated to an impassable hex, or the move requires multiple turns&lt;br /&gt;
 		and allow_multiple_turns is no, its value will be 0.&lt;br /&gt;
 	hexes = in 1.11, this will replace the length key above&lt;br /&gt;
 	from_x, from_y = location of the unit&lt;br /&gt;
 	to_x, to_y = destination&lt;br /&gt;
 	movement_cost = total movement cost required by unit to reach that hex&lt;br /&gt;
 	required_turns = total turns required by unit to reach that hex&lt;br /&gt;
 	[step]&lt;br /&gt;
 		x, y = location of the step&lt;br /&gt;
 		terrain = terrain of the step&lt;br /&gt;
 		movement_cost = movement cost required by unit to reach that hex&lt;br /&gt;
 		required_turns = turns required by unit to reach that hex&lt;br /&gt;
 	[/step]&lt;br /&gt;
 [/path]&lt;br /&gt;
To read the total length of the path on 1.10, use ''path.step.length''.&amp;lt;br&amp;gt;&lt;br /&gt;
{{DevFeature1.11}} ''length'' is replaced by ''hexes'' in the output array.&lt;br /&gt;
&lt;br /&gt;
=== [clear_variable] ===&lt;br /&gt;
&lt;br /&gt;
This will delete the given variable. This tag can delete a scalar or an entire array; it can also delete one container at an array index. The macro [http://www.wesnoth.org/macro-reference.xhtml#CLEAR_VARIABLE CLEAR_VARIABLE] is a shortcut for this tag.&lt;br /&gt;
&lt;br /&gt;
This action is good to use to clean up the set of variables; for example, a well-behaved scenario will delete any variables that should not be kept for the next scenario before the end of the scenario. One can also clear tags and variables of stored units; for example, one can remove [trait]s and [object]s.&lt;br /&gt;
&lt;br /&gt;
* '''name''': the name of the variable to clear. This can also be a comma-separated list of multiple variable names.&lt;br /&gt;
** If a name ends with an array index, then it deletes that one container, and shifts the indexes of all subsequent containers. For example, &amp;lt;code&amp;gt;{CLEAR_VARIABLE my_awesome_array[2]}&amp;lt;/code&amp;gt; deletes &amp;lt;code&amp;gt;my_awesome_array[2]&amp;lt;/code&amp;gt;, but then moves &amp;lt;code&amp;gt;my_awesome_array[3]&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;my_awesome_array[2]&amp;lt;/code&amp;gt;, moves &amp;lt;code&amp;gt;my_awesome_array[4]&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;my_awesome_array[3]&amp;lt;/code&amp;gt;, and so on until the end of the array.&lt;br /&gt;
** Note that &amp;lt;code&amp;gt;{CLEAR_VARIABLE my_awesome_array}&amp;lt;/code&amp;gt; deletes the entire array, but &amp;lt;code&amp;gt;{CLEAR_VARIABLE my_awesome_array[0]}&amp;lt;/code&amp;gt; deletes only the first container.&lt;br /&gt;
&lt;br /&gt;
== Other Internal Actions ==&lt;br /&gt;
&lt;br /&gt;
Believe it or not, there are some internal actions that are not focused primarily on variables. They are all grouped here.&lt;br /&gt;
&lt;br /&gt;
=== [fire_event] ===&lt;br /&gt;
&lt;br /&gt;
Trigger a WML event&lt;br /&gt;
&lt;br /&gt;
* '''name''': the name of event to trigger&lt;br /&gt;
&lt;br /&gt;
* '''[primary_unit]''': ''(Optional)'' Primary unit for the event. Will never match on a recall list unit. The first unit matching the filter will be chosen.&lt;br /&gt;
**[[StandardUnitFilter]] as argument. Do not use a [filter] tag.&lt;br /&gt;
&lt;br /&gt;
* '''[secondary_unit]''': ''(Optional)'' Same as '''[primary_unit]''' except for the secondary unit.&lt;br /&gt;
**[[StandardUnitFilter]] as argument. Do not use a [filter] tag.&lt;br /&gt;
&lt;br /&gt;
* '''[primary_attack]''': Information passed to the primary attack filter and $weapon variable on the new event.&lt;br /&gt;
&lt;br /&gt;
* '''[secondary_attack]''': Information passed to the second attack filter and $second_weapon variable on the new event.&lt;br /&gt;
&lt;br /&gt;
=== [insert_tag] ===&lt;br /&gt;
&lt;br /&gt;
Inserts a variable as WML. In other words, the value of the passed [[VariablesWML#Container|container variable]] will be injected into the game as if they had been written out in WML form. ([[#.5Binsert_tag.5D_Example|See Example]]).&lt;br /&gt;
&lt;br /&gt;
Tag insertion is a special case in that it can be used in places where other ActionWML cannot be used. The basic rule is that anywhere that $variable syntax works, tag insertion will also work. In practice this means pretty much everywhere except directly within top-level scenario tags.&lt;br /&gt;
&lt;br /&gt;
*'''name''': The [&amp;quot;name&amp;quot;] to be given to the tag. This must be a tag which would be valid at the place where [insert_tag] is used, for anything to happen. (For example, if used as ActionWML, it should be a [[ActionWML]] tag name, and it may be a recognized subtag such as &amp;quot;option&amp;quot; when used within a [message]).&lt;br /&gt;
&lt;br /&gt;
*'''variable''': Name of the container variable which will have its value inserted into the tag.&lt;br /&gt;
&lt;br /&gt;
=== [role] ===&lt;br /&gt;
&lt;br /&gt;
Tries to find a unit to assign a role to.&amp;lt;br&amp;gt;This is useful if you want to choose a non-major character to say some things during the game. Once a role is assigned, you can use '''role=''' in a unit filter to identify the unit with that role (See [[FilterWML]]).&amp;lt;br&amp;gt;However, there is no guarantee that roles will ever be assigned. You can use '''[have_unit]''' (see [[ConditionalActionsWML#Condition_Tags|Condition Tags]]) to see whether a role was assigned. This tag uses a [[StandardUnitFilter]] (without [filter]) with the modification to order the search by type, mark only the first unit found with the role, and the role attribute is not used in the search. If for some reason you want to search for units that have or don't have existing roles, you can use one or more [not] filters. The will check recall lists in addition to units on the map. In normal use, you will probably want to include a ''side'' attribute to force the unit to be on a particular side.&lt;br /&gt;
&lt;br /&gt;
* '''role''': the value to store as the unit's role. This role is not used in the [[StandardUnitFilter]] when doing the search for the unit to assign this role to.&lt;br /&gt;
&lt;br /&gt;
* '''type''': a comma-separated list of possible types the unit can be. If any types are given, then units will be searched by type in the order listed. If no type is given, then no particular order with respect to type is guaranteed.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Using [set_variables] to Create Arrays of WML ===&lt;br /&gt;
&lt;br /&gt;
 [set_variables]&lt;br /&gt;
     name=arr&lt;br /&gt;
     mode=replace&lt;br /&gt;
     [value]&lt;br /&gt;
         foo=bar&lt;br /&gt;
     [/value]&lt;br /&gt;
     [value]&lt;br /&gt;
        foo=more&lt;br /&gt;
     [/value]&lt;br /&gt;
 [/set_variables]&lt;br /&gt;
 {DEBUG_MSG $arr[0].foo}&lt;br /&gt;
 {DEBUG_MSG $arr[1].foo}&lt;br /&gt;
&lt;br /&gt;
This will produce two output messages, first one saying '''bar''' and next one saying '''more'''.&lt;br /&gt;
&lt;br /&gt;
=== [insert_tag] Example ===&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=moveto&lt;br /&gt;
     &lt;br /&gt;
     [set_variable]&lt;br /&gt;
         name=temp.speaker&lt;br /&gt;
         value=Konrad&lt;br /&gt;
     [/set_variable]&lt;br /&gt;
     &lt;br /&gt;
     [set_variable]&lt;br /&gt;
         name=temp.message&lt;br /&gt;
         value= _ &amp;quot;Yo Kalenz!&amp;quot;&lt;br /&gt;
     [/set_variable]    &lt;br /&gt;
     &lt;br /&gt;
     [insert_tag]&lt;br /&gt;
         name=message&lt;br /&gt;
         variable=temp&lt;br /&gt;
     [/insert_tag]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
This is effectively identical to:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=moveto&lt;br /&gt;
     &lt;br /&gt;
     [message]&lt;br /&gt;
         speaker=Konrad&lt;br /&gt;
         message= _ &amp;quot;Yo Kalenz!&amp;quot;&lt;br /&gt;
     [/message]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[VariablesWML]]&lt;br /&gt;
* [[ActionWML]]&lt;br /&gt;
** [[ConditionalWML]]&lt;br /&gt;
** [[DirectActionsWML]]&lt;br /&gt;
** [[InterfaceActionsWML]]&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;br /&gt;
[[Category: ActionsWML]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=StandardLocationFilter&amp;diff=45183</id>
		<title>StandardLocationFilter</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=StandardLocationFilter&amp;diff=45183"/>
		<updated>2012-02-09T21:35:50Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: make owner_side documentation more precise&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
&lt;br /&gt;
From [[FilterWML]], this is the standard way of filtering on locations.&lt;br /&gt;
The term [[StandardLocationFilter]] means that the set of such keys and tags (see below) can appear at that point. Sometimes a [[StandardLocationFilter]] needs to be included in a [filter_location] tag. There are however many tags which accept the [[StandardLocationFilter]] directly as an argument such as [store_locations]. Generally, if the tag [filter_location] is not mentioned to be a possible subtag of the outer tag in question, then don't put it.&lt;br /&gt;
&lt;br /&gt;
The following attributes and sub-tags are permitted:&lt;br /&gt;
&lt;br /&gt;
* '''time_of_day''': filter matches only on a given time of day (one of lawful, chaotic, neutral or liminal). Note: ''chaotic'', ''lawful'', ''neutral'' and ''liminal''; these are not times of day, these are ''alignments''. To match against 'dawn', 'dusk', 'first watch' etc., use the '''time_of_day_id''' key described below.&lt;br /&gt;
* '''time_of_day_id''': this accepts a list of one or more actual times of day, separated by commas. These IDs are taken from '''data/core/macros/schedules.cfg'''. Permissible values are case-sensitive: dawn, morning, afternoon, dusk, first_watch, second_watch, indoors, underground and deep_underground. &lt;br /&gt;
* '''terrain''': comma separated list of terrains. (See also: [http://www.wesnoth.org/wiki/FilterWML#Filtering_Terrains Filtering Terrains]).&lt;br /&gt;
* '''x,y''': the same as in the unit filter; supports any range ([http://www.wesnoth.org/wiki/StandardLocationFilter#Notes_about_Coordinate_Usage notes])&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument; if present a unit must also be there&lt;br /&gt;
* '''owner_side''': If given, restricts stored locations to villages, and these to the given side number (0 for unowned villages).&lt;br /&gt;
* '''find_in''': name of an array or container variable; if present, the location will not match unless it is also found stored in the variable&lt;br /&gt;
* '''radius''': matches if any location within the radius matches this filter ([http://www.wesnoth.org/wiki/StandardLocationFilter#Notes_about_Radius_Usage notes])&lt;br /&gt;
* '''[filter_radius]''': a standard location filter; normally the radius extends outwards from matching locations one step at a time without checking any additional information-- however, if this tag is present, the radius will be restricted so that it can only expand outwards in the directions where it passes the given location filter&lt;br /&gt;
* '''[and]''': an extra location filter. Unless a location matches the [and] filter, then it will be excluded. ''Note: [and],[or],and [not] extra location filters are considered after everything else in the containing filter (except radius, which is considered last in 1.3.8 and greater); they are then processed in the order encountered.''&lt;br /&gt;
* '''[or]''': an extra location filter. If a location matches the [or] filter, then it will count as a match regardless of conditions in previous filters or the containing filter.&lt;br /&gt;
* '''[not]''': an extra location filter. If a location matches the [not] filter, then that location will be excluded.&lt;br /&gt;
* '''[filter_adjacent_location]''': a standard location filter; if present the correct number of adjacent locations must match this filter&lt;br /&gt;
** '''count''': a number, range, or comma separated range; default &amp;quot;1-6&amp;quot;&lt;br /&gt;
** '''adjacent''': a comma separated list of directions; default &amp;quot;n,ne,se,s,sw,nw&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Notes about Coordinate Usage==&lt;br /&gt;
When specifying coordinates, the following keys are used:&lt;br /&gt;
* '''x''': the first coordinate&lt;br /&gt;
* '''y''': the second coordinate&lt;br /&gt;
&lt;br /&gt;
While some locations should only be one hex (like the starting position of a unit),&lt;br /&gt;
others filter over multiple hexes.&lt;br /&gt;
The following syntax is used to filter over multiple hexes:&lt;br /&gt;
&lt;br /&gt;
Dashes('''-''') are used to have the location be a range of hexes.&lt;br /&gt;
There must be values before and after the dash;&lt;br /&gt;
everything in between these numbers (inclusively) is part of the range.&lt;br /&gt;
&lt;br /&gt;
Commas(''',''') are used to separate coordinates into a list.&lt;br /&gt;
The '''x''' and '''y''' lists are then paired up, with each pair representing one hex or range.&lt;br /&gt;
&lt;br /&gt;
Note: although the ordering of locations in a list generally does not matter,&lt;br /&gt;
the action '''[move_unit_fake]''' takes in a list of hexes,&lt;br /&gt;
and moves an image onto each of those hexes in order.&lt;br /&gt;
&lt;br /&gt;
==Notes about Radius Usage==&lt;br /&gt;
:If you aren't storing any locations successfully, it may be because you put the radius or filters in the wrong place for them to combine correctly.&lt;br /&gt;
  [have_location]&lt;br /&gt;
  terrain=Gg^Vh&lt;br /&gt;
  [and]&lt;br /&gt;
    x=$x1&lt;br /&gt;
    y=$y1&lt;br /&gt;
    radius=1&lt;br /&gt;
  [/and]&lt;br /&gt;
  [/have_location]&lt;br /&gt;
Note that the use of [and] here causes the radius to have a very different meaning. Normally, all of the criteria besides radius are checked, producing a set of hexes to which the radius is applied. This means, for example, that if you're trying to find &amp;quot;a hex without a unit on it within 5 hexes of (15, 23)&amp;quot;, the code:&lt;br /&gt;
  [have_location]&lt;br /&gt;
  x,y=15,23&lt;br /&gt;
  radius=5&lt;br /&gt;
  [not]&lt;br /&gt;
    [filter]&lt;br /&gt;
    [/filter]&lt;br /&gt;
  [/not]&lt;br /&gt;
  [have_location]&lt;br /&gt;
will not work! First, it looks for a hex with x=15, y=23 without a unit on it. Then, it returns that hex and all hexes within 5 of it. If (15, 23) happens to be occupied, then it will return no hexes, because &amp;quot;all hexes within 5 hexes of (no hexes)&amp;quot; is still &amp;quot;no hexes&amp;quot;. Instead, put an [and] around the x,y and radius requirements, and it will separately find &amp;quot;(15, 23) and all hexes within 5 of it&amp;quot; and &amp;quot;each of those hexes that doesn't have a unit on it&amp;quot;, producing the desired result.&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=InternalActionsWML&amp;diff=45182</id>
		<title>InternalActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=InternalActionsWML&amp;diff=45182"/>
		<updated>2012-02-09T21:27:48Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* [store_locations] */ correct store_locations documentation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
&lt;br /&gt;
Part of [[ActionWML]], Internal actions are actions that WML uses internally that do not directly affect game play (or, at least, are not readily apparent to the player). For example, storing a variable is an internal action.&lt;br /&gt;
&lt;br /&gt;
== Variable Actions ==&lt;br /&gt;
&lt;br /&gt;
These actions are focused, in one way or another, on [[VariablesWML|variables]]. Creating them, modifying them, capturing game data to them, you name it, these actions are all about the variables.&lt;br /&gt;
&lt;br /&gt;
=== [set_variable] ===&lt;br /&gt;
&lt;br /&gt;
The '''[set_variable]''' tag is used to create and manipulate WML variables. The [http://www.wesnoth.org/macro-reference.xhtml#VARIABLE VARIABLE] macro is a quick syntactic shortcut for simple variable creation and the [http://www.wesnoth.org/macro-reference.xhtml#VARIABLE_OP VARIABLE_OP] macro is a quick syntactic shortcut for performing simple mathematical operations on variables.&lt;br /&gt;
&lt;br /&gt;
* '''name''': the name of the variable to manipulate&lt;br /&gt;
&lt;br /&gt;
* '''value''': set the variable to the given value (can be numeric or string).Use literal for no substitution. (see [[VariablesWML]])&lt;br /&gt;
&lt;br /&gt;
* '''literal''': set the variable to the given value (can be numeric or string). This does not interpret any dollars signs.&lt;br /&gt;
&lt;br /&gt;
* '''to_variable''': set the variable to the value of the given variable, e.g. 'to_variable=temp' would be equivalent to 'value=$temp'.&lt;br /&gt;
&lt;br /&gt;
* '''add''': add the given amount to the variable.&lt;br /&gt;
&lt;br /&gt;
* '''sub''': subtract the given amount from the variable.&lt;br /&gt;
&lt;br /&gt;
* '''multiply''': multiply the variable by the given number. The result is a float.&amp;lt;br /&amp;gt;To negate a number, multiply by -1. If you negate 0, the result is a floating-point negative zero -0. To display -0 as 0, use a second tag with add=0; it will flip -0 to 0 but not affect other numbers.&lt;br /&gt;
&lt;br /&gt;
* '''divide''': divide the variable by the given number. The result is a float. Wesnoth 1.9 and later no longer uses integer division. Use a second tag with round=floor if you relied on this.&lt;br /&gt;
&lt;br /&gt;
* '''modulo''': returns the remainder of a division.&lt;br /&gt;
&lt;br /&gt;
* '''rand''': the variable will be randomly set.&amp;lt;br&amp;gt;You may provide a comma separated list of possibilities, e.g. 'random=Bob,Bill,Bella'.&amp;lt;br&amp;gt;You may provide a range of numbers (integers), e.g. 'random=3..5'.&amp;lt;br&amp;gt;You may combine these, e.g. 'random=100,1..9', in which case there would be 1/10th chance of getting 100, just like for each of 1 to 9. See [[BuildingMultiplayerExamples]] for more info on the MP case.&lt;br /&gt;
&lt;br /&gt;
* '''time=stamp''': Retrieves a timestamp in milliseconds since wesnoth was started, can be used as timing aid. Don't try to use this as random value in MP since it will cause an OOS.&lt;br /&gt;
&lt;br /&gt;
* '''string_length''': Retrieves the length in characters of the string passed as this attribute's value; such string is parsed and variable substitution applied automatically (see [[VariablesWML]] for details).&lt;br /&gt;
&lt;br /&gt;
* '''[join]''' joins an array of strings to create a textual list&lt;br /&gt;
** '''variable''': name of the array&lt;br /&gt;
** '''key''': the key of each array element(array[$i].foo) in which the strings are stored&lt;br /&gt;
** '''separator''': separator to connect the elements&lt;br /&gt;
** '''remove_empty''': whether to ignore empty elements&lt;br /&gt;
&lt;br /&gt;
* '''ipart''': Assigns the integer part (the part to the left of the comma) of the referenced variable.&lt;br /&gt;
&lt;br /&gt;
* '''fpart''': Assigns the decimal part (the part to the right of the comma) of the referenced variable.&lt;br /&gt;
&lt;br /&gt;
* '''round''': Rounds the variable to the specified number of digits of precision. Negative precision works as expected (rounding 19517 to -2 = 19500). Special values:&lt;br /&gt;
**'''round=ceil''': Rounds upward to the nearest integer.&lt;br /&gt;
**'''round=floor''': Rounds down to the nearest integer.&lt;br /&gt;
&lt;br /&gt;
=== [set_variables] ===&lt;br /&gt;
&lt;br /&gt;
Manipulates a WML array or container&lt;br /&gt;
&lt;br /&gt;
* '''name''': the name of the array or container to manipulate&lt;br /&gt;
&lt;br /&gt;
* '''mode''': one of the following values:&lt;br /&gt;
** ''replace'': will clean the array '''name''' and replace it with given data&lt;br /&gt;
** ''append'': will append given data to the current array&lt;br /&gt;
** ''merge'': will merge in the given data into '''name'''&lt;br /&gt;
** ''insert'': will insert the given data at the index specified in the '''name''' attribute, such as name=my_array[1]. The default index is zero, which will insert to the front of the array. '''Note:''' if an invalid index is used, empty containers will be created before the insertion is performed. In other words, do not attempt to insert at an index greater than (or equal to) the array's current length. This limitation may be removed in future versions.&lt;br /&gt;
&lt;br /&gt;
* '''to_variable''': data will be set to the given array&lt;br /&gt;
&lt;br /&gt;
* '''[value]''': the WML inside the [value] tags will be stored in data, variables will be interpolated directly, use $| in order to escape the $ sign, you can store arrays of WML by supplying multiple [value] tags. ([[#Using_.5Bset_variables.5D_to_Create_Arrays_of_WML|See Example]])&lt;br /&gt;
&lt;br /&gt;
* '''[literal]''': same as '''[value]''', but variables will not be substituted, '''[literal]''' and '''[value]''' can not be used in the same [set_variables] tag, i.e. you can not create arrays by piling a mix of '''[value]''' and '''[literal]''' tags&lt;br /&gt;
&lt;br /&gt;
*'''[split]''' splits a textual list into an array which will then be set to data&lt;br /&gt;
** '''list''': textual list to split&lt;br /&gt;
** '''key''': the key of each array element(array[$i].foo) in which the strings are stored&lt;br /&gt;
** '''separator''': separator to separate the elements&lt;br /&gt;
** '''remove_empty''': whether to ignore empty elements&lt;br /&gt;
&lt;br /&gt;
=== Capturing Game Data ===&lt;br /&gt;
&lt;br /&gt;
These actions capture different bits of game data and store them to variables so they can be examined and/or manipulated.&lt;br /&gt;
&lt;br /&gt;
==== [store_gold] ====&lt;br /&gt;
&lt;br /&gt;
Stores a side's gold into a variable.&lt;br /&gt;
&lt;br /&gt;
* '''[[StandardSideFilter]]''': The first matching side's gold will be stored in the variable &amp;quot;variable&amp;quot;.&lt;br /&gt;
* '''variable''': (default='gold') the name of the variable to store the gold in&lt;br /&gt;
&lt;br /&gt;
==== [store_locations] ====&lt;br /&gt;
&lt;br /&gt;
Stores a series of locations that pass certain criteria into an array. Each member of the array has members 'x' and 'y' (the position) and 'terrain' (the terrain type) and 'owner_side' (villages only). The array will include any unreachable border hexes, if applicable.&lt;br /&gt;
&lt;br /&gt;
* [[StandardLocationFilter]]: a location or location range which specifies the locations to store. By default, all locations on the map are stored.&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable (array) into which to store the locations.&lt;br /&gt;
&lt;br /&gt;
==== [store_reachable_locations] ====&lt;br /&gt;
&lt;br /&gt;
Stores locations reachable by the given units. Can store either the movement, attack or vision ranges.&lt;br /&gt;
&lt;br /&gt;
* '''[filter]''': a [[StandardUnitFilter]]. The locations reachable by any of the matching units will be stored.&lt;br /&gt;
* '''[filter_location]''': (optional) a [[StandardLocationFilter]]. Only locations which also match this filter will be stored.&lt;br /&gt;
* '''range''': possible values ''movement'' (default), ''attack'', ''vision''. If ''movement'', stores the locations within the movement range of the unit, taking Zone of Control into account. If ''attack'', stores the attack range (movement range + 1 hex). If ''vision'', stores the vision range (movement range ignoring Zone of Control + 1 hex).&lt;br /&gt;
* '''moves''':  possible values ''current'' (default), ''max''. Specifies whether to use the current or maximum movement points when calculating the range.&lt;br /&gt;
* '''viewing_side''': (optional) the side whose vision to use when calculating the reach. This only has meaning in the presence of fog, shroud, or units with the ambush ability. If left out, then fog, shroud and ambushers are ignored and the real reach of the units is stored.&lt;br /&gt;
* '''variable''': the name of the variable (array) into which to store the locations.&lt;br /&gt;
&lt;br /&gt;
==== [store_map_dimensions] ====&lt;br /&gt;
&lt;br /&gt;
Stores the map dimensions in a variable.&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable where the values will be saved into. If it is skipped, a variable 'map_size' is used, and its contents overridden, if they existed already. The result is a container variable, with members ''width'' and ''height''.&lt;br /&gt;
&lt;br /&gt;
==== [store_side] ====&lt;br /&gt;
&lt;br /&gt;
Stores information about a certain side in a variable. The variable will contain the member variables 'name', 'team_name', 'gold' and 'income', 'fog', 'shroud', 'hidden', 'user_team_name', 'color', 'controller', 'village_gold', 'recruit', and 'side' (the $side_number of the side belonging to this container).&lt;br /&gt;
&lt;br /&gt;
* '''[[StandardSideFilter]]''': All matching sides are stored. (An array is created if several sides match - access it with side[2].team_name and so on.)&lt;br /&gt;
* '''variable''': the name of the variable to store the information in (default: &amp;quot;side&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
''note: In networked multiplayer, the controller attribute is ambiguous. Be very careful or you have OOS errors.''&lt;br /&gt;
&lt;br /&gt;
==== [store_starting_location] ====&lt;br /&gt;
&lt;br /&gt;
Stores the starting location of a side's leader in a variable. The variable is a composite type which will have members 'x', 'y', 'terrain' and 'owner_side' (villages only)&lt;br /&gt;
&lt;br /&gt;
* [[StandardSideFilter]]: The starting locations of all matching sides will be stored. If multiple sides are matched, a WML array will be created.&lt;br /&gt;
* '''variable''': (default='location'): the name of the variable to store the location in&lt;br /&gt;
&lt;br /&gt;
==== [store_time_of_day] ====&lt;br /&gt;
&lt;br /&gt;
Stores time of day information from the current scenario into a WML variable container.&lt;br /&gt;
&lt;br /&gt;
* '''variable''': (default='time_of_day') name of the container on which to store the information. The container will be filled with the same attributes found on [[TimeWML]].&lt;br /&gt;
&lt;br /&gt;
* '''turn''': (defaults to the current turn number) changes the turn number for which time of day information should be retrieved.&lt;br /&gt;
&lt;br /&gt;
==== [store_unit] ====&lt;br /&gt;
&lt;br /&gt;
Stores details about units into a [[VariablesWML#Container|container]] variable. When a unit is stored, all keys and tags in the unit definition may be manipulated, including some others, with [[InternalActionsWML#.5Bset_variable.5D|[set_variable]]]. A sample list of these tags and keys can be found [[InternalActionsWMLUnitTags|here]]. If you have a doubt about what keys are valid or what the valid value range is for each key, code a [store_unit] event, save the game, and examine what keys are in the file (or just examine the '''[unit]''' tag(s) in any save file).&lt;br /&gt;
&lt;br /&gt;
Common usage is to manipulate a unit by using '''[store_unit]''' to store it into a variable, followed by manipulation of the variable, and then [[DirectActionsWML#.5Bunstore_unit.5D|[unstore_unit]]] to re-create the unit with the modified variables.&lt;br /&gt;
&lt;br /&gt;
''Note: stored units also exist on the field, and modifying the stored variable will not automatically change the stats of the units. You need to use [unstore_unit]. See also [[DirectActionsWML#.5Bunstore_unit.5D|[unstore_unit]]] and [http://www.wesnoth.org/macro-reference.xhtml#FOREACH FOREACH].''&lt;br /&gt;
&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. All units matching this filter will be stored. If there are multiple units, they will be stored into an array of variables. The units will be stored in order of their internal ''underlying_id'' attribute, which is usually in creation order (but you normally should not depend on the order).&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable into which to store the unit(s)&lt;br /&gt;
&lt;br /&gt;
* '''mode''': defaults to ''always_clear'', which clears the variable, whether or not a match is found. If mode is set to ''replace'', the variable will not be cleared, and units which match the filter will overwrite existing elements at the start of the array, leaving any additional elements intact if the original array contained more elements than there are units matching the filter. If mode is set to ''append'', the variable will not be cleared, and units which match the filter will be added to the array after the existing elements.&lt;br /&gt;
&lt;br /&gt;
* '''kill''': if 'yes' the units that are stored will be removed from play. This is useful for instance to remove access to a player's recall list, with the intent to restore the recall list later.&lt;br /&gt;
&lt;br /&gt;
==== [store_unit_type] ====&lt;br /&gt;
&lt;br /&gt;
* '''type''': (required) the defined ID of the unit type, for example &amp;quot;Goblin Knight&amp;quot;. Do not use a translation mark or it will not work correctly for different languages. A comma-separated list of IDs may also be used to store an array of unit types.&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable into which to store the unit type information (default &amp;quot;unit_type&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==== [store_unit_type_ids] ====&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable into which to store a comma-separated list of all unit type IDs&lt;br /&gt;
&lt;br /&gt;
==== [store_villages] ====&lt;br /&gt;
&lt;br /&gt;
Stores a series of locations of villages that pass certain criteria into an array. Each member of the result array will have members 'x' and 'y' (the position) and 'terrain' (the terrain type) and 'owner_side'. Although only owner_side and terrain filters are explained below, all features of the [[StandardLocationFilter]] are fully supported.&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable (array) into which to store the locations&lt;br /&gt;
&lt;br /&gt;
* '''owner_side''': a side number. If present, only villages owned by this side will be choosen. If owner_side=0, store the unowned villages. &lt;br /&gt;
&lt;br /&gt;
* '''terrain''': a series of terrain characters. (See [[TerrainLettersWML]] for possible values.) If present, villages will only be chosen if the terrain code of the terrain type of that location is listed.  You may give a comma separated list of terrains.&lt;br /&gt;
&lt;br /&gt;
==== [store_items] ====&lt;br /&gt;
&lt;br /&gt;
Stores current items in the scenario into an array. Each entry has at least members x and y and can have all of the other keys listed in the documentation of [[InterfaceActionsWML#.5Bitem.5D|[item]]] (depending on what was set during creating the item).&lt;br /&gt;
&lt;br /&gt;
*'''variable''': name of the wml variable array to use (default &amp;quot;items&amp;quot;)&lt;br /&gt;
*'''[[StandardLocationFilter]]''' keys as arguments: only items on locations matching this [[StandardLocationFilter]] will be stored&lt;br /&gt;
&lt;br /&gt;
==== [find_path] ====&lt;br /&gt;
&lt;br /&gt;
A WML interface to the pathfinder. Calculates the path between a unit and a location and returns the result in a WML variable, that contains also an array for every step of the path.&lt;br /&gt;
&lt;br /&gt;
*'''[traveler]''': [[StandardUnitFilter]], only the first matching unit will be used for calculation&lt;br /&gt;
*'''[destination]''': [[StandardLocationFilter]], only the first matching nearest hex will be used&lt;br /&gt;
*'''variable''': the variable name where the result will be stored, if no value is supplied 'path' will be used as default name. Each step will be stored in a [step] array inside that variable.&lt;br /&gt;
*'''allow_multiple_turns''': default no, if yes also moves that require more than one turn will be calculated.&lt;br /&gt;
*'''check_visibility''': default no, if yes the path will not be computed if some hexes are not visible due to shroud.&lt;br /&gt;
*'''check_teleport''': default yes, if no teleport won't be taken in account while computing path.&lt;br /&gt;
*'''check_zoc''': default yes, if no unit ZOCs won't be considered while calculating the path.&lt;br /&gt;
This is the structure of the variable returned by [find_path]:&lt;br /&gt;
 [path]&lt;br /&gt;
 	length = the total length of the path&lt;br /&gt;
 		if the path is calculated to an impassable hex, or the move requires multiple turns&lt;br /&gt;
 		and allow_multiple_turns is no, its value will be 0.&lt;br /&gt;
 	hexes = in 1.11, this will replace the length key above&lt;br /&gt;
 	from_x, from_y = location of the unit&lt;br /&gt;
 	to_x, to_y = destination&lt;br /&gt;
 	movement_cost = total movement cost required by unit to reach that hex&lt;br /&gt;
 	required_turns = total turns required by unit to reach that hex&lt;br /&gt;
 	[step]&lt;br /&gt;
 		x, y = location of the step&lt;br /&gt;
 		terrain = terrain of the step&lt;br /&gt;
 		movement_cost = movement cost required by unit to reach that hex&lt;br /&gt;
 		required_turns = turns required by unit to reach that hex&lt;br /&gt;
 	[/step]&lt;br /&gt;
 [/path]&lt;br /&gt;
To read the total length of the path on 1.10, use ''path.step.length''.&amp;lt;br&amp;gt;&lt;br /&gt;
{{DevFeature1.11}} ''length'' is replaced by ''hexes'' in the output array.&lt;br /&gt;
&lt;br /&gt;
=== [clear_variable] ===&lt;br /&gt;
&lt;br /&gt;
This will delete the given variable. This tag can delete a scalar or an entire array; it can also delete one container at an array index. The macro [http://www.wesnoth.org/macro-reference.xhtml#CLEAR_VARIABLE CLEAR_VARIABLE] is a shortcut for this tag.&lt;br /&gt;
&lt;br /&gt;
This action is good to use to clean up the set of variables; for example, a well-behaved scenario will delete any variables that should not be kept for the next scenario before the end of the scenario. One can also clear tags and variables of stored units; for example, one can remove [trait]s and [object]s.&lt;br /&gt;
&lt;br /&gt;
* '''name''': the name of the variable to clear. This can also be a comma-separated list of multiple variable names.&lt;br /&gt;
** If a name ends with an array index, then it deletes that one container, and shifts the indexes of all subsequent containers. For example, &amp;lt;code&amp;gt;{CLEAR_VARIABLE my_awesome_array[2]}&amp;lt;/code&amp;gt; deletes &amp;lt;code&amp;gt;my_awesome_array[2]&amp;lt;/code&amp;gt;, but then moves &amp;lt;code&amp;gt;my_awesome_array[3]&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;my_awesome_array[2]&amp;lt;/code&amp;gt;, moves &amp;lt;code&amp;gt;my_awesome_array[4]&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;my_awesome_array[3]&amp;lt;/code&amp;gt;, and so on until the end of the array.&lt;br /&gt;
** Note that &amp;lt;code&amp;gt;{CLEAR_VARIABLE my_awesome_array}&amp;lt;/code&amp;gt; deletes the entire array, but &amp;lt;code&amp;gt;{CLEAR_VARIABLE my_awesome_array[0]}&amp;lt;/code&amp;gt; deletes only the first container.&lt;br /&gt;
&lt;br /&gt;
== Other Internal Actions ==&lt;br /&gt;
&lt;br /&gt;
Believe it or not, there are some internal actions that are not focused primarily on variables. They are all grouped here.&lt;br /&gt;
&lt;br /&gt;
=== [fire_event] ===&lt;br /&gt;
&lt;br /&gt;
Trigger a WML event&lt;br /&gt;
&lt;br /&gt;
* '''name''': the name of event to trigger&lt;br /&gt;
&lt;br /&gt;
* '''[primary_unit]''': ''(Optional)'' Primary unit for the event. Will never match on a recall list unit. The first unit matching the filter will be chosen.&lt;br /&gt;
**[[StandardUnitFilter]] as argument. Do not use a [filter] tag.&lt;br /&gt;
&lt;br /&gt;
* '''[secondary_unit]''': ''(Optional)'' Same as '''[primary_unit]''' except for the secondary unit.&lt;br /&gt;
**[[StandardUnitFilter]] as argument. Do not use a [filter] tag.&lt;br /&gt;
&lt;br /&gt;
* '''[primary_attack]''': Information passed to the primary attack filter and $weapon variable on the new event.&lt;br /&gt;
&lt;br /&gt;
* '''[secondary_attack]''': Information passed to the second attack filter and $second_weapon variable on the new event.&lt;br /&gt;
&lt;br /&gt;
=== [insert_tag] ===&lt;br /&gt;
&lt;br /&gt;
Inserts a variable as WML. In other words, the value of the passed [[VariablesWML#Container|container variable]] will be injected into the game as if they had been written out in WML form. ([[#.5Binsert_tag.5D_Example|See Example]]).&lt;br /&gt;
&lt;br /&gt;
Tag insertion is a special case in that it can be used in places where other ActionWML cannot be used. The basic rule is that anywhere that $variable syntax works, tag insertion will also work. In practice this means pretty much everywhere except directly within top-level scenario tags.&lt;br /&gt;
&lt;br /&gt;
*'''name''': The [&amp;quot;name&amp;quot;] to be given to the tag. This must be a tag which would be valid at the place where [insert_tag] is used, for anything to happen. (For example, if used as ActionWML, it should be a [[ActionWML]] tag name, and it may be a recognized subtag such as &amp;quot;option&amp;quot; when used within a [message]).&lt;br /&gt;
&lt;br /&gt;
*'''variable''': Name of the container variable which will have its value inserted into the tag.&lt;br /&gt;
&lt;br /&gt;
=== [role] ===&lt;br /&gt;
&lt;br /&gt;
Tries to find a unit to assign a role to.&amp;lt;br&amp;gt;This is useful if you want to choose a non-major character to say some things during the game. Once a role is assigned, you can use '''role=''' in a unit filter to identify the unit with that role (See [[FilterWML]]).&amp;lt;br&amp;gt;However, there is no guarantee that roles will ever be assigned. You can use '''[have_unit]''' (see [[ConditionalActionsWML#Condition_Tags|Condition Tags]]) to see whether a role was assigned. This tag uses a [[StandardUnitFilter]] (without [filter]) with the modification to order the search by type, mark only the first unit found with the role, and the role attribute is not used in the search. If for some reason you want to search for units that have or don't have existing roles, you can use one or more [not] filters. The will check recall lists in addition to units on the map. In normal use, you will probably want to include a ''side'' attribute to force the unit to be on a particular side.&lt;br /&gt;
&lt;br /&gt;
* '''role''': the value to store as the unit's role. This role is not used in the [[StandardUnitFilter]] when doing the search for the unit to assign this role to.&lt;br /&gt;
&lt;br /&gt;
* '''type''': a comma-separated list of possible types the unit can be. If any types are given, then units will be searched by type in the order listed. If no type is given, then no particular order with respect to type is guaranteed.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Using [set_variables] to Create Arrays of WML ===&lt;br /&gt;
&lt;br /&gt;
 [set_variables]&lt;br /&gt;
     name=arr&lt;br /&gt;
     mode=replace&lt;br /&gt;
     [value]&lt;br /&gt;
         foo=bar&lt;br /&gt;
     [/value]&lt;br /&gt;
     [value]&lt;br /&gt;
        foo=more&lt;br /&gt;
     [/value]&lt;br /&gt;
 [/set_variables]&lt;br /&gt;
 {DEBUG_MSG $arr[0].foo}&lt;br /&gt;
 {DEBUG_MSG $arr[1].foo}&lt;br /&gt;
&lt;br /&gt;
This will produce two output messages, first one saying '''bar''' and next one saying '''more'''.&lt;br /&gt;
&lt;br /&gt;
=== [insert_tag] Example ===&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=moveto&lt;br /&gt;
     &lt;br /&gt;
     [set_variable]&lt;br /&gt;
         name=temp.speaker&lt;br /&gt;
         value=Konrad&lt;br /&gt;
     [/set_variable]&lt;br /&gt;
     &lt;br /&gt;
     [set_variable]&lt;br /&gt;
         name=temp.message&lt;br /&gt;
         value= _ &amp;quot;Yo Kalenz!&amp;quot;&lt;br /&gt;
     [/set_variable]    &lt;br /&gt;
     &lt;br /&gt;
     [insert_tag]&lt;br /&gt;
         name=message&lt;br /&gt;
         variable=temp&lt;br /&gt;
     [/insert_tag]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
This is effectively identical to:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=moveto&lt;br /&gt;
     &lt;br /&gt;
     [message]&lt;br /&gt;
         speaker=Konrad&lt;br /&gt;
         message= _ &amp;quot;Yo Kalenz!&amp;quot;&lt;br /&gt;
     [/message]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[VariablesWML]]&lt;br /&gt;
* [[ActionWML]]&lt;br /&gt;
** [[ConditionalWML]]&lt;br /&gt;
** [[DirectActionsWML]]&lt;br /&gt;
** [[InterfaceActionsWML]]&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;br /&gt;
[[Category: ActionsWML]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=LuaWML/Events&amp;diff=45163</id>
		<title>LuaWML/Events</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=LuaWML/Events&amp;diff=45163"/>
		<updated>2012-02-08T22:10:03Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* wesnoth.register_wml_action */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the [[LuaWML]] functions and helpers for interacting with events and action handlers.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.fire ====&lt;br /&gt;
&lt;br /&gt;
Fires a [[ActionWML|WML action]]. Argument 1 is the name of the action. Argument 2 is the WML table describing the action. Note: WML variables are substituted.&lt;br /&gt;
&lt;br /&gt;
 wesnoth.fire(&amp;quot;message&amp;quot;, { speaker=&amp;quot;narrator&amp;quot;, message=_ &amp;quot;Hello World!&amp;quot; })&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.register_wml_action ====&lt;br /&gt;
{{DevFeature1.11}}: This function is deprecated; directly write into [[#wesnoth.wml_actions]] instead.&lt;br /&gt;
&lt;br /&gt;
Registers the second argument as a handler for the given action tag. When the game encounters this tag when executing [[ActionWML]] (for example in an event), it fires the action handler and passes the content of the WML object as the first argument. Thus, this function creates new types of [[ActionWML]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the registered function raises an error with a message starting with ''~wml:'', it will not be displayed as a Lua error with a backtrace but as a standard WML error. (See also [[#helper.wml_error]].) The following script defines a [freeze_unit] tag that sets to 0 the move points of the unit with the given id.&lt;br /&gt;
&lt;br /&gt;
 wesnoth.register_wml_action(&amp;quot;freeze_unit&amp;quot;,&lt;br /&gt;
     function(cfg)&lt;br /&gt;
         local unit_id = cfg.id or error(&amp;quot;~wml:[freeze_unit] expects an id= attribute.&amp;quot;, 0)&lt;br /&gt;
         helper.modify_unit({ id = unit_id }, { moves = 0 })&lt;br /&gt;
     end&lt;br /&gt;
 )&lt;br /&gt;
&lt;br /&gt;
 # The new tag can now be used in plain WML code.&lt;br /&gt;
 [freeze_unit]&lt;br /&gt;
     id=Delfador&lt;br /&gt;
 [/freeze_unit]&lt;br /&gt;
&lt;br /&gt;
The function returns the previous action handler. Its metatable appears as '''&amp;quot;wml action handler&amp;quot;'''. This handler can be called to delegate part of the action, if needed. For instance, the following script modifies the [[InterfaceActionsWML#Other interface tags|[print]]] tag so that messages are displayed with a bigger font.&lt;br /&gt;
&lt;br /&gt;
 local old_print_handler&lt;br /&gt;
 old_print_handler = wesnoth.register_wml_action(&amp;quot;print&amp;quot;,&lt;br /&gt;
     function(cfg)&lt;br /&gt;
         -- Do not perform variable substitution.&lt;br /&gt;
         local new_cfg = cfg.__literal&lt;br /&gt;
         -- Modify the size field and call the previous handler.&lt;br /&gt;
         new_cfg.size = (cfg.size or 12) + 10&lt;br /&gt;
         old_print_handler(cfg)&lt;br /&gt;
     end&lt;br /&gt;
 )&lt;br /&gt;
&lt;br /&gt;
Note that the data coming from the WML tag are stored in a read-only object and variable substitution happens on the fly when accessing attributes and children. The metatable of this proxy object appears as '''&amp;quot;wml object&amp;quot;'''. See [[LuaWML#Encoding WML objects into Lua tables]] for more details.&lt;br /&gt;
&lt;br /&gt;
If the name of a tag starts as ''filter'', it is ignored when the actions of an event are executed. These names are indeed reserved for event filtering, e.g. [filter], [filter_weapon], and so on. It is therefore useless to define action tags with such names.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.wml_actions ====&lt;br /&gt;
&lt;br /&gt;
This is not a function but an associative table indexed by WML action names. It contains functions performing the corresponding actions. Using these functions is similar to calling [[#wesnoth.fire]], while setting entries of the table is similar to calling [[#wesnoth.register_wml_action]].&lt;br /&gt;
&lt;br /&gt;
 function wesnoth.wml_actions.freeze_unit(cfg)&lt;br /&gt;
     local unit_id = cfg.id or helper.wml_error &amp;quot;[freeze_unit] expects an id= attribute.&amp;quot;&lt;br /&gt;
     helper.modify_unit({ id = unit_id }, { moves = 0 })&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
Note: When calling an action handler directly through its function stored in ''wesnoth.wml_actions'', the engine is not involved. As a consequence, whether variable substitution will happen is up to the handler. In particular, if the argument is a plain table, the caller should have substituted WML variables beforehand to be on the safe side. Moreover, table arguments might be modified by the action handler, so they should usually not be reused for consecutive calls. If variable substitution should happen and/or table content should be preserved, one can call [[#wesnoth.tovconfig]] and pass its result to the handler. Calling [[#wesnoth.fire]] is another possibility.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.game_events ====&lt;br /&gt;
&lt;br /&gt;
This is not a function but an associative table indexed by engine action names. It contains function hooks the engine calls whenever it performs a particular action.&lt;br /&gt;
&lt;br /&gt;
* '''on_save''': function called when the engine (auto)saves a scenario file; it should return a WML table and the children of this table are added to the savefile.&lt;br /&gt;
* '''on_load''': function called when the engine loads a scenario file; its argument is a WML table that contains all the children of the savefile that the engine did not handle.&lt;br /&gt;
* '''on_event''': function called before each WML event is executed; its argument is the event name; other event arguments can be recovered from [[LuaWML:Misc#wesnoth.current|wesnoth.current.event_context]].&lt;br /&gt;
&lt;br /&gt;
The ''on_save'' and ''on_load'' hooks can be used to manipulate data that are neither meant to be forwarded to the next level nor substituted on the fly. (For either of these two purposes, WML variables are the best choice.) For instance, toplevel tags like [item], [event], [time_area], and so on, could typically be handled by such hooks.&lt;br /&gt;
&lt;br /&gt;
 -- some value that survives save/load cycles, but that is not forwarded to the next level&lt;br /&gt;
 local level_local_data = 0&lt;br /&gt;
 &lt;br /&gt;
 local old_on_load = wesnoth.game_event.on_load&lt;br /&gt;
 function wesnoth.game_event.on_load(cfg)&lt;br /&gt;
     for i = 1,#cfg do&lt;br /&gt;
         if cfg[i][1] == &amp;quot;my_data&amp;quot; then&lt;br /&gt;
             -- recover the value stored in the savefile&lt;br /&gt;
             level_local_data = cfg[i][2].value&lt;br /&gt;
             -- erase the child, since it has been handled&lt;br /&gt;
             table.remove(cfg, i)&lt;br /&gt;
             break&lt;br /&gt;
         end&lt;br /&gt;
     end&lt;br /&gt;
     -- call the previous hook, in case there are still some containers in the savefile&lt;br /&gt;
     old_on_load(cfg)&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 local old_on_save = wesnoth.game_events.on_save&lt;br /&gt;
 function wesnoth.game_events.on_save()&lt;br /&gt;
     -- call the previous hook, in case it had some containers to store&lt;br /&gt;
     local cfg = old_on_save()&lt;br /&gt;
     -- add our own container to them&lt;br /&gt;
     table.insert(cfg, { &amp;quot;my_data&amp;quot;, { value = level_local_data } })&lt;br /&gt;
     -- tell the engine to store them in the savefile&lt;br /&gt;
     return cfg&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
Note: since the ''on_load'' hook is called very early in the scenario, it cannot be set inside a [lua] tag in an [event], not even a ''preload'' one. It has to be set inside a [lua] tag outside or at [scenario] level.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: Some tag names are reserved for engine use and should not be modified using the above on_save/on_load method. These tag names are:&lt;br /&gt;
 &amp;quot;color_palette&amp;quot;, &amp;quot;color_range&amp;quot;, &amp;quot;era&amp;quot;, &amp;quot;event&amp;quot;, &amp;quot;generator&amp;quot;,&lt;br /&gt;
 &amp;quot;label&amp;quot;, &amp;quot;lua&amp;quot;, &amp;quot;menu_item&amp;quot;, &amp;quot;music&amp;quot;, &amp;quot;side&amp;quot;, &amp;quot;sound_source&amp;quot;, &amp;quot;story&amp;quot;,&lt;br /&gt;
 &amp;quot;terrain_graphics&amp;quot;, &amp;quot;time&amp;quot;, &amp;quot;time_area&amp;quot;, &amp;quot;tunnel&amp;quot;, &amp;quot;variables&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.fire_event ====&lt;br /&gt;
&lt;br /&gt;
Fires all the WML events with the given name. Optional parameters allow passing two locations and two tables. These parameters will be matched against the [filter], [filter_second], [filter_attack], and [filter_second_attack] of any event handler, and are used to fill the WML variables &amp;quot;unit&amp;quot;, &amp;quot;second_unit&amp;quot;, &amp;quot;weapon&amp;quot;, and &amp;quot;second_weapon&amp;quot;. These parameters can also be read through ''current.event_context''. The function returns a boolean indicating whether the game state was modified.&lt;br /&gt;
&lt;br /&gt;
 wesnoth.fire_event(&amp;quot;explosion&amp;quot;, 17, 42, { damage = &amp;quot;fire&amp;quot; })&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.eval_conditional ====&lt;br /&gt;
&lt;br /&gt;
Returns true if the conditional described by the WML table passes. Note: WML variables are substituted.&lt;br /&gt;
&lt;br /&gt;
 local result = wesnoth.eval_conditional {&lt;br /&gt;
   { &amp;quot;have_unit&amp;quot;, { id = &amp;quot;hero&amp;quot; } },&lt;br /&gt;
   { &amp;quot;variable&amp;quot;, { name = &amp;quot;counter&amp;quot;, numerical_equals = &amp;quot;$old_counter&amp;quot; } }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.tovconfig ====&lt;br /&gt;
&lt;br /&gt;
Converts a WML table into a proxy object which performs variable substitution on the fly.&lt;br /&gt;
&lt;br /&gt;
 wesnoth.set_variable(&amp;quot;varname&amp;quot;, &amp;quot;to_be_deleted&amp;quot;)&lt;br /&gt;
 wesnoth.wml_actions.clear_variable { name = &amp;quot;to_be_deleted&amp;quot; }              -- correct&lt;br /&gt;
 wesnoth.wml_actions.clear_variable { name = &amp;quot;$varname&amp;quot; }                    -- error: try to delete a variable literally called &amp;quot;$varname&amp;quot;&lt;br /&gt;
 wesnoth.wml_actions.clear_variable(wesnoth.tovconfig { name = &amp;quot;$varname&amp;quot; }) -- correct: &amp;quot;$varname&amp;quot; is replaced by &amp;quot;to_be_deleted&amp;quot; at the right time&lt;br /&gt;
&lt;br /&gt;
==== helper.set_wml_action_metatable ====&lt;br /&gt;
&lt;br /&gt;
Sets the metable of a table so that it can be used to fire WML actions. Returns the table. The fields of the table are then simple wrappers around a call to [[#wesnoth.fire]].&lt;br /&gt;
&lt;br /&gt;
 local W = helper.set_wml_action_metatable {}&lt;br /&gt;
 W.message { speaker = &amp;quot;narrator&amp;quot;, message = &amp;quot;?&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
==== helper.wml_error ====&lt;br /&gt;
&lt;br /&gt;
Interrupts the current execution and displays a chat message that looks like a WML error.&lt;br /&gt;
&lt;br /&gt;
 local names = cfg.name or helper.wml_error(&amp;quot;[clear_variable] missing required name= attribute.&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==== helper.literal ====&lt;br /&gt;
&lt;br /&gt;
Returns the ''__literal'' field of its argument if it is a userdata, the argument itself otherwise. This function is meant to be called when a WML action handler can be called indifferently from WML (hence receiving a userdata) or from Lua (hence possibly receiving a table).&lt;br /&gt;
&lt;br /&gt;
 function wml_actions.display_literal_value(cfg)&lt;br /&gt;
    cfg = helper.literal(cfg)&lt;br /&gt;
    wesnoth.message(tostring(cfg.value)) &lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
Note: when the argument is a plain table, the function returns it as is. In particular, modifying the fields of the returned table causes the original table to be modified too.&lt;br /&gt;
&lt;br /&gt;
==== helper.parsed ====&lt;br /&gt;
&lt;br /&gt;
Returns the ''__parsed'' field of its argument if it is a userdata, the argument itself otherwise. See also [[#helper.literal]].&lt;br /&gt;
&lt;br /&gt;
==== helper.shallow_literal ====&lt;br /&gt;
&lt;br /&gt;
Returns the ''__shallow_literal'' field of its argument if it is a userdata, the argument itself otherwise. See also [[#helper.literal]].&lt;br /&gt;
&lt;br /&gt;
==== helper.shallow_parsed ====&lt;br /&gt;
&lt;br /&gt;
Returns the ''__shallow_parsed'' field of its argument if it is a userdata, the argument itself otherwise. See also [[#helper.literal]].&lt;br /&gt;
&lt;br /&gt;
[[Category: Lua Reference]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=LuaWML/Units&amp;diff=45162</id>
		<title>LuaWML/Units</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=LuaWML/Units&amp;diff=45162"/>
		<updated>2012-02-08T22:01:48Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* wesnoth.unit_types */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the [[LuaWML]] functions for handling units.&lt;br /&gt;
&lt;br /&gt;
A unit is a proxy table with the following fields:&lt;br /&gt;
* '''x''', '''y''': integers (read only, read/write if the unit is not on the map)&lt;br /&gt;
* '''side''': integer (read/write)&lt;br /&gt;
* '''id''': string (read only)&lt;br /&gt;
* '''type''': string (read only)&lt;br /&gt;
* '''name''': translatable string (read only)&lt;br /&gt;
* '''hitpoints''', '''max_hitpoints''', '''experience''', '''max_experience''', '''max_moves''': integers (read only)&lt;br /&gt;
* '''max_attacks''': integer (read only)&lt;br /&gt;
* '''attacks_left''': integer (read/write) Setting below 0 is limited to 0.&lt;br /&gt;
* '''extra_recruit''': table (read/write)&lt;br /&gt;
* '''advances_to''': table (read/write)&lt;br /&gt;
* '''hitpoints''', '''experience''': integer (read/write)&lt;br /&gt;
* '''moves''': integer (read/write)&lt;br /&gt;
* '''resting''': boolean (read/write)&lt;br /&gt;
* '''hidden''': boolean (read/write)&lt;br /&gt;
* '''petrified''', '''canrecruit''': booleans (read only)&lt;br /&gt;
* '''role''', '''facing''': strings (read/write)&lt;br /&gt;
* '''status''': proxy associative table (read only, read/write fields)&lt;br /&gt;
* '''image_mods''': string (read only)&lt;br /&gt;
* '''variables''': proxy associative table (read only, read/write fields, including ''variables.__cfg''), only toplevel named fields are proxied&lt;br /&gt;
* '''valid''': string or nil (read only)&lt;br /&gt;
* '''__cfg''': WML table (dump)&lt;br /&gt;
&lt;br /&gt;
The metatable of these proxy tables appears as '''&amp;quot;unit&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
A unit can be either visible on the map ([[#wesnoth.get_units]], [[#wesnoth.put_unit]]), or on a recall list ([[#wesnoth.get_recall_units]], [[#wesnoth.put_recall_unit]]), or private to the Lua code ([[#wesnoth.create_unit]], [[#wesnoth.copy_unit]], [[#wesnoth.extract_unit]]). The Lua code has complete control over the private units; they will not be modified unless accessed through the proxy unit. Units on the map and on the recall lists, however, can be modified by the user, the engine, WML, independently of the Lua code. In particular, if a unit is killed, any further use of the proxy unit will cause an error. For units on the map, the proxy unit is valid as long as there is a unit on the map that has the same &amp;quot;underlying_id&amp;quot; WML field as the original one. The behavior is similar for units on the recall lists. The ''valid'' field reflects the unit availability by returning '''&amp;quot;map&amp;quot;''', '''&amp;quot;recall&amp;quot;''', '''&amp;quot;private&amp;quot;''', or ''nil''. The latter value is used for units that were removed (e.g. killed). In that case, the ''valid'' field is the only one that can be read without causing an error.&lt;br /&gt;
&lt;br /&gt;
The term &amp;quot;proxy&amp;quot;, here in particular &amp;quot;proxy unit&amp;quot;, means that the variable retrieved in the lua code (with get_units for example) is an accessor (reference) to the C++ object which represents that unit. This is very different from unit variables obtained by [store_unit] in wml. The fields marked as &amp;quot;writable&amp;quot; above can be modified without the need to use put_unit afterwards. This same reason explains that modifications to the unit from outside the lua code (like [kill] invalidating the proxy unit) have immediate effect on the lua code's proxy unit variable (with the exception of private proxy units).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_units ====&lt;br /&gt;
&lt;br /&gt;
Returns an array of all the units on the map matching the WML filter passed as the first argument. See [[StandardUnitFilter]] for details about filters.&lt;br /&gt;
&lt;br /&gt;
 local leaders_on_side_two = get_units { side = 2, canrecruit = true }&lt;br /&gt;
 local name_of_leader = leaders_on_side_two[1].name&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_unit ====&lt;br /&gt;
&lt;br /&gt;
Returns the unit at the given location or with the given underlying ID.&lt;br /&gt;
&lt;br /&gt;
 local args = ...&lt;br /&gt;
 local unit = wesnoth.get_unit(args.x1, args.y1)&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.match_unit ====&lt;br /&gt;
&lt;br /&gt;
Returns true if the given unit matches the WML filter passed as the second argument.&lt;br /&gt;
&lt;br /&gt;
 assert(unit.canrecruit == wesnoth.match_unit(unit, { canrecruit = true }))&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.put_unit ====&lt;br /&gt;
&lt;br /&gt;
Places a unit on the map. This unit is described either by a WML table or by a proxy unit. Coordinates can be passed as the first two arguments, otherwise the table is expected to have two fields '''x''' and '''y''', which indicate where the unit will be placed. If the function is called with coordinates only, the unit on the map at the given coordinates is removed instead.&lt;br /&gt;
&lt;br /&gt;
 -- create a unit with random traits, then erase it&lt;br /&gt;
 wesnoth.put_unit(17, 42, { type = &amp;quot;Elvish Lady&amp;quot; })&lt;br /&gt;
 wesnoth.put_unit(17, 42)&lt;br /&gt;
&lt;br /&gt;
When the argument is a proxy unit, no duplicate is created. In particular, if the unit was private or on a recall list, it no longer is; and if the unit was on the map, it has been moved to the new location. Note: passing a WML table is just a shortcut for calling [[#wesnoth.create_unit]] and then putting the resulting unit on the map.&lt;br /&gt;
&lt;br /&gt;
 -- move the leader back to the top-left corner&lt;br /&gt;
 wesnoth.put_unit(1, 1, wesnoth.get_units({ canrecruit = true })[1])&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_recall_units ====&lt;br /&gt;
&lt;br /&gt;
Returns an array of all the units on the recall lists matching the WML filter passed as the first argument.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.put_recall_unit ====&lt;br /&gt;
&lt;br /&gt;
Places a unit on a recall list. This unit is described either by a WML table or by a proxy unit. The side of the recall list is given by the second argument, or by the side of the unit if missing.&lt;br /&gt;
&lt;br /&gt;
 -- put the unit at location 17,42 on the recall list for side 2&lt;br /&gt;
 wesnoth.put_recall_unit(wesnoth.get_units({ x= 17, y = 42 })[1], 2)&lt;br /&gt;
&lt;br /&gt;
When the argument is a proxy unit, no duplicate is created. In particular, if the unit was private or on the map, it no longer is. Note: passing a WML table is just a shortcut for calling [[#wesnoth.create_unit]] and then putting the resulting unit on a recall list.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.create_unit ====&lt;br /&gt;
&lt;br /&gt;
Creates a private unit from a WML table.&lt;br /&gt;
&lt;br /&gt;
 local u = wesnoth.create_unit { type = &amp;quot;White Mage&amp;quot;, gender = &amp;quot;female&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.copy_unit ====&lt;br /&gt;
&lt;br /&gt;
Creates a private unit from another unit.&lt;br /&gt;
&lt;br /&gt;
 -- extract a unit from the map&lt;br /&gt;
 local u = wesnoth.copy_unit(wesnoth.get_units({ type = &amp;quot;Thug&amp;quot; })[1])&lt;br /&gt;
 wesnoth.put_unit(u.x, u.y)&lt;br /&gt;
 -- u is still valid at this point&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.extract_unit ====&lt;br /&gt;
&lt;br /&gt;
Removes a unit from the map or from a recall list and makes it private.&lt;br /&gt;
&lt;br /&gt;
 -- remove all the units from the recall list of side 1 and put them in a WML container&lt;br /&gt;
 local l = {}&lt;br /&gt;
 for i,u in ipairs(wesnoth.get_recall_units { side = 1 }) do&lt;br /&gt;
     wesnoth.extract_unit(u)&lt;br /&gt;
     table.insert(l, u.__cfg)&lt;br /&gt;
 end&lt;br /&gt;
 helper.set_variable_array(&amp;quot;player_recall_list&amp;quot;, l)&lt;br /&gt;
&lt;br /&gt;
Note: if the unit is on the map, it is just a shortcut for calling [[#wesnoth.copy_unit]] and then [[#wesnoth.put_unit]] without a unit. It is, however, the only way for removing a unit from a recall list without putting it on the map.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.add_modification ====&lt;br /&gt;
&lt;br /&gt;
Modifies a given unit. It needs to be a proxy unit. The second argument is the type of the modification (either trait, object, or advance). The option &amp;quot;advance&amp;quot; applies effects as if the unit would advance (e.g. AMLA effects). The third argument is a WML table describing the effect, so mostly containing '''[effect]''' children. See [[EffectWML]] for details about effects.&lt;br /&gt;
&lt;br /&gt;
 local u = wesnoth.get_units { canrecruit = true }[1]&lt;br /&gt;
 wesnoth.add_modification(u, &amp;quot;object&amp;quot;, { { &amp;quot;effect&amp;quot;, { apply_to = &amp;quot;image_mod&amp;quot;, replace = &amp;quot;RC(red&amp;gt;blue)&amp;quot; } } })&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.unit_resistance ====&lt;br /&gt;
&lt;br /&gt;
Returns the resistance of a unit against an attack type. (Note: it is a WML resistance. So the higher it is, the weaker the unit is.) The third argument indicates whether the unit is the attacker. Last arguments are the coordinates of an optional map location (for the purpose of taking abilities into account).&lt;br /&gt;
&lt;br /&gt;
 local fire_resistance = 100 - wesnoth.unit_resistance(u, &amp;quot;fire&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.unit_defense ====&lt;br /&gt;
&lt;br /&gt;
Returns the defense of a unit on a particular terrain. (Note: it is a WML defense. So the higher it is, the weaker the unit is.)&lt;br /&gt;
&lt;br /&gt;
 local flat_defense = 100 - wesnoth.unit_defense(u, &amp;quot;Gt&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.unit_movement_cost ====&lt;br /&gt;
&lt;br /&gt;
Returns the movement cost of a unit on a particular terrain.&lt;br /&gt;
&lt;br /&gt;
 local move_cost = wesnoth.unit_movement_cost(u, &amp;quot;Gt&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.unit_ability ====&lt;br /&gt;
&lt;br /&gt;
Returns true if the unit is currently under effect by an ability with this given TAG NAME. This means that the ability could be owned by the unit itself, or by an adjacent unit.&lt;br /&gt;
&lt;br /&gt;
 function has_teleport(u)&lt;br /&gt;
     return wesnoth.unit_ability(u, &amp;quot;teleport&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_unit_type_ids ====&lt;br /&gt;
{{DevFeature1.11}}: This function is deprecated, use wesnoth.unit_types.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_unit_type ====&lt;br /&gt;
{{DevFeature1.11}}: This function is deprecated, use wesnoth.unit_types instead.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.unit_types ====&lt;br /&gt;
&lt;br /&gt;
This is not a function but a table indexed by unit type ids. Its elements are proxy tables with these fields:&lt;br /&gt;
&lt;br /&gt;
* '''id''': string&lt;br /&gt;
* '''name''': translatable string (read only)&lt;br /&gt;
* '''max_moves''', '''max_experience''', '''max_hitpoints''', '''level''', '''cost''': integers (read only)&lt;br /&gt;
* '''__cfg''': WML table (dump)&lt;br /&gt;
&lt;br /&gt;
The metatable of these proxy tables appears as '''&amp;quot;unit type&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
 local lich_cost = wesnoth.unit_types[&amp;quot;Ancient Lich&amp;quot;].cost&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.races ====&lt;br /&gt;
&lt;br /&gt;
This is not a function but a table indexed by race ids. Its elements are proxy tables for all races the engine knows about.&lt;br /&gt;
known fields of each element:&lt;br /&gt;
* '''id''': string&lt;br /&gt;
* '''description''', '''name''', '''plural_name''' (translatable strings)&lt;br /&gt;
* '''num_traits''' (integer)&lt;br /&gt;
* '''ignore_global_traits''' (boolean)&lt;br /&gt;
* '''undead_variation''' (string)&lt;br /&gt;
(all read only)&lt;br /&gt;
* '''__cfg''': WML table (dump)&lt;br /&gt;
&lt;br /&gt;
 wesnoth.message(tostring(wesnoth.races[&amp;quot;lizard&amp;quot;].name))&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_traits ====&lt;br /&gt;
&lt;br /&gt;
Returns a table with named fields (trait id strings) holding the wml tables defining the traits. arguments: none. All global traits the engine knows about, race-specific traits are not included.&lt;br /&gt;
Known fields and subtags of each element are the ones which were given in the wml definition of the [[SingleUnitWML|trait]].&lt;br /&gt;
 wesnoth.message(tostring(wesnoth.get_traits().strong.male_name))&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.simulate_combat ====&lt;br /&gt;
&lt;br /&gt;
Computes the hitpoint distribution and status chance after a combat between two units. Optional integers can be passed to select a particular weapon, otherwise the &amp;quot;best&amp;quot; one is selected. The first unit is the attacker; it does not have to be on the map, though its location should be meaningful. The second unit is the defender; it has to be on the map.&lt;br /&gt;
&lt;br /&gt;
When giving the attack, the parameter is the attack id (integer) and not an element from the table returned by helper.child_range(att, &amp;quot;attack&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
 local function display_stats(n, t)&lt;br /&gt;
     wesnoth.message(string.format(&lt;br /&gt;
         &amp;quot;Chance for the %s\n  to be slowed: %f,\n  to be poisoned: %f,\n  to die: %f.\nAverage HP: %f.&amp;quot;,&lt;br /&gt;
         n, t.slowed, t.poisoned, t.hp_chance[0], t.average_hp))&lt;br /&gt;
 end&lt;br /&gt;
 local att_stats, def_stats = wesnoth.simulate_combat(att, att_weapon, def)&lt;br /&gt;
 display_stats(&amp;quot;attacker&amp;quot;, att_stats)&lt;br /&gt;
 display_stats(&amp;quot;defender&amp;quot;, def_stats)&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.transform_unit ====&lt;br /&gt;
&lt;br /&gt;
Changes the type of a unit and adjust attributes accordingly. Note that hitpoints might be modified accordingly to the unit type.&lt;br /&gt;
&lt;br /&gt;
 local ev = wesnoth.current.event_context&lt;br /&gt;
 local u = wesnoth.get_units{x=ev.x1, y=ev.y1}[1]&lt;br /&gt;
 local old_hp = u.hitpoints&lt;br /&gt;
 wesnoth.transform_unit(u, &amp;quot;Skeleton&amp;quot;)&lt;br /&gt;
 u.hitpoints = old_hp&lt;br /&gt;
 u.status.poisoned = false&lt;br /&gt;
&lt;br /&gt;
[[Category: Lua Reference]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=LuaWML/Units&amp;diff=45161</id>
		<title>LuaWML/Units</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=LuaWML/Units&amp;diff=45161"/>
		<updated>2012-02-08T21:59:54Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* wesnoth.get_unit_type */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the [[LuaWML]] functions for handling units.&lt;br /&gt;
&lt;br /&gt;
A unit is a proxy table with the following fields:&lt;br /&gt;
* '''x''', '''y''': integers (read only, read/write if the unit is not on the map)&lt;br /&gt;
* '''side''': integer (read/write)&lt;br /&gt;
* '''id''': string (read only)&lt;br /&gt;
* '''type''': string (read only)&lt;br /&gt;
* '''name''': translatable string (read only)&lt;br /&gt;
* '''hitpoints''', '''max_hitpoints''', '''experience''', '''max_experience''', '''max_moves''': integers (read only)&lt;br /&gt;
* '''max_attacks''': integer (read only)&lt;br /&gt;
* '''attacks_left''': integer (read/write) Setting below 0 is limited to 0.&lt;br /&gt;
* '''extra_recruit''': table (read/write)&lt;br /&gt;
* '''advances_to''': table (read/write)&lt;br /&gt;
* '''hitpoints''', '''experience''': integer (read/write)&lt;br /&gt;
* '''moves''': integer (read/write)&lt;br /&gt;
* '''resting''': boolean (read/write)&lt;br /&gt;
* '''hidden''': boolean (read/write)&lt;br /&gt;
* '''petrified''', '''canrecruit''': booleans (read only)&lt;br /&gt;
* '''role''', '''facing''': strings (read/write)&lt;br /&gt;
* '''status''': proxy associative table (read only, read/write fields)&lt;br /&gt;
* '''image_mods''': string (read only)&lt;br /&gt;
* '''variables''': proxy associative table (read only, read/write fields, including ''variables.__cfg''), only toplevel named fields are proxied&lt;br /&gt;
* '''valid''': string or nil (read only)&lt;br /&gt;
* '''__cfg''': WML table (dump)&lt;br /&gt;
&lt;br /&gt;
The metatable of these proxy tables appears as '''&amp;quot;unit&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
A unit can be either visible on the map ([[#wesnoth.get_units]], [[#wesnoth.put_unit]]), or on a recall list ([[#wesnoth.get_recall_units]], [[#wesnoth.put_recall_unit]]), or private to the Lua code ([[#wesnoth.create_unit]], [[#wesnoth.copy_unit]], [[#wesnoth.extract_unit]]). The Lua code has complete control over the private units; they will not be modified unless accessed through the proxy unit. Units on the map and on the recall lists, however, can be modified by the user, the engine, WML, independently of the Lua code. In particular, if a unit is killed, any further use of the proxy unit will cause an error. For units on the map, the proxy unit is valid as long as there is a unit on the map that has the same &amp;quot;underlying_id&amp;quot; WML field as the original one. The behavior is similar for units on the recall lists. The ''valid'' field reflects the unit availability by returning '''&amp;quot;map&amp;quot;''', '''&amp;quot;recall&amp;quot;''', '''&amp;quot;private&amp;quot;''', or ''nil''. The latter value is used for units that were removed (e.g. killed). In that case, the ''valid'' field is the only one that can be read without causing an error.&lt;br /&gt;
&lt;br /&gt;
The term &amp;quot;proxy&amp;quot;, here in particular &amp;quot;proxy unit&amp;quot;, means that the variable retrieved in the lua code (with get_units for example) is an accessor (reference) to the C++ object which represents that unit. This is very different from unit variables obtained by [store_unit] in wml. The fields marked as &amp;quot;writable&amp;quot; above can be modified without the need to use put_unit afterwards. This same reason explains that modifications to the unit from outside the lua code (like [kill] invalidating the proxy unit) have immediate effect on the lua code's proxy unit variable (with the exception of private proxy units).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_units ====&lt;br /&gt;
&lt;br /&gt;
Returns an array of all the units on the map matching the WML filter passed as the first argument. See [[StandardUnitFilter]] for details about filters.&lt;br /&gt;
&lt;br /&gt;
 local leaders_on_side_two = get_units { side = 2, canrecruit = true }&lt;br /&gt;
 local name_of_leader = leaders_on_side_two[1].name&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_unit ====&lt;br /&gt;
&lt;br /&gt;
Returns the unit at the given location or with the given underlying ID.&lt;br /&gt;
&lt;br /&gt;
 local args = ...&lt;br /&gt;
 local unit = wesnoth.get_unit(args.x1, args.y1)&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.match_unit ====&lt;br /&gt;
&lt;br /&gt;
Returns true if the given unit matches the WML filter passed as the second argument.&lt;br /&gt;
&lt;br /&gt;
 assert(unit.canrecruit == wesnoth.match_unit(unit, { canrecruit = true }))&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.put_unit ====&lt;br /&gt;
&lt;br /&gt;
Places a unit on the map. This unit is described either by a WML table or by a proxy unit. Coordinates can be passed as the first two arguments, otherwise the table is expected to have two fields '''x''' and '''y''', which indicate where the unit will be placed. If the function is called with coordinates only, the unit on the map at the given coordinates is removed instead.&lt;br /&gt;
&lt;br /&gt;
 -- create a unit with random traits, then erase it&lt;br /&gt;
 wesnoth.put_unit(17, 42, { type = &amp;quot;Elvish Lady&amp;quot; })&lt;br /&gt;
 wesnoth.put_unit(17, 42)&lt;br /&gt;
&lt;br /&gt;
When the argument is a proxy unit, no duplicate is created. In particular, if the unit was private or on a recall list, it no longer is; and if the unit was on the map, it has been moved to the new location. Note: passing a WML table is just a shortcut for calling [[#wesnoth.create_unit]] and then putting the resulting unit on the map.&lt;br /&gt;
&lt;br /&gt;
 -- move the leader back to the top-left corner&lt;br /&gt;
 wesnoth.put_unit(1, 1, wesnoth.get_units({ canrecruit = true })[1])&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_recall_units ====&lt;br /&gt;
&lt;br /&gt;
Returns an array of all the units on the recall lists matching the WML filter passed as the first argument.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.put_recall_unit ====&lt;br /&gt;
&lt;br /&gt;
Places a unit on a recall list. This unit is described either by a WML table or by a proxy unit. The side of the recall list is given by the second argument, or by the side of the unit if missing.&lt;br /&gt;
&lt;br /&gt;
 -- put the unit at location 17,42 on the recall list for side 2&lt;br /&gt;
 wesnoth.put_recall_unit(wesnoth.get_units({ x= 17, y = 42 })[1], 2)&lt;br /&gt;
&lt;br /&gt;
When the argument is a proxy unit, no duplicate is created. In particular, if the unit was private or on the map, it no longer is. Note: passing a WML table is just a shortcut for calling [[#wesnoth.create_unit]] and then putting the resulting unit on a recall list.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.create_unit ====&lt;br /&gt;
&lt;br /&gt;
Creates a private unit from a WML table.&lt;br /&gt;
&lt;br /&gt;
 local u = wesnoth.create_unit { type = &amp;quot;White Mage&amp;quot;, gender = &amp;quot;female&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.copy_unit ====&lt;br /&gt;
&lt;br /&gt;
Creates a private unit from another unit.&lt;br /&gt;
&lt;br /&gt;
 -- extract a unit from the map&lt;br /&gt;
 local u = wesnoth.copy_unit(wesnoth.get_units({ type = &amp;quot;Thug&amp;quot; })[1])&lt;br /&gt;
 wesnoth.put_unit(u.x, u.y)&lt;br /&gt;
 -- u is still valid at this point&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.extract_unit ====&lt;br /&gt;
&lt;br /&gt;
Removes a unit from the map or from a recall list and makes it private.&lt;br /&gt;
&lt;br /&gt;
 -- remove all the units from the recall list of side 1 and put them in a WML container&lt;br /&gt;
 local l = {}&lt;br /&gt;
 for i,u in ipairs(wesnoth.get_recall_units { side = 1 }) do&lt;br /&gt;
     wesnoth.extract_unit(u)&lt;br /&gt;
     table.insert(l, u.__cfg)&lt;br /&gt;
 end&lt;br /&gt;
 helper.set_variable_array(&amp;quot;player_recall_list&amp;quot;, l)&lt;br /&gt;
&lt;br /&gt;
Note: if the unit is on the map, it is just a shortcut for calling [[#wesnoth.copy_unit]] and then [[#wesnoth.put_unit]] without a unit. It is, however, the only way for removing a unit from a recall list without putting it on the map.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.add_modification ====&lt;br /&gt;
&lt;br /&gt;
Modifies a given unit. It needs to be a proxy unit. The second argument is the type of the modification (either trait, object, or advance). The option &amp;quot;advance&amp;quot; applies effects as if the unit would advance (e.g. AMLA effects). The third argument is a WML table describing the effect, so mostly containing '''[effect]''' children. See [[EffectWML]] for details about effects.&lt;br /&gt;
&lt;br /&gt;
 local u = wesnoth.get_units { canrecruit = true }[1]&lt;br /&gt;
 wesnoth.add_modification(u, &amp;quot;object&amp;quot;, { { &amp;quot;effect&amp;quot;, { apply_to = &amp;quot;image_mod&amp;quot;, replace = &amp;quot;RC(red&amp;gt;blue)&amp;quot; } } })&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.unit_resistance ====&lt;br /&gt;
&lt;br /&gt;
Returns the resistance of a unit against an attack type. (Note: it is a WML resistance. So the higher it is, the weaker the unit is.) The third argument indicates whether the unit is the attacker. Last arguments are the coordinates of an optional map location (for the purpose of taking abilities into account).&lt;br /&gt;
&lt;br /&gt;
 local fire_resistance = 100 - wesnoth.unit_resistance(u, &amp;quot;fire&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.unit_defense ====&lt;br /&gt;
&lt;br /&gt;
Returns the defense of a unit on a particular terrain. (Note: it is a WML defense. So the higher it is, the weaker the unit is.)&lt;br /&gt;
&lt;br /&gt;
 local flat_defense = 100 - wesnoth.unit_defense(u, &amp;quot;Gt&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.unit_movement_cost ====&lt;br /&gt;
&lt;br /&gt;
Returns the movement cost of a unit on a particular terrain.&lt;br /&gt;
&lt;br /&gt;
 local move_cost = wesnoth.unit_movement_cost(u, &amp;quot;Gt&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.unit_ability ====&lt;br /&gt;
&lt;br /&gt;
Returns true if the unit is currently under effect by an ability with this given TAG NAME. This means that the ability could be owned by the unit itself, or by an adjacent unit.&lt;br /&gt;
&lt;br /&gt;
 function has_teleport(u)&lt;br /&gt;
     return wesnoth.unit_ability(u, &amp;quot;teleport&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_unit_type_ids ====&lt;br /&gt;
{{DevFeature1.11}}: This function is deprecated, use wesnoth.unit_types.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_unit_type ====&lt;br /&gt;
{{DevFeature1.11}}: This function is deprecated, use wesnoth.unit_types instead.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.unit_types ====&lt;br /&gt;
&lt;br /&gt;
This is not a function but a table indexed by unit type ids. Its elements are the proxy tables returned by [[#wesnoth.get_unit_type]].&lt;br /&gt;
&lt;br /&gt;
 local lich_cost = wesnoth.unit_types[&amp;quot;Ancient Lich&amp;quot;].cost&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.races ====&lt;br /&gt;
&lt;br /&gt;
This is not a function but a table indexed by race ids. Its elements are proxy tables for all races the engine knows about.&lt;br /&gt;
known fields of each element:&lt;br /&gt;
* '''id''': string&lt;br /&gt;
* '''description''', '''name''', '''plural_name''' (translatable strings)&lt;br /&gt;
* '''num_traits''' (integer)&lt;br /&gt;
* '''ignore_global_traits''' (boolean)&lt;br /&gt;
* '''undead_variation''' (string)&lt;br /&gt;
(all read only)&lt;br /&gt;
* '''__cfg''': WML table (dump)&lt;br /&gt;
&lt;br /&gt;
 wesnoth.message(tostring(wesnoth.races[&amp;quot;lizard&amp;quot;].name))&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_traits ====&lt;br /&gt;
&lt;br /&gt;
Returns a table with named fields (trait id strings) holding the wml tables defining the traits. arguments: none. All global traits the engine knows about, race-specific traits are not included.&lt;br /&gt;
Known fields and subtags of each element are the ones which were given in the wml definition of the [[SingleUnitWML|trait]].&lt;br /&gt;
 wesnoth.message(tostring(wesnoth.get_traits().strong.male_name))&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.simulate_combat ====&lt;br /&gt;
&lt;br /&gt;
Computes the hitpoint distribution and status chance after a combat between two units. Optional integers can be passed to select a particular weapon, otherwise the &amp;quot;best&amp;quot; one is selected. The first unit is the attacker; it does not have to be on the map, though its location should be meaningful. The second unit is the defender; it has to be on the map.&lt;br /&gt;
&lt;br /&gt;
When giving the attack, the parameter is the attack id (integer) and not an element from the table returned by helper.child_range(att, &amp;quot;attack&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
 local function display_stats(n, t)&lt;br /&gt;
     wesnoth.message(string.format(&lt;br /&gt;
         &amp;quot;Chance for the %s\n  to be slowed: %f,\n  to be poisoned: %f,\n  to die: %f.\nAverage HP: %f.&amp;quot;,&lt;br /&gt;
         n, t.slowed, t.poisoned, t.hp_chance[0], t.average_hp))&lt;br /&gt;
 end&lt;br /&gt;
 local att_stats, def_stats = wesnoth.simulate_combat(att, att_weapon, def)&lt;br /&gt;
 display_stats(&amp;quot;attacker&amp;quot;, att_stats)&lt;br /&gt;
 display_stats(&amp;quot;defender&amp;quot;, def_stats)&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.transform_unit ====&lt;br /&gt;
&lt;br /&gt;
Changes the type of a unit and adjust attributes accordingly. Note that hitpoints might be modified accordingly to the unit type.&lt;br /&gt;
&lt;br /&gt;
 local ev = wesnoth.current.event_context&lt;br /&gt;
 local u = wesnoth.get_units{x=ev.x1, y=ev.y1}[1]&lt;br /&gt;
 local old_hp = u.hitpoints&lt;br /&gt;
 wesnoth.transform_unit(u, &amp;quot;Skeleton&amp;quot;)&lt;br /&gt;
 u.hitpoints = old_hp&lt;br /&gt;
 u.status.poisoned = false&lt;br /&gt;
&lt;br /&gt;
[[Category: Lua Reference]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=LuaWML/Units&amp;diff=45160</id>
		<title>LuaWML/Units</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=LuaWML/Units&amp;diff=45160"/>
		<updated>2012-02-08T21:58:46Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* wesnoth.get_unit_type_ids */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the [[LuaWML]] functions for handling units.&lt;br /&gt;
&lt;br /&gt;
A unit is a proxy table with the following fields:&lt;br /&gt;
* '''x''', '''y''': integers (read only, read/write if the unit is not on the map)&lt;br /&gt;
* '''side''': integer (read/write)&lt;br /&gt;
* '''id''': string (read only)&lt;br /&gt;
* '''type''': string (read only)&lt;br /&gt;
* '''name''': translatable string (read only)&lt;br /&gt;
* '''hitpoints''', '''max_hitpoints''', '''experience''', '''max_experience''', '''max_moves''': integers (read only)&lt;br /&gt;
* '''max_attacks''': integer (read only)&lt;br /&gt;
* '''attacks_left''': integer (read/write) Setting below 0 is limited to 0.&lt;br /&gt;
* '''extra_recruit''': table (read/write)&lt;br /&gt;
* '''advances_to''': table (read/write)&lt;br /&gt;
* '''hitpoints''', '''experience''': integer (read/write)&lt;br /&gt;
* '''moves''': integer (read/write)&lt;br /&gt;
* '''resting''': boolean (read/write)&lt;br /&gt;
* '''hidden''': boolean (read/write)&lt;br /&gt;
* '''petrified''', '''canrecruit''': booleans (read only)&lt;br /&gt;
* '''role''', '''facing''': strings (read/write)&lt;br /&gt;
* '''status''': proxy associative table (read only, read/write fields)&lt;br /&gt;
* '''image_mods''': string (read only)&lt;br /&gt;
* '''variables''': proxy associative table (read only, read/write fields, including ''variables.__cfg''), only toplevel named fields are proxied&lt;br /&gt;
* '''valid''': string or nil (read only)&lt;br /&gt;
* '''__cfg''': WML table (dump)&lt;br /&gt;
&lt;br /&gt;
The metatable of these proxy tables appears as '''&amp;quot;unit&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
A unit can be either visible on the map ([[#wesnoth.get_units]], [[#wesnoth.put_unit]]), or on a recall list ([[#wesnoth.get_recall_units]], [[#wesnoth.put_recall_unit]]), or private to the Lua code ([[#wesnoth.create_unit]], [[#wesnoth.copy_unit]], [[#wesnoth.extract_unit]]). The Lua code has complete control over the private units; they will not be modified unless accessed through the proxy unit. Units on the map and on the recall lists, however, can be modified by the user, the engine, WML, independently of the Lua code. In particular, if a unit is killed, any further use of the proxy unit will cause an error. For units on the map, the proxy unit is valid as long as there is a unit on the map that has the same &amp;quot;underlying_id&amp;quot; WML field as the original one. The behavior is similar for units on the recall lists. The ''valid'' field reflects the unit availability by returning '''&amp;quot;map&amp;quot;''', '''&amp;quot;recall&amp;quot;''', '''&amp;quot;private&amp;quot;''', or ''nil''. The latter value is used for units that were removed (e.g. killed). In that case, the ''valid'' field is the only one that can be read without causing an error.&lt;br /&gt;
&lt;br /&gt;
The term &amp;quot;proxy&amp;quot;, here in particular &amp;quot;proxy unit&amp;quot;, means that the variable retrieved in the lua code (with get_units for example) is an accessor (reference) to the C++ object which represents that unit. This is very different from unit variables obtained by [store_unit] in wml. The fields marked as &amp;quot;writable&amp;quot; above can be modified without the need to use put_unit afterwards. This same reason explains that modifications to the unit from outside the lua code (like [kill] invalidating the proxy unit) have immediate effect on the lua code's proxy unit variable (with the exception of private proxy units).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_units ====&lt;br /&gt;
&lt;br /&gt;
Returns an array of all the units on the map matching the WML filter passed as the first argument. See [[StandardUnitFilter]] for details about filters.&lt;br /&gt;
&lt;br /&gt;
 local leaders_on_side_two = get_units { side = 2, canrecruit = true }&lt;br /&gt;
 local name_of_leader = leaders_on_side_two[1].name&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_unit ====&lt;br /&gt;
&lt;br /&gt;
Returns the unit at the given location or with the given underlying ID.&lt;br /&gt;
&lt;br /&gt;
 local args = ...&lt;br /&gt;
 local unit = wesnoth.get_unit(args.x1, args.y1)&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.match_unit ====&lt;br /&gt;
&lt;br /&gt;
Returns true if the given unit matches the WML filter passed as the second argument.&lt;br /&gt;
&lt;br /&gt;
 assert(unit.canrecruit == wesnoth.match_unit(unit, { canrecruit = true }))&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.put_unit ====&lt;br /&gt;
&lt;br /&gt;
Places a unit on the map. This unit is described either by a WML table or by a proxy unit. Coordinates can be passed as the first two arguments, otherwise the table is expected to have two fields '''x''' and '''y''', which indicate where the unit will be placed. If the function is called with coordinates only, the unit on the map at the given coordinates is removed instead.&lt;br /&gt;
&lt;br /&gt;
 -- create a unit with random traits, then erase it&lt;br /&gt;
 wesnoth.put_unit(17, 42, { type = &amp;quot;Elvish Lady&amp;quot; })&lt;br /&gt;
 wesnoth.put_unit(17, 42)&lt;br /&gt;
&lt;br /&gt;
When the argument is a proxy unit, no duplicate is created. In particular, if the unit was private or on a recall list, it no longer is; and if the unit was on the map, it has been moved to the new location. Note: passing a WML table is just a shortcut for calling [[#wesnoth.create_unit]] and then putting the resulting unit on the map.&lt;br /&gt;
&lt;br /&gt;
 -- move the leader back to the top-left corner&lt;br /&gt;
 wesnoth.put_unit(1, 1, wesnoth.get_units({ canrecruit = true })[1])&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_recall_units ====&lt;br /&gt;
&lt;br /&gt;
Returns an array of all the units on the recall lists matching the WML filter passed as the first argument.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.put_recall_unit ====&lt;br /&gt;
&lt;br /&gt;
Places a unit on a recall list. This unit is described either by a WML table or by a proxy unit. The side of the recall list is given by the second argument, or by the side of the unit if missing.&lt;br /&gt;
&lt;br /&gt;
 -- put the unit at location 17,42 on the recall list for side 2&lt;br /&gt;
 wesnoth.put_recall_unit(wesnoth.get_units({ x= 17, y = 42 })[1], 2)&lt;br /&gt;
&lt;br /&gt;
When the argument is a proxy unit, no duplicate is created. In particular, if the unit was private or on the map, it no longer is. Note: passing a WML table is just a shortcut for calling [[#wesnoth.create_unit]] and then putting the resulting unit on a recall list.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.create_unit ====&lt;br /&gt;
&lt;br /&gt;
Creates a private unit from a WML table.&lt;br /&gt;
&lt;br /&gt;
 local u = wesnoth.create_unit { type = &amp;quot;White Mage&amp;quot;, gender = &amp;quot;female&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.copy_unit ====&lt;br /&gt;
&lt;br /&gt;
Creates a private unit from another unit.&lt;br /&gt;
&lt;br /&gt;
 -- extract a unit from the map&lt;br /&gt;
 local u = wesnoth.copy_unit(wesnoth.get_units({ type = &amp;quot;Thug&amp;quot; })[1])&lt;br /&gt;
 wesnoth.put_unit(u.x, u.y)&lt;br /&gt;
 -- u is still valid at this point&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.extract_unit ====&lt;br /&gt;
&lt;br /&gt;
Removes a unit from the map or from a recall list and makes it private.&lt;br /&gt;
&lt;br /&gt;
 -- remove all the units from the recall list of side 1 and put them in a WML container&lt;br /&gt;
 local l = {}&lt;br /&gt;
 for i,u in ipairs(wesnoth.get_recall_units { side = 1 }) do&lt;br /&gt;
     wesnoth.extract_unit(u)&lt;br /&gt;
     table.insert(l, u.__cfg)&lt;br /&gt;
 end&lt;br /&gt;
 helper.set_variable_array(&amp;quot;player_recall_list&amp;quot;, l)&lt;br /&gt;
&lt;br /&gt;
Note: if the unit is on the map, it is just a shortcut for calling [[#wesnoth.copy_unit]] and then [[#wesnoth.put_unit]] without a unit. It is, however, the only way for removing a unit from a recall list without putting it on the map.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.add_modification ====&lt;br /&gt;
&lt;br /&gt;
Modifies a given unit. It needs to be a proxy unit. The second argument is the type of the modification (either trait, object, or advance). The option &amp;quot;advance&amp;quot; applies effects as if the unit would advance (e.g. AMLA effects). The third argument is a WML table describing the effect, so mostly containing '''[effect]''' children. See [[EffectWML]] for details about effects.&lt;br /&gt;
&lt;br /&gt;
 local u = wesnoth.get_units { canrecruit = true }[1]&lt;br /&gt;
 wesnoth.add_modification(u, &amp;quot;object&amp;quot;, { { &amp;quot;effect&amp;quot;, { apply_to = &amp;quot;image_mod&amp;quot;, replace = &amp;quot;RC(red&amp;gt;blue)&amp;quot; } } })&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.unit_resistance ====&lt;br /&gt;
&lt;br /&gt;
Returns the resistance of a unit against an attack type. (Note: it is a WML resistance. So the higher it is, the weaker the unit is.) The third argument indicates whether the unit is the attacker. Last arguments are the coordinates of an optional map location (for the purpose of taking abilities into account).&lt;br /&gt;
&lt;br /&gt;
 local fire_resistance = 100 - wesnoth.unit_resistance(u, &amp;quot;fire&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.unit_defense ====&lt;br /&gt;
&lt;br /&gt;
Returns the defense of a unit on a particular terrain. (Note: it is a WML defense. So the higher it is, the weaker the unit is.)&lt;br /&gt;
&lt;br /&gt;
 local flat_defense = 100 - wesnoth.unit_defense(u, &amp;quot;Gt&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.unit_movement_cost ====&lt;br /&gt;
&lt;br /&gt;
Returns the movement cost of a unit on a particular terrain.&lt;br /&gt;
&lt;br /&gt;
 local move_cost = wesnoth.unit_movement_cost(u, &amp;quot;Gt&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.unit_ability ====&lt;br /&gt;
&lt;br /&gt;
Returns true if the unit is currently under effect by an ability with this given TAG NAME. This means that the ability could be owned by the unit itself, or by an adjacent unit.&lt;br /&gt;
&lt;br /&gt;
 function has_teleport(u)&lt;br /&gt;
     return wesnoth.unit_ability(u, &amp;quot;teleport&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_unit_type_ids ====&lt;br /&gt;
{{DevFeature1.11}}: This function is deprecated, use wesnoth.unit_types.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_unit_type ====&lt;br /&gt;
&lt;br /&gt;
Returns the unit type with the corresponding ID.&lt;br /&gt;
&lt;br /&gt;
 local lich_cost = wesnoth.get_unit_type(&amp;quot;Ancient Lich&amp;quot;).cost&lt;br /&gt;
&lt;br /&gt;
Unit types are proxy tables with the following fields:&lt;br /&gt;
* '''id''': string&lt;br /&gt;
* '''name''': translatable string (read only)&lt;br /&gt;
* '''max_moves''', '''max_experience''', '''max_hitpoints''', '''level''', '''cost''': integers (read only)&lt;br /&gt;
* '''__cfg''': WML table (dump)&lt;br /&gt;
&lt;br /&gt;
The metatable of these proxy tables appears as '''&amp;quot;unit type&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.unit_types ====&lt;br /&gt;
&lt;br /&gt;
This is not a function but a table indexed by unit type ids. Its elements are the proxy tables returned by [[#wesnoth.get_unit_type]].&lt;br /&gt;
&lt;br /&gt;
 local lich_cost = wesnoth.unit_types[&amp;quot;Ancient Lich&amp;quot;].cost&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.races ====&lt;br /&gt;
&lt;br /&gt;
This is not a function but a table indexed by race ids. Its elements are proxy tables for all races the engine knows about.&lt;br /&gt;
known fields of each element:&lt;br /&gt;
* '''id''': string&lt;br /&gt;
* '''description''', '''name''', '''plural_name''' (translatable strings)&lt;br /&gt;
* '''num_traits''' (integer)&lt;br /&gt;
* '''ignore_global_traits''' (boolean)&lt;br /&gt;
* '''undead_variation''' (string)&lt;br /&gt;
(all read only)&lt;br /&gt;
* '''__cfg''': WML table (dump)&lt;br /&gt;
&lt;br /&gt;
 wesnoth.message(tostring(wesnoth.races[&amp;quot;lizard&amp;quot;].name))&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_traits ====&lt;br /&gt;
&lt;br /&gt;
Returns a table with named fields (trait id strings) holding the wml tables defining the traits. arguments: none. All global traits the engine knows about, race-specific traits are not included.&lt;br /&gt;
Known fields and subtags of each element are the ones which were given in the wml definition of the [[SingleUnitWML|trait]].&lt;br /&gt;
 wesnoth.message(tostring(wesnoth.get_traits().strong.male_name))&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.simulate_combat ====&lt;br /&gt;
&lt;br /&gt;
Computes the hitpoint distribution and status chance after a combat between two units. Optional integers can be passed to select a particular weapon, otherwise the &amp;quot;best&amp;quot; one is selected. The first unit is the attacker; it does not have to be on the map, though its location should be meaningful. The second unit is the defender; it has to be on the map.&lt;br /&gt;
&lt;br /&gt;
When giving the attack, the parameter is the attack id (integer) and not an element from the table returned by helper.child_range(att, &amp;quot;attack&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
 local function display_stats(n, t)&lt;br /&gt;
     wesnoth.message(string.format(&lt;br /&gt;
         &amp;quot;Chance for the %s\n  to be slowed: %f,\n  to be poisoned: %f,\n  to die: %f.\nAverage HP: %f.&amp;quot;,&lt;br /&gt;
         n, t.slowed, t.poisoned, t.hp_chance[0], t.average_hp))&lt;br /&gt;
 end&lt;br /&gt;
 local att_stats, def_stats = wesnoth.simulate_combat(att, att_weapon, def)&lt;br /&gt;
 display_stats(&amp;quot;attacker&amp;quot;, att_stats)&lt;br /&gt;
 display_stats(&amp;quot;defender&amp;quot;, def_stats)&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.transform_unit ====&lt;br /&gt;
&lt;br /&gt;
Changes the type of a unit and adjust attributes accordingly. Note that hitpoints might be modified accordingly to the unit type.&lt;br /&gt;
&lt;br /&gt;
 local ev = wesnoth.current.event_context&lt;br /&gt;
 local u = wesnoth.get_units{x=ev.x1, y=ev.y1}[1]&lt;br /&gt;
 local old_hp = u.hitpoints&lt;br /&gt;
 wesnoth.transform_unit(u, &amp;quot;Skeleton&amp;quot;)&lt;br /&gt;
 u.hitpoints = old_hp&lt;br /&gt;
 u.status.poisoned = false&lt;br /&gt;
&lt;br /&gt;
[[Category: Lua Reference]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=LuaWML/Sides&amp;diff=45159</id>
		<title>LuaWML/Sides</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=LuaWML/Sides&amp;diff=45159"/>
		<updated>2012-02-08T21:54:26Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* wesnoth.sides */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the [[LuaWML]] functions and helpers for handling sides and villages.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_side ====&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.11}}: This function is deprecated, use wesnoth.sides[i] instead of wesnoth.get_side(i).&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.sides ====&lt;br /&gt;
&lt;br /&gt;
This is not a function but a table indexed by side numbers. Its elements are proxy tables with these fields:&lt;br /&gt;
* '''side''': the side number&lt;br /&gt;
* '''gold''', '''village_gold''', '''base_income''': integers (read/write)&lt;br /&gt;
* '''total_income''': integer (read only)&lt;br /&gt;
* '''objectives''', '''user_team_name''': translatable strings (read/write)&lt;br /&gt;
* '''objectives_changed''': boolean (read/write)&lt;br /&gt;
* '''team_name''': string (read/write)&lt;br /&gt;
* '''controller''': string (read/write)&lt;br /&gt;
''note: In networked multiplayer, the controller attribute is ambiguous. Be very careful or you have OOS errors.''&lt;br /&gt;
* '''fog''': boolean (read)&lt;br /&gt;
* '''shroud''': boolean (read)&lt;br /&gt;
* '''hidden''': boolean (read)&lt;br /&gt;
* '''name''': string (read)&lt;br /&gt;
* '''color''': string (read) {{DevFeature1.11}}: also write&lt;br /&gt;
* '''__cfg''': WML table (dump)&lt;br /&gt;
&lt;br /&gt;
The metatable of these proxy tables appears as '''&amp;quot;side&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
 local team = wesnoth.sides[1]&lt;br /&gt;
 team.gold = team.gold + 50&lt;br /&gt;
 wesnoth.message(string.format(&amp;quot;%d sides&amp;quot;, #wesnoth.sides))&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_sides ====&lt;br /&gt;
&lt;br /&gt;
Returns a table array containing proxy tables for these sides matching the passed [[StandardSideFilter]].&lt;br /&gt;
 --set gold to 0 for all sides with a leader&lt;br /&gt;
 local sides = wesnoth.get_sides({ {&amp;quot;has_unit&amp;quot;, { canrecruit = true }} })&lt;br /&gt;
 for i,v in ipairs(sides) do&lt;br /&gt;
     v.gold = 0&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_village_owner ====&lt;br /&gt;
&lt;br /&gt;
Returns the side that owns the village at the given location.&lt;br /&gt;
&lt;br /&gt;
 local owned_by_side_1 = wesnoth.get_village_owner(12, 15) == 1&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.set_village_owner ====&lt;br /&gt;
&lt;br /&gt;
Gives ownership of the village at the given location to the given side (or remove ownership if none). Ownership is also removed if nil or 0 is passed for the third parameter, but no capture events are fired in this case.&lt;br /&gt;
An optional 4th parameter (boolean true|false, default: false) can be passed determining whether to fire any capture events.&lt;br /&gt;
&lt;br /&gt;
 wesnoth.set_village_owner(12, 15, 1)&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.is_enemy ====&lt;br /&gt;
&lt;br /&gt;
Returns true if side A is enemy of side B, false otherwise.&lt;br /&gt;
&lt;br /&gt;
 local enemy_flag = wesnoth.is_enemy(1, 3)&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.match_side ====&lt;br /&gt;
&lt;br /&gt;
Matches a side against a given [[StandardSideFilter]].&lt;br /&gt;
&lt;br /&gt;
 wesnoth.message(tostring(wesnoth.match_side(1, {{&amp;quot;has_unit&amp;quot;, { type = &amp;quot;Troll&amp;quot; }}})))&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_starting_location ====&lt;br /&gt;
&lt;br /&gt;
 local loc = wesnoth.get_starting_location(1)&lt;br /&gt;
 wesnoth.message(string.format(&amp;quot;side 1 starts at (%u, %u)&amp;quot;, loc[1], loc[2]))&lt;br /&gt;
&lt;br /&gt;
==== helper.all_teams ====&lt;br /&gt;
&lt;br /&gt;
Returns an iterator over teams that can be used in a for-in loop.&lt;br /&gt;
&lt;br /&gt;
 for team in helper.all_teams() do team.gold = 200 end&lt;br /&gt;
&lt;br /&gt;
[[Category: Lua Reference]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=LuaWML/Sides&amp;diff=45158</id>
		<title>LuaWML/Sides</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=LuaWML/Sides&amp;diff=45158"/>
		<updated>2012-02-08T21:53:22Z</updated>

		<summary type="html">&lt;p&gt;Anonymissimus: /* wesnoth.get_side */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the [[LuaWML]] functions and helpers for handling sides and villages.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_side ====&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.11}}: This function is deprecated, use wesnoth.sides[i] instead of wesnoth.get_side(i).&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.sides ====&lt;br /&gt;
&lt;br /&gt;
This is not a function but a table indexed by side numbers. Its elements are the proxy tables returned by [[#wesnoth.get_side]].&lt;br /&gt;
&lt;br /&gt;
 local team = wesnoth.sides[1]&lt;br /&gt;
 team.gold = team.gold + 50&lt;br /&gt;
 wesnoth.message(string.format(&amp;quot;%d sides&amp;quot;, #wesnoth.sides))&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_sides ====&lt;br /&gt;
&lt;br /&gt;
Returns a table array containing proxy tables for these sides matching the passed [[StandardSideFilter]].&lt;br /&gt;
 --set gold to 0 for all sides with a leader&lt;br /&gt;
 local sides = wesnoth.get_sides({ {&amp;quot;has_unit&amp;quot;, { canrecruit = true }} })&lt;br /&gt;
 for i,v in ipairs(sides) do&lt;br /&gt;
     v.gold = 0&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_village_owner ====&lt;br /&gt;
&lt;br /&gt;
Returns the side that owns the village at the given location.&lt;br /&gt;
&lt;br /&gt;
 local owned_by_side_1 = wesnoth.get_village_owner(12, 15) == 1&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.set_village_owner ====&lt;br /&gt;
&lt;br /&gt;
Gives ownership of the village at the given location to the given side (or remove ownership if none). Ownership is also removed if nil or 0 is passed for the third parameter, but no capture events are fired in this case.&lt;br /&gt;
An optional 4th parameter (boolean true|false, default: false) can be passed determining whether to fire any capture events.&lt;br /&gt;
&lt;br /&gt;
 wesnoth.set_village_owner(12, 15, 1)&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.is_enemy ====&lt;br /&gt;
&lt;br /&gt;
Returns true if side A is enemy of side B, false otherwise.&lt;br /&gt;
&lt;br /&gt;
 local enemy_flag = wesnoth.is_enemy(1, 3)&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.match_side ====&lt;br /&gt;
&lt;br /&gt;
Matches a side against a given [[StandardSideFilter]].&lt;br /&gt;
&lt;br /&gt;
 wesnoth.message(tostring(wesnoth.match_side(1, {{&amp;quot;has_unit&amp;quot;, { type = &amp;quot;Troll&amp;quot; }}})))&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_starting_location ====&lt;br /&gt;
&lt;br /&gt;
 local loc = wesnoth.get_starting_location(1)&lt;br /&gt;
 wesnoth.message(string.format(&amp;quot;side 1 starts at (%u, %u)&amp;quot;, loc[1], loc[2]))&lt;br /&gt;
&lt;br /&gt;
==== helper.all_teams ====&lt;br /&gt;
&lt;br /&gt;
Returns an iterator over teams that can be used in a for-in loop.&lt;br /&gt;
&lt;br /&gt;
 for team in helper.all_teams() do team.gold = 200 end&lt;br /&gt;
&lt;br /&gt;
[[Category: Lua Reference]]&lt;/div&gt;</summary>
		<author><name>Anonymissimus</name></author>
		
	</entry>
</feed>