<?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=Segfault</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=Segfault"/>
	<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/Special:Contributions/Segfault"/>
	<updated>2026-05-04T11:08:16Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.16</generator>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=EventWML&amp;diff=25780</id>
		<title>EventWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=EventWML&amp;diff=25780"/>
		<updated>2008-05-25T20:48:11Z</updated>

		<summary type="html">&lt;p&gt;Segfault: /* The [event] tag */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== The [event] tag ==&lt;br /&gt;
&lt;br /&gt;
This tag is a subtag of the [scenario], [unit] and [era] tags which is used to describe a set of actions which trigger at a certain point in a scenario. When used in a [scenario] tag (also includes [multiplayer], [tutorial] and [test]), the event only occurs in that scenario. When used in a [unit] type definition, the event will occur in all scenarios in which a unit of that type appears in. When used in an [era], the event will occur in any scenario which is played using that era.&lt;br /&gt;
&lt;br /&gt;
Keys and tags that describe when the event should trigger:&lt;br /&gt;
* '''name''': this is not like a normal 'name' key. It is a basic description of when the event will trigger. {{DevFeature}} '''name''' can accept a list of commas separated descriptions for which the event must be triggered. Example: '''name= attacker_misses, defender_misses'''.&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 a side is about to start its turn. Before events of this type trigger, the value of the WML variable '''side_number''' is set to the number of the side of the player about to take their turn. This is before any healing takes place for that side, before calculating income, and before restoring unit movement and status.&lt;br /&gt;
* '''turn refresh''': this event triggers just before a side is taking control after healing, calculating income, and restoring unit movement and status.&lt;br /&gt;
* '''turn X''': (for X some number) 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=yes''' (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 side. This is called after ''side turn'', and thus the WML variable '''side_number''' still holds the number of this side.&lt;br /&gt;
&lt;br /&gt;
Filters can be applied to the following event triggers (see [[FilterWML]]; see also below). The actions specified in the event tag will be executed only if the filter returns true. &lt;br /&gt;
These event triggers are all actions by units ('''moveto''', '''attack''') or things that happen to units ('''recruit''', '''advance'''). When one of these events is triggered, the position of the active unit (referred to as the '''primary unit''') is stored in the variables '''x1''' and '''y1''' and the position of any unit that primary unit does something to is stored in the variables '''x2''' and '''y2''' (this unit is referred to as the '''secondary unit''' below). '' These units are also automatically stored in the variables 'unit' and 'second_unit' as if they had been stored using the '''[store_unit]''' tag. see [[SingleUnitWML]]&lt;br /&gt;
&lt;br /&gt;
* '''moveto'''': triggers after the primary unit moves. Typically this is used when the primary unit gets to a particular location and a filter for the location of the primary unit is included; remember that this is the location that the primary unit lands on, not the location it started on or any location it travels on.&lt;br /&gt;
* '''sighted''': this event triggers when the primary unit moves to a location where the secondary unit is in sight range of the primary unit. Works only in shroud or fog.&lt;br /&gt;
* '''attack''': this event triggers when the primary unit attacks the secondary_unit.&lt;br /&gt;
* '''attacker_hits''': this event triggers when the the primary unit (the attacker) hits the secondary unit (the defender). {{DevFeature}} A variable '''$damage_inflicted''' allow to check the number of hitpoints inflicted by the attacker.&lt;br /&gt;
* '''attacker_misses''': same as ''attacker_hits'', but is triggered when the attacker misses.&lt;br /&gt;
* '''defender_hits''': this event triggers when the primary unit (the attacker) is hit in retaliation by the secondary unit (the defender). {{DevFeature}} A variable '''$damage_inflicted''' allow to check the number of hitpoints inflicted by the defender.&lt;br /&gt;
* '''defender_misses''': same as ''defender_hits'', but is triggered when the defender misses.&lt;br /&gt;
* '''attack_end''': 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 the primary unit is hit by an attack with the 'stones' ability (See ''stones'', [[AbilitiesWML]]) by the secondary unit (the unit with the 'stones' ability).&lt;br /&gt;
* '''last breath''': this event triggers when the primary unit is killed by the secondary unit, but before the death animation is triggered.&lt;br /&gt;
* '''die''': this event triggers when the primary unit is killed by the secondary unit.&lt;br /&gt;
* '''capture''': this event triggers when the primary unit captures a village. The village may have been previously neutral, or previously owned by another side; merely moving into your own villages does not constitute a capture.&lt;br /&gt;
* '''recruit''': this event triggers when the 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.). {{DevFeature}} The '''recruit''' will no longer triggers on recalls.&lt;br /&gt;
* '''prerecruit''': this event triggers when the primary unit is recruited, but before it is displayed. {{DevFeature}} The '''prerecruit''' will no longer triggers on recalls.&lt;br /&gt;
* '''advance''': this event triggers just before the primary unit is going to advance to another unit.&lt;br /&gt;
* '''post_advance''': this event triggers just after the primary unit has advanced to another unit.&lt;br /&gt;
* '''select''': triggers when the primary unit is selected. ''Note: in networked multiplayer, these events are only executed by the client on which the event is triggered, leading to out of sync errors if you modify the game state in the event.''&lt;br /&gt;
* '''menu item X''': triggers when a WML menu item with id=X is selected. ''Note: if the menu item has a [command], this event may be executed before or after the command; there is no guarantee.'' &lt;br /&gt;
* {{DevFeature}} '''prerecall''': triggers when a unit is recalled, but before it is displayed. This event is not trigger when a unit is recruit.&lt;br /&gt;
* {{DevFeature}} '''recall''': triggers after a unit is recalled. This event is not trigger when a unit is recruit.&lt;br /&gt;
* {{DevFeature}} other events with a custom name may be invoked from [fire_event]&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 caused. Note that undo functionality will only move the unit back to its former location; it will not other changes to the game caused by the event. Thus it is up to the scenario designer to use this tag correctly.&lt;br /&gt;
&lt;br /&gt;
The primary unit can be referred to as '''unit''' and the secondary unit can be referred to as '''second_unit''' in [message] tags using the speaker= key. For example:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
 name=die&lt;br /&gt;
   [message]&lt;br /&gt;
   speaker=second_unit&lt;br /&gt;
   message=&amp;quot;Hahaha, I finally killed you!&amp;quot;&lt;br /&gt;
   [/message]&lt;br /&gt;
 &lt;br /&gt;
   [message]&lt;br /&gt;
   speaker=unit&lt;br /&gt;
   message=&amp;quot;It's not over yet! I'll come back to haunt you!&amp;quot;&lt;br /&gt;
   [/message]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
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 the primary unit matches this filter.&lt;br /&gt;
** [[StandardUnitFilter]]: selection criteria&lt;br /&gt;
* '''[filter_second]''': is like [filter], but for the secondary unit.&lt;br /&gt;
** [[StandardUnitFilter]]: selection criteria&lt;br /&gt;
* '''[special_filter]''' and '''[special_filter_second]''': can be used to set some additional filtering criteria for the primary unit and the secondary unit that are not generally available in a standard unit filter. Can be used in events ''attack'', ''attacker_hits'', ''attacker_misses'', ''defender_hits'', ''defender_misses'' and ''attack_end''. ({{DevFeature}} renamed to [filter_attack] and [filter_second_attack])&lt;br /&gt;
** '''weapon''': the name of the weapon used.&lt;br /&gt;
&lt;br /&gt;
=== Actions triggered by [event] ===&lt;br /&gt;
&lt;br /&gt;
After the trigger conditions have been met, all action tags within the [event] tag are executed in the order they are written in.&lt;br /&gt;
&lt;br /&gt;
There are 3 main types of actions:&lt;br /&gt;
* direct actions ([[DirectActionsWML]]) which have a direct effect on gameplay&lt;br /&gt;
* display actions ([[InterfaceActionsWML]]) which show something to the user&lt;br /&gt;
* internal actions ([[InternalActionsWML]]) which are used by WML internally&lt;br /&gt;
&lt;br /&gt;
Several actions use standard filters to find out which units&lt;br /&gt;
to execute the command on.  These are denoted by the phrases&lt;br /&gt;
&amp;quot;standard unit filter&amp;quot; and &amp;quot;standard location filter&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Nested events ===&lt;br /&gt;
&lt;br /&gt;
There is 1 special type of action: event creation.  By placing an '''[event]''' tag inside another '''[event]''' tag, the nested event is created when the nested event is encountered (when executing the contents of the event).  For example, you could create a portal that opens on turn 10.  The outer event executes on turn 10, creating the nested moveto event, which executes when a player steps on a certain spot.  An equivalent way of doing this would be to a single moveto event with an '''[if]''' statement to check for turn number, but using nested '''[event]''' tags is a convenient shortcut to accomplish this task without resorting to '''[if]''' statements.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=turn 10&lt;br /&gt;
 &lt;br /&gt;
     [event]&lt;br /&gt;
         name=moveto&lt;br /&gt;
 &lt;br /&gt;
         [filter]&lt;br /&gt;
             x,y=5,8&lt;br /&gt;
         [/filter]&lt;br /&gt;
 &lt;br /&gt;
         # moving to 5,8 will trigger this event only on turn 10 and after&lt;br /&gt;
     [/event]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
Nested events are nice for spawning a new event that does a simple task, but this technique is not reccommended for creating very complex tasks since the nested event will use different variable substitution rules than a normal event. For example, a variable substitution &amp;quot;$var&amp;quot; will be evaluated when it is created initially, but &amp;quot;$|var&amp;quot; would be evaluated later when it is triggered.&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>Segfault</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=EasyCoding&amp;diff=25779</id>
		<title>EasyCoding</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=EasyCoding&amp;diff=25779"/>
		<updated>2008-05-25T20:44:18Z</updated>

		<summary type="html">&lt;p&gt;Segfault: /* WML related features */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Foreword ==&lt;br /&gt;
This page is here to document easy to do coding tasks. It is not here to double the feature request database, and should only be filled by people that know the code well enough to judge the difficulty of a given task. &lt;br /&gt;
&lt;br /&gt;
If you are such a person, you should feel free to edit this page.&lt;br /&gt;
&lt;br /&gt;
If you're not, you should post a feature request and discuss your idea on the forum or IRC. A coder with better knowledge of the code might give you the green light to add your feature here.&lt;br /&gt;
&lt;br /&gt;
Anybody should feel free to add &amp;quot;clues&amp;quot; to any tasks, that is entry points, traps to avoid, person to contact to discuss and so on.&lt;br /&gt;
&lt;br /&gt;
If you plan to work on a feature, write your name at the bottom of the feature, with the date. Note that if you are too long at working on a feature I'll &amp;quot;free&amp;quot; it back (that is if you're not working on it. If you have problems implementing it, just tell us....)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:Boucman|Boucman]] 20:48, 3 October 2006 (CEST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since bugs are sometimes a good opportunity to get a first idea of the code, i will add some here that are easy to fix as soon as i stumble upon them (the one i had in mind is fixed already ;-).&lt;br /&gt;
&lt;br /&gt;
--Yogi Bear, 28 February 2008&lt;br /&gt;
&lt;br /&gt;
== MP related features ==&lt;br /&gt;
&lt;br /&gt;
=== Add TTL to wesnothd bans ===&lt;br /&gt;
As per FR #3638 [https://gna.org/bugs/?3638]&lt;br /&gt;
&lt;br /&gt;
''Working on it:'' Lao&lt;br /&gt;
&lt;br /&gt;
=== Use different font for in-game chat ===&lt;br /&gt;
Since commas and dots are apparently hard to tell apart. As per FR #7470 [https://gna.org/bugs/?7470]&lt;br /&gt;
&lt;br /&gt;
''Working on it:'' kthakore&lt;br /&gt;
&lt;br /&gt;
=== Allow lists for /ignore and similar ===&lt;br /&gt;
As per FR #7492 [https://gna.org/bugs/?7492]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== WML related features ==&lt;br /&gt;
&lt;br /&gt;
=== Make [removeitem] able to only remove a specific image ===&lt;br /&gt;
Currently a [removeitem] always removes all images on the given hex. It should be made to support an image= key which, if given, would make it only remove that image. If not specified, then all images would be removed just like now.&lt;br /&gt;
&lt;br /&gt;
--[[User:xonev|xonev]] 13 May 2008 - Patch submitted&lt;br /&gt;
&lt;br /&gt;
=== WML configurable village income / upkeep ===&lt;br /&gt;
Preferably as a [scenario], [side] or [campaign] keys. As per FR #6301 [https://gna.org/bugs/?6301]&lt;br /&gt;
&lt;br /&gt;
=== Add support of [if] for [scenario] ===&lt;br /&gt;
As per FR #4539 [https://gna.org/bugs/?4539]&lt;br /&gt;
&lt;br /&gt;
=== Make [have_unit] optionaly use full SUF ===&lt;br /&gt;
[have_unit] by default uses SUF but does not apply it to recall list. Introduce an optional key that will allow to lift that limitation.&lt;br /&gt;
&lt;br /&gt;
=== Side-specific results ===&lt;br /&gt;
Giving result=defeat or result=victory for specific sides. ([http://gna.org/bugs/index.php?4960 FR #4960]) -- [[User:dlr365|dlr365]] -- patch submitted [https://gna.org/bugs/index.php?4960]&lt;br /&gt;
&lt;br /&gt;
=== Support for leaderless multiplayergames ===&lt;br /&gt;
Add support for the WML key victory_when_enemies_defeated= in the scenario tag during multiplayergames. ([https://gna.org/bugs/index.php?8106 FR #8106])&lt;br /&gt;
&lt;br /&gt;
=== Allow a single [clear_variable] to clear multiple variables ===&lt;br /&gt;
Currently the name= key of [clear_variable] only takes a single variable name. However it'd be very handy to be able to clear multiple variables at the same time, so name= should also be made to also understand a comma-separated list:&lt;br /&gt;
&lt;br /&gt;
 [clear_variable]&lt;br /&gt;
     name=var1,var2,var3&lt;br /&gt;
 [/clear_variable]&lt;br /&gt;
&lt;br /&gt;
Commas don't need to be valid characters in variable names, so the fact that it's ambiguous whether &amp;quot;name=var1,var2,var3&amp;quot; refers to three variables or just one variable named &amp;quot;var1,var2,var3&amp;quot; shouldn't cause any problems.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Other Ideas ===&lt;br /&gt;
See [[FutureWML]]; some ideas there are easier than others.&lt;br /&gt;
&lt;br /&gt;
== Improvements to FormulaAI ==&lt;br /&gt;
&lt;br /&gt;
Add new formula functions, or minor improvements to the formula language. Make it easier to debug the formula language.&lt;br /&gt;
&lt;br /&gt;
== GUI related features ==&lt;br /&gt;
=== Change map paths from dots to dashes ===&lt;br /&gt;
Or even better allow dashes and allow choice between the two. As per FR #5522 [https://gna.org/bugs/?5522]&lt;br /&gt;
&lt;br /&gt;
-------------------&lt;br /&gt;
&lt;br /&gt;
Note at the moment Mordante is working on a new GUI system, these &lt;br /&gt;
changes will probably affect the way these items need to be implemented.&lt;br /&gt;
Contact Mordante on IRC before starting to work on these.&lt;br /&gt;
  &lt;br /&gt;
--[[User:SkeletonCrew|SkeletonCrew]] 14:04, 9 March 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Theme Changes ===&lt;br /&gt;
&lt;br /&gt;
* show number of owned villages/total villages (FR: #3135) (--[[User:Alink|alink]] done but must update help, doc, tooltip...)&lt;br /&gt;
* allow custom themes to display values of WML variables ([http://gna.org/bugs/index.php?6209 FR #6209])&lt;br /&gt;
* hide the hourglass item from the statusbar when there is no timer&lt;br /&gt;
&lt;br /&gt;
=== Widget Changes ===&lt;br /&gt;
* show side number, name and team association information in the status table &lt;br /&gt;
* make games sortable in the lobby (open slots, total number of players, era, XP modifier, gold per village, fog/shroud) &lt;br /&gt;
* input history (chat, commands, ..) - note: rujasu is working on this feature&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
=== More powerful village naming ===&lt;br /&gt;
'''Adding mountain names and other features to village names, having a second random name in village names'''&lt;br /&gt;
&lt;br /&gt;
Currently the village naming engine has a very good structure that could allow &lt;br /&gt;
more powerfull names to be generated. &lt;br /&gt;
Understanding how it works should be quite easy, and a few usefull improvements could be added.&lt;br /&gt;
&lt;br /&gt;
* Currently villages can use lake names and river names, this should be extended to other features like bridges, swamps, mountains etc...&lt;br /&gt;
* It would be nice to have a separate list of &amp;quot;first sylabus&amp;quot; and &amp;quot;last sylabus&amp;quot; for naming. That's not really needed in english, but some translations could use it&lt;br /&gt;
* Again, it is common to have villages with more than one &amp;quot;random&amp;quot; word in them. having a $name2 variable would be nice&lt;br /&gt;
&lt;br /&gt;
ACardboardRobot 2/2/07&lt;br /&gt;
&lt;br /&gt;
=== Debug Mode ===&lt;br /&gt;
* New debug command functionality (setting additional status.variables, possibly terrain)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Add minimal regexp to friend list ===&lt;br /&gt;
&lt;br /&gt;
Lots of people use multiple nicks, usually postfixed with a number... it would be nice to have minimal regexp support in friend list to easily get who's there...&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[NotSoEasyCoding]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Future]]&lt;/div&gt;</summary>
		<author><name>Segfault</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=EasyCoding&amp;diff=25778</id>
		<title>EasyCoding</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=EasyCoding&amp;diff=25778"/>
		<updated>2008-05-25T20:43:39Z</updated>

		<summary type="html">&lt;p&gt;Segfault: /* Enabling checking of damage dealt in WML */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Foreword ==&lt;br /&gt;
This page is here to document easy to do coding tasks. It is not here to double the feature request database, and should only be filled by people that know the code well enough to judge the difficulty of a given task. &lt;br /&gt;
&lt;br /&gt;
If you are such a person, you should feel free to edit this page.&lt;br /&gt;
&lt;br /&gt;
If you're not, you should post a feature request and discuss your idea on the forum or IRC. A coder with better knowledge of the code might give you the green light to add your feature here.&lt;br /&gt;
&lt;br /&gt;
Anybody should feel free to add &amp;quot;clues&amp;quot; to any tasks, that is entry points, traps to avoid, person to contact to discuss and so on.&lt;br /&gt;
&lt;br /&gt;
If you plan to work on a feature, write your name at the bottom of the feature, with the date. Note that if you are too long at working on a feature I'll &amp;quot;free&amp;quot; it back (that is if you're not working on it. If you have problems implementing it, just tell us....)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:Boucman|Boucman]] 20:48, 3 October 2006 (CEST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since bugs are sometimes a good opportunity to get a first idea of the code, i will add some here that are easy to fix as soon as i stumble upon them (the one i had in mind is fixed already ;-).&lt;br /&gt;
&lt;br /&gt;
--Yogi Bear, 28 February 2008&lt;br /&gt;
&lt;br /&gt;
== MP related features ==&lt;br /&gt;
&lt;br /&gt;
=== Add TTL to wesnothd bans ===&lt;br /&gt;
As per FR #3638 [https://gna.org/bugs/?3638]&lt;br /&gt;
&lt;br /&gt;
''Working on it:'' Lao&lt;br /&gt;
&lt;br /&gt;
=== Use different font for in-game chat ===&lt;br /&gt;
Since commas and dots are apparently hard to tell apart. As per FR #7470 [https://gna.org/bugs/?7470]&lt;br /&gt;
&lt;br /&gt;
''Working on it:'' kthakore&lt;br /&gt;
&lt;br /&gt;
=== Allow lists for /ignore and similar ===&lt;br /&gt;
As per FR #7492 [https://gna.org/bugs/?7492]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== WML related features ==&lt;br /&gt;
&lt;br /&gt;
=== Make [removeitem] able to only remove a specific image ===&lt;br /&gt;
Currently a [removeitem] always removes all images on the given hex. It should be made to support an image= key which, if given, would make it only remove that image. If not specified, then all images would be removed just like now.&lt;br /&gt;
&lt;br /&gt;
--[[User:xonev|xonev]] 13 May 2008 - Patch submitted&lt;br /&gt;
&lt;br /&gt;
=== WML configurable village income / upkeep ===&lt;br /&gt;
Preferably as a [scenario], [side] or [campaign] keys. As per FR #6301 [https://gna.org/bugs/?6301]&lt;br /&gt;
&lt;br /&gt;
=== Add support of [if] for [scenario] ===&lt;br /&gt;
As per FR #4539 [https://gna.org/bugs/?4539]&lt;br /&gt;
&lt;br /&gt;
=== Make [have_unit] optionaly use full SUF ===&lt;br /&gt;
[have_unit] by default uses SUF but does not apply it to recall list. Introduce an optional key that will allow to lift that limitation.&lt;br /&gt;
&lt;br /&gt;
=== Side-specific results ===&lt;br /&gt;
Giving result=defeat or result=victory for specific sides. ([http://gna.org/bugs/index.php?4960 FR #4960]) -- [[User:dlr365|dlr365]] -- patch submitted [https://gna.org/bugs/index.php?4960]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Support for leaderless multiplayergames ===&lt;br /&gt;
Add support for the WML key victory_when_enemies_defeated= in the scenario tag during multiplayergames. ([https://gna.org/bugs/index.php?8106 FR #8106])&lt;br /&gt;
&lt;br /&gt;
=== Allow a single [clear_variable] to clear multiple variables ===&lt;br /&gt;
Currently the name= key of [clear_variable] only takes a single variable name. However it'd be very handy to be able to clear multiple variables at the same time, so name= should also be made to also understand a comma-separated list:&lt;br /&gt;
&lt;br /&gt;
 [clear_variable]&lt;br /&gt;
     name=var1,var2,var3&lt;br /&gt;
 [/clear_variable]&lt;br /&gt;
&lt;br /&gt;
Commas don't need to be valid characters in variable names, so the fact that it's ambiguous whether &amp;quot;name=var1,var2,var3&amp;quot; refers to three variables or just one variable named &amp;quot;var1,var2,var3&amp;quot; shouldn't cause any problems.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Other Ideas ===&lt;br /&gt;
See [[FutureWML]]; some ideas there are easier than others.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Improvements to FormulaAI ==&lt;br /&gt;
&lt;br /&gt;
Add new formula functions, or minor improvements to the formula language. Make it easier to debug the formula language.&lt;br /&gt;
&lt;br /&gt;
== GUI related features ==&lt;br /&gt;
=== Change map paths from dots to dashes ===&lt;br /&gt;
Or even better allow dashes and allow choice between the two. As per FR #5522 [https://gna.org/bugs/?5522]&lt;br /&gt;
&lt;br /&gt;
-------------------&lt;br /&gt;
&lt;br /&gt;
Note at the moment Mordante is working on a new GUI system, these &lt;br /&gt;
changes will probably affect the way these items need to be implemented.&lt;br /&gt;
Contact Mordante on IRC before starting to work on these.&lt;br /&gt;
  &lt;br /&gt;
--[[User:SkeletonCrew|SkeletonCrew]] 14:04, 9 March 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Theme Changes ===&lt;br /&gt;
&lt;br /&gt;
* show number of owned villages/total villages (FR: #3135) (--[[User:Alink|alink]] done but must update help, doc, tooltip...)&lt;br /&gt;
* allow custom themes to display values of WML variables ([http://gna.org/bugs/index.php?6209 FR #6209])&lt;br /&gt;
* hide the hourglass item from the statusbar when there is no timer&lt;br /&gt;
&lt;br /&gt;
=== Widget Changes ===&lt;br /&gt;
* show side number, name and team association information in the status table &lt;br /&gt;
* make games sortable in the lobby (open slots, total number of players, era, XP modifier, gold per village, fog/shroud) &lt;br /&gt;
* input history (chat, commands, ..) - note: rujasu is working on this feature&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
=== More powerful village naming ===&lt;br /&gt;
'''Adding mountain names and other features to village names, having a second random name in village names'''&lt;br /&gt;
&lt;br /&gt;
Currently the village naming engine has a very good structure that could allow &lt;br /&gt;
more powerfull names to be generated. &lt;br /&gt;
Understanding how it works should be quite easy, and a few usefull improvements could be added.&lt;br /&gt;
&lt;br /&gt;
* Currently villages can use lake names and river names, this should be extended to other features like bridges, swamps, mountains etc...&lt;br /&gt;
* It would be nice to have a separate list of &amp;quot;first sylabus&amp;quot; and &amp;quot;last sylabus&amp;quot; for naming. That's not really needed in english, but some translations could use it&lt;br /&gt;
* Again, it is common to have villages with more than one &amp;quot;random&amp;quot; word in them. having a $name2 variable would be nice&lt;br /&gt;
&lt;br /&gt;
ACardboardRobot 2/2/07&lt;br /&gt;
&lt;br /&gt;
=== Debug Mode ===&lt;br /&gt;
* New debug command functionality (setting additional status.variables, possibly terrain)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Add minimal regexp to friend list ===&lt;br /&gt;
&lt;br /&gt;
Lots of people use multiple nicks, usually postfixed with a number... it would be nice to have minimal regexp support in friend list to easily get who's there...&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[NotSoEasyCoding]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Future]]&lt;/div&gt;</summary>
		<author><name>Segfault</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=25737</id>
		<title>DirectActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=25737"/>
		<updated>2008-05-19T20:57:20Z</updated>

		<summary type="html">&lt;p&gt;Segfault: /* Direct actions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== Direct actions ==&lt;br /&gt;
&lt;br /&gt;
Direct actions are actions that have a direct effect on gameplay.&lt;br /&gt;
&lt;br /&gt;
The following tags are actions:&lt;br /&gt;
* '''[endlevel]''': ends the scenario.&lt;br /&gt;
** '''result''': before the scenario is over, all events with ''name=result'' are triggered.  The message ''result_message'' with the heading ''result_heading'' (see [[LanguageWML]]) are displayed.  If ''result=victory'', the player progresses to the next level; if ''result=defeat'', the game returns to the main menu.  These last two are rarely used: ''result=continue'' behaves identically to ''result=victory'' except the player's gold is not reduced to 80%, and it does not bring up a &amp;quot;Victory&amp;quot; message or the gold changing message (since it doesn't change); ''result=continue_no_save'' works similarly, except the player is not asked whether to save the game, and is taken directly to the next scenario without any messages.  Unless ''result=defeat'', the following keys can also be used:&lt;br /&gt;
** '''bonus''': whether the player should get bonus gold (maximum possible gold that could have been earned by waiting the level out). The default is bonus=yes.&lt;br /&gt;
** '''next_scenario''': (default specified in '''[scenario]''' tag) the ID of the next scenario that should be played.  All units that side 1 controls at this point become available for recall in ''next_scenario''.&lt;br /&gt;
** When the result is &amp;quot;victory&amp;quot; the following keys can be used:&lt;br /&gt;
*** '''carryover_percentage''': by default 80% of the gold is carried over to the next scenario, with this key the amount can be changed.&lt;br /&gt;
*** '''carryover_add''': if true the gold will be added to the starting gold the next scenario, if false the next scenario will start with the amount of the current scenario (after taxes) or the minimum in the next scenario. Default is false.&lt;br /&gt;
* '''[unit]''': places a unit on the map.  For syntax see [[SingleUnitWML]].{{Short Note:Predefined Macro|GENERIC_UNIT}}&lt;br /&gt;
* '''[recall]''': recalls a unit.  The unit is recalled free of charge, and is placed near the leader.&lt;br /&gt;
** [[StandardUnitFilter]]: the first matching unit will be recalled.  If no units match this tag is ignored.&lt;br /&gt;
** '''x,y''': the unit is placed here instead of next to the leader.&lt;br /&gt;
** '''show''': if not &amp;quot;no&amp;quot;, display the unit being recalled.&lt;br /&gt;
* '''[teleport]''': teleports a unit on map. {{Short Note:Predefined Macro|TELEPORT_UNIT}}&lt;br /&gt;
** '''[filter]''': [[StandardUnitFilter]] all units matching the filter will be teleported.&lt;br /&gt;
** '''x,y''': the position to teleport to.&lt;br /&gt;
* '''[terrain_mask]''': changes the terrain on the map.  See [[TerrainMaskWML]].&lt;br /&gt;
* '''[terrain]''': changes the terrain on the map.&lt;br /&gt;
** '''terrain''': the character of the terrain to use.  See [[TerrainCodesWML]] to see what letter a type of terrain uses.&lt;br /&gt;
** '''x,y''': the position (or range of positions) to change.&lt;br /&gt;
* '''[gold]''': give one side gold.&lt;br /&gt;
** '''amount''': the amount of gold to give.&lt;br /&gt;
** '''side''': (default=1) the number of the side to give the gold to.&lt;br /&gt;
* '''[unstore_unit]''': creates a unit from a game variable, and activates it on the playing field.  This must be a specific variable describing a unit, and may not be an array -- to unstore an entire array, iterate over it.  The variable is not cleared.  See also '''[store_unit]''', '''[while]''' and [clear_variable] in [[InternalActionsWML]]. Note units with a negative amount of hitpoints will be unstored with 1 hitpoint.&lt;br /&gt;
** '''variable''': the name of the variable.&lt;br /&gt;
** '''find_vacant''': whether the unit should be placed on the nearest vacant tile to its specified location.  If this is set to 'no'(default), then any unit on the same tile as the unit being unstored will be destroyed.&lt;br /&gt;
** '''text''': (translatable) floating text to display above the unit, such as a damage amount&lt;br /&gt;
** '''red''', '''green''', '''blue''': (default=0,0,0) the color to display the text in. Values vary from 0-255. You may find it convenient to use the {COLOR_HARM} or {COLOR_HEAL} macro instead. (Use {COLOR_HARM} or {COLOR_HEAL} instead of the whole red,green,blue= line.)&lt;br /&gt;
** '''advance''': if the XP has been modified then there will be tried to advance the unit, default true. &lt;br /&gt;
* '''[allow_recruit]''': allows a side to recruit units it couldn't previously recruit.&lt;br /&gt;
** '''type''': the types of units that the side can now recruit.&lt;br /&gt;
** '''side''': (default=1) the number of the side that is being allowed to recruit the units.&lt;br /&gt;
* '''[disallow_recruit]''': prevents a side from recruiting units it could previously recruit.&lt;br /&gt;
** '''type''': the types of units that the side can no longer recruit.&lt;br /&gt;
** '''side''': (default=1) the number of the side that may no longer recruit the units.&lt;br /&gt;
* '''[set_recruit]''': sets the units a side can recruit.&lt;br /&gt;
** '''recruit''': the types of units that the side can now recruit.&lt;br /&gt;
** '''side''': (default=1) the number of the side that is having its recruitment set.&lt;br /&gt;
* '''[modify_side]''': modifies some details of a given side in the middle of a scenario.  '''The following listed properties are the only properties that [modify_side] can affect!'&lt;br /&gt;
** '''side''': (default=1) the number of the side that is to be changed.&lt;br /&gt;
** '''income''': the income given at the begining of each turn.&lt;br /&gt;
** '''team_name''': the team in which the side plays the scenario.&lt;br /&gt;
** '''user_team_name''': a translatable string representing the team's description. This has no effect on alliances. Defaults to ''team_name''.&lt;br /&gt;
** '''gold''': the amount of gold the side owns.&lt;br /&gt;
** '''village_gold''': the income setting per village for the side.&lt;br /&gt;
** '''controller''': the identifier string of the side's controller. Uses the same syntax of the ''controller'' key in the [[SideWML|[side]]] tag.&lt;br /&gt;
** '''fog''': a boolean string (yes/no) describing the status of Fog for the side.&lt;br /&gt;
** '''shroud''': a boolean string describing the status of Shroud for the side.&lt;br /&gt;
** {{DevFeature}} '''[ai]''': replaces a side's AI parameters with the new specified ones. Uses the same syntax described in [[AiWML]].&lt;br /&gt;
* '''[modify_turns]''': modifies the turn limit in the middle of a scenario.&lt;br /&gt;
** '''value''': the new turn limit.&lt;br /&gt;
** '''add''': if used instead of ''value'', specifies the number of turns to add to the current limit (can be negative).&lt;br /&gt;
* '''[capture_village]''': changes the ownership of a village.&lt;br /&gt;
** '''side''': the side that takes control of the village. If not given, the village will become neutral.&lt;br /&gt;
** '''x, y''': the location of the village.&lt;br /&gt;
* '''[kill]''': Removes all units (including units in a recall list) that match the filter from the game.&lt;br /&gt;
** [[StandardUnitFilter]]: selection criterion&lt;br /&gt;
** '''animate''': if 'yes', displays the unit dying (fading away).&lt;br /&gt;
** '''fire_event''': if 'yes', triggers any appropriate 'die' events (See [[EventWML]]). Note that any 'die' events triggered by this are executed immediately, interrupting the current event and thus causing the x1, y1, x2, and y2 variables to be reset for that 'die' event, which in turn causes those variables to be invalid for the remainder of this event.&lt;br /&gt;
* '''[unstone]''': Unstones all units that match the filter.&lt;br /&gt;
** '''[filter]''': [[StandardUnitFilter]] all units matching the filter will be unstoned.  If no unit matches the filter, then nothing happens (probably).  If absent, all units on the map are unstoned.&lt;br /&gt;
* '''[object]''': gives some unit an object and removes all items on the tile the unit is on.&lt;br /&gt;
** '''id''': when the object is picked up, a flag is set for ''id''.  The object cannot be picked up if a flag for ''id'' has been set.  This means that any object with an id can only be used once, even if first_time_only=no is set for the event. This restriction is per level. In a campaign objects with the same id can be assigned once per level.&lt;br /&gt;
** '''[effect]''': one or more effect elements may be listed.  See [[EffectWML]] for a description of [effect].&lt;br /&gt;
** '''duration''': if 'level', effects only last until the end of the level (note : 'level' is the scenario, so this doesn't mean it last until the unit levels-up).&lt;br /&gt;
** '''[filter]''': [[StandardUnitFilter]] the first unit found that matches the filter will be given the object.  If no unit matches the filter, then a message is displayed and the object is not removed.&lt;br /&gt;
** '''[then]''': a subtag that lets you execute actions if the filter conditions are met.  The most common action that should be inside here is a '''[removeitem]''' tag, but you could probably put any tags that otherwise work in a [then] tag.&lt;br /&gt;
** '''silent''': whether or not messages should be suppressed. Default is &amp;quot;no&amp;quot;.&lt;br /&gt;
** '''image''': the displayed image of the object.&lt;br /&gt;
** '''name''': (translatable) displayed as a caption of the image.&lt;br /&gt;
&lt;br /&gt;
** '''user_description''': {{DevFeature}} (translatable) displayed as a message of the image. In 1.4 and older versions this is just '''description'''; that will still be expected for compatibility.&lt;br /&gt;
** '''cannot_use_message''': (translatable) displayed instead of '''description''' if no unit passes the filter test.&lt;br /&gt;
** If you do not supply a filter, the object action will be applied to a unit at the location of the moveto event. Currently this isn't recommended as it is not clear that this will continue working this way. Instead it is better to explicitly include a location filter.&lt;br /&gt;
** The object action does not act on units in the recall list. There is a feature request in to allow this, but it is not clear whether or not it will be accepted.&lt;br /&gt;
* '''[remove_shroud]''': removes some shroud from the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
** '''side''': (default=1) the side for which to remove shroud.&lt;br /&gt;
** [[StandardLocationFilter]]: the range of tiles for which shroud should be removed.&lt;br /&gt;
* '''[place_shroud]''': places some shroud on the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
** '''side''': (default=1) the side for which to place shroud.&lt;br /&gt;
** [[StandardLocationFilter]]: the range of tiles on which shroud should be placed.&lt;br /&gt;
* '''[allow_undo]''': allows the player to undo the event that this tag is inside.  Has an effect only inside moveto events.  If the move is undone, only the position of the unit will be restored; any altered variables or changes to the game will remain changed after the move is undone.  It is up to the scenario designer to avoid abusing this command.&lt;br /&gt;
** Technically, if '''[allow_undo]''' is inside an '''[event]''' with ''first_time_only=yes'' (the default setting), and the user undoes the event, then the state of the game has changed in this way: the event will not fire a second time, even though the user undid the move the first time.&lt;br /&gt;
* {{DevFeature}} '''[heal_unit]''': heal a unit. The variable '''$heal_amount''' will be set to the exact number of points healed (i.e can be lesser than the parameter '''amount''' if the unit is fully healed).&lt;br /&gt;
**  '''[filter]''': [[StandardUnitFilter]] the first unit matching the filter will be healed. &lt;br /&gt;
**  '''[secondary_unit_filter]''': [[StandardUnitFilter]] all the units matching the filter ''and'' having the ''heals'' ability will have their animation played (if ''animate'' is set to true).&lt;br /&gt;
**  '''amount''': the maximum points the unit will be healed.&lt;br /&gt;
**  '''animate''': a boolean which indicate if the healing animations must be played.&lt;br /&gt;
&lt;br /&gt;
== Useful Macros ==&lt;br /&gt;
There are some predefined macros that you find useful for direct actions. You can find a complete list along with a detailed explanation of how they work [http://www.wesnoth.org/macro-reference.xhtml here].&lt;br /&gt;
* '''{MOVE_UNIT}''': Moves a unit to another location in the map and the player sees the movement (unlike [teleport])&lt;br /&gt;
* '''{FULL_HEAL}''': Brings a unit to full HP&lt;br /&gt;
* '''{LOYAL_UNIT}''': Create a loyal unit&lt;br /&gt;
* '''{MODIFY_TERRAIN_MASK}''': Modify an area of terrain&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[InternalActionsWML]]&lt;br /&gt;
* [[InterfaceActionsWML]]&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Segfault</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=25736</id>
		<title>DirectActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=25736"/>
		<updated>2008-05-19T20:56:23Z</updated>

		<summary type="html">&lt;p&gt;Segfault: /* Direct actions */  adding heal_unit action&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== Direct actions ==&lt;br /&gt;
&lt;br /&gt;
Direct actions are actions that have a direct effect on gameplay.&lt;br /&gt;
&lt;br /&gt;
The following tags are actions:&lt;br /&gt;
* '''[endlevel]''': ends the scenario.&lt;br /&gt;
** '''result''': before the scenario is over, all events with ''name=result'' are triggered.  The message ''result_message'' with the heading ''result_heading'' (see [[LanguageWML]]) are displayed.  If ''result=victory'', the player progresses to the next level; if ''result=defeat'', the game returns to the main menu.  These last two are rarely used: ''result=continue'' behaves identically to ''result=victory'' except the player's gold is not reduced to 80%, and it does not bring up a &amp;quot;Victory&amp;quot; message or the gold changing message (since it doesn't change); ''result=continue_no_save'' works similarly, except the player is not asked whether to save the game, and is taken directly to the next scenario without any messages.  Unless ''result=defeat'', the following keys can also be used:&lt;br /&gt;
** '''bonus''': whether the player should get bonus gold (maximum possible gold that could have been earned by waiting the level out). The default is bonus=yes.&lt;br /&gt;
** '''next_scenario''': (default specified in '''[scenario]''' tag) the ID of the next scenario that should be played.  All units that side 1 controls at this point become available for recall in ''next_scenario''.&lt;br /&gt;
** When the result is &amp;quot;victory&amp;quot; the following keys can be used:&lt;br /&gt;
*** '''carryover_percentage''': by default 80% of the gold is carried over to the next scenario, with this key the amount can be changed.&lt;br /&gt;
*** '''carryover_add''': if true the gold will be added to the starting gold the next scenario, if false the next scenario will start with the amount of the current scenario (after taxes) or the minimum in the next scenario. Default is false.&lt;br /&gt;
* '''[unit]''': places a unit on the map.  For syntax see [[SingleUnitWML]].{{Short Note:Predefined Macro|GENERIC_UNIT}}&lt;br /&gt;
* '''[recall]''': recalls a unit.  The unit is recalled free of charge, and is placed near the leader.&lt;br /&gt;
** [[StandardUnitFilter]]: the first matching unit will be recalled.  If no units match this tag is ignored.&lt;br /&gt;
** '''x,y''': the unit is placed here instead of next to the leader.&lt;br /&gt;
** '''show''': if not &amp;quot;no&amp;quot;, display the unit being recalled.&lt;br /&gt;
* '''[teleport]''': teleports a unit on map. {{Short Note:Predefined Macro|TELEPORT_UNIT}}&lt;br /&gt;
** '''[filter]''': [[StandardUnitFilter]] all units matching the filter will be teleported.&lt;br /&gt;
** '''x,y''': the position to teleport to.&lt;br /&gt;
* '''[terrain_mask]''': changes the terrain on the map.  See [[TerrainMaskWML]].&lt;br /&gt;
* '''[terrain]''': changes the terrain on the map.&lt;br /&gt;
** '''terrain''': the character of the terrain to use.  See [[TerrainCodesWML]] to see what letter a type of terrain uses.&lt;br /&gt;
** '''x,y''': the position (or range of positions) to change.&lt;br /&gt;
* '''[gold]''': give one side gold.&lt;br /&gt;
** '''amount''': the amount of gold to give.&lt;br /&gt;
** '''side''': (default=1) the number of the side to give the gold to.&lt;br /&gt;
* '''[unstore_unit]''': creates a unit from a game variable, and activates it on the playing field.  This must be a specific variable describing a unit, and may not be an array -- to unstore an entire array, iterate over it.  The variable is not cleared.  See also '''[store_unit]''', '''[while]''' and [clear_variable] in [[InternalActionsWML]]. Note units with a negative amount of hitpoints will be unstored with 1 hitpoint.&lt;br /&gt;
** '''variable''': the name of the variable.&lt;br /&gt;
** '''find_vacant''': whether the unit should be placed on the nearest vacant tile to its specified location.  If this is set to 'no'(default), then any unit on the same tile as the unit being unstored will be destroyed.&lt;br /&gt;
** '''text''': (translatable) floating text to display above the unit, such as a damage amount&lt;br /&gt;
** '''red''', '''green''', '''blue''': (default=0,0,0) the color to display the text in. Values vary from 0-255. You may find it convenient to use the {COLOR_HARM} or {COLOR_HEAL} macro instead. (Use {COLOR_HARM} or {COLOR_HEAL} instead of the whole red,green,blue= line.)&lt;br /&gt;
** '''advance''': if the XP has been modified then there will be tried to advance the unit, default true. &lt;br /&gt;
* '''[allow_recruit]''': allows a side to recruit units it couldn't previously recruit.&lt;br /&gt;
** '''type''': the types of units that the side can now recruit.&lt;br /&gt;
** '''side''': (default=1) the number of the side that is being allowed to recruit the units.&lt;br /&gt;
* '''[disallow_recruit]''': prevents a side from recruiting units it could previously recruit.&lt;br /&gt;
** '''type''': the types of units that the side can no longer recruit.&lt;br /&gt;
** '''side''': (default=1) the number of the side that may no longer recruit the units.&lt;br /&gt;
* '''[set_recruit]''': sets the units a side can recruit.&lt;br /&gt;
** '''recruit''': the types of units that the side can now recruit.&lt;br /&gt;
** '''side''': (default=1) the number of the side that is having its recruitment set.&lt;br /&gt;
* '''[modify_side]''': modifies some details of a given side in the middle of a scenario.  '''The following listed properties are the only properties that [modify_side] can affect!'&lt;br /&gt;
** '''side''': (default=1) the number of the side that is to be changed.&lt;br /&gt;
** '''income''': the income given at the begining of each turn.&lt;br /&gt;
** '''team_name''': the team in which the side plays the scenario.&lt;br /&gt;
** '''user_team_name''': a translatable string representing the team's description. This has no effect on alliances. Defaults to ''team_name''.&lt;br /&gt;
** '''gold''': the amount of gold the side owns.&lt;br /&gt;
** '''village_gold''': the income setting per village for the side.&lt;br /&gt;
** '''controller''': the identifier string of the side's controller. Uses the same syntax of the ''controller'' key in the [[SideWML|[side]]] tag.&lt;br /&gt;
** '''fog''': a boolean string (yes/no) describing the status of Fog for the side.&lt;br /&gt;
** '''shroud''': a boolean string describing the status of Shroud for the side.&lt;br /&gt;
** {{DevFeature}} '''[ai]''': replaces a side's AI parameters with the new specified ones. Uses the same syntax described in [[AiWML]].&lt;br /&gt;
* '''[modify_turns]''': modifies the turn limit in the middle of a scenario.&lt;br /&gt;
** '''value''': the new turn limit.&lt;br /&gt;
** '''add''': if used instead of ''value'', specifies the number of turns to add to the current limit (can be negative).&lt;br /&gt;
* '''[capture_village]''': changes the ownership of a village.&lt;br /&gt;
** '''side''': the side that takes control of the village. If not given, the village will become neutral.&lt;br /&gt;
** '''x, y''': the location of the village.&lt;br /&gt;
* '''[kill]''': Removes all units (including units in a recall list) that match the filter from the game.&lt;br /&gt;
** [[StandardUnitFilter]]: selection criterion&lt;br /&gt;
** '''animate''': if 'yes', displays the unit dying (fading away).&lt;br /&gt;
** '''fire_event''': if 'yes', triggers any appropriate 'die' events (See [[EventWML]]). Note that any 'die' events triggered by this are executed immediately, interrupting the current event and thus causing the x1, y1, x2, and y2 variables to be reset for that 'die' event, which in turn causes those variables to be invalid for the remainder of this event.&lt;br /&gt;
* '''[unstone]''': Unstones all units that match the filter.&lt;br /&gt;
** '''[filter]''': [[StandardUnitFilter]] all units matching the filter will be unstoned.  If no unit matches the filter, then nothing happens (probably).  If absent, all units on the map are unstoned.&lt;br /&gt;
* '''[object]''': gives some unit an object and removes all items on the tile the unit is on.&lt;br /&gt;
** '''id''': when the object is picked up, a flag is set for ''id''.  The object cannot be picked up if a flag for ''id'' has been set.  This means that any object with an id can only be used once, even if first_time_only=no is set for the event. This restriction is per level. In a campaign objects with the same id can be assigned once per level.&lt;br /&gt;
** '''[effect]''': one or more effect elements may be listed.  See [[EffectWML]] for a description of [effect].&lt;br /&gt;
** '''duration''': if 'level', effects only last until the end of the level (note : 'level' is the scenario, so this doesn't mean it last until the unit levels-up).&lt;br /&gt;
** '''[filter]''': [[StandardUnitFilter]] the first unit found that matches the filter will be given the object.  If no unit matches the filter, then a message is displayed and the object is not removed.&lt;br /&gt;
** '''[then]''': a subtag that lets you execute actions if the filter conditions are met.  The most common action that should be inside here is a '''[removeitem]''' tag, but you could probably put any tags that otherwise work in a [then] tag.&lt;br /&gt;
** '''silent''': whether or not messages should be suppressed. Default is &amp;quot;no&amp;quot;.&lt;br /&gt;
** '''image''': the displayed image of the object.&lt;br /&gt;
** '''name''': (translatable) displayed as a caption of the image.&lt;br /&gt;
&lt;br /&gt;
** '''user_description''': {{DevFeature}} (translatable) displayed as a message of the image. In 1.4 and older versions this is just '''description'''; that will still be expected for compatibility.&lt;br /&gt;
** '''cannot_use_message''': (translatable) displayed instead of '''description''' if no unit passes the filter test.&lt;br /&gt;
** If you do not supply a filter, the object action will be applied to a unit at the location of the moveto event. Currently this isn't recommended as it is not clear that this will continue working this way. Instead it is better to explicitly include a location filter.&lt;br /&gt;
** The object action does not act on units in the recall list. There is a feature request in to allow this, but it is not clear whether or not it will be accepted.&lt;br /&gt;
* '''[remove_shroud]''': removes some shroud from the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
** '''side''': (default=1) the side for which to remove shroud.&lt;br /&gt;
** [[StandardLocationFilter]]: the range of tiles for which shroud should be removed.&lt;br /&gt;
* '''[place_shroud]''': places some shroud on the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
** '''side''': (default=1) the side for which to place shroud.&lt;br /&gt;
** [[StandardLocationFilter]]: the range of tiles on which shroud should be placed.&lt;br /&gt;
* '''[allow_undo]''': allows the player to undo the event that this tag is inside.  Has an effect only inside moveto events.  If the move is undone, only the position of the unit will be restored; any altered variables or changes to the game will remain changed after the move is undone.  It is up to the scenario designer to avoid abusing this command.&lt;br /&gt;
** Technically, if '''[allow_undo]''' is inside an '''[event]''' with ''first_time_only=yes'' (the default setting), and the user undoes the event, then the state of the game has changed in this way: the event will not fire a second time, even though the user undid the move the first time.&lt;br /&gt;
* {{DevFeature}} '''[heal_unit]''': heal a unit. The variable '''$heal_amount''' will be set to the exact number of points healed (i.e can be lesser than the parameter '''amount''' if the unit is fully healed).&lt;br /&gt;
**  '''[filter]''': [[StandardUnitFilter]] the first unit matching the filter will be healed. &lt;br /&gt;
**  '''[secondary_unit_filter]''': [[StandardUnitFilter]] all the units matching the filter ''and'' having the ''heals'' ability will have their animation played (if ''animate'' is set to true).&lt;br /&gt;
**  '''amount''': the maximum points the units will be healed.&lt;br /&gt;
**  '''animate''': a boolean which indicate if the healing animations must be played.&lt;br /&gt;
&lt;br /&gt;
== Useful Macros ==&lt;br /&gt;
There are some predefined macros that you find useful for direct actions. You can find a complete list along with a detailed explanation of how they work [http://www.wesnoth.org/macro-reference.xhtml here].&lt;br /&gt;
* '''{MOVE_UNIT}''': Moves a unit to another location in the map and the player sees the movement (unlike [teleport])&lt;br /&gt;
* '''{FULL_HEAL}''': Brings a unit to full HP&lt;br /&gt;
* '''{LOYAL_UNIT}''': Create a loyal unit&lt;br /&gt;
* '''{MODIFY_TERRAIN_MASK}''': Modify an area of terrain&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[InternalActionsWML]]&lt;br /&gt;
* [[InterfaceActionsWML]]&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Segfault</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=25689</id>
		<title>DirectActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=DirectActionsWML&amp;diff=25689"/>
		<updated>2008-05-18T14:48:34Z</updated>

		<summary type="html">&lt;p&gt;Segfault: /* Direct actions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== Direct actions ==&lt;br /&gt;
&lt;br /&gt;
Direct actions are actions that have a direct effect on gameplay.&lt;br /&gt;
&lt;br /&gt;
The following tags are actions:&lt;br /&gt;
* '''[endlevel]''': ends the scenario.&lt;br /&gt;
** '''result''': before the scenario is over, all events with ''name=result'' are triggered.  The message ''result_message'' with the heading ''result_heading'' (see [[LanguageWML]]) are displayed.  If ''result=victory'', the player progresses to the next level; if ''result=defeat'', the game returns to the main menu.  These last two are rarely used: ''result=continue'' behaves identically to ''result=victory'' except the player's gold is not reduced to 80%, and it does not bring up a &amp;quot;Victory&amp;quot; message or the gold changing message (since it doesn't change); ''result=continue_no_save'' works similarly, except the player is not asked whether to save the game, and is taken directly to the next scenario without any messages.  Unless ''result=defeat'', the following keys can also be used:&lt;br /&gt;
** '''bonus''': whether the player should get bonus gold (maximum possible gold that could have been earned by waiting the level out). The default is bonus=yes.&lt;br /&gt;
** '''next_scenario''': (default specified in '''[scenario]''' tag) the ID of the next scenario that should be played.  All units that side 1 controls at this point become available for recall in ''next_scenario''.&lt;br /&gt;
** When the result is &amp;quot;victory&amp;quot; the following keys can be used:&lt;br /&gt;
*** '''carryover_percentage''': by default 80% of the gold is carried over to the next scenario, with this key the amount can be changed.&lt;br /&gt;
*** '''carryover_add''': if true the gold will be added to the starting gold the next scenario, if false the next scenario will start with the amount of the current scenario (after taxes) or the minimum in the next scenario. Default is false.&lt;br /&gt;
* '''[unit]''': places a unit on the map.  For syntax see [[SingleUnitWML]].{{Short Note:Predefined Macro|GENERIC_UNIT}}&lt;br /&gt;
* '''[recall]''': recalls a unit.  The unit is recalled free of charge, and is placed near the leader.&lt;br /&gt;
** [[StandardUnitFilter]]: the first matching unit will be recalled.  If no units match this tag is ignored.&lt;br /&gt;
** '''x,y''': the unit is placed here instead of next to the leader.&lt;br /&gt;
** '''show''': if not &amp;quot;no&amp;quot;, display the unit being recalled.&lt;br /&gt;
* '''[teleport]''': teleports a unit on map. {{Short Note:Predefined Macro|TELEPORT_UNIT}}&lt;br /&gt;
** '''[filter]''': [[StandardUnitFilter]] all units matching the filter will be teleported.&lt;br /&gt;
** '''x,y''': the position to teleport to.&lt;br /&gt;
* '''[terrain_mask]''': changes the terrain on the map.  See [[TerrainMaskWML]].&lt;br /&gt;
* '''[terrain]''': changes the terrain on the map.&lt;br /&gt;
** '''terrain''': the character of the terrain to use.  See [[TerrainCodesWML]] to see what letter a type of terrain uses.&lt;br /&gt;
** '''x,y''': the position (or range of positions) to change.&lt;br /&gt;
* '''[gold]''': give one side gold.&lt;br /&gt;
** '''amount''': the amount of gold to give.&lt;br /&gt;
** '''side''': (default=1) the number of the side to give the gold to.&lt;br /&gt;
* '''[unstore_unit]''': creates a unit from a game variable, and activates it on the playing field.  This must be a specific variable describing a unit, and may not be an array -- to unstore an entire array, iterate over it.  The variable is not cleared.  See also '''[store_unit]''', '''[while]''' and [clear_variable] in [[InternalActionsWML]]. Note units with a negative amount of hitpoints will be unstored with 1 hitpoint.&lt;br /&gt;
** '''variable''': the name of the variable.&lt;br /&gt;
** '''find_vacant''': whether the unit should be placed on the nearest vacant tile to its specified location.  If this is set to 'no'(default), then any unit on the same tile as the unit being unstored will be destroyed.&lt;br /&gt;
** '''text''': (translatable) floating text to display above the unit, such as a damage amount&lt;br /&gt;
** '''red''', '''green''', '''blue''': (default=0,0,0) the color to display the text in. Values vary from 0-255. You may find it convenient to use the {COLOR_HARM} or {COLOR_HEAL} macro instead. (Use {COLOR_HARM} or {COLOR_HEAL} instead of the whole red,green,blue= line.)&lt;br /&gt;
** '''advance''': if the XP has been modified then there will be tried to advance the unit, default true. &lt;br /&gt;
* '''[allow_recruit]''': allows a side to recruit units it couldn't previously recruit.&lt;br /&gt;
** '''type''': the types of units that the side can now recruit.&lt;br /&gt;
** '''side''': (default=1) the number of the side that is being allowed to recruit the units.&lt;br /&gt;
* '''[disallow_recruit]''': prevents a side from recruiting units it could previously recruit.&lt;br /&gt;
** '''type''': the types of units that the side can no longer recruit.&lt;br /&gt;
** '''side''': (default=1) the number of the side that may no longer recruit the units.&lt;br /&gt;
* '''[set_recruit]''': sets the units a side can recruit.&lt;br /&gt;
** '''recruit''': the types of units that the side can now recruit.&lt;br /&gt;
** '''side''': (default=1) the number of the side that is having its recruitment set.&lt;br /&gt;
* '''[modify_side]''': modifies some details of a given side in the middle of a scenario.  '''The following listed properties are the only properties that [modify_side] can affect!'&lt;br /&gt;
** '''side''': (default=1) the number of the side that is to be changed.&lt;br /&gt;
** '''income''': the income given at the begining of each turn.&lt;br /&gt;
** '''team_name''': the team in which the side plays the scenario.&lt;br /&gt;
** '''user_team_name''': a translatable string representing the team's description. This has no effect on alliances. Defaults to ''team_name''.&lt;br /&gt;
** '''gold''': the amount of gold the side owns.&lt;br /&gt;
** '''village_gold''': the income setting per village for the side.&lt;br /&gt;
** '''controller''': the identifier string of the side's controller. Uses the same syntax of the ''controller'' key in the [[SideWML|[side]]] tag.&lt;br /&gt;
** '''fog''': a boolean string (yes/no) describing the status of Fog for the side.&lt;br /&gt;
** '''shroud''': a boolean string describing the status of Shroud for the side.&lt;br /&gt;
** {{DevFeature}} '''[ai]''': replaces a side's AI parameters with the new specified ones. Uses the same syntax described in [[AiWML]].&lt;br /&gt;
* '''[modify_turns]''': modifies the turn limit in the middle of a scenario.&lt;br /&gt;
** '''value''': the new turn limit.&lt;br /&gt;
** '''add''': if used instead of ''value'', specifies the number of turns to add to the current limit (can be negative).&lt;br /&gt;
* '''[capture_village]''': changes the ownership of a village.&lt;br /&gt;
** '''side''': the side that takes control of the village. If not given, the village will become neutral.&lt;br /&gt;
** '''x, y''': the location of the village.&lt;br /&gt;
* '''[kill]''': Removes all units (including units in a recall list) that match the filter from the game.&lt;br /&gt;
** [[StandardUnitFilter]]: selection criterion&lt;br /&gt;
** '''animate''': if 'yes', displays the unit dying (fading away).&lt;br /&gt;
** '''fire_event''': if 'yes', triggers any appropriate 'die' events (See [[EventWML]]). Note that any 'die' events triggered by this are executed immediately, interrupting the current event and thus causing the x1, y1, x2, and y2 variables to be reset for that 'die' event, which in turn causes those variables to be invalid for the remainder of this event.&lt;br /&gt;
* '''[unstone]''': Unstones all units that match the filter.&lt;br /&gt;
** '''[filter]''': [[StandardUnitFilter]] all units matching the filter will be unstoned.  If no unit matches the filter, then nothing happens (probably).  If absent, all units on the map are unstoned.&lt;br /&gt;
* '''[object]''': gives some unit an object and removes all items on the tile the unit is on.&lt;br /&gt;
** '''id''': when the object is picked up, a flag is set for ''id''.  The object cannot be picked up if a flag for ''id'' has been set.  This means that any object with an id can only be used once, even if first_time_only=no is set for the event. This restriction is per level. In a campaign objects with the same id can be assigned once per level.&lt;br /&gt;
** '''[effect]''': one or more effect elements may be listed.  See [[EffectWML]] for a description of [effect].&lt;br /&gt;
** '''duration''': if 'level', effects only last until the end of the level (note : 'level' is the scenario, so this doesn't mean it last until the unit levels-up).&lt;br /&gt;
** '''[filter]''': [[StandardUnitFilter]] the first unit found that matches the filter will be given the object.  If no unit matches the filter, then a message is displayed and the object is not removed.&lt;br /&gt;
** '''[then]''': a subtag that lets you execute actions if the filter conditions are met.  The most common action that should be inside here is a '''[removeitem]''' tag, but you could probably put any tags that otherwise work in a [then] tag.&lt;br /&gt;
** '''silent''': whether or not messages should be suppressed. Default is &amp;quot;no&amp;quot;.&lt;br /&gt;
** '''image''': the displayed image of the object.&lt;br /&gt;
** '''name''': (translatable) displayed as a caption of the image.&lt;br /&gt;
&lt;br /&gt;
** '''user_description''': {{DevFeature}} (translatable) displayed as a message of the image. In 1.4 and older versions this is just '''description'''; that will still be expected for compatibility.&lt;br /&gt;
** '''cannot_use_message''': (translatable) displayed instead of '''description''' if no unit passes the filter test.&lt;br /&gt;
** If you do not supply a filter, the object action will be applied to a unit at the location of the moveto event. Currently this isn't recommended as it is not clear that this will continue working this way. Instead it is better to explicitly include a location filter.&lt;br /&gt;
** The object action does not act on units in the recall list. There is a feature request in to allow this, but it is not clear whether or not it will be accepted.&lt;br /&gt;
* '''[remove_shroud]''': removes some shroud from the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
** '''side''': (default=1) the side for which to remove shroud.&lt;br /&gt;
** [[StandardLocationFilter]]: the range of tiles for which shroud should be removed.&lt;br /&gt;
* '''[place_shroud]''': places some shroud on the map for a certain side (only relevant for sides that have shroud=yes).&lt;br /&gt;
** '''side''': (default=1) the side for which to place shroud.&lt;br /&gt;
** [[StandardLocationFilter]]: the range of tiles on which shroud should be placed.&lt;br /&gt;
* '''[allow_undo]''': allows the player to undo the event that this tag is inside.  Has an effect only inside moveto events.  If the move is undone, only the position of the unit will be restored; any altered variables or changes to the game will remain changed after the move is undone.  It is up to the scenario designer to avoid abusing this command.&lt;br /&gt;
** Technically, if '''[allow_undo]''' is inside an '''[event]''' with ''first_time_only=yes'' (the default setting), and the user undoes the event, then the state of the game has changed in this way: the event will not fire a second time, even though the user undid the move the first time.&lt;br /&gt;
* {{DevFeature}} '''[heal_unit]''': heal a unit. The variable '''$heal_amount''' will be set to the exact number of points healed (i.e can be lesser than the parameter '''amount''' if the unit is fully healed).&lt;br /&gt;
**  [filter]: StandardUnitFilter the first unit matching the filter will be healed. &lt;br /&gt;
**  amount: the maximum points the units will be healed.&lt;br /&gt;
&lt;br /&gt;
== Useful Macros ==&lt;br /&gt;
There are some predefined macros that you find useful for direct actions. You can find a complete list along with a detailed explanation of how they work [http://www.wesnoth.org/macro-reference.xhtml here].&lt;br /&gt;
* '''{MOVE_UNIT}''': Moves a unit to another location in the map and the player sees the movement (unlike [teleport])&lt;br /&gt;
* '''{FULL_HEAL}''': Brings a unit to full HP&lt;br /&gt;
* '''{LOYAL_UNIT}''': Create a loyal unit&lt;br /&gt;
* '''{MODIFY_TERRAIN_MASK}''': Modify an area of terrain&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[InternalActionsWML]]&lt;br /&gt;
* [[InterfaceActionsWML]]&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Segfault</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=EasyCoding&amp;diff=25121</id>
		<title>EasyCoding</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=EasyCoding&amp;diff=25121"/>
		<updated>2008-04-06T12:41:16Z</updated>

		<summary type="html">&lt;p&gt;Segfault: Undo revision 25120 by Segfault (Talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Foreword ==&lt;br /&gt;
This page is here to document easy to do coding tasks. It is not here to double the feature request database, and should only be filled by people that know the code well enough to judge the difficulty of a given task. &lt;br /&gt;
&lt;br /&gt;
If you are such a person, you should feel free to edit this page.&lt;br /&gt;
&lt;br /&gt;
If you're not, you should post a feature request and discuss your idea on the forum or IRC. A coder with better knowledge of the code might give you the green light to add your feature here.&lt;br /&gt;
&lt;br /&gt;
Anybody should feel free to add &amp;quot;clues&amp;quot; to any tasks, that is entry points, traps to avoid, person to contact to discuss and so on.&lt;br /&gt;
&lt;br /&gt;
If you plan to work on a feature, write your name at the bottom of the feature, with the date. Note that if you are too long at working on a feature I'll &amp;quot;free&amp;quot; it back (that is if you're not working on it. If you have problems implementing it, just tell us....)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:Boucman|Boucman]] 20:48, 3 October 2006 (CEST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since bugs are sometimes a good opportunity to get a first idea of the code, i will add some here that are easy to fix as soon as i stumble upon them (the one i had in mind is fixed already ;-).&lt;br /&gt;
&lt;br /&gt;
--Yogi Bear, 28 February 2008&lt;br /&gt;
&lt;br /&gt;
== MP related features ==&lt;br /&gt;
=== Add TTL to wesnothd bans ===&lt;br /&gt;
As per FR #3638 [https://gna.org/bugs/?3638]&lt;br /&gt;
=== Use different font for in-game chat ===&lt;br /&gt;
Since commas and dots are apparently hard to tell apart. As per FR #7470 [https://gna.org/bugs/?7470]&lt;br /&gt;
=== Allow lists for /ignore and similar ===&lt;br /&gt;
As per FR #7492 [https://gna.org/bugs/?7492]&lt;br /&gt;
&lt;br /&gt;
== WML related features ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== WML configurable village income / upkeep ===&lt;br /&gt;
Preferably as a [scenario], [side] or [campaign] keys. As per FR #6301 [https://gna.org/bugs/?6301]&lt;br /&gt;
=== Add support of [if] for [scenario] ===&lt;br /&gt;
As per FR #4539 [https://gna.org/bugs/?4539]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Make [have_unit] optionaly use full SUF ===&lt;br /&gt;
[have_unit] by default uses SUF but does not apply it to recall list. Introduce an optional key that will allow to lift that limitation.&lt;br /&gt;
=== Side-specific results ===&lt;br /&gt;
Giving result=defeat or result=victory for specific sides. ([http://gna.org/bugs/index.php?4960 FR #4960]) -- [[User:dlr365|dlr365]] -- patch submitted [https://gna.org/bugs/index.php?4960]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Enabling checking of damage dealt in WML ===&lt;br /&gt;
A WML variable should be set when triggering some combat-related events, allowing WML to know the amount of damage being dealt. ([http://gna.org/bugs/index.php?7673 FR #7673])&lt;br /&gt;
=== Support for leaderless multiplayergames ===&lt;br /&gt;
Add support for the WML key victory_when_enemies_defeated= in the scenario tag during multiplayergames. ([https://gna.org/bugs/index.php?8106 FR #8106])&lt;br /&gt;
=== Other Ideas ===&lt;br /&gt;
See [[FutureWML]]; some ideas there are easier than others.&lt;br /&gt;
&lt;br /&gt;
== Improvements to FormulaAI ==&lt;br /&gt;
&lt;br /&gt;
Add new formula functions, or minor improvements to the formula language. Make it easier to debug the formula language.&lt;br /&gt;
&lt;br /&gt;
== GUI related features ==&lt;br /&gt;
=== Change map paths from dots to dashes ===&lt;br /&gt;
Or even better allow dashes and allow choice between the two. As per FR #5522 [https://gna.org/bugs/?5522]&lt;br /&gt;
&lt;br /&gt;
-------------------&lt;br /&gt;
&lt;br /&gt;
Note at the moment Mordante is working on a new GUI system, these &lt;br /&gt;
changes will probably affect the way these items need to be implemented.&lt;br /&gt;
Contact Mordante on IRC before starting to work on these.&lt;br /&gt;
  &lt;br /&gt;
--[[User:SkeletonCrew|SkeletonCrew]] 14:04, 9 March 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
=== Theme Changes ===&lt;br /&gt;
* show number of owned villages/total villages (FR: #3135) (--[[User:Alink|alink]] done but must update help, doc, tooltip...)&lt;br /&gt;
* allow custom themes to display values of WML variables ([http://gna.org/bugs/index.php?6209 FR #6209])&lt;br /&gt;
* hide the hourglass item from the statusbar when there is no timer&lt;br /&gt;
&lt;br /&gt;
=== Widget Changes ===&lt;br /&gt;
* show side number, name and team association information in the status table &lt;br /&gt;
* make games sortable in the lobby (open slots, total number of players, era, XP modifier, gold per village, fog/shroud) &lt;br /&gt;
* input history (chat, commands, ..) - note: rujasu is working on this feature&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
=== More powerful village naming ===&lt;br /&gt;
'''Adding mountain names and other features to village names, having a second random name in village names'''&lt;br /&gt;
&lt;br /&gt;
Currently the village naming engine has a very good structure that could allow &lt;br /&gt;
more powerfull names to be generated. &lt;br /&gt;
Understanding how it works should be quite easy, and a few usefull improvements could be added.&lt;br /&gt;
&lt;br /&gt;
* Currently villages can use lake names and river names, this should be extended to other features like bridges, swamps, mountains etc...&lt;br /&gt;
* It would be nice to have a separate list of &amp;quot;first sylabus&amp;quot; and &amp;quot;last sylabus&amp;quot; for naming. That's not really needed in english, but some translations could use it&lt;br /&gt;
* Again, it is common to have villages with more than one &amp;quot;random&amp;quot; word in them. having a $name2 variable would be nice&lt;br /&gt;
&lt;br /&gt;
ACardboardRobot 2/2/07&lt;br /&gt;
&lt;br /&gt;
=== Debug Mode ===&lt;br /&gt;
* New debug command functionality (setting additional status.variables, possibly terrain)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Add minimal regexp to friend list ===&lt;br /&gt;
&lt;br /&gt;
Lots of people use multiple nicks, usually postfixed with a number... it would be nice to have minimal regexp support in friend list to easily get who's there...&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[NotSoEasyCoding]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Future]]&lt;/div&gt;</summary>
		<author><name>Segfault</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=EasyCoding&amp;diff=25120</id>
		<title>EasyCoding</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=EasyCoding&amp;diff=25120"/>
		<updated>2008-04-06T12:40:42Z</updated>

		<summary type="html">&lt;p&gt;Segfault: /* WML related features */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Foreword ==&lt;br /&gt;
This page is here to document easy to do coding tasks. It is not here to double the feature request database, and should only be filled by people that know the code well enough to judge the difficulty of a given task. &lt;br /&gt;
&lt;br /&gt;
If you are such a person, you should feel free to edit this page.&lt;br /&gt;
&lt;br /&gt;
If you're not, you should post a feature request and discuss your idea on the forum or IRC. A coder with better knowledge of the code might give you the green light to add your feature here.&lt;br /&gt;
&lt;br /&gt;
Anybody should feel free to add &amp;quot;clues&amp;quot; to any tasks, that is entry points, traps to avoid, person to contact to discuss and so on.&lt;br /&gt;
&lt;br /&gt;
If you plan to work on a feature, write your name at the bottom of the feature, with the date. Note that if you are too long at working on a feature I'll &amp;quot;free&amp;quot; it back (that is if you're not working on it. If you have problems implementing it, just tell us....)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:Boucman|Boucman]] 20:48, 3 October 2006 (CEST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since bugs are sometimes a good opportunity to get a first idea of the code, i will add some here that are easy to fix as soon as i stumble upon them (the one i had in mind is fixed already ;-).&lt;br /&gt;
&lt;br /&gt;
--Yogi Bear, 28 February 2008&lt;br /&gt;
&lt;br /&gt;
== MP related features ==&lt;br /&gt;
=== Add TTL to wesnothd bans ===&lt;br /&gt;
As per FR #3638 [https://gna.org/bugs/?3638]&lt;br /&gt;
=== Use different font for in-game chat ===&lt;br /&gt;
Since commas and dots are apparently hard to tell apart. As per FR #7470 [https://gna.org/bugs/?7470]&lt;br /&gt;
=== Allow lists for /ignore and similar ===&lt;br /&gt;
As per FR #7492 [https://gna.org/bugs/?7492]&lt;br /&gt;
&lt;br /&gt;
== WML related features ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== WML configurable village income / upkeep ===&lt;br /&gt;
Preferably as a [scenario], [side] or [campaign] keys. As per FR #6301 [https://gna.org/bugs/?6301]&lt;br /&gt;
=== Add support of [if] for [scenario] ===&lt;br /&gt;
As per FR #4539 [https://gna.org/bugs/?4539]&lt;br /&gt;
=== Make [have_unit] optionaly use full SUF ===&lt;br /&gt;
[have_unit] by default uses SUF but does not apply it to recall list. Introduce an optional key that will allow to lift that limitation.&lt;br /&gt;
=== Side-specific results ===&lt;br /&gt;
Giving result=defeat or result=victory for specific sides. ([http://gna.org/bugs/index.php?4960 FR #4960]) -- [[User:dlr365|dlr365]] -- patch submitted [https://gna.org/bugs/index.php?4960]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Enabling checking of damage dealt in WML ===&lt;br /&gt;
A WML variable should be set when triggering some combat-related events, allowing WML to know the amount of damage being dealt. ([http://gna.org/bugs/index.php?7673 FR #7673])&lt;br /&gt;
=== Support for leaderless multiplayergames ===&lt;br /&gt;
Add support for the WML key victory_when_enemies_defeated= in the scenario tag during multiplayergames. ([https://gna.org/bugs/index.php?8106 FR #8106])&lt;br /&gt;
=== Other Ideas ===&lt;br /&gt;
See [[FutureWML]]; some ideas there are easier than others.&lt;br /&gt;
&lt;br /&gt;
== Improvements to FormulaAI ==&lt;br /&gt;
&lt;br /&gt;
Add new formula functions, or minor improvements to the formula language. Make it easier to debug the formula language.&lt;br /&gt;
&lt;br /&gt;
== GUI related features ==&lt;br /&gt;
=== Change map paths from dots to dashes ===&lt;br /&gt;
Or even better allow dashes and allow choice between the two. As per FR #5522 [https://gna.org/bugs/?5522]&lt;br /&gt;
&lt;br /&gt;
-------------------&lt;br /&gt;
&lt;br /&gt;
Note at the moment Mordante is working on a new GUI system, these &lt;br /&gt;
changes will probably affect the way these items need to be implemented.&lt;br /&gt;
Contact Mordante on IRC before starting to work on these.&lt;br /&gt;
  &lt;br /&gt;
--[[User:SkeletonCrew|SkeletonCrew]] 14:04, 9 March 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
=== Theme Changes ===&lt;br /&gt;
* show number of owned villages/total villages (FR: #3135) (--[[User:Alink|alink]] done but must update help, doc, tooltip...)&lt;br /&gt;
* allow custom themes to display values of WML variables ([http://gna.org/bugs/index.php?6209 FR #6209])&lt;br /&gt;
* hide the hourglass item from the statusbar when there is no timer&lt;br /&gt;
&lt;br /&gt;
=== Widget Changes ===&lt;br /&gt;
* show side number, name and team association information in the status table &lt;br /&gt;
* make games sortable in the lobby (open slots, total number of players, era, XP modifier, gold per village, fog/shroud) &lt;br /&gt;
* input history (chat, commands, ..) - note: rujasu is working on this feature&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
=== More powerful village naming ===&lt;br /&gt;
'''Adding mountain names and other features to village names, having a second random name in village names'''&lt;br /&gt;
&lt;br /&gt;
Currently the village naming engine has a very good structure that could allow &lt;br /&gt;
more powerfull names to be generated. &lt;br /&gt;
Understanding how it works should be quite easy, and a few usefull improvements could be added.&lt;br /&gt;
&lt;br /&gt;
* Currently villages can use lake names and river names, this should be extended to other features like bridges, swamps, mountains etc...&lt;br /&gt;
* It would be nice to have a separate list of &amp;quot;first sylabus&amp;quot; and &amp;quot;last sylabus&amp;quot; for naming. That's not really needed in english, but some translations could use it&lt;br /&gt;
* Again, it is common to have villages with more than one &amp;quot;random&amp;quot; word in them. having a $name2 variable would be nice&lt;br /&gt;
&lt;br /&gt;
ACardboardRobot 2/2/07&lt;br /&gt;
&lt;br /&gt;
=== Debug Mode ===&lt;br /&gt;
* New debug command functionality (setting additional status.variables, possibly terrain)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Add minimal regexp to friend list ===&lt;br /&gt;
&lt;br /&gt;
Lots of people use multiple nicks, usually postfixed with a number... it would be nice to have minimal regexp support in friend list to easily get who's there...&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[NotSoEasyCoding]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Future]]&lt;/div&gt;</summary>
		<author><name>Segfault</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=EasyCoding&amp;diff=25119</id>
		<title>EasyCoding</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=EasyCoding&amp;diff=25119"/>
		<updated>2008-04-06T12:40:04Z</updated>

		<summary type="html">&lt;p&gt;Segfault: /* Allow an event multiple types */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Foreword ==&lt;br /&gt;
This page is here to document easy to do coding tasks. It is not here to double the feature request database, and should only be filled by people that know the code well enough to judge the difficulty of a given task. &lt;br /&gt;
&lt;br /&gt;
If you are such a person, you should feel free to edit this page.&lt;br /&gt;
&lt;br /&gt;
If you're not, you should post a feature request and discuss your idea on the forum or IRC. A coder with better knowledge of the code might give you the green light to add your feature here.&lt;br /&gt;
&lt;br /&gt;
Anybody should feel free to add &amp;quot;clues&amp;quot; to any tasks, that is entry points, traps to avoid, person to contact to discuss and so on.&lt;br /&gt;
&lt;br /&gt;
If you plan to work on a feature, write your name at the bottom of the feature, with the date. Note that if you are too long at working on a feature I'll &amp;quot;free&amp;quot; it back (that is if you're not working on it. If you have problems implementing it, just tell us....)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:Boucman|Boucman]] 20:48, 3 October 2006 (CEST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since bugs are sometimes a good opportunity to get a first idea of the code, i will add some here that are easy to fix as soon as i stumble upon them (the one i had in mind is fixed already ;-).&lt;br /&gt;
&lt;br /&gt;
--Yogi Bear, 28 February 2008&lt;br /&gt;
&lt;br /&gt;
== MP related features ==&lt;br /&gt;
=== Add TTL to wesnothd bans ===&lt;br /&gt;
As per FR #3638 [https://gna.org/bugs/?3638]&lt;br /&gt;
=== Use different font for in-game chat ===&lt;br /&gt;
Since commas and dots are apparently hard to tell apart. As per FR #7470 [https://gna.org/bugs/?7470]&lt;br /&gt;
=== Allow lists for /ignore and similar ===&lt;br /&gt;
As per FR #7492 [https://gna.org/bugs/?7492]&lt;br /&gt;
&lt;br /&gt;
== WML related features ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== WML configurable village income / upkeep ===&lt;br /&gt;
Preferably as a [scenario], [side] or [campaign] keys. As per FR #6301 [https://gna.org/bugs/?6301]&lt;br /&gt;
=== Add support of [if] for [scenario] ===&lt;br /&gt;
As per FR #4539 [https://gna.org/bugs/?4539]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Make [have_unit] optionaly use full SUF ===&lt;br /&gt;
[have_unit] by default uses SUF but does not apply it to recall list. Introduce an optional key that will allow to lift that limitation.&lt;br /&gt;
=== Side-specific results ===&lt;br /&gt;
Giving result=defeat or result=victory for specific sides. ([http://gna.org/bugs/index.php?4960 FR #4960]) -- [[User:dlr365|dlr365]] -- patch submitted [https://gna.org/bugs/index.php?4960]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Enabling checking of damage dealt in WML ===&lt;br /&gt;
A WML variable should be set when triggering some combat-related events, allowing WML to know the amount of damage being dealt. ([http://gna.org/bugs/index.php?7673 FR #7673])&lt;br /&gt;
=== Support for leaderless multiplayergames ===&lt;br /&gt;
Add support for the WML key victory_when_enemies_defeated= in the scenario tag during multiplayergames. ([https://gna.org/bugs/index.php?8106 FR #8106])&lt;br /&gt;
=== Other Ideas ===&lt;br /&gt;
See [[FutureWML]]; some ideas there are easier than others.&lt;br /&gt;
&lt;br /&gt;
== Improvements to FormulaAI ==&lt;br /&gt;
&lt;br /&gt;
Add new formula functions, or minor improvements to the formula language. Make it easier to debug the formula language.&lt;br /&gt;
&lt;br /&gt;
== GUI related features ==&lt;br /&gt;
=== Change map paths from dots to dashes ===&lt;br /&gt;
Or even better allow dashes and allow choice between the two. As per FR #5522 [https://gna.org/bugs/?5522]&lt;br /&gt;
&lt;br /&gt;
-------------------&lt;br /&gt;
&lt;br /&gt;
Note at the moment Mordante is working on a new GUI system, these &lt;br /&gt;
changes will probably affect the way these items need to be implemented.&lt;br /&gt;
Contact Mordante on IRC before starting to work on these.&lt;br /&gt;
  &lt;br /&gt;
--[[User:SkeletonCrew|SkeletonCrew]] 14:04, 9 March 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
=== Theme Changes ===&lt;br /&gt;
* show number of owned villages/total villages (FR: #3135) (--[[User:Alink|alink]] done but must update help, doc, tooltip...)&lt;br /&gt;
* allow custom themes to display values of WML variables ([http://gna.org/bugs/index.php?6209 FR #6209])&lt;br /&gt;
* hide the hourglass item from the statusbar when there is no timer&lt;br /&gt;
&lt;br /&gt;
=== Widget Changes ===&lt;br /&gt;
* show side number, name and team association information in the status table &lt;br /&gt;
* make games sortable in the lobby (open slots, total number of players, era, XP modifier, gold per village, fog/shroud) &lt;br /&gt;
* input history (chat, commands, ..) - note: rujasu is working on this feature&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
=== More powerful village naming ===&lt;br /&gt;
'''Adding mountain names and other features to village names, having a second random name in village names'''&lt;br /&gt;
&lt;br /&gt;
Currently the village naming engine has a very good structure that could allow &lt;br /&gt;
more powerfull names to be generated. &lt;br /&gt;
Understanding how it works should be quite easy, and a few usefull improvements could be added.&lt;br /&gt;
&lt;br /&gt;
* Currently villages can use lake names and river names, this should be extended to other features like bridges, swamps, mountains etc...&lt;br /&gt;
* It would be nice to have a separate list of &amp;quot;first sylabus&amp;quot; and &amp;quot;last sylabus&amp;quot; for naming. That's not really needed in english, but some translations could use it&lt;br /&gt;
* Again, it is common to have villages with more than one &amp;quot;random&amp;quot; word in them. having a $name2 variable would be nice&lt;br /&gt;
&lt;br /&gt;
ACardboardRobot 2/2/07&lt;br /&gt;
&lt;br /&gt;
=== Debug Mode ===&lt;br /&gt;
* New debug command functionality (setting additional status.variables, possibly terrain)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Add minimal regexp to friend list ===&lt;br /&gt;
&lt;br /&gt;
Lots of people use multiple nicks, usually postfixed with a number... it would be nice to have minimal regexp support in friend list to easily get who's there...&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[NotSoEasyCoding]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Future]]&lt;/div&gt;</summary>
		<author><name>Segfault</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=EventWML&amp;diff=25118</id>
		<title>EventWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=EventWML&amp;diff=25118"/>
		<updated>2008-04-06T12:39:11Z</updated>

		<summary type="html">&lt;p&gt;Segfault: /* The [event] tag */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== The [event] tag ==&lt;br /&gt;
&lt;br /&gt;
This tag is a subtag of [scenario] (or [unit] - see '''event''', [[UnitWML]]) 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;
* '''name''': this is not like a normal 'name' key. It is a basic description of when the event will trigger. {{DevFeature}} '''name''' can accept a list of commas separated descriptions for which the event must be triggered. Example: '''name= attacker_misses, defender_misses'''.&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 a side is about to start its turn. Before events of this type trigger, the value of the WML variable '''side_number''' is set to the number of the side of the player about to take their turn. This is before any healing takes place for that side, before calculating income, and before restoring unit movement and status.&lt;br /&gt;
* '''turn refresh''': this event triggers just before a side is taking control after healing, calculating income, and restoring unit movement and status.&lt;br /&gt;
* '''turn X''': (for X some number) 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=yes''' (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 side. This is called after ''side turn'', and thus the WML variable '''side_number''' still holds the number of this side.&lt;br /&gt;
&lt;br /&gt;
Filters can be applied to the following event triggers (see [[FilterWML]]; see also below). The actions specified in the event tag will be executed only if the filter returns true. &lt;br /&gt;
These event triggers are all actions by units ('''moveto''', '''attack''') or things that happen to units ('''recruit''', '''advance'''). When one of these events is triggered, the position of the active unit (referred to as the '''primary unit''') is stored in the variables '''x1''' and '''y1''' and the position of any unit that primary unit does something to is stored in the variables '''x2''' and '''y2''' (this unit is referred to as the '''secondary unit''' below). '' These units are also automatically stored in the variables 'unit' and 'second_unit' as if they had been stored using the '''[store_unit]''' tag. see [[SingleUnitWML]]&lt;br /&gt;
&lt;br /&gt;
* '''moveto'''': triggers after the primary unit moves. Typically this is used when the primary unit gets to a particular location and a filter for the location of the primary unit is included; remember that this is the location that the primary unit lands on, not the location it started on or any location it travels on.&lt;br /&gt;
* '''sighted''': this event triggers when the primary unit moves to a location where the secondary unit is in sight range of the primary unit. Works only in shroud or fog.&lt;br /&gt;
* '''attack''': this event triggers when the primary unit attacks the secondary_unit.&lt;br /&gt;
* '''attacker_hits''': this event triggers when the the primary unit (the attacker) hits the secondary unit (the defender).&lt;br /&gt;
* '''attacker_misses''': same as ''attacker_hits'', but is triggered when the attacker misses.&lt;br /&gt;
* '''defender_hits''': this event triggers when the primary unit (the attacker) is hit in retaliation by the secondary unit (the defender).&lt;br /&gt;
* '''defender_misses''': same as ''defender_hits'', but is triggered when the defender misses.&lt;br /&gt;
* '''attack_end''': 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 the primary unit is hit by an attack with the 'stones' ability (See ''stones'', [[AbilitiesWML]]) by the secondary unit (the unit with the 'stones' ability).&lt;br /&gt;
* '''last breath''': this event triggers when the primary unit is killed by the secondary unit, but before the death animation is triggered.&lt;br /&gt;
* '''die''': this event triggers when the primary unit is killed by the secondary unit.&lt;br /&gt;
* '''capture''': this event triggers when the primary unit captures a village. The village may have been previously neutral, or previously owned by another side; merely moving into your own villages does not constitute a capture.&lt;br /&gt;
* '''recruit''': this event triggers when the 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.). {{DevFeature}} The '''recruit''' will no longer triggers on recalls.&lt;br /&gt;
* '''prerecruit''': this event triggers when the primary unit is recruited, but before it is displayed. {{DevFeature}} The '''prerecruit''' will no longer triggers on recalls.&lt;br /&gt;
* '''advance''': this event triggers just before the primary unit is going to advance to another unit.&lt;br /&gt;
* '''post_advance''': this event triggers just after the primary unit has advanced to another unit.&lt;br /&gt;
* '''select''': triggers when the primary unit is selected. ''Note: in networked multiplayer, these events are only executed by the client on which the event is triggered, leading to out of sync errors if you modify the game state in the event.''&lt;br /&gt;
* '''menu item X''': triggers when a WML menu item with id=X is selected. ''Note: if the menu item has a [command], this event may be executed before or after the command; there is no guarantee.'' &lt;br /&gt;
* {{DevFeature}} '''prerecall''': triggers when a unit is recalled, but before it is displayed. This event is not trigger when a unit is recruit.&lt;br /&gt;
* {{DevFeature}} '''recall''': triggers after a unit is recalled. This event is not trigger when a unit is recruit.&lt;br /&gt;
* {{DevFeature}} other events with a custom name may be invoked from [fire_event]&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 caused. Note that undo functionality will only move the unit back to its former location; it will not other changes to the game caused by the event. Thus it is up to the scenario designer to use this tag correctly.&lt;br /&gt;
&lt;br /&gt;
The primary unit can be referred to as '''unit''' and the secondary unit can be referred to as '''second_unit''' in [message] tags using the speaker= key. For example:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
 name=die&lt;br /&gt;
   [message]&lt;br /&gt;
   speaker=second_unit&lt;br /&gt;
   message=&amp;quot;Hahaha, I finally killed you!&amp;quot;&lt;br /&gt;
   [/message]&lt;br /&gt;
 &lt;br /&gt;
   [message]&lt;br /&gt;
   speaker=unit&lt;br /&gt;
   message=&amp;quot;It's not over yet! I'll come back to haunt you!&amp;quot;&lt;br /&gt;
   [/message]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
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 the primary unit matches this filter.&lt;br /&gt;
** [[StandardUnitFilter]]: selection criteria&lt;br /&gt;
* '''[filter_second]''': is like [filter], but for the secondary unit.&lt;br /&gt;
** [[StandardUnitFilter]]: selection criteria&lt;br /&gt;
* '''[special_filter]''' and '''[special_filter_second]''': can be used to set some additional filtering criteria for the primary unit and the secondary unit that are not generally available in a standard unit filter. Can be used in events ''attack'', ''attacker_hits'', ''attacker_misses'', ''defender_hits'', ''defender_misses'' and ''attack_end''.&lt;br /&gt;
** '''weapon''': the name of the weapon used.&lt;br /&gt;
** '''terrain''': the code for the terrain the unit is on.&lt;br /&gt;
&lt;br /&gt;
=== Actions triggered by [event] ===&lt;br /&gt;
&lt;br /&gt;
After the trigger conditions have been met, all action tags within the [event] tag are executed in the order they are written in.&lt;br /&gt;
&lt;br /&gt;
There are 3 main types of actions:&lt;br /&gt;
* direct actions ([[DirectActionsWML]]) which have a direct effect on gameplay&lt;br /&gt;
* display actions ([[InterfaceActionsWML]]) which show something to the user&lt;br /&gt;
* internal actions ([[InternalActionsWML]]) which are used by WML internally&lt;br /&gt;
&lt;br /&gt;
Several actions use standard filters to find out which units&lt;br /&gt;
to execute the command on.  These are denoted by the phrases&lt;br /&gt;
&amp;quot;standard unit filter&amp;quot; and &amp;quot;standard location filter&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Nested events ===&lt;br /&gt;
&lt;br /&gt;
There is 1 special type of action: event creation.  By placing an '''[event]''' tag inside another '''[event]''' tag, the nested event is created when the nested event is encountered (when executing the contents of the event).  For example, you could create a portal that opens on turn 10.  The outer event executes on turn 10, creating the nested moveto event, which executes when a player steps on a certain spot.  An equivalent way of doing this would be to a single moveto event with an if statement to check for turn number, but using nested '''[event]''' tags is a simple and elegant way to accomplish more complex tasks without resorting to excessive if statements.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=turn 10&lt;br /&gt;
 &lt;br /&gt;
     [event]&lt;br /&gt;
         name=moveto&lt;br /&gt;
 &lt;br /&gt;
         [filter]&lt;br /&gt;
             x,y=5,8&lt;br /&gt;
         [/filter]&lt;br /&gt;
 &lt;br /&gt;
         # moving to 5,8 will trigger this event only on turn 10 and after&lt;br /&gt;
     [/event]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
== 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>Segfault</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=EasyCoding&amp;diff=25093</id>
		<title>EasyCoding</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=EasyCoding&amp;diff=25093"/>
		<updated>2008-04-04T21:12:42Z</updated>

		<summary type="html">&lt;p&gt;Segfault: /* Allow an event multiple types */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Foreword ==&lt;br /&gt;
This page is here to document easy to do coding tasks. It is not here to double the feature request database, and should only be filled by people that know the code well enough to judge the difficulty of a given task. &lt;br /&gt;
&lt;br /&gt;
If you are such a person, you should feel free to edit this page.&lt;br /&gt;
&lt;br /&gt;
If you're not, you should post a feature request and discuss your idea on the forum or IRC. A coder with better knowledge of the code might give you the green light to add your feature here.&lt;br /&gt;
&lt;br /&gt;
Anybody should feel free to add &amp;quot;clues&amp;quot; to any tasks, that is entry points, traps to avoid, person to contact to discuss and so on.&lt;br /&gt;
&lt;br /&gt;
If you plan to work on a feature, write your name at the bottom of the feature, with the date. Note that if you are too long at working on a feature I'll &amp;quot;free&amp;quot; it back (that is if you're not working on it. If you have problems implementing it, just tell us....)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:Boucman|Boucman]] 20:48, 3 October 2006 (CEST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since bugs are sometimes a good opportunity to get a first idea of the code, i will add some here that are easy to fix as soon as i stumble upon them (the one i had in mind is fixed already ;-).&lt;br /&gt;
&lt;br /&gt;
--Yogi Bear, 28 February 2008&lt;br /&gt;
&lt;br /&gt;
== MP related features ==&lt;br /&gt;
=== Add TTL to wesnothd bans ===&lt;br /&gt;
As per FR #3638 [https://gna.org/bugs/?3638]&lt;br /&gt;
=== Use different font for in-game chat ===&lt;br /&gt;
Since commas and dots are apparently hard to tell apart. As per FR #7470 [https://gna.org/bugs/?7470]&lt;br /&gt;
=== Allow lists for /ignore and similar ===&lt;br /&gt;
As per FR #7492 [https://gna.org/bugs/?7492]&lt;br /&gt;
&lt;br /&gt;
== WML related features ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== WML configurable village income / upkeep ===&lt;br /&gt;
Preferably as a [scenario], [side] or [campaign] keys. As per FR #6301 [https://gna.org/bugs/?6301]&lt;br /&gt;
=== Add support of [if] for [scenario] ===&lt;br /&gt;
As per FR #4539 [https://gna.org/bugs/?4539]&lt;br /&gt;
=== Allow an event multiple types ===&lt;br /&gt;
--[[User:Segfault|Segfault]] 04 April 2008&lt;br /&gt;
&lt;br /&gt;
At the moment an [event] can only trigger on one kind of an event: a '''name=moveto''' only triggers on a move, a '''name=die''' only triggers on a death, and so on. However, it'd sometimes be useful to be able to define a list of types: if you'd have an [event] with '''name=attacker_misses,defender_misses''', then that event would trigger both on the attacker missing and defender missing. Currently, you'd have to create two identical [event]s to do this.&lt;br /&gt;
&lt;br /&gt;
=== Make [have_unit] optionaly use full SUF ===&lt;br /&gt;
[have_unit] by default uses SUF but does not apply it to recall list. Introduce an optional key that will allow to lift that limitation.&lt;br /&gt;
=== Side-specific results ===&lt;br /&gt;
Giving result=defeat or result=victory for specific sides. ([http://gna.org/bugs/index.php?4960 FR #4960]) -- [[User:dlr365|dlr365]] -- patch submitted [https://gna.org/bugs/index.php?4960]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Enabling checking of damage dealt in WML ===&lt;br /&gt;
A WML variable should be set when triggering some combat-related events, allowing WML to know the amount of damage being dealt. ([http://gna.org/bugs/index.php?7673 FR #7673])&lt;br /&gt;
=== Support for leaderless multiplayergames ===&lt;br /&gt;
Add support for the WML key victory_when_enemies_defeated= in the scenario tag during multiplayergames. ([https://gna.org/bugs/index.php?8106 FR #8106])&lt;br /&gt;
=== Other Ideas ===&lt;br /&gt;
See [[FutureWML]]; some ideas there are easier than others.&lt;br /&gt;
&lt;br /&gt;
== Improvements to FormulaAI ==&lt;br /&gt;
&lt;br /&gt;
Add new formula functions, or minor improvements to the formula language. Make it easier to debug the formula language.&lt;br /&gt;
&lt;br /&gt;
== GUI related features ==&lt;br /&gt;
=== Change map paths from dots to dashes ===&lt;br /&gt;
Or even better allow dashes and allow choice between the two. As per FR #5522 [https://gna.org/bugs/?5522]&lt;br /&gt;
&lt;br /&gt;
-------------------&lt;br /&gt;
&lt;br /&gt;
Note at the moment Mordante is working on a new GUI system, these &lt;br /&gt;
changes will probably affect the way these items need to be implemented.&lt;br /&gt;
Contact Mordante on IRC before starting to work on these.&lt;br /&gt;
  &lt;br /&gt;
--[[User:SkeletonCrew|SkeletonCrew]] 14:04, 9 March 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
=== Theme Changes ===&lt;br /&gt;
* show number of owned villages/total villages (FR: #3135) (--[[User:Alink|alink]] done but must update help, doc, tooltip...)&lt;br /&gt;
* allow custom themes to display values of WML variables ([http://gna.org/bugs/index.php?6209 FR #6209])&lt;br /&gt;
* hide the hourglass item from the statusbar when there is no timer&lt;br /&gt;
&lt;br /&gt;
=== Widget Changes ===&lt;br /&gt;
* show side number, name and team association information in the status table &lt;br /&gt;
* make games sortable in the lobby (open slots, total number of players, era, XP modifier, gold per village, fog/shroud) &lt;br /&gt;
* input history (chat, commands, ..) - note: rujasu is working on this feature&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
=== More powerful village naming ===&lt;br /&gt;
'''Adding mountain names and other features to village names, having a second random name in village names'''&lt;br /&gt;
&lt;br /&gt;
Currently the village naming engine has a very good structure that could allow &lt;br /&gt;
more powerfull names to be generated. &lt;br /&gt;
Understanding how it works should be quite easy, and a few usefull improvements could be added.&lt;br /&gt;
&lt;br /&gt;
* Currently villages can use lake names and river names, this should be extended to other features like bridges, swamps, mountains etc...&lt;br /&gt;
* It would be nice to have a separate list of &amp;quot;first sylabus&amp;quot; and &amp;quot;last sylabus&amp;quot; for naming. That's not really needed in english, but some translations could use it&lt;br /&gt;
* Again, it is common to have villages with more than one &amp;quot;random&amp;quot; word in them. having a $name2 variable would be nice&lt;br /&gt;
&lt;br /&gt;
ACardboardRobot 2/2/07&lt;br /&gt;
&lt;br /&gt;
=== Debug Mode ===&lt;br /&gt;
* New debug command functionality (setting additional status.variables, possibly terrain)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Add minimal regexp to friend list ===&lt;br /&gt;
&lt;br /&gt;
Lots of people use multiple nicks, usually postfixed with a number... it would be nice to have minimal regexp support in friend list to easily get who's there...&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[NotSoEasyCoding]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Future]]&lt;/div&gt;</summary>
		<author><name>Segfault</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=EventWML&amp;diff=25087</id>
		<title>EventWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=EventWML&amp;diff=25087"/>
		<updated>2008-04-04T19:55:09Z</updated>

		<summary type="html">&lt;p&gt;Segfault: /* The [event] tag */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== The [event] tag ==&lt;br /&gt;
&lt;br /&gt;
This tag is a subtag of [scenario] (or [unit] - see '''event''', [[UnitWML]]) 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;
* '''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 a side is about to start its turn. Before events of this type trigger, the value of the WML variable '''side_number''' is set to the number of the side of the player about to take their turn. This is before any healing takes place for that side, before calculating income, and before restoring unit movement and status.&lt;br /&gt;
* '''turn refresh''': this event triggers just before a side is taking control after healing, calculating income, and restoring unit movement and status.&lt;br /&gt;
* '''turn X''': (for X some number) 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=yes''' (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 side. This is called after ''side turn'', and thus the WML variable '''side_number''' still holds the number of this side.&lt;br /&gt;
&lt;br /&gt;
Filters can be applied to the following event triggers (see [[FilterWML]]; see also below). The actions specified in the event tag will be executed only if the filter returns true. &lt;br /&gt;
These event triggers are all actions by units ('''moveto''', '''attack''') or things that happen to units ('''recruit''', '''advance'''). When one of these events is triggered, the position of the active unit (referred to as the '''primary unit''') is stored in the variables '''x1''' and '''y1''' and the position of any unit that primary unit does something to is stored in the variables '''x2''' and '''y2''' (this unit is referred to as the '''secondary unit''' below). '' These units are also automatically stored in the variables 'unit' and 'second_unit' as if they had been stored using the '''[store_unit]''' tag. see [[SingleUnitWML]]&lt;br /&gt;
&lt;br /&gt;
* '''moveto'''': triggers after the primary unit moves. Typically this is used when the primary unit gets to a particular location and a filter for the location of the primary unit is included; remember that this is the location that the primary unit lands on, not the location it started on or any location it travels on.&lt;br /&gt;
* '''sighted''': this event triggers when the primary unit moves to a location where the secondary unit is in sight range of the primary unit. Works only in shroud or fog.&lt;br /&gt;
* '''attack''': this event triggers when the primary unit attacks the secondary_unit.&lt;br /&gt;
* '''attacker_hits''': this event triggers when the the primary unit (the attacker) hits the secondary unit (the defender).&lt;br /&gt;
* '''attacker_misses''': same as ''attacker_hits'', but is triggered when the attacker misses.&lt;br /&gt;
* '''defender_hits''': this event triggers when the primary unit (the attacker) is hit in retaliation by the secondary unit (the defender).&lt;br /&gt;
* '''defender_misses''': same as ''defender_hits'', but is triggered when the defender misses.&lt;br /&gt;
* '''attack_end''': 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 the primary unit is hit by an attack with the 'stones' ability (See ''stones'', [[AbilitiesWML]]) by the secondary unit (the unit with the 'stones' ability).&lt;br /&gt;
* '''last breath''': this event triggers when the primary unit is killed by the secondary unit, but before the death animation is triggered.&lt;br /&gt;
* '''die''': this event triggers when the primary unit is killed by the secondary unit.&lt;br /&gt;
* '''capture''': this event triggers when the primary unit captures a village. The village may have been previously neutral, or previously owned by another side; merely moving into your own villages does not constitute a capture.&lt;br /&gt;
* '''recruit''': this event triggers when the 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.). {{DevFeature}} The '''recruit''' will no longer triggers on recalls.&lt;br /&gt;
* '''prerecruit''': this event triggers when the primary unit is recruited, but before it is displayed. {{DevFeature}} The '''prerecruit''' will no longer triggers on recalls.&lt;br /&gt;
* '''advance''': this event triggers just before the primary unit is going to advance to another unit.&lt;br /&gt;
* '''post_advance''': this event triggers just after the primary unit has advanced to another unit.&lt;br /&gt;
* '''select''': triggers when the primary unit is selected. ''Note: in networked multiplayer, these events are only executed by the client on which the event is triggered, leading to out of sync errors if you modify the game state in the event.''&lt;br /&gt;
* '''menu item X''': triggers when a WML menu item with id=X is selected. ''Note: if the menu item has a [command], this event may be executed before or after the command; there is no guarantee.'' &lt;br /&gt;
* {{DevFeature}} '''prerecall''': triggers when a unit is recalled, but before it is displayed. This event is not trigger when a unit is recruit.&lt;br /&gt;
* {{DevFeature}} '''recall''': triggers after a unit is recalled. This event is not trigger when a unit is recruit.&lt;br /&gt;
* {{DevFeature}} other events with a custom name may be invoked from [fire_event]&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 caused. Note that undo functionality will only move the unit back to its former location; it will not other changes to the game caused by the event. Thus it is up to the scenario designer to use this tag correctly.&lt;br /&gt;
&lt;br /&gt;
The primary unit can be referred to as '''unit''' and the secondary unit can be referred to as '''second_unit''' in [message] tags using the speaker= key. For example:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
 name=die&lt;br /&gt;
   [message]&lt;br /&gt;
   speaker=second_unit&lt;br /&gt;
   message=&amp;quot;Hahaha, I finally killed you!&amp;quot;&lt;br /&gt;
   [/message]&lt;br /&gt;
 &lt;br /&gt;
   [message]&lt;br /&gt;
   speaker=unit&lt;br /&gt;
   message=&amp;quot;It's not over yet! I'll come back to haunt you!&amp;quot;&lt;br /&gt;
   [/message]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
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 the primary unit matches this filter.&lt;br /&gt;
** [[StandardUnitFilter]]: selection criteria&lt;br /&gt;
* '''[filter_second]''': is like [filter], but for the secondary unit.&lt;br /&gt;
** [[StandardUnitFilter]]: selection criteria&lt;br /&gt;
* '''[special_filter]''' and '''[special_filter_second]''': can be used to set some additional filtering criteria for the primary unit and the secondary unit that are not generally available in a standard unit filter. Can be used in events ''attack'', ''attacker_hits'', ''attacker_misses'', ''defender_hits'', ''defender_misses'' and ''attack_end''.&lt;br /&gt;
** '''weapon''': the name of the weapon used.&lt;br /&gt;
** '''terrain''': the code for the terrain the unit is on.&lt;br /&gt;
&lt;br /&gt;
=== Actions triggered by [event] ===&lt;br /&gt;
&lt;br /&gt;
After the trigger conditions have been met, all action tags within the [event] tag are executed in the order they are written in.&lt;br /&gt;
&lt;br /&gt;
There are 3 main types of actions:&lt;br /&gt;
* direct actions ([[DirectActionsWML]]) which have a direct effect on gameplay&lt;br /&gt;
* display actions ([[InterfaceActionsWML]]) which show something to the user&lt;br /&gt;
* internal actions ([[InternalActionsWML]]) which are used by WML internally&lt;br /&gt;
&lt;br /&gt;
Several actions use standard filters to find out which units&lt;br /&gt;
to execute the command on.  These are denoted by the phrases&lt;br /&gt;
&amp;quot;standard unit filter&amp;quot; and &amp;quot;standard location filter&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Nested events ===&lt;br /&gt;
&lt;br /&gt;
There is 1 special type of action: event creation.  By placing an '''[event]''' tag inside another '''[event]''' tag, the nested event is created when the nested event is encountered (when executing the contents of the event).  For example, you could create a portal that opens on turn 10.  The outer event executes on turn 10, creating the nested moveto event, which executes when a player steps on a certain spot.  An equivalent way of doing this would be to a single moveto event with an if statement to check for turn number, but using nested '''[event]''' tags is a simple and elegant way to accomplish more complex tasks without resorting to excessive if statements.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=turn 10&lt;br /&gt;
 &lt;br /&gt;
     [event]&lt;br /&gt;
         name=moveto&lt;br /&gt;
 &lt;br /&gt;
         [filter]&lt;br /&gt;
             x,y=5,8&lt;br /&gt;
         [/filter]&lt;br /&gt;
 &lt;br /&gt;
         # moving to 5,8 will trigger this event only on turn 10 and after&lt;br /&gt;
     [/event]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
== 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>Segfault</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=EasyCoding&amp;diff=25086</id>
		<title>EasyCoding</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=EasyCoding&amp;diff=25086"/>
		<updated>2008-04-04T19:46:40Z</updated>

		<summary type="html">&lt;p&gt;Segfault: /* Recall Event */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Foreword ==&lt;br /&gt;
This page is here to document easy to do coding tasks. It is not here to double the feature request database, and should only be filled by people that know the code well enough to judge the difficulty of a given task. &lt;br /&gt;
&lt;br /&gt;
If you are such a person, you should feel free to edit this page.&lt;br /&gt;
&lt;br /&gt;
If you're not, you should post a feature request and discuss your idea on the forum or IRC. A coder with better knowledge of the code might give you the green light to add your feature here.&lt;br /&gt;
&lt;br /&gt;
Anybody should feel free to add &amp;quot;clues&amp;quot; to any tasks, that is entry points, traps to avoid, person to contact to discuss and so on.&lt;br /&gt;
&lt;br /&gt;
If you plan to work on a feature, write your name at the bottom of the feature, with the date. Note that if you are too long at working on a feature I'll &amp;quot;free&amp;quot; it back (that is if you're not working on it. If you have problems implementing it, just tell us....)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:Boucman|Boucman]] 20:48, 3 October 2006 (CEST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since bugs are sometimes a good opportunity to get a first idea of the code, i will add some here that are easy to fix as soon as i stumble upon them (the one i had in mind is fixed already ;-).&lt;br /&gt;
&lt;br /&gt;
--Yogi Bear, 28 February 2008&lt;br /&gt;
&lt;br /&gt;
== MP related features ==&lt;br /&gt;
=== Add TTL to wesnothd bans ===&lt;br /&gt;
As per FR #3638 [https://gna.org/bugs/?3638]&lt;br /&gt;
=== Use different font for in-game chat ===&lt;br /&gt;
Since commas and dots are apparently hard to tell apart. As per FR #7470 [https://gna.org/bugs/?7470]&lt;br /&gt;
=== Allow lists for /ignore and similar ===&lt;br /&gt;
As per FR #7492 [https://gna.org/bugs/?7492]&lt;br /&gt;
&lt;br /&gt;
== WML related features ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== WML configurable village income / upkeep ===&lt;br /&gt;
Preferably as a [scenario], [side] or [campaign] keys. As per FR #6301 [https://gna.org/bugs/?6301]&lt;br /&gt;
=== Add support of [if] for [scenario] ===&lt;br /&gt;
As per FR #4539 [https://gna.org/bugs/?4539]&lt;br /&gt;
=== Allow an event multiple types ===&lt;br /&gt;
At the moment an [event] can only trigger on one kind of an event: a '''name=moveto''' only triggers on a move, a '''name=die''' only triggers on a death, and so on. However, it'd sometimes be useful to be able to define a list of types: if you'd have an [event] with '''name=attacker_misses,defender_misses''', then that event would trigger both on the attacker missing and defender missing. Currently, you'd have to create two identical [event]s to do this.&lt;br /&gt;
=== Cause preprocesor to throw a warning on undefined macro ===&lt;br /&gt;
At the moment preprocesor silently ignores undefined WML macros, make it throw a warning to the stderr or screen on encountering one.&lt;br /&gt;
-- patch submitted [https://gna.org/patch/?1035] by cjhopman&lt;br /&gt;
=== Make [have_unit] optionaly use full SUF ===&lt;br /&gt;
[have_unit] by default uses SUF but does not apply it to recall list. Introduce an optional key that will allow to lift that limitation.&lt;br /&gt;
=== Side-specific results ===&lt;br /&gt;
Giving result=defeat or result=victory for specific sides. ([http://gna.org/bugs/index.php?4960 FR #4960]) -- [[User:dlr365|dlr365]] -- patch submitted [https://gna.org/bugs/index.php?4960]&lt;br /&gt;
=== Recall Event ===&lt;br /&gt;
WML event trigger for recalling (the current one triggers on both recalls and recruits) ([http://gna.org/bugs/index.php?3622 FR #3622]) (please read the comments of the report for a proper description of how this should work) -- patch submitted [https://gna.org/patch/?1029]&lt;br /&gt;
&lt;br /&gt;
=== Enabling checking of damage dealt in WML ===&lt;br /&gt;
A WML variable should be set when triggering some combat-related events, allowing WML to know the amount of damage being dealt. ([http://gna.org/bugs/index.php?7673 FR #7673])&lt;br /&gt;
=== Support for leaderless multiplayergames ===&lt;br /&gt;
Add support for the WML key victory_when_enemies_defeated= in the scenario tag during multiplayergames. ([https://gna.org/bugs/index.php?8106 FR #8106])&lt;br /&gt;
=== Other Ideas ===&lt;br /&gt;
See [[FutureWML]]; some ideas there are easier than others.&lt;br /&gt;
&lt;br /&gt;
== Improvements to FormulaAI ==&lt;br /&gt;
&lt;br /&gt;
Add new formula functions, or minor improvements to the formula language. Make it easier to debug the formula language.&lt;br /&gt;
&lt;br /&gt;
== GUI related features ==&lt;br /&gt;
=== Change map paths from dots to dashes ===&lt;br /&gt;
Or even better allow dashes and allow choice between the two. As per FR #5522 [https://gna.org/bugs/?5522]&lt;br /&gt;
&lt;br /&gt;
-------------------&lt;br /&gt;
&lt;br /&gt;
Note at the moment Mordante is working on a new GUI system, these &lt;br /&gt;
changes will probably affect the way these items need to be implemented.&lt;br /&gt;
Contact Mordante on IRC before starting to work on these.&lt;br /&gt;
  &lt;br /&gt;
--[[User:SkeletonCrew|SkeletonCrew]] 14:04, 9 March 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
=== Theme Changes ===&lt;br /&gt;
* show number of owned villages/total villages (FR: #3135) (--[[User:Alink|alink]] done but must update help, doc, tooltip...)&lt;br /&gt;
* allow custom themes to display values of WML variables ([http://gna.org/bugs/index.php?6209 FR #6209])&lt;br /&gt;
* hide the hourglass item from the statusbar when there is no timer&lt;br /&gt;
&lt;br /&gt;
=== Widget Changes ===&lt;br /&gt;
* show side number, name and team association information in the status table &lt;br /&gt;
* make games sortable in the lobby (open slots, total number of players, era, XP modifier, gold per village, fog/shroud) &lt;br /&gt;
* input history (chat, commands, ..) - note: rujasu is working on this feature&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
=== More powerful village naming ===&lt;br /&gt;
'''Adding mountain names and other features to village names, having a second random name in village names'''&lt;br /&gt;
&lt;br /&gt;
Currently the village naming engine has a very good structure that could allow &lt;br /&gt;
more powerfull names to be generated. &lt;br /&gt;
Understanding how it works should be quite easy, and a few usefull improvements could be added.&lt;br /&gt;
&lt;br /&gt;
* Currently villages can use lake names and river names, this should be extended to other features like bridges, swamps, mountains etc...&lt;br /&gt;
* It would be nice to have a separate list of &amp;quot;first sylabus&amp;quot; and &amp;quot;last sylabus&amp;quot; for naming. That's not really needed in english, but some translations could use it&lt;br /&gt;
* Again, it is common to have villages with more than one &amp;quot;random&amp;quot; word in them. having a $name2 variable would be nice&lt;br /&gt;
&lt;br /&gt;
ACardboardRobot 2/2/07&lt;br /&gt;
&lt;br /&gt;
=== Debug Mode ===&lt;br /&gt;
* New debug command functionality (setting additional status.variables, possibly terrain)&lt;br /&gt;
&lt;br /&gt;
=== Additional Commandline Options ===&lt;br /&gt;
'''Done''' by lao, actually in trunk, revision 25325.&lt;br /&gt;
&lt;br /&gt;
It would be nice if one could start Wesnoth from commandline specifying whether one wants to connect to a mp-server, load the last savegame or wants to start a campaign. More detailed information and examples are given in the [http://www.wesnoth.org/forum/viewtopic.php?f=12&amp;amp;t=20243 idea forum].&lt;br /&gt;
&lt;br /&gt;
=== Add minimal regexp to friend list ===&lt;br /&gt;
&lt;br /&gt;
Lots of people use multiple nicks, usually postfixed with a number... it would be nice to have minimal regexp support in friend list to easily get who's there...&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[NotSoEasyCoding]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Future]]&lt;/div&gt;</summary>
		<author><name>Segfault</name></author>
		
	</entry>
</feed>