<?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=Rusty</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=Rusty"/>
	<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/Special:Contributions/Rusty"/>
	<updated>2026-04-11T04:51:32Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.16</generator>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=NotSoEasyCoding&amp;diff=16344</id>
		<title>NotSoEasyCoding</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=NotSoEasyCoding&amp;diff=16344"/>
		<updated>2007-07-06T00:03:55Z</updated>

		<summary type="html">&lt;p&gt;Rusty: /* Config Writer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Foreword ==&lt;br /&gt;
This page shows projects which are considered a good idea by the developers but which have nobody working on them so far. If you think you've got the required skill for a task go on, implement it and you've got a high chance that it'll be accepted. The remaining barrier will only be that it's done well. :-)&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;
== Campaign Server related features ==&lt;br /&gt;
&lt;br /&gt;
=== Reimplement the campaign server in Perl ===&lt;br /&gt;
The current campaign server is written in C++ and networking with SDL_net isn't really optimal, neither is multithreading easy to do here. Therefore it was proposed to reimplement it in Perl as this should allow for easier inclusion of new features. There are already Perl Modules to read WML.&lt;br /&gt;
&lt;br /&gt;
I'll soon start to work on this project, but the language of choice will be python instead of perl --[[User:SkeletonCrew|SkeletonCrew]] 21:50, 4 July 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
=== Integrate WesCamp-i18n into the Campaign Server ===&lt;br /&gt;
So far translations of unofficial campaigns, eras or MP scenarios aren't too easy to handle. Authors must put their stuff into the WesCamp SVN repository, fetch translations from there and put those onto the campaign server. The vision for the future would be that the campaign server will automatically commit every change into the SVN repository and pull translations regulary. This would allow for new translations to appear in the download without further interaction of the authors.&lt;br /&gt;
Allefant already wrote some Python scripts to handle the SVN commit / fetch part which could be used as external helpers.&lt;br /&gt;
&lt;br /&gt;
I started to work on this project --[[User:SkeletonCrew|SkeletonCrew]] 21:49, 4 July 2007 (CEST)&lt;br /&gt;
== Game Engine ==&lt;br /&gt;
=== Showing &amp;quot;Advantage&amp;quot; In-Game/End-Game ===&lt;br /&gt;
&lt;br /&gt;
As described here: [http://www.wesnoth.org/forum/viewtopic.php?p=169416]&lt;br /&gt;
&lt;br /&gt;
=== Multiplayer and RNG Cheating ===&lt;br /&gt;
&lt;br /&gt;
As described here: [http://www.wesnoth.org/forum/viewtopic.php?t=9500]&lt;br /&gt;
&lt;br /&gt;
== Data Structures ==&lt;br /&gt;
=== Config Writer ===&lt;br /&gt;
&lt;br /&gt;
The speed of saving Wesnoth games is dominated by the time to marshall all the config structures.  This involves deep copying them many times as each subsystem returns its config bundle; far better would be to have a &amp;quot;config_writer&amp;quot; class which is handed to each subsystem which iterates through its structures and does the writing (to file or network) directly to the config_writer instance.&lt;br /&gt;
&lt;br /&gt;
Stop by #wesnoth-dev on freenode irc if you want to help with this, or post in the Coder's Corner.&lt;br /&gt;
&lt;br /&gt;
=== Improvements to Unit Map ===&lt;br /&gt;
&lt;br /&gt;
As described here: [http://www.wesnoth.org/forum/viewtopic.php?p=236063#236063]&lt;/div&gt;</summary>
		<author><name>Rusty</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=ThemeWML&amp;diff=9721</id>
		<title>ThemeWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=ThemeWML&amp;diff=9721"/>
		<updated>2006-05-28T02:35:05Z</updated>

		<summary type="html">&lt;p&gt;Rusty: Document AUTOSAVES menu magic&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;
== [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 language&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 language&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;
&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&lt;br /&gt;
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' senter 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 (1.1.3+)&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&lt;br /&gt;
* '''[unit_type]''' the type of the current unit&lt;br /&gt;
* '''[unit_level]''' the level of the current unit&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]'''&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&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>Rusty</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=AnimationWML&amp;diff=8497</id>
		<title>AnimationWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=AnimationWML&amp;diff=8497"/>
		<updated>2006-03-25T12:01:34Z</updated>

		<summary type="html">&lt;p&gt;Rusty: r10777: comma-separated sound list&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== Animation and sound ==&lt;br /&gt;
&lt;br /&gt;
Several key/tags of the [unit] and [attack] tags do not affect gameplay,&lt;br /&gt;
but are available to control the way units and their attacks&lt;br /&gt;
will be animated and heard.&lt;br /&gt;
&lt;br /&gt;
All images assume that units are facing right;&lt;br /&gt;
when units are facing left the images will be reversed.&lt;br /&gt;
If a unit is attacking north or south then an &amp;quot;orthogonal&amp;quot; image&lt;br /&gt;
may be displayed for the unit's missile (see [missile_frame]).&lt;br /&gt;
The input file is displayed when the unit is attacking northwards,&lt;br /&gt;
and flipped horizontally when the unit attacks southwards.&lt;br /&gt;
&lt;br /&gt;
All times (see ''begin'', ''end'', ''time'')&lt;br /&gt;
are measured in milliseconds, or 1000ths of seconds.&lt;br /&gt;
Unit movement is automatically animated based on these times;&lt;br /&gt;
the attacking unit or missile begins in the center of the hex at the lowest ''begin'' time,&lt;br /&gt;
then slides continuously to the center of the defender's hex, which it reaches at time=0.&lt;br /&gt;
If the attack is short-range,&lt;br /&gt;
the unit will then slide continuously back onto its own hex until the highest ''end'' time.&lt;br /&gt;
&lt;br /&gt;
* '''[frame]''' In WML, animations are made using the '''[frame]''' tag. It describes one frame of an animation. The following keys are recognized for '''[frame]''':&lt;br /&gt;
** ''begin'' when to start displaying this frame&lt;br /&gt;
** ''end'' when to stop displaying this frame&lt;br /&gt;
** ''image'' the image to display during this frame to represent the unit&lt;br /&gt;
** ''halo'' comma separated list of halo images to be displayed around the unit. The duration of images can be given with colons after the image name - else these images will be given equal amounts of time, based on the time between ''begin'' and ''end''. It is recommended that you allow for at least 50 time units per image; i.e. ''end'' - ''beginning'' &amp;gt; 50 * number of halos. ''halo'' is generally used only for long-range attack animations (both [frame] and [missile_frame]). Example: &amp;lt;pre&amp;gt;halo = &amp;quot;img1:10,img2:20,img3:10&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
** ''halo_x'',''halo_y'' pixel offset between the center of the ''halo'' images and the center of the unit.&lt;br /&gt;
** ''sound'' {{DevFeature}} the sound to play (at the begining) when this frame is displayed: if a comma-separated list, one is chosen randomly.&lt;br /&gt;
&lt;br /&gt;
The following display key/tags are recognized for '''[unit]''':&lt;br /&gt;
* ''image'' the unit image displayed on the main map when the unit is resting, and on the status table when the unit is selected. Also the default for all other unit images.&lt;br /&gt;
* ''profile'' the image displayed when the unit is talking. See [message], [[InterfaceActionsWML]].&lt;br /&gt;
* ''image_moving'' the image displayed while the unit is moving, this is deprecated in 1.1.x, see '''[movement_animation]''' below.&lt;br /&gt;
* ''image_long'' the image displayed while the unit is using a long-range (ranged) attack (can be overloaded; see '''[frame]''', '''[attack]''').&lt;br /&gt;
* ''image_short'' the image displayed while the unit is using a short-range (melee) attack (can be overloaded; see '''[frame]''', '''[attack]''').&lt;br /&gt;
* ''image_leading'',''image_healing'' the images displayed for this unit while using the 'leadership', 'heals', or 'cures' ability, if present. See also [[AbilitiesWML]].&lt;br /&gt;
* ''image_halo_healing'' a halo (see above) used together with image_healing&lt;br /&gt;
* '''[teleport_anim]''' describes an animation for when this unit teleports.&lt;br /&gt;
** '''[frame]''' see '''[frame]''' above. The frames before time 0 are displayed at the original location; the ones after are displayed at the new location.&lt;br /&gt;
* ''image_defensive'' default for ''image_defensive_long'' and ''image_defensive_short'' this is deprecated in 1.1.x see '''[defend]'''.&lt;br /&gt;
* ''image_defensive_long'' default image when the unit is defending against a long-range attack. This is deprecated in 1.1.x see '''[defend]'''.&lt;br /&gt;
* ''image_defensive_short'' default image when the unit is defending against a short-range attack. This is depecated in 1.1.x see '''[defend]'''.&lt;br /&gt;
* '''[defend]''' describes an animation for when this unit defends. Multiple [defend]s tags can be used.&lt;br /&gt;
** ''range'' if this key is present, the attack must be at this range in order for the animation to trigger. Values 'short', 'long'. {{DevFeature}}: this is a comma separated list of ranges to filter the defensive animation, values must be the same than the one in the ''range'' flag of the corresponding attack (melee and ranged for standard wesnoth)&lt;br /&gt;
** ''hits'' if this key is present, the attack must either hit('yes') or miss('no') in order for this animation to trigger.&lt;br /&gt;
** '''[frame]''' defense animation. See '''[frame]''' above.&lt;br /&gt;
* ''get_hit_sound'' the sound played (at time=0) when this unit is hit.  {{DevFeature}} If a comma-separated list, one is chosen at random.&lt;br /&gt;
* ''die_sound'' the sound played (at time=0) when the unit dies.  {{DevFeature}} If a comma-separated list, one is chosen at random.&lt;br /&gt;
* '''[death]''' describes an animation for when this unit is killed. Times before 0 are not allowed for this animation; the first frame's begin time will be displayed immediately following the unit's defense animation, regardless of whether it is before or after 0.&lt;br /&gt;
** '''[frame]''' death animation. See '''[frame]''' above.&lt;br /&gt;
* '''[extra_anim]''' {{DevFeature}} describes a unit animation that will be displayed on a '''[animate_unit]''' wml action&lt;br /&gt;
** ''flag'' this tag will be used to choose the animation to play. If a unit has more than one animaiton with a given tag, a random one will be choosen&lt;br /&gt;
** '''[frame]''' the animation itself, see '''[frame]''' above&lt;br /&gt;
* '''[movement_anim]''' describe an animation to use when the unit is moving. multiple animations are allowed&lt;br /&gt;
** ''terrain'' a comma separated list of letters, this animation will only be used on these terrains&lt;br /&gt;
** ''direction'' a comma separated list of directions, the animations will only be used when moving in these directions&lt;br /&gt;
&lt;br /&gt;
The following display tags are recognized for '''[attack]''' (deprecated in 1.1.x, use the '''[animation]''' tag described in [[unitWML]] which has the same syntax):&lt;br /&gt;
* ''hits'' {{DevFeature}} if this key is present, the attack must either hit('yes') or miss('no') in order for this animation to trigger.&lt;br /&gt;
* ''direction'' (only in an [animation] tag ) a comma separated list of directions, the animations will only be used when moving in these directions&lt;br /&gt;
&lt;br /&gt;
* '''[frame]''' unit's attack animation. For melee attacks ('''range=short'''), this animation is moved toward the enemy; otherwise it is stationary. See '''[frame]''' above for syntax.&lt;br /&gt;
* '''[missile_frame]''' missile's animation during the attack. Only valid for ranged attacks ('''range=long''').&lt;br /&gt;
** ''begin'',''end'',''halo'',''halo_x'',''halo_y'' same as in '''[frame]''' above.&lt;br /&gt;
** ''image'' the image to display when the unit is attacking orthogonally.&lt;br /&gt;
** ''image_diagonal'' the image to display if the unit is attacking diagonally.&lt;br /&gt;
* '''[sound]''' describes a sound to play during the attack (deprecated in 1.1.x, please use the sound= line in frames instead)&lt;br /&gt;
** ''sound'' the sound to play if the attack hits.  {{DevFeature}} If a comma-separated list, one is chosen at random.&lt;br /&gt;
** ''sound_miss'' the sound to play if the attack misses.  {{DevFeature}} If a comma-separated list, one is chosen at random.&lt;br /&gt;
** ''time'' when to start playing the sound&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>Rusty</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=InterfaceActionsWML&amp;diff=8496</id>
		<title>InterfaceActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=InterfaceActionsWML&amp;diff=8496"/>
		<updated>2006-03-25T11:57:04Z</updated>

		<summary type="html">&lt;p&gt;Rusty: r10777: comma-separated sound list&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;
* standard unit filter - 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&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;
* ''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 under the image. Name to be displayed.&lt;br /&gt;
* ''sound'' a sound effect (wav file) to play as the message is displayed. {{DevFeature}} 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;
** '''[command]''' an element containing actions which are executed if the option is selected.&lt;br /&gt;
&lt;br /&gt;
Text formatting options for '''[message]'''&lt;br /&gt;
* An asterisk (*) 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;
* 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;
&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;
&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.&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;
* '''[removeitem]''' removes any graphical items on a given hex&lt;br /&gt;
** ''x'', ''y'' the hex to remove items off&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-seperated list of x locations to move along&lt;br /&gt;
** ''y'' a comma-seperated list of y locations to move along (x and y values are matched pairs)&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. Only one unit may be hidden at a time.&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 (new in 0.9.2)&lt;br /&gt;
** ''x'', ''y'' the hex to scroll to&lt;br /&gt;
* '''[scroll_to_unit]''' Scroll to a given unit&lt;br /&gt;
** standard unit filter&lt;br /&gt;
* '''[sound]''' Plays a sound&lt;br /&gt;
** ''name'' the filename of the sound to play (in ''sounds/'' as .wav)&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;
** {{DevFeature}} 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;
* '''[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]]&lt;br /&gt;
** '''[filter]''' a standard unit filter see [[FilterWML]] by default, the unit at the event location will be animated. You can use this tag to choose what unit to animate&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;/div&gt;</summary>
		<author><name>Rusty</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SingleUnitWML&amp;diff=8240</id>
		<title>SingleUnitWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SingleUnitWML&amp;diff=8240"/>
		<updated>2006-03-19T10:06:25Z</updated>

		<summary type="html">&lt;p&gt;Rusty: fade_in (needed for tutorial)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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.&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;
* ''description'' used in standard unit filter ([[FilterWML]]). Note that this field is not filled in with names created at random when recruiting units. Nor is it affected by a player renaming a unit. So when designing maps you don't have to worry about naming conflicts.&lt;br /&gt;
&lt;br /&gt;
* ''user_description'' the name of the unit that is shown to the user. Default ''description''.&lt;br /&gt;
&lt;br /&gt;
* ''generate_description'' if set to &amp;quot;yes&amp;quot;, will generate a new name (user_description) for the unit, as if the unit was a freshly-recruited one.&lt;br /&gt;
&lt;br /&gt;
* ''unrenamable'' if 'yes', the user_description 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'' {{DevFeature}} choose the traits randomly, just like a recruited unit. '''Don't use this in a MP Scenario as this will cause an Out of Sync (OOS) error'''.&lt;br /&gt;
&lt;br /&gt;
* ''canrecruit'' a special key for leaders.&lt;br /&gt;
** '0' default. Unit cannot recruit.&lt;br /&gt;
** '1' unit can recruit.&lt;br /&gt;
: Normally when a team controls no units with '''canrecruit=1''', 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=1'''. 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.&lt;br /&gt;
&lt;br /&gt;
* ''upkeep'' the amount of upkeep the unit costs.&lt;br /&gt;
** &amp;quot;free&amp;quot; default for scenario-generated units. Unit does not cost upkeep&lt;br /&gt;
** &amp;quot;loyal&amp;quot; unit costs 1 upkeep. Can be changed by the effect 'loyal' (see [[EffectWML]])&lt;br /&gt;
** &amp;quot;full&amp;quot; unit costs ''level'' upkeep (see [[UnitWML]]). Default for recruited units&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 move points the unit has left. Default is the movement for ''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;
** &amp;quot;normal&amp;quot; (default) unit is facing to the right.&lt;br /&gt;
** &amp;quot;reverse&amp;quot; unit is facing to the left.&lt;br /&gt;
&lt;br /&gt;
* ''profile'' {{DevFeature}} sets a default portrait image for this unit. If the unit type already has a portrait set, this is used instead for this unit.&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;
* ''fade_in'' {{DevFeature}} 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 'on', the unit loses 8 HP each turn. See also ''heals'', ''cures'', [[AbilitiesWML]].&lt;br /&gt;
** ''slowed'' if 'on', the unit has 50% of its normal movement and -1 strike on each attack with strikes&amp;gt;1. When the controller of the unit's turn is over, ''slowed'' is set to 'off'  {{DevFeature}} slow now halves damage instead of removing one strike&lt;br /&gt;
** ''stone'' if 'on', the unit cannot move, attack, or be attacked.&lt;br /&gt;
** ''ambush'' if 'on', the unit cannot be seen by opponents.&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;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[UnitWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;/div&gt;</summary>
		<author><name>Rusty</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=EventWML&amp;diff=8239</id>
		<title>EventWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=EventWML&amp;diff=8239"/>
		<updated>2006-03-19T09:58:35Z</updated>

		<summary type="html">&lt;p&gt;Rusty: ''ai turn'' tag for tutorial&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== the [event] tag ==&lt;br /&gt;
&lt;br /&gt;
This tag is a subtag of [scenario] which is used to describe a set of actions&lt;br /&gt;
which trigger at a certain point in the scenario.&lt;br /&gt;
&lt;br /&gt;
keys and tags that describe when the event should trigger:&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt; ''name'' this is not like a normal 'name' key. It is a basic description of when the event will trigger.&lt;br /&gt;
* ''prestart'' the event is triggered before a scenario 'starts' -- before anything is shown on the screen at all. You can use this event to set up things like village ownership. For things displayed on-screen such as character dialog, use 'start'.&lt;br /&gt;
* ''start'' this event triggers after the map is shown but before the scenario begins&lt;br /&gt;
* ''new turn'' this event triggers whenever the last player ends their turn. See also '''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;
* ''side turn'' this event triggers when any player ends their turn. When a player ends their turn, before any 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.&lt;br /&gt;
* ''turn ''X'''' this event triggers at the start of turn ''X''. ''X'' cannot be 1.&lt;br /&gt;
* ''time over'' this event triggers on turn ''turns''. (''turns'' is specified in [scenario])&lt;br /&gt;
* ''enemies defeated'' this event triggers when all units with '''canrecruit=1''' (i.e. all leaders) not allied with side 1 are killed.&lt;br /&gt;
* ''victory'' 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;
* ''defeat'' 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;
* ''ai turn'' is triggered just before the AI is invoked for a player.  This is called after ''side turn'', so if you move a unit here, its movement will not be reset .&lt;br /&gt;
&lt;br /&gt;
Events with the following trigger types can be filtered on (see [[FilterWML]]).&lt;br /&gt;
Whenever one of these events is triggered,&lt;br /&gt;
the position of ''primary_unit'' is stored in the variables 'x1' and 'y1',&lt;br /&gt;
and the position of ''secondary_unit'' is stored in 'x2' and 'y2'.&lt;br /&gt;
&lt;br /&gt;
* ''moveto'' triggers after ''primary_unit'' moves. Usually the location of ''primary_unit'' is also filtered on; remember that this is the location that ''primary_unit'' lands on, not the location it started on or any location it travels on.&lt;br /&gt;
* ''sighted'' this event triggers when ''primary_unit'' moves to a location where ''secondary_unit'' is in ''primary_unit'''s sight range.&lt;br /&gt;
* ''attack'' this event triggers when ''primary_unit'' attacks ''secondary_unit''.&lt;br /&gt;
* ''attacker_hits'' {{DevFeature}} this event triggers when the attacker (''primary_unit'') hits the defender (''secondary_unit'').&lt;br /&gt;
* ''attacker_misses'' {{DevFeature}} same as ''attacker_hits'', but is triggered when the attacker misses.&lt;br /&gt;
* ''defender_hits'' {{DevFeature}} this event triggers when the attacker (''primary_unit'') is hit in retaliation by the defender (''secondary_unit'').&lt;br /&gt;
* ''defender_misses'' {{DevFeature}} same as ''defender_hits'', but is triggered when the defender misses.&lt;br /&gt;
* ''attack_end'' {{DevFeature}} is similar to ''attack'', but is instead triggered after the fight, not before. Note that if either unit is killed during the fight, this event triggers before any ''die'' events.&lt;br /&gt;
* ''stone'' this event triggers when ''primary_unit'' is hit by an attack with the 'stones' ability (See ''stones'', [[AbilitiesWML]]) by ''secondary_unit'' (''secondary_unit'' is the unit with the 'stones' ability.)&lt;br /&gt;
* ''die'' this event triggers when ''primary_unit'' is killed by ''secondary_unit''.&lt;br /&gt;
* ''capture'' this event triggers when ''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;
* ''recruit'' this event triggers when ''primary_unit'' is recruited or recalled. (That is, when a unit is recruited or recalled, it will trigger this event and this event's filter will filter that unit.)&lt;br /&gt;
* ''advance'' {{DevFeature}} this event triggers just before ''primary_unit'' is going to advance to another unit.&lt;br /&gt;
* ''post_advance'' {{DevFeature}} this event triggers just after ''primary_unit'' has advanced to another unit.&lt;br /&gt;
* ''select'' {{DevFeature}} triggers when a unit is selected.  Mainly useful for the tutorial.&lt;br /&gt;
&lt;br /&gt;
An '''[allow_undo]''' tag anywhere within a moveto event will cancel any lack of undo functionality the event would have&lt;br /&gt;
caused. It is up to the scenario designer to avoid abusing this command by allowing undo on events that shouldn't be&lt;br /&gt;
undoable. The results of doing this may be strange. This actually does have functionality beyond aesthetics like&lt;br /&gt;
signs: suppose you have an event that performs some action depending on the condition of an 'if' statement. This event&lt;br /&gt;
might be executed on every single move, but the body of the 'if' statement entered only in a few cases. Previously&lt;br /&gt;
this would completely disable undo for the entire scenario, while now it can be made to only disable undo in the cases&lt;br /&gt;
where the event mutates the scenario.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Primary_unit'' can be referred to as '''unit''' and ''Secondary_unit'' can be referred to as '''second_unit''' in [message] tags. For example:&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;
These keys and tags are more complex ways to filter when an event should trigger:&lt;br /&gt;
* ''first_time_only'' whether the event should be removed from the scenario after it is triggered.  Default is 'yes'.&lt;br /&gt;
* '''[filter]''' the event will only trigger if ''primary_unit'' matches this filter.&lt;br /&gt;
** standard unit filter - attributes for [filter] are described in [[FilterWML]]&lt;br /&gt;
* '''[filter_second]''' is like [filter], but for ''secondary_unit''.&lt;br /&gt;
** standard unit filter&lt;br /&gt;
* '''[special_filter]''' and '''[special_filter_second]''' {{DevFeature}} can be used to set some additional filtering criteria for ''primary_unit'' and ''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;
** ''weapon'' the name of the weapon used.&lt;br /&gt;
** ''terrain'' the letter of the terrain the unit is on.&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: internal actions ([[InternalActionsWML]]) which are used by WML internally,&lt;br /&gt;
display actions ([[InterfaceActionsWML]]) which show something to the user,&lt;br /&gt;
and direct actions ([[DirectActionsWML]]) which have a direct effect on gameplay.&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;
== 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>Rusty</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=InternalActionsWML&amp;diff=8126</id>
		<title>InternalActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=InternalActionsWML&amp;diff=8126"/>
		<updated>2006-03-12T09:31:03Z</updated>

		<summary type="html">&lt;p&gt;Rusty: Example of poison doesn't work (at least in current 1.1.1+svn)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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;
** standard unit filter&lt;br /&gt;
&lt;br /&gt;
* '''[and]''' {{DevFeature}} 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.&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&lt;br /&gt;
** condition tags as in [if] - if these evaluate to true, [or] evaluates to true.&lt;br /&gt;
&lt;br /&gt;
* '''[not]''' {{DevFeature}} If a [not] is present, .&lt;br /&gt;
** condition tags as in [if] - if these evaluate to true, [not] evaluates to false.&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 these keys should be used:&lt;br /&gt;
** ''equals'' $name is equal (string wise) to ''equals''&lt;br /&gt;
***''(to compare numbers, use numerical_equals, see below)''&lt;br /&gt;
** ''not_equals'' $name is not equal to ''not_equals''&lt;br /&gt;
** ''greater_than'' $name is numerically greater than ''greater_than''&lt;br /&gt;
** ''less_than'' $name is less than ''less_than''&lt;br /&gt;
** ''greater_than_equal_to'' $name is not less than ''greater_than_equal_to''&lt;br /&gt;
** ''less_than_equal_to'' $name is not greater than ''less_than_equal_to''&lt;br /&gt;
** ''numerical_not_equals'' $name is greater than or less than ''numerical_not_equals''&lt;br /&gt;
** ''numerical_equals'' $name is not greater than or less than ''numerical_equals''&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;
== [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;
== [event] == 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.&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 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 amount. To divide, multiply by a decimal. To negate, multiply by -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;
&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]''' (standard unit filter) 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'' {{DevFeature}} 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;
:* profile {{DevFeature}}&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=on&lt;br /&gt;
 [/set_variable]&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' and 'y'.&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'.&lt;br /&gt;
** standard location filter- 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 series of terrain characters. (See [[TerrainLettersWML]] for possible values.) If present, locations will only be chosen if the letter of 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]''' (standard unit filter) 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_gold]''' stores the gold for a certain side in 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;
* '''[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;{{DevFeature}} 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.&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 Standard Unit Filter with the modification to order the search by type, mark only the first unit found with the role, and the role attribute is not used in the search. If for some reason you want to search for units that have or don't have existing roles, you can use one or more [not] filters. The will check recall lists in addition to units on the map. In normal use, you will probably want to include a ''side'' attribute to force the unit to be on a particular side.&lt;br /&gt;
** ''role'' the value to store as the unit's role. This role is not used in the Standard Unit Filter 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;
&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>Rusty</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosSimple&amp;diff=8053</id>
		<title>BuildingScenariosSimple</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosSimple&amp;diff=8053"/>
		<updated>2006-03-10T01:46:44Z</updated>

		<summary type="html">&lt;p&gt;Rusty: Encourage id numbering for stats.wesnoth.org&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I will show you a very simple scenario file,&lt;br /&gt;
then explain each line of it.&lt;br /&gt;
This file is not fully functional, but it shows you&lt;br /&gt;
the basics needed to describe what this scenario is all about.&lt;br /&gt;
&lt;br /&gt;
 [scenario]&lt;br /&gt;
 &lt;br /&gt;
 id=1_test&lt;br /&gt;
 next_scenario=2_test-more&lt;br /&gt;
 &lt;br /&gt;
 name=A Simple Test Scenario&lt;br /&gt;
 map_data=&amp;quot;{campaigns/Test_Campaign/testmap}{~campaigns/Test_Campaign/testmap}&amp;quot;&lt;br /&gt;
 turns=20&lt;br /&gt;
 &lt;br /&gt;
 {DAWN}&lt;br /&gt;
 {MORNING}&lt;br /&gt;
 {AFTERNOON}&lt;br /&gt;
 {DUSK}&lt;br /&gt;
 {FIRST_WATCH}&lt;br /&gt;
 {SECOND_WATCH}&lt;br /&gt;
 &lt;br /&gt;
 music=wesnoth-1.ogg&lt;br /&gt;
 &lt;br /&gt;
 [event]&lt;br /&gt;
 name=prestart&lt;br /&gt;
  [objectives]&lt;br /&gt;
  side=1&lt;br /&gt;
   [objective]&lt;br /&gt;
    description= _ &amp;quot;Defeat Enemy Leader&amp;quot;&lt;br /&gt;
    condition=win&lt;br /&gt;
   [/objective]&lt;br /&gt;
   [objective]&lt;br /&gt;
    description= _ &amp;quot;Death of Konrad&amp;quot;&lt;br /&gt;
    condition=lose&lt;br /&gt;
   [/objective]&lt;br /&gt;
  [/objectives]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
First, every scenario must be enclosed in a tag;&lt;br /&gt;
the '''[scenario]''' tag is used for campaign scenarios.&lt;br /&gt;
The first set of keys in the scenario tag&lt;br /&gt;
describe the very basics of this scenario.&lt;br /&gt;
The ''id'' is the computer's name for your scenario,&lt;br /&gt;
and is not displayed during the game, but will be used on http://stats.wesnoth.org to display game statistics (they will be graphed there in numerical order, so it's a good idea to number the ids).&lt;br /&gt;
It is neccesary to put this name somewhere else,&lt;br /&gt;
such as a campaign tag, as well, in order to actually play the scenario.&lt;br /&gt;
Where you put the ID for the scenario&lt;br /&gt;
indicates how you would play this scenario in-game.&lt;br /&gt;
For example, if your scenario is for a campaign,&lt;br /&gt;
you need to list it as the scenario following another scenario in the campaign.&lt;br /&gt;
&lt;br /&gt;
The ''next_scenario'' key lists the scenario&lt;br /&gt;
that is played after this one is won,&lt;br /&gt;
with units from this scenario available for recall.&lt;br /&gt;
The value of this key should be the same&lt;br /&gt;
as the value of the '''id''' key in the scenario following it.&lt;br /&gt;
If your scenario is not part of a campaign,&lt;br /&gt;
putting '''next_scenario=null''' or skipping this line&lt;br /&gt;
will cause the &amp;quot;End&amp;quot; screen to be displayed when you win.&lt;br /&gt;
&lt;br /&gt;
The ''name'' key is shown on the introduction screen(which usually contains the&lt;br /&gt;
map graphic) before each scenario is played.&lt;br /&gt;
It is also the default name for saves on the level.&lt;br /&gt;
The next key, ''map_data'', is a link to the map file.&lt;br /&gt;
Since we may not know exactly where this campaign will be installed we write&lt;br /&gt;
two possible locations of the map data.&lt;br /&gt;
The quotes are necessary because Wesnoth map data takes up multiple lines,&lt;br /&gt;
so quotes are used instead to determine where the data begins and ends.&lt;br /&gt;
The map file must be a valid Wesnoth map file; see [[BuildingMaps]].&lt;br /&gt;
Finally, the last key in the top set of keys is ''turns''.&lt;br /&gt;
This sets an event on the specified turn causing the player to lose.&lt;br /&gt;
&lt;br /&gt;
The next section is a set of IDs. This section tells the game how a day should&lt;br /&gt;
progress. This listing above is the normal day used throughout Wesnoth. If you&lt;br /&gt;
want the entire scenario to take place at night, remove all the IDs except for&lt;br /&gt;
'''{SECOND_WATCH}'''. This can be useful if you have Konrad&lt;br /&gt;
fighting against the Undead and wanted the Undead to have the upper hand the&lt;br /&gt;
whole time. Remember though, by setting this to a single ID and not the normal&lt;br /&gt;
day listed above, your scenario will effectively be taking place during one day&lt;br /&gt;
or night, not many days as the majority currently are.&lt;br /&gt;
&lt;br /&gt;
The ''music'' key is a filename pointing to the music which plays.&lt;br /&gt;
This music file must be in the ''music/'' directory and must be in .ogg format.&lt;br /&gt;
&lt;br /&gt;
The next part sets the objectives for the scenario. This is done inside an '''[event]''' tag, and to have the objectives set before the scenario starts, we must specify '''name=prestart'''. Inside the [event] tag, we have an '''[objectives]''' (plural) tag, which contains any number of '''[objective]''' (singular) tags.&lt;br /&gt;
For each tag, if ''condition'' is &amp;quot;win&amp;quot;, the text of ''description'' will be displayed in green after &amp;quot;Victory&amp;quot; in the Scenario Objectives. If ''condition'' is &amp;quot;lose&amp;quot;, the text of ''description'' will be displayed in red after &amp;quot;Defeat&amp;quot; in the Scenario Objectives.&lt;br /&gt;
&lt;br /&gt;
The ' _ ' facilitates translation using Gettext (see [[GetText]]).&lt;br /&gt;
&lt;br /&gt;
Note that ''ANY'' Victory or Defeat objective can be met to win or lose the scenario,&lt;br /&gt;
but a single Victory objective may have multiple parts.&lt;br /&gt;
&lt;br /&gt;
So far so good. The last necessary part of a scenario describes what the players (Human and&lt;br /&gt;
Computer) start with and can do. Each of the players is described through&lt;br /&gt;
the '''[side]''' tag.&lt;br /&gt;
&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 &lt;br /&gt;
 [side]&lt;br /&gt;
 side=1&lt;br /&gt;
 controller=human&lt;br /&gt;
 team_name=2&lt;br /&gt;
 &lt;br /&gt;
 type=Commander&lt;br /&gt;
 description=Konrad&lt;br /&gt;
 canrecruit=1&lt;br /&gt;
 &lt;br /&gt;
 recruit=Elvish Fighter,Elvish Archer,Horseman,Mage,Elvish Shaman&lt;br /&gt;
 &lt;br /&gt;
 {GOLD 100 50 0}&lt;br /&gt;
 {INCOME 10 5 0}&lt;br /&gt;
 [/side]&lt;br /&gt;
 &lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
From the above example above you can see&lt;br /&gt;
a sample '''[side]''' for the human player, Konrad.&lt;br /&gt;
The first key, ''side'',&lt;br /&gt;
is the location where this player starts on the map,&lt;br /&gt;
and is also the ID for this side.&lt;br /&gt;
It is a number from 1 to 9.&lt;br /&gt;
The next key that describes this player is ''controller''.&lt;br /&gt;
The possible values are 'human'&lt;br /&gt;
and 'ai', with 'ai' as the default.&lt;br /&gt;
After this, the ''team_name'' key describes which team the side is on.&lt;br /&gt;
In this example Konrad is on team &amp;quot;2&amp;quot;, which by default contains side 2.&lt;br /&gt;
However, if you change the team_name of side 2,&lt;br /&gt;
Konrad will no longer be allied with it.&lt;br /&gt;
&lt;br /&gt;
The next set of keys describe the player's leader.&lt;br /&gt;
First we have ''canrecruit''.&lt;br /&gt;
This key can be '0' or '1', which is &amp;quot;no&amp;quot; or &amp;quot;yes&amp;quot; respectively.&lt;br /&gt;
If you say no, then the player's leader will not be able to recruit.&lt;br /&gt;
And if he can't recruit, he's not really a leader, is he?&lt;br /&gt;
Any team without a canrecruit=1 unit automatically loses, so be sure to use this key.&lt;br /&gt;
The next key, ''type'', is the type of unit the leader will be.&lt;br /&gt;
The possible  values are listed at [[UnitTables]].&lt;br /&gt;
The ''description'' is the name and description of the leader.&lt;br /&gt;
All of these keys are ignored for the human player on all campaign scenarios except the first,&lt;br /&gt;
since the leader from the previous scenario is used instead.&lt;br /&gt;
However, the ''type'' key is still neccesary to prevent the scenario from crashing.&lt;br /&gt;
&lt;br /&gt;
Next we have the '''recruit''' key which is a comma-separated&lt;br /&gt;
list of units. The possible values are listed in [[UnitTables]].&lt;br /&gt;
&lt;br /&gt;
The last two things are IDs.&lt;br /&gt;
'''{GOLD}''' inputs any 3 positive numbers.&lt;br /&gt;
These indicate the amount of money the player will start with.&lt;br /&gt;
The first value indicates the value on the EASY difficulty level;&lt;br /&gt;
second NORMAL, third HARD.&lt;br /&gt;
When this is inside the ''controller=human'' in a campaign file&lt;br /&gt;
then the actual gold the player gets will be the maximum of this value,&lt;br /&gt;
and the amount of gold the player retained from the previous scenario.&lt;br /&gt;
The '''INCOME''' id is similar, but indicates the base income instead of the base gold.&lt;br /&gt;
The defaults for each of these values are 100 gold and 2 base income.&lt;br /&gt;
&lt;br /&gt;
Now, to make this scenario playable, we need to make a campaign for it.&lt;br /&gt;
This should usually be stored in its own file in '''data/campaigns/'''.&lt;br /&gt;
Note: All files, the campaign file and the scenario file, one for each scenario level, must be saved with the ending&lt;br /&gt;
.cfg (for example: testcampaign.cfg, level1.cfg).&lt;br /&gt;
 [campaign]&lt;br /&gt;
 name= _ &amp;quot;Test Campaign&amp;quot;&lt;br /&gt;
 first_scenario=test-1&lt;br /&gt;
 difficulties=EASY,NORMAL,HARD&lt;br /&gt;
 &lt;br /&gt;
 difficulty_descriptions= _ &amp;quot;&amp;amp;elvish-fighter.png=Easy;*&amp;amp;elvish-hero.png=Medium;&amp;amp;elvish-champion.png=Hard&amp;quot;&lt;br /&gt;
 icon=elvish-fighter.png&lt;br /&gt;
 [/campaign]&lt;br /&gt;
&lt;br /&gt;
Campaigns are enclosed in the '''[campaign]''' tag. The first key is ''name'', which is&lt;br /&gt;
displayed on the campaign selector box. The second key is ''first_scenario'', which is&lt;br /&gt;
the ID of the first scenario of the campaign (Other scenarios are indicated using&lt;br /&gt;
''next_scenario'').&lt;br /&gt;
&lt;br /&gt;
The attribute '''difficulties=EASY,NORMAL,HARD'''&lt;br /&gt;
tells the computer to give the macro '''EASY''' a value&lt;br /&gt;
if the first difficulty choice is chosen,&lt;br /&gt;
'''NORMAL''' if the second is chosen, and '''HARD''' if the third is chosen.&lt;br /&gt;
The expression '''#ifdef''' can be used later to test these macros.&lt;br /&gt;
It is recommended that you do not use any names other than&lt;br /&gt;
'''EASY''', '''NORMAL''', and '''HARD''' for your macros,&lt;br /&gt;
because if you do then the macros '''{GOLD}''' and '''{INCOME}''' will not work properly.&lt;br /&gt;
&lt;br /&gt;
Two optional keys in '''[campaign]''' are ''difficulty_descriptions'' and ''icon''.&lt;br /&gt;
''icon'' has value equal to an image.&lt;br /&gt;
''difficulty_descriptions'' must have the same number of inputs as  '''difficulties''', most commonly three, separated by&lt;br /&gt;
semicolons.&lt;br /&gt;
These inputs then map on to the difficulties, so that if you have set difficulties to&lt;br /&gt;
&amp;quot;difficulties=EASY,NORMAL,HARD&amp;quot;,&lt;br /&gt;
the first input will specify the display&lt;br /&gt;
on easy, the second on normal and the third (and last) on hard.&lt;br /&gt;
Each difficulty display is an '''&amp;amp;''' sign, then the image to display,&lt;br /&gt;
then an equals sign, then the text to display.&lt;br /&gt;
Place an '''*''' sign before the display which you wish to be default difficulty, and it will be selected when the player&lt;br /&gt;
has chosen the campaign.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[BuildingMaps]]&lt;br /&gt;
* [[ScenarioWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Rusty</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=EventWML&amp;diff=7679</id>
		<title>EventWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=EventWML&amp;diff=7679"/>
		<updated>2006-02-27T01:57:35Z</updated>

		<summary type="html">&lt;p&gt;Rusty: Oops, there *was*  a recruit there already.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== the [event] tag ==&lt;br /&gt;
&lt;br /&gt;
This tag is a subtag of [scenario] which is used to describe a set of actions&lt;br /&gt;
which trigger at a certain point in the scenario.&lt;br /&gt;
&lt;br /&gt;
keys and tags that describe when the event should trigger:&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt; ''name'' this is not like a normal 'name' key. It is a basic description of when the event will trigger.&lt;br /&gt;
* ''prestart'' the event is triggered before a scenario 'starts' -- before anything is shown on the screen at all. You can use this event to set up things like village ownership. For things displayed on-screen such as character dialog, use 'start'.&lt;br /&gt;
* ''start'' this event triggers after the map is shown but before the scenario begins&lt;br /&gt;
* ''new turn'' this event triggers whenever the last player ends their turn. See also '''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;
* ''side turn'' this event triggers when any player ends their turn. When a player ends their turn, before any 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.&lt;br /&gt;
* ''turn ''X'''' this event triggers at the start of turn ''X''. ''X'' cannot be 1.&lt;br /&gt;
* ''time over'' this event triggers on turn ''turns''. (''turns'' is specified in [scenario])&lt;br /&gt;
* ''enemies defeated'' this event triggers when all units with '''canrecruit=1''' (i.e. all leaders) not allied with side 1 are killed.&lt;br /&gt;
* ''victory'' 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;
* ''defeat'' 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;
Events with the following trigger types can be filtered on (see [[FilterWML]]).&lt;br /&gt;
Whenever one of these events is triggered,&lt;br /&gt;
the position of ''primary_unit'' is stored in the variables 'x1' and 'y1',&lt;br /&gt;
and the position of ''secondary_unit'' is stored in 'x2' and 'y2'.&lt;br /&gt;
&lt;br /&gt;
* ''moveto'' triggers after ''primary_unit'' moves. Usually the location of ''primary_unit'' is also filtered on; remember that this is the location that ''primary_unit'' lands on, not the location it started on or any location it travels on.&lt;br /&gt;
* ''sighted'' this event triggers when ''primary_unit'' moves to a location where ''secondary_unit'' is in ''primary_unit'''s sight range.&lt;br /&gt;
* ''attack'' this event triggers when ''primary_unit'' attacks ''secondary_unit''.&lt;br /&gt;
* ''attacker_hits'' {{DevFeature}} this event triggers when the attacker (''primary_unit'') hits the defender (''secondary_unit'').&lt;br /&gt;
* ''attacker_misses'' {{DevFeature}} same as ''attacker_hits'', but is triggered when the attacker misses.&lt;br /&gt;
* ''defender_hits'' {{DevFeature}} this event triggers when the attacker (''primary_unit'') is hit in retaliation by the defender (''secondary_unit'').&lt;br /&gt;
* ''defender_misses'' {{DevFeature}} same as ''defender_hits'', but is triggered when the defender misses.&lt;br /&gt;
* ''attack_end'' {{DevFeature}} is similar to ''attack'', but is instead triggered after the fight, not before. Note that if either unit is killed during the fight, this event triggers before any ''die'' events.&lt;br /&gt;
* ''stone'' this event triggers when ''primary_unit'' is hit by an attack with the 'stones' ability (See ''stones'', [[AbilitiesWML]]) by ''secondary_unit'' (''secondary_unit'' is the unit with the 'stones' ability.)&lt;br /&gt;
* ''die'' this event triggers when ''primary_unit'' is killed by ''secondary_unit''.&lt;br /&gt;
* ''capture'' this event triggers when ''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;
* ''recruit'' this event triggers when ''primary_unit'' is recruited or recalled. (That is, when a unit is recruited or recalled, it will trigger this event and this event's filter will filter that unit.)&lt;br /&gt;
* ''advance'' {{DevFeature}} this event triggers just before ''primary_unit'' is going to advance to another unit.&lt;br /&gt;
* ''post_advance'' {{DevFeature}} this event triggers just after ''primary_unit'' has advanced to another unit.&lt;br /&gt;
* ''select'' {{DevFeature}} triggers when a unit is selected.  Mainly useful for the tutorial.&lt;br /&gt;
&lt;br /&gt;
An '''[allow_undo]''' tag anywhere within a moveto event will cancel any lack of undo functionality the event would have&lt;br /&gt;
caused. It is up to the scenario designer to avoid abusing this command by allowing undo on events that shouldn't be&lt;br /&gt;
undoable. The results of doing this may be strange. This actually does have functionality beyond aesthetics like&lt;br /&gt;
signs: suppose you have an event that performs some action depending on the condition of an 'if' statement. This event&lt;br /&gt;
might be executed on every single move, but the body of the 'if' statement entered only in a few cases. Previously&lt;br /&gt;
this would completely disable undo for the entire scenario, while now it can be made to only disable undo in the cases&lt;br /&gt;
where the event mutates the scenario.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Primary_unit'' can be referred to as '''unit''' and ''Secondary_unit'' can be referred to as '''second_unit''' in [message] tags. For example:&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;
These keys and tags are more complex ways to filter when an event should trigger:&lt;br /&gt;
* ''first_time_only'' whether the event should be removed from the scenario after it is triggered.  Default is 'yes'.&lt;br /&gt;
* '''[filter]''' the event will only trigger if ''primary_unit'' matches this filter.&lt;br /&gt;
** standard unit filter - attributes for [filter] are described in [[FilterWML]]&lt;br /&gt;
* '''[filter_second]''' is like [filter], but for ''secondary_unit''.&lt;br /&gt;
** standard unit filter&lt;br /&gt;
* '''[special_filter]''' and '''[special_filter_second]''' {{DevFeature}} can be used to set some additional filtering criteria for ''primary_unit'' and ''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;
** ''weapon'' the name of the weapon used.&lt;br /&gt;
** ''terrain'' the letter of the terrain the unit is on.&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: internal actions ([[InternalActionsWML]]) which are used by WML internally,&lt;br /&gt;
display actions ([[InterfaceActionsWML]]) which show something to the user,&lt;br /&gt;
and direct actions ([[DirectActionsWML]]) which have a direct effect on gameplay.&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;
== 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>Rusty</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=EventWML&amp;diff=7668</id>
		<title>EventWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=EventWML&amp;diff=7668"/>
		<updated>2006-02-26T10:50:13Z</updated>

		<summary type="html">&lt;p&gt;Rusty: Document select (r10305), and previously undocumented &amp;quot;recruit&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== the [event] tag ==&lt;br /&gt;
&lt;br /&gt;
This tag is a subtag of [scenario] which is used to describe a set of actions&lt;br /&gt;
which trigger at a certain point in the scenario.&lt;br /&gt;
&lt;br /&gt;
keys and tags that describe when the event should trigger:&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt; ''name'' this is not like a normal 'name' key. It is a basic description of when the event will trigger.&lt;br /&gt;
* ''prestart'' the event is triggered before a scenario 'starts' -- before anything is shown on the screen at all. You can use this event to set up things like village ownership. For things displayed on-screen such as character dialog, use 'start'.&lt;br /&gt;
* ''start'' this event triggers after the map is shown but before the scenario begins&lt;br /&gt;
* ''new turn'' this event triggers whenever the last player ends their turn. See also '''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;
* ''side turn'' this event triggers when any player ends their turn. When a player ends their turn, before any 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.&lt;br /&gt;
* ''turn ''X'''' this event triggers at the start of turn ''X''. ''X'' cannot be 1.&lt;br /&gt;
* ''time over'' this event triggers on turn ''turns''. (''turns'' is specified in [scenario])&lt;br /&gt;
* ''enemies defeated'' this event triggers when all units with '''canrecruit=1''' (i.e. all leaders) not allied with side 1 are killed.&lt;br /&gt;
* ''victory'' 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;
* ''defeat'' 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;
Events with the following trigger types can be filtered on (see [[FilterWML]]).&lt;br /&gt;
Whenever one of these events is triggered,&lt;br /&gt;
the position of ''primary_unit'' is stored in the variables 'x1' and 'y1',&lt;br /&gt;
and the position of ''secondary_unit'' is stored in 'x2' and 'y2'.&lt;br /&gt;
&lt;br /&gt;
* ''moveto'' triggers after ''primary_unit'' moves. Usually the location of ''primary_unit'' is also filtered on; remember that this is the location that ''primary_unit'' lands on, not the location it started on or any location it travels on.&lt;br /&gt;
* ''sighted'' this event triggers when ''primary_unit'' moves to a location where ''secondary_unit'' is in ''primary_unit'''s sight range.&lt;br /&gt;
* ''attack'' this event triggers when ''primary_unit'' attacks ''secondary_unit''.&lt;br /&gt;
* ''attacker_hits'' {{DevFeature}} this event triggers when the attacker (''primary_unit'') hits the defender (''secondary_unit'').&lt;br /&gt;
* ''attacker_misses'' {{DevFeature}} same as ''attacker_hits'', but is triggered when the attacker misses.&lt;br /&gt;
* ''defender_hits'' {{DevFeature}} this event triggers when the attacker (''primary_unit'') is hit in retaliation by the defender (''secondary_unit'').&lt;br /&gt;
* ''defender_misses'' {{DevFeature}} same as ''defender_hits'', but is triggered when the defender misses.&lt;br /&gt;
* ''attack_end'' {{DevFeature}} is similar to ''attack'', but is instead triggered after the fight, not before. Note that if either unit is killed during the fight, this event triggers before any ''die'' events.&lt;br /&gt;
* ''stone'' this event triggers when ''primary_unit'' is hit by an attack with the 'stones' ability (See ''stones'', [[AbilitiesWML]]) by ''secondary_unit'' (''secondary_unit'' is the unit with the 'stones' ability.)&lt;br /&gt;
* ''die'' this event triggers when ''primary_unit'' is killed by ''secondary_unit''.&lt;br /&gt;
* ''capture'' this event triggers when ''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;
* ''recruit'' this event triggers when ''primary_unit'' is recruited or recalled. (That is, when a unit is recruited or recalled, it will trigger this event and this event's filter will filter that unit.)&lt;br /&gt;
* ''advance'' {{DevFeature}} this event triggers just before ''primary_unit'' is going to advance to another unit.&lt;br /&gt;
* ''post_advance'' {{DevFeature}} this event triggers just after ''primary_unit'' has advanced to another unit.&lt;br /&gt;
* ''recruit'' triggers when a unit is recruited.&lt;br /&gt;
* ''select'' {{DevFeature}} triggers when a unit is selected.  Mainly useful for the tutorial.&lt;br /&gt;
&lt;br /&gt;
An '''[allow_undo]''' tag anywhere within a moveto event will cancel any lack of undo functionality the event would have&lt;br /&gt;
caused. It is up to the scenario designer to avoid abusing this command by allowing undo on events that shouldn't be&lt;br /&gt;
undoable. The results of doing this may be strange. This actually does have functionality beyond aesthetics like&lt;br /&gt;
signs: suppose you have an event that performs some action depending on the condition of an 'if' statement. This event&lt;br /&gt;
might be executed on every single move, but the body of the 'if' statement entered only in a few cases. Previously&lt;br /&gt;
this would completely disable undo for the entire scenario, while now it can be made to only disable undo in the cases&lt;br /&gt;
where the event mutates the scenario.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Primary_unit'' can be referred to as '''unit''' and ''Secondary_unit'' can be referred to as '''second_unit''' in [message] tags. For example:&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;
These keys and tags are more complex ways to filter when an event should trigger:&lt;br /&gt;
* ''first_time_only'' whether the event should be removed from the scenario after it is triggered.  Default is 'yes'.&lt;br /&gt;
* '''[filter]''' the event will only trigger if ''primary_unit'' matches this filter.&lt;br /&gt;
** standard unit filter - attributes for [filter] are described in [[FilterWML]]&lt;br /&gt;
* '''[filter_second]''' is like [filter], but for ''secondary_unit''.&lt;br /&gt;
** standard unit filter&lt;br /&gt;
* '''[special_filter]''' and '''[special_filter_second]''' {{DevFeature}} can be used to set some additional filtering criteria for ''primary_unit'' and ''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;
** ''weapon'' the name of the weapon used.&lt;br /&gt;
** ''terrain'' the letter of the terrain the unit is on.&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: internal actions ([[InternalActionsWML]]) which are used by WML internally,&lt;br /&gt;
display actions ([[InterfaceActionsWML]]) which show something to the user,&lt;br /&gt;
and direct actions ([[DirectActionsWML]]) which have a direct effect on gameplay.&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;
== 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>Rusty</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=MusicListWML&amp;diff=7532</id>
		<title>MusicListWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=MusicListWML&amp;diff=7532"/>
		<updated>2006-02-22T02:37:38Z</updated>

		<summary type="html">&lt;p&gt;Rusty: Provide an example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== the [music] tag ==&lt;br /&gt;
{{DevFeature}}&lt;br /&gt;
&lt;br /&gt;
This tag is a subtag of [scenario] and [event] which is used to describe a music track to play.  You can repeat this tag as many times as you like; if you set the ''append'' tag to ''yes'' they will form a playlist from which tracks will be selected at random.&lt;br /&gt;
&lt;br /&gt;
Tags describe the music track:&lt;br /&gt;
* ''name'' specifies the music file, relative to '&amp;quot;music/&amp;quot;'.  This is compulsory.&lt;br /&gt;
* ''append=yes'' specifies this is to be added to the current playlist.  Without this, the current playlist is replaced by this track.&lt;br /&gt;
* ''play_once=yes'' immediately switch to playing this track, but then return to the play list, which is unchanged.&lt;br /&gt;
* ''immediate=yes'' immediately switch to playing this track.  Without this, the song will play when the entire [event] is over or the current song ends.  This exists to force music changes '''during''' dialog exchange or other [event] which take significant time.&lt;br /&gt;
* ''ms_before'' (optional) specifies how many milliseconds to delay before playing this track.  Currently this does not apply when the scenario first starts, or with ''play_once'' or ''immediate''.&lt;br /&gt;
* ''ms_after'' (optional) specifies how many milliseconds to delay after playing this track.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
This creates a new playlist with three entries in it.  The second track is always preceeded by 1/2 a second of silence.&lt;br /&gt;
  [music]&lt;br /&gt;
     name=background-music-1.ogg&lt;br /&gt;
  [/music]&lt;br /&gt;
  [music]&lt;br /&gt;
     name=background-music-2.ogg&lt;br /&gt;
     ms_before=500&lt;br /&gt;
     append=yes&lt;br /&gt;
  [/music]&lt;br /&gt;
  [music]&lt;br /&gt;
     name=background-music-3.ogg&lt;br /&gt;
     append=yes&lt;br /&gt;
  [/music]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Rusty</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=MusicListWML&amp;diff=7187</id>
		<title>MusicListWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=MusicListWML&amp;diff=7187"/>
		<updated>2006-02-11T01:54:10Z</updated>

		<summary type="html">&lt;p&gt;Rusty: Clarify the use of &amp;quot;immediate&amp;quot; (ie. it's exceptional).&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== the [music] tag ==&lt;br /&gt;
{{DevFeature}}&lt;br /&gt;
&lt;br /&gt;
This tag is a subtag of [scenario] and [event] which is used to describe a music track to play.  You can repeat this tag as many times as you like; if you set the ''append'' tag to ''yes'' they will form a playlist from which tracks will be selected at random.&lt;br /&gt;
&lt;br /&gt;
Tags describe the music track:&lt;br /&gt;
* ''name'' specifies the music file, relative to '&amp;quot;music/&amp;quot;'.  This is compulsory.&lt;br /&gt;
* ''append=yes'' specifies this is to be added to the current playlist.  Without this, the current playlist is replaced by this track.&lt;br /&gt;
* ''play_once=yes'' immediately switch to playing this track, but then return to the play list, which is unchanged.&lt;br /&gt;
* ''immediate=yes'' immediately switch to playing this track.  Without this, the song will play when the entire [event] is over or the current song ends.  This exists to force music changes '''during''' dialog exchange or other [event] which take significant time.&lt;br /&gt;
* ''ms_before'' (optional) specifies how many milliseconds to delay before playing this track.  Currently this does not apply when the scenario first starts, or with ''play_once'' or ''immediate''.&lt;br /&gt;
* ''ms_after'' (optional) specifies how many milliseconds to delay after playing this track.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Rusty</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=CommandMode&amp;diff=7078</id>
		<title>CommandMode</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=CommandMode&amp;diff=7078"/>
		<updated>2006-02-08T06:39:10Z</updated>

		<summary type="html">&lt;p&gt;Rusty: /* Command Mode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Command Mode ==&lt;br /&gt;
&lt;br /&gt;
You can access command mode by typing ' ''':''' ' in a single player or multiplayer scenario.&lt;br /&gt;
(Prior to version 1.1.1, you need to type shift - semicolon( ''';''' ). However this isn't possible on all keyboards; if your keyboard doesn't have ':' above ';' you can change the hotkey in the Preferences, or you could edit '''game.cfg''' by hand.')&lt;br /&gt;
&lt;br /&gt;
Several vi-like commands are available in command mode. They are defined in ''playturn.cpp'' in the ''turn_info::do_command()'' function:&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;:q or :q!&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:quit the scenario (without prompting)&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;:w&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:save the game (without prompting)&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;:wq&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:save the game and quit the scenario (without prompting)&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;:refresh&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:redraw the screen&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;:droid&amp;lt;/nowiki&amp;gt; ''side''&lt;br /&gt;
:toggle player on side between human and AI players. If a human controls the side, the player himself has to issue this command.&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;:kick&amp;lt;/nowiki&amp;gt; ''username''&lt;br /&gt;
:kick a user in multiplayer. They will be able to rejoin the game. Generally a friendly way to remove someone who is having connection or other difficulties.&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;:ban&amp;lt;/nowiki&amp;gt; ''username''&lt;br /&gt;
:kick and ban a user in multiplayer, and the IP address used by that username&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;:control&amp;lt;/nowiki&amp;gt; ''side'' ''username''&lt;br /&gt;
:change the controller for ''side'' (write here number of the side) to ''username'' (write here nick of player or observer)&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;:clear&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:clear chat messages&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;:debug&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:switch debug mode on (does not work in multiplayer).  Debug mode is turned off by quitting the game.&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;:theme&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:bring up theme selection menu&lt;br /&gt;
&lt;br /&gt;
===Extra Debugging Commands===&lt;br /&gt;
[[DebugMode]] enables additional commands in command mode:&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;:n&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:skip to next scenario by triggering a win event&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;:gold&amp;lt;/nowiki&amp;gt; ''amount''&lt;br /&gt;
:add ''amount'' gold to the current player's side&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;:create&amp;lt;/nowiki&amp;gt; ''unit_type''&lt;br /&gt;
:create a unit of type specified at last selected hex&lt;br /&gt;
;&amp;lt;nowiki&amp;gt;:unit&amp;lt;/nowiki&amp;gt; ''attribute=value''&lt;br /&gt;
:when a unit is selected, this will set the unit's ''attribute'' to ''value''.   See [[SingleUnitWML]] for possible values.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[DebugMode]]&lt;br /&gt;
* [[DeveloperResources]]&lt;/div&gt;</summary>
		<author><name>Rusty</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=MusicListWML&amp;diff=6838</id>
		<title>MusicListWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=MusicListWML&amp;diff=6838"/>
		<updated>2006-01-30T06:15:45Z</updated>

		<summary type="html">&lt;p&gt;Rusty: Mark it as SVN-only&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== the [music] tag ==&lt;br /&gt;
{{DevFeature}}&lt;br /&gt;
&lt;br /&gt;
This tag is a subtag of [scenario] and [event] which is used to describe a music track to play.  You can repeat this tag as many times as you like; if you set the ''append'' tag to ''yes'' they will form a playlist from which tracks will be selected at random.&lt;br /&gt;
&lt;br /&gt;
Tags describe the music track:&lt;br /&gt;
* ''name'' specifies the music file, relative to '&amp;quot;music/&amp;quot;'.  This is compulsory.&lt;br /&gt;
* ''append=yes'' specifies this is to be added to the current playlist.  Without this, the current playlist is replaced by this track.&lt;br /&gt;
* ''play_once=yes'' immediately switch to playing this track, but then return to the play list, which is unchanged.&lt;br /&gt;
* ''immediate=yes'' immediately switch to playing this track.  Without this, the song will play when the entire [event] is over or the current song ends.&lt;br /&gt;
* ''ms_before'' (optional) specifies how many milliseconds to delay before playing this track.  Currently this does not apply when the scenario first starts, or with ''play_once'' or ''immediate''.&lt;br /&gt;
* ''ms_after'' (optional) specifies how many milliseconds to delay after playing this track.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Rusty</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=MusicListWML&amp;diff=6679</id>
		<title>MusicListWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=MusicListWML&amp;diff=6679"/>
		<updated>2006-01-26T23:40:21Z</updated>

		<summary type="html">&lt;p&gt;Rusty: It's name= not music=&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== the [music] tag ==&lt;br /&gt;
&lt;br /&gt;
This tag is a subtag of [scenario] and [event] which is used to describe a music track to play.  You can repeat this tag as many times as you like; if you set the ''append'' tag to ''yes'' they will form a playlist from which tracks will be selected at random.&lt;br /&gt;
&lt;br /&gt;
Tags describe the music track:&lt;br /&gt;
* ''name'' specifies the music file, relative to '&amp;quot;music/&amp;quot;'.  This is compulsory.&lt;br /&gt;
* ''append=yes'' specifies this is to be added to the current playlist.  Without this, the current playlist is replaced by this track.&lt;br /&gt;
* ''play_once=yes'' immediately switch to playing this track, but then return to the play list, which is unchanged.&lt;br /&gt;
* ''immediate=yes'' immediately switch to playing this track, then continue on the modified playlist.  Without this, we wait until the entire event is over before starting on the modified playlist (aborting the current track only if it's not on the new playlist). &lt;br /&gt;
* ''ms_before'' (optional) specifies how many milliseconds to delay before playing this track.  Currently this does not apply when the scenario first starts, or with ''play_once'' or ''immediate''.&lt;br /&gt;
* ''ms_after'' (optional) specifies how many milliseconds to delay after playing this track.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Rusty</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=MusicListWML&amp;diff=6155</id>
		<title>MusicListWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=MusicListWML&amp;diff=6155"/>
		<updated>2006-01-20T10:46:35Z</updated>

		<summary type="html">&lt;p&gt;Rusty: /* the [music-list] tag */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== the [music] tag ==&lt;br /&gt;
&lt;br /&gt;
This tag is a subtag of [scenario] and [event] which is used to describe a music track to play.  You can repeat this tag as many times as you like; if you set the ''append'' tag to ''yes'' they will form a playlist from which tracks will be selected at random.&lt;br /&gt;
&lt;br /&gt;
Tags describe the music track:&lt;br /&gt;
* ''music'' specifies the music file, relative to '&amp;quot;music/&amp;quot;'.  This is compulsory.&lt;br /&gt;
* ''append=yes'' specifies this is to be added to the current playlist.  Without this, the current playlist is replaced by this track.&lt;br /&gt;
* ''play_once=yes'' immediately switch to playing this track, but then return to the play list, which is unchanged.&lt;br /&gt;
* ''immediate=yes'' immediately switch to playing this track, then continue on the modified playlist.  Without this, we wait until the entire event is over before starting on the modified playlist (aborting the current track only if it's not on the new playlist). &lt;br /&gt;
* ''ms_before'' (optional) specifies how many milliseconds to delay before playing this track.  Currently this does not apply when the scenario first starts, or with ''play_once'' or ''immediate''.&lt;br /&gt;
* ''ms_after'' (optional) specifies how many milliseconds to delay after playing this track.&lt;/div&gt;</summary>
		<author><name>Rusty</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=MusicListWML&amp;diff=6151</id>
		<title>MusicListWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=MusicListWML&amp;diff=6151"/>
		<updated>2006-01-19T23:26:11Z</updated>

		<summary type="html">&lt;p&gt;Rusty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== the [music-list] tag ==&lt;br /&gt;
&lt;br /&gt;
This tag is a subtag of [scenario] which is used to describe a music track to play.  You can repeat this tag as many times as you like: one will be selected at random during scenario play.&lt;br /&gt;
&lt;br /&gt;
Tags describe the music:&lt;br /&gt;
* ''file'' specifies the music file, relative to '&amp;quot;music/&amp;quot;'.  This is compulsory.&lt;br /&gt;
* ''ms_before'' (optional) specifies how many milliseconds to delay before playing this track.  Currently this does not apply when the scenario first starts. &lt;br /&gt;
* ''ms_after'' (optional) specifies how many milliseconds to delay after playing this track.&lt;/div&gt;</summary>
		<author><name>Rusty</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=ScenarioWML&amp;diff=6150</id>
		<title>ScenarioWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=ScenarioWML&amp;diff=6150"/>
		<updated>2006-01-19T23:03:55Z</updated>

		<summary type="html">&lt;p&gt;Rusty: music_list doco.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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. Only in &amp;gt;0.8.5&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. See also [[EventWML]]&lt;br /&gt;
&lt;br /&gt;
* ''turn_at'' the turn to start on (default=1)&lt;br /&gt;
&lt;br /&gt;
* '''[music_list]''' specifies the music tracks to play during this scenario, see [[MusicListWML]].  This was introduced after 1.1, obsoleting the old ''music'' tag, which specified the music to play relative to the '&amp;quot;music/'&amp;quot;.&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;
* ''objectives'' (translatable) the text displayed in the Scenario Objectives box in-game. Now obsolete; see '''[objectives]''', [[InterfaceActionsWML]].&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=1''' (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.)&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;
** standard location filter&lt;br /&gt;
** '''[time]''', '''[illuminated_time]''' how a day should progress in those locations. See [[TimeWML]]&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;
** &amp;quot;default&amp;quot; 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;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;/div&gt;</summary>
		<author><name>Rusty</name></author>
		
	</entry>
</feed>