<?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=Nital</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=Nital"/>
	<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/Special:Contributions/Nital"/>
	<updated>2026-04-04T18:10:03Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.16</generator>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=AnimationWML&amp;diff=29014</id>
		<title>AnimationWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=AnimationWML&amp;diff=29014"/>
		<updated>2009-03-22T12:50:12Z</updated>

		<summary type="html">&lt;p&gt;Nital: switching some more tags to 1.6 WML&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page covers unit animations. At any point in game, units are playing an animation. Even when the unit is standing, it is actually playing a single frame animation.&lt;br /&gt;
&lt;br /&gt;
This page will deal with the two problems of animations&lt;br /&gt;
* How are animations Chosen&lt;br /&gt;
* What exactly is drawn&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How animations are drawn ==&lt;br /&gt;
=== Animations ===&lt;br /&gt;
Any unit has a huge set of animations to choose from. Animations are WML blocks in the unit type, enclosed in either the generic type '''[animation]''' or some more specific tags such as '''[attack_anim]''' '''[idle_anim]''' and the like. An animation is what a unit displays when a given event is triggered, and a certain set of conditions are met such as&lt;br /&gt;
* unit is attacking&lt;br /&gt;
* unit is idling&lt;br /&gt;
* unit is attacking (event) and uses a melee weapon (condition)&lt;br /&gt;
* unit is attacking (event) and uses a melee weapon (condition) and opponent can't retaliate (condition)&lt;br /&gt;
&lt;br /&gt;
events and conditions are described entirely in the [animation] block, and will be discussed in the animation choice section.&lt;br /&gt;
&lt;br /&gt;
=== Frames ===&lt;br /&gt;
    &lt;br /&gt;
An animation is cut in frames. Frames are WML blocks that are contained either in '''[frame]''' WML blocks or in generic '''[xxx_frame]''' block. (the xxx part can be any string not starting with an underscore) the xxx part in the frame name is called the frame prefix. frames of the type '''[frame]''' are said to have an empty prefix&lt;br /&gt;
&lt;br /&gt;
A frame typically describes an image, where an how to render it. It can contain such things as&lt;br /&gt;
* the image to display&lt;br /&gt;
* how transparent should that image be&lt;br /&gt;
* where to draw that image.&lt;br /&gt;
&lt;br /&gt;
At any given time, an animation will display one frame for each frame prefix it can find. I.e if your animation has both '''[frame]''' and '''[missile_frame]''' blocks, both will be displayed at the same time&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The frame with the empty prefix is special in many way. It is assumed to contain the image representing the unit itself, and as such the engine will heavily temper with it in multiple ways, such as providing a default image if none is available, or forcing the image to be green when the unit is poisoned&lt;br /&gt;
&lt;br /&gt;
=== Timing, Clock, Multiple animations ===&lt;br /&gt;
When an animation is played it has an internal clock that is run. The step of this clock is the milisecond, and each frame is played for a given duration. Each animation also has a starting time which tells the animation engine at what value the animation clock should start&lt;br /&gt;
&lt;br /&gt;
This starting time is very important when multiple animations from different units are played synchronously  Typically a fight involves a unit playing its defense animation while the opponent plays it's attack animation (and a third might play its leading animation, too). In that case all animations have a common clock, and are played concurrently.&lt;br /&gt;
&lt;br /&gt;
The convention is that the &amp;quot;important time&amp;quot; (usually the time of the hit) is at time 0. everything before should be at negative time, everything after at positive time. This is a WML convention that is not enforced by the engine&lt;br /&gt;
&lt;br /&gt;
In that case, it is very important that these animations (which can have different lengths) be synchronized. Fight animations are synchronized around the point of impact, so they all reach time 0 when the attack lands (or misses). This is accomplished through the use of the '''start_time''' key of the '''[animation]''' tag.&lt;br /&gt;
&lt;br /&gt;
Just like the '''[frame]''' tag can have a prefix, so can the '''start_time''' key. A '''start_time''' key without prefix will affect a '''[frame]''' tag without prefix, while a '''start_time''' key with a prefix will affect a '''[frame]''' tag with the same prefix.&lt;br /&gt;
&lt;br /&gt;
==== Example Syntax ====&lt;br /&gt;
    [attack_anim]&lt;br /&gt;
        [attack_filter]&lt;br /&gt;
            name= _ &amp;quot;bow&amp;quot;&lt;br /&gt;
        [/attack_filter]&lt;br /&gt;
        '''start_time'''=-350&lt;br /&gt;
        '''missile_start_time'''=-150&lt;br /&gt;
        [missile_frame]&lt;br /&gt;
            duration=150&lt;br /&gt;
            image=&amp;quot;projectiles/missile-n.png&amp;quot;&lt;br /&gt;
            image_diagonal=&amp;quot;projectiles/missile-ne.png&amp;quot;&lt;br /&gt;
        [/missile_frame]&lt;br /&gt;
        [if]&lt;br /&gt;
            hits=yes&lt;br /&gt;
            [frame]&lt;br /&gt;
                duration=350&lt;br /&gt;
                sound=bow.ogg&lt;br /&gt;
            [/frame]&lt;br /&gt;
        [/if]&lt;br /&gt;
        [else]&lt;br /&gt;
            hits=no&lt;br /&gt;
            [frame]&lt;br /&gt;
                duration=350&lt;br /&gt;
                sound=bow-miss.ogg&lt;br /&gt;
            [/frame]&lt;br /&gt;
        [/else]&lt;br /&gt;
    [/attack_anim]&lt;br /&gt;
&lt;br /&gt;
=== The content of a frame ===&lt;br /&gt;
==== Syntax summary ====&lt;br /&gt;
 [frame]&lt;br /&gt;
    duration=&amp;lt;integer&amp;gt;&lt;br /&gt;
    begin=&amp;lt;deprecated,integer&amp;gt;&lt;br /&gt;
    end=&amp;lt;deprecated,integer&amp;gt;&lt;br /&gt;
    image=&amp;lt;string&amp;gt;&lt;br /&gt;
    image_diagonal=&amp;lt;string&amp;gt;&lt;br /&gt;
    image_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
    sound=&amp;lt;string&amp;gt;&lt;br /&gt;
    halo=&amp;lt;progressive string&amp;gt;&lt;br /&gt;
    halo_x=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
    halo_y=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
    halo_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
    alpha=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
    offset=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
    blend_color=&amp;lt; red, green, blue &amp;gt;&lt;br /&gt;
    blend_ratio=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
    text=&amp;lt;string&amp;gt;&lt;br /&gt;
    text_color=&amp;lt; red, green, blue &amp;gt;&lt;br /&gt;
    submerge=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
    x=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
    y=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
    layer=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
 [/frame]&lt;br /&gt;
&lt;br /&gt;
==== Progressive parameters ====&lt;br /&gt;
&lt;br /&gt;
Some parameters above are marked as ''progressive'' This means that you can specify that during the time the frame is displayed, the parameter should smoothly slide from one value to an other.&lt;br /&gt;
&lt;br /&gt;
A typical example would be a unit progressively fading out, becoming transparent&lt;br /&gt;
&lt;br /&gt;
To do that, you could use:&lt;br /&gt;
&lt;br /&gt;
 alpha=1~0&lt;br /&gt;
&lt;br /&gt;
To make a frame, which is 900ms long, slide to transparent for 300ms, stay transparent for another 300ms and finally fade back to normal for 300ms, use:&lt;br /&gt;
&lt;br /&gt;
 alpha=1~0:300,0:300,0~1:300&lt;br /&gt;
&lt;br /&gt;
you could also specify it like that&lt;br /&gt;
&lt;br /&gt;
 alpha=1~0,0,0~1&lt;br /&gt;
&lt;br /&gt;
when a timing is missing, the engine will do its best to fill in in a fair way. &lt;br /&gt;
&lt;br /&gt;
a progressive string has a similar syntax&lt;br /&gt;
&lt;br /&gt;
 halo=halo1.png:300,halo2.png:300,halo2.png:300&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
** '''begin''': (deprecated) will be replaced by '''duration= &amp;lt;end - begin &amp;gt;'''&lt;br /&gt;
** '''end''': (deprecated) see '''begin''' and also [[AnimationWML#Timing.2C_Clock.2C_Multiple_animations|Timing, Clock, Multiple animations]] section for coverage of '''start_time''' which combines with '''duration''' to replace '''begin=''' '''end='''.&lt;br /&gt;
** '''duration''': how long the frame should be displayed. Use instead of '''begin=''' and '''end='''.&lt;br /&gt;
** '''image''': the image to display during the frame.&lt;br /&gt;
** '''image_diagonal''': the image to display when the attack occurs diagonally (directions ne,se,sw,nw).&lt;br /&gt;
** '''image_mod''': a string modifications (see [[ImagePathFunctionWML]] ) that will be applied to all images&lt;br /&gt;
** '''sound''': the sound to play when the frame begins. Can be a comma-separated list of sounds, in which case one of them is chosen randomly every time.&lt;br /&gt;
** '''halo''': the halo to display at the time.&lt;br /&gt;
** '''halo_x''': the position the halo is displayed in pixel relative to the unit's center.&lt;br /&gt;
** '''halo_y''': the position the halo is displayed in pixel relative to the unit's center.&lt;br /&gt;
** '''halo_mod''': a string modifications (see [[ImagePathFunctionWML]] ) that will be applied to all haloes&lt;br /&gt;
** '''alpha''': transparency level to apply to the frame. This is a floating point progressive parameter ranging from 0.0 to 1.0.&lt;br /&gt;
** '''offset''': the position of the image relative to the hex the unit is facing, 0.0 will display the unit in the center of the hex, 1.0 in the center of the faced hex, -1.0 at the center of the hex behind you. This is a progressive parameter.&lt;br /&gt;
** '''blend_color''': a comma separated list of numbers representing a color in RGB (0-255) this color will be mixed to the frame to give it a tint.&lt;br /&gt;
** '''blend_ratio''': this is a progressive parameter ranging from 0 to 1: 0 means no tint, 1 means target color only.&lt;br /&gt;
** '''text''': if specified, floats a label with the given text above the unit (identical to the floating damage and healing numbers).&lt;br /&gt;
** '''text_color''': the color of the above floating label.&lt;br /&gt;
** '''submerge''': the part of the unit that should drawn with 50% opacity (for units in water)&lt;br /&gt;
** '''x''': x offset applied to the frame&lt;br /&gt;
** '''y''': y offset applied to the frame&lt;br /&gt;
** '''layer''': layer used to draw the frame, see discussion bellow&lt;br /&gt;
&lt;br /&gt;
=== Drawing related animation content ===&lt;br /&gt;
==== Syntax summary ====&lt;br /&gt;
 [animation]&lt;br /&gt;
   &amp;lt;animation choice related content&amp;gt;&lt;br /&gt;
   [frame]&lt;br /&gt;
     &amp;lt;frame content&amp;gt;&lt;br /&gt;
   [/frame]&lt;br /&gt;
   [frame]&lt;br /&gt;
     &amp;lt;frame content&amp;gt;&lt;br /&gt;
   [/frame]&lt;br /&gt;
   start_time=&amp;lt;integer&amp;gt;&lt;br /&gt;
   offset=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
   image_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
   blend_with=&amp;lt;r,g,b&amp;gt;&lt;br /&gt;
   blend_ratio=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
   halo=&amp;lt;progressive_string&amp;gt;&lt;br /&gt;
   halo_x=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   halo_y=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   halo_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
   submerge=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
   x=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   y=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   layer=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
   [xxx_frame]&lt;br /&gt;
     &amp;lt;frame content&amp;gt;&lt;br /&gt;
   [/xxx_frame]&lt;br /&gt;
   xxx_start_time=&amp;lt;integer&amp;gt;&lt;br /&gt;
   xxx_image_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
   xxx_offset=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
   xxx_blend_with=&amp;lt;r,g,b&amp;gt;&lt;br /&gt;
   xxx_blend_ratio=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
   xxx_halo=&amp;lt;progressive_string&amp;gt;&lt;br /&gt;
   xxx_halo_x=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   xxx_halo_y=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   xxx_halo_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
   xxx_submerge=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
   xxx_x=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   xxx_y=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   xxx_layer=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 [/animation]&lt;br /&gt;
&lt;br /&gt;
==== Parameter handling ====&lt;br /&gt;
All drawing related parameters in '''[animation]''' can be matched with a corresponding parameter in  a '''[frame]''' block (or a '''[xxx_frame]''' block) The value provided in the animation will be used if no value is provided in the frame. &lt;br /&gt;
&lt;br /&gt;
The point of these two level of parameters is to easily be able to specify a parameter at the animation level and override it for a special case of frame.&lt;br /&gt;
&lt;br /&gt;
== How animations are chosen ==&lt;br /&gt;
Within a unit decription block there are multiple animations. Each animation is meant to be played in a very special set of circumstances. We will discuss here how to tell the animation engine when a given animation should be played. &lt;br /&gt;
&lt;br /&gt;
Let's take an example. Suppose we have a unit which has the skirmisher ability. We have the folowing movement animations :&lt;br /&gt;
* a normal walking animation&lt;br /&gt;
* a swimming animation when the unit is in water&lt;br /&gt;
* a tiptioeing animation when moving next to an ennemy unit&lt;br /&gt;
&lt;br /&gt;
Ok. most of the time it's easy to guess what animation should be. However if you are both in water and next to an ennemy unit, the animation to play is not obvious.&lt;br /&gt;
&lt;br /&gt;
To solve that question, each animation has a number of filtering criterias. The engine follow the following rules to select an animation&lt;br /&gt;
* Start with all animations&lt;br /&gt;
* Drop all animations with a criteria that fails on the current situation&lt;br /&gt;
* Take the animations that have the most maching criterias&lt;br /&gt;
* If there are more than one animation remaining, take an animation randomly&lt;br /&gt;
* If all animations have been droped, the engine will provide a smart default.&lt;br /&gt;
    &lt;br /&gt;
here is a pseudo-code explaination of this algorithm&lt;br /&gt;
&lt;br /&gt;
 foreach animation&lt;br /&gt;
    animation_score = 0&lt;br /&gt;
    foreach filter-criteria&lt;br /&gt;
      if &amp;lt;criteria-fails&amp;gt; &lt;br /&gt;
	  animation_score = -1;&lt;br /&gt;
	  break;&lt;br /&gt;
      elsif &amp;lt;criteria-matches&amp;gt; &lt;br /&gt;
	  animation_score++&lt;br /&gt;
    endfor&lt;br /&gt;
    if animation_score &amp;gt; max_score&lt;br /&gt;
	&amp;lt;empty animation list&amp;gt;&lt;br /&gt;
	max_score = animation_score;&lt;br /&gt;
	push(animation,animation_list);&lt;br /&gt;
    elsif animation_score = max_score&lt;br /&gt;
	push(animation,animation_list);&lt;br /&gt;
 endfor&lt;br /&gt;
 &amp;lt;choose an animation randomly from animation_list&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
Note that all animations don't have all the filters...&lt;br /&gt;
&lt;br /&gt;
so, if we have a unit with&lt;br /&gt;
# an animation for water terrain&lt;br /&gt;
# an animation for SE on grassland&lt;br /&gt;
# an animation with no criteria&lt;br /&gt;
# an animation for N,NE,NW,S,SW,SE&lt;br /&gt;
# an animation for NW&lt;br /&gt;
&lt;br /&gt;
* 3. will never be taken, because 4. will always trump it&lt;br /&gt;
* on water going NW, it can be 1. 4. 5.&lt;br /&gt;
* on water, any direction but NW, it will be 1. or 4.&lt;br /&gt;
* on SE grassland it will be 2.&lt;br /&gt;
* on other grasslands, it will be 4. (4. or 5. if NW)&lt;br /&gt;
&lt;br /&gt;
=== Generic animation filters available for all animations ===&lt;br /&gt;
* '''apply_to''': a list of comma separated keywords describing what event should trigger the animation (movement, attack...) the complete list is given below&lt;br /&gt;
* '''value''': a list of comma separated integer, the meaning depends on the triggering event. the meaning is given with the list of event&lt;br /&gt;
* '''terrain''': a list of comma separated terrain letters, the animation will only be used on these terrains.  See [[FilterWML]].&lt;br /&gt;
* '''[filter]''': this will filter using a standard unit filter on the animated unit. Note that matching all criterias in the filter will only earn you one point for animation selection, but that you can have multiple '''[filter]''' blocks in an animation.&lt;br /&gt;
* '''[filter_second]''': this will filter using a standard unit filter on the unit in the hex faced. Note that matching all criterias in the filter will only earn you one point for animation selection, but that you can have multiple '''[filter_second]''' blocks in an animation. Also note that if the faced hex is empty, the whole filter will fail.&lt;br /&gt;
* '''direction''': a list of directions (n,ne,se,s,sw,nw), the animation will only be used when acting or moving in this direction (the attack direction for attack animations, moving direction for movement animations, direction of lead unit for leading animations, and so on).&lt;br /&gt;
* '''frequency''': this integer value allows to easily tweak the matching frequency of animations. The filter will fail n-1 times out of n, randomly. Note that unlike every other filter, matching this filter won't give an extra point.&lt;br /&gt;
* '''[filter_attack]''': a standard attack filter to match on the attacker's attack. See  [[FilterWML]]. &lt;br /&gt;
* '''[filter_second_attack]''': a standard attack filter to match on the defender's attack. See [[FilterWML]]. Also note that if the defender doesn't have any weapon to retaliate with, this filter will always fail. &lt;br /&gt;
* '''hits''': filters attack animations based on whether the attack hits, misses or kills. Accepts a list of the following:&lt;br /&gt;
** '''hit''': the attack hits, defender survives.&lt;br /&gt;
** '''no''' or '''miss''': the attack misses.&lt;br /&gt;
** '''kill''': the attack hits, defender dies.&lt;br /&gt;
** '''yes''': is an alias of '''hit,kill'''.&lt;br /&gt;
* '''swing''': a list of numbers representing the swing numbers this animation should match (numbered from 1).&lt;br /&gt;
&lt;br /&gt;
=== Events trigerring animations and default animations ===&lt;br /&gt;
==== standing ====&lt;br /&gt;
This animation is triggered whenever any other animation is finished, and is played in loop until another animation is triggered&lt;br /&gt;
&lt;br /&gt;
this is the default &amp;quot;standing image&amp;quot; for the unit&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no standing animation is set a single frame animation based on the enclosing unit's '''image=''' field is used&lt;br /&gt;
==== selected ====&lt;br /&gt;
This animation is triggered whenever the unit is selected&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;0.0~0.3:100,0.3~0.0:200&amp;quot; blend_color=255,255,255''&lt;br /&gt;
==== recruited ====&lt;br /&gt;
This animation is triggered whenever the unit is recruited or recalled&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''highlight=0~1:600''&lt;br /&gt;
==== levelin ====&lt;br /&gt;
This animation is triggered whenever the unit levels, before the unit is replaced by the new unit&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;1~0:600&amp;quot; blend_color=255,255,255''&lt;br /&gt;
==== levelout ====&lt;br /&gt;
This animation is triggered whenever the unit levels, after the unit is replaced by the new unit&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;0~1:600&amp;quot; blend_color=255,255,255''&lt;br /&gt;
==== movement ====&lt;br /&gt;
This animation is used whenever a unit moves. There are multiple things to consider when dealing with movement animation&lt;br /&gt;
* unit stay ''exactly'' 150ms in each hex. so you typically want to have an offset of ''0~1:150,0~1:150,0~1:150,0~1:150,0~1:150'' or something similar&lt;br /&gt;
* when a unit enters a hex, the current anim is tested again.&lt;br /&gt;
** if the current animation is still valid (i.e it passes all its filter) it is kept, whatever the final score is&lt;br /&gt;
** if it fails, a new movement anim is searched&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''offset=&amp;quot;0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150&amp;quot;''&lt;br /&gt;
==== pre_teleport ====&lt;br /&gt;
This animation is triggered whenever the unit teleports, but before it has moved to the target hex&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;1~0:150&amp;quot; blend_color=255,255,255''&lt;br /&gt;
==== post_teleport ====&lt;br /&gt;
This animation is triggered whenever the unit teleports, but after it has moved to the target hex&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;0~1:150&amp;quot; blend_color=255,255,255''&lt;br /&gt;
==== healing ====&lt;br /&gt;
This animation is triggered when the unit has healing powers and uses them&lt;br /&gt;
&lt;br /&gt;
''value='' is the number of points healed&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
==== healed ====&lt;br /&gt;
This animation is triggered whenever the unit is healed for any reason&lt;br /&gt;
&lt;br /&gt;
''value='' is the number of points healed&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;0:30,0.5:30,0:30,0.5:30,0:30,0.5:30,0:30,0.5:30,0:30&amp;quot; blend_color=255,255,255''&lt;br /&gt;
and plays the sound ''heal.wav''&lt;br /&gt;
==== poisoned ====&lt;br /&gt;
This animation is triggered whenever the unit suffers poison dammage&lt;br /&gt;
&lt;br /&gt;
''value='' is the number of points lost&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;0:30,0.5:30,0:30,0.5:30,0:30,0.5:30,0:30,0.5:30,0:30&amp;quot; blend_color=0,255,0''&lt;br /&gt;
and plays the sound 'poison.ogg''&lt;br /&gt;
==== defend ====&lt;br /&gt;
This animation is triggered during a strike, of the unit receiving the blow&lt;br /&gt;
&lt;br /&gt;
''value='' is the number of point lost, if any&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
==== attack ====&lt;br /&gt;
This animation is triggered during a strike, of the unit giving the blow&lt;br /&gt;
&lt;br /&gt;
''value='' is the number of damage dealt, if any&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''offset=&amp;quot;0~0.6:150,0.6~0:150&amp;quot;'' for melee attacks&lt;br /&gt;
No default is provided for range attacks&lt;br /&gt;
==== leading ====&lt;br /&gt;
This animation is triggered for units with the leading special ability, when the unit they are leading is attacking&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== resistance ====&lt;br /&gt;
This animation is triggered for units with the resistance special ability affecting neighbouring fights, when the unit they are helping is defending&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
&lt;br /&gt;
==== death ====&lt;br /&gt;
This animation is triggered when a unit die.&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''highlight=1~0:600'' and plays the sound in ''die_sound='' of the enclosing unit&lt;br /&gt;
==== victory ====&lt;br /&gt;
This animation is triggered when a unit finishes a fight by killing the other unit&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
==== idling ====&lt;br /&gt;
This animation is called when the unit has been using its standing animation for a random duration.&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
&lt;br /&gt;
==== default ====&lt;br /&gt;
&lt;br /&gt;
This animation is never triggered, but is used as a base to create new animations&lt;br /&gt;
&lt;br /&gt;
''value='' is used depending of the type of animation it replaces&lt;br /&gt;
&lt;br /&gt;
A single animation made of the base frame is provided by the engine if no default animation is available&lt;br /&gt;
&lt;br /&gt;
==== extra animations ====&lt;br /&gt;
Other values are never called by the engine. However they can be triggered by WML events allowing custom animations.&lt;br /&gt;
&lt;br /&gt;
Note that WML events can also trigger standard animations.&lt;br /&gt;
''value='' is set from the WML event&lt;br /&gt;
&lt;br /&gt;
== Shortcuts, tricks and quirks ==&lt;br /&gt;
&lt;br /&gt;
=== ''[if]'' and ''[else]'' ===&lt;br /&gt;
&lt;br /&gt;
Often, you need to do very slight variations in an animation (like a different sound depending on whether the unit hits or misses its attack), the '''[if]''' and '''[else]''' tags are meant to help you do that. &lt;br /&gt;
    &lt;br /&gt;
Using these in an animation is equivalent to having multiple animations, one with the '''[if]''' block and one with each of the ''[else]'' blocks. Any filtering flags in these blocks will replace the toplevel filters. You can have multiple '''[if]''' blocks in an animation, but you can't nest an '''[if]''' inside another. These should be written directly inside the '''[animation]''' block. The following example would make the '''[frame]''' inside the '''[if]''' be played when the attack misses, and the '''[frame]''' inside the '''[else]''' be played when the attack hits (producing a different sound):&lt;br /&gt;
&lt;br /&gt;
    [if]&lt;br /&gt;
        hits=no&lt;br /&gt;
        [frame]&lt;br /&gt;
            begin=-100&lt;br /&gt;
            end=100&lt;br /&gt;
            image=&amp;quot;units/dwarves/lord-attack.png&amp;quot;&lt;br /&gt;
            sound={SOUND_LIST:MISS}&lt;br /&gt;
        [/frame]&lt;br /&gt;
    [/if]&lt;br /&gt;
    [else]&lt;br /&gt;
        hits=yes&lt;br /&gt;
        [frame]&lt;br /&gt;
            begin=-100&lt;br /&gt;
            end=100&lt;br /&gt;
            image=&amp;quot;units/dwarves/lord-attack.png&amp;quot;&lt;br /&gt;
            sound=axe.ogg&lt;br /&gt;
        [/frame]&lt;br /&gt;
    [/else]&lt;br /&gt;
&lt;br /&gt;
note that this is very close to preprocessing and should be considered as such, especially with regard to scoring and animation selection&lt;br /&gt;
&lt;br /&gt;
=== Simplified animation blocks ===&lt;br /&gt;
To simplify the most common animation cases, you can use different blocks instead of the generic '''[animation]''' block. These are also here for backward compatibility, but are not deprecated and fully supported&lt;br /&gt;
&lt;br /&gt;
some of these use extra tags which are translated in the normal ''value='' tag&lt;br /&gt;
&lt;br /&gt;
some of these define '''[xxx_frame]''' blocks where the frame prefix starts with an underscore. This is not allowed in normal WML (prefix starting with underscore is reserved for the engine internal use). It is here for clarity purpose&lt;br /&gt;
&lt;br /&gt;
* '''[leading_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=leading&lt;br /&gt;
* '''[recruit_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=recruited&lt;br /&gt;
* '''[standing_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=standing,default&lt;br /&gt;
note for 1.4 :''default'' doesn't exist in 1.4, but the semantic is the same.&lt;br /&gt;
&lt;br /&gt;
i.e: the animation will be used to build default animations&lt;br /&gt;
* '''[idle_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=idling&lt;br /&gt;
* '''[levelin_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=levelin&lt;br /&gt;
* '''[levelout_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=levelout&lt;br /&gt;
* '''[healing_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=healing&lt;br /&gt;
 value=&amp;lt;damage= value&amp;gt;&lt;br /&gt;
* '''[healed_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=healed&lt;br /&gt;
 value=&amp;lt;healing= value&amp;gt;&lt;br /&gt;
 [_healed_sound_frame]&lt;br /&gt;
    sound=heal.wav&lt;br /&gt;
 [/_healed_sound_frame]&lt;br /&gt;
* '''[poison_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=poisoned&lt;br /&gt;
 value=&amp;lt;damage= value&amp;gt;&lt;br /&gt;
 [_poison_sound_frame]&lt;br /&gt;
    sound=poison.ogg&lt;br /&gt;
 [/_poison_sound_frame]&lt;br /&gt;
* '''[movement_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=movement&lt;br /&gt;
 offset=&amp;quot;0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150&amp;quot;&lt;br /&gt;
* '''[defend]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=defend&lt;br /&gt;
 value=&amp;lt;damage= value&amp;gt;&lt;br /&gt;
 &amp;lt;WML content&amp;gt;&lt;br /&gt;
 [frame]&lt;br /&gt;
    blend_with=255,0,0&lt;br /&gt;
    blend_ratio=&amp;quot;0.5:50,0.0:50&amp;quot;&lt;br /&gt;
 [/frame]&lt;br /&gt;
&lt;br /&gt;
there are some subtil change compared to what is described above to avoid the red flash when value=0, but it should work as expected as far as WML author are concerned&lt;br /&gt;
 &lt;br /&gt;
* '''[attack_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
if the animation contains a missile frame&lt;br /&gt;
&lt;br /&gt;
 apply_to=attack&lt;br /&gt;
 missile_offset=&amp;quot;0~0.8&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
&lt;br /&gt;
 apply_to=attack&lt;br /&gt;
 offset=&amp;quot;0~0.6,0.6~0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''[death]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=death&lt;br /&gt;
 [_death_sound_frame]&lt;br /&gt;
    sound=&amp;lt;die_sound= of the enclosing [unit] tag&amp;gt;&lt;br /&gt;
 [/_death_sound_frame]&lt;br /&gt;
* '''[victory_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=victory&lt;br /&gt;
* '''[extra_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=&amp;lt;flag= value of the anim&amp;gt;&lt;br /&gt;
* '''[teleport_anim]''' will be cut into two at the clock-time 0&lt;br /&gt;
everything before zero becomes an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=pre_teleport&lt;br /&gt;
everything after zero becomes an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=post_teleport&lt;br /&gt;
&lt;br /&gt;
== Layering ==&lt;br /&gt;
The ''layer'' progressive parameter allows the animation writer to choose in what order the animation should be drawn.&lt;br /&gt;
&lt;br /&gt;
this value must be between 0 and 100&lt;br /&gt;
&lt;br /&gt;
* the back of haloes is drawn with a value of 10&lt;br /&gt;
* when unspecified, a animation is drawn with a value of 40&lt;br /&gt;
* terrain elements that are supposed to go in front of units (castles) are drawn with a value of 50&lt;br /&gt;
* orbs and status bars are drawn on layer 80&lt;br /&gt;
* when unspecified missile frames are drawn on layer 90&lt;br /&gt;
&lt;br /&gt;
by changing these values, it is easy to have the unit display the way you want&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[UnitWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=InterfaceActionsWML&amp;diff=29012</id>
		<title>InterfaceActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=InterfaceActionsWML&amp;diff=29012"/>
		<updated>2009-03-22T12:44:21Z</updated>

		<summary type="html">&lt;p&gt;Nital: adding {{DevFeature}} back to show_objectives&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== Interface actions ==&lt;br /&gt;
&lt;br /&gt;
Interface actions are actions that do not have an 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;
== [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. 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 description 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;
* '''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.&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]''': zero or more '''[option]''' elements may be present. 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_chars''': 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;
* note that '''[option]''' and '''[text_input]''' can only be used in moveto events in MP, otherwise they cause OOS&lt;br /&gt;
&lt;br /&gt;
Text formatting options for '''[message]'''. These can also be used in unit names (user_description), objectives, and such.&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;
This tag renders the ''objectives'' attribute of [scenario] obsolete (see ''objectives'', [[ScenarioWML]]).&lt;br /&gt;
Instead of using ''objectives'', use '''[objectives]''' to set scenario objectives inside a prestart event.&lt;br /&gt;
It can also be used to overwrite the starting objectives mid-scenario.&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.&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;
* '''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;
** '''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;
&lt;br /&gt;
=== Macros ===&lt;br /&gt;
There are a few predefined macros for Objectives that you can use to shorten the code. '''{SET_OBJECTIVES}''', '''{VICTORY_CONDITION}''' and '''{DEFEAT_CONDITION}'''. There are all used together. For more information look [http://www.wesnoth.org/misc/macro-reference.xhtml here]&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;
* '''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 [[InternalActionsWML]]) 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;
&lt;br /&gt;
== Other interface tags ==&lt;br /&gt;
&lt;br /&gt;
The following tags are also action tags:&lt;br /&gt;
* '''[item]''': 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.&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.&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;
* '''[removeitem]''': removes any graphical items on a given hex&lt;br /&gt;
** '''x''', '''y''': the hex to remove items off&lt;br /&gt;
** '''image''' if specified, only removes the given image item&lt;br /&gt;
* '''[print]''': 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]''': 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;
* '''[hide_unit]''': makes the given unit become invisible. Useful in conjunction with '''[move_unit_fake]''': to move a leader unit into position on-screen. Each '''[hide_unit]''' tag only hides one unit.&lt;br /&gt;
** '''x''', '''y''': location of the unit to be hidden. (NOT a standard unit filter! Just x and y.)&lt;br /&gt;
* '''[unhide_unit]''': stops the currently hidden unit from being hidden.&lt;br /&gt;
* '''[scroll]''': 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]''': Scroll to a given hex&lt;br /&gt;
** '''x''', '''y''': the hex to scroll to&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;
* '''[scroll_to_unit]''' 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;
* '''[sound]''': 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]''': 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/shrouded&lt;br /&gt;
** '''x,y''': a [[StandardLocationFilter]] for 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;
* '''[remove_sound_source]''': Removes a previously defined sound source.&lt;br /&gt;
** '''id''': the identification key of the sound source to remove&lt;br /&gt;
* '''[music]''': 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;
* '''[colour_adjust]''': tints the colour of the screen.&lt;br /&gt;
** '''red''', '''green''', '''blue''': values from -255 to 255, the amount to tint by for each colour&lt;br /&gt;
* '''[delay]''': pauses the game&lt;br /&gt;
** '''time''': the time to pause in milliseconds&lt;br /&gt;
* '''[redraw]''': 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;
** '''side''': if used, recalculates fog and shroud for that side. 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;
* '''[unit_overlay]''': sets an image that will be drawn over a particular unit, and follow it around&lt;br /&gt;
** '''x''', '''y''': the location of the unit to overlay on&lt;br /&gt;
** '''image''': the image to place on the unit&lt;br /&gt;
* '''[remove_unit_overlay]''': removes a particular overlayed image from a unit&lt;br /&gt;
** '''x''', '''y''': the location of the unit to remove an overlay from&lt;br /&gt;
** '''image''': the image to remove from the unit&lt;br /&gt;
* '''[animate_unit]''': uses the custom 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 good custom animation in the unit description see the '''[extra_anim]''' description in [[AnimationWML]] Standar anims can be triggered with the following keywors ''leading recruited standing idling levelin levelout healing healed poisoned movement defend attack death victory pre_teleport post_teleport''&lt;br /&gt;
** '''[filter]''': a [[StandardUnitFilter]] 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&lt;br /&gt;
** '''[secondary_attack]''': same for the second attack&lt;br /&gt;
** '''hits''': the hit type to filter unit on&lt;br /&gt;
** '''text''': a text to hover during the animation&lt;br /&gt;
** '''red''': red value for the text color&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''': whether to display the status bars or not.&lt;br /&gt;
** '''[animate]''': a sub block with the same syntax as the '''[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;
* '''[label]''' 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;
** '''visible_in_fog''': whether the label should be visible through fog or not. Default yes.&lt;br /&gt;
* '''[deprecated_message]''' 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]''' 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;
* '''[open_help]''' opens the in-game help.&lt;br /&gt;
** '''topic''': the id of the topic to open&lt;br /&gt;
* '''[show_objectives]''' {{DevFeature}} shows the objectives screen. Has the same effect as if [objectives] were used to replace them with an exact duplicate.&lt;br /&gt;
** '''side''': the side to show the objectives. If not set, all sides are used.&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>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=EventWML&amp;diff=29011</id>
		<title>EventWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=EventWML&amp;diff=29011"/>
		<updated>2009-03-22T12:42:27Z</updated>

		<summary type="html">&lt;p&gt;Nital: Undo revision 28998 by Nital (Talk)&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] and [era] tags which is used to describe a set of 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 definition, the event will occur in all scenarios in which a unit of that type appears in. 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;
=== 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 is '''not''' like a normal 'name' key. ''It is a basic description of when the event will trigger.'' It also has a very large number of predefined values, one of which must be used for the key 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.*&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;
==== Valid 'name' Key Values ====&lt;br /&gt;
&lt;br /&gt;
All valid values are listed here along with a description of when this value will cause the event to be triggered. Any value ''not'' listed here will '''not''' work ''no matter how logical or awesome you think it sounds.''&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;
&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;
&lt;br /&gt;
; new turn&lt;br /&gt;
: Triggers whenever the last player ends their turn. See also [[#first_time_only|first_time_only=no]]. When the last player ends their turn, 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;
; 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.&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;
&lt;br /&gt;
; turn ''X''&lt;br /&gt;
: For ''X'' equals a number greater than 1, this event triggers at the start of turn ''X''. The value of ''X'' cannot be 1 but, if that effect is needed, use '''name=new turn''' and '''first_time_only=yes''' to achieve the equivalent of what '''turn 1''' would do.&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 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]]&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.&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 other changes to the game caused by the event. Thus it is up to the scenario designer to use this tag correctly.'' {{DevFeature}} $x2 and $y2 refer to the hex the unit came from.&lt;br /&gt;
&lt;br /&gt;
; sighted&lt;br /&gt;
: Triggers when the primary unit becomes visible to the secondary unit in particular after not being visible to the secondary unit's side (so if the secondary unit's side doesn't have shroud or fog, the event never triggers). This happens both when the primary unit moves into view during its turn, and when the secondary unit moves to a location where it can see the primary unit. (This editor hasn't tested whether the event triggers multiple times if the primary unit moves into view of multiple units at once, or if not, which one gets chosen to be the secondary unit here.) (Note: it appears that when a sighted event is triggered because an enemy unit moves into your field of view, the game engine cannot determine which unit (on your side) sees the unit that moved, and so it fires a ''name=sighted'' event without setting ''$second_unit''. This means that, for example, using ''speaker=second_unit'' inside a message tag may fail.)&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;
; stone&lt;br /&gt;
: Triggers when the primary unit is hit by an attack with the 'stones' ability (See ''stones'', [[AbilitiesWML]]) by the secondary unit (the unit with the 'stones' 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.&lt;br /&gt;
&lt;br /&gt;
; die&lt;br /&gt;
: Triggers when the primary unit is killed by the secondary unit.&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.&lt;br /&gt;
&lt;br /&gt;
; recruit&lt;br /&gt;
: Triggers when the primary unit is recruited. (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 but before it is displayed.&lt;br /&gt;
&lt;br /&gt;
; recall&lt;br /&gt;
: Triggers after a unit is recalled.&lt;br /&gt;
&lt;br /&gt;
; prerecall&lt;br /&gt;
: Triggers when a unit is recalled 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.&lt;br /&gt;
&lt;br /&gt;
; post_advance&lt;br /&gt;
: Triggers just after the primary unit has advanced to another unit.&lt;br /&gt;
&lt;br /&gt;
; select&lt;br /&gt;
: Triggers when the primary unit is selected. ''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;
; Other events with a custom name may be invoked from [fire_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. There are two possible values for this key:&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 every time the criteria are met instead of only the first time.&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 for the primary unit and the secondary unit that are not generally available in a standard unit filter. Can be used in events ''attack'', ''attacker_hits'', ''attacker_misses'', ''defender_hits'', ''defender_misses'' and ''attack_end''.&lt;br /&gt;
:* '''name''': the name of the weapon used.&lt;br /&gt;
:* '''range''': the range of the weapon used. &lt;br /&gt;
&lt;br /&gt;
==== [filter_second_attack] ====&lt;br /&gt;
: Like [filter_attack], but for the secondary unit.&lt;br /&gt;
:* '''name''': the name of the weapon used.&lt;br /&gt;
:* '''range''': the range of the weapon used.&lt;br /&gt;
&lt;br /&gt;
==== [event] ====&lt;br /&gt;
: A special case 'action', the [event] tag may be used to create a [[#Nested Events|nested event]].&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 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;
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;
== 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 the turn 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;
This 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, this example is identical to the first two, in that it will display the turn 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;
== 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>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=StandardUnitFilter&amp;diff=29006</id>
		<title>StandardUnitFilter</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=StandardUnitFilter&amp;diff=29006"/>
		<updated>2009-03-22T11:58:22Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing {{DevFeature}} tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;From [[FilterWML]], this is the standard way of filtering units.&lt;br /&gt;
&lt;br /&gt;
When a unit filter is applied to a map, first it applies to all units on the field,&lt;br /&gt;
based on their coordinates.&lt;br /&gt;
Next it applies to units in the recall list.&lt;br /&gt;
This is important to remember as it means, for example,&lt;br /&gt;
that the tag '''[kill]''' can be used to kill units in the recall list.&lt;br /&gt;
&lt;br /&gt;
You can access the filtered unit within the filter as the ''$this_unit'' variable, see [[SingleUnitWML]] for the possible content of these variables&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following attributes and sub-tags are allowed:&lt;br /&gt;
&lt;br /&gt;
* '''id''': unit matches the given description. This is the same as ''id'' in the [unit] tag. Note that it is independent of a unit's user-visible name, which can be internationalized independent of this. See [[SingleUnitWML]].&lt;br /&gt;
* '''speaker''': alias for description&lt;br /&gt;
* '''type''': matches the unit's type name (can be a list of types)&lt;br /&gt;
* '''race''': the race of the unit type.&amp;lt;br&amp;gt;Races are listed in the unit files ('''data/units/''')&lt;br /&gt;
* '''ability''': unit has an ability with the given id; see [[AbilitiesWML]]&lt;br /&gt;
* '''side''': the unit is on the given side (can be a list)&lt;br /&gt;
* '''has_weapon''': the unit has a weapon with the given name&lt;br /&gt;
* '''canrecruit''': yes if the unit can recruit (i.e. is a leader)&lt;br /&gt;
* '''gender''': female if the unit is female rather than the default of male&lt;br /&gt;
* '''role''': the unit has been assigned the given role; see '''[role]''', [[InternalActionsWML]]&lt;br /&gt;
* '''level''': the level of the unit&lt;br /&gt;
* '''defense''': current defense of the unit on current tile (chance to hit %, like in movement type definitions)&lt;br /&gt;
* '''movement_cost''': current movement cost of the unit on current tile&lt;br /&gt;
* '''x,y''': the position of the unit. Note: there is a special case for units on the recall list such that x,y=&amp;quot;recall,recall&amp;quot;&lt;br /&gt;
* '''find_in''': name of an array or container variable; if present, the unit will not match unless it is also found stored in the variable&lt;br /&gt;
* '''[filter_vision]''': this tests whether or not the unit is currently visible&lt;br /&gt;
** '''visible''': yes or no, default yes&lt;br /&gt;
** '''viewing_side''': the side(s) which you are checking if they are able to see (or not see) the unit. All sides listed here must pass the test. If no side is listed, it will check the visibility all enemy sides.&lt;br /&gt;
* '''[filter_wml]''': this is WML level filter for the unit. In it, you can filter on anything that is in the WML description of a unit. This description can be found in any savegame also in [[SingleUnitWML]].&lt;br /&gt;
* '''[and]''': an extra unit filter. Unless the unit also matches the [and] filter, then it will not count as a match. ''Note: [and],[or], and [not] filters are considered after the containing filter; they are then processed in the order encountered.''&lt;br /&gt;
* '''[or]''': an extra unit filter. If a unit 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 unit filter. If a unit matches the [not] filter, then that unit will not be considered a match by the containing filter.&lt;br /&gt;
* '''[filter_adjacent]''': standard unit filter; if present the correct number of adjacent units 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;
** '''is_enemy''': a boolean specifying whether the adjacent unit must be an enemy or an ally (optional)&lt;br /&gt;
* '''[filter_location]''': [[StandardLocationFilter]] - the tile that the unit is standing on matches the location filter.&lt;br /&gt;
* '''formula''' : [[FormulaAI]] like formula returning a boolean. The unit filtered is an implicit variable in the call&lt;br /&gt;
&lt;br /&gt;
== A Note about Re-Using the Same Attribute ==&lt;br /&gt;
You are limited to having each attribute, such as '''description''', appear once or less in a [[StandardUnitFilter]]. However, this can be worked around. If you have several specific units you want excepted from matching, use a separate [or] subfilters for each one. Also you can use [not] subfilters. For example to kill ([kill] uses the standard unit filter) all units except Gwiti Ha'atel and Tanar you can do the following:&lt;br /&gt;
  [kill]&lt;br /&gt;
    [not]&lt;br /&gt;
      description=Gwiti Ha'atel&lt;br /&gt;
    [/not]&lt;br /&gt;
    [not]&lt;br /&gt;
      description=Tanar&lt;br /&gt;
    [/not]&lt;br /&gt;
  [/kill]&lt;br /&gt;
:And similarly if you wanted to kill both Gwiti Ha'atel and Tanar, but no one else you could do the following:&lt;br /&gt;
  [kill]&lt;br /&gt;
    description=Gwiti Ha'atel&lt;br /&gt;
    [or]&lt;br /&gt;
      description=Tanar&lt;br /&gt;
    [/or]&lt;br /&gt;
  [/kill]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Template:WML_Tags&amp;diff=29004</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=29004"/>
		<updated>2009-03-22T11:56:10Z</updated>

		<summary type="html">&lt;p&gt;Nital: &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;
[[UnitWML|advancefrom]],&lt;br /&gt;
[[UnitWML|advancement]],&lt;br /&gt;
[[StatisticalScenarioWML|advances]],&lt;br /&gt;
[[AiWML|ai]],&lt;br /&gt;
[[DirectActionsWML|allow_recruit]],&lt;br /&gt;
[[DirectActionsWML|allow_undo]],&lt;br /&gt;
[[ConditionalActionsWML#Meta_Condition_Tags|and]],&lt;br /&gt;
[[InterfaceActionsWML|animate_unit]],&lt;br /&gt;
[[AnimationWML|animation]],&lt;br /&gt;
[[VariablesWML|array]],&lt;br /&gt;
[[UnitWML|attack]],&lt;br /&gt;
[[AnimationWML|attack_filter]], &lt;br /&gt;
[[StatisticalScenarioWML|attacks]],&lt;br /&gt;
[[AiWML|avoid]];&lt;br /&gt;
|-&lt;br /&gt;
|''B:'' &lt;br /&gt;
[[UnitWML|base_unit]], [[CampaignWML#The_.5Bbinary_path.5D_tag|binary_path]], [[HelpWML|bold]], [[EditorWML|brush]];&lt;br /&gt;
|-&lt;br /&gt;
|''C:'' &lt;br /&gt;
[[CampaignWML#The_.5Bcampaign.5D_tag|campaign]],&lt;br /&gt;
[[DirectActionsWML|capture_village]],&lt;br /&gt;
[[ConditionalActionsWML#.5Bswitch.5D|case]],&lt;br /&gt;
[[ReplayWML|choose]],&lt;br /&gt;
[[InternalActionsWML|clear_variable]],&lt;br /&gt;
[[InterfaceActionsWML|colour_adjust]],&lt;br /&gt;
command([[InterfaceActionsWML|action]], [[ReplayWML|replay]]);&lt;br /&gt;
|-&lt;br /&gt;
|''D:'' &lt;br /&gt;
[[AbilitiesWML|damage]],&lt;br /&gt;
[[StatisticalScenarioWML|deaths]],&lt;br /&gt;
[[InterfaceActionsWML|debug_message]],&lt;br /&gt;
[[UnitWML|defend]],&lt;br /&gt;
[[StatisticalScenarioWML|defends]],&lt;br /&gt;
[[UnitWML|defense]],&lt;br /&gt;
[[InterfaceActionsWML|delay]],&lt;br /&gt;
[[ReplayWML|destination]],&lt;br /&gt;
[[DirectActionsWML|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;
[[ConditionalActionsWML#Conditional_Actions|else]],&lt;br /&gt;
[[ReplayWML|end_turn]],&lt;br /&gt;
[[DirectActionsWML|endlevel]],&lt;br /&gt;
end_turn&amp;amp;nbsp;([[DirectActionsWML|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;
[[FilterWML|filter]], [[AnimationWML|filter_attack]],  [[FilterWML|filter_location]], [[FilterWML|filter_second]], [[AnimationWML|filter_second_attack]], [[FilterWML|filter_vision]], [[StandardUnitFilter|filter_wml]], [[InternalActionsWML|fire_event]], [[HelpWML|format]], [[AnimationWML|frame]];&lt;br /&gt;
|-&lt;br /&gt;
|''G:'' &lt;br /&gt;
[[GameConfigWML|game_config]],&lt;br /&gt;
[[ScenarioWML|generator]],&lt;br /&gt;
[[DirectActionsWML|gold]],&lt;br /&gt;
[[ThemeWML|gold]];&lt;br /&gt;
|-&lt;br /&gt;
|''H:'' &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|heal_unit]],&lt;br /&gt;
[[InterfaceActionsWML|hide_unit]];&lt;br /&gt;
|-&lt;br /&gt;
|''I:'' &lt;br /&gt;
[[ConditionalActionsWML#.5Bif.5D|if]],&lt;br /&gt;
[[TimeWML|illuminated_time]],&lt;br /&gt;
[[TerrainGraphicsWML|image]],&lt;br /&gt;
[[HelpWML|img]],&lt;br /&gt;
[[ThemeWML|income]],&lt;br /&gt;
[[InternalActionsWML|insert_tag]],&lt;br /&gt;
[[HelpWML|italic]],&lt;br /&gt;
[[InterfaceActionsWML|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|kill]],&lt;br /&gt;
[[StatisticalScenarioWML|killed]];&lt;br /&gt;
|-&lt;br /&gt;
|''L:'' &lt;br /&gt;
[[LabelWML|label]] ([[InterfaceActionsWML|map]], [[ThemeWML|theme]]),&lt;br /&gt;
[[LanguageWML|language]],&lt;br /&gt;
[[AiWML|leader_goal]];&lt;br /&gt;
|-&lt;br /&gt;
|''M:'' &lt;br /&gt;
[[ThemeWML|main_map]],&lt;br /&gt;
[[ThemeWML|menu]],&lt;br /&gt;
[[InterfaceActionsWML|message]],&lt;br /&gt;
[[ThemeWML|mini_map]],&lt;br /&gt;
[[AnimationWML|missile_frame]],&lt;br /&gt;
[[SingleUnitWML|modifications]],&lt;br /&gt;
[[DirectActionsWML|modify_side]],&lt;br /&gt;
[[DirectActionsWML|modify_turns]],&lt;br /&gt;
[[ReplayWML|move]],&lt;br /&gt;
[[InterfaceActionsWML|move_unit_fake]],&lt;br /&gt;
[[UnitWML|movement costs]],&lt;br /&gt;
[[UnitsWML|movetype]],&lt;br /&gt;
[[ScenarioWML|multiplayer]],&lt;br /&gt;
[[EraWML|multiplayer_side]],&lt;br /&gt;
[[InterfaceActionsWML|music]];&lt;br /&gt;
|-&lt;br /&gt;
|''N:'' &lt;br /&gt;
[[AnimationWML|neighbour_unit_filter]],&lt;br /&gt;
[[ConditionalActionsWML#Meta_Condition_Tags|not]],&lt;br /&gt;
[[FilterWML|not]],&lt;br /&gt;
[[ThemeWML|num_units]];&lt;br /&gt;
|-&lt;br /&gt;
|''O:'' &lt;br /&gt;
[[DirectActionsWML|object]],&lt;br /&gt;
[[InterfaceActionsWML|objectives]],&lt;br /&gt;
[[InterfaceActionsWML|objective]],&lt;br /&gt;
[[ThemeWML|observers]],&lt;br /&gt;
[[InterfaceActionsWML|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|place_shroud]], [[ThemeWML|position]],&lt;br /&gt;
[[InterfaceActionsWML|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|action]], &lt;br /&gt;
[[ReplayWML|replay]]), [[StatisticalScenarioWML|recalls]],&lt;br /&gt;
[[ReplayWML|recruit]], [[StatisticalScenarioWML|recruits]], [[InterfaceActionsWML|redraw]],&lt;br /&gt;
[[HelpWML|ref]], [[DirectActionsWML|remove_shroud]], [[InterfaceActionsWML|remove_unit_overlay]],&lt;br /&gt;
[[InterfaceActionsWML|removeitem]], [[InterfaceActionsWML|remove_sound_source]], &lt;br /&gt;
[[ReplaceMapWML|replace_map]] [[SavefileWML|replay]], [[SavefileWML|replay_start]],&lt;br /&gt;
[[UnitWML|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|scroll]], [[InterfaceActionsWML|scroll_to]],&lt;br /&gt;
[[InterfaceActionsWML|scroll_to_unit]], [[AnimationWML|secondary_attack_filter]], [[AnimationWML|secondary_unit_filter]], [[HelpWML|section]],&lt;br /&gt;
[[InterfaceActionsWML#.5Bset_menu_item.5D_.28SVN_trunk_only.29|set_menu_item]], [[DirectActionsWML|set_recruit]],&lt;br /&gt;
[[InternalActionsWML|set_variable]], [[InternalActionsWML|set_variables]], [[InterfaceActionsWML|show_objectives]],&lt;br /&gt;
[[SideWML|side]], [[ThemeWML|side_playing]], [[SavefileWML|snapshot]],&lt;br /&gt;
[[InterfaceActionsWML|sound]], [[InterfaceActionsWML|sound_source]], [[ReplayWML|source]], [[EventWML|special_filter]], [[EventWML|special_filter_second]],&lt;br /&gt;
[[InternalActionsWML|split]],&lt;br /&gt;
[[StatisticalScenarioWML#The_.5Bstatistics.5D_tag|statistics]],&lt;br /&gt;
[[ThemeWML|status]], [[DirectActionsWML|stone]], [[InternalActionsWML|store_gold]], [[InternalActionsWML|store_locations]],&lt;br /&gt;
[[InternalActionsWML|store_map_dimensions]],&lt;br /&gt;
[[InternalActionsWML|store_starting_location]], [[InternalActionsWML|store_side]], [[InternalActionsWML|store_time_of_day]], [[InternalActionsWML|store_unit]], [[InternalActionsWML|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;
[[DirectActionsWML|teleport]], [[UnitWML|teleport_anim]],&lt;br /&gt;
terrain([[TerrainWML|define]], [[DirectActionsWML|create]]), [[TerrainGraphicsWML|terrain_graphics]], [[TerrainMaskWML|terrain_mask]], [[ScenarioWML#Test_scenario|test]],&lt;br /&gt;
[[WesCamp|textdomain]], [[InterfaceActionsWML|text_input]], [[ThemeWML|theme]], [[ConditionalActionsWML#.5Bif.5D|then]],&lt;br /&gt;
[[TerrainGraphicsWML|tile]], [[TimeWML|time]], time_area&amp;amp;nbsp;([[DirectActionsWML|action]], [[ScenarioWML|scenario]]), &lt;br /&gt;
[[ThemeWML|time_of_day]],&lt;br /&gt;
[[HelpWML|topic]], [[HelpWML|toplevel]], [[SingleUnitWML|trait]], [[ThemeWML|turn]], [[ScenarioWML|tutorial]];&lt;br /&gt;
|-&lt;br /&gt;
|''U:'' &lt;br /&gt;
[[InterfaceActionsWML|unhide_unit]], unit&amp;amp;nbsp;([[UnitWML|define]], [[SingleUnitWML|create]]),&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|unit_overlay]], [[ThemeWML|unit_profile]], [[ThemeWML|unit_status]],&lt;br /&gt;
[[ThemeWML|unit_traits]], [[ThemeWML|unit_type]], [[ThemeWML|unit_weapons]], [[ThemeWML|unit_xp]],&lt;br /&gt;
[[UnitsWML|units]], [[DirectActionsWML|unstone]], [[DirectActionsWML|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;
|-&lt;br /&gt;
| ''W:'' &lt;br /&gt;
[[ConditionalActionsWML#.5Bwhile.5D|while]],&lt;br /&gt;
[[InterfaceActionsWML|wml_message]];&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=AnimationWML&amp;diff=29003</id>
		<title>AnimationWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=AnimationWML&amp;diff=29003"/>
		<updated>2009-03-22T11:53:59Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing {{DevFeature}} tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page covers unit animations. At any point in game, units are playing an animation. Even when the unit is standing, it is actually playing a single frame animation.&lt;br /&gt;
&lt;br /&gt;
This page will deal with the two problems of animations&lt;br /&gt;
* How are animations Chosen&lt;br /&gt;
* What exactly is drawn&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How animations are drawn ==&lt;br /&gt;
=== Animations ===&lt;br /&gt;
Any unit has a huge set of animations to choose from. Animations are WML blocks in the unit type, enclosed in either the generic type '''[animation]''' or some more specific tags such as '''[attack_anim]''' '''[idle_anim]''' and the like. An animation is what a unit displays when a given event is triggered, and a certain set of conditions are met such as&lt;br /&gt;
* unit is attacking&lt;br /&gt;
* unit is idling&lt;br /&gt;
* unit is attacking (event) and uses a melee weapon (condition)&lt;br /&gt;
* unit is attacking (event) and uses a melee weapon (condition) and opponent can't retaliate (condition)&lt;br /&gt;
&lt;br /&gt;
events and conditions are described entirely in the [animation] block, and will be discussed in the animation choice section.&lt;br /&gt;
&lt;br /&gt;
=== Frames ===&lt;br /&gt;
    &lt;br /&gt;
An animation is cut in frames. Frames are WML blocks that are contained either in '''[frame]''' WML blocks or in generic '''[xxx_frame]''' block. (the xxx part can be any string not starting with an underscore) the xxx part in the frame name is called the frame prefix. frames of the type '''[frame]''' are said to have an empty prefix&lt;br /&gt;
&lt;br /&gt;
A frame typically describes an image, where an how to render it. It can contain such things as&lt;br /&gt;
* the image to display&lt;br /&gt;
* how transparent should that image be&lt;br /&gt;
* where to draw that image.&lt;br /&gt;
&lt;br /&gt;
At any given time, an animation will display one frame for each frame prefix it can find. I.e if your animation has both '''[frame]''' and '''[missile_frame]''' blocks, both will be displayed at the same time&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The frame with the empty prefix is special in many way. It is assumed to contain the image representing the unit itself, and as such the engine will heavily temper with it in multiple ways, such as providing a default image if none is available, or forcing the image to be green when the unit is poisoned&lt;br /&gt;
&lt;br /&gt;
=== Timing, Clock, Multiple animations ===&lt;br /&gt;
When an animation is played it has an internal clock that is run. The step of this clock is the milisecond, and each frame is played for a given duration. Each animation also has a starting time which tells the animation engine at what value the animation clock should start&lt;br /&gt;
&lt;br /&gt;
This starting time is very important when multiple animations from different units are played synchronously  Typically a fight involves a unit playing its defense animation while the opponent plays it's attack animation (and a third might play its leading animation, too). In that case all animations have a common clock, and are played concurrently.&lt;br /&gt;
&lt;br /&gt;
The convention is that the &amp;quot;important time&amp;quot; (usually the time of the hit) is at time 0. everything before should be at negative time, everything after at positive time. This is a WML convention that is not enforced by the engine&lt;br /&gt;
&lt;br /&gt;
In that case, it is very important that these animations (which can have different lengths) be synchronized. Fight animations are synchronized around the point of impact, so they all reach time 0 when the attack lands (or misses). This is accomplished through the use of the '''start_time''' key of the '''[animation]''' tag.&lt;br /&gt;
&lt;br /&gt;
Just like the '''[frame]''' tag can have a prefix, so can the '''start_time''' key. A '''start_time''' key without prefix will affect a '''[frame]''' tag without prefix, while a '''start_time''' key with a prefix will affect a '''[frame]''' tag with the same prefix.&lt;br /&gt;
&lt;br /&gt;
==== Example Syntax ====&lt;br /&gt;
    [attack_anim]&lt;br /&gt;
        [attack_filter]&lt;br /&gt;
            name= _ &amp;quot;bow&amp;quot;&lt;br /&gt;
        [/attack_filter]&lt;br /&gt;
        '''start_time'''=-350&lt;br /&gt;
        '''missile_start_time'''=-150&lt;br /&gt;
        [missile_frame]&lt;br /&gt;
            duration=150&lt;br /&gt;
            image=&amp;quot;projectiles/missile-n.png&amp;quot;&lt;br /&gt;
            image_diagonal=&amp;quot;projectiles/missile-ne.png&amp;quot;&lt;br /&gt;
        [/missile_frame]&lt;br /&gt;
        [if]&lt;br /&gt;
            hits=yes&lt;br /&gt;
            [frame]&lt;br /&gt;
                duration=350&lt;br /&gt;
                sound=bow.ogg&lt;br /&gt;
            [/frame]&lt;br /&gt;
        [/if]&lt;br /&gt;
        [else]&lt;br /&gt;
            hits=no&lt;br /&gt;
            [frame]&lt;br /&gt;
                duration=350&lt;br /&gt;
                sound=bow-miss.ogg&lt;br /&gt;
            [/frame]&lt;br /&gt;
        [/else]&lt;br /&gt;
    [/attack_anim]&lt;br /&gt;
&lt;br /&gt;
=== The content of a frame ===&lt;br /&gt;
==== Syntax summary ====&lt;br /&gt;
 [frame]&lt;br /&gt;
    duration=&amp;lt;integer&amp;gt;&lt;br /&gt;
    begin=&amp;lt;deprecated,integer&amp;gt;&lt;br /&gt;
    end=&amp;lt;deprecated,integer&amp;gt;&lt;br /&gt;
    image=&amp;lt;string&amp;gt;&lt;br /&gt;
    image_diagonal=&amp;lt;string&amp;gt;&lt;br /&gt;
    image_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
    sound=&amp;lt;string&amp;gt;&lt;br /&gt;
    halo=&amp;lt;progressive string&amp;gt;&lt;br /&gt;
    halo_x=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
    halo_y=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
    halo_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
    alpha=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
    offset=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
    blend_color=&amp;lt; red, green, blue &amp;gt;&lt;br /&gt;
    blend_ratio=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
    text=&amp;lt;string&amp;gt;&lt;br /&gt;
    text_color=&amp;lt; red, green, blue &amp;gt;&lt;br /&gt;
    submerge=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
    x=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
    y=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
    layer=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
 [/frame]&lt;br /&gt;
&lt;br /&gt;
==== Progressive parameters ====&lt;br /&gt;
&lt;br /&gt;
Some parameters above are marked as ''progressive'' This means that you can specify that during the time the frame is displayed, the parameter should smoothly slide from one value to an other.&lt;br /&gt;
&lt;br /&gt;
A typical example would be a unit progressively fading out, becoming transparent&lt;br /&gt;
&lt;br /&gt;
To do that, you could use:&lt;br /&gt;
&lt;br /&gt;
 alpha=1~0&lt;br /&gt;
&lt;br /&gt;
To make a frame, which is 900ms long, slide to transparent for 300ms, stay transparent for another 300ms and finally fade back to normal for 300ms, use:&lt;br /&gt;
&lt;br /&gt;
 alpha=1~0:300,0:300,0~1:300&lt;br /&gt;
&lt;br /&gt;
you could also specify it like that&lt;br /&gt;
&lt;br /&gt;
 alpha=1~0,0,0~1&lt;br /&gt;
&lt;br /&gt;
when a timing is missing, the engine will do its best to fill in in a fair way. &lt;br /&gt;
&lt;br /&gt;
a progressive string has a similar syntax&lt;br /&gt;
&lt;br /&gt;
 halo=halo1.png:300,halo2.png:300,halo2.png:300&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
** '''begin''': (deprecated) will be replaced by '''duration= &amp;lt;end - begin &amp;gt;'''&lt;br /&gt;
** '''end''': (deprecated) see '''begin''' and also [[AnimationWML#Timing.2C_Clock.2C_Multiple_animations|Timing, Clock, Multiple animations]] section for coverage of '''start_time''' which combines with '''duration''' to replace '''begin=''' '''end='''.&lt;br /&gt;
** '''duration''': how long the frame should be displayed. Use instead of '''begin=''' and '''end='''.&lt;br /&gt;
** '''image''': the image to display during the frame.&lt;br /&gt;
** '''image_diagonal''': the image to display when the attack occurs diagonally (directions ne,se,sw,nw).&lt;br /&gt;
** '''image_mod''': a string modifications (see [[ImagePathFunctionWML]] ) that will be applied to all images&lt;br /&gt;
** '''sound''': the sound to play when the frame begins. Can be a comma-separated list of sounds, in which case one of them is chosen randomly every time.&lt;br /&gt;
** '''halo''': the halo to display at the time.&lt;br /&gt;
** '''halo_x''': the position the halo is displayed in pixel relative to the unit's center.&lt;br /&gt;
** '''halo_y''': the position the halo is displayed in pixel relative to the unit's center.&lt;br /&gt;
** '''halo_mod''': a string modifications (see [[ImagePathFunctionWML]] ) that will be applied to all haloes&lt;br /&gt;
** '''alpha''': transparency level to apply to the frame. This is a floating point progressive parameter ranging from 0.0 to 1.0.&lt;br /&gt;
** '''offset''': the position of the image relative to the hex the unit is facing, 0.0 will display the unit in the center of the hex, 1.0 in the center of the faced hex, -1.0 at the center of the hex behind you. This is a progressive parameter.&lt;br /&gt;
** '''blend_color''': a comma separated list of numbers representing a color in RGB (0-255) this color will be mixed to the frame to give it a tint.&lt;br /&gt;
** '''blend_ratio''': this is a progressive parameter ranging from 0 to 1: 0 means no tint, 1 means target color only.&lt;br /&gt;
** '''text''': if specified, floats a label with the given text above the unit (identical to the floating damage and healing numbers).&lt;br /&gt;
** '''text_color''': the color of the above floating label.&lt;br /&gt;
** '''submerge''': the part of the unit that should drawn with 50% opacity (for units in water)&lt;br /&gt;
** '''x''': x offset applied to the frame&lt;br /&gt;
** '''y''': y offset applied to the frame&lt;br /&gt;
** '''layer''': layer used to draw the frame, see discussion bellow&lt;br /&gt;
&lt;br /&gt;
=== Drawing related animation content ===&lt;br /&gt;
==== Syntax summary ====&lt;br /&gt;
 [animation]&lt;br /&gt;
   &amp;lt;animation choice related content&amp;gt;&lt;br /&gt;
   [frame]&lt;br /&gt;
     &amp;lt;frame content&amp;gt;&lt;br /&gt;
   [/frame]&lt;br /&gt;
   [frame]&lt;br /&gt;
     &amp;lt;frame content&amp;gt;&lt;br /&gt;
   [/frame]&lt;br /&gt;
   start_time=&amp;lt;integer&amp;gt;&lt;br /&gt;
   offset=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
   image_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
   blend_with=&amp;lt;r,g,b&amp;gt;&lt;br /&gt;
   blend_ratio=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
   halo=&amp;lt;progressive_string&amp;gt;&lt;br /&gt;
   halo_x=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   halo_y=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   halo_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
   submerge=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
   x=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   y=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   layer=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
   [xxx_frame]&lt;br /&gt;
     &amp;lt;frame content&amp;gt;&lt;br /&gt;
   [/xxx_frame]&lt;br /&gt;
   xxx_start_time=&amp;lt;integer&amp;gt;&lt;br /&gt;
   xxx_image_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
   xxx_offset=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
   xxx_blend_with=&amp;lt;r,g,b&amp;gt;&lt;br /&gt;
   xxx_blend_ratio=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
   xxx_halo=&amp;lt;progressive_string&amp;gt;&lt;br /&gt;
   xxx_halo_x=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   xxx_halo_y=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   xxx_halo_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
   xxx_submerge=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
   xxx_x=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   xxx_y=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   xxx_layer=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 [/animation]&lt;br /&gt;
&lt;br /&gt;
==== Parameter handling ====&lt;br /&gt;
All drawing related parameters in '''[animation]''' can be matched with a corresponding parameter in  a '''[frame]''' block (or a '''[xxx_frame]''' block) The value provided in the animation will be used if no value is provided in the frame. &lt;br /&gt;
&lt;br /&gt;
The point of these two level of parameters is to easily be able to specify a parameter at the animation level and override it for a special case of frame.&lt;br /&gt;
&lt;br /&gt;
== How animations are chosen ==&lt;br /&gt;
Within a unit decription block there are multiple animations. Each animation is meant to be played in a very special set of circumstances. We will discuss here how to tell the animation engine when a given animation should be played. &lt;br /&gt;
&lt;br /&gt;
Let's take an example. Suppose we have a unit which has the skirmisher ability. We have the folowing movement animations :&lt;br /&gt;
* a normal walking animation&lt;br /&gt;
* a swimming animation when the unit is in water&lt;br /&gt;
* a tiptioeing animation when moving next to an ennemy unit&lt;br /&gt;
&lt;br /&gt;
Ok. most of the time it's easy to guess what animation should be. However if you are both in water and next to an ennemy unit, the animation to play is not obvious.&lt;br /&gt;
&lt;br /&gt;
To solve that question, each animation has a number of filtering criterias. The engine follow the following rules to select an animation&lt;br /&gt;
* Start with all animations&lt;br /&gt;
* Drop all animations with a criteria that fails on the current situation&lt;br /&gt;
* Take the animations that have the most maching criterias&lt;br /&gt;
* If there are more than one animation remaining, take an animation randomly&lt;br /&gt;
* If all animations have been droped, the engine will provide a smart default.&lt;br /&gt;
    &lt;br /&gt;
here is a pseudo-code explaination of this algorithm&lt;br /&gt;
&lt;br /&gt;
 foreach animation&lt;br /&gt;
    animation_score = 0&lt;br /&gt;
    foreach filter-criteria&lt;br /&gt;
      if &amp;lt;criteria-fails&amp;gt; &lt;br /&gt;
	  animation_score = -1;&lt;br /&gt;
	  break;&lt;br /&gt;
      elsif &amp;lt;criteria-matches&amp;gt; &lt;br /&gt;
	  animation_score++&lt;br /&gt;
    endfor&lt;br /&gt;
    if animation_score &amp;gt; max_score&lt;br /&gt;
	&amp;lt;empty animation list&amp;gt;&lt;br /&gt;
	max_score = animation_score;&lt;br /&gt;
	push(animation,animation_list);&lt;br /&gt;
    elsif animation_score = max_score&lt;br /&gt;
	push(animation,animation_list);&lt;br /&gt;
 endfor&lt;br /&gt;
 &amp;lt;choose an animation randomly from animation_list&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
Note that all animations don't have all the filters...&lt;br /&gt;
&lt;br /&gt;
so, if we have a unit with&lt;br /&gt;
# an animation for water terrain&lt;br /&gt;
# an animation for SE on grassland&lt;br /&gt;
# an animation with no criteria&lt;br /&gt;
# an animation for N,NE,NW,S,SW,SE&lt;br /&gt;
# an animation for NW&lt;br /&gt;
&lt;br /&gt;
* 3. will never be taken, because 4. will always trump it&lt;br /&gt;
* on water going NW, it can be 1. 4. 5.&lt;br /&gt;
* on water, any direction but NW, it will be 1. or 4.&lt;br /&gt;
* on SE grassland it will be 2.&lt;br /&gt;
* on other grasslands, it will be 4. (4. or 5. if NW)&lt;br /&gt;
&lt;br /&gt;
=== Generic animation filters available for all animations ===&lt;br /&gt;
* '''apply_to''': a list of comma separated keywords describing what event should trigger the animation (movement, attack...) the complete list is given below&lt;br /&gt;
* '''value''': a list of comma separated integer, the meaning depends on the triggering event. the meaning is given with the list of event&lt;br /&gt;
* '''terrain''': a list of comma separated terrain letters, the animation will only be used on these terrains.  See [[FilterWML]].&lt;br /&gt;
* '''[filter]''': this will filter using a standard unit filter on the animated unit. Note that matching all criterias in the filter will only earn you one point for animation selection, but that you can have multiple '''[unit_filter]''' blocks in an animation.&lt;br /&gt;
* '''[filter_second]''': this will filter using a standard unit filter on the unit in the hex faced. Note that matching all criterias in the filter will only earn you one point for animation selection, but that you can have multiple '''[secondary_unit_filter]''' blocks in an animation. Also note that if the faced hex is empty, the whole filter will fail.&lt;br /&gt;
* '''direction''': a list of directions (n,ne,se,s,sw,nw), the animation will only be used when acting or moving in this direction (the attack direction for attack animations, moving direction for movement animations, direction of lead unit for leading animations, and so on).&lt;br /&gt;
* '''frequency''': this integer value allows to easily tweak the matching frequency of animations. The filter will fail n-1 times out of n, randomly. Note that unlike every other filter, matching this filter won't give an extra point.&lt;br /&gt;
* '''[filter_attack]''': a standard attack filter to match on the attacker's attack. See  [[FilterWML]]. &lt;br /&gt;
* '''[filter_second_attack]''': a standard attack filter to match on the defender's attack. See [[FilterWML]]. Also note that if the defender doesn't have any weapon to retaliate with, this filter will always fail. &lt;br /&gt;
* '''hits''': filters attack animations based on whether the attack hits, misses or kills. Accepts a list of the following:&lt;br /&gt;
** '''hit''': the attack hits, defender survives.&lt;br /&gt;
** '''no''' or '''miss''': the attack misses.&lt;br /&gt;
** '''kill''': the attack hits, defender dies.&lt;br /&gt;
** '''yes''': is an alias of '''hit,kill'''.&lt;br /&gt;
* '''swing''': a list of numbers representing the swing numbers this animation should match (numbered from 1).&lt;br /&gt;
&lt;br /&gt;
=== Events trigerring animations and default animations ===&lt;br /&gt;
==== standing ====&lt;br /&gt;
This animation is triggered whenever any other animation is finished, and is played in loop until another animation is triggered&lt;br /&gt;
&lt;br /&gt;
this is the default &amp;quot;standing image&amp;quot; for the unit&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no standing animation is set a single frame animation based on the enclosing unit's '''image=''' field is used&lt;br /&gt;
==== selected ====&lt;br /&gt;
This animation is triggered whenever the unit is selected&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;0.0~0.3:100,0.3~0.0:200&amp;quot; blend_color=255,255,255''&lt;br /&gt;
==== recruited ====&lt;br /&gt;
This animation is triggered whenever the unit is recruited or recalled&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''highlight=0~1:600''&lt;br /&gt;
==== levelin ====&lt;br /&gt;
This animation is triggered whenever the unit levels, before the unit is replaced by the new unit&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;1~0:600&amp;quot; blend_color=255,255,255''&lt;br /&gt;
==== levelout ====&lt;br /&gt;
This animation is triggered whenever the unit levels, after the unit is replaced by the new unit&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;0~1:600&amp;quot; blend_color=255,255,255''&lt;br /&gt;
==== movement ====&lt;br /&gt;
This animation is used whenever a unit moves. There are multiple things to consider when dealing with movement animation&lt;br /&gt;
* unit stay ''exactly'' 150ms in each hex. so you typically want to have an offset of ''0~1:150,0~1:150,0~1:150,0~1:150,0~1:150'' or something similar&lt;br /&gt;
* when a unit enters a hex, the current anim is tested again.&lt;br /&gt;
** if the current animation is still valid (i.e it passes all its filter) it is kept, whatever the final score is&lt;br /&gt;
** if it fails, a new movement anim is searched&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''offset=&amp;quot;0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150&amp;quot;''&lt;br /&gt;
==== pre_teleport ====&lt;br /&gt;
This animation is triggered whenever the unit teleports, but before it has moved to the target hex&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;1~0:150&amp;quot; blend_color=255,255,255''&lt;br /&gt;
==== post_teleport ====&lt;br /&gt;
This animation is triggered whenever the unit teleports, but after it has moved to the target hex&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;0~1:150&amp;quot; blend_color=255,255,255''&lt;br /&gt;
==== healing ====&lt;br /&gt;
This animation is triggered when the unit has healing powers and uses them&lt;br /&gt;
&lt;br /&gt;
''value='' is the number of points healed&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
==== healed ====&lt;br /&gt;
This animation is triggered whenever the unit is healed for any reason&lt;br /&gt;
&lt;br /&gt;
''value='' is the number of points healed&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;0:30,0.5:30,0:30,0.5:30,0:30,0.5:30,0:30,0.5:30,0:30&amp;quot; blend_color=255,255,255''&lt;br /&gt;
and plays the sound ''heal.wav''&lt;br /&gt;
==== poisoned ====&lt;br /&gt;
This animation is triggered whenever the unit suffers poison dammage&lt;br /&gt;
&lt;br /&gt;
''value='' is the number of points lost&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;0:30,0.5:30,0:30,0.5:30,0:30,0.5:30,0:30,0.5:30,0:30&amp;quot; blend_color=0,255,0''&lt;br /&gt;
and plays the sound 'poison.ogg''&lt;br /&gt;
==== defend ====&lt;br /&gt;
This animation is triggered during a strike, of the unit receiving the blow&lt;br /&gt;
&lt;br /&gt;
''value='' is the number of point lost, if any&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
==== attack ====&lt;br /&gt;
This animation is triggered during a strike, of the unit giving the blow&lt;br /&gt;
&lt;br /&gt;
''value='' is the number of damage dealt, if any&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''offset=&amp;quot;0~0.6:150,0.6~0:150&amp;quot;'' for melee attacks&lt;br /&gt;
No default is provided for range attacks&lt;br /&gt;
==== leading ====&lt;br /&gt;
This animation is triggered for units with the leading special ability, when the unit they are leading is attacking&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== resistance ====&lt;br /&gt;
This animation is triggered for units with the resistance special ability affecting neighbouring fights, when the unit they are helping is defending&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
&lt;br /&gt;
==== death ====&lt;br /&gt;
This animation is triggered when a unit die.&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''highlight=1~0:600'' and plays the sound in ''die_sound='' of the enclosing unit&lt;br /&gt;
==== victory ====&lt;br /&gt;
This animation is triggered when a unit finishes a fight by killing the other unit&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
==== idling ====&lt;br /&gt;
This animation is called when the unit has been using its standing animation for a random duration.&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
&lt;br /&gt;
==== default ====&lt;br /&gt;
&lt;br /&gt;
This animation is never triggered, but is used as a base to create new animations&lt;br /&gt;
&lt;br /&gt;
''value='' is used depending of the type of animation it replaces&lt;br /&gt;
&lt;br /&gt;
A single animation made of the base frame is provided by the engine if no default animation is available&lt;br /&gt;
&lt;br /&gt;
==== extra animations ====&lt;br /&gt;
Other values are never called by the engine. However they can be triggered by WML events allowing custom animations.&lt;br /&gt;
&lt;br /&gt;
Note that WML events can also trigger standard animations.&lt;br /&gt;
''value='' is set from the WML event&lt;br /&gt;
&lt;br /&gt;
== Shortcuts, tricks and quirks ==&lt;br /&gt;
&lt;br /&gt;
=== ''[if]'' and ''[else]'' ===&lt;br /&gt;
&lt;br /&gt;
Often, you need to do very slight variations in an animation (like a different sound depending on whether the unit hits or misses its attack), the '''[if]''' and '''[else]''' tags are meant to help you do that. &lt;br /&gt;
    &lt;br /&gt;
Using these in an animation is equivalent to having multiple animations, one with the '''[if]''' block and one with each of the ''[else]'' blocks. Any filtering flags in these blocks will replace the toplevel filters. You can have multiple '''[if]''' blocks in an animation, but you can't nest an '''[if]''' inside another. These should be written directly inside the '''[animation]''' block. The following example would make the '''[frame]''' inside the '''[if]''' be played when the attack misses, and the '''[frame]''' inside the '''[else]''' be played when the attack hits (producing a different sound):&lt;br /&gt;
&lt;br /&gt;
    [if]&lt;br /&gt;
        hits=no&lt;br /&gt;
        [frame]&lt;br /&gt;
            begin=-100&lt;br /&gt;
            end=100&lt;br /&gt;
            image=&amp;quot;units/dwarves/lord-attack.png&amp;quot;&lt;br /&gt;
            sound={SOUND_LIST:MISS}&lt;br /&gt;
        [/frame]&lt;br /&gt;
    [/if]&lt;br /&gt;
    [else]&lt;br /&gt;
        hits=yes&lt;br /&gt;
        [frame]&lt;br /&gt;
            begin=-100&lt;br /&gt;
            end=100&lt;br /&gt;
            image=&amp;quot;units/dwarves/lord-attack.png&amp;quot;&lt;br /&gt;
            sound=axe.ogg&lt;br /&gt;
        [/frame]&lt;br /&gt;
    [/else]&lt;br /&gt;
&lt;br /&gt;
note that this is very close to preprocessing and should be considered as such, especially with regard to scoring and animation selection&lt;br /&gt;
&lt;br /&gt;
=== Simplified animation blocks ===&lt;br /&gt;
To simplify the most common animation cases, you can use different blocks instead of the generic '''[animation]''' block. These are also here for backward compatibility, but are not deprecated and fully supported&lt;br /&gt;
&lt;br /&gt;
some of these use extra tags which are translated in the normal ''value='' tag&lt;br /&gt;
&lt;br /&gt;
some of these define '''[xxx_frame]''' blocks where the frame prefix starts with an underscore. This is not allowed in normal WML (prefix starting with underscore is reserved for the engine internal use). It is here for clarity purpose&lt;br /&gt;
&lt;br /&gt;
* '''[leading_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=leading&lt;br /&gt;
* '''[recruit_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=recruited&lt;br /&gt;
* '''[standing_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=standing,default&lt;br /&gt;
note for 1.4 :''default'' doesn't exist in 1.4, but the semantic is the same.&lt;br /&gt;
&lt;br /&gt;
i.e: the animation will be used to build default animations&lt;br /&gt;
* '''[idle_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=idling&lt;br /&gt;
* '''[levelin_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=levelin&lt;br /&gt;
* '''[levelout_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=levelout&lt;br /&gt;
* '''[healing_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=healing&lt;br /&gt;
 value=&amp;lt;damage= value&amp;gt;&lt;br /&gt;
* '''[healed_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=healed&lt;br /&gt;
 value=&amp;lt;healing= value&amp;gt;&lt;br /&gt;
 [_healed_sound_frame]&lt;br /&gt;
    sound=heal.wav&lt;br /&gt;
 [/_healed_sound_frame]&lt;br /&gt;
* '''[poison_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=poisoned&lt;br /&gt;
 value=&amp;lt;damage= value&amp;gt;&lt;br /&gt;
 [_poison_sound_frame]&lt;br /&gt;
    sound=poison.ogg&lt;br /&gt;
 [/_poison_sound_frame]&lt;br /&gt;
* '''[movement_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=movement&lt;br /&gt;
 offset=&amp;quot;0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150&amp;quot;&lt;br /&gt;
* '''[defend]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=defend&lt;br /&gt;
 value=&amp;lt;damage= value&amp;gt;&lt;br /&gt;
 &amp;lt;WML content&amp;gt;&lt;br /&gt;
 [frame]&lt;br /&gt;
    blend_with=255,0,0&lt;br /&gt;
    blend_ratio=&amp;quot;0.5:50,0.0:50&amp;quot;&lt;br /&gt;
 [/frame]&lt;br /&gt;
&lt;br /&gt;
there are some subtil change compared to what is described above to avoid the red flash when value=0, but it should work as expected as far as WML author are concerned&lt;br /&gt;
 &lt;br /&gt;
* '''[attack_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
if the animation contains a missile frame&lt;br /&gt;
&lt;br /&gt;
 apply_to=attack&lt;br /&gt;
 missile_offset=&amp;quot;0~0.8&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
&lt;br /&gt;
 apply_to=attack&lt;br /&gt;
 offset=&amp;quot;0~0.6,0.6~0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''[death]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=death&lt;br /&gt;
 [_death_sound_frame]&lt;br /&gt;
    sound=&amp;lt;die_sound= of the enclosing [unit] tag&amp;gt;&lt;br /&gt;
 [/_death_sound_frame]&lt;br /&gt;
* '''[victory_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=victory&lt;br /&gt;
* '''[extra_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=&amp;lt;flag= value of the anim&amp;gt;&lt;br /&gt;
* '''[teleport_anim]''' will be cut into two at the clock-time 0&lt;br /&gt;
everything before zero becomes an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=pre_teleport&lt;br /&gt;
everything after zero becomes an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=post_teleport&lt;br /&gt;
&lt;br /&gt;
== Layering ==&lt;br /&gt;
The ''layer'' progressive parameter allows the animation writer to choose in what order the animation should be drawn.&lt;br /&gt;
&lt;br /&gt;
this value must be between 0 and 100&lt;br /&gt;
&lt;br /&gt;
* the back of haloes is drawn with a value of 10&lt;br /&gt;
* when unspecified, a animation is drawn with a value of 40&lt;br /&gt;
* terrain elements that are supposed to go in front of units (castles) are drawn with a value of 50&lt;br /&gt;
* orbs and status bars are drawn on layer 80&lt;br /&gt;
* when unspecified missile frames are drawn on layer 90&lt;br /&gt;
&lt;br /&gt;
by changing these values, it is easy to have the unit display the way you want&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[UnitWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=AnimationWML&amp;diff=29002</id>
		<title>AnimationWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=AnimationWML&amp;diff=29002"/>
		<updated>2009-03-22T11:52:17Z</updated>

		<summary type="html">&lt;p&gt;Nital: /* Generic animation filters available for all animations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page covers unit animations. At any point in game, units are playing an animation. Even when the unit is standing, it is actually playing a single frame animation.&lt;br /&gt;
&lt;br /&gt;
This page will deal with the two problems of animations&lt;br /&gt;
* How are animations Chosen&lt;br /&gt;
* What exactly is drawn&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How animations are drawn ==&lt;br /&gt;
=== Animations ===&lt;br /&gt;
Any unit has a huge set of animations to choose from. Animations are WML blocks in the unit type, enclosed in either the generic type '''[animation]''' or some more specific tags such as '''[attack_anim]''' '''[idle_anim]''' and the like. An animation is what a unit displays when a given event is triggered, and a certain set of conditions are met such as&lt;br /&gt;
* unit is attacking&lt;br /&gt;
* unit is idling&lt;br /&gt;
* unit is attacking (event) and uses a melee weapon (condition)&lt;br /&gt;
* unit is attacking (event) and uses a melee weapon (condition) and opponent can't retaliate (condition)&lt;br /&gt;
&lt;br /&gt;
events and conditions are described entirely in the [animation] block, and will be discussed in the animation choice section.&lt;br /&gt;
&lt;br /&gt;
=== Frames ===&lt;br /&gt;
    &lt;br /&gt;
An animation is cut in frames. Frames are WML blocks that are contained either in '''[frame]''' WML blocks or in generic '''[xxx_frame]''' block. (the xxx part can be any string not starting with an underscore) the xxx part in the frame name is called the frame prefix. frames of the type '''[frame]''' are said to have an empty prefix&lt;br /&gt;
&lt;br /&gt;
A frame typically describes an image, where an how to render it. It can contain such things as&lt;br /&gt;
* the image to display&lt;br /&gt;
* how transparent should that image be&lt;br /&gt;
* where to draw that image.&lt;br /&gt;
&lt;br /&gt;
At any given time, an animation will display one frame for each frame prefix it can find. I.e if your animation has both '''[frame]''' and '''[missile_frame]''' blocks, both will be displayed at the same time&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The frame with the empty prefix is special in many way. It is assumed to contain the image representing the unit itself, and as such the engine will heavily temper with it in multiple ways, such as providing a default image if none is available, or forcing the image to be green when the unit is poisoned&lt;br /&gt;
&lt;br /&gt;
=== Timing, Clock, Multiple animations ===&lt;br /&gt;
When an animation is played it has an internal clock that is run. The step of this clock is the milisecond, and each frame is played for a given duration. Each animation also has a starting time which tells the animation engine at what value the animation clock should start&lt;br /&gt;
&lt;br /&gt;
This starting time is very important when multiple animations from different units are played synchronously  Typically a fight involves a unit playing its defense animation while the opponent plays it's attack animation (and a third might play its leading animation, too). In that case all animations have a common clock, and are played concurrently.&lt;br /&gt;
&lt;br /&gt;
The convention is that the &amp;quot;important time&amp;quot; (usually the time of the hit) is at time 0. everything before should be at negative time, everything after at positive time. This is a WML convention that is not enforced by the engine&lt;br /&gt;
&lt;br /&gt;
In that case, it is very important that these animations (which can have different lengths) be synchronized. Fight animations are synchronized around the point of impact, so they all reach time 0 when the attack lands (or misses). This is accomplished through the use of the '''start_time''' key of the '''[animation]''' tag.&lt;br /&gt;
&lt;br /&gt;
Just like the '''[frame]''' tag can have a prefix, so can the '''start_time''' key. A '''start_time''' key without prefix will affect a '''[frame]''' tag without prefix, while a '''start_time''' key with a prefix will affect a '''[frame]''' tag with the same prefix.&lt;br /&gt;
&lt;br /&gt;
==== Example Syntax ====&lt;br /&gt;
    [attack_anim]&lt;br /&gt;
        [attack_filter]&lt;br /&gt;
            name= _ &amp;quot;bow&amp;quot;&lt;br /&gt;
        [/attack_filter]&lt;br /&gt;
        '''start_time'''=-350&lt;br /&gt;
        '''missile_start_time'''=-150&lt;br /&gt;
        [missile_frame]&lt;br /&gt;
            duration=150&lt;br /&gt;
            image=&amp;quot;projectiles/missile-n.png&amp;quot;&lt;br /&gt;
            image_diagonal=&amp;quot;projectiles/missile-ne.png&amp;quot;&lt;br /&gt;
        [/missile_frame]&lt;br /&gt;
        [if]&lt;br /&gt;
            hits=yes&lt;br /&gt;
            [frame]&lt;br /&gt;
                duration=350&lt;br /&gt;
                sound=bow.ogg&lt;br /&gt;
            [/frame]&lt;br /&gt;
        [/if]&lt;br /&gt;
        [else]&lt;br /&gt;
            hits=no&lt;br /&gt;
            [frame]&lt;br /&gt;
                duration=350&lt;br /&gt;
                sound=bow-miss.ogg&lt;br /&gt;
            [/frame]&lt;br /&gt;
        [/else]&lt;br /&gt;
    [/attack_anim]&lt;br /&gt;
&lt;br /&gt;
=== The content of a frame ===&lt;br /&gt;
==== Syntax summary ====&lt;br /&gt;
 [frame]&lt;br /&gt;
    duration=&amp;lt;integer&amp;gt;&lt;br /&gt;
    begin=&amp;lt;deprecated,integer&amp;gt;&lt;br /&gt;
    end=&amp;lt;deprecated,integer&amp;gt;&lt;br /&gt;
    image=&amp;lt;string&amp;gt;&lt;br /&gt;
    image_diagonal=&amp;lt;string&amp;gt;&lt;br /&gt;
    image_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
    sound=&amp;lt;string&amp;gt;&lt;br /&gt;
    halo=&amp;lt;progressive string&amp;gt;&lt;br /&gt;
    halo_x=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
    halo_y=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
    halo_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
    alpha=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
    offset=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
    blend_color=&amp;lt; red, green, blue &amp;gt;&lt;br /&gt;
    blend_ratio=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
    text=&amp;lt;string&amp;gt;&lt;br /&gt;
    text_color=&amp;lt; red, green, blue &amp;gt;&lt;br /&gt;
    submerge=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
    x=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
    y=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
    layer=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
 [/frame]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
dev denotes a {{DevFeature}}&lt;br /&gt;
&lt;br /&gt;
==== Progressive parameters ====&lt;br /&gt;
&lt;br /&gt;
Some parameters above are marked as ''progressive'' This means that you can specify that during the time the frame is displayed, the parameter should smoothly slide from one value to an other.&lt;br /&gt;
&lt;br /&gt;
A typical example would be a unit progressively fading out, becoming transparent&lt;br /&gt;
&lt;br /&gt;
To do that, you could use:&lt;br /&gt;
&lt;br /&gt;
 alpha=1~0&lt;br /&gt;
&lt;br /&gt;
To make a frame, which is 900ms long, slide to transparent for 300ms, stay transparent for another 300ms and finally fade back to normal for 300ms, use:&lt;br /&gt;
&lt;br /&gt;
 alpha=1~0:300,0:300,0~1:300&lt;br /&gt;
&lt;br /&gt;
you could also specify it like that&lt;br /&gt;
&lt;br /&gt;
 alpha=1~0,0,0~1&lt;br /&gt;
&lt;br /&gt;
when a timing is missing, the engine will do its best to fill in in a fair way. &lt;br /&gt;
&lt;br /&gt;
a progressive string has a similar syntax&lt;br /&gt;
&lt;br /&gt;
 halo=halo1.png:300,halo2.png:300,halo2.png:300&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
** '''begin''': (deprecated) will be replaced by '''duration= &amp;lt;end - begin &amp;gt;'''&lt;br /&gt;
** '''end''': (deprecated) see '''begin''' and also [[AnimationWML#Timing.2C_Clock.2C_Multiple_animations|Timing, Clock, Multiple animations]] section for coverage of '''start_time''' which combines with '''duration''' to replace '''begin=''' '''end='''.&lt;br /&gt;
** '''duration''': how long the frame should be displayed. Use instead of '''begin=''' and '''end='''.&lt;br /&gt;
** '''image''': the image to display during the frame.&lt;br /&gt;
** '''image_diagonal''': the image to display when the attack occurs diagonally (directions ne,se,sw,nw).&lt;br /&gt;
** '''image_mod''': a string modifications (see [[ImagePathFunctionWML]] ) that will be applied to all images&lt;br /&gt;
** '''sound''': the sound to play when the frame begins. Can be a comma-separated list of sounds, in which case one of them is chosen randomly every time.&lt;br /&gt;
** '''halo''': the halo to display at the time.&lt;br /&gt;
** '''halo_x''': the position the halo is displayed in pixel relative to the unit's center.&lt;br /&gt;
** '''halo_y''': the position the halo is displayed in pixel relative to the unit's center.&lt;br /&gt;
** '''halo_mod''': a string modifications (see [[ImagePathFunctionWML]] ) that will be applied to all haloes&lt;br /&gt;
** '''alpha''': transparency level to apply to the frame. This is a floating point progressive parameter ranging from 0.0 to 1.0.&lt;br /&gt;
** '''offset''': the position of the image relative to the hex the unit is facing, 0.0 will display the unit in the center of the hex, 1.0 in the center of the faced hex, -1.0 at the center of the hex behind you. This is a progressive parameter.&lt;br /&gt;
** '''blend_color''': a comma separated list of numbers representing a color in RGB (0-255) this color will be mixed to the frame to give it a tint.&lt;br /&gt;
** '''blend_ratio''': this is a progressive parameter ranging from 0 to 1: 0 means no tint, 1 means target color only.&lt;br /&gt;
** '''text''': if specified, floats a label with the given text above the unit (identical to the floating damage and healing numbers).&lt;br /&gt;
** '''text_color''': the color of the above floating label.&lt;br /&gt;
** '''submerge''': the part of the unit that should drawn with 50% opacity (for units in water)&lt;br /&gt;
** '''x''': x offset applied to the frame&lt;br /&gt;
** '''y''': y offset applied to the frame&lt;br /&gt;
** '''layer''': layer used to draw the frame, see discussion bellow&lt;br /&gt;
&lt;br /&gt;
=== Drawing related animation content ===&lt;br /&gt;
==== Syntax summary ====&lt;br /&gt;
 [animation]&lt;br /&gt;
   &amp;lt;animation choice related content&amp;gt;&lt;br /&gt;
   [frame]&lt;br /&gt;
     &amp;lt;frame content&amp;gt;&lt;br /&gt;
   [/frame]&lt;br /&gt;
   [frame]&lt;br /&gt;
     &amp;lt;frame content&amp;gt;&lt;br /&gt;
   [/frame]&lt;br /&gt;
   start_time=&amp;lt;integer&amp;gt;&lt;br /&gt;
   offset=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
   image_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
   blend_with=&amp;lt;r,g,b&amp;gt;&lt;br /&gt;
   blend_ratio=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
   halo=&amp;lt;progressive_string&amp;gt;&lt;br /&gt;
   halo_x=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   halo_y=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   halo_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
   submerge=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
   x=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   y=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   layer=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
   [xxx_frame]&lt;br /&gt;
     &amp;lt;frame content&amp;gt;&lt;br /&gt;
   [/xxx_frame]&lt;br /&gt;
   xxx_start_time=&amp;lt;integer&amp;gt;&lt;br /&gt;
   xxx_image_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
   xxx_offset=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
   xxx_blend_with=&amp;lt;r,g,b&amp;gt;&lt;br /&gt;
   xxx_blend_ratio=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
   xxx_halo=&amp;lt;progressive_string&amp;gt;&lt;br /&gt;
   xxx_halo_x=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   xxx_halo_y=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   xxx_halo_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
   xxx_submerge=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
   xxx_x=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   xxx_y=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   xxx_layer=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 [/animation]&lt;br /&gt;
&lt;br /&gt;
dev denotes a {{DevFeature}}&lt;br /&gt;
&lt;br /&gt;
==== Parameter handling ====&lt;br /&gt;
All drawing related parameters in '''[animation]''' can be matched with a corresponding parameter in  a '''[frame]''' block (or a '''[xxx_frame]''' block) The value provided in the animation will be used if no value is provided in the frame. &lt;br /&gt;
&lt;br /&gt;
The point of these two level of parameters is to easily be able to specify a parameter at the animation level and override it for a special case of frame.&lt;br /&gt;
&lt;br /&gt;
== How animations are chosen ==&lt;br /&gt;
Within a unit decription block there are multiple animations. Each animation is meant to be played in a very special set of circumstances. We will discuss here how to tell the animation engine when a given animation should be played. &lt;br /&gt;
&lt;br /&gt;
Let's take an example. Suppose we have a unit which has the skirmisher ability. We have the folowing movement animations :&lt;br /&gt;
* a normal walking animation&lt;br /&gt;
* a swimming animation when the unit is in water&lt;br /&gt;
* a tiptioeing animation when moving next to an ennemy unit&lt;br /&gt;
&lt;br /&gt;
Ok. most of the time it's easy to guess what animation should be. However if you are both in water and next to an ennemy unit, the animation to play is not obvious.&lt;br /&gt;
&lt;br /&gt;
To solve that question, each animation has a number of filtering criterias. The engine follow the following rules to select an animation&lt;br /&gt;
* Start with all animations&lt;br /&gt;
* Drop all animations with a criteria that fails on the current situation&lt;br /&gt;
* Take the animations that have the most maching criterias&lt;br /&gt;
* If there are more than one animation remaining, take an animation randomly&lt;br /&gt;
* If all animations have been droped, the engine will provide a smart default.&lt;br /&gt;
    &lt;br /&gt;
here is a pseudo-code explaination of this algorithm&lt;br /&gt;
&lt;br /&gt;
 foreach animation&lt;br /&gt;
    animation_score = 0&lt;br /&gt;
    foreach filter-criteria&lt;br /&gt;
      if &amp;lt;criteria-fails&amp;gt; &lt;br /&gt;
	  animation_score = -1;&lt;br /&gt;
	  break;&lt;br /&gt;
      elsif &amp;lt;criteria-matches&amp;gt; &lt;br /&gt;
	  animation_score++&lt;br /&gt;
    endfor&lt;br /&gt;
    if animation_score &amp;gt; max_score&lt;br /&gt;
	&amp;lt;empty animation list&amp;gt;&lt;br /&gt;
	max_score = animation_score;&lt;br /&gt;
	push(animation,animation_list);&lt;br /&gt;
    elsif animation_score = max_score&lt;br /&gt;
	push(animation,animation_list);&lt;br /&gt;
 endfor&lt;br /&gt;
 &amp;lt;choose an animation randomly from animation_list&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
Note that all animations don't have all the filters...&lt;br /&gt;
&lt;br /&gt;
so, if we have a unit with&lt;br /&gt;
# an animation for water terrain&lt;br /&gt;
# an animation for SE on grassland&lt;br /&gt;
# an animation with no criteria&lt;br /&gt;
# an animation for N,NE,NW,S,SW,SE&lt;br /&gt;
# an animation for NW&lt;br /&gt;
&lt;br /&gt;
* 3. will never be taken, because 4. will always trump it&lt;br /&gt;
* on water going NW, it can be 1. 4. 5.&lt;br /&gt;
* on water, any direction but NW, it will be 1. or 4.&lt;br /&gt;
* on SE grassland it will be 2.&lt;br /&gt;
* on other grasslands, it will be 4. (4. or 5. if NW)&lt;br /&gt;
&lt;br /&gt;
=== Generic animation filters available for all animations ===&lt;br /&gt;
* '''apply_to''': a list of comma separated keywords describing what event should trigger the animation (movement, attack...) the complete list is given below&lt;br /&gt;
* '''value''': a list of comma separated integer, the meaning depends on the triggering event. the meaning is given with the list of event&lt;br /&gt;
* '''terrain''': a list of comma separated terrain letters, the animation will only be used on these terrains.  See [[FilterWML]].&lt;br /&gt;
* '''[filter]''': this will filter using a standard unit filter on the animated unit. Note that matching all criterias in the filter will only earn you one point for animation selection, but that you can have multiple '''[unit_filter]''' blocks in an animation.&lt;br /&gt;
* '''[filter_second]''': this will filter using a standard unit filter on the unit in the hex faced. Note that matching all criterias in the filter will only earn you one point for animation selection, but that you can have multiple '''[secondary_unit_filter]''' blocks in an animation. Also note that if the faced hex is empty, the whole filter will fail.&lt;br /&gt;
* '''direction''': a list of directions (n,ne,se,s,sw,nw), the animation will only be used when acting or moving in this direction (the attack direction for attack animations, moving direction for movement animations, direction of lead unit for leading animations, and so on).&lt;br /&gt;
* '''frequency''': this integer value allows to easily tweak the matching frequency of animations. The filter will fail n-1 times out of n, randomly. Note that unlike every other filter, matching this filter won't give an extra point.&lt;br /&gt;
* '''[filter_attack]''': a standard attack filter to match on the attacker's attack. See  [[FilterWML]]. &lt;br /&gt;
* '''[filter_second_attack]''': a standard attack filter to match on the defender's attack. See [[FilterWML]]. Also note that if the defender doesn't have any weapon to retaliate with, this filter will always fail. &lt;br /&gt;
* '''hits''': filters attack animations based on whether the attack hits, misses or kills. Accepts a list of the following:&lt;br /&gt;
** '''hit''': the attack hits, defender survives.&lt;br /&gt;
** '''no''' or '''miss''': the attack misses.&lt;br /&gt;
** '''kill''': the attack hits, defender dies.&lt;br /&gt;
** '''yes''': is an alias of '''hit,kill'''.&lt;br /&gt;
* '''swing''': a list of numbers representing the swing numbers this animation should match (numbered from 1).&lt;br /&gt;
&lt;br /&gt;
=== Events trigerring animations and default animations ===&lt;br /&gt;
==== standing ====&lt;br /&gt;
This animation is triggered whenever any other animation is finished, and is played in loop until another animation is triggered&lt;br /&gt;
&lt;br /&gt;
this is the default &amp;quot;standing image&amp;quot; for the unit&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no standing animation is set a single frame animation based on the enclosing unit's '''image=''' field is used&lt;br /&gt;
==== selected ====&lt;br /&gt;
This animation is triggered whenever the unit is selected&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;0.0~0.3:100,0.3~0.0:200&amp;quot; blend_color=255,255,255''&lt;br /&gt;
==== recruited ====&lt;br /&gt;
This animation is triggered whenever the unit is recruited or recalled&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''highlight=0~1:600''&lt;br /&gt;
==== levelin ====&lt;br /&gt;
This animation is triggered whenever the unit levels, before the unit is replaced by the new unit&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;1~0:600&amp;quot; blend_color=255,255,255''&lt;br /&gt;
==== levelout ====&lt;br /&gt;
This animation is triggered whenever the unit levels, after the unit is replaced by the new unit&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;0~1:600&amp;quot; blend_color=255,255,255''&lt;br /&gt;
==== movement ====&lt;br /&gt;
This animation is used whenever a unit moves. There are multiple things to consider when dealing with movement animation&lt;br /&gt;
* unit stay ''exactly'' 150ms in each hex. so you typically want to have an offset of ''0~1:150,0~1:150,0~1:150,0~1:150,0~1:150'' or something similar&lt;br /&gt;
* when a unit enters a hex, the current anim is tested again.&lt;br /&gt;
** if the current animation is still valid (i.e it passes all its filter) it is kept, whatever the final score is&lt;br /&gt;
** if it fails, a new movement anim is searched&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''offset=&amp;quot;0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150&amp;quot;''&lt;br /&gt;
==== pre_teleport ====&lt;br /&gt;
This animation is triggered whenever the unit teleports, but before it has moved to the target hex&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;1~0:150&amp;quot; blend_color=255,255,255''&lt;br /&gt;
==== post_teleport ====&lt;br /&gt;
This animation is triggered whenever the unit teleports, but after it has moved to the target hex&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;0~1:150&amp;quot; blend_color=255,255,255''&lt;br /&gt;
==== healing ====&lt;br /&gt;
This animation is triggered when the unit has healing powers and uses them&lt;br /&gt;
&lt;br /&gt;
''value='' is the number of points healed&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
==== healed ====&lt;br /&gt;
This animation is triggered whenever the unit is healed for any reason&lt;br /&gt;
&lt;br /&gt;
''value='' is the number of points healed&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;0:30,0.5:30,0:30,0.5:30,0:30,0.5:30,0:30,0.5:30,0:30&amp;quot; blend_color=255,255,255''&lt;br /&gt;
and plays the sound ''heal.wav''&lt;br /&gt;
==== poisoned ====&lt;br /&gt;
This animation is triggered whenever the unit suffers poison dammage&lt;br /&gt;
&lt;br /&gt;
''value='' is the number of points lost&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;0:30,0.5:30,0:30,0.5:30,0:30,0.5:30,0:30,0.5:30,0:30&amp;quot; blend_color=0,255,0''&lt;br /&gt;
and plays the sound 'poison.ogg''&lt;br /&gt;
==== defend ====&lt;br /&gt;
This animation is triggered during a strike, of the unit receiving the blow&lt;br /&gt;
&lt;br /&gt;
''value='' is the number of point lost, if any&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
==== attack ====&lt;br /&gt;
This animation is triggered during a strike, of the unit giving the blow&lt;br /&gt;
&lt;br /&gt;
''value='' is the number of damage dealt, if any&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''offset=&amp;quot;0~0.6:150,0.6~0:150&amp;quot;'' for melee attacks&lt;br /&gt;
No default is provided for range attacks&lt;br /&gt;
==== leading ====&lt;br /&gt;
This animation is triggered for units with the leading special ability, when the unit they are leading is attacking&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== resistance ====&lt;br /&gt;
This animation is triggered for units with the resistance special ability affecting neighbouring fights, when the unit they are helping is defending&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
&lt;br /&gt;
==== death ====&lt;br /&gt;
This animation is triggered when a unit die.&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''highlight=1~0:600'' and plays the sound in ''die_sound='' of the enclosing unit&lt;br /&gt;
==== victory ====&lt;br /&gt;
This animation is triggered when a unit finishes a fight by killing the other unit&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
==== idling ====&lt;br /&gt;
This animation is called when the unit has been using its standing animation for a random duration.&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
&lt;br /&gt;
==== default ====&lt;br /&gt;
&lt;br /&gt;
This animation is never triggered, but is used as a base to create new animations&lt;br /&gt;
&lt;br /&gt;
''value='' is used depending of the type of animation it replaces&lt;br /&gt;
&lt;br /&gt;
A single animation made of the base frame is provided by the engine if no default animation is available&lt;br /&gt;
&lt;br /&gt;
==== extra animations ====&lt;br /&gt;
Other values are never called by the engine. However they can be triggered by WML events allowing custom animations.&lt;br /&gt;
&lt;br /&gt;
Note that WML events can also trigger standard animations.&lt;br /&gt;
''value='' is set from the WML event&lt;br /&gt;
&lt;br /&gt;
== Shortcuts, tricks and quirks ==&lt;br /&gt;
&lt;br /&gt;
=== ''[if]'' and ''[else]'' ===&lt;br /&gt;
&lt;br /&gt;
Often, you need to do very slight variations in an animation (like a different sound depending on whether the unit hits or misses its attack), the '''[if]''' and '''[else]''' tags are meant to help you do that. &lt;br /&gt;
    &lt;br /&gt;
Using these in an animation is equivalent to having multiple animations, one with the '''[if]''' block and one with each of the ''[else]'' blocks. Any filtering flags in these blocks will replace the toplevel filters. You can have multiple '''[if]''' blocks in an animation, but you can't nest an '''[if]''' inside another. These should be written directly inside the '''[animation]''' block. The following example would make the '''[frame]''' inside the '''[if]''' be played when the attack misses, and the '''[frame]''' inside the '''[else]''' be played when the attack hits (producing a different sound):&lt;br /&gt;
&lt;br /&gt;
    [if]&lt;br /&gt;
        hits=no&lt;br /&gt;
        [frame]&lt;br /&gt;
            begin=-100&lt;br /&gt;
            end=100&lt;br /&gt;
            image=&amp;quot;units/dwarves/lord-attack.png&amp;quot;&lt;br /&gt;
            sound={SOUND_LIST:MISS}&lt;br /&gt;
        [/frame]&lt;br /&gt;
    [/if]&lt;br /&gt;
    [else]&lt;br /&gt;
        hits=yes&lt;br /&gt;
        [frame]&lt;br /&gt;
            begin=-100&lt;br /&gt;
            end=100&lt;br /&gt;
            image=&amp;quot;units/dwarves/lord-attack.png&amp;quot;&lt;br /&gt;
            sound=axe.ogg&lt;br /&gt;
        [/frame]&lt;br /&gt;
    [/else]&lt;br /&gt;
&lt;br /&gt;
note that this is very close to preprocessing and should be considered as such, especially with regard to scoring and animation selection&lt;br /&gt;
&lt;br /&gt;
=== Simplified animation blocks ===&lt;br /&gt;
To simplify the most common animation cases, you can use different blocks instead of the generic '''[animation]''' block. These are also here for backward compatibility, but are not deprecated and fully supported&lt;br /&gt;
&lt;br /&gt;
some of these use extra tags which are translated in the normal ''value='' tag&lt;br /&gt;
&lt;br /&gt;
some of these define '''[xxx_frame]''' blocks where the frame prefix starts with an underscore. This is not allowed in normal WML (prefix starting with underscore is reserved for the engine internal use). It is here for clarity purpose&lt;br /&gt;
&lt;br /&gt;
* '''[leading_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=leading&lt;br /&gt;
* '''[recruit_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=recruited&lt;br /&gt;
* '''[standing_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=standing,default&lt;br /&gt;
note for 1.4 :''default'' doesn't exist in 1.4, but the semantic is the same.&lt;br /&gt;
&lt;br /&gt;
i.e: the animation will be used to build default animations&lt;br /&gt;
* '''[idle_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=idling&lt;br /&gt;
* '''[levelin_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=levelin&lt;br /&gt;
* '''[levelout_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=levelout&lt;br /&gt;
* '''[healing_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=healing&lt;br /&gt;
 value=&amp;lt;damage= value&amp;gt;&lt;br /&gt;
* '''[healed_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=healed&lt;br /&gt;
 value=&amp;lt;healing= value&amp;gt;&lt;br /&gt;
 [_healed_sound_frame]&lt;br /&gt;
    sound=heal.wav&lt;br /&gt;
 [/_healed_sound_frame]&lt;br /&gt;
* '''[poison_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=poisoned&lt;br /&gt;
 value=&amp;lt;damage= value&amp;gt;&lt;br /&gt;
 [_poison_sound_frame]&lt;br /&gt;
    sound=poison.ogg&lt;br /&gt;
 [/_poison_sound_frame]&lt;br /&gt;
* '''[movement_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=movement&lt;br /&gt;
 offset=&amp;quot;0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150&amp;quot;&lt;br /&gt;
* '''[defend]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=defend&lt;br /&gt;
 value=&amp;lt;damage= value&amp;gt;&lt;br /&gt;
 &amp;lt;WML content&amp;gt;&lt;br /&gt;
 [frame]&lt;br /&gt;
    blend_with=255,0,0&lt;br /&gt;
    blend_ratio=&amp;quot;0.5:50,0.0:50&amp;quot;&lt;br /&gt;
 [/frame]&lt;br /&gt;
&lt;br /&gt;
there are some subtil change compared to what is described above to avoid the red flash when value=0, but it should work as expected as far as WML author are concerned&lt;br /&gt;
 &lt;br /&gt;
* '''[attack_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
if the animation contains a missile frame&lt;br /&gt;
&lt;br /&gt;
 apply_to=attack&lt;br /&gt;
 missile_offset=&amp;quot;0~0.8&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
&lt;br /&gt;
 apply_to=attack&lt;br /&gt;
 offset=&amp;quot;0~0.6,0.6~0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''[death]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=death&lt;br /&gt;
 [_death_sound_frame]&lt;br /&gt;
    sound=&amp;lt;die_sound= of the enclosing [unit] tag&amp;gt;&lt;br /&gt;
 [/_death_sound_frame]&lt;br /&gt;
* '''[victory_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=victory&lt;br /&gt;
* '''[extra_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=&amp;lt;flag= value of the anim&amp;gt;&lt;br /&gt;
* '''[teleport_anim]''' will be cut into two at the clock-time 0&lt;br /&gt;
everything before zero becomes an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=pre_teleport&lt;br /&gt;
everything after zero becomes an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=post_teleport&lt;br /&gt;
&lt;br /&gt;
== Layering ==&lt;br /&gt;
The ''layer'' progressive parameter allows the animation writer to choose in what order the animation should be drawn.&lt;br /&gt;
&lt;br /&gt;
this value must be between 0 and 100&lt;br /&gt;
&lt;br /&gt;
* the back of haloes is drawn with a value of 10&lt;br /&gt;
* when unspecified, a animation is drawn with a value of 40&lt;br /&gt;
* terrain elements that are supposed to go in front of units (castles) are drawn with a value of 50&lt;br /&gt;
* orbs and status bars are drawn on layer 80&lt;br /&gt;
* when unspecified missile frames are drawn on layer 90&lt;br /&gt;
&lt;br /&gt;
by changing these values, it is easy to have the unit display the way you want&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[UnitWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Template:WML_Tags&amp;diff=29001</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=29001"/>
		<updated>2009-03-22T11:52:06Z</updated>

		<summary type="html">&lt;p&gt;Nital: adding a new tag from 1.6&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;
[[UnitWML|advancefrom]],&lt;br /&gt;
[[UnitWML|advancement]],&lt;br /&gt;
[[StatisticalScenarioWML|advances]],&lt;br /&gt;
[[AiWML|ai]],&lt;br /&gt;
[[DirectActionsWML|allow_recruit]],&lt;br /&gt;
[[DirectActionsWML|allow_undo]],&lt;br /&gt;
[[ConditionalActionsWML#Meta_Condition_Tags|and]],&lt;br /&gt;
[[InterfaceActionsWML|animate_unit]],&lt;br /&gt;
[[AnimationWML|animation]],&lt;br /&gt;
[[VariablesWML|array]],&lt;br /&gt;
[[UnitWML|attack]],&lt;br /&gt;
[[AnimationWML|attack_filter]], &lt;br /&gt;
[[StatisticalScenarioWML|attacks]],&lt;br /&gt;
[[AiWML|avoid]];&lt;br /&gt;
|-&lt;br /&gt;
|''B:'' &lt;br /&gt;
[[UnitWML|base_unit]], [[CampaignWML#The_.5Bbinary_path.5D_tag|binary_path]], [[HelpWML|bold]], [[EditorWML|brush]];&lt;br /&gt;
|-&lt;br /&gt;
|''C:'' &lt;br /&gt;
[[CampaignWML#The_.5Bcampaign.5D_tag|campaign]],&lt;br /&gt;
[[DirectActionsWML|capture_village]],&lt;br /&gt;
[[ConditionalActionsWML#.5Bswitch.5D|case]],&lt;br /&gt;
[[ReplayWML|choose]],&lt;br /&gt;
[[InternalActionsWML|clear_variable]],&lt;br /&gt;
[[InterfaceActionsWML|colour_adjust]],&lt;br /&gt;
command([[InterfaceActionsWML|action]], [[ReplayWML|replay]]);&lt;br /&gt;
|-&lt;br /&gt;
|''D:'' &lt;br /&gt;
[[AbilitiesWML|damage]],&lt;br /&gt;
[[StatisticalScenarioWML|deaths]],&lt;br /&gt;
[[InterfaceActionsWML|debug_message]],&lt;br /&gt;
[[UnitWML|defend]],&lt;br /&gt;
[[StatisticalScenarioWML|defends]],&lt;br /&gt;
[[UnitWML|defense]],&lt;br /&gt;
[[InterfaceActionsWML|delay]],&lt;br /&gt;
[[ReplayWML|destination]],&lt;br /&gt;
[[DirectActionsWML|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;
[[ConditionalActionsWML#Conditional_Actions|else]],&lt;br /&gt;
[[ReplayWML|end_turn]],&lt;br /&gt;
[[DirectActionsWML|endlevel]],&lt;br /&gt;
end_turn&amp;amp;nbsp;([[DirectActionsWML|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;
[[FilterWML|filter]], [[AnimationWML|filter_attack]],  [[FilterWML|filter_location]], [[FilterWML|filter_second]], [[AnimationWML|filter_second_attack]], [[FilterWML|filter_vision]], [[InternalActionsWML|fire_event]], [[HelpWML|format]], [[AnimationWML|frame]];&lt;br /&gt;
|-&lt;br /&gt;
|''G:'' &lt;br /&gt;
[[GameConfigWML|game_config]],&lt;br /&gt;
[[ScenarioWML|generator]],&lt;br /&gt;
[[DirectActionsWML|gold]],&lt;br /&gt;
[[ThemeWML|gold]];&lt;br /&gt;
|-&lt;br /&gt;
|''H:'' &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|heal_unit]],&lt;br /&gt;
[[InterfaceActionsWML|hide_unit]];&lt;br /&gt;
|-&lt;br /&gt;
|''I:'' &lt;br /&gt;
[[ConditionalActionsWML#.5Bif.5D|if]],&lt;br /&gt;
[[TimeWML|illuminated_time]],&lt;br /&gt;
[[TerrainGraphicsWML|image]],&lt;br /&gt;
[[HelpWML|img]],&lt;br /&gt;
[[ThemeWML|income]],&lt;br /&gt;
[[InternalActionsWML|insert_tag]],&lt;br /&gt;
[[HelpWML|italic]],&lt;br /&gt;
[[InterfaceActionsWML|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|kill]],&lt;br /&gt;
[[StatisticalScenarioWML|killed]];&lt;br /&gt;
|-&lt;br /&gt;
|''L:'' &lt;br /&gt;
[[LabelWML|label]] ([[InterfaceActionsWML|map]], [[ThemeWML|theme]]),&lt;br /&gt;
[[LanguageWML|language]],&lt;br /&gt;
[[AiWML|leader_goal]];&lt;br /&gt;
|-&lt;br /&gt;
|''M:'' &lt;br /&gt;
[[ThemeWML|main_map]],&lt;br /&gt;
[[ThemeWML|menu]],&lt;br /&gt;
[[InterfaceActionsWML|message]],&lt;br /&gt;
[[ThemeWML|mini_map]],&lt;br /&gt;
[[AnimationWML|missile_frame]],&lt;br /&gt;
[[SingleUnitWML|modifications]],&lt;br /&gt;
[[DirectActionsWML|modify_side]],&lt;br /&gt;
[[DirectActionsWML|modify_turns]],&lt;br /&gt;
[[ReplayWML|move]],&lt;br /&gt;
[[InterfaceActionsWML|move_unit_fake]],&lt;br /&gt;
[[UnitWML|movement costs]],&lt;br /&gt;
[[UnitsWML|movetype]],&lt;br /&gt;
[[ScenarioWML|multiplayer]],&lt;br /&gt;
[[EraWML|multiplayer_side]],&lt;br /&gt;
[[InterfaceActionsWML|music]];&lt;br /&gt;
|-&lt;br /&gt;
|''N:'' &lt;br /&gt;
[[AnimationWML|neighbour_unit_filter]],&lt;br /&gt;
[[ConditionalActionsWML#Meta_Condition_Tags|not]],&lt;br /&gt;
[[FilterWML|not]],&lt;br /&gt;
[[ThemeWML|num_units]];&lt;br /&gt;
|-&lt;br /&gt;
|''O:'' &lt;br /&gt;
[[DirectActionsWML|object]],&lt;br /&gt;
[[InterfaceActionsWML|objectives]],&lt;br /&gt;
[[InterfaceActionsWML|objective]],&lt;br /&gt;
[[ThemeWML|observers]],&lt;br /&gt;
[[InterfaceActionsWML|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|place_shroud]], [[ThemeWML|position]],&lt;br /&gt;
[[InterfaceActionsWML|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|action]], &lt;br /&gt;
[[ReplayWML|replay]]), [[StatisticalScenarioWML|recalls]],&lt;br /&gt;
[[ReplayWML|recruit]], [[StatisticalScenarioWML|recruits]], [[InterfaceActionsWML|redraw]],&lt;br /&gt;
[[HelpWML|ref]], [[DirectActionsWML|remove_shroud]], [[InterfaceActionsWML|remove_unit_overlay]],&lt;br /&gt;
[[InterfaceActionsWML|removeitem]], [[InterfaceActionsWML|remove_sound_source]], &lt;br /&gt;
[[ReplaceMapWML|replace_map]] [[SavefileWML|replay]], [[SavefileWML|replay_start]],&lt;br /&gt;
[[UnitWML|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|scroll]], [[InterfaceActionsWML|scroll_to]],&lt;br /&gt;
[[InterfaceActionsWML|scroll_to_unit]], [[AnimationWML|secondary_attack_filter]], [[AnimationWML|secondary_unit_filter]], [[HelpWML|section]],&lt;br /&gt;
[[InterfaceActionsWML#.5Bset_menu_item.5D_.28SVN_trunk_only.29|set_menu_item]], [[DirectActionsWML|set_recruit]],&lt;br /&gt;
[[InternalActionsWML|set_variable]], [[InternalActionsWML|set_variables]], [[InterfaceActionsWML|show_objectives]],&lt;br /&gt;
[[SideWML|side]], [[ThemeWML|side_playing]], [[SavefileWML|snapshot]],&lt;br /&gt;
[[InterfaceActionsWML|sound]], [[InterfaceActionsWML|sound_source]], [[ReplayWML|source]], [[EventWML|special_filter]], [[EventWML|special_filter_second]],&lt;br /&gt;
[[InternalActionsWML|split]],&lt;br /&gt;
[[StatisticalScenarioWML#The_.5Bstatistics.5D_tag|statistics]],&lt;br /&gt;
[[ThemeWML|status]], [[DirectActionsWML|stone]], [[InternalActionsWML|store_gold]], [[InternalActionsWML|store_locations]],&lt;br /&gt;
[[InternalActionsWML|store_map_dimensions]],&lt;br /&gt;
[[InternalActionsWML|store_starting_location]], [[InternalActionsWML|store_side]], [[InternalActionsWML|store_time_of_day]], [[InternalActionsWML|store_unit]], [[InternalActionsWML|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;
[[DirectActionsWML|teleport]], [[UnitWML|teleport_anim]],&lt;br /&gt;
terrain([[TerrainWML|define]], [[DirectActionsWML|create]]), [[TerrainGraphicsWML|terrain_graphics]], [[TerrainMaskWML|terrain_mask]], [[ScenarioWML#Test_scenario|test]],&lt;br /&gt;
[[WesCamp|textdomain]], [[InterfaceActionsWML|text_input]], [[ThemeWML|theme]], [[ConditionalActionsWML#.5Bif.5D|then]],&lt;br /&gt;
[[TerrainGraphicsWML|tile]], [[TimeWML|time]], time_area&amp;amp;nbsp;([[DirectActionsWML|action]], [[ScenarioWML|scenario]]), &lt;br /&gt;
[[ThemeWML|time_of_day]],&lt;br /&gt;
[[HelpWML|topic]], [[HelpWML|toplevel]], [[SingleUnitWML|trait]], [[ThemeWML|turn]], [[ScenarioWML|tutorial]];&lt;br /&gt;
|-&lt;br /&gt;
|''U:'' &lt;br /&gt;
[[InterfaceActionsWML|unhide_unit]], unit&amp;amp;nbsp;([[UnitWML|define]], [[SingleUnitWML|create]]),&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|unit_overlay]], [[ThemeWML|unit_profile]], [[ThemeWML|unit_status]],&lt;br /&gt;
[[ThemeWML|unit_traits]], [[ThemeWML|unit_type]], [[ThemeWML|unit_weapons]], [[ThemeWML|unit_xp]],&lt;br /&gt;
[[UnitsWML|units]], [[DirectActionsWML|unstone]], [[DirectActionsWML|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;
|-&lt;br /&gt;
| ''W:'' &lt;br /&gt;
[[ConditionalActionsWML#.5Bwhile.5D|while]],&lt;br /&gt;
[[FilterWML|wml_filter]],&lt;br /&gt;
[[InterfaceActionsWML|wml_message]];&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=EventWML&amp;diff=28998</id>
		<title>EventWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=EventWML&amp;diff=28998"/>
		<updated>2009-03-22T11:36:55Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing {{DevFeature}} tags&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] and [era] tags which is used to describe a set of 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 definition, the event will occur in all scenarios in which a unit of that type appears in. 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;
=== 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 is '''not''' like a normal 'name' key. ''It is a basic description of when the event will trigger.'' It also has a very large number of predefined values, one of which must be used for the key 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.*&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;
==== Valid 'name' Key Values ====&lt;br /&gt;
&lt;br /&gt;
All valid values are listed here along with a description of when this value will cause the event to be triggered. Any value ''not'' listed here will '''not''' work ''no matter how logical or awesome you think it sounds.''&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;
&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;
&lt;br /&gt;
; new turn&lt;br /&gt;
: Triggers whenever the last player ends their turn. See also [[#first_time_only|first_time_only=no]]. When the last player ends their turn, 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;
; 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.&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;
&lt;br /&gt;
; turn ''X''&lt;br /&gt;
: For ''X'' equals a number greater than 1, this event triggers at the start of turn ''X''. The value of ''X'' cannot be 1 but, if that effect is needed, use '''name=new turn''' and '''first_time_only=yes''' to achieve the equivalent of what '''turn 1''' would do.&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 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]]&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.&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 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;
: Triggers when the primary unit becomes visible to the secondary unit in particular after not being visible to the secondary unit's side (so if the secondary unit's side doesn't have shroud or fog, the event never triggers). This happens both when the primary unit moves into view during its turn, and when the secondary unit moves to a location where it can see the primary unit. (This editor hasn't tested whether the event triggers multiple times if the primary unit moves into view of multiple units at once, or if not, which one gets chosen to be the secondary unit here.) (Note: it appears that when a sighted event is triggered because an enemy unit moves into your field of view, the game engine cannot determine which unit (on your side) sees the unit that moved, and so it fires a ''name=sighted'' event without setting ''$second_unit''. This means that, for example, using ''speaker=second_unit'' inside a message tag may fail.)&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;
; stone&lt;br /&gt;
: Triggers when the primary unit is hit by an attack with the 'stones' ability (See ''stones'', [[AbilitiesWML]]) by the secondary unit (the unit with the 'stones' 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.&lt;br /&gt;
&lt;br /&gt;
; die&lt;br /&gt;
: Triggers when the primary unit is killed by the secondary unit.&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.&lt;br /&gt;
&lt;br /&gt;
; recruit&lt;br /&gt;
: Triggers when the primary unit is recruited. (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 but before it is displayed.&lt;br /&gt;
&lt;br /&gt;
; recall&lt;br /&gt;
: Triggers after a unit is recalled.&lt;br /&gt;
&lt;br /&gt;
; prerecall&lt;br /&gt;
: Triggers when a unit is recalled 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.&lt;br /&gt;
&lt;br /&gt;
; post_advance&lt;br /&gt;
: Triggers just after the primary unit has advanced to another unit.&lt;br /&gt;
&lt;br /&gt;
; select&lt;br /&gt;
: Triggers when the primary unit is selected. ''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;
; Other events with a custom name may be invoked from [fire_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. There are two possible values for this key:&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 every time the criteria are met instead of only the first time.&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 for the primary unit and the secondary unit that are not generally available in a standard unit filter. Can be used in events ''attack'', ''attacker_hits'', ''attacker_misses'', ''defender_hits'', ''defender_misses'' and ''attack_end''.&lt;br /&gt;
:* '''name''': the name of the weapon used.&lt;br /&gt;
:* '''range''': the range of the weapon used. &lt;br /&gt;
&lt;br /&gt;
==== [filter_second_attack] ====&lt;br /&gt;
: Like [filter_attack], but for the secondary unit.&lt;br /&gt;
:* '''name''': the name of the weapon used.&lt;br /&gt;
:* '''range''': the range of the weapon used.&lt;br /&gt;
&lt;br /&gt;
==== [event] ====&lt;br /&gt;
: A special case 'action', the [event] tag may be used to create a [[#Nested Events|nested event]].&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 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;
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;
== 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 the turn 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;
This 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, this example is identical to the first two, in that it will display the turn 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;
== 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>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=InterfaceActionsWML&amp;diff=28997</id>
		<title>InterfaceActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=InterfaceActionsWML&amp;diff=28997"/>
		<updated>2009-03-22T11:35:27Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing {{DevFeature}} tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== Interface actions ==&lt;br /&gt;
&lt;br /&gt;
Interface actions are actions that do not have an 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;
== [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. 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 description 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;
* '''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.&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]''': zero or more '''[option]''' elements may be present. 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_chars''': 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;
* note that '''[option]''' and '''[text_input]''' can only be used in moveto events in MP, otherwise they cause OOS&lt;br /&gt;
&lt;br /&gt;
Text formatting options for '''[message]'''. These can also be used in unit names (user_description), objectives, and such.&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;
This tag renders the ''objectives'' attribute of [scenario] obsolete (see ''objectives'', [[ScenarioWML]]).&lt;br /&gt;
Instead of using ''objectives'', use '''[objectives]''' to set scenario objectives inside a prestart event.&lt;br /&gt;
It can also be used to overwrite the starting objectives mid-scenario.&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.&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;
* '''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;
** '''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;
&lt;br /&gt;
=== Macros ===&lt;br /&gt;
There are a few predefined macros for Objectives that you can use to shorten the code. '''{SET_OBJECTIVES}''', '''{VICTORY_CONDITION}''' and '''{DEFEAT_CONDITION}'''. There are all used together. For more information look [http://www.wesnoth.org/misc/macro-reference.xhtml here]&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;
* '''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 [[InternalActionsWML]]) 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;
&lt;br /&gt;
== Other interface tags ==&lt;br /&gt;
&lt;br /&gt;
The following tags are also action tags:&lt;br /&gt;
* '''[item]''': 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.&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.&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;
* '''[removeitem]''': removes any graphical items on a given hex&lt;br /&gt;
** '''x''', '''y''': the hex to remove items off&lt;br /&gt;
** '''image''' if specified, only removes the given image item&lt;br /&gt;
* '''[print]''': 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]''': 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;
* '''[hide_unit]''': makes the given unit become invisible. Useful in conjunction with '''[move_unit_fake]''': to move a leader unit into position on-screen. Each '''[hide_unit]''' tag only hides one unit.&lt;br /&gt;
** '''x''', '''y''': location of the unit to be hidden. (NOT a standard unit filter! Just x and y.)&lt;br /&gt;
* '''[unhide_unit]''': stops the currently hidden unit from being hidden.&lt;br /&gt;
* '''[scroll]''': 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]''': Scroll to a given hex&lt;br /&gt;
** '''x''', '''y''': the hex to scroll to&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;
* '''[scroll_to_unit]''' 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;
* '''[sound]''': 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]''': 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/shrouded&lt;br /&gt;
** '''x,y''': a [[StandardLocationFilter]] for 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;
* '''[remove_sound_source]''': Removes a previously defined sound source.&lt;br /&gt;
** '''id''': the identification key of the sound source to remove&lt;br /&gt;
* '''[music]''': 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;
* '''[colour_adjust]''': tints the colour of the screen.&lt;br /&gt;
** '''red''', '''green''', '''blue''': values from -255 to 255, the amount to tint by for each colour&lt;br /&gt;
* '''[delay]''': pauses the game&lt;br /&gt;
** '''time''': the time to pause in milliseconds&lt;br /&gt;
* '''[redraw]''': 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;
** '''side''': if used, recalculates fog and shroud for that side. 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;
* '''[unit_overlay]''': sets an image that will be drawn over a particular unit, and follow it around&lt;br /&gt;
** '''x''', '''y''': the location of the unit to overlay on&lt;br /&gt;
** '''image''': the image to place on the unit&lt;br /&gt;
* '''[remove_unit_overlay]''': removes a particular overlayed image from a unit&lt;br /&gt;
** '''x''', '''y''': the location of the unit to remove an overlay from&lt;br /&gt;
** '''image''': the image to remove from the unit&lt;br /&gt;
* '''[animate_unit]''': uses the custom 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 good custom animation in the unit description see the '''[extra_anim]''' description in [[AnimationWML]] Standar anims can be triggered with the following keywors ''leading recruited standing idling levelin levelout healing healed poisoned movement defend attack death victory pre_teleport post_teleport''&lt;br /&gt;
** '''[filter]''': a [[StandardUnitFilter]] 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&lt;br /&gt;
** '''[secondary_attack]''': same for the second attack&lt;br /&gt;
** '''hits''': the hit type to filter unit on&lt;br /&gt;
** '''text''': a text to hover during the animation&lt;br /&gt;
** '''red''': red value for the text color&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''': whether to display the status bars or not.&lt;br /&gt;
** '''[animate]''': a sub block with the same syntax as the '''[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;
* '''[label]''' 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;
** '''visible_in_fog''': whether the label should be visible through fog or not. Default yes.&lt;br /&gt;
* '''[deprecated_message]''' 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]''' 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;
* '''[open_help]''' opens the in-game help.&lt;br /&gt;
** '''topic''': the id of the topic to open&lt;br /&gt;
* '''[show_objectives]''' shows the objectives screen. Has the same effect as if [objectives] were used to replace them with an exact duplicate.&lt;br /&gt;
** '''side''': the side to show the objectives. If not set, all sides are used.&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>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Template:WML_Tags&amp;diff=28995</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=28995"/>
		<updated>2009-03-22T11:30:34Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing {{DevFeature}} tags from AnimationWML&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;
[[UnitWML|advancefrom]],&lt;br /&gt;
[[UnitWML|advancement]],&lt;br /&gt;
[[StatisticalScenarioWML|advances]],&lt;br /&gt;
[[AiWML|ai]],&lt;br /&gt;
[[DirectActionsWML|allow_recruit]],&lt;br /&gt;
[[DirectActionsWML|allow_undo]],&lt;br /&gt;
[[ConditionalActionsWML#Meta_Condition_Tags|and]],&lt;br /&gt;
[[InterfaceActionsWML|animate_unit]],&lt;br /&gt;
[[AnimationWML|animation]],&lt;br /&gt;
[[VariablesWML|array]],&lt;br /&gt;
[[UnitWML|attack]],&lt;br /&gt;
[[AnimationWML|attack_filter]], &lt;br /&gt;
[[StatisticalScenarioWML|attacks]],&lt;br /&gt;
[[AiWML|avoid]];&lt;br /&gt;
|-&lt;br /&gt;
|''B:'' &lt;br /&gt;
[[UnitWML|base_unit]], [[CampaignWML#The_.5Bbinary_path.5D_tag|binary_path]], [[HelpWML|bold]], [[EditorWML|brush]];&lt;br /&gt;
|-&lt;br /&gt;
|''C:'' &lt;br /&gt;
[[CampaignWML#The_.5Bcampaign.5D_tag|campaign]],&lt;br /&gt;
[[DirectActionsWML|capture_village]],&lt;br /&gt;
[[ConditionalActionsWML#.5Bswitch.5D|case]],&lt;br /&gt;
[[ReplayWML|choose]],&lt;br /&gt;
[[InternalActionsWML|clear_variable]],&lt;br /&gt;
[[InterfaceActionsWML|colour_adjust]],&lt;br /&gt;
command([[InterfaceActionsWML|action]], [[ReplayWML|replay]]);&lt;br /&gt;
|-&lt;br /&gt;
|''D:'' &lt;br /&gt;
[[AbilitiesWML|damage]],&lt;br /&gt;
[[StatisticalScenarioWML|deaths]],&lt;br /&gt;
[[InterfaceActionsWML|debug_message]],&lt;br /&gt;
[[UnitWML|defend]],&lt;br /&gt;
[[StatisticalScenarioWML|defends]],&lt;br /&gt;
[[UnitWML|defense]],&lt;br /&gt;
[[InterfaceActionsWML|delay]],&lt;br /&gt;
[[ReplayWML|destination]],&lt;br /&gt;
[[DirectActionsWML|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;
[[ConditionalActionsWML#Conditional_Actions|else]],&lt;br /&gt;
[[ReplayWML|end_turn]],&lt;br /&gt;
[[DirectActionsWML|endlevel]],&lt;br /&gt;
end_turn&amp;amp;nbsp;([[DirectActionsWML|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;
[[FilterWML|filter]], [[FilterWML|filter_location]], [[FilterWML|filter_second]], [[FilterWML|filter_vision]], [[InternalActionsWML|fire_event]], [[HelpWML|format]], [[AnimationWML|frame]];&lt;br /&gt;
|-&lt;br /&gt;
|''G:'' &lt;br /&gt;
[[GameConfigWML|game_config]],&lt;br /&gt;
[[ScenarioWML|generator]],&lt;br /&gt;
[[DirectActionsWML|gold]],&lt;br /&gt;
[[ThemeWML|gold]];&lt;br /&gt;
|-&lt;br /&gt;
|''H:'' &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|heal_unit]],&lt;br /&gt;
[[InterfaceActionsWML|hide_unit]];&lt;br /&gt;
|-&lt;br /&gt;
|''I:'' &lt;br /&gt;
[[ConditionalActionsWML#.5Bif.5D|if]],&lt;br /&gt;
[[TimeWML|illuminated_time]],&lt;br /&gt;
[[TerrainGraphicsWML|image]],&lt;br /&gt;
[[HelpWML|img]],&lt;br /&gt;
[[ThemeWML|income]],&lt;br /&gt;
[[InternalActionsWML|insert_tag]],&lt;br /&gt;
[[HelpWML|italic]],&lt;br /&gt;
[[InterfaceActionsWML|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|kill]],&lt;br /&gt;
[[StatisticalScenarioWML|killed]];&lt;br /&gt;
|-&lt;br /&gt;
|''L:'' &lt;br /&gt;
[[LabelWML|label]] ([[InterfaceActionsWML|map]], [[ThemeWML|theme]]),&lt;br /&gt;
[[LanguageWML|language]],&lt;br /&gt;
[[AiWML|leader_goal]];&lt;br /&gt;
|-&lt;br /&gt;
|''M:'' &lt;br /&gt;
[[ThemeWML|main_map]],&lt;br /&gt;
[[ThemeWML|menu]],&lt;br /&gt;
[[InterfaceActionsWML|message]],&lt;br /&gt;
[[ThemeWML|mini_map]],&lt;br /&gt;
[[AnimationWML|missile_frame]],&lt;br /&gt;
[[SingleUnitWML|modifications]],&lt;br /&gt;
[[DirectActionsWML|modify_side]],&lt;br /&gt;
[[DirectActionsWML|modify_turns]],&lt;br /&gt;
[[ReplayWML|move]],&lt;br /&gt;
[[InterfaceActionsWML|move_unit_fake]],&lt;br /&gt;
[[UnitWML|movement costs]],&lt;br /&gt;
[[UnitsWML|movetype]],&lt;br /&gt;
[[ScenarioWML|multiplayer]],&lt;br /&gt;
[[EraWML|multiplayer_side]],&lt;br /&gt;
[[InterfaceActionsWML|music]];&lt;br /&gt;
|-&lt;br /&gt;
|''N:'' &lt;br /&gt;
[[AnimationWML|neighbour_unit_filter]],&lt;br /&gt;
[[ConditionalActionsWML#Meta_Condition_Tags|not]],&lt;br /&gt;
[[FilterWML|not]],&lt;br /&gt;
[[ThemeWML|num_units]];&lt;br /&gt;
|-&lt;br /&gt;
|''O:'' &lt;br /&gt;
[[DirectActionsWML|object]],&lt;br /&gt;
[[InterfaceActionsWML|objectives]],&lt;br /&gt;
[[InterfaceActionsWML|objective]],&lt;br /&gt;
[[ThemeWML|observers]],&lt;br /&gt;
[[InterfaceActionsWML|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|place_shroud]], [[ThemeWML|position]],&lt;br /&gt;
[[InterfaceActionsWML|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|action]], &lt;br /&gt;
[[ReplayWML|replay]]), [[StatisticalScenarioWML|recalls]],&lt;br /&gt;
[[ReplayWML|recruit]], [[StatisticalScenarioWML|recruits]], [[InterfaceActionsWML|redraw]],&lt;br /&gt;
[[HelpWML|ref]], [[DirectActionsWML|remove_shroud]], [[InterfaceActionsWML|remove_unit_overlay]],&lt;br /&gt;
[[InterfaceActionsWML|removeitem]], [[InterfaceActionsWML|remove_sound_source]], &lt;br /&gt;
[[ReplaceMapWML|replace_map]] [[SavefileWML|replay]], [[SavefileWML|replay_start]],&lt;br /&gt;
[[UnitWML|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|scroll]], [[InterfaceActionsWML|scroll_to]],&lt;br /&gt;
[[InterfaceActionsWML|scroll_to_unit]], [[AnimationWML|secondary_attack_filter]], [[AnimationWML|secondary_unit_filter]], [[HelpWML|section]],&lt;br /&gt;
[[InterfaceActionsWML#.5Bset_menu_item.5D_.28SVN_trunk_only.29|set_menu_item]], [[DirectActionsWML|set_recruit]],&lt;br /&gt;
[[InternalActionsWML|set_variable]], [[InternalActionsWML|set_variables]], [[InterfaceActionsWML|show_objectives]],&lt;br /&gt;
[[SideWML|side]], [[ThemeWML|side_playing]], [[SavefileWML|snapshot]],&lt;br /&gt;
[[InterfaceActionsWML|sound]], [[InterfaceActionsWML|sound_source]], [[ReplayWML|source]], [[EventWML|special_filter]], [[EventWML|special_filter_second]],&lt;br /&gt;
[[InternalActionsWML|split]],&lt;br /&gt;
[[StatisticalScenarioWML#The_.5Bstatistics.5D_tag|statistics]],&lt;br /&gt;
[[ThemeWML|status]], [[DirectActionsWML|stone]], [[InternalActionsWML|store_gold]], [[InternalActionsWML|store_locations]],&lt;br /&gt;
[[InternalActionsWML|store_map_dimensions]],&lt;br /&gt;
[[InternalActionsWML|store_starting_location]], [[InternalActionsWML|store_side]], [[InternalActionsWML|store_time_of_day]], [[InternalActionsWML|store_unit]], [[InternalActionsWML|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;
[[DirectActionsWML|teleport]], [[UnitWML|teleport_anim]],&lt;br /&gt;
terrain([[TerrainWML|define]], [[DirectActionsWML|create]]), [[TerrainGraphicsWML|terrain_graphics]], [[TerrainMaskWML|terrain_mask]], [[ScenarioWML#Test_scenario|test]],&lt;br /&gt;
[[WesCamp|textdomain]], [[InterfaceActionsWML|text_input]], [[ThemeWML|theme]], [[ConditionalActionsWML#.5Bif.5D|then]],&lt;br /&gt;
[[TerrainGraphicsWML|tile]], [[TimeWML|time]], time_area&amp;amp;nbsp;([[DirectActionsWML|action]], [[ScenarioWML|scenario]]), &lt;br /&gt;
[[ThemeWML|time_of_day]],&lt;br /&gt;
[[HelpWML|topic]], [[HelpWML|toplevel]], [[SingleUnitWML|trait]], [[ThemeWML|turn]], [[ScenarioWML|tutorial]];&lt;br /&gt;
|-&lt;br /&gt;
|''U:'' &lt;br /&gt;
[[InterfaceActionsWML|unhide_unit]], unit&amp;amp;nbsp;([[UnitWML|define]], [[SingleUnitWML|create]]),&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|unit_overlay]], [[ThemeWML|unit_profile]], [[ThemeWML|unit_status]],&lt;br /&gt;
[[ThemeWML|unit_traits]], [[ThemeWML|unit_type]], [[ThemeWML|unit_weapons]], [[ThemeWML|unit_xp]],&lt;br /&gt;
[[UnitsWML|units]], [[DirectActionsWML|unstone]], [[DirectActionsWML|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;
|-&lt;br /&gt;
| ''W:'' &lt;br /&gt;
[[ConditionalActionsWML#.5Bwhile.5D|while]],&lt;br /&gt;
[[FilterWML|wml_filter]],&lt;br /&gt;
[[InterfaceActionsWML|wml_message]];&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingUnits&amp;diff=28994</id>
		<title>BuildingUnits</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingUnits&amp;diff=28994"/>
		<updated>2009-03-22T11:25:54Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing {{DevFeature}} tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Making new units is fairly easy.  Unit configuration files are plain text files that you can edit with any editor such as Notepad, TextEdit, gedit, pico, vi, emacs, etc.  You will need to become familiar with [[UnitWML|WML]] in order to make a new unit.  This page contains a more in-depth discussion of Unit WML syntax and will walk you through the creation of a new unit and discuss how you can use it in-game.&lt;br /&gt;
&lt;br /&gt;
== Recommended procedure ==&lt;br /&gt;
The easiest way to make a new unit is to copy and paste an existing unit, then modify it.  Navigate to the game's data/units directory and copy any unit.  When you are editing the unit, pay attention to the property keys.  If you forget to modify each key (for example, the unique id key), problems may arise, varying for minor issues such as lack of features on the unit, to game refusing to load the unit file, or, in the worst case, crashing the game. For complete reference on unit properties see [[UnitWML]].&lt;br /&gt;
&lt;br /&gt;
Most of a unit's properties are self-explanatory to anyone who has played Battle for Wesnoth for very long, and the tags in the WML files are brief but descriptive. It is recommmended that you try editing by yourself before consulting the guide.  Otherwise, you may find the guide confusing.&lt;br /&gt;
&lt;br /&gt;
== Using your new unit ==&lt;br /&gt;
Any unit in the game's ./data/units directory or ''userdata''/data/units will be recognized by the game. If you only want to use it once or twice as a special unit, that's all you need to do. However, just because you made a new unit does NOT mean that it can be recruited. Each scenario and multiplayer era has a specific recruit list. If your unit is not on the list, you can't recruit it. This means you need to modify the ''recruit='' key in the appropriate configuration file. [[BuildingMultiplayer]] describes different ways you do this for multiplayer. To add a unit to a campaign, read about scenarios, sides, and recruit lists in [[BuildingScenarios]].&lt;br /&gt;
&lt;br /&gt;
== Distributing your unit ==&lt;br /&gt;
If you made a single unit, post it on the [http://www.wesnoth.org/forum forum].  If you made a whole group of units, you can make them into a multiplayer faction or you can upload a unit pack.&lt;br /&gt;
&lt;br /&gt;
If you want to make a faction, follow the instructions in the [[BuildingFactions]] article.  You should create a new era and add your units as one of the factions.  You will not be able to add your units to any era that ships with the game.&lt;br /&gt;
&lt;br /&gt;
If you want to make a unit pack, the procedure is easier.  Unit packs are distributed for campaign writers who want to use your units in their campaigns/eras.  They download your unit pack and copy/paste the units and images into their campaign/era.&lt;br /&gt;
* Navigate to the ''userdata''/data/campaigns directory.  Everything from now on will occur relative to here.  The era we'll use as an example will be called MyUnitPack&lt;br /&gt;
* Create a text file called MyUnitPack.cfg.  Add the following lines:&lt;br /&gt;
 #		#define USE_MYUNITS		#&amp;lt;- replace MYUNITS with something descriptive&lt;br /&gt;
 #		#enddef&lt;br /&gt;
 #		#ifdef USE_MYUNITS		#&amp;lt;- replace MYUNITS with something descriptive&lt;br /&gt;
 #		{@campaigns/MyUnitPack/}&lt;br /&gt;
 #		#endif&lt;br /&gt;
:* These lines are commented out (with the #).  That way when the unit pack ships it won't affect the game.  If someone wants the game to be able to see these units, he can uncomment those lines and it will work.  However, this usually causes problems in multiplayer (you will be using units no one else has), but it can be fun for campaigns.&lt;br /&gt;
:* NOTE: the commenting/uncommenting trick will only work if the units branch off of an existing unit.  Custom L1 units will NOT show up in game automatically without editing another configuration file somewhere (scenario config file or multiplayer.cfg)&lt;br /&gt;
* Create another text file called MyUnitPack.pbl. (See [[PblWML]] for more details about *.pbl files.) Add the following lines to it:&lt;br /&gt;
 author=&amp;quot;''your name''&amp;quot;&lt;br /&gt;
 icon=&amp;quot;''any image file in the game's ./images directory''&amp;quot;&lt;br /&gt;
 version=&amp;quot;1.0&amp;quot;&lt;br /&gt;
 title=&amp;quot;My Awesome Unit Pack&amp;quot;&lt;br /&gt;
 description=&amp;quot;New race of lizard men.&amp;quot;&lt;br /&gt;
* Create a folder called MyUnitPack.  Navigate to it.&lt;br /&gt;
* Create two subdirectories: units and images.  Place your unit cfg files and artwork into those subdirectories&lt;br /&gt;
* Create a text file called MyUnitPack.cfg (or another name of your choosing).  Add the following lines:&lt;br /&gt;
 [binary_path]&lt;br /&gt;
 path=data/campaigns/MyUnitPack&lt;br /&gt;
 [/binary_path]&lt;br /&gt;
 [+units]&lt;br /&gt;
 {@campaigns/MyUnitPack/units}&lt;br /&gt;
 [/units]&lt;br /&gt;
* You should be ready to distribute your unit pack on the campaign server now&lt;br /&gt;
* PLEASE change the names to something unique before you publish&lt;br /&gt;
&lt;br /&gt;
== Unit WML discussion ==&lt;br /&gt;
&lt;br /&gt;
As of 1.6, unit definitions are enclosed in '''[unit_type]''' tags. &lt;br /&gt;
&lt;br /&gt;
This section only provides some tips and pointers in making a unit.  Feel free to add pointers of your own.  For the full, current, complete WML reference on what to put in your [unit], see and frequently revisit [[UnitWML|The Unit WML reference page]].&lt;br /&gt;
* The first attribute of a unit is the '''id''' attribute, which is a unique identifier for the unit. As value of the '''type''' attribute for these units, the '''id''' key is used. (See [[BuildingScenarios]]).&lt;br /&gt;
* When referencing the unit in a '''type''' key, the id must be reproduced verbatim, without typos, and in a case-sensitive manner.  If you don't do this, the key won't work.  If you can't recruit in a scenario, it's probably because you have a typo in one of the unit ids and the '''recruit''' key was invalidated.&lt;br /&gt;
* It also has a '''name''' key, which is the (translatable) name of the unit, and is displayed on the Status Table when a unit of this type is selected.  It does not need to be unique (but it helps).&lt;br /&gt;
* Do not set movement to 0.  It creates weird infinite movement behavior.  This might be fixed in the future.  For now, to make an immobile unit, set movement to 1 and use [movement_costs] to make it unable to move onto any terrain.&lt;br /&gt;
&lt;br /&gt;
* See [[BuildingScenariosIntermediate]] for more information on attacks.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Create]]&lt;br /&gt;
* [[EditingWesnoth]]&lt;br /&gt;
* [[Creating Unit Art]]&lt;br /&gt;
* [[CampaignServerWML]]&lt;br /&gt;
* [[PblWML]]&lt;br /&gt;
* [[BuildingCampaignsThePBLFile]]&lt;br /&gt;
* [[Team_Color_Shifting]]&lt;br /&gt;
&lt;br /&gt;
{{Create}}&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=IntroWML&amp;diff=28992</id>
		<title>IntroWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=IntroWML&amp;diff=28992"/>
		<updated>2009-03-22T11:20:34Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing {{DevFeature}} tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== The [story] tag ==&lt;br /&gt;
&lt;br /&gt;
The '''[story]''' tag is a series of images and text to display as the first part of the intro screen.&lt;br /&gt;
&lt;br /&gt;
'''[part]''' is a special tag recognized only beneath '''[story]'''. Each '''[part]''' represents one image and text.&lt;br /&gt;
The part is displayed until the user clicks on the &amp;quot;Next&amp;gt;&amp;gt;&amp;gt;&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
The following key/tags are recognized for '''[part]''':&lt;br /&gt;
* '''background''': the image to display. Story images are usually created specially for this purpose, except for the map.&lt;br /&gt;
* '''scale_background''': Whether to scale the background, default yes.&lt;br /&gt;
* '''story''': (translatable) the text to display below the image.&lt;br /&gt;
* '''show_title''': whether to display the title of the scenario at the top&lt;br /&gt;
* '''music''': change to this music&lt;br /&gt;
* '''[image]''': an image to display.&lt;br /&gt;
** '''x''', '''y''': the location in pixels to draw the image. The x,y pixel location is relative to the image specified in background, but not in a normal way.  The background image is scaled up or down to fill the screen resolution, but images are never scaled in size.  Their coordinates, however, are scaled.  It's basically a big pain in the rear.  Example: I have a background image at 640x480 and an overlay at 640x480.  To horizontally center the overlay on a 1024x768 screen, I want to position it at x=192.  This is because 1024-640 = 384 total extra pixel space, then 384/2 = 192.  This results in equal space on both sides of the overlay.  However, now you have to account for the background scaling.  The background image at 640 is scaled up to 1024, a scaling factor of 1.6.  All image locations are also scaled up, so the overlay is not drawn at x=192, rather it is drawn at x=192*1.6 or x=307!  To compensate for this, divide the desired pixel location by the scaling factor.  In the example, x_compensated=192/1.6 or x_compensated=120.&lt;br /&gt;
** '''centered''': If &amp;quot;yes&amp;quot;, use the center of the image when placing at the x,y coordinates, which is useful since this image is not scaled like the background is (and by centering no need to worry about this).&lt;br /&gt;
** '''file''': the image to display.&lt;br /&gt;
** '''delay''': the time to delay drawing this image.&lt;br /&gt;
&lt;br /&gt;
The '''[deprecated_message]''', '''[image]''', and '''[insert_tag]''' tags are allowed beneath '''[story]'''.  Most other WML tags will not be recognized in this context.&lt;br /&gt;
&lt;br /&gt;
The only other tags currently recognized beneath '''[story]''' are '''[if]'''/'''[then]'''/'''[else]'''.  These can be used to show parts conditionally on the values of variables.  Note, however, that '''[switch]'''/'''[case]''' will not work in this context.&lt;br /&gt;
&lt;br /&gt;
See also the journey and battle macros, in [[UtilWML]]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=PblWML&amp;diff=28991</id>
		<title>PblWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=PblWML&amp;diff=28991"/>
		<updated>2009-03-22T11:20:05Z</updated>

		<summary type="html">&lt;p&gt;Nital: Undo revision 28990 by Nital (Talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== .pbl files ==&lt;br /&gt;
&lt;br /&gt;
=== What is a .pbl file? ===&lt;br /&gt;
To upload a campaign you have made, you need a .pbl file.&lt;br /&gt;
&lt;br /&gt;
This is a file with name '''data/campaigns/''campaign-name''.pbl'''.  [http://exong.net/wesnoth-attach/files/pblexample_111.png Click here for an example of what we're talking about.]&lt;br /&gt;
&lt;br /&gt;
When you upload a campaign, the file '''data/campaigns/''campaign-name''.cfg'''&lt;br /&gt;
and the directory '''data/campaigns/''campaign-name''/''' will be published.&lt;br /&gt;
Your campaign must be based entirely on these files.&lt;br /&gt;
This may cause your campaign not to upload properly,&lt;br /&gt;
for example, if you have custom campaign units in '''data/units/'''.&lt;br /&gt;
Be aware that translations in the .pbl-files are '''not''' working, so don't mark these strings translateable.&lt;br /&gt;
&lt;br /&gt;
=== What goes into a .pbl file? ===&lt;br /&gt;
&lt;br /&gt;
Note that you should not use special formatting or coloring in any fields when uploading to the official server.&lt;br /&gt;
&lt;br /&gt;
The following keys are recognized for .pbl files:&lt;br /&gt;
* '''icon''': an image, displayed leftmost on the &amp;quot;download campaigns&amp;quot; screen. It must be a standard Wesnoth graphic and not a custom one. (Well, a custom graphic will work if the user already has the campaign installed, or if it is a custom graphic from a different campaign that the user has installed.) (Note that the icon used to display your campaign for when it is played can be custom; for more information see [[CampaignWML]].) If the icon is a unit with magenta color, please use [[ImagePathFunctionWML]] to team-color it.&lt;br /&gt;
* '''title''': displayed to the right of the icon, it is just text. It should usually be the same as the name of your campaign when it is played.&lt;br /&gt;
* '''version''': displayed to the right of the title, it is also just text. However the prefered format is x.y.z where x, y and z are numbers and x &amp;gt; 0 implies the campaign is complete and balanced.&lt;br /&gt;
* '''author''': displayed to the right of the version, it is also text. Put your name or nickname here. If several people have contributed significantly to the campaign you should list all of their names and perhaps describe what each person was responsible for.&lt;br /&gt;
* '''passphrase''': not displayed, it prevents others from modifying the version of your campaign on the campaign server. You do not need to input a passphrase when initially publishind a campaign; if you do not, one will be randomly generated for you.&lt;br /&gt;
* '''description''': is not displayed in the client. However it is visible on the web interface to the campaign server. It can be used to give a brief description of your campaign and for pre 1.0 versions let people know how playable it is.&lt;br /&gt;
* '''dependencies''': is an optional list of dependencies. For example&lt;br /&gt;
  dependencies=Imperial_Era,Era_of_Myths &lt;br /&gt;
: could be used when the two specified add-ons need to be installed for a campaign to work.&lt;br /&gt;
* '''translate''': if true the campaign will be send and updated with Wescamp (NOTE: this is a new and experimental function, which will automatically update the translations in your campaign. Make sure you make backups of your campaign in case of problems.)&lt;br /&gt;
* '''type''': indicates the type of the add-on, used for the downloads manager dialog. Possible values are:&lt;br /&gt;
** ''campaign'': single player campaign.&lt;br /&gt;
** ''scenario'': single player scenario.&lt;br /&gt;
** ''era'': multiplayer era.&lt;br /&gt;
** ''faction'': multiplayer stand-alone faction, or add-on for other available era.&lt;br /&gt;
** ''map_pack'': multiplayer map-pack.&lt;br /&gt;
** ''campaign_mp'': multiplayer campaign.&lt;br /&gt;
** ''scenario_mp'': multiplayer scenario.&lt;br /&gt;
** ''media'': miscellaneous resources for UMC authors/users, for example, music packs, packages of general-purpose WML, etc.&lt;br /&gt;
* '''email''': hidden e-mail address used by the server administrators to contact content authors in case of major issues.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 title=&amp;quot;My Campaign&amp;quot;&lt;br /&gt;
 type=&amp;quot;campaign&amp;quot;&lt;br /&gt;
 icon=&amp;quot;misc/ball.png&amp;quot;&lt;br /&gt;
 version=&amp;quot;0.1.2&amp;quot;&lt;br /&gt;
 author=&amp;quot;Me, artwork by myself&amp;quot;&lt;br /&gt;
 passphrase=&amp;quot;This is like a password&amp;quot;&lt;br /&gt;
 description=&amp;quot;You get to kill a lot of bad guys. But only the first map is done.&amp;quot;&lt;br /&gt;
 email=&amp;quot;name@domain.ltd&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The campaign server keeps track of some other information about uploaded campaigns, including when they were uploaded, what languages they have been at least partly translated into, how large they are on the server and the number of times they have been downloaded. For more information about this you can read [[CampaignServerWML]].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
* [[BuildingCampaignsThePBLFile]]&lt;br /&gt;
* [[CampaignServerWML]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=PblWML&amp;diff=28990</id>
		<title>PblWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=PblWML&amp;diff=28990"/>
		<updated>2009-03-22T11:19:34Z</updated>

		<summary type="html">&lt;p&gt;Nital: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== .pbl files ==&lt;br /&gt;
&lt;br /&gt;
=== What is a .pbl file? ===&lt;br /&gt;
To upload a campaign you have made, you need a .pbl file.&lt;br /&gt;
&lt;br /&gt;
This is a file with name '''data/campaigns/''campaign-name''.pbl'''.  [http://exong.net/wesnoth-attach/files/pblexample_111.png Click here for an example of what we're talking about.]&lt;br /&gt;
&lt;br /&gt;
When you upload a campaign, the file '''data/campaigns/''campaign-name''.cfg'''&lt;br /&gt;
and the directory '''data/campaigns/''campaign-name''/''' will be published.&lt;br /&gt;
Your campaign must be based entirely on these files.&lt;br /&gt;
This may cause your campaign not to upload properly,&lt;br /&gt;
for example, if you have custom campaign units in '''data/units/'''.&lt;br /&gt;
Be aware that translations in the .pbl-files are '''not''' working, so don't mark these strings translateable.&lt;br /&gt;
&lt;br /&gt;
=== What goes into a .pbl file? ===&lt;br /&gt;
&lt;br /&gt;
Note that you should not use special formatting or coloring in any fields when uploading to the official server.&lt;br /&gt;
&lt;br /&gt;
The following keys are recognized for .pbl files:&lt;br /&gt;
* '''icon''': an image, displayed leftmost on the &amp;quot;download campaigns&amp;quot; screen. It must be a standard Wesnoth graphic and not a custom one. (Well, a custom graphic will work if the user already has the campaign installed, or if it is a custom graphic from a different campaign that the user has installed.) (Note that the icon used to display your campaign for when it is played can be custom; for more information see [[CampaignWML]].) If the icon is a unit with magenta color, please use [[ImagePathFunctionWML]] to team-color it.&lt;br /&gt;
* '''title''': displayed to the right of the icon, it is just text. It should usually be the same as the name of your campaign when it is played.&lt;br /&gt;
* '''version''': displayed to the right of the title, it is also just text. However the prefered format is x.y.z where x, y and z are numbers and x &amp;gt; 0 implies the campaign is complete and balanced.&lt;br /&gt;
* '''author''': displayed to the right of the version, it is also text. Put your name or nickname here. If several people have contributed significantly to the campaign you should list all of their names and perhaps describe what each person was responsible for.&lt;br /&gt;
* '''passphrase''': not displayed, it prevents others from modifying the version of your campaign on the campaign server. You do not need to input a passphrase when initially publishind a campaign; if you do not, one will be randomly generated for you.&lt;br /&gt;
* '''description''': is not displayed in the client. However it is visible on the web interface to the campaign server. It can be used to give a brief description of your campaign and for pre 1.0 versions let people know how playable it is.&lt;br /&gt;
* '''dependencies''': is an optional list of dependencies. For example&lt;br /&gt;
  dependencies=Imperial_Era,Era_of_Myths &lt;br /&gt;
: could be used when the two specified add-ons need to be installed for a campaign to work.&lt;br /&gt;
* '''translate''': if true the campaign will be send and updated with Wescamp (NOTE: this is a new and experimental function, which will automatically update the translations in your campaign. Make sure you make backups of your campaign in case of problems.)&lt;br /&gt;
* '''type''': indicates the type of the add-on, used for the downloads manager dialog. Possible values are:&lt;br /&gt;
** ''campaign'': single player campaign.&lt;br /&gt;
** ''scenario'': single player scenario.&lt;br /&gt;
** ''era'': multiplayer era.&lt;br /&gt;
** ''faction'': multiplayer stand-alone faction, or add-on for other available era.&lt;br /&gt;
** ''map_pack'': multiplayer map-pack.&lt;br /&gt;
** ''campaign_mp'': multiplayer campaign.&lt;br /&gt;
** ''scenario_mp'': multiplayer scenario.&lt;br /&gt;
** ''media'': miscellaneous resources for UMC authors/users, for example, music packs, packages of general-purpose WML, etc.&lt;br /&gt;
* '''email''': hidden e-mail address used by the server administrators to contact content authors in case of major issues.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 title=&amp;quot;My Campaign&amp;quot;&lt;br /&gt;
 type=&amp;quot;campaign&amp;quot;&lt;br /&gt;
 icon=&amp;quot;misc/ball.png&amp;quot;&lt;br /&gt;
 version=&amp;quot;0.1.2&amp;quot;&lt;br /&gt;
 author=&amp;quot;Me, artwork by myself&amp;quot;&lt;br /&gt;
 passphrase=&amp;quot;This is like a password&amp;quot;&lt;br /&gt;
 description=&amp;quot;You get to kill a lot of bad guys. But only the first map is done.&amp;quot;&lt;br /&gt;
 type=campaign&lt;br /&gt;
 email=&amp;quot;name@domain.ltd&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The campaign server keeps track of some other information about uploaded campaigns, including when they were uploaded, what languages they have been at least partly translated into, how large they are on the server and the number of times they have been downloaded. For more information about this you can read [[CampaignServerWML]].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
* [[BuildingCampaignsThePBLFile]]&lt;br /&gt;
* [[CampaignServerWML]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=PblWML&amp;diff=28989</id>
		<title>PblWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=PblWML&amp;diff=28989"/>
		<updated>2009-03-22T11:18:57Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing {{DevFeature}} tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== .pbl files ==&lt;br /&gt;
&lt;br /&gt;
=== What is a .pbl file? ===&lt;br /&gt;
To upload a campaign you have made, you need a .pbl file.&lt;br /&gt;
&lt;br /&gt;
This is a file with name '''data/campaigns/''campaign-name''.pbl'''.  [http://exong.net/wesnoth-attach/files/pblexample_111.png Click here for an example of what we're talking about.]&lt;br /&gt;
&lt;br /&gt;
When you upload a campaign, the file '''data/campaigns/''campaign-name''.cfg'''&lt;br /&gt;
and the directory '''data/campaigns/''campaign-name''/''' will be published.&lt;br /&gt;
Your campaign must be based entirely on these files.&lt;br /&gt;
This may cause your campaign not to upload properly,&lt;br /&gt;
for example, if you have custom campaign units in '''data/units/'''.&lt;br /&gt;
Be aware that translations in the .pbl-files are '''not''' working, so don't mark these strings translateable.&lt;br /&gt;
&lt;br /&gt;
=== What goes into a .pbl file? ===&lt;br /&gt;
&lt;br /&gt;
Note that you should not use special formatting or coloring in any fields when uploading to the official server.&lt;br /&gt;
&lt;br /&gt;
The following keys are recognized for .pbl files:&lt;br /&gt;
* '''icon''': an image, displayed leftmost on the &amp;quot;download campaigns&amp;quot; screen. It must be a standard Wesnoth graphic and not a custom one. (Well, a custom graphic will work if the user already has the campaign installed, or if it is a custom graphic from a different campaign that the user has installed.) (Note that the icon used to display your campaign for when it is played can be custom; for more information see [[CampaignWML]].) If the icon is a unit with magenta color, please use [[ImagePathFunctionWML]] to team-color it.&lt;br /&gt;
* '''title''': displayed to the right of the icon, it is just text. It should usually be the same as the name of your campaign when it is played.&lt;br /&gt;
* '''version''': displayed to the right of the title, it is also just text. However the prefered format is x.y.z where x, y and z are numbers and x &amp;gt; 0 implies the campaign is complete and balanced.&lt;br /&gt;
* '''author''': displayed to the right of the version, it is also text. Put your name or nickname here. If several people have contributed significantly to the campaign you should list all of their names and perhaps describe what each person was responsible for.&lt;br /&gt;
* '''passphrase''': not displayed, it prevents others from modifying the version of your campaign on the campaign server. You do not need to input a passphrase when initially publishind a campaign; if you do not, one will be randomly generated for you.&lt;br /&gt;
* '''description''': is not displayed in the client. However it is visible on the web interface to the campaign server. It can be used to give a brief description of your campaign and for pre 1.0 versions let people know how playable it is.&lt;br /&gt;
* '''dependencies''': is an optional list of dependencies. For example&lt;br /&gt;
  dependencies=Imperial_Era,Era_of_Myths &lt;br /&gt;
: could be used when the two specified add-ons need to be installed for a campaign to work.&lt;br /&gt;
* '''translate''': if true the campaign will be send and updated with Wescamp (NOTE: this is a new and experimental function, which will automatically update the translations in your campaign. Make sure you make backups of your campaign in case of problems.)&lt;br /&gt;
* '''type''': indicates the type of the add-on, used for the downloads manager dialog. Possible values are:&lt;br /&gt;
** ''campaign'': single player campaign.&lt;br /&gt;
** ''scenario'': single player scenario.&lt;br /&gt;
** ''era'': multiplayer era.&lt;br /&gt;
** ''faction'': multiplayer stand-alone faction, or add-on for other available era.&lt;br /&gt;
** ''map_pack'': multiplayer map-pack.&lt;br /&gt;
** ''campaign_mp'': multiplayer campaign.&lt;br /&gt;
** ''scenario_mp'': multiplayer scenario.&lt;br /&gt;
** ''media'': miscellaneous resources for UMC authors/users, for example, music packs, packages of general-purpose WML, etc.&lt;br /&gt;
* '''email''': hidden e-mail address used by the server administrators to contact content authors in case of major issues.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 title=&amp;quot;My Campaign&amp;quot;&lt;br /&gt;
 type=&amp;quot;campaign&amp;quot;&lt;br /&gt;
 icon=&amp;quot;misc/ball.png&amp;quot;&lt;br /&gt;
 version=&amp;quot;0.1.2&amp;quot;&lt;br /&gt;
 author=&amp;quot;Me, artwork by myself&amp;quot;&lt;br /&gt;
 passphrase=&amp;quot;This is like a password&amp;quot;&lt;br /&gt;
 description=&amp;quot;You get to kill a lot of bad guys. But only the first map is done.&amp;quot;&lt;br /&gt;
 email=&amp;quot;name@domain.ltd&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The campaign server keeps track of some other information about uploaded campaigns, including when they were uploaded, what languages they have been at least partly translated into, how large they are on the server and the number of times they have been downloaded. For more information about this you can read [[CampaignServerWML]].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
* [[BuildingCampaignsThePBLFile]]&lt;br /&gt;
* [[CampaignServerWML]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=ScenarioWML&amp;diff=28988</id>
		<title>ScenarioWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=ScenarioWML&amp;diff=28988"/>
		<updated>2009-03-22T11:17:34Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing {{DevFeature}} tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== the toplevel tags [multiplayer], [test], [tutorial], [scenario] ==&lt;br /&gt;
&lt;br /&gt;
The top level tags '''[multiplayer]''', '''[test]''', '''[tutorial]''' and '''[scenario]''' are all formatted the same way.&lt;br /&gt;
The difference between these tags is the way that the scenarios they describe are accessed.&lt;br /&gt;
&lt;br /&gt;
The keys '''id''' and '''next_scenario''' affect how scenarios can be accessed.&lt;br /&gt;
Whenever a scenario is won, the scenario with id=''next_scenario'' of the same tag type will be played.&lt;br /&gt;
Units from the first scenario will be available for recall in the second.&lt;br /&gt;
&lt;br /&gt;
Some scenarios can be played without playing other scenarios first&lt;br /&gt;
(in this case there is nothing on the recall list).&lt;br /&gt;
These scenarios are called ''initial scenario''s.&lt;br /&gt;
&lt;br /&gt;
A list of initial scenarios, and how to access them:&lt;br /&gt;
&lt;br /&gt;
* All '''[multiplayer]''' scenarios are initial scenarios listed in the multiplayer scenario selector screen (accessed by the &amp;quot;multiplayer&amp;quot; button).&lt;br /&gt;
&lt;br /&gt;
* The '''[test]''' scenario with the attribute '''id=test''' is an initial scenario. This test scenario can be accessed by running the game in test mode. (note: this is NOT the same as debug mode. It can be accessed using -t or --test) You can speed up scenario development a lot by this when used in a clever way: Move a scenario into ~campaigns (so that it will be read even without its campaign being loaded), change it to a [test] scenario, and change the ID to 'test'. Then run Wesnoth in test mode. This saves about a minute for each time you want to test changes to your scenario. However it should not be used for balancing as there will be no recallable units...&lt;br /&gt;
&lt;br /&gt;
* The '''[tutorial]''' scenario with the attribute '''id=tutorial''' is an initial scenario. The tutorial is accessed by clicking on the &amp;quot;tutorial&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
* Any '''[scenario]''' scenario with an id listed in the value of ''first_scenario'' in a campaign tag (see [[CampaignWML]]) is an initial scenario accessed by selecting that campaign after clicking on the &amp;quot;campaign&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
== The [scenario] tag ==&lt;br /&gt;
&lt;br /&gt;
The following keys and tags are recognized in '''[scenario]''' tags:&lt;br /&gt;
&lt;br /&gt;
* '''id''': A unique identifier for this scenario.&lt;br /&gt;
&lt;br /&gt;
* '''next_scenario''': The id of the scenario to load when the current one is won. This can be changed dynamically, to build non-linear campaigns.&lt;br /&gt;
&lt;br /&gt;
* '''description''': (translatable) only for multiplayer maps. Will show up as a tooltip when mousing over the minimap in the multiplayer setup screen.&lt;br /&gt;
&lt;br /&gt;
* '''name''': (translatable) is shown in several places in the level, including the intro screen. It is also the default name for saves on the level.&lt;br /&gt;
&lt;br /&gt;
* '''map_data''': inputs valid Wesnoth map data. See [[BuildingMaps]] for a description of the Wesnoth map syntax.&lt;br /&gt;
&lt;br /&gt;
* '''turns''': sets an event on turn ''turns'' causing the player to lose. Use ''-1'' to have no turn limit. See also [[EventWML]]&lt;br /&gt;
&lt;br /&gt;
* '''turn_at''': the turn to start on (default=1)&lt;br /&gt;
&lt;br /&gt;
* '''random_start_time''': controls random starting time of day. Possible values are yes and no or list of possible start times; starting from 1 to number of times. for example ''random_start_time=2,3,5,6'' (default=no)&lt;br /&gt;
&lt;br /&gt;
* '''music''': the music file relative to ''./music/'' to play during the scenario&lt;br /&gt;
&lt;br /&gt;
* '''[music]''': specifies the music tracks to play during this scenario, see [[MusicListWML]].&lt;br /&gt;
&lt;br /&gt;
* '''defeat_music''': specifies a comma-separated list of music tracks which may be chosen to play on defeat. If not provided, the default in [[GameConfigWML]] is used instead. May be overridden by [[DirectActionsWML|endlevel]] clauses.&lt;br /&gt;
&lt;br /&gt;
* '''victory_music''': specifies a comma-separated list of music tracks which may be chosen to play on victory. If not provided, the default in [[GameConfigWML]] is used instead. May be overridden by [[DirectActionsWML|endlevel]] clauses.&lt;br /&gt;
&lt;br /&gt;
* '''theme''': the UI theme that should be used when playing this scenario. See [[Using_custom_themes_in_campaigns]]&lt;br /&gt;
&lt;br /&gt;
* '''victory_when_enemies_defeated''': when this is set to '''yes''' (default), the player wins once all non-allied units with '''canrecruit=yes''' (aka leaders) are killed. (Currently this only controls the win condition for when all enemies are defeated; it does not prevent the player from losing if he has no leader.) When this value is true the following keys can be used:&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;
&lt;br /&gt;
* '''disallow_recall''': when this is set to 'no'(default), the player is allowed to recall units from previous scenarios.&lt;br /&gt;
&lt;br /&gt;
* '''experience_modifier''': the percentage that required XP to level up (for all units in the scenario) is multiplied by. Default 100. Note that when used in a campaign, weird things (like units being above the required XP to level up) can happen if this value is different for different scenarios.&lt;br /&gt;
&lt;br /&gt;
* '''[story]''': describes the intro screen. See [[IntroWML]]&lt;br /&gt;
&lt;br /&gt;
* '''[label]''': sets a label&lt;br /&gt;
** '''x''', '''y''': location to set label&lt;br /&gt;
** '''text''': the label&lt;br /&gt;
&lt;br /&gt;
* '''[time]''', '''[illuminated_time]''': how a day should progress. See [[TimeWML]]&lt;br /&gt;
&lt;br /&gt;
* '''[time_area]''': how a day should progress in a given area. Everywhere not specified in a [time_area] tag is affected by the [time] and [illuminated_time] tags in the [scenario] tag&lt;br /&gt;
** takes x and y coordinates.&lt;br /&gt;
** '''[time]''', '''[illuminated_time]''': how a day should progress in those locations. See [[TimeWML]]&lt;br /&gt;
** time areas can be used in events, assigned identifiers, and removed at discretion. They also accept complete Standard Location Filters. See [[DirectActionsWML]].&lt;br /&gt;
&lt;br /&gt;
* '''[side]''': describes one player. See [[SideWML]]&lt;br /&gt;
&lt;br /&gt;
* '''[event]''': describes an event that may be triggered at a certain point of the scenario. See [[EventWML]]&lt;br /&gt;
&lt;br /&gt;
* '''map_generation''': another way to generate a map. The map will be generated randomly&lt;br /&gt;
** '''default''': the default random map generator&lt;br /&gt;
&lt;br /&gt;
* '''[generator]''' if this is present, the map and scenario will be generated randomly. See [[MapGeneratorWML]]&lt;br /&gt;
&lt;br /&gt;
the following key is additionally recognized in '''[multiplayer]''' scenarios:&lt;br /&gt;
* '''allow_new_game''': (default=yes) allow/prevent the scenario to be listed in the game creation interface. This is intended for extra scenarios in multiplayer campaigns&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SideWML&amp;diff=28987</id>
		<title>SideWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SideWML&amp;diff=28987"/>
		<updated>2009-03-22T11:16:27Z</updated>

		<summary type="html">&lt;p&gt;Nital: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== the [side] tag ==&lt;br /&gt;
&lt;br /&gt;
The [side] tag is used to describe a side in a particular scenario.&lt;br /&gt;
&lt;br /&gt;
The following keys are recognized:&lt;br /&gt;
&lt;br /&gt;
* '''side''': a digit. The leader of this side is placed on the tile represented by this digit (see [[BuildingMaps]]). When defining sides, they must be defined in order since the side number is checked against the number of sides seen so far.&lt;br /&gt;
&lt;br /&gt;
* '''controller''': how moves for this side should be inputted.&lt;br /&gt;
** '''ai''': the Wesnoth AI makes this side's moves. This is the default setting.&lt;br /&gt;
** '''human''': a player controls this side's moves.&lt;br /&gt;
** '''null''': the side doesn't get a turn to move and doesn't have a leader generated from the contents of the [side] tag. (It still can get units from [unit] tags in the [side] tag.)&lt;br /&gt;
&lt;br /&gt;
* '''no_leader''': if &amp;quot;no&amp;quot; (default), then keys describing a unit which will begin on the side's keep will be the remainder of the '''[side]''' tag, See [[SingleUnitWML]]. Note that if the keys '''x''', '''y''' are included, the leader will begin there regardless of keep location. If this side has a recall list from a previous level, then the recall list will be searched for a leader (using '''canrecruit=yes''') and if one is found it will be used instead of the one described in the '''[side]''' tag. Typical keys used for defining the leader unit are '''type''' (mandatory), '''id''', '''name''' and '''unrenamable=yes''', see [[UnitWML]].&lt;br /&gt;
&lt;br /&gt;
* '''recruit''': a list of unit types. At the beginning of the scenario, the side gains recruitment of these units.&lt;br /&gt;
&lt;br /&gt;
* '''gold''': the starting gold for this side. Default 100. (If gold is carried over from a previous scenario, this value is the minimum starting gold.)&lt;br /&gt;
&lt;br /&gt;
* '''income''': the base income for this side, default 0. This is added to ''base_income'', '''[game_config]''' to determine the side's base income. (see [[GameConfigWML]]).&lt;br /&gt;
&lt;br /&gt;
* '''hidden''': if 'yes', side is not shown in status table.&lt;br /&gt;
&lt;br /&gt;
* '''fog''': if 'yes', this side cannot see any tiles it is not within vision of, except at the start. Please note that the AI currently ignores the fog.&lt;br /&gt;
&lt;br /&gt;
* '''shroud''': if 'yes', this side cannot see any tiles it has not moved within sight of. Please note that the AI currently ignores the shroud.&lt;br /&gt;
&lt;br /&gt;
* '''shroud_data''': describes the area which this team has de-shrouded. An example:&lt;br /&gt;
 |&lt;br /&gt;
 |00011111000&lt;br /&gt;
This would leave the first column on the map unaltered and would change the second column for 11 tiles. A '0' means: shrouded, '1' means unshrouded. You can either call an external file using {@filename}  (see [[PreprocessorRef]]) or place the data in quotes. For making an external file see [[BuildingScenariosShroudData]].&lt;br /&gt;
&lt;br /&gt;
* '''persistent''': whether the side exists in any other scenarios. If '1'(yes), then ''save_id''(see below) becomes active for this side. Default '0'(no); when '''controller=human''', this is always '1'.&lt;br /&gt;
&lt;br /&gt;
* '''save_id''': default ''description'' if available, 'Unknown' otherwise. The ID of the side with respect to the previous and next scenarios. Used to carry over the side's recall list (including the side's leader), recruitment list, and starting gold from scenario to scenario. Also used for the side's displayed name in the victory gold-calculation dialog.  See [[SideSwitchingWML]].&lt;br /&gt;
&lt;br /&gt;
* '''team_name''': a non translatable string representing the team's description. Sides with the same team_name are allied. Default ''side''.&lt;br /&gt;
&lt;br /&gt;
* '''user_team_name''': a translatable string representing the team's description. This has no effect on alliances. Default ''team_name''.&lt;br /&gt;
&lt;br /&gt;
* '''colour''': May be either a numeric color index or a color name (e.g. 'blue', 'purple', 'orange', etc.).  The numeric form is deprecated. The default list of numbers and corresponding colours can be found in data/core/team_colors.cfg.&lt;br /&gt;
&lt;br /&gt;
* '''flag''': a custom flag animation to use instead of the default one to mark captured villages. An automatic side-coloring is applied.&lt;br /&gt;
** Example animation that has three frames and loops every 750ms: ''flag=misc/myflag-1.png:250,misc/myflag-2.png:250,misc/myflag-3.png:250''&lt;br /&gt;
&lt;br /&gt;
* '''flag_icon''': a custom flag icon to indicate the side playing in the statusbar (a size of 24x16 is recommended). An automatic side-coloring is applied.&lt;br /&gt;
&lt;br /&gt;
* '''village_gold''': the amount of gold given to this side per village it controls per turn. Default specified in ''village_income'', '''[game_config]''' ([[GameConfigWML]]). '''Note:''' If you need village gold to be 0. Set the variable to -1.&lt;br /&gt;
&lt;br /&gt;
* '''share_maps''': whether sides allied with this side see all terrains that this side sees, if they are on shroud.&lt;br /&gt;
&lt;br /&gt;
* '''share_view''': whether sides allied with this side see the units that this side sees, if they are on FoW (fog).&lt;br /&gt;
&lt;br /&gt;
* '''disallow_observers''': prevents observers from seeing this side turn. (default: no)&lt;br /&gt;
&lt;br /&gt;
* '''[ai]''' if '''controller=ai''', gives parameters to the AI. See [[AiWML]].&lt;br /&gt;
&lt;br /&gt;
* '''[village]''' describes a village the side begins in control of.&lt;br /&gt;
** ''x'', ''y'' the location of the village. If the pair of coordinates is not a village or is duplicated in another [village] tag, behaviour is undefined. Recent game engine or wmllint should warn about these.&lt;br /&gt;
&lt;br /&gt;
* '''[unit]''' describes a unit which begins on the side. See [[SingleUnitWML]]. If the side has a recall list and the unit is not given a location, it will start on the recall list. Note that the ''side'' attribute under '''[unit]''' will be ignored, as the side will come from the ''side'' attribute of '''[side]'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following keys are multiplayer only:&lt;br /&gt;
&lt;br /&gt;
* '''allow_player''': if false then this side will not be allowed to be modified and will be hidden during game creation.&lt;br /&gt;
&lt;br /&gt;
* '''team_lock''': if true then this side's team is not allowed to be modified.&lt;br /&gt;
&lt;br /&gt;
* '''colour_lock''': if true then this side's color is not allowed to be modified.&lt;br /&gt;
&lt;br /&gt;
* '''gold_lock''': if true then this side's gold is not allowed to be modified. &lt;br /&gt;
&lt;br /&gt;
* '''income_lock''': if true then this side's income is not allowed to be modified.&lt;br /&gt;
&lt;br /&gt;
* '''faction''': this lock this side to this faction.&lt;br /&gt;
&lt;br /&gt;
* '''faction_from_recruit''': if true then this side will be locked to the faction that matches the recruits better. &lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[EraWML]]&lt;br /&gt;
* [[ScenarioWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SingleUnitWML&amp;diff=28986</id>
		<title>SingleUnitWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SingleUnitWML&amp;diff=28986"/>
		<updated>2009-03-22T11:15:04Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing {{DevFeature}} tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== How to describe a single unit ==&lt;br /&gt;
&lt;br /&gt;
This tag, '''[unit]''', describes a single unit on the map, for example Konrad.&lt;br /&gt;
It is different from the [unit] in [units], which describes a class of units.&lt;br /&gt;
&lt;br /&gt;
The following keys are recognized:&lt;br /&gt;
* '''type''': the ID of the unit's unit type. See [[UnitWML]].&lt;br /&gt;
&lt;br /&gt;
* '''side''': the side that the unit is on.&lt;br /&gt;
&lt;br /&gt;
* '''gender''': can be set to male or female to designate the gender of the unit. Default is male, but if the unit has only a female variant it will be female.&lt;br /&gt;
&lt;br /&gt;
* '''x''', '''y''': the location of the unit. If a location isn't provided and the side the unit will belong to has a recall list, the unit will be created on the recall list.&lt;br /&gt;
&lt;br /&gt;
* '''id''': a unique identifier for the unit. This is not displayed to the player, but is to be used only for identifying and filtering for units. If not specified or when a unit is normally recruited, a random one will be generated for the unit to ensure that each unit has a unique ''id'' attribute.  In older versions, the '''description''' attribute specified a unique ID.&lt;br /&gt;
&lt;br /&gt;
* '''name''': the user-visible name of the unit. Note that the player may use the &amp;quot;rename unit&amp;quot; action to change this.&lt;br /&gt;
&lt;br /&gt;
* '''generate_name''': if set to &amp;quot;yes&amp;quot;, will generate a new name (user-level description only, not internal unique ID) for the unit, as if the unit were a freshly-recruited one&lt;br /&gt;
&lt;br /&gt;
* '''unrenamable''': if 'yes', the user-visible name of the unit cannot be changed by the player (which is only possible when the unit is on the player's side anyway).&lt;br /&gt;
&lt;br /&gt;
* '''traits_description''': the description of the unit's traits which is displayed. However if it is not specified explicitly, the unit's actual traits' names will be used instead, so it is normally not necessary to set this.&lt;br /&gt;
&lt;br /&gt;
* '''random_traits''': &amp;quot;no&amp;quot; will prevent random trait generation for units. You should only need to set this for placed nonleaders in multiplayer games or if you want to give a unit less traits than it would normally get for its unit type. When generating traits for a unit, first traits the unit has already been given are excluded. Then &amp;quot;musthave&amp;quot; traits (undead, mechanical) for the unit type are given. Then for leaders ('''canrecruit=yes''') traits that are not available to &amp;quot;any&amp;quot; (currently that's all of them to avoid a multiplayer OOS issue, but later will be restricted based on multiplayer play balance issues) are removed from consideration. Then traits are added randomly until the maximum allowed for the unit type is reached or there are no more available traits. Random traits can now be used in MP games but only when spawned in an event, so not for leaders and other units in the [side] definition.&lt;br /&gt;
&lt;br /&gt;
* '''random_gender''': &amp;quot;yes&amp;quot; will cause the gender of the unit with male and female variations to be male 50% of the time, female 50% of the time.  If the unit has only one gender variant it will always be given the correct one.&lt;br /&gt;
&lt;br /&gt;
* '''canrecruit''': a special key for leaders.&lt;br /&gt;
** '''no''': default. Unit cannot recruit.&lt;br /&gt;
** '''yes''': unit can recruit.&lt;br /&gt;
: Normally when a team controls no units with '''canrecruit=yes''', that team loses. However, even if your team has lost you continue to play with whatever units you still have until the scenario is over. Usually scenarios end when only one team is left with a leader that can recruit, but special victory conditions can be set up in campaigns. Normally you want to set the leader of a side with '''canrecruit=yes'''. If you don't want the leader to recruit, it is usually better to just not give him any unit types to recruit, than to make a special victory condition. Units with '''canrecruit=yes''' are exempt from upkeep costs. So that leaders do not need to be given the ''loyal'' trait.&lt;br /&gt;
&lt;br /&gt;
* '''variation''': the variation of itself the unit should be created as.&lt;br /&gt;
&lt;br /&gt;
* '''upkeep''': the amount of upkeep the unit costs.&lt;br /&gt;
** '''loyal''' no upkeep cost. Can be changed by the effect 'loyal' (see [[EffectWML]])&lt;br /&gt;
** '''full''': unit costs ''level'' upkeep (see [[UnitWML]]).&lt;br /&gt;
** An integer can be used to set the upkeep cost to that number.&lt;br /&gt;
** The default is &amp;quot;full&amp;quot;.&lt;br /&gt;
** Leaders (units with '''canrecruit=yes''') never pay upkeep no matter what upkeep is set to.&lt;br /&gt;
** Normally you don't want to muck with this value. If you want to give a side units without upkeep costs, give those units the 'loyal' trait.&lt;br /&gt;
&lt;br /&gt;
* '''overlays''': a list of images that are overlayed on the unit.&lt;br /&gt;
&lt;br /&gt;
* '''goto_x''':, '''goto_y''': UI settings that control courses. Default is 0,0 i.e. the unit is not on a course.&lt;br /&gt;
&lt;br /&gt;
* '''hitpoints''': the HP of the unit. Default is the max HP for ''type''.&lt;br /&gt;
&lt;br /&gt;
* '''experience''': the XP of the unit. Default is 0.&lt;br /&gt;
&lt;br /&gt;
* '''moves''': number of movement points the unit has left. Default is the movement for its unit type.&lt;br /&gt;
&lt;br /&gt;
* '''resting''': whether the unit has not moved yet this turn. Used to decide whether to give a unit rest healing.&lt;br /&gt;
&lt;br /&gt;
* '''role''': used in standard unit filter ([[FilterWML]]). Can be set using [role] (see [[InternalActionsWML]]).&lt;br /&gt;
&lt;br /&gt;
* '''ai_special''': causes the unit to act differently.&lt;br /&gt;
** &amp;quot;guardian&amp;quot; the unit will not move, except to attack something in the turn it moves (so, it only can move if an enemy unit gets within range of it).&lt;br /&gt;
&lt;br /&gt;
* '''facing''': which way the unit is facing (this only affects how the unit is displayed).&lt;br /&gt;
** Possible values are '''se''', '''s''', '''sw''', '''nw''', '''n''', '''ne'''. Using '''sw''' is preferred for a &amp;quot;reversed&amp;quot; facing (looking to the left) and '''se''' for a normal (looking to the right) facing.&lt;br /&gt;
&lt;br /&gt;
* '''profile''': sets a default portrait image for this unit. If the unit type already has a portrait set, this is used instead for this unit. When the unit advances, if the value of profile is different from the unit-type portrait, that value is preserved. If the profile field is empty or the same as the unit-type portrait, the level-advance changes the unit portrait to the default for the new level and type.&lt;br /&gt;
&lt;br /&gt;
** &amp;quot;unit_image&amp;quot; if given instead of a filename, uses the unit's base image as the portrait (in the same manner that unit types without portraits do by default).&lt;br /&gt;
&lt;br /&gt;
* '''animate''': if ''yes'', fades the unit in like when it's recruited/recalled.&lt;br /&gt;
&lt;br /&gt;
* '''[status]''' the status of the unit. This affects different features of the unit, for example whether the unit loses health each turn. Default for all keys is 'off', but this can be changed by the scenario or by special abilities (see [[AbilitiesWML]]). The status of a unit is displayed on the Status Table; each status modification ''statusmod'' is represented by the image '''misc/statusmod.png'''.&lt;br /&gt;
** '''poisoned''': if 'yes', the unit loses 8 HP each turn. See also ''heals'', ''cures'', [[AbilitiesWML]].&lt;br /&gt;
** '''slowed''': if 'yes', the unit has 50% of its normal movement and does half damage. When the controller of the unit's turn is over, ''slowed'' is set to 'off'  &lt;br /&gt;
** '''stone''': if 'yes', the unit cannot move, attack, or be attacked.&lt;br /&gt;
** '''hides''': if 'yes', the unit cannot be seen by opponents.&lt;br /&gt;
** '''guardian''': this is set to 'yes' by ai_special=guardian and clearing it will allow the unit to act normally again.&lt;br /&gt;
&lt;br /&gt;
* '''[variables]''' a set of variables that will be stored when this unit is stored (See [store_unit], [[InternalActionsWML]]). The attribute '''variable'''='''value''' means that when the unit is stored in the array ''unit'', the variable '''unit'''.variables.''variable'' will have the value ''value'' (See [[VariablesWML]]).&lt;br /&gt;
&lt;br /&gt;
* '''[modifications]''' changes that have been made to the unit.&lt;br /&gt;
** '''[trait]''' a trait the unit has. Same format as [trait], [[UnitsWML]].&lt;br /&gt;
** '''[object]''' an object the unit has. Same format as [object], [[DirectActionsWML]].&lt;br /&gt;
&lt;br /&gt;
* '''unit_description''': overrides the unit type description for this unit. You will probably want to set up a ''post_advance'' [[EventWML|event]] to override the default description after promotions. Or better, use an object with a profile [[EffectWML|effect(s)]] to filter on unit type and change the unit description and/or portrait.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[UnitWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
[[Category:WML Reference]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=TerrainMaskWML&amp;diff=28985</id>
		<title>TerrainMaskWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=TerrainMaskWML&amp;diff=28985"/>
		<updated>2009-03-22T11:13:00Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing {{DevFeature}} tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== The [terrain_mask] tag ==&lt;br /&gt;
&lt;br /&gt;
The [terrain_mask] tag makes map manipulation from within WML much easier.&lt;br /&gt;
It uses a Wesnoth map as a &amp;quot;mask&amp;quot; over a given location,&lt;br /&gt;
placing it down on top of the scenario map.&lt;br /&gt;
Fog('~') and void(' ') are used like alpha in an image; i.e. they cause the previous terrain to be used.&lt;br /&gt;
&lt;br /&gt;
* '''x,y''': the x,y location in the scenario map to place the top-left corner of the mask onto&lt;br /&gt;
* '''mask''': a Wesnoth map; see [[BuildingMaps]].&lt;br /&gt;
* '''border''': (default=no) Overlay on the border as well as the playable map area. The mask used must have a border_size equal to the map's border size (i.e. it must be a normal map), otherwise it will be ignored&lt;br /&gt;
* '''[rule]''': specifies a rule for blending the mask with the scenario.&lt;br /&gt;
The terrain on each hex fitting the rule will be changed to the terrain specified in the rule.&lt;br /&gt;
** '''old''': a comma-separated list of terrain codes. The rule fits only those hexes that have one of these terrains in the scenario.&lt;br /&gt;
** '''new''': a list of terrain letters. The rule fits only those hexes with this terrain specified in the mask.&lt;br /&gt;
** '''terrain''': the letter of the terrain to change hexes which fit this rule (i.e. for which the '''new''' terrain code in the mask falls on top of the '''old''' terrain in the scenario) into.&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;
As an example, suppose you want to lay down a road somewhere. You could specify by hand the path the road takes using&lt;br /&gt;
[terrain], or you could use&lt;br /&gt;
[terrain_mask]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[terrain_mask]&lt;br /&gt;
    x,y=12,10&lt;br /&gt;
    mask=&amp;quot;border_size=1&lt;br /&gt;
 usage=map&lt;br /&gt;
 &lt;br /&gt;
   Re,   Re,   _f,   _f,   _f,   _f,   _f,   _f,   _f,   _f,   _f,   _f&lt;br /&gt;
   Re,   Re,   _f,   _f,   _f,   _f,   _f,   _f,   _f,   _f,   _f,   _f&lt;br /&gt;
   Re,   Re,   _f,   _f,   _f,   _f,   _f,   _f,   _f,   _f,   _f,   _f&lt;br /&gt;
   _f,   _f,   Re,   _f,   _f,   _f,   _f,   _f,   _f,   _f,   _f,   _f&lt;br /&gt;
   _f,   _f,   Re,   _f,   _f,   _f,   _f,   _f,   _f,   _f,   _f,   _f&lt;br /&gt;
   Re,   Re,   _f,   _f,   _f,   _f,   _f,   _f,   _f,   _f,   _f,   _f&lt;br /&gt;
   _f,   _f,   Re,   _f,   _f,   Re,   Re,   _f,   _f,   _f,   _f,   _f&lt;br /&gt;
   _f,   _f,   _f,   Re,   Re,   Re,   _f,   Re,   Re,   _f,   _f,   _f&lt;br /&gt;
   _f,   _f,   _f,   _f,   _f,   _f,   _f,   Re,   _f,   _f,   _f,   _f&lt;br /&gt;
   _f,   _f,   _f,   _f,   _f,   _f,   _f,   Re,   Re,   _f,   _f,   _f&lt;br /&gt;
   _f,   _f,   _f,   _f,   _f,   _f,   _f,   Re,   Re,   Re,   Re,   Re&lt;br /&gt;
   _f,   _f,   _f,   _f,   _f,   _f,   _f,   Re,   Re,   Re,   Re,   Re&lt;br /&gt;
 &amp;quot;&lt;br /&gt;
 [/terrain_mask]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For instance, suppose you want snow to fall in an area. You want villages (v) to turn into snowed-villages (V), forest&lt;br /&gt;
(f) to turn into snowed-forest (F), hills&lt;br /&gt;
(h) to turn into snowed-hills (H), and grassland (g) and roads (r) to turn into snow (S), while other terrain remains&lt;br /&gt;
untouched. You could look over your&lt;br /&gt;
destination map and work out which terrain type is which and draw your mask, but that's alot of effort, you want to just&lt;br /&gt;
draw a simple mask which has&lt;br /&gt;
areas of snow and areas of no snow, and make the game work out the rest.&lt;br /&gt;
&lt;br /&gt;
You can do it like this:&lt;br /&gt;
&lt;br /&gt;
 [terrain_mask]&lt;br /&gt;
     x,y=1,1&lt;br /&gt;
     mask=&amp;quot;border_size=1&lt;br /&gt;
 usage=map&lt;br /&gt;
 &lt;br /&gt;
  _f,   _f,   Aa,   _f,   _f,   _f,   Aa,   _f,   _f&lt;br /&gt;
  _f,   _f,   Aa,   _f,   _f,   _f,   Aa,   _f,   _f&lt;br /&gt;
  _f,   _f,   Aa,   _f,   Aa,   _f,   Aa,   _f,   _f&lt;br /&gt;
  Aa,   Aa,   _f,   _f,   Aa,   Aa,   Aa,   _f,   _f&lt;br /&gt;
  _f,   _f,   Aa,   Aa,   Aa,   Aa,   Aa,   Aa,   Aa&lt;br /&gt;
  _f,   _f,   _f,   Aa,   Aa,   Aa,   Aa,   Aa,   Aa&lt;br /&gt;
  _f,   _f,   _f,   _f,   Aa,   Aa,   _f,   _f,   _f&lt;br /&gt;
  _f,   _f,   _f,   _f,   Aa,   Aa,   _f,   _f,   _f&amp;quot;&lt;br /&gt;
 [rule]&lt;br /&gt;
    old=Gg^Vh&lt;br /&gt;
    new=Aa&lt;br /&gt;
    terrain=Aa^Vha&lt;br /&gt;
 [/rule]&lt;br /&gt;
 [rule]&lt;br /&gt;
    old=Gs^Fp&lt;br /&gt;
    new=Aa&lt;br /&gt;
    terrain=Aa^Fpa&lt;br /&gt;
 [/rule]&lt;br /&gt;
 [rule]&lt;br /&gt;
    old=Hh&lt;br /&gt;
    new=Aa&lt;br /&gt;
    terrain=Ha&lt;br /&gt;
 [/rule]&lt;br /&gt;
 &lt;br /&gt;
 [rule]&lt;br /&gt;
    old=Gg,Re&lt;br /&gt;
    new=Aa&lt;br /&gt;
    #don't specify terrain and it just uses the new terrain&lt;br /&gt;
 [/rule]&lt;br /&gt;
 &lt;br /&gt;
 #default: Will match everything, since 'old' and 'new' aren't&lt;br /&gt;
 #specified. Set 'use_old=yes' to signal no change.&lt;br /&gt;
 [rule]&lt;br /&gt;
 use_old=yes&lt;br /&gt;
 [/rule]&lt;br /&gt;
 [/terrain_mask]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=TerrainWML&amp;diff=28984</id>
		<title>TerrainWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=TerrainWML&amp;diff=28984"/>
		<updated>2009-03-22T11:12:04Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing {{DevFeature}} tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== the toplevel [terrain] tag ==&lt;br /&gt;
&lt;br /&gt;
The [terrain] tag describes a terrain in WML.&lt;br /&gt;
Terrains are usually described in the terrain.cfg file&lt;br /&gt;
&lt;br /&gt;
the [terrain] tag has the following keys and subtags&lt;br /&gt;
* '''symbol_image''': an image used for this terrain in the minimap&lt;br /&gt;
* '''editor_image''': an image used for this terrain in the map editor if not defined uses symbol_image&lt;br /&gt;
* '''name''': the name of the terrain&lt;br /&gt;
* '''string''': this is the string that represents the terrain in maps and scenarions&lt;br /&gt;
* '''unit_height_adjust''': how much the unit graphic should be moved up or down when on that terrain&lt;br /&gt;
* '''submerge''': float, between 0 and 1: stems how much of the unit graphic should be submerged by the terrain&lt;br /&gt;
* '''light''': signed value: this will modified local light level on that hex by that amount for gameplay&lt;br /&gt;
* '''heals''': signed value: this value is the amount of HP an unit will be healed at the start of every turn. (If set to true a unit on that terrain will be healed 8 HP at the start of every turn, this notation is deappriciated and support might stop at some point.)&lt;br /&gt;
* '''gives_income''': if set to true, this terrain will give income every turn when flagged as if it were a village&lt;br /&gt;
* '''recruit_onto''': if set to true, it is possible to recruit or recall on that terrain&lt;br /&gt;
* '''recruit_from''': if set to true it is possible to recruit when a unit that can recruit is on that terrain&lt;br /&gt;
* '''aliasof''': comma separated string representing terrains that this terrain will be an alias of. This is a list of characters, with the + and - signs having special meanings. the string is read left to right taking the best value. when a minus sign is encountered, it starts taking the worst instead. the plus sign reverts it back to the best (note after a + or - a comma is also required. In order to include a + sign the entire line must be placed between double quotes.)&lt;br /&gt;
* '''def_alias''': like ''aliasof'' but overides it for defense calculation only&lt;br /&gt;
* '''mvt_alias''': like ''aliasof'' but overides it for movement calculation only&lt;br /&gt;
* '''income_description''': for terrains with ''gives_income'' and owned by nobody this text is shown in the terrain description in the top bar before the brackets. This tag is optional, if not supplied Wesnoth will assume the terrain is a village and sets an appropriate message.&lt;br /&gt;
* '''income_description_ally''': like ''income_description'' but if owned by an ally&lt;br /&gt;
* '''income_description_enemy''': like ''income_description'' but if owned by an enemy&lt;br /&gt;
* '''income_description_own''': like ''income_description'' but if owned by yourself&lt;br /&gt;
* '''editor_group''': a comma separated list of editor_group ids to which this terrain belongs.&lt;br /&gt;
* '''hidden''': (boolean) if set to 'yes', makes this terrain not appear in the map editor palettes.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
* [[TerrainCodesWML]]&lt;br /&gt;
* [[EditorGroupWML]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=CampaignServerWML&amp;diff=28983</id>
		<title>CampaignServerWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=CampaignServerWML&amp;diff=28983"/>
		<updated>2009-03-22T11:11:10Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing {{DevFeature}} tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Campaign Server WML =&lt;br /&gt;
&lt;br /&gt;
This page describes the WML commands exchanged between campaign download clients and a campaign server. &lt;br /&gt;
&lt;br /&gt;
== Listing Available Campaigns ==&lt;br /&gt;
&lt;br /&gt;
This request is used to retrieve a list of campaigns available on the server and some overview information about them.&lt;br /&gt;
&lt;br /&gt;
* Request&lt;br /&gt;
** '''[request_campaign_list]'''&lt;br /&gt;
*** '''after''': only select campaigns last updated after the indicated time. ''after'' is in seconds relative to either the time when the command is processed or the [http://wikipedia.org/wiki/Unix_epoch Unix epoch]. As an example, to select campaigns last updated after Mon Oct 10 21:42:41 2005 GMT, you could not specify a value for ''times_relative_to'' (to use the default of relative to the [http://wikipedia.org/wiki/Unix_epoch Unix epoch]) and specify ''after'' = &amp;quot;1128980561&amp;quot;.&lt;br /&gt;
*** '''before''': only select campaigns last updated before the indicated time. ''before'' is in seconds relative to either the time when the command is processed or the [http://wikipedia.org/wiki/Unix_epoch Unix epoch]. As an example, to select campaigns last updated over a day ago, you could specify ''times_relative_to'' = &amp;quot;now&amp;quot; and ''before'' = &amp;quot;-86400&amp;quot;.&lt;br /&gt;
*** '''language''': return information only about campaigns that appear to be translated into this language. These names will normally be POSIX locale names. Typically you will want to either use a two letter language code (e.g. &amp;quot;de&amp;quot;) or a two letter language code followed by a two character region code (e.g. &amp;quot;pt_BR&amp;quot;). Note that &amp;quot;pt&amp;quot; will not match &amp;quot;pt_BR&amp;quot;.&lt;br /&gt;
*** '''name''': return information for this campaign. If the name is specified and not the empty string then only information about campaigns with matching names (unless something changes there will be at most one such campaign) will be returned.&lt;br /&gt;
*** '''times_relative_to''': &amp;quot;now&amp;quot; means that ''before'' and ''after'' are in seconds relative to the time when the request is processed by the campaign server. Any other value, or if it is not set, indicates that ''before'' and ''after'' are in seconds relative to the [http://wikipedia.org/wiki/Unix_epoch Unix epoch].&lt;br /&gt;
* Response&lt;br /&gt;
** '''timestamp''': what time the campaign server thought it was when this response was generated. You shouldn't count on this as a guaranty that no new campaigns will appear with previous update times. This could be used to detect significant clock skew or possibly used as an approximate time for how far you need to look back for updated campaigns.&lt;br /&gt;
** '''[campaigns]'''&lt;br /&gt;
*** '''[campaign]'''&lt;br /&gt;
**** '''author''': author(s) of the campaign.&lt;br /&gt;
**** '''dependencies''': list of add-on dependencies&lt;br /&gt;
**** ''description'': (current trunk only) description of the campaign. For pre 1.0 campaigns this should also describe the playability.&lt;br /&gt;
**** '''downloads''': the number times the campaign (including previous versions) has been downloaded directly from the campaign server.&lt;br /&gt;
**** '''filename''': filename campaign is stored in (currently the same as ''name'').&lt;br /&gt;
**** '''icon''': path to an image in the standard image directory for Wesnoth. This path must use forward slashes (/). It cannot refer to custom images included with the campaign. It is allowed to use [[ImagePathFunctionWML]]. This image is displayed as an icon by the campaign client built into Wesnoth.&lt;br /&gt;
**** '''name''': the name of the campaign. Note this is not the title and shouldn't have spaces in it.&lt;br /&gt;
**** '''size''': the size of the campaign in bytes on the campaign server.&lt;br /&gt;
**** '''timestamp''': when this version of the campaign was uploaded.&lt;br /&gt;
**** '''title''': campaign title. This is not a translatable string.&lt;br /&gt;
**** '''translate''': whether the campaign will be automatically send to wescamp and updated from wescamp.&lt;br /&gt;
**** '''uploads''': (current trunk only) number of uploads (initial upload gets 1)&lt;br /&gt;
**** '''version''': version of the campaign. The recommended format is x.y.z where x, y and z are decimal strings. x should be 0 for campaigns that are not yet complete.&lt;br /&gt;
**** '''type''': indicates the type of the add-on, used for the downloads manager dialog. Possible values are described in [[PblWML]].&lt;br /&gt;
**** '''[translation]'''&lt;br /&gt;
***** '''language''': a language that this campaign has appeared to have been at least partially translated into. The following heuristic is used when a campaign is uploaded to extract a list of languages. The list of directories in the uploaded campaign is recursively searched. If a directory named 'LC_MESSAGES' is found then the name of the object containing this '''[dir]''' (normally the parent directory, but could be the campaign name if someone did something silly) is added to the list of translations. Directories named &amp;quot;LC_MESSAGES&amp;quot; are not searched for further matches. The normal naming convention is to use Posix locale names. This will usually be a two letter language code (e.g. &amp;quot;de&amp;quot;) or a two letter language code followed by a two letter region code (e.g. &amp;quot;pt_BR&amp;quot;). Since &amp;quot;en_US&amp;quot; is the base language, this language will not be listed as an available translation.&lt;br /&gt;
&lt;br /&gt;
== Downloading a Campaign ==&lt;br /&gt;
&lt;br /&gt;
This command is used to download a specified campaign from the campaign server.&lt;br /&gt;
&lt;br /&gt;
* Request&lt;br /&gt;
** '''[request_campaign]'''&lt;br /&gt;
*** '''name''': the name of the campaign. Note this is not the title and shouldn't have spaces in it.&lt;br /&gt;
* Response&lt;br /&gt;
** '''author''': author(s) of the campaign.&lt;br /&gt;
** '''campaign_name''': the name of the campaign. Note this is not the title and shouldn't have spaces in it.&lt;br /&gt;
** '''description''': description of the campaign. For pre 1.0 campaigns this should also describe the playability.&lt;br /&gt;
** '''icon''': path to an image in the standard image directory for Wesnoth. This path must use forward slashes (/). It cannot refer to custom images included with the campaign. It is allowed to use [[ImagePathFunctionWML]]. This image is displayed as an icon by the campaign client built into Wesnoth.&lt;br /&gt;
** '''name''': this field will always be empty. Client code would treat it as a directory name if it was not empty.&lt;br /&gt;
** '''timestamp''': the time the campaign was last uploaded to the campaign server. This is a decimal string containing the number of seconds since the unix epoch.&lt;br /&gt;
** '''title''': the title of the campaign. This is not a translatable string.&lt;br /&gt;
** '''version''': version of the campaign. The recommended format is x.y.z where x, y and z are decimal strings. x should be 0 for campaigns that are not yet complete.&lt;br /&gt;
** '''type''': indicates the type of the add-on, used for the downloads manager dialog. Possible values are described in [[PblWML]].&lt;br /&gt;
** '''[file]'''&lt;br /&gt;
*** '''name''': the name of the file. This does not include any path information.&lt;br /&gt;
*** '''contents''': the content of the file (binary data). This data should have no zero bytes. A byte with the code of 1 is an escape byte. The next byte will be data, but its value should be reduced by 1. Normally only byte codes of 0 and 1 are escaped.&lt;br /&gt;
** '''[dir]'''&lt;br /&gt;
*** '''name''': the name of the directory. This does not include any path information.&lt;br /&gt;
*** This tag may contain '''[file]''' or '''[dir]''' subtags (the latter are recursive).&lt;br /&gt;
&lt;br /&gt;
== Uploading a Campaign ==&lt;br /&gt;
&lt;br /&gt;
This command is used to upload a new or updated version of an add on campaign to the campaign server.&lt;br /&gt;
&lt;br /&gt;
* Request&lt;br /&gt;
** '''[upload]'''&lt;br /&gt;
*** '''author''': author(s) of the campaign.&lt;br /&gt;
*** '''description''': description of the campaign. For pre 1.0 campaigns this should also describe the playability.&lt;br /&gt;
*** '''icon''': path to an image in the standard image directory for Wesnoth. This path must use forward slashes (/). It cannot refer to custom images included with the campaign. It is allowed to use [[ImagePathFunctionWML]]. This image is displayed as an icon by the campaign client built into Wesnoth.&lt;br /&gt;
*** '''name''': the name of the campaign. Note this is not the title and shouldn't have spaces in it.&lt;br /&gt;
*** '''passphrase''': this is used to control updates to campaigns on the server. For existing campaigns, if the passphrase doesn't match, the update will be rejected. You can't easily change the passphrase yourself. If you lose or need to change the passphrase you need to contact the server administrator.&lt;br /&gt;
*** '''email''': it is used by campaign server administrators to contact authors in case of important problems with their add-ons (incompatibilities, broken data files, violation of server [[Distributing_content#License|policies]], etc.).&lt;br /&gt;
*** '''title''': the title of the campaign. This is not a translatable string.&lt;br /&gt;
*** '''version''': version of the campaign. The recommended format is x.y.z where x, y and z are decimal strings. x should be 0 for campaigns that are not yet complete.&lt;br /&gt;
*** '''type''': indicates the type of the add-on, used for the downloads manager dialog. Possible values are described in [[PblWML]].&lt;br /&gt;
*** '''[data]'''&lt;br /&gt;
**** '''[file]'''&lt;br /&gt;
***** '''name''': the name of the file. This does not include any path information.&lt;br /&gt;
***** '''contents''': the content of the file (binary data). This data should have no zero bytes. A byte with the code of 1 is an escape byte. The next byte will be data, but its value should be reduced by 1. Normally only byte codes of 0 and 1 are escaped.&lt;br /&gt;
**** '''[dir]'''&lt;br /&gt;
***** '''name''': the name of the directory. This does not include any path information.&lt;br /&gt;
***** This tag may contain '''[file]''' or '''[dir]''' subtags (the latter are recursive).&lt;br /&gt;
* Response&lt;br /&gt;
** '''[message]'''&lt;br /&gt;
*** '''message''': translatable string that indicates that the campaign upload was successful.&lt;br /&gt;
&lt;br /&gt;
== Changing the Passphrase for a Campaign ==&lt;br /&gt;
&lt;br /&gt;
This command is used to change the passphrase for a campaign. Currently the normal client doesn't have a way to use this. However, you can use the perl script campaign_passphrase.pl to do it, if you have a copy of the source tree.&lt;br /&gt;
&lt;br /&gt;
* Request&lt;br /&gt;
** '''[change_passphrase]'''&lt;br /&gt;
*** '''name''': The name of campaign.&lt;br /&gt;
*** '''passphrase''': The old passphrase.&lt;br /&gt;
*** '''new_passphrase''': The new passphrase.&lt;br /&gt;
* Respose&lt;br /&gt;
** '''[message]'''&lt;br /&gt;
*** '''message''': Translatable string that says that the passphrase was changed.&lt;br /&gt;
&lt;br /&gt;
== Deleting a Campaign ==&lt;br /&gt;
&lt;br /&gt;
This command is used to delete an existing campaign from the campaign server.&lt;br /&gt;
&lt;br /&gt;
* Request&lt;br /&gt;
** '''[delete]'''&lt;br /&gt;
*** '''name''': The name of the campaign to delete.&lt;br /&gt;
*** '''passphrase''': This must match the passphrase on record for the campaign or the master_password in order for the campaign to be deleted. Master_password.&lt;br /&gt;
* Response&lt;br /&gt;
** '''[message]'''&lt;br /&gt;
*** '''message''': Translatable string that says that the campaign was deleted.&lt;br /&gt;
&lt;br /&gt;
== Request License Information ==&lt;br /&gt;
&lt;br /&gt;
Retrieve the terms of the license used for any uploaded campaigns. You may not upload a campaign if you don't (or can't) aggree to the license. Wesnoth requires campaigns (including images and sound) to be licensed under the GPL. For more information on licensing, see [[Wesnoth:Copyrights]].&lt;br /&gt;
&lt;br /&gt;
* Request&lt;br /&gt;
** '''[request_terms]'''&lt;br /&gt;
* Response&lt;br /&gt;
** '''[message]'''&lt;br /&gt;
*** '''message''': translatable string containing the text of the license.&lt;br /&gt;
&lt;br /&gt;
== Developer commands ==&lt;br /&gt;
&lt;br /&gt;
* Request&lt;br /&gt;
** '''[validate_scripts]'''&lt;br /&gt;
*** '''name''': The name of the campaign to sign.&lt;br /&gt;
*** '''master_password''': The signing password.&lt;br /&gt;
* Response&lt;br /&gt;
** '''[message]'''&lt;br /&gt;
*** '''message''': Translatable(?) string that says that the campaign was signed.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[UserScenarios#Campaign_Server_Web_Access]]&lt;br /&gt;
* [[PblWML]]&lt;br /&gt;
* [[BuildingCampaignsThePBLFile]]&lt;br /&gt;
&lt;br /&gt;
[[Category:WML Reference]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=CampaignServerWML&amp;diff=28982</id>
		<title>CampaignServerWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=CampaignServerWML&amp;diff=28982"/>
		<updated>2009-03-22T11:10:29Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing {{DevFeature}} tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Campaign Server WML =&lt;br /&gt;
&lt;br /&gt;
This page describes the WML commands exchanged between campaign download clients and a campaign server. &lt;br /&gt;
&lt;br /&gt;
== Listing Available Campaigns ==&lt;br /&gt;
&lt;br /&gt;
This request is used to retrieve a list of campaigns available on the server and some overview information about them.&lt;br /&gt;
&lt;br /&gt;
* Request&lt;br /&gt;
** '''[request_campaign_list]'''&lt;br /&gt;
*** '''after''': only select campaigns last updated after the indicated time. ''after'' is in seconds relative to either the time when the command is processed or the [http://wikipedia.org/wiki/Unix_epoch Unix epoch]. As an example, to select campaigns last updated after Mon Oct 10 21:42:41 2005 GMT, you could not specify a value for ''times_relative_to'' (to use the default of relative to the [http://wikipedia.org/wiki/Unix_epoch Unix epoch]) and specify ''after'' = &amp;quot;1128980561&amp;quot;.&lt;br /&gt;
*** '''before''': only select campaigns last updated before the indicated time. ''before'' is in seconds relative to either the time when the command is processed or the [http://wikipedia.org/wiki/Unix_epoch Unix epoch]. As an example, to select campaigns last updated over a day ago, you could specify ''times_relative_to'' = &amp;quot;now&amp;quot; and ''before'' = &amp;quot;-86400&amp;quot;.&lt;br /&gt;
*** '''language''': return information only about campaigns that appear to be translated into this language. These names will normally be POSIX locale names. Typically you will want to either use a two letter language code (e.g. &amp;quot;de&amp;quot;) or a two letter language code followed by a two character region code (e.g. &amp;quot;pt_BR&amp;quot;). Note that &amp;quot;pt&amp;quot; will not match &amp;quot;pt_BR&amp;quot;.&lt;br /&gt;
*** '''name''': return information for this campaign. If the name is specified and not the empty string then only information about campaigns with matching names (unless something changes there will be at most one such campaign) will be returned.&lt;br /&gt;
*** '''times_relative_to''': &amp;quot;now&amp;quot; means that ''before'' and ''after'' are in seconds relative to the time when the request is processed by the campaign server. Any other value, or if it is not set, indicates that ''before'' and ''after'' are in seconds relative to the [http://wikipedia.org/wiki/Unix_epoch Unix epoch].&lt;br /&gt;
* Response&lt;br /&gt;
** '''timestamp''': what time the campaign server thought it was when this response was generated. You shouldn't count on this as a guaranty that no new campaigns will appear with previous update times. This could be used to detect significant clock skew or possibly used as an approximate time for how far you need to look back for updated campaigns.&lt;br /&gt;
** '''[campaigns]'''&lt;br /&gt;
*** '''[campaign]'''&lt;br /&gt;
**** '''author''': author(s) of the campaign.&lt;br /&gt;
**** '''dependencies''': list of add-on dependencies&lt;br /&gt;
**** ''description'': (current trunk only) description of the campaign. For pre 1.0 campaigns this should also describe the playability.&lt;br /&gt;
**** '''downloads''': the number times the campaign (including previous versions) has been downloaded directly from the campaign server.&lt;br /&gt;
**** '''filename''': filename campaign is stored in (currently the same as ''name'').&lt;br /&gt;
**** '''icon''': path to an image in the standard image directory for Wesnoth. This path must use forward slashes (/). It cannot refer to custom images included with the campaign. It is allowed to use [[ImagePathFunctionWML]]. This image is displayed as an icon by the campaign client built into Wesnoth.&lt;br /&gt;
**** '''name''': the name of the campaign. Note this is not the title and shouldn't have spaces in it.&lt;br /&gt;
**** '''size''': the size of the campaign in bytes on the campaign server.&lt;br /&gt;
**** '''timestamp''': when this version of the campaign was uploaded.&lt;br /&gt;
**** '''title''': campaign title. This is not a translatable string.&lt;br /&gt;
**** '''translate''': whether the campaign will be automatically send to wescamp and updated from wescamp.&lt;br /&gt;
**** '''uploads''': (current trunk only) number of uploads (initial upload gets 1)&lt;br /&gt;
**** '''version''': version of the campaign. The recommended format is x.y.z where x, y and z are decimal strings. x should be 0 for campaigns that are not yet complete.&lt;br /&gt;
**** '''type''': indicates the type of the add-on, used for the downloads manager dialog. Possible values are described in [[PblWML]].&lt;br /&gt;
**** '''[translation]'''&lt;br /&gt;
***** '''language''': a language that this campaign has appeared to have been at least partially translated into. The following heuristic is used when a campaign is uploaded to extract a list of languages. The list of directories in the uploaded campaign is recursively searched. If a directory named 'LC_MESSAGES' is found then the name of the object containing this '''[dir]''' (normally the parent directory, but could be the campaign name if someone did something silly) is added to the list of translations. Directories named &amp;quot;LC_MESSAGES&amp;quot; are not searched for further matches. The normal naming convention is to use Posix locale names. This will usually be a two letter language code (e.g. &amp;quot;de&amp;quot;) or a two letter language code followed by a two letter region code (e.g. &amp;quot;pt_BR&amp;quot;). Since &amp;quot;en_US&amp;quot; is the base language, this language will not be listed as an available translation.&lt;br /&gt;
&lt;br /&gt;
== Downloading a Campaign ==&lt;br /&gt;
&lt;br /&gt;
This command is used to download a specified campaign from the campaign server.&lt;br /&gt;
&lt;br /&gt;
* Request&lt;br /&gt;
** '''[request_campaign]'''&lt;br /&gt;
*** '''name''': the name of the campaign. Note this is not the title and shouldn't have spaces in it.&lt;br /&gt;
* Response&lt;br /&gt;
** '''author''': author(s) of the campaign.&lt;br /&gt;
** '''campaign_name''': the name of the campaign. Note this is not the title and shouldn't have spaces in it.&lt;br /&gt;
** '''description''': description of the campaign. For pre 1.0 campaigns this should also describe the playability.&lt;br /&gt;
** '''icon''': path to an image in the standard image directory for Wesnoth. This path must use forward slashes (/). It cannot refer to custom images included with the campaign. It is allowed to use [[ImagePathFunctionWML]]. This image is displayed as an icon by the campaign client built into Wesnoth.&lt;br /&gt;
** '''name''': this field will always be empty. Client code would treat it as a directory name if it was not empty.&lt;br /&gt;
** '''timestamp''': the time the campaign was last uploaded to the campaign server. This is a decimal string containing the number of seconds since the unix epoch.&lt;br /&gt;
** '''title''': the title of the campaign. This is not a translatable string.&lt;br /&gt;
** '''version''': version of the campaign. The recommended format is x.y.z where x, y and z are decimal strings. x should be 0 for campaigns that are not yet complete.&lt;br /&gt;
** '''type''': {{DevFeature}} indicates the type of the add-on, used for the downloads manager dialog. Possible values are described in [[PblWML]].&lt;br /&gt;
** '''[file]'''&lt;br /&gt;
*** '''name''': the name of the file. This does not include any path information.&lt;br /&gt;
*** '''contents''': the content of the file (binary data). This data should have no zero bytes. A byte with the code of 1 is an escape byte. The next byte will be data, but its value should be reduced by 1. Normally only byte codes of 0 and 1 are escaped.&lt;br /&gt;
** '''[dir]'''&lt;br /&gt;
*** '''name''': the name of the directory. This does not include any path information.&lt;br /&gt;
*** This tag may contain '''[file]''' or '''[dir]''' subtags (the latter are recursive).&lt;br /&gt;
&lt;br /&gt;
== Uploading a Campaign ==&lt;br /&gt;
&lt;br /&gt;
This command is used to upload a new or updated version of an add on campaign to the campaign server.&lt;br /&gt;
&lt;br /&gt;
* Request&lt;br /&gt;
** '''[upload]'''&lt;br /&gt;
*** '''author''': author(s) of the campaign.&lt;br /&gt;
*** '''description''': description of the campaign. For pre 1.0 campaigns this should also describe the playability.&lt;br /&gt;
*** '''icon''': path to an image in the standard image directory for Wesnoth. This path must use forward slashes (/). It cannot refer to custom images included with the campaign. It is allowed to use [[ImagePathFunctionWML]]. This image is displayed as an icon by the campaign client built into Wesnoth.&lt;br /&gt;
*** '''name''': the name of the campaign. Note this is not the title and shouldn't have spaces in it.&lt;br /&gt;
*** '''passphrase''': this is used to control updates to campaigns on the server. For existing campaigns, if the passphrase doesn't match, the update will be rejected. You can't easily change the passphrase yourself. If you lose or need to change the passphrase you need to contact the server administrator.&lt;br /&gt;
*** '''email''': {{DevFeature}} it is used by campaign server administrators to contact authors in case of important problems with their add-ons (incompatibilities, broken data files, violation of server [[Distributing_content#License|policies]], etc.).&lt;br /&gt;
*** '''title''': the title of the campaign. This is not a translatable string.&lt;br /&gt;
*** '''version''': version of the campaign. The recommended format is x.y.z where x, y and z are decimal strings. x should be 0 for campaigns that are not yet complete.&lt;br /&gt;
*** '''type''': {{DevFeature}} indicates the type of the add-on, used for the downloads manager dialog. Possible values are described in [[PblWML]].&lt;br /&gt;
*** '''[data]'''&lt;br /&gt;
**** '''[file]'''&lt;br /&gt;
***** '''name''': the name of the file. This does not include any path information.&lt;br /&gt;
***** '''contents''': the content of the file (binary data). This data should have no zero bytes. A byte with the code of 1 is an escape byte. The next byte will be data, but its value should be reduced by 1. Normally only byte codes of 0 and 1 are escaped.&lt;br /&gt;
**** '''[dir]'''&lt;br /&gt;
***** '''name''': the name of the directory. This does not include any path information.&lt;br /&gt;
***** This tag may contain '''[file]''' or '''[dir]''' subtags (the latter are recursive).&lt;br /&gt;
* Response&lt;br /&gt;
** '''[message]'''&lt;br /&gt;
*** '''message''': translatable string that indicates that the campaign upload was successful.&lt;br /&gt;
&lt;br /&gt;
== Changing the Passphrase for a Campaign ==&lt;br /&gt;
&lt;br /&gt;
This command is used to change the passphrase for a campaign. Currently the normal client doesn't have a way to use this. However, you can use the perl script campaign_passphrase.pl to do it, if you have a copy of the source tree.&lt;br /&gt;
&lt;br /&gt;
* Request&lt;br /&gt;
** '''[change_passphrase]'''&lt;br /&gt;
*** '''name''': The name of campaign.&lt;br /&gt;
*** '''passphrase''': The old passphrase.&lt;br /&gt;
*** '''new_passphrase''': The new passphrase.&lt;br /&gt;
* Respose&lt;br /&gt;
** '''[message]'''&lt;br /&gt;
*** '''message''': Translatable string that says that the passphrase was changed.&lt;br /&gt;
&lt;br /&gt;
== Deleting a Campaign ==&lt;br /&gt;
&lt;br /&gt;
This command is used to delete an existing campaign from the campaign server.&lt;br /&gt;
&lt;br /&gt;
* Request&lt;br /&gt;
** '''[delete]'''&lt;br /&gt;
*** '''name''': The name of the campaign to delete.&lt;br /&gt;
*** '''passphrase''': This must match the passphrase on record for the campaign or the master_password in order for the campaign to be deleted. Master_password.&lt;br /&gt;
* Response&lt;br /&gt;
** '''[message]'''&lt;br /&gt;
*** '''message''': Translatable string that says that the campaign was deleted.&lt;br /&gt;
&lt;br /&gt;
== Request License Information ==&lt;br /&gt;
&lt;br /&gt;
Retrieve the terms of the license used for any uploaded campaigns. You may not upload a campaign if you don't (or can't) aggree to the license. Wesnoth requires campaigns (including images and sound) to be licensed under the GPL. For more information on licensing, see [[Wesnoth:Copyrights]].&lt;br /&gt;
&lt;br /&gt;
* Request&lt;br /&gt;
** '''[request_terms]'''&lt;br /&gt;
* Response&lt;br /&gt;
** '''[message]'''&lt;br /&gt;
*** '''message''': translatable string containing the text of the license.&lt;br /&gt;
&lt;br /&gt;
== Developer commands ==&lt;br /&gt;
&lt;br /&gt;
* Request&lt;br /&gt;
** '''[validate_scripts]'''&lt;br /&gt;
*** '''name''': The name of the campaign to sign.&lt;br /&gt;
*** '''master_password''': The signing password.&lt;br /&gt;
* Response&lt;br /&gt;
** '''[message]'''&lt;br /&gt;
*** '''message''': Translatable(?) string that says that the campaign was signed.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[UserScenarios#Campaign_Server_Web_Access]]&lt;br /&gt;
* [[PblWML]]&lt;br /&gt;
* [[BuildingCampaignsThePBLFile]]&lt;br /&gt;
&lt;br /&gt;
[[Category:WML Reference]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=ImagePathFunctions&amp;diff=28980</id>
		<title>ImagePathFunctions</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=ImagePathFunctions&amp;diff=28980"/>
		<updated>2009-03-22T11:09:21Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing {{DevFeature}} tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Image Path Functions provide a simple method for WML coders to alter the way their specified images will be displayed in the game. All of the function parameters are included at the end of an image path and should not contain any spaces or special characters (other than those specified here).&lt;br /&gt;
&lt;br /&gt;
== Team-Color Function ==&lt;br /&gt;
In Wesnoth version 1.2, the only Image Path Function was '''~TC()''', which took two comma-separated parameters: the team number and the source color palette. The valid values for both of these parameters are defined in the file ''data/team-colors.cfg''&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
'''~TC(''' ''team number'' ''',''' ''source color palette'' ''')'''&lt;br /&gt;
*''team number'' - this is the first parameter, a number 1-9 signifying the team number of a unit. Number 1 typically means the red team, 2 typically means the blue team, and so on (unless the scenario color settings for any side have been altered).&lt;br /&gt;
*''source color palette'' - the second parameter is a source color palette, usually magenta. Do not surround this parameter with quotes.&lt;br /&gt;
&lt;br /&gt;
== Re-Color Function ==&lt;br /&gt;
May be used to change some colors in an image.&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
'''~RC(''' ''source color palette'' '''&amp;gt;''' ''color range ID'' ''')'''&lt;br /&gt;
*''source color palette'' - the first parameter is a source color palette, usually magenta. Do not surround this parameter with quotes.&lt;br /&gt;
*''color range ID'' - this is the second parameter, signifying the ID of a color range defined in the file ''data/core/team-colors.cfg'' (or it may be a custom ID for a color range defined locally).  &lt;br /&gt;
&lt;br /&gt;
In 1.6, the following syntax changes the RC function behavior for simply replacing colors matching the source color palette with colors of the target color palette:&lt;br /&gt;
&lt;br /&gt;
'''~RC(''' ''source color palette'' '''=''' ''target color palette'' ''')'''&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
In the following example, the magenta regions in an elvish captain's image are turned  a healthy shade of green:&lt;br /&gt;
&lt;br /&gt;
      [message]&lt;br /&gt;
            speaker=narrator&lt;br /&gt;
            image=units/elves-wood/captain.png~RC(magenta&amp;gt;green)&lt;br /&gt;
            message=_ &amp;quot;Now I am on the green team.&amp;quot;&lt;br /&gt;
      [/message]&lt;br /&gt;
&lt;br /&gt;
The IDs of the color ranges may be the lowercased English name of the palette's base color (e.g. 'red', 'brown', etc.). They may also be numeric color indices from the palette WML included with the game, but this is not recommended&lt;br /&gt;
&lt;br /&gt;
== Flip Function ==&lt;br /&gt;
May be used to flip an image horizontally and/or vertically&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
'''~FL(''' ''optional argument list'' ''')'''&lt;br /&gt;
*''vertical'' - if the string &amp;quot;vert&amp;quot; is found anywhere in the argument list, the image will be flipped vertically.&lt;br /&gt;
*''horizontal'' - if the string &amp;quot;horiz&amp;quot; is found anywhere in the argument list, the image will be flipped horizantally.&lt;br /&gt;
*if the argument list is empty, the image will only be flipped horizantally.&lt;br /&gt;
&lt;br /&gt;
== Greyscale Function ==&lt;br /&gt;
May be used to greyscale the image (turn to black and white)&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
'''~GS( )'''&lt;br /&gt;
&lt;br /&gt;
== Crop Function ==&lt;br /&gt;
Extracts a rectangular section of an image file.&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
'''~CROP(x,y,width,height)'''&lt;br /&gt;
* ''x'',''y'': top-left corner coordinates for the rectangular section extracted. Must be greater or equal than zero, and inside the image's bounds.&lt;br /&gt;
* ''width'': width of the selected region. Must be less than or equal to the original image's width.&lt;br /&gt;
* ''height'': height of the selected region. Must be less than or equal to the original image's height.&lt;br /&gt;
&lt;br /&gt;
== Color-shift function ==&lt;br /&gt;
Performs simple per-channel color shifts by adding the arguments to the respective color channels.&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
''Multi-channel:'' '''~CS(r,g,b)'''&lt;br /&gt;
''Single-channel:'' '''~R(v)''', '''~G(v)''', '''~B(v)'''&lt;br /&gt;
&lt;br /&gt;
The multichannel syntax assumes all arguments are set to zero initially, so one can use, e.g. ~CS(2,4) to add +2 and +4 units to the red and green channels respectively, leaving the blue channel intact. Arguments may be negative to diminish a channel's value; this can be used to change an image's brightness. Checks for out-of-range arguments or results (less than 0 or greater than 255) are made, so the resultant values are truncated if necessary.&lt;br /&gt;
&lt;br /&gt;
The single channel syntax behaves exactly the same, except that only single-channel modifications are made per function. However, one can stack them to produce the same behavior as ~CS(), e.g. ~R(r)~G(g)~B(b), but that tends to be just a performance loss.&lt;br /&gt;
&lt;br /&gt;
Any color-shift is performed before changing opacity or desaturating the graphic (see ~O() and ~GS()).&lt;br /&gt;
&lt;br /&gt;
== Image-scaling function ==&lt;br /&gt;
Scales a graphic up or down.&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
'''~SCALE( ''new_width'', ''new_height'' )&lt;br /&gt;
&lt;br /&gt;
The ''new_width'' and ''new_height'' parameters are taken as the image's original width or height, respectively, if one of them happens to be zero. Negative values are treated in the same way, but an error is printed in stderr.&lt;br /&gt;
&lt;br /&gt;
== Opacity modifying function ==&lt;br /&gt;
Changes an image's opacity at render time.&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
'''~O( ''factor or percentage%'' )'''&lt;br /&gt;
&lt;br /&gt;
If the argument includes the percentage symbol (''%''), it will be treated as a percentage of full (real) opacity; an image will be displayed at its native opacity with ~O(100%).&lt;br /&gt;
&lt;br /&gt;
Without the percentage symbol, the argument is assumed to be a factor by which the image's native opacity should be multiplied. Thus, ~O(0.5) and ~O(50%) are equivalent forms of specifying to reduce an image's opacity by half.&lt;br /&gt;
&lt;br /&gt;
== Blurring function ==&lt;br /&gt;
Blurs a graphic at render time using the same algorithm used for in-game dialogs.&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
'''~BL( ''radius'' )'''&lt;br /&gt;
&lt;br /&gt;
== Precedence of Functions  ==&lt;br /&gt;
&lt;br /&gt;
All functions are applied in left-to-right order, with the exception of RC() and TC() which are applied always before any other functions.&lt;br /&gt;
That is, stuff like &amp;quot;units/elves-wood/fighter.png~CROP(0,0,20,20)~CROP(10,10,10,10)&amp;quot; would result in taking a crop of the rectangle x=20;y=20;w=40;h=40 and then taking a crop from ''that'' rectangle as x=10;y=10;w=10;h=10 resulting in the area x=30;y=30;w=10;h=10 from the original graphic.&lt;br /&gt;
&lt;br /&gt;
[[Category:WML Reference]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=ImagePathFunctions&amp;diff=28979</id>
		<title>ImagePathFunctions</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=ImagePathFunctions&amp;diff=28979"/>
		<updated>2009-03-22T11:08:23Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing {{DevFeature}} tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Image Path Functions provide a simple method for WML coders to alter the way their specified images will be displayed in the game. All of the function parameters are included at the end of an image path and should not contain any spaces or special characters (other than those specified here).&lt;br /&gt;
&lt;br /&gt;
== Team-Color Function ==&lt;br /&gt;
In Wesnoth version 1.2, the only Image Path Function was '''~TC()''', which took two comma-separated parameters: the team number and the source color palette. The valid values for both of these parameters are defined in the file ''data/team-colors.cfg''&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
'''~TC(''' ''team number'' ''',''' ''source color palette'' ''')'''&lt;br /&gt;
*''team number'' - this is the first parameter, a number 1-9 signifying the team number of a unit. Number 1 typically means the red team, 2 typically means the blue team, and so on (unless the scenario color settings for any side have been altered).&lt;br /&gt;
*''source color palette'' - the second parameter is a source color palette, usually magenta. Do not surround this parameter with quotes.&lt;br /&gt;
&lt;br /&gt;
== Re-Color Function ==&lt;br /&gt;
May be used to change some colors in an image.&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
'''~RC(''' ''source color palette'' '''&amp;gt;''' ''color range ID'' ''')'''&lt;br /&gt;
*''source color palette'' - the first parameter is a source color palette, usually magenta. Do not surround this parameter with quotes.&lt;br /&gt;
*''color range ID'' - this is the second parameter, signifying the ID of a color range defined in the file ''data/core/team-colors.cfg'' (or it may be a custom ID for a color range defined locally).  &lt;br /&gt;
&lt;br /&gt;
{{DevFeature}} In the development version, the following syntax changes the RC function behavior for simply replacing colors matching the source color palette with colors of the target color palette:&lt;br /&gt;
&lt;br /&gt;
'''~RC(''' ''source color palette'' '''=''' ''target color palette'' ''')'''&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
In the following example, the magenta regions in an elvish captain's image are turned  a healthy shade of green:&lt;br /&gt;
&lt;br /&gt;
      [message]&lt;br /&gt;
            speaker=narrator&lt;br /&gt;
            image=units/elves-wood/captain.png~RC(magenta&amp;gt;green)&lt;br /&gt;
            message=_ &amp;quot;Now I am on the green team.&amp;quot;&lt;br /&gt;
      [/message]&lt;br /&gt;
&lt;br /&gt;
The IDs of the color ranges may be the lowercased English name of the palette's base color (e.g. 'red', 'brown', etc.). They may also be numeric color indices from the palette WML included with the game, but this is not recommended&lt;br /&gt;
&lt;br /&gt;
== Flip Function ==&lt;br /&gt;
May be used to flip an image horizontally and/or vertically&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
'''~FL(''' ''optional argument list'' ''')'''&lt;br /&gt;
*''vertical'' - if the string &amp;quot;vert&amp;quot; is found anywhere in the argument list, the image will be flipped vertically.&lt;br /&gt;
*''horizontal'' - if the string &amp;quot;horiz&amp;quot; is found anywhere in the argument list, the image will be flipped horizantally.&lt;br /&gt;
*if the argument list is empty, the image will only be flipped horizantally.&lt;br /&gt;
&lt;br /&gt;
== Greyscale Function ==&lt;br /&gt;
May be used to greyscale the image (turn to black and white)&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
'''~GS( )'''&lt;br /&gt;
&lt;br /&gt;
== Crop Function {{DevFeature}} ==&lt;br /&gt;
Extracts a rectangular section of an image file.&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
'''~CROP(x,y,width,height)'''&lt;br /&gt;
* ''x'',''y'': top-left corner coordinates for the rectangular section extracted. Must be greater or equal than zero, and inside the image's bounds.&lt;br /&gt;
* ''width'': width of the selected region. Must be less than or equal to the original image's width.&lt;br /&gt;
* ''height'': height of the selected region. Must be less than or equal to the original image's height.&lt;br /&gt;
&lt;br /&gt;
== Color-shift function {{DevFeature}} ==&lt;br /&gt;
Performs simple per-channel color shifts by adding the arguments to the respective color channels.&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
''Multi-channel:'' '''~CS(r,g,b)'''&lt;br /&gt;
''Single-channel:'' '''~R(v)''', '''~G(v)''', '''~B(v)'''&lt;br /&gt;
&lt;br /&gt;
The multichannel syntax assumes all arguments are set to zero initially, so one can use, e.g. ~CS(2,4) to add +2 and +4 units to the red and green channels respectively, leaving the blue channel intact. Arguments may be negative to diminish a channel's value; this can be used to change an image's brightness. Checks for out-of-range arguments or results (less than 0 or greater than 255) are made, so the resultant values are truncated if necessary.&lt;br /&gt;
&lt;br /&gt;
The single channel syntax behaves exactly the same, except that only single-channel modifications are made per function. However, one can stack them to produce the same behavior as ~CS(), e.g. ~R(r)~G(g)~B(b), but that tends to be just a performance loss.&lt;br /&gt;
&lt;br /&gt;
Any color-shift is performed before changing opacity or desaturating the graphic (see ~O() and ~GS()).&lt;br /&gt;
&lt;br /&gt;
== Image-scaling function {{DevFeature}} ==&lt;br /&gt;
Scales a graphic up or down.&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
'''~SCALE( ''new_width'', ''new_height'' )&lt;br /&gt;
&lt;br /&gt;
The ''new_width'' and ''new_height'' parameters are taken as the image's original width or height, respectively, if one of them happens to be zero. Negative values are treated in the same way, but an error is printed in stderr.&lt;br /&gt;
&lt;br /&gt;
== Opacity modifying function {{DevFeature}} ==&lt;br /&gt;
Changes an image's opacity at render time.&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
'''~O( ''factor or percentage%'' )'''&lt;br /&gt;
&lt;br /&gt;
If the argument includes the percentage symbol (''%''), it will be treated as a percentage of full (real) opacity; an image will be displayed at its native opacity with ~O(100%).&lt;br /&gt;
&lt;br /&gt;
Without the percentage symbol, the argument is assumed to be a factor by which the image's native opacity should be multiplied. Thus, ~O(0.5) and ~O(50%) are equivalent forms of specifying to reduce an image's opacity by half.&lt;br /&gt;
&lt;br /&gt;
== Blurring function {{DevFeature}} ==&lt;br /&gt;
Blurs a graphic at render time using the same algorithm used for in-game dialogs.&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
'''~BL( ''radius'' )'''&lt;br /&gt;
&lt;br /&gt;
== Precedence of Functions  ==&lt;br /&gt;
&lt;br /&gt;
All functions are applied in left-to-right order, with the exception of RC() and TC() which are applied always before any other functions.&lt;br /&gt;
That is, stuff like &amp;quot;units/elves-wood/fighter.png~CROP(0,0,20,20)~CROP(10,10,10,10)&amp;quot; would result in taking a crop of the rectangle x=20;y=20;w=40;h=40 and then taking a crop from ''that'' rectangle as x=10;y=10;w=10;h=10 resulting in the area x=30;y=30;w=10;h=10 from the original graphic.&lt;br /&gt;
&lt;br /&gt;
[[Category:WML Reference]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=LabelWML&amp;diff=28978</id>
		<title>LabelWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=LabelWML&amp;diff=28978"/>
		<updated>2009-03-22T11:04:31Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing {{DevFeature}} tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== The [label] tag == &lt;br /&gt;
&lt;br /&gt;
The following keys and tags are recognized in '''[label]''' tag:&lt;br /&gt;
&lt;br /&gt;
* '''text''': Visible text in label.&lt;br /&gt;
&lt;br /&gt;
* '''team_name''': Name of the team that can see the label. Label is visible to everyone if this is empty.&lt;br /&gt;
&lt;br /&gt;
* '''colour''': colour of the label. Format is ''r,g,b'' where r, g and b are number between 0 and 255.&lt;br /&gt;
&lt;br /&gt;
* '''x''': Location for the label&lt;br /&gt;
&lt;br /&gt;
* '''y''': Location for the label&lt;br /&gt;
&lt;br /&gt;
* '''fogged'''(Yes/No): Controls if the label is to be hidden under fog or not (by default all labels are hidden under fog)&lt;br /&gt;
[[Category:WML Reference]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Maintenance_tools&amp;diff=28975</id>
		<title>Maintenance tools</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Maintenance_tools&amp;diff=28975"/>
		<updated>2009-03-22T11:01:59Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing {{DevFeature}} tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Wesnoth source code distribution includes a couple of tools intended to help authors maintain campaigns, faction &amp;amp; unit packs, and other WML resources. These&lt;br /&gt;
are:&lt;br /&gt;
 &lt;br /&gt;
; wmlscope: a cross-reference lister, useful for finding unresolved macro and resource-file references.&lt;br /&gt;
&lt;br /&gt;
; wmllint: a utility for sanity-checking WML syntax and porting your old WML to the current version of WML.  &lt;br /&gt;
&lt;br /&gt;
; wmlindent: a utility for reindenting WML to a uniform style.&lt;br /&gt;
&lt;br /&gt;
You will need a Python interpreter on your system to use these tools.  Linux, *BSD, and Mac OS/X should already have Python installed; for Windows it's a free download&lt;br /&gt;
from http://www.python.org.  You will also need to know how to run command-line tools&lt;br /&gt;
on your system.&lt;br /&gt;
&lt;br /&gt;
All three tools will require you to supply a &amp;lt;i&amp;gt;directory list&amp;lt;/i&amp;gt;.  This is a set of directories containing the WML files you want to work on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Note to Windows Users:&amp;lt;/u&amp;gt; This means you have to run it from the '''Command Line'''. The command line may be reached by hitting Start, then Run, then &amp;quot;cmd&amp;quot; or &amp;quot;command&amp;quot; depending on your version of Windows.&lt;br /&gt;
&lt;br /&gt;
Example uses:&lt;br /&gt;
 python wmllint --oldversion=1.3.4 path\to\files&lt;br /&gt;
 python wmlindent path\to\files&lt;br /&gt;
&lt;br /&gt;
Another example:&lt;br /&gt;
 &amp;quot;C:\Program Files\Python2.4\python.exe&amp;quot; data\tools\wmllint --dryrun data\core data\{multiplayer,themes} data\campaigns &lt;br /&gt;
(You have to specify the full directory path to the executable if you don't have your environment variables set up correctly).&lt;br /&gt;
The first thing you type is the path to your python executable, followed by a space. The second thing you type is the path to the desired script to run, followed by a space. The third thing you type is the path to the folder (or file) to be processed.&lt;br /&gt;
&lt;br /&gt;
== wmlscope ==&lt;br /&gt;
&lt;br /&gt;
The main use for &amp;lt;tt&amp;gt;wmlscope&amp;lt;/tt&amp;gt; is to find WML macro references without definitions and references to resource files (sounds and images) that don't exist.  These are difficult to spot from in-game because they usually result in silence or a missing image rather than actual broken game logic.  They may happen because of typos in your WML, or because the name of a macro or the location of a resource file changed between versions of the game.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;wmlscope&amp;lt;/tt&amp;gt; also checks macro invocations for consistency.  It will complain&lt;br /&gt;
if a macro is called with the wrong number of arguments.  In most cases it can deduce information about the type of the literal expected to be passed to a given macro argument by looking at the name of the formal.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Type&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Meanining&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Formals requiring this type&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Literals of this type&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;macro&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A macro invocation&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;{.*}&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;numeric&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a numeric literal&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SIDE, X, Y, RED, GREEN, BLUE, TURN, RADIUS, *NUMBER, *AMOUNT, *COST, *_X, *_Y&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;\-?[0-9]+&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;position&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a coordinate, coordinate range, or set of coordinate ranges&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;POSITION&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;([0-9]+\-[0-9]+,?|[0-9]+,?)+&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;span&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a coordinate, coordinate range, or set of coordinate ranges&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;*_SPAN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;quot;melee&amp;quot; or &amp;quot;ranged&amp;quot;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;range&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;an attack range&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;quot;melee&amp;quot; or &amp;quot;ranged&amp;quot;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;alignment&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;an alignment keyword&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ALIGN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;quot;lawful&amp;quot; or &amp;quot;neutral&amp;quot; or &amp;quot;chaotic&amp;quot;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;image&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;an image name&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;IMAGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;string ending in .png or .jpg&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;terrain&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a terrain code&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TERRAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[A-Z][a-z]+\^[A-Z][a-z\\|/]+\Z&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;sound&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a music or sound resource&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MUSIC, SOUND&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;\.wav|\.ogg&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;affix&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a prefix, suffix, or infix for a variable name&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AFFIX&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;an ID or nothing &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;image&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;an image name&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;IMAGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;string ending in .png or .jpg&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;filter&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;filter expression&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FILTER&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;any non-quoted string containing &amp;quot;=&amp;quot;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;WML&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a WML fragment&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;*_WML&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;any non-quoted string containing &amp;quot;=&amp;quot;, or the empty string&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;name&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a name or ID&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NAME, VAR, IMAGESTEM, ID&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[A-Z][a-z]+\^[A-Z][a-z\\|/]+\Z&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;string&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a nonempty string not matching any of the preceding types&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TYPE, TEXT, *_TEXT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Anything surrounded by doublequotes, &lt;br /&gt;
'''or'' anything with embedded spaces that doesn't match one of the preceding types&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;optional string&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;a string value (may be empty)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DESCRIPTION, USER_DESCRIPTION&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Anything surrounded by doublequotes, &lt;br /&gt;
'''or'' anything with embedded spaces that doesn't match one of the preceding types&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;anything&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;*VALUE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;anything&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Any numeric or position is accepted by a span argument.  Any image or name is accepted for a string argument. Any actual argument that is a macro is accepted for any formal.  Otherwise, if the formal has an identifiable type, &amp;lt;tt&amp;gt;wmlscope&amp;lt;/tt&amp;gt; will complain if the actual literal does not match it.&lt;br /&gt;
&lt;br /&gt;
The argument type check only works in macro calls that fit on a single line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;wmlscope&amp;lt;/tt&amp;gt; has many options for changing the reports it generates; the more advanced ones are intended for Wesnoth developers.  Invocations for the most commonly useful reports it generates are included in &amp;lt;i&amp;gt;data/tools/Makefile&amp;lt;/i&amp;gt; of the source distribution. Here are some of those reports:&lt;br /&gt;
&lt;br /&gt;
; make unresolved: Report on unresolved macro calls and resource references; also report macro argument-type mismatches.  (This is what you are most likely to want to do). &lt;br /&gt;
&lt;br /&gt;
; make all: Report all macro and resource file references, not just unresolved ones.&lt;br /&gt;
&lt;br /&gt;
; make collisions: Report on duplicate resource files.&lt;br /&gt;
&lt;br /&gt;
For more advanced users, or those who want to understand what the canned Makefile invocations are doing, here is a summary of &amp;lt;tt&amp;gt;wmlscope&amp;lt;/tt&amp;gt;'s options. Some of the more advanced options will require you to understand &lt;br /&gt;
[http://docs.python.org/lib/re-syntax.html Python regular expressions].&lt;br /&gt;
&lt;br /&gt;
; -h, --help:                 Emit a help message and quit&lt;br /&gt;
; -c, --crossreference:       Report resolved macro references (implies -w 1)&lt;br /&gt;
; -C, --collisions:           Report duplicate resource files   &lt;br /&gt;
; -d, --deflist:              Make definition list.  (This one is for campaign server maintainers.)&lt;br /&gt;
; -e &amp;lt;i&amp;gt;regexp&amp;lt;/i&amp;gt;, --exclude &amp;lt;i&amp;gt;regexp&amp;lt;/i&amp;gt;:   Ignore files matching the specified regular expression. &lt;br /&gt;
; -f &amp;lt;i&amp;gt;dir&amp;lt;/i&amp;gt;, --from &amp;lt;i&amp;gt;dir&amp;lt;/i&amp;gt;:         Report only on macros defined under &amp;lt;i&amp;gt;dir&amp;lt;/i&amp;gt;&lt;br /&gt;
; -l, --listfiles:            List files that will be processed&lt;br /&gt;
; -r &amp;lt;i&amp;gt;ddd&amp;lt;/i&amp;gt;, --refcount=&amp;lt;i&amp;gt;ddd&amp;lt;/i&amp;gt;:     Report only on macros with references in exactly &amp;lt;i&amp;gt;ddd&amp;lt;/i&amp;gt; files.&lt;br /&gt;
; -u, --unresolved:           Report unresolved macro references&lt;br /&gt;
; -w, --warnlevel:            Set to 1 to warn of duplicate macro definitions&lt;br /&gt;
; --force-used reg:          Ignore reference count 0 on names matching regexp&lt;br /&gt;
; --extracthelp:              Extract help from macro definition comments.&lt;br /&gt;
&lt;br /&gt;
== wmllint ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;wmllint&amp;lt;/tt&amp;gt; is a tool for migrating your WML to the current version.  It handles two problems: &lt;br /&gt;
&lt;br /&gt;
* Resource files and macro names may change between versions of the game. &amp;lt;tt&amp;gt;wmllint&amp;lt;/tt&amp;gt; knows about these changes and will tweak your WML to fit where it can.&lt;br /&gt;
&lt;br /&gt;
* Between 1.2.x and 1.3.1 the terrain-coding system used in map files underwent a major change. It changed again in a minor way between 1.3.1 and 1.3.2.  &amp;lt;tt&amp;gt;wmllint&amp;lt;/tt&amp;gt; will translate your maps for you, unless you use custom terrains in which case you will have to do it by hand.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;wmllint&amp;lt;/tt&amp;gt; also performs various sanity-checking operations, reporting:&lt;br /&gt;
&lt;br /&gt;
* unbalanced tags&lt;br /&gt;
* strings that need a translation mark and do not have them&lt;br /&gt;
* strings that have a translation mark and should not&lt;br /&gt;
* translatable strings containing macro references &lt;br /&gt;
* filter references by description= (id= in 1.5) not matched by an actual unit&lt;br /&gt;
* abilities or traits without matching special notes, or vice-versa&lt;br /&gt;
* consistency between recruit= and recruitment_pattern= instances&lt;br /&gt;
* double space after punctuation in translatable strings.&lt;br /&gt;
* unknown races or movement types in units&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;wmllint&amp;lt;/tt&amp;gt; takes a directory-path argument specifying the WML directories to work on.  It will modify any cfg and map files under those directories that need to be changed.  Here is a summary of its options:&lt;br /&gt;
&lt;br /&gt;
; -h, --help:                 Emit a help message and quit.&lt;br /&gt;
; -d, --dryrun:               List changes but don't perform them.&lt;br /&gt;
; -v, --verbose:              Set verbosity; more details below.&lt;br /&gt;
; -c, --clean:                Clean up -bak files.&lt;br /&gt;
; -D, --diff:                 Show diffs between unconverted and unconverted files.&lt;br /&gt;
; -r, --revert:               Revert the conversion from the -bak files.&lt;br /&gt;
; -n, --nolift:               Suppress lifting, do sanity checks only &lt;br /&gt;
&lt;br /&gt;
The verbosity option works like this:&lt;br /&gt;
&lt;br /&gt;
; -v:          lists changes.&lt;br /&gt;
; -v -v:       warns of maps already converted.&lt;br /&gt;
; -v -v -v:    names each file before it's processed.&lt;br /&gt;
; -v -v -v -v: shows verbose parse details (developers only).&lt;br /&gt;
&lt;br /&gt;
The recommended procedure is this:&lt;br /&gt;
&lt;br /&gt;
# Run it with --dryrun first to see what it will do.&lt;br /&gt;
# If the messages look good, run without --dryrun; the old content will be left in backup files with a -bak extension.&lt;br /&gt;
# Eyeball the changes with the --diff option.&lt;br /&gt;
# Use wmlscope, with a directory path including the Wesnoth mainline WML, to check that you have no unresolved references.&lt;br /&gt;
# Test the conversion.&lt;br /&gt;
# Use either --clean to remove the -bak files or --revert to undo the conversion.&lt;br /&gt;
&lt;br /&gt;
Wmllint now in 1.6 has the additional feature that it tries to locate a spell checker on your system and spell-checks storyline and message strings.  It will work automatically with either aspell, myspell, or ispell provided you have the &amp;lt;tt&amp;gt;enchant.py&amp;lt;/tt&amp;gt; Python library installed.&lt;br /&gt;
&lt;br /&gt;
== wmlindent ==&lt;br /&gt;
&lt;br /&gt;
Call with no arguments to filter WML on standard input to reindented WML on&lt;br /&gt;
standard output.  If arguments are specified, they are taken to be files to be&lt;br /&gt;
re-indented in place; interrupting will be safe, as each reindenting&lt;br /&gt;
will be done to a copy that is atomically renamed when it's done. This&lt;br /&gt;
code never modifies anything but blank lines and leading and trailing whitespace on non-blank lines.&lt;br /&gt;
&lt;br /&gt;
The indent unit is four spaces.  Absence of an option to change this is&lt;br /&gt;
deliberate; the purpose of this tool is to prevent style wars, not encourage&lt;br /&gt;
them.&lt;br /&gt;
&lt;br /&gt;
If you don't apply this tool to your own WML, the mainline-campaign maintainers &lt;br /&gt;
will do it when and if your code is accepted into the tree.&lt;br /&gt;
&lt;br /&gt;
Note: This tool does not include a parser.  It will produce bad results on WML&lt;br /&gt;
that is syntactically unbalanced.  Unbalanced double quotes that aren't part&lt;br /&gt;
of a multiline literal will also confuse it.  You will receive warnings&lt;br /&gt;
oiif there's an indent open at end of file or if a closer occurs with&lt;br /&gt;
indent already zero; these two conditions strongly suggest unbalanced WML.&lt;br /&gt;
&lt;br /&gt;
[[Category:Create]]&lt;br /&gt;
[[Category:Tools]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=MultiplayerServerWML&amp;diff=28973</id>
		<title>MultiplayerServerWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=MultiplayerServerWML&amp;diff=28973"/>
		<updated>2009-03-22T10:59:35Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing {{DevFeature}} tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Multiplayer Server WML =&lt;br /&gt;
This page describes the WML used to communicate with the multiplayer server (wesnothd).&lt;br /&gt;
&lt;br /&gt;
== The login procedure ==&lt;br /&gt;
&lt;br /&gt;
* server request (optional)&lt;br /&gt;
** '''[version]'''&lt;br /&gt;
&lt;br /&gt;
* client response&lt;br /&gt;
** '''[version]'''&lt;br /&gt;
*** '''version''': The client's version string.&lt;br /&gt;
&lt;br /&gt;
* server request&lt;br /&gt;
** '''[mustlogin]'''&lt;br /&gt;
&lt;br /&gt;
* client response&lt;br /&gt;
** '''[login]'''&lt;br /&gt;
*** '''username''': The username the client would like to have.&lt;br /&gt;
*** '''password_reminder''': If &amp;quot;yes&amp;quot; the client requests the server to send a password reminder for the provided username.&lt;br /&gt;
*** '''password''': The hashed password, created from the username, the password and salt received from the server.&lt;br /&gt;
&lt;br /&gt;
* server response&lt;br /&gt;
** '''[join_lobby]''' or&lt;br /&gt;
** '''[error]'''&lt;br /&gt;
*** '''message''': The error message.&lt;br /&gt;
*** '''password_request''': If not empty the server asks the client to provide a password for its desired username.&lt;br /&gt;
*** '''phpbb_encryption''': If &amp;quot;yes&amp;quot; the client will encrypt the password using phpbb's algorithm.&lt;br /&gt;
*** '''random_salt''': Random salt sent to the client for mixing with the password hash.&lt;br /&gt;
*** '''hash_seed''': Salt generated from the original hash that is required to recreate it.&lt;br /&gt;
*** '''salt''': Salt generated from the original hash that is required to recreate it.&lt;br /&gt;
*** '''force_confirmation''': Display an ok/cancel dialog with the content of the 'message' key.&lt;br /&gt;
&lt;br /&gt;
* server response&lt;br /&gt;
** '''[gamelist]'''&lt;br /&gt;
*** '''[game]''' (repeated)&lt;br /&gt;
**** '''id''': A unique id of the game.&lt;br /&gt;
**** '''name''': The title of the game.&lt;br /&gt;
**** '''mp_scenario''': The id of the scenario.&lt;br /&gt;
**** '''mp_era''': The id of the used era.&lt;br /&gt;
**** '''mp_use_map_settings''': Does the game use the map settings specified in the scenario.&lt;br /&gt;
**** '''mp_fog''': Does the game use fog.&lt;br /&gt;
**** '''mp_shroud''': Does the game use shroud.&lt;br /&gt;
**** '''mp_village_gold''': The number of gold per village.&lt;br /&gt;
**** '''experience_modifier''': The experience setting.&lt;br /&gt;
**** '''mp_countdown''': Does the game use a timer.&lt;br /&gt;
**** '''mp_countdown_reservoir_time''': Upper limit of the possibly available time.&lt;br /&gt;
**** '''mp_countdown_init_time''': Initial time.&lt;br /&gt;
**** '''mp_countdown_action_bonus''': Time bonus per action.&lt;br /&gt;
**** '''mp_countdown_turn_bonus''': Time bonus per turn.&lt;br /&gt;
**** '''map_data''': The map data.&lt;br /&gt;
**** '''hash''': The hash value of the map_data.&lt;br /&gt;
**** '''observer''': Are observers allowed or not.&lt;br /&gt;
**** '''human_sides''': The number of sides played by humans.&lt;br /&gt;
**** '''slots''': The number of vacant/max slots.&lt;br /&gt;
**** '''turn''': The current turn/max turn.&lt;br /&gt;
** '''[user]''' (repeated)&lt;br /&gt;
*** '''name''': The username of the player.&lt;br /&gt;
*** '''game_id''': The ID of the game the player is in (version 1.3.7+svn).&lt;br /&gt;
*** '''location''': The name of the game the player is in.&lt;br /&gt;
*** '''available''': &amp;quot;yes&amp;quot; if the player is in the lobby; &amp;quot;no&amp;quot; if in a game.&lt;br /&gt;
Many of the keys under [game] are described more indepth on the [[ScenarioWML]] page.&lt;br /&gt;
&lt;br /&gt;
== Error messages ==&lt;br /&gt;
&lt;br /&gt;
* '''[error]'''&lt;br /&gt;
** '''message''': The error message.&lt;br /&gt;
&lt;br /&gt;
== Chat (lobby and in-game) ==&lt;br /&gt;
&lt;br /&gt;
* '''[message]'''&lt;br /&gt;
** '''sender''': (optional - filled by the server) The sender of the message.&lt;br /&gt;
** '''message''': The message itself.&lt;br /&gt;
* '''[whisper]'''&lt;br /&gt;
** '''receiver''': The receiver of the whisper&lt;br /&gt;
** '''sender''': (optional - filled by the server) The sender of the whisper.&lt;br /&gt;
** '''message''': The message itself.&lt;br /&gt;
&lt;br /&gt;
== Nick registration related commands (lobby and in-game) ==&lt;br /&gt;
&lt;br /&gt;
* '''[nickserv]'''&lt;br /&gt;
** '''[register]'''&lt;br /&gt;
*** '''password''': The password for the nick.&lt;br /&gt;
*** '''mail''': The email address for the nick.&lt;br /&gt;
** '''[drop]''': Drop this username.&lt;br /&gt;
** '''[set]''': Set a detail (e.g. email address) for this nick.&lt;br /&gt;
*** '''detail''': The detail, e.g. &amp;quot;mail&amp;quot;.&lt;br /&gt;
*** '''value''': The new value for this detail, e.g. &amp;quot;user@edomain&amp;quot;&lt;br /&gt;
** '''[info]''': Request info about another username.&lt;br /&gt;
*** '''name''': The username.&lt;br /&gt;
&lt;br /&gt;
== Updating the lobby state ==&lt;br /&gt;
&lt;br /&gt;
* '''[gamelist_diff]''': server message - basically a diff from two [gamelist]s; the keys listed are the ones that actually occure in practice&lt;br /&gt;
** '''index''': The index of a user.&lt;br /&gt;
** '''[insert_child]''' A new user logged on.&lt;br /&gt;
*** '''[user]'''&lt;br /&gt;
**** '''name''': The name of the user.&lt;br /&gt;
**** '''available''' &amp;quot;yes&amp;quot;&lt;br /&gt;
*** '''[delete_child]''' A user logged off.&lt;br /&gt;
** '''[change_child]'''&lt;br /&gt;
*** '''[user]'''&lt;br /&gt;
**** '''[insert]''': A user joined/left a game.&lt;br /&gt;
***** '''available''': &amp;quot;yes&amp;quot; when the user left a game. &amp;quot;no&amp;quot; when the user joined a game&lt;br /&gt;
***** '''location''': The name of the game the user joined.&lt;br /&gt;
**** '''[delete]'''&lt;br /&gt;
***** '''location''': &amp;quot;x&amp;quot; when a game was left.&lt;br /&gt;
*** '''[gamelist]'''&lt;br /&gt;
**** '''index''': Index of the game in question.&lt;br /&gt;
**** '''[insert_child]''': A game started.&lt;br /&gt;
***** '''[game]''' All the usual keys of [game] possible, see above.&lt;br /&gt;
**** '''[delete_child]''': A game ended.&lt;br /&gt;
***** '''[game]'''&lt;br /&gt;
**** '''[change_child]''': Something changed in a game.&lt;br /&gt;
***** '''[game]'''&lt;br /&gt;
****** '''[insert]'''&lt;br /&gt;
******* '''slots''': The number of free slots in the form: free/max slots&lt;br /&gt;
******* '''turn''': The turn number in the form: current turn/max turns&lt;br /&gt;
****** '''[delete]'''&lt;br /&gt;
******* '''map''': &amp;quot;x&amp;quot; comes with every ''turn'' or ''slots'' change for games with shroud&lt;br /&gt;
******* '''mp_scenario''': &amp;quot;x&amp;quot; comes with ''turn'' and ''slots'' changes for games with no scenario id&lt;br /&gt;
&lt;br /&gt;
* '''[observer]''' or '''[observer_quit]''': server message - players joining([observer_quit] - quitting the lobby &amp;quot;game&amp;quot;)/quitting([observer] - joining the lobby &amp;quot;game&amp;quot;) a game&lt;br /&gt;
** '''name''': Username of the player/observer.&lt;br /&gt;
&lt;br /&gt;
== Game setup (the phase from creation to start) ==&lt;br /&gt;
To create a game the client sends:&lt;br /&gt;
* '''[create_game]'''&lt;br /&gt;
** '''name''': The title of the game.&lt;br /&gt;
&lt;br /&gt;
followed by a message with the scenario options as under [game] (see above) plus the scenario data ([time], [era], [side], etc. see [[ScenarioWML]])&lt;br /&gt;
&lt;br /&gt;
* '''[join]'''&lt;br /&gt;
** '''id''': The id of the game.&lt;br /&gt;
** '''observe''': Join the game as an observer.&lt;br /&gt;
&lt;br /&gt;
* '''[scenario_diff]''': [[ScenarioWML]] diff (side changes, etc.)&lt;br /&gt;
&lt;br /&gt;
* '''[start_game]''': sent by the host to start a game&lt;br /&gt;
* '''[leave_game]''': sent by the client when it leaves a game; sent by the server to make a client leave a game&lt;br /&gt;
&lt;br /&gt;
== In-game communication ==&lt;br /&gt;
&lt;br /&gt;
* '''[store_next_scenario]''': sent by the host - the scenario data (see [[ScenarioWML]]) to advance to the next scenario&lt;br /&gt;
* '''[notify_next_scenario]''': sent by the server to tell players that the data for the next scenario is available&lt;br /&gt;
* '''[load_next_scenario]''': sent by the client to request the data for the next scenario&lt;br /&gt;
* '''[next_scenario]''': data for the next scenario (see [[ScenarioWML]]), sent by the server on request&lt;br /&gt;
&lt;br /&gt;
* '''[info]''': sent by the host on game end - info about the game state&lt;br /&gt;
** '''type''': &amp;quot;termination&amp;quot; &lt;br /&gt;
** '''condition''': the termination reason&lt;br /&gt;
&lt;br /&gt;
* '''[change_controller]''': a player (un)droids one of his sides or assigns control to someone else (The host can assign control for any side.)&lt;br /&gt;
** '''side''': the side to change controller&lt;br /&gt;
** '''player''': the nick of the player to take control&lt;br /&gt;
** '''controller''': the new controller: &amp;quot;human&amp;quot; or &amp;quot;human_ai&amp;quot;&lt;br /&gt;
** '''own_side''': &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If a player leaves this is sent to the host for all sides he owned.&lt;br /&gt;
* '''side_drop''': The number of a side that dropped because a player left.&lt;br /&gt;
* '''controller''': The controller of that side. (&amp;quot;ai&amp;quot;, &amp;quot;network&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
* '''[muteall]''': the host mutes/unmutes all observers - toggles&lt;br /&gt;
* '''[mute]''': the host mutes an observer - toggles&lt;br /&gt;
** '''username''': the username of the observer - if not specified the servers returns a list of muted usernames&lt;br /&gt;
* '''[kick]''' or '''[ban]''': the host kicks/bans a player/observer&lt;br /&gt;
** '''username''': the username of the player/observer&lt;br /&gt;
&lt;br /&gt;
* '''[turn]'''&lt;br /&gt;
** '''[command]''': (repeated) can contain all the tags you can find in a replay: [recruit], [move], [end_turn], etc.&lt;br /&gt;
*** '''[speak]'''&lt;br /&gt;
**** '''message''': text of the message&lt;br /&gt;
**** '''id''': the sender&lt;br /&gt;
**** '''team_name''': the name of the team the message is for - empty if it's a public message&lt;br /&gt;
&lt;br /&gt;
== Administrative commands ==&lt;br /&gt;
* '''[query]'''&lt;br /&gt;
** '''type''': The type of query. See [[ServerAdministration]] for details.&lt;br /&gt;
&lt;br /&gt;
[[Category:WML Reference]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Authoring_tools&amp;diff=28969</id>
		<title>Authoring tools</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Authoring_tools&amp;diff=28969"/>
		<updated>2009-03-22T10:46:36Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing {{DevFeature}} tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page collects information about tools in the Wesnoth source tree that are intended to help you write campaign WML.  At present there is only one such tool: &amp;lt;tt&amp;gt;trackplacer&amp;lt;/tt&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
== trackplacer ==&lt;br /&gt;
&lt;br /&gt;
'''trackplacer''' is a tool for visually editing journey tracks.  Journey tracks are the sequences of dots, crossed-sword, and flag symbols (track markers) that march across the story screens at the beginning of many Wesnoth scenarios.&lt;br /&gt;
&lt;br /&gt;
A 'journey' is an object containing a map file name and a (possibly empty) list of tracks, each with a name and each consisting of a sequence of track markers. This program exists to visually edit journeys represented as specially delimited sections in in .cfg files.&lt;br /&gt;
&lt;br /&gt;
When you run '''trackplacer''', it will pop up a file selection dialog asking you to select either a map image or a .cfg file.  When you select a map image, you will be starting a new set of journey tracks on that map.  If you select a .cfg, the .cfg will be scanned for macros describing journey tracks.  All other content in the .cfg, except for some magic special comments interpreted by '''trackplacer''' (which will be described later on) is ignored.&lt;br /&gt;
&lt;br /&gt;
Once you have a map (and possibly also a set of track for it), there is always a currently selected track (shown in red) and possibly one or more unselected tracks (shown in white).  You can add journey markers to the select track by clicking the left mouse button; they will appear on the screen.  The rule for adding markers to the track is as follows: if the two markers closest to the mouse pointer are adjacent on the track, insert the new marker between them in the track order. Otherwise, append it to the end of the track.&lt;br /&gt;
&lt;br /&gt;
You can click on and drag a marker with the middle mouse button to move it. Moving a marker preserves its place in the track order.  The right mouse button pops up an information window describing all features overlapping the pointer; it will disappear when you release.&lt;br /&gt;
&lt;br /&gt;
Radiobuttons in the upper-left-hand corner of the '''trackplacer''' window let you select placing battle markers (crossed swords) and rest markers (a flag).  If you click the trashcan icon, clicking on track markers will remove them.  If you click the copy/convert button, clicking on unselected track markers will copy them. &lt;br /&gt;
&lt;br /&gt;
When copying, '''trackplacer''' looks under the mouse pointer for a marker from an unselected track.  If it finds one, it creates a matching new icon on the selected track, preserving its pixel coordinates exactly.  This can be useful when you want two named tracks to end at exactly the same spot.&lt;br /&gt;
&lt;br /&gt;
The '''Animate''' button erases all icons, then redisplays them in order with a delay between each redraw, so you can see the track order.&lt;br /&gt;
&lt;br /&gt;
The '''Save''' button saves your work.  Your track will be saved on .cfg format as a sequence of macro definitions that you can insert in the story parts of your campaign.  Conventionally, the place to put this .cfg is in a file named 'journey.cfg' in the 'utils/' directory of your campaign, near your private macro files (if you have any).  Then the definitions will automatically be available in your scenario files.&lt;br /&gt;
&lt;br /&gt;
The '''Properties''' button brings up a dialog that allows you to edit key/value pairs associated with the track that may affect the behavior of '''trackplacer'''. Currently only two such properties are defined: &amp;quot;map&amp;quot; has the name of the track's base file as its value, and &amp;quot;prefix&amp;quot; sets the prefix to be used when generating macro names (defaulting to '''JOURNEY''').&lt;br /&gt;
&lt;br /&gt;
The '''Tracks''' button pops up a list of controls, one for each track.  You can change the state of the checkboxes to control which tracks are visible. The radiobuttons can be used to select a track for editing.  You can also add and rename tracks here.  Hover over the controls for tooltips.&lt;br /&gt;
&lt;br /&gt;
The Help button displays documentation.&lt;br /&gt;
&lt;br /&gt;
The Quit button ends your session, asking for confirmation if you have unsaved changes.&lt;br /&gt;
&lt;br /&gt;
To understand what your 'journey.cfg' does, you need to know that journey-track markers can be put on your story screens by two different sets of macros.  One, used for 'new' marks, is displayed in color with quarter-second delays; the other, 'old' set displays marks in white with no delay.  Your journey track is divided into stages by battle and rest markers; conventionally, you want to display the latest (most recent) stage with the new macros and all previous stages with the old ones.  &lt;br /&gt;
&lt;br /&gt;
Your track will be saved in .cfg format as a sequence of macro definitions with names like '''JOURNEY_STAGE_1''', '''JOURNEY_STAGE_2''' and so on.  '''JOURNEY_STAGE_1''' will draw the first stage in the 'new' color parts.  '''JOURNEY_STAGE_2''' will draw the first stage in the 'old' color and the second stage in the 'new' one; '''JOURNEY_STAGE_3''' will draw the first and second stages in the 'old' color parts and the third stage in the 'new' one; and so on.&lt;br /&gt;
&lt;br /&gt;
There will be a final macro '''JOURNEY_COMPLETE''' that displays the entire track in the 'old' color. This will be useful when you are piecing together multiple tracks, say for a campaign with branches.&lt;br /&gt;
&lt;br /&gt;
The track information in your journey.cfg will be enclosed in special comments&lt;br /&gt;
that look like this:&lt;br /&gt;
&lt;br /&gt;
    # trackplacer: tracks begin&lt;br /&gt;
    # trackplacer: tracks end&lt;br /&gt;
&lt;br /&gt;
'''trackplacer''' will not alter anything it finds outside these comments, and will always enclose everything it writes in them.&lt;br /&gt;
&lt;br /&gt;
Special comments may appear in your ''journey.cfg'', looking like this:&lt;br /&gt;
&lt;br /&gt;
     &amp;lt;tt&amp;gt;# trackplacer: &amp;amp;lt;property&amp;amp;gt;=&amp;amp;lt;value&amp;amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These set properties that '''trackplacer''' may use.  At present there is only one such property: &amp;lt;tt&amp;gt;map&amp;lt;/tt&amp;gt;, which records the name of the mapfile on which your track is laid.  Don't remove this comment, '''trackplacer''' needs it.&lt;br /&gt;
&lt;br /&gt;
'''trackplacer''' has one known bug: you can confuse it (or possibly the underlying toolkit, or X) by dragging markers rapidly across other markers. If this happens to you, click '''Animate''' to refresh and slow down.&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=ReplaceMapWML&amp;diff=28968</id>
		<title>ReplaceMapWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=ReplaceMapWML&amp;diff=28968"/>
		<updated>2009-03-22T10:45:22Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing {{DevFeature}} tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== The [replace_map] tag ==&lt;br /&gt;
The [replace_map] tag allows a complete change of the map in a scenario. Unlike [[TerrainMaskWML|terrain_mask]], changing the map size is possible, although requires special attention. Since the map is changed completely, there is no equivalent of terrain_mask &amp;quot;alpha channel&amp;quot; feature.&lt;br /&gt;
&lt;br /&gt;
* '''map''': a Wesnoth map; see [[BuildingMaps]].&lt;br /&gt;
* '''expand''': (default=no) allow the map size to increase (in either dimension)&lt;br /&gt;
* '''shrink''': (default=no) allow the map size to decrease (in either direction)&lt;br /&gt;
&lt;br /&gt;
Expanding maps are generally more predictable than shrinking maps. When shrinking, units left off the new map area will be added to a recall list if there is one, and removed otherwise (and an error message is issued).&lt;br /&gt;
&lt;br /&gt;
The expansion direction is currently always bottom-right.&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=CampaignWML&amp;diff=28966</id>
		<title>CampaignWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=CampaignWML&amp;diff=28966"/>
		<updated>2009-03-22T10:40:21Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing {{DevFeature}} tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== the [campaign] tag ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
Dacyn and/or Invisible Philosopher -- please be careful&lt;br /&gt;
you don't reduce the signal-to-noise ratio on the WML pages&lt;br /&gt;
when editing!  Eg. knowing that a tag is translatable is _important_&lt;br /&gt;
for the 29 translations we have in progress. -- ott&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page describes how the campaign is displayed in the &amp;quot;Campaign&amp;quot; menu, and how it starts.&lt;br /&gt;
&lt;br /&gt;
'''[campaign]''' describes a campaign&lt;br /&gt;
* '''id''': the internal campaign identifier used to classify saved games&lt;br /&gt;
* '''icon''': the image displayed in the campaign selection menu&lt;br /&gt;
* '''name''': (translatable) name displayed in the campaign selection menu&lt;br /&gt;
* '''abbrev''': (translatable) abbreviation used as a prefix for savefile names made from this campaign&lt;br /&gt;
* '''image''': the image shown in the information pane when this campaign is selected in the campaign selection menu (typically 205×205 pixels)&lt;br /&gt;
* '''description''': (translatable) text shown in the information pane when this campaign is selected in the campaign selection menu&lt;br /&gt;
* '''define'''='''''CAMPAIGN_SYMBOL''''' when this campaign is started, the preprocessor symbol '''''CAMPAIGN_SYMBOL''''' will be defined. See '''#ifdef''' in [[PreprocessorRef]] for how this can be used to isolate parts of the campaign file from other campaigns. Only the tags '''[campaign]''' and '''[binary_path]''' (see [[BinaryPathWML]]) should go outside of '''#ifdef ''CAMPAIGN_SYMBOL'''''. This symbol will be defined ''before'' any .cfg is preprocessed.&lt;br /&gt;
* '''extra_defines''': a comma(''',''') separated list of preprocessor symbols. Those symbols will be defined ''before'' any .cfg is preprocessed.&lt;br /&gt;
* '''difficulties''': a comma(''',''') separated list of preprocessor symbols, exactly one of which will be stored depending on the difficulty setting chosen when the campaign is started. The symbols '''EASY''', '''NORMAL''', and '''HARD''' are usually used, and there are several macros in utils.cfg (see [[UtilWML]]) which check for these values to set WML keys to different values depending on difficulty.  If you use different difficulty symbols, you may need to define your own versions of these macros.&lt;br /&gt;
* '''difficulty_descriptions''': the menu of difficulties; this is a list of descriptions (see [[DescriptionWML]]) that correspond to different difficulty levels. Since each description is a menu option for a difficulty level, this must provide the same number of descriptions as there are levels in the ''difficulties'' list.&lt;br /&gt;
* '''first_scenario''': the ID of the first scenario in the campaign; see ''id'' in [[ScenarioWML]]&lt;br /&gt;
* '''rank''': a number that determines the order of campaigns in the campaign selection menu.  Lower ''rank'' campaigns appear earlier, with unranked campaigns at the end. Currently the mainline campaigns use multiples of 10 from 0 to 399, with 0-99 for Novice campaigns, 100-199 for Intermediate campaigns, and 200-399 for Expert campaigns; if you specify this, it should not be less than 400.  (Note: This replaces an older convention that topped out at 50.)&lt;br /&gt;
* '''[about]''': inserts your own credits into the game's list of credits. The campaign's name automatically is inserted at the top of the rolling credits followed by title/text key pairs.  There can be any number of '''[about]''' tags inside a '''[campaign]''' tag, but none of them will display credits if there is no &amp;quot;id&amp;quot; key present inside [campaign] (see above). The '''[about]''' tag has the following keys:&lt;br /&gt;
** '''title''': (translatable) large text used to start a new subsection (writers, artists, units, balancing) in the rolling credits&lt;br /&gt;
** '''text''': (translatable, but you probably won't want to make it such) smaller text which is displayed before the contributor names&lt;br /&gt;
** '''[entry]''': Contains information about a single contributor. Only the ''name'' key will be used in-game, the other three keys are for display on the Credits website.&lt;br /&gt;
*** '''name''': The name of the contributor&lt;br /&gt;
*** '''comment''': Optional short note about what that person did&lt;br /&gt;
*** '''email''': Optional email address&lt;br /&gt;
*** '''wikiuser''': Optional, the user name on the wiki&lt;br /&gt;
** '''end_text''': Text that is shown centered in a black screen at the end of a campaign. Defaults to &amp;quot;The End&amp;quot;.&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.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[PreprocessorRef]]&lt;br /&gt;
* [[ScenarioWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
* [[PblWML]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=AnimationWML&amp;diff=28965</id>
		<title>AnimationWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=AnimationWML&amp;diff=28965"/>
		<updated>2009-03-22T10:39:55Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing {{DevFeature}} tags (not finished yet)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page covers unit animations. At any point in game, units are playing an animation. Even when the unit is standing, it is actually playing a single frame animation.&lt;br /&gt;
&lt;br /&gt;
This page will deal with the two problems of animations&lt;br /&gt;
* How are animations Chosen&lt;br /&gt;
* What exactly is drawn&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How animations are drawn ==&lt;br /&gt;
=== Animations ===&lt;br /&gt;
Any unit has a huge set of animations to choose from. Animations are WML blocks in the unit type, enclosed in either the generic type '''[animation]''' or some more specific tags such as '''[attack_anim]''' '''[idle_anim]''' and the like. An animation is what a unit displays when a given event is triggered, and a certain set of conditions are met such as&lt;br /&gt;
* unit is attacking&lt;br /&gt;
* unit is idling&lt;br /&gt;
* unit is attacking (event) and uses a melee weapon (condition)&lt;br /&gt;
* unit is attacking (event) and uses a melee weapon (condition) and opponent can't retaliate (condition)&lt;br /&gt;
&lt;br /&gt;
events and conditions are described entirely in the [animation] block, and will be discussed in the animation choice section.&lt;br /&gt;
&lt;br /&gt;
=== Frames ===&lt;br /&gt;
    &lt;br /&gt;
An animation is cut in frames. Frames are WML blocks that are contained either in '''[frame]''' WML blocks or in generic '''[xxx_frame]''' block. (the xxx part can be any string not starting with an underscore) the xxx part in the frame name is called the frame prefix. frames of the type '''[frame]''' are said to have an empty prefix&lt;br /&gt;
&lt;br /&gt;
A frame typically describes an image, where an how to render it. It can contain such things as&lt;br /&gt;
* the image to display&lt;br /&gt;
* how transparent should that image be&lt;br /&gt;
* where to draw that image.&lt;br /&gt;
&lt;br /&gt;
At any given time, an animation will display one frame for each frame prefix it can find. I.e if your animation has both '''[frame]''' and '''[missile_frame]''' blocks, both will be displayed at the same time&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The frame with the empty prefix is special in many way. It is assumed to contain the image representing the unit itself, and as such the engine will heavily temper with it in multiple ways, such as providing a default image if none is available, or forcing the image to be green when the unit is poisoned&lt;br /&gt;
&lt;br /&gt;
=== Timing, Clock, Multiple animations ===&lt;br /&gt;
When an animation is played it has an internal clock that is run. The step of this clock is the milisecond, and each frame is played for a given duration. Each animation also has a starting time which tells the animation engine at what value the animation clock should start&lt;br /&gt;
&lt;br /&gt;
This starting time is very important when multiple animations from different units are played synchronously  Typically a fight involves a unit playing its defense animation while the opponent plays it's attack animation (and a third might play its leading animation, too). In that case all animations have a common clock, and are played concurrently.&lt;br /&gt;
&lt;br /&gt;
The convention is that the &amp;quot;important time&amp;quot; (usually the time of the hit) is at time 0. everything before should be at negative time, everything after at positive time. This is a WML convention that is not enforced by the engine&lt;br /&gt;
&lt;br /&gt;
In that case, it is very important that these animations (which can have different lengths) be synchronized. Fight animations are synchronized around the point of impact, so they all reach time 0 when the attack lands (or misses). This is accomplished through the use of the '''start_time''' key of the '''[animation]''' tag.&lt;br /&gt;
&lt;br /&gt;
Just like the '''[frame]''' tag can have a prefix, so can the '''start_time''' key. A '''start_time''' key without prefix will affect a '''[frame]''' tag without prefix, while a '''start_time''' key with a prefix will affect a '''[frame]''' tag with the same prefix.&lt;br /&gt;
&lt;br /&gt;
==== Example Syntax ====&lt;br /&gt;
    [attack_anim]&lt;br /&gt;
        [attack_filter]&lt;br /&gt;
            name= _ &amp;quot;bow&amp;quot;&lt;br /&gt;
        [/attack_filter]&lt;br /&gt;
        '''start_time'''=-350&lt;br /&gt;
        '''missile_start_time'''=-150&lt;br /&gt;
        [missile_frame]&lt;br /&gt;
            duration=150&lt;br /&gt;
            image=&amp;quot;projectiles/missile-n.png&amp;quot;&lt;br /&gt;
            image_diagonal=&amp;quot;projectiles/missile-ne.png&amp;quot;&lt;br /&gt;
        [/missile_frame]&lt;br /&gt;
        [if]&lt;br /&gt;
            hits=yes&lt;br /&gt;
            [frame]&lt;br /&gt;
                duration=350&lt;br /&gt;
                sound=bow.ogg&lt;br /&gt;
            [/frame]&lt;br /&gt;
        [/if]&lt;br /&gt;
        [else]&lt;br /&gt;
            hits=no&lt;br /&gt;
            [frame]&lt;br /&gt;
                duration=350&lt;br /&gt;
                sound=bow-miss.ogg&lt;br /&gt;
            [/frame]&lt;br /&gt;
        [/else]&lt;br /&gt;
    [/attack_anim]&lt;br /&gt;
&lt;br /&gt;
=== The content of a frame ===&lt;br /&gt;
==== Syntax summary ====&lt;br /&gt;
 [frame]&lt;br /&gt;
    duration=&amp;lt;integer&amp;gt;&lt;br /&gt;
    begin=&amp;lt;deprecated,integer&amp;gt;&lt;br /&gt;
    end=&amp;lt;deprecated,integer&amp;gt;&lt;br /&gt;
    image=&amp;lt;string&amp;gt;&lt;br /&gt;
    image_diagonal=&amp;lt;string&amp;gt;&lt;br /&gt;
    image_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
    sound=&amp;lt;string&amp;gt;&lt;br /&gt;
    halo=&amp;lt;progressive string&amp;gt;&lt;br /&gt;
    halo_x=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
    halo_y=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
    halo_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
    alpha=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
    offset=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
    blend_color=&amp;lt; red, green, blue &amp;gt;&lt;br /&gt;
    blend_ratio=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
    text=&amp;lt;string&amp;gt;&lt;br /&gt;
    text_color=&amp;lt; red, green, blue &amp;gt;&lt;br /&gt;
    submerge=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
    x=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
    y=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
    layer=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
 [/frame]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
dev denotes a {{DevFeature}}&lt;br /&gt;
&lt;br /&gt;
==== Progressive parameters ====&lt;br /&gt;
&lt;br /&gt;
Some parameters above are marked as ''progressive'' This means that you can specify that during the time the frame is displayed, the parameter should smoothly slide from one value to an other.&lt;br /&gt;
&lt;br /&gt;
A typical example would be a unit progressively fading out, becoming transparent&lt;br /&gt;
&lt;br /&gt;
To do that, you could use:&lt;br /&gt;
&lt;br /&gt;
 alpha=1~0&lt;br /&gt;
&lt;br /&gt;
To make a frame, which is 900ms long, slide to transparent for 300ms, stay transparent for another 300ms and finally fade back to normal for 300ms, use:&lt;br /&gt;
&lt;br /&gt;
 alpha=1~0:300,0:300,0~1:300&lt;br /&gt;
&lt;br /&gt;
you could also specify it like that&lt;br /&gt;
&lt;br /&gt;
 alpha=1~0,0,0~1&lt;br /&gt;
&lt;br /&gt;
when a timing is missing, the engine will do its best to fill in in a fair way. &lt;br /&gt;
&lt;br /&gt;
a progressive string has a similar syntax&lt;br /&gt;
&lt;br /&gt;
 halo=halo1.png:300,halo2.png:300,halo2.png:300&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
** '''begin''': (deprecated) will be replaced by '''duration= &amp;lt;end - begin &amp;gt;'''&lt;br /&gt;
** '''end''': (deprecated) see '''begin''' and also [[AnimationWML#Timing.2C_Clock.2C_Multiple_animations|Timing, Clock, Multiple animations]] section for coverage of '''start_time''' which combines with '''duration''' to replace '''begin=''' '''end='''.&lt;br /&gt;
** '''duration''': how long the frame should be displayed. Use instead of '''begin=''' and '''end='''.&lt;br /&gt;
** '''image''': the image to display during the frame.&lt;br /&gt;
** '''image_diagonal''': the image to display when the attack occurs diagonally (directions ne,se,sw,nw).&lt;br /&gt;
** '''image_mod''': a string modifications (see [[ImagePathFunctionWML]] ) that will be applied to all images&lt;br /&gt;
** '''sound''': the sound to play when the frame begins. Can be a comma-separated list of sounds, in which case one of them is chosen randomly every time.&lt;br /&gt;
** '''halo''': the halo to display at the time.&lt;br /&gt;
** '''halo_x''': the position the halo is displayed in pixel relative to the unit's center.&lt;br /&gt;
** '''halo_y''': the position the halo is displayed in pixel relative to the unit's center.&lt;br /&gt;
** '''halo_mod''': a string modifications (see [[ImagePathFunctionWML]] ) that will be applied to all haloes&lt;br /&gt;
** '''alpha''': transparency level to apply to the frame. This is a floating point progressive parameter ranging from 0.0 to 1.0.&lt;br /&gt;
** '''offset''': the position of the image relative to the hex the unit is facing, 0.0 will display the unit in the center of the hex, 1.0 in the center of the faced hex, -1.0 at the center of the hex behind you. This is a progressive parameter.&lt;br /&gt;
** '''blend_color''': a comma separated list of numbers representing a color in RGB (0-255) this color will be mixed to the frame to give it a tint.&lt;br /&gt;
** '''blend_ratio''': this is a progressive parameter ranging from 0 to 1: 0 means no tint, 1 means target color only.&lt;br /&gt;
** '''text''': if specified, floats a label with the given text above the unit (identical to the floating damage and healing numbers).&lt;br /&gt;
** '''text_color''': the color of the above floating label.&lt;br /&gt;
** '''submerge''': the part of the unit that should drawn with 50% opacity (for units in water)&lt;br /&gt;
** '''x''': x offset applied to the frame&lt;br /&gt;
** '''y''': y offset applied to the frame&lt;br /&gt;
** '''layer''': layer used to draw the frame, see discussion bellow&lt;br /&gt;
&lt;br /&gt;
=== Drawing related animation content ===&lt;br /&gt;
==== Syntax summary ====&lt;br /&gt;
 [animation]&lt;br /&gt;
   &amp;lt;animation choice related content&amp;gt;&lt;br /&gt;
   [frame]&lt;br /&gt;
     &amp;lt;frame content&amp;gt;&lt;br /&gt;
   [/frame]&lt;br /&gt;
   [frame]&lt;br /&gt;
     &amp;lt;frame content&amp;gt;&lt;br /&gt;
   [/frame]&lt;br /&gt;
   start_time=&amp;lt;integer&amp;gt;&lt;br /&gt;
   offset=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
   image_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
   blend_with=&amp;lt;r,g,b&amp;gt;&lt;br /&gt;
   blend_ratio=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
   halo=&amp;lt;progressive_string&amp;gt;&lt;br /&gt;
   halo_x=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   halo_y=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   halo_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
   submerge=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
   x=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   y=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   layer=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
   [xxx_frame]&lt;br /&gt;
     &amp;lt;frame content&amp;gt;&lt;br /&gt;
   [/xxx_frame]&lt;br /&gt;
   xxx_start_time=&amp;lt;integer&amp;gt;&lt;br /&gt;
   xxx_image_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
   xxx_offset=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
   xxx_blend_with=&amp;lt;r,g,b&amp;gt;&lt;br /&gt;
   xxx_blend_ratio=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
   xxx_halo=&amp;lt;progressive_string&amp;gt;&lt;br /&gt;
   xxx_halo_x=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   xxx_halo_y=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   xxx_halo_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
   xxx_submerge=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
   xxx_x=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   xxx_y=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   xxx_layer=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 [/animation]&lt;br /&gt;
&lt;br /&gt;
dev denotes a {{DevFeature}}&lt;br /&gt;
&lt;br /&gt;
==== Parameter handling ====&lt;br /&gt;
All drawing related parameters in '''[animation]''' can be matched with a corresponding parameter in  a '''[frame]''' block (or a '''[xxx_frame]''' block) The value provided in the animation will be used if no value is provided in the frame. &lt;br /&gt;
&lt;br /&gt;
The point of these two level of parameters is to easily be able to specify a parameter at the animation level and override it for a special case of frame.&lt;br /&gt;
&lt;br /&gt;
== How animations are chosen ==&lt;br /&gt;
Within a unit decription block there are multiple animations. Each animation is meant to be played in a very special set of circumstances. We will discuss here how to tell the animation engine when a given animation should be played. &lt;br /&gt;
&lt;br /&gt;
Let's take an example. Suppose we have a unit which has the skirmisher ability. We have the folowing movement animations :&lt;br /&gt;
* a normal walking animation&lt;br /&gt;
* a swimming animation when the unit is in water&lt;br /&gt;
* a tiptioeing animation when moving next to an ennemy unit&lt;br /&gt;
&lt;br /&gt;
Ok. most of the time it's easy to guess what animation should be. However if you are both in water and next to an ennemy unit, the animation to play is not obvious.&lt;br /&gt;
&lt;br /&gt;
To solve that question, each animation has a number of filtering criterias. The engine follow the following rules to select an animation&lt;br /&gt;
* Start with all animations&lt;br /&gt;
* Drop all animations with a criteria that fails on the current situation&lt;br /&gt;
* Take the animations that have the most maching criterias&lt;br /&gt;
* If there are more than one animation remaining, take an animation randomly&lt;br /&gt;
* If all animations have been droped, the engine will provide a smart default.&lt;br /&gt;
    &lt;br /&gt;
here is a pseudo-code explaination of this algorithm&lt;br /&gt;
&lt;br /&gt;
 foreach animation&lt;br /&gt;
    animation_score = 0&lt;br /&gt;
    foreach filter-criteria&lt;br /&gt;
      if &amp;lt;criteria-fails&amp;gt; &lt;br /&gt;
	  animation_score = -1;&lt;br /&gt;
	  break;&lt;br /&gt;
      elsif &amp;lt;criteria-matches&amp;gt; &lt;br /&gt;
	  animation_score++&lt;br /&gt;
    endfor&lt;br /&gt;
    if animation_score &amp;gt; max_score&lt;br /&gt;
	&amp;lt;empty animation list&amp;gt;&lt;br /&gt;
	max_score = animation_score;&lt;br /&gt;
	push(animation,animation_list);&lt;br /&gt;
    elsif animation_score = max_score&lt;br /&gt;
	push(animation,animation_list);&lt;br /&gt;
 endfor&lt;br /&gt;
 &amp;lt;choose an animation randomly from animation_list&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
Note that all animations don't have all the filters...&lt;br /&gt;
&lt;br /&gt;
so, if we have a unit with&lt;br /&gt;
# an animation for water terrain&lt;br /&gt;
# an animation for SE on grassland&lt;br /&gt;
# an animation with no criteria&lt;br /&gt;
# an animation for N,NE,NW,S,SW,SE&lt;br /&gt;
# an animation for NW&lt;br /&gt;
&lt;br /&gt;
* 3. will never be taken, because 4. will always trump it&lt;br /&gt;
* on water going NW, it can be 1. 4. 5.&lt;br /&gt;
* on water, any direction but NW, it will be 1. or 4.&lt;br /&gt;
* on SE grassland it will be 2.&lt;br /&gt;
* on other grasslands, it will be 4. (4. or 5. if NW)&lt;br /&gt;
&lt;br /&gt;
=== Generic animation filters available for all animations ===&lt;br /&gt;
* '''apply_to''': a list of comma separated keywords describing what event should trigger the animation (movement, attack...) the complete list is given below&lt;br /&gt;
* '''value''': a list of comma separated integer, the meaning depends on the triggering event. the meaning is given with the list of event&lt;br /&gt;
* '''terrain''': a list of comma separated terrain letters, the animation will only be used on these terrains.  See [[FilterWML]].&lt;br /&gt;
* '''[unit_filter]''': this will filter using a standard unit filter on the animated unit. Note that matching all criterias in the filter will only earn you one point for animation selection, but that you can have multiple '''[unit_filter]''' blocks in an animation. ({{DevFeature}} renamed to [filter])&lt;br /&gt;
* '''[secondary_unit_filter]''': this will filter using a standard unit filter on the unit in the hex faced. Note that matching all criterias in the filter will only earn you one point for animation selection, but that you can have multiple '''[secondary_unit_filter]''' blocks in an animation. Also note that if the faced hex is empty, the whole filter will fail. ({{DevFeature}} renamed to [filter_second])&lt;br /&gt;
* '''direction''': a list of directions (n,ne,se,s,sw,nw), the animation will only be used when acting or moving in this direction (the attack direction for attack animations, moving direction for movement animations, direction of lead unit for leading animations, and so on).&lt;br /&gt;
* '''frequency''': this integer value allows to easily tweak the matching frequency of animations. The filter will fail n-1 times out of n, randomly. Note that unlike every other filter, matching this filter won't give an extra point.&lt;br /&gt;
* '''[attack_filter]''': a standard attack filter to match on the attacker's attack. See  [[FilterWML]]. ({{DevFeature}} renamed to [filter_attack])&lt;br /&gt;
* '''[secondary_attack_filter]''': a standard attack filter to match on the defender's attack. See [[FilterWML]]. Also note that if the defender doesn't have any weapon to retaliate with, this filter will always fail. ({{DevFeature}} renamed to [filter_second_attack])&lt;br /&gt;
* '''hits''': filters attack animations based on whether the attack hits, misses or kills. Accepts a list of the following:&lt;br /&gt;
** '''hit''': the attack hits, defender survives.&lt;br /&gt;
** '''no''' or '''miss''': the attack misses.&lt;br /&gt;
** '''kill''': the attack hits, defender dies.&lt;br /&gt;
** '''yes''': is an alias of '''hit,kill'''.&lt;br /&gt;
* '''swing''': a list of numbers representing the swing numbers this animation should match (numbered from 1).&lt;br /&gt;
&lt;br /&gt;
=== Events trigerring animations and default animations ===&lt;br /&gt;
==== standing ====&lt;br /&gt;
This animation is triggered whenever any other animation is finished, and is played in loop until another animation is triggered&lt;br /&gt;
&lt;br /&gt;
this is the default &amp;quot;standing image&amp;quot; for the unit&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no standing animation is set a single frame animation based on the enclosing unit's '''image=''' field is used&lt;br /&gt;
==== selected ====&lt;br /&gt;
This animation is triggered whenever the unit is selected&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;0.0~0.3:100,0.3~0.0:200&amp;quot; blend_color=255,255,255''&lt;br /&gt;
==== recruited ====&lt;br /&gt;
This animation is triggered whenever the unit is recruited or recalled&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''highlight=0~1:600''&lt;br /&gt;
==== levelin ====&lt;br /&gt;
This animation is triggered whenever the unit levels, before the unit is replaced by the new unit&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;1~0:600&amp;quot; blend_color=255,255,255''&lt;br /&gt;
==== levelout ====&lt;br /&gt;
This animation is triggered whenever the unit levels, after the unit is replaced by the new unit&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;0~1:600&amp;quot; blend_color=255,255,255''&lt;br /&gt;
==== movement ====&lt;br /&gt;
This animation is used whenever a unit moves. There are multiple things to consider when dealing with movement animation&lt;br /&gt;
* unit stay ''exactly'' 150ms in each hex. so you typically want to have an offset of ''0~1:150,0~1:150,0~1:150,0~1:150,0~1:150'' or something similar&lt;br /&gt;
* when a unit enters a hex, the current anim is tested again.&lt;br /&gt;
** if the current animation is still valid (i.e it passes all its filter) it is kept, whatever the final score is&lt;br /&gt;
** if it fails, a new movement anim is searched&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''offset=&amp;quot;0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150&amp;quot;''&lt;br /&gt;
==== pre_teleport ====&lt;br /&gt;
This animation is triggered whenever the unit teleports, but before it has moved to the target hex&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;1~0:150&amp;quot; blend_color=255,255,255''&lt;br /&gt;
==== post_teleport ====&lt;br /&gt;
This animation is triggered whenever the unit teleports, but after it has moved to the target hex&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;0~1:150&amp;quot; blend_color=255,255,255''&lt;br /&gt;
==== healing ====&lt;br /&gt;
This animation is triggered when the unit has healing powers and uses them&lt;br /&gt;
&lt;br /&gt;
''value='' is the number of points healed&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
==== healed ====&lt;br /&gt;
This animation is triggered whenever the unit is healed for any reason&lt;br /&gt;
&lt;br /&gt;
''value='' is the number of points healed&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;0:30,0.5:30,0:30,0.5:30,0:30,0.5:30,0:30,0.5:30,0:30&amp;quot; blend_color=255,255,255''&lt;br /&gt;
and plays the sound ''heal.wav''&lt;br /&gt;
==== poisoned ====&lt;br /&gt;
This animation is triggered whenever the unit suffers poison dammage&lt;br /&gt;
&lt;br /&gt;
''value='' is the number of points lost&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;0:30,0.5:30,0:30,0.5:30,0:30,0.5:30,0:30,0.5:30,0:30&amp;quot; blend_color=0,255,0''&lt;br /&gt;
and plays the sound 'poison.ogg''&lt;br /&gt;
==== defend ====&lt;br /&gt;
This animation is triggered during a strike, of the unit receiving the blow&lt;br /&gt;
&lt;br /&gt;
''value='' is the number of point lost, if any&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
==== attack ====&lt;br /&gt;
This animation is triggered during a strike, of the unit giving the blow&lt;br /&gt;
&lt;br /&gt;
''value='' is the number of damage dealt, if any&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''offset=&amp;quot;0~0.6:150,0.6~0:150&amp;quot;'' for melee attacks&lt;br /&gt;
No default is provided for range attacks&lt;br /&gt;
==== leading ====&lt;br /&gt;
This animation is triggered for units with the leading special ability, when the unit they are leading is attacking&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== resistance ====&lt;br /&gt;
This animation is triggered for units with the resistance special ability affecting neighbouring fights, when the unit they are helping is defending&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
&lt;br /&gt;
==== death ====&lt;br /&gt;
This animation is triggered when a unit die.&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''highlight=1~0:600'' and plays the sound in ''die_sound='' of the enclosing unit&lt;br /&gt;
==== victory ====&lt;br /&gt;
This animation is triggered when a unit finishes a fight by killing the other unit&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
==== idling ====&lt;br /&gt;
This animation is called when the unit has been using its standing animation for a random duration.&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
&lt;br /&gt;
==== default ====&lt;br /&gt;
&lt;br /&gt;
This animation is never triggered, but is used as a base to create new animations&lt;br /&gt;
&lt;br /&gt;
''value='' is used depending of the type of animation it replaces&lt;br /&gt;
&lt;br /&gt;
A single animation made of the base frame is provided by the engine if no default animation is available&lt;br /&gt;
&lt;br /&gt;
==== extra animations ====&lt;br /&gt;
Other values are never called by the engine. However they can be triggered by WML events allowing custom animations.&lt;br /&gt;
&lt;br /&gt;
Note that WML events can also trigger standard animations.&lt;br /&gt;
''value='' is set from the WML event&lt;br /&gt;
&lt;br /&gt;
== Shortcuts, tricks and quirks ==&lt;br /&gt;
&lt;br /&gt;
=== ''[if]'' and ''[else]'' ===&lt;br /&gt;
&lt;br /&gt;
Often, you need to do very slight variations in an animation (like a different sound depending on whether the unit hits or misses its attack), the '''[if]''' and '''[else]''' tags are meant to help you do that. &lt;br /&gt;
    &lt;br /&gt;
Using these in an animation is equivalent to having multiple animations, one with the '''[if]''' block and one with each of the ''[else]'' blocks. Any filtering flags in these blocks will replace the toplevel filters. You can have multiple '''[if]''' blocks in an animation, but you can't nest an '''[if]''' inside another. These should be written directly inside the '''[animation]''' block. The following example would make the '''[frame]''' inside the '''[if]''' be played when the attack misses, and the '''[frame]''' inside the '''[else]''' be played when the attack hits (producing a different sound):&lt;br /&gt;
&lt;br /&gt;
    [if]&lt;br /&gt;
        hits=no&lt;br /&gt;
        [frame]&lt;br /&gt;
            begin=-100&lt;br /&gt;
            end=100&lt;br /&gt;
            image=&amp;quot;units/dwarves/lord-attack.png&amp;quot;&lt;br /&gt;
            sound={SOUND_LIST:MISS}&lt;br /&gt;
        [/frame]&lt;br /&gt;
    [/if]&lt;br /&gt;
    [else]&lt;br /&gt;
        hits=yes&lt;br /&gt;
        [frame]&lt;br /&gt;
            begin=-100&lt;br /&gt;
            end=100&lt;br /&gt;
            image=&amp;quot;units/dwarves/lord-attack.png&amp;quot;&lt;br /&gt;
            sound=axe.ogg&lt;br /&gt;
        [/frame]&lt;br /&gt;
    [/else]&lt;br /&gt;
&lt;br /&gt;
note that this is very close to preprocessing and should be considered as such, especially with regard to scoring and animation selection&lt;br /&gt;
&lt;br /&gt;
=== Simplified animation blocks ===&lt;br /&gt;
To simplify the most common animation cases, you can use different blocks instead of the generic '''[animation]''' block. These are also here for backward compatibility, but are not deprecated and fully supported&lt;br /&gt;
&lt;br /&gt;
some of these use extra tags which are translated in the normal ''value='' tag&lt;br /&gt;
&lt;br /&gt;
some of these define '''[xxx_frame]''' blocks where the frame prefix starts with an underscore. This is not allowed in normal WML (prefix starting with underscore is reserved for the engine internal use). It is here for clarity purpose&lt;br /&gt;
&lt;br /&gt;
* '''[leading_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=leading&lt;br /&gt;
* '''[recruit_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=recruited&lt;br /&gt;
* '''[standing_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=standing,default&lt;br /&gt;
note for 1.4 :''default'' doesn't exist in 1.4, but the semantic is the same.&lt;br /&gt;
&lt;br /&gt;
i.e: the animation will be used to build default animations&lt;br /&gt;
* '''[idle_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=idling&lt;br /&gt;
* '''[levelin_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=levelin&lt;br /&gt;
* '''[levelout_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=levelout&lt;br /&gt;
* '''[healing_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=healing&lt;br /&gt;
 value=&amp;lt;damage= value&amp;gt;&lt;br /&gt;
* '''[healed_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=healed&lt;br /&gt;
 value=&amp;lt;healing= value&amp;gt;&lt;br /&gt;
 [_healed_sound_frame]&lt;br /&gt;
    sound=heal.wav&lt;br /&gt;
 [/_healed_sound_frame]&lt;br /&gt;
* '''[poison_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=poisoned&lt;br /&gt;
 value=&amp;lt;damage= value&amp;gt;&lt;br /&gt;
 [_poison_sound_frame]&lt;br /&gt;
    sound=poison.ogg&lt;br /&gt;
 [/_poison_sound_frame]&lt;br /&gt;
* '''[movement_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=movement&lt;br /&gt;
 offset=&amp;quot;0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150&amp;quot;&lt;br /&gt;
* '''[defend]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=defend&lt;br /&gt;
 value=&amp;lt;damage= value&amp;gt;&lt;br /&gt;
 &amp;lt;WML content&amp;gt;&lt;br /&gt;
 [frame]&lt;br /&gt;
    blend_with=255,0,0&lt;br /&gt;
    blend_ratio=&amp;quot;0.5:50,0.0:50&amp;quot;&lt;br /&gt;
 [/frame]&lt;br /&gt;
&lt;br /&gt;
there are some subtil change compared to what is described above to avoid the red flash when value=0, but it should work as expected as far as WML author are concerned&lt;br /&gt;
 &lt;br /&gt;
* '''[attack_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
if the animation contains a missile frame&lt;br /&gt;
&lt;br /&gt;
 apply_to=attack&lt;br /&gt;
 missile_offset=&amp;quot;0~0.8&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
&lt;br /&gt;
 apply_to=attack&lt;br /&gt;
 offset=&amp;quot;0~0.6,0.6~0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''[death]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=death&lt;br /&gt;
 [_death_sound_frame]&lt;br /&gt;
    sound=&amp;lt;die_sound= of the enclosing [unit] tag&amp;gt;&lt;br /&gt;
 [/_death_sound_frame]&lt;br /&gt;
* '''[victory_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=victory&lt;br /&gt;
* '''[extra_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=&amp;lt;flag= value of the anim&amp;gt;&lt;br /&gt;
* '''[teleport_anim]''' will be cut into two at the clock-time 0&lt;br /&gt;
everything before zero becomes an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=pre_teleport&lt;br /&gt;
everything after zero becomes an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=post_teleport&lt;br /&gt;
&lt;br /&gt;
== Layering ==&lt;br /&gt;
The ''layer'' progressive parameter allows the animation writer to choose in what order the animation should be drawn.&lt;br /&gt;
&lt;br /&gt;
this value must be between 0 and 100&lt;br /&gt;
&lt;br /&gt;
* the back of haloes is drawn with a value of 10&lt;br /&gt;
* when unspecified, a animation is drawn with a value of 40&lt;br /&gt;
* terrain elements that are supposed to go in front of units (castles) are drawn with a value of 50&lt;br /&gt;
* orbs and status bars are drawn on layer 80&lt;br /&gt;
* when unspecified missile frames are drawn on layer 90&lt;br /&gt;
&lt;br /&gt;
by changing these values, it is easy to have the unit display the way you want&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[UnitWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=UnitTypeWML&amp;diff=28964</id>
		<title>UnitTypeWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=UnitTypeWML&amp;diff=28964"/>
		<updated>2009-03-22T10:35:39Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing {{DevFeature}} tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== The [unit] tag ==&lt;br /&gt;
&lt;br /&gt;
Each '''[unit]''' tag defines one unit type. (for the use of [unit] to create a unit, see [[SingleUnitWML]])  Note: this tag has been renamed and is now '''[unit_type]'''.&lt;br /&gt;
&lt;br /&gt;
Unit animation syntax is described in [[AnimationWML]].&lt;br /&gt;
&lt;br /&gt;
The following key/tags are recognized:&lt;br /&gt;
{| class=&amp;quot;gallery&amp;quot; style=&amp;quot;text-align:left;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! advancefrom&lt;br /&gt;
| the previous level unit on the advancement tree&lt;br /&gt;
- allows a campaign-specific unit to be spliced into an already existing advancement tree.  It should generally be used only inside a campaign ifdef, to prevent changes to other campaigns.  This tag makes changes to the ''advances_to'' and ''experience'' keys of a base unit to make it advance into this unit.  It takes these keys:&amp;lt;br&amp;gt; ** ''unit'' the id of the base unit from which this unit advances.  This adds the unit into the list of units which ''unit'' can advance into.&amp;lt;br&amp;gt;** [[experience]] is optional.  If present and lower than the experience already required for the base unit to advance, then the experience to advance is lowered.  Note: this will also lower the experience required to advance to other units which the base unit can advance into.&lt;br /&gt;
|-&lt;br /&gt;
! advances_to&lt;br /&gt;
| When this unit has experience greater than or equal to [[experience]], it is replaced by a unit of the type that the value of [[advances_to]] refers to. All modifications that have been done to the unit are applied to the unit it is replaced by. The special value 'null' says that the unit does not advance but gets an AMLA instead.&lt;br /&gt;
|-&lt;br /&gt;
! alignment&lt;br /&gt;
| how the unit's damage should be affected by its lawful bonus (See [[TimeWML]]).&lt;br /&gt;
|-&lt;br /&gt;
! attacks&lt;br /&gt;
| the number of times that this unit can attack each turn.&lt;br /&gt;
|-&lt;br /&gt;
! cost&lt;br /&gt;
| when a player recruits a unit of this type, the player loses ''cost'' gold. If this would cause gold to drop below 0,  the unit cannot be recruited.&lt;br /&gt;
|-&lt;br /&gt;
! description&lt;br /&gt;
| (translatable) the text displayed in the unit descriptor box for this unit. Default 'No description available...'. &lt;br /&gt;
|-&lt;br /&gt;
! do_not_list&lt;br /&gt;
| Not used by the game, but by tools for browsing and listing the unit tree. If this is 'yes', the unit will be ignored by these tools. &lt;br /&gt;
|-&lt;br /&gt;
! ellipse&lt;br /&gt;
| the ellipse image to display under the unit, which is normally team-colored. Default is the normal ellipse; &amp;quot;misc/ellipse-nozoc&amp;quot; is a dashed ellipse that should be used for units without zone of control.&lt;br /&gt;
|-&lt;br /&gt;
! experience&lt;br /&gt;
| When this unit has experience greater than or equal to ''experience'', it is replaced by a unit with 0 experience of the type that the value of ''advances_to'' refers to. All modifications that have been done to the unit are applied to the unit it is replaced by.&lt;br /&gt;
|-&lt;br /&gt;
! gender&lt;br /&gt;
| has a value of either ''male'' or ''female'', and determines which of the keys ''male_names'' and ''female_names''  should be read. When a unit of this type is recruited, it will be randomly assigned a name by the random name generator, which will use these names as a base.&lt;br /&gt;
|-&lt;br /&gt;
! hide_help&lt;br /&gt;
|  determines if the unit type will appear in the in-game help. Possible values ''true'' and ''false'', defaults to ''false''.&lt;br /&gt;
|-&lt;br /&gt;
! hitpoints&lt;br /&gt;
| the maximum HP that the unit has, and the HP it has when it is created.&lt;br /&gt;
|-&lt;br /&gt;
! id&lt;br /&gt;
|the value of the ''type'' key for units of this type. An ''id'' should consist only of alphanumerics and spaces (or underscores). ''type'' keys are found in [[SingleUnitWML]] and [[FilterWML]]. For example, id=Drake Flare&lt;br /&gt;
WARNING : characters &amp;quot;$&amp;quot;, &amp;quot;&amp;amp;&amp;quot;, &amp;quot;*&amp;quot;, &amp;quot;(&amp;quot; and &amp;quot;)&amp;quot; are illegal for use in the unit id and must be avoided because they might lead to corrupted saved games&lt;br /&gt;
|-&lt;br /&gt;
! level&lt;br /&gt;
| the amount of upkeep the unit costs.  After this unit fights, its opponent gains ''level'' experience. See also kill_experience ([[GameConfigWML]]), and leadership ([[AbilitiesWML]]).&lt;br /&gt;
|-&lt;br /&gt;
! movement&lt;br /&gt;
| the number of move points that this unit recieves each turn.&lt;br /&gt;
|-&lt;br /&gt;
! movetype&lt;br /&gt;
| See '''[[movetype]]''', [[UnitsWML]]. Note that the tags '''[[movement_costs]]''', '''[[defense]]''', and '''[[resistance]]''' can be used to modify this movetype.&lt;br /&gt;
|-&lt;br /&gt;
! name&lt;br /&gt;
|(translatable) displayed in the Status Table for units of this type.&lt;br /&gt;
|-&lt;br /&gt;
! num_traits&lt;br /&gt;
| the number of traits that units of this type should receive when they are recruited, overriding the value set in the [race] tag.&lt;br /&gt;
|-&lt;br /&gt;
! profile&lt;br /&gt;
| the portrait image to use for this unit type. You can also set a portrait for an individual unit instead of the whole unit type (see [[SingleUnitWML]]). There are some changes for the portraits in the ingame dialog (this will change again post 1.6 but the time's to short to write a new API). The engine now first looks for the image in the transparent subdirectory and if found that image is used. If not found it will use the image as-is. Depending on the size the engine will or will not scale the image, the cuttoff currently is at 300x300. For images which should only be shown on the right side in the dialog append ~RIGHT() to the image.&lt;br /&gt;
|-&lt;br /&gt;
! race&lt;br /&gt;
| See '''[race]''', [[UnitsWML]].  Also used in standard unit filter (see [[FilterWML]]).&lt;br /&gt;
|-&lt;br /&gt;
! undead_variation&lt;br /&gt;
| Which image to use when a unit of this type is killed by a unit with the plague ability.&lt;br /&gt;
|-&lt;br /&gt;
! usage&lt;br /&gt;
| the way that the AI should recruit this unit, as determined by the scenario designer. (See ''recruitment_pattern'', [[AiWML]]).  The following are conventions on usage:&amp;lt;br&amp;gt; ** ''scout'': Fast, mobile unit meant for exploration and village grabbing.&amp;lt;br&amp;gt; ** ''fighter'': Melee fighter, melee attack substantially more powerful than ranged.&amp;lt;br&amp;gt; ** ''archer'': Ranged fighter, ranged attack substantially more powerful than melee.&amp;lt;br&amp;gt; ** ''mixed fighter'': Melee and ranged fighter, melee and ranged attacks roughly equal.&amp;lt;br&amp;gt; ** ''healer'': Specialty 'heals' or 'cures'.&amp;lt;br&amp;gt;Note that this field affects only recruitment, not the AI's behavior in combat; that is always computed from attack power and hitpoints. &lt;br /&gt;
|-&lt;br /&gt;
! zoc&lt;br /&gt;
| if &amp;quot;yes&amp;quot; the unit will have a zone of control regardless of level.  If present but set to anything other than &amp;quot;yes,&amp;quot; the unit will have no zone of control.  If the tag is omitted, zone of control is dictated by unit level (level 0 = no zoc, level 1+ = has zoc).&lt;br /&gt;
|}&lt;br /&gt;
==== After max level advancement (AMLA) ====&lt;br /&gt;
* '''[advancement]''': describes what happens to a unit when it reaches the XP required for advancement.  It is considered as an advancement in the same way as advancement described by '''advances_to'''; however, if the player chooses this advancement, the unit will have one or more effects applied to it instead of advancing.&lt;br /&gt;
** '''always_display''': if set to true displays the AMLA option even if it is the only available one.&lt;br /&gt;
** '''description''': a description (see [[DescriptionWML]]) displayed as the option for this advancement if there is another advancement option that the player must choose from; otherwise, the advancement is chosen automatically and this key is irrelevant.&lt;br /&gt;
** '''image''': an image to display next to the description in the advancement menu.&lt;br /&gt;
** '''max_times''': default 1.  The maximum times the unit can be awarded this advancement.&lt;br /&gt;
** '''strict_amla''':  (yes|no) default=no. Disable the AMLA if the unit can advance to another unit.&lt;br /&gt;
** '''require_amla''': An optional list of AMLA ''id'' keys that act as prerequisites for this advancement to become available.  Order is not important, and an AMLA id can be repeated any number of times to indicate that another advancement must be chosen several times before this advancement option will become available.&lt;br /&gt;
*** example: &amp;lt;tt&amp;gt;require_amla=tough,tough,incr_damage&amp;lt;/tt&amp;gt; assumes there exist other [advancement] options called ''id=tough'' and ''id=incr_damage''.  Once ''tough'' is chosen twice and ''incr_damage'' is chosen once, then the current [advancement] will become available.&lt;br /&gt;
*** ''require_amla=tough,incr_damage,tough'' is an equivalent way of expressing this.&lt;br /&gt;
** '''[effect]''': A modification applied to the unit whenever this advancement is chosen.  See [[EffectWML]]&lt;br /&gt;
&lt;br /&gt;
==== Other tags ====&lt;br /&gt;
* '''[base_unit]''': Contains one attribute, '''id''', which must be the ID of a unit type.  If specified, the UnitWML for that unit is copied into this one.  Subsequent attributes modify the copy. (1.3.7 and later versions only.)&lt;br /&gt;
* '''[attack]''': one of the unit's attacks.&lt;br /&gt;
** '''description''': a translatable text for name of the attack, to be displayed to the user.&lt;br /&gt;
** '''name''': the name of the attack. Used as a default description, if ''description'' is not present, and to determine the default icon, if ''icon'' is not present (if ''name=x'' then ''icon=attacks/x.png'' is assumed unless present).  Non-translatable.  Used for the ''has_weapon'' key; see [[FilterWML]]&lt;br /&gt;
** '''type''': the damage type of the attack.  Used in determining resistance to this attack (see '''[resistances]''', [[UnitsWML]]).  Possible values are 'blade', 'pierce', 'impact', 'fire', 'cold', and 'arcane'.&lt;br /&gt;
** '''[specials]''': contains the specials of the attack. See [[AbilitiesWML]].&lt;br /&gt;
** '''icon''': the image to use as an icon for the attack in the attack choice menu, as a path relative to the images directory.&lt;br /&gt;
** '''range''': the range of the attack.  Used to determine the enemy's retaliation, which will be of the same type.  Also displayed on the status table in parentheses; 'melee'(default) displays &amp;quot;melee&amp;quot;, while 'ranged' displays &amp;quot;ranged&amp;quot;. Range can be anything. Standard values are now &amp;quot;melee&amp;quot; and &amp;quot;ranged&amp;quot;. From now on, ''short'' and ''long'' will be treated as totally different ranges. You can create any number of ranges now (with any name), and units can only retaliate against attacks for which they have a corresponding attack of the same range. This value is translatable.&lt;br /&gt;
** '''damage''': the damage of this attack&lt;br /&gt;
** '''number''': the number of strikes per attack this weapon has&lt;br /&gt;
For those two following settings, the engine usually chooses the attack with the best average total damages * weight (default weight = 1.0).&lt;br /&gt;
** '''attack_weight''': helps the AI to choose which attack to use when attacking; highly weighted attacks are more likely to be used. Setting it to 0 disables the attack on attack&lt;br /&gt;
** '''defense_weight''': used to determine which attack is used for retaliation. This affects gameplay, as the player is not allowed to determine his unit's retaliation weapon. Setting it to 0 disable the attacks on defense &lt;br /&gt;
** '''movement_used''': determines how many movement points using this attack expends. By default all movement is used up, set this to 0 to make attacking with this attack expend no movement.&lt;br /&gt;
&lt;br /&gt;
** '''[animation]'''&lt;br /&gt;
:: This describes an animation for this attack. If multiple animations are present, one will be randomly chosen each time the unit attacks. See [[AnimationWML]] for possible keys.&lt;br /&gt;
&lt;br /&gt;
* '''[defend]''': See [[AnimationWML]]&lt;br /&gt;
* '''[death]''': See [[AnimationWML]]&lt;br /&gt;
* '''[teleport_anim]''': See [[AnimationWML]]&lt;br /&gt;
* '''[extra_anim]''': See [[AnimationWML]]&lt;br /&gt;
* '''[event]''': Any [event] written inside the [unit] tag will get included into any scenario where a unit of this type appears in. Note that such events get included when a unit of this type first appears in the scenario, not automatically when the scenario begins (meaning that ''name=prestart'' events, for example, would usually never trigger). See [[EventWML]] and [[WML_Abilities]]&lt;br /&gt;
&lt;br /&gt;
* '''[variation]''': Defines a variation of a unit. Variations are invoked with an [effect] tag. They are currently used for graphical variations (giving character sprites new weapons) but theoretically you could do anything with it.&lt;br /&gt;
** '''variation_name''': The name of the variation.&lt;br /&gt;
** '''inherit''': if ''yes'', inherits all the properties of the base unit.&lt;br /&gt;
: All other keys in '''[variation]''' are the same as for '''[unit]''' itself.&lt;br /&gt;
&lt;br /&gt;
* '''[male]''', '''[female]''': They can contain all '''[unit]''' tags, to specify a variation of different gender for a unit.&lt;br /&gt;
** '''inherit''': if ''yes'', inherits all the properties of the base unit. defaults to yes&lt;br /&gt;
&lt;br /&gt;
* '''[abilities]''': Defines the abilities of a unit. See [[AbilitiesWML]]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[AnimationWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
* [[TerrainWML]]&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=GameConfigWML&amp;diff=28962</id>
		<title>GameConfigWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=GameConfigWML&amp;diff=28962"/>
		<updated>2009-03-22T10:31:45Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing {{DevFeature}} tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== The [game_config] tag ==&lt;br /&gt;
&lt;br /&gt;
This tag is a top level WML tag which can only be used once because&lt;br /&gt;
it defines basic settings that are used everywhere in the game.&lt;br /&gt;
In official versions of Wesnoth it is in ''game.cfg''; values used there are labeled 'standard'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following keys are recognised&lt;br /&gt;
* '''base_income''': (standard 2) how much your leader earns without any villages&lt;br /&gt;
* '''rest_heal_amount''': (standard 2) how much HP a unit gains each turn it rests&lt;br /&gt;
* '''recall_cost''': (standard 20) how much it costs to recall a unit; this cost is independent of level.&lt;br /&gt;
* '''kill_experience''': (standard 8) killing a unit with ''level=X'' will give ''X''*''kill_experience'' experience to the killing unit. However, if a unit has ''level=0'', it will still give half of ''X'' experience.&lt;br /&gt;
&lt;br /&gt;
* '''icon''': (standard 'wesnoth-icon.png') the game icon file&lt;br /&gt;
* '''title''': (standard 'misc/title.png') the title screen image&lt;br /&gt;
* '''logo''': (standard 'misc/logo.png') the wesnoth logo which will be put over the title image&lt;br /&gt;
* '''default_defeat_music''': (standard 'defeat.ogg,defeat2.ogg') default list of music tracks that are chosen to play on player's defeat; this can be overriden per-scenario&lt;br /&gt;
* '''default_victory_music''': (standard 'victory.ogg,victory2.ogg') default list of music tracks that are chosen to play on player's victory; this can be overriden per-scenario&lt;br /&gt;
* '''title_music''': (standard 'main_menu.ogg') the music to play at the title screen&lt;br /&gt;
* '''logo_x''':      (standard 292) the x position of the logo on the title screen&lt;br /&gt;
* '''logo_y''':      (standard  120) the y position of the logo on the title screen&lt;br /&gt;
* '''buttons_x''':   (standard 760) the x position of the buttons on the title screen&lt;br /&gt;
* '''buttons_y''':   (standard 330) the y position of the buttons on the title screen&lt;br /&gt;
* '''buttons_padding''': (standard  20) space between buttons, and border in main menu&lt;br /&gt;
* '''tip_x''':       (standard 100) space between the button panel left edge and the tip-of-the-day panel right edge&lt;br /&gt;
* '''tip_y''':       (standard 500) not used (the bottom right corner of the tip-of-the-day panel is pegged to align with the bottom of the button panel)&lt;br /&gt;
* '''tip_width''':   (standard 495) max width in pixels of the tip-of-the-day panel.  The width will actually adjust to be the smallest size necessary to fit the text.  Once the max width is reached, if text must flow onto multiple lines, then the height will also automatically adjust.&lt;br /&gt;
* '''tip_padding''': (standard  20) space between the edge of the tip-of-the-day panel and an imaginary bounding box containing the text inside the panel&lt;br /&gt;
&lt;br /&gt;
* '''map_image''':   (standard 'maps/wesnoth.png') the background image for the &amp;quot;About&amp;quot; screen&lt;br /&gt;
* '''sidebar_image''': (standard 'misc/rightside.png') border of window when displaying unit statistics&lt;br /&gt;
* '''sidebar_image_bottom''': (standard 'misc/rightside-bottom.png') border of image when displaying unit statistics&lt;br /&gt;
* '''energy_image''': (standard 'misc/bar-energy.png') the images used to display hp/xp bars.&lt;br /&gt;
* '''moved_ball_image''': (standard 'misc/ball-moved.png') the orb image to add on top of the hp bar for player's moved units; see 'Orbs', [[WesnothManual]]&lt;br /&gt;
* '''unmoved_ball_image''': (standard 'misc/ball-unmoved.png') like '''moved_ball_image''', but for player's unmoved units&lt;br /&gt;
* ''partmoved_ball_image''': (standard 'misc/ball-partmoved.png') like '''moved_energy_image''', but for player's partially moved units&lt;br /&gt;
* '''flag_image''': (standard 'image/flag'terrain/flag-1.png:150,terrain/flag-2.png:150,terrain/flag-3.png:150,terrain/flag-4.png:150') the default flag animation to mark captured villages (if no custom flag is defined in the [side] tag). By example, this animation has 4 frames of 150ms each. An automatic side-coloring is applied. &lt;br /&gt;
* '''flag_icon_image''': (standard 'flags/flag-icon.png') the default flag icon to indicate the side playing in the statusbar (if no custom flag_icon is defined in the [side] tag). An automatic side-coloring is applied. &lt;br /&gt;
&lt;br /&gt;
* '''cross_image''': (standard 'misc/cross.png') the cross image displayed on the map at start of scenarios; see [[IntroWML]]&lt;br /&gt;
* '''dot_image''': (standard 'misc/dot.png') the dot image used to draw a path on the map before scenarios&lt;br /&gt;
&lt;br /&gt;
* '''footprint_left_nw''', '''footprint_left_n''', '''footprint_right_nw''', '''footprint_right_n''': images used to display the path that a unit would take to the tile the cursor is on.&lt;br /&gt;
The first image of each key is used for tiles which would take only 1 movement point for the selected unit to move onto;&lt;br /&gt;
the second for ones which would take more.&lt;br /&gt;
The 'n' and 'nw' designations distinguish between tiles which are moved from orthogonally and diagonally in the same way as described in '''[missile_frame]''', [[AnimationWML]].&lt;br /&gt;
The 'left' and 'right' designations are used alternately throughout the path;&lt;br /&gt;
however, the standard values are the same for 'left' and 'right'.&lt;br /&gt;
&lt;br /&gt;
* '''terrain_mask_image''': (standard 'terrain/alphamask.png') used to give a hex-shape from a rectangular image.&lt;br /&gt;
* '''grid_image''': (standard 'terrain/grid.png') the image used by the grid option &lt;br /&gt;
* '''unreachable_image''': (standard 'terrain/darken.png') the stripes mask used to show unreachable locations&lt;br /&gt;
&lt;br /&gt;
* '''missile_n_image''': (standard 'projectiles/missile-n.png') orthogonal missile image to use if none is specified; see ''image'', '''[missile_frame]''', [[AnimationWML]]&lt;br /&gt;
* '''missile_ne_image''': (standard 'projectiles/missile-ne.png') diagonal missile image to use if none is specified; see ''image_diagonal'', '''[missile_frame]''', [[AnimationWML]]&lt;br /&gt;
* '''observer_image''': (standard 'misc/eye.png') the image to use for observer in multi-player games. (The eye in the upper right hand corner.)&lt;br /&gt;
* '''download_campaign_image''': (standard no image) the icon for the &amp;quot;Download more Campaigns&amp;quot; campaign menu option.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=PreprocessorRef&amp;diff=28961</id>
		<title>PreprocessorRef</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=PreprocessorRef&amp;diff=28961"/>
		<updated>2009-03-22T10:30:39Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing {{DevFeature}} tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== The WML preprocessor ==&lt;br /&gt;
&lt;br /&gt;
Wesnoth loads just one configuration file directly: '''data/_main.cfg'''.&lt;br /&gt;
However the WML preprocessor allows game.cfg to load in more files.&lt;br /&gt;
Whenever a WML file is read by Wesnoth, it is passed through the preprocessor.&lt;br /&gt;
&lt;br /&gt;
The preprocessor can interpret a simple language of string-expansions known as &amp;quot;macros.&amp;quot; A macro should always be defined '''before''' the place where it needs to be used.&lt;br /&gt;
&lt;br /&gt;
The preprocessor is applied recursively, so included files will&lt;br /&gt;
be parsed for macros, and after macro expansion will be parsed for macros&lt;br /&gt;
again, and so on.  As a result, you should not write a recursive macro,&lt;br /&gt;
because it will cause errors&lt;br /&gt;
(but, alas, not necessarily error messages).&lt;br /&gt;
&lt;br /&gt;
The following directives are used to create and use ''macros'',&lt;br /&gt;
i.e. shortcuts which reduce repetition of information.&lt;br /&gt;
See [[UtilWML]], [[UsefulWMLFragments]] for examples and [http://www.wesnoth.org/macro-reference.xhtml the macro reference] for the predefined core macros.&lt;br /&gt;
* '''#define ''symbol'' [''parameters''] ''newline'' ''substitution'' #enddef''' all subsequent occurences of '''{''symbol'' [''arguments'']}''' (see below) will be replaced by ''substitution'' with all occurences of any parameter {''parameter''} within ''substitution'' replaced by the parameter's corresponding value in ''arguments''.  For example, the UNIT macro used below would be defined:&lt;br /&gt;
&lt;br /&gt;
 #define UNIT TYPE X Y## the ordering is important here;&lt;br /&gt;
                      ## since WML does not distinguish&lt;br /&gt;
                      ## data into different types, only&lt;br /&gt;
                      ## the ordering is used to determine which&lt;br /&gt;
                      ## arguments apply to which parameters.&lt;br /&gt;
 [unit]&lt;br /&gt;
 type={TYPE}## the unit will be of type TYPE, so different&lt;br /&gt;
            ## instantiations&lt;br /&gt;
            ## of this macro can create different units.&lt;br /&gt;
 x={X}&lt;br /&gt;
 y={Y}&lt;br /&gt;
 side=2## the unit will be an enemy, regardless of the parameter&lt;br /&gt;
       ## values. This reduces &amp;quot;repetition of information&amp;quot;,&lt;br /&gt;
       ## since it is no longer necessary to specify&lt;br /&gt;
       ## each created unit as an enemy.&lt;br /&gt;
 [/unit]&lt;br /&gt;
 #enddef&lt;br /&gt;
(See [[SingleUnitWML]] for information on creating units using WML.)&lt;br /&gt;
* '''{''symbol'' [''arguments'']}''' if ''symbol'' is defined, the preprocessor will replace this instruction by the expression ''symbol'' is defined as, using ''arguments'' as parameters.  You can create multiple word arguments by using parentheses to restrain the argument.  For example, while '''{UNIT Wolf Rider 18 24}''' will attempt to create a &amp;quot;Wolf&amp;quot; at (Rider,18), causing Wesnoth to crash, the macro '''{UNIT (Wolf Rider) 18 24}''' will create a &amp;quot;Wolf Rider&amp;quot; at (18,24) as it should. ('''UNIT''' is defined above).  See the ''#define'' preprocessor instruction above for information on defining symbols, including symbols with arguments.  Several symbols are defined in the normal game code; for reference they are listed in [[UtilWML]].&lt;br /&gt;
&lt;br /&gt;
Unlike the other preprocessor directives, #ifdef and #ifndef are not&lt;br /&gt;
mere conveniences.&lt;br /&gt;
They are necessary to distinguish between different modes of play.&lt;br /&gt;
* '''#ifdef ''symbol'' ''substitution-if-stored''  [#else ''substitution-if-not-stored''] #endif'''  If ''symbol'' has been stored, the whole block will be replaced by ''substitution-if-stored''.  If not, it will be replaced by ''substitution-if-not-stored'' if it is available.  ''symbol'' can take the following values:&lt;br /&gt;
** a campaign difficulty level.  Usually '''EASY''', '''NORMAL''', or '''HARD''', it is decided by the key ''difficulties'' (see [[CampaignWML]]).&lt;br /&gt;
** a campaign ID. Each campaign stores a preprocessor ID.  See ''define'', [[CampaignWML]].&lt;br /&gt;
** '''MULTIPLAYER''' is stored when the player is playing or setting up a multiplayer game (i.e. a game with '''scenario_type=multiplayer''').&lt;br /&gt;
** '''TUTORIAL''' is stored when the player is playing the tutorial.&lt;br /&gt;
** '''APPLE''' is stored if the computer Wesnoth is being run on is an Apple. (this one is only available to the configuration of the game)&lt;br /&gt;
** '''PYTHON''' is stored if Python support is built in and available. Use this to for example show a warning when starting a campaign that uses Python AI's, if Python isn't available.&lt;br /&gt;
* '''#ifndef''' behaves exactly like '''#ifdef''', except that it inverts the test sense; guarded text is included only if ''symbol'' has not been stored.&lt;br /&gt;
''#undef'' can be useful too if ''#ifdef'' is not enough.&lt;br /&gt;
* '''#undef ''symbol'' '''  erases ''symbol''&lt;br /&gt;
&lt;br /&gt;
These directives expand a file by including other files, ''filename'' may not contain '..' or the directive will be skipped:&lt;br /&gt;
* '''{''filename''}''' if ''filename'' isn't a predefined symbol (see above), Wesnoth will assume it's a path to a file in the main '''data/''' subdirectory of Wesnoth and include the file it points to here &amp;quot;as is&amp;quot;.  Forward slashes('''/''') should be used to separate directories from their elements, even if your platform uses a different symbol such as colon (''':''') or backslash ('''\''').  &lt;br /&gt;
* '''{~''filename''}''' similar to above, but the preprocessor assumes that the filename is relative to the user data directory.  The ''user data directory'' varies depending on platform:&lt;br /&gt;
&lt;br /&gt;
 Platform | User Data Directory&lt;br /&gt;
 -------------------------&lt;br /&gt;
 UNIX     | ~/.wesnoth/data/&lt;br /&gt;
 Mac OS X | ~/Library/Preferences/Wesnoth or ~/.wesnoth/data&lt;br /&gt;
 Windows  | &amp;quot;main Wesnoth folder&amp;quot;\userdata&lt;br /&gt;
&lt;br /&gt;
* '''{@''filename''}''' is a convenient way to make Wesnoth look for a file by that name in both the main and the user data directory.  It is equivalent to writing '''{''filename''}{~''filename''}'''.&lt;br /&gt;
* '''{./''filename''}''' is similar to the '''{''filename''}''' directive, but is assumed to be relative to the directory which contains the file in which this appears.  For example, if used in game.cfg, it is equivalent to '''{''filename''}'''.&lt;br /&gt;
* If ''filename'' points to a directory, the preprocessor will include all files in the directory ''filename'', non-recursively and in alphabetical order.  Starting in 1.3.3, some files in such directories are handled specially.  &lt;br /&gt;
&lt;br /&gt;
If there is a file named ''dir/_main.cfg'' in a directory referenced as '''{''dir''}''', only that ''_main.cfg'' file is processed; it may include other files in itself, of course . This feature is useful for creating WML directories that are self-contained WML packages with their own initializations (like campaigns). This can replace the older convention of having a ''dir.cfg'' at the same level as ''dir'' which does '''{''dir''}''' somewhere in itself.&lt;br /&gt;
&lt;br /&gt;
If there are files named ''dir/*/_main.cfg'' in a directory referenced as '''{''dir''}''', where * is any subdirectories ''dir'', then they all are processed (except if there is also a file named ''dir/_main.cfg''). This means that if you have a layout like this:&lt;br /&gt;
 dir/&lt;br /&gt;
 dir/a/_main.cfg&lt;br /&gt;
 dir/a/other.cfg&lt;br /&gt;
 dir/b/_main.cfg&lt;br /&gt;
 dir/b/other.cfg&lt;br /&gt;
 dir/other.cfg&lt;br /&gt;
Then '''{dir}''' will process (in alphabetical order): dir/a/_main.cfg, dir/b/main.cfg, dir/other.cfg.&lt;br /&gt;
&lt;br /&gt;
If there is a file named ''dir/_final.cfg'' in a directory referenced as '''{''dir''}''' (and no ''main.cfg'', so that all files in the directory are processed normally) the ''_final.cfg'' is guaranteed to be processed ''after'' all other files in the directory.&lt;br /&gt;
&lt;br /&gt;
If there is a file named ''dir/_initial.cfg'' in a directory referenced as '''{''dir''}''' (and no ''main.cfg'', so that all files in the directory are processed normally) the ''_initial.cfg'' is guaranteed to be processed ''before'' all other files in the directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the parser was changed various times, so don't expect older Wesnoth version to behave exactly the same.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[SyntaxWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SyntaxWML&amp;diff=28960</id>
		<title>SyntaxWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SyntaxWML&amp;diff=28960"/>
		<updated>2009-03-22T10:30:03Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing {{DevFeature}} tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
Wesnoth syntax has two basic elements: ''tags'' and ''attributes''.&lt;br /&gt;
Further, ''attributes'' consist of ''keys'' and ''values''.&lt;br /&gt;
Tag names and keys cannot contain whitespace.&lt;br /&gt;
Any line beginning with a pound ('''#''') sign is considered by&lt;br /&gt;
WML as a comment, except for preprocessor declarations beginning&lt;br /&gt;
with #.&lt;br /&gt;
* '''[tag-name] ''data'' [/tag-name]''' is a tag.  Tags are used to partition information.  A ''top level'' tag is one that is not inside any other tag.  Each top level tag describes something about the game.  Different tags work differently.  For information about how a certain tag works, see [[ReferenceWML]].&lt;br /&gt;
* '''[+tag-name] ''data'' [/tag-name]''' means that ''data'' will be considered as part of the data for the most recent [''tag-name''] tag.  The ''data'' of '''[+tag-name]''' will be considered as coming after all data in '''[tag-name]''', so attributes of '''[+tag-name]''' will replace attributes of the original '''[tag-name]'''.&lt;br /&gt;
* '''''key=value newline''''' is an ''attribute'', or an assignment of a value to a key.  When this line is processed, the value of ''key'' for the tag that the attribute is in is set or changed to ''value''.  All text from '=' until the end of the line is considered to be part of ''value''. Note that ''key'' is not a WML variable (with the exception of [[VariablesWML]]); the value it is set to has a use which is determined by C++ code, not WML code.  In order to change the value of a WML variable, you need to use '''[set_variable]''' (see [[InternalActionsWML]]).  '''There should be no space between the key and the '=' symbol!'''  If there is whitespace, the attribute assignment is ignored. Note that ''key'' should contain only alphanumerics or underscores (''a-zA-Z0-9_''); no ''+'' or ''-'' characters are allowed.&lt;br /&gt;
* '''''key1,key2,key3=value1,value2,value3 newline''''' is a multiple assignment.  If there are extra keys, they will be set to an empty value.  If there are extra values the last key will be set to the comma separated list of all remaining values.  It is the same as&lt;br /&gt;
  key1=value1&lt;br /&gt;
  key2=value2&lt;br /&gt;
  key3=value3&lt;br /&gt;
&lt;br /&gt;
Although a value can be just text corresponding to a function of&lt;br /&gt;
its key (these values are displayed in quotes (') in&lt;br /&gt;
[[ReferenceWML]]), a value can also be encoded:&lt;br /&gt;
* '''&amp;quot;''multiple-line-value''&amp;quot;''' a multiple-line value must be enclosed in quotes, to prevent it being interpreted as a single-line value.  Note that ''multiple-line-value'' doesn't have to have multiple lines; it can simply be a single-line value enclosed in quotes for clarity.&lt;br /&gt;
* '''''_ &amp;quot;text&amp;quot;''''' is a ''translatable'' value.  ''text'' is English (US) text that will be displayed in-game at some point.  Gettext (see [[GetText]]) is used to determine what to display if English (US) is not the current language.&lt;br /&gt;
* '''''&amp;quot;value-1&amp;quot; + &amp;quot;value-2&amp;quot;''''' can be used to concatenate two different strings.  If you want to have a value that actually has a plus sign ('''+''') in it, you need to enclose the string containing the '''+''' character in quotes (see '''''&amp;quot;multiple-line-value&amp;quot;''''' above).&lt;br /&gt;
* '''''&amp;quot;double &amp;quot;&amp;quot;quote marks&amp;quot;&amp;quot; within quote marks&amp;quot;''''' can be used to create quote marks within a quoted string.&lt;br /&gt;
* '''''$variable-name''''' a ''variable'' value depends on the value of the WML variable ''variable-name''.  See [[VariablesWML]] for more information on WML-variable based values.&lt;br /&gt;
* '''''$(formula-expression)''''' a ''$( ... )'' value depends on the value of the ''formula-expression'' when evaluated.  See [[FormulaAI]] for more information on Formula Basics, Data Types, and Built-in functions.&lt;br /&gt;
&lt;br /&gt;
=== Empty Values ===&lt;br /&gt;
Usually, wesnoth does not distinguish between a key that has not been provided, and a key that has been assigned an empty value.&lt;br /&gt;
&lt;br /&gt;
Some tags permit a workaround to provide a key with an empty value. You can write&lt;br /&gt;
  key=$empty&lt;br /&gt;
where 'empty' is a WML variable that has not been assigned yet. (This is not technically an empty value, and hence wesnoth will notice that this key has been provided, but will become empty during variable substitution.)&lt;br /&gt;
&lt;br /&gt;
For example, to check if a variable has been initialized, you could write&lt;br /&gt;
  [variable]&lt;br /&gt;
    name=to_be_tested&lt;br /&gt;
    equals=$empty&lt;br /&gt;
  [/variable]&lt;br /&gt;
&lt;br /&gt;
However, some tags actually do the variable substitution ''before'' they check if the value is empty. This applies to some [[EventWML]] commands, including the crucial [[InternalActionsWML|set_variable]] tag. For example, consider the problem of copying the value another_variable to some_variable. You might write&lt;br /&gt;
  [set_variable]&lt;br /&gt;
    name=some_variable&lt;br /&gt;
    format=&amp;quot;$another_variable&amp;quot;&lt;br /&gt;
    # does not work with another_variable is empty&lt;br /&gt;
  [/set_variable]&lt;br /&gt;
&lt;br /&gt;
The above example looks okay, because the format= key does not seem empty. However, if another_variable was empty, then wesnoth perform the substitution, resulting in format=&amp;quot;&amp;quot; being an empty key. Then wesnoth will ignore the set_variable command, and some_variable would retain its value instead of becoming empty.&lt;br /&gt;
&lt;br /&gt;
The workaround in this case is to write&lt;br /&gt;
  [set_variable]&lt;br /&gt;
    name=some_variable&lt;br /&gt;
    to_variable=&amp;quot;another_variable&amp;quot;&lt;br /&gt;
  [/set_variable]&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
 [scenario]&lt;br /&gt;
         id=Elves Besieged&lt;br /&gt;
         [side]&lt;br /&gt;
                 side,gold=1,100&lt;br /&gt;
         [/side]&lt;br /&gt;
         [+side]&lt;br /&gt;
                 recruit=Elvish Fighter,Elvish Archer&lt;br /&gt;
         [/side]&lt;br /&gt;
 [/scenario]&lt;br /&gt;
In this example, [scenario] is a top level tag.  When these&lt;br /&gt;
lines are read, WML will know that there is a scenario with&lt;br /&gt;
the ID &amp;quot;Elves Besieged&amp;quot;.  Later, when WML is told to play&lt;br /&gt;
that scenario, it will read the [side] tag and give 100 gold&lt;br /&gt;
to side 1.  Then it will read the [+side] tag.&lt;br /&gt;
It interprets this tag as belonging to side 1, since the&lt;br /&gt;
most recent [side] belonged to side 1.  So the [+side] tag&lt;br /&gt;
allows side 1 to recruit Elvish Fighters and Elvish Archers.&lt;br /&gt;
(Then it will crash, as the leader of side 1 has no unit type.&lt;br /&gt;
But this isn't really important.)&lt;br /&gt;
&lt;br /&gt;
Notes: Normally the order and indentation of attributes and tags&lt;br /&gt;
does not matter, as long as the levels within tags are not changed.&lt;br /&gt;
So the above example could have been written:&lt;br /&gt;
 [scenario]&lt;br /&gt;
          [side]&lt;br /&gt;
                   gold=100&lt;br /&gt;
                   side=1&lt;br /&gt;
          [/side]&lt;br /&gt;
          id=Elves Besieged&lt;br /&gt;
          [+side]&lt;br /&gt;
                   recruit=Elvish Fighter,Elvish Archer&lt;br /&gt;
          [/side]&lt;br /&gt;
 [/scenario]&lt;br /&gt;
Data inside tags should be separated with tabbing; see [[ConventionsWML]].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[PreprocessorRef]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=ThemeWML&amp;diff=28959</id>
		<title>ThemeWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=ThemeWML&amp;diff=28959"/>
		<updated>2009-03-22T10:28:36Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing {{DevFeature}} tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== The toplevel [theme] tag ==&lt;br /&gt;
&lt;br /&gt;
Themes are used both for the wesnoth game and the wesnoth editor.&lt;br /&gt;
Themes allow flexible configuration of how everything is laid out on-screen.&lt;br /&gt;
&lt;br /&gt;
The only key in '''[theme]''' is '''name'''. This is the name of the theme.&lt;br /&gt;
&lt;br /&gt;
The only tag in '''[theme]''' is '''[resolution]''', but each theme can have multiple [resolution] tags.&lt;br /&gt;
The [resolution] tags are scanned until the first one which is of the same or lower resolution than is currently being used is found, and this is used as our theme.&lt;br /&gt;
This allows us to define themes to work differently on different resolutions, &lt;br /&gt;
and will allow us to support both high and low resolutions elegantly.&lt;br /&gt;
&lt;br /&gt;
The following keys and tags are recognized for [resolution]:&lt;br /&gt;
&lt;br /&gt;
* '''width''', '''height''': dimensions in pixels&lt;br /&gt;
&lt;br /&gt;
All subtags of [resolution] use the following keys:&lt;br /&gt;
* '''rect''': defines the rectangle to display on. Parts of a ''rect=a,b,c,d'' clause may be:&lt;br /&gt;
** number : absolute positions&lt;br /&gt;
** ''='' : same value as the same field in reference rect (alignment with reference)&lt;br /&gt;
** +number or -number : for a and b, add this value to reference's c and d respectively (spacing from reference)&lt;br /&gt;
; for c and d, add this value to self's a and b (specify by width and height)&lt;br /&gt;
** =+number or =-number : add this value to same field in reference rect (eg. consider reference as a container box)&lt;br /&gt;
* '''xanchor''', '''yanchor''': control the behavior of how this rectangle changes as the resolution changes.&lt;br /&gt;
** '''left'''': its distance from the left side of the screen always remain the same, while changes in the resolution will change its size by the same amount (top for the y axis).&lt;br /&gt;
** '''right''': its size always remain the same, as well as its distance to the right side of the screen (bottom for the y axis).&lt;br /&gt;
** '''fixed''': its co-ordinates in that axis remain constant&lt;br /&gt;
** '''proportional''': its co-ordinates multiplied by the ratio of the resolution being used to the canonical resolution.&lt;br /&gt;
&lt;br /&gt;
== [main_map] ==&lt;br /&gt;
&lt;br /&gt;
defines where the main game display (i.e. all the hexagons and units) is displayed.&lt;br /&gt;
&lt;br /&gt;
== [main_map_border] ==&lt;br /&gt;
Defines the border of the main map area. It has the following keys.&lt;br /&gt;
&lt;br /&gt;
* '''border_size''': the size of the border, the value should be between 0.0 and 0.5. The images which are used by default are sized for 0.5. If the border gets smaller the images still need the same size. They're simply cut off at the right spot.&lt;br /&gt;
* '''background_image''': the filename of the image to use as background.&lt;br /&gt;
* '''tile_image''': the filename of the image to use for the _off^_usr tile. The image in the minimal can't be controlled only the image in the main map. This image must be in the terrain directory and a png image. When specifying the image the 'terrain/' prefix and '.png' suffix _must_ be ommitted.&lt;br /&gt;
* '''corner_image_top_left''': filename for the image in the top left corner.&lt;br /&gt;
* '''corner_image_bottom_left''': filename for the image in the top left corner.&lt;br /&gt;
* '''corner_image_top_right_odd''': filename for the image in the top right corner, if the x value of the corner is odd. This x value is the value seen in game (and thus not in the source).&lt;br /&gt;
* '''corner_image_top_right_even''': filename for the image in the top right corner, if the x value of the corner is even. This x value is the value seen in game (and thus not in the source).&lt;br /&gt;
* '''corner_image_bottom_right_odd''': filename for the image in the bottom right corner, if the x value of the corner is odd. This x value is the value seen in game (and thus not in the source).&lt;br /&gt;
* '''corner_image_bottom_right_even''': filename for the image in the bottom right corner, if the x value of the corner is even. This x value is the value seen in game (and thus not in the source).&lt;br /&gt;
* '''border_image_left''': filename for the image at the left border.&lt;br /&gt;
* '''border_image_right''': filename for the image at the right border.&lt;br /&gt;
* '''border_image_top_odd''': filename for the image at the top border, if the x value of the tile is odd. This x value is the value seen in game (and thus not in the source). &lt;br /&gt;
* '''border_image_top_even''': filename for the image at the top border, if the x value of the tile is even. This x value is the value seen in game (and thus not in the source). &lt;br /&gt;
* '''border_image_bottom_odd''': filename for the image at the bottom border, if the x value of the tile is odd. This x value is the value seen in game (and thus not in the source). &lt;br /&gt;
* '''border_image_bottom_even''': filename for the image at the bottom border, if the x value of the tile is even. This x value is the value seen in game (and thus not in the source).&lt;br /&gt;
&lt;br /&gt;
== [mini_map] ==&lt;br /&gt;
&lt;br /&gt;
Determines where the mini map is displayed&lt;br /&gt;
&lt;br /&gt;
== [panel] ==&lt;br /&gt;
&lt;br /&gt;
Displays an image as a panel on-screen.&lt;br /&gt;
* '''image''': the image used for the panel&lt;br /&gt;
&lt;br /&gt;
== [label] ==&lt;br /&gt;
&lt;br /&gt;
Displays a text label on screen.&lt;br /&gt;
* '''prefix''': a string that will be printed before the text in all languages&lt;br /&gt;
* '''text''': a text string id to be displayed&lt;br /&gt;
* '''postfix''': a string that will be printed after the text in all languages&lt;br /&gt;
* '''icon''': an image that will be displayed instead of the text if it is available&lt;br /&gt;
* '''font_size''': the size of font to use for the label&lt;br /&gt;
&lt;br /&gt;
== [menu] ==&lt;br /&gt;
&lt;br /&gt;
* '''title''': the id of the string to write on the button&lt;br /&gt;
* '''title_literal''': a string that will be displayed &amp;quot;as is&amp;quot; in all language after the title&lt;br /&gt;
* '''image''': the image to use if available&lt;br /&gt;
* '''is_context_menu''': if set to true this menu will not be placed, but displayed on a right click&lt;br /&gt;
* '''items''': comma separated list of actions to put in the menu. if there is only one action, it will be executed immediately and no menu will be displayed&lt;br /&gt;
** '''cycle''': move to next movable unit&lt;br /&gt;
** '''endunitturn''': consume this unit's move and cycle to the next one&lt;br /&gt;
** '''leader''': center on the leader&lt;br /&gt;
** '''undo''': undo last action&lt;br /&gt;
** '''redo''': redo undone action&lt;br /&gt;
** '''zoomin''': zoom the map in&lt;br /&gt;
** '''zoomout''': zoom the map out&lt;br /&gt;
** '''zoomdefault''': return to default zoom&lt;br /&gt;
** '''fullscreen''': switch fulscreen mode&lt;br /&gt;
** '''accelerated''': switch turbo mode&lt;br /&gt;
** '''resistance''': show resistance table of current unit&lt;br /&gt;
** '''terraintable''': show terrain table of current unit&lt;br /&gt;
** '''describeunit''': show unit description&lt;br /&gt;
** '''renameunit''': change unit name&lt;br /&gt;
** '''save''': save the game&lt;br /&gt;
** '''recruit''': recruit a unit&lt;br /&gt;
** '''repeatrecruit''': repeat last recruitement&lt;br /&gt;
** '''recall''': recall a unit from previous scenarion&lt;br /&gt;
** '''endturn''': end current turn&lt;br /&gt;
** '''togglegrid''': toggle grid display&lt;br /&gt;
** '''statustable''': show status table&lt;br /&gt;
** '''mute''': mute all sounds&lt;br /&gt;
** '''speak''': send message to other players&lt;br /&gt;
** '''createunit''': debug create a unit on the map&lt;br /&gt;
** '''preferences''': open preference dialog&lt;br /&gt;
** '''objectives''': show objective window&lt;br /&gt;
** '''unitlist''': list units&lt;br /&gt;
** '''statistics''': show game statistics&lt;br /&gt;
** '''quit''': quit the game&lt;br /&gt;
** '''labelterrain''': label current location&lt;br /&gt;
** '''clearlabels''': clear all labels on map&lt;br /&gt;
** '''showenemymoves''': show grids reachable by the enemy&lt;br /&gt;
** '''bestenemymoves''': show grids reachable by the enemy with no zone of control&lt;br /&gt;
** '''editnewmap''': editor only start a new map&lt;br /&gt;
** '''editloadmap''': editor only loads an existing map&lt;br /&gt;
** '''editsavemap''': editor only saves the current map&lt;br /&gt;
** '''editsaveas''': editor only saves the current map, let you choose a filename&lt;br /&gt;
** '''editsetstartpos''': editor only set a starting position for a team&lt;br /&gt;
** '''editfloodfill''': editor only flood the map with a terrain&lt;br /&gt;
** '''toggleshroud''': toggle the &amp;quot;moving removes shroud&amp;quot; behaviour&lt;br /&gt;
** '''updateshroud'': removes all possible shroud&lt;br /&gt;
** '''AUTOSAVES'': expands to a list of all Auto-Save games prior to this one&lt;br /&gt;
&lt;br /&gt;
== [status] ==&lt;br /&gt;
&lt;br /&gt;
This tag describes the Status Table.&lt;br /&gt;
This tag contains many other tags, which determine where other game statistics, such as the current turn, and a description of selected units go.&lt;br /&gt;
For instance, the [time_of_day] tag will determine where the time of day image goes.&lt;br /&gt;
Each subtag of [status] can contain the following attributes&lt;br /&gt;
&lt;br /&gt;
** '''font_size''': the size of font to use for the status&lt;br /&gt;
** '''rect''': the rectangle as for the main_map attribute&lt;br /&gt;
** '''xanchor''': the x-wise anchoring as for the main_map attribute&lt;br /&gt;
** '''yanchor''': the y-wise anchoring as for the main_map attribute&lt;br /&gt;
** '''prefix''': the string to display before the actual status, this is the string id for internationalisation&lt;br /&gt;
** '''prefix_literal''': a string to put after the prefix, but before the label for all languages.&lt;br /&gt;
** '''postfix_literal''': a string to put after the status&lt;br /&gt;
** '''postfix''': the string to display after the postfix_literal, this is the string id for internationalisation&lt;br /&gt;
&lt;br /&gt;
the following tags are recognized for [status]:&lt;br /&gt;
* '''[unit_description]''': the user description of the current unit. Note: this tag is now obsolete&lt;br /&gt;
* '''[unit_name]''': the user description of the current unit&lt;br /&gt;
* '''[unit_type]''': the type of the current unit&lt;br /&gt;
* '''[unit_race]''': the race of the current unit&lt;br /&gt;
* '''[unit_level]''': the level of the current unit&lt;br /&gt;
* '''[unit_side]''': the side of the current unit (flag)&lt;br /&gt;
* '''[unit_traits]''': the traits of the current unit&lt;br /&gt;
* '''[unit_status]''': the status of the current unit&lt;br /&gt;
* '''[unit_alignment]''': the alignment of the current unit&lt;br /&gt;
* '''[unit_abilities]''': the abilities of the current unit&lt;br /&gt;
* '''[unit_hp]''': the HP of the current unit&lt;br /&gt;
* '''[unit_xp]''': the XP of the current unit&lt;br /&gt;
* '''[unit_moves]''': the moves remaining for the current unit&lt;br /&gt;
* '''[unit_weapons]''': the attacks of the current unit&lt;br /&gt;
* '''[unit_image]''': the icon for the current unit&lt;br /&gt;
* '''[unit_profile]''': the portait for the current unit&lt;br /&gt;
* '''[unit_advancement_options]''': the advancement(s) of the current unit appear in the tooltip of this element&lt;br /&gt;
* '''[time_of_day]''': the time of day on the current location&lt;br /&gt;
* '''[turn]''': the turn number and turn remaining&lt;br /&gt;
* '''[gold]''': the gold remaining&lt;br /&gt;
* '''[villages]''': the number of villages owned&lt;br /&gt;
* '''[num_units]''': the number of units owned&lt;br /&gt;
* '''[upkeep]''': the money needed to keep your units every turn&lt;br /&gt;
* '''[expenses]''': the money lost each turn when you don't have enough income&lt;br /&gt;
* '''[income]''': the income per turn (can be positive)&lt;br /&gt;
* '''[terrain]''': the text description of the current terrain&lt;br /&gt;
* '''[position]''': the current terrain's position&lt;br /&gt;
* '''[side_playing]''': the current playing side (flag)&lt;br /&gt;
* '''[observers]''': the current observers&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[ThemeSystem]]&lt;br /&gt;
* [[Using custom themes in campaigns]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Nital&amp;diff=28868</id>
		<title>User:Nital</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Nital&amp;diff=28868"/>
		<updated>2009-03-19T23:13:12Z</updated>

		<summary type="html">&lt;p&gt;Nital: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to my userpage! You can read about my ideas and projects connected with Wesnoth here.&lt;br /&gt;
&lt;br /&gt;
==My ideas==&lt;br /&gt;
&lt;br /&gt;
My main interest as for now is easing the process of patching Wesnoth binaries. That is mainly because my friends has requested a method that would allow them upgrade without downloading ~200 MB every time.&lt;br /&gt;
Another reason is because Ivanovic told me than nobody bothered about that before, and I see this part quite important ;)&lt;br /&gt;
&lt;br /&gt;
===Wesnoth binary patch problem===&lt;br /&gt;
&lt;br /&gt;
Be warned - since my friends are using Windows, this problem will be considered mostly from Windows perspective. However, it may be applicable to other OSes as well, I don't know.&lt;br /&gt;
As everyone knows, official Wesnoth packages are getting bigger and bigger with each release. It is obvious that downloading a &amp;gt;100 MB file every time isn't convenient.&lt;br /&gt;
&lt;br /&gt;
====Solutions so far====&lt;br /&gt;
There was a try with providing xdeltas (read more here: [[Download Xdeltas]]) for Windows binaries, but as it's stated there - xdeltas of binaries have two major cons:&lt;br /&gt;
* They are incremental, no patch unification is possible (to upgrade from 1.2.3 to 1.2.5 you have to download 1.2.3-&amp;gt;1.2.4 and 1.2.4-&amp;gt;1.2.5 xdeltas, unless devs provide 1.2.3-&amp;gt;1.2.5 xdelta)&lt;br /&gt;
* Due to unstable character of inner structure of the installation binary, xdeltas of these tend to have large sizes.&lt;br /&gt;
However, developers of professional games somehow manage to keep their patches small, working and sometimes even quite unified (so the patch can handle updating several different versions). They usually achieve that by working on an already installed game and that is also my approach.&lt;br /&gt;
&lt;br /&gt;
====Goal====&lt;br /&gt;
&lt;br /&gt;
The goal is to make creating patches for stable branch easy. Patch in this context means a small executable that user:&lt;br /&gt;
# Copies to his/her wesnoth folder from 1.6&lt;br /&gt;
# Runs it.&lt;br /&gt;
# Removes it. (optional)&lt;br /&gt;
# Forgets about the process and starts enjoying upgraded Wesnoth.&lt;br /&gt;
I mentioned stable version because of three reasons:&lt;br /&gt;
* not many files are (or should be) changed and added during development of stable branch&lt;br /&gt;
* there is a good starting point upon which the unified patch would be created, i.e. first release of the branch (for example release 1.6 for 1.6.x branch)&lt;br /&gt;
* it is aimed to be used by the majority of Wesnoth players.&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
My approach is simple: compare two filetrees &amp;quot;wesnoth1.6/&amp;quot; and &amp;quot;wesnoth1.6.5/&amp;quot; and include in one package all files that have been added or changed between these two. Then compress it with 7-Zip and make it a self-extracting archive.&lt;br /&gt;
Benefits of this approach:&lt;br /&gt;
* Patches are not incremental, a 1.6.7 patch will work with 1.6.6 as good as with 1.6.1 or 1.6.&lt;br /&gt;
* Allows easy exclusions of patched files (for example Hungary fansite will be able to provide substantially smaller patches with only English and Hungarian translations included)&lt;br /&gt;
* Cross-platform (will work on all OSes that 7-Zip supports)&lt;br /&gt;
&lt;br /&gt;
Some statistics of 7-zipped data:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|Part&lt;br /&gt;
|Original MB&lt;br /&gt;
|7-zipped MB&lt;br /&gt;
|-&lt;br /&gt;
|wesnoth.exe&lt;br /&gt;
|13.6&lt;br /&gt;
|2.55&lt;br /&gt;
|-&lt;br /&gt;
|translations/&lt;br /&gt;
|56.8&lt;br /&gt;
|8.85&lt;br /&gt;
|-&lt;br /&gt;
|data/ * (see below)&lt;br /&gt;
|~5&lt;br /&gt;
|~0.5&lt;br /&gt;
|}&lt;br /&gt;
data/ - excluding graphics, sounds, music and campaigns (only because campaigns contained lots of new graphics and I was too lazy to exclude them manually from their directories)&lt;br /&gt;
&lt;br /&gt;
It can be seen that if there are no changes to graphics or sounds, the patch size can be easily kept below 20 MB (even below 10 MB if you don't want to update translations).&lt;br /&gt;
Concerning translations, there could be two patch files for one release - one containing only English[US] update for English people and others that care only about gameplay fixes. The second one would contain all translations, and would be about 9 MB bigger.&lt;br /&gt;
&lt;br /&gt;
====Things that should be avoided====&lt;br /&gt;
To keep patch files as small as possible, developers should avoid (in stable branch):&lt;br /&gt;
* Adding/changing graphics and sounds (especially sounds). Since their formats are already compressed, changing a 6 MB ogg file will result in a 6 MB larger patch.&lt;br /&gt;
* Reorganizing structure of wesnoth/ tree (i.e. renaming or moving files or directories). Unless there is a better tool developed, it's a very bad idea since every file and dir which changed location will be included in the patch, even if it wasn't changed at all.&lt;br /&gt;
* Adding any references to Wesnoth version in default menu Start shortcuts etc. since it doesn't introduce anything useful to average player and increases the difficulty of patching it correctly.&lt;br /&gt;
&lt;br /&gt;
====Progress====&lt;br /&gt;
&lt;br /&gt;
I am currently working on getting first working beta. It is being written in Python, like the rest of Wesnoth tools.&lt;br /&gt;
&lt;br /&gt;
==My contributions==&lt;br /&gt;
[https://gna.org/patch/index.php?1124 patch #1124] - adding &amp;quot;hidden&amp;quot; attribute to [[SideWML]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Nital&amp;diff=28867</id>
		<title>User:Nital</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Nital&amp;diff=28867"/>
		<updated>2009-03-19T23:06:54Z</updated>

		<summary type="html">&lt;p&gt;Nital: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome at my userpage! You can read about my ideas and projects connected with Wesnoth here.&lt;br /&gt;
&lt;br /&gt;
==My ideas==&lt;br /&gt;
&lt;br /&gt;
My main interest as for now is easing the process of patching Wesnoth binaries. That is mainly because my friends has requested a method that would allow them upgrade without downloading ~200 MB every time.&lt;br /&gt;
Another reason is because Ivanovic told me than nobody bothered about that before, and I see this part quite important ;)&lt;br /&gt;
&lt;br /&gt;
===Wesnoth binary patch problem===&lt;br /&gt;
&lt;br /&gt;
Be warned - since my friends are using Windows, this problem will be considered mostly from Windows perspective. However, it may be applicable to other OSes as well, I don't know.&lt;br /&gt;
As everyone knows, official Wesnoth packages are getting bigger and bigger with each release. It is obvious that downloading a &amp;gt;100 MB file every time isn't convenient.&lt;br /&gt;
&lt;br /&gt;
====Solutions so far====&lt;br /&gt;
There was a try with providing xdeltas (read more here: [[Download Xdeltas]]) for Windows binaries, but as it's stated there - xdeltas of binaries have two major cons:&lt;br /&gt;
* They are incremental, no patch unification is possible (to upgrade from 1.2.3 to 1.2.5 you have to download 1.2.3-&amp;gt;1.2.4 and 1.2.4-&amp;gt;1.2.5 xdeltas, unless devs provide 1.2.3-&amp;gt;1.2.5 xdelta)&lt;br /&gt;
* Due to unstable character of inner structure of the installation binary, xdeltas of these tend to have large sizes.&lt;br /&gt;
However, developers of professional games somehow manage to keep their patches small, working and sometimes even quite unified (so the patch can handle updating several different versions). They usually achieve that by working on an already installed game and that is also my approach.&lt;br /&gt;
&lt;br /&gt;
====Goal====&lt;br /&gt;
&lt;br /&gt;
The goal is to make creating patches for stable branch easy. Patch in this context means a small executable that user:&lt;br /&gt;
# Copies to his/her wesnoth folder from 1.6&lt;br /&gt;
# Runs it.&lt;br /&gt;
# Removes it. (optional)&lt;br /&gt;
# Forgets about the process and starts enjoying upgraded Wesnoth.&lt;br /&gt;
I mentioned stable version because of three reasons:&lt;br /&gt;
* not many files are (or should be) changed and added during development of stable branch&lt;br /&gt;
* there is a good starting point upon which the unified patch would be created, i.e. first release of the branch (for example release 1.6 for 1.6.x branch)&lt;br /&gt;
* it is aimed to be used by the majority of Wesnoth players.&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
My approach is simple: compare two filetrees &amp;quot;wesnoth1.6/&amp;quot; and &amp;quot;wesnoth1.6.5/&amp;quot; and include in one package all files that have been added or changed between these two. Then compress it with 7-Zip and make it a self-extracting archive.&lt;br /&gt;
Benefits of this approach:&lt;br /&gt;
* Patches are not incremental, a 1.6.7 patch will work with 1.6.6 as good as with 1.6.1 or 1.6.&lt;br /&gt;
* Allows easy exclusions of patched files (for example Hungary fansite will be able to provide substantially smaller patches with only English and Hungarian translations included)&lt;br /&gt;
* Cross-platform (will work on all OSes that 7-Zip supports)&lt;br /&gt;
&lt;br /&gt;
Some statistics of 7-zipped data:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|Part&lt;br /&gt;
|Original MB&lt;br /&gt;
|7-zipped MB&lt;br /&gt;
|-&lt;br /&gt;
|wesnoth.exe&lt;br /&gt;
|13.6&lt;br /&gt;
|2.55&lt;br /&gt;
|-&lt;br /&gt;
|translations/&lt;br /&gt;
|56.8&lt;br /&gt;
|8.85&lt;br /&gt;
|-&lt;br /&gt;
|data/ * (see below)&lt;br /&gt;
|~5&lt;br /&gt;
|~0.5&lt;br /&gt;
|}&lt;br /&gt;
data/ - excluding graphics, sounds, music and campaigns (only because campaigns contained lots of new graphics and I was too lazy to exclude them manually from their directories)&lt;br /&gt;
&lt;br /&gt;
It can be seen that if there are no changes to graphics or sounds, the patch size can be easily kept below 20 MB (even below 10 MB if you don't want to update translations).&lt;br /&gt;
Concerning translations, there could be two patch files for one release - one containing only English[US] update for English people and others that care only about gameplay fixes. The second one would contain all translations, and would be about 9 MB bigger.&lt;br /&gt;
&lt;br /&gt;
====Things that should be avoided====&lt;br /&gt;
To keep patch files as small as possible, developers should avoid (in stable branch):&lt;br /&gt;
* Adding/changing graphics and sounds (especially sounds). Since their formats are already compressed, changing a 6 MB ogg file will result in a 6 MB larger patch.&lt;br /&gt;
* Reorganizing structure of wesnoth/ tree (i.e. renaming or moving files or directories). Unless there is a better tool developed, it's a very bad idea since every file and dir which changed location will be included in the patch, even if it wasn't changed at all.&lt;br /&gt;
* Adding any references to Wesnoth version in default menu Start shortcuts etc. since it doesn't introduce anything useful to average player and increases the difficulty of patching it correctly.&lt;br /&gt;
&lt;br /&gt;
====Progress====&lt;br /&gt;
&lt;br /&gt;
I am currently working on getting first working beta. It is being written in Python, like the rest of Wesnoth tools.&lt;br /&gt;
&lt;br /&gt;
==My contributions==&lt;br /&gt;
[https://gna.org/patch/index.php?1124 patch #1124] - adding &amp;quot;hidden&amp;quot; attribute to [[SideWML]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Nital&amp;diff=28866</id>
		<title>User:Nital</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Nital&amp;diff=28866"/>
		<updated>2009-03-19T23:06:24Z</updated>

		<summary type="html">&lt;p&gt;Nital: New page: Welcome at my userpage! You can read about my ideas and projects connected with Wesnoth here.  ==My ideas==  My main interest as for now is easing the process of patching Wesnoth binaries....&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome at my userpage! You can read about my ideas and projects connected with Wesnoth here.&lt;br /&gt;
&lt;br /&gt;
==My ideas==&lt;br /&gt;
&lt;br /&gt;
My main interest as for now is easing the process of patching Wesnoth binaries. That is mainly because my friends has requested a method that would allow them upgrade without downloading ~200 MB every time.&lt;br /&gt;
Another reason is because Ivanovic told me than nobody bothered about that before, and I see this part quite important ;)&lt;br /&gt;
&lt;br /&gt;
===Wesnoth binary patch problem===&lt;br /&gt;
&lt;br /&gt;
Be warned - since my friends are using Windows, this problem will be considered mostly from Windows perspective. However, it may be applicable to other OSes as well, I don't know.&lt;br /&gt;
As everyone knows, official Wesnoth packages are getting bigger and bigger with each release. It is obvious that downloading a &amp;gt;100 MB file every time isn't convenient.&lt;br /&gt;
&lt;br /&gt;
====Solutions so far====&lt;br /&gt;
There was a try with providing xdeltas (read more here: [[Download Xdeltas]]) for Windows binaries, but as it's stated there - xdeltas of binaries have two major cons:&lt;br /&gt;
* They are incremental, no patch unification is possible (to upgrade from 1.2.3 to 1.2.5 you have to download 1.2.3-&amp;gt;1.2.4 and 1.2.4-&amp;gt;1.2.5 xdeltas, unless devs provide 1.2.3-&amp;gt;1.2.5 xdelta)&lt;br /&gt;
* Due to unstable character of inner structure of the installation binary, xdeltas of these tend to have large sizes.&lt;br /&gt;
However, developers of professional games somehow manage to keep their patches small, working and sometimes even quite unified (so the patch can handle updating several different versions). They usually achieve that by working on an already installed game and that is also my approach.&lt;br /&gt;
&lt;br /&gt;
====Goal====&lt;br /&gt;
&lt;br /&gt;
The goal is to make creating patches for stable branch easy. Patch in this context means a small executable that user:&lt;br /&gt;
# Copies to his/her wesnoth folder from 1.6&lt;br /&gt;
# Runs it.&lt;br /&gt;
# Removes it. (optional)&lt;br /&gt;
# Forgets about the process and starts enjoying upgraded Wesnoth.&lt;br /&gt;
I mentioned stable version because of three reasons:&lt;br /&gt;
* not many files are (or should be) changed and added during development of stable branch&lt;br /&gt;
* there is a good starting point upon which the unified patch would be created, i.e. first release of the branch (for example release 1.6 for 1.6.x branch)&lt;br /&gt;
* it is aimed to be used by the majority of Wesnoth players.&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
My approach is simple: compare two filetrees &amp;quot;wesnoth1.6/&amp;quot; and &amp;quot;wesnoth1.6.5/&amp;quot; and include in one package all files that have been added or changed between these two. Then compress it with 7-Zip and make it a self-extracting archive.&lt;br /&gt;
Benefits of this approach:&lt;br /&gt;
* Patches are not incremental, a 1.6.7 patch will work with 1.6.6 as good as with 1.6.1 or 1.6.&lt;br /&gt;
* Allows easy exclusions of patched files (for example Hungary fansite will be able to provide substantially smaller patches with only English and Hungarian translations updated)&lt;br /&gt;
* Cross-platform (will work on all OSes that 7-Zip supports)&lt;br /&gt;
&lt;br /&gt;
Some statistics of 7-zipped data:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|Part&lt;br /&gt;
|Original MB&lt;br /&gt;
|7-zipped MB&lt;br /&gt;
|-&lt;br /&gt;
|wesnoth.exe&lt;br /&gt;
|13.6&lt;br /&gt;
|2.55&lt;br /&gt;
|-&lt;br /&gt;
|translations/&lt;br /&gt;
|56.8&lt;br /&gt;
|8.85&lt;br /&gt;
|-&lt;br /&gt;
|data/ * (see below)&lt;br /&gt;
|~5&lt;br /&gt;
|~0.5&lt;br /&gt;
|}&lt;br /&gt;
data/ - excluding graphics, sounds, music and campaigns (only because campaigns contained lots of new graphics and I was too lazy to exclude them manually from their directories)&lt;br /&gt;
&lt;br /&gt;
It can be seen that if there are no changes to graphics or sounds, the patch size can be easily kept below 20 MB (even below 10 MB if you don't want to update translations).&lt;br /&gt;
Concerning translations, there could be two patch files for one release - one containing only English[US] update for English people and others that care only about gameplay fixes. The second one would contain all translations, and would be about 9 MB bigger.&lt;br /&gt;
&lt;br /&gt;
====Things that should be avoided====&lt;br /&gt;
To keep patch files as small as possible, developers should avoid (in stable branch):&lt;br /&gt;
* Adding/changing graphics and sounds (especially sounds). Since their formats are already compressed, changing a 6 MB ogg file will result in a 6 MB larger patch.&lt;br /&gt;
* Reorganizing structure of wesnoth/ tree (i.e. renaming or moving files or directories). Unless there is a better tool developed, it's a very bad idea since every file and dir which changed location will be included in the patch, even if it wasn't changed at all.&lt;br /&gt;
* Adding any references to Wesnoth version in default menu Start shortcuts etc. since it doesn't introduce anything useful to average player and increases the difficulty of patching it correctly.&lt;br /&gt;
&lt;br /&gt;
====Progress====&lt;br /&gt;
&lt;br /&gt;
I am currently working on getting first working beta. It is being written in Python, like the rest of Wesnoth tools.&lt;br /&gt;
&lt;br /&gt;
==My contributions==&lt;br /&gt;
[https://gna.org/patch/index.php?1124 patch #1124] - adding &amp;quot;hidden&amp;quot; attribute to [[SideWML]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SummerOfCodeIdeas&amp;diff=28644</id>
		<title>SummerOfCodeIdeas</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SummerOfCodeIdeas&amp;diff=28644"/>
		<updated>2009-03-13T21:51:06Z</updated>

		<summary type="html">&lt;p&gt;Nital: /* I want to be one of your Google Summer of Code students, what should I do... */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a compilation of ideas from ML. Needs to be refined (more detailed description, deliverables, workload estimation?):&lt;br /&gt;
&lt;br /&gt;
== I want to be one of your Google Summer of Code students, what should I do... ==&lt;br /&gt;
&lt;br /&gt;
Here is a quick list of things to do to get you started&lt;br /&gt;
* Create an account on gna.org&lt;br /&gt;
* Create an account on the wesnoth forum&lt;br /&gt;
* Join the irc channel (#wesnoth-dev on irc.freenode.net) and introduce yourself. We will not give formal interviews, but we will clearly favor people we have learnt to know during the selection process&lt;br /&gt;
* Contact one of our SummerOfCode people (Ivanovic, Sirp, Boucman, Mordante) to have your forum nick marked as a Summer of code student&lt;br /&gt;
&lt;br /&gt;
* Start a wiki page about your idea, add a link on the bottom of this page and add this information on it:&lt;br /&gt;
** List your account names (gna, forum, irc nick) so that we can recognize you&lt;br /&gt;
** Fill the questionnaire on this page: [[SoC_Information_for_Google#Does_your_organization_have_an_application_template_you_would_like_to_see_students_use.3F_If_so.2C_please_provide_it_now.| List of questions to answer]]&lt;br /&gt;
** Detail your idea as much as possible, look at other students pages, and please give milestones and studies you've done&lt;br /&gt;
&lt;br /&gt;
* Though not mandatory, it is highly advisable to go to the [[EasyCoding]] and [[NotSoEasyCoding]] pages and implement one of these ideas (or any idea of similar scope) so we have an idea how you work. Be sure to use your gna account when submitting these patches so we know who it is coming from. You can also implement some features from our feature request database at gna. When you implement something, also list it on your own page with a reference to the patch.&lt;br /&gt;
&lt;br /&gt;
* For working on Wesnoth you have to be able to compile trunk. To do so you should have a look at the [[WesnothSVN|page about svn]] and afterwards [[CompilingWesnoth|compile Wesnoth svn]].&lt;br /&gt;
&lt;br /&gt;
* Once you have everything done here and think your idea is okay, go to [http://groups.google.com/group/google-summer-of-code-announce/web/guide-to-the-gsoc-web-app-for-student-applicants page at google] to submit your application. You have to submit it before '''Date to be supplied later''' or you have no chance to get in!&lt;br /&gt;
&lt;br /&gt;
== List of Ideas for the Project (Suggestions from the wesnoth developers) ==&lt;br /&gt;
&lt;br /&gt;
Here is only a short description of possible Ideas we have, each has a page of its own with a more detailed version on it.&lt;br /&gt;
&lt;br /&gt;
=== Optimize implementation of WML for memory usage ===&lt;br /&gt;
&lt;br /&gt;
Based on this idea: [http://dave.wesnoth.org/?p=9] optimize WML to minimize its memory usage. High memory usage has been a problem for Wesnoth, and this project will aim to reduce it.&lt;br /&gt;
&lt;br /&gt;
=== Implement campaign statistics reports on stats.wesnoth.org ===&lt;br /&gt;
&lt;br /&gt;
Wesnoth has an infrastructure which records details of campaigns that players play into a centralized MySQL database. However, we only have rudimentary reports based on this MySQL database available at this time, at [http://stats.wesnoth.org].&lt;br /&gt;
&lt;br /&gt;
This project would involve writing a stats reporting web site which would take the data from the MySQL database and produce reports in chart and table form. Campaign designers would be able to use these reports to gather feedback on their campaigns and get ideas for improvements.&lt;br /&gt;
&lt;br /&gt;
A student could largely make their choice of infrastructure for creating the Website -- whether they prefer Python, Perl, Ruby, PHP, etc. This is a great opportunity for someone who doesn't want to dive into hardcore C++ to make a valuable contribution to Wesnoth.&lt;br /&gt;
&lt;br /&gt;
=== Extending the Multiplayer server ===&lt;br /&gt;
&lt;br /&gt;
Our multiplayer community is generally strong and healthy, but we believe its growth is limited by some problems in the interface of the multiplayer lobby.&lt;br /&gt;
&lt;br /&gt;
[[SoC Ideas Multiplayer server]] - Full version of the idea, with detailed information&lt;br /&gt;
&lt;br /&gt;
=== Addon server ===&lt;br /&gt;
Wesnoth has an addon server which offers users to upload user &lt;br /&gt;
made content (UMC). This allows all other users of Wesnoth&lt;br /&gt;
to easily download and install this content. The server was &lt;br /&gt;
originally written for user-made campaigns but contains a lot&lt;br /&gt;
more types of addons nowadays. Both the server side and the &lt;br /&gt;
client side need to be improved.&lt;br /&gt;
&lt;br /&gt;
[[SoC Ideas Addon Server]] - Full version of the idea, with detailed information&lt;br /&gt;
&lt;br /&gt;
=== WML validation schemes ===&lt;br /&gt;
Wesnoth uses WML as basic data structure. Over the years&lt;br /&gt;
this language has evolved and got more complex. At the&lt;br /&gt;
moment the WML is validated at runtime and in case of a&lt;br /&gt;
problem the engine stops. With schemes these problems can&lt;br /&gt;
be validated when loading the WML, making it easier to find&lt;br /&gt;
problems before running into them.&lt;br /&gt;
&lt;br /&gt;
[[SoC Ideas Schemes]] - Full version of the idea, with detailed information&lt;br /&gt;
&lt;br /&gt;
=== Write a primitive library for Formula AI ===&lt;br /&gt;
&lt;br /&gt;
Wesnoth has always had a simple C++ based AI. David (our lead developer) has been working on a simple language to write AI in Wesnoth: [[FormulaAI]]&lt;br /&gt;
&lt;br /&gt;
The Wesnoth AI is used as an opponent in most campaigns, and as such is an important piece of code for the Wesnoth project. Unfortunately, because the skills required to understand and modify it are rather arcane, it is also one of the most neglected parts of the Wesnoth code. This is a place where a lot of research and useful work could be done. But keep in mind that [[WhyWritingAWesnothAIIsHard|writing an AI for Wesnoth is difficult]].&lt;br /&gt;
&lt;br /&gt;
Writing a whole AI is so complicated that we believe it can't be done in a single Summer of code. All proposals should keep that in mind and try to identify an interesting subset that would be workable in the limited time of a summer of code&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[SoC Ideas FormulaAI]] - Full version of the idea, with detailed information&lt;br /&gt;
&lt;br /&gt;
=== Savegame reorganization ===&lt;br /&gt;
The savegame formats of Wesnoth for single player campaigns&lt;br /&gt;
and multiplayer differ from each other. And they are processed&lt;br /&gt;
differently as well. Now there is an additional request coming&lt;br /&gt;
up: Multiplayer campaigns. The task will be to unify the savegames&lt;br /&gt;
for all types of scenarios in order to provide a maintainable code&lt;br /&gt;
again.&lt;br /&gt;
&lt;br /&gt;
[[SoC Ideas Savegame]] - Full version of the idea, with detailed information&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Other possible ideas to be fleshed out ===&lt;br /&gt;
A MapGenerator rewrite - better scalable for outdoor maps, plus the possibility to define areas (similar to the caverns in the cave generator) etc.&lt;br /&gt;
&lt;br /&gt;
=== Make your own ideas ===&lt;br /&gt;
If you have your own idea the best thing is to join IRC wesnoth-dev at irc.freenode.net and discuss the idea with the developers there. If the developers think your idea is interesting and like the feature you can start to turn it into a full proposal. Once done discuss it again on IRC so the developers can accept your idea.&lt;br /&gt;
&lt;br /&gt;
== Information about our Project ==&lt;br /&gt;
The information we provided google with about our project can be looked up at the site [[SoC Information for Google]].&lt;br /&gt;
&lt;br /&gt;
Also see the [[DeveloperResources]] link (from the [[Project]] page).&lt;br /&gt;
&lt;br /&gt;
== People to bug on IRC ==&lt;br /&gt;
We have prepared a list of people with their &amp;quot;area of competence&amp;quot;. This is to give you an idea on which areas those people can be of help for you. Of course you should always just ask in the IRC chan, but those are the most likely ones to answer questions in the respective area. And here is the list:&lt;br /&gt;
&lt;br /&gt;
[[SoC People to bug on IRC]]&lt;br /&gt;
&lt;br /&gt;
== GSoC Student Applicant Ideas == &lt;br /&gt;
&lt;br /&gt;
Every student interested to work on Wesnoth as part of Summer of Code should create a page of his own where several things should be listed. Here is a short list of what should be mentioned on the list (the more info for us, the better...):&lt;br /&gt;
&lt;br /&gt;
* Who are you? Please list your IRC and forum nickname in here and describe yourself so that we get you to know.&lt;br /&gt;
* What do you want to work on? Please flesh out your personal ideas, so that we get to know what you plan to work on.&lt;br /&gt;
* If you already submitted patches, please list those so that we have a reference.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Summer of Code|*]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SummerOfCodeIdeas&amp;diff=28643</id>
		<title>SummerOfCodeIdeas</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SummerOfCodeIdeas&amp;diff=28643"/>
		<updated>2009-03-13T21:50:44Z</updated>

		<summary type="html">&lt;p&gt;Nital: /* Write a primitive library for Formual AI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a compilation of ideas from ML. Needs to be refined (more detailed description, deliverables, workload estimation?):&lt;br /&gt;
&lt;br /&gt;
== I want to be one of your Google Summer of Code students, what should I do... ==&lt;br /&gt;
&lt;br /&gt;
Here is a quick list of things to do to get you started&lt;br /&gt;
* Create an account on gna.org&lt;br /&gt;
* Create an account on the wesnoth forum&lt;br /&gt;
* Join the irc channel (#wesnoth-dev on irc.freenode.net) and introduce yourself. We will not give formal interviews, but we will clearly favor people we have learnt to know during the selection process&lt;br /&gt;
* Contact one of our SummerOfCode people (Ivanovic, Sirp, Boucman, Mordante) to have your forum nick marked as a Summer of code student&lt;br /&gt;
&lt;br /&gt;
* Start a wiki page about your idea, add a link on the bottom of this page and add this information on it:&lt;br /&gt;
** List your account names (gna, forum, irc nick) so that we can recognize you&lt;br /&gt;
** Fill the questionnaire on this page: [[SoC_Information_for_Google#Does_your_organization_have_an_application_template_you_would_like_to_see_students_use.3F_If_so.2C_please_provide_it_now.| List of questions to answer]]&lt;br /&gt;
** Detail your idea as much as possible, look at other students pages, and please give milestones and studies you've done&lt;br /&gt;
&lt;br /&gt;
* Though not mandatory, it is highly advisable to go to the [[EasyCoding]] and [[NotSoEasyCoding]] pages and implement one of these ideas (or any idea of similar scope) so we have an idea how you work. Be sure to use your gna account when submitting these patches so we know who it is coming from. You can also implement some features from our feature request database at gna. When you implement something, also list it on your own page with a reference to the patch.&lt;br /&gt;
&lt;br /&gt;
* For working on Wesnoth you have to be able to compile trunk. To do so you should have a look at the [[WesnothSVN|page about svn]] and afterwards [[CompilingWesnoth|compile Wesnoth svn]].&lt;br /&gt;
&lt;br /&gt;
* Once you have everything done here and think your idea is okay, go to [http://groups.google.com/group/google-summer-of-code-announce/web/guide-to-the-gsoc-web-app-for-student-applicants to page at google] to submit your application. You have to submit it before '''Date to be supplied later''' or you have no chance to get in!&lt;br /&gt;
&lt;br /&gt;
== List of Ideas for the Project (Suggestions from the wesnoth developers) ==&lt;br /&gt;
&lt;br /&gt;
Here is only a short description of possible Ideas we have, each has a page of its own with a more detailed version on it.&lt;br /&gt;
&lt;br /&gt;
=== Optimize implementation of WML for memory usage ===&lt;br /&gt;
&lt;br /&gt;
Based on this idea: [http://dave.wesnoth.org/?p=9] optimize WML to minimize its memory usage. High memory usage has been a problem for Wesnoth, and this project will aim to reduce it.&lt;br /&gt;
&lt;br /&gt;
=== Implement campaign statistics reports on stats.wesnoth.org ===&lt;br /&gt;
&lt;br /&gt;
Wesnoth has an infrastructure which records details of campaigns that players play into a centralized MySQL database. However, we only have rudimentary reports based on this MySQL database available at this time, at [http://stats.wesnoth.org].&lt;br /&gt;
&lt;br /&gt;
This project would involve writing a stats reporting web site which would take the data from the MySQL database and produce reports in chart and table form. Campaign designers would be able to use these reports to gather feedback on their campaigns and get ideas for improvements.&lt;br /&gt;
&lt;br /&gt;
A student could largely make their choice of infrastructure for creating the Website -- whether they prefer Python, Perl, Ruby, PHP, etc. This is a great opportunity for someone who doesn't want to dive into hardcore C++ to make a valuable contribution to Wesnoth.&lt;br /&gt;
&lt;br /&gt;
=== Extending the Multiplayer server ===&lt;br /&gt;
&lt;br /&gt;
Our multiplayer community is generally strong and healthy, but we believe its growth is limited by some problems in the interface of the multiplayer lobby.&lt;br /&gt;
&lt;br /&gt;
[[SoC Ideas Multiplayer server]] - Full version of the idea, with detailed information&lt;br /&gt;
&lt;br /&gt;
=== Addon server ===&lt;br /&gt;
Wesnoth has an addon server which offers users to upload user &lt;br /&gt;
made content (UMC). This allows all other users of Wesnoth&lt;br /&gt;
to easily download and install this content. The server was &lt;br /&gt;
originally written for user-made campaigns but contains a lot&lt;br /&gt;
more types of addons nowadays. Both the server side and the &lt;br /&gt;
client side need to be improved.&lt;br /&gt;
&lt;br /&gt;
[[SoC Ideas Addon Server]] - Full version of the idea, with detailed information&lt;br /&gt;
&lt;br /&gt;
=== WML validation schemes ===&lt;br /&gt;
Wesnoth uses WML as basic data structure. Over the years&lt;br /&gt;
this language has evolved and got more complex. At the&lt;br /&gt;
moment the WML is validated at runtime and in case of a&lt;br /&gt;
problem the engine stops. With schemes these problems can&lt;br /&gt;
be validated when loading the WML, making it easier to find&lt;br /&gt;
problems before running into them.&lt;br /&gt;
&lt;br /&gt;
[[SoC Ideas Schemes]] - Full version of the idea, with detailed information&lt;br /&gt;
&lt;br /&gt;
=== Write a primitive library for Formula AI ===&lt;br /&gt;
&lt;br /&gt;
Wesnoth has always had a simple C++ based AI. David (our lead developer) has been working on a simple language to write AI in Wesnoth: [[FormulaAI]]&lt;br /&gt;
&lt;br /&gt;
The Wesnoth AI is used as an opponent in most campaigns, and as such is an important piece of code for the Wesnoth project. Unfortunately, because the skills required to understand and modify it are rather arcane, it is also one of the most neglected parts of the Wesnoth code. This is a place where a lot of research and useful work could be done. But keep in mind that [[WhyWritingAWesnothAIIsHard|writing an AI for Wesnoth is difficult]].&lt;br /&gt;
&lt;br /&gt;
Writing a whole AI is so complicated that we believe it can't be done in a single Summer of code. All proposals should keep that in mind and try to identify an interesting subset that would be workable in the limited time of a summer of code&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[SoC Ideas FormulaAI]] - Full version of the idea, with detailed information&lt;br /&gt;
&lt;br /&gt;
=== Savegame reorganization ===&lt;br /&gt;
The savegame formats of Wesnoth for single player campaigns&lt;br /&gt;
and multiplayer differ from each other. And they are processed&lt;br /&gt;
differently as well. Now there is an additional request coming&lt;br /&gt;
up: Multiplayer campaigns. The task will be to unify the savegames&lt;br /&gt;
for all types of scenarios in order to provide a maintainable code&lt;br /&gt;
again.&lt;br /&gt;
&lt;br /&gt;
[[SoC Ideas Savegame]] - Full version of the idea, with detailed information&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Other possible ideas to be fleshed out ===&lt;br /&gt;
A MapGenerator rewrite - better scalable for outdoor maps, plus the possibility to define areas (similar to the caverns in the cave generator) etc.&lt;br /&gt;
&lt;br /&gt;
=== Make your own ideas ===&lt;br /&gt;
If you have your own idea the best thing is to join IRC wesnoth-dev at irc.freenode.net and discuss the idea with the developers there. If the developers think your idea is interesting and like the feature you can start to turn it into a full proposal. Once done discuss it again on IRC so the developers can accept your idea.&lt;br /&gt;
&lt;br /&gt;
== Information about our Project ==&lt;br /&gt;
The information we provided google with about our project can be looked up at the site [[SoC Information for Google]].&lt;br /&gt;
&lt;br /&gt;
Also see the [[DeveloperResources]] link (from the [[Project]] page).&lt;br /&gt;
&lt;br /&gt;
== People to bug on IRC ==&lt;br /&gt;
We have prepared a list of people with their &amp;quot;area of competence&amp;quot;. This is to give you an idea on which areas those people can be of help for you. Of course you should always just ask in the IRC chan, but those are the most likely ones to answer questions in the respective area. And here is the list:&lt;br /&gt;
&lt;br /&gt;
[[SoC People to bug on IRC]]&lt;br /&gt;
&lt;br /&gt;
== GSoC Student Applicant Ideas == &lt;br /&gt;
&lt;br /&gt;
Every student interested to work on Wesnoth as part of Summer of Code should create a page of his own where several things should be listed. Here is a short list of what should be mentioned on the list (the more info for us, the better...):&lt;br /&gt;
&lt;br /&gt;
* Who are you? Please list your IRC and forum nickname in here and describe yourself so that we get you to know.&lt;br /&gt;
* What do you want to work on? Please flesh out your personal ideas, so that we get to know what you plan to work on.&lt;br /&gt;
* If you already submitted patches, please list those so that we have a reference.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Summer of Code|*]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=EasyCoding&amp;diff=28547</id>
		<title>EasyCoding</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=EasyCoding&amp;diff=28547"/>
		<updated>2009-03-09T22:30:01Z</updated>

		<summary type="html">&lt;p&gt;Nital: removing implemented feature&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Foreword ==&lt;br /&gt;
This page is here to document easy to do coding tasks. It is not here to double the feature request database, and should only be filled by people that know the code well enough to judge the difficulty of a given task. &lt;br /&gt;
&lt;br /&gt;
If you are such a person, you should feel free to edit this page.&lt;br /&gt;
&lt;br /&gt;
If you're not, you should post a feature request and discuss your idea on the forum or IRC. A coder with better knowledge of the code might give you the green light to add your feature here.&lt;br /&gt;
&lt;br /&gt;
Anybody should feel free to add &amp;quot;clues&amp;quot; to any tasks, that is entry points, traps to avoid, person to contact to discuss and so on.&lt;br /&gt;
&lt;br /&gt;
If you plan to work on a feature, write your name at the bottom of the feature, with the date. Note that if you are too long at working on a feature I'll &amp;quot;free&amp;quot; it back (that is if you're not working on it. If you have problems implementing it, just tell us....)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:Boucman|Boucman]] 20:48, 3 October 2006 (CEST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since bugs are sometimes a good opportunity to get a first idea of the code, i will add some here that are easy to fix as soon as i stumble upon them (the one i had in mind is fixed already ;-).&lt;br /&gt;
&lt;br /&gt;
--Yogi Bear, 28 February 2008&lt;br /&gt;
&lt;br /&gt;
== MP related features ==&lt;br /&gt;
&lt;br /&gt;
=== Use different font for in-game chat ===&lt;br /&gt;
Since commas and dots are apparently hard to tell apart. As per FR #7470 [https://gna.org/bugs/?7470]&lt;br /&gt;
&lt;br /&gt;
== WML related features ==&lt;br /&gt;
&lt;br /&gt;
=== WML configurable village income / upkeep ===&lt;br /&gt;
Preferably as a [scenario], [side] or [campaign] keys. As per FR #6301 [https://gna.org/bugs/?6301]&lt;br /&gt;
&lt;br /&gt;
=== Add support of [if] for [scenario] ===&lt;br /&gt;
As per FR #4539 [https://gna.org/bugs/?4539]&lt;br /&gt;
&lt;br /&gt;
=== Make [have_unit] optionaly use full SUF ===&lt;br /&gt;
[have_unit] by default uses SUF but does not apply it to recall list. Introduce an optional key that will allow to lift that limitation.&lt;br /&gt;
&lt;br /&gt;
=== Side-specific results ===&lt;br /&gt;
Giving result=defeat or result=victory for specific sides. ([http://gna.org/bugs/index.php?4960 FR #4960]) -- [[User:dlr365|dlr365]] -- patch submitted [https://gna.org/bugs/index.php?4960]&lt;br /&gt;
&lt;br /&gt;
=== Support for leaderless multiplayergames ===&lt;br /&gt;
Add support for the WML key victory_when_enemies_defeated= in the scenario tag during multiplayergames. ([https://gna.org/bugs/index.php?8106 FR #8106])&lt;br /&gt;
&lt;br /&gt;
=== Other Ideas ===&lt;br /&gt;
See [[FutureWML]]; some ideas there are easier than others.&lt;br /&gt;
&lt;br /&gt;
== Improvements to FormulaAI ==&lt;br /&gt;
&lt;br /&gt;
Add new formula functions, or minor improvements to the formula language. Make it easier to debug the formula language.&lt;br /&gt;
&lt;br /&gt;
== GUI related features ==&lt;br /&gt;
-------------------&lt;br /&gt;
&lt;br /&gt;
Note at the moment Mordante is working on a new GUI system, these &lt;br /&gt;
changes will probably affect the way these items need to be implemented.&lt;br /&gt;
Contact Mordante on IRC before starting to work on these.&lt;br /&gt;
  &lt;br /&gt;
--[[User:SkeletonCrew|SkeletonCrew]] 14:04, 9 March 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Theme Changes ===&lt;br /&gt;
&lt;br /&gt;
* allow custom themes to display values of WML variables ([http://gna.org/bugs/index.php?6209 FR #6209])&lt;br /&gt;
* hide the hourglass item from the statusbar when there is no timer&lt;br /&gt;
&lt;br /&gt;
=== Widget Changes ===&lt;br /&gt;
* show side number, name and team association information in the status table &lt;br /&gt;
* make games sortable in the lobby (open slots, total number of players, era, XP modifier, gold per village, fog/shroud) &lt;br /&gt;
* input history (chat, commands, ..) - note: rujasu is working on this feature&lt;br /&gt;
&lt;br /&gt;
== GUI2 related features ==&lt;br /&gt;
GUI2 is the new gui engine Mordante/SkeletonCrew is working on. &lt;br /&gt;
* Information on the wiki can be found here http://www.wesnoth.org/wiki/GUIToolkit&lt;br /&gt;
* The source code is under src/gui/&lt;br /&gt;
* The configuration config files are under data/gui/default&lt;br /&gt;
&lt;br /&gt;
Some tasks need the --new-widgets since the code is only shown in the experimental mode. Tasks which need this switch have the * in the title.&lt;br /&gt;
&lt;br /&gt;
=== Generic yes/no ok/cancel dialog ===&lt;br /&gt;
There's already a generic OK dialog &lt;br /&gt;
* src/gui/dialogs/message.[h|c]pp&lt;br /&gt;
* data/gui/default/window/message.cfg&lt;br /&gt;
&lt;br /&gt;
This dialog should have the option to show a cancel button as well and also let the caller of the dialog determine the text of the button. Maybe more buttons (4 in total) can be added to make the dialog more flexible.&lt;br /&gt;
&lt;br /&gt;
=== * Minimap ===&lt;br /&gt;
The minimap widget has already been made but is broken.&lt;br /&gt;
* src/gui/widgets/minimap.[c|h]pp&lt;br /&gt;
&lt;br /&gt;
The drawing code has been rewritten, but this widget hasn't been updated it's used in the MP connection dialog (which needs more work).&lt;br /&gt;
&lt;br /&gt;
=== * Savegame dialog ===&lt;br /&gt;
This is a new dialog to write and requires the minimap code to be fixed first. The dialog should mimic the current dialog. Sorting of a listbox and the proper alignment of the columns is not important (the engine doesn't support this yet). The code should only be used when --new-widgets is used as start switch since we're in a feature freeze at the moment.&lt;br /&gt;
&lt;br /&gt;
=== * Title screen ===&lt;br /&gt;
A start has been made for the new titlescreen&lt;br /&gt;
* src/gui/dialogs/title_screen.[c|h]pp&lt;br /&gt;
* data/gui/default/window/title_screen.cfg&lt;br /&gt;
This should be improved to include the buttons and alignment of the current title screen. The 'roll-over' image is not part of this task.&lt;br /&gt;
&lt;br /&gt;
=== Arrow keys for the slider ===&lt;br /&gt;
There's a new slider widget, but it doesn't support the keyboard yet.&lt;br /&gt;
gui/widgets/slider.[c|h]pp&lt;br /&gt;
&lt;br /&gt;
Clicking on the widget should capture the keyboard and then arrow left/right should move one step even if not all steps are visible.&lt;br /&gt;
&lt;br /&gt;
=== Slider sizing ===&lt;br /&gt;
There are some issues with the sizing of a slider.&lt;br /&gt;
gui/widgets/slider.[c|h]pp&lt;br /&gt;
&lt;br /&gt;
In a layout step it needs to try to shrink itself, not entirely sure where or how yet, best ask mordante on irc.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
=== More powerful village naming ===&lt;br /&gt;
'''Adding mountain names and other features to village names, having a second random name in village names'''&lt;br /&gt;
&lt;br /&gt;
Currently the village naming engine has a very good structure that could allow &lt;br /&gt;
more powerfull names to be generated. &lt;br /&gt;
Understanding how it works should be quite easy, and a few usefull improvements could be added.&lt;br /&gt;
&lt;br /&gt;
* Currently villages can use lake names and river names, this should be extended to other features like bridges, swamps, mountains etc...&lt;br /&gt;
* It would be nice to have a separate list of &amp;quot;first sylabus&amp;quot; and &amp;quot;last sylabus&amp;quot; for naming. That's not really needed in english, but some translations could use it&lt;br /&gt;
* Again, it is common to have villages with more than one &amp;quot;random&amp;quot; word in them. having a $name2 variable would be nice&lt;br /&gt;
&lt;br /&gt;
ACardboardRobot 2/2/07&lt;br /&gt;
&lt;br /&gt;
=== Debug Mode ===&lt;br /&gt;
* New debug command functionality (setting additional status.variables, possibly terrain)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[NotSoEasyCoding]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Future]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=AnimationWML&amp;diff=28423</id>
		<title>AnimationWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=AnimationWML&amp;diff=28423"/>
		<updated>2009-03-01T17:21:39Z</updated>

		<summary type="html">&lt;p&gt;Nital: /* Syntax summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page covers unit animations. At any point in game, units are playing an animation. Even when the unit is standing, it is actually playing a single frame animation.&lt;br /&gt;
&lt;br /&gt;
This page will deal with the two problems of animations&lt;br /&gt;
* How are animations Chosen&lt;br /&gt;
* What exactly is drawn&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How animations are drawn ==&lt;br /&gt;
=== Animations ===&lt;br /&gt;
Any unit has a huge set of animations to choose from. Animations are WML blocks in the unit type, enclosed in either the generic type '''[animation]''' or some more specific tags such as '''[attack_anim]''' '''[idle_anim]''' and the like. An animation is what a unit displays when a given event is triggered, and a certain set of conditions are met such as&lt;br /&gt;
* unit is attacking&lt;br /&gt;
* unit is idling&lt;br /&gt;
* unit is attacking (event) and uses a melee weapon (condition)&lt;br /&gt;
* unit is attacking (event) and uses a melee weapon (condition) and opponent can't retaliate (condition)&lt;br /&gt;
&lt;br /&gt;
events and conditions are described entirely in the [animation] block, and will be discussed in the animation choice section.&lt;br /&gt;
&lt;br /&gt;
=== Frames ===&lt;br /&gt;
    &lt;br /&gt;
An animation is cut in frames. Frames are WML blocks that are contained either in '''[frame]''' WML blocks or in generic '''[xxx_frame]''' block. (the xxx part can be any string not starting with an underscore) the xxx part in the frame name is called the frame prefix. frames of the type '''[frame]''' are said to have an empty prefix&lt;br /&gt;
&lt;br /&gt;
A frame typically describes an image, where an how to render it. It can contain such things as&lt;br /&gt;
* the image to display&lt;br /&gt;
* how transparent should that image be&lt;br /&gt;
* where to draw that image.&lt;br /&gt;
&lt;br /&gt;
At any given time, an animation will display one frame for each frame prefix it can find. I.e if your animation has both '''[frame]''' and '''[missile_frame]''' blocks, both will be displayed at the same time&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The frame with the empty prefix is special in many way. It is assumed to contain the image representing the unit itself, and as such the engine will heavily temper with it in multiple ways, such as providing a default image if none is available, or forcing the image to be green when the unit is poisoned&lt;br /&gt;
&lt;br /&gt;
=== Timing, Clock, Multiple animations ===&lt;br /&gt;
When an animation is played it has an internal clock that is run. The step of this clock is the milisecond, and each frame is played for a given duration. Each animation also has a starting time which tells the animation engine at what value the animation clock should start&lt;br /&gt;
&lt;br /&gt;
This starting time is very important when multiple animations from different units are played synchronously  Typically a fight involves a unit playing its defense animation while the opponent plays it's attack animation (and a third might play its leading animation, too). In that case all animations have a common clock, and are played concurrently.&lt;br /&gt;
&lt;br /&gt;
The convention is that the &amp;quot;important time&amp;quot; (usually the time of the hit) is at time 0. everything before should be at negative time, everything after at positive time. This is a WML convention that is not enforced by the engine&lt;br /&gt;
&lt;br /&gt;
In that case, it is very important that these animations (which can have different lengths) be synchronized. Fight animations are synchronized around the point of impact, so they all reach time 0 when the attack lands (or misses). This is accomplished through the use of the '''start_time''' key of the '''[animation]''' tag.&lt;br /&gt;
&lt;br /&gt;
Just like the '''[frame]''' tag can have a prefix, so can the '''start_time''' key. A '''start_time''' key without prefix will affect a '''[frame]''' tag without prefix, while a '''start_time''' key with a prefix will affect a '''[frame]''' tag with the same prefix.&lt;br /&gt;
&lt;br /&gt;
==== Example Syntax ====&lt;br /&gt;
    [attack_anim]&lt;br /&gt;
        [attack_filter]&lt;br /&gt;
            name= _ &amp;quot;bow&amp;quot;&lt;br /&gt;
        [/attack_filter]&lt;br /&gt;
        '''start_time'''=-350&lt;br /&gt;
        '''missile_start_time'''=-150&lt;br /&gt;
        [missile_frame]&lt;br /&gt;
            duration=150&lt;br /&gt;
            image=&amp;quot;projectiles/missile-n.png&amp;quot;&lt;br /&gt;
            image_diagonal=&amp;quot;projectiles/missile-ne.png&amp;quot;&lt;br /&gt;
        [/missile_frame]&lt;br /&gt;
        [if]&lt;br /&gt;
            hits=yes&lt;br /&gt;
            [frame]&lt;br /&gt;
                duration=350&lt;br /&gt;
                sound=bow.ogg&lt;br /&gt;
            [/frame]&lt;br /&gt;
        [/if]&lt;br /&gt;
        [else]&lt;br /&gt;
            hits=no&lt;br /&gt;
            [frame]&lt;br /&gt;
                duration=350&lt;br /&gt;
                sound=bow-miss.ogg&lt;br /&gt;
            [/frame]&lt;br /&gt;
        [/else]&lt;br /&gt;
    [/attack_anim]&lt;br /&gt;
&lt;br /&gt;
=== The content of a frame ===&lt;br /&gt;
==== Syntax summary ====&lt;br /&gt;
 [frame]&lt;br /&gt;
    duration=&amp;lt;integer&amp;gt;&lt;br /&gt;
    begin=&amp;lt;deprecated,integer&amp;gt;&lt;br /&gt;
    end=&amp;lt;deprecated,integer&amp;gt;&lt;br /&gt;
    image=&amp;lt;string&amp;gt;&lt;br /&gt;
    image_diagonal=&amp;lt;string&amp;gt;&lt;br /&gt;
    image_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
    sound=&amp;lt;string&amp;gt;&lt;br /&gt;
    halo=&amp;lt;progressive string&amp;gt;&lt;br /&gt;
    halo_x=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
    halo_y=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
    halo_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
    alpha=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
    offset=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
    blend_color=&amp;lt; red, green, blue &amp;gt;&lt;br /&gt;
    blend_ratio=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
    text=&amp;lt;string&amp;gt;&lt;br /&gt;
    text_color=&amp;lt; red, green, blue &amp;gt;&lt;br /&gt;
    submerge=&amp;lt;dev:progressive float&amp;gt;&lt;br /&gt;
    x=&amp;lt;dev:progressive int&amp;gt;&lt;br /&gt;
    y=&amp;lt;dev:progressive int&amp;gt;&lt;br /&gt;
    layer=&amp;lt;dev:progressive int&amp;gt;&lt;br /&gt;
 [/frame]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
dev denotes a {{DevFeature}}&lt;br /&gt;
&lt;br /&gt;
==== Progressive parameters ====&lt;br /&gt;
&lt;br /&gt;
Some parameters above are marked as ''progressive'' This means that you can specify that during the time the frame is displayed, the parameter should smoothly slide from one value to an other.&lt;br /&gt;
&lt;br /&gt;
A typical example would be a unit progressively fading out, becoming transparent&lt;br /&gt;
&lt;br /&gt;
To do that, you could use:&lt;br /&gt;
&lt;br /&gt;
 alpha=1~0&lt;br /&gt;
&lt;br /&gt;
To make a frame, which is 900ms long, slide to transparent for 300ms, stay transparent for another 300ms and finally fade back to normal for 300ms, use:&lt;br /&gt;
&lt;br /&gt;
 alpha=1~0:300,0:300,0~1:300&lt;br /&gt;
&lt;br /&gt;
you could also specify it like that&lt;br /&gt;
&lt;br /&gt;
 alpha=1~0,0,0~1&lt;br /&gt;
&lt;br /&gt;
when a timing is missing, the engine will do its best to fill in in a fair way. &lt;br /&gt;
&lt;br /&gt;
a progressive string has a similar syntax&lt;br /&gt;
&lt;br /&gt;
 halo=halo1.png:300,halo2.png:300,halo2.png:300&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
** '''begin''': (deprecated) will be replaced by '''duration= &amp;lt;end - begin &amp;gt;'''&lt;br /&gt;
** '''end''': (deprecated) see '''begin''' and also [[AnimationWML#Timing.2C_Clock.2C_Multiple_animations|Timing, Clock, Multiple animations]] section for coverage of '''start_time''' which combines with '''duration''' to replace '''begin=''' '''end='''.&lt;br /&gt;
** '''duration''': how long the frame should be displayed. Use instead of '''begin=''' and '''end='''.&lt;br /&gt;
** '''image''': the image to display during the frame.&lt;br /&gt;
** '''image_diagonal''': the image to display when the attack occurs diagonally (directions ne,se,sw,nw).&lt;br /&gt;
** '''image_mod''': a string modifications (see [[ImagePathFunctionWML]] ) that will be applied to all images&lt;br /&gt;
** '''sound''': the sound to play when the frame begins. Can be a comma-separated list of sounds, in which case one of them is chosen randomly every time.&lt;br /&gt;
** '''halo''': the halo to display at the time.&lt;br /&gt;
** '''halo_x''': the position the halo is displayed in pixel relative to the unit's center.&lt;br /&gt;
** '''halo_y''': the position the halo is displayed in pixel relative to the unit's center.&lt;br /&gt;
** '''halo_mod''': a string modifications (see [[ImagePathFunctionWML]] ) that will be applied to all haloes&lt;br /&gt;
** '''alpha''': transparency level to apply to the frame. This is a floating point progressive parameter ranging from 0.0 to 1.0.&lt;br /&gt;
** '''offset''': the position of the image relative to the hex the unit is facing, 0.0 will display the unit in the center of the hex, 1.0 in the center of the faced hex, -1.0 at the center of the hex behind you. This is a progressive parameter.&lt;br /&gt;
** '''blend_color''': a comma separated list of numbers representing a color in RGB (0-255) this color will be mixed to the frame to give it a tint.&lt;br /&gt;
** '''blend_ratio''': this is a progressive parameter ranging from 0 to 1: 0 means no tint, 1 means target color only.&lt;br /&gt;
** '''text''': if specified, floats a label with the given text above the unit (identical to the floating damage and healing numbers).&lt;br /&gt;
** '''text_color''': the color of the above floating label.&lt;br /&gt;
** '''submerge''': {{DevFeature}} the part of the unit that should drawn with 50% opacity (for units in water)&lt;br /&gt;
** '''x''': {{DevFeature}} x offset applied to the frame&lt;br /&gt;
** '''y''': {{DevFeature}} y offset applied to the frame&lt;br /&gt;
** '''layer''': {{DevFeature}} layer used to draw the frame, see discussion bellow&lt;br /&gt;
&lt;br /&gt;
=== Drawing related animation content ===&lt;br /&gt;
==== Syntax summary ====&lt;br /&gt;
 [animation]&lt;br /&gt;
   &amp;lt;animation choice related content&amp;gt;&lt;br /&gt;
   [frame]&lt;br /&gt;
     &amp;lt;frame content&amp;gt;&lt;br /&gt;
   [/frame]&lt;br /&gt;
   [frame]&lt;br /&gt;
     &amp;lt;frame content&amp;gt;&lt;br /&gt;
   [/frame]&lt;br /&gt;
   start_time=&amp;lt;integer&amp;gt;&lt;br /&gt;
   offset=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
   image_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
   blend_with=&amp;lt;r,g,b&amp;gt;&lt;br /&gt;
   blend_ratio=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
   halo=&amp;lt;progressive_string&amp;gt;&lt;br /&gt;
   halo_x=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   halo_y=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   halo_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
   submerge=&amp;lt;dev:progressive float&amp;gt;&lt;br /&gt;
   x=&amp;lt;dev:progressive int&amp;gt;&lt;br /&gt;
   y=&amp;lt;dev:progressive int&amp;gt;&lt;br /&gt;
   layer=&amp;lt;dev:progressive int&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
   [xxx_frame]&lt;br /&gt;
     &amp;lt;frame content&amp;gt;&lt;br /&gt;
   [/xxx_frame]&lt;br /&gt;
   xxx_start_time=&amp;lt;integer&amp;gt;&lt;br /&gt;
   xxx_image_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
   xxx_offset=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
   xxx_blend_with=&amp;lt;r,g,b&amp;gt;&lt;br /&gt;
   xxx_blend_ratio=&amp;lt;progressive float&amp;gt;&lt;br /&gt;
   xxx_halo=&amp;lt;progressive_string&amp;gt;&lt;br /&gt;
   xxx_halo_x=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   xxx_halo_y=&amp;lt;progressive int&amp;gt;&lt;br /&gt;
   xxx_halo_mod=&amp;lt;string&amp;gt;&lt;br /&gt;
   xxx_submerge=&amp;lt;dev:progressive float&amp;gt;&lt;br /&gt;
   xxx_x=&amp;lt;dev:progressive int&amp;gt;&lt;br /&gt;
   xxx_y=&amp;lt;dev:progressive int&amp;gt;&lt;br /&gt;
   xxx_layer=&amp;lt;dev:progressive int&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 [/animation]&lt;br /&gt;
&lt;br /&gt;
dev denotes a {{DevFeature}}&lt;br /&gt;
&lt;br /&gt;
==== Parameter handling ====&lt;br /&gt;
All drawing related parameters in '''[animation]''' can be matched with a corresponding parameter in  a '''[frame]''' block (or a '''[xxx_frame]''' block) The value provided in the animation will be used if no value is provided in the frame. &lt;br /&gt;
&lt;br /&gt;
The point of these two level of parameters is to easily be able to specify a parameter at the animation level and override it for a special case of frame.&lt;br /&gt;
&lt;br /&gt;
== How animations are chosen ==&lt;br /&gt;
Within a unit decription block there are multiple animations. Each animation is meant to be played in a very special set of circumstances. We will discuss here how to tell the animation engine when a given animation should be played. &lt;br /&gt;
&lt;br /&gt;
Let's take an example. Suppose we have a unit which has the skirmisher ability. We have the folowing movement animations :&lt;br /&gt;
* a normal walking animation&lt;br /&gt;
* a swimming animation when the unit is in water&lt;br /&gt;
* a tiptioeing animation when moving next to an ennemy unit&lt;br /&gt;
&lt;br /&gt;
Ok. most of the time it's easy to guess what animation should be. However if you are both in water and next to an ennemy unit, the animation to play is not obvious.&lt;br /&gt;
&lt;br /&gt;
To solve that question, each animation has a number of filtering criterias. The engine follow the following rules to select an animation&lt;br /&gt;
* Start with all animations&lt;br /&gt;
* Drop all animations with a criteria that fails on the current situation&lt;br /&gt;
* Take the animations that have the most maching criterias&lt;br /&gt;
* If there are more than one animation remaining, take an animation randomly&lt;br /&gt;
* If all animations have been droped, the engine will provide a smart default.&lt;br /&gt;
    &lt;br /&gt;
here is a pseudo-code explaination of this algorithm&lt;br /&gt;
&lt;br /&gt;
 foreach animation&lt;br /&gt;
    animation_score = 0&lt;br /&gt;
    foreach filter-criteria&lt;br /&gt;
      if &amp;lt;criteria-fails&amp;gt; &lt;br /&gt;
	  animation_score = -1;&lt;br /&gt;
	  break;&lt;br /&gt;
      elsif &amp;lt;criteria-matches&amp;gt; &lt;br /&gt;
	  animation_score++&lt;br /&gt;
    endfor&lt;br /&gt;
    if animation_score &amp;gt; max_score&lt;br /&gt;
	&amp;lt;empty animation list&amp;gt;&lt;br /&gt;
	max_score = animation_score;&lt;br /&gt;
	push(animation,animation_list);&lt;br /&gt;
    elsif animation_score = max_score&lt;br /&gt;
	push(animation,animation_list);&lt;br /&gt;
 endfor&lt;br /&gt;
 &amp;lt;choose an animation randomly from animation_list&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
Note that all animations don't have all the filters...&lt;br /&gt;
&lt;br /&gt;
so, if we have a unit with&lt;br /&gt;
# an animation for water terrain&lt;br /&gt;
# an animation for SE on grassland&lt;br /&gt;
# an animation with no criteria&lt;br /&gt;
# an animation for N,NE,NW,S,SW,SE&lt;br /&gt;
# an animation for NW&lt;br /&gt;
&lt;br /&gt;
* 3. will never be taken, because 4. will always trump it&lt;br /&gt;
* on water going NW, it can be 1. 4. 5.&lt;br /&gt;
* on water, any direction but NW, it will be 1. or 4.&lt;br /&gt;
* on SE grassland it will be 2.&lt;br /&gt;
* on other grasslands, it will be 4. (4. or 5. if NW)&lt;br /&gt;
&lt;br /&gt;
=== Generic animation filters available for all animations ===&lt;br /&gt;
* '''apply_to''': a list of comma separated keywords describing what event should trigger the animation (movement, attack...) the complete list is given below&lt;br /&gt;
* '''value''': a list of comma separated integer, the meaning depends on the triggering event. the meaning is given with the list of event&lt;br /&gt;
* '''terrain''': a list of comma separated terrain letters, the animation will only be used on these terrains.  See [[FilterWML]].&lt;br /&gt;
* '''[unit_filter]''': this will filter using a standard unit filter on the animated unit. Note that matching all criterias in the filter will only earn you one point for animation selection, but that you can have multiple '''[unit_filter]''' blocks in an animation. ({{DevFeature}} renamed to [filter])&lt;br /&gt;
* '''[secondary_unit_filter]''': this will filter using a standard unit filter on the unit in the hex faced. Note that matching all criterias in the filter will only earn you one point for animation selection, but that you can have multiple '''[secondary_unit_filter]''' blocks in an animation. Also note that if the faced hex is empty, the whole filter will fail. ({{DevFeature}} renamed to [filter_second])&lt;br /&gt;
* '''direction''': a list of directions (n,ne,se,s,sw,nw), the animation will only be used when acting or moving in this direction (the attack direction for attack animations, moving direction for movement animations, direction of lead unit for leading animations, and so on).&lt;br /&gt;
* '''frequency''': this integer value allows to easily tweak the matching frequency of animations. The filter will fail n-1 times out of n, randomly. Note that unlike every other filter, matching this filter won't give an extra point.&lt;br /&gt;
* '''[attack_filter]''': a standard attack filter to match on the attacker's attack. See  [[FilterWML]]. ({{DevFeature}} renamed to [filter_attack])&lt;br /&gt;
* '''[secondary_attack_filter]''': a standard attack filter to match on the defender's attack. See [[FilterWML]]. Also note that if the defender doesn't have any weapon to retaliate with, this filter will always fail. ({{DevFeature}} renamed to [filter_second_attack])&lt;br /&gt;
* '''hits''': filters attack animations based on whether the attack hits, misses or kills. Accepts a list of the following:&lt;br /&gt;
** '''hit''': the attack hits, defender survives.&lt;br /&gt;
** '''no''' or '''miss''': the attack misses.&lt;br /&gt;
** '''kill''': the attack hits, defender dies.&lt;br /&gt;
** '''yes''': is an alias of '''hit,kill'''.&lt;br /&gt;
* '''swing''': a list of numbers representing the swing numbers this animation should match (numbered from 1).&lt;br /&gt;
&lt;br /&gt;
=== Events trigerring animations and default animations ===&lt;br /&gt;
==== standing ====&lt;br /&gt;
This animation is triggered whenever any other animation is finished, and is played in loop until another animation is triggered&lt;br /&gt;
&lt;br /&gt;
this is the default &amp;quot;standing image&amp;quot; for the unit&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no standing animation is set a single frame animation based on the enclosing unit's '''image=''' field is used&lt;br /&gt;
==== selected ====&lt;br /&gt;
This animation is triggered whenever the unit is selected&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;0.0~0.3:100,0.3~0.0:200&amp;quot; blend_color=255,255,255''&lt;br /&gt;
==== recruited ====&lt;br /&gt;
This animation is triggered whenever the unit is recruited or recalled&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''highlight=0~1:600''&lt;br /&gt;
==== levelin ====&lt;br /&gt;
This animation is triggered whenever the unit levels, before the unit is replaced by the new unit&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;1~0:600&amp;quot; blend_color=255,255,255''&lt;br /&gt;
==== levelout ====&lt;br /&gt;
This animation is triggered whenever the unit levels, after the unit is replaced by the new unit&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;0~1:600&amp;quot; blend_color=255,255,255''&lt;br /&gt;
==== movement ====&lt;br /&gt;
This animation is used whenever a unit moves. There are multiple things to consider when dealing with movement animation&lt;br /&gt;
* unit stay ''exactly'' 150ms in each hex. so you typically want to have an offset of ''0~1:150,0~1:150,0~1:150,0~1:150,0~1:150'' or something similar&lt;br /&gt;
* when a unit enters a hex, the current anim is tested again.&lt;br /&gt;
** if the current animation is still valid (i.e it passes all its filter) it is kept, whatever the final score is&lt;br /&gt;
** if it fails, a new movement anim is searched&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''offset=&amp;quot;0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150&amp;quot;''&lt;br /&gt;
==== pre_teleport ====&lt;br /&gt;
This animation is triggered whenever the unit teleports, but before it has moved to the target hex&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;1~0:150&amp;quot; blend_color=255,255,255''&lt;br /&gt;
==== post_teleport ====&lt;br /&gt;
This animation is triggered whenever the unit teleports, but after it has moved to the target hex&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;0~1:150&amp;quot; blend_color=255,255,255''&lt;br /&gt;
==== healing ====&lt;br /&gt;
This animation is triggered when the unit has healing powers and uses them&lt;br /&gt;
&lt;br /&gt;
''value='' is the number of points healed&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
==== healed ====&lt;br /&gt;
This animation is triggered whenever the unit is healed for any reason&lt;br /&gt;
&lt;br /&gt;
''value='' is the number of points healed&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;0:30,0.5:30,0:30,0.5:30,0:30,0.5:30,0:30,0.5:30,0:30&amp;quot; blend_color=255,255,255''&lt;br /&gt;
and plays the sound ''heal.wav''&lt;br /&gt;
==== poisoned ====&lt;br /&gt;
This animation is triggered whenever the unit suffers poison dammage&lt;br /&gt;
&lt;br /&gt;
''value='' is the number of points lost&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''blend_with=&amp;quot;0:30,0.5:30,0:30,0.5:30,0:30,0.5:30,0:30,0.5:30,0:30&amp;quot; blend_color=0,255,0''&lt;br /&gt;
and plays the sound 'poison.ogg''&lt;br /&gt;
==== defend ====&lt;br /&gt;
This animation is triggered during a strike, of the unit receiving the blow&lt;br /&gt;
&lt;br /&gt;
''value='' is the number of point lost, if any&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
==== attack ====&lt;br /&gt;
This animation is triggered during a strike, of the unit giving the blow&lt;br /&gt;
&lt;br /&gt;
''value='' is the number of damage dealt, if any&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''offset=&amp;quot;0~0.6:150,0.6~0:150&amp;quot;'' for melee attacks&lt;br /&gt;
No default is provided for range attacks&lt;br /&gt;
==== leading ====&lt;br /&gt;
This animation is triggered for units with the leading special ability, when the unit they are leading is attacking&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== resistance ====&lt;br /&gt;
This animation is triggered for units with the resistance special ability affecting neighbouring fights, when the unit they are helping is defending&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
&lt;br /&gt;
==== death ====&lt;br /&gt;
This animation is triggered when a unit die.&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
if no animation is available, the default uses the standing animation(s) with ''highlight=1~0:600'' and plays the sound in ''die_sound='' of the enclosing unit&lt;br /&gt;
==== victory ====&lt;br /&gt;
This animation is triggered when a unit finishes a fight by killing the other unit&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
==== idling ====&lt;br /&gt;
This animation is called when the unit has been using its standing animation for a random duration.&lt;br /&gt;
&lt;br /&gt;
''value='' is not used, and always contains 0&lt;br /&gt;
&lt;br /&gt;
No default is provided by the engine&lt;br /&gt;
&lt;br /&gt;
==== default  {{DevFeature}} ====&lt;br /&gt;
&lt;br /&gt;
This animation is never triggered, but is used as a base to create new animations&lt;br /&gt;
&lt;br /&gt;
''value='' is used depending of the type of animation it replaces&lt;br /&gt;
&lt;br /&gt;
A single animation made of the base frame is provided by the engine if no default animation is available&lt;br /&gt;
&lt;br /&gt;
==== extra animations ====&lt;br /&gt;
Other values are never called by the engine. However they can be triggered by WML events allowing custom animations.&lt;br /&gt;
&lt;br /&gt;
Note that WML events can also trigger standard animations.&lt;br /&gt;
''value='' is set from the WML event&lt;br /&gt;
&lt;br /&gt;
== Shortcuts, tricks and quirks ==&lt;br /&gt;
&lt;br /&gt;
=== ''[if]'' and ''[else]'' ===&lt;br /&gt;
&lt;br /&gt;
Often, you need to do very slight variations in an animation (like a different sound depending on whether the unit hits or misses its attack), the '''[if]''' and '''[else]''' tags are meant to help you do that. &lt;br /&gt;
    &lt;br /&gt;
Using these in an animation is equivalent to having multiple animations, one with the '''[if]''' block and one with each of the ''[else]'' blocks. Any filtering flags in these blocks will replace the toplevel filters. You can have multiple '''[if]''' blocks in an animation, but you can't nest an '''[if]''' inside another. These should be written directly inside the '''[animation]''' block. The following example would make the '''[frame]''' inside the '''[if]''' be played when the attack misses, and the '''[frame]''' inside the '''[else]''' be played when the attack hits (producing a different sound):&lt;br /&gt;
&lt;br /&gt;
    [if]&lt;br /&gt;
        hits=no&lt;br /&gt;
        [frame]&lt;br /&gt;
            begin=-100&lt;br /&gt;
            end=100&lt;br /&gt;
            image=&amp;quot;units/dwarves/lord-attack.png&amp;quot;&lt;br /&gt;
            sound={SOUND_LIST:MISS}&lt;br /&gt;
        [/frame]&lt;br /&gt;
    [/if]&lt;br /&gt;
    [else]&lt;br /&gt;
        hits=yes&lt;br /&gt;
        [frame]&lt;br /&gt;
            begin=-100&lt;br /&gt;
            end=100&lt;br /&gt;
            image=&amp;quot;units/dwarves/lord-attack.png&amp;quot;&lt;br /&gt;
            sound=axe.ogg&lt;br /&gt;
        [/frame]&lt;br /&gt;
    [/else]&lt;br /&gt;
&lt;br /&gt;
note that this is very close to preprocessing and should be considered as such, especially with regard to scoring and animation selection&lt;br /&gt;
&lt;br /&gt;
=== Simplified animation blocks ===&lt;br /&gt;
To simplify the most common animation cases, you can use different blocks instead of the generic '''[animation]''' block. These are also here for backward compatibility, but are not deprecated and fully supported&lt;br /&gt;
&lt;br /&gt;
some of these use extra tags which are translated in the normal ''value='' tag&lt;br /&gt;
&lt;br /&gt;
some of these define '''[xxx_frame]''' blocks where the frame prefix starts with an underscore. This is not allowed in normal WML (prefix starting with underscore is reserved for the engine internal use). It is here for clarity purpose&lt;br /&gt;
&lt;br /&gt;
* '''[leading_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=leading&lt;br /&gt;
* '''[recruit_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=recruited&lt;br /&gt;
* '''[standing_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=standing,default&lt;br /&gt;
note for 1.4 :''default'' doesn't exist in 1.4, but the semantic is the same.&lt;br /&gt;
&lt;br /&gt;
i.e: the animation will be used to build default animations&lt;br /&gt;
* '''[idle_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=idling&lt;br /&gt;
* '''[levelin_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=levelin&lt;br /&gt;
* '''[levelout_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=levelout&lt;br /&gt;
* '''[healing_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=healing&lt;br /&gt;
 value=&amp;lt;damage= value&amp;gt;&lt;br /&gt;
* '''[healed_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=healed&lt;br /&gt;
 value=&amp;lt;healing= value&amp;gt;&lt;br /&gt;
 [_healed_sound_frame]&lt;br /&gt;
    sound=heal.wav&lt;br /&gt;
 [/_healed_sound_frame]&lt;br /&gt;
* '''[poison_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=poisoned&lt;br /&gt;
 value=&amp;lt;damage= value&amp;gt;&lt;br /&gt;
 [_poison_sound_frame]&lt;br /&gt;
    sound=poison.ogg&lt;br /&gt;
 [/_poison_sound_frame]&lt;br /&gt;
* '''[movement_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=movement&lt;br /&gt;
 offset=&amp;quot;0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150,0~1:150&amp;quot;&lt;br /&gt;
* '''[defend]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=defend&lt;br /&gt;
 value=&amp;lt;damage= value&amp;gt;&lt;br /&gt;
 &amp;lt;WML content&amp;gt;&lt;br /&gt;
 [frame]&lt;br /&gt;
    blend_with=255,0,0&lt;br /&gt;
    blend_ratio=&amp;quot;0.5:50,0.0:50&amp;quot;&lt;br /&gt;
 [/frame]&lt;br /&gt;
&lt;br /&gt;
there are some subtil change compared to what is described above to avoid the red flash when value=0, but it should work as expected as far as WML author are concerned&lt;br /&gt;
 &lt;br /&gt;
* '''[attack_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
if the animation contains a missile frame&lt;br /&gt;
&lt;br /&gt;
 apply_to=attack&lt;br /&gt;
 missile_offset=&amp;quot;0~0.8&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
&lt;br /&gt;
 apply_to=attack&lt;br /&gt;
 offset=&amp;quot;0~0.6,0.6~0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''[death]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=death&lt;br /&gt;
 [_death_sound_frame]&lt;br /&gt;
    sound=&amp;lt;die_sound= of the enclosing [unit] tag&amp;gt;&lt;br /&gt;
 [/_death_sound_frame]&lt;br /&gt;
* '''[victory_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=victory&lt;br /&gt;
* '''[extra_anim]''' is an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=&amp;lt;flag= value of the anim&amp;gt;&lt;br /&gt;
* '''[teleport_anim]''' will be cut into two at the clock-time 0&lt;br /&gt;
everything before zero becomes an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=pre_teleport&lt;br /&gt;
everything after zero becomes an animation with the following parameters automatically set&lt;br /&gt;
 apply_to=post_teleport&lt;br /&gt;
&lt;br /&gt;
== Layering ==&lt;br /&gt;
The ''layer'' progressive parameter allows the animation writer to choose in what order the animation should be drawn.&lt;br /&gt;
&lt;br /&gt;
this value must be between 0 and 100&lt;br /&gt;
&lt;br /&gt;
* the back of haloes is drawn with a value of 10&lt;br /&gt;
* when unspecified, a animation is drawn with a value of 40&lt;br /&gt;
* terrain elements that are supposed to go in front of units (castles) are drawn with a value of 50&lt;br /&gt;
* orbs and status bars are drawn on layer 80&lt;br /&gt;
* when unspecified missile frames are drawn on layer 90&lt;br /&gt;
&lt;br /&gt;
by changing these values, it is easy to have the unit display the way you want&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[UnitWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=InternalActionsWML&amp;diff=28338</id>
		<title>InternalActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=InternalActionsWML&amp;diff=28338"/>
		<updated>2009-02-22T20:53:13Z</updated>

		<summary type="html">&lt;p&gt;Nital: /* [event] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== Internal actions ==&lt;br /&gt;
&lt;br /&gt;
Internal actions are actions that WML uses internally that do not directly affect gameplay, for example storing a variable.&lt;br /&gt;
&lt;br /&gt;
The internal actions '''[if]''', '''[while]''', and '''[event]''' describe when/whether sets of actions should be executed.&lt;br /&gt;
&lt;br /&gt;
== [if] ==&lt;br /&gt;
&lt;br /&gt;
Executes different sets of actions based on whether the conditions described in the condition tags are true or not.&lt;br /&gt;
&lt;br /&gt;
Condition tags:&lt;br /&gt;
* '''[have_unit]''': a unit passing this filter with &amp;gt;0 HP exists&lt;br /&gt;
** [[StandardUnitFilter]] (almost... '''Note:''' does not check for matching units in the recall list)&lt;br /&gt;
** '''count''' {{DevFeature}}: if used, the given number of units must match the filter. Accepts a number, range, or comma separated range; default &amp;quot;1-99999&amp;quot; &lt;br /&gt;
&lt;br /&gt;
* '''[have_location]''': a location passing this filter exists &lt;br /&gt;
** [[StandardLocationFilter]]&lt;br /&gt;
** '''count''' {{DevFeature}}: if used, the given number of location must match the filter. Accepts a number, range, or comma separated range; default &amp;quot;1-99999&amp;quot; &lt;br /&gt;
&lt;br /&gt;
* '''[and]''': If an [and] is present, all must evaluate to true in order for the [if] to evaluate true. Useful as a bracket for complex conditions, but not strictly necessary.&lt;br /&gt;
** condition tags as in [if]: if these evaluate to true, [and] evaluates to true.&lt;br /&gt;
&lt;br /&gt;
* '''[or]''': If an [or] is present, one must evaluate to true in order for the [if] to evaluate true. ([[AdvancedConditionalWML|Example]])&lt;br /&gt;
** condition tags as in [if]: if these evaluate to true, '''[or]''' evaluates to true. &lt;br /&gt;
&lt;br /&gt;
* '''[not]''': If a [not] is present, none must evaluate to true in order for the [if] to evaluate true.&lt;br /&gt;
** condition tags as in [if]: if these evaluate to true, [not] evaluates to false.&lt;br /&gt;
&lt;br /&gt;
* '''[and],[or],[not]''': all top-level filters will support in-order conditional handling of and, or, and not. One important thing to remember is, if you have multiple [or]s, you should not wrap your first conditional statement into an [or] block.&lt;br /&gt;
&lt;br /&gt;
* '''[variable]''': tests something about the value of a WML variable (see [[VariablesWML]])&lt;br /&gt;
** '''name''': the name of the variable to test the value of&amp;lt;br&amp;gt;Only one of the following keys should be used for comparing the value of the variable to another value:&lt;br /&gt;
** '''equals''': $name is equal (string wise) to this&lt;br /&gt;
** '''not_equals''': $name is not equal to this&lt;br /&gt;
** '''greater_than''': $name is numerically greater than this&lt;br /&gt;
** '''less_than''': $name is less than this&lt;br /&gt;
** '''greater_than_equal_to''': $name is not less than this&lt;br /&gt;
** '''less_than_equal_to''': $name is not greater than this&lt;br /&gt;
** '''numerical_not_equals''': $name is greater than or less than this&lt;br /&gt;
** '''numerical_equals''': $name is not greater than or less than this&lt;br /&gt;
** '''boolean_equals''': $name has the same boolean value (e.g. off, false, 0, no)&lt;br /&gt;
** '''contains''': $name contains this string&lt;br /&gt;
** {{DevFeature}} '''boolean_not_equals''': $name has not the same boolean value. Strictly a syntactic shortcut for the following syntax that served its absence in 1.4:&lt;br /&gt;
  [not]&lt;br /&gt;
    [variable]&lt;br /&gt;
      name=...&lt;br /&gt;
      boolean_equals=...&lt;br /&gt;
    [/variable]&lt;br /&gt;
  [/not]&lt;br /&gt;
&lt;br /&gt;
After condition tags:&lt;br /&gt;
* '''[then]''': contains a set of action tags which should be executed if all conditions are true, or all conditions in any single [or] are true&lt;br /&gt;
* '''[else]''': contains a set of action tags which should be executed if any condition is false, and all [or] tags are false&lt;br /&gt;
&lt;br /&gt;
== [switch] {{DevFeature}} ==&lt;br /&gt;
&lt;br /&gt;
Executes different sets of action based on the value of a variable.&lt;br /&gt;
  [switch]&lt;br /&gt;
     variable=foo&lt;br /&gt;
     [case]&lt;br /&gt;
        value=&amp;quot;A&amp;quot;&lt;br /&gt;
        ... WML if foo=A ...&lt;br /&gt;
     [/case]&lt;br /&gt;
     [case]&lt;br /&gt;
        value=&amp;quot;B&amp;quot;&lt;br /&gt;
        ... WML if foo=B ...&lt;br /&gt;
     [/case]&lt;br /&gt;
     [else]&lt;br /&gt;
        ... WML if not foo=A nor foo=B ...&lt;br /&gt;
     [/else]&lt;br /&gt;
  [/switch]&lt;br /&gt;
&lt;br /&gt;
* '''variable''': name of the variable to check.&lt;br /&gt;
* '''[case]''': Case block. Contains:&lt;br /&gt;
** '''value''': value to test the variable against.&lt;br /&gt;
** the action WML to execute if the variable matches the value (rest of the block).&lt;br /&gt;
* '''[else]''': Block of action WML to execute if no '''[case]''' block matches.&lt;br /&gt;
&lt;br /&gt;
== [while] ==&lt;br /&gt;
&lt;br /&gt;
Executes commands if all conditions are true.&lt;br /&gt;
Continues to execute them until a condition is not true.&lt;br /&gt;
&lt;br /&gt;
Executes a maximum of 1024 iterations per invocation.&lt;br /&gt;
Condition tags are the same as for [if]&lt;br /&gt;
&lt;br /&gt;
After condition tags:&lt;br /&gt;
* '''[do]''': contains actions that should be executed repeatedly until some condition is false.&lt;br /&gt;
&lt;br /&gt;
The '''[while]''' tag is useful for iterating over an array.&lt;br /&gt;
An array is a list of values.&lt;br /&gt;
The ''number''th value in the array '''array''' is stored in the WML variable '''''array''[number]'''.&lt;br /&gt;
Note that if '''number''' is the value of the variable '''variable''',&lt;br /&gt;
the expression '''$''array''[$variable]''' will return the ''number''th value in ''array''.&lt;br /&gt;
The macros 'FOREACH' and 'NEXT' ([[UtilWML]]) can be used to iterate over an array;&lt;br /&gt;
i.e. run a set of actions once per element of the array.&lt;br /&gt;
&lt;br /&gt;
=== {FOREACH} ===&lt;br /&gt;
If you wish to use a &amp;quot;for-each&amp;quot; iteration format (useful for example when you want to do an iteration for each row in a table) you can use the {{LinkMacro|FOREACH}} and {{LinkMacro|NEXT}} predefined macros.&lt;br /&gt;
&lt;br /&gt;
=== {REPEAT} ===&lt;br /&gt;
You can use the {{LinkMacro|REPEAT}} macro to perform a quick iteration for a number of times you specify.&lt;br /&gt;
&lt;br /&gt;
== [event] ==&lt;br /&gt;
&lt;br /&gt;
This adds a new event to the scenario.&lt;br /&gt;
The event is in the normal format for an '''[event]''' tag (See [[EventWML]]).&lt;br /&gt;
This is useful if you want an event that can only be triggered when a prior event is fulfilled&lt;br /&gt;
&lt;br /&gt;
These tags describe actions that affect the values of WML variables&lt;br /&gt;
(see [[VariablesWML]] for information on WML variables,&lt;br /&gt;
and [[UtilWML]] for convenient macro shortcuts for some of these):&lt;br /&gt;
* '''[set_variable]''': manipulates a WML variable. {{Note:Predefined Macro|VARIABLE}} &lt;br /&gt;
** '''name''': the name of the variable to manipulate&lt;br /&gt;
** '''value''': set the variable to the given value (can be numeric or string). This only interprets dollars signs if it is the very first character, and then the entire value must be a simple variable name. (in 1.3.2, has the same effect as format. Use literal for no substitution)&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;
** '''format''': set the variable to the given value. Interprets the dollar sign to a higher degree than most actions. (see [[VariablesWML]])&lt;br /&gt;
** '''to_variable''': Fully processes its value as in ''format'', and then gets the variable with that name.&lt;br /&gt;
** '''add''': add the given amount to the variable. To subtract, add a negative number.&lt;br /&gt;
** '''multiply''': multiply the variable by the given number. To divide, multiply by the inverse eg: 4/2 = 4 * 1/2 = 4 * 0.5. To negate, multiply by -1. The result is an integer.&lt;br /&gt;
** '''divide''': divide the variable by the given number. The result is an integer.&lt;br /&gt;
** '''modulo''': returns the remainder of an integer division. Both variables need to be an integer, the result is also an integer. eg 5 % 2 = 1.&lt;br /&gt;
** '''random''': 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. Dollars signs are only normally interpreted here, so it is harder to have a dynamically determined range. You would need to create the random-string with ''format''.&lt;br /&gt;
** '''rand''': does the same as random, but has better MP support. See [[BuildingMultiplayerExamples]] for more info on the MP case. '''It is highly recommended that you use this feature for randomization.'''&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;
** {{DevFeature}} '''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;
** {{DevFeature}} '''[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;
* {{DevFeature}} '''[set_variables]''': manipulates a WML array&lt;br /&gt;
** '''name''': the name of the container to manipulate&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 unless the variable already contains data at that index. This limitation may be removed in future versions.&lt;br /&gt;
** '''to_variable''': data will be set to the given array&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, example:&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;
 =&amp;gt;bar; more&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;
**'''[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: wether to ignore empty elements&lt;br /&gt;
&lt;br /&gt;
* {{DevFeature}} '''[fire_event]''': trigger a WML event&lt;br /&gt;
** '''name''': the name of event to trigger&lt;br /&gt;
** '''[primary_unit]''': primary unit for the event (usually the attacker) (optional)&lt;br /&gt;
** '''[secondary_unit]''': secondary unit for the event (usually the defender) (optional)&lt;br /&gt;
** both tags have some keys which are optional :&lt;br /&gt;
*** '''x,y''': location of this unit&lt;br /&gt;
*** In Wesnoth 1.5.9 and onwards, [primary_unit] and [secondary_unit] can take a [[FilterWML|Standard Unit Filter]], but it will never match on a recall list unit. If it matches multiple units, the first unit that would be obtained with [store_unit] will be used in the relevant event parameter ($unit or $secondary_unit) and event filter.&lt;br /&gt;
** '''[primary_attack]''': information passed to the primary attack filter and $weapon variable on the new event.&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;
* '''[store_unit]''': stores details about units into game variables.&amp;lt;br&amp;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 [unstore_unit] to re-create the unit with the modified variables.&amp;lt;br&amp;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 [unstore_unit], [[DirectActionsWML]], and '''FOREACH''', [[UtilWML]]&lt;br /&gt;
** '''[filter]''': [[StandardUnitFilter]] all units matching this filter will be stored. If there are multiple units, they will be stored into an array of variables.&lt;br /&gt;
** '''variable''': the name of the variable into which to store the unit(s)&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 only be cleared if a match is found. If mode is set to ''append'', the variable will not be cleared.&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;
:When a unit is stored, the following values may be manipulated with '''[set_variable]'''&lt;br /&gt;
:* description&lt;br /&gt;
:* experience&lt;br /&gt;
:* facing&lt;br /&gt;
:* gender&lt;br /&gt;
:* canrecruit&lt;br /&gt;
:* overlays&lt;br /&gt;
:* goto_x&lt;br /&gt;
:* goto_y&lt;br /&gt;
:* hitpoints&lt;br /&gt;
:* moves&lt;br /&gt;
:* resting&lt;br /&gt;
:* side&lt;br /&gt;
:* type&lt;br /&gt;
:* unrenamable&lt;br /&gt;
:* upkeep&lt;br /&gt;
:* user_description&lt;br /&gt;
:* x&lt;br /&gt;
:* y&lt;br /&gt;
:* [variables]&lt;br /&gt;
:* [status]&lt;br /&gt;
:* [modifications]&lt;br /&gt;
Variables, status, and modifications are children of the stored unit variable.  Example:&lt;br /&gt;
 [set_variable]&lt;br /&gt;
 name=unit_store.status.poisoned&lt;br /&gt;
 value=yes&lt;br /&gt;
 [/set_variable]&lt;br /&gt;
&lt;br /&gt;
:All keys and tags in the unit definition may be manipulated, including some others.  Here is a sample list.  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.&lt;br /&gt;
:* advances_to&lt;br /&gt;
:* alignment&lt;br /&gt;
:* alpha&lt;br /&gt;
:* attacks_left&lt;br /&gt;
:* canrecruit&lt;br /&gt;
:* controller&lt;br /&gt;
:* cost&lt;br /&gt;
:* description&lt;br /&gt;
:* experience&lt;br /&gt;
:* facing&lt;br /&gt;
:* flying&lt;br /&gt;
:* fog&lt;br /&gt;
:* gender&lt;br /&gt;
:* get_hit_sound&lt;br /&gt;
:* gold&lt;br /&gt;
:* goto_x&lt;br /&gt;
:* goto_y&lt;br /&gt;
:* hitpoints&lt;br /&gt;
:* id&lt;br /&gt;
:* image&lt;br /&gt;
:* image_defensive&lt;br /&gt;
:* income&lt;br /&gt;
:* language_name (same as the name key in the unit config)&lt;br /&gt;
:* level&lt;br /&gt;
:* max_attacks&lt;br /&gt;
:* max_experience&lt;br /&gt;
:* max_hitpoints&lt;br /&gt;
:* max_moves&lt;br /&gt;
:* movement&lt;br /&gt;
:* movement_type&lt;br /&gt;
:* moves&lt;br /&gt;
:* race&lt;br /&gt;
:* resting&lt;br /&gt;
:* shroud&lt;br /&gt;
:* side&lt;br /&gt;
:* type&lt;br /&gt;
:* unit_description&lt;br /&gt;
:* unrenamable&lt;br /&gt;
:* usage&lt;br /&gt;
:* value&lt;br /&gt;
:* x&lt;br /&gt;
:* y&lt;br /&gt;
:* zoc&lt;br /&gt;
:* [advancement]&lt;br /&gt;
:* [/advancement]&lt;br /&gt;
:* [movement_costs]&lt;br /&gt;
:* [/movement_costs]&lt;br /&gt;
:* [defense]&lt;br /&gt;
:* [/defense]&lt;br /&gt;
:* [resistance]&lt;br /&gt;
:* [/resistance]&lt;br /&gt;
:* [variables]&lt;br /&gt;
:* [/variables]&lt;br /&gt;
:* [status]&lt;br /&gt;
:* [/status]&lt;br /&gt;
:* [attack]&lt;br /&gt;
:* [/attack]&lt;br /&gt;
:* [modifications_description]&lt;br /&gt;
:* [/modifications_description]&lt;br /&gt;
:* [modifications]&lt;br /&gt;
:* [/modifications]&lt;br /&gt;
&lt;br /&gt;
* '''[store_starting_location]''': 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' (the terrain type for a starting location is always 'K' unless it has been changed) and {{DevFeature}} 'owner_side' (villages only)&lt;br /&gt;
** '''side''': the side whose starting location is to be stored&lt;br /&gt;
** '''variable''': (default='location'): the name of the variable to store the location in&lt;br /&gt;
* '''[store_locations]''': 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 {{DevFeature}} 'owner_side' (villages only).&lt;br /&gt;
** [[StandardLocationFilter]]: a location or location range which specifies the locations to store. You must specify this or no locations will be stored.&lt;br /&gt;
** '''variable''': the name of the variable (array) into which to store the locations&lt;br /&gt;
** '''terrain''': a comma-sperated list of terrain codes. (See [[TerrainCodesWML]] for possible values.) If present, locations will only be chosen if the code for the terrain type of that location is listed.&lt;br /&gt;
** '''radius''': if present, any locations which are within '''radius''' hexes of the location filter will also be stored&lt;br /&gt;
** '''[filter]''': [[StandardUnitFilter]] only locations with units on them that match the filter will be stored. Use a blank filter to only store locations with units.&lt;br /&gt;
* '''[store_villages]''': Stores a series of locations of villages 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 {{DevFeature}} 'owner_side'.&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;
** '''variable''': the name of the variable (array) into which to store the locations&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;
* '''[store_gold]''': Stores a side's gold into a variable.&lt;br /&gt;
** '''side''': (default=1) the side for which the gold should be stored&lt;br /&gt;
** '''variable''': (default='gold') the name of the variable to store the gold in&lt;br /&gt;
* '''[store_side]''': 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' {{DevFeature}}, 'user_team_name', 'colour', 'controller', 'village_gold' and 'recruit'.)&lt;br /&gt;
** '''side''': the side whose information should be stored&lt;br /&gt;
** '''variable''': the name of the variable to store the information in&lt;br /&gt;
* '''[clear_variable]''': This will delete the given variable or array. This is good to use to clean up the set of variables -- e.g. a well-behaved scenario will delete any variables that shouldn't be kept for the next scenario before the end of the scenario.&amp;lt;br&amp;gt; Tags and variables of stored units can also be cleared, meaning that [trait]s and [object]s, for example, can be removed.&lt;br /&gt;
** '''name''': the name of the variable to clear, multiple comma-separated variable names can be given.&lt;br /&gt;
* '''[role]''': 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 [if]) to see whether a role was assigned. This tag uses a [[StandardUnitFilter]] 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;
** '''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;
** '''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;
* {{DevFeature}} '''[store_map_dimensions]''': Stores the map dimensions in a variable.&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;
* {{DevFeature}} '''[insert_tag]''': inserts a variable as WML&lt;br /&gt;
**'''name''': the [&amp;quot;name&amp;quot;] to be given to the tag&lt;br /&gt;
**'''variable''': name of the variable to be inserted&lt;br /&gt;
* {{DevFeature}} '''[store_time_of_day]''': stores time of day information from the current scenario into a WML variable container.&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;
** '''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;
== See Also ==&lt;br /&gt;
* [[VariablesWML]]&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;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SideWML&amp;diff=28337</id>
		<title>SideWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SideWML&amp;diff=28337"/>
		<updated>2009-02-22T19:50:30Z</updated>

		<summary type="html">&lt;p&gt;Nital: /* the [side] tag */ added hidden attrib&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== the [side] tag ==&lt;br /&gt;
&lt;br /&gt;
The [side] tag is used to describe a side in a particular scenario.&lt;br /&gt;
&lt;br /&gt;
The following keys are recognized:&lt;br /&gt;
&lt;br /&gt;
* '''side''': a digit. The leader of this side is placed on the tile represented by this digit (see [[BuildingMaps]]). When defining sides, they must be defined in order since the side number is checked against the number of sides seen so far.&lt;br /&gt;
&lt;br /&gt;
* '''controller''': how moves for this side should be inputted.&lt;br /&gt;
** '''ai''': the Wesnoth AI makes this side's moves. This is the default setting.&lt;br /&gt;
** '''human''': a player controls this side's moves.&lt;br /&gt;
** '''null''': the side doesn't get a turn to move and doesn't have a leader generated from the contents of the [side] tag. (It still can get units from [unit] tags in the [side] tag.)&lt;br /&gt;
&lt;br /&gt;
* '''no_leader''': if &amp;quot;no&amp;quot; (default), then keys describing a unit which will begin on the side's keep will be the remainder of the '''[side]''' tag, See [[SingleUnitWML]]. Note that if the keys '''x''', '''y''' are included, the leader will begin there regardless of keep location. If this side has a recall list from a previous level, then the recall list will be searched for a leader (using '''canrecruit=yes''') and if one is found it will be used instead of the one described in the '''[side]''' tag. Typical keys used for defining the leader unit are '''type''' (mandatory), '''description''', '''id''' {{DevFeature}}, '''user_description''', '''name''' {{DevFeature}} and '''unrenamable=yes''', see [[UnitWML]].&lt;br /&gt;
&lt;br /&gt;
* '''recruit''': a list of unit types. At the beginning of the scenario, the side gains recruitment of these units.&lt;br /&gt;
&lt;br /&gt;
* '''gold''': the starting gold for this side. Default 100. (If gold is carried over from a previous scenario, this value is the minimum starting gold.)&lt;br /&gt;
&lt;br /&gt;
* '''income''': the base income for this side, default 0. This is added to ''base_income'', '''[game_config]''' to determine the side's base income. (see [[GameConfigWML]]).&lt;br /&gt;
&lt;br /&gt;
* {{DevFeature}} '''hidden''': if 'yes', side is not shown in status table.&lt;br /&gt;
&lt;br /&gt;
* '''fog''': if 'yes', this side cannot see any tiles it is not within vision of, except at the start. Please note that the AI currently ignores the fog.&lt;br /&gt;
&lt;br /&gt;
* '''shroud''': if 'yes', this side cannot see any tiles it has not moved within sight of. Please note that the AI currently ignores the shroud.&lt;br /&gt;
&lt;br /&gt;
* '''shroud_data''': describes the area which this team has de-shrouded. An example:&lt;br /&gt;
 |&lt;br /&gt;
 |00011111000&lt;br /&gt;
This would leave the first column on the map unaltered and would change the second column for 11 tiles. A '0' means: shrouded, '1' means unshrouded. You can either call an external file using {@filename}  (see [[PreprocessorRef]]) or place the data in quotes. For making an external file see [[BuildingScenariosShroudData]].&lt;br /&gt;
&lt;br /&gt;
* '''persistent''': whether the side exists in any other scenarios. If '1'(yes), then ''save_id''(see below) becomes active for this side. Default '0'(no); when '''controller=human''', this is always '1'.&lt;br /&gt;
&lt;br /&gt;
* '''save_id''': default ''description'' if available, 'Unknown' otherwise. The ID of the side with respect to the previous and next scenarios. Used to carry over the side's recall list (including the side's leader), recruitment list, and starting gold from scenario to scenario. Also used for the side's displayed name in the victory gold-calculation dialog.  See [[SideSwitchingWML]].&lt;br /&gt;
&lt;br /&gt;
* '''team_name''': a non translatable string representing the team's description. Sides with the same team_name are allied. Default ''side''.&lt;br /&gt;
&lt;br /&gt;
* '''user_team_name''': a translatable string representing the team's description. This has no effect on alliances. Default ''team_name''.&lt;br /&gt;
&lt;br /&gt;
* '''colour''': May be either a numeric color index or a color name (e.g. 'blue', 'purple', 'orange', etc.).  The numeric form is deprecated. The default list of numbers and corresponding colours can be found in data/core/team_colors.cfg.&lt;br /&gt;
&lt;br /&gt;
* '''flag''': a custom flag animation to use instead of the default one to mark captured villages. An automatic side-coloring is applied.&lt;br /&gt;
** Example animation that has three frames and loops every 750ms: ''flag=misc/myflag-1.png:250,misc/myflag-2.png:250,misc/myflag-3.png:250''&lt;br /&gt;
&lt;br /&gt;
* '''flag_icon''': a custom flag icon to indicate the side playing in the statusbar (a size of 24x16 is recommended). An automatic side-coloring is applied.&lt;br /&gt;
&lt;br /&gt;
* '''village_gold''': the amount of gold given to this side per village it controls per turn. Default specified in ''village_income'', '''[game_config]''' ([[GameConfigWML]]). '''Note:''' If you need village gold to be 0. Set the variable to -1.&lt;br /&gt;
&lt;br /&gt;
* '''share_maps''': whether sides allied with this side see all terrains that this side sees, if they are on shroud.&lt;br /&gt;
&lt;br /&gt;
* '''share_view''': whether sides allied with this side see the units that this side sees, if they are on FoW (fog).&lt;br /&gt;
&lt;br /&gt;
* '''disallow_observers''': prevents observers from seeing this side turn. (default: no)&lt;br /&gt;
&lt;br /&gt;
* '''[ai]''' if '''controller=ai''', gives parameters to the AI. See [[AiWML]].&lt;br /&gt;
&lt;br /&gt;
* '''[village]''' describes a village the side begins in control of.&lt;br /&gt;
** ''x'', ''y'' the location of the village. If the pair of coordinates is not a village or is duplicated in another [village] tag, behaviour is undefined. Recent game engine or wmllint should warn about these.&lt;br /&gt;
&lt;br /&gt;
* '''[unit]''' describes a unit which begins on the side. See [[SingleUnitWML]]. If the side has a recall list and the unit is not given a location, it will start on the recall list. Note that the ''side'' attribute under '''[unit]''' will be ignored, as the side will come from the ''side'' attribute of '''[side]'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following keys are multiplayer only:&lt;br /&gt;
&lt;br /&gt;
* '''allow_player''': if false then this side will not be allowed to be modified and will be hidden during game creation.&lt;br /&gt;
&lt;br /&gt;
* '''team_lock''': if true then this side's team is not allowed to be modified.&lt;br /&gt;
&lt;br /&gt;
* '''colour_lock''': if true then this side's color is not allowed to be modified.&lt;br /&gt;
&lt;br /&gt;
* '''gold_lock''': if true then this side's gold is not allowed to be modified. &lt;br /&gt;
&lt;br /&gt;
* '''income_lock''': if true then this side's income is not allowed to be modified.&lt;br /&gt;
&lt;br /&gt;
* '''faction''': this lock this side to this faction.&lt;br /&gt;
&lt;br /&gt;
* '''faction_from_recruit''' {{DevFeature}}: if true then this side will be locked to the faction that matches the recruits better. (this was enabled by default in 1.4)&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[EraWML]]&lt;br /&gt;
* [[ScenarioWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=28336</id>
		<title>DirectActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=28336"/>
		<updated>2009-02-22T19:48:33Z</updated>

		<summary type="html">&lt;p&gt;Nital: /* Direct actions */  adding hidden attrib&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.&lt;br /&gt;
&lt;br /&gt;
The following tags are actions:&lt;br /&gt;
* '''[endlevel]''': ends the scenario.&lt;br /&gt;
** '''result''': before the scenario is over, all events with ''name=result'' are triggered.  The message ''result_message'' with the heading ''result_heading'' (see [[LanguageWML]]) are displayed.  If ''result=victory'', the player progresses to the next level; if ''result=defeat'', the game returns to the main menu.  These last two are rarely used: ''result=continue'' behaves identically to ''result=victory'' except the player's gold is not reduced to 80%, and it does not bring up a &amp;quot;Victory&amp;quot; message or the gold changing message (since it doesn't change); ''result=continue_no_save'' works similarly, except the player is not asked whether to save the game, and is taken directly to the next scenario without any messages.  Unless ''result=defeat'', the following keys can also 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''' {{DevFeature}}: whether the player should receive a summary of the scenario outcome, the default is carryover_report=yes.&lt;br /&gt;
** '''save''' {{DevFeature}}: whether a start-of-scenario save should be created for the next scenario, the default is save=yes.&lt;br /&gt;
** '''linger_mode''' {{DevFeature}}: whether the game should switch to linger_mode before advancing to the next scenario, the default is linger_mode=yes.&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;
** When the result is &amp;quot;victory&amp;quot; the following keys can be used:&lt;br /&gt;
*** '''carryover_percentage''' {{DevFeature}}: 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''' {{DevFeature}}: 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''' {{DevFeature}}: (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_text''' {{DevFeature}}: 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''' {{DevFeature}}: 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;
* '''[unit]''': places a unit on the map.  For syntax see [[SingleUnitWML]].&lt;br /&gt;
** {{Short Note:Predefined Macro|GENERIC_UNIT}}&lt;br /&gt;
** {{DevFeature}} '''to_variable''':  spawn directly into a variable instead of on the map.&lt;br /&gt;
* '''[recall]''': 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.&lt;br /&gt;
** '''x,y''': the unit is placed here instead of next to the leader.&lt;br /&gt;
** '''show''': if not &amp;quot;no&amp;quot;, display the unit being recalled.&lt;br /&gt;
* '''[teleport]''': teleports a unit on map. {{Short Note:Predefined Macro|TELEPORT_UNIT}}&lt;br /&gt;
** '''[filter]''': [[StandardUnitFilter]] all units matching the 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;
* '''[terrain_mask]''': changes the terrain on the map.  See [[TerrainMaskWML]].&lt;br /&gt;
* '''[terrain]''': 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;
** '''x,y''': the position (or range of positions) to change.&lt;br /&gt;
** {{DevFeature}} '''layer''': (overlay|base|both, default=both) only change the specified layer.&lt;br /&gt;
** {{DevFeature}} '''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;
* '''[gold]''': give 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.&lt;br /&gt;
* '''[unstore_unit]''': 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 '''[store_unit]''', '''[while]''' and [clear_variable] in [[InternalActionsWML]]. 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;
** '''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''': if the XP has been modified then there will be tried to advance the unit, default true. &lt;br /&gt;
** {{DevFeature}} '''x''' ,'''y''': override unit location&lt;br /&gt;
* '''[allow_recruit]''': 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.&lt;br /&gt;
* '''[disallow_recruit]''': 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.&lt;br /&gt;
* '''[set_recruit]''': 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.&lt;br /&gt;
* '''[modify_side]''': 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.&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;
** {{DevFeature}} '''hidden''': a boolean string specifying whether side is shown in status table.&lt;br /&gt;
** {{DevFeature}} '''[ai]''': replaces a side's AI parameters with the new specified ones. Uses the same syntax described in [[AiWML]].&lt;br /&gt;
* '''[modify_turns]''': 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;
** {{DevFeature}} '''current''': changes the current turn number after applying turn limit modifications, if any. It is possible to change the current turn number to a greater one than the current only; also, it is not possible to change the turn number to exceed the turn limit.&lt;br /&gt;
* '''[capture_village]''': changes the ownership of a village.&lt;br /&gt;
** '''side''': the side that takes control of the village. If not given, the village will become neutral.&lt;br /&gt;
** '''x, y''': the location of the village.&lt;br /&gt;
* '''[kill]''': Removes all units (including units in a recall list) that match the filter from the game.&lt;br /&gt;
** [[StandardUnitFilter]]: selection criterion&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 any 'die' events triggered by this are executed immediately, interrupting the current event and thus causing the x1, y1, x2, and y2 variables to be reset for that 'die' event, which in turn causes those variables to be invalid for the remainder of this event. {{DevFeature}} 'last breath' events are also fired.&lt;br /&gt;
* '''[unstone]''': Unstones all units that match the filter.&lt;br /&gt;
** '''[filter]''': [[StandardUnitFilter]] all units matching the filter will be unstoned.  If no unit matches the filter, then nothing happens (probably).  If absent, all units on the map are unstoned.&lt;br /&gt;
* '''[object]''': gives some unit an object and removes all items on the tile the unit is on.&lt;br /&gt;
** '''id''': 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;
** '''[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]''': [[StandardUnitFilter]] 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;
** '''user_description''': {{DevFeature}} (translatable) displayed as a message of the image. In 1.4 and older versions this is just '''description'''; that will still be expected for compatibility.&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;
* '''[remove_shroud]''': 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.&lt;br /&gt;
** [[StandardLocationFilter]]: the range of tiles for which shroud should be removed.&lt;br /&gt;
** Note: '''[remove_shroud]''' doesnt't accept all of the standard location filters. In particular '''[filter]''' to remove shroud around units doesn't work, and radius may not either. To remove shroud around a group of units, you can temporarily switch the sides of the units using '''[store_unit]''', '''[set_variable]''', and then '''[unstore_unit]''' (do the '''[set_variable]''' and '''[unstore_unit]''' twice each, once to switch sides, and once to switch back). Just make sure you call '''[redraw]''' while the unit's side is switched to update shroud. Also make sure to use ''kill=no'' for the store and then ''find_vacant=no'' for the unstores.&lt;br /&gt;
** {{DevFeature}}: '''[remove_shroud]''' accepts a full standard location filter.&lt;br /&gt;
* '''[place_shroud]''': 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.&lt;br /&gt;
** [[StandardLocationFilter]]: the range of tiles on which shroud should be placed.&lt;br /&gt;
* '''[allow_undo]''': 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;
* '''[heal_unit]''' {{DevFeature}}: 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).&lt;br /&gt;
**  '''[filter]''': [[StandardUnitFilter]] the first unit matching the filter will be healed. &lt;br /&gt;
**  '''[secondary_unit_filter]''': [[StandardUnitFilter]] all the units matching the filter ''and'' having the ''heals'' ability will have their animation played (if ''animate'' is set to true).&lt;br /&gt;
**  '''amount''': the maximum points the unit will be healed.&lt;br /&gt;
**  '''animate''': a boolean which indicate if the healing animations must be played.&lt;br /&gt;
* '''[time_area]''' {{DevFeature}}: how a day should progress in a given area. Everywhere not specified in a [time_area] tag is affected by the [time] and [illuminated_time] tags in the [scenario] tag&lt;br /&gt;
** [[StandardLocationFilter]]: the locations to affect.&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. 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;
** {{DevFeature}}: in Wesnoth 1.5.9 and later, '''id''' may be a comma-separated list for removing time areas. It is not allowed, however, for inserting time areas; only the first id is taken into account in that case.&lt;br /&gt;
&lt;br /&gt;
* '''[end_turn]''' {{DevFeature}}: end the current side's turn.&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;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Support&amp;diff=28335</id>
		<title>Support</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Support&amp;diff=28335"/>
		<updated>2009-02-22T09:23:22Z</updated>

		<summary type="html">&lt;p&gt;Nital: /* IRC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
There are many ways to get help. From online documentation to support from the community on IRC or forums.&lt;br /&gt;
&lt;br /&gt;
== Wiki Resources ==&lt;br /&gt;
* [[Play|Online Players Guide]] - Game manual, walkthroughs, strategy guides, and more.&lt;br /&gt;
* [[Create|Content-Creation Guide]] - Manual showing how to create new campaigns for Wesnoth.&lt;br /&gt;
* [[StartingPoints|Starting Points]] - List of pages to serve as starting point for diving deeply into the wiki...&lt;br /&gt;
* [[MP_CodeOfConduct | Multiplayer Information ]] - Info about server moderators, useful MP commands, and our online Code of Conduct.&lt;br /&gt;
&lt;br /&gt;
== Reporting Bugs ==&lt;br /&gt;
If you are experiencing problems, you should consider [[ReportingBugs|reporting a bug]].&lt;br /&gt;
&lt;br /&gt;
== Community ==&lt;br /&gt;
&lt;br /&gt;
When asking for help with some technical problem in the game forums, please provide the following information:&lt;br /&gt;
* which operating system do you use (e.g. Windows, Linux, Mac OSX)&lt;br /&gt;
* which version of Wesnoth do you use (it is displayed in the bottom left corner of title screen)&lt;br /&gt;
* contents of file &amp;quot;stderr.txt&amp;quot;&lt;br /&gt;
** on MS Windows, it is here: &amp;quot;C:\Program Files\Wesnoth\stderr.txt&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Forums ===&lt;br /&gt;
* [http://www.wesnoth.org/forum/ Official Wesnoth forums]&lt;br /&gt;
* [[Wesnoth_Acronyms_and_Slang|Wesnoth Acronyms]] - forum lingo&lt;br /&gt;
* [http://www.wesnoth.cn Chinese wesnoth forums]&lt;br /&gt;
* [http://wif.altervista.org/index.php  Wesnoth Italian Forums (W.I.F)]&lt;br /&gt;
* [http://www.wesnothlife.ru/forum/ Russian Wesnoth Forums]&lt;br /&gt;
&lt;br /&gt;
=== IRC ===&lt;br /&gt;
If you don't know what IRC is, check out [http://www.irchelp.org/ irchelp].&lt;br /&gt;
&lt;br /&gt;
* [irc://irc.freenode.net/wesnoth #wesnoth]: this channel is for general conversation amongst Wesnoth users and developers alike.&lt;br /&gt;
* [irc://irc.freenode.net/wesnoth-dev #wesnoth-dev]: the development discussion channel. Most contributors and developers (WML, C++ and art people alike) hang around here, exchanging ideas and code patches.&lt;br /&gt;
* [irc://irc.freenode.net/wesnoth-mp #wesnoth-mp]: the multiplayer servers' status and development discussion channel.&lt;br /&gt;
* [irc://irc.freenode.net/wesnoth-music #wesnoth-music]&lt;br /&gt;
* [irc://irc.freenode.net/wesnoth-umc-dev #wesnoth-umc-dev]: the look-alike of #wesnoth-dev for the [http://www.wesnoth.org/forum/viewtopic.php?f=8&amp;amp;t=21413 Wesnoth User-made Add-ons Development] repository.&lt;br /&gt;
* [irc://irc.tweakers.net/wesnoth #wesnoth (Dutch channel)]&lt;br /&gt;
* [irc://irc.freenode.net/wesnoth-de #wesnoth-de (German channel)]: the German look-alike of #wesnoth, mainly used by German-speaking users and translators.&lt;br /&gt;
* [irc://irc.freenode.net/wesnoth-pl #wesnoth-pl (Polish channel)]: as above, but Polish&lt;br /&gt;
* [irc://irc.syrolnet.org/WIF #WIF (Italian channel)] &lt;br /&gt;
You can also see the [http://irclog.wesnoth.org/ logs] of the #wesnoth, #wesnoth-de, #wesnoth-dev and #wesnoth-umc-dev channels.&lt;br /&gt;
&lt;br /&gt;
=== Mailing Lists ===&lt;br /&gt;
* [https://mail.gna.org/listinfo/wesnoth-dev/ wesnoth-dev] ([https://mail.gna.org/public/wesnoth-dev/ archives]): the mailing list for discussing mainline development issues; it is not intended for bug reports or feature requests. See [[ReportingBugs]] for those.&lt;br /&gt;
* [https://mail.gna.org/listinfo/wesnoth-commits/ wesnoth-commits] ([https://mail.gna.org/public/wesnoth-commits/ archives]): all commits made to the mainline SVN repository are automatically echoed in this list for those who want or need to keep track of them. New developers and contributors are required to subscribe to this list.&lt;br /&gt;
* [https://mail.gna.org/listinfo/wesnoth-i18n/ wesnoth-i18n] ([https://mail.gna.org/public/wesnoth-i18n/ archives]): the internationalization (i18n) mailing list; all translation team maintainers and the i18n managers should subscribe and keep track of announcements and discussions taking place in this list.&lt;br /&gt;
&lt;br /&gt;
=== Other Servers List ===&lt;br /&gt;
see [http://www.wesnoth.org/wiki/MultiplayerServers here]&lt;br /&gt;
&lt;br /&gt;
[[Category:Troubleshooting and Bugs]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=EasyCoding&amp;diff=28303</id>
		<title>EasyCoding</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=EasyCoding&amp;diff=28303"/>
		<updated>2009-02-21T00:40:18Z</updated>

		<summary type="html">&lt;p&gt;Nital: /* GUI related features */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Foreword ==&lt;br /&gt;
This page is here to document easy to do coding tasks. It is not here to double the feature request database, and should only be filled by people that know the code well enough to judge the difficulty of a given task. &lt;br /&gt;
&lt;br /&gt;
If you are such a person, you should feel free to edit this page.&lt;br /&gt;
&lt;br /&gt;
If you're not, you should post a feature request and discuss your idea on the forum or IRC. A coder with better knowledge of the code might give you the green light to add your feature here.&lt;br /&gt;
&lt;br /&gt;
Anybody should feel free to add &amp;quot;clues&amp;quot; to any tasks, that is entry points, traps to avoid, person to contact to discuss and so on.&lt;br /&gt;
&lt;br /&gt;
If you plan to work on a feature, write your name at the bottom of the feature, with the date. Note that if you are too long at working on a feature I'll &amp;quot;free&amp;quot; it back (that is if you're not working on it. If you have problems implementing it, just tell us....)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:Boucman|Boucman]] 20:48, 3 October 2006 (CEST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since bugs are sometimes a good opportunity to get a first idea of the code, i will add some here that are easy to fix as soon as i stumble upon them (the one i had in mind is fixed already ;-).&lt;br /&gt;
&lt;br /&gt;
--Yogi Bear, 28 February 2008&lt;br /&gt;
&lt;br /&gt;
== MP related features ==&lt;br /&gt;
&lt;br /&gt;
=== Use different font for in-game chat ===&lt;br /&gt;
Since commas and dots are apparently hard to tell apart. As per FR #7470 [https://gna.org/bugs/?7470]&lt;br /&gt;
&lt;br /&gt;
== WML related features ==&lt;br /&gt;
&lt;br /&gt;
=== Allow WML to open the in-game help ===&lt;br /&gt;
As per FR #11061 [http://gna.org/bugs/?11061] (see Patch #1123 [http://gna.org/patch/?1123])&lt;br /&gt;
&lt;br /&gt;
=== WML configurable village income / upkeep ===&lt;br /&gt;
Preferably as a [scenario], [side] or [campaign] keys. As per FR #6301 [https://gna.org/bugs/?6301]&lt;br /&gt;
&lt;br /&gt;
=== Add support of [if] for [scenario] ===&lt;br /&gt;
As per FR #4539 [https://gna.org/bugs/?4539]&lt;br /&gt;
&lt;br /&gt;
=== Make [have_unit] optionaly use full SUF ===&lt;br /&gt;
[have_unit] by default uses SUF but does not apply it to recall list. Introduce an optional key that will allow to lift that limitation.&lt;br /&gt;
&lt;br /&gt;
=== Side-specific results ===&lt;br /&gt;
Giving result=defeat or result=victory for specific sides. ([http://gna.org/bugs/index.php?4960 FR #4960]) -- [[User:dlr365|dlr365]] -- patch submitted [https://gna.org/bugs/index.php?4960]&lt;br /&gt;
&lt;br /&gt;
=== Support for leaderless multiplayergames ===&lt;br /&gt;
Add support for the WML key victory_when_enemies_defeated= in the scenario tag during multiplayergames. ([https://gna.org/bugs/index.php?8106 FR #8106])&lt;br /&gt;
&lt;br /&gt;
=== Other Ideas ===&lt;br /&gt;
See [[FutureWML]]; some ideas there are easier than others.&lt;br /&gt;
&lt;br /&gt;
== Improvements to FormulaAI ==&lt;br /&gt;
&lt;br /&gt;
Add new formula functions, or minor improvements to the formula language. Make it easier to debug the formula language.&lt;br /&gt;
&lt;br /&gt;
== GUI related features ==&lt;br /&gt;
-------------------&lt;br /&gt;
&lt;br /&gt;
Note at the moment Mordante is working on a new GUI system, these &lt;br /&gt;
changes will probably affect the way these items need to be implemented.&lt;br /&gt;
Contact Mordante on IRC before starting to work on these.&lt;br /&gt;
  &lt;br /&gt;
--[[User:SkeletonCrew|SkeletonCrew]] 14:04, 9 March 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Theme Changes ===&lt;br /&gt;
&lt;br /&gt;
* allow custom themes to display values of WML variables ([http://gna.org/bugs/index.php?6209 FR #6209])&lt;br /&gt;
* hide the hourglass item from the statusbar when there is no timer&lt;br /&gt;
&lt;br /&gt;
=== Widget Changes ===&lt;br /&gt;
* show side number, name and team association information in the status table &lt;br /&gt;
* make games sortable in the lobby (open slots, total number of players, era, XP modifier, gold per village, fog/shroud) &lt;br /&gt;
* input history (chat, commands, ..) - note: rujasu is working on this feature&lt;br /&gt;
&lt;br /&gt;
== GUI2 related features ==&lt;br /&gt;
GUI2 is the new gui engine Mordante/SkeletonCrew is working on. &lt;br /&gt;
* Information on the wiki can be found here http://www.wesnoth.org/wiki/GUIToolkit&lt;br /&gt;
* The source code is under src/gui/&lt;br /&gt;
* The configuration config files are under data/gui/default&lt;br /&gt;
&lt;br /&gt;
Some tasks need the --new-widgets since the code is only shown in the experimental mode. Tasks which need this switch have the * in the title.&lt;br /&gt;
&lt;br /&gt;
=== Generic yes/no ok/cancel dialog ===&lt;br /&gt;
There's already a generic OK dialog &lt;br /&gt;
* src/gui/dialogs/message.[h|c]pp&lt;br /&gt;
* data/gui/default/window/message.cfg&lt;br /&gt;
&lt;br /&gt;
This dialog should have the option to show a cancel button as well and also let the caller of the dialog determine the text of the button. Maybe more buttons (4 in total) can be added to make the dialog more flexible.&lt;br /&gt;
&lt;br /&gt;
=== * Minimap ===&lt;br /&gt;
The minimap widget has already been made but is broken.&lt;br /&gt;
* src/gui/widgets/minimap.[c|h]pp&lt;br /&gt;
&lt;br /&gt;
The drawing code has been rewritten, but this widget hasn't been updated it's used in the MP connection dialog (which needs more work).&lt;br /&gt;
&lt;br /&gt;
=== * Savegame dialog ===&lt;br /&gt;
This is a new dialog to write and requires the minimap code to be fixed first. The dialog should mimic the current dialog. Sorting of a listbox and the proper alignment of the columns is not important (the engine doesn't support this yet). The code should only be used when --new-widgets is used as start switch since we're in a feature freeze at the moment.&lt;br /&gt;
&lt;br /&gt;
=== * Title screen ===&lt;br /&gt;
A start has been made for the new titlescreen&lt;br /&gt;
* src/gui/dialogs/title_screen.[c|h]pp&lt;br /&gt;
* data/gui/default/window/title_screen.cfg&lt;br /&gt;
This should be improved to include the buttons and alignment of the current title screen. The 'roll-over' image is not part of this task.&lt;br /&gt;
&lt;br /&gt;
=== Arrow keys for the slider ===&lt;br /&gt;
There's a new slider widget, but it doesn't support the keyboard yet.&lt;br /&gt;
gui/widgets/slider.[c|h]pp&lt;br /&gt;
&lt;br /&gt;
Clicking on the widget should capture the keyboard and then arrow left/right should move one step even if not all steps are visible.&lt;br /&gt;
&lt;br /&gt;
=== Slider sizing ===&lt;br /&gt;
There are some issues with the sizing of a slider.&lt;br /&gt;
gui/widgets/slider.[c|h]pp&lt;br /&gt;
&lt;br /&gt;
In a layout step it needs to try to shrink itself, not entirely sure where or how yet, best ask mordante on irc.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
=== More powerful village naming ===&lt;br /&gt;
'''Adding mountain names and other features to village names, having a second random name in village names'''&lt;br /&gt;
&lt;br /&gt;
Currently the village naming engine has a very good structure that could allow &lt;br /&gt;
more powerfull names to be generated. &lt;br /&gt;
Understanding how it works should be quite easy, and a few usefull improvements could be added.&lt;br /&gt;
&lt;br /&gt;
* Currently villages can use lake names and river names, this should be extended to other features like bridges, swamps, mountains etc...&lt;br /&gt;
* It would be nice to have a separate list of &amp;quot;first sylabus&amp;quot; and &amp;quot;last sylabus&amp;quot; for naming. That's not really needed in english, but some translations could use it&lt;br /&gt;
* Again, it is common to have villages with more than one &amp;quot;random&amp;quot; word in them. having a $name2 variable would be nice&lt;br /&gt;
&lt;br /&gt;
ACardboardRobot 2/2/07&lt;br /&gt;
&lt;br /&gt;
=== Debug Mode ===&lt;br /&gt;
* New debug command functionality (setting additional status.variables, possibly terrain)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[NotSoEasyCoding]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Future]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=EasyCoding&amp;diff=28298</id>
		<title>EasyCoding</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=EasyCoding&amp;diff=28298"/>
		<updated>2009-02-20T23:54:10Z</updated>

		<summary type="html">&lt;p&gt;Nital: /* Use different font for in-game chat */  apparently author has dropped editing Wesnoth, so removing it to avoid confusion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Foreword ==&lt;br /&gt;
This page is here to document easy to do coding tasks. It is not here to double the feature request database, and should only be filled by people that know the code well enough to judge the difficulty of a given task. &lt;br /&gt;
&lt;br /&gt;
If you are such a person, you should feel free to edit this page.&lt;br /&gt;
&lt;br /&gt;
If you're not, you should post a feature request and discuss your idea on the forum or IRC. A coder with better knowledge of the code might give you the green light to add your feature here.&lt;br /&gt;
&lt;br /&gt;
Anybody should feel free to add &amp;quot;clues&amp;quot; to any tasks, that is entry points, traps to avoid, person to contact to discuss and so on.&lt;br /&gt;
&lt;br /&gt;
If you plan to work on a feature, write your name at the bottom of the feature, with the date. Note that if you are too long at working on a feature I'll &amp;quot;free&amp;quot; it back (that is if you're not working on it. If you have problems implementing it, just tell us....)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:Boucman|Boucman]] 20:48, 3 October 2006 (CEST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since bugs are sometimes a good opportunity to get a first idea of the code, i will add some here that are easy to fix as soon as i stumble upon them (the one i had in mind is fixed already ;-).&lt;br /&gt;
&lt;br /&gt;
--Yogi Bear, 28 February 2008&lt;br /&gt;
&lt;br /&gt;
== MP related features ==&lt;br /&gt;
&lt;br /&gt;
=== Use different font for in-game chat ===&lt;br /&gt;
Since commas and dots are apparently hard to tell apart. As per FR #7470 [https://gna.org/bugs/?7470]&lt;br /&gt;
&lt;br /&gt;
== WML related features ==&lt;br /&gt;
&lt;br /&gt;
=== Allow WML to open the in-game help ===&lt;br /&gt;
As per FR #11061 [http://gna.org/bugs/?11061] (see Patch #1123 [http://gna.org/patch/?1123])&lt;br /&gt;
&lt;br /&gt;
=== WML configurable village income / upkeep ===&lt;br /&gt;
Preferably as a [scenario], [side] or [campaign] keys. As per FR #6301 [https://gna.org/bugs/?6301]&lt;br /&gt;
&lt;br /&gt;
=== Add support of [if] for [scenario] ===&lt;br /&gt;
As per FR #4539 [https://gna.org/bugs/?4539]&lt;br /&gt;
&lt;br /&gt;
=== Make [have_unit] optionaly use full SUF ===&lt;br /&gt;
[have_unit] by default uses SUF but does not apply it to recall list. Introduce an optional key that will allow to lift that limitation.&lt;br /&gt;
&lt;br /&gt;
=== Side-specific results ===&lt;br /&gt;
Giving result=defeat or result=victory for specific sides. ([http://gna.org/bugs/index.php?4960 FR #4960]) -- [[User:dlr365|dlr365]] -- patch submitted [https://gna.org/bugs/index.php?4960]&lt;br /&gt;
&lt;br /&gt;
=== Support for leaderless multiplayergames ===&lt;br /&gt;
Add support for the WML key victory_when_enemies_defeated= in the scenario tag during multiplayergames. ([https://gna.org/bugs/index.php?8106 FR #8106])&lt;br /&gt;
&lt;br /&gt;
=== Other Ideas ===&lt;br /&gt;
See [[FutureWML]]; some ideas there are easier than others.&lt;br /&gt;
&lt;br /&gt;
== Improvements to FormulaAI ==&lt;br /&gt;
&lt;br /&gt;
Add new formula functions, or minor improvements to the formula language. Make it easier to debug the formula language.&lt;br /&gt;
&lt;br /&gt;
== GUI related features ==&lt;br /&gt;
=== Change map paths from dots to dashes ===&lt;br /&gt;
Or even better allow dashes and allow choice between the two. As per FR #5522 [https://gna.org/bugs/?5522]&lt;br /&gt;
&lt;br /&gt;
-------------------&lt;br /&gt;
&lt;br /&gt;
Note at the moment Mordante is working on a new GUI system, these &lt;br /&gt;
changes will probably affect the way these items need to be implemented.&lt;br /&gt;
Contact Mordante on IRC before starting to work on these.&lt;br /&gt;
  &lt;br /&gt;
--[[User:SkeletonCrew|SkeletonCrew]] 14:04, 9 March 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Theme Changes ===&lt;br /&gt;
&lt;br /&gt;
* show number of owned villages/total villages (FR: #3135) (--[[User:Alink|alink]] done but must update help, doc, tooltip...)&lt;br /&gt;
* allow custom themes to display values of WML variables ([http://gna.org/bugs/index.php?6209 FR #6209])&lt;br /&gt;
* hide the hourglass item from the statusbar when there is no timer&lt;br /&gt;
&lt;br /&gt;
=== Widget Changes ===&lt;br /&gt;
* show side number, name and team association information in the status table &lt;br /&gt;
* make games sortable in the lobby (open slots, total number of players, era, XP modifier, gold per village, fog/shroud) &lt;br /&gt;
* input history (chat, commands, ..) - note: rujasu is working on this feature&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== GUI2 related features ==&lt;br /&gt;
GUI2 is the new gui engine Mordante/SkeletonCrew is working on. &lt;br /&gt;
* Information on the wiki can be found here http://www.wesnoth.org/wiki/GUIToolkit&lt;br /&gt;
* The source code is under src/gui/&lt;br /&gt;
* The configuration config files are under data/gui/default&lt;br /&gt;
&lt;br /&gt;
Some tasks need the --new-widgets since the code is only shown in the experimental mode. Tasks which need this switch have the * in the title.&lt;br /&gt;
&lt;br /&gt;
=== Generic yes/no ok/cancel dialog ===&lt;br /&gt;
There's already a generic OK dialog &lt;br /&gt;
* src/gui/dialogs/message.[h|c]pp&lt;br /&gt;
* data/gui/default/window/message.cfg&lt;br /&gt;
&lt;br /&gt;
This dialog should have the option to show a cancel button as well and also let the caller of the dialog determine the text of the button. Maybe more buttons (4 in total) can be added to make the dialog more flexible.&lt;br /&gt;
&lt;br /&gt;
=== * Minimap ===&lt;br /&gt;
The minimap widget has already been made but is broken.&lt;br /&gt;
* src/gui/widgets/minimap.[c|h]pp&lt;br /&gt;
&lt;br /&gt;
The drawing code has been rewritten, but this widget hasn't been updated it's used in the MP connection dialog (which needs more work).&lt;br /&gt;
&lt;br /&gt;
=== * Savegame dialog ===&lt;br /&gt;
This is a new dialog to write and requires the minimap code to be fixed first. The dialog should mimic the current dialog. Sorting of a listbox and the proper alignment of the columns is not important (the engine doesn't support this yet). The code should only be used when --new-widgets is used as start switch since we're in a feature freeze at the moment.&lt;br /&gt;
&lt;br /&gt;
=== * Title screen ===&lt;br /&gt;
A start has been made for the new titlescreen&lt;br /&gt;
* src/gui/dialogs/title_screen.[c|h]pp&lt;br /&gt;
* data/gui/default/window/title_screen.cfg&lt;br /&gt;
This should be improved to include the buttons and alignment of the current title screen. The 'roll-over' image is not part of this task.&lt;br /&gt;
&lt;br /&gt;
=== Arrow keys for the slider ===&lt;br /&gt;
There's a new slider widget, but it doesn't support the keyboard yet.&lt;br /&gt;
gui/widgets/slider.[c|h]pp&lt;br /&gt;
&lt;br /&gt;
Clicking on the widget should capture the keyboard and then arrow left/right should move one step even if not all steps are visible.&lt;br /&gt;
&lt;br /&gt;
=== Slider sizing ===&lt;br /&gt;
There are some issues with the sizing of a slider.&lt;br /&gt;
gui/widgets/slider.[c|h]pp&lt;br /&gt;
&lt;br /&gt;
In a layout step it needs to try to shrink itself, not entirely sure where or how yet, best ask mordante on irc.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
=== More powerful village naming ===&lt;br /&gt;
'''Adding mountain names and other features to village names, having a second random name in village names'''&lt;br /&gt;
&lt;br /&gt;
Currently the village naming engine has a very good structure that could allow &lt;br /&gt;
more powerfull names to be generated. &lt;br /&gt;
Understanding how it works should be quite easy, and a few usefull improvements could be added.&lt;br /&gt;
&lt;br /&gt;
* Currently villages can use lake names and river names, this should be extended to other features like bridges, swamps, mountains etc...&lt;br /&gt;
* It would be nice to have a separate list of &amp;quot;first sylabus&amp;quot; and &amp;quot;last sylabus&amp;quot; for naming. That's not really needed in english, but some translations could use it&lt;br /&gt;
* Again, it is common to have villages with more than one &amp;quot;random&amp;quot; word in them. having a $name2 variable would be nice&lt;br /&gt;
&lt;br /&gt;
ACardboardRobot 2/2/07&lt;br /&gt;
&lt;br /&gt;
=== Debug Mode ===&lt;br /&gt;
* New debug command functionality (setting additional status.variables, possibly terrain)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[NotSoEasyCoding]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Future]]&lt;/div&gt;</summary>
		<author><name>Nital</name></author>
		
	</entry>
</feed>