<?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=Mathijs</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=Mathijs"/>
	<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/Special:Contributions/Mathijs"/>
	<updated>2026-05-12T12:14:15Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.16</generator>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Template:BuildingScenariosNav&amp;diff=16457</id>
		<title>Template:BuildingScenariosNav</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Template:BuildingScenariosNav&amp;diff=16457"/>
		<updated>2007-07-15T11:44:34Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;navtemplate&amp;quot;&amp;gt;&lt;br /&gt;
==== Quick Navigation ====&lt;br /&gt;
'''[[BuildingScenarios]]'''&lt;br /&gt;
:*'''[[BuildingScenariosSimple]] - [[BuildingScenariosIntermediate]] - [[BuildingScenariosAdvanced]]'''&lt;br /&gt;
:*[[BuildingScenariosComments]]&lt;br /&gt;
:*[[BuildingScenariosSamples]] &lt;br /&gt;
:*[[BuildingScenariosFAQ]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
{| style=&amp;quot;float:right&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
__TOC__&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Template:BuildingScenariosNav&amp;diff=16456</id>
		<title>Template:BuildingScenariosNav</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Template:BuildingScenariosNav&amp;diff=16456"/>
		<updated>2007-07-15T11:42:43Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;navtemplate&amp;quot;&amp;gt;&lt;br /&gt;
==== Quick Navigation ====&lt;br /&gt;
'''[[BuildingScenarios]]'''&lt;br /&gt;
:*'''[[BuildingScenariosSimple]] - [[BuildingScenariosIntermediate]] - [[BuildingScenariosAdvanced]]'''&lt;br /&gt;
:*[[BuildingScenariosWML]]&lt;br /&gt;
:*[[BuildingScenariosComments]]&lt;br /&gt;
:*[[BuildingScenariosSamples]] &lt;br /&gt;
:*[[BuildingScenariosFAQ]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
{| style=&amp;quot;float:right&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
__TOC__&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16318</id>
		<title>BuildingScenariosAdvanced</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16318"/>
		<updated>2007-07-04T15:11:57Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Manipulating Variables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BuildingScenariosNav}}&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Advanced =&lt;br /&gt;
&lt;br /&gt;
== '''TODO:''' ==&lt;br /&gt;
This contained a repetition of what was already inside [[BuildingScenariosIntermediate]]&lt;br /&gt;
This should contain: &lt;br /&gt;
* (more) information about making &amp;amp; using preprocessors ([[PreprocessorRef]])&lt;br /&gt;
* information on guidelines concerning the general layout of a scenario file&lt;br /&gt;
* advanced filtering&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
Ayone who feels like writing something, go ahead&lt;br /&gt;
&lt;br /&gt;
== Advanced Events ==&lt;br /&gt;
&lt;br /&gt;
===Internal Actions===&lt;br /&gt;
See [[InternalActionsWML]] for a complete list of all tags and values. In what folows, the basics of variable creation and manipulation is explained.&lt;br /&gt;
&lt;br /&gt;
====Variables====&lt;br /&gt;
(This can be skipped if you're familiar with the concept of variables)&lt;br /&gt;
&lt;br /&gt;
(See [[VariablesWML]] for more)&lt;br /&gt;
&lt;br /&gt;
What are variables? Variables are basicly names. And with those names, we associate a certain value. You can compare this with the words, because words are associated with (several) objects, people, feelings, ... So a variable is just a way of communication: you and the computer (the Wesnoth engine really) are communicating wit each other!&lt;br /&gt;
&lt;br /&gt;
The most important aspect of variables is that they can change with time. (If they don't we call them constants.) Because they change, we can use them to trigger events, or to detect something has happened. You did this already in [[BuildingScenariosIntermediate]], using the [event] tag. We only wanted to trigger the actions inside the [event] when Konrad moved onto tile 4,8. To o so we had to make use of the variables x,y and description.&lt;br /&gt;
&lt;br /&gt;
Most variables provided by the engine are associated with a certain tag and can thus only be used inside them.&lt;br /&gt;
&lt;br /&gt;
====Manipulating====&lt;br /&gt;
These three actions can be executed in one single tag: ''''[set_variable]''''&lt;br /&gt;
Say we wanted to store 'Hello World' in a variable named ''message_to_the_world''. This is how we would do this:&lt;br /&gt;
 [event]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     #The name of our variable:&lt;br /&gt;
     name=message_to_the_world&lt;br /&gt;
     #The value of message_to_the_world, notice the underscore!&lt;br /&gt;
     value= _ &amp;quot;Hello World!&amp;quot;&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
 [/event]&lt;br /&gt;
Now, if we want to change the value to something else later on, e.g. 'Goodbye World', we can use the exact same code as above. &lt;br /&gt;
If we want to add something to our message we need to use this:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     name=message_to_the_world&lt;br /&gt;
     value= _ &amp;quot;$message_to_the_world Have a nice day!&amp;quot;&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
 [/event]&lt;br /&gt;
We've been using text variables (called strings) for now. But we can also store numbers and do some basic math with them. The following example clarifies this:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     name=number_x&lt;br /&gt;
     value=10&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     name=number_x&lt;br /&gt;
     add=-9&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     name=number_x&lt;br /&gt;
     multiply=200&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     name=number_x&lt;br /&gt;
     multiply=0.5&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
 [/event]&lt;br /&gt;
In the above, we set a variable named ''number_x'' to the value of 10. We substract 9 (=1), multiply with 200 (=200) and divide by two (or multiply with 0.5) resulting in 10 again.&lt;br /&gt;
&lt;br /&gt;
====Using Variables====&lt;br /&gt;
Now that we know how to create and manipulate variables, we'll learn how to use them.&lt;br /&gt;
First of all, you need to know what variables you always have at your disposal! In an event tag, these variables are &lt;br /&gt;
* side_number- the number of the current player's side (may be empty during start or prestart events)&lt;br /&gt;
* turn_number- the number of the current turn (may be empty during start or prestart events)&lt;br /&gt;
* x1- this is the x-coordinate of the location where the most recent event was triggered&lt;br /&gt;
* y1- this is the y-coordinate of the location where the most recent event was triggered&lt;br /&gt;
* x2- this is the x-coordinate of the location that assisted in triggering the most recent event&lt;br /&gt;
* y2- this is the y-coordinate of the location that assisted in triggering the most recent event&lt;br /&gt;
*  unit- inside an event, this is the unit at $x1,$y1 {{DevFeature}}&lt;br /&gt;
* second_unit- inside an event, this is the unit at $x2,$y2 {{DevFeature}}&lt;br /&gt;
* this_unit- inside a standard unit filter, this is the unit currently being considered for a possible match {{DevFeature}}&lt;br /&gt;
&lt;br /&gt;
Some of these are only containers for other variables. The ''unit'' variable is an example. You can acces those 'sub'-variables by using dots:&lt;br /&gt;
 unit.hitpoints&lt;br /&gt;
 unit.side&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
We will use $unit in an example to show you how you can use all this:&lt;br /&gt;
 [scenario]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
   [event]&lt;br /&gt;
     #A unit moves onto a tile:&lt;br /&gt;
     name=moveto&lt;br /&gt;
     [filter]&lt;br /&gt;
       x,y=25,26&lt;br /&gt;
     [/filter]&lt;br /&gt;
     &lt;br /&gt;
     &lt;br /&gt;
     [set_variable]&lt;br /&gt;
       name=unit.hitpoints&lt;br /&gt;
       add=-5&lt;br /&gt;
     [/set_variable]&lt;br /&gt;
     [set_variable]&lt;br /&gt;
       name=unit.status.poisoned&lt;br /&gt;
       value=yes&lt;br /&gt;
     [/set_variable]&lt;br /&gt;
 &lt;br /&gt;
     #After we have changed the values, we need to apply them.&lt;br /&gt;
     #We do this by using the unstore_unit tag like this:&lt;br /&gt;
     [unstore_unit]&lt;br /&gt;
       variable=$unit&lt;br /&gt;
       find_vacant=no&lt;br /&gt;
     [/unstore_unit]&lt;br /&gt;
   [/event]&lt;br /&gt;
   #We're finished!&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
There's one tag you don't know yet, and thats the '''[unstore_unit]''' tag. To explain this tag I'll explain it's counterparts; '''[store_unit]'''. [store_unit] stores a unit, or several units, in a variables you choose. You can then manipulate those variables as described above. However, you will need to apply these changes, and this is done by using the [unstore_unit] tag. For more see [http://www.wesnoth.org/wiki/InternalActionsWML#.5Bevent.5D InternalActions].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ====Conditionals: [if] and [while]====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Direct Actions===&lt;br /&gt;
===Interface Actions===&lt;br /&gt;
//--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[GetText]] &amp;amp; Translations ==&lt;br /&gt;
[http://www.wesnoth.org/forum/viewtopic.php?t=11445 As Viliam pointed out] (reordered his words):&lt;br /&gt;
&lt;br /&gt;
 Translating programs has two steps. The first step is making [...] scenarios that are&lt;br /&gt;
 &amp;lt;b&amp;gt;possible&amp;lt;/b&amp;gt; to translate; &amp;lt;b&amp;gt;preferably easy&amp;lt;/b&amp;gt; to translate. [...] The second &lt;br /&gt;
 step is the translating of the texts... leave this to  translators.&lt;br /&gt;
&lt;br /&gt;
So, as a campaign/scenario developer you have to make sure your campaign will be easy to translate. You can achieve this very easily by preceding all text the user might see on the screen with an underscore. This indicates it is a translatable string. [[GetText]] will then be able to look up a translation, based on your localisation settings.&lt;br /&gt;
To make it ever more clear, here's an example:&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 [message]&lt;br /&gt;
   description=Konrad&lt;br /&gt;
   message= &amp;lt;b&amp;gt;_&amp;lt;/b&amp;gt; &amp;quot;I am mighty Konrad! I fought many dummies and now I will fight you!&amp;quot;&lt;br /&gt;
 [/message]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
&lt;br /&gt;
The message key contains the words that will be displayed when Konrad speaks. So this is a translatable string. So it is preceded with an underscore.&lt;br /&gt;
&lt;br /&gt;
Viliam also said:&lt;br /&gt;
&lt;br /&gt;
 The most important rule of all is: &amp;lt;b&amp;gt;Do not split sentences.&amp;lt;/b&amp;gt;&lt;br /&gt;
 In some languages placing a word in a sentence requires more than mere string concatenation.&lt;br /&gt;
 Some languages use [http://en.wikipedia.org/wiki/Declension declension].&lt;br /&gt;
&lt;br /&gt;
== Quick Tag Index ==&lt;br /&gt;
'''[[ScenarioWML]]''' the top level tags [scenario], [multiplayer], [test], and [tutorial]&lt;br /&gt;
:* [[EventWML]] how to describe an event&lt;br /&gt;
:** [[FilterWML]]&lt;br /&gt;
:** [[DirectActionsWML]], [[InterfaceActionsWML]], [[InternalActionsWML]]&lt;br /&gt;
:* [[SideWML]] how to describe a side&lt;br /&gt;
:** [[SingleUnitWML]]&lt;br /&gt;
:** [[BuildingScenariosShroudData]]&lt;br /&gt;
:* [[MapGeneratorWML]] the random map generator&lt;br /&gt;
:* [[TimeWML]] how to describe a day&lt;br /&gt;
:* [[IntroWML]] how to describe the intro screen &lt;br /&gt;
:* [[UtilWML]] a set of preprocessors you can use&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[ScenarioWML]], [[SyntaxWML]] &amp;amp; [[ReferenceWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16317</id>
		<title>BuildingScenariosAdvanced</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16317"/>
		<updated>2007-07-04T15:10:59Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Storing, Creating and Changing Variables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BuildingScenariosNav}}&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Advanced =&lt;br /&gt;
&lt;br /&gt;
== '''TODO:''' ==&lt;br /&gt;
This contained a repetition of what was already inside [[BuildingScenariosIntermediate]]&lt;br /&gt;
This should contain: &lt;br /&gt;
* (more) information about making &amp;amp; using preprocessors ([[PreprocessorRef]])&lt;br /&gt;
* information on guidelines concerning the general layout of a scenario file&lt;br /&gt;
* advanced filtering&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
Ayone who feels like writing something, go ahead&lt;br /&gt;
&lt;br /&gt;
== Advanced Events ==&lt;br /&gt;
&lt;br /&gt;
===Internal Actions===&lt;br /&gt;
See [[InternalActionsWML]] for a complete list of all tags and values. In what folows, the basics of variable creation and manipulation is explained.&lt;br /&gt;
&lt;br /&gt;
====Variables====&lt;br /&gt;
(This can be skipped if you're familiar with the concept of variables)&lt;br /&gt;
&lt;br /&gt;
(See [[VariablesWML]] for more)&lt;br /&gt;
&lt;br /&gt;
What are variables? Variables are basicly names. And with those names, we associate a certain value. You can compare this with the words, because words are associated with (several) objects, people, feelings, ... So a variable is just a way of communication: you and the computer (the Wesnoth engine really) are communicating wit each other!&lt;br /&gt;
&lt;br /&gt;
The most important aspect of variables is that they can change with time. (If they don't we call them constants.) Because they change, we can use them to trigger events, or to detect something has happened. You did this already in [[BuildingScenariosIntermediate]], using the [event] tag. We only wanted to trigger the actions inside the [event] when Konrad moved onto tile 4,8. To o so we had to make use of the variables x,y and description.&lt;br /&gt;
&lt;br /&gt;
Most variables provided by the engine are associated with a certain tag and can thus only be used inside them.&lt;br /&gt;
&lt;br /&gt;
====Manipulating Variables====&lt;br /&gt;
These three actions can be executed in one single tag: ''''[set_variable]''''&lt;br /&gt;
Say we wanted to store 'Hello World' in a variable named ''message_to_the_world''. This is how we would do this:&lt;br /&gt;
 [event]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     #The name of our variable:&lt;br /&gt;
     name=message_to_the_world&lt;br /&gt;
     #The value of message_to_the_world, notice the underscore!&lt;br /&gt;
     value= _ &amp;quot;Hello World!&amp;quot;&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
 [/event]&lt;br /&gt;
Now, if we want to change the value to something else later on, e.g. 'Goodbye World', we can use the exact same code as above. &lt;br /&gt;
If we want to add something to our message we need to use this:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     name=message_to_the_world&lt;br /&gt;
     value= _ &amp;quot;$message_to_the_world Have a nice day!&amp;quot;&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
 [/event]&lt;br /&gt;
We've been using text variables (called strings) for now. But we can also store numbers and do some basic math with them. The following example clarifies this:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     name=number_x&lt;br /&gt;
     value=10&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     name=number_x&lt;br /&gt;
     add=-9&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     name=number_x&lt;br /&gt;
     multiply=200&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     name=number_x&lt;br /&gt;
     multiply=0.5&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
 [/event]&lt;br /&gt;
In the above, we set a variable named ''number_x'' to the value of 10. We substract 9 (=1), multiply with 200 (=200) and divide by two (or multiply with 0.5) resulting in 10 again.&lt;br /&gt;
&lt;br /&gt;
====Using Variables====&lt;br /&gt;
Now that we know how to create and manipulate variables, we'll learn how to use them.&lt;br /&gt;
First of all, you need to know what variables you always have at your disposal! In an event tag, these variables are &lt;br /&gt;
* side_number- the number of the current player's side (may be empty during start or prestart events)&lt;br /&gt;
* turn_number- the number of the current turn (may be empty during start or prestart events)&lt;br /&gt;
* x1- this is the x-coordinate of the location where the most recent event was triggered&lt;br /&gt;
* y1- this is the y-coordinate of the location where the most recent event was triggered&lt;br /&gt;
* x2- this is the x-coordinate of the location that assisted in triggering the most recent event&lt;br /&gt;
* y2- this is the y-coordinate of the location that assisted in triggering the most recent event&lt;br /&gt;
*  unit- inside an event, this is the unit at $x1,$y1 {{DevFeature}}&lt;br /&gt;
* second_unit- inside an event, this is the unit at $x2,$y2 {{DevFeature}}&lt;br /&gt;
* this_unit- inside a standard unit filter, this is the unit currently being considered for a possible match {{DevFeature}}&lt;br /&gt;
&lt;br /&gt;
Some of these are only containers for other variables. The ''unit'' variable is an example. You can acces those 'sub'-variables by using dots:&lt;br /&gt;
 unit.hitpoints&lt;br /&gt;
 unit.side&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
We will use $unit in an example to show you how you can use all this:&lt;br /&gt;
 [scenario]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
   [event]&lt;br /&gt;
     #A unit moves onto a tile:&lt;br /&gt;
     name=moveto&lt;br /&gt;
     [filter]&lt;br /&gt;
       x,y=25,26&lt;br /&gt;
     [/filter]&lt;br /&gt;
     &lt;br /&gt;
     &lt;br /&gt;
     [set_variable]&lt;br /&gt;
       name=unit.hitpoints&lt;br /&gt;
       add=-5&lt;br /&gt;
     [/set_variable]&lt;br /&gt;
     [set_variable]&lt;br /&gt;
       name=unit.status.poisoned&lt;br /&gt;
       value=yes&lt;br /&gt;
     [/set_variable]&lt;br /&gt;
 &lt;br /&gt;
     #After we have changed the values, we need to apply them.&lt;br /&gt;
     #We do this by using the unstore_unit tag like this:&lt;br /&gt;
     [unstore_unit]&lt;br /&gt;
       variable=$unit&lt;br /&gt;
       find_vacant=no&lt;br /&gt;
     [/unstore_unit]&lt;br /&gt;
   [/event]&lt;br /&gt;
   #We're finished!&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
There's one tag you don't know yet, and thats the '''[unstore_unit]''' tag. To explain this tag I'll explain it's counterparts; '''[store_unit]'''. [store_unit] stores a unit, or several units, in a variables you choose. You can then manipulate those variables as described above. However, you will need to apply these changes, and this is done by using the [unstore_unit] tag. For more see [http://www.wesnoth.org/wiki/InternalActionsWML#.5Bevent.5D InternalActions].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ====Conditionals: [if] and [while]====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Direct Actions===&lt;br /&gt;
===Interface Actions===&lt;br /&gt;
//--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[GetText]] &amp;amp; Translations ==&lt;br /&gt;
[http://www.wesnoth.org/forum/viewtopic.php?t=11445 As Viliam pointed out] (reordered his words):&lt;br /&gt;
&lt;br /&gt;
 Translating programs has two steps. The first step is making [...] scenarios that are&lt;br /&gt;
 &amp;lt;b&amp;gt;possible&amp;lt;/b&amp;gt; to translate; &amp;lt;b&amp;gt;preferably easy&amp;lt;/b&amp;gt; to translate. [...] The second &lt;br /&gt;
 step is the translating of the texts... leave this to  translators.&lt;br /&gt;
&lt;br /&gt;
So, as a campaign/scenario developer you have to make sure your campaign will be easy to translate. You can achieve this very easily by preceding all text the user might see on the screen with an underscore. This indicates it is a translatable string. [[GetText]] will then be able to look up a translation, based on your localisation settings.&lt;br /&gt;
To make it ever more clear, here's an example:&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 [message]&lt;br /&gt;
   description=Konrad&lt;br /&gt;
   message= &amp;lt;b&amp;gt;_&amp;lt;/b&amp;gt; &amp;quot;I am mighty Konrad! I fought many dummies and now I will fight you!&amp;quot;&lt;br /&gt;
 [/message]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
&lt;br /&gt;
The message key contains the words that will be displayed when Konrad speaks. So this is a translatable string. So it is preceded with an underscore.&lt;br /&gt;
&lt;br /&gt;
Viliam also said:&lt;br /&gt;
&lt;br /&gt;
 The most important rule of all is: &amp;lt;b&amp;gt;Do not split sentences.&amp;lt;/b&amp;gt;&lt;br /&gt;
 In some languages placing a word in a sentence requires more than mere string concatenation.&lt;br /&gt;
 Some languages use [http://en.wikipedia.org/wiki/Declension declension].&lt;br /&gt;
&lt;br /&gt;
== Quick Tag Index ==&lt;br /&gt;
'''[[ScenarioWML]]''' the top level tags [scenario], [multiplayer], [test], and [tutorial]&lt;br /&gt;
:* [[EventWML]] how to describe an event&lt;br /&gt;
:** [[FilterWML]]&lt;br /&gt;
:** [[DirectActionsWML]], [[InterfaceActionsWML]], [[InternalActionsWML]]&lt;br /&gt;
:* [[SideWML]] how to describe a side&lt;br /&gt;
:** [[SingleUnitWML]]&lt;br /&gt;
:** [[BuildingScenariosShroudData]]&lt;br /&gt;
:* [[MapGeneratorWML]] the random map generator&lt;br /&gt;
:* [[TimeWML]] how to describe a day&lt;br /&gt;
:* [[IntroWML]] how to describe the intro screen &lt;br /&gt;
:* [[UtilWML]] a set of preprocessors you can use&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[ScenarioWML]], [[SyntaxWML]] &amp;amp; [[ReferenceWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16316</id>
		<title>BuildingScenariosAdvanced</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16316"/>
		<updated>2007-07-04T15:08:46Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* GetText &amp;amp; Translations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BuildingScenariosNav}}&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Advanced =&lt;br /&gt;
&lt;br /&gt;
== '''TODO:''' ==&lt;br /&gt;
This contained a repetition of what was already inside [[BuildingScenariosIntermediate]]&lt;br /&gt;
This should contain: &lt;br /&gt;
* (more) information about making &amp;amp; using preprocessors ([[PreprocessorRef]])&lt;br /&gt;
* information on guidelines concerning the general layout of a scenario file&lt;br /&gt;
* advanced filtering&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
Ayone who feels like writing something, go ahead&lt;br /&gt;
&lt;br /&gt;
== Advanced Events ==&lt;br /&gt;
&lt;br /&gt;
===Internal Actions===&lt;br /&gt;
See [[InternalActionsWML]] for a complete list of all tags and values. In what folows, the basics of variable creation and manipulation is explained.&lt;br /&gt;
&lt;br /&gt;
====Variables====&lt;br /&gt;
(This can be skipped if you're familiar with the concept of variables)&lt;br /&gt;
&lt;br /&gt;
(See [[VariablesWML]] for more)&lt;br /&gt;
&lt;br /&gt;
What are variables? Variables are basicly names. And with those names, we associate a certain value. You can compare this with the words, because words are associated with (several) objects, people, feelings, ... So a variable is just a way of communication: you and the computer (the Wesnoth engine really) are communicating wit each other!&lt;br /&gt;
&lt;br /&gt;
The most important aspect of variables is that they can change with time. (If they don't we call them constants.) Because they change, we can use them to trigger events, or to detect something has happened. You did this already in [[BuildingScenariosIntermediate]], using the [event] tag. We only wanted to trigger the actions inside the [event] when Konrad moved onto tile 4,8. To o so we had to make use of the variables x,y and description.&lt;br /&gt;
&lt;br /&gt;
Most variables provided by the engine are associated with a certain tag and can thus only be used inside them.&lt;br /&gt;
&lt;br /&gt;
====Storing, Creating and Changing Variables====&lt;br /&gt;
These three actions can be executed in one single tag: ''''[set_variable]''''&lt;br /&gt;
Say we wanted to store 'Hello World' in a variable named ''message_to_the_world''. This is how we would do this:&lt;br /&gt;
 [event]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     #The name of our variable:&lt;br /&gt;
     name=message_to_the_world&lt;br /&gt;
     #The value of message_to_the_world, notice the underscore!&lt;br /&gt;
     value= _ &amp;quot;Hello World!&amp;quot;&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
 [/event]&lt;br /&gt;
Now, if we want to change the value to something else later on, e.g. 'Goodbye World', we can use the exact same code as above. &lt;br /&gt;
If we want to add something to our message we need to use this:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     name=message_to_the_world&lt;br /&gt;
     value= _ &amp;quot;$message_to_the_world Have a nice day!&amp;quot;&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
 [/event]&lt;br /&gt;
We've been using text variables (called strings) for now. But we can also store numbers and do some basic math with them. The following example clarifies this:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     name=number_x&lt;br /&gt;
     value=10&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     name=number_x&lt;br /&gt;
     add=-9&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     name=number_x&lt;br /&gt;
     multiply=200&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     name=number_x&lt;br /&gt;
     multiply=0.5&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
 [/event]&lt;br /&gt;
In the above, we set a variable named ''number_x'' to the value of 10. We substract 9 (=1), multiply with 200 (=200) and divide by two (or multiply with 0.5) resulting in 10 again.&lt;br /&gt;
&lt;br /&gt;
====Using Variables====&lt;br /&gt;
Now that we know how to create and manipulate variables, we'll learn how to use them.&lt;br /&gt;
First of all, you need to know what variables you always have at your disposal! In an event tag, these variables are &lt;br /&gt;
* side_number- the number of the current player's side (may be empty during start or prestart events)&lt;br /&gt;
* turn_number- the number of the current turn (may be empty during start or prestart events)&lt;br /&gt;
* x1- this is the x-coordinate of the location where the most recent event was triggered&lt;br /&gt;
* y1- this is the y-coordinate of the location where the most recent event was triggered&lt;br /&gt;
* x2- this is the x-coordinate of the location that assisted in triggering the most recent event&lt;br /&gt;
* y2- this is the y-coordinate of the location that assisted in triggering the most recent event&lt;br /&gt;
*  unit- inside an event, this is the unit at $x1,$y1 {{DevFeature}}&lt;br /&gt;
* second_unit- inside an event, this is the unit at $x2,$y2 {{DevFeature}}&lt;br /&gt;
* this_unit- inside a standard unit filter, this is the unit currently being considered for a possible match {{DevFeature}}&lt;br /&gt;
&lt;br /&gt;
Some of these are only containers for other variables. The ''unit'' variable is an example. You can acces those 'sub'-variables by using dots:&lt;br /&gt;
 unit.hitpoints&lt;br /&gt;
 unit.side&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
We will use $unit in an example to show you how you can use all this:&lt;br /&gt;
 [scenario]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
   [event]&lt;br /&gt;
     #A unit moves onto a tile:&lt;br /&gt;
     name=moveto&lt;br /&gt;
     [filter]&lt;br /&gt;
       x,y=25,26&lt;br /&gt;
     [/filter]&lt;br /&gt;
     &lt;br /&gt;
     &lt;br /&gt;
     [set_variable]&lt;br /&gt;
       name=unit.hitpoints&lt;br /&gt;
       add=-5&lt;br /&gt;
     [/set_variable]&lt;br /&gt;
     [set_variable]&lt;br /&gt;
       name=unit.status.poisoned&lt;br /&gt;
       value=yes&lt;br /&gt;
     [/set_variable]&lt;br /&gt;
 &lt;br /&gt;
     #After we have changed the values, we need to apply them.&lt;br /&gt;
     #We do this by using the unstore_unit tag like this:&lt;br /&gt;
     [unstore_unit]&lt;br /&gt;
       variable=$unit&lt;br /&gt;
       find_vacant=no&lt;br /&gt;
     [/unstore_unit]&lt;br /&gt;
   [/event]&lt;br /&gt;
   #We're finished!&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
There's one tag you don't know yet, and thats the '''[unstore_unit]''' tag. To explain this tag I'll explain it's counterparts; '''[store_unit]'''. [store_unit] stores a unit, or several units, in a variables you choose. You can then manipulate those variables as described above. However, you will need to apply these changes, and this is done by using the [unstore_unit] tag. For more see [http://www.wesnoth.org/wiki/InternalActionsWML#.5Bevent.5D InternalActions].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ====Conditionals: [if] and [while]====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Direct Actions===&lt;br /&gt;
===Interface Actions===&lt;br /&gt;
//--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[GetText]] &amp;amp; Translations ==&lt;br /&gt;
[http://www.wesnoth.org/forum/viewtopic.php?t=11445 As Viliam pointed out] (reordered his words):&lt;br /&gt;
&lt;br /&gt;
 Translating programs has two steps. The first step is making [...] scenarios that are&lt;br /&gt;
 &amp;lt;b&amp;gt;possible&amp;lt;/b&amp;gt; to translate; &amp;lt;b&amp;gt;preferably easy&amp;lt;/b&amp;gt; to translate. [...] The second &lt;br /&gt;
 step is the translating of the texts... leave this to  translators.&lt;br /&gt;
&lt;br /&gt;
So, as a campaign/scenario developer you have to make sure your campaign will be easy to translate. You can achieve this very easily by preceding all text the user might see on the screen with an underscore. This indicates it is a translatable string. [[GetText]] will then be able to look up a translation, based on your localisation settings.&lt;br /&gt;
To make it ever more clear, here's an example:&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 [message]&lt;br /&gt;
   description=Konrad&lt;br /&gt;
   message= &amp;lt;b&amp;gt;_&amp;lt;/b&amp;gt; &amp;quot;I am mighty Konrad! I fought many dummies and now I will fight you!&amp;quot;&lt;br /&gt;
 [/message]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
&lt;br /&gt;
The message key contains the words that will be displayed when Konrad speaks. So this is a translatable string. So it is preceded with an underscore.&lt;br /&gt;
&lt;br /&gt;
Viliam also said:&lt;br /&gt;
&lt;br /&gt;
 The most important rule of all is: &amp;lt;b&amp;gt;Do not split sentences.&amp;lt;/b&amp;gt;&lt;br /&gt;
 In some languages placing a word in a sentence requires more than mere string concatenation.&lt;br /&gt;
 Some languages use [http://en.wikipedia.org/wiki/Declension declension].&lt;br /&gt;
&lt;br /&gt;
== Quick Tag Index ==&lt;br /&gt;
'''[[ScenarioWML]]''' the top level tags [scenario], [multiplayer], [test], and [tutorial]&lt;br /&gt;
:* [[EventWML]] how to describe an event&lt;br /&gt;
:** [[FilterWML]]&lt;br /&gt;
:** [[DirectActionsWML]], [[InterfaceActionsWML]], [[InternalActionsWML]]&lt;br /&gt;
:* [[SideWML]] how to describe a side&lt;br /&gt;
:** [[SingleUnitWML]]&lt;br /&gt;
:** [[BuildingScenariosShroudData]]&lt;br /&gt;
:* [[MapGeneratorWML]] the random map generator&lt;br /&gt;
:* [[TimeWML]] how to describe a day&lt;br /&gt;
:* [[IntroWML]] how to describe the intro screen &lt;br /&gt;
:* [[UtilWML]] a set of preprocessors you can use&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[ScenarioWML]], [[SyntaxWML]] &amp;amp; [[ReferenceWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16315</id>
		<title>BuildingScenariosAdvanced</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16315"/>
		<updated>2007-07-04T15:07:48Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Using Variables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BuildingScenariosNav}}&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Advanced =&lt;br /&gt;
&lt;br /&gt;
== '''TODO:''' ==&lt;br /&gt;
This contained a repetition of what was already inside [[BuildingScenariosIntermediate]]&lt;br /&gt;
This should contain: &lt;br /&gt;
* (more) information about making &amp;amp; using preprocessors ([[PreprocessorRef]])&lt;br /&gt;
* information on guidelines concerning the general layout of a scenario file&lt;br /&gt;
* advanced filtering&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
Ayone who feels like writing something, go ahead&lt;br /&gt;
&lt;br /&gt;
== Advanced Events ==&lt;br /&gt;
&lt;br /&gt;
===Internal Actions===&lt;br /&gt;
See [[InternalActionsWML]] for a complete list of all tags and values. In what folows, the basics of variable creation and manipulation is explained.&lt;br /&gt;
&lt;br /&gt;
====Variables====&lt;br /&gt;
(This can be skipped if you're familiar with the concept of variables)&lt;br /&gt;
&lt;br /&gt;
(See [[VariablesWML]] for more)&lt;br /&gt;
&lt;br /&gt;
What are variables? Variables are basicly names. And with those names, we associate a certain value. You can compare this with the words, because words are associated with (several) objects, people, feelings, ... So a variable is just a way of communication: you and the computer (the Wesnoth engine really) are communicating wit each other!&lt;br /&gt;
&lt;br /&gt;
The most important aspect of variables is that they can change with time. (If they don't we call them constants.) Because they change, we can use them to trigger events, or to detect something has happened. You did this already in [[BuildingScenariosIntermediate]], using the [event] tag. We only wanted to trigger the actions inside the [event] when Konrad moved onto tile 4,8. To o so we had to make use of the variables x,y and description.&lt;br /&gt;
&lt;br /&gt;
Most variables provided by the engine are associated with a certain tag and can thus only be used inside them.&lt;br /&gt;
&lt;br /&gt;
====Storing, Creating and Changing Variables====&lt;br /&gt;
These three actions can be executed in one single tag: ''''[set_variable]''''&lt;br /&gt;
Say we wanted to store 'Hello World' in a variable named ''message_to_the_world''. This is how we would do this:&lt;br /&gt;
 [event]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     #The name of our variable:&lt;br /&gt;
     name=message_to_the_world&lt;br /&gt;
     #The value of message_to_the_world, notice the underscore!&lt;br /&gt;
     value= _ &amp;quot;Hello World!&amp;quot;&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
 [/event]&lt;br /&gt;
Now, if we want to change the value to something else later on, e.g. 'Goodbye World', we can use the exact same code as above. &lt;br /&gt;
If we want to add something to our message we need to use this:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     name=message_to_the_world&lt;br /&gt;
     value= _ &amp;quot;$message_to_the_world Have a nice day!&amp;quot;&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
 [/event]&lt;br /&gt;
We've been using text variables (called strings) for now. But we can also store numbers and do some basic math with them. The following example clarifies this:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     name=number_x&lt;br /&gt;
     value=10&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     name=number_x&lt;br /&gt;
     add=-9&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     name=number_x&lt;br /&gt;
     multiply=200&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     name=number_x&lt;br /&gt;
     multiply=0.5&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
 [/event]&lt;br /&gt;
In the above, we set a variable named ''number_x'' to the value of 10. We substract 9 (=1), multiply with 200 (=200) and divide by two (or multiply with 0.5) resulting in 10 again.&lt;br /&gt;
&lt;br /&gt;
====Using Variables====&lt;br /&gt;
Now that we know how to create and manipulate variables, we'll learn how to use them.&lt;br /&gt;
First of all, you need to know what variables you always have at your disposal! In an event tag, these variables are &lt;br /&gt;
* side_number- the number of the current player's side (may be empty during start or prestart events)&lt;br /&gt;
* turn_number- the number of the current turn (may be empty during start or prestart events)&lt;br /&gt;
* x1- this is the x-coordinate of the location where the most recent event was triggered&lt;br /&gt;
* y1- this is the y-coordinate of the location where the most recent event was triggered&lt;br /&gt;
* x2- this is the x-coordinate of the location that assisted in triggering the most recent event&lt;br /&gt;
* y2- this is the y-coordinate of the location that assisted in triggering the most recent event&lt;br /&gt;
*  unit- inside an event, this is the unit at $x1,$y1 {{DevFeature}}&lt;br /&gt;
* second_unit- inside an event, this is the unit at $x2,$y2 {{DevFeature}}&lt;br /&gt;
* this_unit- inside a standard unit filter, this is the unit currently being considered for a possible match {{DevFeature}}&lt;br /&gt;
&lt;br /&gt;
Some of these are only containers for other variables. The ''unit'' variable is an example. You can acces those 'sub'-variables by using dots:&lt;br /&gt;
 unit.hitpoints&lt;br /&gt;
 unit.side&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
We will use $unit in an example to show you how you can use all this:&lt;br /&gt;
 [scenario]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
   [event]&lt;br /&gt;
     #A unit moves onto a tile:&lt;br /&gt;
     name=moveto&lt;br /&gt;
     [filter]&lt;br /&gt;
       x,y=25,26&lt;br /&gt;
     [/filter]&lt;br /&gt;
     &lt;br /&gt;
     &lt;br /&gt;
     [set_variable]&lt;br /&gt;
       name=unit.hitpoints&lt;br /&gt;
       add=-5&lt;br /&gt;
     [/set_variable]&lt;br /&gt;
     [set_variable]&lt;br /&gt;
       name=unit.status.poisoned&lt;br /&gt;
       value=yes&lt;br /&gt;
     [/set_variable]&lt;br /&gt;
 &lt;br /&gt;
     #After we have changed the values, we need to apply them.&lt;br /&gt;
     #We do this by using the unstore_unit tag like this:&lt;br /&gt;
     [unstore_unit]&lt;br /&gt;
       variable=$unit&lt;br /&gt;
       find_vacant=no&lt;br /&gt;
     [/unstore_unit]&lt;br /&gt;
   [/event]&lt;br /&gt;
   #We're finished!&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
There's one tag you don't know yet, and thats the '''[unstore_unit]''' tag. To explain this tag I'll explain it's counterparts; '''[store_unit]'''. [store_unit] stores a unit, or several units, in a variables you choose. You can then manipulate those variables as described above. However, you will need to apply these changes, and this is done by using the [unstore_unit] tag. For more see [http://www.wesnoth.org/wiki/InternalActionsWML#.5Bevent.5D InternalActions].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ====Conditionals: [if] and [while]====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Direct Actions===&lt;br /&gt;
===Interface Actions===&lt;br /&gt;
//--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[GetText]] &amp;amp; Translations ==&lt;br /&gt;
[http://www.wesnoth.org/forum/viewtopic.php?t=11445 As Viliam pointed out] (reordered his words):&lt;br /&gt;
&lt;br /&gt;
 Translating programs has two steps. The first step is making [...] scenarios that are &amp;lt;b&amp;gt;possible&amp;lt;/b&amp;gt; to translate; &lt;br /&gt;
 &amp;lt;b&amp;gt;preferably easy&amp;lt;/b&amp;gt; to translate. [...] The second step is the translating of the texts... leave this to  translators.&lt;br /&gt;
&lt;br /&gt;
So, as a campaign/scenario developer you have to make sure your campaign will be easy to translate. You can achieve this very easily by preceding all text the user might see on the screen with an underscore. This indicates it is a translatable string. [[GetText]] will then be able to look up a translation, based on your localisation settings.&lt;br /&gt;
To make it ever more clear, here's an example:&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 [message]&lt;br /&gt;
   description=Konrad&lt;br /&gt;
   message= &amp;lt;b&amp;gt;_&amp;lt;/b&amp;gt; &amp;quot;I am mighty Konrad! I fought many dummies and now I will fight you!&amp;quot;&lt;br /&gt;
 [/message]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
&lt;br /&gt;
The message key contains the words that will be displayed when Konrad speaks. So this is a translatable string. So it is preceded with an underscore.&lt;br /&gt;
&lt;br /&gt;
Viliam also said:&lt;br /&gt;
&lt;br /&gt;
 The most important rule of all is: &amp;lt;b&amp;gt;Do not split sentences.&amp;lt;/b&amp;gt;&lt;br /&gt;
 In some languages placing a word in a sentence requires more than mere string concatenation.&lt;br /&gt;
 Some languages use [http://en.wikipedia.org/wiki/Declension declension].&lt;br /&gt;
&lt;br /&gt;
== Quick Tag Index ==&lt;br /&gt;
'''[[ScenarioWML]]''' the top level tags [scenario], [multiplayer], [test], and [tutorial]&lt;br /&gt;
:* [[EventWML]] how to describe an event&lt;br /&gt;
:** [[FilterWML]]&lt;br /&gt;
:** [[DirectActionsWML]], [[InterfaceActionsWML]], [[InternalActionsWML]]&lt;br /&gt;
:* [[SideWML]] how to describe a side&lt;br /&gt;
:** [[SingleUnitWML]]&lt;br /&gt;
:** [[BuildingScenariosShroudData]]&lt;br /&gt;
:* [[MapGeneratorWML]] the random map generator&lt;br /&gt;
:* [[TimeWML]] how to describe a day&lt;br /&gt;
:* [[IntroWML]] how to describe the intro screen &lt;br /&gt;
:* [[UtilWML]] a set of preprocessors you can use&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[ScenarioWML]], [[SyntaxWML]] &amp;amp; [[ReferenceWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16314</id>
		<title>BuildingScenariosAdvanced</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16314"/>
		<updated>2007-07-04T15:03:48Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Filters &amp;amp; Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BuildingScenariosNav}}&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Advanced =&lt;br /&gt;
&lt;br /&gt;
== '''TODO:''' ==&lt;br /&gt;
This contained a repetition of what was already inside [[BuildingScenariosIntermediate]]&lt;br /&gt;
This should contain: &lt;br /&gt;
* (more) information about making &amp;amp; using preprocessors ([[PreprocessorRef]])&lt;br /&gt;
* information on guidelines concerning the general layout of a scenario file&lt;br /&gt;
* advanced filtering&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
Ayone who feels like writing something, go ahead&lt;br /&gt;
&lt;br /&gt;
== Advanced Events ==&lt;br /&gt;
&lt;br /&gt;
===Internal Actions===&lt;br /&gt;
See [[InternalActionsWML]] for a complete list of all tags and values. In what folows, the basics of variable creation and manipulation is explained.&lt;br /&gt;
&lt;br /&gt;
====Variables====&lt;br /&gt;
(This can be skipped if you're familiar with the concept of variables)&lt;br /&gt;
&lt;br /&gt;
(See [[VariablesWML]] for more)&lt;br /&gt;
&lt;br /&gt;
What are variables? Variables are basicly names. And with those names, we associate a certain value. You can compare this with the words, because words are associated with (several) objects, people, feelings, ... So a variable is just a way of communication: you and the computer (the Wesnoth engine really) are communicating wit each other!&lt;br /&gt;
&lt;br /&gt;
The most important aspect of variables is that they can change with time. (If they don't we call them constants.) Because they change, we can use them to trigger events, or to detect something has happened. You did this already in [[BuildingScenariosIntermediate]], using the [event] tag. We only wanted to trigger the actions inside the [event] when Konrad moved onto tile 4,8. To o so we had to make use of the variables x,y and description.&lt;br /&gt;
&lt;br /&gt;
Most variables provided by the engine are associated with a certain tag and can thus only be used inside them.&lt;br /&gt;
&lt;br /&gt;
====Storing, Creating and Changing Variables====&lt;br /&gt;
These three actions can be executed in one single tag: ''''[set_variable]''''&lt;br /&gt;
Say we wanted to store 'Hello World' in a variable named ''message_to_the_world''. This is how we would do this:&lt;br /&gt;
 [event]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     #The name of our variable:&lt;br /&gt;
     name=message_to_the_world&lt;br /&gt;
     #The value of message_to_the_world, notice the underscore!&lt;br /&gt;
     value= _ &amp;quot;Hello World!&amp;quot;&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
 [/event]&lt;br /&gt;
Now, if we want to change the value to something else later on, e.g. 'Goodbye World', we can use the exact same code as above. &lt;br /&gt;
If we want to add something to our message we need to use this:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     name=message_to_the_world&lt;br /&gt;
     value= _ &amp;quot;$message_to_the_world Have a nice day!&amp;quot;&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
 [/event]&lt;br /&gt;
We've been using text variables (called strings) for now. But we can also store numbers and do some basic math with them. The following example clarifies this:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     name=number_x&lt;br /&gt;
     value=10&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     name=number_x&lt;br /&gt;
     add=-9&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     name=number_x&lt;br /&gt;
     multiply=200&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
   [set_variable]&lt;br /&gt;
     name=number_x&lt;br /&gt;
     multiply=0.5&lt;br /&gt;
   [/set_variable]&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
 [/event]&lt;br /&gt;
In the above, we set a variable named ''number_x'' to the value of 10. We substract 9 (=1), multiply with 200 (=200) and divide by two (or multiply with 0.5) resulting in 10 again.&lt;br /&gt;
&lt;br /&gt;
====Using Variables====&lt;br /&gt;
Now that we know how to create and manipulate variables, we'll learn how to use them.&lt;br /&gt;
First of all, you need to know what variables you always have at your disposal! In an event tag, these variables are &lt;br /&gt;
* side_number- the number of the current player's side (may be empty during start or prestart events)&lt;br /&gt;
* turn_number- the number of the current turn (may be empty during start or prestart events)&lt;br /&gt;
* x1- this is the x-coordinate of the location where the most recent event was triggered&lt;br /&gt;
* y1- this is the y-coordinate of the location where the most recent event was triggered&lt;br /&gt;
* x2- this is the x-coordinate of the location that assisted in triggering the most recent event&lt;br /&gt;
* y2- this is the y-coordinate of the location that assisted in triggering the most recent event&lt;br /&gt;
*  unit- inside an event, this is the unit at $x1,$y1 {{DevFeature}}&lt;br /&gt;
* second_unit- inside an event, this is the unit at $x2,$y2 {{DevFeature}}&lt;br /&gt;
* this_unit- inside a standard unit filter, this is the unit currently being considered for a possible match {{DevFeature}}&lt;br /&gt;
&lt;br /&gt;
Some of these are only containers for other variables. The ''unit'' variable is an example. You can acces those 'sub'-variables by using dots:&lt;br /&gt;
 unit.hitpoints&lt;br /&gt;
 unit.side&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
We will use $unit in an example to show you how you can use all this:&lt;br /&gt;
 [scenario]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
   [event]&lt;br /&gt;
     #A unit moves onto a tile:&lt;br /&gt;
     name=moveto&lt;br /&gt;
     [filter]&lt;br /&gt;
       x,y=25,26&lt;br /&gt;
     [/filter]&lt;br /&gt;
     &lt;br /&gt;
     &lt;br /&gt;
     [set_variable]&lt;br /&gt;
       name=unit.hitpoints&lt;br /&gt;
       add=-5&lt;br /&gt;
     [/set_variable]&lt;br /&gt;
     [set_variable]&lt;br /&gt;
       name=unit.status.poisoned&lt;br /&gt;
       value=yes&lt;br /&gt;
     [/set_variable]&lt;br /&gt;
 &lt;br /&gt;
     #After we have changed the values, we need to apply them.&lt;br /&gt;
     #We do this by using the unstore_unit tag like this:&lt;br /&gt;
     [unstore_unit]&lt;br /&gt;
       variable=$unit&lt;br /&gt;
       find_vacant=no&lt;br /&gt;
     [/unstore_unit]&lt;br /&gt;
   [/event]&lt;br /&gt;
   #We're finished!&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
There's one tag you don't know yet, and thats the ''''[unstore_unit]''''' tag. To explain this tag I'll explain it's counterparts; '''''[store_unit]'''''. [store_unit] stores a unit, or several units, in a variables you choose. You can then manipulate those variables as described above. However, you will need to apply these changes, and this is done by using the [unstore_unit] tag. For more see [InternalActionsWML#.5Bevent.5D InternalActions].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ====Conditionals: [if] and [while]====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Direct Actions===&lt;br /&gt;
===Interface Actions===&lt;br /&gt;
//--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[GetText]] &amp;amp; Translations ==&lt;br /&gt;
[http://www.wesnoth.org/forum/viewtopic.php?t=11445 As Viliam pointed out] (reordered his words):&lt;br /&gt;
&lt;br /&gt;
 Translating programs has two steps. The first step is making [...] scenarios that are &amp;lt;b&amp;gt;possible&amp;lt;/b&amp;gt; to translate; &lt;br /&gt;
 &amp;lt;b&amp;gt;preferably easy&amp;lt;/b&amp;gt; to translate. [...] The second step is the translating of the texts... leave this to  translators.&lt;br /&gt;
&lt;br /&gt;
So, as a campaign/scenario developer you have to make sure your campaign will be easy to translate. You can achieve this very easily by preceding all text the user might see on the screen with an underscore. This indicates it is a translatable string. [[GetText]] will then be able to look up a translation, based on your localisation settings.&lt;br /&gt;
To make it ever more clear, here's an example:&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 [message]&lt;br /&gt;
   description=Konrad&lt;br /&gt;
   message= &amp;lt;b&amp;gt;_&amp;lt;/b&amp;gt; &amp;quot;I am mighty Konrad! I fought many dummies and now I will fight you!&amp;quot;&lt;br /&gt;
 [/message]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
&lt;br /&gt;
The message key contains the words that will be displayed when Konrad speaks. So this is a translatable string. So it is preceded with an underscore.&lt;br /&gt;
&lt;br /&gt;
Viliam also said:&lt;br /&gt;
&lt;br /&gt;
 The most important rule of all is: &amp;lt;b&amp;gt;Do not split sentences.&amp;lt;/b&amp;gt;&lt;br /&gt;
 In some languages placing a word in a sentence requires more than mere string concatenation.&lt;br /&gt;
 Some languages use [http://en.wikipedia.org/wiki/Declension declension].&lt;br /&gt;
&lt;br /&gt;
== Quick Tag Index ==&lt;br /&gt;
'''[[ScenarioWML]]''' the top level tags [scenario], [multiplayer], [test], and [tutorial]&lt;br /&gt;
:* [[EventWML]] how to describe an event&lt;br /&gt;
:** [[FilterWML]]&lt;br /&gt;
:** [[DirectActionsWML]], [[InterfaceActionsWML]], [[InternalActionsWML]]&lt;br /&gt;
:* [[SideWML]] how to describe a side&lt;br /&gt;
:** [[SingleUnitWML]]&lt;br /&gt;
:** [[BuildingScenariosShroudData]]&lt;br /&gt;
:* [[MapGeneratorWML]] the random map generator&lt;br /&gt;
:* [[TimeWML]] how to describe a day&lt;br /&gt;
:* [[IntroWML]] how to describe the intro screen &lt;br /&gt;
:* [[UtilWML]] a set of preprocessors you can use&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[ScenarioWML]], [[SyntaxWML]] &amp;amp; [[ReferenceWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16167</id>
		<title>BuildingScenariosAdvanced</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16167"/>
		<updated>2007-06-28T15:53:40Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Filters &amp;amp; Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BuildingScenariosNav}}&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Advanced =&lt;br /&gt;
&lt;br /&gt;
== '''TODO:''' ==&lt;br /&gt;
This contained a repetition of what was already inside [[BuildingScenariosIntermediate]]&lt;br /&gt;
This should contain: &lt;br /&gt;
* (more) information about making &amp;amp; using preprocessors ([[PreprocessorRef]])&lt;br /&gt;
* information on guidelines concerning the general layout of a scenario file&lt;br /&gt;
* advanced filtering&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
Ayone who feels like writing something, go ahead&lt;br /&gt;
&lt;br /&gt;
== Filters &amp;amp; Events ==&lt;br /&gt;
When you are making campaigns, you will have to be able to control the game flow. This means you will need to interfere with the game if certain events arise. Examples: &lt;br /&gt;
* There's a radioactive stone inside a cave. Units entering this cave (it has circular shape) lose 5HP and are poisoned. The cave is at tile (25,26) and has a radius of 8 tiles. This is the code that would achieve this:&lt;br /&gt;
&lt;br /&gt;
 [scenario]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
   [event]&lt;br /&gt;
     #A unit has moved, maybe it moved inside the cave? Let's find out!&lt;br /&gt;
     name=moveto&lt;br /&gt;
     #Here's our filter! {{DevFeature}} see below for earlier version&lt;br /&gt;
     [filter]&lt;br /&gt;
       x,y=25,26&lt;br /&gt;
       radius=8&lt;br /&gt;
     [/filter]&lt;br /&gt;
     &lt;br /&gt;
     #We can use the variable $unit inside an event tag to change the&lt;br /&gt;
     #unit that triggered the action. See [http://www.wesnoth.org/wiki/InternalActionsWML#.5Bevent.5D event internal actions]. Inside a set_variable tag we can&lt;br /&gt;
     #adjust the values of some of the unit characteristisc, like it's hitpoints and it's status&lt;br /&gt;
     [set_variable]&lt;br /&gt;
       name=unit.hitpoints&lt;br /&gt;
       add=-5&lt;br /&gt;
     [/set_variable]&lt;br /&gt;
     [set_variable]&lt;br /&gt;
       name=unit.status.poisoned&lt;br /&gt;
       value=yes&lt;br /&gt;
     [/set_variable]&lt;br /&gt;
 &lt;br /&gt;
     #After we have changed the values, we need to apply them.&lt;br /&gt;
     #We do this by using the unstore_unit tag like this:&lt;br /&gt;
     [unstore_unit]&lt;br /&gt;
       variable=$unit&lt;br /&gt;
       find_vacant=no&lt;br /&gt;
     [/unstore_unit]&lt;br /&gt;
   [/event]&lt;br /&gt;
   #We're finished!&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
== [[GetText]] &amp;amp; Translations ==&lt;br /&gt;
[http://www.wesnoth.org/forum/viewtopic.php?t=11445 As Viliam pointed out] (reordered his words):&lt;br /&gt;
&lt;br /&gt;
 Translating programs has two steps. The first step is making [...] scenarios that are &amp;lt;b&amp;gt;possible&amp;lt;/b&amp;gt; to translate; &lt;br /&gt;
 &amp;lt;b&amp;gt;preferably easy&amp;lt;/b&amp;gt; to translate. [...] The second step is the translating of the texts... leave this to  translators.&lt;br /&gt;
&lt;br /&gt;
So, as a campaign/scenario developer you have to make sure your campaign will be easy to translate. You can achieve this very easily by preceding all text the user might see on the screen with an underscore. This indicates it is a translatable string. [[GetText]] will then be able to look up a translation, based on your localisation settings.&lt;br /&gt;
To make it ever more clear, here's an example:&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 [message]&lt;br /&gt;
   description=Konrad&lt;br /&gt;
   message= &amp;lt;b&amp;gt;_&amp;lt;/b&amp;gt; &amp;quot;I am mighty Konrad! I fought many dummies and now I will fight you!&amp;quot;&lt;br /&gt;
 [/message]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
&lt;br /&gt;
The message key contains the words that will be displayed when Konrad speaks. So this is a translatable string. So it is preceded with an underscore.&lt;br /&gt;
&lt;br /&gt;
Viliam also said:&lt;br /&gt;
&lt;br /&gt;
 The most important rule of all is: &amp;lt;b&amp;gt;Do not split sentences.&amp;lt;/b&amp;gt;&lt;br /&gt;
 In some languages placing a word in a sentence requires more than mere string concatenation.&lt;br /&gt;
 Some languages use [http://en.wikipedia.org/wiki/Declension declension].&lt;br /&gt;
&lt;br /&gt;
== Quick Tag Index ==&lt;br /&gt;
'''[[ScenarioWML]]''' the top level tags [scenario], [multiplayer], [test], and [tutorial]&lt;br /&gt;
:* [[EventWML]] how to describe an event&lt;br /&gt;
:** [[FilterWML]]&lt;br /&gt;
:** [[DirectActionsWML]], [[InterfaceActionsWML]], [[InternalActionsWML]]&lt;br /&gt;
:* [[SideWML]] how to describe a side&lt;br /&gt;
:** [[SingleUnitWML]]&lt;br /&gt;
:** [[BuildingScenariosShroudData]]&lt;br /&gt;
:* [[MapGeneratorWML]] the random map generator&lt;br /&gt;
:* [[TimeWML]] how to describe a day&lt;br /&gt;
:* [[IntroWML]] how to describe the intro screen &lt;br /&gt;
:* [[UtilWML]] a set of preprocessors you can use&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[ScenarioWML]], [[SyntaxWML]] &amp;amp; [[ReferenceWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16166</id>
		<title>BuildingScenariosAdvanced</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16166"/>
		<updated>2007-06-28T15:52:46Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Filters &amp;amp; Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BuildingScenariosNav}}&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Advanced =&lt;br /&gt;
&lt;br /&gt;
== '''TODO:''' ==&lt;br /&gt;
This contained a repetition of what was already inside [[BuildingScenariosIntermediate]]&lt;br /&gt;
This should contain: &lt;br /&gt;
* (more) information about making &amp;amp; using preprocessors ([[PreprocessorRef]])&lt;br /&gt;
* information on guidelines concerning the general layout of a scenario file&lt;br /&gt;
* advanced filtering&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
Ayone who feels like writing something, go ahead&lt;br /&gt;
&lt;br /&gt;
== Filters &amp;amp; Events ==&lt;br /&gt;
When you are making campaigns, you will have to be able to control the game flow. This means you will need to interfere with the game if certain events arise. Examples: &lt;br /&gt;
* There's a radioactive stone inside a cave. Units entering this cave (it has circular shape) lose 5HP and are poisoned. The cave is at tile (25,26) and has a radius of 8 tiles. This is the code that would achieve this:&lt;br /&gt;
&lt;br /&gt;
 [scenario]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
   [event]&lt;br /&gt;
     #A unit has moved, maybe it move inside the cave? Let's find out!&lt;br /&gt;
     name=moveto&lt;br /&gt;
     #Here's our filter! {{DevFeature}} see below for earlier version&lt;br /&gt;
     [filter]&lt;br /&gt;
       x,y=25,26&lt;br /&gt;
       radius=8&lt;br /&gt;
     [/filter]&lt;br /&gt;
     &lt;br /&gt;
     #We can use the variable $unit inside an event tag to change the&lt;br /&gt;
     #unit that triggered the action. See [http://www.wesnoth.org/wiki/InternalActionsWML#.5Bevent.5D event internal actions]. Inside a set_variable tag we can&lt;br /&gt;
     #adjust the values of some of the unit characteristisc, like it's hitpoints and it's status&lt;br /&gt;
     [set_variable]&lt;br /&gt;
       name=unit.hitpoints&lt;br /&gt;
       add=-5&lt;br /&gt;
     [/set_variable]&lt;br /&gt;
     [set_variable]&lt;br /&gt;
       name=unit.status.poisoned&lt;br /&gt;
       value=yes&lt;br /&gt;
     [/set_variable]&lt;br /&gt;
 &lt;br /&gt;
     #After we have changed the values, we need to apply them.&lt;br /&gt;
     #We do this by using the unstore_unit tag like this:&lt;br /&gt;
     [unstore_unit]&lt;br /&gt;
       variable=$unit&lt;br /&gt;
       find_vacant=no&lt;br /&gt;
     [/unstore_unit]&lt;br /&gt;
   [/event]&lt;br /&gt;
   #We're finished!&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
== [[GetText]] &amp;amp; Translations ==&lt;br /&gt;
[http://www.wesnoth.org/forum/viewtopic.php?t=11445 As Viliam pointed out] (reordered his words):&lt;br /&gt;
&lt;br /&gt;
 Translating programs has two steps. The first step is making [...] scenarios that are &amp;lt;b&amp;gt;possible&amp;lt;/b&amp;gt; to translate; &lt;br /&gt;
 &amp;lt;b&amp;gt;preferably easy&amp;lt;/b&amp;gt; to translate. [...] The second step is the translating of the texts... leave this to  translators.&lt;br /&gt;
&lt;br /&gt;
So, as a campaign/scenario developer you have to make sure your campaign will be easy to translate. You can achieve this very easily by preceding all text the user might see on the screen with an underscore. This indicates it is a translatable string. [[GetText]] will then be able to look up a translation, based on your localisation settings.&lt;br /&gt;
To make it ever more clear, here's an example:&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 [message]&lt;br /&gt;
   description=Konrad&lt;br /&gt;
   message= &amp;lt;b&amp;gt;_&amp;lt;/b&amp;gt; &amp;quot;I am mighty Konrad! I fought many dummies and now I will fight you!&amp;quot;&lt;br /&gt;
 [/message]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
&lt;br /&gt;
The message key contains the words that will be displayed when Konrad speaks. So this is a translatable string. So it is preceded with an underscore.&lt;br /&gt;
&lt;br /&gt;
Viliam also said:&lt;br /&gt;
&lt;br /&gt;
 The most important rule of all is: &amp;lt;b&amp;gt;Do not split sentences.&amp;lt;/b&amp;gt;&lt;br /&gt;
 In some languages placing a word in a sentence requires more than mere string concatenation.&lt;br /&gt;
 Some languages use [http://en.wikipedia.org/wiki/Declension declension].&lt;br /&gt;
&lt;br /&gt;
== Quick Tag Index ==&lt;br /&gt;
'''[[ScenarioWML]]''' the top level tags [scenario], [multiplayer], [test], and [tutorial]&lt;br /&gt;
:* [[EventWML]] how to describe an event&lt;br /&gt;
:** [[FilterWML]]&lt;br /&gt;
:** [[DirectActionsWML]], [[InterfaceActionsWML]], [[InternalActionsWML]]&lt;br /&gt;
:* [[SideWML]] how to describe a side&lt;br /&gt;
:** [[SingleUnitWML]]&lt;br /&gt;
:** [[BuildingScenariosShroudData]]&lt;br /&gt;
:* [[MapGeneratorWML]] the random map generator&lt;br /&gt;
:* [[TimeWML]] how to describe a day&lt;br /&gt;
:* [[IntroWML]] how to describe the intro screen &lt;br /&gt;
:* [[UtilWML]] a set of preprocessors you can use&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[ScenarioWML]], [[SyntaxWML]] &amp;amp; [[ReferenceWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16165</id>
		<title>BuildingScenariosAdvanced</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16165"/>
		<updated>2007-06-28T15:51:49Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Building scenarios: Advanced - added an example for  events and filters*/&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BuildingScenariosNav}}&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Advanced =&lt;br /&gt;
&lt;br /&gt;
== '''TODO:''' ==&lt;br /&gt;
This contained a repetition of what was already inside [[BuildingScenariosIntermediate]]&lt;br /&gt;
This should contain: &lt;br /&gt;
* (more) information about making &amp;amp; using preprocessors ([[PreprocessorRef]])&lt;br /&gt;
* information on guidelines concerning the general layout of a scenario file&lt;br /&gt;
* advanced filtering&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
Ayone who feels like writing something, go ahead&lt;br /&gt;
&lt;br /&gt;
== Filters &amp;amp; Events ==&lt;br /&gt;
When you are making campaigns, you will have to be able to control the game flow. This means you will need to interfere with the game if certain events arise. Examples: &lt;br /&gt;
* There's a radioactive stone inside a cave. Units entering this cave (it has circular shape) lose 5HP and are poisoned. The cave is at tile (25,26) and has a radius of 8 tiles. This is the code that would achieve this:&lt;br /&gt;
&lt;br /&gt;
 [scenario]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
   [event]&lt;br /&gt;
     #A unit has moved, maybe it move inside the cave? Let's find out!&lt;br /&gt;
     name=moveto&lt;br /&gt;
     #Here's our filter! {{DevFeature}} see below for earlier version&lt;br /&gt;
     [filter]&lt;br /&gt;
       x,y=25,26&lt;br /&gt;
       radius=8&lt;br /&gt;
     [/filter]&lt;br /&gt;
     &lt;br /&gt;
     #We can use the variable $unit inside an event tag to change the&lt;br /&gt;
     #unit that triggered the action. See [http://www.wesnoth.org/wiki/InternalActionsWML#.5Bevent.5D event internal actions]. Inside a set_variable tag we can&lt;br /&gt;
     #adjust the values of some of the unit characteristisc, like it's hitpoints and it's status&lt;br /&gt;
     [set_variable]&lt;br /&gt;
       name=unit.hitpoints&lt;br /&gt;
       add=-5&lt;br /&gt;
     [/set_variable]&lt;br /&gt;
     [set_variable]&lt;br /&gt;
       name=unit.status.poisoned&lt;br /&gt;
       value=yes&lt;br /&gt;
     [/set_variable]&lt;br /&gt;
&lt;br /&gt;
     #After we have changed the values, we need to apply them.&lt;br /&gt;
     #We do this by using the unstore_unit tag like this:&lt;br /&gt;
     [unstore_unit]&lt;br /&gt;
       variable=$unit&lt;br /&gt;
       find_vacant=no&lt;br /&gt;
     [/unstore_unit]&lt;br /&gt;
   [/event]&lt;br /&gt;
   #We're finished!&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
== [[GetText]] &amp;amp; Translations ==&lt;br /&gt;
[http://www.wesnoth.org/forum/viewtopic.php?t=11445 As Viliam pointed out] (reordered his words):&lt;br /&gt;
&lt;br /&gt;
 Translating programs has two steps. The first step is making [...] scenarios that are &amp;lt;b&amp;gt;possible&amp;lt;/b&amp;gt; to translate; &lt;br /&gt;
 &amp;lt;b&amp;gt;preferably easy&amp;lt;/b&amp;gt; to translate. [...] The second step is the translating of the texts... leave this to  translators.&lt;br /&gt;
&lt;br /&gt;
So, as a campaign/scenario developer you have to make sure your campaign will be easy to translate. You can achieve this very easily by preceding all text the user might see on the screen with an underscore. This indicates it is a translatable string. [[GetText]] will then be able to look up a translation, based on your localisation settings.&lt;br /&gt;
To make it ever more clear, here's an example:&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 [message]&lt;br /&gt;
   description=Konrad&lt;br /&gt;
   message= &amp;lt;b&amp;gt;_&amp;lt;/b&amp;gt; &amp;quot;I am mighty Konrad! I fought many dummies and now I will fight you!&amp;quot;&lt;br /&gt;
 [/message]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
&lt;br /&gt;
The message key contains the words that will be displayed when Konrad speaks. So this is a translatable string. So it is preceded with an underscore.&lt;br /&gt;
&lt;br /&gt;
Viliam also said:&lt;br /&gt;
&lt;br /&gt;
 The most important rule of all is: &amp;lt;b&amp;gt;Do not split sentences.&amp;lt;/b&amp;gt;&lt;br /&gt;
 In some languages placing a word in a sentence requires more than mere string concatenation.&lt;br /&gt;
 Some languages use [http://en.wikipedia.org/wiki/Declension declension].&lt;br /&gt;
&lt;br /&gt;
== Quick Tag Index ==&lt;br /&gt;
'''[[ScenarioWML]]''' the top level tags [scenario], [multiplayer], [test], and [tutorial]&lt;br /&gt;
:* [[EventWML]] how to describe an event&lt;br /&gt;
:** [[FilterWML]]&lt;br /&gt;
:** [[DirectActionsWML]], [[InterfaceActionsWML]], [[InternalActionsWML]]&lt;br /&gt;
:* [[SideWML]] how to describe a side&lt;br /&gt;
:** [[SingleUnitWML]]&lt;br /&gt;
:** [[BuildingScenariosShroudData]]&lt;br /&gt;
:* [[MapGeneratorWML]] the random map generator&lt;br /&gt;
:* [[TimeWML]] how to describe a day&lt;br /&gt;
:* [[IntroWML]] how to describe the intro screen &lt;br /&gt;
:* [[UtilWML]] a set of preprocessors you can use&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[ScenarioWML]], [[SyntaxWML]] &amp;amp; [[ReferenceWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16164</id>
		<title>BuildingScenariosAdvanced</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16164"/>
		<updated>2007-06-28T15:24:29Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* '''TODO:''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BuildingScenariosNav}}&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Advanced =&lt;br /&gt;
&lt;br /&gt;
== '''TODO:''' ==&lt;br /&gt;
This contained a repetition of what was already inside [[BuildingScenariosIntermediate]]&lt;br /&gt;
This should contain: &lt;br /&gt;
* (more) information about making &amp;amp; using preprocessors ([[PreprocessorRef]])&lt;br /&gt;
* information on guidelines concerning the general layout of a scenario file&lt;br /&gt;
* advanced filtering&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
Ayone who feels like writing something, go ahead&lt;br /&gt;
&lt;br /&gt;
== GetText ==&lt;br /&gt;
As Viliam pointed out (reordered his words):&lt;br /&gt;
&lt;br /&gt;
 Translating programs has two steps. The first step is making [...] scenarios that are &amp;lt;b&amp;gt;possible&amp;lt;/b&amp;gt; to translate; &lt;br /&gt;
 &amp;lt;b&amp;gt;preferably easy&amp;lt;/b&amp;gt; to translate. [...] The second step is the translating of the texts... leave this to  translators.&lt;br /&gt;
&lt;br /&gt;
So, as a campaign/scenario developer you have to make sure your campaign will be easy to translate. You can achieve this very easily by preceding all text the user might see on the screen with an underscore. This indicates it is a translatable string. [[GetText]] will then be able to look up a translation, based on your localisation settings.&lt;br /&gt;
To make it ever more clear, here's an example:&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 [message]&lt;br /&gt;
   description=Konrad&lt;br /&gt;
   message= &amp;lt;b&amp;gt;_&amp;lt;/b&amp;gt; &amp;quot;I am mighty Konrad! I fought many dummies and now I will fight you!&amp;quot;&lt;br /&gt;
 [/message]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
&lt;br /&gt;
The message key contains the words that will be displayed when Konrad speaks. So this is a translatable string. So it is preceded with an underscore.&lt;br /&gt;
&lt;br /&gt;
== Quick Tag Index ==&lt;br /&gt;
'''[[ScenarioWML]]''' the top level tags [scenario], [multiplayer], [test], and [tutorial]&lt;br /&gt;
:* [[EventWML]] how to describe an event&lt;br /&gt;
:** [[FilterWML]]&lt;br /&gt;
:** [[DirectActionsWML]], [[InterfaceActionsWML]], [[InternalActionsWML]]&lt;br /&gt;
:* [[SideWML]] how to describe a side&lt;br /&gt;
:** [[SingleUnitWML]]&lt;br /&gt;
:** [[BuildingScenariosShroudData]]&lt;br /&gt;
:* [[MapGeneratorWML]] the random map generator&lt;br /&gt;
:* [[TimeWML]] how to describe a day&lt;br /&gt;
:* [[IntroWML]] how to describe the intro screen &lt;br /&gt;
:* [[UtilWML]] a set of preprocessors you can use&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[ScenarioWML]], [[SyntaxWML]] &amp;amp; [[ReferenceWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16163</id>
		<title>BuildingScenariosAdvanced</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16163"/>
		<updated>2007-06-28T15:23:51Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* '''TODO:''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BuildingScenariosNav}}&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Advanced =&lt;br /&gt;
&lt;br /&gt;
== '''TODO:''' ==&lt;br /&gt;
This contained a repetition of what was already inside [[BuildingScenariosIntermediate]]&lt;br /&gt;
This should contain: &lt;br /&gt;
* (more) information about making &amp;amp; using preprocessors ([[PreprocessorRef]])&lt;br /&gt;
* information on guidelines concerning the general layout of a scenario file&lt;br /&gt;
* advanced filtering&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
Ayone who feels like writing something, go ahead&lt;br /&gt;
&lt;br /&gt;
:Mathijs&lt;br /&gt;
&lt;br /&gt;
== GetText ==&lt;br /&gt;
As Viliam pointed out (reordered his words):&lt;br /&gt;
&lt;br /&gt;
 Translating programs has two steps. The first step is making [...] scenarios that are &amp;lt;b&amp;gt;possible&amp;lt;/b&amp;gt; to translate; &lt;br /&gt;
 &amp;lt;b&amp;gt;preferably easy&amp;lt;/b&amp;gt; to translate. [...] The second step is the translating of the texts... leave this to  translators.&lt;br /&gt;
&lt;br /&gt;
So, as a campaign/scenario developer you have to make sure your campaign will be easy to translate. You can achieve this very easily by preceding all text the user might see on the screen with an underscore. This indicates it is a translatable string. [[GetText]] will then be able to look up a translation, based on your localisation settings.&lt;br /&gt;
To make it ever more clear, here's an example:&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 [message]&lt;br /&gt;
   description=Konrad&lt;br /&gt;
   message= &amp;lt;b&amp;gt;_&amp;lt;/b&amp;gt; &amp;quot;I am mighty Konrad! I fought many dummies and now I will fight you!&amp;quot;&lt;br /&gt;
 [/message]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
&lt;br /&gt;
The message key contains the words that will be displayed when Konrad speaks. So this is a translatable string. So it is preceded with an underscore.&lt;br /&gt;
&lt;br /&gt;
== Quick Tag Index ==&lt;br /&gt;
'''[[ScenarioWML]]''' the top level tags [scenario], [multiplayer], [test], and [tutorial]&lt;br /&gt;
:* [[EventWML]] how to describe an event&lt;br /&gt;
:** [[FilterWML]]&lt;br /&gt;
:** [[DirectActionsWML]], [[InterfaceActionsWML]], [[InternalActionsWML]]&lt;br /&gt;
:* [[SideWML]] how to describe a side&lt;br /&gt;
:** [[SingleUnitWML]]&lt;br /&gt;
:** [[BuildingScenariosShroudData]]&lt;br /&gt;
:* [[MapGeneratorWML]] the random map generator&lt;br /&gt;
:* [[TimeWML]] how to describe a day&lt;br /&gt;
:* [[IntroWML]] how to describe the intro screen &lt;br /&gt;
:* [[UtilWML]] a set of preprocessors you can use&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[ScenarioWML]], [[SyntaxWML]] &amp;amp; [[ReferenceWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16162</id>
		<title>BuildingScenariosAdvanced</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16162"/>
		<updated>2007-06-28T15:23:12Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Building scenarios: Advanced */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BuildingScenariosNav}}&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Advanced =&lt;br /&gt;
&lt;br /&gt;
== '''TODO:''' ==&lt;br /&gt;
This contained a repetition of what was already inside [[BuildingScenariosIntermediate]]&lt;br /&gt;
This should contain: &lt;br /&gt;
* (more) information about making &amp;amp; using preprocessors ([[PreprocessorRef]])&lt;br /&gt;
* information on guidelines concerning the general layout of a scenario file&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
Ayone who feels like writing something, go ahead&lt;br /&gt;
&lt;br /&gt;
:Mathijs&lt;br /&gt;
&lt;br /&gt;
== GetText ==&lt;br /&gt;
As Viliam pointed out (reordered his words):&lt;br /&gt;
&lt;br /&gt;
 Translating programs has two steps. The first step is making [...] scenarios that are &amp;lt;b&amp;gt;possible&amp;lt;/b&amp;gt; to translate; &lt;br /&gt;
 &amp;lt;b&amp;gt;preferably easy&amp;lt;/b&amp;gt; to translate. [...] The second step is the translating of the texts... leave this to  translators.&lt;br /&gt;
&lt;br /&gt;
So, as a campaign/scenario developer you have to make sure your campaign will be easy to translate. You can achieve this very easily by preceding all text the user might see on the screen with an underscore. This indicates it is a translatable string. [[GetText]] will then be able to look up a translation, based on your localisation settings.&lt;br /&gt;
To make it ever more clear, here's an example:&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 [message]&lt;br /&gt;
   description=Konrad&lt;br /&gt;
   message= &amp;lt;b&amp;gt;_&amp;lt;/b&amp;gt; &amp;quot;I am mighty Konrad! I fought many dummies and now I will fight you!&amp;quot;&lt;br /&gt;
 [/message]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
&lt;br /&gt;
The message key contains the words that will be displayed when Konrad speaks. So this is a translatable string. So it is preceded with an underscore.&lt;br /&gt;
&lt;br /&gt;
== Quick Tag Index ==&lt;br /&gt;
'''[[ScenarioWML]]''' the top level tags [scenario], [multiplayer], [test], and [tutorial]&lt;br /&gt;
:* [[EventWML]] how to describe an event&lt;br /&gt;
:** [[FilterWML]]&lt;br /&gt;
:** [[DirectActionsWML]], [[InterfaceActionsWML]], [[InternalActionsWML]]&lt;br /&gt;
:* [[SideWML]] how to describe a side&lt;br /&gt;
:** [[SingleUnitWML]]&lt;br /&gt;
:** [[BuildingScenariosShroudData]]&lt;br /&gt;
:* [[MapGeneratorWML]] the random map generator&lt;br /&gt;
:* [[TimeWML]] how to describe a day&lt;br /&gt;
:* [[IntroWML]] how to describe the intro screen &lt;br /&gt;
:* [[UtilWML]] a set of preprocessors you can use&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[ScenarioWML]], [[SyntaxWML]] &amp;amp; [[ReferenceWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=WesnothTranslationsHowTo&amp;diff=16161</id>
		<title>WesnothTranslationsHowTo</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=WesnothTranslationsHowTo&amp;diff=16161"/>
		<updated>2007-06-28T15:07:27Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Translations How-To */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
This page contains information on how-to translate and submit translation updates.&lt;br /&gt;
&lt;br /&gt;
==  How to submit your translations  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'' ''' Translation Maintainers ''' ''&lt;br /&gt;
&lt;br /&gt;
The translation maintainers should send the updated/new translation&lt;br /&gt;
po-files to the language coordinator:&lt;br /&gt;
Ivanovic (crazy-ivanovic AT gmx DOT net) or&lt;br /&gt;
Torangan (david AT torangan DOT de).&lt;br /&gt;
Additionally they have to quickly check over other people's translations&lt;br /&gt;
(other people translating the same language) as the other translators&lt;br /&gt;
(if any) will have to send their translations to their language maintainer&lt;br /&gt;
before inclusion in the SVN (the online source code repository). You should also subscribe to the [http://www.wesnoth.org/wiki/WesnothTranslations#Mailing_List wesnoth-i18n mailinglist].&lt;br /&gt;
&lt;br /&gt;
Send the files as an archive containing the complete .po files (no .mo or .gmo files) and ensure that they follow the directory structure used in version control. For example, the archive with the German (de) translations should therefore be structured as follows:&lt;br /&gt;
 wesnoth/de.po&lt;br /&gt;
 wesnoth-httt/de.po &lt;br /&gt;
 wesnoth-tutorial/de.po&lt;br /&gt;
etc.&lt;br /&gt;
&lt;br /&gt;
'' ''' Translators ''' ''&lt;br /&gt;
&lt;br /&gt;
The other translators (those who are not maintainers) should contact&lt;br /&gt;
the maintainer for their language to see if there is some work to do.&lt;br /&gt;
After you have done some work on the translation you should email it&lt;br /&gt;
to your language maintainer. He/she will then (if needed) check it over&lt;br /&gt;
before sending it on to the language coordinators. A list of all translators&lt;br /&gt;
currently working on a language is found on each language page.&lt;br /&gt;
&lt;br /&gt;
'' ''' NEW Translators ''' ''&lt;br /&gt;
&lt;br /&gt;
If you want to help out with the translation of an language already started on,&lt;br /&gt;
contact the translation maintainer for the language.&lt;br /&gt;
If you want to start translation of Wesnoth to a new language,&lt;br /&gt;
first contact Ivanovic or Torangan.&lt;br /&gt;
And then just follow the instructions written in '' Translators '' .&lt;br /&gt;
&lt;br /&gt;
==  Translations How-To  ==&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* If you haven't got Wesnoth from latest SVN, start out by doing so.&lt;br /&gt;
Take a look at [[WesnothSVN]] for instructions about that.&lt;br /&gt;
* The old translation system, using cfg files and some wesnoth-specific&lt;br /&gt;
tools (make_translation, merge_translation, weslang) was abandoned&lt;br /&gt;
in the 0.8.3 release of Wesnoth in favor of the standard [[GetText|GNU GetText]] system.&lt;br /&gt;
* Infos how the two branches do work can be found in the  [http://www.wesnoth.org/forum/viewtopic.php?t=7618 Forum].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are a translator, see [[GettextForTranslators]] for more information.&lt;br /&gt;
&lt;br /&gt;
If you are a developer, gettext internals for Wesnoth are discussed here:&lt;br /&gt;
[[GettextForWesnothDevelopers]].&lt;br /&gt;
&lt;br /&gt;
==  Specifying typefaces and fonts for a translation  ==&lt;br /&gt;
&lt;br /&gt;
Translations in a language which mainly uses characters outside of the Latin1 character set may want to specify different typefaces. In the translatable strings, there is a string named&lt;br /&gt;
  &amp;quot;DejaVuSans.ttf,FreeSans.ttf,sazanami-gothic.ttf,gkai00mp.ttf&amp;quot;&lt;br /&gt;
which specifies the order in which fonts are to be tried, for each character, before the program finds a font which contains this character: the font appearing first in the list is tried first. Translators may change this string in the translation.&lt;br /&gt;
For example, it would be a good idea to specify first a font which contains all the characters generally used in the target language. This is especially important for translations into Asian languages. Please refer to the page [[WesnothAsianLanguages]] for more information.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[GettextForTranslators]]&lt;br /&gt;
* [[WesnothAsianLanguages]]&lt;br /&gt;
* [[WesnothTranslations]]&lt;br /&gt;
* [[TranslatorsGuide]]&lt;br /&gt;
* [http://gettext.wesnoth.org Translation statistics]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Races&amp;diff=16160</id>
		<title>Races</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Races&amp;diff=16160"/>
		<updated>2007-06-28T15:01:53Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Woses: removed ancient and elder wose/sorry mistaken */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Six Main Races ==&lt;br /&gt;
&lt;br /&gt;
=== Men ===&lt;br /&gt;
The race of men is an extremely diverse one. Although men originally came from the Old Continent, they have spread all over the world, and split into many different cultures and races. They do not possess much magic, though they can learn it, and can learn many more types of it than most others. They have no extra special abilities or aptitudes except their versatility and drive. Although often at odds with all races, they can occasionally form alliances with the less aggressive races such as elves and dwarves, and the less scrupulous among them do not shrink back from hiring orcish mercenaries, either. They have no natural enemies, although the majority of men, like most people of all races, have an instinctive dislike of the undead. Men are shorter than the elves, but taller still than dwarves or orcs. Their skin color can vary, from almost white to dark brown.&lt;br /&gt;
&lt;br /&gt;
==== Wesnothians ====&lt;br /&gt;
Many different groups of men exist, but the majority of them on the Great Continent live in the country of Wesnoth. The Wesnothians first appeared on the Great Continent from a land far across the ocean to the West, the Green Isle. Their capital city is Weldyn. The country is protected by the soldiers of the Wesnothian Army, the most organized military force in the known world. Its warriors come from the main provinces, where all men are conscripted at an early age.&lt;br /&gt;
* [[unit:Bowman|Bowman]]&lt;br /&gt;
* [[unit:Cavalryman|Cavalryman]]&lt;br /&gt;
* [[unit:Fencer|Fencer]]&lt;br /&gt;
* [[unit:HeavyInfantryman|HeavyInfantryman]]&lt;br /&gt;
* [[unit:Mage|Mage]]&lt;br /&gt;
* [[unit:Spearman|Spearman]]&lt;br /&gt;
&lt;br /&gt;
==== The Clansmen ====&lt;br /&gt;
The eastern provinces of Wesnoth, known as the Clan Homelands, have a geography consisting of more open plains and rolling hills than the western, more civilized provinces. They are home to the Horse Clans, who are allied with the Wesnothian Army but are somewhat separate, and maintain their own identity - as well as their own army. Some consider them to be a tributary state, that sends food and soldiers to Wesnoth in exchange for protection; others say they are on equal footing with the western half of Wesnoth, and they just serve different purposes in the country. In any case, the eastern provinces do not have a conscript army the way Western Wesnoth does. Training for fighting is part of the way of life of the Clans, so the parents will teach the children to ride horses, fight and shoot a bow from an early age. In general, the Clan warriors are less organized than the Civilized fighters, and their strengths and weaknesses complement each other.&lt;br /&gt;
* [[unit:Bowman|Bowman]]&lt;br /&gt;
* [[unit:Horseman|Horseman]]&lt;br /&gt;
&lt;br /&gt;
==== Outlaws and Necromancers ====&lt;br /&gt;
Bands of outlaws roam the wild areas of the Great Continent, stealing from unprotected villages. Most would run in fear if faced by a true army, but the more skilled of them would not be afraid to walk right into an opponent's camp, assassinate their leader, and run away.&lt;br /&gt;
&lt;br /&gt;
Although the art of necromancy is outlawed in Wesnoth, some mages choose to practice it, starting them on the road to Lichdom.&lt;br /&gt;
&lt;br /&gt;
* [[unit:Footpad|Footpad]]&lt;br /&gt;
* [[unit:Poacher|Poacher]]&lt;br /&gt;
* [[unit:Thief|Thief]]&lt;br /&gt;
* [[unit:Bandit|Bandit]]&lt;br /&gt;
&lt;br /&gt;
* [[unit:DarkAdept|DarkAdept]]&lt;br /&gt;
&lt;br /&gt;
=== Elves ===&lt;br /&gt;
&lt;br /&gt;
Elves are the elder race. They are skilled with the bow and arrow - almost all of them carry one - and are also good with the sword. They do not use many weapons but these, although they are in command of powerful magic, and do use it when needed. Physically, Elves are quite tall, and seem even taller due to their slimness. They are peaceful beings, but will fight against any who enter their homeland unasked. They live mostly in the forests of the Southwest, although some choose to live in the harsh Northlands.&lt;br /&gt;
* [[unit:ElvishArcher|ElvishArcher]]&lt;br /&gt;
* [[unit:ElvishFighter|ElvishFighter]]&lt;br /&gt;
* [[unit:ElvishScout|ElvishScout]]&lt;br /&gt;
* [[unit:ElvishShaman|ElvishShaman]]&lt;br /&gt;
&lt;br /&gt;
=== Orcs ===&lt;br /&gt;
&lt;br /&gt;
Orcs are a race of fierce, brown-skinned human-like creatures found across the wild places of the world. They came from across the sea, following the humans of the Green Isle. They are violent, quick-tempered, and belligerent, and hold an ancient hatred for the race of elves. Although orcs are disorganized and prone to infighting, warbands under a strong leader can cut bloody inroads into the boundaries where civilization meets wilderness. Most live in the Northland, away from the settled land of Wesnoth, whose people they are more often than not at war with. They are a greedy race, and&lt;br /&gt;
often can be found fighting under the banner of a lich-lord or human, hoping to gain riches from those they defeat.&lt;br /&gt;
* [[unit:OrcishArcher|OrcishArcher]]&lt;br /&gt;
* [[unit:OrcishAssassin|OrcishAssassin]]&lt;br /&gt;
* [[unit:OrcishGrunt|OrcishGrunt]]&lt;br /&gt;
&lt;br /&gt;
Goblins are a different breed than the orcs, smaller and weaker, but quicker. However, since they are the same species, they are considered by most the same race.&lt;br /&gt;
* [[unit:WolfRider|WolfRider]]&lt;br /&gt;
* [[unit:GoblinSpearman|GoblinSpearman]]&lt;br /&gt;
&lt;br /&gt;
=== Dwarves ===&lt;br /&gt;
&lt;br /&gt;
Dwarves were living on the Great Continent before Haldric arrived, but they were also immigrants, like him, coming from the East across the mountains. Dwarves are the height of human children, but are stronger than even fully grown men. &lt;br /&gt;
They are a solitary folk, cautious and slow to anger, but once their anger is roused they are terrible fighters.&lt;br /&gt;
Wielding many weapons with equal skill, dwarves are effective against many different races. They see in pitch darkness due to their constant work underground, and their heavy armor protects them against almost any physical attack, although magic can harm them effectively. The most skilled smiths of any in the realm, they are often hired by foreign kings to craft magical items, and the weapons and jewelry they make have been the cause of numerous wars.&lt;br /&gt;
* [[unit:DwarvishFighter|DwarvishFighter]]&lt;br /&gt;
* [[unit:DwarvishGuardsman|DwarvishGuardsman]]&lt;br /&gt;
* [[unit:DwarvishThunderer|DwarvishThunderer]]&lt;br /&gt;
* [[unit:DwarvishUlfserker|DwarvishUlfserker]]&lt;br /&gt;
* [[unit:GryphonRider|GryphonRider]]&lt;br /&gt;
&lt;br /&gt;
=== Undead ===&lt;br /&gt;
&lt;br /&gt;
As their race's name means, these are lost souls caught between this realm and next. Themselves deprived of life, they wish to likewise deprive all others of it. They are created by Necromancers, practitioners of dark magic, and are controlled by them when raised. After the necromancer controlling them dies, they remain in this world, and continue fighting for a purpose no one, perhaps not even themselves, know. Most of them are strong against physical attacks, but are weak against fire and holy assaults. Since they do not require bodily warmth to survive, cold is very ineffectual&lt;br /&gt;
against them.&lt;br /&gt;
* [[unit:Ghost|Ghost]]&lt;br /&gt;
* [[unit:Ghoul|Ghoul]]&lt;br /&gt;
* [[unit:Skeleton|Skeleton]]&lt;br /&gt;
* [[unit:SkeletonArcher|SkeletonArcher]]&lt;br /&gt;
* [[unit:VampireBat|VampireBat]]&lt;br /&gt;
* [[unit:WalkingCorpse|WalkingCorpse]]&lt;br /&gt;
&lt;br /&gt;
=== Drakes ===&lt;br /&gt;
&lt;br /&gt;
Drakes are the sons of dragons, almost the last legacy of those mighty beasts.  &lt;br /&gt;
Most of the race can fly and spit fire.&lt;br /&gt;
When the fire in their body is extinguished so is their life. &lt;br /&gt;
Because of this they are weak against cold, but they are good against most other attacks. &lt;br /&gt;
However, due to their soft underbellies, &amp;quot;sharp, pointy weapons&amp;quot; have always been their weakness, a characteristic most consider very dragonlike. They are heavy and move slowly, but once they reach their enemy they are devastating.&lt;br /&gt;
Their homeland was an island named Morogor, located between Wesnoth and the Green Isle, but it slowly sank into the sea, and now many of them are nomads, flying over the sea looking for a place to settle undisturbed.&lt;br /&gt;
* [[unit:DrakeBurner|DrakeBurner]]&lt;br /&gt;
* [[unit:DrakeClasher|DrakeClasher]]&lt;br /&gt;
* [[unit:DrakeFighter|DrakeFighter]]&lt;br /&gt;
* [[unit:DrakeGlider|DrakeGlider]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Other Races ==&lt;br /&gt;
&lt;br /&gt;
There are other races than these six main ones. They often align with the larger races, but these alliances are usually not permanent.&lt;br /&gt;
&lt;br /&gt;
=== Saurians ===&lt;br /&gt;
These are the smaller, more crafty allies of the Drakes. They often live in swamps or other damp places.&lt;br /&gt;
* [[unit:SaurianSkirmisher|SaurianSkirmisher]]&lt;br /&gt;
* [[unit:SaurianTribalist|SaurianTribalist]]&lt;br /&gt;
&lt;br /&gt;
=== Merfolk ===&lt;br /&gt;
The Merfolk live in the shallow parts of the ocean, wary of the monsters that lurk in the deep. Ordinarily they form alliances with no one, but in Asheviere's time they allied with the elves in order to defeat their captors. Mermen are powerful and quick in any watery environment, but struggle greatly to move on land.&lt;br /&gt;
* [[unit:MermaidInitiate|MermaidInitiate]]&lt;br /&gt;
* [[unit:MermanFighter|MermanFighter]]&lt;br /&gt;
* [[unit:MermanHunter|MermanHunter]]&lt;br /&gt;
&lt;br /&gt;
=== Nagas ===&lt;br /&gt;
Nagas are the long time enemies of the Merfolk, and in Asheviere's time they allied with orcs to finally defeat their opponents. They usually join forces with anyone willing to help them defeat the mermen.&lt;br /&gt;
* [[unit:NagaFighter|NagaFighter]]&lt;br /&gt;
&lt;br /&gt;
=== Ogres ===&lt;br /&gt;
The Ogres are wild beasts that live in the Northlands, but the Wesnothian army occasionally captures them and trains them for battle. They are extremely brutish and stupid, but possess enough intelligence to wield a weapon.&lt;br /&gt;
* [[unit:YoungOgre|YoungOgre]]&lt;br /&gt;
&lt;br /&gt;
=== Trolls ===&lt;br /&gt;
The Trolls are slightly more intelligent than Ogres, and ally with the Orcs whenever their shared homeland is in danger. However, most of the time they avoid each other.&lt;br /&gt;
* [[unit:TrollWhelp|TrollWhelp]]&lt;br /&gt;
&lt;br /&gt;
===Woses===&lt;br /&gt;
Little is known about the Woses, apart from their tree-like appearance. However these beings have not descended from trees, despite the similarity in form. They seem to be wardens of the natural world.&lt;br /&gt;
* [[unit:Wose|Wose]]&lt;br /&gt;
&lt;br /&gt;
=== Monsters ===&lt;br /&gt;
&lt;br /&gt;
There are many monsters that roam about the land, not obeying anyone's orders. Occasionally, but not often, those who see them survive to tell the tale, and it is only from them that the people of Wesnoth know of their existence.&lt;br /&gt;
* [[unit:Cockatrice|Cockatrice]]&lt;br /&gt;
* [[unit:Cuttlefish|Cuttlefish]]&lt;br /&gt;
* [[unit:FireDragon|FireDragon]]&lt;br /&gt;
* [[unit:GiantScorpion|GiantScorpion]]&lt;br /&gt;
* [[unit:GiantSpider|GiantSpider]]&lt;br /&gt;
* [[unit:Gryphon|Gryphon]]&lt;br /&gt;
* [[unit:Mudcrawler|Mudcrawler]]&lt;br /&gt;
* [[unit:SeaSerpent|SeaSerpent]]&lt;br /&gt;
* [[unit:Yeti|Yeti]]&lt;br /&gt;
&lt;br /&gt;
See Also:&lt;br /&gt;
* [[UnitDescriptionRewriting]] - coordinating the revision&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Races&amp;diff=16159</id>
		<title>Races</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Races&amp;diff=16159"/>
		<updated>2007-06-28T14:59:19Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Woses: added ancient and elder wose */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Six Main Races ==&lt;br /&gt;
&lt;br /&gt;
=== Men ===&lt;br /&gt;
The race of men is an extremely diverse one. Although men originally came from the Old Continent, they have spread all over the world, and split into many different cultures and races. They do not possess much magic, though they can learn it, and can learn many more types of it than most others. They have no extra special abilities or aptitudes except their versatility and drive. Although often at odds with all races, they can occasionally form alliances with the less aggressive races such as elves and dwarves, and the less scrupulous among them do not shrink back from hiring orcish mercenaries, either. They have no natural enemies, although the majority of men, like most people of all races, have an instinctive dislike of the undead. Men are shorter than the elves, but taller still than dwarves or orcs. Their skin color can vary, from almost white to dark brown.&lt;br /&gt;
&lt;br /&gt;
==== Wesnothians ====&lt;br /&gt;
Many different groups of men exist, but the majority of them on the Great Continent live in the country of Wesnoth. The Wesnothians first appeared on the Great Continent from a land far across the ocean to the West, the Green Isle. Their capital city is Weldyn. The country is protected by the soldiers of the Wesnothian Army, the most organized military force in the known world. Its warriors come from the main provinces, where all men are conscripted at an early age.&lt;br /&gt;
* [[unit:Bowman|Bowman]]&lt;br /&gt;
* [[unit:Cavalryman|Cavalryman]]&lt;br /&gt;
* [[unit:Fencer|Fencer]]&lt;br /&gt;
* [[unit:HeavyInfantryman|HeavyInfantryman]]&lt;br /&gt;
* [[unit:Mage|Mage]]&lt;br /&gt;
* [[unit:Spearman|Spearman]]&lt;br /&gt;
&lt;br /&gt;
==== The Clansmen ====&lt;br /&gt;
The eastern provinces of Wesnoth, known as the Clan Homelands, have a geography consisting of more open plains and rolling hills than the western, more civilized provinces. They are home to the Horse Clans, who are allied with the Wesnothian Army but are somewhat separate, and maintain their own identity - as well as their own army. Some consider them to be a tributary state, that sends food and soldiers to Wesnoth in exchange for protection; others say they are on equal footing with the western half of Wesnoth, and they just serve different purposes in the country. In any case, the eastern provinces do not have a conscript army the way Western Wesnoth does. Training for fighting is part of the way of life of the Clans, so the parents will teach the children to ride horses, fight and shoot a bow from an early age. In general, the Clan warriors are less organized than the Civilized fighters, and their strengths and weaknesses complement each other.&lt;br /&gt;
* [[unit:Bowman|Bowman]]&lt;br /&gt;
* [[unit:Horseman|Horseman]]&lt;br /&gt;
&lt;br /&gt;
==== Outlaws and Necromancers ====&lt;br /&gt;
Bands of outlaws roam the wild areas of the Great Continent, stealing from unprotected villages. Most would run in fear if faced by a true army, but the more skilled of them would not be afraid to walk right into an opponent's camp, assassinate their leader, and run away.&lt;br /&gt;
&lt;br /&gt;
Although the art of necromancy is outlawed in Wesnoth, some mages choose to practice it, starting them on the road to Lichdom.&lt;br /&gt;
&lt;br /&gt;
* [[unit:Footpad|Footpad]]&lt;br /&gt;
* [[unit:Poacher|Poacher]]&lt;br /&gt;
* [[unit:Thief|Thief]]&lt;br /&gt;
* [[unit:Bandit|Bandit]]&lt;br /&gt;
&lt;br /&gt;
* [[unit:DarkAdept|DarkAdept]]&lt;br /&gt;
&lt;br /&gt;
=== Elves ===&lt;br /&gt;
&lt;br /&gt;
Elves are the elder race. They are skilled with the bow and arrow - almost all of them carry one - and are also good with the sword. They do not use many weapons but these, although they are in command of powerful magic, and do use it when needed. Physically, Elves are quite tall, and seem even taller due to their slimness. They are peaceful beings, but will fight against any who enter their homeland unasked. They live mostly in the forests of the Southwest, although some choose to live in the harsh Northlands.&lt;br /&gt;
* [[unit:ElvishArcher|ElvishArcher]]&lt;br /&gt;
* [[unit:ElvishFighter|ElvishFighter]]&lt;br /&gt;
* [[unit:ElvishScout|ElvishScout]]&lt;br /&gt;
* [[unit:ElvishShaman|ElvishShaman]]&lt;br /&gt;
&lt;br /&gt;
=== Orcs ===&lt;br /&gt;
&lt;br /&gt;
Orcs are a race of fierce, brown-skinned human-like creatures found across the wild places of the world. They came from across the sea, following the humans of the Green Isle. They are violent, quick-tempered, and belligerent, and hold an ancient hatred for the race of elves. Although orcs are disorganized and prone to infighting, warbands under a strong leader can cut bloody inroads into the boundaries where civilization meets wilderness. Most live in the Northland, away from the settled land of Wesnoth, whose people they are more often than not at war with. They are a greedy race, and&lt;br /&gt;
often can be found fighting under the banner of a lich-lord or human, hoping to gain riches from those they defeat.&lt;br /&gt;
* [[unit:OrcishArcher|OrcishArcher]]&lt;br /&gt;
* [[unit:OrcishAssassin|OrcishAssassin]]&lt;br /&gt;
* [[unit:OrcishGrunt|OrcishGrunt]]&lt;br /&gt;
&lt;br /&gt;
Goblins are a different breed than the orcs, smaller and weaker, but quicker. However, since they are the same species, they are considered by most the same race.&lt;br /&gt;
* [[unit:WolfRider|WolfRider]]&lt;br /&gt;
* [[unit:GoblinSpearman|GoblinSpearman]]&lt;br /&gt;
&lt;br /&gt;
=== Dwarves ===&lt;br /&gt;
&lt;br /&gt;
Dwarves were living on the Great Continent before Haldric arrived, but they were also immigrants, like him, coming from the East across the mountains. Dwarves are the height of human children, but are stronger than even fully grown men. &lt;br /&gt;
They are a solitary folk, cautious and slow to anger, but once their anger is roused they are terrible fighters.&lt;br /&gt;
Wielding many weapons with equal skill, dwarves are effective against many different races. They see in pitch darkness due to their constant work underground, and their heavy armor protects them against almost any physical attack, although magic can harm them effectively. The most skilled smiths of any in the realm, they are often hired by foreign kings to craft magical items, and the weapons and jewelry they make have been the cause of numerous wars.&lt;br /&gt;
* [[unit:DwarvishFighter|DwarvishFighter]]&lt;br /&gt;
* [[unit:DwarvishGuardsman|DwarvishGuardsman]]&lt;br /&gt;
* [[unit:DwarvishThunderer|DwarvishThunderer]]&lt;br /&gt;
* [[unit:DwarvishUlfserker|DwarvishUlfserker]]&lt;br /&gt;
* [[unit:GryphonRider|GryphonRider]]&lt;br /&gt;
&lt;br /&gt;
=== Undead ===&lt;br /&gt;
&lt;br /&gt;
As their race's name means, these are lost souls caught between this realm and next. Themselves deprived of life, they wish to likewise deprive all others of it. They are created by Necromancers, practitioners of dark magic, and are controlled by them when raised. After the necromancer controlling them dies, they remain in this world, and continue fighting for a purpose no one, perhaps not even themselves, know. Most of them are strong against physical attacks, but are weak against fire and holy assaults. Since they do not require bodily warmth to survive, cold is very ineffectual&lt;br /&gt;
against them.&lt;br /&gt;
* [[unit:Ghost|Ghost]]&lt;br /&gt;
* [[unit:Ghoul|Ghoul]]&lt;br /&gt;
* [[unit:Skeleton|Skeleton]]&lt;br /&gt;
* [[unit:SkeletonArcher|SkeletonArcher]]&lt;br /&gt;
* [[unit:VampireBat|VampireBat]]&lt;br /&gt;
* [[unit:WalkingCorpse|WalkingCorpse]]&lt;br /&gt;
&lt;br /&gt;
=== Drakes ===&lt;br /&gt;
&lt;br /&gt;
Drakes are the sons of dragons, almost the last legacy of those mighty beasts.  &lt;br /&gt;
Most of the race can fly and spit fire.&lt;br /&gt;
When the fire in their body is extinguished so is their life. &lt;br /&gt;
Because of this they are weak against cold, but they are good against most other attacks. &lt;br /&gt;
However, due to their soft underbellies, &amp;quot;sharp, pointy weapons&amp;quot; have always been their weakness, a characteristic most consider very dragonlike. They are heavy and move slowly, but once they reach their enemy they are devastating.&lt;br /&gt;
Their homeland was an island named Morogor, located between Wesnoth and the Green Isle, but it slowly sank into the sea, and now many of them are nomads, flying over the sea looking for a place to settle undisturbed.&lt;br /&gt;
* [[unit:DrakeBurner|DrakeBurner]]&lt;br /&gt;
* [[unit:DrakeClasher|DrakeClasher]]&lt;br /&gt;
* [[unit:DrakeFighter|DrakeFighter]]&lt;br /&gt;
* [[unit:DrakeGlider|DrakeGlider]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Other Races ==&lt;br /&gt;
&lt;br /&gt;
There are other races than these six main ones. They often align with the larger races, but these alliances are usually not permanent.&lt;br /&gt;
&lt;br /&gt;
=== Saurians ===&lt;br /&gt;
These are the smaller, more crafty allies of the Drakes. They often live in swamps or other damp places.&lt;br /&gt;
* [[unit:SaurianSkirmisher|SaurianSkirmisher]]&lt;br /&gt;
* [[unit:SaurianTribalist|SaurianTribalist]]&lt;br /&gt;
&lt;br /&gt;
=== Merfolk ===&lt;br /&gt;
The Merfolk live in the shallow parts of the ocean, wary of the monsters that lurk in the deep. Ordinarily they form alliances with no one, but in Asheviere's time they allied with the elves in order to defeat their captors. Mermen are powerful and quick in any watery environment, but struggle greatly to move on land.&lt;br /&gt;
* [[unit:MermaidInitiate|MermaidInitiate]]&lt;br /&gt;
* [[unit:MermanFighter|MermanFighter]]&lt;br /&gt;
* [[unit:MermanHunter|MermanHunter]]&lt;br /&gt;
&lt;br /&gt;
=== Nagas ===&lt;br /&gt;
Nagas are the long time enemies of the Merfolk, and in Asheviere's time they allied with orcs to finally defeat their opponents. They usually join forces with anyone willing to help them defeat the mermen.&lt;br /&gt;
* [[unit:NagaFighter|NagaFighter]]&lt;br /&gt;
&lt;br /&gt;
=== Ogres ===&lt;br /&gt;
The Ogres are wild beasts that live in the Northlands, but the Wesnothian army occasionally captures them and trains them for battle. They are extremely brutish and stupid, but possess enough intelligence to wield a weapon.&lt;br /&gt;
* [[unit:YoungOgre|YoungOgre]]&lt;br /&gt;
&lt;br /&gt;
=== Trolls ===&lt;br /&gt;
The Trolls are slightly more intelligent than Ogres, and ally with the Orcs whenever their shared homeland is in danger. However, most of the time they avoid each other.&lt;br /&gt;
* [[unit:TrollWhelp|TrollWhelp]]&lt;br /&gt;
&lt;br /&gt;
===Woses===&lt;br /&gt;
Little is known about the Woses, apart from their tree-like appearance. However these beings have not descended from trees, despite the similarity in form. They seem to be wardens of the natural world.&lt;br /&gt;
* [[unit:Wose|Wose]]&lt;br /&gt;
* [[unit:ElderWose|Elder Wose]]&lt;br /&gt;
* [[unit:AncientWose|Ancient Wose]]&lt;br /&gt;
&lt;br /&gt;
=== Monsters ===&lt;br /&gt;
&lt;br /&gt;
There are many monsters that roam about the land, not obeying anyone's orders. Occasionally, but not often, those who see them survive to tell the tale, and it is only from them that the people of Wesnoth know of their existence.&lt;br /&gt;
* [[unit:Cockatrice|Cockatrice]]&lt;br /&gt;
* [[unit:Cuttlefish|Cuttlefish]]&lt;br /&gt;
* [[unit:FireDragon|FireDragon]]&lt;br /&gt;
* [[unit:GiantScorpion|GiantScorpion]]&lt;br /&gt;
* [[unit:GiantSpider|GiantSpider]]&lt;br /&gt;
* [[unit:Gryphon|Gryphon]]&lt;br /&gt;
* [[unit:Mudcrawler|Mudcrawler]]&lt;br /&gt;
* [[unit:SeaSerpent|SeaSerpent]]&lt;br /&gt;
* [[unit:Yeti|Yeti]]&lt;br /&gt;
&lt;br /&gt;
See Also:&lt;br /&gt;
* [[UnitDescriptionRewriting]] - coordinating the revision&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Races&amp;diff=16158</id>
		<title>Races</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Races&amp;diff=16158"/>
		<updated>2007-06-28T14:57:41Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Woses */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Six Main Races ==&lt;br /&gt;
&lt;br /&gt;
=== Men ===&lt;br /&gt;
The race of men is an extremely diverse one. Although men originally came from the Old Continent, they have spread all over the world, and split into many different cultures and races. They do not possess much magic, though they can learn it, and can learn many more types of it than most others. They have no extra special abilities or aptitudes except their versatility and drive. Although often at odds with all races, they can occasionally form alliances with the less aggressive races such as elves and dwarves, and the less scrupulous among them do not shrink back from hiring orcish mercenaries, either. They have no natural enemies, although the majority of men, like most people of all races, have an instinctive dislike of the undead. Men are shorter than the elves, but taller still than dwarves or orcs. Their skin color can vary, from almost white to dark brown.&lt;br /&gt;
&lt;br /&gt;
==== Wesnothians ====&lt;br /&gt;
Many different groups of men exist, but the majority of them on the Great Continent live in the country of Wesnoth. The Wesnothians first appeared on the Great Continent from a land far across the ocean to the West, the Green Isle. Their capital city is Weldyn. The country is protected by the soldiers of the Wesnothian Army, the most organized military force in the known world. Its warriors come from the main provinces, where all men are conscripted at an early age.&lt;br /&gt;
* [[unit:Bowman|Bowman]]&lt;br /&gt;
* [[unit:Cavalryman|Cavalryman]]&lt;br /&gt;
* [[unit:Fencer|Fencer]]&lt;br /&gt;
* [[unit:HeavyInfantryman|HeavyInfantryman]]&lt;br /&gt;
* [[unit:Mage|Mage]]&lt;br /&gt;
* [[unit:Spearman|Spearman]]&lt;br /&gt;
&lt;br /&gt;
==== The Clansmen ====&lt;br /&gt;
The eastern provinces of Wesnoth, known as the Clan Homelands, have a geography consisting of more open plains and rolling hills than the western, more civilized provinces. They are home to the Horse Clans, who are allied with the Wesnothian Army but are somewhat separate, and maintain their own identity - as well as their own army. Some consider them to be a tributary state, that sends food and soldiers to Wesnoth in exchange for protection; others say they are on equal footing with the western half of Wesnoth, and they just serve different purposes in the country. In any case, the eastern provinces do not have a conscript army the way Western Wesnoth does. Training for fighting is part of the way of life of the Clans, so the parents will teach the children to ride horses, fight and shoot a bow from an early age. In general, the Clan warriors are less organized than the Civilized fighters, and their strengths and weaknesses complement each other.&lt;br /&gt;
* [[unit:Bowman|Bowman]]&lt;br /&gt;
* [[unit:Horseman|Horseman]]&lt;br /&gt;
&lt;br /&gt;
==== Outlaws and Necromancers ====&lt;br /&gt;
Bands of outlaws roam the wild areas of the Great Continent, stealing from unprotected villages. Most would run in fear if faced by a true army, but the more skilled of them would not be afraid to walk right into an opponent's camp, assassinate their leader, and run away.&lt;br /&gt;
&lt;br /&gt;
Although the art of necromancy is outlawed in Wesnoth, some mages choose to practice it, starting them on the road to Lichdom.&lt;br /&gt;
&lt;br /&gt;
* [[unit:Footpad|Footpad]]&lt;br /&gt;
* [[unit:Poacher|Poacher]]&lt;br /&gt;
* [[unit:Thief|Thief]]&lt;br /&gt;
* [[unit:Bandit|Bandit]]&lt;br /&gt;
&lt;br /&gt;
* [[unit:DarkAdept|DarkAdept]]&lt;br /&gt;
&lt;br /&gt;
=== Elves ===&lt;br /&gt;
&lt;br /&gt;
Elves are the elder race. They are skilled with the bow and arrow - almost all of them carry one - and are also good with the sword. They do not use many weapons but these, although they are in command of powerful magic, and do use it when needed. Physically, Elves are quite tall, and seem even taller due to their slimness. They are peaceful beings, but will fight against any who enter their homeland unasked. They live mostly in the forests of the Southwest, although some choose to live in the harsh Northlands.&lt;br /&gt;
* [[unit:ElvishArcher|ElvishArcher]]&lt;br /&gt;
* [[unit:ElvishFighter|ElvishFighter]]&lt;br /&gt;
* [[unit:ElvishScout|ElvishScout]]&lt;br /&gt;
* [[unit:ElvishShaman|ElvishShaman]]&lt;br /&gt;
&lt;br /&gt;
=== Orcs ===&lt;br /&gt;
&lt;br /&gt;
Orcs are a race of fierce, brown-skinned human-like creatures found across the wild places of the world. They came from across the sea, following the humans of the Green Isle. They are violent, quick-tempered, and belligerent, and hold an ancient hatred for the race of elves. Although orcs are disorganized and prone to infighting, warbands under a strong leader can cut bloody inroads into the boundaries where civilization meets wilderness. Most live in the Northland, away from the settled land of Wesnoth, whose people they are more often than not at war with. They are a greedy race, and&lt;br /&gt;
often can be found fighting under the banner of a lich-lord or human, hoping to gain riches from those they defeat.&lt;br /&gt;
* [[unit:OrcishArcher|OrcishArcher]]&lt;br /&gt;
* [[unit:OrcishAssassin|OrcishAssassin]]&lt;br /&gt;
* [[unit:OrcishGrunt|OrcishGrunt]]&lt;br /&gt;
&lt;br /&gt;
Goblins are a different breed than the orcs, smaller and weaker, but quicker. However, since they are the same species, they are considered by most the same race.&lt;br /&gt;
* [[unit:WolfRider|WolfRider]]&lt;br /&gt;
* [[unit:GoblinSpearman|GoblinSpearman]]&lt;br /&gt;
&lt;br /&gt;
=== Dwarves ===&lt;br /&gt;
&lt;br /&gt;
Dwarves were living on the Great Continent before Haldric arrived, but they were also immigrants, like him, coming from the East across the mountains. Dwarves are the height of human children, but are stronger than even fully grown men. &lt;br /&gt;
They are a solitary folk, cautious and slow to anger, but once their anger is roused they are terrible fighters.&lt;br /&gt;
Wielding many weapons with equal skill, dwarves are effective against many different races. They see in pitch darkness due to their constant work underground, and their heavy armor protects them against almost any physical attack, although magic can harm them effectively. The most skilled smiths of any in the realm, they are often hired by foreign kings to craft magical items, and the weapons and jewelry they make have been the cause of numerous wars.&lt;br /&gt;
* [[unit:DwarvishFighter|DwarvishFighter]]&lt;br /&gt;
* [[unit:DwarvishGuardsman|DwarvishGuardsman]]&lt;br /&gt;
* [[unit:DwarvishThunderer|DwarvishThunderer]]&lt;br /&gt;
* [[unit:DwarvishUlfserker|DwarvishUlfserker]]&lt;br /&gt;
* [[unit:GryphonRider|GryphonRider]]&lt;br /&gt;
&lt;br /&gt;
=== Undead ===&lt;br /&gt;
&lt;br /&gt;
As their race's name means, these are lost souls caught between this realm and next. Themselves deprived of life, they wish to likewise deprive all others of it. They are created by Necromancers, practitioners of dark magic, and are controlled by them when raised. After the necromancer controlling them dies, they remain in this world, and continue fighting for a purpose no one, perhaps not even themselves, know. Most of them are strong against physical attacks, but are weak against fire and holy assaults. Since they do not require bodily warmth to survive, cold is very ineffectual&lt;br /&gt;
against them.&lt;br /&gt;
* [[unit:Ghost|Ghost]]&lt;br /&gt;
* [[unit:Ghoul|Ghoul]]&lt;br /&gt;
* [[unit:Skeleton|Skeleton]]&lt;br /&gt;
* [[unit:SkeletonArcher|SkeletonArcher]]&lt;br /&gt;
* [[unit:VampireBat|VampireBat]]&lt;br /&gt;
* [[unit:WalkingCorpse|WalkingCorpse]]&lt;br /&gt;
&lt;br /&gt;
=== Drakes ===&lt;br /&gt;
&lt;br /&gt;
Drakes are the sons of dragons, almost the last legacy of those mighty beasts.  &lt;br /&gt;
Most of the race can fly and spit fire.&lt;br /&gt;
When the fire in their body is extinguished so is their life. &lt;br /&gt;
Because of this they are weak against cold, but they are good against most other attacks. &lt;br /&gt;
However, due to their soft underbellies, &amp;quot;sharp, pointy weapons&amp;quot; have always been their weakness, a characteristic most consider very dragonlike. They are heavy and move slowly, but once they reach their enemy they are devastating.&lt;br /&gt;
Their homeland was an island named Morogor, located between Wesnoth and the Green Isle, but it slowly sank into the sea, and now many of them are nomads, flying over the sea looking for a place to settle undisturbed.&lt;br /&gt;
* [[unit:DrakeBurner|DrakeBurner]]&lt;br /&gt;
* [[unit:DrakeClasher|DrakeClasher]]&lt;br /&gt;
* [[unit:DrakeFighter|DrakeFighter]]&lt;br /&gt;
* [[unit:DrakeGlider|DrakeGlider]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Other Races ==&lt;br /&gt;
&lt;br /&gt;
There are other races than these six main ones. They often align with the larger races, but these alliances are usually not permanent.&lt;br /&gt;
&lt;br /&gt;
=== Saurians ===&lt;br /&gt;
These are the smaller, more crafty allies of the Drakes. They often live in swamps or other damp places.&lt;br /&gt;
* [[unit:SaurianSkirmisher|SaurianSkirmisher]]&lt;br /&gt;
* [[unit:SaurianTribalist|SaurianTribalist]]&lt;br /&gt;
&lt;br /&gt;
=== Merfolk ===&lt;br /&gt;
The Merfolk live in the shallow parts of the ocean, wary of the monsters that lurk in the deep. Ordinarily they form alliances with no one, but in Asheviere's time they allied with the elves in order to defeat their captors. Mermen are powerful and quick in any watery environment, but struggle greatly to move on land.&lt;br /&gt;
* [[unit:MermaidInitiate|MermaidInitiate]]&lt;br /&gt;
* [[unit:MermanFighter|MermanFighter]]&lt;br /&gt;
* [[unit:MermanHunter|MermanHunter]]&lt;br /&gt;
&lt;br /&gt;
=== Nagas ===&lt;br /&gt;
Nagas are the long time enemies of the Merfolk, and in Asheviere's time they allied with orcs to finally defeat their opponents. They usually join forces with anyone willing to help them defeat the mermen.&lt;br /&gt;
* [[unit:NagaFighter|NagaFighter]]&lt;br /&gt;
&lt;br /&gt;
=== Ogres ===&lt;br /&gt;
The Ogres are wild beasts that live in the Northlands, but the Wesnothian army occasionally captures them and trains them for battle. They are extremely brutish and stupid, but possess enough intelligence to wield a weapon.&lt;br /&gt;
* [[unit:YoungOgre|YoungOgre]]&lt;br /&gt;
&lt;br /&gt;
=== Trolls ===&lt;br /&gt;
The Trolls are slightly more intelligent than Ogres, and ally with the Orcs whenever their shared homeland is in danger. However, most of the time they avoid each other.&lt;br /&gt;
* [[unit:TrollWhelp|TrollWhelp]]&lt;br /&gt;
&lt;br /&gt;
===Woses===&lt;br /&gt;
Little is known about the Woses, apart from their tree-like appearance. However these beings have not descended from trees, despite the similarity in form. They seem to be wardens of the natural world.&lt;br /&gt;
* [[unit:Wose|Wose]]&lt;br /&gt;
&lt;br /&gt;
=== Monsters ===&lt;br /&gt;
&lt;br /&gt;
There are many monsters that roam about the land, not obeying anyone's orders. Occasionally, but not often, those who see them survive to tell the tale, and it is only from them that the people of Wesnoth know of their existence.&lt;br /&gt;
* [[unit:Cockatrice|Cockatrice]]&lt;br /&gt;
* [[unit:Cuttlefish|Cuttlefish]]&lt;br /&gt;
* [[unit:FireDragon|FireDragon]]&lt;br /&gt;
* [[unit:GiantScorpion|GiantScorpion]]&lt;br /&gt;
* [[unit:GiantSpider|GiantSpider]]&lt;br /&gt;
* [[unit:Gryphon|Gryphon]]&lt;br /&gt;
* [[unit:Mudcrawler|Mudcrawler]]&lt;br /&gt;
* [[unit:SeaSerpent|SeaSerpent]]&lt;br /&gt;
* [[unit:Yeti|Yeti]]&lt;br /&gt;
&lt;br /&gt;
See Also:&lt;br /&gt;
* [[UnitDescriptionRewriting]] - coordinating the revision&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosSimple&amp;diff=16152</id>
		<title>BuildingScenariosSimple</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosSimple&amp;diff=16152"/>
		<updated>2007-06-28T07:54:45Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Building scenarios: Simple */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BuildingScenariosNav}}&lt;br /&gt;
&lt;br /&gt;
= Learning things step by step =&lt;br /&gt;
&lt;br /&gt;
This will show you a very simple scenario file, explaining each line of it.&lt;br /&gt;
The file is not fully functional, but it will show the basics needed to describe what a scenario is all about.&lt;br /&gt;
&lt;br /&gt;
'''Before reading this, it might prove usefull to read something about the syntax used in the Wesnoth Markup Language: [[SyntaxWML]]'''&lt;br /&gt;
&lt;br /&gt;
== First part ==&lt;br /&gt;
 [scenario]&lt;br /&gt;
 &lt;br /&gt;
   id=test-1&lt;br /&gt;
   next_scenario=2_test-more&lt;br /&gt;
 &lt;br /&gt;
   name=A Simple Test Scenario&lt;br /&gt;
   map_data=&amp;quot;{campaigns/Test_Campaign/testmap}{~campaigns/Test_Campaign/testmap}&amp;quot;&lt;br /&gt;
   turns=20&lt;br /&gt;
 &lt;br /&gt;
   {DAWN}&lt;br /&gt;
   {MORNING}&lt;br /&gt;
   {AFTERNOON}&lt;br /&gt;
   {DUSK}&lt;br /&gt;
   {FIRST_WATCH}&lt;br /&gt;
   {SECOND_WATCH}&lt;br /&gt;
 &lt;br /&gt;
   music=wesnoth-1.ogg&lt;br /&gt;
 &lt;br /&gt;
   [event]&lt;br /&gt;
     name=prestart&lt;br /&gt;
     [objectives]&lt;br /&gt;
       side=1&lt;br /&gt;
       [objective]&lt;br /&gt;
         description= _ &amp;quot;Defeat Enemy Leader&amp;quot;&lt;br /&gt;
         condition=win&lt;br /&gt;
       [/objective]&lt;br /&gt;
       [objective]&lt;br /&gt;
         description= _ &amp;quot;Death of Konrad&amp;quot;&lt;br /&gt;
         condition=lose&lt;br /&gt;
       [/objective]&lt;br /&gt;
     [/objectives]&lt;br /&gt;
   [/event]&lt;br /&gt;
 .  continued below&lt;br /&gt;
 .  ||&lt;br /&gt;
 .  \/&lt;br /&gt;
 &lt;br /&gt;
Every scenario must be enclosed in a tag;&lt;br /&gt;
the '''[scenario]''' tag is used for campaign scenarios.&lt;br /&gt;
The first set of keys in the scenario tag&lt;br /&gt;
describe the very basics of this scenario:&lt;br /&gt;
* The ''id'' (short for ''identifier'') is the computer's name for your scenario, and is not displayed during the game. However, it will be used to display game statistics (they will be graphed on http://stats.wesnoth.org in numerical order, so it's also a good idea to give the id's a number). This name is also used as reference in other tags and files, eg inside a '''[campaign]''' tag using the ''first_scenario'' key(see [[BuildingCampaignsTheCampaignFile]]) or inside a '''[scenario]''' tag using the ''next_scenario'' key (see below).&lt;br /&gt;
&lt;br /&gt;
* The value of the ''next_scenario'' key is the id (see above) of the scenario that is played after this one is won. Units from this scenario will be available for recall (unless you modify the recall list, but that's stuff for later). If your scenario is not part of a campaign, or if this is the last scenario you should either skip this line or put '''next_scenario=null''' inside the file. This will tell the game to display the End screen when this scenario is won.&lt;br /&gt;
&lt;br /&gt;
* The value of the ''name'' key is shown on the introduction screen before each scenario is played. (This can contain a picture of a map, or anything else you fancy. See [[BuildingScenariosIntermediate]] for an explenation on how to do that.) It's also the default name for saves on the level.&lt;br /&gt;
&lt;br /&gt;
* The next key, ''map_data'', is a link to the map file. You can create map files using the Wesnoth Map Editor (see [[WesnothMapEditor]] and [[BuildingMaps]] for more information). Since we may not know exactly where this campaign will be located we'll write two possible locations of the map file. The quotes are necessary because Wesnoth map data takes up multiple lines, so quotes are used to indicate where the data begins and ends. If you don't do this, it will break the scenario.&lt;br /&gt;
&lt;br /&gt;
* Finally, the last key in the top set of keys is ''turns''. This is the amount of turns a player is given to finish the scenario. (It can be changed during the game, but again, that is stuff for later.) When the player fails to finish the secnario in the given time, he has lost. (Said otherwise: the ''defeat'' event is trigered. See [[EventWML]] for more.)&lt;br /&gt;
&lt;br /&gt;
The next section is a set of preprocessors (see [[PreprocessorRef]]). Preprocessors are essentially WML shortcuts. They allow you to define certain pieces of code and re-use it whenever it is needed. Wesnoth provides you with a whole serie of standard preprocessors to make life more easy, but you yourself can define them too (again stuff for later). &lt;br /&gt;
Lets get back to this example! The preprocessors used here, describe how a day in this scenario should progress. This listing above is the normal day used throughout Wesnoth. If you want the entire scenario to take place at night, remove all the preprocessors except for '''{SECOND_WATCH}'''. This could be useful if you have Konrad&lt;br /&gt;
fighting the Undead and want the Undead to have the upper hand the whole time. Remember though, by setting this to a single tme of day and not the normal progress listed above, your scenario will effectively be taking place during one day or night, not many days as most scenarios are.&lt;br /&gt;
&lt;br /&gt;
The ''music'' key is a filename pointing to the music which plays. (See [[MusicListWML]] for more.)&lt;br /&gt;
This music file must be in the ''music/'' directory and '''must''' be in .ogg format.&lt;br /&gt;
&lt;br /&gt;
A tag you'll get to know very good when making scenarios shows up: '''[event]...[/event]'''.&lt;br /&gt;
Event tags are used to describe what should be done if an 'event' takes place. What this event is, is described by ''name''key. In this case we're describing the so-called 'prestart' event. This one takes place just ''before'' the game starts and just ''after'' all of the introductions screens were shown.&lt;br /&gt;
Here we have limited the contents of the tag to another important tag: '''[objectives]''' (plural) containing any number of '''[objective]''' (singular) tags.&lt;br /&gt;
For each '''[objective]''' (singular) tag, if ''condition'' is set to &amp;quot;win&amp;quot;, the text of ''description'' will be displayed in green after &amp;quot;Victory&amp;quot; in the Scenario Objectives. If ''condition'' is set to &amp;quot;lose&amp;quot;, the text of ''description'' will be displayed in red after &amp;quot;Defeat&amp;quot; in the Scenario Objectives. Because we've placed this tag inside a prestart event, this will be shown at the very first turn of the scenario.&lt;br /&gt;
The ''side'' key indicates that these conditions are for side 1 (see below).&lt;br /&gt;
The ' _ ' (underscore) facilitates translation using Gettext (see [[GetText]]).&lt;br /&gt;
&lt;br /&gt;
Note that ''ANY'' Victory or Defeat objective can be met to win or lose the scenario,&lt;br /&gt;
but a single Victory objective may have multiple parts.&lt;br /&gt;
Also note that the '''[objective]''' tag only describes what the objectives are. You will still need to set the appropiate events before they will work. (But that's again stuff for later)&lt;br /&gt;
&lt;br /&gt;
== Second part ==&lt;br /&gt;
So far so good! The last necessary part describes what the players (Human and&lt;br /&gt;
Computer) start with, what they can do and what they can't do. Each of the players is described in a '''[side]''' tag.&lt;br /&gt;
&lt;br /&gt;
 .  /\ &lt;br /&gt;
 .  ||&lt;br /&gt;
 .  continued from above&lt;br /&gt;
   [side]&lt;br /&gt;
     side=1&lt;br /&gt;
     controller=human&lt;br /&gt;
     team_name=2&lt;br /&gt;
     user_team_name= _ &amp;quot;Konrad's forces&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
     type=Commander&lt;br /&gt;
     description=Konrad&lt;br /&gt;
     canrecruit=1&lt;br /&gt;
 &lt;br /&gt;
     recruit=Elvish Fighter,Elvish Archer,Horseman,Mage,Elvish Shaman&lt;br /&gt;
 &lt;br /&gt;
     {GOLD 100 50 0}&lt;br /&gt;
     {INCOME 10 5 0}&lt;br /&gt;
   [/side] &lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
Above you can see a sample '''[side]''' for the human player, Konrad. We wll describe every key more in detail below:&lt;br /&gt;
* ''side'': the leader of this side is placed on the tile represented by this digit (see [[BuildingMaps]]) It's a number from 1 to 9.&lt;br /&gt;
* ''controller'': possible values are 'human' or 'ai' (artificial intelligence, meaning your computer). If you don't specify this key, 'ai' is used as the default.&lt;br /&gt;
* ''team_name'' describes which team the side is on. It defaults to the same number as ''side'', so setting it to ''2'' allies this side with side 2, if you haven't changed the team_name of side 2.&lt;br /&gt;
* ''user_team_name'' is the name displayed when you view the sie stats (by pressing alt+s during gameplay). The underscore facilitates translation using GetText (see [[GetText]]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next set of keys describe the leader of this side:&lt;br /&gt;
* ''canrecruit'': This key can be '1' or '0', meaning &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot; respectively. If you no, then the leader won't be able to recruit. (Not much of a leader then, is he?) Any team without a canrecruit=1 unit automatically loses, so be sure to use this key.&lt;br /&gt;
* ''type'' describes what type of unit the leader will be. The possible  values are listed here: [[UnitTables]].&lt;br /&gt;
* ''description'' is the name and description of the leader.&lt;br /&gt;
In a campaign, all of these 'leader-describing' keys are ignored for the human player (except ''canrecruit''), since the leader from the previous scenario is used instead. However, the ''type'' key is still neccesary to prevent the scenario from crashing.&lt;br /&gt;
&lt;br /&gt;
* ''recruit'' is a comma-separated list of types of units. The possible values are listed in [[UnitTables]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then two more preprocessors are used:&lt;br /&gt;
* '''{GOLD easy normal hard}''' takes 3 positive numbers. These indicate the amount of money the player will start with on the EASY, NORMAL and HARD difficulty level.&lt;br /&gt;
In a campaign file, inside a human controlled side (''controller=human''), this is the minimum amount.  The actual amount the player gets ca, be larger if the player retained more from previous scenarios.&lt;br /&gt;
* '''{INCOME easy normal hard}''' is similar, but indicates the base income.&lt;br /&gt;
The defaults for each of these values are 100 gold and 2 base income.&lt;br /&gt;
&lt;br /&gt;
== Making it all work ==&lt;br /&gt;
Now, to make this scenario playable, we need to make a campaign for it. (see [[BuildingCampaignsTheCampaignFile]])&lt;br /&gt;
This should NOT be stored inside the main directory '''data/campaigns''' but inside '''userdata/data/campaigns'''. This prevents breaking the mainline campaigns or even worse, the entire game. (see [[BuildingCampaignsDirectoryStructure]])&lt;br /&gt;
Note: All files, the campaign file and the scenario file, one for each scenario level, must be saved with the ending .cfg (for example: testcampaign.cfg).&lt;br /&gt;
This is a short example on how to do this:&lt;br /&gt;
&lt;br /&gt;
 [campaign]&lt;br /&gt;
   name= _ &amp;quot;Test Campaign&amp;quot;&lt;br /&gt;
   first_scenario=test-1&lt;br /&gt;
   difficulties=EASY,NORMAL,HARD&lt;br /&gt;
 &lt;br /&gt;
   difficulty_descriptions= _ &amp;quot;&amp;amp;elvish-fighter.png=Easy;*&amp;amp;elvish-hero.png=Medium;&amp;amp;elvish-champion.png=Hard&amp;quot;&lt;br /&gt;
   icon=elvish-fighter.png&lt;br /&gt;
 [/campaign]&lt;br /&gt;
&lt;br /&gt;
Campaigns are described in the '''[campaign]''' tag. The first key is ''name'', which is&lt;br /&gt;
displayed on the campaign selector box. The second key is ''first_scenario'', which is&lt;br /&gt;
the ID of the first scenario of the campaign. Scenarios following after this one are referenced inside the first scenario using ''next_scenario'' (see above).&lt;br /&gt;
&lt;br /&gt;
The key '''difficulties=EASY,NORMAL,HARD''' tells the computer to set the macro '''EASY''' if the first difficulty choice is chosen, '''NORMAL''' if the second is chosen, and '''HARD''' if the third is chosen.&lt;br /&gt;
The expression '''#ifdef''' can be used later to test these macros. (see [[PreprocessorRef]])&lt;br /&gt;
It is recommended that you do not use other names than '''EASY''', '''NORMAL''', and '''HARD''' for your macros, because if you do then the standard macros, such as '''{GOLD}''' and '''{INCOME}''', won't work properly.&lt;br /&gt;
&lt;br /&gt;
Two optional keys are ''difficulty_descriptions'' and ''icon''.&lt;br /&gt;
''icon'' has value equal to an image, displayed inside the campaign list.&lt;br /&gt;
''difficulty_descriptions'' must have the same number of inputs as  '''difficulties''', most commonly three, separated by semicolons.&lt;br /&gt;
These inputs then map on to the difficulties, so that if you have set difficulties to:&lt;br /&gt;
 &amp;quot;difficulties=EASY,NORMAL,HARD&amp;quot;&lt;br /&gt;
the first input will specify the display on EASY, the second on NORMAL and the third on HARD.&lt;br /&gt;
Each difficulty display description starts opens with an ampersand (''&amp;amp;''), then the image to display (eg ''elvish-fighter.png''),&lt;br /&gt;
then an equals (''='') sign, then the text to display (eg ''Easy'').&lt;br /&gt;
Optionally you can place an asterisk (''*'') before one of the ampersands, and the corresponding difficulty will be selected by default (here NORMAL is default).&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[BuildingMaps]] &amp;amp; [[WesnothMapEditor]]&lt;br /&gt;
* [[ScenarioWML]] &amp;amp; [[SyntaxWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenarios&amp;diff=16151</id>
		<title>BuildingScenarios</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenarios&amp;diff=16151"/>
		<updated>2007-06-28T07:52:41Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Index */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wesnoth scenarios are the individual levels within the game. Each scenario contains two files. First is the map&lt;br /&gt;
itself, this is described in [[BuildingMaps]]. The second is the config file. This configuration file is used to&lt;br /&gt;
describe everything about the scenario. Both of the files are ascii and can be edited in any standard text editor (vi,&lt;br /&gt;
notepad, etc.) If you decide to use a wordprocessor, please make sure you remember to ''Save As'' text.&lt;br /&gt;
&lt;br /&gt;
Scenarios are written in the Wesnoth Markup Language. This is a very simple language to learn.&lt;br /&gt;
The WML language is described in [[ReferenceWML]].&lt;br /&gt;
The WML syntax is described in [[SyntaxWML]].&lt;br /&gt;
Wesnoth has a preprocessor that allows designers to reorganize information into a more convenient structure.&lt;br /&gt;
The WML preprocessor is described in [[PreprocessorRef]].&lt;br /&gt;
&lt;br /&gt;
This document is split into several sections, starting with a basic tutorial and moving into more complex techniques.  From the information contained within this document you should have all the knowledge to create Wesnoth scenarios. If you see any mistakes or missing information, please feel free to fix the pages yourself, add a comment to the comment page, or email me jzaun at campus dot hpu dot edu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;navtemplate&amp;quot;&amp;gt;&lt;br /&gt;
==== Index ====&lt;br /&gt;
[[BuildingScenarios]]&lt;br /&gt;
:* '''[[BuildingScenariosSimple]] - [[BuildingScenariosIntermediate]] - [[BuildingScenariosAdvanced]]'''&lt;br /&gt;
:* [[BuildingScenariosSimple - French Version]]&lt;br /&gt;
:* [[BuildingScenariosComments]] - Comments left for advice&lt;br /&gt;
:* [[BuildingScenariosSamples]] - Basic sample code&lt;br /&gt;
:* [[BuildingScenariosShroudData]] - A tutorial on shroud_data&lt;br /&gt;
:* [[BuildingScenariosBalancing]] - How to balance your scenario&lt;br /&gt;
:* [[BuildingScenariosFAQ]] - Frequently Asked Questions&lt;br /&gt;
&amp;lt;/div class=&amp;quot;navtemplate&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Quick Tag Index ==&lt;br /&gt;
'''[[ScenarioWML]]''' the top level tags [scenario], [multiplayer], [test], and [tutorial]&lt;br /&gt;
:* [[EventWML]] how to describe an event&lt;br /&gt;
:** [[FilterWML]]&lt;br /&gt;
:** [[DirectActionsWML]], [[InterfaceActionsWML]], [[InternalActionsWML]]&lt;br /&gt;
:* [[SideWML]] how to describe a side&lt;br /&gt;
:** [[SingleUnitWML]]&lt;br /&gt;
:** [[BuildingScenariosShroudData]]&lt;br /&gt;
:* [[MapGeneratorWML]] the random map generator&lt;br /&gt;
:* [[TimeWML]] how to describe a day&lt;br /&gt;
:* [[IntroWML]] how to describe the intro screen &lt;br /&gt;
:* [[UtilWML]] a set of preprocessors you can use&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Create]]&lt;br /&gt;
* [[ReferenceWML]] - WML master reference&lt;br /&gt;
** [[AlphabeticalWML]] - a tag index&lt;br /&gt;
** [[BuildingScenariosIndex]] - in-depth key and tag index&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Create}}&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenarios&amp;diff=16150</id>
		<title>BuildingScenarios</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenarios&amp;diff=16150"/>
		<updated>2007-06-28T07:45:44Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wesnoth scenarios are the individual levels within the game. Each scenario contains two files. First is the map&lt;br /&gt;
itself, this is described in [[BuildingMaps]]. The second is the config file. This configuration file is used to&lt;br /&gt;
describe everything about the scenario. Both of the files are ascii and can be edited in any standard text editor (vi,&lt;br /&gt;
notepad, etc.) If you decide to use a wordprocessor, please make sure you remember to ''Save As'' text.&lt;br /&gt;
&lt;br /&gt;
Scenarios are written in the Wesnoth Markup Language. This is a very simple language to learn.&lt;br /&gt;
The WML language is described in [[ReferenceWML]].&lt;br /&gt;
The WML syntax is described in [[SyntaxWML]].&lt;br /&gt;
Wesnoth has a preprocessor that allows designers to reorganize information into a more convenient structure.&lt;br /&gt;
The WML preprocessor is described in [[PreprocessorRef]].&lt;br /&gt;
&lt;br /&gt;
This document is split into several sections, starting with a basic tutorial and moving into more complex techniques.  From the information contained within this document you should have all the knowledge to create Wesnoth scenarios. If you see any mistakes or missing information, please feel free to fix the pages yourself, add a comment to the comment page, or email me jzaun at campus dot hpu dot edu.&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
* [[BuildingScenarios]]&lt;br /&gt;
:: '''[[BuildingScenariosSimple]] - [[BuildingScenariosIntermediate]] - [[BuildingScenariosAdvanced]]'''&lt;br /&gt;
:: [[BuildingScenariosSimple - French Version]]&lt;br /&gt;
* [[BuildingScenariosComments]] - Comments left for advice&lt;br /&gt;
* [[BuildingScenariosSamples]] - Basic sample code&lt;br /&gt;
* [[BuildingScenariosShroudData]] - A tutorial on shroud_data&lt;br /&gt;
* [[BuildingScenariosBalancing]] - How to balance your scenario&lt;br /&gt;
* [[BuildingScenariosFAQ]] - Frequently Asked Questions&lt;br /&gt;
&lt;br /&gt;
== Quick Tag Index ==&lt;br /&gt;
'''[[ScenarioWML]]''' the top level tags [scenario], [multiplayer], [test], and [tutorial]&lt;br /&gt;
:* [[EventWML]] how to describe an event&lt;br /&gt;
:** [[FilterWML]]&lt;br /&gt;
:** [[DirectActionsWML]], [[InterfaceActionsWML]], [[InternalActionsWML]]&lt;br /&gt;
:* [[SideWML]] how to describe a side&lt;br /&gt;
:** [[SingleUnitWML]]&lt;br /&gt;
:** [[BuildingScenariosShroudData]]&lt;br /&gt;
:* [[MapGeneratorWML]] the random map generator&lt;br /&gt;
:* [[TimeWML]] how to describe a day&lt;br /&gt;
:* [[IntroWML]] how to describe the intro screen &lt;br /&gt;
:* [[UtilWML]] a set of preprocessors you can use&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Create]]&lt;br /&gt;
* [[ReferenceWML]] - WML master reference&lt;br /&gt;
** [[AlphabeticalWML]] - a tag index&lt;br /&gt;
** [[BuildingScenariosIndex]] - in-depth key and tag index&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Create}}&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingMaps&amp;diff=16147</id>
		<title>BuildingMaps</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingMaps&amp;diff=16147"/>
		<updated>2007-06-27T21:23:18Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* See Also: shroud data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is all you need to know about maps:&lt;br /&gt;
&lt;br /&gt;
# A map is just a bunch of letters arranged in a rectangle (the rectangle is known as the &amp;quot;map data&amp;quot;)&lt;br /&gt;
# There are two ways to save this rectangle in a file&lt;br /&gt;
&lt;br /&gt;
Seriously now, here are the details.&lt;br /&gt;
&lt;br /&gt;
== Wesnoth map data format ==&lt;br /&gt;
&lt;br /&gt;
Map data is used to represent maps in Wesnoth.  The encoding for maps has a specific format:&lt;br /&gt;
&lt;br /&gt;
* A map data file consists of any number of lines, each with the same number of characters.&lt;br /&gt;
* Each character must be either a letter specified in a ''letter'' key specifying a terrain (see [[TerrainLettersWML]]), or a digit.&lt;br /&gt;
* When the file is interpreted, each letter will be replaced by the terrain it refers to.&lt;br /&gt;
* Each nonzero digit ''n'' where ''n'' = 1, 2, 3, ... will be replaced by keep, with the leader of side ''n'' placed on the keep.&lt;br /&gt;
&lt;br /&gt;
Since text file tiles are squares while game tiles are hexes, some tiles must be shifted.&lt;br /&gt;
Tiles in even-numbered columns are shifted down 1/2 of a tile.&lt;br /&gt;
For example, to have a road of connected dirt ('r') tiles, the map data would look like this:&lt;br /&gt;
&lt;br /&gt;
 rrgggggg&lt;br /&gt;
 ggrrgggg&lt;br /&gt;
 ggggrrgg&lt;br /&gt;
 ggggggrr&lt;br /&gt;
&lt;br /&gt;
'''''[[User:SkeletonCrew#Branch_terrain|(SVN terrain only)]]'''''&lt;br /&gt;
The map format for the new Wesnoth version has been changed so this description is for the newer version.&lt;br /&gt;
&lt;br /&gt;
Map data is used to represent maps in Wesnoth.  The encoding for maps has a specific format:&lt;br /&gt;
&lt;br /&gt;
* A map data file consists of any number of lines, each with the same number of strings.&lt;br /&gt;
* Each string must be a string specified in a ''string'' key specifying a terrain (see [[TerrainLettersWML]]).&lt;br /&gt;
* Each string may be padded with spaces or tabs and must be separated with a comma, except for the last string on a line this one may not have a comma.&lt;br /&gt;
* When the file is interpreted, each string will be replaced by the terrain it refers to.&lt;br /&gt;
* Empty lines are allowed before, after and between lines of characters, between lines is not advised.&lt;br /&gt;
* Terrains may be prefixed with a number followed by one space, these indicate the starting position for side ''n''. ''n'' = 1, 2, 3, ... 9 (more might work but is untested and unsupported). This is a change from the previous system where a starting position was automatically a keep.&lt;br /&gt;
&lt;br /&gt;
It's advised to use spaces for padding and pad each column to be the same width; the game does this when writing a map file.&lt;br /&gt;
 &lt;br /&gt;
Since text file tiles are squares while game tiles are hexes, some tiles must be shifted.&lt;br /&gt;
Tiles in even-numbered columns are shifted down 1/2 of a tile.&lt;br /&gt;
For example, to have a road of connected dirt ('r') tiles, the map data would look like this:&lt;br /&gt;
&lt;br /&gt;
 Re, Re, Gg, Gg, Gg, Gg, Gg, Gg&lt;br /&gt;
 Gg, Gg, Re, Re, Gg, Gg, Gg, Gg&lt;br /&gt;
 Gg, Gg, Gg, Gg, Re, Re, Gg, Gg&lt;br /&gt;
 Gg, Gg, Gg, Gg, Gg, Gg, Re, Re&lt;br /&gt;
&lt;br /&gt;
== Creating a map ==&lt;br /&gt;
&lt;br /&gt;
This is not the Matrix.  You do not need to look at encoded maps.  The source code and most binary distributions come with the official graphical map editor. When compiling from source, remember to use the ''--enable-editor'' option when configuring, otherwise the map editor won't be compiled.  Using the map editor tends to be straightforward, judging from the feedback received from novice mapmakers.  However, if you do encounter problems locating or using the editor, please ask for help on the [http://www.wesnoth.org/forum forum].&lt;br /&gt;
&lt;br /&gt;
After the map is created, you may find it easier to make small tweaks by editing the textual map data directly.&lt;br /&gt;
&lt;br /&gt;
Making good, balanced, interesting maps is another task altogether, and if someone wants to take a stab at sharing insight about this art, please do so.&lt;br /&gt;
&lt;br /&gt;
== Using map data ==&lt;br /&gt;
&lt;br /&gt;
Map data is used in two ways.&lt;br /&gt;
# It is used as an input to the key ''map_data'' (see [[ScenarioWML]]).&lt;br /&gt;
# Files consisting entirely of map data can be read and edited easily by the [[WesnothMapEditor]].&lt;br /&gt;
#* Files in the folder '''''userdata''/editor/maps/''' which consist entirely of map data can be played in multiplayer as user maps.&lt;br /&gt;
&lt;br /&gt;
==== The map_data key ====&lt;br /&gt;
&lt;br /&gt;
The first way is to use the map_data key.  A campaign scenario starts with the '''[scenario]''' tag.  A multiplayer map scenario starts with the '''[multiplayer]''' tag.  Each tag takes the key ''map_data''.  The value of the ''map_data'' key is the map data enclosed in quotes.  Here is an example:&lt;br /&gt;
        map_data=&amp;quot;111111111111111111&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Standalone map file ====&lt;br /&gt;
&lt;br /&gt;
The second way to store a map is in a text file that consists '''only''' of the map data.  The advantage of this method is that it's simple.  If you drop one of the map files in '''''userdata''/editor/maps/''', the game will find it automatically in multiplayer.  On the other hand, this method also works with more complex scenarios.  If there is a scenario file somewhere (campaign or multiplayer) that has a line similar to the following:&lt;br /&gt;
 map_data=&amp;quot;{@editor/''map_filename''}&amp;quot;&lt;br /&gt;
then all of the map data in the file is inserted between the quote marks.&lt;br /&gt;
&lt;br /&gt;
== Discussion: Scenario File vs Standalone ==&lt;br /&gt;
&lt;br /&gt;
Campaign writers can't write campaigns without scenarios, so campaigns will always use the ''map_data'' key, either with the raw data in quotes or a preprocessor symbol {} pointing to the standalone file.&lt;br /&gt;
&lt;br /&gt;
Multiplayer mapmakers, however, '''have a choice'''.  If you want to place an object or unit on the map, you must create a scenario file starting with the '''[multiplayer]''' tag and containing the ''map_data'' key therein.  You lose the simplicity of the standalone map file, but you gain tremendous power.  Not only can you add units and objects, you can set allies, experience modifiers, add a map description, and add custom events (among other things).  The question, &amp;quot;How do I place an object on the map with the map editor&amp;quot; is such a common question that I am sorry this information is buried so deeply here.  But, now that you know you can seek out an example of a multiplayer map scenario file to use as an example.  The game comes with many maps of each type.  Check out [[BuildingMultiplayer]] for more information.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Create]]&lt;br /&gt;
* [[ScenarioWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
* [[BuildingScenariosShroudData]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Create}}&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenarios&amp;diff=16146</id>
		<title>BuildingScenarios</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenarios&amp;diff=16146"/>
		<updated>2007-06-27T21:19:18Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Index: * BuildingScenariosFAQ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wesnoth scenarios are the individual levels within the game. Each scenario contains two files. First is the map&lt;br /&gt;
itself, this is described in [[BuildingMaps]]. The second is the config file. This configuration file is used to&lt;br /&gt;
describe everything about the scenario. Both of the files are ascii and can be edited in any standard text editor (vi,&lt;br /&gt;
notepad, etc.) If you decide to use a wordprocessor, please make sure you remember to ''Save As'' text.&lt;br /&gt;
&lt;br /&gt;
Scenarios are written in the Wesnoth Markup Language. This is a very simple language to learn.&lt;br /&gt;
The WML language is described in [[ReferenceWML]].&lt;br /&gt;
The WML syntax is described in [[SyntaxWML]].&lt;br /&gt;
Wesnoth has a preprocessor that allows designers to reorganize information into a more convenient structure.&lt;br /&gt;
The WML preprocessor is described in [[PreprocessorRef]].&lt;br /&gt;
&lt;br /&gt;
This document is split into several sections, starting with a basic tutorial and moving into more complex techniques.  From the information contained within this document you should have all the knowledge to create Wesnoth scenarios. If you see any mistakes or missing information, please feel free to fix the pages yourself, add a comment to the comment page, or email me jzaun at campus dot hpu dot edu.&lt;br /&gt;
&lt;br /&gt;
=== Index ===&lt;br /&gt;
&lt;br /&gt;
* [[BuildingScenarios]]&lt;br /&gt;
:: [[BuildingScenariosSimple]] - [[BuildingScenariosIntermediate]] - [[BuildingScenariosAdvanced]]&lt;br /&gt;
:: [[BuildingScenariosSimple - French Version]]&lt;br /&gt;
* [[BuildingScenariosComments]]&lt;br /&gt;
* [[BuildingScenariosSamples]]&lt;br /&gt;
* [[BuildingScenariosShroudData]]&lt;br /&gt;
* [[BuildingScenariosBalancing]]&lt;br /&gt;
* [[BuildingScenariosFAQ]]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Create]]&lt;br /&gt;
* [[ReferenceWML]] - WML master reference&lt;br /&gt;
** [[AlphabeticalWML]] - a tag index&lt;br /&gt;
** [[BuildingScenariosIndex]] - in-depth key and tag index&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Create}}&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Template:BuildingScenariosNav&amp;diff=16144</id>
		<title>Template:BuildingScenariosNav</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Template:BuildingScenariosNav&amp;diff=16144"/>
		<updated>2007-06-27T21:17:01Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| style=&amp;quot;float:right&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
__TOC__&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;div class=&amp;quot;navtemplate&amp;quot;&amp;gt;&lt;br /&gt;
==== Quick Navigation ====&lt;br /&gt;
'''[[BuildingScenarios]]'''&lt;br /&gt;
:*'''[[BuildingScenariosSimple]] - [[BuildingScenariosIntermediate]] - [[BuildingScenariosAdvanced]]'''&lt;br /&gt;
:*[[BuildingScenariosWML]]&lt;br /&gt;
:*[[BuildingScenariosComments]]&lt;br /&gt;
:*[[BuildingScenariosSamples]] &lt;br /&gt;
:*[[BuildingScenariosFAQ]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Create&amp;diff=16142</id>
		<title>Create</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Create&amp;diff=16142"/>
		<updated>2007-06-27T21:11:25Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* What can I create, and how? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| style=&amp;quot;float:right&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
__TOC__&lt;br /&gt;
|}&lt;br /&gt;
Interested in creating your own scenarios and campaigns?  One of Wesnoth's best features is its extensibility.  Players can create new maps, units, races, scenarios, art, music, and even entire campaigns.  Access to the &amp;quot;guts&amp;quot; of the game is both simple and difficult; if you have an ASCII text editor you have everything you need to build your own world.  However, learning the Wesnoth Markup Language (WML) takes some effort.  This section will guide you through the process of creating and distributing your own content.&lt;br /&gt;
&lt;br /&gt;
It should also be noted that '''we need a lot of help creating artwork for the core of the game.'''  The current projects we are working on are [http://www.wesnoth.org/forum/viewtopic.php?t=9162 listed here].  We'll happily help you out, if you take a swing at them.&lt;br /&gt;
&lt;br /&gt;
== Read this first! ==&lt;br /&gt;
Before you modify or add anything, it is important to understand how the game stores and organizes its data.  This article will explain the game's directory structure and introduce the ''userdata'' directory.&lt;br /&gt;
* [[EditingWesnoth]]&lt;br /&gt;
&lt;br /&gt;
== What can I create, and how? ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tright&amp;quot;&amp;gt;&amp;lt;div&amp;gt;&lt;br /&gt;
[http://www.wesnoth.org/images/sshots/wesnoth_editor-1.3.4.jpg http://www.wesnoth.org/images/sshots/wesnoth_editor-1.3.4-175.jpg]&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumbcaption&amp;quot;&amp;gt;Battle for Wesnoth map editor&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[BuildingMaps|Maps]] - the layout of terrain tiles&lt;br /&gt;
* [[BuildingScenarios|Scenarios]] - a scenario makes things happen on a map, making it playable&lt;br /&gt;
* [[BuildingCampaigns|Campaigns]] - how to put it all together into a campaign&lt;br /&gt;
* [[BuildingMultiplayer|Multiplayer Maps and Scenarios]] - a specialized look at maps and scenarios&lt;br /&gt;
* [[MultiplayerCampaigns|Multiplayer Campaigns]] - making a campaign accessible in multiplayer&lt;br /&gt;
&lt;br /&gt;
* [[BuildingUnits|Units]]&lt;br /&gt;
* [[BuildingFactions|Multiplayer factions and eras]]&lt;br /&gt;
&lt;br /&gt;
* '''[[Create Art|Art]]''' - complete with '''tutorials!'''&lt;br /&gt;
* [[Create Music|Music]]&lt;br /&gt;
* [[WesnothTranslations|Translations]] - work on translating Wesnoth&lt;br /&gt;
&lt;br /&gt;
* [[Distributing content]] - all about the campaign server&lt;br /&gt;
* [[Maintenance tools]] - tools for helping you sanity-check and maintain campaigns.&lt;br /&gt;
&lt;br /&gt;
== What have others done? ==&lt;br /&gt;
Quick descriptions of the campaigns and scenarios that have been published on the campaign server.&lt;br /&gt;
* [[UserScenarios|User contributed campaigns]]&lt;br /&gt;
There are a multitude multiplayer maps and discussion of the campaigns on the [http://www.wesnoth.org/forum Wesnoth forum]&lt;br /&gt;
* [http://www.wesnoth.org/forum/viewforum.php?f=15 Multiplayer development forum]&lt;br /&gt;
* [http://www.wesnoth.org/forum/viewforum.php?f=8 Scenario and campaign development forum]&lt;br /&gt;
* [[Complete Faction List (unfinished)|Complete Faction List]]&lt;br /&gt;
&lt;br /&gt;
== The world of Wesnoth ==&lt;br /&gt;
Not all campaigns take place in Wesnoth, but many do.  There is definitely a certain flavor to campaigns that are intended to take place somewhere in the world of Wesnoth.  Stake out a time period or a map locale and tell a story.&lt;br /&gt;
* [[WesnothHistory|The history of Wesnoth]]&lt;br /&gt;
* [[WesnothGeography|The geography of Wesnoth]]&lt;br /&gt;
* [[RaceDescriptions|The races of creatures in Wesnoth]]&lt;br /&gt;
* [[WesnothPoetry|Wesnothian poetry]]&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
* [[ExternalUtilities| External Utilities]] - some extra tools for easier creating stuff&lt;br /&gt;
* [[ReferenceWML|WML Reference]] - a quicklink&lt;br /&gt;
* [[FAQ#Scenario_and_Campaigns|FAQ]] - if you have a question, post it&lt;br /&gt;
* Campaign server [http://wolff.to/campaigns/list.html web interface] - An alternate way to download user campaigns&lt;br /&gt;
* [[Status_of_User_Scenarios| Status of User Scenarios]] - Lists which usercampaigns are working and which ones are broken&lt;br /&gt;
{{Home}}&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Template:BuildingScenariosNav&amp;diff=16141</id>
		<title>Template:BuildingScenariosNav</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Template:BuildingScenariosNav&amp;diff=16141"/>
		<updated>2007-06-27T21:09:26Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;----&lt;br /&gt;
{| style=&amp;quot;float:right&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
__TOC__&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;div class=&amp;quot;navtemplate&amp;quot;&amp;gt;&lt;br /&gt;
==== Quick Navigation ====&lt;br /&gt;
'''[[BuildingScenarios]]'''&lt;br /&gt;
:*'''[[BuildingScenariosSimple]] - [[BuildingScenariosIntermediate]] - [[BuildingScenariosAdvanced]]'''&lt;br /&gt;
:*[[BuildingScenariosWML]]&lt;br /&gt;
:*[[BuildingScenariosComments]]&lt;br /&gt;
:*[[BuildingScenariosSamples]] &lt;br /&gt;
:*[[BuildingScenariosFAQ]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Template:BuildingScenariosNav&amp;diff=16140</id>
		<title>Template:BuildingScenariosNav</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Template:BuildingScenariosNav&amp;diff=16140"/>
		<updated>2007-06-27T21:09:11Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;----&lt;br /&gt;
{| style=&amp;quot;float:right&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
__TOC__&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;div class=&amp;quot;navtemplate&amp;quot;&amp;gt;&lt;br /&gt;
==== Quick Navigation ====&lt;br /&gt;
'''[[BuildingScenarios]]:'''&lt;br /&gt;
:*'''[[BuildingScenariosSimple]] - [[BuildingScenariosIntermediate]] - [[BuildingScenariosAdvanced]]'''&lt;br /&gt;
:*[[BuildingScenariosWML]]&lt;br /&gt;
:*[[BuildingScenariosComments]]&lt;br /&gt;
:*[[BuildingScenariosSamples]] &lt;br /&gt;
:*[[BuildingScenariosFAQ]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16139</id>
		<title>BuildingScenariosAdvanced</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16139"/>
		<updated>2007-06-27T21:08:13Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Added a navigation template at the top */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BuildingScenariosNav}}&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Advanced =&lt;br /&gt;
&lt;br /&gt;
'''TODO:'''&lt;br /&gt;
This contained a repetition of what was already inside [[BuildingScenariosIntermediate]]&lt;br /&gt;
This should contain: &lt;br /&gt;
* (more) information about making &amp;amp; using preprocessors ([[PreprocessorRef]])&lt;br /&gt;
* information about GetText and making your scenario translatable&lt;br /&gt;
* information on guidelines concerning the general layout of a scenario file&lt;br /&gt;
* LOTS of links to pages any campaign editor needs frequently&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
Ayone who feels like writing something, go ahead&lt;br /&gt;
&lt;br /&gt;
:Mathijs&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[ScenarioWML]], [[SyntaxWML]] &amp;amp; [[ReferenceWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosSimple&amp;diff=16138</id>
		<title>BuildingScenariosSimple</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosSimple&amp;diff=16138"/>
		<updated>2007-06-27T21:07:34Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Added a navigation template at the top */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BuildingScenariosNav}}&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Simple =&lt;br /&gt;
&lt;br /&gt;
This will show you a very simple scenario file, explaining each line of it.&lt;br /&gt;
The file is not fully functional, but it will show the basics needed to describe what a scenario is all about.&lt;br /&gt;
&lt;br /&gt;
'''Before reading this, it might prove usefull to read something about the syntax used in the Wesnoth Markup Language: [[SyntaxWML]]'''&lt;br /&gt;
&lt;br /&gt;
== First part ==&lt;br /&gt;
 [scenario]&lt;br /&gt;
 &lt;br /&gt;
   id=test-1&lt;br /&gt;
   next_scenario=2_test-more&lt;br /&gt;
 &lt;br /&gt;
   name=A Simple Test Scenario&lt;br /&gt;
   map_data=&amp;quot;{campaigns/Test_Campaign/testmap}{~campaigns/Test_Campaign/testmap}&amp;quot;&lt;br /&gt;
   turns=20&lt;br /&gt;
 &lt;br /&gt;
   {DAWN}&lt;br /&gt;
   {MORNING}&lt;br /&gt;
   {AFTERNOON}&lt;br /&gt;
   {DUSK}&lt;br /&gt;
   {FIRST_WATCH}&lt;br /&gt;
   {SECOND_WATCH}&lt;br /&gt;
 &lt;br /&gt;
   music=wesnoth-1.ogg&lt;br /&gt;
 &lt;br /&gt;
   [event]&lt;br /&gt;
     name=prestart&lt;br /&gt;
     [objectives]&lt;br /&gt;
       side=1&lt;br /&gt;
       [objective]&lt;br /&gt;
         description= _ &amp;quot;Defeat Enemy Leader&amp;quot;&lt;br /&gt;
         condition=win&lt;br /&gt;
       [/objective]&lt;br /&gt;
       [objective]&lt;br /&gt;
         description= _ &amp;quot;Death of Konrad&amp;quot;&lt;br /&gt;
         condition=lose&lt;br /&gt;
       [/objective]&lt;br /&gt;
     [/objectives]&lt;br /&gt;
   [/event]&lt;br /&gt;
 .  continued below&lt;br /&gt;
 .  ||&lt;br /&gt;
 .  \/&lt;br /&gt;
 &lt;br /&gt;
Every scenario must be enclosed in a tag;&lt;br /&gt;
the '''[scenario]''' tag is used for campaign scenarios.&lt;br /&gt;
The first set of keys in the scenario tag&lt;br /&gt;
describe the very basics of this scenario:&lt;br /&gt;
* The ''id'' (short for ''identifier'') is the computer's name for your scenario, and is not displayed during the game. However, it will be used to display game statistics (they will be graphed on http://stats.wesnoth.org in numerical order, so it's also a good idea to give the id's a number). This name is also used as reference in other tags and files, eg inside a '''[campaign]''' tag using the ''first_scenario'' key(see [[BuildingCampaignsTheCampaignFile]]) or inside a '''[scenario]''' tag using the ''next_scenario'' key (see below).&lt;br /&gt;
&lt;br /&gt;
* The value of the ''next_scenario'' key is the id (see above) of the scenario that is played after this one is won. Units from this scenario will be available for recall (unless you modify the recall list, but that's stuff for later). If your scenario is not part of a campaign, or if this is the last scenario you should either skip this line or put '''next_scenario=null''' inside the file. This will tell the game to display the End screen when this scenario is won.&lt;br /&gt;
&lt;br /&gt;
* The value of the ''name'' key is shown on the introduction screen before each scenario is played. (This can contain a picture of a map, or anything else you fancy. See [[BuildingScenariosIntermediate]] for an explenation on how to do that.) It's also the default name for saves on the level.&lt;br /&gt;
&lt;br /&gt;
* The next key, ''map_data'', is a link to the map file. You can create map files using the Wesnoth Map Editor (see [[WesnothMapEditor]] and [[BuildingMaps]] for more information). Since we may not know exactly where this campaign will be located we'll write two possible locations of the map file. The quotes are necessary because Wesnoth map data takes up multiple lines, so quotes are used to indicate where the data begins and ends. If you don't do this, it will break the scenario.&lt;br /&gt;
&lt;br /&gt;
* Finally, the last key in the top set of keys is ''turns''. This is the amount of turns a player is given to finish the scenario. (It can be changed during the game, but again, that is stuff for later.) When the player fails to finish the secnario in the given time, he has lost. (Said otherwise: the ''defeat'' event is trigered. See [[EventWML]] for more.)&lt;br /&gt;
&lt;br /&gt;
The next section is a set of preprocessors (see [[PreprocessorRef]]). Preprocessors are essentially WML shortcuts. They allow you to define certain pieces of code and re-use it whenever it is needed. Wesnoth provides you with a whole serie of standard preprocessors to make life more easy, but you yourself can define them too (again stuff for later). &lt;br /&gt;
Lets get back to this example! The preprocessors used here, describe how a day in this scenario should progress. This listing above is the normal day used throughout Wesnoth. If you want the entire scenario to take place at night, remove all the preprocessors except for '''{SECOND_WATCH}'''. This could be useful if you have Konrad&lt;br /&gt;
fighting the Undead and want the Undead to have the upper hand the whole time. Remember though, by setting this to a single tme of day and not the normal progress listed above, your scenario will effectively be taking place during one day or night, not many days as most scenarios are.&lt;br /&gt;
&lt;br /&gt;
The ''music'' key is a filename pointing to the music which plays. (See [[MusicListWML]] for more.)&lt;br /&gt;
This music file must be in the ''music/'' directory and '''must''' be in .ogg format.&lt;br /&gt;
&lt;br /&gt;
A tag you'll get to know very good when making scenarios shows up: '''[event]...[/event]'''.&lt;br /&gt;
Event tags are used to describe what should be done if an 'event' takes place. What this event is, is described by ''name''key. In this case we're describing the so-called 'prestart' event. This one takes place just ''before'' the game starts and just ''after'' all of the introductions screens were shown.&lt;br /&gt;
Here we have limited the contents of the tag to another important tag: '''[objectives]''' (plural) containing any number of '''[objective]''' (singular) tags.&lt;br /&gt;
For each '''[objective]''' (singular) tag, if ''condition'' is set to &amp;quot;win&amp;quot;, the text of ''description'' will be displayed in green after &amp;quot;Victory&amp;quot; in the Scenario Objectives. If ''condition'' is set to &amp;quot;lose&amp;quot;, the text of ''description'' will be displayed in red after &amp;quot;Defeat&amp;quot; in the Scenario Objectives. Because we've placed this tag inside a prestart event, this will be shown at the very first turn of the scenario.&lt;br /&gt;
The ''side'' key indicates that these conditions are for side 1 (see below).&lt;br /&gt;
The ' _ ' (underscore) facilitates translation using Gettext (see [[GetText]]).&lt;br /&gt;
&lt;br /&gt;
Note that ''ANY'' Victory or Defeat objective can be met to win or lose the scenario,&lt;br /&gt;
but a single Victory objective may have multiple parts.&lt;br /&gt;
Also note that the '''[objective]''' tag only describes what the objectives are. You will still need to set the appropiate events before they will work. (But that's again stuff for later)&lt;br /&gt;
&lt;br /&gt;
== Second part ==&lt;br /&gt;
So far so good! The last necessary part describes what the players (Human and&lt;br /&gt;
Computer) start with, what they can do and what they can't do. Each of the players is described in a '''[side]''' tag.&lt;br /&gt;
&lt;br /&gt;
 .  /\ &lt;br /&gt;
 .  ||&lt;br /&gt;
 .  continued from above&lt;br /&gt;
   [side]&lt;br /&gt;
     side=1&lt;br /&gt;
     controller=human&lt;br /&gt;
     team_name=2&lt;br /&gt;
     user_team_name= _ &amp;quot;Konrad's forces&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
     type=Commander&lt;br /&gt;
     description=Konrad&lt;br /&gt;
     canrecruit=1&lt;br /&gt;
 &lt;br /&gt;
     recruit=Elvish Fighter,Elvish Archer,Horseman,Mage,Elvish Shaman&lt;br /&gt;
 &lt;br /&gt;
     {GOLD 100 50 0}&lt;br /&gt;
     {INCOME 10 5 0}&lt;br /&gt;
   [/side] &lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
Above you can see a sample '''[side]''' for the human player, Konrad. We wll describe every key more in detail below:&lt;br /&gt;
* ''side'': the leader of this side is placed on the tile represented by this digit (see [[BuildingMaps]]) It's a number from 1 to 9.&lt;br /&gt;
* ''controller'': possible values are 'human' or 'ai' (artificial intelligence, meaning your computer). If you don't specify this key, 'ai' is used as the default.&lt;br /&gt;
* ''team_name'' describes which team the side is on. It defaults to the same number as ''side'', so setting it to ''2'' allies this side with side 2, if you haven't changed the team_name of side 2.&lt;br /&gt;
* ''user_team_name'' is the name displayed when you view the sie stats (by pressing alt+s during gameplay). The underscore facilitates translation using GetText (see [[GetText]]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next set of keys describe the leader of this side:&lt;br /&gt;
* ''canrecruit'': This key can be '1' or '0', meaning &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot; respectively. If you no, then the leader won't be able to recruit. (Not much of a leader then, is he?) Any team without a canrecruit=1 unit automatically loses, so be sure to use this key.&lt;br /&gt;
* ''type'' describes what type of unit the leader will be. The possible  values are listed here: [[UnitTables]].&lt;br /&gt;
* ''description'' is the name and description of the leader.&lt;br /&gt;
In a campaign, all of these 'leader-describing' keys are ignored for the human player (except ''canrecruit''), since the leader from the previous scenario is used instead. However, the ''type'' key is still neccesary to prevent the scenario from crashing.&lt;br /&gt;
&lt;br /&gt;
* ''recruit'' is a comma-separated list of types of units. The possible values are listed in [[UnitTables]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then two more preprocessors are used:&lt;br /&gt;
* '''{GOLD easy normal hard}''' takes 3 positive numbers. These indicate the amount of money the player will start with on the EASY, NORMAL and HARD difficulty level.&lt;br /&gt;
In a campaign file, inside a human controlled side (''controller=human''), this is the minimum amount.  The actual amount the player gets ca, be larger if the player retained more from previous scenarios.&lt;br /&gt;
* '''{INCOME easy normal hard}''' is similar, but indicates the base income.&lt;br /&gt;
The defaults for each of these values are 100 gold and 2 base income.&lt;br /&gt;
&lt;br /&gt;
== Making it all work ==&lt;br /&gt;
Now, to make this scenario playable, we need to make a campaign for it. (see [[BuildingCampaignsTheCampaignFile]])&lt;br /&gt;
This should NOT be stored inside the main directory '''data/campaigns''' but inside '''userdata/data/campaigns'''. This prevents breaking the mainline campaigns or even worse, the entire game. (see [[BuildingCampaignsDirectoryStructure]])&lt;br /&gt;
Note: All files, the campaign file and the scenario file, one for each scenario level, must be saved with the ending .cfg (for example: testcampaign.cfg).&lt;br /&gt;
This is a short example on how to do this:&lt;br /&gt;
&lt;br /&gt;
 [campaign]&lt;br /&gt;
   name= _ &amp;quot;Test Campaign&amp;quot;&lt;br /&gt;
   first_scenario=test-1&lt;br /&gt;
   difficulties=EASY,NORMAL,HARD&lt;br /&gt;
 &lt;br /&gt;
   difficulty_descriptions= _ &amp;quot;&amp;amp;elvish-fighter.png=Easy;*&amp;amp;elvish-hero.png=Medium;&amp;amp;elvish-champion.png=Hard&amp;quot;&lt;br /&gt;
   icon=elvish-fighter.png&lt;br /&gt;
 [/campaign]&lt;br /&gt;
&lt;br /&gt;
Campaigns are described in the '''[campaign]''' tag. The first key is ''name'', which is&lt;br /&gt;
displayed on the campaign selector box. The second key is ''first_scenario'', which is&lt;br /&gt;
the ID of the first scenario of the campaign. Scenarios following after this one are referenced inside the first scenario using ''next_scenario'' (see above).&lt;br /&gt;
&lt;br /&gt;
The key '''difficulties=EASY,NORMAL,HARD''' tells the computer to set the macro '''EASY''' if the first difficulty choice is chosen, '''NORMAL''' if the second is chosen, and '''HARD''' if the third is chosen.&lt;br /&gt;
The expression '''#ifdef''' can be used later to test these macros. (see [[PreprocessorRef]])&lt;br /&gt;
It is recommended that you do not use other names than '''EASY''', '''NORMAL''', and '''HARD''' for your macros, because if you do then the standard macros, such as '''{GOLD}''' and '''{INCOME}''', won't work properly.&lt;br /&gt;
&lt;br /&gt;
Two optional keys are ''difficulty_descriptions'' and ''icon''.&lt;br /&gt;
''icon'' has value equal to an image, displayed inside the campaign list.&lt;br /&gt;
''difficulty_descriptions'' must have the same number of inputs as  '''difficulties''', most commonly three, separated by semicolons.&lt;br /&gt;
These inputs then map on to the difficulties, so that if you have set difficulties to:&lt;br /&gt;
 &amp;quot;difficulties=EASY,NORMAL,HARD&amp;quot;&lt;br /&gt;
the first input will specify the display on EASY, the second on NORMAL and the third on HARD.&lt;br /&gt;
Each difficulty display description starts opens with an ampersand (''&amp;amp;''), then the image to display (eg ''elvish-fighter.png''),&lt;br /&gt;
then an equals (''='') sign, then the text to display (eg ''Easy'').&lt;br /&gt;
Optionally you can place an asterisk (''*'') before one of the ampersands, and the corresponding difficulty will be selected by default (here NORMAL is default).&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[BuildingMaps]] &amp;amp; [[WesnothMapEditor]]&lt;br /&gt;
* [[ScenarioWML]] &amp;amp; [[SyntaxWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosIntermediate&amp;diff=16137</id>
		<title>BuildingScenariosIntermediate</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosIntermediate&amp;diff=16137"/>
		<updated>2007-06-27T21:07:07Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Added a navigation template at the top */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BuildingScenariosNav}}&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Intermediate =&lt;br /&gt;
In this tutorial we will dig somewhat deeper into the secrets of WML and scenario building: events, explaining the use of some special attributes, setting up somewhat more advanced sides, ...&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
You can trigger certain actions that occur during a scenario using the events mechanism. Let us look at an example of a simple event. Suppose you wanted Konrad to say &amp;quot;it's getting cold&amp;quot; when he moves to the location (4,8):&lt;br /&gt;
&lt;br /&gt;
  [event]&lt;br /&gt;
    name=moveto&lt;br /&gt;
    [filter]&lt;br /&gt;
      description=Konrad&lt;br /&gt;
      x=4&lt;br /&gt;
      y=8&lt;br /&gt;
     [/filter]&lt;br /&gt;
     [message]&lt;br /&gt;
       description=Konrad&lt;br /&gt;
       message= _ &amp;quot;It's getting cold&amp;quot;&lt;br /&gt;
     [/message]&lt;br /&gt;
  [/event]&lt;br /&gt;
&lt;br /&gt;
First you have the name of the event.&lt;br /&gt;
Here, we have a 'moveto' event, meaning it is fired every time a unit moves somewhere.&lt;br /&gt;
For a list of the different possible event names, see [[EventWML]]&lt;br /&gt;
&lt;br /&gt;
Of course, we don't want this to be fired every single time some unit moves somewhere! So, we use the '''[filter]''' tag to filter out what kind of moveto event we want.&lt;br /&gt;
How filters are used is described in [[FilterWML]].&lt;br /&gt;
&lt;br /&gt;
== Special attributes ==&lt;br /&gt;
&lt;br /&gt;
Note that generally, a set of actions is triggered only once.&lt;br /&gt;
You can make a set of actions be triggered every time the event occurs&lt;br /&gt;
by adding the attribute '''first_time_only=no''' in the event.&lt;br /&gt;
&lt;br /&gt;
Also, whenever an event is triggered, the player cannot undo the move, even if it was a moveto event. We could make a scenario where moves cannot be undone by adding the event&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
   name=moveto&lt;br /&gt;
   first_time_only=no&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
(which would not do anything, but would prevent the player from undoing moves)&lt;br /&gt;
&lt;br /&gt;
The event:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
   name=enemies defeated&lt;br /&gt;
   [endlevel]&lt;br /&gt;
     result=victory&lt;br /&gt;
     bonus=yes&lt;br /&gt;
   [/endlevel]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
is an implied trigger and appears automatically at the end of each scenario.&lt;br /&gt;
To prevent this event, add the attribute '''victory_when_enemies_defeated=no''' inside the main tag (usually [scenario]).&lt;br /&gt;
&lt;br /&gt;
The attribute '''disallow_recall=yes''' prevents the player from recalling units in this scenario.&lt;br /&gt;
&lt;br /&gt;
The attributes '''fog=yes''' and '''shroud=yes''' can be put in a '''[side]''' tag to make that side have fog of war/shroud. (Fog of war prevents seeing all enemy movement, shroud prevents seeing all of the map.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Sides ==&lt;br /&gt;
&lt;br /&gt;
Ok, so as you have seen in [[BuildingScenariosSimple]], you can setup what the human player and AI player start with, and some simple options for controlling how the AI works. From the '''[side]''' tag listed below you can see we are going to learn some more interesting things that can be controlled from there. I'm not going to explain all the keys, just the new ones.&lt;br /&gt;
&lt;br /&gt;
 [scenario]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 &lt;br /&gt;
   [side]&lt;br /&gt;
     type=Lich&lt;br /&gt;
     description=Galga&lt;br /&gt;
     side=2&lt;br /&gt;
     canrecruit=1&lt;br /&gt;
 &lt;br /&gt;
     #ifdef EASY&lt;br /&gt;
      recruit=Skeleton,Revenant,Blood Bat,Ghost,Bone Shooter&lt;br /&gt;
      recruitment_pattern=fighter,fighter,archer,scout&lt;br /&gt;
      gold=300&lt;br /&gt;
     #endif&lt;br /&gt;
 &lt;br /&gt;
     #ifdef NORMAL&lt;br /&gt;
      recruit=Skeleton,Revenant,Chocobone,Blood Bat,Wraith,Bone Shooter,Dark Adept &lt;br /&gt;
      recruitment_pattern=fighter,fighter,archer,scout&lt;br /&gt;
      gold=500&lt;br /&gt;
     #endif&lt;br /&gt;
 &lt;br /&gt;
     #ifdef HARD&lt;br /&gt;
      recruit=Skeleton,Revenant,Chocobone,Wraith,Bone Shooter,Dark Adept&lt;br /&gt;
      recruitment_pattern=fighter,fighter,archer,scout&lt;br /&gt;
      gold=700&lt;br /&gt;
     #endif&lt;br /&gt;
 &lt;br /&gt;
     aggression=1.0&lt;br /&gt;
     village_value=0.0&lt;br /&gt;
     leader_value=50.0&lt;br /&gt;
     enemy=1&lt;br /&gt;
   [/side]&lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
As you can see from the above listing, the '''[side]''' tag can get a little complex. &lt;br /&gt;
The '''#ifdef''' is relatively simple to understand. If the user is playing EASY then everything between '''#ifdef EASY''' and '''#endif''' is set and the others are ignored. If the user is playing NORMAL then everything between '''#ifdef NORMAL''' and '''#endif''' is set and the others are ignored. Finally if the user is playing HARD then everything between '''#ifdef HARD''' and '''#endif''' is set and the others are ignored. This allows a scenario to be configured differently for each level of gameplay the user may choose. There are also two new keys listed, '''village_value''' and '''leader_value'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lets get into some more interesting stuff. The map files hold the ground tiles. This is the very bottom layer of things. The units walking around during a game are on the very top layer. This is all well and good, but wouldn't it be nice to be able to place some unique items on the map? What if you wanted to place a building, or a potion, or anything somewhere in your scenario? Well you can! Using the '''[item]''' tag:&lt;br /&gt;
&lt;br /&gt;
 [scenario]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 &lt;br /&gt;
   [item]&lt;br /&gt;
     x=31&lt;br /&gt;
     y=43&lt;br /&gt;
     image=item-holywater.png &lt;br /&gt;
   [/item]&lt;br /&gt;
 &lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
The '''[item]''' tag is actually very simple to use, as you can see from above. There are three keys, the first two are '''x''' and '''y'''. They are the location on the map. The third key is '''image'''. This it the image file to place in that location. This image must be located in the images directory. Ok, that was simple wasn't it?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you have enough information to make some interesting looking scenarios with tuned AI players. This is a big step. Next we are going to learn how to make your newly created scenario fit nicely into a campaign. This involves making the intro shown before the scenario is played a bit more descriptive. This is all done from within the '''[story]''' tag.&lt;br /&gt;
&lt;br /&gt;
 [scenario]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 &lt;br /&gt;
   [story]&lt;br /&gt;
     [part]&lt;br /&gt;
       story= _ &amp;quot;... but one of the Orcs survived long enough to send the news to the queen...&amp;quot; &lt;br /&gt;
       image=misc/story6.png&lt;br /&gt;
     [/part]&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
     . &lt;br /&gt;
   [/story]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 . &lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
The story tag contains the story told before the player starts the scenario. You can ommit this, then you will skip the introductionary screens. A story tag exists out of parts (inside [part] tags). Each part can contain several keys describing what content it has got. See [[IntroWML]] for more information.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[ScenarioWML]] &amp;amp; [[SyntaxWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Template:BuildingScenariosNav&amp;diff=16136</id>
		<title>Template:BuildingScenariosNav</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Template:BuildingScenariosNav&amp;diff=16136"/>
		<updated>2007-06-27T21:05:33Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;----&lt;br /&gt;
{| style=&amp;quot;float:right&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
__TOC__&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;div class=&amp;quot;navtemplate&amp;quot;&amp;gt;&lt;br /&gt;
==== Quick Navigation: ====&lt;br /&gt;
'''[[BuildingScenarios]]:'''&lt;br /&gt;
:*'''[[BuildingScenariosSimple]] - [[BuildingScenariosIntermediate]] - [[BuildingScenariosAdvanced]]'''&lt;br /&gt;
:*[[BuildingScenariosWML]]&lt;br /&gt;
:*[[BuildingScenariosComments]]&lt;br /&gt;
:*[[BuildingScenariosSamples]] &lt;br /&gt;
:*[[BuildingScenariosFAQ]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenarios&amp;diff=16135</id>
		<title>BuildingScenarios</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenarios&amp;diff=16135"/>
		<updated>2007-06-27T20:58:44Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Index */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wesnoth scenarios are the individual levels within the game. Each scenario contains two files. First is the map&lt;br /&gt;
itself, this is described in [[BuildingMaps]]. The second is the config file. This configuration file is used to&lt;br /&gt;
describe everything about the scenario. Both of the files are ascii and can be edited in any standard text editor (vi,&lt;br /&gt;
notepad, etc.) If you decide to use a wordprocessor, please make sure you remember to ''Save As'' text.&lt;br /&gt;
&lt;br /&gt;
Scenarios are written in the Wesnoth Markup Language. This is a very simple language to learn.&lt;br /&gt;
The WML language is described in [[ReferenceWML]].&lt;br /&gt;
The WML syntax is described in [[SyntaxWML]].&lt;br /&gt;
Wesnoth has a preprocessor that allows designers to reorganize information into a more convenient structure.&lt;br /&gt;
The WML preprocessor is described in [[PreprocessorRef]].&lt;br /&gt;
&lt;br /&gt;
This document is split into several sections, starting with a basic tutorial and moving into more complex techniques.  From the information contained within this document you should have all the knowledge to create Wesnoth scenarios. If you see any mistakes or missing information, please feel free to fix the pages yourself, add a comment to the comment page, or email me jzaun at campus dot hpu dot edu.&lt;br /&gt;
&lt;br /&gt;
=== Index ===&lt;br /&gt;
&lt;br /&gt;
* [[BuildingScenarios]]&lt;br /&gt;
:: [[BuildingScenariosSimple]] - [[BuildingScenariosIntermediate]] - [[BuildingScenariosAdvanced]]&lt;br /&gt;
:: [[BuildingScenariosSimple - French Version]]&lt;br /&gt;
* [[BuildingScenariosComments]]&lt;br /&gt;
* [[BuildingScenariosSamples]]&lt;br /&gt;
* [[BuildingScenariosShroudData]]&lt;br /&gt;
* [[BuildingScenariosBalancing]]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Create]]&lt;br /&gt;
* [[ReferenceWML]] - WML master reference&lt;br /&gt;
** [[AlphabeticalWML]] - a tag index&lt;br /&gt;
** [[BuildingScenariosIndex]] - in-depth key and tag index&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Create}}&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=StartingPoints&amp;diff=16134</id>
		<title>StartingPoints</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=StartingPoints&amp;diff=16134"/>
		<updated>2007-06-27T20:52:07Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Tweaking the Game (Create) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Battle for Wesnoth is a turn-based fantasy strategy game.&lt;br /&gt;
&lt;br /&gt;
Defeat all enemy leaders using a well-chosen cadre of troops,&lt;br /&gt;
taking care to manage your resources of gold and villages.&lt;br /&gt;
All units have their own strengths and weaknesses; to win,&lt;br /&gt;
deploy your forces to their best advantage while&lt;br /&gt;
denying your foes the chance to do the same. As units gain&lt;br /&gt;
experience, they acquire new abilities and become more&lt;br /&gt;
powerful. Play in your own language and test your skill&lt;br /&gt;
against a smart computer opponent, or join Wesnoth's large&lt;br /&gt;
community of on-line players.&lt;br /&gt;
Create your own custom units, scenarios or campaigns,&lt;br /&gt;
and share them with others.&lt;br /&gt;
&lt;br /&gt;
Battle for Wesnoth is released under the&lt;br /&gt;
[http://www.gnu.org/licenses/licenses.html#GPL GPL].&lt;br /&gt;
Prebuilt packages are available for most operating systems,&lt;br /&gt;
including Windows, Mac OS X, and GNU/Linux, or you can build&lt;br /&gt;
your own from source code.&lt;br /&gt;
&lt;br /&gt;
== Getting the Game ==&lt;br /&gt;
==== Downloading ====&lt;br /&gt;
* [[Download]] - get the most recent source-files and many binaries&lt;br /&gt;
** [[WesnothBinaries]] - precompiled for GNU/Linux, BeOS, PDAs, ...&lt;br /&gt;
** [[WesnothBinariesLinux]] - precompiled for many GNU/Linux distributions&lt;br /&gt;
&lt;br /&gt;
==== Compiling ====&lt;br /&gt;
* [[CompilingWesnoth]] - on Unix, Mac, Windows, GNU/Linux, PDAs, ...&lt;br /&gt;
* [[DebuggingWesnoth]] - on GNU/Linux and Unix-like systems&lt;br /&gt;
* [[WesnothOnLinuxPDAs]] - on the Qtopia/OPIE and thepdaXrom/Zaurus C series&lt;br /&gt;
&lt;br /&gt;
== Playing the Game ([[Play]]) ==&lt;br /&gt;
&lt;br /&gt;
==== For New Players ====&lt;br /&gt;
* [[GettingStarted]] - read me first!&lt;br /&gt;
* [[WesnothManual]] - the rules&lt;br /&gt;
* [[MainlineScenarios]] - walkthroughs for the game-supplied campaigns&lt;br /&gt;
&lt;br /&gt;
==== For Not-So-New Players ====&lt;br /&gt;
* [[AdvancedTactics]] - beating the AI and other people&lt;br /&gt;
* [[MultiplayerServers]] - where to play against other people online&lt;br /&gt;
&lt;br /&gt;
==== Reference ====&lt;br /&gt;
* [[HotKeysSystem]] - keyboard shortcuts&lt;br /&gt;
* [[CommandMode]] - commands you can use in-game&lt;br /&gt;
* [[ServerAdministration]] - commands that authenticated users can use to administer the server&lt;br /&gt;
* [http://zapicm.freeshell.org Units] - Units advancement trees and stats&lt;br /&gt;
** [http://zapicm.freeshell.org/dev Development version]&lt;br /&gt;
** [http://zapicm.freeshell.org/stable Stable version]&lt;br /&gt;
** [http://zapicm.freeshell.org/trunk Trunk version]&lt;br /&gt;
* [[RaceDescriptions]] - Elves, Humans, Dwarves, Orcs, Drakes, Undead, Others&lt;br /&gt;
** [[Complete_Faction_List_%28unfinished%29]] - list all user made factions&lt;br /&gt;
* [[WesnothAcronyms|Wesnoth Acronyms (by category)]] - common wesnothian acronyms explained&lt;br /&gt;
* [[WesnothAcronyms(alphabetic)|Wesnoth Acronyms (alphabetic)]] - common wesnothian acronyms explained&lt;br /&gt;
&lt;br /&gt;
== Tweaking the Game ([[Create]]) ==&lt;br /&gt;
==== Scenarios &amp;amp; Campaigns ====&lt;br /&gt;
* [[UserScenarios]] - user-written scenarios, campaigns and game modifications&lt;br /&gt;
* [[BuildingCampaigns]] - how to make your own single player campaigns&lt;br /&gt;
* [[MultiplayerCampaigns]] - how to make your own multiplayer campaigns&lt;br /&gt;
* [[BuildingScenarios]] - how to make your own scenarios&lt;br /&gt;
* [[BuildingUnits]] - how to make your own units&lt;br /&gt;
* [[UnitAnalysis]] - tool to analyze units&lt;br /&gt;
==== References ====&lt;br /&gt;
* [[ReferenceWML]] and [[AlphabeticalWML]] - all about Wesnoth Markup Language&lt;br /&gt;
* [[ReferencePythonAPI]] - upcoming Python interface for AI&lt;br /&gt;
==== Tools &amp;amp; Utilities ====&lt;br /&gt;
* [[ExternalUtilities]] - scripts to help create scenarios, campaigns, and graphics&lt;br /&gt;
* [[WesnothMapEditor]] - summary of controls&lt;br /&gt;
==== Art related ====&lt;br /&gt;
* [[Create_Art#Art_Tutorials|Art Tutorials]] - help in creating art&lt;br /&gt;
* [[GraphicLibrary]] - unit and terrain images posted on the forums&lt;br /&gt;
* [[Tiles_Status]] - terrain tiles: proposed and in progress.&lt;br /&gt;
&lt;br /&gt;
== Improving the Game ==&lt;br /&gt;
* [[ReportingBugs]] - use Gna&lt;br /&gt;
* To submit a feature request, use http://bugs.wesnoth.org&lt;br /&gt;
* [[FrequentlyProposedIdeas]] - before you propose an idea, check here!&lt;br /&gt;
==== Developer information ====&lt;br /&gt;
* [[DeveloperResources]] - useful links&lt;br /&gt;
* [http://changelog.wesnoth.org Changelog] - the most recent changes made to the game&lt;br /&gt;
* [[WesnothSVN]] - accessing the source code&lt;br /&gt;
* [[HackingWesnoth]] - guide for programmers&lt;br /&gt;
* [[CodingStandards]] - for programmers&lt;br /&gt;
* [[UnitDescriptionRewriting]] - coordinating the revision&lt;br /&gt;
* [http://wesnoth.slack.it/missing.cgi Missing unit animations and sounds] - what's available and what's missing&lt;br /&gt;
* [[WritingYourOwnAI]] - write a C++ plugin&lt;br /&gt;
* [[ThemeSystem]] - customizing the screen layout for the game and the editor&lt;br /&gt;
* [[ReleasingWesnoth]] - steps to follow to release a new version&lt;br /&gt;
* [[WesnothPackagersGuide]] - guidelines for packaging Wesnoth for different platforms&lt;br /&gt;
* [[WesnothPreferences]]&lt;br /&gt;
* [[EasyCoding]] - Bugs and features that are easy to implement for new coders&lt;br /&gt;
* [[NotSoEasyCoding]] - Bugs and features which are doable but lacking someone working on them&lt;br /&gt;
* [[WesnothGL]] - Guide to programming the Wesnoth OpenGL branch&lt;br /&gt;
&lt;br /&gt;
==== Game translations ====&lt;br /&gt;
* [[GettextForTranslators]] - how to translate Wesnoth under [[GetText]]&lt;br /&gt;
* [[WesnothTranslations]] - 11 complete, 2 almost complete, 7 more than halfway, 10 partial&lt;br /&gt;
* [[WesCamp]] - a project for translating user-made campaigns&lt;br /&gt;
&lt;br /&gt;
== About the Game ==&lt;br /&gt;
* [[WesnothPhilosophy]] - Dave on Wesnoth&lt;br /&gt;
* [[WesnothHistory]] - the Ages of Wesnoth&lt;br /&gt;
* [[WesnothGeography]] - description of Wesnoth and surrounding lands&lt;br /&gt;
* [[WesnothFigures]] - notable figures of valorous and infamous deeds in Wesnoth&lt;br /&gt;
* [[WesnothReviews]] - third party reviews of Wesnoth&lt;br /&gt;
* [irc://irc.wesnoth.org/wesnoth #wesnoth] - our IRC channel&lt;br /&gt;
* [[Donate]] or [http://cafepress.com/wesnoth buy Wesnoth merchandise].&lt;br /&gt;
* [[Trailer]] - the Wesnoth trailer&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
* [[UsefulLinks]]&lt;br /&gt;
* [[WesnothLSM]] - presentation at LSM&lt;br /&gt;
* [http://wesnoth.slack.it/?WesnothPlayerMap Map of Wesnoth player locations] - add yourself to the map!&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Battle_for_Wesnoth Wikipedia entry for Wesnoth]&lt;br /&gt;
* [[WikiHaiku]]&lt;br /&gt;
&lt;br /&gt;
== About this Wiki ==&lt;br /&gt;
* [[Help:Editing|Editing]] - learn how to edit pages&lt;br /&gt;
* [[Sandbox]] - experiment with the wiki&lt;br /&gt;
* [[WikiMigration]] - we were looking for a replacement for our old wiki (and ended up using Mediawiki)&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=StartingPoints&amp;diff=16133</id>
		<title>StartingPoints</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=StartingPoints&amp;diff=16133"/>
		<updated>2007-06-27T20:50:16Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Tweaking the Game (Create) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Battle for Wesnoth is a turn-based fantasy strategy game.&lt;br /&gt;
&lt;br /&gt;
Defeat all enemy leaders using a well-chosen cadre of troops,&lt;br /&gt;
taking care to manage your resources of gold and villages.&lt;br /&gt;
All units have their own strengths and weaknesses; to win,&lt;br /&gt;
deploy your forces to their best advantage while&lt;br /&gt;
denying your foes the chance to do the same. As units gain&lt;br /&gt;
experience, they acquire new abilities and become more&lt;br /&gt;
powerful. Play in your own language and test your skill&lt;br /&gt;
against a smart computer opponent, or join Wesnoth's large&lt;br /&gt;
community of on-line players.&lt;br /&gt;
Create your own custom units, scenarios or campaigns,&lt;br /&gt;
and share them with others.&lt;br /&gt;
&lt;br /&gt;
Battle for Wesnoth is released under the&lt;br /&gt;
[http://www.gnu.org/licenses/licenses.html#GPL GPL].&lt;br /&gt;
Prebuilt packages are available for most operating systems,&lt;br /&gt;
including Windows, Mac OS X, and GNU/Linux, or you can build&lt;br /&gt;
your own from source code.&lt;br /&gt;
&lt;br /&gt;
== Getting the Game ==&lt;br /&gt;
==== Downloading ====&lt;br /&gt;
* [[Download]] - get the most recent source-files and many binaries&lt;br /&gt;
** [[WesnothBinaries]] - precompiled for GNU/Linux, BeOS, PDAs, ...&lt;br /&gt;
** [[WesnothBinariesLinux]] - precompiled for many GNU/Linux distributions&lt;br /&gt;
&lt;br /&gt;
==== Compiling ====&lt;br /&gt;
* [[CompilingWesnoth]] - on Unix, Mac, Windows, GNU/Linux, PDAs, ...&lt;br /&gt;
* [[DebuggingWesnoth]] - on GNU/Linux and Unix-like systems&lt;br /&gt;
* [[WesnothOnLinuxPDAs]] - on the Qtopia/OPIE and thepdaXrom/Zaurus C series&lt;br /&gt;
&lt;br /&gt;
== Playing the Game ([[Play]]) ==&lt;br /&gt;
&lt;br /&gt;
==== For New Players ====&lt;br /&gt;
* [[GettingStarted]] - read me first!&lt;br /&gt;
* [[WesnothManual]] - the rules&lt;br /&gt;
* [[MainlineScenarios]] - walkthroughs for the game-supplied campaigns&lt;br /&gt;
&lt;br /&gt;
==== For Not-So-New Players ====&lt;br /&gt;
* [[AdvancedTactics]] - beating the AI and other people&lt;br /&gt;
* [[MultiplayerServers]] - where to play against other people online&lt;br /&gt;
&lt;br /&gt;
==== Reference ====&lt;br /&gt;
* [[HotKeysSystem]] - keyboard shortcuts&lt;br /&gt;
* [[CommandMode]] - commands you can use in-game&lt;br /&gt;
* [[ServerAdministration]] - commands that authenticated users can use to administer the server&lt;br /&gt;
* [http://zapicm.freeshell.org Units] - Units advancement trees and stats&lt;br /&gt;
** [http://zapicm.freeshell.org/dev Development version]&lt;br /&gt;
** [http://zapicm.freeshell.org/stable Stable version]&lt;br /&gt;
** [http://zapicm.freeshell.org/trunk Trunk version]&lt;br /&gt;
* [[RaceDescriptions]] - Elves, Humans, Dwarves, Orcs, Drakes, Undead, Others&lt;br /&gt;
** [[Complete_Faction_List_%28unfinished%29]] - list all user made factions&lt;br /&gt;
* [[WesnothAcronyms|Wesnoth Acronyms (by category)]] - common wesnothian acronyms explained&lt;br /&gt;
* [[WesnothAcronyms(alphabetic)|Wesnoth Acronyms (alphabetic)]] - common wesnothian acronyms explained&lt;br /&gt;
&lt;br /&gt;
== Tweaking the Game ([[Create]]) ==&lt;br /&gt;
# Scenarios &amp;amp; Campaigns:&lt;br /&gt;
* [[UserScenarios]] - user-written scenarios, campaigns and game modifications&lt;br /&gt;
* [[BuildingCampaigns]] - how to make your own single player campaigns&lt;br /&gt;
* [[MultiplayerCampaigns]] - how to make your own multiplayer campaigns&lt;br /&gt;
* [[BuildingScenarios]] - how to make your own scenarios&lt;br /&gt;
* [[BuildingUnits]] - how to make your own units&lt;br /&gt;
* [[UnitAnalysis]] - tool to analyze units&lt;br /&gt;
# References:&lt;br /&gt;
* [[ReferenceWML]] and [[AlphabeticalWML]] - all about Wesnoth Markup Language&lt;br /&gt;
* [[ReferencePythonAPI]] - upcoming Python interface for AI&lt;br /&gt;
# Tools &amp;amp; Utilities:&lt;br /&gt;
* [[ExternalUtilities]] - scripts to help create scenarios, campaigns, and graphics&lt;br /&gt;
* [[WesnothMapEditor]] - summary of controls&lt;br /&gt;
# Art related:&lt;br /&gt;
* [[Create_Art#Art_Tutorials|Art Tutorials]] - help in creating art&lt;br /&gt;
* [[GraphicLibrary]] - unit and terrain images posted on the forums&lt;br /&gt;
* [[Tiles_Status]] - terrain tiles: proposed and in progress.&lt;br /&gt;
&lt;br /&gt;
== Improving the Game ==&lt;br /&gt;
* [[ReportingBugs]] - use Gna&lt;br /&gt;
* To submit a feature request, use http://bugs.wesnoth.org&lt;br /&gt;
* [[FrequentlyProposedIdeas]] - before you propose an idea, check here!&lt;br /&gt;
==== Developer information ====&lt;br /&gt;
* [[DeveloperResources]] - useful links&lt;br /&gt;
* [http://changelog.wesnoth.org Changelog] - the most recent changes made to the game&lt;br /&gt;
* [[WesnothSVN]] - accessing the source code&lt;br /&gt;
* [[HackingWesnoth]] - guide for programmers&lt;br /&gt;
* [[CodingStandards]] - for programmers&lt;br /&gt;
* [[UnitDescriptionRewriting]] - coordinating the revision&lt;br /&gt;
* [http://wesnoth.slack.it/missing.cgi Missing unit animations and sounds] - what's available and what's missing&lt;br /&gt;
* [[WritingYourOwnAI]] - write a C++ plugin&lt;br /&gt;
* [[ThemeSystem]] - customizing the screen layout for the game and the editor&lt;br /&gt;
* [[ReleasingWesnoth]] - steps to follow to release a new version&lt;br /&gt;
* [[WesnothPackagersGuide]] - guidelines for packaging Wesnoth for different platforms&lt;br /&gt;
* [[WesnothPreferences]]&lt;br /&gt;
* [[EasyCoding]] - Bugs and features that are easy to implement for new coders&lt;br /&gt;
* [[NotSoEasyCoding]] - Bugs and features which are doable but lacking someone working on them&lt;br /&gt;
* [[WesnothGL]] - Guide to programming the Wesnoth OpenGL branch&lt;br /&gt;
&lt;br /&gt;
==== Game translations ====&lt;br /&gt;
* [[GettextForTranslators]] - how to translate Wesnoth under [[GetText]]&lt;br /&gt;
* [[WesnothTranslations]] - 11 complete, 2 almost complete, 7 more than halfway, 10 partial&lt;br /&gt;
* [[WesCamp]] - a project for translating user-made campaigns&lt;br /&gt;
&lt;br /&gt;
== About the Game ==&lt;br /&gt;
* [[WesnothPhilosophy]] - Dave on Wesnoth&lt;br /&gt;
* [[WesnothHistory]] - the Ages of Wesnoth&lt;br /&gt;
* [[WesnothGeography]] - description of Wesnoth and surrounding lands&lt;br /&gt;
* [[WesnothFigures]] - notable figures of valorous and infamous deeds in Wesnoth&lt;br /&gt;
* [[WesnothReviews]] - third party reviews of Wesnoth&lt;br /&gt;
* [irc://irc.wesnoth.org/wesnoth #wesnoth] - our IRC channel&lt;br /&gt;
* [[Donate]] or [http://cafepress.com/wesnoth buy Wesnoth merchandise].&lt;br /&gt;
* [[Trailer]] - the Wesnoth trailer&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
* [[UsefulLinks]]&lt;br /&gt;
* [[WesnothLSM]] - presentation at LSM&lt;br /&gt;
* [http://wesnoth.slack.it/?WesnothPlayerMap Map of Wesnoth player locations] - add yourself to the map!&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Battle_for_Wesnoth Wikipedia entry for Wesnoth]&lt;br /&gt;
* [[WikiHaiku]]&lt;br /&gt;
&lt;br /&gt;
== About this Wiki ==&lt;br /&gt;
* [[Help:Editing|Editing]] - learn how to edit pages&lt;br /&gt;
* [[Sandbox]] - experiment with the wiki&lt;br /&gt;
* [[WikiMigration]] - we were looking for a replacement for our old wiki (and ended up using Mediawiki)&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16132</id>
		<title>BuildingScenariosAdvanced</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16132"/>
		<updated>2007-06-27T20:46:23Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Quick Navigation: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==== Quick Navigation: ====&lt;br /&gt;
'''[[BuildingScenarios]]'''&lt;br /&gt;
:'''[[BuildingScenariosSimple]] - [[BuildingScenariosIntermediate]] - [[BuildingScenariosAdvanced]]'''&lt;br /&gt;
:[[BuildingScenariosWML]]&lt;br /&gt;
:[[BuildingScenariosComments]]&lt;br /&gt;
:[[BuildingScenariosSamples]] &lt;br /&gt;
:[[BuildingScenariosFAQ]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Advanced =&lt;br /&gt;
&lt;br /&gt;
'''TODO:'''&lt;br /&gt;
This contained a repetition of what was already inside [[BuildingScenariosIntermediate]]&lt;br /&gt;
This should contain: &lt;br /&gt;
* (more) information about making &amp;amp; using preprocessors ([[PreprocessorRef]])&lt;br /&gt;
* information about GetText and making your scenario translatable&lt;br /&gt;
* information on guidelines concerning the general layout of a scenario file&lt;br /&gt;
* LOTS of links to pages any campaign editor needs frequently&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
Ayone who feels like writing something, go ahead&lt;br /&gt;
&lt;br /&gt;
:Mathijs&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[ScenarioWML]], [[SyntaxWML]] &amp;amp; [[ReferenceWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosIntermediate&amp;diff=16131</id>
		<title>BuildingScenariosIntermediate</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosIntermediate&amp;diff=16131"/>
		<updated>2007-06-27T20:45:53Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Quick Navigation: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;----&lt;br /&gt;
{| style=&amp;quot;float:right&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
__TOC__&lt;br /&gt;
|}&lt;br /&gt;
==== Quick Navigation: ====&lt;br /&gt;
'''[[BuildingScenarios]]'''&lt;br /&gt;
:'''[[BuildingScenariosSimple]] - [[BuildingScenariosIntermediate]] - [[BuildingScenariosAdvanced]]'''&lt;br /&gt;
:[[BuildingScenariosWML]]&lt;br /&gt;
:[[BuildingScenariosComments]]&lt;br /&gt;
:[[BuildingScenariosSamples]] &lt;br /&gt;
:[[BuildingScenariosFAQ]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Intermediate =&lt;br /&gt;
In this tutorial we will dig somewhat deeper into the secrets of WML and scenario building: events, explaining the use of some special attributes, setting up somewhat more advanced sides, ...&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
You can trigger certain actions that occur during a scenario using the events mechanism. Let us look at an example of a simple event. Suppose you wanted Konrad to say &amp;quot;it's getting cold&amp;quot; when he moves to the location (4,8):&lt;br /&gt;
&lt;br /&gt;
  [event]&lt;br /&gt;
    name=moveto&lt;br /&gt;
    [filter]&lt;br /&gt;
      description=Konrad&lt;br /&gt;
      x=4&lt;br /&gt;
      y=8&lt;br /&gt;
     [/filter]&lt;br /&gt;
     [message]&lt;br /&gt;
       description=Konrad&lt;br /&gt;
       message= _ &amp;quot;It's getting cold&amp;quot;&lt;br /&gt;
     [/message]&lt;br /&gt;
  [/event]&lt;br /&gt;
&lt;br /&gt;
First you have the name of the event.&lt;br /&gt;
Here, we have a 'moveto' event, meaning it is fired every time a unit moves somewhere.&lt;br /&gt;
For a list of the different possible event names, see [[EventWML]]&lt;br /&gt;
&lt;br /&gt;
Of course, we don't want this to be fired every single time some unit moves somewhere! So, we use the '''[filter]''' tag to filter out what kind of moveto event we want.&lt;br /&gt;
How filters are used is described in [[FilterWML]].&lt;br /&gt;
&lt;br /&gt;
== Special attributes ==&lt;br /&gt;
&lt;br /&gt;
Note that generally, a set of actions is triggered only once.&lt;br /&gt;
You can make a set of actions be triggered every time the event occurs&lt;br /&gt;
by adding the attribute '''first_time_only=no''' in the event.&lt;br /&gt;
&lt;br /&gt;
Also, whenever an event is triggered, the player cannot undo the move, even if it was a moveto event. We could make a scenario where moves cannot be undone by adding the event&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
   name=moveto&lt;br /&gt;
   first_time_only=no&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
(which would not do anything, but would prevent the player from undoing moves)&lt;br /&gt;
&lt;br /&gt;
The event:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
   name=enemies defeated&lt;br /&gt;
   [endlevel]&lt;br /&gt;
     result=victory&lt;br /&gt;
     bonus=yes&lt;br /&gt;
   [/endlevel]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
is an implied trigger and appears automatically at the end of each scenario.&lt;br /&gt;
To prevent this event, add the attribute '''victory_when_enemies_defeated=no''' inside the main tag (usually [scenario]).&lt;br /&gt;
&lt;br /&gt;
The attribute '''disallow_recall=yes''' prevents the player from recalling units in this scenario.&lt;br /&gt;
&lt;br /&gt;
The attributes '''fog=yes''' and '''shroud=yes''' can be put in a '''[side]''' tag to make that side have fog of war/shroud. (Fog of war prevents seeing all enemy movement, shroud prevents seeing all of the map.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Sides ==&lt;br /&gt;
&lt;br /&gt;
Ok, so as you have seen in [[BuildingScenariosSimple]], you can setup what the human player and AI player start with, and some simple options for controlling how the AI works. From the '''[side]''' tag listed below you can see we are going to learn some more interesting things that can be controlled from there. I'm not going to explain all the keys, just the new ones.&lt;br /&gt;
&lt;br /&gt;
 [scenario]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 &lt;br /&gt;
   [side]&lt;br /&gt;
     type=Lich&lt;br /&gt;
     description=Galga&lt;br /&gt;
     side=2&lt;br /&gt;
     canrecruit=1&lt;br /&gt;
 &lt;br /&gt;
     #ifdef EASY&lt;br /&gt;
      recruit=Skeleton,Revenant,Blood Bat,Ghost,Bone Shooter&lt;br /&gt;
      recruitment_pattern=fighter,fighter,archer,scout&lt;br /&gt;
      gold=300&lt;br /&gt;
     #endif&lt;br /&gt;
 &lt;br /&gt;
     #ifdef NORMAL&lt;br /&gt;
      recruit=Skeleton,Revenant,Chocobone,Blood Bat,Wraith,Bone Shooter,Dark Adept &lt;br /&gt;
      recruitment_pattern=fighter,fighter,archer,scout&lt;br /&gt;
      gold=500&lt;br /&gt;
     #endif&lt;br /&gt;
 &lt;br /&gt;
     #ifdef HARD&lt;br /&gt;
      recruit=Skeleton,Revenant,Chocobone,Wraith,Bone Shooter,Dark Adept&lt;br /&gt;
      recruitment_pattern=fighter,fighter,archer,scout&lt;br /&gt;
      gold=700&lt;br /&gt;
     #endif&lt;br /&gt;
 &lt;br /&gt;
     aggression=1.0&lt;br /&gt;
     village_value=0.0&lt;br /&gt;
     leader_value=50.0&lt;br /&gt;
     enemy=1&lt;br /&gt;
   [/side]&lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
As you can see from the above listing, the '''[side]''' tag can get a little complex. &lt;br /&gt;
The '''#ifdef''' is relatively simple to understand. If the user is playing EASY then everything between '''#ifdef EASY''' and '''#endif''' is set and the others are ignored. If the user is playing NORMAL then everything between '''#ifdef NORMAL''' and '''#endif''' is set and the others are ignored. Finally if the user is playing HARD then everything between '''#ifdef HARD''' and '''#endif''' is set and the others are ignored. This allows a scenario to be configured differently for each level of gameplay the user may choose. There are also two new keys listed, '''village_value''' and '''leader_value'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lets get into some more interesting stuff. The map files hold the ground tiles. This is the very bottom layer of things. The units walking around during a game are on the very top layer. This is all well and good, but wouldn't it be nice to be able to place some unique items on the map? What if you wanted to place a building, or a potion, or anything somewhere in your scenario? Well you can! Using the '''[item]''' tag:&lt;br /&gt;
&lt;br /&gt;
 [scenario]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 &lt;br /&gt;
   [item]&lt;br /&gt;
     x=31&lt;br /&gt;
     y=43&lt;br /&gt;
     image=item-holywater.png &lt;br /&gt;
   [/item]&lt;br /&gt;
 &lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
The '''[item]''' tag is actually very simple to use, as you can see from above. There are three keys, the first two are '''x''' and '''y'''. They are the location on the map. The third key is '''image'''. This it the image file to place in that location. This image must be located in the images directory. Ok, that was simple wasn't it?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you have enough information to make some interesting looking scenarios with tuned AI players. This is a big step. Next we are going to learn how to make your newly created scenario fit nicely into a campaign. This involves making the intro shown before the scenario is played a bit more descriptive. This is all done from within the '''[story]''' tag.&lt;br /&gt;
&lt;br /&gt;
 [scenario]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 &lt;br /&gt;
   [story]&lt;br /&gt;
     [part]&lt;br /&gt;
       story= _ &amp;quot;... but one of the Orcs survived long enough to send the news to the queen...&amp;quot; &lt;br /&gt;
       image=misc/story6.png&lt;br /&gt;
     [/part]&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
     . &lt;br /&gt;
   [/story]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 . &lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
The story tag contains the story told before the player starts the scenario. You can ommit this, then you will skip the introductionary screens. A story tag exists out of parts (inside [part] tags). Each part can contain several keys describing what content it has got. See [[IntroWML]] for more information.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[ScenarioWML]] &amp;amp; [[SyntaxWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosSimple&amp;diff=16130</id>
		<title>BuildingScenariosSimple</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosSimple&amp;diff=16130"/>
		<updated>2007-06-27T20:45:41Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Quick Navigation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;----&lt;br /&gt;
{| style=&amp;quot;float:right&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
__TOC__&lt;br /&gt;
|}&lt;br /&gt;
==== Quick Navigation: ====&lt;br /&gt;
'''[[BuildingScenarios]]'''&lt;br /&gt;
:'''[[BuildingScenariosSimple]] - [[BuildingScenariosIntermediate]] - [[BuildingScenariosAdvanced]]'''&lt;br /&gt;
:[[BuildingScenariosWML]]&lt;br /&gt;
:[[BuildingScenariosComments]]&lt;br /&gt;
:[[BuildingScenariosSamples]] &lt;br /&gt;
:[[BuildingScenariosFAQ]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Simple =&lt;br /&gt;
&lt;br /&gt;
This will show you a very simple scenario file, explaining each line of it.&lt;br /&gt;
The file is not fully functional, but it will show the basics needed to describe what a scenario is all about.&lt;br /&gt;
&lt;br /&gt;
'''Before reading this, it might prove usefull to read something about the syntax used in the Wesnoth Markup Language: [[SyntaxWML]]'''&lt;br /&gt;
&lt;br /&gt;
== First part ==&lt;br /&gt;
 [scenario]&lt;br /&gt;
 &lt;br /&gt;
   id=test-1&lt;br /&gt;
   next_scenario=2_test-more&lt;br /&gt;
 &lt;br /&gt;
   name=A Simple Test Scenario&lt;br /&gt;
   map_data=&amp;quot;{campaigns/Test_Campaign/testmap}{~campaigns/Test_Campaign/testmap}&amp;quot;&lt;br /&gt;
   turns=20&lt;br /&gt;
 &lt;br /&gt;
   {DAWN}&lt;br /&gt;
   {MORNING}&lt;br /&gt;
   {AFTERNOON}&lt;br /&gt;
   {DUSK}&lt;br /&gt;
   {FIRST_WATCH}&lt;br /&gt;
   {SECOND_WATCH}&lt;br /&gt;
 &lt;br /&gt;
   music=wesnoth-1.ogg&lt;br /&gt;
 &lt;br /&gt;
   [event]&lt;br /&gt;
     name=prestart&lt;br /&gt;
     [objectives]&lt;br /&gt;
       side=1&lt;br /&gt;
       [objective]&lt;br /&gt;
         description= _ &amp;quot;Defeat Enemy Leader&amp;quot;&lt;br /&gt;
         condition=win&lt;br /&gt;
       [/objective]&lt;br /&gt;
       [objective]&lt;br /&gt;
         description= _ &amp;quot;Death of Konrad&amp;quot;&lt;br /&gt;
         condition=lose&lt;br /&gt;
       [/objective]&lt;br /&gt;
     [/objectives]&lt;br /&gt;
   [/event]&lt;br /&gt;
 .  continued below&lt;br /&gt;
 .  ||&lt;br /&gt;
 .  \/&lt;br /&gt;
 &lt;br /&gt;
Every scenario must be enclosed in a tag;&lt;br /&gt;
the '''[scenario]''' tag is used for campaign scenarios.&lt;br /&gt;
The first set of keys in the scenario tag&lt;br /&gt;
describe the very basics of this scenario:&lt;br /&gt;
* The ''id'' (short for ''identifier'') is the computer's name for your scenario, and is not displayed during the game. However, it will be used to display game statistics (they will be graphed on http://stats.wesnoth.org in numerical order, so it's also a good idea to give the id's a number). This name is also used as reference in other tags and files, eg inside a '''[campaign]''' tag using the ''first_scenario'' key(see [[BuildingCampaignsTheCampaignFile]]) or inside a '''[scenario]''' tag using the ''next_scenario'' key (see below).&lt;br /&gt;
&lt;br /&gt;
* The value of the ''next_scenario'' key is the id (see above) of the scenario that is played after this one is won. Units from this scenario will be available for recall (unless you modify the recall list, but that's stuff for later). If your scenario is not part of a campaign, or if this is the last scenario you should either skip this line or put '''next_scenario=null''' inside the file. This will tell the game to display the End screen when this scenario is won.&lt;br /&gt;
&lt;br /&gt;
* The value of the ''name'' key is shown on the introduction screen before each scenario is played. (This can contain a picture of a map, or anything else you fancy. See [[BuildingScenariosIntermediate]] for an explenation on how to do that.) It's also the default name for saves on the level.&lt;br /&gt;
&lt;br /&gt;
* The next key, ''map_data'', is a link to the map file. You can create map files using the Wesnoth Map Editor (see [[WesnothMapEditor]] and [[BuildingMaps]] for more information). Since we may not know exactly where this campaign will be located we'll write two possible locations of the map file. The quotes are necessary because Wesnoth map data takes up multiple lines, so quotes are used to indicate where the data begins and ends. If you don't do this, it will break the scenario.&lt;br /&gt;
&lt;br /&gt;
* Finally, the last key in the top set of keys is ''turns''. This is the amount of turns a player is given to finish the scenario. (It can be changed during the game, but again, that is stuff for later.) When the player fails to finish the secnario in the given time, he has lost. (Said otherwise: the ''defeat'' event is trigered. See [[EventWML]] for more.)&lt;br /&gt;
&lt;br /&gt;
The next section is a set of preprocessors (see [[PreprocessorRef]]). Preprocessors are essentially WML shortcuts. They allow you to define certain pieces of code and re-use it whenever it is needed. Wesnoth provides you with a whole serie of standard preprocessors to make life more easy, but you yourself can define them too (again stuff for later). &lt;br /&gt;
Lets get back to this example! The preprocessors used here, describe how a day in this scenario should progress. This listing above is the normal day used throughout Wesnoth. If you want the entire scenario to take place at night, remove all the preprocessors except for '''{SECOND_WATCH}'''. This could be useful if you have Konrad&lt;br /&gt;
fighting the Undead and want the Undead to have the upper hand the whole time. Remember though, by setting this to a single tme of day and not the normal progress listed above, your scenario will effectively be taking place during one day or night, not many days as most scenarios are.&lt;br /&gt;
&lt;br /&gt;
The ''music'' key is a filename pointing to the music which plays. (See [[MusicListWML]] for more.)&lt;br /&gt;
This music file must be in the ''music/'' directory and '''must''' be in .ogg format.&lt;br /&gt;
&lt;br /&gt;
A tag you'll get to know very good when making scenarios shows up: '''[event]...[/event]'''.&lt;br /&gt;
Event tags are used to describe what should be done if an 'event' takes place. What this event is, is described by ''name''key. In this case we're describing the so-called 'prestart' event. This one takes place just ''before'' the game starts and just ''after'' all of the introductions screens were shown.&lt;br /&gt;
Here we have limited the contents of the tag to another important tag: '''[objectives]''' (plural) containing any number of '''[objective]''' (singular) tags.&lt;br /&gt;
For each '''[objective]''' (singular) tag, if ''condition'' is set to &amp;quot;win&amp;quot;, the text of ''description'' will be displayed in green after &amp;quot;Victory&amp;quot; in the Scenario Objectives. If ''condition'' is set to &amp;quot;lose&amp;quot;, the text of ''description'' will be displayed in red after &amp;quot;Defeat&amp;quot; in the Scenario Objectives. Because we've placed this tag inside a prestart event, this will be shown at the very first turn of the scenario.&lt;br /&gt;
The ''side'' key indicates that these conditions are for side 1 (see below).&lt;br /&gt;
The ' _ ' (underscore) facilitates translation using Gettext (see [[GetText]]).&lt;br /&gt;
&lt;br /&gt;
Note that ''ANY'' Victory or Defeat objective can be met to win or lose the scenario,&lt;br /&gt;
but a single Victory objective may have multiple parts.&lt;br /&gt;
Also note that the '''[objective]''' tag only describes what the objectives are. You will still need to set the appropiate events before they will work. (But that's again stuff for later)&lt;br /&gt;
&lt;br /&gt;
== Second part ==&lt;br /&gt;
So far so good! The last necessary part describes what the players (Human and&lt;br /&gt;
Computer) start with, what they can do and what they can't do. Each of the players is described in a '''[side]''' tag.&lt;br /&gt;
&lt;br /&gt;
 .  /\ &lt;br /&gt;
 .  ||&lt;br /&gt;
 .  continued from above&lt;br /&gt;
   [side]&lt;br /&gt;
     side=1&lt;br /&gt;
     controller=human&lt;br /&gt;
     team_name=2&lt;br /&gt;
     user_team_name= _ &amp;quot;Konrad's forces&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
     type=Commander&lt;br /&gt;
     description=Konrad&lt;br /&gt;
     canrecruit=1&lt;br /&gt;
 &lt;br /&gt;
     recruit=Elvish Fighter,Elvish Archer,Horseman,Mage,Elvish Shaman&lt;br /&gt;
 &lt;br /&gt;
     {GOLD 100 50 0}&lt;br /&gt;
     {INCOME 10 5 0}&lt;br /&gt;
   [/side] &lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
Above you can see a sample '''[side]''' for the human player, Konrad. We wll describe every key more in detail below:&lt;br /&gt;
* ''side'': the leader of this side is placed on the tile represented by this digit (see [[BuildingMaps]]) It's a number from 1 to 9.&lt;br /&gt;
* ''controller'': possible values are 'human' or 'ai' (artificial intelligence, meaning your computer). If you don't specify this key, 'ai' is used as the default.&lt;br /&gt;
* ''team_name'' describes which team the side is on. It defaults to the same number as ''side'', so setting it to ''2'' allies this side with side 2, if you haven't changed the team_name of side 2.&lt;br /&gt;
* ''user_team_name'' is the name displayed when you view the sie stats (by pressing alt+s during gameplay). The underscore facilitates translation using GetText (see [[GetText]]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next set of keys describe the leader of this side:&lt;br /&gt;
* ''canrecruit'': This key can be '1' or '0', meaning &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot; respectively. If you no, then the leader won't be able to recruit. (Not much of a leader then, is he?) Any team without a canrecruit=1 unit automatically loses, so be sure to use this key.&lt;br /&gt;
* ''type'' describes what type of unit the leader will be. The possible  values are listed here: [[UnitTables]].&lt;br /&gt;
* ''description'' is the name and description of the leader.&lt;br /&gt;
In a campaign, all of these 'leader-describing' keys are ignored for the human player (except ''canrecruit''), since the leader from the previous scenario is used instead. However, the ''type'' key is still neccesary to prevent the scenario from crashing.&lt;br /&gt;
&lt;br /&gt;
* ''recruit'' is a comma-separated list of types of units. The possible values are listed in [[UnitTables]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then two more preprocessors are used:&lt;br /&gt;
* '''{GOLD easy normal hard}''' takes 3 positive numbers. These indicate the amount of money the player will start with on the EASY, NORMAL and HARD difficulty level.&lt;br /&gt;
In a campaign file, inside a human controlled side (''controller=human''), this is the minimum amount.  The actual amount the player gets ca, be larger if the player retained more from previous scenarios.&lt;br /&gt;
* '''{INCOME easy normal hard}''' is similar, but indicates the base income.&lt;br /&gt;
The defaults for each of these values are 100 gold and 2 base income.&lt;br /&gt;
&lt;br /&gt;
== Making it all work ==&lt;br /&gt;
Now, to make this scenario playable, we need to make a campaign for it. (see [[BuildingCampaignsTheCampaignFile]])&lt;br /&gt;
This should NOT be stored inside the main directory '''data/campaigns''' but inside '''userdata/data/campaigns'''. This prevents breaking the mainline campaigns or even worse, the entire game. (see [[BuildingCampaignsDirectoryStructure]])&lt;br /&gt;
Note: All files, the campaign file and the scenario file, one for each scenario level, must be saved with the ending .cfg (for example: testcampaign.cfg).&lt;br /&gt;
This is a short example on how to do this:&lt;br /&gt;
&lt;br /&gt;
 [campaign]&lt;br /&gt;
   name= _ &amp;quot;Test Campaign&amp;quot;&lt;br /&gt;
   first_scenario=test-1&lt;br /&gt;
   difficulties=EASY,NORMAL,HARD&lt;br /&gt;
 &lt;br /&gt;
   difficulty_descriptions= _ &amp;quot;&amp;amp;elvish-fighter.png=Easy;*&amp;amp;elvish-hero.png=Medium;&amp;amp;elvish-champion.png=Hard&amp;quot;&lt;br /&gt;
   icon=elvish-fighter.png&lt;br /&gt;
 [/campaign]&lt;br /&gt;
&lt;br /&gt;
Campaigns are described in the '''[campaign]''' tag. The first key is ''name'', which is&lt;br /&gt;
displayed on the campaign selector box. The second key is ''first_scenario'', which is&lt;br /&gt;
the ID of the first scenario of the campaign. Scenarios following after this one are referenced inside the first scenario using ''next_scenario'' (see above).&lt;br /&gt;
&lt;br /&gt;
The key '''difficulties=EASY,NORMAL,HARD''' tells the computer to set the macro '''EASY''' if the first difficulty choice is chosen, '''NORMAL''' if the second is chosen, and '''HARD''' if the third is chosen.&lt;br /&gt;
The expression '''#ifdef''' can be used later to test these macros. (see [[PreprocessorRef]])&lt;br /&gt;
It is recommended that you do not use other names than '''EASY''', '''NORMAL''', and '''HARD''' for your macros, because if you do then the standard macros, such as '''{GOLD}''' and '''{INCOME}''', won't work properly.&lt;br /&gt;
&lt;br /&gt;
Two optional keys are ''difficulty_descriptions'' and ''icon''.&lt;br /&gt;
''icon'' has value equal to an image, displayed inside the campaign list.&lt;br /&gt;
''difficulty_descriptions'' must have the same number of inputs as  '''difficulties''', most commonly three, separated by semicolons.&lt;br /&gt;
These inputs then map on to the difficulties, so that if you have set difficulties to:&lt;br /&gt;
 &amp;quot;difficulties=EASY,NORMAL,HARD&amp;quot;&lt;br /&gt;
the first input will specify the display on EASY, the second on NORMAL and the third on HARD.&lt;br /&gt;
Each difficulty display description starts opens with an ampersand (''&amp;amp;''), then the image to display (eg ''elvish-fighter.png''),&lt;br /&gt;
then an equals (''='') sign, then the text to display (eg ''Easy'').&lt;br /&gt;
Optionally you can place an asterisk (''*'') before one of the ampersands, and the corresponding difficulty will be selected by default (here NORMAL is default).&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[BuildingMaps]] &amp;amp; [[WesnothMapEditor]]&lt;br /&gt;
* [[ScenarioWML]] &amp;amp; [[SyntaxWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosIntermediate&amp;diff=16129</id>
		<title>BuildingScenariosIntermediate</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosIntermediate&amp;diff=16129"/>
		<updated>2007-06-27T20:45:23Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Quick Navigation: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;----&lt;br /&gt;
{| style=&amp;quot;float:right&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
__TOC__&lt;br /&gt;
|}&lt;br /&gt;
==== Quick Navigation: ====&lt;br /&gt;
[[BuildingScenarios]] &lt;br /&gt;
:'''[[BuildingScenariosSimple]] - [[BuildingScenariosIntermediate]] - [[BuildingScenariosAdvanced]]'''&lt;br /&gt;
:[[BuildingScenariosWML]]&lt;br /&gt;
:[[BuildingScenariosComments]]&lt;br /&gt;
:[[BuildingScenariosSamples]] &lt;br /&gt;
:[[BuildingScenariosFAQ]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Intermediate =&lt;br /&gt;
In this tutorial we will dig somewhat deeper into the secrets of WML and scenario building: events, explaining the use of some special attributes, setting up somewhat more advanced sides, ...&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
You can trigger certain actions that occur during a scenario using the events mechanism. Let us look at an example of a simple event. Suppose you wanted Konrad to say &amp;quot;it's getting cold&amp;quot; when he moves to the location (4,8):&lt;br /&gt;
&lt;br /&gt;
  [event]&lt;br /&gt;
    name=moveto&lt;br /&gt;
    [filter]&lt;br /&gt;
      description=Konrad&lt;br /&gt;
      x=4&lt;br /&gt;
      y=8&lt;br /&gt;
     [/filter]&lt;br /&gt;
     [message]&lt;br /&gt;
       description=Konrad&lt;br /&gt;
       message= _ &amp;quot;It's getting cold&amp;quot;&lt;br /&gt;
     [/message]&lt;br /&gt;
  [/event]&lt;br /&gt;
&lt;br /&gt;
First you have the name of the event.&lt;br /&gt;
Here, we have a 'moveto' event, meaning it is fired every time a unit moves somewhere.&lt;br /&gt;
For a list of the different possible event names, see [[EventWML]]&lt;br /&gt;
&lt;br /&gt;
Of course, we don't want this to be fired every single time some unit moves somewhere! So, we use the '''[filter]''' tag to filter out what kind of moveto event we want.&lt;br /&gt;
How filters are used is described in [[FilterWML]].&lt;br /&gt;
&lt;br /&gt;
== Special attributes ==&lt;br /&gt;
&lt;br /&gt;
Note that generally, a set of actions is triggered only once.&lt;br /&gt;
You can make a set of actions be triggered every time the event occurs&lt;br /&gt;
by adding the attribute '''first_time_only=no''' in the event.&lt;br /&gt;
&lt;br /&gt;
Also, whenever an event is triggered, the player cannot undo the move, even if it was a moveto event. We could make a scenario where moves cannot be undone by adding the event&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
   name=moveto&lt;br /&gt;
   first_time_only=no&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
(which would not do anything, but would prevent the player from undoing moves)&lt;br /&gt;
&lt;br /&gt;
The event:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
   name=enemies defeated&lt;br /&gt;
   [endlevel]&lt;br /&gt;
     result=victory&lt;br /&gt;
     bonus=yes&lt;br /&gt;
   [/endlevel]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
is an implied trigger and appears automatically at the end of each scenario.&lt;br /&gt;
To prevent this event, add the attribute '''victory_when_enemies_defeated=no''' inside the main tag (usually [scenario]).&lt;br /&gt;
&lt;br /&gt;
The attribute '''disallow_recall=yes''' prevents the player from recalling units in this scenario.&lt;br /&gt;
&lt;br /&gt;
The attributes '''fog=yes''' and '''shroud=yes''' can be put in a '''[side]''' tag to make that side have fog of war/shroud. (Fog of war prevents seeing all enemy movement, shroud prevents seeing all of the map.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Sides ==&lt;br /&gt;
&lt;br /&gt;
Ok, so as you have seen in [[BuildingScenariosSimple]], you can setup what the human player and AI player start with, and some simple options for controlling how the AI works. From the '''[side]''' tag listed below you can see we are going to learn some more interesting things that can be controlled from there. I'm not going to explain all the keys, just the new ones.&lt;br /&gt;
&lt;br /&gt;
 [scenario]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 &lt;br /&gt;
   [side]&lt;br /&gt;
     type=Lich&lt;br /&gt;
     description=Galga&lt;br /&gt;
     side=2&lt;br /&gt;
     canrecruit=1&lt;br /&gt;
 &lt;br /&gt;
     #ifdef EASY&lt;br /&gt;
      recruit=Skeleton,Revenant,Blood Bat,Ghost,Bone Shooter&lt;br /&gt;
      recruitment_pattern=fighter,fighter,archer,scout&lt;br /&gt;
      gold=300&lt;br /&gt;
     #endif&lt;br /&gt;
 &lt;br /&gt;
     #ifdef NORMAL&lt;br /&gt;
      recruit=Skeleton,Revenant,Chocobone,Blood Bat,Wraith,Bone Shooter,Dark Adept &lt;br /&gt;
      recruitment_pattern=fighter,fighter,archer,scout&lt;br /&gt;
      gold=500&lt;br /&gt;
     #endif&lt;br /&gt;
 &lt;br /&gt;
     #ifdef HARD&lt;br /&gt;
      recruit=Skeleton,Revenant,Chocobone,Wraith,Bone Shooter,Dark Adept&lt;br /&gt;
      recruitment_pattern=fighter,fighter,archer,scout&lt;br /&gt;
      gold=700&lt;br /&gt;
     #endif&lt;br /&gt;
 &lt;br /&gt;
     aggression=1.0&lt;br /&gt;
     village_value=0.0&lt;br /&gt;
     leader_value=50.0&lt;br /&gt;
     enemy=1&lt;br /&gt;
   [/side]&lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
As you can see from the above listing, the '''[side]''' tag can get a little complex. &lt;br /&gt;
The '''#ifdef''' is relatively simple to understand. If the user is playing EASY then everything between '''#ifdef EASY''' and '''#endif''' is set and the others are ignored. If the user is playing NORMAL then everything between '''#ifdef NORMAL''' and '''#endif''' is set and the others are ignored. Finally if the user is playing HARD then everything between '''#ifdef HARD''' and '''#endif''' is set and the others are ignored. This allows a scenario to be configured differently for each level of gameplay the user may choose. There are also two new keys listed, '''village_value''' and '''leader_value'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lets get into some more interesting stuff. The map files hold the ground tiles. This is the very bottom layer of things. The units walking around during a game are on the very top layer. This is all well and good, but wouldn't it be nice to be able to place some unique items on the map? What if you wanted to place a building, or a potion, or anything somewhere in your scenario? Well you can! Using the '''[item]''' tag:&lt;br /&gt;
&lt;br /&gt;
 [scenario]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 &lt;br /&gt;
   [item]&lt;br /&gt;
     x=31&lt;br /&gt;
     y=43&lt;br /&gt;
     image=item-holywater.png &lt;br /&gt;
   [/item]&lt;br /&gt;
 &lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
The '''[item]''' tag is actually very simple to use, as you can see from above. There are three keys, the first two are '''x''' and '''y'''. They are the location on the map. The third key is '''image'''. This it the image file to place in that location. This image must be located in the images directory. Ok, that was simple wasn't it?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you have enough information to make some interesting looking scenarios with tuned AI players. This is a big step. Next we are going to learn how to make your newly created scenario fit nicely into a campaign. This involves making the intro shown before the scenario is played a bit more descriptive. This is all done from within the '''[story]''' tag.&lt;br /&gt;
&lt;br /&gt;
 [scenario]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 &lt;br /&gt;
   [story]&lt;br /&gt;
     [part]&lt;br /&gt;
       story= _ &amp;quot;... but one of the Orcs survived long enough to send the news to the queen...&amp;quot; &lt;br /&gt;
       image=misc/story6.png&lt;br /&gt;
     [/part]&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
     . &lt;br /&gt;
   [/story]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 . &lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
The story tag contains the story told before the player starts the scenario. You can ommit this, then you will skip the introductionary screens. A story tag exists out of parts (inside [part] tags). Each part can contain several keys describing what content it has got. See [[IntroWML]] for more information.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[ScenarioWML]] &amp;amp; [[SyntaxWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16128</id>
		<title>BuildingScenariosAdvanced</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16128"/>
		<updated>2007-06-27T20:45:13Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==== Quick Navigation: ====&lt;br /&gt;
[[BuildingScenarios]] &lt;br /&gt;
:'''[[BuildingScenariosSimple]] - [[BuildingScenariosIntermediate]] - [[BuildingScenariosAdvanced]]'''&lt;br /&gt;
:[[BuildingScenariosWML]]&lt;br /&gt;
:[[BuildingScenariosComments]]&lt;br /&gt;
:[[BuildingScenariosSamples]] &lt;br /&gt;
:[[BuildingScenariosFAQ]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Advanced =&lt;br /&gt;
&lt;br /&gt;
'''TODO:'''&lt;br /&gt;
This contained a repetition of what was already inside [[BuildingScenariosIntermediate]]&lt;br /&gt;
This should contain: &lt;br /&gt;
* (more) information about making &amp;amp; using preprocessors ([[PreprocessorRef]])&lt;br /&gt;
* information about GetText and making your scenario translatable&lt;br /&gt;
* information on guidelines concerning the general layout of a scenario file&lt;br /&gt;
* LOTS of links to pages any campaign editor needs frequently&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
Ayone who feels like writing something, go ahead&lt;br /&gt;
&lt;br /&gt;
:Mathijs&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[ScenarioWML]], [[SyntaxWML]] &amp;amp; [[ReferenceWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16127</id>
		<title>BuildingScenariosAdvanced</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16127"/>
		<updated>2007-06-27T20:44:30Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==== Quick Navigation: ====&lt;br /&gt;
[[BuildingScenarios]] &lt;br /&gt;
:'''[[BuildingScenariosSimple]]''' - [[BuildingScenariosIntermediate]] - [[BuildingScenariosAdvanced]]&lt;br /&gt;
:[[BuildingScenariosWML]]&lt;br /&gt;
:[[BuildingScenariosComments]]&lt;br /&gt;
:[[BuildingScenariosSamples]] &lt;br /&gt;
:[[BuildingScenariosFAQ]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Advanced =&lt;br /&gt;
&lt;br /&gt;
'''TODO:'''&lt;br /&gt;
This contained a repetition of what was already inside [[BuildingScenariosIntermediate]]&lt;br /&gt;
This should contain: &lt;br /&gt;
* (more) information about making &amp;amp; using preprocessors ([[PreprocessorRef]])&lt;br /&gt;
* information about GetText and making your scenario translatable&lt;br /&gt;
* information on guidelines concerning the general layout of a scenario file&lt;br /&gt;
* LOTS of links to pages any campaign editor needs frequently&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
Ayone who feels like writing something, go ahead&lt;br /&gt;
&lt;br /&gt;
:Mathijs&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[ScenarioWML]], [[SyntaxWML]] &amp;amp; [[ReferenceWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16126</id>
		<title>BuildingScenariosAdvanced</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16126"/>
		<updated>2007-06-27T20:44:01Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==== Quick Navigation: ====&lt;br /&gt;
[[BuildingScenarios]] &lt;br /&gt;
:'''[[BuildingScenariosSimple]]''' - [[BuildingScenariosIntermediate]] - [[BuildingScenariosAdvanced]]&lt;br /&gt;
:[[BuildingScenariosWML]]&lt;br /&gt;
:[[BuildingScenariosComments]]&lt;br /&gt;
:[[BuildingScenariosSamples]] &lt;br /&gt;
:[[BuildingScenariosFAQ]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Advanced =&lt;br /&gt;
&lt;br /&gt;
''''TODO:''''&lt;br /&gt;
This contained a repetition of what was already inside [[BuildingScenariosIntermediate]]&lt;br /&gt;
This should contain: &lt;br /&gt;
* (more) information about making &amp;amp; using preprocessors ([[PreprocessorRef]])&lt;br /&gt;
* information about GetText and making your scenario translatable&lt;br /&gt;
* information on guidelines concerning the general layout of a scenario file&lt;br /&gt;
* LOTS of links to pages any campaign editor needs frequently&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
Ayone who feels like writing something, go ahead&lt;br /&gt;
&lt;br /&gt;
:Mathijs&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[ScenarioWML]], [[SyntaxWML]] &amp;amp; [[ReferenceWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16125</id>
		<title>BuildingScenariosAdvanced</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16125"/>
		<updated>2007-06-27T20:38:42Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Building scenarios: Advanced */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==== Quick Navigation: ====&lt;br /&gt;
[[BuildingScenarios]] &lt;br /&gt;
:'''[[BuildingScenariosSimple]]''' - [[BuildingScenariosIntermediate]] - [[BuildingScenariosAdvanced]]&lt;br /&gt;
:[[BuildingScenariosWML]]&lt;br /&gt;
:[[BuildingScenariosComments]]&lt;br /&gt;
:[[BuildingScenariosSamples]] &lt;br /&gt;
:[[BuildingScenariosFAQ]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Advanced =&lt;br /&gt;
&lt;br /&gt;
Ok, so as you have seen in [[BuildingScenariosSimple]], you can setup what the human player and AI player start with. From the '''[side]''' tag listed below you can see we are going to learn some more interesting things about AI that can be controlled from there. We'll have a look at the new keys one by one.&lt;br /&gt;
&lt;br /&gt;
 [scenario]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
   [side]&lt;br /&gt;
     side=2&lt;br /&gt;
     enemy=1&lt;br /&gt;
 &lt;br /&gt;
     canrecruit=1&lt;br /&gt;
 &lt;br /&gt;
     type=Lich&lt;br /&gt;
     description=Galga&lt;br /&gt;
 &lt;br /&gt;
     #ifdef EASY&lt;br /&gt;
       recruit=Skeleton,Revenant,Blood Bat,Ghost,Bone Shooter&lt;br /&gt;
       recruitment_pattern=fighter,fighter,archer,scout&lt;br /&gt;
       gold=300&lt;br /&gt;
     #endif&lt;br /&gt;
 &lt;br /&gt;
     #ifdef NORMAL&lt;br /&gt;
       recruit=Skeleton,Revenant,Chocobone,Blood Bat,Wraith,Bone Shooter,Dark Adept&lt;br /&gt;
       recruitment_pattern=fighter,fighter,archer,scout&lt;br /&gt;
       gold=500&lt;br /&gt;
     #endif&lt;br /&gt;
 &lt;br /&gt;
     #ifdef HARD&lt;br /&gt;
       recruit=Skeleton,Revenant,Chocobone,Wraith,Bone Shooter,Dark Adept&lt;br /&gt;
       recruitment_pattern=fighter,fighter,archer,scout&lt;br /&gt;
       gold=700&lt;br /&gt;
     #endif&lt;br /&gt;
 &lt;br /&gt;
     aggression=1.0&lt;br /&gt;
     village_value=0.0&lt;br /&gt;
     leader_value=50.0&lt;br /&gt;
   [/side]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
As you can see from the above listing, the '''[side]''' tag can get a little complex. The ''#ifdef'' is relatively simple&lt;br /&gt;
to explain. If the user is playing EASY then everything between '''#ifdef EASY''' and '''#endif''' is set and the others&lt;br /&gt;
are ignored. If the user is playing NORMAL then everything between '''#ifdef NORMAL''' and '''#endif''' is set and the&lt;br /&gt;
others are ignored. Finally if the user is playing HARD then everything between '''#ifdef HARD''' and '''#endif''' is set&lt;br /&gt;
and the others are ignored. This allows a scenario to be configured differently for each level of gameplay the user&lt;br /&gt;
may choose. There are also four new keys listed, '''recruitment_pattern''', '''aggression''', '''village_value''' and '''leader_value'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''''THIS IS OBSOLETE:'''' '''Editor's Note: For 0.8.3 and later, scenarios no longer need IDs''' &lt;br /&gt;
&lt;br /&gt;
If a scenario is meant to be translated, it must have ID's. ID's are used to represent text in the scenario. A translation maps the ID of each text in the scenario to a translation text.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 [message]&lt;br /&gt;
 message= _ &amp;quot;Where are we? Which way now? I am tired of this darkness!&amp;quot;&lt;br /&gt;
 description=Konrad&lt;br /&gt;
 id=hasty_1&lt;br /&gt;
 [/message]&lt;br /&gt;
&lt;br /&gt;
This is the first message in the scenario &amp;quot;Hasty Alliance&amp;quot;.  To translate this message into French, we put the key&lt;br /&gt;
&lt;br /&gt;
 hasty_1=&amp;quot;Où sommes-nous ? Quel chemin devons-nous emprunter maintenant ? Je suis fatigué de cette obscurité !&amp;quot;&lt;br /&gt;
&lt;br /&gt;
in the French translation file and when Wesnoth is played in French this message will be displayed rather than the&lt;br /&gt;
original one. The key&lt;br /&gt;
''' id ''' should be added to any tag with text that is meant to be translated (remember, the [scenario] tag already has an&lt;br /&gt;
id, do not add&lt;br /&gt;
another one).&lt;br /&gt;
&lt;br /&gt;
Now you have enough information to make some interesting looking scenarios with tuned AI players.&lt;br /&gt;
This is a big step.&lt;br /&gt;
Next we are going to learn how to make your newly created scenario fit nicely into a campaign.&lt;br /&gt;
This involves making a descriptive intro shown before the scenario is played.&lt;br /&gt;
See [[IntroWML]] for a description of the intro screen.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[ScenarioWML]], [[SyntaxWML]] &amp;amp; [[ReferenceWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16124</id>
		<title>BuildingScenariosAdvanced</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16124"/>
		<updated>2007-06-27T20:35:27Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* See Also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==== Quick Navigation: ====&lt;br /&gt;
[[BuildingScenarios]] &lt;br /&gt;
:'''[[BuildingScenariosSimple]]''' - [[BuildingScenariosIntermediate]] - [[BuildingScenariosAdvanced]]&lt;br /&gt;
:[[BuildingScenariosWML]]&lt;br /&gt;
:[[BuildingScenariosComments]]&lt;br /&gt;
:[[BuildingScenariosSamples]] &lt;br /&gt;
:[[BuildingScenariosFAQ]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Advanced =&lt;br /&gt;
&lt;br /&gt;
Ok, so as you have seen in [[BuildingScenariosSimple]], you can setup what the human player and AI player start with. From the '''[side]''' tag listed below you can see we are going to learn some more interesting things about AI that can be controlled from there. We'll have a look at the new keys one by one.&lt;br /&gt;
&lt;br /&gt;
 [scenario]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
   [side]&lt;br /&gt;
     side=2&lt;br /&gt;
     enemy=1&lt;br /&gt;
 &lt;br /&gt;
     canrecruit=1&lt;br /&gt;
 &lt;br /&gt;
     type=Lich&lt;br /&gt;
     description=Galga&lt;br /&gt;
 &lt;br /&gt;
     #ifdef EASY&lt;br /&gt;
       recruit=Skeleton,Revenant,Blood Bat,Ghost,Bone Shooter&lt;br /&gt;
       recruitment_pattern=fighter,fighter,archer,scout&lt;br /&gt;
       gold=300&lt;br /&gt;
     #endif&lt;br /&gt;
 &lt;br /&gt;
     #ifdef NORMAL&lt;br /&gt;
       recruit=Skeleton,Revenant,Chocobone,Blood Bat,Wraith,Bone Shooter,Dark Adept&lt;br /&gt;
       recruitment_pattern=fighter,fighter,archer,scout&lt;br /&gt;
       gold=500&lt;br /&gt;
     #endif&lt;br /&gt;
 &lt;br /&gt;
     #ifdef HARD&lt;br /&gt;
       recruit=Skeleton,Revenant,Chocobone,Wraith,Bone Shooter,Dark Adept&lt;br /&gt;
       recruitment_pattern=fighter,fighter,archer,scout&lt;br /&gt;
       gold=700&lt;br /&gt;
     #endif&lt;br /&gt;
 &lt;br /&gt;
     aggression=1.0&lt;br /&gt;
     village_value=0.0&lt;br /&gt;
     leader_value=50.0&lt;br /&gt;
   [/side]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
As you can see from the above listing, the '''[side]''' tag can get a little complex. The ''#ifdef'' is relatively simple&lt;br /&gt;
to explain. If the user is playing EASY then everything between '''#ifdef EASY''' and '''#endif''' is set and the others&lt;br /&gt;
are ignored. If the user is playing NORMAL then everything between '''#ifdef NORMAL''' and '''#endif''' is set and the&lt;br /&gt;
others are ignored. Finally if the user is playing HARD then everything between '''#ifdef HARD''' and '''#endif''' is set&lt;br /&gt;
and the others are ignored. This allows a scenario to be configured differently for each level of gameplay the user&lt;br /&gt;
may choose. There are also four new keys listed, '''recruitment_pattern''', '''aggression''', '''village_value''' and '''leader_value'''.&lt;br /&gt;
&lt;br /&gt;
If a scenario is meant to be translated, it must have ids&lt;br /&gt;
(Editor's Note: For 0.8.3 and later, scenarios no longer need IDs.).&lt;br /&gt;
IDs are used to represent text in the scenario.&lt;br /&gt;
A translation maps the ID of each text in the scenario to a translation text.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 [message]&lt;br /&gt;
 message= _ &amp;quot;Where are we? Which way now? I am tired of this darkness!&amp;quot;&lt;br /&gt;
 description=Konrad&lt;br /&gt;
 id=hasty_1&lt;br /&gt;
 [/message]&lt;br /&gt;
&lt;br /&gt;
This is the first message in the scenario &amp;quot;Hasty Alliance&amp;quot;.  To translate this message into French, we put the key&lt;br /&gt;
&lt;br /&gt;
 hasty_1=&amp;quot;Où sommes-nous ? Quel chemin devons-nous emprunter maintenant ? Je suis fatigué de cette obscurité !&amp;quot;&lt;br /&gt;
&lt;br /&gt;
in the French translation file and when Wesnoth is played in French this message will be displayed rather than the&lt;br /&gt;
original one. The key&lt;br /&gt;
''' id ''' should be added to any tag with text that is meant to be translated (remember, the [scenario] tag already has an&lt;br /&gt;
id, do not add&lt;br /&gt;
another one).&lt;br /&gt;
&lt;br /&gt;
Now you have enough information to make some interesting looking scenarios with tuned AI players.&lt;br /&gt;
This is a big step.&lt;br /&gt;
Next we are going to learn how to make your newly created scenario fit nicely into a campaign.&lt;br /&gt;
This involves making a descriptive intro shown before the scenario is played.&lt;br /&gt;
See [[IntroWML]] for a description of the intro screen.&lt;br /&gt;
&lt;br /&gt;
See [[ReferenceWML]] for a more complete description of what WML can do.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[ScenarioWML]], [[SyntaxWML]] &amp;amp; [[ReferenceWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16123</id>
		<title>BuildingScenariosAdvanced</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16123"/>
		<updated>2007-06-27T20:34:44Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* See Also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==== Quick Navigation: ====&lt;br /&gt;
[[BuildingScenarios]] &lt;br /&gt;
:'''[[BuildingScenariosSimple]]''' - [[BuildingScenariosIntermediate]] - [[BuildingScenariosAdvanced]]&lt;br /&gt;
:[[BuildingScenariosWML]]&lt;br /&gt;
:[[BuildingScenariosComments]]&lt;br /&gt;
:[[BuildingScenariosSamples]] &lt;br /&gt;
:[[BuildingScenariosFAQ]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Advanced =&lt;br /&gt;
&lt;br /&gt;
Ok, so as you have seen in [[BuildingScenariosSimple]], you can setup what the human player and AI player start with. From the '''[side]''' tag listed below you can see we are going to learn some more interesting things about AI that can be controlled from there. We'll have a look at the new keys one by one.&lt;br /&gt;
&lt;br /&gt;
 [scenario]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
   [side]&lt;br /&gt;
     side=2&lt;br /&gt;
     enemy=1&lt;br /&gt;
 &lt;br /&gt;
     canrecruit=1&lt;br /&gt;
 &lt;br /&gt;
     type=Lich&lt;br /&gt;
     description=Galga&lt;br /&gt;
 &lt;br /&gt;
     #ifdef EASY&lt;br /&gt;
       recruit=Skeleton,Revenant,Blood Bat,Ghost,Bone Shooter&lt;br /&gt;
       recruitment_pattern=fighter,fighter,archer,scout&lt;br /&gt;
       gold=300&lt;br /&gt;
     #endif&lt;br /&gt;
 &lt;br /&gt;
     #ifdef NORMAL&lt;br /&gt;
       recruit=Skeleton,Revenant,Chocobone,Blood Bat,Wraith,Bone Shooter,Dark Adept&lt;br /&gt;
       recruitment_pattern=fighter,fighter,archer,scout&lt;br /&gt;
       gold=500&lt;br /&gt;
     #endif&lt;br /&gt;
 &lt;br /&gt;
     #ifdef HARD&lt;br /&gt;
       recruit=Skeleton,Revenant,Chocobone,Wraith,Bone Shooter,Dark Adept&lt;br /&gt;
       recruitment_pattern=fighter,fighter,archer,scout&lt;br /&gt;
       gold=700&lt;br /&gt;
     #endif&lt;br /&gt;
 &lt;br /&gt;
     aggression=1.0&lt;br /&gt;
     village_value=0.0&lt;br /&gt;
     leader_value=50.0&lt;br /&gt;
   [/side]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
As you can see from the above listing, the '''[side]''' tag can get a little complex. The ''#ifdef'' is relatively simple&lt;br /&gt;
to explain. If the user is playing EASY then everything between '''#ifdef EASY''' and '''#endif''' is set and the others&lt;br /&gt;
are ignored. If the user is playing NORMAL then everything between '''#ifdef NORMAL''' and '''#endif''' is set and the&lt;br /&gt;
others are ignored. Finally if the user is playing HARD then everything between '''#ifdef HARD''' and '''#endif''' is set&lt;br /&gt;
and the others are ignored. This allows a scenario to be configured differently for each level of gameplay the user&lt;br /&gt;
may choose. There are also four new keys listed, '''recruitment_pattern''', '''aggression''', '''village_value''' and '''leader_value'''.&lt;br /&gt;
&lt;br /&gt;
If a scenario is meant to be translated, it must have ids&lt;br /&gt;
(Editor's Note: For 0.8.3 and later, scenarios no longer need IDs.).&lt;br /&gt;
IDs are used to represent text in the scenario.&lt;br /&gt;
A translation maps the ID of each text in the scenario to a translation text.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 [message]&lt;br /&gt;
 message= _ &amp;quot;Where are we? Which way now? I am tired of this darkness!&amp;quot;&lt;br /&gt;
 description=Konrad&lt;br /&gt;
 id=hasty_1&lt;br /&gt;
 [/message]&lt;br /&gt;
&lt;br /&gt;
This is the first message in the scenario &amp;quot;Hasty Alliance&amp;quot;.  To translate this message into French, we put the key&lt;br /&gt;
&lt;br /&gt;
 hasty_1=&amp;quot;Où sommes-nous ? Quel chemin devons-nous emprunter maintenant ? Je suis fatigué de cette obscurité !&amp;quot;&lt;br /&gt;
&lt;br /&gt;
in the French translation file and when Wesnoth is played in French this message will be displayed rather than the&lt;br /&gt;
original one. The key&lt;br /&gt;
''' id ''' should be added to any tag with text that is meant to be translated (remember, the [scenario] tag already has an&lt;br /&gt;
id, do not add&lt;br /&gt;
another one).&lt;br /&gt;
&lt;br /&gt;
Now you have enough information to make some interesting looking scenarios with tuned AI players.&lt;br /&gt;
This is a big step.&lt;br /&gt;
Next we are going to learn how to make your newly created scenario fit nicely into a campaign.&lt;br /&gt;
This involves making a descriptive intro shown before the scenario is played.&lt;br /&gt;
See [[IntroWML]] for a description of the intro screen.&lt;br /&gt;
&lt;br /&gt;
See [[ReferenceWML]] for a more complete description of what WML can do.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16122</id>
		<title>BuildingScenariosAdvanced</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16122"/>
		<updated>2007-06-27T20:34:08Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Building scenarios: Advanced */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==== Quick Navigation: ====&lt;br /&gt;
[[BuildingScenarios]] &lt;br /&gt;
:'''[[BuildingScenariosSimple]]''' - [[BuildingScenariosIntermediate]] - [[BuildingScenariosAdvanced]]&lt;br /&gt;
:[[BuildingScenariosWML]]&lt;br /&gt;
:[[BuildingScenariosComments]]&lt;br /&gt;
:[[BuildingScenariosSamples]] &lt;br /&gt;
:[[BuildingScenariosFAQ]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Advanced =&lt;br /&gt;
&lt;br /&gt;
Ok, so as you have seen in [[BuildingScenariosSimple]], you can setup what the human player and AI player start with. From the '''[side]''' tag listed below you can see we are going to learn some more interesting things about AI that can be controlled from there. We'll have a look at the new keys one by one.&lt;br /&gt;
&lt;br /&gt;
 [scenario]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
   [side]&lt;br /&gt;
     side=2&lt;br /&gt;
     enemy=1&lt;br /&gt;
 &lt;br /&gt;
     canrecruit=1&lt;br /&gt;
 &lt;br /&gt;
     type=Lich&lt;br /&gt;
     description=Galga&lt;br /&gt;
 &lt;br /&gt;
     #ifdef EASY&lt;br /&gt;
       recruit=Skeleton,Revenant,Blood Bat,Ghost,Bone Shooter&lt;br /&gt;
       recruitment_pattern=fighter,fighter,archer,scout&lt;br /&gt;
       gold=300&lt;br /&gt;
     #endif&lt;br /&gt;
 &lt;br /&gt;
     #ifdef NORMAL&lt;br /&gt;
       recruit=Skeleton,Revenant,Chocobone,Blood Bat,Wraith,Bone Shooter,Dark Adept&lt;br /&gt;
       recruitment_pattern=fighter,fighter,archer,scout&lt;br /&gt;
       gold=500&lt;br /&gt;
     #endif&lt;br /&gt;
 &lt;br /&gt;
     #ifdef HARD&lt;br /&gt;
       recruit=Skeleton,Revenant,Chocobone,Wraith,Bone Shooter,Dark Adept&lt;br /&gt;
       recruitment_pattern=fighter,fighter,archer,scout&lt;br /&gt;
       gold=700&lt;br /&gt;
     #endif&lt;br /&gt;
 &lt;br /&gt;
     aggression=1.0&lt;br /&gt;
     village_value=0.0&lt;br /&gt;
     leader_value=50.0&lt;br /&gt;
   [/side]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
As you can see from the above listing, the '''[side]''' tag can get a little complex. The ''#ifdef'' is relatively simple&lt;br /&gt;
to explain. If the user is playing EASY then everything between '''#ifdef EASY''' and '''#endif''' is set and the others&lt;br /&gt;
are ignored. If the user is playing NORMAL then everything between '''#ifdef NORMAL''' and '''#endif''' is set and the&lt;br /&gt;
others are ignored. Finally if the user is playing HARD then everything between '''#ifdef HARD''' and '''#endif''' is set&lt;br /&gt;
and the others are ignored. This allows a scenario to be configured differently for each level of gameplay the user&lt;br /&gt;
may choose. There are also four new keys listed, '''recruitment_pattern''', '''aggression''', '''village_value''' and '''leader_value'''.&lt;br /&gt;
&lt;br /&gt;
If a scenario is meant to be translated, it must have ids&lt;br /&gt;
(Editor's Note: For 0.8.3 and later, scenarios no longer need IDs.).&lt;br /&gt;
IDs are used to represent text in the scenario.&lt;br /&gt;
A translation maps the ID of each text in the scenario to a translation text.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 [message]&lt;br /&gt;
 message= _ &amp;quot;Where are we? Which way now? I am tired of this darkness!&amp;quot;&lt;br /&gt;
 description=Konrad&lt;br /&gt;
 id=hasty_1&lt;br /&gt;
 [/message]&lt;br /&gt;
&lt;br /&gt;
This is the first message in the scenario &amp;quot;Hasty Alliance&amp;quot;.  To translate this message into French, we put the key&lt;br /&gt;
&lt;br /&gt;
 hasty_1=&amp;quot;Où sommes-nous ? Quel chemin devons-nous emprunter maintenant ? Je suis fatigué de cette obscurité !&amp;quot;&lt;br /&gt;
&lt;br /&gt;
in the French translation file and when Wesnoth is played in French this message will be displayed rather than the&lt;br /&gt;
original one. The key&lt;br /&gt;
''' id ''' should be added to any tag with text that is meant to be translated (remember, the [scenario] tag already has an&lt;br /&gt;
id, do not add&lt;br /&gt;
another one).&lt;br /&gt;
&lt;br /&gt;
Now you have enough information to make some interesting looking scenarios with tuned AI players.&lt;br /&gt;
This is a big step.&lt;br /&gt;
Next we are going to learn how to make your newly created scenario fit nicely into a campaign.&lt;br /&gt;
This involves making a descriptive intro shown before the scenario is played.&lt;br /&gt;
See [[IntroWML]] for a description of the intro screen.&lt;br /&gt;
&lt;br /&gt;
See [[ReferenceWML]] for a more complete description of what WML can do.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16121</id>
		<title>BuildingScenariosAdvanced</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosAdvanced&amp;diff=16121"/>
		<updated>2007-06-27T20:31:44Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==== Quick Navigation: ====&lt;br /&gt;
[[BuildingScenarios]] &lt;br /&gt;
:'''[[BuildingScenariosSimple]]''' - [[BuildingScenariosIntermediate]] - [[BuildingScenariosAdvanced]]&lt;br /&gt;
:[[BuildingScenariosWML]]&lt;br /&gt;
:[[BuildingScenariosComments]]&lt;br /&gt;
:[[BuildingScenariosSamples]] &lt;br /&gt;
:[[BuildingScenariosFAQ]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Advanced =&lt;br /&gt;
&lt;br /&gt;
Ok, so as you have seen in [[BuildingScenariosSimple]], you can setup what the human player and AI player start with. From&lt;br /&gt;
the '''[side]''' tag listed below you can see we are going to learn some more interesting things about AI that can be&lt;br /&gt;
controlled from there. I'm not going to explain all the keys, just the new ones.&lt;br /&gt;
&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 &lt;br /&gt;
 [side]&lt;br /&gt;
 side=2&lt;br /&gt;
 enemy=1&lt;br /&gt;
 &lt;br /&gt;
 canrecruit=1&lt;br /&gt;
 &lt;br /&gt;
 type=Lich&lt;br /&gt;
 description=Galga&lt;br /&gt;
 &lt;br /&gt;
 #ifdef EASY&lt;br /&gt;
  recruit=Skeleton,Revenant,Blood Bat,Ghost,Bone Shooter&lt;br /&gt;
  recruitment_pattern=fighter,fighter,archer,scout&lt;br /&gt;
  gold=300&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 #ifdef NORMAL&lt;br /&gt;
  recruit=Skeleton,Revenant,Chocobone,Blood Bat,Wraith,Bone Shooter,Dark Adept&lt;br /&gt;
  recruitment_pattern=fighter,fighter,archer,scout&lt;br /&gt;
  gold=500&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 #ifdef HARD&lt;br /&gt;
  recruit=Skeleton,Revenant,Chocobone,Wraith,Bone Shooter,Dark Adept&lt;br /&gt;
  recruitment_pattern=fighter,fighter,archer,scout&lt;br /&gt;
  gold=700&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 aggression=1.0&lt;br /&gt;
 village_value=0.0&lt;br /&gt;
 leader_value=50.0&lt;br /&gt;
 [/side]&lt;br /&gt;
&lt;br /&gt;
As you can see from the above listing, the '''[side]''' tag can get a little complex. The ''#ifdef'' is relatively simple&lt;br /&gt;
to explain. If the user is playing EASY then everything between '''#ifdef EASY''' and '''#endif''' is set and the others&lt;br /&gt;
are ignored. If the user is playing NORMAL then everything between '''#ifdef NORMAL''' and '''#endif''' is set and the&lt;br /&gt;
others are ignored. Finally if the user is playing HARD then everything between '''#ifdef HARD''' and '''#endif''' is set&lt;br /&gt;
and the others are ignored. This allows a scenario to be configured differently for each level of gameplay the user&lt;br /&gt;
may choose. There are also four new keys listed, '''recruitment_pattern''', '''aggression''', '''village_value''' and '''leader_value'''.&lt;br /&gt;
&lt;br /&gt;
If a scenario is meant to be translated, it must have ids&lt;br /&gt;
(Editor's Note: For 0.8.3 and later, scenarios no longer need IDs.).&lt;br /&gt;
IDs are used to represent text in the scenario.&lt;br /&gt;
A translation maps the ID of each text in the scenario to a translation text.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 [message]&lt;br /&gt;
 message= _ &amp;quot;Where are we? Which way now? I am tired of this darkness!&amp;quot;&lt;br /&gt;
 description=Konrad&lt;br /&gt;
 id=hasty_1&lt;br /&gt;
 [/message]&lt;br /&gt;
&lt;br /&gt;
This is the first message in the scenario &amp;quot;Hasty Alliance&amp;quot;.  To translate this message into French, we put the key&lt;br /&gt;
&lt;br /&gt;
 hasty_1=&amp;quot;Où sommes-nous ? Quel chemin devons-nous emprunter maintenant ? Je suis fatigué de cette obscurité !&amp;quot;&lt;br /&gt;
&lt;br /&gt;
in the French translation file and when Wesnoth is played in French this message will be displayed rather than the&lt;br /&gt;
original one. The key&lt;br /&gt;
''' id ''' should be added to any tag with text that is meant to be translated (remember, the [scenario] tag already has an&lt;br /&gt;
id, do not add&lt;br /&gt;
another one).&lt;br /&gt;
&lt;br /&gt;
Now you have enough information to make some interesting looking scenarios with tuned AI players.&lt;br /&gt;
This is a big step.&lt;br /&gt;
Next we are going to learn how to make your newly created scenario fit nicely into a campaign.&lt;br /&gt;
This involves making a descriptive intro shown before the scenario is played.&lt;br /&gt;
See [[IntroWML]] for a description of the intro screen.&lt;br /&gt;
&lt;br /&gt;
See [[ReferenceWML]] for a more complete description of what WML can do.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosSimple&amp;diff=16120</id>
		<title>BuildingScenariosSimple</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosSimple&amp;diff=16120"/>
		<updated>2007-06-27T20:30:40Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Quick Navigation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;----&lt;br /&gt;
{| style=&amp;quot;float:right&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
__TOC__&lt;br /&gt;
|}&lt;br /&gt;
==== Quick Navigation ====&lt;br /&gt;
[[BuildingScenarios]] &lt;br /&gt;
:'''[[BuildingScenariosSimple]]''' - [[BuildingScenariosIntermediate]] - [[BuildingScenariosAdvanced]]&lt;br /&gt;
:[[BuildingScenariosWML]]&lt;br /&gt;
:[[BuildingScenariosComments]]&lt;br /&gt;
:[[BuildingScenariosSamples]] &lt;br /&gt;
:[[BuildingScenariosFAQ]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Simple =&lt;br /&gt;
&lt;br /&gt;
This will show you a very simple scenario file, explaining each line of it.&lt;br /&gt;
The file is not fully functional, but it will show the basics needed to describe what a scenario is all about.&lt;br /&gt;
&lt;br /&gt;
'''Before reading this, it might prove usefull to read something about the syntax used in the Wesnoth Markup Language: [[SyntaxWML]]'''&lt;br /&gt;
&lt;br /&gt;
== First part ==&lt;br /&gt;
 [scenario]&lt;br /&gt;
 &lt;br /&gt;
   id=test-1&lt;br /&gt;
   next_scenario=2_test-more&lt;br /&gt;
 &lt;br /&gt;
   name=A Simple Test Scenario&lt;br /&gt;
   map_data=&amp;quot;{campaigns/Test_Campaign/testmap}{~campaigns/Test_Campaign/testmap}&amp;quot;&lt;br /&gt;
   turns=20&lt;br /&gt;
 &lt;br /&gt;
   {DAWN}&lt;br /&gt;
   {MORNING}&lt;br /&gt;
   {AFTERNOON}&lt;br /&gt;
   {DUSK}&lt;br /&gt;
   {FIRST_WATCH}&lt;br /&gt;
   {SECOND_WATCH}&lt;br /&gt;
 &lt;br /&gt;
   music=wesnoth-1.ogg&lt;br /&gt;
 &lt;br /&gt;
   [event]&lt;br /&gt;
     name=prestart&lt;br /&gt;
     [objectives]&lt;br /&gt;
       side=1&lt;br /&gt;
       [objective]&lt;br /&gt;
         description= _ &amp;quot;Defeat Enemy Leader&amp;quot;&lt;br /&gt;
         condition=win&lt;br /&gt;
       [/objective]&lt;br /&gt;
       [objective]&lt;br /&gt;
         description= _ &amp;quot;Death of Konrad&amp;quot;&lt;br /&gt;
         condition=lose&lt;br /&gt;
       [/objective]&lt;br /&gt;
     [/objectives]&lt;br /&gt;
   [/event]&lt;br /&gt;
 .  continued below&lt;br /&gt;
 .  ||&lt;br /&gt;
 .  \/&lt;br /&gt;
 &lt;br /&gt;
Every scenario must be enclosed in a tag;&lt;br /&gt;
the '''[scenario]''' tag is used for campaign scenarios.&lt;br /&gt;
The first set of keys in the scenario tag&lt;br /&gt;
describe the very basics of this scenario:&lt;br /&gt;
* The ''id'' (short for ''identifier'') is the computer's name for your scenario, and is not displayed during the game. However, it will be used to display game statistics (they will be graphed on http://stats.wesnoth.org in numerical order, so it's also a good idea to give the id's a number). This name is also used as reference in other tags and files, eg inside a '''[campaign]''' tag using the ''first_scenario'' key(see [[BuildingCampaignsTheCampaignFile]]) or inside a '''[scenario]''' tag using the ''next_scenario'' key (see below).&lt;br /&gt;
&lt;br /&gt;
* The value of the ''next_scenario'' key is the id (see above) of the scenario that is played after this one is won. Units from this scenario will be available for recall (unless you modify the recall list, but that's stuff for later). If your scenario is not part of a campaign, or if this is the last scenario you should either skip this line or put '''next_scenario=null''' inside the file. This will tell the game to display the End screen when this scenario is won.&lt;br /&gt;
&lt;br /&gt;
* The value of the ''name'' key is shown on the introduction screen before each scenario is played. (This can contain a picture of a map, or anything else you fancy. See [[BuildingScenariosIntermediate]] for an explenation on how to do that.) It's also the default name for saves on the level.&lt;br /&gt;
&lt;br /&gt;
* The next key, ''map_data'', is a link to the map file. You can create map files using the Wesnoth Map Editor (see [[WesnothMapEditor]] and [[BuildingMaps]] for more information). Since we may not know exactly where this campaign will be located we'll write two possible locations of the map file. The quotes are necessary because Wesnoth map data takes up multiple lines, so quotes are used to indicate where the data begins and ends. If you don't do this, it will break the scenario.&lt;br /&gt;
&lt;br /&gt;
* Finally, the last key in the top set of keys is ''turns''. This is the amount of turns a player is given to finish the scenario. (It can be changed during the game, but again, that is stuff for later.) When the player fails to finish the secnario in the given time, he has lost. (Said otherwise: the ''defeat'' event is trigered. See [[EventWML]] for more.)&lt;br /&gt;
&lt;br /&gt;
The next section is a set of preprocessors (see [[PreprocessorRef]]). Preprocessors are essentially WML shortcuts. They allow you to define certain pieces of code and re-use it whenever it is needed. Wesnoth provides you with a whole serie of standard preprocessors to make life more easy, but you yourself can define them too (again stuff for later). &lt;br /&gt;
Lets get back to this example! The preprocessors used here, describe how a day in this scenario should progress. This listing above is the normal day used throughout Wesnoth. If you want the entire scenario to take place at night, remove all the preprocessors except for '''{SECOND_WATCH}'''. This could be useful if you have Konrad&lt;br /&gt;
fighting the Undead and want the Undead to have the upper hand the whole time. Remember though, by setting this to a single tme of day and not the normal progress listed above, your scenario will effectively be taking place during one day or night, not many days as most scenarios are.&lt;br /&gt;
&lt;br /&gt;
The ''music'' key is a filename pointing to the music which plays. (See [[MusicListWML]] for more.)&lt;br /&gt;
This music file must be in the ''music/'' directory and '''must''' be in .ogg format.&lt;br /&gt;
&lt;br /&gt;
A tag you'll get to know very good when making scenarios shows up: '''[event]...[/event]'''.&lt;br /&gt;
Event tags are used to describe what should be done if an 'event' takes place. What this event is, is described by ''name''key. In this case we're describing the so-called 'prestart' event. This one takes place just ''before'' the game starts and just ''after'' all of the introductions screens were shown.&lt;br /&gt;
Here we have limited the contents of the tag to another important tag: '''[objectives]''' (plural) containing any number of '''[objective]''' (singular) tags.&lt;br /&gt;
For each '''[objective]''' (singular) tag, if ''condition'' is set to &amp;quot;win&amp;quot;, the text of ''description'' will be displayed in green after &amp;quot;Victory&amp;quot; in the Scenario Objectives. If ''condition'' is set to &amp;quot;lose&amp;quot;, the text of ''description'' will be displayed in red after &amp;quot;Defeat&amp;quot; in the Scenario Objectives. Because we've placed this tag inside a prestart event, this will be shown at the very first turn of the scenario.&lt;br /&gt;
The ''side'' key indicates that these conditions are for side 1 (see below).&lt;br /&gt;
The ' _ ' (underscore) facilitates translation using Gettext (see [[GetText]]).&lt;br /&gt;
&lt;br /&gt;
Note that ''ANY'' Victory or Defeat objective can be met to win or lose the scenario,&lt;br /&gt;
but a single Victory objective may have multiple parts.&lt;br /&gt;
Also note that the '''[objective]''' tag only describes what the objectives are. You will still need to set the appropiate events before they will work. (But that's again stuff for later)&lt;br /&gt;
&lt;br /&gt;
== Second part ==&lt;br /&gt;
So far so good! The last necessary part describes what the players (Human and&lt;br /&gt;
Computer) start with, what they can do and what they can't do. Each of the players is described in a '''[side]''' tag.&lt;br /&gt;
&lt;br /&gt;
 .  /\ &lt;br /&gt;
 .  ||&lt;br /&gt;
 .  continued from above&lt;br /&gt;
   [side]&lt;br /&gt;
     side=1&lt;br /&gt;
     controller=human&lt;br /&gt;
     team_name=2&lt;br /&gt;
     user_team_name= _ &amp;quot;Konrad's forces&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
     type=Commander&lt;br /&gt;
     description=Konrad&lt;br /&gt;
     canrecruit=1&lt;br /&gt;
 &lt;br /&gt;
     recruit=Elvish Fighter,Elvish Archer,Horseman,Mage,Elvish Shaman&lt;br /&gt;
 &lt;br /&gt;
     {GOLD 100 50 0}&lt;br /&gt;
     {INCOME 10 5 0}&lt;br /&gt;
   [/side] &lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
Above you can see a sample '''[side]''' for the human player, Konrad. We wll describe every key more in detail below:&lt;br /&gt;
* ''side'': the leader of this side is placed on the tile represented by this digit (see [[BuildingMaps]]) It's a number from 1 to 9.&lt;br /&gt;
* ''controller'': possible values are 'human' or 'ai' (artificial intelligence, meaning your computer). If you don't specify this key, 'ai' is used as the default.&lt;br /&gt;
* ''team_name'' describes which team the side is on. It defaults to the same number as ''side'', so setting it to ''2'' allies this side with side 2, if you haven't changed the team_name of side 2.&lt;br /&gt;
* ''user_team_name'' is the name displayed when you view the sie stats (by pressing alt+s during gameplay). The underscore facilitates translation using GetText (see [[GetText]]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next set of keys describe the leader of this side:&lt;br /&gt;
* ''canrecruit'': This key can be '1' or '0', meaning &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot; respectively. If you no, then the leader won't be able to recruit. (Not much of a leader then, is he?) Any team without a canrecruit=1 unit automatically loses, so be sure to use this key.&lt;br /&gt;
* ''type'' describes what type of unit the leader will be. The possible  values are listed here: [[UnitTables]].&lt;br /&gt;
* ''description'' is the name and description of the leader.&lt;br /&gt;
In a campaign, all of these 'leader-describing' keys are ignored for the human player (except ''canrecruit''), since the leader from the previous scenario is used instead. However, the ''type'' key is still neccesary to prevent the scenario from crashing.&lt;br /&gt;
&lt;br /&gt;
* ''recruit'' is a comma-separated list of types of units. The possible values are listed in [[UnitTables]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then two more preprocessors are used:&lt;br /&gt;
* '''{GOLD easy normal hard}''' takes 3 positive numbers. These indicate the amount of money the player will start with on the EASY, NORMAL and HARD difficulty level.&lt;br /&gt;
In a campaign file, inside a human controlled side (''controller=human''), this is the minimum amount.  The actual amount the player gets ca, be larger if the player retained more from previous scenarios.&lt;br /&gt;
* '''{INCOME easy normal hard}''' is similar, but indicates the base income.&lt;br /&gt;
The defaults for each of these values are 100 gold and 2 base income.&lt;br /&gt;
&lt;br /&gt;
== Making it all work ==&lt;br /&gt;
Now, to make this scenario playable, we need to make a campaign for it. (see [[BuildingCampaignsTheCampaignFile]])&lt;br /&gt;
This should NOT be stored inside the main directory '''data/campaigns''' but inside '''userdata/data/campaigns'''. This prevents breaking the mainline campaigns or even worse, the entire game. (see [[BuildingCampaignsDirectoryStructure]])&lt;br /&gt;
Note: All files, the campaign file and the scenario file, one for each scenario level, must be saved with the ending .cfg (for example: testcampaign.cfg).&lt;br /&gt;
This is a short example on how to do this:&lt;br /&gt;
&lt;br /&gt;
 [campaign]&lt;br /&gt;
   name= _ &amp;quot;Test Campaign&amp;quot;&lt;br /&gt;
   first_scenario=test-1&lt;br /&gt;
   difficulties=EASY,NORMAL,HARD&lt;br /&gt;
 &lt;br /&gt;
   difficulty_descriptions= _ &amp;quot;&amp;amp;elvish-fighter.png=Easy;*&amp;amp;elvish-hero.png=Medium;&amp;amp;elvish-champion.png=Hard&amp;quot;&lt;br /&gt;
   icon=elvish-fighter.png&lt;br /&gt;
 [/campaign]&lt;br /&gt;
&lt;br /&gt;
Campaigns are described in the '''[campaign]''' tag. The first key is ''name'', which is&lt;br /&gt;
displayed on the campaign selector box. The second key is ''first_scenario'', which is&lt;br /&gt;
the ID of the first scenario of the campaign. Scenarios following after this one are referenced inside the first scenario using ''next_scenario'' (see above).&lt;br /&gt;
&lt;br /&gt;
The key '''difficulties=EASY,NORMAL,HARD''' tells the computer to set the macro '''EASY''' if the first difficulty choice is chosen, '''NORMAL''' if the second is chosen, and '''HARD''' if the third is chosen.&lt;br /&gt;
The expression '''#ifdef''' can be used later to test these macros. (see [[PreprocessorRef]])&lt;br /&gt;
It is recommended that you do not use other names than '''EASY''', '''NORMAL''', and '''HARD''' for your macros, because if you do then the standard macros, such as '''{GOLD}''' and '''{INCOME}''', won't work properly.&lt;br /&gt;
&lt;br /&gt;
Two optional keys are ''difficulty_descriptions'' and ''icon''.&lt;br /&gt;
''icon'' has value equal to an image, displayed inside the campaign list.&lt;br /&gt;
''difficulty_descriptions'' must have the same number of inputs as  '''difficulties''', most commonly three, separated by semicolons.&lt;br /&gt;
These inputs then map on to the difficulties, so that if you have set difficulties to:&lt;br /&gt;
 &amp;quot;difficulties=EASY,NORMAL,HARD&amp;quot;&lt;br /&gt;
the first input will specify the display on EASY, the second on NORMAL and the third on HARD.&lt;br /&gt;
Each difficulty display description starts opens with an ampersand (''&amp;amp;''), then the image to display (eg ''elvish-fighter.png''),&lt;br /&gt;
then an equals (''='') sign, then the text to display (eg ''Easy'').&lt;br /&gt;
Optionally you can place an asterisk (''*'') before one of the ampersands, and the corresponding difficulty will be selected by default (here NORMAL is default).&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[BuildingMaps]] &amp;amp; [[WesnothMapEditor]]&lt;br /&gt;
* [[ScenarioWML]] &amp;amp; [[SyntaxWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosIntermediate&amp;diff=16119</id>
		<title>BuildingScenariosIntermediate</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosIntermediate&amp;diff=16119"/>
		<updated>2007-06-27T20:30:03Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Building scenarios: Intermediate */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;----&lt;br /&gt;
{| style=&amp;quot;float:right&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
__TOC__&lt;br /&gt;
|}&lt;br /&gt;
==== Quick Navigation: ====&lt;br /&gt;
[[BuildingScenarios]] &lt;br /&gt;
:'''[[BuildingScenariosSimple]]''' - [[BuildingScenariosIntermediate]] - [[BuildingScenariosAdvanced]]&lt;br /&gt;
:[[BuildingScenariosWML]]&lt;br /&gt;
:[[BuildingScenariosComments]]&lt;br /&gt;
:[[BuildingScenariosSamples]] &lt;br /&gt;
:[[BuildingScenariosFAQ]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Intermediate =&lt;br /&gt;
In this tutorial we will dig somewhat deeper into the secrets of WML and scenario building: events, explaining the use of some special attributes, setting up somewhat more advanced sides, ...&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
You can trigger certain actions that occur during a scenario using the events mechanism. Let us look at an example of a simple event. Suppose you wanted Konrad to say &amp;quot;it's getting cold&amp;quot; when he moves to the location (4,8):&lt;br /&gt;
&lt;br /&gt;
  [event]&lt;br /&gt;
    name=moveto&lt;br /&gt;
    [filter]&lt;br /&gt;
      description=Konrad&lt;br /&gt;
      x=4&lt;br /&gt;
      y=8&lt;br /&gt;
     [/filter]&lt;br /&gt;
     [message]&lt;br /&gt;
       description=Konrad&lt;br /&gt;
       message= _ &amp;quot;It's getting cold&amp;quot;&lt;br /&gt;
     [/message]&lt;br /&gt;
  [/event]&lt;br /&gt;
&lt;br /&gt;
First you have the name of the event.&lt;br /&gt;
Here, we have a 'moveto' event, meaning it is fired every time a unit moves somewhere.&lt;br /&gt;
For a list of the different possible event names, see [[EventWML]]&lt;br /&gt;
&lt;br /&gt;
Of course, we don't want this to be fired every single time some unit moves somewhere! So, we use the '''[filter]''' tag to filter out what kind of moveto event we want.&lt;br /&gt;
How filters are used is described in [[FilterWML]].&lt;br /&gt;
&lt;br /&gt;
== Special attributes ==&lt;br /&gt;
&lt;br /&gt;
Note that generally, a set of actions is triggered only once.&lt;br /&gt;
You can make a set of actions be triggered every time the event occurs&lt;br /&gt;
by adding the attribute '''first_time_only=no''' in the event.&lt;br /&gt;
&lt;br /&gt;
Also, whenever an event is triggered, the player cannot undo the move, even if it was a moveto event. We could make a scenario where moves cannot be undone by adding the event&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
   name=moveto&lt;br /&gt;
   first_time_only=no&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
(which would not do anything, but would prevent the player from undoing moves)&lt;br /&gt;
&lt;br /&gt;
The event:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
   name=enemies defeated&lt;br /&gt;
   [endlevel]&lt;br /&gt;
     result=victory&lt;br /&gt;
     bonus=yes&lt;br /&gt;
   [/endlevel]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
is an implied trigger and appears automatically at the end of each scenario.&lt;br /&gt;
To prevent this event, add the attribute '''victory_when_enemies_defeated=no''' inside the main tag (usually [scenario]).&lt;br /&gt;
&lt;br /&gt;
The attribute '''disallow_recall=yes''' prevents the player from recalling units in this scenario.&lt;br /&gt;
&lt;br /&gt;
The attributes '''fog=yes''' and '''shroud=yes''' can be put in a '''[side]''' tag to make that side have fog of war/shroud. (Fog of war prevents seeing all enemy movement, shroud prevents seeing all of the map.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Sides ==&lt;br /&gt;
&lt;br /&gt;
Ok, so as you have seen in [[BuildingScenariosSimple]], you can setup what the human player and AI player start with, and some simple options for controlling how the AI works. From the '''[side]''' tag listed below you can see we are going to learn some more interesting things that can be controlled from there. I'm not going to explain all the keys, just the new ones.&lt;br /&gt;
&lt;br /&gt;
 [scenario]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 &lt;br /&gt;
   [side]&lt;br /&gt;
     type=Lich&lt;br /&gt;
     description=Galga&lt;br /&gt;
     side=2&lt;br /&gt;
     canrecruit=1&lt;br /&gt;
 &lt;br /&gt;
     #ifdef EASY&lt;br /&gt;
      recruit=Skeleton,Revenant,Blood Bat,Ghost,Bone Shooter&lt;br /&gt;
      recruitment_pattern=fighter,fighter,archer,scout&lt;br /&gt;
      gold=300&lt;br /&gt;
     #endif&lt;br /&gt;
 &lt;br /&gt;
     #ifdef NORMAL&lt;br /&gt;
      recruit=Skeleton,Revenant,Chocobone,Blood Bat,Wraith,Bone Shooter,Dark Adept &lt;br /&gt;
      recruitment_pattern=fighter,fighter,archer,scout&lt;br /&gt;
      gold=500&lt;br /&gt;
     #endif&lt;br /&gt;
 &lt;br /&gt;
     #ifdef HARD&lt;br /&gt;
      recruit=Skeleton,Revenant,Chocobone,Wraith,Bone Shooter,Dark Adept&lt;br /&gt;
      recruitment_pattern=fighter,fighter,archer,scout&lt;br /&gt;
      gold=700&lt;br /&gt;
     #endif&lt;br /&gt;
 &lt;br /&gt;
     aggression=1.0&lt;br /&gt;
     village_value=0.0&lt;br /&gt;
     leader_value=50.0&lt;br /&gt;
     enemy=1&lt;br /&gt;
   [/side]&lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
As you can see from the above listing, the '''[side]''' tag can get a little complex. &lt;br /&gt;
The '''#ifdef''' is relatively simple to understand. If the user is playing EASY then everything between '''#ifdef EASY''' and '''#endif''' is set and the others are ignored. If the user is playing NORMAL then everything between '''#ifdef NORMAL''' and '''#endif''' is set and the others are ignored. Finally if the user is playing HARD then everything between '''#ifdef HARD''' and '''#endif''' is set and the others are ignored. This allows a scenario to be configured differently for each level of gameplay the user may choose. There are also two new keys listed, '''village_value''' and '''leader_value'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lets get into some more interesting stuff. The map files hold the ground tiles. This is the very bottom layer of things. The units walking around during a game are on the very top layer. This is all well and good, but wouldn't it be nice to be able to place some unique items on the map? What if you wanted to place a building, or a potion, or anything somewhere in your scenario? Well you can! Using the '''[item]''' tag:&lt;br /&gt;
&lt;br /&gt;
 [scenario]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 &lt;br /&gt;
   [item]&lt;br /&gt;
     x=31&lt;br /&gt;
     y=43&lt;br /&gt;
     image=item-holywater.png &lt;br /&gt;
   [/item]&lt;br /&gt;
 &lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
The '''[item]''' tag is actually very simple to use, as you can see from above. There are three keys, the first two are '''x''' and '''y'''. They are the location on the map. The third key is '''image'''. This it the image file to place in that location. This image must be located in the images directory. Ok, that was simple wasn't it?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you have enough information to make some interesting looking scenarios with tuned AI players. This is a big step. Next we are going to learn how to make your newly created scenario fit nicely into a campaign. This involves making the intro shown before the scenario is played a bit more descriptive. This is all done from within the '''[story]''' tag.&lt;br /&gt;
&lt;br /&gt;
 [scenario]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 &lt;br /&gt;
   [story]&lt;br /&gt;
     [part]&lt;br /&gt;
       story= _ &amp;quot;... but one of the Orcs survived long enough to send the news to the queen...&amp;quot; &lt;br /&gt;
       image=misc/story6.png&lt;br /&gt;
     [/part]&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
     . &lt;br /&gt;
   [/story]&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 . &lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
The story tag contains the story told before the player starts the scenario. You can ommit this, then you will skip the introductionary screens. A story tag exists out of parts (inside [part] tags). Each part can contain several keys describing what content it has got. See [[IntroWML]] for more information.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[ScenarioWML]] &amp;amp; [[SyntaxWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosSimple&amp;diff=16118</id>
		<title>BuildingScenariosSimple</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosSimple&amp;diff=16118"/>
		<updated>2007-06-27T20:02:26Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Quick Navigation: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;----&lt;br /&gt;
{| style=&amp;quot;float:right&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
__TOC__&lt;br /&gt;
|}&lt;br /&gt;
==== Quick Navigation ====&lt;br /&gt;
[[BuildingScenarios]] &lt;br /&gt;
:'''[[BuildingScenariosSimple]]''' - [[BuildingScenariosIntermediate]] - [[BuildingScenariosAdvanced]]&lt;br /&gt;
:[[BuildingScenariosWML]]&lt;br /&gt;
:[[BuildingScenariosSamples]] &lt;br /&gt;
:[[BuildingScenariosFAQ]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Simple =&lt;br /&gt;
&lt;br /&gt;
This will show you a very simple scenario file, explaining each line of it.&lt;br /&gt;
The file is not fully functional, but it will show the basics needed to describe what a scenario is all about.&lt;br /&gt;
&lt;br /&gt;
'''Before reading this, it might prove usefull to read something about the syntax used in the Wesnoth Markup Language: [[SyntaxWML]]'''&lt;br /&gt;
&lt;br /&gt;
== First part ==&lt;br /&gt;
 [scenario]&lt;br /&gt;
 &lt;br /&gt;
   id=test-1&lt;br /&gt;
   next_scenario=2_test-more&lt;br /&gt;
 &lt;br /&gt;
   name=A Simple Test Scenario&lt;br /&gt;
   map_data=&amp;quot;{campaigns/Test_Campaign/testmap}{~campaigns/Test_Campaign/testmap}&amp;quot;&lt;br /&gt;
   turns=20&lt;br /&gt;
 &lt;br /&gt;
   {DAWN}&lt;br /&gt;
   {MORNING}&lt;br /&gt;
   {AFTERNOON}&lt;br /&gt;
   {DUSK}&lt;br /&gt;
   {FIRST_WATCH}&lt;br /&gt;
   {SECOND_WATCH}&lt;br /&gt;
 &lt;br /&gt;
   music=wesnoth-1.ogg&lt;br /&gt;
 &lt;br /&gt;
   [event]&lt;br /&gt;
     name=prestart&lt;br /&gt;
     [objectives]&lt;br /&gt;
       side=1&lt;br /&gt;
       [objective]&lt;br /&gt;
         description= _ &amp;quot;Defeat Enemy Leader&amp;quot;&lt;br /&gt;
         condition=win&lt;br /&gt;
       [/objective]&lt;br /&gt;
       [objective]&lt;br /&gt;
         description= _ &amp;quot;Death of Konrad&amp;quot;&lt;br /&gt;
         condition=lose&lt;br /&gt;
       [/objective]&lt;br /&gt;
     [/objectives]&lt;br /&gt;
   [/event]&lt;br /&gt;
 .  continued below&lt;br /&gt;
 .  ||&lt;br /&gt;
 .  \/&lt;br /&gt;
 &lt;br /&gt;
Every scenario must be enclosed in a tag;&lt;br /&gt;
the '''[scenario]''' tag is used for campaign scenarios.&lt;br /&gt;
The first set of keys in the scenario tag&lt;br /&gt;
describe the very basics of this scenario:&lt;br /&gt;
* The ''id'' (short for ''identifier'') is the computer's name for your scenario, and is not displayed during the game. However, it will be used to display game statistics (they will be graphed on http://stats.wesnoth.org in numerical order, so it's also a good idea to give the id's a number). This name is also used as reference in other tags and files, eg inside a '''[campaign]''' tag using the ''first_scenario'' key(see [[BuildingCampaignsTheCampaignFile]]) or inside a '''[scenario]''' tag using the ''next_scenario'' key (see below).&lt;br /&gt;
&lt;br /&gt;
* The value of the ''next_scenario'' key is the id (see above) of the scenario that is played after this one is won. Units from this scenario will be available for recall (unless you modify the recall list, but that's stuff for later). If your scenario is not part of a campaign, or if this is the last scenario you should either skip this line or put '''next_scenario=null''' inside the file. This will tell the game to display the End screen when this scenario is won.&lt;br /&gt;
&lt;br /&gt;
* The value of the ''name'' key is shown on the introduction screen before each scenario is played. (This can contain a picture of a map, or anything else you fancy. See [[BuildingScenariosIntermediate]] for an explenation on how to do that.) It's also the default name for saves on the level.&lt;br /&gt;
&lt;br /&gt;
* The next key, ''map_data'', is a link to the map file. You can create map files using the Wesnoth Map Editor (see [[WesnothMapEditor]] and [[BuildingMaps]] for more information). Since we may not know exactly where this campaign will be located we'll write two possible locations of the map file. The quotes are necessary because Wesnoth map data takes up multiple lines, so quotes are used to indicate where the data begins and ends. If you don't do this, it will break the scenario.&lt;br /&gt;
&lt;br /&gt;
* Finally, the last key in the top set of keys is ''turns''. This is the amount of turns a player is given to finish the scenario. (It can be changed during the game, but again, that is stuff for later.) When the player fails to finish the secnario in the given time, he has lost. (Said otherwise: the ''defeat'' event is trigered. See [[EventWML]] for more.)&lt;br /&gt;
&lt;br /&gt;
The next section is a set of preprocessors (see [[PreprocessorRef]]). Preprocessors are essentially WML shortcuts. They allow you to define certain pieces of code and re-use it whenever it is needed. Wesnoth provides you with a whole serie of standard preprocessors to make life more easy, but you yourself can define them too (again stuff for later). &lt;br /&gt;
Lets get back to this example! The preprocessors used here, describe how a day in this scenario should progress. This listing above is the normal day used throughout Wesnoth. If you want the entire scenario to take place at night, remove all the preprocessors except for '''{SECOND_WATCH}'''. This could be useful if you have Konrad&lt;br /&gt;
fighting the Undead and want the Undead to have the upper hand the whole time. Remember though, by setting this to a single tme of day and not the normal progress listed above, your scenario will effectively be taking place during one day or night, not many days as most scenarios are.&lt;br /&gt;
&lt;br /&gt;
The ''music'' key is a filename pointing to the music which plays. (See [[MusicListWML]] for more.)&lt;br /&gt;
This music file must be in the ''music/'' directory and '''must''' be in .ogg format.&lt;br /&gt;
&lt;br /&gt;
A tag you'll get to know very good when making scenarios shows up: '''[event]...[/event]'''.&lt;br /&gt;
Event tags are used to describe what should be done if an 'event' takes place. What this event is, is described by ''name''key. In this case we're describing the so-called 'prestart' event. This one takes place just ''before'' the game starts and just ''after'' all of the introductions screens were shown.&lt;br /&gt;
Here we have limited the contents of the tag to another important tag: '''[objectives]''' (plural) containing any number of '''[objective]''' (singular) tags.&lt;br /&gt;
For each '''[objective]''' (singular) tag, if ''condition'' is set to &amp;quot;win&amp;quot;, the text of ''description'' will be displayed in green after &amp;quot;Victory&amp;quot; in the Scenario Objectives. If ''condition'' is set to &amp;quot;lose&amp;quot;, the text of ''description'' will be displayed in red after &amp;quot;Defeat&amp;quot; in the Scenario Objectives. Because we've placed this tag inside a prestart event, this will be shown at the very first turn of the scenario.&lt;br /&gt;
The ''side'' key indicates that these conditions are for side 1 (see below).&lt;br /&gt;
The ' _ ' (underscore) facilitates translation using Gettext (see [[GetText]]).&lt;br /&gt;
&lt;br /&gt;
Note that ''ANY'' Victory or Defeat objective can be met to win or lose the scenario,&lt;br /&gt;
but a single Victory objective may have multiple parts.&lt;br /&gt;
Also note that the '''[objective]''' tag only describes what the objectives are. You will still need to set the appropiate events before they will work. (But that's again stuff for later)&lt;br /&gt;
&lt;br /&gt;
== Second part ==&lt;br /&gt;
So far so good! The last necessary part describes what the players (Human and&lt;br /&gt;
Computer) start with, what they can do and what they can't do. Each of the players is described in a '''[side]''' tag.&lt;br /&gt;
&lt;br /&gt;
 .  /\ &lt;br /&gt;
 .  ||&lt;br /&gt;
 .  continued from above&lt;br /&gt;
   [side]&lt;br /&gt;
     side=1&lt;br /&gt;
     controller=human&lt;br /&gt;
     team_name=2&lt;br /&gt;
     user_team_name= _ &amp;quot;Konrad's forces&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
     type=Commander&lt;br /&gt;
     description=Konrad&lt;br /&gt;
     canrecruit=1&lt;br /&gt;
 &lt;br /&gt;
     recruit=Elvish Fighter,Elvish Archer,Horseman,Mage,Elvish Shaman&lt;br /&gt;
 &lt;br /&gt;
     {GOLD 100 50 0}&lt;br /&gt;
     {INCOME 10 5 0}&lt;br /&gt;
   [/side] &lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
Above you can see a sample '''[side]''' for the human player, Konrad. We wll describe every key more in detail below:&lt;br /&gt;
* ''side'': the leader of this side is placed on the tile represented by this digit (see [[BuildingMaps]]) It's a number from 1 to 9.&lt;br /&gt;
* ''controller'': possible values are 'human' or 'ai' (artificial intelligence, meaning your computer). If you don't specify this key, 'ai' is used as the default.&lt;br /&gt;
* ''team_name'' describes which team the side is on. It defaults to the same number as ''side'', so setting it to ''2'' allies this side with side 2, if you haven't changed the team_name of side 2.&lt;br /&gt;
* ''user_team_name'' is the name displayed when you view the sie stats (by pressing alt+s during gameplay). The underscore facilitates translation using GetText (see [[GetText]]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next set of keys describe the leader of this side:&lt;br /&gt;
* ''canrecruit'': This key can be '1' or '0', meaning &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot; respectively. If you no, then the leader won't be able to recruit. (Not much of a leader then, is he?) Any team without a canrecruit=1 unit automatically loses, so be sure to use this key.&lt;br /&gt;
* ''type'' describes what type of unit the leader will be. The possible  values are listed here: [[UnitTables]].&lt;br /&gt;
* ''description'' is the name and description of the leader.&lt;br /&gt;
In a campaign, all of these 'leader-describing' keys are ignored for the human player (except ''canrecruit''), since the leader from the previous scenario is used instead. However, the ''type'' key is still neccesary to prevent the scenario from crashing.&lt;br /&gt;
&lt;br /&gt;
* ''recruit'' is a comma-separated list of types of units. The possible values are listed in [[UnitTables]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then two more preprocessors are used:&lt;br /&gt;
* '''{GOLD easy normal hard}''' takes 3 positive numbers. These indicate the amount of money the player will start with on the EASY, NORMAL and HARD difficulty level.&lt;br /&gt;
In a campaign file, inside a human controlled side (''controller=human''), this is the minimum amount.  The actual amount the player gets ca, be larger if the player retained more from previous scenarios.&lt;br /&gt;
* '''{INCOME easy normal hard}''' is similar, but indicates the base income.&lt;br /&gt;
The defaults for each of these values are 100 gold and 2 base income.&lt;br /&gt;
&lt;br /&gt;
== Making it all work ==&lt;br /&gt;
Now, to make this scenario playable, we need to make a campaign for it. (see [[BuildingCampaignsTheCampaignFile]])&lt;br /&gt;
This should NOT be stored inside the main directory '''data/campaigns''' but inside '''userdata/data/campaigns'''. This prevents breaking the mainline campaigns or even worse, the entire game. (see [[BuildingCampaignsDirectoryStructure]])&lt;br /&gt;
Note: All files, the campaign file and the scenario file, one for each scenario level, must be saved with the ending .cfg (for example: testcampaign.cfg).&lt;br /&gt;
This is a short example on how to do this:&lt;br /&gt;
&lt;br /&gt;
 [campaign]&lt;br /&gt;
   name= _ &amp;quot;Test Campaign&amp;quot;&lt;br /&gt;
   first_scenario=test-1&lt;br /&gt;
   difficulties=EASY,NORMAL,HARD&lt;br /&gt;
 &lt;br /&gt;
   difficulty_descriptions= _ &amp;quot;&amp;amp;elvish-fighter.png=Easy;*&amp;amp;elvish-hero.png=Medium;&amp;amp;elvish-champion.png=Hard&amp;quot;&lt;br /&gt;
   icon=elvish-fighter.png&lt;br /&gt;
 [/campaign]&lt;br /&gt;
&lt;br /&gt;
Campaigns are described in the '''[campaign]''' tag. The first key is ''name'', which is&lt;br /&gt;
displayed on the campaign selector box. The second key is ''first_scenario'', which is&lt;br /&gt;
the ID of the first scenario of the campaign. Scenarios following after this one are referenced inside the first scenario using ''next_scenario'' (see above).&lt;br /&gt;
&lt;br /&gt;
The key '''difficulties=EASY,NORMAL,HARD''' tells the computer to set the macro '''EASY''' if the first difficulty choice is chosen, '''NORMAL''' if the second is chosen, and '''HARD''' if the third is chosen.&lt;br /&gt;
The expression '''#ifdef''' can be used later to test these macros. (see [[PreprocessorRef]])&lt;br /&gt;
It is recommended that you do not use other names than '''EASY''', '''NORMAL''', and '''HARD''' for your macros, because if you do then the standard macros, such as '''{GOLD}''' and '''{INCOME}''', won't work properly.&lt;br /&gt;
&lt;br /&gt;
Two optional keys are ''difficulty_descriptions'' and ''icon''.&lt;br /&gt;
''icon'' has value equal to an image, displayed inside the campaign list.&lt;br /&gt;
''difficulty_descriptions'' must have the same number of inputs as  '''difficulties''', most commonly three, separated by semicolons.&lt;br /&gt;
These inputs then map on to the difficulties, so that if you have set difficulties to:&lt;br /&gt;
 &amp;quot;difficulties=EASY,NORMAL,HARD&amp;quot;&lt;br /&gt;
the first input will specify the display on EASY, the second on NORMAL and the third on HARD.&lt;br /&gt;
Each difficulty display description starts opens with an ampersand (''&amp;amp;''), then the image to display (eg ''elvish-fighter.png''),&lt;br /&gt;
then an equals (''='') sign, then the text to display (eg ''Easy'').&lt;br /&gt;
Optionally you can place an asterisk (''*'') before one of the ampersands, and the corresponding difficulty will be selected by default (here NORMAL is default).&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[BuildingMaps]] &amp;amp; [[WesnothMapEditor]]&lt;br /&gt;
* [[ScenarioWML]] &amp;amp; [[SyntaxWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosSimple&amp;diff=16117</id>
		<title>BuildingScenariosSimple</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosSimple&amp;diff=16117"/>
		<updated>2007-06-27T19:59:38Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;----&lt;br /&gt;
{| style=&amp;quot;float:right&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
__TOC__&lt;br /&gt;
|}&lt;br /&gt;
==== Quick Navigation: ====&lt;br /&gt;
[[BuildingScenarios]] &lt;br /&gt;
:'''[[BuildingScenariosSimple]]''' - [[BuildingScenariosIntermediate]] - [[BuildingScenariosAdvanced]]&lt;br /&gt;
:[[BuildingScenariosWML]]&lt;br /&gt;
:[[BuildingScenariosSamples]] &lt;br /&gt;
:[[BuildingScenariosFAQ]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Simple =&lt;br /&gt;
&lt;br /&gt;
This will show you a very simple scenario file, explaining each line of it.&lt;br /&gt;
The file is not fully functional, but it will show the basics needed to describe what a scenario is all about.&lt;br /&gt;
&lt;br /&gt;
'''Before reading this, it might prove usefull to read something about the syntax used in the Wesnoth Markup Language: [[SyntaxWML]]'''&lt;br /&gt;
&lt;br /&gt;
== First part ==&lt;br /&gt;
 [scenario]&lt;br /&gt;
 &lt;br /&gt;
   id=test-1&lt;br /&gt;
   next_scenario=2_test-more&lt;br /&gt;
 &lt;br /&gt;
   name=A Simple Test Scenario&lt;br /&gt;
   map_data=&amp;quot;{campaigns/Test_Campaign/testmap}{~campaigns/Test_Campaign/testmap}&amp;quot;&lt;br /&gt;
   turns=20&lt;br /&gt;
 &lt;br /&gt;
   {DAWN}&lt;br /&gt;
   {MORNING}&lt;br /&gt;
   {AFTERNOON}&lt;br /&gt;
   {DUSK}&lt;br /&gt;
   {FIRST_WATCH}&lt;br /&gt;
   {SECOND_WATCH}&lt;br /&gt;
 &lt;br /&gt;
   music=wesnoth-1.ogg&lt;br /&gt;
 &lt;br /&gt;
   [event]&lt;br /&gt;
     name=prestart&lt;br /&gt;
     [objectives]&lt;br /&gt;
       side=1&lt;br /&gt;
       [objective]&lt;br /&gt;
         description= _ &amp;quot;Defeat Enemy Leader&amp;quot;&lt;br /&gt;
         condition=win&lt;br /&gt;
       [/objective]&lt;br /&gt;
       [objective]&lt;br /&gt;
         description= _ &amp;quot;Death of Konrad&amp;quot;&lt;br /&gt;
         condition=lose&lt;br /&gt;
       [/objective]&lt;br /&gt;
     [/objectives]&lt;br /&gt;
   [/event]&lt;br /&gt;
 .  continued below&lt;br /&gt;
 .  ||&lt;br /&gt;
 .  \/&lt;br /&gt;
 &lt;br /&gt;
Every scenario must be enclosed in a tag;&lt;br /&gt;
the '''[scenario]''' tag is used for campaign scenarios.&lt;br /&gt;
The first set of keys in the scenario tag&lt;br /&gt;
describe the very basics of this scenario:&lt;br /&gt;
* The ''id'' (short for ''identifier'') is the computer's name for your scenario, and is not displayed during the game. However, it will be used to display game statistics (they will be graphed on http://stats.wesnoth.org in numerical order, so it's also a good idea to give the id's a number). This name is also used as reference in other tags and files, eg inside a '''[campaign]''' tag using the ''first_scenario'' key(see [[BuildingCampaignsTheCampaignFile]]) or inside a '''[scenario]''' tag using the ''next_scenario'' key (see below).&lt;br /&gt;
&lt;br /&gt;
* The value of the ''next_scenario'' key is the id (see above) of the scenario that is played after this one is won. Units from this scenario will be available for recall (unless you modify the recall list, but that's stuff for later). If your scenario is not part of a campaign, or if this is the last scenario you should either skip this line or put '''next_scenario=null''' inside the file. This will tell the game to display the End screen when this scenario is won.&lt;br /&gt;
&lt;br /&gt;
* The value of the ''name'' key is shown on the introduction screen before each scenario is played. (This can contain a picture of a map, or anything else you fancy. See [[BuildingScenariosIntermediate]] for an explenation on how to do that.) It's also the default name for saves on the level.&lt;br /&gt;
&lt;br /&gt;
* The next key, ''map_data'', is a link to the map file. You can create map files using the Wesnoth Map Editor (see [[WesnothMapEditor]] and [[BuildingMaps]] for more information). Since we may not know exactly where this campaign will be located we'll write two possible locations of the map file. The quotes are necessary because Wesnoth map data takes up multiple lines, so quotes are used to indicate where the data begins and ends. If you don't do this, it will break the scenario.&lt;br /&gt;
&lt;br /&gt;
* Finally, the last key in the top set of keys is ''turns''. This is the amount of turns a player is given to finish the scenario. (It can be changed during the game, but again, that is stuff for later.) When the player fails to finish the secnario in the given time, he has lost. (Said otherwise: the ''defeat'' event is trigered. See [[EventWML]] for more.)&lt;br /&gt;
&lt;br /&gt;
The next section is a set of preprocessors (see [[PreprocessorRef]]). Preprocessors are essentially WML shortcuts. They allow you to define certain pieces of code and re-use it whenever it is needed. Wesnoth provides you with a whole serie of standard preprocessors to make life more easy, but you yourself can define them too (again stuff for later). &lt;br /&gt;
Lets get back to this example! The preprocessors used here, describe how a day in this scenario should progress. This listing above is the normal day used throughout Wesnoth. If you want the entire scenario to take place at night, remove all the preprocessors except for '''{SECOND_WATCH}'''. This could be useful if you have Konrad&lt;br /&gt;
fighting the Undead and want the Undead to have the upper hand the whole time. Remember though, by setting this to a single tme of day and not the normal progress listed above, your scenario will effectively be taking place during one day or night, not many days as most scenarios are.&lt;br /&gt;
&lt;br /&gt;
The ''music'' key is a filename pointing to the music which plays. (See [[MusicListWML]] for more.)&lt;br /&gt;
This music file must be in the ''music/'' directory and '''must''' be in .ogg format.&lt;br /&gt;
&lt;br /&gt;
A tag you'll get to know very good when making scenarios shows up: '''[event]...[/event]'''.&lt;br /&gt;
Event tags are used to describe what should be done if an 'event' takes place. What this event is, is described by ''name''key. In this case we're describing the so-called 'prestart' event. This one takes place just ''before'' the game starts and just ''after'' all of the introductions screens were shown.&lt;br /&gt;
Here we have limited the contents of the tag to another important tag: '''[objectives]''' (plural) containing any number of '''[objective]''' (singular) tags.&lt;br /&gt;
For each '''[objective]''' (singular) tag, if ''condition'' is set to &amp;quot;win&amp;quot;, the text of ''description'' will be displayed in green after &amp;quot;Victory&amp;quot; in the Scenario Objectives. If ''condition'' is set to &amp;quot;lose&amp;quot;, the text of ''description'' will be displayed in red after &amp;quot;Defeat&amp;quot; in the Scenario Objectives. Because we've placed this tag inside a prestart event, this will be shown at the very first turn of the scenario.&lt;br /&gt;
The ''side'' key indicates that these conditions are for side 1 (see below).&lt;br /&gt;
The ' _ ' (underscore) facilitates translation using Gettext (see [[GetText]]).&lt;br /&gt;
&lt;br /&gt;
Note that ''ANY'' Victory or Defeat objective can be met to win or lose the scenario,&lt;br /&gt;
but a single Victory objective may have multiple parts.&lt;br /&gt;
Also note that the '''[objective]''' tag only describes what the objectives are. You will still need to set the appropiate events before they will work. (But that's again stuff for later)&lt;br /&gt;
&lt;br /&gt;
== Second part ==&lt;br /&gt;
So far so good! The last necessary part describes what the players (Human and&lt;br /&gt;
Computer) start with, what they can do and what they can't do. Each of the players is described in a '''[side]''' tag.&lt;br /&gt;
&lt;br /&gt;
 .  /\ &lt;br /&gt;
 .  ||&lt;br /&gt;
 .  continued from above&lt;br /&gt;
   [side]&lt;br /&gt;
     side=1&lt;br /&gt;
     controller=human&lt;br /&gt;
     team_name=2&lt;br /&gt;
     user_team_name= _ &amp;quot;Konrad's forces&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
     type=Commander&lt;br /&gt;
     description=Konrad&lt;br /&gt;
     canrecruit=1&lt;br /&gt;
 &lt;br /&gt;
     recruit=Elvish Fighter,Elvish Archer,Horseman,Mage,Elvish Shaman&lt;br /&gt;
 &lt;br /&gt;
     {GOLD 100 50 0}&lt;br /&gt;
     {INCOME 10 5 0}&lt;br /&gt;
   [/side] &lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
Above you can see a sample '''[side]''' for the human player, Konrad. We wll describe every key more in detail below:&lt;br /&gt;
* ''side'': the leader of this side is placed on the tile represented by this digit (see [[BuildingMaps]]) It's a number from 1 to 9.&lt;br /&gt;
* ''controller'': possible values are 'human' or 'ai' (artificial intelligence, meaning your computer). If you don't specify this key, 'ai' is used as the default.&lt;br /&gt;
* ''team_name'' describes which team the side is on. It defaults to the same number as ''side'', so setting it to ''2'' allies this side with side 2, if you haven't changed the team_name of side 2.&lt;br /&gt;
* ''user_team_name'' is the name displayed when you view the sie stats (by pressing alt+s during gameplay). The underscore facilitates translation using GetText (see [[GetText]]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next set of keys describe the leader of this side:&lt;br /&gt;
* ''canrecruit'': This key can be '1' or '0', meaning &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot; respectively. If you no, then the leader won't be able to recruit. (Not much of a leader then, is he?) Any team without a canrecruit=1 unit automatically loses, so be sure to use this key.&lt;br /&gt;
* ''type'' describes what type of unit the leader will be. The possible  values are listed here: [[UnitTables]].&lt;br /&gt;
* ''description'' is the name and description of the leader.&lt;br /&gt;
In a campaign, all of these 'leader-describing' keys are ignored for the human player (except ''canrecruit''), since the leader from the previous scenario is used instead. However, the ''type'' key is still neccesary to prevent the scenario from crashing.&lt;br /&gt;
&lt;br /&gt;
* ''recruit'' is a comma-separated list of types of units. The possible values are listed in [[UnitTables]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then two more preprocessors are used:&lt;br /&gt;
* '''{GOLD easy normal hard}''' takes 3 positive numbers. These indicate the amount of money the player will start with on the EASY, NORMAL and HARD difficulty level.&lt;br /&gt;
In a campaign file, inside a human controlled side (''controller=human''), this is the minimum amount.  The actual amount the player gets ca, be larger if the player retained more from previous scenarios.&lt;br /&gt;
* '''{INCOME easy normal hard}''' is similar, but indicates the base income.&lt;br /&gt;
The defaults for each of these values are 100 gold and 2 base income.&lt;br /&gt;
&lt;br /&gt;
== Making it all work ==&lt;br /&gt;
Now, to make this scenario playable, we need to make a campaign for it. (see [[BuildingCampaignsTheCampaignFile]])&lt;br /&gt;
This should NOT be stored inside the main directory '''data/campaigns''' but inside '''userdata/data/campaigns'''. This prevents breaking the mainline campaigns or even worse, the entire game. (see [[BuildingCampaignsDirectoryStructure]])&lt;br /&gt;
Note: All files, the campaign file and the scenario file, one for each scenario level, must be saved with the ending .cfg (for example: testcampaign.cfg).&lt;br /&gt;
This is a short example on how to do this:&lt;br /&gt;
&lt;br /&gt;
 [campaign]&lt;br /&gt;
   name= _ &amp;quot;Test Campaign&amp;quot;&lt;br /&gt;
   first_scenario=test-1&lt;br /&gt;
   difficulties=EASY,NORMAL,HARD&lt;br /&gt;
 &lt;br /&gt;
   difficulty_descriptions= _ &amp;quot;&amp;amp;elvish-fighter.png=Easy;*&amp;amp;elvish-hero.png=Medium;&amp;amp;elvish-champion.png=Hard&amp;quot;&lt;br /&gt;
   icon=elvish-fighter.png&lt;br /&gt;
 [/campaign]&lt;br /&gt;
&lt;br /&gt;
Campaigns are described in the '''[campaign]''' tag. The first key is ''name'', which is&lt;br /&gt;
displayed on the campaign selector box. The second key is ''first_scenario'', which is&lt;br /&gt;
the ID of the first scenario of the campaign. Scenarios following after this one are referenced inside the first scenario using ''next_scenario'' (see above).&lt;br /&gt;
&lt;br /&gt;
The key '''difficulties=EASY,NORMAL,HARD''' tells the computer to set the macro '''EASY''' if the first difficulty choice is chosen, '''NORMAL''' if the second is chosen, and '''HARD''' if the third is chosen.&lt;br /&gt;
The expression '''#ifdef''' can be used later to test these macros. (see [[PreprocessorRef]])&lt;br /&gt;
It is recommended that you do not use other names than '''EASY''', '''NORMAL''', and '''HARD''' for your macros, because if you do then the standard macros, such as '''{GOLD}''' and '''{INCOME}''', won't work properly.&lt;br /&gt;
&lt;br /&gt;
Two optional keys are ''difficulty_descriptions'' and ''icon''.&lt;br /&gt;
''icon'' has value equal to an image, displayed inside the campaign list.&lt;br /&gt;
''difficulty_descriptions'' must have the same number of inputs as  '''difficulties''', most commonly three, separated by semicolons.&lt;br /&gt;
These inputs then map on to the difficulties, so that if you have set difficulties to:&lt;br /&gt;
 &amp;quot;difficulties=EASY,NORMAL,HARD&amp;quot;&lt;br /&gt;
the first input will specify the display on EASY, the second on NORMAL and the third on HARD.&lt;br /&gt;
Each difficulty display description starts opens with an ampersand (''&amp;amp;''), then the image to display (eg ''elvish-fighter.png''),&lt;br /&gt;
then an equals (''='') sign, then the text to display (eg ''Easy'').&lt;br /&gt;
Optionally you can place an asterisk (''*'') before one of the ampersands, and the corresponding difficulty will be selected by default (here NORMAL is default).&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[BuildingMaps]] &amp;amp; [[WesnothMapEditor]]&lt;br /&gt;
* [[ScenarioWML]] &amp;amp; [[SyntaxWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=BuildingScenariosSimple&amp;diff=16115</id>
		<title>BuildingScenariosSimple</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=BuildingScenariosSimple&amp;diff=16115"/>
		<updated>2007-06-27T19:26:28Z</updated>

		<summary type="html">&lt;p&gt;Mathijs: /* Building scenarios: Simple */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;table width=100% border=0&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[[BuildingScenarios]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[[BuildingScenariosWML]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[[BuildingScenariosSimple]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[[BuildingScenariosIntermediate]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[[BuildingScenariosAdvanced]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[[BuildingScenariosComments]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[[BuildingScenariosSamples]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[[BuildingScenariosFAQ]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Building scenarios: Simple =&lt;br /&gt;
&lt;br /&gt;
This will show you a very simple scenario file, explaining each line of it.&lt;br /&gt;
The file is not fully functional, but it will show the basics needed to describe what a scenario is all about.&lt;br /&gt;
&lt;br /&gt;
'''Before reading this, it might prove usefull to read something about the syntax used in the Wesnoth Markup Language: [[SyntaxWML]]'''&lt;br /&gt;
&lt;br /&gt;
 [scenario]&lt;br /&gt;
 &lt;br /&gt;
   id=test-1&lt;br /&gt;
   next_scenario=2_test-more&lt;br /&gt;
 &lt;br /&gt;
   name=A Simple Test Scenario&lt;br /&gt;
   map_data=&amp;quot;{campaigns/Test_Campaign/testmap}{~campaigns/Test_Campaign/testmap}&amp;quot;&lt;br /&gt;
   turns=20&lt;br /&gt;
 &lt;br /&gt;
   {DAWN}&lt;br /&gt;
   {MORNING}&lt;br /&gt;
   {AFTERNOON}&lt;br /&gt;
   {DUSK}&lt;br /&gt;
   {FIRST_WATCH}&lt;br /&gt;
   {SECOND_WATCH}&lt;br /&gt;
 &lt;br /&gt;
   music=wesnoth-1.ogg&lt;br /&gt;
 &lt;br /&gt;
   [event]&lt;br /&gt;
     name=prestart&lt;br /&gt;
     [objectives]&lt;br /&gt;
       side=1&lt;br /&gt;
       [objective]&lt;br /&gt;
         description= _ &amp;quot;Defeat Enemy Leader&amp;quot;&lt;br /&gt;
         condition=win&lt;br /&gt;
       [/objective]&lt;br /&gt;
       [objective]&lt;br /&gt;
         description= _ &amp;quot;Death of Konrad&amp;quot;&lt;br /&gt;
         condition=lose&lt;br /&gt;
       [/objective]&lt;br /&gt;
     [/objectives]&lt;br /&gt;
   [/event]&lt;br /&gt;
 .  continued below&lt;br /&gt;
 .  ||&lt;br /&gt;
 .  \/&lt;br /&gt;
 &lt;br /&gt;
Every scenario must be enclosed in a tag;&lt;br /&gt;
the '''[scenario]''' tag is used for campaign scenarios.&lt;br /&gt;
The first set of keys in the scenario tag&lt;br /&gt;
describe the very basics of this scenario:&lt;br /&gt;
* The ''id'' (short for ''identifier'') is the computer's name for your scenario, and is not displayed during the game. However, it will be used to display game statistics (they will be graphed on http://stats.wesnoth.org in numerical order, so it's also a good idea to give the id's a number). This name is also used as reference in other tags and files, eg inside a '''[campaign]''' tag using the ''first_scenario'' key(see [[BuildingCampaignsTheCampaignFile]]) or inside a '''[scenario]''' tag using the ''next_scenario'' key (see below).&lt;br /&gt;
&lt;br /&gt;
* The value of the ''next_scenario'' key is the id (see above) of the scenario that is played after this one is won. Units from this scenario will be available for recall (unless you modify the recall list, but that's stuff for later). If your scenario is not part of a campaign, or if this is the last scenario you should either skip this line or put '''next_scenario=null''' inside the file. This will tell the game to display the End screen when this scenario is won.&lt;br /&gt;
&lt;br /&gt;
* The value of the ''name'' key is shown on the introduction screen before each scenario is played. (This can contain a picture of a map, or anything else you fancy. See [[BuildingScenariosIntermediate]] for an explenation on how to do that.) It's also the default name for saves on the level.&lt;br /&gt;
&lt;br /&gt;
* The next key, ''map_data'', is a link to the map file. You can create map files using the Wesnoth Map Editor (see [[WesnothMapEditor]] and [[BuildingMaps]] for more information). Since we may not know exactly where this campaign will be located we'll write two possible locations of the map file. The quotes are necessary because Wesnoth map data takes up multiple lines, so quotes are used to indicate where the data begins and ends. If you don't do this, it will break the scenario.&lt;br /&gt;
&lt;br /&gt;
* Finally, the last key in the top set of keys is ''turns''. This is the amount of turns a player is given to finish the scenario. (It can be changed during the game, but again, that is stuff for later.) When the player fails to finish the secnario in the given time, he has lost. (Said otherwise: the ''defeat'' event is trigered. See [[EventWML]] for more.)&lt;br /&gt;
&lt;br /&gt;
The next section is a set of preprocessors (see [[PreprocessorRef]]). Preprocessors are essentially WML shortcuts. They allow you to define certain pieces of code and re-use it whenever it is needed. Wesnoth provides you with a whole serie of standard preprocessors to make life more easy, but you yourself can define them too (again stuff for later). &lt;br /&gt;
Lets get back to this example! The preprocessors used here, describe how a day in this scenario should progress. This listing above is the normal day used throughout Wesnoth. If you want the entire scenario to take place at night, remove all the preprocessors except for '''{SECOND_WATCH}'''. This could be useful if you have Konrad&lt;br /&gt;
fighting the Undead and want the Undead to have the upper hand the whole time. Remember though, by setting this to a single tme of day and not the normal progress listed above, your scenario will effectively be taking place during one day or night, not many days as most scenarios are.&lt;br /&gt;
&lt;br /&gt;
The ''music'' key is a filename pointing to the music which plays. (See [[MusicListWML]] for more.)&lt;br /&gt;
This music file must be in the ''music/'' directory and '''must''' be in .ogg format.&lt;br /&gt;
&lt;br /&gt;
A tag you'll get to know very good when making scenarios shows up: '''[event]...[/event]'''.&lt;br /&gt;
Event tags are used to describe what should be done if an 'event' takes place. What this event is, is described by ''name''key. In this case we're describing the so-called 'prestart' event. This one takes place just ''before'' the game starts and just ''after'' all of the introductions screens were shown.&lt;br /&gt;
Here we have limited the contents of the tag to another important tag: '''[objectives]''' (plural) containing any number of '''[objective]''' (singular) tags.&lt;br /&gt;
For each '''[objective]''' (singular) tag, if ''condition'' is set to &amp;quot;win&amp;quot;, the text of ''description'' will be displayed in green after &amp;quot;Victory&amp;quot; in the Scenario Objectives. If ''condition'' is set to &amp;quot;lose&amp;quot;, the text of ''description'' will be displayed in red after &amp;quot;Defeat&amp;quot; in the Scenario Objectives. Because we've placed this tag inside a prestart event, this will be shown at the very first turn of the scenario.&lt;br /&gt;
The ''side'' key indicates that these conditions are for side 1 (see below).&lt;br /&gt;
The ' _ ' (underscore) facilitates translation using Gettext (see [[GetText]]).&lt;br /&gt;
&lt;br /&gt;
Note that ''ANY'' Victory or Defeat objective can be met to win or lose the scenario,&lt;br /&gt;
but a single Victory objective may have multiple parts.&lt;br /&gt;
Also note that the '''[objective]''' tag only describes what the objectives are. You will still need to set the appropiate events before they will work. (But that's again stuff for later)&lt;br /&gt;
&lt;br /&gt;
So far so good. The last necessary part describes what the players (Human and&lt;br /&gt;
Computer) start with, what they can do and what they can't do. Each of the players is described in a '''[side]''' tag.&lt;br /&gt;
&lt;br /&gt;
 .  /\ &lt;br /&gt;
 .  ||&lt;br /&gt;
 .  continued from above&lt;br /&gt;
   [side]&lt;br /&gt;
     side=1&lt;br /&gt;
     controller=human&lt;br /&gt;
     team_name=2&lt;br /&gt;
     user_team_name= _ &amp;quot;Konrad's forces&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
     type=Commander&lt;br /&gt;
     description=Konrad&lt;br /&gt;
     canrecruit=1&lt;br /&gt;
 &lt;br /&gt;
     recruit=Elvish Fighter,Elvish Archer,Horseman,Mage,Elvish Shaman&lt;br /&gt;
 &lt;br /&gt;
     {GOLD 100 50 0}&lt;br /&gt;
     {INCOME 10 5 0}&lt;br /&gt;
   [/side] &lt;br /&gt;
 [/scenario]&lt;br /&gt;
&lt;br /&gt;
Above you can see a sample '''[side]''' for the human player, Konrad. We wll describe every key more in detail below:&lt;br /&gt;
* ''side'': the leader of this side is placed on the tile represented by this digit (see [[BuildingMaps]]) It's a number from 1 to 9.&lt;br /&gt;
* ''controller'': possible values are 'human' or 'ai' (artificial intelligence, meaning your computer). If you don't specify this key, 'ai' is used as the default.&lt;br /&gt;
* ''team_name'' describes which team the side is on. It defaults to the same number as ''side'', so setting it to ''2'' allies this side with side 2, if you haven't changed the team_name of side 2.&lt;br /&gt;
* ''user_team_name'' is the name displayed when you view the sie stats (by pressing alt+s during gameplay). The underscore facilitates translation using GetText (see [[GetText]]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next set of keys describe the leader of this side:&lt;br /&gt;
* ''canrecruit'': This key can be '1' or '0', meaning &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot; respectively. If you no, then the leader won't be able to recruit. (Not much of a leader then, is he?) Any team without a canrecruit=1 unit automatically loses, so be sure to use this key.&lt;br /&gt;
* ''type'' describes what type of unit the leader will be. The possible  values are listed here: [[UnitTables]].&lt;br /&gt;
* ''description'' is the name and description of the leader.&lt;br /&gt;
In a campaign, all of these 'leader-describing' keys are ignored for the human player (except ''canrecruit''), since the leader from the previous scenario is used instead. However, the ''type'' key is still neccesary to prevent the scenario from crashing.&lt;br /&gt;
&lt;br /&gt;
* ''recruit'' is a comma-separated list of types of units. The possible values are listed in [[UnitTables]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then two more preprocessors are used:&lt;br /&gt;
* '''{GOLD easy normal hard}''' takes 3 positive numbers. These indicate the amount of money the player will start with on the EASY, NORMAL and HARD difficulty level.&lt;br /&gt;
In a campaign file, inside a human controlled side (''controller=human''), this is the minimum amount.  The actual amount the player gets ca, be larger if the player retained more from previous scenarios.&lt;br /&gt;
* '''{INCOME easy normal hard}''' is similar, but indicates the base income.&lt;br /&gt;
The defaults for each of these values are 100 gold and 2 base income.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, to make this scenario playable, we need to make a campaign for it. (see [[BuildingCampaignsTheCampaignFile]])&lt;br /&gt;
This should NOT be stored inside the main directory '''data/campaigns''' but inside '''userdata/data/campaigns'''. This prevents breaking the mainline campaigns or even worse, the entire game. (see [[BuildingCampaignsDirectoryStructure]])&lt;br /&gt;
Note: All files, the campaign file and the scenario file, one for each scenario level, must be saved with the ending .cfg (for example: testcampaign.cfg).&lt;br /&gt;
This is a short example on how to do this:&lt;br /&gt;
&lt;br /&gt;
 [campaign]&lt;br /&gt;
   name= _ &amp;quot;Test Campaign&amp;quot;&lt;br /&gt;
   first_scenario=test-1&lt;br /&gt;
   difficulties=EASY,NORMAL,HARD&lt;br /&gt;
 &lt;br /&gt;
   difficulty_descriptions= _ &amp;quot;&amp;amp;elvish-fighter.png=Easy;*&amp;amp;elvish-hero.png=Medium;&amp;amp;elvish-champion.png=Hard&amp;quot;&lt;br /&gt;
   icon=elvish-fighter.png&lt;br /&gt;
 [/campaign]&lt;br /&gt;
&lt;br /&gt;
Campaigns are described in the '''[campaign]''' tag. The first key is ''name'', which is&lt;br /&gt;
displayed on the campaign selector box. The second key is ''first_scenario'', which is&lt;br /&gt;
the ID of the first scenario of the campaign. Scenarios following after this one are referenced inside the first scenario using ''next_scenario'' (see above).&lt;br /&gt;
&lt;br /&gt;
The key '''difficulties=EASY,NORMAL,HARD''' tells the computer to set the macro '''EASY''' if the first difficulty choice is chosen, '''NORMAL''' if the second is chosen, and '''HARD''' if the third is chosen.&lt;br /&gt;
The expression '''#ifdef''' can be used later to test these macros. (see [[PreprocessorRef]])&lt;br /&gt;
It is recommended that you do not use other names than '''EASY''', '''NORMAL''', and '''HARD''' for your macros, because if you do then the standard macros, such as '''{GOLD}''' and '''{INCOME}''', won't work properly.&lt;br /&gt;
&lt;br /&gt;
Two optional keys are ''difficulty_descriptions'' and ''icon''.&lt;br /&gt;
''icon'' has value equal to an image, displayed inside the campaign list.&lt;br /&gt;
''difficulty_descriptions'' must have the same number of inputs as  '''difficulties''', most commonly three, separated by semicolons.&lt;br /&gt;
These inputs then map on to the difficulties, so that if you have set difficulties to:&lt;br /&gt;
 &amp;quot;difficulties=EASY,NORMAL,HARD&amp;quot;&lt;br /&gt;
the first input will specify the display on EASY, the second on NORMAL and the third on HARD.&lt;br /&gt;
Each difficulty display description starts opens with an ampersand (''&amp;amp;''), then the image to display (eg ''elvish-fighter.png''),&lt;br /&gt;
then an equals (''='') sign, then the text to display (eg ''Easy'').&lt;br /&gt;
Optionally you can place an asterisk (''*'') before one of the ampersands, and the corresponding difficulty will be selected by default (here NORMAL is default).&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[BuildingMaps]] &amp;amp; [[WesnothMapEditor]]&lt;br /&gt;
* [[ScenarioWML]] &amp;amp; [[SyntaxWML]]&lt;br /&gt;
* [[BuildingScenarios]]&lt;/div&gt;</summary>
		<author><name>Mathijs</name></author>
		
	</entry>
</feed>