<?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=Spixi</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=Spixi"/>
	<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/Special:Contributions/Spixi"/>
	<updated>2026-04-22T10:21:58Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.16</generator>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=GermanTranslationErrors&amp;diff=74697</id>
		<title>GermanTranslationErrors</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=GermanTranslationErrors&amp;diff=74697"/>
		<updated>2026-01-01T01:14:56Z</updated>

		<summary type="html">&lt;p&gt;Spixi: /* Karten-/Szenarioeditor */ Wieder rausgenommen, die Wiki-Seite scheint inaktiv zu sein, habe es auf dem Discord gepostet&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hier bitte die in der Übersetzung gefundenen Fehler eintragen.&lt;br /&gt;
&lt;br /&gt;
== Generelles ==&lt;br /&gt;
&lt;br /&gt;
Hinweis v. Espreon: Die Fertigkeit &amp;quot;feeding&amp;quot; ist im Deutschen - sehr spezifisch - als &amp;quot;Kanibalismus&amp;quot; übersetzt. Dies sei aber vielleicht zu spezifisch, und &amp;quot;fressen&amp;quot; sei generischer&lt;br /&gt;
IRC: &amp;quot;And since ability names can pretty much go anywhere thanks to UMC,they ought to have names that are generic as possible&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------&lt;br /&gt;
Wesnoth 1.10.0&lt;br /&gt;
&lt;br /&gt;
:Ist es so richtig, dass auf der Landkarte von Wesnoth (die im Hauptmenü) das eine Gebirge &amp;quot;Erzgebierge&amp;quot; heißt? Müsste es nicht &amp;quot;Erzgebirge&amp;quot; heißen? Gruß Michieru&lt;br /&gt;
&lt;br /&gt;
:[Anmerkung: die &amp;quot;Heart Mountain&amp;quot; wurden im Deutschen zum Erzgebirge, da &amp;quot;Herzgebirge&amp;quot; sich in der Ork-Kampagne irgendwie nicht richtig angefühlt hatte. Änderungen sind natürlich, nach IRC-Diskussion, wie immer, möglich. Crommy, 22.06.2014]&lt;br /&gt;
&lt;br /&gt;
: Übrigens liest sich &amp;quot;Schwarzwasser Hafen&amp;quot; ein bisschen merkwürdig. Das klingt IMO so, als hätte es mal einen König &amp;quot;Schwarzwas&amp;quot; gegeben, der dort einen Hafen errichtet hat. Die Betonung liegt bei dieser Schreibweise auf &amp;quot;Haf-&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
: Wenn man &amp;quot;Schwarzwasserhafen&amp;quot; ohne Leerzeichen schreiben würde, dann liegt die Betonung auf &amp;quot;Schwarz-&amp;quot;. Dies ist sowohl einfacher zu lesen, als auch grammatikalisch korrekter.&lt;br /&gt;
: --[[User:Spixi|Spixi]] 21:07, 30 March 2012 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Benutzeroberfläche ==&lt;br /&gt;
&lt;br /&gt;
=== Hauptmenü und Unterfenster ===&lt;br /&gt;
&lt;br /&gt;
=== Im Spiel ===&lt;br /&gt;
&lt;br /&gt;
=== Karten-/Szenarioeditor ===&lt;br /&gt;
&lt;br /&gt;
== Hilfe ==&lt;br /&gt;
&lt;br /&gt;
Das Terrain &amp;quot;Tropischer Meeresabgrund&amp;quot; klingt gut, wird aber sicher nicht nur für Meere benutzt.&lt;br /&gt;
&lt;br /&gt;
Das Terrain &amp;quot;Dry Mountains&amp;quot; war früher als &amp;quot;Wüstengebirge&amp;quot; übersetzt, nun wurde mit 1.14 ein richtiges Wüstengebirge eingeführt - vll findet jmd einen passenderen Namen für das alte Terrain, was dem normalen Gebirge auch sehr ähnlich sieht.&lt;br /&gt;
&lt;br /&gt;
== Einheitenbeschreibungen ==&lt;br /&gt;
&lt;br /&gt;
Die Dunevolk Einheiten benötigen ein neues Namenskonzept.&lt;br /&gt;
&lt;br /&gt;
Soll in viele Platz der Saurianen Einheiten &amp;quot;-in&amp;quot; oder &amp;quot;-innen&amp;quot; gestellt werden, weil die ausschließlich Weiblich sind? &amp;quot;Kulturell gibt es klare Aufteilung der Geschlechterrolle. ... Die Jagd und Nahrungsbeschaffung ist die Aufgabe der Weibchen, die dabei erlernten Fähigkeiten eignen sich auch im Kampf – sie sind die von anderen Völkern so gefürchteten Plänkler, Hinterlistlinge oder Flänkler.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Mehrspieler ==&lt;br /&gt;
&lt;br /&gt;
== Einführung ==&lt;br /&gt;
&lt;br /&gt;
== Kampagnen ==&lt;br /&gt;
&lt;br /&gt;
=== Das Zepter des Feuers ===&lt;br /&gt;
&lt;br /&gt;
=== Die dunklen Künste ===&lt;br /&gt;
&lt;br /&gt;
=== Die Geschichte zweier Brüder ===&lt;br /&gt;
&lt;br /&gt;
=== Die Südwacht ===&lt;br /&gt;
&lt;br /&gt;
=== Der Thronerbe ===&lt;br /&gt;
Es wird nicht korrekt geihrzt bei Gesprächen mit der Prinzessin.&lt;br /&gt;
&lt;br /&gt;
=== Der Aufstieg Wesnoths ===&lt;br /&gt;
Die Level 2 und 3 Version der Verbannten des Wesfolks heißen beide &amp;quot;Wesfolk Adlige&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Die Legende von Wesmere ===&lt;br /&gt;
&lt;br /&gt;
=== Freiheit ===&lt;br /&gt;
&lt;br /&gt;
=== Invasion der Finsternis ===&lt;br /&gt;
&lt;br /&gt;
=== Schwarzauges Sohn ===&lt;br /&gt;
&lt;br /&gt;
=== Unter brennenden Sonnen ===&lt;br /&gt;
&lt;br /&gt;
=== Wiedergeburt des Nordens ===&lt;br /&gt;
&lt;br /&gt;
=== Der Hammer von Thursagan ===&lt;br /&gt;
Beim Ihrzen werden die Wörter fälschlicherweise klein geschrieben.&lt;br /&gt;
Korrigiert bis zu dem Scenario mit den Draken und Magiern.&lt;br /&gt;
&lt;br /&gt;
=== Delfadors Memoiren ===&lt;br /&gt;
&lt;br /&gt;
=== Stille Wasser ===&lt;br /&gt;
&lt;br /&gt;
=== Steigt hinab in die Dunkelheit ===&lt;br /&gt;
&lt;br /&gt;
=== Geheimnisse der Ahnen ===&lt;br /&gt;
&lt;br /&gt;
Bei Nachrichten die direkt an den Spieler (anstatt an Charaktere) sollte wie im restlichen Spiel der Spieler geihrzt anstatt geduzt werden.&lt;br /&gt;
&lt;br /&gt;
== Manpages ==&lt;br /&gt;
&lt;br /&gt;
== Siehe auch ==&lt;br /&gt;
&lt;br /&gt;
* [[GermanTranslation|Hauptseite für deutsche Übersetzung]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Translations]]&lt;/div&gt;</summary>
		<author><name>Spixi</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=GermanTranslationErrors&amp;diff=74696</id>
		<title>GermanTranslationErrors</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=GermanTranslationErrors&amp;diff=74696"/>
		<updated>2026-01-01T01:07:08Z</updated>

		<summary type="html">&lt;p&gt;Spixi: /* Karten-/Szenarioeditor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hier bitte die in der Übersetzung gefundenen Fehler eintragen.&lt;br /&gt;
&lt;br /&gt;
== Generelles ==&lt;br /&gt;
&lt;br /&gt;
Hinweis v. Espreon: Die Fertigkeit &amp;quot;feeding&amp;quot; ist im Deutschen - sehr spezifisch - als &amp;quot;Kanibalismus&amp;quot; übersetzt. Dies sei aber vielleicht zu spezifisch, und &amp;quot;fressen&amp;quot; sei generischer&lt;br /&gt;
IRC: &amp;quot;And since ability names can pretty much go anywhere thanks to UMC,they ought to have names that are generic as possible&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------&lt;br /&gt;
Wesnoth 1.10.0&lt;br /&gt;
&lt;br /&gt;
:Ist es so richtig, dass auf der Landkarte von Wesnoth (die im Hauptmenü) das eine Gebirge &amp;quot;Erzgebierge&amp;quot; heißt? Müsste es nicht &amp;quot;Erzgebirge&amp;quot; heißen? Gruß Michieru&lt;br /&gt;
&lt;br /&gt;
:[Anmerkung: die &amp;quot;Heart Mountain&amp;quot; wurden im Deutschen zum Erzgebirge, da &amp;quot;Herzgebirge&amp;quot; sich in der Ork-Kampagne irgendwie nicht richtig angefühlt hatte. Änderungen sind natürlich, nach IRC-Diskussion, wie immer, möglich. Crommy, 22.06.2014]&lt;br /&gt;
&lt;br /&gt;
: Übrigens liest sich &amp;quot;Schwarzwasser Hafen&amp;quot; ein bisschen merkwürdig. Das klingt IMO so, als hätte es mal einen König &amp;quot;Schwarzwas&amp;quot; gegeben, der dort einen Hafen errichtet hat. Die Betonung liegt bei dieser Schreibweise auf &amp;quot;Haf-&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
: Wenn man &amp;quot;Schwarzwasserhafen&amp;quot; ohne Leerzeichen schreiben würde, dann liegt die Betonung auf &amp;quot;Schwarz-&amp;quot;. Dies ist sowohl einfacher zu lesen, als auch grammatikalisch korrekter.&lt;br /&gt;
: --[[User:Spixi|Spixi]] 21:07, 30 March 2012 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Benutzeroberfläche ==&lt;br /&gt;
&lt;br /&gt;
=== Hauptmenü und Unterfenster ===&lt;br /&gt;
&lt;br /&gt;
=== Im Spiel ===&lt;br /&gt;
&lt;br /&gt;
=== Karten-/Szenarioeditor ===&lt;br /&gt;
  wesnoth-lib&lt;br /&gt;
  msgid &amp;quot;Royal Rug&amp;quot;&lt;br /&gt;
  msgstr &amp;quot;Königklicher Teppich&amp;quot; -&amp;gt; &amp;quot;Königlicher Teppich&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hilfe ==&lt;br /&gt;
&lt;br /&gt;
Das Terrain &amp;quot;Tropischer Meeresabgrund&amp;quot; klingt gut, wird aber sicher nicht nur für Meere benutzt.&lt;br /&gt;
&lt;br /&gt;
Das Terrain &amp;quot;Dry Mountains&amp;quot; war früher als &amp;quot;Wüstengebirge&amp;quot; übersetzt, nun wurde mit 1.14 ein richtiges Wüstengebirge eingeführt - vll findet jmd einen passenderen Namen für das alte Terrain, was dem normalen Gebirge auch sehr ähnlich sieht.&lt;br /&gt;
&lt;br /&gt;
== Einheitenbeschreibungen ==&lt;br /&gt;
&lt;br /&gt;
Die Dunevolk Einheiten benötigen ein neues Namenskonzept.&lt;br /&gt;
&lt;br /&gt;
Soll in viele Platz der Saurianen Einheiten &amp;quot;-in&amp;quot; oder &amp;quot;-innen&amp;quot; gestellt werden, weil die ausschließlich Weiblich sind? &amp;quot;Kulturell gibt es klare Aufteilung der Geschlechterrolle. ... Die Jagd und Nahrungsbeschaffung ist die Aufgabe der Weibchen, die dabei erlernten Fähigkeiten eignen sich auch im Kampf – sie sind die von anderen Völkern so gefürchteten Plänkler, Hinterlistlinge oder Flänkler.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Mehrspieler ==&lt;br /&gt;
&lt;br /&gt;
== Einführung ==&lt;br /&gt;
&lt;br /&gt;
== Kampagnen ==&lt;br /&gt;
&lt;br /&gt;
=== Das Zepter des Feuers ===&lt;br /&gt;
&lt;br /&gt;
=== Die dunklen Künste ===&lt;br /&gt;
&lt;br /&gt;
=== Die Geschichte zweier Brüder ===&lt;br /&gt;
&lt;br /&gt;
=== Die Südwacht ===&lt;br /&gt;
&lt;br /&gt;
=== Der Thronerbe ===&lt;br /&gt;
Es wird nicht korrekt geihrzt bei Gesprächen mit der Prinzessin.&lt;br /&gt;
&lt;br /&gt;
=== Der Aufstieg Wesnoths ===&lt;br /&gt;
Die Level 2 und 3 Version der Verbannten des Wesfolks heißen beide &amp;quot;Wesfolk Adlige&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Die Legende von Wesmere ===&lt;br /&gt;
&lt;br /&gt;
=== Freiheit ===&lt;br /&gt;
&lt;br /&gt;
=== Invasion der Finsternis ===&lt;br /&gt;
&lt;br /&gt;
=== Schwarzauges Sohn ===&lt;br /&gt;
&lt;br /&gt;
=== Unter brennenden Sonnen ===&lt;br /&gt;
&lt;br /&gt;
=== Wiedergeburt des Nordens ===&lt;br /&gt;
&lt;br /&gt;
=== Der Hammer von Thursagan ===&lt;br /&gt;
Beim Ihrzen werden die Wörter fälschlicherweise klein geschrieben.&lt;br /&gt;
Korrigiert bis zu dem Scenario mit den Draken und Magiern.&lt;br /&gt;
&lt;br /&gt;
=== Delfadors Memoiren ===&lt;br /&gt;
&lt;br /&gt;
=== Stille Wasser ===&lt;br /&gt;
&lt;br /&gt;
=== Steigt hinab in die Dunkelheit ===&lt;br /&gt;
&lt;br /&gt;
=== Geheimnisse der Ahnen ===&lt;br /&gt;
&lt;br /&gt;
Bei Nachrichten die direkt an den Spieler (anstatt an Charaktere) sollte wie im restlichen Spiel der Spieler geihrzt anstatt geduzt werden.&lt;br /&gt;
&lt;br /&gt;
== Manpages ==&lt;br /&gt;
&lt;br /&gt;
== Siehe auch ==&lt;br /&gt;
&lt;br /&gt;
* [[GermanTranslation|Hauptseite für deutsche Übersetzung]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Translations]]&lt;/div&gt;</summary>
		<author><name>Spixi</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=GermanTranslationErrors&amp;diff=74695</id>
		<title>GermanTranslationErrors</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=GermanTranslationErrors&amp;diff=74695"/>
		<updated>2026-01-01T01:06:30Z</updated>

		<summary type="html">&lt;p&gt;Spixi: /* Karten-/Szenarioeditor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hier bitte die in der Übersetzung gefundenen Fehler eintragen.&lt;br /&gt;
&lt;br /&gt;
== Generelles ==&lt;br /&gt;
&lt;br /&gt;
Hinweis v. Espreon: Die Fertigkeit &amp;quot;feeding&amp;quot; ist im Deutschen - sehr spezifisch - als &amp;quot;Kanibalismus&amp;quot; übersetzt. Dies sei aber vielleicht zu spezifisch, und &amp;quot;fressen&amp;quot; sei generischer&lt;br /&gt;
IRC: &amp;quot;And since ability names can pretty much go anywhere thanks to UMC,they ought to have names that are generic as possible&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------&lt;br /&gt;
Wesnoth 1.10.0&lt;br /&gt;
&lt;br /&gt;
:Ist es so richtig, dass auf der Landkarte von Wesnoth (die im Hauptmenü) das eine Gebirge &amp;quot;Erzgebierge&amp;quot; heißt? Müsste es nicht &amp;quot;Erzgebirge&amp;quot; heißen? Gruß Michieru&lt;br /&gt;
&lt;br /&gt;
:[Anmerkung: die &amp;quot;Heart Mountain&amp;quot; wurden im Deutschen zum Erzgebirge, da &amp;quot;Herzgebirge&amp;quot; sich in der Ork-Kampagne irgendwie nicht richtig angefühlt hatte. Änderungen sind natürlich, nach IRC-Diskussion, wie immer, möglich. Crommy, 22.06.2014]&lt;br /&gt;
&lt;br /&gt;
: Übrigens liest sich &amp;quot;Schwarzwasser Hafen&amp;quot; ein bisschen merkwürdig. Das klingt IMO so, als hätte es mal einen König &amp;quot;Schwarzwas&amp;quot; gegeben, der dort einen Hafen errichtet hat. Die Betonung liegt bei dieser Schreibweise auf &amp;quot;Haf-&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
: Wenn man &amp;quot;Schwarzwasserhafen&amp;quot; ohne Leerzeichen schreiben würde, dann liegt die Betonung auf &amp;quot;Schwarz-&amp;quot;. Dies ist sowohl einfacher zu lesen, als auch grammatikalisch korrekter.&lt;br /&gt;
: --[[User:Spixi|Spixi]] 21:07, 30 March 2012 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Benutzeroberfläche ==&lt;br /&gt;
&lt;br /&gt;
=== Hauptmenü und Unterfenster ===&lt;br /&gt;
&lt;br /&gt;
=== Im Spiel ===&lt;br /&gt;
&lt;br /&gt;
=== Karten-/Szenarioeditor ===&lt;br /&gt;
wesnoth-lib&lt;br /&gt;
msgid &amp;quot;Royal Rug&amp;quot;&lt;br /&gt;
msgstr &amp;quot;Königklicher Teppich&amp;quot; -&amp;gt; &amp;quot;Königlicher Teppich&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Hilfe ==&lt;br /&gt;
&lt;br /&gt;
Das Terrain &amp;quot;Tropischer Meeresabgrund&amp;quot; klingt gut, wird aber sicher nicht nur für Meere benutzt.&lt;br /&gt;
&lt;br /&gt;
Das Terrain &amp;quot;Dry Mountains&amp;quot; war früher als &amp;quot;Wüstengebirge&amp;quot; übersetzt, nun wurde mit 1.14 ein richtiges Wüstengebirge eingeführt - vll findet jmd einen passenderen Namen für das alte Terrain, was dem normalen Gebirge auch sehr ähnlich sieht.&lt;br /&gt;
&lt;br /&gt;
== Einheitenbeschreibungen ==&lt;br /&gt;
&lt;br /&gt;
Die Dunevolk Einheiten benötigen ein neues Namenskonzept.&lt;br /&gt;
&lt;br /&gt;
Soll in viele Platz der Saurianen Einheiten &amp;quot;-in&amp;quot; oder &amp;quot;-innen&amp;quot; gestellt werden, weil die ausschließlich Weiblich sind? &amp;quot;Kulturell gibt es klare Aufteilung der Geschlechterrolle. ... Die Jagd und Nahrungsbeschaffung ist die Aufgabe der Weibchen, die dabei erlernten Fähigkeiten eignen sich auch im Kampf – sie sind die von anderen Völkern so gefürchteten Plänkler, Hinterlistlinge oder Flänkler.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Mehrspieler ==&lt;br /&gt;
&lt;br /&gt;
== Einführung ==&lt;br /&gt;
&lt;br /&gt;
== Kampagnen ==&lt;br /&gt;
&lt;br /&gt;
=== Das Zepter des Feuers ===&lt;br /&gt;
&lt;br /&gt;
=== Die dunklen Künste ===&lt;br /&gt;
&lt;br /&gt;
=== Die Geschichte zweier Brüder ===&lt;br /&gt;
&lt;br /&gt;
=== Die Südwacht ===&lt;br /&gt;
&lt;br /&gt;
=== Der Thronerbe ===&lt;br /&gt;
Es wird nicht korrekt geihrzt bei Gesprächen mit der Prinzessin.&lt;br /&gt;
&lt;br /&gt;
=== Der Aufstieg Wesnoths ===&lt;br /&gt;
Die Level 2 und 3 Version der Verbannten des Wesfolks heißen beide &amp;quot;Wesfolk Adlige&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Die Legende von Wesmere ===&lt;br /&gt;
&lt;br /&gt;
=== Freiheit ===&lt;br /&gt;
&lt;br /&gt;
=== Invasion der Finsternis ===&lt;br /&gt;
&lt;br /&gt;
=== Schwarzauges Sohn ===&lt;br /&gt;
&lt;br /&gt;
=== Unter brennenden Sonnen ===&lt;br /&gt;
&lt;br /&gt;
=== Wiedergeburt des Nordens ===&lt;br /&gt;
&lt;br /&gt;
=== Der Hammer von Thursagan ===&lt;br /&gt;
Beim Ihrzen werden die Wörter fälschlicherweise klein geschrieben.&lt;br /&gt;
Korrigiert bis zu dem Scenario mit den Draken und Magiern.&lt;br /&gt;
&lt;br /&gt;
=== Delfadors Memoiren ===&lt;br /&gt;
&lt;br /&gt;
=== Stille Wasser ===&lt;br /&gt;
&lt;br /&gt;
=== Steigt hinab in die Dunkelheit ===&lt;br /&gt;
&lt;br /&gt;
=== Geheimnisse der Ahnen ===&lt;br /&gt;
&lt;br /&gt;
Bei Nachrichten die direkt an den Spieler (anstatt an Charaktere) sollte wie im restlichen Spiel der Spieler geihrzt anstatt geduzt werden.&lt;br /&gt;
&lt;br /&gt;
== Manpages ==&lt;br /&gt;
&lt;br /&gt;
== Siehe auch ==&lt;br /&gt;
&lt;br /&gt;
* [[GermanTranslation|Hauptseite für deutsche Übersetzung]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Translations]]&lt;/div&gt;</summary>
		<author><name>Spixi</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=InterfaceActionsWML&amp;diff=73059</id>
		<title>InterfaceActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=InterfaceActionsWML&amp;diff=73059"/>
		<updated>2024-05-29T14:09:41Z</updated>

		<summary type="html">&lt;p&gt;Spixi: revert last change, but clarified the default value&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== Interface actions ==&lt;br /&gt;
&lt;br /&gt;
Part of [[ActionWML]], interface actions are actions that do not have a direct effect on gameplay;&lt;br /&gt;
instead, they show something to the player.  The main interface tags&lt;br /&gt;
are '''[message]''' and '''[objectives]''', but several other tags affect&lt;br /&gt;
the interface also.&lt;br /&gt;
&lt;br /&gt;
== [inspect] ==&lt;br /&gt;
This user interface instantly displays the gamestate inspector dialog at the current scenario state (the same one that can be brought up with [[CommandMode|the ''':inspect''' command]]), which can be used to inspect the values of WML variables, AI configuration, recall lists, and more.&lt;br /&gt;
&lt;br /&gt;
* '''name''': optional attribute to specify the name of this gamestate inspector dialog. It is just a label to help differentiate between different invocations of gamestate inspector dialog.&lt;br /&gt;
&lt;br /&gt;
== [message] ==&lt;br /&gt;
The most commonly used interface action is [message], which displays a message to the user in a dialog box. It can also be used to take input from the user.&lt;br /&gt;
&lt;br /&gt;
The following key/tags are accepted for [message]:&lt;br /&gt;
* [[StandardUnitFilter]]: The unit whose profile and name are displayed. Do not use a [filter] tag. If no unit matching this filter is found, the message is not displayed (The unit has probably been killed).&amp;lt;br&amp;gt;[message] elements should be constructed so that it is either guaranteed that a certain unit is alive, or so that dialog flows smoothly even if the message isn't displayed.&lt;br /&gt;
&lt;br /&gt;
* '''speaker''': an alternative to standard unit filter. You may specify as the value of the speaker attribute a unit id or any of the following special values:&lt;br /&gt;
** '''narrator''': the dialog box is displayed without a caption for the unit speaking or a unit image&lt;br /&gt;
** '''unit''': the primary unit for the event is speaking&lt;br /&gt;
** '''second_unit''': the secondary unit for the event is speaking&lt;br /&gt;
&lt;br /&gt;
* '''message''': (translatable) the text to display to the right of the image. ''message'' is sometimes multiple lines; if it is, be sure to use quotes(''' ' ''' or ''' &amp;quot; ''')&lt;br /&gt;
* '''male_message''', '''female_message''': {{DevFeature1.13|2}} (translatable) Used instead of ''message'' if the unit's gender matches. Never used if there is no unit (ie ''speaker=narrator''). {{DevFeature1.13|6}} This matches the primary unit, not the secondary unit.&lt;br /&gt;
* '''wait_description''': {{DevFeature1.13|2}} the description of this message displayed when other players in a mp game wait for one player doing input in a [message] (with [option]s or [text_input]).&lt;br /&gt;
* '''[show_if]''': if present then this message will only be displayed if the conditional statement in this tag is passed (see [[ConditionalActionsWML#Condition_Tags|ConditionalActionsWML]])&lt;br /&gt;
* '''side_for''': (default: all sides) comma-separated list of sides for who message is shown. This will &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; work with messages that take user input ([option]/[text_input]), which can only ever be shown to the current player. {{DevFeature1.13|0}} side_for= is now also accepted for messages with user input, it specifies on which side the message is shown (defaults to the currently playing side). For messages with input it does not accept a comma seperated list only a single number.&lt;br /&gt;
* '''image''': (default: profile image of speaker) the image to display to the left of the message text. Append ~RIGHT() if you want the image to appear on the right side. &lt;br /&gt;
** {{DevFeature1.13|0}} &amp;lt;b&amp;gt;none:&amp;lt;/b&amp;gt; display no image&lt;br /&gt;
* '''mirror''': {{DevFeature1.13|5}}whether to mirror the image specified by the '''image''' attribute.&lt;br /&gt;
* '''second_image''': {{DevFeature1.13|6}}same as the '''image''' attribute, but the image is displayed on the right of the message text.&lt;br /&gt;
* '''second_mirror''': {{DevFeature1.13|6}}same as '''mirror''', but for the '''second_image''' attribute.&lt;br /&gt;
* '''image_pos''': {{DevFeature1.13|5}} whether to show the image on the left or right; supercedes the use of ~RIGHT() described above&lt;br /&gt;
* '''caption''': (default: name of speaker) the caption to display beside the image. Name to be displayed. Note: use a translation mark to avoid wmllint errors.&lt;br /&gt;
* '''scroll''': Boolean specifying whether the game view should scroll to the speaking unit. Defaults to ''yes''.&lt;br /&gt;
* '''highlight''': {{DevFeature1.13|5}} Boolean specifying whether to highlight the speaker. Defaults to ''yes''.&lt;br /&gt;
* '''sound''': a sound effect (wav file) to play as the message is displayed. This can be a comma-separated list, from which one will be randomly chosen.&lt;br /&gt;
* '''voice''', '''male_voice''', '''female_voice''': {{DevFeature1.13|?}} a sound to be played as the message is displayed. This can also be a comma-separated list, from which one will be randomly chosen. This is intended for voiceovers for the message. The gendered forms are applied the same as for '''message'''. They are never used when the speaker is the narrator - only '''voice''' is used in that case.&lt;br /&gt;
* {{anchor|message-option|'''[option]'''}}: No '''[option]''' elements have to be used. If '''[option]''' elements are present, then each option will be displayed in a menu for the user to select one option. ''Note: Messages with options will not be shown at all in prestart events''&lt;br /&gt;
** '''message''': (translatable) the text displayed for the option. {{DevFeature1.15|1}} This is now a synonym for '''description='''.&lt;br /&gt;
** '''image''', '''label''', '''description''', '''default''': See [[DescriptionWML#WML_Format|DescriptionWML]].&lt;br /&gt;
** '''value''': {{DevFeature1.13|?}} Gives the option a value to be stored in a variable.&lt;br /&gt;
** '''[show_if]''': if present then this option will only be displayed if the conditional statement in this tag is passed (see [[ConditionalActionsWML#Condition_Tags|ConditionalActionsWML]])&lt;br /&gt;
** '''[command]''': an element containing actions which are executed if the option is selected.&lt;br /&gt;
* '''variable''': {{DevFeature1.13|?}} If present, either the index or the value of the chosen option will be stored in the specified variable. Option indexing starts from 1. If option has '''[show_if]''' condition evaluated as false, then it is hidden and excluded from the indexing.&lt;br /&gt;
* {{anchor|message-text_input|'''[text_input]'''}}: there can be only one [text_input] tag. this adds a text input field to the message. ''Note: Messages with text_input will not be shown at all in prestart events''&lt;br /&gt;
** '''variable''': the variable that the user's input will be written to&lt;br /&gt;
** '''label''': a text label to the left of the input field&lt;br /&gt;
** '''max_length''': the maximum number of characters that may be typed into the field&lt;br /&gt;
** '''text''': text that is written into the field in the beginning&lt;br /&gt;
* Check [[EventWML#Multiplayer_safety]] to find out in which events you can safely use '''[option]''' and '''[text_input]''' without causing OOS.&lt;br /&gt;
&lt;br /&gt;
=== Formatting ===&lt;br /&gt;
'''[message]''' and other tags such as unit names (user_description), objectives, and floating text can make use of [https://docs.gtk.org/Pango/pango_markup.html#pango-markup Pango markup formatting codes].&lt;br /&gt;
&lt;br /&gt;
Prefer to use single quotes (') instead of double quotes (&amp;quot;) within the formatting string, as double quotes would need to be escaped in WML (&amp;quot;&amp;quot;). Escaping markup can be done with [https://github.com/wesnoth/wesnoth/blob/9daa10a9f27c5a95520e871417bbd72aa52aa688/src/font/pango/escape.hpp#L38-L42 HTML entities].&lt;br /&gt;
&lt;br /&gt;
For example, if you wanted to write &amp;quot;You are victorious!&amp;quot; in large, italic, gold letters, you might write it this way:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;span color='#BCB088' size='large' font-style='italic'&amp;gt;You are victorious!&amp;lt;/span&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These are the codes taken from the Pango markup formatting guide:&lt;br /&gt;
&lt;br /&gt;
*'''font''', '''font_desc''': A font description string, such as &amp;quot;Sans Italic 12&amp;quot;.&lt;br /&gt;
*'''font_family''', '''face''': A font family name.&lt;br /&gt;
*'''font_size''', '''size''': Font size in 1024ths of a point, or one of the absolute sizes 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', or one of the relative sizes 'smaller' or 'larger'.&lt;br /&gt;
*'''font_style''', '''style''': One of 'normal', 'oblique', 'italic'.&lt;br /&gt;
*'''font_weight''', '''weight''': One of 'ultralight', 'light', 'normal', 'bold', 'ultrabold', 'heavy', or a numeric weight.&lt;br /&gt;
*'''font_variant''', '''variant''': One of 'normal' or 'smallcaps'.&lt;br /&gt;
*'''font_stretch''', '''stretch''': One of 'ultracondensed', 'extracondensed', 'condensed', 'semicondensed', 'normal', 'semiexpanded', 'expanded', 'extraexpanded', 'ultraexpanded'.&lt;br /&gt;
*'''foreground''', '''fgcolor''', '''color''': An RGB color specification such as '#00FF00' or a color name such as 'red'. The full list of color names may be found in Pango's [https://github.com/GNOME/pango/blob/main/tools/rgb.txt rgb.txt] file.&lt;br /&gt;
*'''background, bgcolor''': An RGB color specification such as '#00FF00' or a color name such as 'red'.&lt;br /&gt;
*'''underline''': One of 'none', 'single', 'double', 'low', 'error'.&lt;br /&gt;
*'''underline_color''': The color of underlines; an RGB color specification such as '#00FF00' or a color name such as 'red'.&lt;br /&gt;
*'''rise''': Vertical displacement, in 10000ths of an em. Can be negative for subscript, positive for superscript.&lt;br /&gt;
*'''strikethrough''': 'true' or 'false' whether to strike through the text.&lt;br /&gt;
*'''strikethrough_color''': The color of strikethrough lines; an RGB color specification such as '#00FF00' or a color name such as 'red'&lt;br /&gt;
*'''fallback''': 'true' or 'false' whether to enable fallback. If disabled, then characters will only be used from the closest matching font on the system. No fallback will be done to other fonts on the system that might contain the characters in the text. Fallback is enabled by default. Most applications should not disable fallback.&lt;br /&gt;
*'''letter_spacing''': Inter-letter spacing in 1024ths of a point.&lt;br /&gt;
*'''gravity''': One of 'south', 'east', 'north', 'west', 'auto'.&lt;br /&gt;
*'''gravity_hint''': One of 'natural', 'strong', 'line'.&lt;br /&gt;
&lt;br /&gt;
The following pango attributes are also available directly as attributes of the '''[message]''' tag:&lt;br /&gt;
{{DevFeature1.13|4}}&lt;br /&gt;
&lt;br /&gt;
*'''font'''&lt;br /&gt;
*'''font_family'''&lt;br /&gt;
*'''font_size'''&lt;br /&gt;
*'''font_style'''&lt;br /&gt;
*'''font_weight'''&lt;br /&gt;
*'''font_variant'''&lt;br /&gt;
*'''font_stretch'''&lt;br /&gt;
*'''color'''&lt;br /&gt;
*'''bgcolor'''&lt;br /&gt;
*'''underline'''&lt;br /&gt;
*'''underline_color'''&lt;br /&gt;
*'''rise'''&lt;br /&gt;
*'''strikethrough'''&lt;br /&gt;
*'''strikethrough_color'''&lt;br /&gt;
*'''fallback'''&lt;br /&gt;
*'''letter_spacing'''&lt;br /&gt;
*'''gravity'''&lt;br /&gt;
*'''gravity_hint'''&lt;br /&gt;
&lt;br /&gt;
== [objectives] ==&lt;br /&gt;
The other tag used for plot development is '''[objectives]'''.&lt;br /&gt;
The '''[objectives]''' tag overwrites any previously set objectives,&lt;br /&gt;
and displays text which should describe the objectives of the scenario.&lt;br /&gt;
Scenario objectives are displayed on the player's first turn after the tag is used,&lt;br /&gt;
or as part of the event if it triggers during that player's turn.&lt;br /&gt;
Objectives can also be accessed at any time in a scenario using the&lt;br /&gt;
&amp;quot;Scenario Objectives&amp;quot; game menu option, making this tag useful for&lt;br /&gt;
scenario-specific information that the player may need to refer to during play.&lt;br /&gt;
&lt;br /&gt;
Attributes of '''[objectives]''':&lt;br /&gt;
* '''side''': Default '0'. The side to set the objectives for. A value of 0 sets objectives for all sides. note: There are side-specific objectives and default objectives, which are used in case a side doesn't have specific ones. Specifying 0 sets the default ones.&lt;br /&gt;
* '''[[StandardSideFilter]]''' tags and keys: Sets the objectives of all matching sides to these passed specifications (the rest of this [objectives] tag). If no sides (such as when passing side=0) or all sides match, sets the default objectives, and the side specific ones for the matching sides otherwise.&lt;br /&gt;
* '''bullet''': Default '• '. Replaces the default bullet, with whatever is passed, for all objectives, gold carryover notes, and notes defined with [note].&lt;br /&gt;
* '''summary''': Displayed first in the objectives text, this should describe the basic objective for the overall scenario.  Can be omitted.&lt;br /&gt;
* '''note''': Displayed last in the objectives text, this is sometimes used for hints or additional information.  Can be omitted.&lt;br /&gt;
* '''victory_string''': Default ' _ &amp;quot;Victory:&amp;quot;', this text precedes the victory objectives. Can be set to &amp;quot;&amp;quot; too.&lt;br /&gt;
* '''defeat_string''': Default ' _ &amp;quot;Defeat:&amp;quot;', this text precedes the defeat objectives. Can be set to &amp;quot;&amp;quot; too.&lt;br /&gt;
* '''gold_carryover_string''': Default ' _ &amp;quot;Gold carryover:&amp;quot;', this text precedes the gold carryover information.&lt;br /&gt;
* '''notes_string''': Default ' _ &amp;quot;Notes:&amp;quot;', this text precedes the notes.&lt;br /&gt;
* '''silent''': Default: not present. If set to &amp;quot;yes&amp;quot;, the objectives are silently changed. Else, they will be shown to the user when appropriate.&lt;br /&gt;
* '''delayed_variable_substitution''': {{DevFeature1.13|8}} If set to yes, any variables or [insert_tag] are not substituted right away. Instead, they are substituted whenever the objectives are actually viewed.&lt;br /&gt;
&lt;br /&gt;
Tags of '''[objectives]''':&lt;br /&gt;
* {{anchor|objectives-objective|'''[objective]'''}}: describes a win or loss condition. Most scenarios have multiple win or loss conditions, so use a separate [objective] subtag for each line; this helps with translations.&lt;br /&gt;
** '''bullet''': Default '• ' or whatever is set in the parent [objectives] block. Replaces the default bullet, with whatever is provided, for the objective defined by the [objective] block.&lt;br /&gt;
** '''red''': Default '0' for winning objectives, '255' for losing objectives. Overrides the default red coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''green''': Default '255' for winning objectives, '0' for losing objectives. Overrides the default green coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''blue''': Default '0'. Overrides the default blue coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''description''': text for the specific win or loss condition.&lt;br /&gt;
** '''caption''': a text which will be displayed above the ''description''. This can be used to display a subcategory of objectives below ''victory_string'' or ''defeat_string''.&lt;br /&gt;
** '''condition''': The color and placement of the text. Values are 'win'(colored green, placed after ''victory_string'') and 'lose'(colored red, placed after ''defeat_string'').&lt;br /&gt;
** '''show_turn_counter''': If set to yes, displays the number of turns remaining in the scenario. Default is no.&lt;br /&gt;
** '''[show_if]''': A condition that disables the objective if it doesn't hold. Conditional objectives are refreshed at '''[show_objectives]''' time only, or when manually opening the scenario objectives.&lt;br /&gt;
* {{anchor|objectives-gold_carryover|'''[gold_carryover]'''}}: describes how the gold carryover works in this scenario. This is intended to be a more convenient way of displaying carryover information than using the note= key in [objectives].&lt;br /&gt;
** '''bullet''': Default '• ' or whatever is set in the parent [objectives] block. Replaces the default bullet with whatever is provided.&lt;br /&gt;
** '''red''': Default '255'. Overrides the default red coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''green''': Default '255'. Overrides the default green coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''blue''': Default '192'. Overrides the default blue coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''bonus''' (boolean): whether an early finish bonus is granted. If omitted, early finish bonus is not mentioned.&lt;br /&gt;
** '''carryover_percentage''': the amount of carryover gold. If omitted, the amount is not mentioned.&lt;br /&gt;
** '''[show_if]''': {{DevFeature1.13|11}} Gold carryover will not be shown if the specified condition isn't met. Conditional gold carryover is refreshed at '''[show_objectives]''' time only.&lt;br /&gt;
* {{anchor|objectives-note|'''[note]'''}}: describes a note, usually used for hints or additional information. This is an easier way of adding several notes than concatenating them together into a single string to use with the ''note='' key.&lt;br /&gt;
** '''bullet''': Default '• ' or whatever is set in the parent [objectives] block. Replaces the default bullet with whatever is provided for the note defined by the [note] block.&lt;br /&gt;
** '''red''': Default '255'. Overrides the default red coloring of the entire note, including the bullet.&lt;br /&gt;
** '''green''': Default '255'. Overrides the default green coloring of the entire note, including the bullet.&lt;br /&gt;
** '''blue''': Default '255'. Overrides the default blue coloring of the entire note, including the bullet.&lt;br /&gt;
** '''description''': the text of the note.&lt;br /&gt;
** '''[show_if]''': The note will not be shown if the specified condition isn't met. Conditional notes are refreshed at '''[show_objectives]''' time only.&lt;br /&gt;
&lt;br /&gt;
== [set_menu_item] ==&lt;br /&gt;
This tag is used to add a custom option in the right-click context menu which can then be used to trigger arbitrary WML commands. The menu items can be set and modified during any event, for example during &amp;quot;start&amp;quot; or &amp;quot;prestart&amp;quot; events. The user can also assign hotkeys to these WML commands unless specified otherwise. When the hotkey is pressed the event will be fired/filtered at the current mouse position.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Due to limitations in portable devices where there are no scroll bars for context menus, there is a hard-coded limit of 7 custom WML menu items. If you really need to have more than 7 menu items, try combining some of them in a submenu. {{DevFeature1.13|0}} This limitation is being removed in a [http://forums.wesnoth.org/viewtopic.php?p=572554#p572554 future version] of Wesnoth.&lt;br /&gt;
&lt;br /&gt;
* '''id''': the unique id for this menu item. If a menu item with this id already exists, it allows you to set specific changes to that item. All menus will be sorted lexicographically by the id string. The ordering is underscores, digits, and finally letters.&lt;br /&gt;
* '''description''': the in-game text that will appear for this item in the menu.&lt;br /&gt;
* '''image''': the image to display next to this item, defaults to &amp;quot;buttons/WML-custom.png&amp;quot;&lt;br /&gt;
* '''needs_select''': if ''yes'' (default ''no''), then the latest select event (see [[EventWML]]) that triggered before this menu item was chosen will be transmitted over the network before this menu item action will be. This only has any effect in networked multiplayer, and is intended to allow more elaborate menu item behaviour there without causing out of sync errors. If you don't know what this means, just leave it. {{DevFeature1.13|6}} ''needs_select=yes'' is deprecated, consider using manual variable syncing with [sync_variable].&lt;br /&gt;
* '''synced''' {{DevFeature1.13|1}}: if ''no'' (default ''yes'') the command handler will only be run on the client that invoked the menu item; this means that changing the gamestate in a command handler of a menu item with ''synced=no'' will cause OOS&lt;br /&gt;
* '''use_hotkey''': if ''no'' (default ''yes''), then the user cannot assign hotkeys to this menu item. If ''only'', the menu item is only accessible via hotkeys, not via right-click context; you can use this in combination with [default_hotkey] if you want custom hotkeys in your campaign/mp. &lt;br /&gt;
* '''[show_if]''': If present, the menu item will only be available if the conditional statement (see [[ConditionalActionsWML#Condition_Tags|ConditionalActionsWML]]) within evaluates to true. When this is evaluated, the WML variables ''$x1'' and ''$y1'' will point to the location on which the context menu was invoked, so it's possible to for example only enable the option on empty hexes or on a particular unit.&lt;br /&gt;
* '''[filter_location]''': contains a [[StandardLocationFilter]] similar to the one found inside Single Unit Filters. The menu item will only be available on matching locations.&lt;br /&gt;
* '''[default_hotkey]''': contains a hotkey WML to specify what hotkey to assign to this, '''if the user has no hotkey assigned to this yet'''. (Unlike the rest of a menu item definition, modifying this tag has no effect on the game; it is only effective when initially defining a menu item.) Hotkey WML matches the format in the preferences file and contains the following keys:&lt;br /&gt;
** '''key''': a string that contains the key to assign to this.&lt;br /&gt;
** '''alt''', '''shift''', '''cmd'''(apple only), '''ctrl''':  boolean values.&lt;br /&gt;
** '''repeat_on_hold''' {{DevFeature1.13|12}}: if ''yes'' (default ''no''), holding the hotkey will repeat the action continuously, unless it blocks input with something like '''[message]'''. Due to a bug, versions older than 1.13.12 always repeat the action, with no way to disable it.&lt;br /&gt;
* '''[command]''': contains the WML actions to be executed when the menu item is selected. Again, the WML variables ''$x1'' and ''$y1'' will point to the location on which the context menu was invoked on.&lt;br /&gt;
** '''delayed_variable_substitution ''' (boolean yes|no, default: yes): If no, forces a variable substitution run onto the wml included in this [command] block. Use this, if you want variables which are to substitute to get the values they have at execution time of the event where this set_menu_item appears. Other than that, they get the values they have at invocation time of the menu item.&lt;br /&gt;
&lt;br /&gt;
== [clear_menu_item] ==&lt;br /&gt;
&lt;br /&gt;
Removes a menu item from the scenario.&lt;br /&gt;
Normally menu items are, including all their defining wml, automatically carried over between scenarios. This tag prevents this. (The behavior is comparable to set_variable/clear_variable).&lt;br /&gt;
* '''id''': (string): id of the menu item to clear. Can be a comma-separated list.&lt;br /&gt;
&lt;br /&gt;
== Other interface tags ==&lt;br /&gt;
&lt;br /&gt;
The following tags are also action tags:&lt;br /&gt;
&lt;br /&gt;
=== [change_theme] ===&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|8}}&lt;br /&gt;
&lt;br /&gt;
Change the current interface theme.&lt;br /&gt;
&lt;br /&gt;
* '''theme''': The ID of the new theme. Use &amp;lt;code&amp;gt;theme=&amp;lt;/code&amp;gt; (empty key) to switch back to the theme that the player has selected in Preferences. On &amp;lt;b&amp;gt;1.14.2&amp;lt;/b&amp;gt; and later it is also possible to omit the key entirely to achieve the same effect (on previous versions this will crash the Lua engine).&lt;br /&gt;
&lt;br /&gt;
=== [item] ===&lt;br /&gt;
Makes a graphical item appear on a certain hex. Note this only places the graphics for an item. It does not make the item do anything. Use a moveto event to make moving onto the item do something. &amp;lt;tt&amp;gt;''('''Hint:''' There are a number of predefined items that are used in various campaigns that you can make use of. You can find [http://www.wesnoth.org/macro-reference.xhtml#file:items.cfg a list of them] if you look into the items.cfg file in the wesnoth install directory (under /data/core/macros).)''&amp;lt;/tt&amp;gt;&lt;br /&gt;
* '''x''', '''y''': the location to place the item. (only for [event][item]: full [[StandardLocationFilter|SLF]] support)&lt;br /&gt;
* '''image''': the image (in ''images/'' as .png) to place on the hex. This image is aligned with the top-left of the hex (which is 72 pixels wide and 72 pixels tall). It is drawn underneath units. ''('''Hint:''' If using an image smaller than 72x72, then it might be useful to [[ImagePathFunctions#Blit_Function|BLIT]] the image onto &amp;lt;tt&amp;gt;misc/blank-hex.png&amp;lt;/tt&amp;gt; (a blank 72x72 image).)''&lt;br /&gt;
* '''halo''': an image to place centered on the hex. It is drawn on top of units. Use this instead of ''image'' if the image is bigger than the hex or if you want to animate an image (https://github.com/wesnoth/wesnoth/issues/1219).&lt;br /&gt;
* '''name''' an id that can be used to remove the item.&lt;br /&gt;
''Example (where the integer after the colon is the duration of each frame or square bracket expansion as per AnimationWML is used): halo=scenery/fire1.png:100,scenery/fire2.png:100,scenery/fire3.png:100,scenery/fire4.png:100,scenery/fire5.png:100,scenery/fire6.png:100,scenery/fire7.png:100,scenery/fire8.png:100''&lt;br /&gt;
or equivalently (requires Wesnoth 1.11.2+):&lt;br /&gt;
''halo=scenery/fire[1~8].png:100''&lt;br /&gt;
* '''team_name''': name of the team for which the item is to be displayed (hidden for others). For multiple teams just put all the names in one string, for example separated by commas. {{DevFeature1.15|0}} In 1.14 the '''[side]team_name''' attribute was expected to be a substring of this '''team_name'''. In 1.15 both are expected to be comma-separated lists of names and the item is visible if the lists intersect. ([[https://github.com/wesnoth/wesnoth/pull/3533|#3533]])&lt;br /&gt;
* '''visible_in_fog''': whether the item should be visible through fog or not. Default yes.&lt;br /&gt;
* '''redraw''': (boolean yes|no, default: yes): If no, disables implicit calls to [[InterfaceActionsWML#.5Bredraw.5D|[redraw]]] when placing the items.&lt;br /&gt;
* '''[filter_team]''': {{DevFeature1.15|0}} A [[StandardSideFilter]]. Set '''team_name''' to the union of all '''[side]team_name''' attributes of all sides that match the SSF. ([[https://github.com/wesnoth/wesnoth/pull/3533|#3533]])&lt;br /&gt;
* {{DevFeature1.15|0}} If both '''team_name''' and '''[filter_team]''' are set, '''team_name''' is ignored.&lt;br /&gt;
&lt;br /&gt;
=== [remove_item] ===&lt;br /&gt;
Removes any graphical items on a given hex.&lt;br /&gt;
* [[StandardLocationFilter]]: the hexes to remove items from&lt;br /&gt;
* '''image''': if specified, only removes the given item if one of its 'image', 'halo' or 'name' attributes is exactly this value. (for 'halo' and 'image' this in particular means that the image name must include any [[ImagePathFunctions|image path functions]] appended to the original image name.)&lt;br /&gt;
&lt;br /&gt;
=== [print] ===&lt;br /&gt;
Displays a message across the screen. The message will disappear after a certain time, or when another [print] tag is encountered.&lt;br /&gt;
* '''text''': (translatable) the text to display. Can be an empty string to remove a previous message without showing a new one.&lt;br /&gt;
* '''size''': (default=12) the pointsize of the font to use&lt;br /&gt;
* '''duration''': the length of time to display the text for.&lt;br /&gt;
** (Before 1.15.4) This is measured in the number of 'frames', and the default is 50. A frame in Wesnoth is usually displayed for around 30ms.&lt;br /&gt;
** {{DevFeature1.15|4}} This is measured in milliseconds. Don't use the default value, because it's a mere 50ms.&lt;br /&gt;
** {{DevFeature1.15|14}} The default is 5000 milliseconds.&lt;br /&gt;
** {{DevFeature1.15|14}} The string '''unlimited''' displays the text until it's removed by another [print] tag.&lt;br /&gt;
* '''color''': (default '''0,0,0''') three comma-separated values giving the red, green and blue values (0-255).&lt;br /&gt;
* '''red''', '''green''', '''blue''': deprecated, use color=0,0,0 instead.&lt;br /&gt;
&lt;br /&gt;
=== [move_unit_fake] ===&lt;br /&gt;
Moves an image of a unit along a certain path on the map. The path does not need to be a continuous list of adjacent hexes, so for example only the start and end points can be given, in which case the straightest line between those points will be calculated and used.&lt;br /&gt;
* '''type''': the type of the unit whose image to use&lt;br /&gt;
* '''x''': a comma-separated list of x locations to move along&lt;br /&gt;
* '''y''': a comma-separated list of y locations to move along (x and y values are matched pairs)&lt;br /&gt;
* '''side''': the side of the fake unit, used for team-coloring the fake unit&lt;br /&gt;
* '''gender''': the gender of the fake unit. Example: gender=female&lt;br /&gt;
* '''variation''': the variation of the fake unit. Example: variation=undead&lt;br /&gt;
* '''image_mods''': [[ImagePathFunctions|image path functions]] sequence to be applied on the fake unit.&lt;br /&gt;
* '''force_scroll''':  Whether to scroll the map or not even when [[#.5Block_view.5D|[lock_view]]] is in effect or ''Follow Unit Actions'' is disabled in ''Advanced Preferences''. Defaults to ''yes'' starting with version '''1.11.6'''; the attribute did not exist in previous versions and this action behaved as if ''no'' was passed instead.&lt;br /&gt;
&lt;br /&gt;
=== [move_units_fake] ===&lt;br /&gt;
moves multiple images of units along paths on the map. These units are moved in lockstep.&lt;br /&gt;
* '''force_scroll''': {{DevFeature1.15|0}} Has the same meaning as in [move_unit_fake] but a different default.&lt;br /&gt;
* '''[fake_unit]''': A fake unit to move&lt;br /&gt;
** '''type''': the type of unit whose image to use&lt;br /&gt;
** '''x''': a comma-separated list of x locations to move along&lt;br /&gt;
** '''y''': a comma-separated list of y locations to move along (x and y values are matched pairs)&lt;br /&gt;
** '''side''': the side of the fake unit, used for team-coloring the fake unit&lt;br /&gt;
** '''skip_steps''': the number of steps to skip before this unit starts moving&lt;br /&gt;
&lt;br /&gt;
=== [hide_unit] ===&lt;br /&gt;
Temporarily prevents the engine from displaying the given unit. The unit does not become invisible, as it would be with the '''[hides]''' ability; it is still the same plain unit, but without an image. Useful in conjunction with '''[move_unit_fake]''': to move a leader unit into position on-screen. Until 1.8 each '''[hide_unit]''' tag only hides one unit.&lt;br /&gt;
* [[StandardUnitFilter]]: All matching units will be hidden&lt;br /&gt;
&lt;br /&gt;
=== [unhide_unit] ===&lt;br /&gt;
Stops the currently hidden units from being hidden.&lt;br /&gt;
* [[StandardUnitFilter]]: Only the matching units will be unhidden&lt;br /&gt;
&lt;br /&gt;
=== [lock_view] ===&lt;br /&gt;
Locks gamemap view scrolling for human players, so they cannot scroll the gamemap view until it is unlocked. WML or Lua actions such as '''[scroll_to]''' will continue to work normally, as they ignore this restriction; the locked/unlocked state is preserved when saving the current game.&lt;br /&gt;
&lt;br /&gt;
This feature is generally intended to be used in cutscenes to prevent the player scrolling away from scripted actions.&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|8}} This now also blocks the player from zooming the gamemap view. WML or Lua zoom will continue to work normally.&lt;br /&gt;
&lt;br /&gt;
=== [unlock_view] ===&lt;br /&gt;
Unlocks gamemap view scrolling for human players.&lt;br /&gt;
&lt;br /&gt;
=== [scroll] ===&lt;br /&gt;
Scroll a certain number of pixels in a given direction. Useful for earthquake/shaking effects.&lt;br /&gt;
* '''x''', '''y''': the number of pixels to scroll along the x and y axis&lt;br /&gt;
* '''side''': the side or sides for which this should happen. By default, the [scroll] happens for everyone.&lt;br /&gt;
* '''[filter_side]''': a [[StandardSideFilter]] to select the sides for which this should happen. By default, the [scroll] happens for everyone.&lt;br /&gt;
&lt;br /&gt;
=== [scroll_to] ===&lt;br /&gt;
Scroll to a given hex&lt;br /&gt;
* [[StandardLocationFilter]], do not use a [filter_location] sub-tag. If more than one location matches the filter, only the first matching location will be used.&lt;br /&gt;
* '''check_fogged''': whether to scroll even to locations covered in fog or shroud. Possible values ''yes'' (don't scroll to fog) and ''no'' (scroll even to fog), with ''no'' as the default.&lt;br /&gt;
* '''immediate''': whether to instantly warp to the target hex regardless of the scroll speed setting in Preferences (defaults to ''no'').&lt;br /&gt;
* '''highlight''': {{DevFeature1.13|5}} Whether to highlight the hex being scrolled to (defaults to ''no'').&lt;br /&gt;
* '''side''': the side or sides for which this should happen. By default, the [scroll_to] happens for everyone.&lt;br /&gt;
* '''[filter_side]''': a [[StandardSideFilter]] to select the sides for which this should happen. By default, the [scroll_to] happens for everyone.&lt;br /&gt;
&lt;br /&gt;
=== [scroll_to_unit] ===&lt;br /&gt;
Scroll to a given unit&lt;br /&gt;
* [[StandardUnitFilter]]; do not use a [filter] subtag.&lt;br /&gt;
* '''check_fogged''': whether to scroll even to locations covered in fog or shroud. Possible values ''yes'' (don't scroll to fog) and ''no'' (scroll even to fog), with ''no'' as the default.&lt;br /&gt;
* '''immediate''': whether to instantly warp to the target hex regardless of the scroll speed setting in Preferences (defaults to ''no'').&lt;br /&gt;
* '''highlight''': {{DevFeature1.13|5}} Whether to highlight the hex the unit is on (defaults to ''no'').&lt;br /&gt;
* '''for_side''': the side or sides for which this should happen. By default, the [scroll_to_unit] happens for everyone.&lt;br /&gt;
* '''[for_side]''': a [[StandardSideFilter]] to select the sides for which this should happen. By default, the [scroll_to_unit] happens for everyone.&lt;br /&gt;
&lt;br /&gt;
=== [select_unit] ===&lt;br /&gt;
Selects a given unit.&lt;br /&gt;
* [[StandardUnitFilter]]: The first unit found will be selected.&lt;br /&gt;
* '''fire_event''': whether a ''select'' event should be triggered or not (def. ''no''). (Note that select events aren't multiplayer save.)&lt;br /&gt;
* '''highlight''': whether the unit's current hex should be highlighted (def. ''yes'').&lt;br /&gt;
&lt;br /&gt;
'''Note:''' fire_event does not appear to work in 1.14 or 1.16.&lt;br /&gt;
&lt;br /&gt;
=== [sound]===&lt;br /&gt;
Plays a sound&lt;br /&gt;
* '''name''': the filename of the sound to play (in ''sounds/'' as .wav or .ogg). This can be a comma-separated list, from which one sound will be chosen randomly.&lt;br /&gt;
* '''repeat''': repeats the sound for a specified additional number of times (default=0)&lt;br /&gt;
&lt;br /&gt;
=== [sound_source] ===&lt;br /&gt;
Creates a sound source. &amp;quot;Sound sources&amp;quot; is a general name for a mechanism which makes possible for map elements to emit sounds according to some rules, where &amp;quot;map elements&amp;quot; can be specific locations or terrain types. For now, only sound sources tied to locations are supported.&lt;br /&gt;
* '''id''': a unique identification key of the sound source&lt;br /&gt;
* '''sounds''': a list of comma separated, randomly played sounds associated with the sound source&lt;br /&gt;
* '''delay''': a numerical value (in milliseconds) of the minimal delay between two playbacks of the source's sound if the source remains visible on the screen; if one scrolls out and back in, the source will be considered as ready to play&lt;br /&gt;
* '''chance''': a percentage (a value from 0 to 100) describing the chance of the source being activated every second after the delay has passed or when the source's location appears on the screen (note that it cannot play more than one file at the same time)&lt;br /&gt;
* '''check_fogged''': possible values ''yes'' and ''no'' - ''yes'' means the source will not play if its locations are fogged&lt;br /&gt;
* '''check_shrouded''': possible values ''yes'' and ''no'' - ''yes'' means the source will not play if its locations are shrouded&lt;br /&gt;
* '''x,y''': similar to x,y as found in a [[StandardLocationFilter]], these are the locations associated with the sound source&lt;br /&gt;
* '''fade_range''' (default = 3): distance in hexes that determines a &amp;quot;circular&amp;quot; area around the one specified by '''full_range''' where sound volume fades out linearly&lt;br /&gt;
* '''full_range''' (default = 14): distance in hexes that determines a &amp;quot;circular&amp;quot; area where source plays with full volume, relative to screen center&lt;br /&gt;
* '''loop''': number of times a sound sample should be looped if it stays visible. -1 means infinite (~65000)&lt;br /&gt;
&lt;br /&gt;
=== [story] ===&lt;br /&gt;
{{DevFeature1.13|8}}&lt;br /&gt;
&lt;br /&gt;
Shows the story screen.&lt;br /&gt;
* '''title''': Default title used if a part does not specify one — unlike the intro storyscreen, the scenario name is not used as a default title.&lt;br /&gt;
* '''[part]''', '''[if]''', '''[switch]''', '''[wml_message]''', '''[deprecated_message]''' : See [[IntroWML]].&lt;br /&gt;
&lt;br /&gt;
=== [remove_sound_source] ===&lt;br /&gt;
Removes a previously defined sound source.&lt;br /&gt;
* '''id''': the identification key of the sound source to remove&lt;br /&gt;
&lt;br /&gt;
=== [music] ===&lt;br /&gt;
Switches to playing different music&lt;br /&gt;
* '''name''': the filename of the music to play (in ''music/'' as .ogg)&lt;br /&gt;
* see [[MusicListWML]] for the correct syntax&lt;br /&gt;
&lt;br /&gt;
=== [volume] ===&lt;br /&gt;
Changes the game volume to a percent of the preferences volume for the game being played. Values can go from 0 to 100:  &lt;br /&gt;
* '''music''':  Changes the music volume.&lt;br /&gt;
* '''sound''':  Changes the sound volume.&lt;br /&gt;
&lt;br /&gt;
=== [color_adjust] ===&lt;br /&gt;
Adjust the color tint of terrain, by adjusting time-of-day coloring.&lt;br /&gt;
* '''red''', '''green''', '''blue''': values from -255 to 255, the amount to tint by for each color&lt;br /&gt;
&lt;br /&gt;
=== [screen_fade] ===&lt;br /&gt;
{{DevFeature1.17|6}}&lt;br /&gt;
&lt;br /&gt;
Overlay the game display with the given color, fading over the specified duration. This can be used for screen fade effects.&lt;br /&gt;
* '''red''', '''green''', '''blue''': values from 0 to 255, the final overlay color (defaults to 0,0,0)&lt;br /&gt;
* '''alpha''': value from 0 to 255, the strength of the effect. 0 means no effect and can be used to fade in. 255 means fully opaque and can be used to fully fade out to the given color. Intermediate values will end up with a partial overlay tint on the game screen.&lt;br /&gt;
* '''duration''': the length of time it will take to complete the fade, in milliseconds. If 0 the effect is immediate.&lt;br /&gt;
&lt;br /&gt;
=== [delay] ===&lt;br /&gt;
Pauses the game.&lt;br /&gt;
* '''time''': the time to pause in milliseconds&lt;br /&gt;
* '''accelerate ''' (boolean yes|no, default no): {{DevFeature1.13|0}} whether the delay is affected by acceleration. When [delay] is used to make an animation, this should be set to yes so that your animation matches the ones generated by the game.&lt;br /&gt;
&lt;br /&gt;
=== [redraw] ===&lt;br /&gt;
Redraws the screen (this normally isn't done during events, although some of the other interface actions cause the screen or parts of it to be redrawn).&lt;br /&gt;
* '''clear_shroud''' (boolean yes|no, default no): If yes, clears fog and shroud around existing units. Useful if you, for example, spawn friendly units in the middle of an event and want the shroud to update accordingly (otherwise units that spawn inside fog would remain invisible for the duration of the event, since the fog would not automatically get cleared around them).&lt;br /&gt;
* '''[[StandardSideFilter]]''': the sides for which to recalculate fog and shroud.&lt;br /&gt;
* '''side''': If used (forces clear_shroud=yes), clears fog and shroud for that side.&lt;br /&gt;
&lt;br /&gt;
=== [unit_overlay] ===&lt;br /&gt;
Sets an image that will be drawn over a particular unit, and follow it around&lt;br /&gt;
* [[StandardUnitFilter]]: All matching units will get the overlay (do not use [filter])&lt;br /&gt;
* '''image''': the image to place on the unit&lt;br /&gt;
* '''object_id''': object id to use, defaults to the '''image''' key with an &amp;quot;overlay_&amp;quot; prefix; this allows using [[DirectActionsWML#.5Bremove_object.5D|'''[remove_object]''']]&lt;br /&gt;
* '''duration''': object duration&lt;br /&gt;
&lt;br /&gt;
=== [remove_unit_overlay] ===&lt;br /&gt;
Removes a particular overlayed image from a unit&lt;br /&gt;
* [[StandardUnitFilter]]: The overlay will get removed from all matching units (do not use [filter])&lt;br /&gt;
* '''image''': the image to remove from the unit&lt;br /&gt;
* '''object_id''': object id to use&lt;br /&gt;
Using [[DirectActionsWML#.5Bremove_object.5D|'''[remove_object]''']] is also possible, see https://github.com/wesnoth/wesnoth/commit/26c2f941f2bcdd89528481e114c0375ad2a46271&lt;br /&gt;
&lt;br /&gt;
=== [animate_unit] ===&lt;br /&gt;
Uses an animation of a unit to animate it on screen (if the unit has the corresponding animation).&lt;br /&gt;
* '''flag''': The key to find the custom animation in the unit description (see the '''[extra_anim]''' description in [[AnimationWML]]). Standard animations can be triggered with the following keywords: ''leading recruited standing idling levelout levelin healing healed poisoned movement defend attack death victory pre_teleport post_teleport''&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument, see [[FilterWML]]. By default, the unit at the event location will be animated. You can use this tag to choose any other unit to animate.&lt;br /&gt;
* '''[primary_attack]''': If this tag is not present, the filter for animation will be triggered with no attack. If it is here, all attacks from the unit will be filtered, and a matching one will be used to filter the animation. Takes a weapon filter as argument, see [[FilterWML]].&lt;br /&gt;
* '''[secondary_attack]''': Similar to '''[primary_attack]'''. May be needed to trigger a defense animation correctly, if there are more than one animations available for the defending unit.&lt;br /&gt;
* '''hits''': yes/no/hit/miss/kill: which according variation of a attack/defense animation shall be chosen (required)&lt;br /&gt;
* '''text''': a text to hover during the animation &lt;br /&gt;
* '''male_text''', '''female_text''': {{DevFeature1.13|2}} (translatable) gender-specific versions of the above&lt;br /&gt;
* '''red''': red value for the text color (0-255)&lt;br /&gt;
* '''green''': green value for the text color&lt;br /&gt;
* '''blue''': blue value for the text color&lt;br /&gt;
* '''with_bars''': yes/no: whether to display the status bars during the animation (e.g. the hitpoint bar)&lt;br /&gt;
* '''[animate]''': a sub block with the same syntax as '''[animate_unit]''' except that the '''[filter]''' block is mandatory to find the unit. This block will find and animate another unit simultaneously.&lt;br /&gt;
* '''[facing]''': a [[StandardLocationFilter]] specifying what hex the unit should be facing when animated&lt;br /&gt;
&lt;br /&gt;
=== [label] ===&lt;br /&gt;
Places a label on the map.&lt;br /&gt;
* '''x''', '''y''': the location of the label. {{DevFeature1.13|1}} (only for [event][label]: full [[StandardLocationFilter|SLF]] support)&lt;br /&gt;
* '''text''': what the label should say. If you put an empty string &amp;lt;code&amp;gt;&amp;quot;&amp;quot;&amp;lt;/code&amp;gt; as an argument, the label will be completely removed. Use this method if you want to remove a specific label from any location.&lt;br /&gt;
* '''team_name''': if specified, the label will only be visible to the given team.&lt;br /&gt;
* '''color''': color of the label. The format is r,g,b; r, g and b are numbers between 0 and 255.&lt;br /&gt;
* '''visible_in_fog''': whether the label should be visible through fog or not. Default yes.&lt;br /&gt;
* '''visible_in_shroud''': whether the label should be visible through shroud or not. Default no.&lt;br /&gt;
* '''immutable''': whether this label is protected from being removed or changed by players. Default yes.&lt;br /&gt;
* '''category''': the Show/Hide Labels dialog allows showing/hiding all labels of a given category by toggling a checkbox.&lt;br /&gt;
* '''tooltip''': A tooltip visible when mouseovering the hex the label is on&lt;br /&gt;
* '''side''': the number of the side that placed the label. Can be 0 for labels placed by WML.&lt;br /&gt;
&lt;br /&gt;
=== [floating_text]===&lt;br /&gt;
Floats text (similar to the damage and healing numbers) on the given locations.&lt;br /&gt;
* [[StandardLocationFilter]]: the text will be floated on all matching locations simultaneously (do not use [filter] unless you intend to match one or more units).&lt;br /&gt;
* '''text''': the text to display.&lt;br /&gt;
&lt;br /&gt;
The default text color is &amp;lt;span style=&amp;quot;color: #6b8cff;&amp;quot;&amp;gt;'''#6b8cff'''&amp;lt;/span&amp;gt;. To change the color, use [[#Formatting|Pango markup]]. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Float some golden yellow text at 20,20.&lt;br /&gt;
[floating_text]&lt;br /&gt;
   x,y=20,20&lt;br /&gt;
   text=&amp;quot;&amp;lt;span color='#cccc33'&amp;gt;&amp;quot; + _ &amp;quot;Your text here&amp;quot; + &amp;quot;&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
[/floating_text]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [deprecated_message] ===&lt;br /&gt;
Shows a deprecated message in the message area, this feature is only intended to be used to warn about deprecated macros in mainline. The message is not translatable.&lt;br /&gt;
* '''message''': the message to show.&lt;br /&gt;
* '''level''': {{DevFeature1.13|10}} The deprecation level, a number from 1 to 3.&lt;br /&gt;
* '''what''': {{DevFeature1.13|10}} The name of the thing being deprecated. Use this instead of '''message''' if possible; a stock message will be generated from it. Use '''message''' only if more information is required; it will be appended to the stock message. This should not be translatable&lt;br /&gt;
* '''version''': {{DevFeature1.13|10}} For deprecation levels 2 and 3, this indicates the version in which the feature could be removed. It does ''not'' indicate the version in which it became deprecated. &lt;br /&gt;
&lt;br /&gt;
The meanings of the deprecation levels are as follows:&lt;br /&gt;
&lt;br /&gt;
# Deprecated, but will only be removed if absolutely necessary. The '''version''' key is ignored.&lt;br /&gt;
# It will be removed no earlier than a specified version.&lt;br /&gt;
# It will be removed in the next stable version&lt;br /&gt;
# It has already been removed, leaving just a stub to inform users of how to update their code.&lt;br /&gt;
&lt;br /&gt;
Note that as of 1.13.11, deprecation messages show only in the log, not in the chat message area. The '''message''' can be translatable, but does not need to be.&lt;br /&gt;
&lt;br /&gt;
=== [wml_message] ===&lt;br /&gt;
Outputs a message to Wesnoth's console output. Intended for campaign designers to output silent text to the console, without annoying the player; then, that text might contain information useful for later bug-reporting. The log domain for it is '''wml''', and the '''debug/dbg''' log level is available for use with the '''logger''' attribute. Depending on the current log level ('''error''' by default), which may be changed with the in-game :log command, or the --log-&amp;lt;level&amp;gt;=wml command line switch, the messages are echoed to the in-game chat.&lt;br /&gt;
* '''message''': the message to show.&lt;br /&gt;
* '''logger''': the Wesnoth engine output logger that should catch the text; this might be 'err' (the errors log level), 'warn'/'wrn' (the warnings log level) or anything else (the information log level). Not all information will be displayed depending on the log level chosen when starting Wesnoth.&lt;br /&gt;
&lt;br /&gt;
Note: As of 1.9.4/1.9.5 (r48805) the following &amp;quot;loggers&amp;quot; should work: If in [wml_message]: err/error, warn/wrn/warning, debug/dbg; using the :log command: Only the long forms error, warning, info and debug (this part gathered by trying rather than source inspecting). The long forms are most likely also the only ones working when starting wesnoth with --log-&amp;lt;level&amp;gt;=wml.&lt;br /&gt;
For log level warning or error (as during normal play), only wml_messages with logger error or warning display (for both). With logger info or debug, additionally wml_messages with logger info or debug display (for both).&lt;br /&gt;
&lt;br /&gt;
=== [test_condition] ===&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|2}}&lt;br /&gt;
&lt;br /&gt;
Evaluates the contained conditional tags. If they evaluate to the expected value, it prints out a message to the console explaining which part of the condition caused this result in a way similar to [wml_message]. This can be used if your conditional test is failing and you're not sure why.&lt;br /&gt;
&lt;br /&gt;
* '''result''': Whether you expect the conditions to fail or succeed. If no (the default), a message will be printed if the conditional tags fail. If yes, a message will instead be printed if the conditional tags pass.&lt;br /&gt;
* '''logger''': Same as for [wml_message]. Defaults to &amp;quot;warning&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== [open_help] ===&lt;br /&gt;
Opens the in-game help.&lt;br /&gt;
* '''topic''': the id of the topic to open&lt;br /&gt;
&lt;br /&gt;
Examples of ids:&lt;br /&gt;
* unit_Mage&lt;br /&gt;
* unit_Dark Adept&lt;br /&gt;
* weaponspecial_charge&lt;br /&gt;
* terrain_human_castle&lt;br /&gt;
&lt;br /&gt;
The engine will print the topic ids if run from the command line with the ''--log-debug=help'' option.&lt;br /&gt;
&lt;br /&gt;
=== [show_objectives] ===&lt;br /&gt;
refreshes the objectives defined by [objectives] and its [show_if] tags, and displays them. (It is also called whenever the user explicitly asks for the objectives; this matters only if the tag was overridden by a [[LuaWML#register_wml_action|Lua]] script.)&lt;br /&gt;
* '''side''': the side to show the objectives. If not set, all sides are used.&lt;br /&gt;
* '''[[StandardSideFilter]]''' tags and keys: Tag affects the matching sides instead of just all or the one given by the integer value of the side= key.&lt;br /&gt;
&lt;br /&gt;
=== [chat] ===&lt;br /&gt;
Displays a message in the chat area, not visible for observers. Alternative unconditionally visible for everyone: [[LuaWML:Display#wesnoth.message]]. {{DevFeature1.13|9}} can be visible for observers.&lt;br /&gt;
* '''speaker''': (default=&amp;quot;WML&amp;quot;) A string for the name of the sender of the message.&lt;br /&gt;
* '''message''': The message that should be displayed.&lt;br /&gt;
* '''observable''' (boolean yes|no, default yes): {{DevFeature1.13|9}} Whether the message is displayed for observers.&lt;br /&gt;
* '''[[StandardSideFilter]]''' tags and keys as argument; if the same client controls multiple sides that match, then the message will only be displayed once.&lt;br /&gt;
&lt;br /&gt;
=== [zoom] ===&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|8}}&lt;br /&gt;
&lt;br /&gt;
Changes the zoom level of the map.&lt;br /&gt;
&lt;br /&gt;
* '''factor''': The new zoom factor, measured as a multiple of the base zoom.&lt;br /&gt;
* '''relative''': If yes, zoom relative to current zoom level. Otherwise, set the absolute zoom level. Default no.&lt;br /&gt;
&lt;br /&gt;
== Useful Macros ==&lt;br /&gt;
There are some predefined macros that you find useful for interface actions. You can find a complete list along with a detailed explanation of how they work [http://www.wesnoth.org/macro-reference.xhtml here].&lt;br /&gt;
* '''{HIGHLIGHT_UNIT}''' Highlight a unit on the map. Use this to show important units&lt;br /&gt;
* '''{HIGHLIGHT_IMAGE}''' Places and highlights an image on the map. Use this to show important items or locations&lt;br /&gt;
* '''{SET_IMAGE}''' Places an image on the map which has no other function.&lt;br /&gt;
* '''{QUAKE &amp;lt;soundfile&amp;gt;}''' Creates a tremor-like screenshake and plays &amp;lt;soundfile&amp;gt;. For example, '''{QUAKE (rumble.ogg)}'''.&lt;br /&gt;
* '''{FLASH_WHITE}''' Flash the screen white momentarily. You can also replace WHITE with RED, BLUE or GREEN for a different colour.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[DirectActionsWML]]&lt;br /&gt;
* [[InternalActionsWML]]&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;br /&gt;
[[Category: ActionsWML]]&lt;/div&gt;</summary>
		<author><name>Spixi</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=InterfaceActionsWML&amp;diff=73058</id>
		<title>InterfaceActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=InterfaceActionsWML&amp;diff=73058"/>
		<updated>2024-05-29T12:33:43Z</updated>

		<summary type="html">&lt;p&gt;Spixi: Added undocumented image key&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== Interface actions ==&lt;br /&gt;
&lt;br /&gt;
Part of [[ActionWML]], interface actions are actions that do not have a direct effect on gameplay;&lt;br /&gt;
instead, they show something to the player.  The main interface tags&lt;br /&gt;
are '''[message]''' and '''[objectives]''', but several other tags affect&lt;br /&gt;
the interface also.&lt;br /&gt;
&lt;br /&gt;
== [inspect] ==&lt;br /&gt;
This user interface instantly displays the gamestate inspector dialog at the current scenario state (the same one that can be brought up with [[CommandMode|the ''':inspect''' command]]), which can be used to inspect the values of WML variables, AI configuration, recall lists, and more.&lt;br /&gt;
&lt;br /&gt;
* '''name''': optional attribute to specify the name of this gamestate inspector dialog. It is just a label to help differentiate between different invocations of gamestate inspector dialog.&lt;br /&gt;
&lt;br /&gt;
== [message] ==&lt;br /&gt;
The most commonly used interface action is [message], which displays a message to the user in a dialog box. It can also be used to take input from the user.&lt;br /&gt;
&lt;br /&gt;
The following key/tags are accepted for [message]:&lt;br /&gt;
* [[StandardUnitFilter]]: The unit whose profile and name are displayed. Do not use a [filter] tag. If no unit matching this filter is found, the message is not displayed (The unit has probably been killed).&amp;lt;br&amp;gt;[message] elements should be constructed so that it is either guaranteed that a certain unit is alive, or so that dialog flows smoothly even if the message isn't displayed.&lt;br /&gt;
&lt;br /&gt;
* '''speaker''': an alternative to standard unit filter. You may specify as the value of the speaker attribute a unit id or any of the following special values:&lt;br /&gt;
** '''narrator''': the dialog box is displayed without a caption for the unit speaking or a unit image&lt;br /&gt;
** '''unit''': the primary unit for the event is speaking&lt;br /&gt;
** '''second_unit''': the secondary unit for the event is speaking&lt;br /&gt;
&lt;br /&gt;
* '''message''': (translatable) the text to display to the right of the image. ''message'' is sometimes multiple lines; if it is, be sure to use quotes(''' ' ''' or ''' &amp;quot; ''')&lt;br /&gt;
* '''male_message''', '''female_message''': {{DevFeature1.13|2}} (translatable) Used instead of ''message'' if the unit's gender matches. Never used if there is no unit (ie ''speaker=narrator''). {{DevFeature1.13|6}} This matches the primary unit, not the secondary unit.&lt;br /&gt;
* '''wait_description''': {{DevFeature1.13|2}} the description of this message displayed when other players in a mp game wait for one player doing input in a [message] (with [option]s or [text_input]).&lt;br /&gt;
* '''[show_if]''': if present then this message will only be displayed if the conditional statement in this tag is passed (see [[ConditionalActionsWML#Condition_Tags|ConditionalActionsWML]])&lt;br /&gt;
* '''side_for''': (default: all sides) comma-separated list of sides for who message is shown. This will &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; work with messages that take user input ([option]/[text_input]), which can only ever be shown to the current player. {{DevFeature1.13|0}} side_for= is now also accepted for messages with user input, it specifies on which side the message is shown (defaults to the currently playing side). For messages with input it does not accept a comma seperated list only a single number.&lt;br /&gt;
* '''image''': (default: profile image of speaker) the image to display to the left of the message text. Append ~RIGHT() if you want the image to appear on the right side. &lt;br /&gt;
** {{DevFeature1.13|0}} &amp;lt;b&amp;gt;none:&amp;lt;/b&amp;gt; display no image&lt;br /&gt;
* '''mirror''': {{DevFeature1.13|5}}whether to mirror the image specified by the '''image''' attribute.&lt;br /&gt;
* '''second_image''': {{DevFeature1.13|6}}same as the '''image''' attribute, but the image is displayed on the right of the message text.&lt;br /&gt;
* '''second_mirror''': {{DevFeature1.13|6}}same as '''mirror''', but for the '''second_image''' attribute.&lt;br /&gt;
* '''image_pos''': {{DevFeature1.13|5}} whether to show the image on the left or right; supercedes the use of ~RIGHT() described above&lt;br /&gt;
* '''caption''': (default: name of speaker) the caption to display beside the image. Name to be displayed. Note: use a translation mark to avoid wmllint errors.&lt;br /&gt;
* '''scroll''': Boolean specifying whether the game view should scroll to the speaking unit. Defaults to ''yes''.&lt;br /&gt;
* '''highlight''': {{DevFeature1.13|5}} Boolean specifying whether to highlight the speaker. Defaults to ''yes''.&lt;br /&gt;
* '''sound''': a sound effect (wav file) to play as the message is displayed. This can be a comma-separated list, from which one will be randomly chosen.&lt;br /&gt;
* '''voice''', '''male_voice''', '''female_voice''': {{DevFeature1.13|?}} a sound to be played as the message is displayed. This can also be a comma-separated list, from which one will be randomly chosen. This is intended for voiceovers for the message. The gendered forms are applied the same as for '''message'''. They are never used when the speaker is the narrator - only '''voice''' is used in that case.&lt;br /&gt;
* {{anchor|message-option|'''[option]'''}}: No '''[option]''' elements have to be used. If '''[option]''' elements are present, then each option will be displayed in a menu for the user to select one option. ''Note: Messages with options will not be shown at all in prestart events''&lt;br /&gt;
** '''message''': (translatable) the text displayed for the option. {{DevFeature1.15|1}} This is now a synonym for '''description='''.&lt;br /&gt;
** '''image''', '''label''', '''description''', '''default''': See [[DescriptionWML#WML_Format|DescriptionWML]].&lt;br /&gt;
** '''value''': {{DevFeature1.13|?}} Gives the option a value to be stored in a variable.&lt;br /&gt;
** '''[show_if]''': if present then this option will only be displayed if the conditional statement in this tag is passed (see [[ConditionalActionsWML#Condition_Tags|ConditionalActionsWML]])&lt;br /&gt;
** '''[command]''': an element containing actions which are executed if the option is selected.&lt;br /&gt;
* '''variable''': {{DevFeature1.13|?}} If present, either the index or the value of the chosen option will be stored in the specified variable. Option indexing starts from 1. If option has '''[show_if]''' condition evaluated as false, then it is hidden and excluded from the indexing.&lt;br /&gt;
* {{anchor|message-text_input|'''[text_input]'''}}: there can be only one [text_input] tag. this adds a text input field to the message. ''Note: Messages with text_input will not be shown at all in prestart events''&lt;br /&gt;
** '''variable''': the variable that the user's input will be written to&lt;br /&gt;
** '''label''': a text label to the left of the input field&lt;br /&gt;
** '''max_length''': the maximum number of characters that may be typed into the field&lt;br /&gt;
** '''text''': text that is written into the field in the beginning&lt;br /&gt;
* Check [[EventWML#Multiplayer_safety]] to find out in which events you can safely use '''[option]''' and '''[text_input]''' without causing OOS.&lt;br /&gt;
&lt;br /&gt;
=== Formatting ===&lt;br /&gt;
'''[message]''' and other tags such as unit names (user_description), objectives, and floating text can make use of [https://docs.gtk.org/Pango/pango_markup.html#pango-markup Pango markup formatting codes].&lt;br /&gt;
&lt;br /&gt;
Prefer to use single quotes (') instead of double quotes (&amp;quot;) within the formatting string, as double quotes would need to be escaped in WML (&amp;quot;&amp;quot;). Escaping markup can be done with [https://github.com/wesnoth/wesnoth/blob/9daa10a9f27c5a95520e871417bbd72aa52aa688/src/font/pango/escape.hpp#L38-L42 HTML entities].&lt;br /&gt;
&lt;br /&gt;
For example, if you wanted to write &amp;quot;You are victorious!&amp;quot; in large, italic, gold letters, you might write it this way:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;span color='#BCB088' size='large' font-style='italic'&amp;gt;You are victorious!&amp;lt;/span&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These are the codes taken from the Pango markup formatting guide:&lt;br /&gt;
&lt;br /&gt;
*'''font''', '''font_desc''': A font description string, such as &amp;quot;Sans Italic 12&amp;quot;.&lt;br /&gt;
*'''font_family''', '''face''': A font family name.&lt;br /&gt;
*'''font_size''', '''size''': Font size in 1024ths of a point, or one of the absolute sizes 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', or one of the relative sizes 'smaller' or 'larger'.&lt;br /&gt;
*'''font_style''', '''style''': One of 'normal', 'oblique', 'italic'.&lt;br /&gt;
*'''font_weight''', '''weight''': One of 'ultralight', 'light', 'normal', 'bold', 'ultrabold', 'heavy', or a numeric weight.&lt;br /&gt;
*'''font_variant''', '''variant''': One of 'normal' or 'smallcaps'.&lt;br /&gt;
*'''font_stretch''', '''stretch''': One of 'ultracondensed', 'extracondensed', 'condensed', 'semicondensed', 'normal', 'semiexpanded', 'expanded', 'extraexpanded', 'ultraexpanded'.&lt;br /&gt;
*'''foreground''', '''fgcolor''', '''color''': An RGB color specification such as '#00FF00' or a color name such as 'red'. The full list of color names may be found in Pango's [https://github.com/GNOME/pango/blob/main/tools/rgb.txt rgb.txt] file.&lt;br /&gt;
*'''background, bgcolor''': An RGB color specification such as '#00FF00' or a color name such as 'red'.&lt;br /&gt;
*'''underline''': One of 'none', 'single', 'double', 'low', 'error'.&lt;br /&gt;
*'''underline_color''': The color of underlines; an RGB color specification such as '#00FF00' or a color name such as 'red'.&lt;br /&gt;
*'''rise''': Vertical displacement, in 10000ths of an em. Can be negative for subscript, positive for superscript.&lt;br /&gt;
*'''strikethrough''': 'true' or 'false' whether to strike through the text.&lt;br /&gt;
*'''strikethrough_color''': The color of strikethrough lines; an RGB color specification such as '#00FF00' or a color name such as 'red'&lt;br /&gt;
*'''fallback''': 'true' or 'false' whether to enable fallback. If disabled, then characters will only be used from the closest matching font on the system. No fallback will be done to other fonts on the system that might contain the characters in the text. Fallback is enabled by default. Most applications should not disable fallback.&lt;br /&gt;
*'''letter_spacing''': Inter-letter spacing in 1024ths of a point.&lt;br /&gt;
*'''gravity''': One of 'south', 'east', 'north', 'west', 'auto'.&lt;br /&gt;
*'''gravity_hint''': One of 'natural', 'strong', 'line'.&lt;br /&gt;
&lt;br /&gt;
The following pango attributes are also available directly as attributes of the '''[message]''' tag:&lt;br /&gt;
{{DevFeature1.13|4}}&lt;br /&gt;
&lt;br /&gt;
*'''font'''&lt;br /&gt;
*'''font_family'''&lt;br /&gt;
*'''font_size'''&lt;br /&gt;
*'''font_style'''&lt;br /&gt;
*'''font_weight'''&lt;br /&gt;
*'''font_variant'''&lt;br /&gt;
*'''font_stretch'''&lt;br /&gt;
*'''color'''&lt;br /&gt;
*'''bgcolor'''&lt;br /&gt;
*'''underline'''&lt;br /&gt;
*'''underline_color'''&lt;br /&gt;
*'''rise'''&lt;br /&gt;
*'''strikethrough'''&lt;br /&gt;
*'''strikethrough_color'''&lt;br /&gt;
*'''fallback'''&lt;br /&gt;
*'''letter_spacing'''&lt;br /&gt;
*'''gravity'''&lt;br /&gt;
*'''gravity_hint'''&lt;br /&gt;
&lt;br /&gt;
== [objectives] ==&lt;br /&gt;
The other tag used for plot development is '''[objectives]'''.&lt;br /&gt;
The '''[objectives]''' tag overwrites any previously set objectives,&lt;br /&gt;
and displays text which should describe the objectives of the scenario.&lt;br /&gt;
Scenario objectives are displayed on the player's first turn after the tag is used,&lt;br /&gt;
or as part of the event if it triggers during that player's turn.&lt;br /&gt;
Objectives can also be accessed at any time in a scenario using the&lt;br /&gt;
&amp;quot;Scenario Objectives&amp;quot; game menu option, making this tag useful for&lt;br /&gt;
scenario-specific information that the player may need to refer to during play.&lt;br /&gt;
&lt;br /&gt;
Attributes of '''[objectives]''':&lt;br /&gt;
* '''side''': Default '0'. The side to set the objectives for. A value of 0 sets objectives for all sides. note: There are side-specific objectives and default objectives, which are used in case a side doesn't have specific ones. Specifying 0 sets the default ones.&lt;br /&gt;
* '''[[StandardSideFilter]]''' tags and keys: Sets the objectives of all matching sides to these passed specifications (the rest of this [objectives] tag). If no sides (such as when passing side=0) or all sides match, sets the default objectives, and the side specific ones for the matching sides otherwise.&lt;br /&gt;
* '''bullet''': Default '• '. Replaces the default bullet, with whatever is passed, for all objectives, gold carryover notes, and notes defined with [note].&lt;br /&gt;
* '''summary''': Displayed first in the objectives text, this should describe the basic objective for the overall scenario.  Can be omitted.&lt;br /&gt;
* '''note''': Displayed last in the objectives text, this is sometimes used for hints or additional information.  Can be omitted.&lt;br /&gt;
* '''victory_string''': Default ' _ &amp;quot;Victory:&amp;quot;', this text precedes the victory objectives. Can be set to &amp;quot;&amp;quot; too.&lt;br /&gt;
* '''defeat_string''': Default ' _ &amp;quot;Defeat:&amp;quot;', this text precedes the defeat objectives. Can be set to &amp;quot;&amp;quot; too.&lt;br /&gt;
* '''gold_carryover_string''': Default ' _ &amp;quot;Gold carryover:&amp;quot;', this text precedes the gold carryover information.&lt;br /&gt;
* '''notes_string''': Default ' _ &amp;quot;Notes:&amp;quot;', this text precedes the notes.&lt;br /&gt;
* '''silent''': Default: not present. If set to &amp;quot;yes&amp;quot;, the objectives are silently changed. Else, they will be shown to the user when appropriate.&lt;br /&gt;
* '''delayed_variable_substitution''': {{DevFeature1.13|8}} If set to yes, any variables or [insert_tag] are not substituted right away. Instead, they are substituted whenever the objectives are actually viewed.&lt;br /&gt;
&lt;br /&gt;
Tags of '''[objectives]''':&lt;br /&gt;
* {{anchor|objectives-objective|'''[objective]'''}}: describes a win or loss condition. Most scenarios have multiple win or loss conditions, so use a separate [objective] subtag for each line; this helps with translations.&lt;br /&gt;
** '''bullet''': Default '• ' or whatever is set in the parent [objectives] block. Replaces the default bullet, with whatever is provided, for the objective defined by the [objective] block.&lt;br /&gt;
** '''red''': Default '0' for winning objectives, '255' for losing objectives. Overrides the default red coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''green''': Default '255' for winning objectives, '0' for losing objectives. Overrides the default green coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''blue''': Default '0'. Overrides the default blue coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''description''': text for the specific win or loss condition.&lt;br /&gt;
** '''caption''': a text which will be displayed above the ''description''. This can be used to display a subcategory of objectives below ''victory_string'' or ''defeat_string''.&lt;br /&gt;
** '''condition''': The color and placement of the text. Values are 'win'(colored green, placed after ''victory_string'') and 'lose'(colored red, placed after ''defeat_string'').&lt;br /&gt;
** '''show_turn_counter''': If set to yes, displays the number of turns remaining in the scenario. Default is no.&lt;br /&gt;
** '''[show_if]''': A condition that disables the objective if it doesn't hold. Conditional objectives are refreshed at '''[show_objectives]''' time only, or when manually opening the scenario objectives.&lt;br /&gt;
* {{anchor|objectives-gold_carryover|'''[gold_carryover]'''}}: describes how the gold carryover works in this scenario. This is intended to be a more convenient way of displaying carryover information than using the note= key in [objectives].&lt;br /&gt;
** '''bullet''': Default '• ' or whatever is set in the parent [objectives] block. Replaces the default bullet with whatever is provided.&lt;br /&gt;
** '''red''': Default '255'. Overrides the default red coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''green''': Default '255'. Overrides the default green coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''blue''': Default '192'. Overrides the default blue coloring of the entire objective, including the bullet.&lt;br /&gt;
** '''bonus''' (boolean): whether an early finish bonus is granted. If omitted, early finish bonus is not mentioned.&lt;br /&gt;
** '''carryover_percentage''': the amount of carryover gold. If omitted, the amount is not mentioned.&lt;br /&gt;
** '''[show_if]''': {{DevFeature1.13|11}} Gold carryover will not be shown if the specified condition isn't met. Conditional gold carryover is refreshed at '''[show_objectives]''' time only.&lt;br /&gt;
* {{anchor|objectives-note|'''[note]'''}}: describes a note, usually used for hints or additional information. This is an easier way of adding several notes than concatenating them together into a single string to use with the ''note='' key.&lt;br /&gt;
** '''bullet''': Default '• ' or whatever is set in the parent [objectives] block. Replaces the default bullet with whatever is provided for the note defined by the [note] block.&lt;br /&gt;
** '''red''': Default '255'. Overrides the default red coloring of the entire note, including the bullet.&lt;br /&gt;
** '''green''': Default '255'. Overrides the default green coloring of the entire note, including the bullet.&lt;br /&gt;
** '''blue''': Default '255'. Overrides the default blue coloring of the entire note, including the bullet.&lt;br /&gt;
** '''description''': the text of the note.&lt;br /&gt;
** '''[show_if]''': The note will not be shown if the specified condition isn't met. Conditional notes are refreshed at '''[show_objectives]''' time only.&lt;br /&gt;
&lt;br /&gt;
== [set_menu_item] ==&lt;br /&gt;
This tag is used to add a custom option in the right-click context menu which can then be used to trigger arbitrary WML commands. The menu items can be set and modified during any event, for example during &amp;quot;start&amp;quot; or &amp;quot;prestart&amp;quot; events. The user can also assign hotkeys to these WML commands unless specified otherwise. When the hotkey is pressed the event will be fired/filtered at the current mouse position.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Due to limitations in portable devices where there are no scroll bars for context menus, there is a hard-coded limit of 7 custom WML menu items. If you really need to have more than 7 menu items, try combining some of them in a submenu. {{DevFeature1.13|0}} This limitation is being removed in a [http://forums.wesnoth.org/viewtopic.php?p=572554#p572554 future version] of Wesnoth.&lt;br /&gt;
&lt;br /&gt;
* '''id''': the unique id for this menu item. If a menu item with this id already exists, it allows you to set specific changes to that item. All menus will be sorted lexicographically by the id string. The ordering is underscores, digits, and finally letters.&lt;br /&gt;
* '''description''': the in-game text that will appear for this item in the menu.&lt;br /&gt;
* '''image''': the image to display next to this item.&lt;br /&gt;
* '''needs_select''': if ''yes'' (default ''no''), then the latest select event (see [[EventWML]]) that triggered before this menu item was chosen will be transmitted over the network before this menu item action will be. This only has any effect in networked multiplayer, and is intended to allow more elaborate menu item behaviour there without causing out of sync errors. If you don't know what this means, just leave it. {{DevFeature1.13|6}} ''needs_select=yes'' is deprecated, consider using manual variable syncing with [sync_variable].&lt;br /&gt;
* '''synced''' {{DevFeature1.13|1}}: if ''no'' (default ''yes'') the command handler will only be run on the client that invoked the menu item; this means that changing the gamestate in a command handler of a menu item with ''synced=no'' will cause OOS&lt;br /&gt;
* '''use_hotkey''': if ''no'' (default ''yes''), then the user cannot assign hotkeys to this menu item. If ''only'', the menu item is only accessible via hotkeys, not via right-click context; you can use this in combination with [default_hotkey] if you want custom hotkeys in your campaign/mp. &lt;br /&gt;
* '''[show_if]''': If present, the menu item will only be available if the conditional statement (see [[ConditionalActionsWML#Condition_Tags|ConditionalActionsWML]]) within evaluates to true. When this is evaluated, the WML variables ''$x1'' and ''$y1'' will point to the location on which the context menu was invoked, so it's possible to for example only enable the option on empty hexes or on a particular unit.&lt;br /&gt;
* '''[filter_location]''': contains a [[StandardLocationFilter]] similar to the one found inside Single Unit Filters. The menu item will only be available on matching locations.&lt;br /&gt;
* '''[default_hotkey]''': contains a hotkey WML to specify what hotkey to assign to this, '''if the user has no hotkey assigned to this yet'''. (Unlike the rest of a menu item definition, modifying this tag has no effect on the game; it is only effective when initially defining a menu item.) Hotkey WML matches the format in the preferences file and contains the following keys:&lt;br /&gt;
** '''key''': a string that contains the key to assign to this.&lt;br /&gt;
** '''alt''', '''shift''', '''cmd'''(apple only), '''ctrl''':  boolean values.&lt;br /&gt;
** '''repeat_on_hold''' {{DevFeature1.13|12}}: if ''yes'' (default ''no''), holding the hotkey will repeat the action continuously, unless it blocks input with something like '''[message]'''. Due to a bug, versions older than 1.13.12 always repeat the action, with no way to disable it.&lt;br /&gt;
* '''[command]''': contains the WML actions to be executed when the menu item is selected. Again, the WML variables ''$x1'' and ''$y1'' will point to the location on which the context menu was invoked on.&lt;br /&gt;
** '''delayed_variable_substitution ''' (boolean yes|no, default: yes): If no, forces a variable substitution run onto the wml included in this [command] block. Use this, if you want variables which are to substitute to get the values they have at execution time of the event where this set_menu_item appears. Other than that, they get the values they have at invocation time of the menu item.&lt;br /&gt;
* '''image''': image shown next to the menu item, defaults to &amp;quot;buttons/WML-custom.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== [clear_menu_item] ==&lt;br /&gt;
&lt;br /&gt;
Removes a menu item from the scenario.&lt;br /&gt;
Normally menu items are, including all their defining wml, automatically carried over between scenarios. This tag prevents this. (The behavior is comparable to set_variable/clear_variable).&lt;br /&gt;
* '''id''': (string): id of the menu item to clear. Can be a comma-separated list.&lt;br /&gt;
&lt;br /&gt;
== Other interface tags ==&lt;br /&gt;
&lt;br /&gt;
The following tags are also action tags:&lt;br /&gt;
&lt;br /&gt;
=== [change_theme] ===&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|8}}&lt;br /&gt;
&lt;br /&gt;
Change the current interface theme.&lt;br /&gt;
&lt;br /&gt;
* '''theme''': The ID of the new theme. Use &amp;lt;code&amp;gt;theme=&amp;lt;/code&amp;gt; (empty key) to switch back to the theme that the player has selected in Preferences. On &amp;lt;b&amp;gt;1.14.2&amp;lt;/b&amp;gt; and later it is also possible to omit the key entirely to achieve the same effect (on previous versions this will crash the Lua engine).&lt;br /&gt;
&lt;br /&gt;
=== [item] ===&lt;br /&gt;
Makes a graphical item appear on a certain hex. Note this only places the graphics for an item. It does not make the item do anything. Use a moveto event to make moving onto the item do something. &amp;lt;tt&amp;gt;''('''Hint:''' There are a number of predefined items that are used in various campaigns that you can make use of. You can find [http://www.wesnoth.org/macro-reference.xhtml#file:items.cfg a list of them] if you look into the items.cfg file in the wesnoth install directory (under /data/core/macros).)''&amp;lt;/tt&amp;gt;&lt;br /&gt;
* '''x''', '''y''': the location to place the item. (only for [event][item]: full [[StandardLocationFilter|SLF]] support)&lt;br /&gt;
* '''image''': the image (in ''images/'' as .png) to place on the hex. This image is aligned with the top-left of the hex (which is 72 pixels wide and 72 pixels tall). It is drawn underneath units. ''('''Hint:''' If using an image smaller than 72x72, then it might be useful to [[ImagePathFunctions#Blit_Function|BLIT]] the image onto &amp;lt;tt&amp;gt;misc/blank-hex.png&amp;lt;/tt&amp;gt; (a blank 72x72 image).)''&lt;br /&gt;
* '''halo''': an image to place centered on the hex. It is drawn on top of units. Use this instead of ''image'' if the image is bigger than the hex or if you want to animate an image (https://github.com/wesnoth/wesnoth/issues/1219).&lt;br /&gt;
* '''name''' an id that can be used to remove the item.&lt;br /&gt;
''Example (where the integer after the colon is the duration of each frame or square bracket expansion as per AnimationWML is used): halo=scenery/fire1.png:100,scenery/fire2.png:100,scenery/fire3.png:100,scenery/fire4.png:100,scenery/fire5.png:100,scenery/fire6.png:100,scenery/fire7.png:100,scenery/fire8.png:100''&lt;br /&gt;
or equivalently (requires Wesnoth 1.11.2+):&lt;br /&gt;
''halo=scenery/fire[1~8].png:100''&lt;br /&gt;
* '''team_name''': name of the team for which the item is to be displayed (hidden for others). For multiple teams just put all the names in one string, for example separated by commas. {{DevFeature1.15|0}} In 1.14 the '''[side]team_name''' attribute was expected to be a substring of this '''team_name'''. In 1.15 both are expected to be comma-separated lists of names and the item is visible if the lists intersect. ([[https://github.com/wesnoth/wesnoth/pull/3533|#3533]])&lt;br /&gt;
* '''visible_in_fog''': whether the item should be visible through fog or not. Default yes.&lt;br /&gt;
* '''redraw''': (boolean yes|no, default: yes): If no, disables implicit calls to [[InterfaceActionsWML#.5Bredraw.5D|[redraw]]] when placing the items.&lt;br /&gt;
* '''[filter_team]''': {{DevFeature1.15|0}} A [[StandardSideFilter]]. Set '''team_name''' to the union of all '''[side]team_name''' attributes of all sides that match the SSF. ([[https://github.com/wesnoth/wesnoth/pull/3533|#3533]])&lt;br /&gt;
* {{DevFeature1.15|0}} If both '''team_name''' and '''[filter_team]''' are set, '''team_name''' is ignored.&lt;br /&gt;
&lt;br /&gt;
=== [remove_item] ===&lt;br /&gt;
Removes any graphical items on a given hex.&lt;br /&gt;
* [[StandardLocationFilter]]: the hexes to remove items from&lt;br /&gt;
* '''image''': if specified, only removes the given item if one of its 'image', 'halo' or 'name' attributes is exactly this value. (for 'halo' and 'image' this in particular means that the image name must include any [[ImagePathFunctions|image path functions]] appended to the original image name.)&lt;br /&gt;
&lt;br /&gt;
=== [print] ===&lt;br /&gt;
Displays a message across the screen. The message will disappear after a certain time, or when another [print] tag is encountered.&lt;br /&gt;
* '''text''': (translatable) the text to display. Can be an empty string to remove a previous message without showing a new one.&lt;br /&gt;
* '''size''': (default=12) the pointsize of the font to use&lt;br /&gt;
* '''duration''': the length of time to display the text for.&lt;br /&gt;
** (Before 1.15.4) This is measured in the number of 'frames', and the default is 50. A frame in Wesnoth is usually displayed for around 30ms.&lt;br /&gt;
** {{DevFeature1.15|4}} This is measured in milliseconds. Don't use the default value, because it's a mere 50ms.&lt;br /&gt;
** {{DevFeature1.15|14}} The default is 5000 milliseconds.&lt;br /&gt;
** {{DevFeature1.15|14}} The string '''unlimited''' displays the text until it's removed by another [print] tag.&lt;br /&gt;
* '''color''': (default '''0,0,0''') three comma-separated values giving the red, green and blue values (0-255).&lt;br /&gt;
* '''red''', '''green''', '''blue''': deprecated, use color=0,0,0 instead.&lt;br /&gt;
&lt;br /&gt;
=== [move_unit_fake] ===&lt;br /&gt;
Moves an image of a unit along a certain path on the map. The path does not need to be a continuous list of adjacent hexes, so for example only the start and end points can be given, in which case the straightest line between those points will be calculated and used.&lt;br /&gt;
* '''type''': the type of the unit whose image to use&lt;br /&gt;
* '''x''': a comma-separated list of x locations to move along&lt;br /&gt;
* '''y''': a comma-separated list of y locations to move along (x and y values are matched pairs)&lt;br /&gt;
* '''side''': the side of the fake unit, used for team-coloring the fake unit&lt;br /&gt;
* '''gender''': the gender of the fake unit. Example: gender=female&lt;br /&gt;
* '''variation''': the variation of the fake unit. Example: variation=undead&lt;br /&gt;
* '''image_mods''': [[ImagePathFunctions|image path functions]] sequence to be applied on the fake unit.&lt;br /&gt;
* '''force_scroll''':  Whether to scroll the map or not even when [[#.5Block_view.5D|[lock_view]]] is in effect or ''Follow Unit Actions'' is disabled in ''Advanced Preferences''. Defaults to ''yes'' starting with version '''1.11.6'''; the attribute did not exist in previous versions and this action behaved as if ''no'' was passed instead.&lt;br /&gt;
&lt;br /&gt;
=== [move_units_fake] ===&lt;br /&gt;
moves multiple images of units along paths on the map. These units are moved in lockstep.&lt;br /&gt;
* '''force_scroll''': {{DevFeature1.15|0}} Has the same meaning as in [move_unit_fake] but a different default.&lt;br /&gt;
* '''[fake_unit]''': A fake unit to move&lt;br /&gt;
** '''type''': the type of unit whose image to use&lt;br /&gt;
** '''x''': a comma-separated list of x locations to move along&lt;br /&gt;
** '''y''': a comma-separated list of y locations to move along (x and y values are matched pairs)&lt;br /&gt;
** '''side''': the side of the fake unit, used for team-coloring the fake unit&lt;br /&gt;
** '''skip_steps''': the number of steps to skip before this unit starts moving&lt;br /&gt;
&lt;br /&gt;
=== [hide_unit] ===&lt;br /&gt;
Temporarily prevents the engine from displaying the given unit. The unit does not become invisible, as it would be with the '''[hides]''' ability; it is still the same plain unit, but without an image. Useful in conjunction with '''[move_unit_fake]''': to move a leader unit into position on-screen. Until 1.8 each '''[hide_unit]''' tag only hides one unit.&lt;br /&gt;
* [[StandardUnitFilter]]: All matching units will be hidden&lt;br /&gt;
&lt;br /&gt;
=== [unhide_unit] ===&lt;br /&gt;
Stops the currently hidden units from being hidden.&lt;br /&gt;
* [[StandardUnitFilter]]: Only the matching units will be unhidden&lt;br /&gt;
&lt;br /&gt;
=== [lock_view] ===&lt;br /&gt;
Locks gamemap view scrolling for human players, so they cannot scroll the gamemap view until it is unlocked. WML or Lua actions such as '''[scroll_to]''' will continue to work normally, as they ignore this restriction; the locked/unlocked state is preserved when saving the current game.&lt;br /&gt;
&lt;br /&gt;
This feature is generally intended to be used in cutscenes to prevent the player scrolling away from scripted actions.&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|8}} This now also blocks the player from zooming the gamemap view. WML or Lua zoom will continue to work normally.&lt;br /&gt;
&lt;br /&gt;
=== [unlock_view] ===&lt;br /&gt;
Unlocks gamemap view scrolling for human players.&lt;br /&gt;
&lt;br /&gt;
=== [scroll] ===&lt;br /&gt;
Scroll a certain number of pixels in a given direction. Useful for earthquake/shaking effects.&lt;br /&gt;
* '''x''', '''y''': the number of pixels to scroll along the x and y axis&lt;br /&gt;
* '''side''': the side or sides for which this should happen. By default, the [scroll] happens for everyone.&lt;br /&gt;
* '''[filter_side]''': a [[StandardSideFilter]] to select the sides for which this should happen. By default, the [scroll] happens for everyone.&lt;br /&gt;
&lt;br /&gt;
=== [scroll_to] ===&lt;br /&gt;
Scroll to a given hex&lt;br /&gt;
* [[StandardLocationFilter]], do not use a [filter_location] sub-tag. If more than one location matches the filter, only the first matching location will be used.&lt;br /&gt;
* '''check_fogged''': whether to scroll even to locations covered in fog or shroud. Possible values ''yes'' (don't scroll to fog) and ''no'' (scroll even to fog), with ''no'' as the default.&lt;br /&gt;
* '''immediate''': whether to instantly warp to the target hex regardless of the scroll speed setting in Preferences (defaults to ''no'').&lt;br /&gt;
* '''highlight''': {{DevFeature1.13|5}} Whether to highlight the hex being scrolled to (defaults to ''no'').&lt;br /&gt;
* '''side''': the side or sides for which this should happen. By default, the [scroll_to] happens for everyone.&lt;br /&gt;
* '''[filter_side]''': a [[StandardSideFilter]] to select the sides for which this should happen. By default, the [scroll_to] happens for everyone.&lt;br /&gt;
&lt;br /&gt;
=== [scroll_to_unit] ===&lt;br /&gt;
Scroll to a given unit&lt;br /&gt;
* [[StandardUnitFilter]]; do not use a [filter] subtag.&lt;br /&gt;
* '''check_fogged''': whether to scroll even to locations covered in fog or shroud. Possible values ''yes'' (don't scroll to fog) and ''no'' (scroll even to fog), with ''no'' as the default.&lt;br /&gt;
* '''immediate''': whether to instantly warp to the target hex regardless of the scroll speed setting in Preferences (defaults to ''no'').&lt;br /&gt;
* '''highlight''': {{DevFeature1.13|5}} Whether to highlight the hex the unit is on (defaults to ''no'').&lt;br /&gt;
* '''for_side''': the side or sides for which this should happen. By default, the [scroll_to_unit] happens for everyone.&lt;br /&gt;
* '''[for_side]''': a [[StandardSideFilter]] to select the sides for which this should happen. By default, the [scroll_to_unit] happens for everyone.&lt;br /&gt;
&lt;br /&gt;
=== [select_unit] ===&lt;br /&gt;
Selects a given unit.&lt;br /&gt;
* [[StandardUnitFilter]]: The first unit found will be selected.&lt;br /&gt;
* '''fire_event''': whether a ''select'' event should be triggered or not (def. ''no''). (Note that select events aren't multiplayer save.)&lt;br /&gt;
* '''highlight''': whether the unit's current hex should be highlighted (def. ''yes'').&lt;br /&gt;
&lt;br /&gt;
'''Note:''' fire_event does not appear to work in 1.14 or 1.16.&lt;br /&gt;
&lt;br /&gt;
=== [sound]===&lt;br /&gt;
Plays a sound&lt;br /&gt;
* '''name''': the filename of the sound to play (in ''sounds/'' as .wav or .ogg). This can be a comma-separated list, from which one sound will be chosen randomly.&lt;br /&gt;
* '''repeat''': repeats the sound for a specified additional number of times (default=0)&lt;br /&gt;
&lt;br /&gt;
=== [sound_source] ===&lt;br /&gt;
Creates a sound source. &amp;quot;Sound sources&amp;quot; is a general name for a mechanism which makes possible for map elements to emit sounds according to some rules, where &amp;quot;map elements&amp;quot; can be specific locations or terrain types. For now, only sound sources tied to locations are supported.&lt;br /&gt;
* '''id''': a unique identification key of the sound source&lt;br /&gt;
* '''sounds''': a list of comma separated, randomly played sounds associated with the sound source&lt;br /&gt;
* '''delay''': a numerical value (in milliseconds) of the minimal delay between two playbacks of the source's sound if the source remains visible on the screen; if one scrolls out and back in, the source will be considered as ready to play&lt;br /&gt;
* '''chance''': a percentage (a value from 0 to 100) describing the chance of the source being activated every second after the delay has passed or when the source's location appears on the screen (note that it cannot play more than one file at the same time)&lt;br /&gt;
* '''check_fogged''': possible values ''yes'' and ''no'' - ''yes'' means the source will not play if its locations are fogged&lt;br /&gt;
* '''check_shrouded''': possible values ''yes'' and ''no'' - ''yes'' means the source will not play if its locations are shrouded&lt;br /&gt;
* '''x,y''': similar to x,y as found in a [[StandardLocationFilter]], these are the locations associated with the sound source&lt;br /&gt;
* '''fade_range''' (default = 3): distance in hexes that determines a &amp;quot;circular&amp;quot; area around the one specified by '''full_range''' where sound volume fades out linearly&lt;br /&gt;
* '''full_range''' (default = 14): distance in hexes that determines a &amp;quot;circular&amp;quot; area where source plays with full volume, relative to screen center&lt;br /&gt;
* '''loop''': number of times a sound sample should be looped if it stays visible. -1 means infinite (~65000)&lt;br /&gt;
&lt;br /&gt;
=== [story] ===&lt;br /&gt;
{{DevFeature1.13|8}}&lt;br /&gt;
&lt;br /&gt;
Shows the story screen.&lt;br /&gt;
* '''title''': Default title used if a part does not specify one — unlike the intro storyscreen, the scenario name is not used as a default title.&lt;br /&gt;
* '''[part]''', '''[if]''', '''[switch]''', '''[wml_message]''', '''[deprecated_message]''' : See [[IntroWML]].&lt;br /&gt;
&lt;br /&gt;
=== [remove_sound_source] ===&lt;br /&gt;
Removes a previously defined sound source.&lt;br /&gt;
* '''id''': the identification key of the sound source to remove&lt;br /&gt;
&lt;br /&gt;
=== [music] ===&lt;br /&gt;
Switches to playing different music&lt;br /&gt;
* '''name''': the filename of the music to play (in ''music/'' as .ogg)&lt;br /&gt;
* see [[MusicListWML]] for the correct syntax&lt;br /&gt;
&lt;br /&gt;
=== [volume] ===&lt;br /&gt;
Changes the game volume to a percent of the preferences volume for the game being played. Values can go from 0 to 100:  &lt;br /&gt;
* '''music''':  Changes the music volume.&lt;br /&gt;
* '''sound''':  Changes the sound volume.&lt;br /&gt;
&lt;br /&gt;
=== [color_adjust] ===&lt;br /&gt;
Adjust the color tint of terrain, by adjusting time-of-day coloring.&lt;br /&gt;
* '''red''', '''green''', '''blue''': values from -255 to 255, the amount to tint by for each color&lt;br /&gt;
&lt;br /&gt;
=== [screen_fade] ===&lt;br /&gt;
{{DevFeature1.17|6}}&lt;br /&gt;
&lt;br /&gt;
Overlay the game display with the given color, fading over the specified duration. This can be used for screen fade effects.&lt;br /&gt;
* '''red''', '''green''', '''blue''': values from 0 to 255, the final overlay color (defaults to 0,0,0)&lt;br /&gt;
* '''alpha''': value from 0 to 255, the strength of the effect. 0 means no effect and can be used to fade in. 255 means fully opaque and can be used to fully fade out to the given color. Intermediate values will end up with a partial overlay tint on the game screen.&lt;br /&gt;
* '''duration''': the length of time it will take to complete the fade, in milliseconds. If 0 the effect is immediate.&lt;br /&gt;
&lt;br /&gt;
=== [delay] ===&lt;br /&gt;
Pauses the game.&lt;br /&gt;
* '''time''': the time to pause in milliseconds&lt;br /&gt;
* '''accelerate ''' (boolean yes|no, default no): {{DevFeature1.13|0}} whether the delay is affected by acceleration. When [delay] is used to make an animation, this should be set to yes so that your animation matches the ones generated by the game.&lt;br /&gt;
&lt;br /&gt;
=== [redraw] ===&lt;br /&gt;
Redraws the screen (this normally isn't done during events, although some of the other interface actions cause the screen or parts of it to be redrawn).&lt;br /&gt;
* '''clear_shroud''' (boolean yes|no, default no): If yes, clears fog and shroud around existing units. Useful if you, for example, spawn friendly units in the middle of an event and want the shroud to update accordingly (otherwise units that spawn inside fog would remain invisible for the duration of the event, since the fog would not automatically get cleared around them).&lt;br /&gt;
* '''[[StandardSideFilter]]''': the sides for which to recalculate fog and shroud.&lt;br /&gt;
* '''side''': If used (forces clear_shroud=yes), clears fog and shroud for that side.&lt;br /&gt;
&lt;br /&gt;
=== [unit_overlay] ===&lt;br /&gt;
Sets an image that will be drawn over a particular unit, and follow it around&lt;br /&gt;
* [[StandardUnitFilter]]: All matching units will get the overlay (do not use [filter])&lt;br /&gt;
* '''image''': the image to place on the unit&lt;br /&gt;
* '''object_id''': object id to use, defaults to the '''image''' key with an &amp;quot;overlay_&amp;quot; prefix; this allows using [[DirectActionsWML#.5Bremove_object.5D|'''[remove_object]''']]&lt;br /&gt;
* '''duration''': object duration&lt;br /&gt;
&lt;br /&gt;
=== [remove_unit_overlay] ===&lt;br /&gt;
Removes a particular overlayed image from a unit&lt;br /&gt;
* [[StandardUnitFilter]]: The overlay will get removed from all matching units (do not use [filter])&lt;br /&gt;
* '''image''': the image to remove from the unit&lt;br /&gt;
* '''object_id''': object id to use&lt;br /&gt;
Using [[DirectActionsWML#.5Bremove_object.5D|'''[remove_object]''']] is also possible, see https://github.com/wesnoth/wesnoth/commit/26c2f941f2bcdd89528481e114c0375ad2a46271&lt;br /&gt;
&lt;br /&gt;
=== [animate_unit] ===&lt;br /&gt;
Uses an animation of a unit to animate it on screen (if the unit has the corresponding animation).&lt;br /&gt;
* '''flag''': The key to find the custom animation in the unit description (see the '''[extra_anim]''' description in [[AnimationWML]]). Standard animations can be triggered with the following keywords: ''leading recruited standing idling levelout levelin healing healed poisoned movement defend attack death victory pre_teleport post_teleport''&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument, see [[FilterWML]]. By default, the unit at the event location will be animated. You can use this tag to choose any other unit to animate.&lt;br /&gt;
* '''[primary_attack]''': If this tag is not present, the filter for animation will be triggered with no attack. If it is here, all attacks from the unit will be filtered, and a matching one will be used to filter the animation. Takes a weapon filter as argument, see [[FilterWML]].&lt;br /&gt;
* '''[secondary_attack]''': Similar to '''[primary_attack]'''. May be needed to trigger a defense animation correctly, if there are more than one animations available for the defending unit.&lt;br /&gt;
* '''hits''': yes/no/hit/miss/kill: which according variation of a attack/defense animation shall be chosen (required)&lt;br /&gt;
* '''text''': a text to hover during the animation &lt;br /&gt;
* '''male_text''', '''female_text''': {{DevFeature1.13|2}} (translatable) gender-specific versions of the above&lt;br /&gt;
* '''red''': red value for the text color (0-255)&lt;br /&gt;
* '''green''': green value for the text color&lt;br /&gt;
* '''blue''': blue value for the text color&lt;br /&gt;
* '''with_bars''': yes/no: whether to display the status bars during the animation (e.g. the hitpoint bar)&lt;br /&gt;
* '''[animate]''': a sub block with the same syntax as '''[animate_unit]''' except that the '''[filter]''' block is mandatory to find the unit. This block will find and animate another unit simultaneously.&lt;br /&gt;
* '''[facing]''': a [[StandardLocationFilter]] specifying what hex the unit should be facing when animated&lt;br /&gt;
&lt;br /&gt;
=== [label] ===&lt;br /&gt;
Places a label on the map.&lt;br /&gt;
* '''x''', '''y''': the location of the label. {{DevFeature1.13|1}} (only for [event][label]: full [[StandardLocationFilter|SLF]] support)&lt;br /&gt;
* '''text''': what the label should say. If you put an empty string &amp;lt;code&amp;gt;&amp;quot;&amp;quot;&amp;lt;/code&amp;gt; as an argument, the label will be completely removed. Use this method if you want to remove a specific label from any location.&lt;br /&gt;
* '''team_name''': if specified, the label will only be visible to the given team.&lt;br /&gt;
* '''color''': color of the label. The format is r,g,b; r, g and b are numbers between 0 and 255.&lt;br /&gt;
* '''visible_in_fog''': whether the label should be visible through fog or not. Default yes.&lt;br /&gt;
* '''visible_in_shroud''': whether the label should be visible through shroud or not. Default no.&lt;br /&gt;
* '''immutable''': whether this label is protected from being removed or changed by players. Default yes.&lt;br /&gt;
* '''category''': the Show/Hide Labels dialog allows showing/hiding all labels of a given category by toggling a checkbox.&lt;br /&gt;
* '''tooltip''': A tooltip visible when mouseovering the hex the label is on&lt;br /&gt;
* '''side''': the number of the side that placed the label. Can be 0 for labels placed by WML.&lt;br /&gt;
&lt;br /&gt;
=== [floating_text]===&lt;br /&gt;
Floats text (similar to the damage and healing numbers) on the given locations.&lt;br /&gt;
* [[StandardLocationFilter]]: the text will be floated on all matching locations simultaneously (do not use [filter] unless you intend to match one or more units).&lt;br /&gt;
* '''text''': the text to display.&lt;br /&gt;
&lt;br /&gt;
The default text color is &amp;lt;span style=&amp;quot;color: #6b8cff;&amp;quot;&amp;gt;'''#6b8cff'''&amp;lt;/span&amp;gt;. To change the color, use [[#Formatting|Pango markup]]. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Float some golden yellow text at 20,20.&lt;br /&gt;
[floating_text]&lt;br /&gt;
   x,y=20,20&lt;br /&gt;
   text=&amp;quot;&amp;lt;span color='#cccc33'&amp;gt;&amp;quot; + _ &amp;quot;Your text here&amp;quot; + &amp;quot;&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
[/floating_text]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [deprecated_message] ===&lt;br /&gt;
Shows a deprecated message in the message area, this feature is only intended to be used to warn about deprecated macros in mainline. The message is not translatable.&lt;br /&gt;
* '''message''': the message to show.&lt;br /&gt;
* '''level''': {{DevFeature1.13|10}} The deprecation level, a number from 1 to 3.&lt;br /&gt;
* '''what''': {{DevFeature1.13|10}} The name of the thing being deprecated. Use this instead of '''message''' if possible; a stock message will be generated from it. Use '''message''' only if more information is required; it will be appended to the stock message. This should not be translatable&lt;br /&gt;
* '''version''': {{DevFeature1.13|10}} For deprecation levels 2 and 3, this indicates the version in which the feature could be removed. It does ''not'' indicate the version in which it became deprecated. &lt;br /&gt;
&lt;br /&gt;
The meanings of the deprecation levels are as follows:&lt;br /&gt;
&lt;br /&gt;
# Deprecated, but will only be removed if absolutely necessary. The '''version''' key is ignored.&lt;br /&gt;
# It will be removed no earlier than a specified version.&lt;br /&gt;
# It will be removed in the next stable version&lt;br /&gt;
# It has already been removed, leaving just a stub to inform users of how to update their code.&lt;br /&gt;
&lt;br /&gt;
Note that as of 1.13.11, deprecation messages show only in the log, not in the chat message area. The '''message''' can be translatable, but does not need to be.&lt;br /&gt;
&lt;br /&gt;
=== [wml_message] ===&lt;br /&gt;
Outputs a message to Wesnoth's console output. Intended for campaign designers to output silent text to the console, without annoying the player; then, that text might contain information useful for later bug-reporting. The log domain for it is '''wml''', and the '''debug/dbg''' log level is available for use with the '''logger''' attribute. Depending on the current log level ('''error''' by default), which may be changed with the in-game :log command, or the --log-&amp;lt;level&amp;gt;=wml command line switch, the messages are echoed to the in-game chat.&lt;br /&gt;
* '''message''': the message to show.&lt;br /&gt;
* '''logger''': the Wesnoth engine output logger that should catch the text; this might be 'err' (the errors log level), 'warn'/'wrn' (the warnings log level) or anything else (the information log level). Not all information will be displayed depending on the log level chosen when starting Wesnoth.&lt;br /&gt;
&lt;br /&gt;
Note: As of 1.9.4/1.9.5 (r48805) the following &amp;quot;loggers&amp;quot; should work: If in [wml_message]: err/error, warn/wrn/warning, debug/dbg; using the :log command: Only the long forms error, warning, info and debug (this part gathered by trying rather than source inspecting). The long forms are most likely also the only ones working when starting wesnoth with --log-&amp;lt;level&amp;gt;=wml.&lt;br /&gt;
For log level warning or error (as during normal play), only wml_messages with logger error or warning display (for both). With logger info or debug, additionally wml_messages with logger info or debug display (for both).&lt;br /&gt;
&lt;br /&gt;
=== [test_condition] ===&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|2}}&lt;br /&gt;
&lt;br /&gt;
Evaluates the contained conditional tags. If they evaluate to the expected value, it prints out a message to the console explaining which part of the condition caused this result in a way similar to [wml_message]. This can be used if your conditional test is failing and you're not sure why.&lt;br /&gt;
&lt;br /&gt;
* '''result''': Whether you expect the conditions to fail or succeed. If no (the default), a message will be printed if the conditional tags fail. If yes, a message will instead be printed if the conditional tags pass.&lt;br /&gt;
* '''logger''': Same as for [wml_message]. Defaults to &amp;quot;warning&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== [open_help] ===&lt;br /&gt;
Opens the in-game help.&lt;br /&gt;
* '''topic''': the id of the topic to open&lt;br /&gt;
&lt;br /&gt;
Examples of ids:&lt;br /&gt;
* unit_Mage&lt;br /&gt;
* unit_Dark Adept&lt;br /&gt;
* weaponspecial_charge&lt;br /&gt;
* terrain_human_castle&lt;br /&gt;
&lt;br /&gt;
The engine will print the topic ids if run from the command line with the ''--log-debug=help'' option.&lt;br /&gt;
&lt;br /&gt;
=== [show_objectives] ===&lt;br /&gt;
refreshes the objectives defined by [objectives] and its [show_if] tags, and displays them. (It is also called whenever the user explicitly asks for the objectives; this matters only if the tag was overridden by a [[LuaWML#register_wml_action|Lua]] script.)&lt;br /&gt;
* '''side''': the side to show the objectives. If not set, all sides are used.&lt;br /&gt;
* '''[[StandardSideFilter]]''' tags and keys: Tag affects the matching sides instead of just all or the one given by the integer value of the side= key.&lt;br /&gt;
&lt;br /&gt;
=== [chat] ===&lt;br /&gt;
Displays a message in the chat area, not visible for observers. Alternative unconditionally visible for everyone: [[LuaWML:Display#wesnoth.message]]. {{DevFeature1.13|9}} can be visible for observers.&lt;br /&gt;
* '''speaker''': (default=&amp;quot;WML&amp;quot;) A string for the name of the sender of the message.&lt;br /&gt;
* '''message''': The message that should be displayed.&lt;br /&gt;
* '''observable''' (boolean yes|no, default yes): {{DevFeature1.13|9}} Whether the message is displayed for observers.&lt;br /&gt;
* '''[[StandardSideFilter]]''' tags and keys as argument; if the same client controls multiple sides that match, then the message will only be displayed once.&lt;br /&gt;
&lt;br /&gt;
=== [zoom] ===&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|8}}&lt;br /&gt;
&lt;br /&gt;
Changes the zoom level of the map.&lt;br /&gt;
&lt;br /&gt;
* '''factor''': The new zoom factor, measured as a multiple of the base zoom.&lt;br /&gt;
* '''relative''': If yes, zoom relative to current zoom level. Otherwise, set the absolute zoom level. Default no.&lt;br /&gt;
&lt;br /&gt;
== Useful Macros ==&lt;br /&gt;
There are some predefined macros that you find useful for interface actions. You can find a complete list along with a detailed explanation of how they work [http://www.wesnoth.org/macro-reference.xhtml here].&lt;br /&gt;
* '''{HIGHLIGHT_UNIT}''' Highlight a unit on the map. Use this to show important units&lt;br /&gt;
* '''{HIGHLIGHT_IMAGE}''' Places and highlights an image on the map. Use this to show important items or locations&lt;br /&gt;
* '''{SET_IMAGE}''' Places an image on the map which has no other function.&lt;br /&gt;
* '''{QUAKE &amp;lt;soundfile&amp;gt;}''' Creates a tremor-like screenshake and plays &amp;lt;soundfile&amp;gt;. For example, '''{QUAKE (rumble.ogg)}'''.&lt;br /&gt;
* '''{FLASH_WHITE}''' Flash the screen white momentarily. You can also replace WHITE with RED, BLUE or GREEN for a different colour.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[DirectActionsWML]]&lt;br /&gt;
* [[InternalActionsWML]]&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;br /&gt;
[[Category: ActionsWML]]&lt;/div&gt;</summary>
		<author><name>Spixi</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=GermanTranslationUnitNames&amp;diff=71165</id>
		<title>GermanTranslationUnitNames</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=GermanTranslationUnitNames&amp;diff=71165"/>
		<updated>2023-05-09T22:11:04Z</updated>

		<summary type="html">&lt;p&gt;Spixi: typo und Korrektur USK&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Hinweise zur Übersetzung ==&lt;br /&gt;
&lt;br /&gt;
Auf dieser Seite fassen wir alle wichtigen Informationen zusammen, so dass inoffizielle Erweiterungen und der offizielle Inhalt des Spiels weitestgehend synchron sind. Hier findet ihr die deutschen Namen der Einheiten und Informationen, die für sie wichtig sind, ebenso wie bedeutende Orte oder gebräuchliche Formulierungen, die fast in jeder Kampagne vorkommen.&lt;br /&gt;
&lt;br /&gt;
=== Generelles ===&lt;br /&gt;
&lt;br /&gt;
Die Übersetzung sollte vom Stil her der Sprache des Mittelalters entsprechen. Das bedeutet beispielsweise, dass man statt &amp;quot;Sie&amp;quot; &amp;quot;Ihr&amp;quot; verwendet. Zudem müsst und solltet ihr euch nicht strikt an das Original halten. Wenn euch eine Formulierung einfällt, die euch besser gefällt, solltet ihr diese auch verwenden, solange evtl. wichtige Informationen erhalten bleiben.&lt;br /&gt;
&lt;br /&gt;
=== Zeichensetzung und Ähnliches ===&lt;br /&gt;
&lt;br /&gt;
Es werden die typografisch richtigen Satzzeichen verwendet:&lt;br /&gt;
&lt;br /&gt;
* Anführungszeichen: »Text«, nicht &amp;quot;Text&amp;quot; oder 'Text'&lt;br /&gt;
* Bindestrich: normales Minuszeichen&lt;br /&gt;
* Gedankenstrich: &amp;quot;Text – Einschub&amp;quot;, nicht &amp;quot;Text - Einschub&amp;quot; oder &amp;quot;Text -- Einschub&amp;quot; (Halb- statt Viertel-Geviertstrich)&lt;br /&gt;
** Im Englischen wird stattdessen der Geviertstrich benutzt (auch bekannt als &amp;quot;em dash&amp;quot;, so lang wie ein m). Dabei werden dort keine Leerzeichen davor oder danach gesetzt. Im Deutschen werden um den Halbgeviertstrich (auch &amp;quot;en dash&amp;quot;) Leerzeichen eingefügt.&lt;br /&gt;
** Für die passende Tastenkombination, siehe hier: http://de.wikipedia.org/wiki/Halbgeviertstrich#Eingabe_bei_Computersystemen_und_-programmen&lt;br /&gt;
* Apostroph: &amp;quot;Geht’s&amp;quot;, nicht &amp;quot;Geht's&amp;quot;.&lt;br /&gt;
* Anrede (groß- bzw. kleingeschriebene Personal-/Possessivpronomen): &lt;br /&gt;
** Unterhaltung im Spiel - je nach Situation und Charakter:&lt;br /&gt;
*** Kleinschreibung beim Duzen (richtig: &amp;quot;Meiner Treu, du bist ein Lump!&amp;quot;, falsch: &amp;quot;Meiner Treu, Du bist ein Lump!&amp;quot;).&lt;br /&gt;
*** Großschreibung beim Ihrzen (richtig: &amp;quot;Meiner Treu, Ihr seid ein Lump!&amp;quot;, falsch: &amp;quot;Meiner Treu, ihr seid ein Lump!&amp;quot;).&lt;br /&gt;
*** Ob geduzt oder geihrzt wird, sollte für die einzelnen Charaktere über die Kampagne hinweg konsistent sein.&lt;br /&gt;
** Wird der Spieler angesprochen:&lt;br /&gt;
*** Ihrzen + Großschreibung (richtig: &amp;quot;Bewegt Euren Anführer über die Brücke.&amp;quot;, falsch: &amp;quot;Bewegt euren Anrührer über die Brücke.&amp;quot;).&lt;br /&gt;
*** Niemals Siezen!&lt;br /&gt;
* Die vollständige (englische) Typografie-Anleitung gibt es [[Typography_Style_Guide|hier]]; Bash-Scripts zum automatisierten Anpassen der Sonderzeichen [[TranslatorShellscript|hier]].&lt;br /&gt;
* Das Dach&amp;quot;^&amp;quot; ist eine Übersetzerhilfe: Alles vor diesem Zeichen wird in der Übersetzung ignoriert. Beispiel: &amp;quot;rod of justice^Take it!&amp;quot; – Der zu übersetzende String heißt eigentlich nur &amp;quot;Take it&amp;quot;. Damit der Bezug von &amp;quot;it&amp;quot; klar wird, spezifiziert der Programmierer, dass es sich auf &amp;quot;rod of justice&amp;quot; bezieht. Die Übersetzung könnte also sein: &amp;quot;Schnapp dir das Ding!&amp;quot;.&lt;br /&gt;
* $Variablen müssen im übersetzten Text genau gleich sein.&lt;br /&gt;
* Bei formatiertem Text (z.B. &amp;lt;italic&amp;gt;text='Battle for Wesnoth'&amp;lt;/italic&amp;gt;) handelt es sich um Pango Markup. Achtet darauf, dass es für jedes öffnende &amp;lt; bzw. ' auch ein schließendes gibt, da solche Fehler oft schwer zu finden sind. Auch zusätzliche Leerzeichen sind innerhalb einer solchen Auszeichnung beim Übersetzen nicht erlaubt – vergesst aber nicht, dass außerhalb davon zur Worttrennung i.d.R. eins dazugehört.&lt;br /&gt;
&lt;br /&gt;
== Mainline (offizieller Inhalt des Spiels) ==&lt;br /&gt;
&lt;br /&gt;
=== Einheiten ===&lt;br /&gt;
&lt;br /&gt;
Details zum letzten Namensüberarbeitungsprojekt finden sich [[GermanTranslationNameRework|hier]].&lt;br /&gt;
Die Übersetzungen wurden in die Entwicklerversion eingearbeitet.&lt;br /&gt;
&lt;br /&gt;
Damit niemand 'Goblin' mit 'Goblin' übersetzt oder 'Wose' mit 'Baummensch', orientiert euch bitte an folgenden Übersichten:&lt;br /&gt;
&lt;br /&gt;
[http://units.wesnoth.org/trunk/mainline/de_DE/mainline.html Mainline]&lt;br /&gt;
&lt;br /&gt;
[http://units.wesnoth.org/trunk/mainline/de_DE/Sceptre_of_Fire.html Das Zepter des Feuers]&lt;br /&gt;
&lt;br /&gt;
[http://units.wesnoth.org/trunk/mainline/de_DE/Delfadors_Memoirs.html Delfadors Memoiren]&lt;br /&gt;
&lt;br /&gt;
[http://units.wesnoth.org/trunk/mainline/de_DE/The_Rise_of_Wesnoth.html Der Aufstieg Wesnoths]&lt;br /&gt;
&lt;br /&gt;
[http://units.wesnoth.org/trunk/mainline/de_DE/The_Hammer_of_Thursagan.html Der Hammer von Thursagan]&lt;br /&gt;
&lt;br /&gt;
[http://units.wesnoth.org/trunk/mainline/de_DE/Heir_To_The_Throne.html Der Thronerbe]&lt;br /&gt;
&lt;br /&gt;
[http://units.wesnoth.org/trunk/mainline/de_DE/Descent_into_Darkness.html Die dunklen Künste]&lt;br /&gt;
&lt;br /&gt;
[https://units.wesnoth.org/trunk/mainline/de_DE/Two_Brothers.html Die Geschichte zweier Brüder]&lt;br /&gt;
&lt;br /&gt;
[http://units.wesnoth.org/trunk/mainline/de_DE/LOW.html Die Legende von Wesmere]&lt;br /&gt;
&lt;br /&gt;
[http://units.wesnoth.org/trunk/mainline/de_DE/The_South_Guard.html Die Südwacht]&lt;br /&gt;
&lt;br /&gt;
[https://units.wesnoth.org/trunk/mainline/de_DE/An_Orcish_Incursion.html Ein Einmarsch der Orks]&lt;br /&gt;
&lt;br /&gt;
[http://units.wesnoth.org/trunk/mainline/de_DE/Liberty.html Freiheit]&lt;br /&gt;
&lt;br /&gt;
[https://units.wesnoth.org/trunk/mainline/de_DE/Secrets%20of%20the%20Ancients.html Geheimnisse der Alten]&lt;br /&gt;
&lt;br /&gt;
[http://units.wesnoth.org/trunk/mainline/de_DE/Eastern_Invasion.html Invasion der Finsternis]&lt;br /&gt;
&lt;br /&gt;
[http://units.wesnoth.org/trunk/mainline/de_DE/Son_of_the_Black-Eye.html Schwarzauges Sohn]&lt;br /&gt;
&lt;br /&gt;
[http://units.wesnoth.org/trunk/mainline/de_DE/Dead_Water.html Stille Wasser]&lt;br /&gt;
&lt;br /&gt;
[http://units.wesnoth.org/trunk/mainline/de_DE/Under_the_Burning_Suns.html Unter brennenden Sonnen]&lt;br /&gt;
&lt;br /&gt;
[http://units.wesnoth.org/trunk/mainline/de_DE/Northern_Rebirth.html Wiedergeburt des Nordens]&lt;br /&gt;
&lt;br /&gt;
=== Gruppierungen ===&lt;br /&gt;
==== Rassen / Ethnien ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Drakes&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Draken&lt;br /&gt;
|-&lt;br /&gt;
| Dunefolk&lt;br /&gt;
| Menschen (Dünenvolk)&lt;br /&gt;
|-&lt;br /&gt;
| Dwarves&lt;br /&gt;
| Zwerge&lt;br /&gt;
|-&lt;br /&gt;
| Elves&lt;br /&gt;
| Elfen&lt;br /&gt;
|-&lt;br /&gt;
| Goblins&lt;br /&gt;
| Kobolde&lt;br /&gt;
|-&lt;br /&gt;
| Humans&lt;br /&gt;
| Menschen (Wesnoth)&lt;br /&gt;
|-&lt;br /&gt;
| Khalifate*&lt;br /&gt;
| Menschen (Kalifat)&lt;br /&gt;
|-&lt;br /&gt;
| Merfolk, Mermen**&lt;br /&gt;
| Meervolk (Rasse)&lt;br /&gt;
Wasserleute, -männer/-frauen (Dialoge etc.)&lt;br /&gt;
|-&lt;br /&gt;
| Mechanical&lt;br /&gt;
| Kriegsgerät&lt;br /&gt;
|-&lt;br /&gt;
| Monsters&lt;br /&gt;
| Monster&lt;br /&gt;
|-&lt;br /&gt;
| Nagas&lt;br /&gt;
| Nagas&lt;br /&gt;
|-&lt;br /&gt;
| Ogres&lt;br /&gt;
| Oger&lt;br /&gt;
|-&lt;br /&gt;
| Orcs&lt;br /&gt;
| Orks&lt;br /&gt;
|-&lt;br /&gt;
| Saurians / Lizards&lt;br /&gt;
| Saurianer / Echsen&lt;br /&gt;
|-&lt;br /&gt;
| Trolls&lt;br /&gt;
| Trolle&lt;br /&gt;
|-&lt;br /&gt;
| Undead&lt;br /&gt;
| Untote&lt;br /&gt;
|-&lt;br /&gt;
| Woses&lt;br /&gt;
| Waldschrate&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''*''' Mit Wesnoth 1.14 wurden die 'Khalifate' in 'Dunefolk' umbenannt.&amp;lt;br /&amp;gt;&lt;br /&gt;
'''**''' Im englischen Text wird als Bezeichnung für die Rasse &amp;quot;Merfolk&amp;quot; statt &amp;quot;Mermen&amp;quot; bevorzugt, aber siehe: [https://github.com/wesnoth/wesnoth/issues/2940 Issue 2940].&lt;br /&gt;
&lt;br /&gt;
==== Fraktionen ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Alliance of Darkness&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Allianz der Finsternis&lt;br /&gt;
|-&lt;br /&gt;
| Alliance of Light&lt;br /&gt;
| Allianz des Lichtes&lt;br /&gt;
|-&lt;br /&gt;
| Drakes&lt;br /&gt;
| Draken&lt;br /&gt;
|-&lt;br /&gt;
| Knalgan Alliance&lt;br /&gt;
| Knalga Allianz&lt;br /&gt;
|-&lt;br /&gt;
| Loyalists&lt;br /&gt;
| Loyalisten&lt;br /&gt;
|-&lt;br /&gt;
| Northerners&lt;br /&gt;
| Nordmannen&lt;br /&gt;
|-&lt;br /&gt;
| Rebels&lt;br /&gt;
| Rebellen&lt;br /&gt;
|-&lt;br /&gt;
| Undead&lt;br /&gt;
| Untote&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Bedeutende Orte ===&lt;br /&gt;
Details zur Geographie von Wesnoth sind auf der Seite [[WesnothGeography]] zu finden (nicht auf neustem Stand).&lt;br /&gt;
==== Gewässer / Inseln ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Arkan-thoria&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Arkan-thoria (Fluss)&lt;br /&gt;
|-&lt;br /&gt;
| Bay of Pearls&lt;br /&gt;
| Perlenbucht&lt;br /&gt;
|-&lt;br /&gt;
| Bilheld (isle)&lt;br /&gt;
| Bilheld (Insel)&lt;br /&gt;
|-&lt;br /&gt;
| Black River&lt;br /&gt;
| Schwarzer Fluss&lt;br /&gt;
|-&lt;br /&gt;
| Great River&lt;br /&gt;
| Großer Fluss&lt;br /&gt;
|-&lt;br /&gt;
| Green Isle&lt;br /&gt;
| Grüne Insel&lt;br /&gt;
|-&lt;br /&gt;
| Island Vrug&lt;br /&gt;
| Insel von Vrug&lt;br /&gt;
|-&lt;br /&gt;
| Isle of Alduin&lt;br /&gt;
| Insel Alduin&lt;br /&gt;
|-&lt;br /&gt;
| Lake Aelin&lt;br /&gt;
| Aelin-See&lt;br /&gt;
|-&lt;br /&gt;
| River Aethen&lt;br /&gt;
| Aethen (Fluss)&lt;br /&gt;
|-&lt;br /&gt;
| River Bork&lt;br /&gt;
| Bork (Fluss)&lt;br /&gt;
|-&lt;br /&gt;
| River Listra&lt;br /&gt;
| Listra (Fluss)&lt;br /&gt;
|-&lt;br /&gt;
| River Oumph&lt;br /&gt;
| Oumph (Fluss)&lt;br /&gt;
|-&lt;br /&gt;
| River Weldyn&lt;br /&gt;
| Weldyn (Fluss)&lt;br /&gt;
|-&lt;br /&gt;
| Shimmering Isle&lt;br /&gt;
| Insel des Glanzes&lt;br /&gt;
|-&lt;br /&gt;
| Sleepless Sea&lt;br /&gt;
| Ruheloses Meer&lt;br /&gt;
|-&lt;br /&gt;
| The Far Sea&lt;br /&gt;
| Das Ferne Meer&lt;br /&gt;
|-&lt;br /&gt;
| The Ford of Abez&lt;br /&gt;
| Furt von Abez&lt;br /&gt;
|-&lt;br /&gt;
| The Great Ocean&lt;br /&gt;
| Der Große Ozean&lt;br /&gt;
|-&lt;br /&gt;
| The Lake Vrug&lt;br /&gt;
| Vrugsee&lt;br /&gt;
|-&lt;br /&gt;
| The Three Sisters (isle)&lt;br /&gt;
| Die Drei Schwestern (Insel)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Wälder ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Aethenwood&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Aethenwälder&lt;br /&gt;
|-&lt;br /&gt;
| Black Forest&lt;br /&gt;
| Schwarzer Wald&lt;br /&gt;
|-&lt;br /&gt;
| Forest of Thelien&lt;br /&gt;
| Thelien-Wald&lt;br /&gt;
|-&lt;br /&gt;
| Glyn's Forest&lt;br /&gt;
| Glyns Gehölz&lt;br /&gt;
|-&lt;br /&gt;
| Greenwood&lt;br /&gt;
| Grüner Hain&lt;br /&gt;
|-&lt;br /&gt;
| Grey Woods&lt;br /&gt;
| Grauer Wald&lt;br /&gt;
|-&lt;br /&gt;
| Lintanir Forest&lt;br /&gt;
| Lintanir-Forst&lt;br /&gt;
|-&lt;br /&gt;
| Silent Forest&lt;br /&gt;
| Stiller Wald&lt;br /&gt;
|-&lt;br /&gt;
| Southwood&lt;br /&gt;
| Südwald&lt;br /&gt;
|-&lt;br /&gt;
| Wesmere Forest&lt;br /&gt;
| Wesmerewälder&lt;br /&gt;
|-&lt;br /&gt;
| Oldwood (Green Isle)&lt;br /&gt;
| Alter Wald (Grüne Insel)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Gebirge / Höhlen / Täler ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Broken Mountains (Green Isle)&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Splittergebirge (Grüne Insel)&lt;br /&gt;
|-&lt;br /&gt;
| Brown Hills&lt;br /&gt;
| Braune Hügel&lt;br /&gt;
|-&lt;br /&gt;
| Caverns of Chaincolt&lt;br /&gt;
| Chaincolt-Höhlen&lt;br /&gt;
|-&lt;br /&gt;
| Caves of Knalga&lt;br /&gt;
| Knalga&lt;br /&gt;
|-&lt;br /&gt;
| Dulatus Hills&lt;br /&gt;
| Dulatushügel&lt;br /&gt;
|-&lt;br /&gt;
| Estmark Hills&lt;br /&gt;
| Ostmarken&lt;br /&gt;
|-&lt;br /&gt;
| Gryphon Mt.&lt;br /&gt;
| Berg der Greifen&lt;br /&gt;
|-&lt;br /&gt;
| Heart Mountains&lt;br /&gt;
| Erzgebirge&lt;br /&gt;
|-&lt;br /&gt;
| Mountains of Dorth&lt;br /&gt;
| Dorth-Gebirge&lt;br /&gt;
|-&lt;br /&gt;
| Mountains of Haag&lt;br /&gt;
| Haager Berge&lt;br /&gt;
|-&lt;br /&gt;
| Mountains of Peril&lt;br /&gt;
| Tückische Gipfel&lt;br /&gt;
|-&lt;br /&gt;
| Mourned Hills&lt;br /&gt;
| Trauerhügel&lt;br /&gt;
|-&lt;br /&gt;
| Shorbear caves&lt;br /&gt;
| Shorbear Höhlen&lt;br /&gt;
|-&lt;br /&gt;
| The Vale (of Blossoming Trees)&lt;br /&gt;
| Tal der blühenden Bäume&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sümpfe / Moore ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Bitter Swamp&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Sumpf der Tränen&lt;br /&gt;
|-&lt;br /&gt;
| Black Marshes&lt;br /&gt;
| Schwarzes Moor&lt;br /&gt;
|-&lt;br /&gt;
| Swamp of Dread&lt;br /&gt;
| Sumpf der Furcht&lt;br /&gt;
|-&lt;br /&gt;
| Swamp of Esten (Green Isle)&lt;br /&gt;
| Sümpfe von Esten (Grüne Insel)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Wüsten / Ebenen ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Barren Plains&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Karge Steppe&lt;br /&gt;
|-&lt;br /&gt;
| Desert of Death&lt;br /&gt;
| Todeswüste&lt;br /&gt;
|-&lt;br /&gt;
| Frosty Wastes&lt;br /&gt;
| Frostwüste&lt;br /&gt;
|-&lt;br /&gt;
| Horse Plains&lt;br /&gt;
| Ebene der Pferde&lt;br /&gt;
|-&lt;br /&gt;
| North Plains&lt;br /&gt;
| Nördlichen Ebenen&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Städte / Dörfer / Festen ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Blackmore (Green Isle)&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Mortingen (Grüne Insel)&lt;br /&gt;
|-&lt;br /&gt;
| Blackwater Port &lt;br /&gt;
| Schwarzwasserhafen&lt;br /&gt;
|-&lt;br /&gt;
| Clearwater Port (Green Isle)&lt;br /&gt;
| Klarwasserhafen (Grüne Insel)&lt;br /&gt;
|-&lt;br /&gt;
| Dwarven Doors&lt;br /&gt;
| Zwergenpforte&lt;br /&gt;
|-&lt;br /&gt;
| Elensefar&lt;br /&gt;
| Elensefar&lt;br /&gt;
|-&lt;br /&gt;
| Dorest&lt;br /&gt;
| Dorest&lt;br /&gt;
|-&lt;br /&gt;
| Fort Kerlath&lt;br /&gt;
| Fort Kerlath&lt;br /&gt;
|-&lt;br /&gt;
| Fort Than&lt;br /&gt;
| Fort Than&lt;br /&gt;
|-&lt;br /&gt;
| Halstead&lt;br /&gt;
| Halstead (Festung)&lt;br /&gt;
|-&lt;br /&gt;
| Jeyvan's Haven (Green Isle)&lt;br /&gt;
| Jeyvans Rast (Grüne Insel)&lt;br /&gt;
|-&lt;br /&gt;
| Prestim&lt;br /&gt;
| Prestim&lt;br /&gt;
|-&lt;br /&gt;
| Saurgrath&lt;br /&gt;
| Saurgrath&lt;br /&gt;
|-&lt;br /&gt;
| Shorbear Hold&lt;br /&gt;
| Feste Shorbear&lt;br /&gt;
|-&lt;br /&gt;
| Soradoc&lt;br /&gt;
| Soradoc&lt;br /&gt;
|-&lt;br /&gt;
| Southbay (Green Isle)&lt;br /&gt;
| Südbucht (Grüne Insel)&lt;br /&gt;
|-&lt;br /&gt;
| Spellkeep&lt;br /&gt;
| Bannheim&lt;br /&gt;
|-&lt;br /&gt;
| Stormvale (Green Isle)&lt;br /&gt;
| Sturmtal (Grüne Insel)&lt;br /&gt;
|-&lt;br /&gt;
| Weldyn&lt;br /&gt;
| Weldyn&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sonstige ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Estmark&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Ostmarken&lt;br /&gt;
|-&lt;br /&gt;
| Fallen Lich Point (Green Isle)&lt;br /&gt;
| Platz zum gefallenen Lich (Grüne Insel)&lt;br /&gt;
|-&lt;br /&gt;
| Irdya – the wide green world&lt;br /&gt;
| Irdya – die weite grüne Welt&lt;br /&gt;
|-&lt;br /&gt;
| Far North&lt;br /&gt;
| Weiter Norden&lt;br /&gt;
|-&lt;br /&gt;
| land of the Clans&lt;br /&gt;
| Lande der Sippen&lt;br /&gt;
|-&lt;br /&gt;
| Midlands (Green Isle)&lt;br /&gt;
| Mittellande (Grüne Insel)&lt;br /&gt;
|-&lt;br /&gt;
| Northlands&lt;br /&gt;
| Nordlande&lt;br /&gt;
|-&lt;br /&gt;
| old eastern mines&lt;br /&gt;
| östliche Minen&lt;br /&gt;
|-&lt;br /&gt;
| Southern / Northern Outpost&lt;br /&gt;
| Südlicher / Nördlicher Außenposten&lt;br /&gt;
|-&lt;br /&gt;
| the Great Continent&lt;br /&gt;
| der Große Kontinent&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Waffen und Gegenstände ===&lt;br /&gt;
&lt;br /&gt;
==== Waffen ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | axe&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Axt&lt;br /&gt;
|-&lt;br /&gt;
| ballista&lt;br /&gt;
| Balliste	&lt;br /&gt;
|-&lt;br /&gt;
| baneblade&lt;br /&gt;
| Spektralklinge&lt;br /&gt;
|-&lt;br /&gt;
| battle axe&lt;br /&gt;
| Streitaxt&lt;br /&gt;
|-&lt;br /&gt;
| battle claws&lt;br /&gt;
| Kampfkralle&lt;br /&gt;
|-&lt;br /&gt;
| beak&lt;br /&gt;
| Schnabelhieb&lt;br /&gt;
|-&lt;br /&gt;
| buckler&lt;br /&gt;
| Rundschild&lt;br /&gt;
|-&lt;br /&gt;
| berserker frenzy&lt;br /&gt;
| Raserei&lt;br /&gt;
|-&lt;br /&gt;
| bite&lt;br /&gt;
| Biss&lt;br /&gt;
|-&lt;br /&gt;
| bow&lt;br /&gt;
| Bogen&lt;br /&gt;
|-&lt;br /&gt;
| chill tempest	&lt;br /&gt;
| Schattenpfeile&lt;br /&gt;
|-&lt;br /&gt;
| chill wave&lt;br /&gt;
| Frostwelle&lt;br /&gt;
|-&lt;br /&gt;
| claws&lt;br /&gt;
| Klauen&lt;br /&gt;
|-&lt;br /&gt;
| cleaver&lt;br /&gt;
| Fleischerbeil&lt;br /&gt;
|-&lt;br /&gt;
| club&lt;br /&gt;
| Keule&lt;br /&gt;
|-&lt;br /&gt;
| crossbow&lt;br /&gt;
| Armbrust&lt;br /&gt;
|-&lt;br /&gt;
| crush&lt;br /&gt;
| Zermalmen&lt;br /&gt;
|-&lt;br /&gt;
| curse&lt;br /&gt;
| Fluch&lt;br /&gt;
|-&lt;br /&gt;
| dagger&lt;br /&gt;
| Dolch&lt;br /&gt;
|-&lt;br /&gt;
| dragonstaff&lt;br /&gt;
| Drachenstab&lt;br /&gt;
|-&lt;br /&gt;
| ensnare&lt;br /&gt;
| Zorn des Waldes&lt;br /&gt;
|-&lt;br /&gt;
| entangle&lt;br /&gt;
| Efeumantel&lt;br /&gt;
|-&lt;br /&gt;
| faerie fire&lt;br /&gt;
| Feenfeuer&lt;br /&gt;
|-&lt;br /&gt;
| faerie touch&lt;br /&gt;
| Feenhauch&lt;br /&gt;
|-&lt;br /&gt;
| fangs&lt;br /&gt;
| Fänge&lt;br /&gt;
|-&lt;br /&gt;
| fire claws&lt;br /&gt;
| Feuerklauen&lt;br /&gt;
|-&lt;br /&gt;
| fire breath&lt;br /&gt;
| Feueratem&lt;br /&gt;
|-&lt;br /&gt;
| fireball&lt;br /&gt;
| Feuerball&lt;br /&gt;
|-&lt;br /&gt;
| fist&lt;br /&gt;
| Faust&lt;br /&gt;
|-&lt;br /&gt;
| gossamer&lt;br /&gt;
| Spinnfäden&lt;br /&gt;
|-&lt;br /&gt;
| greatsword&lt;br /&gt;
| Krummschwert&lt;br /&gt;
|-&lt;br /&gt;
| halberd&lt;br /&gt;
| Hellebarde&lt;br /&gt;
|-&lt;br /&gt;
| hammer&lt;br /&gt;
| Hammer&lt;br /&gt;
|-&lt;br /&gt;
| hatchet&lt;br /&gt;
| Wurfbeil&lt;br /&gt;
|-&lt;br /&gt;
| ink&lt;br /&gt;
| Tinte&lt;br /&gt;
|-&lt;br /&gt;
| javelin&lt;br /&gt;
| Wurfspeer&lt;br /&gt;
|-&lt;br /&gt;
| jaw&lt;br /&gt;
| Kiefer&lt;br /&gt;
|-&lt;br /&gt;
| knife&lt;br /&gt;
| Messer&lt;br /&gt;
|-&lt;br /&gt;
| lance&lt;br /&gt;
| Lanze&lt;br /&gt;
|-&lt;br /&gt;
| lightbeam&lt;br /&gt;
| Heiliges Licht&lt;br /&gt;
|-&lt;br /&gt;
| lightning bolt&lt;br /&gt;
| Blitzschlag&lt;br /&gt;
|-&lt;br /&gt;
| longbow&lt;br /&gt;
| Langbogen&lt;br /&gt;
|-&lt;br /&gt;
| mace&lt;br /&gt;
| Streitkolben&lt;br /&gt;
|-&lt;br /&gt;
| missile&lt;br /&gt;
| Magiegeschoss&lt;br /&gt;
|-&lt;br /&gt;
| morning star&lt;br /&gt;
| Morgenstern&lt;br /&gt;
|-&lt;br /&gt;
| mud glob&lt;br /&gt;
| Schlammklumpen&lt;br /&gt;
|-&lt;br /&gt;
| naia touch&lt;br /&gt;
| Naias Berührung&lt;br /&gt;
|-&lt;br /&gt;
| net&lt;br /&gt;
| Netz&lt;br /&gt;
|-&lt;br /&gt;
| pike&lt;br /&gt;
| Pike&lt;br /&gt;
|-&lt;br /&gt;
| pincers&lt;br /&gt;
| Scheren&lt;br /&gt;
|-&lt;br /&gt;
| pitchfork&lt;br /&gt;
| Mistforke&lt;br /&gt;
|-&lt;br /&gt;
| plague staff&lt;br /&gt;
| Stab der Plagen&lt;br /&gt;
|-&lt;br /&gt;
| ram&lt;br /&gt;
| Mauerbrecher&lt;br /&gt;
|-&lt;br /&gt;
| runic hammer&lt;br /&gt;
| Runenhammer&lt;br /&gt;
|-&lt;br /&gt;
| sabre&lt;br /&gt;
| Säbel&lt;br /&gt;
|-&lt;br /&gt;
| scimitar&lt;br /&gt;
| Krummsäbel&lt;br /&gt;
|-&lt;br /&gt;
| shadow wave&lt;br /&gt;
| Schattenwelle&lt;br /&gt;
|-&lt;br /&gt;
| short sword&lt;br /&gt;
| Kurzschwert&lt;br /&gt;
|-&lt;br /&gt;
| slam&lt;br /&gt;
| Sturzflug&lt;br /&gt;
|-&lt;br /&gt;
| sling&lt;br /&gt;
| Schleuder&lt;br /&gt;
|-&lt;br /&gt;
| smash (Eyestalk)&lt;br /&gt;
| Rankenhieb (Augenranke)&lt;br /&gt;
|-&lt;br /&gt;
| spear&lt;br /&gt;
| Speer&lt;br /&gt;
|-&lt;br /&gt;
| staff&lt;br /&gt;
| Stab&lt;br /&gt;
|-&lt;br /&gt;
| sting&lt;br /&gt;
| Stachel&lt;br /&gt;
|-&lt;br /&gt;
| sword&lt;br /&gt;
| Schwert&lt;br /&gt;
|-&lt;br /&gt;
| tail&lt;br /&gt;
| Schwanz&lt;br /&gt;
|-&lt;br /&gt;
| tentacle	&lt;br /&gt;
| Tentakel&lt;br /&gt;
|-&lt;br /&gt;
| thorns&lt;br /&gt;
| Dornen&lt;br /&gt;
|-&lt;br /&gt;
| throwing knives&lt;br /&gt;
| Wurfmesser&lt;br /&gt;
|-&lt;br /&gt;
| thunderstick&lt;br /&gt;
| Donnerstock&lt;br /&gt;
|-&lt;br /&gt;
| torch&lt;br /&gt;
| Fackel&lt;br /&gt;
|-&lt;br /&gt;
| touch&lt;br /&gt;
| Berührung&lt;br /&gt;
|-&lt;br /&gt;
| trident&lt;br /&gt;
| Dreizack&lt;br /&gt;
|-&lt;br /&gt;
| wail&lt;br /&gt;
| Klage&lt;br /&gt;
|-&lt;br /&gt;
| war blade&lt;br /&gt;
| Kriegsklinge&lt;br /&gt;
|-&lt;br /&gt;
| war talon&lt;br /&gt;
| Kriegsklaue&lt;br /&gt;
|-&lt;br /&gt;
| water spray&lt;br /&gt;
| Peitschende Gischt&lt;br /&gt;
|-&lt;br /&gt;
| web&lt;br /&gt;
| Netz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Waffenfähigkeiten ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | backstab&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Hinterlistiger Angriff&lt;br /&gt;
|-&lt;br /&gt;
| berserk&lt;br /&gt;
| Kampfrausch&lt;br /&gt;
|-&lt;br /&gt;
| charge&lt;br /&gt;
| Ansturm&lt;br /&gt;
|-&lt;br /&gt;
| daze&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| drains&lt;br /&gt;
| Lebensentzug&lt;br /&gt;
|-&lt;br /&gt;
| first strike&lt;br /&gt;
| Erstschlag&lt;br /&gt;
|-&lt;br /&gt;
| magical&lt;br /&gt;
| Magie&lt;br /&gt;
|-&lt;br /&gt;
| marksman&lt;br /&gt;
| Treffsicherheit&lt;br /&gt;
|-&lt;br /&gt;
| petrifies&lt;br /&gt;
| Versteinerung&lt;br /&gt;
|-&lt;br /&gt;
| plague&lt;br /&gt;
| Untote Plage&lt;br /&gt;
|-&lt;br /&gt;
| poison&lt;br /&gt;
| Gift&lt;br /&gt;
|-&lt;br /&gt;
| slows&lt;br /&gt;
| Verlangsamung&lt;br /&gt;
|-&lt;br /&gt;
| swarm&lt;br /&gt;
| Schwarm&lt;br /&gt;
|-&lt;br /&gt;
| shock&lt;br /&gt;
| Blitzangriff&lt;br /&gt;
|-&lt;br /&gt;
| stun&lt;br /&gt;
| Lähmung&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Schadenstypen ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | arcane&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Arkan&lt;br /&gt;
|-&lt;br /&gt;
| blade&lt;br /&gt;
| Klinge&lt;br /&gt;
|-&lt;br /&gt;
| cold&lt;br /&gt;
| Kälte&lt;br /&gt;
|-&lt;br /&gt;
| fire&lt;br /&gt;
| Feuer&lt;br /&gt;
|-&lt;br /&gt;
| impact&lt;br /&gt;
| Wucht&lt;br /&gt;
|-&lt;br /&gt;
| pierce&lt;br /&gt;
| Stich&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Gegenstände===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Flaming Sword&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Flammenschwert&lt;br /&gt;
|-&lt;br /&gt;
| Holy Water&lt;br /&gt;
| Weihwasser&lt;br /&gt;
|-&lt;br /&gt;
| Poison&lt;br /&gt;
| Gift&lt;br /&gt;
|-&lt;br /&gt;
| Potion of Decay&lt;br /&gt;
| Trank des Verfalls&lt;br /&gt;
|-&lt;br /&gt;
| Potion of Healing&lt;br /&gt;
| Trank der Heilung&lt;br /&gt;
|-&lt;br /&gt;
| Potion of Strength&lt;br /&gt;
| Trank der Stärke&lt;br /&gt;
|-&lt;br /&gt;
| Ring of Regeneration&lt;br /&gt;
| Ring der Regeneration&lt;br /&gt;
|-&lt;br /&gt;
| Ring of Power&lt;br /&gt;
| Ring der Kraft&lt;br /&gt;
|-&lt;br /&gt;
| Ring of Slowness&lt;br /&gt;
| Ring der Langsamkeit&lt;br /&gt;
|-&lt;br /&gt;
| Rod of Justice&lt;br /&gt;
| Stab der Gerechtigkeit&lt;br /&gt;
|-&lt;br /&gt;
| Sceptre of Fire&lt;br /&gt;
| Zepter des Feuers / Feuerzepter&lt;br /&gt;
|-&lt;br /&gt;
| Staff of righteous Flame&lt;br /&gt;
| Stab aufflammender Gerechtigkeit&lt;br /&gt;
|-&lt;br /&gt;
| Staff of Swiftness&lt;br /&gt;
| Stab der Geschwindigkeit&lt;br /&gt;
|-&lt;br /&gt;
| Storm Trident&lt;br /&gt;
| Dreizack des Sturms&lt;br /&gt;
|-&lt;br /&gt;
| Void Armor&lt;br /&gt;
| Rüstung der Leere&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Charakteristiken, Fertigkeiten ===&lt;br /&gt;
&lt;br /&gt;
==== Charakteristiken ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | aged&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Gealtert&lt;br /&gt;
|-&lt;br /&gt;
| dextrous&lt;br /&gt;
| Geschickt&lt;br /&gt;
|-&lt;br /&gt;
| dim&lt;br /&gt;
| Tumb&lt;br /&gt;
|-&lt;br /&gt;
| elemental&lt;br /&gt;
| Elementar&lt;br /&gt;
|-&lt;br /&gt;
| fearless&lt;br /&gt;
| Furchtlos&lt;br /&gt;
|-&lt;br /&gt;
| leral&lt;br /&gt;
| Wild&lt;br /&gt;
|-&lt;br /&gt;
| healthy&lt;br /&gt;
| Vital&lt;br /&gt;
|-&lt;br /&gt;
| intelligent&lt;br /&gt;
| Intelligent&lt;br /&gt;
|-&lt;br /&gt;
| loyal&lt;br /&gt;
| Loyal&lt;br /&gt;
|-&lt;br /&gt;
| mechanical&lt;br /&gt;
| Mechanisch&lt;br /&gt;
|-&lt;br /&gt;
| quick&lt;br /&gt;
| Schnell&lt;br /&gt;
|-&lt;br /&gt;
| resilient&lt;br /&gt;
| Robust&lt;br /&gt;
|-&lt;br /&gt;
| slow&lt;br /&gt;
| Lahm&lt;br /&gt;
|-&lt;br /&gt;
| strong&lt;br /&gt;
| Kräftig&lt;br /&gt;
|-&lt;br /&gt;
| undead&lt;br /&gt;
| Untot&lt;br /&gt;
|-&lt;br /&gt;
| weak&lt;br /&gt;
| Schwächlich&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Fertigkeiten ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | ambush&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Waldkenntnis&lt;br /&gt;
|-&lt;br /&gt;
| concealment&lt;br /&gt;
| Gassenwissen&lt;br /&gt;
|-&lt;br /&gt;
| cures&lt;br /&gt;
| Kurieren&lt;br /&gt;
|-&lt;br /&gt;
| feeding&lt;br /&gt;
| Kanibalismus&lt;br /&gt;
|-&lt;br /&gt;
| heals +X&lt;br /&gt;
| Heilen +x&lt;br /&gt;
|-&lt;br /&gt;
| illuminates&lt;br /&gt;
| Lichtaura&lt;br /&gt;
|-&lt;br /&gt;
| leadership&lt;br /&gt;
| Führungsqualitäten&lt;br /&gt;
|-&lt;br /&gt;
| nightstalk&lt;br /&gt;
| Schemen&lt;br /&gt;
|-&lt;br /&gt;
| regenerates&lt;br /&gt;
| Regeneration&lt;br /&gt;
|-&lt;br /&gt;
| skirmisher&lt;br /&gt;
| Plänkler&lt;br /&gt;
|-&lt;br /&gt;
| steadfast&lt;br /&gt;
| Unerschütterlich&lt;br /&gt;
|-&lt;br /&gt;
| submerge&lt;br /&gt;
| Abtauchen&lt;br /&gt;
|-&lt;br /&gt;
| teleport&lt;br /&gt;
| Teleportation&lt;br /&gt;
|-&lt;br /&gt;
| disengage&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| distract&lt;br /&gt;
| Ablenken&lt;br /&gt;
|-&lt;br /&gt;
| formation&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| initiative&lt;br /&gt;
| Kampfgespür&lt;br /&gt;
|-&lt;br /&gt;
| inspire&lt;br /&gt;
| Begeistern&lt;br /&gt;
|-&lt;br /&gt;
| support&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| teaching&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Gebräuchliche Formulierungen ===&lt;br /&gt;
&lt;br /&gt;
==== Missionsziele ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Death of X (or Y)&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | X (oder Y) fällt in der Schlacht&lt;br /&gt;
|-&lt;br /&gt;
| Turns run out&lt;br /&gt;
| Rundenlimit überschritten&lt;br /&gt;
|-&lt;br /&gt;
| Defeat all enemy leaders&lt;br /&gt;
| Besiegt alle gegnerischen Anführer&lt;br /&gt;
|-&lt;br /&gt;
| Move X to the signpost in the Y&lt;br /&gt;
| Führt X zum Wegweiser im Y&lt;br /&gt;
|-&lt;br /&gt;
| Move X to the sign&lt;br /&gt;
| Führt X zur Markierung&lt;br /&gt;
|-&lt;br /&gt;
| Early finish bonus&lt;br /&gt;
| Bonus für frühzeitiges Ende&lt;br /&gt;
|-&lt;br /&gt;
| Alternative objective&lt;br /&gt;
| Alternative Mission&lt;br /&gt;
|-&lt;br /&gt;
| Bonus objective&lt;br /&gt;
| Bonusmission&lt;br /&gt;
|-&lt;br /&gt;
| Optional (objective)&lt;br /&gt;
| Optional / Optionale Mission&lt;br /&gt;
|-&lt;br /&gt;
| Optional Scenario&lt;br /&gt;
| Optionales Szenario&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Schwierigkeitsgrade / Beschreibungen ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | (Novice / Beginner level, xx scenarios.)&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | (Einstufung: Einfach, xx Szenarien)&lt;br /&gt;
|-&lt;br /&gt;
| (Intermediate level, xx scenarios.)&lt;br /&gt;
| (Einstufung: Mittel, xx Szenarien)&lt;br /&gt;
|-&lt;br /&gt;
| (Expert level, xx scenarios.)&lt;br /&gt;
| (Einstufung: Schwierig, xx Szenarien)&lt;br /&gt;
|-&lt;br /&gt;
| Beginner&lt;br /&gt;
| Sehr einfach&lt;br /&gt;
|-&lt;br /&gt;
| Easy&lt;br /&gt;
| Einfach&lt;br /&gt;
|-&lt;br /&gt;
| Normal&lt;br /&gt;
| Normal&lt;br /&gt;
|-&lt;br /&gt;
| Challenging&lt;br /&gt;
| Herausfordernd&lt;br /&gt;
|-&lt;br /&gt;
| Difficult&lt;br /&gt;
| Schwierig&lt;br /&gt;
|-&lt;br /&gt;
| Nightmare&lt;br /&gt;
| Alptraum&lt;br /&gt;
|-&lt;br /&gt;
| X scenarios (X story-only / dialog-only)&lt;br /&gt;
| x Szenarien + x Erzählung / Dialog&lt;br /&gt;
|-&lt;br /&gt;
| All scenarios are playable, but there may be bugs or balancing issues &lt;br /&gt;
| Alle Szenarien sind spielbar, vereinzelt können aber Fehler auftreten. Auch die Abstimmung der Schwierigkeitsgrade ist noch nicht abgeschlossen.&lt;br /&gt;
|-&lt;br /&gt;
| rated PG-13 (Parental Guidance)&lt;br /&gt;
| &amp;lt;!-- FSK ist für Filme, USK für Videospiele, USK 13 existiert in Deutschland aber nicht, Wesnoth ist USK 6 freigegeben, siehe https://usk.de/?s=wesnoth Der Prüfantrag wurde 2010 vom Axel-Springer-Verlag gestellt, damit BfW auf einer Beilage der Zeitschrift &amp;quot;Computer Bild&amp;quot; veröffentlicht werden konnte --&amp;gt;USK ab 6 (Unterhaltungssoftware Selbstkontrolle)&lt;br /&gt;
|-&lt;br /&gt;
| This campaign contains mature themes, some of which may be unsuitable for children.&lt;br /&gt;
This campaign depicts explicit violence which may not be appropriate for younger children.&lt;br /&gt;
| In dieser Kampagne werden Gewaltszenen dargestellt, die besonders für Spieler im Kindesalter ungeeignet sind!&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Credits (Herausgeber, Mitarbeiter, Danksagung) ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | And special thanks to everyone else who I forgot to mention.&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Und besonderen Dank an alle, die ich vergessen habe zu erwähnen.&lt;br /&gt;
|-&lt;br /&gt;
| Artwork Support&lt;br /&gt;
| Mitwirkung grafische Gestaltung&lt;br /&gt;
|-&lt;br /&gt;
| Artwork and Graphics Design&lt;br /&gt;
| Grafik&lt;br /&gt;
|-&lt;br /&gt;
| Author (of this campaign)&lt;br /&gt;
| Autor (der Kampagne)&lt;br /&gt;
|-&lt;br /&gt;
| Campaign Design&lt;br /&gt;
| Kampagnengestaltung&lt;br /&gt;
|-&lt;br /&gt;
| Campaign Epilog and Continuity&lt;br /&gt;
| Kampagnenepilog und -fortsetzung&lt;br /&gt;
|-&lt;br /&gt;
| Campaign Maintenance&lt;br /&gt;
| Betreuung&lt;br /&gt;
|-&lt;br /&gt;
| Co-author&lt;br /&gt;
| Mitautor&lt;br /&gt;
|-&lt;br /&gt;
| Code &lt;br /&gt;
| Programmierung / Kodierung&lt;br /&gt;
|-&lt;br /&gt;
| Completion, Porting and Maintenance&lt;br /&gt;
| Fertigstellung, Portierung und Betreuung&lt;br /&gt;
|-&lt;br /&gt;
| Conception and Original&lt;br /&gt;
| Design Konzeption&lt;br /&gt;
|-&lt;br /&gt;
| Contributions Images&lt;br /&gt;
| Beiträge Grafiken&lt;br /&gt;
|-&lt;br /&gt;
| Contributors&lt;br /&gt;
| Mitwirkende&lt;br /&gt;
|-&lt;br /&gt;
| Current Maintainer&lt;br /&gt;
| Betreuung&lt;br /&gt;
|-&lt;br /&gt;
| Custom AI Development&lt;br /&gt;
| Anpassung und Entwicklung KI&lt;br /&gt;
|-&lt;br /&gt;
| Forum Support and Feedback&lt;br /&gt;
| Support und Rückmeldung aus dem Forum&lt;br /&gt;
|-&lt;br /&gt;
| Miscellaneous&lt;br /&gt;
| Verschiedenes&lt;br /&gt;
|-&lt;br /&gt;
| Music Development&lt;br /&gt;
| Musikkomposition&lt;br /&gt;
|-&lt;br /&gt;
| Porting&lt;br /&gt;
| Anpassung an aktuelle BfW-Versionen / Portierung &lt;br /&gt;
|-&lt;br /&gt;
| Prose and Grammatical Assistance&lt;br /&gt;
| Prosatext und Sprachhilfe&lt;br /&gt;
|-&lt;br /&gt;
| Proofreading&lt;br /&gt;
| Korrekturlesen&lt;br /&gt;
|-&lt;br /&gt;
| Sprites and Portraits&lt;br /&gt;
| Grafikdateien und Portraits&lt;br /&gt;
|-&lt;br /&gt;
| Story Art&lt;br /&gt;
| Handlungsillustrierung&lt;br /&gt;
|-&lt;br /&gt;
| Story Development / Corrections&lt;br /&gt;
| Handlungsausarbeitung&lt;br /&gt;
|-&lt;br /&gt;
| Technical Adviser&lt;br /&gt;
| Technischer Berater&lt;br /&gt;
|-&lt;br /&gt;
| (Gameplay) Testing  / Test Beta-Version&lt;br /&gt;
| Testspieler&lt;br /&gt;
|-&lt;br /&gt;
| Text Revision&lt;br /&gt;
| Textrevision&lt;br /&gt;
|-&lt;br /&gt;
| Translators / Translations&lt;br /&gt;
| Übersetzungen&lt;br /&gt;
|-&lt;br /&gt;
| Translation Assistance &lt;br /&gt;
| Übersetzungshilfe&lt;br /&gt;
|-&lt;br /&gt;
| Unit Sprites, Halo &amp;amp; Animation Art&lt;br /&gt;
| Grafikdateien, Lichteffekte und Animationen&lt;br /&gt;
|-&lt;br /&gt;
| WML / Code Contributors&lt;br /&gt;
| WML Code / Code-Beiträge&lt;br /&gt;
|-&lt;br /&gt;
| WML Assistance&lt;br /&gt;
| WML-Entwicklung&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Verschiedenes ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | (whispered), (whispers)&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | (geflüstert), (flüstert)&lt;br /&gt;
|-&lt;br /&gt;
| BW (Before Wesnoth)&lt;br /&gt;
| im Jahr x vor Wesnoth&lt;br /&gt;
|-&lt;br /&gt;
| YW (Years Wesnoth)&lt;br /&gt;
| im Jahre x Wesnoths (JW)&lt;br /&gt;
|-&lt;br /&gt;
| Lord / Lady&lt;br /&gt;
| Ehrenanrede für Titelträger des Hochadels:&lt;br /&gt;
Herr/Frau + Titel (Graf/Gräfin, Herzog, Baron(in) ...)&lt;br /&gt;
u. U. auch: Gebieter(in), Herrscher(in), Landes- / Stadtherr(in)&lt;br /&gt;
|-&lt;br /&gt;
| mylord, my lord, milord&lt;br /&gt;
| (gnädiger) Herr, mein Gebieter&lt;br /&gt;
|-&lt;br /&gt;
| mylady, my lady, dear lady, milady&lt;br /&gt;
| gnädige Dame, meine Herrin&lt;br /&gt;
|-&lt;br /&gt;
| Minister&lt;br /&gt;
| (Stadt)Ratsmitglied, Hofrat&lt;br /&gt;
|-&lt;br /&gt;
| AI (Artificial Intelligence)&lt;br /&gt;
| KI (Künstliche Intelligenz), computergesteuerte Akteure&lt;br /&gt;
|-&lt;br /&gt;
| AMLA (After Maximum Level Advancement)&lt;br /&gt;
| AMLA (Sonderbonus statt Stufenaufstieg)&lt;br /&gt;
|-&lt;br /&gt;
| campaign&lt;br /&gt;
| Kampagne&lt;br /&gt;
|-&lt;br /&gt;
| cutscene&lt;br /&gt;
| Zwischensequenz&lt;br /&gt;
|-&lt;br /&gt;
| era&lt;br /&gt;
| Epoche&lt;br /&gt;
|-&lt;br /&gt;
| faction&lt;br /&gt;
| Fraktion&lt;br /&gt;
|-&lt;br /&gt;
| level&lt;br /&gt;
| Spielabschnitt, Stufe&lt;br /&gt;
|-&lt;br /&gt;
| mission&lt;br /&gt;
| Mission, Aufgabe&lt;br /&gt;
|-&lt;br /&gt;
| MP (Multiplayer) mode&lt;br /&gt;
| Mehrspieler- / Koop-Modus&lt;br /&gt;
|-&lt;br /&gt;
| Multiplayerlobby&lt;br /&gt;
| Mehrspielerlobby&lt;br /&gt;
|-&lt;br /&gt;
| NPC (non-player character)&lt;br /&gt;
| Nicht-Spieler-Charakter (NSC), computergesteuerte Einheit&lt;br /&gt;
|-&lt;br /&gt;
| quest&lt;br /&gt;
| Auftrag, Suche, Jagd, Herausforderung&lt;br /&gt;
|-&lt;br /&gt;
| scenario&lt;br /&gt;
| Szenarium, Szenario, Partie, (Episode, Teil)&lt;br /&gt;
|-&lt;br /&gt;
| SP (single-player) mode&lt;br /&gt;
| Einzelspieler- / Solo-Modus&lt;br /&gt;
|-&lt;br /&gt;
| side&lt;br /&gt;
| Partei&lt;br /&gt;
|-&lt;br /&gt;
| team&lt;br /&gt;
| Allianz (Bei »Team« wäre nicht eindeutig ob Partei/Allianz)&lt;br /&gt;
|-&lt;br /&gt;
| Whiteboard&lt;br /&gt;
| Planungsmodus&lt;br /&gt;
|-&lt;br /&gt;
| WML (Wesnoth Markup Language)&lt;br /&gt;
| WML (Wesnoth Auszeichnungssprache)&lt;br /&gt;
|-&lt;br /&gt;
| ZoC / Zone of Control&lt;br /&gt;
| Kontrollzone (KonZ), Sicherheitszone&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== AddOns (inoffizielle Erweiterungen) ==&lt;br /&gt;
&lt;br /&gt;
Der folgende Bereich zeigt gängige Namen/Begriffe aus Übersetzungen von Beiträgen anderer Benutzer (UMC). Damit die gleiche Einheit/Sache möglichst nicht unter verschiedenen Bezeichnungen im Umlauf ist, könnt ihr hier Bezeichnungen veröffentlichen.&lt;br /&gt;
&lt;br /&gt;
=== Einheiten ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Abomination (LotI L4 Ghul)&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Widerling&lt;br /&gt;
|-&lt;br /&gt;
| Bison&lt;br /&gt;
| Wisent (NF)&lt;br /&gt;
|-&lt;br /&gt;
| Mosquito&lt;br /&gt;
| Stechmücke (S)&lt;br /&gt;
|-&lt;br /&gt;
| Saurian Haruspex (RotW)&lt;br /&gt;
| Saurianischer Opferpriester&lt;br /&gt;
|-&lt;br /&gt;
| Shark (BW)&lt;br /&gt;
| Hai&lt;br /&gt;
|-&lt;br /&gt;
| Vampire&lt;br /&gt;
| Vampir&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Rassen / Ethnie / Fraktionen ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Animal&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Getier&lt;br /&gt;
|-&lt;br /&gt;
| Aquatics (BW)&lt;br /&gt;
| Wassertiere&lt;br /&gt;
|-&lt;br /&gt;
| Carapaces (BW)&lt;br /&gt;
| Panzertiere&lt;br /&gt;
|-&lt;br /&gt;
| Dark Elves&lt;br /&gt;
| Dunkelelfen / Dunkle Elfen&lt;br /&gt;
|-&lt;br /&gt;
| Elementals&lt;br /&gt;
| Elementargeister / Urgeschöpfe (FoaP)&lt;br /&gt;
|-&lt;br /&gt;
| Faerie&lt;br /&gt;
| Feenwesen&lt;br /&gt;
|-&lt;br /&gt;
| Northern Barbarians&lt;br /&gt;
| Nordbarbaren&lt;br /&gt;
|-&lt;br /&gt;
| Ungulate (FoaP)&lt;br /&gt;
| Huftiere&lt;br /&gt;
|-&lt;br /&gt;
| Steelhive Robots&lt;br /&gt;
| Geschmiedete (LotI)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Geographie ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Black Isle  (Far Sea, TRs)&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Schwarze Insel (Fernes Meer)&lt;br /&gt;
|-&lt;br /&gt;
|Oxbow Swamp (RotW)&lt;br /&gt;
|Sumpf der stillen Wasser&lt;br /&gt;
|-&lt;br /&gt;
| Pogo Bog (S)&lt;br /&gt;
| Pogo Sumpf &lt;br /&gt;
|-&lt;br /&gt;
| Xaffrasz (S - Saurian city)&lt;br /&gt;
| Xaffrasz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Waffen ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | crystal fire (BW)&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Kristallfeuer (BW)&lt;br /&gt;
|-&lt;br /&gt;
| explosion (S)&lt;br /&gt;
| Explosion&lt;br /&gt;
|-&lt;br /&gt;
| horns (FoaP)&lt;br /&gt;
| Hörner&lt;br /&gt;
|-&lt;br /&gt;
| quarterstaff&lt;br /&gt;
| Kampfstab&lt;br /&gt;
|-&lt;br /&gt;
| shield&lt;br /&gt;
| Schild&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Waffenfähigkeiten ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | petrifies&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Versteinerung&lt;br /&gt;
|}&lt;br /&gt;
=== Gegenstände ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | armor&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Rüstung&lt;br /&gt;
|-&lt;br /&gt;
| altar&lt;br /&gt;
| Opfertisch&lt;br /&gt;
|-&lt;br /&gt;
| caravan&lt;br /&gt;
| Planwagen&lt;br /&gt;
|-&lt;br /&gt;
| storm orb (BW)&lt;br /&gt;
| Sturmkugel&lt;br /&gt;
|}&lt;br /&gt;
=== Fertigkeiten ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | darkens&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Verdunkeln&lt;br /&gt;
|-&lt;br /&gt;
| invisible&lt;br /&gt;
| Unsichtbar&lt;br /&gt;
|-&lt;br /&gt;
| penetrate&lt;br /&gt;
| Unterwandern&lt;br /&gt;
|}&lt;br /&gt;
=== Charakteristiken ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | horrid&lt;br /&gt;
| style=&amp;quot;width: 300px;&amp;quot; | Grauenerregend&lt;br /&gt;
|-&lt;br /&gt;
| loot (S)&lt;br /&gt;
| Stehlen&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Siehe auch ==&lt;br /&gt;
&lt;br /&gt;
* [[GermanTranslation|Hauptseite für deutsche Übersetzung]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Translations]]&lt;/div&gt;</summary>
		<author><name>Spixi</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=How_to_play_Dunefolk&amp;diff=70524</id>
		<title>How to play Dunefolk</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=How_to_play_Dunefolk&amp;diff=70524"/>
		<updated>2023-02-06T23:52:39Z</updated>

		<summary type="html">&lt;p&gt;Spixi: fix typos&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Factionbox}}&lt;br /&gt;
&lt;br /&gt;
All informations is made for Wesnoth 1.15.x and later. Dunefolk/Khaliphate is much different in 1.14 and older versions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;tright&amp;quot; style=&amp;quot;width: 300px; height: 300px;&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24portraits%24dunefolk%24herbalist.png&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Dunefolk units==&lt;br /&gt;
&amp;lt;b&amp;gt;Dune Burner&amp;lt;/b&amp;gt; is the only unit with fire from the Dunefolk faction. Use him to attack skeletons or woses. Compared to mages, they are generally better in defense, cheaper and not as strong when using ranged attack.&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24burner%24burner.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;good defense in mountains and villages&amp;lt;/b&amp;gt;&lt;br /&gt;
* lawful, slight vulnerability to blade attacks&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; vs skeletons, woses and saurians; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; vs cavalry, ulfserkers and grunts&lt;br /&gt;
* average melee attack (blade), strong ranged attack (fire)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Dune Herbalist&amp;lt;/b&amp;gt; can heal himself and all adjancement units. Basically a healer with melee impact damage.&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24herbalist%24herbalist.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;good defense in mountains and villages&amp;lt;/b&amp;gt;&lt;br /&gt;
* liminal, slight vulnerability to blade attacks&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; vs goblins and skeleton archers; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; vs almost everyone, especially ghosts and archers/mages&lt;br /&gt;
* average melee attack (impact)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Dune Rover&amp;lt;/b&amp;gt; is a good, balanced fighter, usable in most situations.&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24rover%24rover.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;good defense in mountains and villages&amp;lt;/b&amp;gt;&lt;br /&gt;
* liminal, no vulnerabilities. Also better on sands then other units.&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; vs most enemies when massed; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; vs skeletons and heavy infandry&lt;br /&gt;
* medium melee attack (blade), medium ranged attack (pierce)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Dune Skirmisher&amp;lt;/b&amp;gt; is your fast unit, important in difficult fights against important targets.&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24skirmisher%24skirmisher.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;good defense in almost any terrain, but low hitpoints&amp;lt;/b&amp;gt;&lt;br /&gt;
* lawful, slight vulnerability to blade, pierce and impact attacks&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; vs wounded units, mages and healers; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; vs any unit good in melee fighting (grunts, cavalry...)&lt;br /&gt;
* strong melee attack (pierce), weak ranged attack (impact)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Dune Soldier&amp;lt;/b&amp;gt; is the Dunefolk version of the grunt or wose. Strong, melee oriented unit for both attack and defense.&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24soldier%24soldier.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;good defense only in castles, average in most terrains&amp;lt;/b&amp;gt;&lt;br /&gt;
* lawful, slight vulnerability to impact attacks, good against pierce and blade. Can be upgraded into 3 useful units.&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; vs saurians, mages, archers; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; vs skeletons, trolls&lt;br /&gt;
* strong melee attack (blade)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Dune Rider&amp;lt;/b&amp;gt; is very fast on flat terrain. They are simply horse archers.&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot; style=&amp;quot;width: 72px; height: 72px;&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24rider%24rider.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;good defense in mountains and villages&amp;lt;/b&amp;gt;&lt;br /&gt;
* liminal, vulnerability to pierce attacks. Can be upgraded into 3 useful units.&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; vs wounded units and drakes; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; vs spearmen, saurians and skeleton archers.&lt;br /&gt;
* average melee attack (impact), strong ranged attack (pierce)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Naga Dirkfang&amp;lt;/b&amp;gt; is both melee and ranged attacker, that can be good even on dry lands when leveled up. Both attacks are blade.&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24nagas%24dirkfang.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;good defense in water (50-70%) and swamps&amp;lt;/b&amp;gt;&lt;br /&gt;
* neutral, Can be upgraded into 2 more powerful units.&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; vs anyone in water; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; vs anyone on dry land&lt;br /&gt;
* average melee attack (blade), average ranged attack (blade)&lt;br /&gt;
&lt;br /&gt;
==Starting troops - random opponent==&lt;br /&gt;
&amp;lt;span style=&amp;quot;width: 72px; height: 72px;&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24rider%24rider.png&amp;lt;/span&amp;gt;&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24rover%24rover.png&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24rover%24rover.png&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24burner%24burner.png&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24herbalist%24herbalist.png&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24soldier%24soldier.png&lt;br /&gt;
&lt;br /&gt;
(96 gold)&lt;br /&gt;
&lt;br /&gt;
On the maps with a lot of water, recruit one or even two naga dirkfang in the first turn.&lt;br /&gt;
&lt;br /&gt;
Probably the best possible way is to go for '''Dune Apothecary''', who can heal wounds, but cannot remove poison from friendly units. Some units, like Dune Shieldguard, can be useful only against some enemies. '''Dune Explorer''' is your guys, if you need a fast leader for some reason.&lt;br /&gt;
&lt;br /&gt;
==General Dunefolk Strategies==&lt;br /&gt;
&lt;br /&gt;
[[Dunefolk]] is a new faction in Battle for Wesnoth. They have variety of useful units, but you can also mass a lot of their cheap and powerful Dune Rovers to ensure good progress. They have multiple ranged attackers, while some can do a lot of damage in melee combat (Dune Soldiers). Remember, that you can always heal your units, but your Dune Herbalists are very different from other healers, because they can heal themselves. Upgrade at least one to get a powerful level 2 healer.&lt;br /&gt;
&lt;br /&gt;
Dunefolk defend well in mountains, but they are not very mobile there. However, they are good in desert sands and beaches. They can be good against any enemy, if proper strategy is applied. They do not like mages very well, so use your fast horse archers (Dune Riders) to hunt them down on open plains or use Dune Skirmishers to chase them, if they are not well protected from every corner.&lt;br /&gt;
&lt;br /&gt;
Dunefolk have access to healing via herbalists, charge with powerful Dune Cataphracts and together 5 (!) units with skirmisher speciality. Dune Soldiers can became very defensive, very offensive and also very motivating with leadership, if they get to level 2. While this looks nice, Dunefolk have also disadvantages. They are not good in forcing enemies to retreat from their favourite terrain. With no magic attacks and very limited poison and marksman attacks, it is hard to defeat factions line Knalgan Alliance.&lt;br /&gt;
&lt;br /&gt;
Dune Skirmisher is good for finishing enemies and that way gaining lots of experience. They need less experience than others to promote to level 2, so your strategy can be focused on using Dune Striders, that are stronger and can slow in ranged combat, or with Falconers. Falconers can make enemy unit weaker, if placed properly.&lt;br /&gt;
&lt;br /&gt;
Dunefolk have access to blade, pierce and impact attacks, same as any other faction. However, their burners can use '''fire''' attack.&lt;br /&gt;
&lt;br /&gt;
==Villages==&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://raw.github.com/wesnoth/wesnoth/master/data/core/images/terrain/village/human3.png&amp;lt;/div&amp;gt;&lt;br /&gt;
Almost every unit in Dunefolk army is good in defending villages. You need villages to help you with poison, because your healers can cure it only on level 3. Riders can move to enemy villages quickly and use their arrows to harm anyone who will try to capture it back. Universally usable Dune Rovers are the best guardians of the villages.&lt;br /&gt;
&lt;br /&gt;
==Dunefolk vs Loyalists==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24rover%24rover.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24soldier%24soldier.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24herbalist%24herbalist.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24burner%24burner.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24skirmisher%24skirmisher.png B-&lt;br /&gt;
&amp;lt;span style=&amp;quot;width: 72px; height: 72px;&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24rider%24rider.png&amp;lt;/span&amp;gt; C&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24nagas%24dirkfang.png C&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-loyalists%24horseman%24horseman.png&amp;lt;/div&amp;gt;&lt;br /&gt;
Loyalists and Dunefolk are similar. To defeat them, you must use your strenghts against their weaknesses. Both armies have access to cavalry and numerous foot soldiers. Loyalists have more melee units, while you can use your fast units with ranged attack to engage them first.&lt;br /&gt;
&lt;br /&gt;
One of the main problems are mages. They can be killed very fast, but they can also kill your units quickly. So, if they can defend mages, there is a big problem for you. With army of skirmishers, you can do a lot of damage and get out of there if needed.&lt;br /&gt;
&lt;br /&gt;
Loyalists are also known for their simply spearmen strategy. Only your riders are vulnerable to them. Also, with lots of spearmen, your skirmishers are useless. Dune soldiers can defeat spearmen, bowmen, fencers and cavaliers.&lt;br /&gt;
&lt;br /&gt;
* '''Burner:''' No one from loyalists faction is vulnerable to fire. Burners are generally a good unit, but they are not needed in this match.&lt;br /&gt;
&lt;br /&gt;
* '''Herbalist:''' As always, these guys are needed to heal wounds. Loyalists will probably do not get a lot of ranged units, so they can be relatively safe and heal your guys for longer time.&lt;br /&gt;
&lt;br /&gt;
* '''Rover:''' General purpose infantry with good cost is always usable option. They can both attack and defend.&lt;br /&gt;
&lt;br /&gt;
* '''Skirmisher:''' These guys are good against some enemies. They are very similar to fencers and can harm horsemen. Their most important job is to neutralize mages or wounded units. They can also get some villages.&lt;br /&gt;
&lt;br /&gt;
* '''Soldier:''' Very important front-line unit. Use their strengh to advance and do not forget to heal them. They are your anti spearman weapon, and they can kill other units as well.&lt;br /&gt;
&lt;br /&gt;
* '''Rider:''' Much faster than many loyalist units. Good to take some villages. Also, they have good ranged attack, that can be used against other cavalry. Spearmen and horsemen can kill them fast, so move quickly between villages.&lt;br /&gt;
&lt;br /&gt;
* '''Naga Dirkfang:''' Good in water. They have ranged attacks, what can be useful.&lt;br /&gt;
&lt;br /&gt;
==Dunefolk vs Rebels==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24soldier%24soldier.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24rover%24rover.png A-&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24herbalist%24herbalist.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24skirmisher%24skirmisher.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24burner%24burner.png B-&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24nagas%24dirkfang.png B-&lt;br /&gt;
&amp;lt;span style=&amp;quot;width: 72px; height: 72px;&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24rider%24rider.png&amp;lt;/span&amp;gt; C-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24elves-wood%24archer.png&amp;lt;/div&amp;gt;&lt;br /&gt;
Dunefolk can fight rebels in an interesting battle. Two factions with good ranged units, healing and even the (more or less) balanced fighter costs 14 gold in each faction.&lt;br /&gt;
&lt;br /&gt;
Everyone know, that rebels love forests. Can you force them out? Probably no. At least with basic units. Elves does not have complicated vulnerabilities, with exception of a wose. But will they use woses if you can cut them down with your blade weapons and also burn them with burners?&lt;br /&gt;
&lt;br /&gt;
Elvish fighters might be dangerous. They are good against your skirmishers, burners and herbalists, but they are generally weak against your dune soldiers. So, logically, rebels will use someone good against your soldiers. But who? 4 elvish units use mostly blade and pierce damage, so they will need to attack your strong, sturdy soldiers with mages. Kill mages, fighters and everyone else with a combination of soldiers, rovers, skirmishers and herbalists. You will need also some burners for extra ranged damage and to prevent enemy from using woses. As always, dunes rider are important to get villages, but they can be attacked by faster elvish scouts and gravely injured or slowed by archers and shamans.&lt;br /&gt;
&lt;br /&gt;
Battle plan: Kill elves outside of forests. Shamans might be a priority with archers and mages. Use soldiers as a front-line units and reinforce them with cheaper rovers and herbalists. Get villages and if possible, fight far from forests.&lt;br /&gt;
&lt;br /&gt;
* '''Burner:''' Fighters can do a lot of damage to them. Even archers and scouts in melee attack. Use them, to get rid of the woses and to attack during the day, because they are lawful.&lt;br /&gt;
&lt;br /&gt;
* '''Herbalist:''' Essential healer with impact damage. No enemy in this battle have vulnerability to impact and killing rebels have priority over healing. Pick one or two of them, not more.&lt;br /&gt;
&lt;br /&gt;
* '''Rover:''' Good, because they are stronger than elvish archers in melee and stronger than elvish fighters in ranged. Thats about it. Plus, they can attack woses, mages etc.&lt;br /&gt;
&lt;br /&gt;
* '''Skirmisher:''' Suprisingly, this unit is very good against Rebels. Rebels have low HP, so you can attack a lot with skirmishers. Do not recruit too many, but they can make sure, that wounded elves or woses will not get to the forest hexes. Also, good skirmisher is always good against mages.&lt;br /&gt;
&lt;br /&gt;
* '''Soldier:''' Rebels are good in blade and pierce. This guy is resistant to blade and pierce and can survive long and hit hard. Your main unit.&lt;br /&gt;
&lt;br /&gt;
* '''Rider:''' Effective, but not as much as in other duels.&lt;br /&gt;
&lt;br /&gt;
* '''Naga Dirkfang:''' Similar unit to mermens, but they have blade attack. So, they can help cutting down woses.&lt;br /&gt;
&lt;br /&gt;
==Dunefolk vs Northerners==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24rover%24rover.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24soldier%24soldier.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24herbalist%24herbalist.png A-&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24burner%24burner.png B+&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24skirmisher%24skirmisher.png C&lt;br /&gt;
&amp;lt;span style=&amp;quot;width: 72px; height: 72px;&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24rider%24rider.png&amp;lt;/span&amp;gt; C&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24nagas%24dirkfang.png C&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24orcs%24grunt.png&amp;lt;/div&amp;gt;&lt;br /&gt;
Northerners are cheap. Cheaper than you, but generally similar. They can prepare attack with lots of strong units, so this is generally a balanced scenario.&lt;br /&gt;
&lt;br /&gt;
As always, some units are better. As Dunefolk, pierce and blade is no problem, you have anough of it. But the troll whelps are resistant. While generally it is not very hard to hit troll whelps, they regenerate even when fighting and getting them out of the mountains might be complicated. However, there is a unit, you can use - dune burners.&lt;br /&gt;
&lt;br /&gt;
Most of the northerners are good only in melee attack, so shoot them with your multiple ranged units - rider, burner, rover, naga dirkfang and if needed (mostly to get some free experience), even skirmishers.&lt;br /&gt;
&lt;br /&gt;
Because you are alive, poison will harm you a lot. For dunefolk, it is very hard to get a powerful level 3 healer, who can cure poison, and northerner player knows that. He will probably make several assassins to harm your forces. Deal with them, when they are in the open places. Assassins have vulnerabilities to blade (-30%), impact and pierce (-20%), so hit them with your units, that are generally good in these. Remember, that 1HP assassin can still poison any of your units. To deal with them, soldiers looks a good idea, but they do not have any ranged attack to retaliate. So, rovers can be better in the hunt for assassins.&lt;br /&gt;
&lt;br /&gt;
* '''Burner:''' Burner burn enemies. Simple. Goblin spearman, grunts, whelps and everyone else can be killed by fire. Just do not attack assassins with them, if villages are far away.&lt;br /&gt;
&lt;br /&gt;
* '''Herbalist:''' Useful, as always. They can also effectively attack assassins or even troll whelps, two of the most annoying enemies in this match. Definetly get them!&lt;br /&gt;
&lt;br /&gt;
* '''Rover:''' Good against everything with exception of whelps - and they can still harm them with their ranged attack.&lt;br /&gt;
&lt;br /&gt;
* '''Skirmisher:''' Specialised assasin, who costs more than most enemy unit. Not a very good idea, but they can be used to kill assassins. Weak against grunts and other units with full health. They can also steal villages, what hurts a lot - but generally whelps do no need them. Do not over-recruit them.&lt;br /&gt;
&lt;br /&gt;
* '''Soldier:''' Solid, strong unit, that can hold the line. When poisoned, they do not need to get away ASAP and can fight a while. Their resistances helps them against assassins, archers, grunts and wolf riders, but they are generally not that great against whelps. In simply words, whelps are good against blade and soldiers are weak against impact.&lt;br /&gt;
&lt;br /&gt;
* '''Rider:''' Dune Rider is a prime enemy of Wolf Rider. Wolves are faster, but lack ranged attack. Your dune riders are vulnerable only to pierce, while wolf riders use blade. However, wolf rider is one of the few fast units without weakness for pierce. Dune riders are also good to finish grunts and prevent injured assassins to get away.&lt;br /&gt;
&lt;br /&gt;
* '''Naga Dirkfang:''' Like in most battles, these water units are great. Even against other nagas. Because they have ranged attack, they can work well with your riders and skirmishers to hunt down enemies that comes close to water.&lt;br /&gt;
&lt;br /&gt;
==Dunefolk vs Undead==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24herbalist%24herbalist.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24burner%24burner.png A&lt;br /&gt;
&amp;lt;span style=&amp;quot;width: 72px; height: 72px;&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24rider%24rider.png&amp;lt;/span&amp;gt; B+&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24skirmisher%24skirmisher.png C&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24rover%24rover.png C&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24soldier%24soldier.png C&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24nagas%24dirkfang.png D&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24undead-skeletal%24skeleton%24skeleton.png&amp;lt;/div&amp;gt;&lt;br /&gt;
Undead skeletons are good against your pierce and blade damage. Dark Adepts can make a lot of damage and ghosts can attack your lawful/liminal/neutral units during the night and heal themselves. So, undead are strong. On the other hand, you have units, that are especially good against them. Keep a good mix of units to cover your weaknesses.&lt;br /&gt;
&lt;br /&gt;
Because all of your units are living, undead (and orcs) will try to use poison. Ghouls are a problem, because they can force your units to flee, you can cure your units only with level 3 healers and 3 your units are vulnerable to poison. Burn them or shoot them with ranged attack. That unit is surprisingly strong in defense, so you might need to focus fire.&lt;br /&gt;
&lt;br /&gt;
Your strategy is centered on Dune Burners. You simple need fire to defeat skeletons, ghouls and to retaliate against their strong ranged attack. Burners are not invulnerable, so mix them with other units and of course, try to get enemy villages. Because of your burners, it is possible that you will not face many ghosts in this battle.&lt;br /&gt;
&lt;br /&gt;
* '''Burner:''' Good ranged damage that is especially effective against skeletons and skeleton archers. Very important unit, use a lot of them.&lt;br /&gt;
&lt;br /&gt;
* '''Herbalist:''' This healer have impact damage, what is nice and useful. It is possible that enemy will try to poison them, so they need protection. Feel free to crush skeleton archers any time, especially during day.&lt;br /&gt;
&lt;br /&gt;
* '''Rover:''' All-around unit, that can be used against adepts and even against ghouls. Weak to skeletons, but cheap. Good to have, but you should buy 1 or 2, because you need gold elsewhere.&lt;br /&gt;
&lt;br /&gt;
* '''Skirmisher:''' Good against adepts, weak against everyone else. Same as rover, do not mass them. 1 or 2 should be enough.&lt;br /&gt;
&lt;br /&gt;
* '''Soldier:''' Another nice and powerful unit, that can be used against other enemies than undead. They are lawful, so their attack will be much stronger during the day. While weak in attacking during night, you can use them as a shield for other units. However, if you somehow manage to get a captain, it will be great help for other your units.&lt;br /&gt;
&lt;br /&gt;
* '''Rider:''' Horse archers are an interesting choice. Their attack is pierce and impact, so he and herbalist is the only unit with impact attack in your army. You need a unit to get villages, because enemy ghosts and bats will try to get yours. Riders are also great when winning, because they can block a way of the enemy leader to his own keep.&lt;br /&gt;
&lt;br /&gt;
* '''Naga Dirkfang:''' As usual, these nagas are good. Blade attack is not what you need, so use them only in maps with lots of water.&lt;br /&gt;
&lt;br /&gt;
==Dunefolk vs Knalgans==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24rover%24rover.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24soldier%24soldier.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24herbalist%24herbalist.png A-&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24burner%24burner.png B+&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24skirmisher%24skirmisher.png C&lt;br /&gt;
&amp;lt;span style=&amp;quot;width: 72px; height: 72px;&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24rider%24rider.png&amp;lt;/span&amp;gt; C&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24nagas%24dirkfang.png C&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24fighter.png&amp;lt;/div&amp;gt;&lt;br /&gt;
This is tough, maybe the most frustrating match in Battle for Wesnoth. Defeating knalgans is problematic for a number of reasons.&lt;br /&gt;
&lt;br /&gt;
First, they are much better and faster on hills and mountains. They can easily attack your units and exploit your vulnerabilities. Last and not least, you do not have magic attacks. While you have access to poison and marksman attacks, it all comes with level 2 units, and you can always upgrade to unit that might be better or more needed.&lt;br /&gt;
&lt;br /&gt;
You have to use your solid melee attackers to fight dwarves and outlaws - but they will fire at you with poachers. You can also try to find a perfect unit against poachers, but you will find none in your arsenal. At the end, both factions will fight with a strange mix of units. Dunefolk can use classic blade/impact/pierce attacks, but dwarves are good against them. So even your nagas with blade attack will have limited use. It is possible, that enemy will recruit a fast moving gryphon rider, who can also make things worse, if he collect some villages from you. To make it even more horrific, even cheap thieves that costs only 13 gold can kill your fighters and healers at night.&lt;br /&gt;
&lt;br /&gt;
So... what can you do? Mixing units a lot and using the cheapest and most versatile unit you got - dune rovers. Your biggest advantage is healing, so try to heal more than 1 your unit every turn. Also, you will need to upgrade dune soldiers to get a really powerful unit - or a captain with leadership. In general, your units are faster in flat plains, so you can use hexes just out of reach of the dwarves.&lt;br /&gt;
&lt;br /&gt;
* '''Burner:''' Fire damage? Nice! But blade vulnerability is not what you want against dwarvish fighters, ulfserkers and gryphon riders. Use them to kill enemies, but do not use them a lot, because they might die quickly.&lt;br /&gt;
&lt;br /&gt;
* '''Herbalist:''' You can heal your units, knalgans cannot. So these guys will be the primary target. While not very useful in combat, in closed maps these guys are a must. Make sure to cover them, because gryphons can attack them from far away. Also, as a melee only unit, poachers and even thunderers might come to get some free damage.&lt;br /&gt;
&lt;br /&gt;
* '''Rover:''' All-around unit with balanced ratio of attack and defense. Keep them in front. They are a good unit, but not perfect. Use other units as well, based on what your enemy will do.&lt;br /&gt;
&lt;br /&gt;
* '''Skirmisher:''' Great for units, that knalgans do not have. Vulnerable to everything knalgans have. On the other hand, they have good defenses in terrain and knalgans cannot use marksman/magic attacks, so they can be of some use. While you do not need them very much, they are fast and can help finish some outlaw or dwarf.&lt;br /&gt;
&lt;br /&gt;
* '''Soldier:''' Lots of HP, good melee attacks. They are your meat shield. They are a little vulnerable to hammers from dwarvish fighters, while having good resistances to pierce and blade. A trio of soldiers, rovers and herbalists is a good strategy, where soldier is your &amp;quot;tank&amp;quot;. Upgrade one to a captain.&lt;br /&gt;
&lt;br /&gt;
* '''Rider:''' Use them to both grab villages and add additional ranged attack. They are good in flat plains, but dwarves will try to use difficult terrain against you. Beware of the thunderers.&lt;br /&gt;
&lt;br /&gt;
* '''Naga Dirkfang:''' Good in water. Dwarves are good against blade, so try to attack thieves and footpads that come close to water. They are okay against gryphons and much cheaper.&lt;br /&gt;
==Dunefolk vs Drakes==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24herbalist%24herbalist.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24rover%24rover.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24skirmisher%24skirmisher.png A-&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24nagas%24dirkfang.png B-&lt;br /&gt;
&amp;lt;span style=&amp;quot;width: 72px; height: 72px;&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24rider%24rider.png&amp;lt;/span&amp;gt; C+&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24burner%24burner.png C&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24soldier%24soldier.png D&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24fighter.png&amp;lt;/div&amp;gt;&lt;br /&gt;
Drakes like fire. Saurians do not like fire at all. Your only unit with fire is terrible against drakes and wonderful against saurians. So, as many others, you have to deal pierce damage to drakes and blade to saurians.&lt;br /&gt;
&lt;br /&gt;
Drakes do a lot of damage and none of your units is resistant to fire or anything else. In comparison, dunefolk units are more &amp;quot;normal&amp;quot;, while drakes and saurians have both strenghts and weaknesses. Make sure to use more units than drake player, because in 1v1 their units are more powerful.&lt;br /&gt;
&lt;br /&gt;
Mobile drakes, crashers and augurs will be your enemies in this battle, but they can (same as you) change their tactics if needed. Drakes can use units to exploit your vulnerabilities. You should know, that you have multiple good units against saurians, so enemy will probably use mostly drakes.&lt;br /&gt;
&lt;br /&gt;
Will some drake gliders come to your territory to steal your villages? You bet they will come. Skirmishers and riders are the best way to stop them. Do not forget to use ZOCing with your units.&lt;br /&gt;
&lt;br /&gt;
* '''Burner:''' Great against saurians. Blade is good, fire is good... but drakes are good against both. So, use them to make sure, your enemy will not use saurians. Or simply make this guys when you see that enemy uses a lot of them.&lt;br /&gt;
&lt;br /&gt;
* '''Herbalist:''' Good, important and fragile. They will try to kill him and with their offensive capabilities, you will simple need a few of them.&lt;br /&gt;
&lt;br /&gt;
* '''Rover:''' This is your miracle guy. Good against drakes, solid against saurians and cheap. What else can you need? Much cheaper than Drake Clasher, so if you face them, you must have at least one more unit than your enemy.&lt;br /&gt;
&lt;br /&gt;
* '''Skirmisher:''' Wounded drake killer, additional damage dealer with pierce damage and a useful specialist. Still, they are not your main fighters and overrecruiting can be bad in many reasons, because their HPs are low. Attack with other units, like rovers, finish with skirmishers. Try to upgrade one of these guys.&lt;br /&gt;
&lt;br /&gt;
* '''Soldier:''' Strong unit with lots of HP, but only average defenses. If you recruit him, he will not be a primary target and drakes will simply find another targets. You can use them in closed maps to guard important route, but other than that, you should use another units. They are good against saurians.&lt;br /&gt;
&lt;br /&gt;
* '''Rider:''' Fast unit for village grabbing and provide good ranged attack. Good, very good, but not so much against a combination of clashers and saurians. Do not over-recruit.&lt;br /&gt;
&lt;br /&gt;
* '''Naga Dirkfang:''' Based on water. They are also good in marshes and can defeat saurians there, so definetly a good unit to have. Almost useless against drakes.&lt;br /&gt;
&lt;br /&gt;
==Dunefolk vs Dunefolk==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24rover%24rover.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24soldier%24soldier.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24herbalist%24herbalist.png A&lt;br /&gt;
&amp;lt;span style=&amp;quot;width: 72px; height: 72px;&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24rider%24rider.png&amp;lt;/span&amp;gt; B+&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24nagas%24dirkfang.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24burner%24burner.png C-&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24skirmisher%24skirmisher.png D&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24soldier%24soldier.png&amp;lt;/div&amp;gt;&lt;br /&gt;
Strategy to defeating dunefolk as dunefolk is simple. Dunefolk have some advantages and disadvantages, but it have also a good unit for everything - dune rover. Other units are good as well, but there is no single good target for your skirmishers.&lt;br /&gt;
&lt;br /&gt;
Because your will probably see a lot of rovers, take also units who are good against rovers - dune soldiers. Especially with healing from herbalists. In fights between two dunefolk leaders, speed is important - and it is possible that more riders will be used. Do not let your enemy have more mobile cavalry than you have.&lt;br /&gt;
&lt;br /&gt;
* '''Burner:''' Fire damage is nice, but no one have vulnerability to fire. However, vulnerability to blade can be a problem against massed rovers. Do not buy this guys, unless you are a skilled player who know how to use them effectively in this match.&lt;br /&gt;
&lt;br /&gt;
* '''Herbalist:''' Impact damage is not very useful, while their healing is nice. If you can heal more than 1 unit every turn, take them. If not, take a single one.&lt;br /&gt;
&lt;br /&gt;
* '''Rover:''' Good for everything, with exception of fighting soldiers. use them a lot.&lt;br /&gt;
&lt;br /&gt;
* '''Skirmisher:''' Same as burner. Use them if you are a skilled player. Otherwise, one should be enough.&lt;br /&gt;
&lt;br /&gt;
* '''Soldier:''' This is your rover killer and he is also good against burners, herbalists and riders. Use them together with herbalists and rovers.&lt;br /&gt;
&lt;br /&gt;
* '''Rider:''' You need them, probably more than in other matches.&lt;br /&gt;
&lt;br /&gt;
* '''Naga Dirkfang:''' Surprisingly, they are awesome fighters. If you play small multiplayer map with shallow water, even small rivers, they can guard other units, when combined with herbalists.&lt;br /&gt;
&lt;br /&gt;
== Specialists ==&lt;br /&gt;
How to play specialists: [[How to play Horseman|Horseman]] - [[How to play Mages|Mages]] - [[How to play Skirmishers|Skirmishers]]&lt;br /&gt;
&lt;br /&gt;
[[Category:How to Play]]&lt;/div&gt;</summary>
		<author><name>Spixi</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=ImagePathFunctions&amp;diff=70480</id>
		<title>ImagePathFunctions</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=ImagePathFunctions&amp;diff=70480"/>
		<updated>2023-01-31T21:15:48Z</updated>

		<summary type="html">&lt;p&gt;Spixi: Add RIGHT function and section about pseudo IPFs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Image Path Functions provide a simple method for WML coders to alter the way their specified images will be displayed in the game. All of the function parameters are included at the end of an image path and should not contain any spaces or special characters (other than those specified here).&lt;br /&gt;
&lt;br /&gt;
If you need to practice it without having to reload all WML, you can use an add-on named ''Image loading tester''.  It is available on the 1.9, 1.10, 1.11, 1.12 and 1.14 add-on servers.&lt;br /&gt;
&lt;br /&gt;
All functions are applied in left-to-right order, with the exception of RC(), TC() and PAL() which are applied always before any other functions. Standard team coloring for a unit is applied after all custom RC(), TC() and PAL() functions but before any other functions.&lt;br /&gt;
That is, stuff like&lt;br /&gt;
 &amp;quot;units/elves-wood/fighter.png~CROP(20,20,40,40)~CROP(10,10,10,10)&amp;quot;&lt;br /&gt;
would result in taking a crop to a 40x40 rectangle whose top-left corner is x=20, y=20; and then taking a crop from ''that'' rectangle with x=10, y=10, w=10, h=10. The result is the area x=30, y=30, w=10, h=10 from the original graphic.&lt;br /&gt;
&lt;br /&gt;
== Changing the colors ==&lt;br /&gt;
&lt;br /&gt;
=== BLEND: Color-blend function ===&lt;br /&gt;
Blends the image with the given color to produce a more controlled tinting effect than color-shifting, independently of the image's contents.&lt;br /&gt;
&lt;br /&gt;
'''~BLEND(r,g,b,o)'''&lt;br /&gt;
&lt;br /&gt;
The color is defined by the ''r'', ''g'', and ''b'' parameters (integers ranging from 0 to 255). The ''o'' (opacity) parameter controls the amount by which the given color will be blended into the image, and may be specified either as a factor from 0.0 to 1.0, or percentage up to 100%. Thus, ~BLEND(r,g,b,0.5) and ~BLEND(r,g,b,50%) are equivalent.&lt;br /&gt;
&lt;br /&gt;
=== BW: Black and White function ===&lt;br /&gt;
{{devfeature1.13|1}}&lt;br /&gt;
May be used to convert the image to pure black and white, without grey pixels. &lt;br /&gt;
&lt;br /&gt;
'''~BW(threshold)'''&lt;br /&gt;
* ''threshold'': a value between 0 and 255 (both limits included). All pixels are converted as greyscale first, and if their average value is greater than the threshold they become white, otherwise they become black.&lt;br /&gt;
&lt;br /&gt;
=== CS: Color-shift function ===&lt;br /&gt;
Performs simple per-channel color shifts by adding the arguments to the respective color channels.&lt;br /&gt;
&lt;br /&gt;
''Multi-channel:'' '''~CS(r,g,b)'''&lt;br /&gt;
''Single-channel:'' '''~R(v)''', '''~G(v)''', '''~B(v)'''&lt;br /&gt;
&lt;br /&gt;
The multichannel syntax assumes all arguments are set to zero initially, so one can use, e.g. ~CS(2,4) to add +2 and +4 units to the red and green channels respectively, leaving the blue channel intact. Arguments may be negative to diminish a channel's value; this can be used to change an image's brightness. Checks for out-of-range arguments or results (less than 0 or greater than 255) are made, so the resultant values are truncated if necessary.&lt;br /&gt;
&lt;br /&gt;
The single channel syntax behaves exactly the same, except that only single-channel modifications are made per function. However, one can stack them to produce the same behavior as ~CS(), e.g. ~R(r)~G(g)~B(b), but that tends to be just a performance loss.&lt;br /&gt;
&lt;br /&gt;
=== GS: Greyscale function ===&lt;br /&gt;
May be used to greyscale the image (turn to black and white)&lt;br /&gt;
&lt;br /&gt;
'''~GS( )'''&lt;br /&gt;
&lt;br /&gt;
=== L: Lightmap color-shift function ===&lt;br /&gt;
Performs per-pixel and per-channel color shifts using another image (a &amp;quot;lightmap&amp;quot;) as source, allowing to create textured light effects.&lt;br /&gt;
&lt;br /&gt;
'''~L(lightmap)'''&lt;br /&gt;
&lt;br /&gt;
For each pixel of the original image, it checks the RGB values from the corresponding pixel of the lightmap, slightly transform them, then add these values to the original pixel.&lt;br /&gt;
&lt;br /&gt;
The transformation involved is done to convert the (0,255) spectrum to (-255,255), allowing to add or subtract color. The formula is (x-128)*2, which means that 0 gives -256, 128 gives 0 and 255 gives 254. So, the no-effect lightmap is a fully grey image (RGB = 128,128,128) and any non-grey pixel will shift the colors of the original.&lt;br /&gt;
&lt;br /&gt;
Note that the lightmap will be scaled to the same dimensions as the original image.&lt;br /&gt;
&lt;br /&gt;
=== NEG: Negative function ===&lt;br /&gt;
{{devfeature1.13|0}}&lt;br /&gt;
Also known as ''invert'', it negates all the RGB values of the image, giving it an effect similar to a photographic negative.&lt;br /&gt;
&lt;br /&gt;
'''~NEG( )'''&lt;br /&gt;
&lt;br /&gt;
Inverts the image, giving it an effect like a photographic negative.&lt;br /&gt;
&lt;br /&gt;
{{devfeature1.13|1}} '''~NEG(''' ''threshold'' ''')'''&lt;br /&gt;
&lt;br /&gt;
If a channel has a value greater than the threshold, the channel will be inverted, performing an effect known as ''solarization''.&lt;br /&gt;
Threshold must be between -1 and 255, with -1 equivalent to full inversion and 255 as no-op value.&lt;br /&gt;
&lt;br /&gt;
{{devfeature1.13|1}} '''~NEG(''' ''threshold_red, threshold_green, threshold_blue'' ''')'''&lt;br /&gt;
&lt;br /&gt;
If a channel has a value greater than the corresponding threshold, the channel will be inverted.&lt;br /&gt;
Each threshold must be between -1 and 255, with -1 equivalent to full inversion and 255 as no-op value.&lt;br /&gt;
&lt;br /&gt;
=== PAL: Palette-switch function ===&lt;br /&gt;
May be used to change colors in an image following the specifications of a source and target (new) palette.&lt;br /&gt;
&lt;br /&gt;
'''~PAL(''' ''source color palette'' '''&amp;gt;''' ''target color palette'' ''')'''&lt;br /&gt;
*''source color palette'' - the first parameter is a source color palette, such as magenta. Do not surround this parameter with quotes.&lt;br /&gt;
*''target color palette'' - the new palette to take the place of the source colors in the image.&lt;br /&gt;
&lt;br /&gt;
=== RC: Re-Color function ===&lt;br /&gt;
May be used to change some colors in an image. It is possible to use ''RC'' more than once on the same image, with different source palettes.&lt;br /&gt;
&lt;br /&gt;
'''~RC(''' ''source color palette'' '''&amp;gt;''' ''destination color range'' ''')'''&lt;br /&gt;
&lt;br /&gt;
==== source color palette ====&lt;br /&gt;
The first parameter is a set of colors, usually the magenta palette. Do not surround this parameter with quotes. The three standard palettes are:&lt;br /&gt;
&lt;br /&gt;
* '''magenta''' - the 19 colors described in [[Team_Color_Shifting]]&lt;br /&gt;
* '''ellipse_red''' - all 255 colors with RGB value (n,0,0)&lt;br /&gt;
* '''flag_green''' - all 255 colors with RGB value (0,n,0)&lt;br /&gt;
&lt;br /&gt;
The palette can also be given inline as a set of hexadecimal RGB values.&lt;br /&gt;
&lt;br /&gt;
The named palettes are defined using the '''[[GameConfigWML#Color_Palettes|[color_palette]]]''' tag, and you can also define your own custom color palette using that tag.&lt;br /&gt;
&lt;br /&gt;
Warning: the RC function will also accept (and not give a warning about) '''red''', '''green''' and any other defined '''[color_range]'''; however the set of RGB values for those aren't guaranteed. Using '''red''' instead of '''ellipse_red''' might be equivalent to the palette 030000,060000,0a0000,...,ff0000,ff0a0a,...,fff0f0.&lt;br /&gt;
&lt;br /&gt;
==== destination color range ====&lt;br /&gt;
This is the second parameter, signifying the ID of a color range defined in the file [http://github.com/wesnoth/wesnoth/blob/master/data/core/team-colors.cfg data/core/team-colors.cfg] (or it may be a custom ID for a color range defined locally). You can also define a custom color range inline (the rgb key from [[GameConfigWML#Color_Palettes]]; note that RC does not use the fourth color for anything).&lt;br /&gt;
&lt;br /&gt;
For this destination color range, using '''red''' or '''green''' makes sense.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
In the following example, the magenta regions in an elvish captain's image are turned a healthy shade of green:&lt;br /&gt;
&lt;br /&gt;
  [message]&lt;br /&gt;
      speaker=narrator&lt;br /&gt;
      image=units/elves-wood/captain.png~RC(magenta&amp;gt;green)&lt;br /&gt;
      message=_ &amp;quot;Now I am on the green team.&amp;quot;&lt;br /&gt;
  [/message]&lt;br /&gt;
&lt;br /&gt;
The following example replaces a few of the '''magenta''' pixels with green ones:&lt;br /&gt;
&lt;br /&gt;
  misc/orb.png~RC(690039,c30074,ec008c &amp;gt; 007f00,00ff00,000000,000000)&lt;br /&gt;
&lt;br /&gt;
The IDs of the color ranges may be the lowercased English name of the palette's base color (e.g. 'red', 'brown', etc.). They may also be numeric color indices from the palette WML included with the game, but this is not recommended.&lt;br /&gt;
&lt;br /&gt;
=== SEPIA: Sepia function ===&lt;br /&gt;
{{devfeature1.13|0}}&lt;br /&gt;
May be used to give to the image a sepia tint (like in old pictures).&lt;br /&gt;
&lt;br /&gt;
'''~SEPIA()'''&lt;br /&gt;
&lt;br /&gt;
=== SWAP: Channel Swap function ===&lt;br /&gt;
{{devfeature1.13|1}}&lt;br /&gt;
May be used to swap the RGBA channels of an image.&lt;br /&gt;
&lt;br /&gt;
'''~SWAP(''' ''r, g, b'' ''')'''&lt;br /&gt;
'''~SWAP(''' ''r, g, b, a'' ''')'''&lt;br /&gt;
* ''r'', ''g'', ''b'', ''a'': each of these arguments may have a value equal to ''red'', ''green'', ''blue'' or ''alpha''. The RGBA channels of the original image will be exchanged accordingly (for example, &amp;lt;tt&amp;gt;~SWAP(blue,green,red)&amp;lt;/tt&amp;gt; swaps the blue and red channels).&lt;br /&gt;
&lt;br /&gt;
=== TC: Team-Color function ===&lt;br /&gt;
In Wesnoth version 1.2, the only Image Path Function was '''~TC()''', which took two comma-separated parameters: the team number and the source color palette. The valid values for both of these parameters are defined in the file ''data/team-colors.cfg''&lt;br /&gt;
&lt;br /&gt;
'''~TC(''' ''team number'' ''',''' ''source color palette'' ''')'''&lt;br /&gt;
*''team number'' - this is the first parameter, a number 1-9 signifying the team number of a unit. Number 1 typically means the red team, 2 typically means the blue team, and so on (unless the scenario color settings for any side have been altered).&lt;br /&gt;
*''source color palette'' - the second parameter is a source color palette, usually magenta. Do not surround this parameter with quotes.&lt;br /&gt;
&lt;br /&gt;
== Transformations ==&lt;br /&gt;
&lt;br /&gt;
=== FL: Flip function ===&lt;br /&gt;
May be used to flip an image horizontally and/or vertically.&lt;br /&gt;
&lt;br /&gt;
'''~FL(''' ''optional argument list'' ''')'''&lt;br /&gt;
*''vertical'' - if the string &amp;quot;vert&amp;quot; is found anywhere in the argument list, the image will be flipped vertically.&lt;br /&gt;
*''horizontal'' - if the string &amp;quot;horiz&amp;quot; is found anywhere in the argument list, the image will be flipped horizontally.&lt;br /&gt;
*if the argument list is empty, the image will only be flipped horizontally.&lt;br /&gt;
&lt;br /&gt;
=== ROTATE: Rotate function ===&lt;br /&gt;
May be used to rotate an image.&lt;br /&gt;
&lt;br /&gt;
'''~ROTATE(''' ''degrees'' ''')'''&lt;br /&gt;
* ''degrees'' - The number of degrees by which the image will be rotated. Positive numbers indicate clockwise rotation, while negative numbers indicate counter-clockwise. (Zero indicates no rotation.)&lt;br /&gt;
If the number of degrees is omitted, a quarter turn (90 degrees) clockwise is assumed.&lt;br /&gt;
&lt;br /&gt;
=== SCALE: Image-scaling function ===&lt;br /&gt;
Scales a graphic up or down.&lt;br /&gt;
&lt;br /&gt;
'''~SCALE( ''new_width'', ''new_height'' )&lt;br /&gt;
&lt;br /&gt;
The ''new_width'' and ''new_height'' parameters are taken as the image's original width or height, respectively, if one of them happens to be zero. Negative values are treated in the same way, but an error is printed in stderr. This uses the bilinear interpolation algorithm.&lt;br /&gt;
&lt;br /&gt;
=== SCALE_INTO function ===&lt;br /&gt;
{{DevFeature1.13|5}}&lt;br /&gt;
&lt;br /&gt;
Similar to SCALE, but preserves aspect aspect ratio, scaling to the minimum extent required to fit into the specified area. The resulting image will have the specified width or the specified height, but not necessarily both.&lt;br /&gt;
&lt;br /&gt;
=== SCALE_SHARP function ===&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|0}}&lt;br /&gt;
&lt;br /&gt;
Scales functions using a nearest neighbor algorithm. Specify width and height. (It has the same syntax as ~SCALE.)&lt;br /&gt;
&lt;br /&gt;
'''~SCALE_SHARP(200,300)'''&lt;br /&gt;
&lt;br /&gt;
=== SCALE_INTO_SHARP function ===&lt;br /&gt;
{{DevFeature1.13|5}}&lt;br /&gt;
&lt;br /&gt;
Like SCALE_INTO, but uses nearest neighbor algorithm instead of bilinear interpolation.&lt;br /&gt;
&lt;br /&gt;
=== XBRZ function ===&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|0}}&lt;br /&gt;
&lt;br /&gt;
Scales functions using the XBRZ algorithm. You may scale things up either 2x, 3x, 4x, or 5x. The scaling tries to preserve the pixel art nature.&lt;br /&gt;
&lt;br /&gt;
'''~XBRZ(n)'''&lt;br /&gt;
&lt;br /&gt;
== Cut-and-paste ==&lt;br /&gt;
&lt;br /&gt;
=== BLIT: Blit function ===&lt;br /&gt;
Blit the parameter image on the main image. Example: peasant.png~BLIT(hat.png,30,10)&lt;br /&gt;
&lt;br /&gt;
'''~BLIT(src,x,y)'''&lt;br /&gt;
* ''src'': an image file used as source for the blit, other image path functions can be used there.&lt;br /&gt;
* ''x'',''y'': top-left corner coordinates where to blit. If missing assume (0,0).&lt;br /&gt;
&lt;br /&gt;
=== CROP: Crop function ===&lt;br /&gt;
Extracts a rectangular section of an image file.&lt;br /&gt;
&lt;br /&gt;
'''~CROP(x,y,width,height)'''&lt;br /&gt;
* ''x'',''y'': top-left corner coordinates for the rectangular section extracted. Must be greater or equal than zero, and inside the image's bounds.&lt;br /&gt;
* ''width'': width of the selected region. Must be less than or equal to the original image's width, and must not be negative.&lt;br /&gt;
* ''height'': height of the selected region. Must be less than or equal to the original image's height, and must not be negative.&lt;br /&gt;
&lt;br /&gt;
=== MASK: Mask function ===&lt;br /&gt;
Remove parts of the main image using the parameter image as a mask. Example: grass.png~MASK(circle.png) will give a circle of grass.&lt;br /&gt;
&lt;br /&gt;
'''~MASK(mask,x,y)'''&lt;br /&gt;
* ''mask'': an image file used as mask, other image path functions can be used there.&lt;br /&gt;
* ''x'',''y'': top-left corner coordinates where to put the mask. Parts ouside of the mask are considered transparent. If missing assume (0,0).&lt;br /&gt;
&lt;br /&gt;
Only the alpha channel of the mask is used and each alpha value will be the maximum alpha of the resulting image. This means that the fully-transparent parts of the mask will erase the corresponding parts of the image, but also that a semi-transparent mask will create a semi-transparent image. &lt;br /&gt;
&lt;br /&gt;
== Opacity ==&lt;br /&gt;
&lt;br /&gt;
=== ADJUST_ALPHA ===&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|?}}&lt;br /&gt;
&lt;br /&gt;
Alters the alpha of the image according to a WFL formula. The formula must output an integer from 0 to 255 giving the alpha across the canvas. It is evaluated for every pixel and may use the following variables: x, y, red, green, blue, alpha, width, height. {{DevFeature1.15|0}} The variables u and v are also supported now, evaluating to normalized texture coordinates (in the range 0..1); these are equivalent to &amp;lt;tt&amp;gt;x/width&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;y/height&amp;lt;/tt&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
'''~ADJUST_ALPHA(formula)'''.&lt;br /&gt;
&lt;br /&gt;
The context object for the formula is a '''[[#CHAN:_General_function|pixel object]]'''.&lt;br /&gt;
&lt;br /&gt;
=== O: Opacity modifying function ===&lt;br /&gt;
Changes an image's opacity at render time.&lt;br /&gt;
&lt;br /&gt;
'''~O( ''factor or percentage%'' )'''&lt;br /&gt;
&lt;br /&gt;
If the argument includes the percentage symbol (''%''), it will be treated as a percentage of full (real) opacity; an image will be displayed at its native opacity with ~O(100%).&lt;br /&gt;
&lt;br /&gt;
Without the percentage symbol, the argument is assumed to be a factor by which the image's native opacity should be multiplied. Thus, ~O(0.5) and ~O(50%) are equivalent forms of specifying to reduce an image's opacity by half.&lt;br /&gt;
&lt;br /&gt;
=== PLOT_ALPHA ===&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|0}}&lt;br /&gt;
&lt;br /&gt;
At each pixel, the color is replaced with a grey-tone reflecting the alpha value at that pixel, and the new image is fully opaque. Useful for plotting the alpha to help debug an IPF or inspect a sprite.&lt;br /&gt;
&lt;br /&gt;
'''~PLOT_ALPHA()'''&lt;br /&gt;
&lt;br /&gt;
=== WIPE_ALPHA ===&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|0}}&lt;br /&gt;
&lt;br /&gt;
At each pixel, the alpha value is discarded and the pixel is made fully opaque. Useful again for diagnostics.&lt;br /&gt;
&lt;br /&gt;
'''~WIPE_ALPHA()'''&lt;br /&gt;
&lt;br /&gt;
=== Background coloring function ===&lt;br /&gt;
Sets the color of all the (semi-)transparent pixels of the image.&lt;br /&gt;
&lt;br /&gt;
'''~BG(r,g,b)'''&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
=== BL: Blurring function ===&lt;br /&gt;
&lt;br /&gt;
Blurs a graphic at render time using the same algorithm used for in-game dialogs.&lt;br /&gt;
&lt;br /&gt;
'''~BL( ''radius'' )'''&lt;br /&gt;
&lt;br /&gt;
=== CHAN: General function ===&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|7}}&lt;br /&gt;
&lt;br /&gt;
This function allows you to do pretty much anything. It takes up to four comma-separated formulas, one each for the red, green, blue, and alpha channels. Each formula functions exactly the same as the formula for '''ADJUST_ALPHA''', but the output integer is used for the corresponding channel rather than always the alpha channel. Do not surround the formula in &amp;lt;code&amp;gt;$(...)&amp;lt;/code&amp;gt;, since that will erase the &amp;lt;tt&amp;gt;self&amp;lt;/tt&amp;gt; variable.&lt;br /&gt;
&lt;br /&gt;
'''~CHAN(formula, formula, formula)'''&lt;br /&gt;
&lt;br /&gt;
The context object for each of the formulas is a '''pixel object''' with the following properties:&lt;br /&gt;
&lt;br /&gt;
* '''x''', '''y''': coordinates of the pixel, from the top left&lt;br /&gt;
* '''u''', '''v''': {{DevFeature1.15|0}} normalized coordinates in the range [0,1]&lt;br /&gt;
* '''width''', '''height''': size of the image canvas&lt;br /&gt;
* '''red''', '''green''', '''blue''', '''alpha''': components of the pixel colour&lt;br /&gt;
&lt;br /&gt;
=== DARKEN: Removed function ===&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|7}} This function has been removed. Use a ~BLIT(misc/tod-dark.png) call instead.&lt;br /&gt;
&lt;br /&gt;
Puts a time-of-day schedule overlay (misc/tod-dark.png) on the image, which must be large enough to accommodate it.&lt;br /&gt;
&lt;br /&gt;
'''~DARKEN()'''&lt;br /&gt;
&lt;br /&gt;
=== BRIGHTEN: Removed function ===&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|7}} This function has been removed. Use a ~BLIT(misc/tod-bright.png) call instead.&lt;br /&gt;
&lt;br /&gt;
Puts a time-of-day schedule overlay (misc/tod-bright.png) on the image, which must be large enough to accommodate it.&lt;br /&gt;
&lt;br /&gt;
'''~BRIGHTEN()'''&lt;br /&gt;
&lt;br /&gt;
=== NOP: Null function ===&lt;br /&gt;
&lt;br /&gt;
Does nothing.&lt;br /&gt;
&lt;br /&gt;
'''~NOP()'''&lt;br /&gt;
&lt;br /&gt;
=== Pseudo IPFs ===&lt;br /&gt;
&lt;br /&gt;
The following functions are ignored by the IPF image modification module, but used by other Wesnoth components. They only work in special areas.&lt;br /&gt;
&lt;br /&gt;
==== NO_TOD_SHIFT: Disabling ToD ====&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|8}}&lt;br /&gt;
&lt;br /&gt;
This is used by the terrain renderer and prevents terrain and item images from being affected by ToD lighting. This is in particular useful when placing unit images as items, as they will look the same as when placed as unit.&lt;br /&gt;
&lt;br /&gt;
'''~NO_TOD_SHIFT()'''&lt;br /&gt;
&lt;br /&gt;
==== RIGHT: Display portraits on the right ====&lt;br /&gt;
&lt;br /&gt;
'''''([[DevFeature|Version 1.5.8 and later only]])'''''&lt;br /&gt;
&lt;br /&gt;
This is used by the [[InterfaceActionsWML#.5Bmessage.5D|'''[message]''']] interface action and can be used to show a portrait on the right side of the screen.&lt;br /&gt;
&lt;br /&gt;
'''~RIGHT()'''&lt;br /&gt;
&lt;br /&gt;
== Creating an image file from IPFs ==&lt;br /&gt;
&lt;br /&gt;
The big advantage of Image Path Functions is that they allow you to alter an image without needing a new image file. However, you can also save the result into a new image file using Wesnoth's command line option ''--render-image'.&lt;br /&gt;
&lt;br /&gt;
Assuming you find a way to open your computer's terminal:&lt;br /&gt;
 wesnoth --render-image &amp;quot;units/human-peasants/ruffian.png~RC(magenta&amp;gt;green)~BLIT(units/human-peasants/woodsman.png~RC(magenta&amp;gt;lightblue),18,12)&amp;quot; /tmp/new_image_file.png&lt;br /&gt;
&lt;br /&gt;
Or on Windows:&lt;br /&gt;
 &amp;quot;C:\Path\to\Battle for Wesnoth\wesnoth.exe&amp;quot; --render-image &amp;quot;units/human-peasants/ruffian.png~RC(magenta&amp;gt;green)~BLIT(units/human-peasants/woodsman.png~RC(magenta&amp;gt;lightblue),18,12)&amp;quot; new_image_file.png&lt;br /&gt;
&lt;br /&gt;
Use cases include:&lt;br /&gt;
* Experimenting with Image Path Functions. If none of the images are from an add-on, adding ''--noaddons'' will speed this up.&lt;br /&gt;
* If a new Image Path Function is added to the development version of Wesnoth, add-ons for older Wesnoth versions can use a generated image instead.&lt;br /&gt;
* In case you want to use this anywhere out of Wesnoth. On a website, in Project Haldric, …&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[FancyAddonIcons]] - Tips and tricks for advanced Image Path Function manipulation&lt;br /&gt;
* [[DataURI]] - An image path may also contain the image directly, as a Base64 encoded string&lt;br /&gt;
* [http://shadowm.ai0867.net/projects/wesnoth-rcx Wesnoth RCX]  - Tool to preview unit recoloring. Covers the effects of the [[#RC:_Re-Color_Function|RC]], [[#TC: Team-Color Function|TC]] and [[#PAL:_Palette-switch_Function|PAL]] functions.&lt;br /&gt;
[[Category:WML Reference]]&lt;/div&gt;</summary>
		<author><name>Spixi</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=How_to_play_Knalgans&amp;diff=68066</id>
		<title>How to play Knalgans</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=How_to_play_Knalgans&amp;diff=68066"/>
		<updated>2021-06-13T00:33:59Z</updated>

		<summary type="html">&lt;p&gt;Spixi: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Factionbox}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;tright&amp;quot; style=&amp;quot;width: 300px; height: 300px;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24portraits%24dwarves%24fighter.png&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Dwarvish units==&lt;br /&gt;
&amp;lt;b&amp;gt;Dwarvish Fighter&amp;lt;/b&amp;gt; is important unit with two melee attacks, so he can choose which one is better. Also, strong front-line unit.&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24fighter.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;maximum defense and speed in mountains (70%)&amp;lt;/b&amp;gt;&lt;br /&gt;
* neutral&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; vs mages, woses, outlaws, ulfserkers; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; vs nobody, usable in any match&lt;br /&gt;
* strong melee attack (blade and impact)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Dwarvish Ulfserker&amp;lt;/b&amp;gt; is your specialist. He will be killed easily, but he can also kill someone not good in melee fighting. &lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24ulfserker.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;average defenses everywhere&amp;lt;/b&amp;gt;, but moves fast in complicated terrain.&lt;br /&gt;
* neutral&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; vs mages, saurians, archers and enemy leaders; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; vs grunts, ghosts, drake clashers&lt;br /&gt;
* strong melee attack with '''berserk''' (blade)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Dwarvish Thunderer&amp;lt;/b&amp;gt; is a strange unit with powerful, but only one ranged attack.&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24thunderer%24thunderer.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;maximum defense and speed in mountains (70%)&amp;lt;/b&amp;gt;&lt;br /&gt;
* neutral&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; vs drakes and units on wrong terrain; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; vs skeletons&lt;br /&gt;
* average melee attack (blade), strong ranged attack (pierce)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Dwarvish Guardsman&amp;lt;/b&amp;gt; is a solid defensive unit. When you need someone to guard important hexes, he is your guy. Not very good in attacking. Make sure he can use his steadfast ability.&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24guard.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;average defenses everywhere&amp;lt;/b&amp;gt;&lt;br /&gt;
* neutral&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; vs melee attackers; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; vs ranged attackers&lt;br /&gt;
* average melee attack with steadfast (pierce), weak ranged attack (pierce)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Gryphon Rider&amp;lt;/b&amp;gt; is very fast, moving quickly in every terrain. Most expensive unit in game.&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24gryphon-rider.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;good defense in mountains, average on every other terrain, what is awesome.&amp;lt;/b&amp;gt;&lt;br /&gt;
* neutral&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; vs retreating wounded units; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; vs multiple enemies, heavy infantry and archers&lt;br /&gt;
* strong melee attack (blade)&lt;br /&gt;
&lt;br /&gt;
==Outlaw units==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Footpad&amp;lt;/b&amp;gt; is fast. That is his main strength. Better in scouting than in fighting.&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24footpad.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;maximum defenses (70%) in many terrains&amp;lt;/b&amp;gt;, but vulnerable to pierce, blade and impact weapons&lt;br /&gt;
* chaotic&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; as a blocking and fast moving unit; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; in fighting&lt;br /&gt;
* weak melee attack (impact), average ranged attack (impact)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Poacher&amp;lt;/b&amp;gt; is a chaotic version of classic human bowman, capable to fight even in swamps. They have much more ranged hits than dwarvish thunderers.&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24poacher.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;good defenses in many terrains&amp;lt;/b&amp;gt;&lt;br /&gt;
* chaotic&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; against drakes and units with no ranged attack; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; in melee fighting&lt;br /&gt;
* weak melee attack (blade), strong ranged attack (pierce)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Thief&amp;lt;/b&amp;gt; is a very special outlaw. He (or she) can do minimal damage during the day and a lot of damage during the night, when well placed. Also thieves are very cheap.&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24thief.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;maximum defenses (70%) in many terrains&amp;lt;/b&amp;gt;, low hitpoints and vulnerable to pierce, blade and impact weapons&lt;br /&gt;
* chaotic&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; when well placed at night; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; in fighting when backstab cannot be used&lt;br /&gt;
* average melee attack with '''backstab''' (blade)&lt;br /&gt;
&lt;br /&gt;
==Starting troops - random opponent==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24gryphon-rider.png&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24fighter.png&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24fighter.png&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24thunderer%24thunderer.png&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24footpad.png&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24thief.png&lt;br /&gt;
&lt;br /&gt;
(100 gold)&lt;br /&gt;
&lt;br /&gt;
Main thing to condider is the price of Gryphons. If you need more of them, than you will have less units in total. With less or no gryphons, you can recruit more powerful dwarves. You can also switch gryphon for ulfserker and thief for a poacher. This combination cost 96 gold.&lt;br /&gt;
&lt;br /&gt;
'''Rogue''' is probably the best leader for the Knalgans. These men and women are very agile, so they can move fast and also run from danger. They can also work wonders with their backstab and skirmisher abilities.&lt;br /&gt;
&lt;br /&gt;
==General Knalgan strategies==&lt;br /&gt;
&lt;br /&gt;
The Knalgans have perhaps the greatest tactical flexibility of any faction. Because of this, there is no one way to play the Knalgans. This can be a good thing or a bad thing, depending on your personality. You can use dwarves for power and defense and outlaws for movement and low prices.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Fighter:''' It can take more hits than most units, making it a great defender. It also has two damage types, making it offensively versatile. It shares the downsides of all dwarves: slow movement (though few terrains slow it down) and low defense on non-specialized terrain.&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Dwarvish Thunderer:''' Although powerful, it can just as easily do no damage at all, making this a tricky unit to know how to use. Fortunately, it is almost as durable as the fighter.&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Dwarvish Ulfserker:''' This utility unit has value in many match-ups. It will ensure that either its opponent or it dies. Thus, it has a 100% kill chance against a non-melee unit such as the dark adept, and a very high kill chance against many non-melee-centric units, such as the Mage, Saurian Augur, Bowman, Elvish Shaman, and a wide variety of others. The problem is that your opponent can very easily kill an Ulfserker: they will lose to any dedicated melee unit unless very exceptional circumstances are in play (remember that the ulf cannot get nearly as high defensive values as the Dwarvish fighter, for example), starting hitpoints, time of day, or a combination of the above. Since it is an expensive unit, letting an elvish fighter kill your ulf out of the blue is unwise: however if he just killed a Mage and in killing the ulf the fighter is severely weakened, this is obviously a good trade for you. When using Ulfs, plan how you want them to kill and how you want them to die.&lt;br /&gt;
* '''Footpad:''' Opinions on the footpad vary widely. In this guide you will not see them recommended often, but many good players consider these a staple unit of the Knalgans. Regardless, this is not a unit you should overrecruit or your offensive power will be very low. It has excellent defense where your dwarves might be very vulnerable and you might not want to risk your more costly riders. Use it for it's great ZoC abilities even if its offense isn't high-powered.&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Poacher:''' Also a very useful unit for the Knalgans, this unit provides a reliable ranged attack to counterbalance the power of the thunderer, plus it fills many useful hexes (notably forests and swamps) well.&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Thief:''' This unit is possibly the highest damage-dealing unit in your arsenal when used correctly. A strong thief at night does 12-3 damage: the equivalent of a level 2's damage output. However, they have very few hitpoints and their low resists compound this problem. High defense and low cost offset these disadvantages. Remember to backstab with it whenever possible.&lt;br /&gt;
* '''Gryphon Rider:''' Possibly the best scout in the game in terms of combat, this is tempered by its high cost. Use it as a lookout for enemy advances and pick off weak or wounded units that are retreating behind enemy lines.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that that the dwarves should stay in mountains, hills, and other high-defense terrain and the outlaws should stay in any non-grassland terrain, if possible. Keep in mind that since your footpads and thieves have 60 defence on grassland, and your enemy will often have 40 or even 30, it can often be to your benefit if the enemy chooses to attack them on open ground.&lt;br /&gt;
&lt;br /&gt;
==Villages==&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://raw.github.com/wesnoth/wesnoth/master/data/core/images/terrain/village/human3.png&amp;lt;/div&amp;gt;&lt;br /&gt;
Outlaws have 70% defense in villages, so they will get little hits. If hitted, they can heal rapidly. Another good unit for holding villages are guardsmen, but only against melee enemies. Use your fastest unit, gryphon rider, to quickly collect villages. If you need gold, you can also recruit a footpad for this job.&lt;br /&gt;
&lt;br /&gt;
==Knalgans vs Loyalists==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24fighter.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24guard.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24poacher.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24ulfserker.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24thunderer%24thunderer.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24gryphon-rider.png C&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24footpad.png C&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24thief.png C&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-loyalists%24horseman%24horseman.png&amp;lt;/div&amp;gt;&lt;br /&gt;
Defend in day, strike at night. That's how the battle will go. Beware the Horseman and Mage and be prepared to counter these heavy daytime hitters. Again, an Ulfserker can be your best friend, especially if you can catch a Horseman at night, or a Mage/Bowman anytime.&lt;br /&gt;
&lt;br /&gt;
Recruit a Fighter, a Thunderer, a Guardsman, and a Gryphon depending on the layout of villages. Fill out your army with what you think will serve you best for that particular battle. Water battles will be nearly pointless. Cheap Mermen with higher defense will easily rout your Gryphon(s). Avoid sea battles unless you can taunt a Merman within range of a ranged unit (who can stand on decent terrain). A Gryphon's extra sight is good for spotting long range Horsemen, so it usually is worth having one around, but recruit no more than one. They don't counter any unit very cost-efficiently, so use it primarily as a scout and utility unit.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Ulfserker:''' If you get one, don't get it until turn two or later. Grabbing one in your initial recruit will only make him impotent during the first few turns of daytime. Ulfserkers are what you will use to kill Mages, grind up horse meat at night, and get rid of Bowmen - though they shouldn't be recruiting many. You shouldn't need more than 1 unless they go mad with Mages.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Fighter:''' Good to fight Spearmen, having these guys is a necessity. These are also your best unit to defend against Heavy Infantry.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Guardsman:''' Get one of these guys. These will make your front line immune to Horsemen. Also useful to counter-attack Cavalry, Mages, and Bowmen. If HI get close enough, milk XP off of them with your ranged attack. The level will come faster than you expect.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Thunderer:''' Get one or two. Good against essentially all of the Loyalist units, the pierce ranged is even better against the two mounted units.&lt;br /&gt;
 &lt;br /&gt;
* '''Thief:''' These guys can be used against most Loyalist units at night, but avoid trying to backstab Spearmen. Even at night their firststrike can get nasty on this low HP unit. I recommend the Poacher instead of this guy. They might kill mages quickly if well placed.&lt;br /&gt;
&lt;br /&gt;
* '''Poacher:''' A great unit to counterattack Loyalists and press the attack at night. His multiple strikes are of better use against the high defense Fencer, though his ranged pierce is best against the mounted units. His attack does a modest 3-4 to Heavy Infantry at night (compared to a Thunderers 11-1), and you'll want to use this unit against Spearmen outside of day as well. Although they are weak in daytime, they serve many purposes and are well worth the 14 gold.&lt;br /&gt;
&lt;br /&gt;
* '''Footpad:''' Do not recruit this unit when fighting Loyalists. This unit is very useful against heavy infrantrymen, while their low cost and speed allows them to pin enemy units down and occupy terrain. When fighting as a loyalist commander, I find them annoying. Still, the lack of offensive power is a real problem. It is possible that some fights between footpads and fencers will happen. Block during the day, attack during night.&lt;br /&gt;
&lt;br /&gt;
* '''Gryphon Rider:''' Useful as scouts mainly, you can use these to run down hurt horses, go for 1-attack-kills on Fencers (9% chance if they have no bonus hp), or again, to try to hold important grassland hexes. Beware during day though, as HI, Mages, and Horsemen can all tear Gryphons apart quickly. Recruit no more than 1.&lt;br /&gt;
&lt;br /&gt;
You'll want to press as hard as you can at night, more so than even against Drakes. The reason for this is that Loyalists have no level 1 Neutral or Chaotic units. Every unit the opposing player has will suffer a penalty at night - unless he has a Lieutenant behind his front line. Because of this possibility, don't press too close to his castle until you have gained a monetary advantage, as you will start losing units more rapidly when he comes back at you with an additional +25%. Put your Guardsman up front - this will dissuade any charge attacks. Keep a Dwarvish Fighter or Dwarvish Ulfserker nearby in case the player chooses to besiege you with Mages. Spearmen that attack a Guardsman in day will deal nearly equal damage to each other, which can add up quickly. Counter any advance with Thunderers and Poachers. Don't expose your Dwarves to poor terrain or they will die.&lt;br /&gt;
&lt;br /&gt;
You'll want to whittle away at Heavy Infantry with Poachers and Thunderers and you'll want to give the killing blow to a Fighter. Upgrading Dwarvish Fighters should be your main priority as they are your best defense and counter to the easy Spearman-wave attack. Once leveled up, the massive HP on the Steelclad will also give it the ability to withstand attacking Heavy Infantry and Mages.&lt;br /&gt;
&lt;br /&gt;
Basically, Loyalists have an incredible amount of versatility. You'll have to play smart and counterattack very well in order to win. Deal free damage when you can, and limit the number of hexes you can be attacked from - especially during day. Start commencing your attack before night actually breaks. You'll want to maximize your advantage over those 2 turns, so make sure they don't creep away before night hits. As always, stay on good terrain, and make sure Fencers can't skirmish around to kill any weak units you may be hiding.&lt;br /&gt;
&lt;br /&gt;
==Knalgans vs Rebels==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24fighter.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24ulfserker.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24thunderer%24thunderer.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24gryphon-rider.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24poacher.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24thief.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24guard.png D&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24footpad.png E&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24elves-wood%24archer.png&amp;lt;/div&amp;gt;&lt;br /&gt;
This is one of the trickiest match-ups to play. Both factions are Neutral, so neither has an advantageous time of day to attack (with their main units). To win this battle you will need smart recruits and good unit placement, as well as a little luck; the same goes for your opponent. Knalgans may have a slight advantage with the &amp;quot;one unit must die&amp;quot; Ulfserker, but Rebel defense as well as heal, slow, and magic are serious counters. Look for opportunities to grab mountains and hills, especially if they have no forest next to them. ''Forests are your biggest enemy'', so occupy them with your Outlaw counterparts or Gryphons.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Fighter:''' Again, these will be the meat of your forces. Any front without one of these will succumb to Elvish Fighters. Dwarfs beat Elves 1-on-1, but they are more expensive. They are good damage soakers and damage dealers. Stay on preferred terrain at all times.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Ulfserker:''' counters Mages, Elvish Shamans, and oftentimes Elvish Archers. Again, don't recruit too many of these, as Elvish Fighters will easily come back to finish them off, and they are 5 gold cheaper. If you get a chance to take out a Mage, do so. Not only will you gain 1 gold in attrition, but another unit will likely have to expose itself or get hurt to finish you off. Elvish Archers should be #2 on the &amp;quot;to kill&amp;quot; list, and they are sometimes worth jeopardizing your Ulfserker for if you catch one of them off of forest. Again, the reasoning is you only lose 2 gold in the trade and the opponent must waste moves and usually HP in order to finish you. Again, they may also expose themselves. You might be able to get away with ulfing Woses if it's nighttime and you're in a mountain. Make sure he isn't a Quick, Intelligent Ulf, and check the CTK as always.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Thunderer:''' Another staple. This unit is good against Rebels with luck. Stick him on a mountain and Elves will hurt themselves trying to remove you. They aren't so great for dependable offense against the high defense of the elves, but their counter-attacks are great.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Guardsman:''' Guardsmen are great for holding frontline villages and chokepoints - with backup. A lone Guardsman can hold out for a turn, if lucky 2 or 3, while on a town. He deals very little damage in return, especially against the ranged specialized Rebels. Recruit 1 if necessary, and no more than 2. They just aren't worth the lack of offensive/counter-attack units.&lt;br /&gt;
&lt;br /&gt;
* '''Thief:''' You'll want 1 or 2 of these guys depending on your play style. At night, a combo of thieves can destroy Woses, Elvish Archers, Mages, and Shaman. Keep them in the forest hexes your opponent will want, but not in daytime. They can be quickly killed by mages and sharpshooters - if you do not kill them first.&lt;br /&gt;
&lt;br /&gt;
* '''Poacher:''' Poachers are useful to fill up forest hexes and to attack Elvish Fighters. Their main usefulness is as a counter-attacking utility unit to grab forest and press at night. They are cheap, somewhat weak, but deal more dependable offensive damage than the Thunderer. 5-4 at night is equivalent to a 17 gold Elvish Archer, and you only spend 14.&lt;br /&gt;
&lt;br /&gt;
* '''Footpad:''' Don't recruit this unit when fighting Rebels. It lacks both firepower and hitpoints even while in the forests Footpads and Elves both enjoy.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Gryphon Rider:''' These monsters are incredible useful against Rebels. Their utility lies in fighting any water battles against the weak Merman Hunters, scouting, taking opportunistic attacks against poorly placed Elves, and if you find a hurt Wose, you may consider attacking one - even though Gryphons have a weakness for Impact. At night they do essentially equal damage to each other, and you may not be able to get the finishing blow with one of your slower units. Do so as a calculated risk when you only need 1 hit to kill. Otherwise it's quite a risk.&lt;br /&gt;
&lt;br /&gt;
Generally you'll want a healthy dose of Dwarvish Fighters and Thunderers, along with several gryphons for map control. An Ulfserker, perhaps a Guardsman, and some Outlaws will provide added flexibility. Whichever chaotic units (if any) you recruit, make sure to protect them at day.&lt;br /&gt;
&lt;br /&gt;
If your opponent purchases scouts, feel lucky - they are next to useless against you. Beware of ambushes, and don't scout unsure forests with your Gryphon in daytime. Take as much tactical forest as you can with the appropriate units, and make a stranglehold on mountains. Ulf when you get a good chance, and be ready to counter in day as well as pressing at night. Each battle will play out differently in this matchup according to what your opponent recruits, so see what he has early, and keep track of any Woses. Also, do not let your Ulfs be slowed or they are certainly dead.&lt;br /&gt;
&lt;br /&gt;
==Knalgans vs Northerners==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24fighter.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24ulfserker.png A-&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24poacher.png A-&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24guard.png A-&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24thunderer%24thunderer.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24gryphon-rider.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24footpad.png B-&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24thief.png D-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24orcs%24grunt.png&amp;lt;/div&amp;gt;&lt;br /&gt;
The biggest problem you will have with Northerners will be their numbers. Northies will gladly trade units with you and gain a monetary advantage. Make them depend on luck by staying on good terrain, and their high upkeep may start to become a factor. Both factions are melee-oriented, so they will not have many classic ranged units.&lt;br /&gt;
&lt;br /&gt;
Recruit a Dwarvish Fighter and a mix of other good units. Stay on villages or mountains for the first assault to minimize the effect any poison will have and reduce the chance of it hitting. Let your opponent attack you, and then counter-attack with your Poachers and Thunderers if you have them - even a Guardsman's ranged attack will add up. Send Ulfserkers against Assassins whenever you get a decent chance, as the Poison will hurt more than their melee attacks. If the northerner overrecruits assassins, you should be able to power through his ranks, so normally eliminating an assassin removes the immediate threat of poison.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Ulfserker:''' Recruit one of these guys if you're really having a problem finishing their units off, or your opponent likes to use Assassins. He's expensive, and Northerners are melee oriented, so most of their units will be able to take a majority of this unit's HP away, if not kill him outright. Assassins' Poison will quickly erode your army's HP though, so having one may prove valuable. Since Assassins cost 17 gold you'll only lose 2 in attrition, and you'll likely take lots of hp from another unit with you.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Fighter:''' Again a necessity. His damage dealt in defense is how you'll deal a majority of your damage. If possible, get a rotation of these guys in the front line. You'll deal more damage than your opponent on average, but he will come with more units - 4 Grunts cost the same as 3 DFs.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Guardsman:''' Another good guy to have one of if not more. He can survive nighttime assaults better than the fighter, and will still do respectable damage back to the enemy. Use your ranged attack on Grunts to make them turn around and heal.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Thunderer:''' Nice to have. Their combination of good resistances and ranged damage make them good counter-attackers. For cheaper ranged counter-attackers, use Poachers as they will also be used to hold forest hexes. Recruiting DTs may crowd your hill hexes, especially since that's what the Northies will be grabbing.&lt;br /&gt;
 &lt;br /&gt;
* '''Thief:''' Not a great buy against Northies. His melee-only nature along with his Chaotic alignment make him most effective in the same way Northeners are. Avoid the urge to recruit these guys. Also, no costly priority targets from your enemy make this units almost worthless.&lt;br /&gt;
&lt;br /&gt;
* '''Poacher:''' Again, these guys you'll want to recruit a few of. When the Northies come after you at night, you can make a strong counter-attack with their 5-4 ranged.&lt;br /&gt;
&lt;br /&gt;
* '''Footpad:''' This guy can be a utility unit against Northerners, but the money is better spent elsewhere. Footpads can harass Grunts and Wolfs, take forest hexes, and block Assassins from poisoning your Dwarves. Not the best buy, but you may be able to get your money's worth.&lt;br /&gt;
&lt;br /&gt;
* '''Gryphon Rider:''' Again, it's usually good to have one of these guys to scout, plug up grassland, and be a defensive damage dealer. He's also good for trapping/killing Assassins and being a target for their poison. He is very costly, compared to your outlaws and enemy grunts.&lt;br /&gt;
&lt;br /&gt;
The biggest thing you need to worry about will be poison; this cannot be overemphasized. If you get a good foothold on mountains and hills, poison will be the weapon of choice to knock you off your perch. Be ready to fill in with a replacement unit, and try to kill assassins before any other units. Melee strikes will have to get through your resistance - poison does not. You also don't deal any damage back when poison hits you. If you know you're going to be facing poison on the next turn, have a plan for how you will be rotating units to villages to detox and heal.&lt;br /&gt;
&lt;br /&gt;
Allow your opponent to attack you from forest hexes if they are next to mountains that you occupy. Your 70% defense will outdo his 50% defense, and his confidence will be higher to attack since he won't be on grass. Even if an Assassin uses that hex, if an Ulfserker is within reach, he should be able to take him out from on top the mountain.&lt;br /&gt;
&lt;br /&gt;
To kill Trolls, you will want to focus exclusively on them until they die. Thus it is best to ignore them and kill others than to only do a minimal amount of damage to Trolls each turn. Their regeneration will give them essentially limitless HP if you do this. Kill his friends and then focus on him. If there are several, take them out one at a time. Try to avoid water battles with Nagas, unless there is only one. You won't want any Gryphons you get to be pinned, especially where you cannot help them, so be cautious with water battles. &lt;br /&gt;
&lt;br /&gt;
To sum up, kill poisoners fast, get units that deal good melee damage in defense, and get good counter-attacking ranged units&lt;br /&gt;
&lt;br /&gt;
==Knalgans vs Undead==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24fighter.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24ulfserker.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24thunderer%24thunderer.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24gryphon-rider.png C&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24footpad.png C&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24thief.png C&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24poacher.png D&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24guard.png E&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24undead-skeletal%24skeleton%24skeleton.png&amp;lt;/div&amp;gt;&lt;br /&gt;
If you know you're playing against Undead, the smartest thing to do is to recruit a Dwarvish Ulfserker. He will automatically kill any Dark Adept that he attacks. He is also good for taking on Ghouls and Skeleton Archers. Beware of ghosts: at night the phantoms can kill your ulf, although at day your ulf will come out victorious. Here are the units you will want to recruit to counter Undead units:&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Ulfserker:''' counters Dark Adepts, and most other undead units in daytime. Don't recruit many unless the opponent has no Skeletons. Skeletons can kill an Ulfserker even in day. Ulfs are also expensive, so you don't want to trade them 1-for-1 with Undead units unless you get a Ghost. Be mindful of what can counterattack them on your opponent's next turn.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Fighter:''' counters Skeletons, Skeleton Archers, and is a generally high HP unit that can soak up nighttime damage for your front line. Dwarvish Fighters are probably the best all-around L1 heavy infantry in the game. If your opponent is smart, however, they will spam ghouls—and the dwarvish fighter really sucks against poison. Their lack of mobility is a major disadvantage; their armor is also ineffective against poison.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Guardsman:''' Do not recruit this unit if you are fighting Undead. His Pierce damage is less useful than even Blade against Undead. His low damage also makes him a bad unit to counter-attack with. Even for pure defense you can use better units in this match.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Thunderer:''' This is a good unit to have in your front line in mountains. His high defense and good resistances should keep him alive from nighttime Skeleton attacks, and his 18-1 ranged will make it very risky for Dark Adepts to come after you. Thunderers are also good to attack Ghosts, as 2 ranged hits will kill a Ghost - this even works at night.&lt;br /&gt;
&lt;br /&gt;
* '''Thief:''' They are only good against dark adepts. Attack adept with thief and finish him with ulfserker or gryphon. Or attack skeleton archer with thief and finish with ulfserker/gryphon/fighter again. Thieves will be much more useful on level 2 as rogues. Still, not the best unit you can have. Ghouls are a real nuisance for you—and the thieves’ high defence (= much better chance to not get poisoned) and higher mobility (= much less time to get to a village and heal) make them ideal for finishing off the toxic undead. Their combination of arcane resistances and high defence are handy against ghosts, especially at night; Like many knalgan units, the thief is situational, and works to fill a particular niche. Do not use them against skeletons, for which you are much better off with fighters.&lt;br /&gt;
&lt;br /&gt;
* '''Poacher:''' A utility unit versus Undead. It's good for finishing Ghosts and killing Walking Corpses. It can also be used to pick at Skeletons and Ghouls. Money is spent better on other units, but don't forget that he may be useful.&lt;br /&gt;
&lt;br /&gt;
* '''Footpad:''' This weak character is really only useful versus Undead as a cheap scout. His Impact damage is good against Skeletons and Skeleton Archers, and he has the added bonuses of being Chaotic (which deals more damage when Undead try to advance at night), and being hard to hit. His best feature is his ranged attack versus Skeletons at night, and that's only 6-2. Recruiting 1 on your first turn to grab villages is likely the only use you'll get from this guy, unless you need a unit to occupy forest hexes (which dwarves do very poorly at 30% defense).&lt;br /&gt;
&lt;br /&gt;
* '''Gryphon Rider:''' Probably not the best expenditure of gold versus Undead, but they do serve many purposes that can justify their cost: they give extended view of battle, allowing you to know what is coming and to counter appropriately; they are good for getting behind enemy lines to finish hurt Dark adepts; and they serve as good ZoC units for plains and forest hexes. Note that this unit is much more useful against ghouls and adepts than against skeletons — the latter’s 40% blade resistance is what really makes them ineffective. But their speed makes them very handy against the former, as they can threaten adepts, work in conjunction with thieves, and heal quickly after being poisoned by a ghoul.&lt;br /&gt;
&lt;br /&gt;
Generally you'll want a good dose of Dwarvish Fighters, a few Thunderers, a Gryphon for vision/utility, an ulf or two, and maybe a Poacher or Footpad. Dwarves are really what you want to use, for their high HP and decent resists. This helps them survive the nighttime onslaught, and their neutrality will give them good damage in defense and also the ability to press the attack in daytime. Don't be afraid to send an Ulfserker at a ghost in daytime - make sure to check the CTK, but it should be good if your Ulfserker is at high hp: bonus if you can get great terrain. Defeat for the Ghost will be nearly certain if the Ulfserker is Strong.&lt;br /&gt;
&lt;br /&gt;
Dark adepts will, as always, be the main danger to your army: they'll knock dwarves out of their mountains, footpads out of wherever, and even gryphons are in danger from them. Be especially mindful of where her dark adepts will most likely attack next turn.&lt;br /&gt;
&lt;br /&gt;
==Knalgans vs Knalgans==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24fighter.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24guard.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24gryphon-rider.png A-&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24thunderer%24thunderer.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24poacher.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24thief.png C&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24ulfserker.png C&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24footpad.png E&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24fighter.png&amp;lt;/div&amp;gt;&lt;br /&gt;
A tough battle. Dwarves have great defense, and no way to combat great defense. The high HP and the resistances will make this a game needing a lot of strikes to kill. Don't think you'll be able to rush in and win - you're going to need intelligent unit placement and again, some luck. Focus on levelling (non-Gryphon) units if possible as the added damage will be needed.&lt;br /&gt;
&lt;br /&gt;
Recruit a Gryphon, a Guardsman, a Thunderer, a Fighter, an Ulfserker, and a mix of other useful units. This game will be won through fighting from hills and mountains, getting and keeping a money advantage, leveling a unit, and waiting for your opponent to take a risk that they shouldn't. Keep them off of your mountains at any cost. If they get there you will spend precious moves, attacks, and HP trying to take them off. It's usually better to ignore enemies on mountains than to fight them.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Ulfserker:''' As always, one of these utility guys isn't a bad buy. Catch a Thunderer off his perch, or a Thief or Poacher in daytime, and that's one less unit to deal with. However, Fighters and other units can defeat Ulfserkers&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Fighter:''' These guys are a must. Use it against any unit. These guys are hard to kill.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Guardsman:''' Use these to hold villages and frustrate your opponent.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Thunderer:''' Use these to besiege enemy villages or poke at DFs or Gryphons.&lt;br /&gt;
 &lt;br /&gt;
* '''Thief:''' Not a good buy unless used to counter Thunderers and Poachers. Their blade attack does little to Dwarves unless backstabbing at night (8-3). Better to use Dwarvish Fighters for melee. No good target for thieves and only costly unit, gryphons, are too strong.&lt;br /&gt;
&lt;br /&gt;
* '''Poacher:''' An alright cheap buy for ranged forest grabbing.&lt;br /&gt;
&lt;br /&gt;
* '''Footpad:''' Don't buy this unit even if your opponent is bothering you with Gryphons. You can get 3+ Footpads for the price of 2 Gryphons, but it's not worth it. The weakness to Impact guarantees at least a 4-2 attack with these guys even in daytime, but unfortunately, unless you get bonus hp from traits, they will die in 2 hits from Gryphons, so it is still a risky buy - especially since they are useless against all other Knalgans. Just say no once again.&lt;br /&gt;
&lt;br /&gt;
* '''Gryphon Rider:''' Useful as your only scout unit. Use these to get behind enemy lines to village steal, kill the wounded, or to pin a Dwarf on bad terrain. These guys are also good forest and plains holders for crucial areas that your Dwarves will fare poorly on.&lt;br /&gt;
&lt;br /&gt;
== Knalgans vs Drakes ==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24poacher.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24thunderer%24thunderer.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24guard.png A-&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24fighter.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24ulfserker.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24gryphon-rider.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24thief.png D&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24footpad.png E&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24fighter.png&amp;lt;/div&amp;gt;&lt;br /&gt;
These guys are big and nasty. They will burn you, while saurians may try to freeze you as well. Thunderers and poachers will be your main weapon against drakes, but they will require support units as well. Dwarves are generally better against physical damage than against elemental ones.&lt;br /&gt;
&lt;br /&gt;
Recruit a Gryphon and a good mix of Dwarvish Thunderers, Dwarvish Guardsmen, a Poacher or two, and maybe a Dwarvish Fighter. Your opponent will likely get some Saurian Augurs to take away your high defense advantage, so having that Dwarvish Fighter around to take them out is usually quite helpful along with the Gryphon. Basically, recruit Pierce, Pierce, and more Pierce. &lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Ulfserker:''' Good for killing Augurs, scouts, and maybe Burners. Not really a good choice against Drakes in general (because drakes can damage it faster than it can damage them), but can serve some purposes. One ranged attack from burner may drop their health low, so they will have to heal themselves and not attack for a turn or two.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Fighter:''' A good unit to use against saurians, but generally the Fighter is not how you want to go against Drakes.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Guardsman:''' Guardsmen are worth the price against Drakes. Their Pierce goes right through Drake resistances, and a Strong one actually gets an additional point of damage. They are not that great against Clashers of course, but they can survive hits from them. A couple of these are a good buy, especially if you plop them on villages.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Thunderer:''' This should be your unit of choice versus Drakes. A Thunderer does 20-1 damage to Drakes in ranged, and Burners will do (6/5/3)-4 damage in return. Thunderers have much better defense than Burners, but do suffer from having 8 less HP. Thunderers have the benefit of costing 4 less gold. You'll want to use their &amp;quot;luck&amp;quot; attack on the easily hit Drakes as much as possible. Thunderers should be the meat of your army.&lt;br /&gt;
 &lt;br /&gt;
* '''Thief:''' Not really useful against the Drakes, they are best used to counter Saurian Augurs, which are better countered by using Dwarvish Fighters.&lt;br /&gt;
&lt;br /&gt;
* '''Poacher:''' Another great unit against Drakes. Their attack at night deals a good 5-4 against all Drakes. Having better defense on Forest and villages, 1 or 2 of these guys aren't a bad idea. Another possibility is to mass them and clear everything with exception of saurians, which can be killed with ulfserkers.&lt;br /&gt;
&lt;br /&gt;
* '''Footpad:''' Don't recruit this unit when fighting Drakes, with exception of taking villages from drakes.&lt;br /&gt;
&lt;br /&gt;
* '''Gryphon Rider:''' Useful for early village grabbing, Gryphons also can be used against the weak Saurians or Drake Burners. These fliers are probably the only way you'll hunt down retreating hurt Drakes. Don't recruit too many due to their cost and lack of a ranged defensive weapon. Drakes can pin these units far better than any other faction.&lt;br /&gt;
&lt;br /&gt;
Maintain your advantageous defensive terrain as much as possible, because if you don't, and you put yourself on an even playing field in that respect, you will quickly be torn apart by the Drakes superior daytime damage and HP. The daytime onslaught will be brutal, so prepare for a counter-attack and try to keep your Guardsmen up front to get best use of their Steadfast. It will be the difference between 7-4 and 6-4 daytime Burner damage and 6-4 to 5-4 daytime non-strong Clasher damage. The Guardsmen also have 8 more HP than the Thunderers. If you can level a Guardsman (with 4 kills at 70% xp, or 3 kills and 1 battle if he's Intelligent), you will have a serious roadblock to use at your disposal. Also upgraded Poachers to Trappers might be great for improved ranged, melee and HPs.&lt;br /&gt;
&lt;br /&gt;
==Knalgans vs Dunefolk==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24fighter.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24ulfserker.png B-&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24thunderer%24thunderer.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24guard.png C+&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24gryphon-rider.png&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24footpad.png E&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24poacher.png C&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24thief.png D&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24soldier%24soldier.png&amp;lt;/div&amp;gt;&lt;br /&gt;
Dunefolk is faster than your dwarves, but slower than footpads and gryphons. Dunefolk is a ranged oriented faction, so you will suffer a lot by their attack. There is only one thing you can do - kill them with melee attacks and have better economy.&lt;br /&gt;
&lt;br /&gt;
Both factions have a good unit for many situation, but only you have a unit with berserk. Knalgans are good in defense, so keep your villages from enemy fast dune riders.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Ulfserker:''' Skirmishers, Burners and Herbalists are vulnerable to blade and not the best melee fighters overall. Use Ulfs against them. However, many Dunefolk guys are lawful or liminal, so use time of the day to your advantage. Dune Soldiers are a big threat, as well as Rovers, when time is right for them.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Fighter:''' Good against pierce, blade and impact damage make them your main unit. Similar to ulfserkers, you can use their blade attack against three units vulnerable to blade.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Guardsman:''' Defending villages? Sure. And they are even good against Dune Riders. Weak in attacking.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Thunderer:''' Generally well usable unit. They can retaliate against ranged attacks, so enemy will probably attack other units. Use it to your advantage and keep them in front.&lt;br /&gt;
 &lt;br /&gt;
* '''Thief:''' Another good melee attacker against Burners and Herbalists. They are very vulnerable to ranged attack, so probably the best way to use them is when you have only 13 gold and need a unit.&lt;br /&gt;
&lt;br /&gt;
* '''Poacher:''' Ranged unit with very weak melee damage. Use them if you can find good terrain, but they are not something you really need in this match. Also use them if Dune Riders become a problem.&lt;br /&gt;
&lt;br /&gt;
* '''Footpad:''' Too weak to do a lot of damage. Enemy have skirmishers, so as a blocking unit this guys are even less important.&lt;br /&gt;
&lt;br /&gt;
* '''Gryphon Rider:''' Fast, strong and expensive. Use them on bigger maps and try to not lose them to the enemy. Gryphons are also good against Burners and Herbalists. It is possible that enemy will try to limit your movement with Dune Riders and Dune Skirmishers.&lt;br /&gt;
&lt;br /&gt;
Recruit a Gryphon, a Guardsman, a Thunderer, a Fighter, an Ulfserker, and a mix of other useful units. This game will be won through fighting from hills and mountains, getting and keeping a money advantage, leveling a unit, and waiting for your opponent to take a risk that they shouldn't. Keep them off of your mountains at any cost. If they get there you will spend precious moves, attacks, and HP trying to take them off. It's usually better to ignore enemies on mountains than to fight them.&lt;br /&gt;
&lt;br /&gt;
You do not have any magic, same as your enemy. So it can be difficult to get to the important enemy units. Frontal attack with ulfserker can kill a herbalist, but ranged attack from enemy units will be deadly and they will also get XP from your dying Ulfserker.&lt;br /&gt;
&lt;br /&gt;
== Specialists ==&lt;br /&gt;
How to play specialists: [[How to play Horseman|Horseman]] - [[How to play Mages|Mages]] - [[How to play Skirmishers|Skirmishers]]&lt;br /&gt;
&lt;br /&gt;
[[Category: How to Play]]&lt;/div&gt;</summary>
		<author><name>Spixi</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=How_to_play_Knalgans&amp;diff=68065</id>
		<title>How to play Knalgans</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=How_to_play_Knalgans&amp;diff=68065"/>
		<updated>2021-06-13T00:33:31Z</updated>

		<summary type="html">&lt;p&gt;Spixi: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Factionbox}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;tright&amp;quot; style=&amp;quot;width: 300px; height: 300px;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24portraits%24dwarves%24fighter.png&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Dwarvish units==&lt;br /&gt;
&amp;lt;b&amp;gt;Dwarvish Fighter&amp;lt;/b&amp;gt; is important unit with two melee attacks, so he can choose which one is better. Also, strong front-line unit.&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24fighter.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;maximum defense and speed in mountains (70%)&amp;lt;/b&amp;gt;&lt;br /&gt;
* neutral&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; vs mages, woses, outlaws, ulfserkers; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; vs nobody, usable in any match&lt;br /&gt;
* strong melee attack (blade and impact)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Dwarvish Ulfserker&amp;lt;/b&amp;gt; is your specialist. He will be killed easily, but he can also kill someone not good in melee fighting. &lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24ulfserker.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;average defenses everywhere&amp;lt;/b&amp;gt;, but moves fast in complicated terrain.&lt;br /&gt;
* neutral&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; vs mages, saurians, archers and enemy leaders; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; vs grunts, ghosts, drake clashers&lt;br /&gt;
* strong melee attack with '''berserk''' (blade)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Dwarvish Thunderer&amp;lt;/b&amp;gt; is a strange unit with powerful, but only one ranged attack.&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24thunderer%24thunderer.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;maximum defense and speed in mountains (70%)&amp;lt;/b&amp;gt;&lt;br /&gt;
* neutral&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; vs drakes and units on wrong terrain; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; vs skeletons&lt;br /&gt;
* average melee attack (blade), strong ranged attack (pierce)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Dwarvish Guardsman&amp;lt;/b&amp;gt; is a solid defensive unit. When you need someone to guard important hexes, he is your guy. Not very good in attacking. Make sure he can use his steadfast ability.&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24guard.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;average defenses everywhere&amp;lt;/b&amp;gt;&lt;br /&gt;
* neutral&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; vs melee attackers; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; vs ranged attackers&lt;br /&gt;
* average melee attack with steadfast (pierce), weak ranged attack (pierce)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Gryphon Rider&amp;lt;/b&amp;gt; is very fast, moving quickly in every terrain. Most expensive unit in game.&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24gryphon-rider.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;good defense in mountains, average on every other terrain, what is awesome.&amp;lt;/b&amp;gt;&lt;br /&gt;
* neutral&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; vs retreating wounded units; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; vs multiple enemies, heavy infantry and archers&lt;br /&gt;
* strong melee attack (blade)&lt;br /&gt;
&lt;br /&gt;
==Outlaw units==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Footpad&amp;lt;/b&amp;gt; is fast. That is his main strenght. Better in scouting than in fighting.&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24footpad.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;maximum defenses (70%) in many terrains&amp;lt;/b&amp;gt;, but vulnerable to pierce, blade and impact weapons&lt;br /&gt;
* chaotic&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; as a blocking and fast moving unit; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; in fighting&lt;br /&gt;
* weak melee attack (impact), average ranged attack (impact)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Poacher&amp;lt;/b&amp;gt; is a chaotic version of classic human bowman, capable to fight even in swamps. They have much more ranged hits than dwarvish thunderers.&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24poacher.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;good defenses in many terrains&amp;lt;/b&amp;gt;&lt;br /&gt;
* chaotic&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; against drakes and units with no ranged attack; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; in melee fighting&lt;br /&gt;
* weak melee attack (blade), strong ranged attack (pierce)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Thief&amp;lt;/b&amp;gt; is a very special outlaw. He (or she) can do minimal damage during the day and a lot of damage during the night, when well placed. Also thieves are very cheap.&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24thief.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;maximum defenses (70%) in many terrains&amp;lt;/b&amp;gt;, low hitpoints and vulnerable to pierce, blade and impact weapons&lt;br /&gt;
* chaotic&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; when well placed at night; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; in fighting when backstab cannot be used&lt;br /&gt;
* average melee attack with '''backstab''' (blade)&lt;br /&gt;
&lt;br /&gt;
==Starting troops - random opponent==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24gryphon-rider.png&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24fighter.png&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24fighter.png&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24thunderer%24thunderer.png&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24footpad.png&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24thief.png&lt;br /&gt;
&lt;br /&gt;
(100 gold)&lt;br /&gt;
&lt;br /&gt;
Main thing to condider is the price of Gryphons. If you need more of them, than you will have less units in total. With less or no gryphons, you can recruit more powerful dwarves. You can also switch gryphon for ulfserker and thief for a poacher. This combination cost 96 gold.&lt;br /&gt;
&lt;br /&gt;
'''Rogue''' is probably the best leader for the Knalgans. These men and women are very agile, so they can move fast and also run from danger. They can also work wonders with their backstab and skirmisher abilities.&lt;br /&gt;
&lt;br /&gt;
==General Knalgan strategies==&lt;br /&gt;
&lt;br /&gt;
The Knalgans have perhaps the greatest tactical flexibility of any faction. Because of this, there is no one way to play the Knalgans. This can be a good thing or a bad thing, depending on your personality. You can use dwarves for power and defense and outlaws for movement and low prices.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Fighter:''' It can take more hits than most units, making it a great defender. It also has two damage types, making it offensively versatile. It shares the downsides of all dwarves: slow movement (though few terrains slow it down) and low defense on non-specialized terrain.&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Dwarvish Thunderer:''' Although powerful, it can just as easily do no damage at all, making this a tricky unit to know how to use. Fortunately, it is almost as durable as the fighter.&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Dwarvish Ulfserker:''' This utility unit has value in many match-ups. It will ensure that either its opponent or it dies. Thus, it has a 100% kill chance against a non-melee unit such as the dark adept, and a very high kill chance against many non-melee-centric units, such as the Mage, Saurian Augur, Bowman, Elvish Shaman, and a wide variety of others. The problem is that your opponent can very easily kill an Ulfserker: they will lose to any dedicated melee unit unless very exceptional circumstances are in play (remember that the ulf cannot get nearly as high defensive values as the Dwarvish fighter, for example), starting hitpoints, time of day, or a combination of the above. Since it is an expensive unit, letting an elvish fighter kill your ulf out of the blue is unwise: however if he just killed a Mage and in killing the ulf the fighter is severely weakened, this is obviously a good trade for you. When using Ulfs, plan how you want them to kill and how you want them to die.&lt;br /&gt;
* '''Footpad:''' Opinions on the footpad vary widely. In this guide you will not see them recommended often, but many good players consider these a staple unit of the Knalgans. Regardless, this is not a unit you should overrecruit or your offensive power will be very low. It has excellent defense where your dwarves might be very vulnerable and you might not want to risk your more costly riders. Use it for it's great ZoC abilities even if its offense isn't high-powered.&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Poacher:''' Also a very useful unit for the Knalgans, this unit provides a reliable ranged attack to counterbalance the power of the thunderer, plus it fills many useful hexes (notably forests and swamps) well.&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Thief:''' This unit is possibly the highest damage-dealing unit in your arsenal when used correctly. A strong thief at night does 12-3 damage: the equivalent of a level 2's damage output. However, they have very few hitpoints and their low resists compound this problem. High defense and low cost offset these disadvantages. Remember to backstab with it whenever possible.&lt;br /&gt;
* '''Gryphon Rider:''' Possibly the best scout in the game in terms of combat, this is tempered by its high cost. Use it as a lookout for enemy advances and pick off weak or wounded units that are retreating behind enemy lines.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that that the dwarves should stay in mountains, hills, and other high-defense terrain and the outlaws should stay in any non-grassland terrain, if possible. Keep in mind that since your footpads and thieves have 60 defence on grassland, and your enemy will often have 40 or even 30, it can often be to your benefit if the enemy chooses to attack them on open ground.&lt;br /&gt;
&lt;br /&gt;
==Villages==&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://raw.github.com/wesnoth/wesnoth/master/data/core/images/terrain/village/human3.png&amp;lt;/div&amp;gt;&lt;br /&gt;
Outlaws have 70% defense in villages, so they will get little hits. If hitted, they can heal rapidly. Another good unit for holding villages are guardsmen, but only against melee enemies. Use your fastest unit, gryphon rider, to quickly collect villages. If you need gold, you can also recruit a footpad for this job.&lt;br /&gt;
&lt;br /&gt;
==Knalgans vs Loyalists==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24fighter.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24guard.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24poacher.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24ulfserker.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24thunderer%24thunderer.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24gryphon-rider.png C&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24footpad.png C&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24thief.png C&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-loyalists%24horseman%24horseman.png&amp;lt;/div&amp;gt;&lt;br /&gt;
Defend in day, strike at night. That's how the battle will go. Beware the Horseman and Mage and be prepared to counter these heavy daytime hitters. Again, an Ulfserker can be your best friend, especially if you can catch a Horseman at night, or a Mage/Bowman anytime.&lt;br /&gt;
&lt;br /&gt;
Recruit a Fighter, a Thunderer, a Guardsman, and a Gryphon depending on the layout of villages. Fill out your army with what you think will serve you best for that particular battle. Water battles will be nearly pointless. Cheap Mermen with higher defense will easily rout your Gryphon(s). Avoid sea battles unless you can taunt a Merman within range of a ranged unit (who can stand on decent terrain). A Gryphon's extra sight is good for spotting long range Horsemen, so it usually is worth having one around, but recruit no more than one. They don't counter any unit very cost-efficiently, so use it primarily as a scout and utility unit.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Ulfserker:''' If you get one, don't get it until turn two or later. Grabbing one in your initial recruit will only make him impotent during the first few turns of daytime. Ulfserkers are what you will use to kill Mages, grind up horse meat at night, and get rid of Bowmen - though they shouldn't be recruiting many. You shouldn't need more than 1 unless they go mad with Mages.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Fighter:''' Good to fight Spearmen, having these guys is a necessity. These are also your best unit to defend against Heavy Infantry.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Guardsman:''' Get one of these guys. These will make your front line immune to Horsemen. Also useful to counter-attack Cavalry, Mages, and Bowmen. If HI get close enough, milk XP off of them with your ranged attack. The level will come faster than you expect.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Thunderer:''' Get one or two. Good against essentially all of the Loyalist units, the pierce ranged is even better against the two mounted units.&lt;br /&gt;
 &lt;br /&gt;
* '''Thief:''' These guys can be used against most Loyalist units at night, but avoid trying to backstab Spearmen. Even at night their firststrike can get nasty on this low HP unit. I recommend the Poacher instead of this guy. They might kill mages quickly if well placed.&lt;br /&gt;
&lt;br /&gt;
* '''Poacher:''' A great unit to counterattack Loyalists and press the attack at night. His multiple strikes are of better use against the high defense Fencer, though his ranged pierce is best against the mounted units. His attack does a modest 3-4 to Heavy Infantry at night (compared to a Thunderers 11-1), and you'll want to use this unit against Spearmen outside of day as well. Although they are weak in daytime, they serve many purposes and are well worth the 14 gold.&lt;br /&gt;
&lt;br /&gt;
* '''Footpad:''' Do not recruit this unit when fighting Loyalists. This unit is very useful against heavy infrantrymen, while their low cost and speed allows them to pin enemy units down and occupy terrain. When fighting as a loyalist commander, I find them annoying. Still, the lack of offensive power is a real problem. It is possible that some fights between footpads and fencers will happen. Block during the day, attack during night.&lt;br /&gt;
&lt;br /&gt;
* '''Gryphon Rider:''' Useful as scouts mainly, you can use these to run down hurt horses, go for 1-attack-kills on Fencers (9% chance if they have no bonus hp), or again, to try to hold important grassland hexes. Beware during day though, as HI, Mages, and Horsemen can all tear Gryphons apart quickly. Recruit no more than 1.&lt;br /&gt;
&lt;br /&gt;
You'll want to press as hard as you can at night, more so than even against Drakes. The reason for this is that Loyalists have no level 1 Neutral or Chaotic units. Every unit the opposing player has will suffer a penalty at night - unless he has a Lieutenant behind his front line. Because of this possibility, don't press too close to his castle until you have gained a monetary advantage, as you will start losing units more rapidly when he comes back at you with an additional +25%. Put your Guardsman up front - this will dissuade any charge attacks. Keep a Dwarvish Fighter or Dwarvish Ulfserker nearby in case the player chooses to besiege you with Mages. Spearmen that attack a Guardsman in day will deal nearly equal damage to each other, which can add up quickly. Counter any advance with Thunderers and Poachers. Don't expose your Dwarves to poor terrain or they will die.&lt;br /&gt;
&lt;br /&gt;
You'll want to whittle away at Heavy Infantry with Poachers and Thunderers and you'll want to give the killing blow to a Fighter. Upgrading Dwarvish Fighters should be your main priority as they are your best defense and counter to the easy Spearman-wave attack. Once leveled up, the massive HP on the Steelclad will also give it the ability to withstand attacking Heavy Infantry and Mages.&lt;br /&gt;
&lt;br /&gt;
Basically, Loyalists have an incredible amount of versatility. You'll have to play smart and counterattack very well in order to win. Deal free damage when you can, and limit the number of hexes you can be attacked from - especially during day. Start commencing your attack before night actually breaks. You'll want to maximize your advantage over those 2 turns, so make sure they don't creep away before night hits. As always, stay on good terrain, and make sure Fencers can't skirmish around to kill any weak units you may be hiding.&lt;br /&gt;
&lt;br /&gt;
==Knalgans vs Rebels==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24fighter.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24ulfserker.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24thunderer%24thunderer.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24gryphon-rider.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24poacher.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24thief.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24guard.png D&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24footpad.png E&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24elves-wood%24archer.png&amp;lt;/div&amp;gt;&lt;br /&gt;
This is one of the trickiest match-ups to play. Both factions are Neutral, so neither has an advantageous time of day to attack (with their main units). To win this battle you will need smart recruits and good unit placement, as well as a little luck; the same goes for your opponent. Knalgans may have a slight advantage with the &amp;quot;one unit must die&amp;quot; Ulfserker, but Rebel defense as well as heal, slow, and magic are serious counters. Look for opportunities to grab mountains and hills, especially if they have no forest next to them. ''Forests are your biggest enemy'', so occupy them with your Outlaw counterparts or Gryphons.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Fighter:''' Again, these will be the meat of your forces. Any front without one of these will succumb to Elvish Fighters. Dwarfs beat Elves 1-on-1, but they are more expensive. They are good damage soakers and damage dealers. Stay on preferred terrain at all times.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Ulfserker:''' counters Mages, Elvish Shamans, and oftentimes Elvish Archers. Again, don't recruit too many of these, as Elvish Fighters will easily come back to finish them off, and they are 5 gold cheaper. If you get a chance to take out a Mage, do so. Not only will you gain 1 gold in attrition, but another unit will likely have to expose itself or get hurt to finish you off. Elvish Archers should be #2 on the &amp;quot;to kill&amp;quot; list, and they are sometimes worth jeopardizing your Ulfserker for if you catch one of them off of forest. Again, the reasoning is you only lose 2 gold in the trade and the opponent must waste moves and usually HP in order to finish you. Again, they may also expose themselves. You might be able to get away with ulfing Woses if it's nighttime and you're in a mountain. Make sure he isn't a Quick, Intelligent Ulf, and check the CTK as always.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Thunderer:''' Another staple. This unit is good against Rebels with luck. Stick him on a mountain and Elves will hurt themselves trying to remove you. They aren't so great for dependable offense against the high defense of the elves, but their counter-attacks are great.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Guardsman:''' Guardsmen are great for holding frontline villages and chokepoints - with backup. A lone Guardsman can hold out for a turn, if lucky 2 or 3, while on a town. He deals very little damage in return, especially against the ranged specialized Rebels. Recruit 1 if necessary, and no more than 2. They just aren't worth the lack of offensive/counter-attack units.&lt;br /&gt;
&lt;br /&gt;
* '''Thief:''' You'll want 1 or 2 of these guys depending on your play style. At night, a combo of thieves can destroy Woses, Elvish Archers, Mages, and Shaman. Keep them in the forest hexes your opponent will want, but not in daytime. They can be quickly killed by mages and sharpshooters - if you do not kill them first.&lt;br /&gt;
&lt;br /&gt;
* '''Poacher:''' Poachers are useful to fill up forest hexes and to attack Elvish Fighters. Their main usefulness is as a counter-attacking utility unit to grab forest and press at night. They are cheap, somewhat weak, but deal more dependable offensive damage than the Thunderer. 5-4 at night is equivalent to a 17 gold Elvish Archer, and you only spend 14.&lt;br /&gt;
&lt;br /&gt;
* '''Footpad:''' Don't recruit this unit when fighting Rebels. It lacks both firepower and hitpoints even while in the forests Footpads and Elves both enjoy.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Gryphon Rider:''' These monsters are incredible useful against Rebels. Their utility lies in fighting any water battles against the weak Merman Hunters, scouting, taking opportunistic attacks against poorly placed Elves, and if you find a hurt Wose, you may consider attacking one - even though Gryphons have a weakness for Impact. At night they do essentially equal damage to each other, and you may not be able to get the finishing blow with one of your slower units. Do so as a calculated risk when you only need 1 hit to kill. Otherwise it's quite a risk.&lt;br /&gt;
&lt;br /&gt;
Generally you'll want a healthy dose of Dwarvish Fighters and Thunderers, along with several gryphons for map control. An Ulfserker, perhaps a Guardsman, and some Outlaws will provide added flexibility. Whichever chaotic units (if any) you recruit, make sure to protect them at day.&lt;br /&gt;
&lt;br /&gt;
If your opponent purchases scouts, feel lucky - they are next to useless against you. Beware of ambushes, and don't scout unsure forests with your Gryphon in daytime. Take as much tactical forest as you can with the appropriate units, and make a stranglehold on mountains. Ulf when you get a good chance, and be ready to counter in day as well as pressing at night. Each battle will play out differently in this matchup according to what your opponent recruits, so see what he has early, and keep track of any Woses. Also, do not let your Ulfs be slowed or they are certainly dead.&lt;br /&gt;
&lt;br /&gt;
==Knalgans vs Northerners==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24fighter.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24ulfserker.png A-&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24poacher.png A-&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24guard.png A-&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24thunderer%24thunderer.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24gryphon-rider.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24footpad.png B-&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24thief.png D-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24orcs%24grunt.png&amp;lt;/div&amp;gt;&lt;br /&gt;
The biggest problem you will have with Northerners will be their numbers. Northies will gladly trade units with you and gain a monetary advantage. Make them depend on luck by staying on good terrain, and their high upkeep may start to become a factor. Both factions are melee-oriented, so they will not have many classic ranged units.&lt;br /&gt;
&lt;br /&gt;
Recruit a Dwarvish Fighter and a mix of other good units. Stay on villages or mountains for the first assault to minimize the effect any poison will have and reduce the chance of it hitting. Let your opponent attack you, and then counter-attack with your Poachers and Thunderers if you have them - even a Guardsman's ranged attack will add up. Send Ulfserkers against Assassins whenever you get a decent chance, as the Poison will hurt more than their melee attacks. If the northerner overrecruits assassins, you should be able to power through his ranks, so normally eliminating an assassin removes the immediate threat of poison.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Ulfserker:''' Recruit one of these guys if you're really having a problem finishing their units off, or your opponent likes to use Assassins. He's expensive, and Northerners are melee oriented, so most of their units will be able to take a majority of this unit's HP away, if not kill him outright. Assassins' Poison will quickly erode your army's HP though, so having one may prove valuable. Since Assassins cost 17 gold you'll only lose 2 in attrition, and you'll likely take lots of hp from another unit with you.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Fighter:''' Again a necessity. His damage dealt in defense is how you'll deal a majority of your damage. If possible, get a rotation of these guys in the front line. You'll deal more damage than your opponent on average, but he will come with more units - 4 Grunts cost the same as 3 DFs.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Guardsman:''' Another good guy to have one of if not more. He can survive nighttime assaults better than the fighter, and will still do respectable damage back to the enemy. Use your ranged attack on Grunts to make them turn around and heal.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Thunderer:''' Nice to have. Their combination of good resistances and ranged damage make them good counter-attackers. For cheaper ranged counter-attackers, use Poachers as they will also be used to hold forest hexes. Recruiting DTs may crowd your hill hexes, especially since that's what the Northies will be grabbing.&lt;br /&gt;
 &lt;br /&gt;
* '''Thief:''' Not a great buy against Northies. His melee-only nature along with his Chaotic alignment make him most effective in the same way Northeners are. Avoid the urge to recruit these guys. Also, no costly priority targets from your enemy make this units almost worthless.&lt;br /&gt;
&lt;br /&gt;
* '''Poacher:''' Again, these guys you'll want to recruit a few of. When the Northies come after you at night, you can make a strong counter-attack with their 5-4 ranged.&lt;br /&gt;
&lt;br /&gt;
* '''Footpad:''' This guy can be a utility unit against Northerners, but the money is better spent elsewhere. Footpads can harass Grunts and Wolfs, take forest hexes, and block Assassins from poisoning your Dwarves. Not the best buy, but you may be able to get your money's worth.&lt;br /&gt;
&lt;br /&gt;
* '''Gryphon Rider:''' Again, it's usually good to have one of these guys to scout, plug up grassland, and be a defensive damage dealer. He's also good for trapping/killing Assassins and being a target for their poison. He is very costly, compared to your outlaws and enemy grunts.&lt;br /&gt;
&lt;br /&gt;
The biggest thing you need to worry about will be poison; this cannot be overemphasized. If you get a good foothold on mountains and hills, poison will be the weapon of choice to knock you off your perch. Be ready to fill in with a replacement unit, and try to kill assassins before any other units. Melee strikes will have to get through your resistance - poison does not. You also don't deal any damage back when poison hits you. If you know you're going to be facing poison on the next turn, have a plan for how you will be rotating units to villages to detox and heal.&lt;br /&gt;
&lt;br /&gt;
Allow your opponent to attack you from forest hexes if they are next to mountains that you occupy. Your 70% defense will outdo his 50% defense, and his confidence will be higher to attack since he won't be on grass. Even if an Assassin uses that hex, if an Ulfserker is within reach, he should be able to take him out from on top the mountain.&lt;br /&gt;
&lt;br /&gt;
To kill Trolls, you will want to focus exclusively on them until they die. Thus it is best to ignore them and kill others than to only do a minimal amount of damage to Trolls each turn. Their regeneration will give them essentially limitless HP if you do this. Kill his friends and then focus on him. If there are several, take them out one at a time. Try to avoid water battles with Nagas, unless there is only one. You won't want any Gryphons you get to be pinned, especially where you cannot help them, so be cautious with water battles. &lt;br /&gt;
&lt;br /&gt;
To sum up, kill poisoners fast, get units that deal good melee damage in defense, and get good counter-attacking ranged units&lt;br /&gt;
&lt;br /&gt;
==Knalgans vs Undead==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24fighter.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24ulfserker.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24thunderer%24thunderer.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24gryphon-rider.png C&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24footpad.png C&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24thief.png C&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24poacher.png D&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24guard.png E&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24undead-skeletal%24skeleton%24skeleton.png&amp;lt;/div&amp;gt;&lt;br /&gt;
If you know you're playing against Undead, the smartest thing to do is to recruit a Dwarvish Ulfserker. He will automatically kill any Dark Adept that he attacks. He is also good for taking on Ghouls and Skeleton Archers. Beware of ghosts: at night the phantoms can kill your ulf, although at day your ulf will come out victorious. Here are the units you will want to recruit to counter Undead units:&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Ulfserker:''' counters Dark Adepts, and most other undead units in daytime. Don't recruit many unless the opponent has no Skeletons. Skeletons can kill an Ulfserker even in day. Ulfs are also expensive, so you don't want to trade them 1-for-1 with Undead units unless you get a Ghost. Be mindful of what can counterattack them on your opponent's next turn.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Fighter:''' counters Skeletons, Skeleton Archers, and is a generally high HP unit that can soak up nighttime damage for your front line. Dwarvish Fighters are probably the best all-around L1 heavy infantry in the game. If your opponent is smart, however, they will spam ghouls—and the dwarvish fighter really sucks against poison. Their lack of mobility is a major disadvantage; their armor is also ineffective against poison.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Guardsman:''' Do not recruit this unit if you are fighting Undead. His Pierce damage is less useful than even Blade against Undead. His low damage also makes him a bad unit to counter-attack with. Even for pure defense you can use better units in this match.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Thunderer:''' This is a good unit to have in your front line in mountains. His high defense and good resistances should keep him alive from nighttime Skeleton attacks, and his 18-1 ranged will make it very risky for Dark Adepts to come after you. Thunderers are also good to attack Ghosts, as 2 ranged hits will kill a Ghost - this even works at night.&lt;br /&gt;
&lt;br /&gt;
* '''Thief:''' They are only good against dark adepts. Attack adept with thief and finish him with ulfserker or gryphon. Or attack skeleton archer with thief and finish with ulfserker/gryphon/fighter again. Thieves will be much more useful on level 2 as rogues. Still, not the best unit you can have. Ghouls are a real nuisance for you—and the thieves’ high defence (= much better chance to not get poisoned) and higher mobility (= much less time to get to a village and heal) make them ideal for finishing off the toxic undead. Their combination of arcane resistances and high defence are handy against ghosts, especially at night; Like many knalgan units, the thief is situational, and works to fill a particular niche. Do not use them against skeletons, for which you are much better off with fighters.&lt;br /&gt;
&lt;br /&gt;
* '''Poacher:''' A utility unit versus Undead. It's good for finishing Ghosts and killing Walking Corpses. It can also be used to pick at Skeletons and Ghouls. Money is spent better on other units, but don't forget that he may be useful.&lt;br /&gt;
&lt;br /&gt;
* '''Footpad:''' This weak character is really only useful versus Undead as a cheap scout. His Impact damage is good against Skeletons and Skeleton Archers, and he has the added bonuses of being Chaotic (which deals more damage when Undead try to advance at night), and being hard to hit. His best feature is his ranged attack versus Skeletons at night, and that's only 6-2. Recruiting 1 on your first turn to grab villages is likely the only use you'll get from this guy, unless you need a unit to occupy forest hexes (which dwarves do very poorly at 30% defense).&lt;br /&gt;
&lt;br /&gt;
* '''Gryphon Rider:''' Probably not the best expenditure of gold versus Undead, but they do serve many purposes that can justify their cost: they give extended view of battle, allowing you to know what is coming and to counter appropriately; they are good for getting behind enemy lines to finish hurt Dark adepts; and they serve as good ZoC units for plains and forest hexes. Note that this unit is much more useful against ghouls and adepts than against skeletons — the latter’s 40% blade resistance is what really makes them ineffective. But their speed makes them very handy against the former, as they can threaten adepts, work in conjunction with thieves, and heal quickly after being poisoned by a ghoul.&lt;br /&gt;
&lt;br /&gt;
Generally you'll want a good dose of Dwarvish Fighters, a few Thunderers, a Gryphon for vision/utility, an ulf or two, and maybe a Poacher or Footpad. Dwarves are really what you want to use, for their high HP and decent resists. This helps them survive the nighttime onslaught, and their neutrality will give them good damage in defense and also the ability to press the attack in daytime. Don't be afraid to send an Ulfserker at a ghost in daytime - make sure to check the CTK, but it should be good if your Ulfserker is at high hp: bonus if you can get great terrain. Defeat for the Ghost will be nearly certain if the Ulfserker is Strong.&lt;br /&gt;
&lt;br /&gt;
Dark adepts will, as always, be the main danger to your army: they'll knock dwarves out of their mountains, footpads out of wherever, and even gryphons are in danger from them. Be especially mindful of where her dark adepts will most likely attack next turn.&lt;br /&gt;
&lt;br /&gt;
==Knalgans vs Knalgans==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24fighter.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24guard.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24gryphon-rider.png A-&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24thunderer%24thunderer.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24poacher.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24thief.png C&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24ulfserker.png C&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24footpad.png E&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24fighter.png&amp;lt;/div&amp;gt;&lt;br /&gt;
A tough battle. Dwarves have great defense, and no way to combat great defense. The high HP and the resistances will make this a game needing a lot of strikes to kill. Don't think you'll be able to rush in and win - you're going to need intelligent unit placement and again, some luck. Focus on levelling (non-Gryphon) units if possible as the added damage will be needed.&lt;br /&gt;
&lt;br /&gt;
Recruit a Gryphon, a Guardsman, a Thunderer, a Fighter, an Ulfserker, and a mix of other useful units. This game will be won through fighting from hills and mountains, getting and keeping a money advantage, leveling a unit, and waiting for your opponent to take a risk that they shouldn't. Keep them off of your mountains at any cost. If they get there you will spend precious moves, attacks, and HP trying to take them off. It's usually better to ignore enemies on mountains than to fight them.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Ulfserker:''' As always, one of these utility guys isn't a bad buy. Catch a Thunderer off his perch, or a Thief or Poacher in daytime, and that's one less unit to deal with. However, Fighters and other units can defeat Ulfserkers&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Fighter:''' These guys are a must. Use it against any unit. These guys are hard to kill.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Guardsman:''' Use these to hold villages and frustrate your opponent.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Thunderer:''' Use these to besiege enemy villages or poke at DFs or Gryphons.&lt;br /&gt;
 &lt;br /&gt;
* '''Thief:''' Not a good buy unless used to counter Thunderers and Poachers. Their blade attack does little to Dwarves unless backstabbing at night (8-3). Better to use Dwarvish Fighters for melee. No good target for thieves and only costly unit, gryphons, are too strong.&lt;br /&gt;
&lt;br /&gt;
* '''Poacher:''' An alright cheap buy for ranged forest grabbing.&lt;br /&gt;
&lt;br /&gt;
* '''Footpad:''' Don't buy this unit even if your opponent is bothering you with Gryphons. You can get 3+ Footpads for the price of 2 Gryphons, but it's not worth it. The weakness to Impact guarantees at least a 4-2 attack with these guys even in daytime, but unfortunately, unless you get bonus hp from traits, they will die in 2 hits from Gryphons, so it is still a risky buy - especially since they are useless against all other Knalgans. Just say no once again.&lt;br /&gt;
&lt;br /&gt;
* '''Gryphon Rider:''' Useful as your only scout unit. Use these to get behind enemy lines to village steal, kill the wounded, or to pin a Dwarf on bad terrain. These guys are also good forest and plains holders for crucial areas that your Dwarves will fare poorly on.&lt;br /&gt;
&lt;br /&gt;
== Knalgans vs Drakes ==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24poacher.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24thunderer%24thunderer.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24guard.png A-&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24fighter.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24ulfserker.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24gryphon-rider.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24thief.png D&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24footpad.png E&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24fighter.png&amp;lt;/div&amp;gt;&lt;br /&gt;
These guys are big and nasty. They will burn you, while saurians may try to freeze you as well. Thunderers and poachers will be your main weapon against drakes, but they will require support units as well. Dwarves are generally better against physical damage than against elemental ones.&lt;br /&gt;
&lt;br /&gt;
Recruit a Gryphon and a good mix of Dwarvish Thunderers, Dwarvish Guardsmen, a Poacher or two, and maybe a Dwarvish Fighter. Your opponent will likely get some Saurian Augurs to take away your high defense advantage, so having that Dwarvish Fighter around to take them out is usually quite helpful along with the Gryphon. Basically, recruit Pierce, Pierce, and more Pierce. &lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Ulfserker:''' Good for killing Augurs, scouts, and maybe Burners. Not really a good choice against Drakes in general (because drakes can damage it faster than it can damage them), but can serve some purposes. One ranged attack from burner may drop their health low, so they will have to heal themselves and not attack for a turn or two.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Fighter:''' A good unit to use against saurians, but generally the Fighter is not how you want to go against Drakes.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Guardsman:''' Guardsmen are worth the price against Drakes. Their Pierce goes right through Drake resistances, and a Strong one actually gets an additional point of damage. They are not that great against Clashers of course, but they can survive hits from them. A couple of these are a good buy, especially if you plop them on villages.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Thunderer:''' This should be your unit of choice versus Drakes. A Thunderer does 20-1 damage to Drakes in ranged, and Burners will do (6/5/3)-4 damage in return. Thunderers have much better defense than Burners, but do suffer from having 8 less HP. Thunderers have the benefit of costing 4 less gold. You'll want to use their &amp;quot;luck&amp;quot; attack on the easily hit Drakes as much as possible. Thunderers should be the meat of your army.&lt;br /&gt;
 &lt;br /&gt;
* '''Thief:''' Not really useful against the Drakes, they are best used to counter Saurian Augurs, which are better countered by using Dwarvish Fighters.&lt;br /&gt;
&lt;br /&gt;
* '''Poacher:''' Another great unit against Drakes. Their attack at night deals a good 5-4 against all Drakes. Having better defense on Forest and villages, 1 or 2 of these guys aren't a bad idea. Another possibility is to mass them and clear everything with exception of saurians, which can be killed with ulfserkers.&lt;br /&gt;
&lt;br /&gt;
* '''Footpad:''' Don't recruit this unit when fighting Drakes, with exception of taking villages from drakes.&lt;br /&gt;
&lt;br /&gt;
* '''Gryphon Rider:''' Useful for early village grabbing, Gryphons also can be used against the weak Saurians or Drake Burners. These fliers are probably the only way you'll hunt down retreating hurt Drakes. Don't recruit too many due to their cost and lack of a ranged defensive weapon. Drakes can pin these units far better than any other faction.&lt;br /&gt;
&lt;br /&gt;
Maintain your advantageous defensive terrain as much as possible, because if you don't, and you put yourself on an even playing field in that respect, you will quickly be torn apart by the Drakes superior daytime damage and HP. The daytime onslaught will be brutal, so prepare for a counter-attack and try to keep your Guardsmen up front to get best use of their Steadfast. It will be the difference between 7-4 and 6-4 daytime Burner damage and 6-4 to 5-4 daytime non-strong Clasher damage. The Guardsmen also have 8 more HP than the Thunderers. If you can level a Guardsman (with 4 kills at 70% xp, or 3 kills and 1 battle if he's Intelligent), you will have a serious roadblock to use at your disposal. Also upgraded Poachers to Trappers might be great for improved ranged, melee and HPs.&lt;br /&gt;
&lt;br /&gt;
==Knalgans vs Dunefolk==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24fighter.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24ulfserker.png B-&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24thunderer%24thunderer.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24guard.png C+&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24gryphon-rider.png&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24footpad.png E&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24poacher.png C&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-outlaws%24thief.png D&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24soldier%24soldier.png&amp;lt;/div&amp;gt;&lt;br /&gt;
Dunefolk is faster than your dwarves, but slower than footpads and gryphons. Dunefolk is a ranged oriented faction, so you will suffer a lot by their attack. There is only one thing you can do - kill them with melee attacks and have better economy.&lt;br /&gt;
&lt;br /&gt;
Both factions have a good unit for many situation, but only you have a unit with berserk. Knalgans are good in defense, so keep your villages from enemy fast dune riders.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Ulfserker:''' Skirmishers, Burners and Herbalists are vulnerable to blade and not the best melee fighters overall. Use Ulfs against them. However, many Dunefolk guys are lawful or liminal, so use time of the day to your advantage. Dune Soldiers are a big threat, as well as Rovers, when time is right for them.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Fighter:''' Good against pierce, blade and impact damage make them your main unit. Similar to ulfserkers, you can use their blade attack against three units vulnerable to blade.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Guardsman:''' Defending villages? Sure. And they are even good against Dune Riders. Weak in attacking.&lt;br /&gt;
&lt;br /&gt;
* '''Dwarvish Thunderer:''' Generally well usable unit. They can retaliate against ranged attacks, so enemy will probably attack other units. Use it to your advantage and keep them in front.&lt;br /&gt;
 &lt;br /&gt;
* '''Thief:''' Another good melee attacker against Burners and Herbalists. They are very vulnerable to ranged attack, so probably the best way to use them is when you have only 13 gold and need a unit.&lt;br /&gt;
&lt;br /&gt;
* '''Poacher:''' Ranged unit with very weak melee damage. Use them if you can find good terrain, but they are not something you really need in this match. Also use them if Dune Riders become a problem.&lt;br /&gt;
&lt;br /&gt;
* '''Footpad:''' Too weak to do a lot of damage. Enemy have skirmishers, so as a blocking unit this guys are even less important.&lt;br /&gt;
&lt;br /&gt;
* '''Gryphon Rider:''' Fast, strong and expensive. Use them on bigger maps and try to not lose them to the enemy. Gryphons are also good against Burners and Herbalists. It is possible that enemy will try to limit your movement with Dune Riders and Dune Skirmishers.&lt;br /&gt;
&lt;br /&gt;
Recruit a Gryphon, a Guardsman, a Thunderer, a Fighter, an Ulfserker, and a mix of other useful units. This game will be won through fighting from hills and mountains, getting and keeping a money advantage, leveling a unit, and waiting for your opponent to take a risk that they shouldn't. Keep them off of your mountains at any cost. If they get there you will spend precious moves, attacks, and HP trying to take them off. It's usually better to ignore enemies on mountains than to fight them.&lt;br /&gt;
&lt;br /&gt;
You do not have any magic, same as your enemy. So it can be difficult to get to the important enemy units. Frontal attack with ulfserker can kill a herbalist, but ranged attack from enemy units will be deadly and they will also get XP from your dying Ulfserker.&lt;br /&gt;
&lt;br /&gt;
== Specialists ==&lt;br /&gt;
How to play specialists: [[How to play Horseman|Horseman]] - [[How to play Mages|Mages]] - [[How to play Skirmishers|Skirmishers]]&lt;br /&gt;
&lt;br /&gt;
[[Category: How to Play]]&lt;/div&gt;</summary>
		<author><name>Spixi</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=How_to_play_Drakes&amp;diff=68064</id>
		<title>How to play Drakes</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=How_to_play_Drakes&amp;diff=68064"/>
		<updated>2021-06-13T00:25:09Z</updated>

		<summary type="html">&lt;p&gt;Spixi: fix copy paste error&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Factionbox}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;tright&amp;quot; style=&amp;quot;width: 300px; height: 300px;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24portraits%24drakes%24fighter.png&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Drake units==&lt;br /&gt;
&amp;lt;b&amp;gt;Drake Glider&amp;lt;/b&amp;gt; is the fastest scouting unit. Gliders are quick, can breath fire and they have better defenses in terrain than other drakes.&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24glider.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;average defences&amp;lt;/b&amp;gt;, low hitpoints, can move quickly over almost any terrain.&lt;br /&gt;
* lawful&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; vs wounded units and skeletons; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; vs archers, dark mages and saurians&lt;br /&gt;
* weak melee attack (impact), weak ranged attack (fire)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Drake Burner&amp;lt;/b&amp;gt; have great fire attack, so he can burn his enemies. Even more powerful during day.&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24burner.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;low defences&amp;lt;/b&amp;gt;, also expensive and vulnerable.&lt;br /&gt;
* lawful, can be upgraded into 2 useful units (leader or stronger drake)&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; against anyone with no ranged attack; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; vs archers, dark mages and saurians&lt;br /&gt;
* weak melee attack (blade), strong ranged attack (fire)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Drake Clasher&amp;lt;/b&amp;gt; is armored, without inner breath or ability to fly. They are good in hand-to-hand combat.&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24clasher.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;low defenses&amp;lt;/b&amp;gt;, but slowed only by forests&lt;br /&gt;
* lawful, can be upgraded into 2 useful units (Thrasher or Arbiter)&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; in 1v1 battles; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; vs archers, dark mages and saurians&lt;br /&gt;
* strong melee attack (blade AND pierce)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Drake Fighter&amp;lt;/b&amp;gt; is a mixture of Crasher and Burner. Fast attacker with powerful swords, that can fly and use fire.&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24fighter.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;low defenses&amp;lt;/b&amp;gt;, all around useful unit&lt;br /&gt;
* lawful, can be upgraded into a useful unit (Warrior)&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; against outlaws, assassins and mages; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; vs archers, dark mages and saurians&lt;br /&gt;
* strong melee attack (blade), weak ranged attack (fire)&lt;br /&gt;
&lt;br /&gt;
==Saurian units==&lt;br /&gt;
&amp;lt;b&amp;gt;Saurian Skirmisher&amp;lt;/b&amp;gt; is fast and very agile. Can ignore ZOC (Zone of Control) and attack even units protected by another units.&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24saurians%24skirmisher%24skirmisher.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;good defenses&amp;lt;/b&amp;gt;, but low hitpoints&lt;br /&gt;
* chaotic&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; against drakes, cavalry and mages; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; against almost everyone and vulnerable to blade attack&lt;br /&gt;
* strong melee attack (pierce), weak ranged attack (pierce)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Saurian Augur&amp;lt;/b&amp;gt; is a fragile, yet very useful unit. Augurs can heal other units and use rare cold damage.&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24saurians%24augur%24augur.png&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;good defenses&amp;lt;/b&amp;gt;, but low hitpoints&lt;br /&gt;
* chaotic, can be upgraded into 2 2 useful units (stronger Oracle or a better healer)&lt;br /&gt;
* &amp;lt;b&amp;gt;strong&amp;lt;/b&amp;gt; against against anyone with no ranged attack; &amp;lt;b&amp;gt;weak&amp;lt;/b&amp;gt; in 1vs1 fights&lt;br /&gt;
* weak melee attack (impact), medium magical ranged attack (cold)&lt;br /&gt;
&lt;br /&gt;
==Starting troops - random opponent==&lt;br /&gt;
&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24glider.png&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24clasher.png&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24fighter.png&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24fighter.png&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24saurians%24skirmisher%24skirmisher.png&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24saurians%24augur%24augur.png&lt;br /&gt;
&amp;lt;br&amp;gt;(100 gold)&lt;br /&gt;
&lt;br /&gt;
Two fighters have both advantages and disadvantages, yet this is the best setup you can have for 100 gold. Units like Drake Burners are good against random opponent, but they are very expensive (and you will have only 5 units). On big maps, you can also change one Fighter for another Glider.&lt;br /&gt;
&lt;br /&gt;
Drakes have three rational choices about leaders. Warriors, like '''Fire Drake''' or '''Drake Crasher''', are useful, if you really plan to attack with them. If not, '''Drake Flare''' is a good choice with his leadership. If villages are sparse or you have to defend early on, '''Saurian Soothsayer''' is good for you. He must be protected, because he is both a good healer and a terrible fragile unit.&lt;br /&gt;
&lt;br /&gt;
== General Drake Strategies ==&lt;br /&gt;
Drakes generally win by dealing the most damage. Your units are big and deadly, but they're also more expensive than most; also, they're relatively fragile for their cost and many have a specific vulnerability to piercing weapons. Take advantage of having the best mobility in the game by placing your units in hard-to-access places such as behind mountains or across water from your opponent. You'll then have the advantage by being able to decide when and where battles will happen. Your major disadvantage is how easily your units will take damage. Because of this you'll usually want to be the aggressor in battle to kill a unit or two, get damaged, and then flee to heal. Having a mobile healer helps with this if villages are sparse.&lt;br /&gt;
&lt;br /&gt;
Since you trade your defense for other abilities, fighting battles where your opponent has low defense will give you a greater advantage than it will for any other faction. If your opponent refuses to leave 70% defensive terrain, go heavy on the saurians rather than the drakes and attack at night.&lt;br /&gt;
&lt;br /&gt;
It's good to note that the drake faction has exceptional potential for leader-kill situations. This is due to their high damage and mobility, combined with low defense, and also the availability of skirmisher units.&lt;br /&gt;
&lt;br /&gt;
Drakes have access to blade, pierce and impact attacks, same as any other faction. However, their saurian augurs can use '''cold''' attack. Multiple drakes can use '''fire''' attack.&lt;br /&gt;
&lt;br /&gt;
==Villages==&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://raw.github.com/wesnoth/wesnoth/master/data/core/images/terrain/village/human3.png&amp;lt;/div&amp;gt;&lt;br /&gt;
Take villages with your flying drakes or agile saurians, but you should know, that sometimes you cannot hold them. Use your mobility. Take another village. And another. In battle, your drakes will get hits very often, so make sure some villages are close to the battleline. Also, you can get your saurian leaders to the villages, where they have 50% defense (more than drakes).&lt;br /&gt;
&lt;br /&gt;
==Drakes vs Loyalists==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24saurians%24skirmisher%24skirmisher.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24clasher.png A-&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24saurians%24augur%24augur.png A-&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24fighter.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24glider.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24burner.png D&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24human-loyalists%24horseman%24horseman.png&amp;lt;/div&amp;gt;&lt;br /&gt;
Drakes' weaknesses are so obvious that it seems the enemy barely has to think to come up with an effective strategy. So things like massing armies of only spearmen or dark adepts have some chance of succeeding.&lt;br /&gt;
&lt;br /&gt;
But, that doesn't necessarily mean the drakes are weaker - they are just harder to play correctly. The key to playing drakes vs loyalist is carefully managing the HP of your units. Get a lot of use out of them before retreating/rotating. This means you will need to carefully plan the formation of your offensive wedges, for example, considering the optimal location for '''Saurian Augurs'''.&lt;br /&gt;
&lt;br /&gt;
'''Tactics'''&lt;br /&gt;
&lt;br /&gt;
Fighting a '''spearmen''' rush with drakes is one of the big problems for a drake player - massing '''spearmen''' gives them at least 10% more strenght per gold than anything you can muster (the spearmen are cheap and they have pierce weapons), and the loyalist player can win the game by playing pretty straighforwardly - while the drakes can still win - but only if they play it smart, because the spearmen also have their drawbacks. &lt;br /&gt;
The biggest weakness of the loyalists (and in the same time the biggest advantage of the drakes) is their mobility. Of course, '''horsemen''' are fast too, but you have pretty good counters for the horsemen - clashers and skirmishers (the later only when they are on good terain). Sure, horsemen deal 18-2 base charge on dusk/dawn but your cheaper '''clashers''' and '''skirmishers''' will strike 14-4 and 10-4 back respectfuly when charged, so your oponnent will take a big, unacceptable risk charging them unless he has spearmen or other units to soften them first. So the real problem are the spearmen, not the horsemen.&lt;br /&gt;
 &lt;br /&gt;
Note that the because of this mobility issue the outcome of the drakes vs loyalists duel is somewhat dependant on the size of the map - 2 loyalists v 2 drakes on Isar's Cross gives a significant advantage for the Loyalists, while on big maps like Cynsaun Battlefield the drakes are the ones having an advantage. &lt;br /&gt;
&lt;br /&gt;
The second thing that the drakes have over the loyalists is ther dual alighnment, while the loyals are all lawful. You can use that to your advantage as well. &lt;br /&gt;
&lt;br /&gt;
To fight a bunch of '''spearman''', you have to (and if you play it right, you should always be capable to do so) attack first, under favourable condtions. You can play without buying too many '''burners''', only a few to initiate the attack without taking much retaliation and then you have a good chance to cover them with other units, because if a burner can be attacked from 3 or even 2 sides by spearmen it will likely die in a single turn. '''Burners''' are too expensive to throw away that way. You can either buy mostly '''Saurians''', in which case you can skip the burners all together and buy '''augurs''' for range which is magical. In that case you should attack at night and pull back at day, preferably out of reach of the spearmen. You should be very careful about the terrain you put your saurians on - both '''augurs''' and '''skirmishers''' - and also about the placement of the units, namely the augurs attack from the middle so that they can be attacked from as few sides as possible and that they are able to heal both each other and the other units around them. '''Drake clashers''' and '''fighters''' are also necessary as meatshields although you should think carefully before attacking the spearmen with them, even as finishers - remember the firststrike. The choice between clashers and fighters is yours. Remember that the '''fighters''' are generally better on larger maps and maps that have water on them, cause they can fly quickly from one side to another with their 6 movement, but they have a pierce vulnerabilty and less HP; while '''clashers''' are both more durable and also more expensive and slower - but although they have only 5 movement, same as the '''spearmen''', '''clashers''' have a better movetype than the spearmen or other loyalists - '''spearmen''' get slowed down in forest, hills, mountains and sand, while clashers get slowed only when moving through the forest. That means that in most cases - but not always - the clasher can safely escape from the battle if the oponnent doesn't have any fast units. &lt;br /&gt;
&lt;br /&gt;
The other way is to recuit mostly drakes and but a few saurians. In this case, some '''burners''' are necessary. Then the plan again is to strike first and to strike when the oportunity arises. Ignore the time of day. Dont get involved in a protracted everyone vs. everyone battles - thats what the spearmen want - that way they can easily use their advantages - good HP, good attack and cheapness in their favour and your more expensive (and fewer) drakes have a good chance of being overrun in several turns. Try to attack their weak spots - places where a unit is on bad tearain or, even better, far from the others - but as always think ahead of the possible enemy retaliation - attack only when the possible gain is bigger that the possible loss, and run when needed. If there aren't any weak spots, be creative and try to make some depending upon the current situation - put your '''drake fighters''' in positions that threatens the unguarded enemy villages to strech their line thin so that you can attack and run before helps arrives or if you think its worth it, sneak a '''skirmisher''' in the enemy rear on a suicide mision to steal villages.&lt;br /&gt;
&lt;br /&gt;
* '''Drake Burner''': If opponent has horsemen around, then burners will be like big red target signs; but still, you probably need one of them, so keep it behind the main army until it can be used safely. Good unit against Heavy Infandryman, but expensive.&lt;br /&gt;
&lt;br /&gt;
* '''Drake Glider''': Steal villages. Finish of fencers with precise attack, if loyalists recruits some. Do not fight for villages, fly to others. Loyalists does not have any cheap units to send after you.&lt;br /&gt;
&lt;br /&gt;
* '''Drake Clasher''': They kill infandry and protect weaker units. Use their ZOC to cover for your more offensive (and also fragile) units.&lt;br /&gt;
&lt;br /&gt;
* '''Drake Fighter''': Strong unit, but can be easily killed by horsemen and mass of spearman. Do not recruit a lot of them, unless enemy does not have any good counter.&lt;br /&gt;
&lt;br /&gt;
* '''Saurian Skirmisher''': Very agile, your main unit to fight during the night. Make sure they will not fight Heavy Infandryman. They are also your best unit to defend villages.&lt;br /&gt;
&lt;br /&gt;
* '''Saurian Augur''': Weak, but not as weak against spearman, your main enemy. You can use his attack to harm or even kill fencers or other units with good defences.&lt;br /&gt;
&lt;br /&gt;
'''Team game'''&lt;br /&gt;
&lt;br /&gt;
If you happen to be playing a team game and face a '''spearmen''' rush with drakes a good thing is to ask your ally to send you a couple units which have good pierce ressistance like '''HI/Wose/Skeletons'''.&lt;br /&gt;
He/she wont mind, especially if you send a few good drakes in return. Then your oponnent will be sorry of recruiting in such a one-minded way. Sure he can get counters to those units as well but those are mostly units with fire which are on the other side weak against the drakes. So the threats of some of his '''spearmen''' being pwned by the '''wose''' or the '''mage''' being torn apart by your '''clasher''' would be stronger than the possibility of your drakes being overrun by his spearmen on the long run.&lt;br /&gt;
&lt;br /&gt;
==Drakes vs Rebels==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24clasher.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24saurians%24augur%24augur.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24glider.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24burner.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24fighter.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24saurians%24skirmisher%24skirmisher.png B&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24elves-wood%24archer.png&amp;lt;/div&amp;gt;&lt;br /&gt;
Playing Drakes in this matchup can be difficult. Your units have low defense and are weak to Pierce where the Rebels have high defense and use Pierce. You'll want to recruit a mix of drakes and saurians so that their neutrality doesn't become an advantage at any time of day. Take cheap shots when you can, because they will always be taking cheap shots at you. Rebels are neutral, what is good for you. Your drakes will get the same damage, so it is easier to calculate. During day, it is your time and if you do not do a lot of damage, they will hard press you during the night.&lt;br /&gt;
&lt;br /&gt;
* '''Drake Burner''': This unit is a great weapon to take out Elvish Fighters and they absolutely massacre Woses. Effective in both melee and ranged combat, this unit is always useful against Rebels on attack or defense. He costs 21g though, and there are other units you will need to recruit to be successful. Rebels will surely recruit a lot of archers, if they see that you have a lot of burners.&lt;br /&gt;
&lt;br /&gt;
* '''Drake Clasher''': The only drake without a weakness to Pierce, this unit is great against Rebels. He will tear through Archers and he will beat EFs in a fight. He will overpower any Rebel and it's essential to have these guys in your force.&lt;br /&gt;
&lt;br /&gt;
* '''Drake Glider''': Good for their movement, and can be useful to get to those hard to reach hexes to get extra shots at Archers or Shamans. Recruit according to map need for scouts.&lt;br /&gt;
&lt;br /&gt;
* '''Drake Fighter''': Useful as a mobile fighter, the Fighter is what you'll want if there are 2 separate battlefields within close flying range of each other. The ability to leave one battle to help the other is quite useful, which is true of Burners as well, though they move slower. For pure fighting power the Clasher is better, and he is hardier. If mobility is necessary on the map though, get 1 or 2 of these guys. They can be easily slowed and killed with arrows. They are good against woses and mages, but generally taking woses against drakes is not a good idea.&lt;br /&gt;
&lt;br /&gt;
* '''Saurian Augur''': These guys are essential to fighting Rebels. They are the only easy way you'll have of taking elves out in forest terrain. Augurs have distressingly low HP, so keep them behind the line to heal your power units, or fort him up in forest hexes your opponent will want. Using these guys as your first attackers at night will allow you to get their damage in and then move other units in front of them and consequently heal.&lt;br /&gt;
&lt;br /&gt;
* '''Saurian Skirmisher''': Useful mainly against Scouts, Archers, and Mages at night, don't recruit too many of this unit even if you're tempted. They're fragile units. Elvish fighters kills saurians easily, but if opponent use much more archers than fighters, this unit can be good.&lt;br /&gt;
&lt;br /&gt;
'''Tactics'''&lt;br /&gt;
&lt;br /&gt;
On the first turn you'll want to recruit a Clasher, a Burner, an Augur, and a mix of other units like another Clasher, or a Skirmisher. During daytime you'll want to deal as much damage as possible, as that's when you'll have the advantage. Elves fighting you will suffer massive return damage during the day. Keep your units away from places where the Rebels can use forest to attack you from, and remember to have your Augur(s) heal.&lt;br /&gt;
&lt;br /&gt;
At night you can still be aggressive with Augurs. You'll probably want to retreat your drakes slightly and put any Skirmishers (or even Clashers) you have up front on good terrain. Don't be afraid to keep a mobile unit up front either if it can survive 1 round of attacks; if it can do this and survive it will slow the progress of your enemy and you can easily fly the unit back behind your line to heal. Always make sure that the front line cannot be attacked from forest hexes if possible, though this won't be as big a deal if you have several Augurs to cut through their defense. Don't be afraid to trade a Skirmisher for an Archer if you get a chance to kill one on poor terrain: you'll get a gold advantage as well as taking out the most dangerous unit the Rebels have against you.&lt;br /&gt;
&lt;br /&gt;
Another strategy is to strike hard at day and then completely retreat at night. Keep your units just out of reach of your opponent and allow them to come closer to your recruits to make your counter-attack swifter and more deadly. This strategy is often quite effective as it prevents your drakes from fighting at unfavorable TOD and it allows you to decide how the first battle takes place.&lt;br /&gt;
&lt;br /&gt;
Generally your targets to kill will start with Archers, as they are the most deadly unit to your forces (especially to Clashers). Next you'll want to get rid of any low-HP units your opponent has and any units on poor terrain making themselves targets. Try to keep your Clashers away from Shamans if possible (Slow seriously messes them up), and ignore Fighters if another unit presents itself as an equally appealing target. Elvish Fighters (or even Elish Heroes) can't deal significant damage to your drakes without taking a good amount of return damage, so let them hurt themselves on you while you take out units that you won't receive much return damage from (Burners on Fighters at day though can be quite devastating).&lt;br /&gt;
&lt;br /&gt;
Generally, pick your spots where the advantage presents itself that you can deal the most damage with little return damage if possible. Keep Elves from Forest hexes if possible, and use your advantageous mobility. And, what is important, do not let Shaman to advance, because your enemy will get a good healing or a very powerful unit with arcane attack against you.&lt;br /&gt;
&lt;br /&gt;
==Drakes vs Northerners==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24clasher.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24saurians%24augur%24augur.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24fighter.png A-&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24burner.png B+&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24glider.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24saurians%24skirmisher%24skirmisher.png C&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24orcs%24grunt.png&amp;lt;/div&amp;gt;&lt;br /&gt;
This matchup can be rather interesting. The main thing you generally worry about is the cheap northerner units and the expensive drake units. Drakes have much better units but unfortunately they are expensive. Often when you lose vs. Northerners it is because of the sheer number of units they are capable of sending. Grunts, Whelps, Goblin Spearmen and Orcish Archers are cheaper than any unit of your own.&lt;br /&gt;
&lt;br /&gt;
* '''Drake Burner''': A very useful unit during the day and even effective at night vs Grunts and Troll Whelps and Wolf Riders due to their lack of ranged defense. And with at least 7-2 melee, they have the ability to defend their melee attacks. Be very careful with the number of burners you recruit though, because they are rather expensive and you need to be able to defend against the sheer number of units Northerners are able to send.&lt;br /&gt;
&lt;br /&gt;
* '''Drake Clasher''': The Drake Clasher is preferable over the Drake Fighter in most cases, and especially when playing against Northerners. The Clasher is best to defeat those pesky and annoying assassins. Even though they cannot defend against ranged attacks, their 6-4 pierce attack will definitely hurt an assassin as the assassin has -20% to pierce. Clashers have high amounts of HP and can be very effective in fighting northerners, even though it will normally be melee against melee much of the time. Clashers can be cured from poison with help from Saurian healers.&lt;br /&gt;
&lt;br /&gt;
* '''Drake Glider''': You can often use maybe one or two gliders in the original recruiting to get to villages quickly. They can also be useful as a very mobile though small increment of damage that can aid in damage in setting up kills to level other units. I'll also use them for gaining info on recruits. &lt;br /&gt;
&lt;br /&gt;
* '''Drake Fighter''': If you need a unit and can't wait for an extra turn, Drake Fighters are good to recruit because they are quicker then Clashers and have at least minor defense with their ranged attack, and occasionally offense when you just need to deal that little bit of extra damage to make the kill and can't afford to risk a melee attack. They can be easily poisoned, but can also move quickly to near villages.&lt;br /&gt;
&lt;br /&gt;
* '''Saurian Augur''': These units are pretty effective and very useful, but do not keep them in the front of the battle. Use them behind other units to heal and to finish off with magical attacks. These units are easy to level and very effective with 8-3 magical and heal. Be careful in general with saurians because they do not have large amounts of HP. Grunts and Wolf Riders are a primary threat.&lt;br /&gt;
&lt;br /&gt;
* '''Saurian Skirmisher''': Because of their small amount of HP you should try to refrain from using Skirmishers; however they can be helpful at times. They are pretty effective level 2 units. Saurians are cheap, but Grunts are even cheaper and have more HP. Skirmishers are vulnerable to both blade and to impact of the Trolls.&lt;br /&gt;
&lt;br /&gt;
'''Tactics'''&lt;br /&gt;
&lt;br /&gt;
Your first turn depends highly on the map, experience percentage, and gold per village. Try to get all villages on the 3rd turn and then recruit depending on the units you see from your opponent.&lt;br /&gt;
&lt;br /&gt;
==Drakes vs Undead==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24saurians%24skirmisher%24skirmisher.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24burner.png A-&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24clasher.png A-&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24fighter.png A-&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24glider.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24saurians%24augur%24augur.png E or B+ (based on variant)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24undead-skeletal%24skeleton%24skeleton.png&amp;lt;/div&amp;gt;&lt;br /&gt;
Playing as Drakes in this matchup is dramatic, bloody fun. The deadliest matchup in Wesnoth, this game will quickly result in lots of casualties. Both factions are incredibly offensive and of opposite alignment. Skeletons are vulnerable to fire, Dark Adepts have no melee attack, and Drakes are vulnerable to pierce and cold. Whoever is left standing wins. You have to know what exactly is going your way.&lt;br /&gt;
&lt;br /&gt;
* '''Drake Burner''': You'll want a couple of these to burn Skeletons, Ghosts and Ghouls mainly -- but don't pit them against Adepts. Even burning Skeleton Archers at daytime isn't a bad idea as it's the most effective way to kill them. The most expensive unit you can recruit, you'll want to recruit them sparingly and be careful to keep them alive. It is important to get a '''Drake Flare''', because your units under leadership are GREAT against low health Dark Adepts.&lt;br /&gt;
&lt;br /&gt;
* '''Drake Clasher''': With strong Clashers dealing an awesome 9-4 Pierce damage during the day, these are great at butchering Adepts, as well as being damage soakers. Due to their price, you'll need to avoid recruiting too many. Level one of these into a Thrasher and Skeletons won't pose a major threat any more, even at night. Clashers are the slowest of the Drakes, though, and may have trouble catching quick Adepts at daytime or escaping them at night.&lt;br /&gt;
&lt;br /&gt;
* '''Drake Glider''': Dealing Impact melee and Fire ranged damage, these guys won't be worthless at any point, but their damage is still very weak compared to what the rest of your army can do. Recruiting too many of them isn't smart. As in any other match-up, their main role is scouting. Their defense on terrain is better than for other drakes, but magical attacks from adepts is an exception.&lt;br /&gt;
&lt;br /&gt;
* '''Drake Fighter''': Cheaper and faster than the Clasher, the Fighter is a good Adept-killer, with good melee damage in the form of 9-3 or 10-3 war blades at daytime. Their speed and ability to fly make them better at catching the retreating Undead at day, and escaping from them at night. The Fire ranged attack also gives them a bit of flexibility in their usage. They die quickly to concentrated attack from multiple dark adepts, so kill them before they kill you. Also their weak ranged attack can help other units, like saurians, to defeat the adepts. Do not attack skeletons and ghouls in melee combat.&lt;br /&gt;
&lt;br /&gt;
* '''Saurian Augur''':&lt;br /&gt;
&lt;br /&gt;
''VARIANT A'': Don't recruit this unit when fighting Undead. It's too fragile against melee.&lt;br /&gt;
&lt;br /&gt;
''VARIANT B'': Buy at least 2 of them, so they can heal/cure each other and also help all your drakes to fight longer. Undead have access to poison and they can steal your villages with bats, so a mobile healer is a must, if you can protect them from multiple sides. Very effective on semi closed maps, less effective on open maps with lots of flat lands.&lt;br /&gt;
&lt;br /&gt;
* '''Saurian Skirmisher''': This little guy actually plays a very crucial role in your army against Undead. If the Undead didn't have Adepts you'd simply roll right over them. But since Adepts are such a necessary unit in their attack against you you'll need to take them out, and you'll need to be able to do that under any circumstances. The Skirmisher gives you a weapon that not only can hustle around enemy units to strike protected Adepts, but he also gets better at night - the time when you'll want them to be dead the fastest. Having a couple of these guys around can really save your butt.&lt;br /&gt;
&lt;br /&gt;
'''Tactics'''&lt;br /&gt;
&lt;br /&gt;
On the first turn you'll want a couple Burners, a Fighter or Clasher, a Skirmisher, and another useful unit. If your opponent gets mass Skeleton Archers, get Clashers and Burners. If he gets lots of Adepts get Skirmishers and Fighters. If he likes Ghouls &amp;amp; Ghosts, you'll want Burners.&lt;br /&gt;
&lt;br /&gt;
Deal as much damage as you can at day, because you won't be dealing much at night. Keep Burners in front as they'll do great return damage to any Adepts that try to counter-attack you during your daytime assault: they'll do 12-2 while you do 7-4. Adepts have 28 base hp.&lt;br /&gt;
&lt;br /&gt;
At night simply retreat out of Adept range and have Skirmishers ready to take out any that get too close. Even if you have to retreat from a village to avoid Adepts it's worth it. You may lose a few gold, but it shouldn't add up to the 16+ you'd lose for a lost Drake. If your opponent takes the village and moves closer he'll also be closer to your new recruits to counter-attack. As day turns chase them away and you should net some gold for the units your opponent will have to replace.&lt;br /&gt;
&lt;br /&gt;
Also, use Gliders to get villages. Enemy bats does not have ZOC, so you can easily get more and more villages. Remember, that your units are very expensive and you need more villages than your enemy.&lt;br /&gt;
==Drakes vs Knalgans==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24clasher.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24saurians%24augur%24augur.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24burner.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24fighter.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24saurians%24skirmisher%24skirmisher.png C&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24glider.png D&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dwarves%24fighter.png&amp;lt;/div&amp;gt;&lt;br /&gt;
Knalgans have some unpleasant surprises for you. Thunderers are dangerous, because drakes does not have good deffense in any terrain. But they are not the only problem. Poachers are very fast, very cheap and very good when attacking drakes. You should try to outmanuver your opponent, what is sometimes easier said than done.&lt;br /&gt;
&lt;br /&gt;
To destroy drakes, Knalgans need only few units. So the biggest threats are '''thunderers''' (against drakes), '''poachers''' (same) and '''ulfserkers''' (against saurians and almost dead drakes). They will probably do not mass guardsman (because you have a lot of ranged units), thieves (because they are better against saurians, but other units are deployed with same thing in mind) or gryphon riders (because of the price). Footpads are useless against drakes.&lt;br /&gt;
&lt;br /&gt;
* '''Drake Burner''': Burners are useful, because most dwarves only have 10% resistance to fire, and against fighters and 2/3rds of the outlaws you will not take retaliation damage. They are also fast. Just be careful not to lose them, as they are 21 gold and the knalgan player will happily trade an ulfserker or fighter for him.&lt;br /&gt;
&lt;br /&gt;
* '''Drake Clasher''': Clashers uses are twofold. Firstly, use them to defend your villages from fast moving footpads and poachers. Secondly, add them to your attacking force with Drake Fighters to deal a good amount of damage. Clashers are okay as long as you don't get them in Thunderer range, which is hard considering their slow speed.&lt;br /&gt;
&lt;br /&gt;
* '''Drake Glider''': Use for village grabbing. They can also take down weakened ulfserkers and then flight to village.&lt;br /&gt;
&lt;br /&gt;
* '''Drake Fighter''': Cheaper and faster than the Clasher, the Fighter has a decent ranged attack. Though they are created as a melee based unit, use both, as the Knalgans are primarily melee.&lt;br /&gt;
&lt;br /&gt;
* '''Saurian Augur''': This unit should be used for healing. If you get the chance, use one of them to land the killing blow on another unit. Don't leave them out on Flat, though.&lt;br /&gt;
&lt;br /&gt;
* '''Saurian Skirmisher''': Good for killing injured units and for its +30% pierce resistance, but isn't that durable. Do not get them close to ulfserkers and dwarvish fighters.&lt;br /&gt;
&lt;br /&gt;
'''Tactics''': If your opponent spams Thunderers, you can usually outmaneuver him with your drakes, or if he sends them out, you can kill them easily. Thunderers are also surprisingly good in melee fight against saurians. Try to kill them with multiple clashers.&lt;br /&gt;
&lt;br /&gt;
'''Team play''': Ally with slow (like elvish shamans) or poison (like orcish assassins) are very useful against the knalgans.&lt;br /&gt;
&lt;br /&gt;
== Drakes vs Drakes ==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24clasher.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24saurians%24augur%24augur.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24saurians%24skirmisher%24skirmisher.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24fighter.png B-&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24glider.png D&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24burner.png E&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24fighter.png&amp;lt;/div&amp;gt;&lt;br /&gt;
This is possibly the deadliest mirror match in the game.&lt;br /&gt;
&lt;br /&gt;
Saurians have low HP, but deal good damage to their Drake counterparts. You'll want a balanced mix of both races as you'll likely be fighting at all times of the day and night. In this match, you need pierce (and blade against saurians) damage more than fire.&lt;br /&gt;
&lt;br /&gt;
* '''Drake Burner''': Generally a bad recruit in this matchup. Burners cannot do significant damage to other Drakes, though they do get free shots on Clashers. They can also torch any Saurians found on bad terrain, which is unlikely, though this is probably their greatest use. Burners cost a lot.&lt;br /&gt;
&lt;br /&gt;
* '''Drake Clasher''': This unit should make up the bulk of your forces. Dealing heavy Pierce damage and having the most hp out of any recruit (as well as not having a negative Pierce resistance), makes him the beast of burden in this matchup. Hope that yours get the Strong and Resilient traits and his get the Quick and Intelligent traits. The Clasher will beat Fighters and Burners 1v1, and the only units he needs to fear are Augurs and other Clashers, and Skirmishers at night.&lt;br /&gt;
&lt;br /&gt;
* '''Drake Glider''': As with the Burner, this unit is a poor recruit. It has no upside other than the inconsequential Marksman on his breath attack. Do not recruit them unless the map is huge and mobility becomes critically important.&lt;br /&gt;
&lt;br /&gt;
* '''Drake Fighter''': Not the best recruit, but he can be handy if the map makes Clashers slow. They can also tear Augurs to pieces, so if Augurs become a problem a few of these are an alright recruit. Also good as a replacement for the Glider for village grabbing, especially if Quick. Fight between Fighters and Skirmishers is usually very quick, so if you decide to go for it, make sure you attack first.&lt;br /&gt;
&lt;br /&gt;
* '''Saurian Augur''': An essential unit. Their Cold magic deals 9-3 damage to Drakes at night, ripping them to pieces. Their healing will also be essential if used properly, as this is a bloody fight. Be careful not to over-recruit these guys, as they are quite weak in defense against any unit. Two Augurs can heal one another.&lt;br /&gt;
&lt;br /&gt;
* '''Saurian Skirmisher''': These guys are also a good troop type to have, but again, don't recruit too many. Your Pierce damage should mainly come from your Clashers, but a couple of Skirmishers to attack opposing Augurs as well as Drakes at night can prove very valuable, especially with their high defense. Their ability to get behind the enemy lines gives you more hexes to attack the enemy from. They can kill retreating costly drakes and upgraded version can work as a shield for your expensive drakes, when placed on good terrain.&lt;br /&gt;
&lt;br /&gt;
'''Tactics'''&lt;br /&gt;
&lt;br /&gt;
On the first turn you'll want several Clashers, a couple Saurians, and possibly a Fighter or Glider to grab villages. Village distribution will determine if you need a Glider or not, as well as map size.&lt;br /&gt;
&lt;br /&gt;
At night, use your Augurs on the opposing Clashers first, using your Clashers and Skirmishers to finish up. Make sure to protect your Augurs though, as they die easily, even at night. Killing a Clasher will remove a major threat come daytime, as well as net you 19 gold. If you must trade a Skirmisher to kill a Clasher at night, it can often be worth it.&lt;br /&gt;
&lt;br /&gt;
At day you'll want to attack first with your Augurs again. Their Cold magic will do 6-3 in daytime to Drakes, which is still quite powerful. Follow up with your now incredibly deadly Clashers: Strong Clashers in day will deal 10-4 to any non-Clasher Drake.&lt;br /&gt;
&lt;br /&gt;
Generally, this is the danger level of your enemy units: Clasher, Augur, Skirmisher, Fighter, Burner, Glider. You may choose to either target the deadliest units first (Clashers being easy targets for Augurs), or go for the weaker units first to give yourself a monetary advantage quickly, while receiving little retaliation damage. Either strategy can work, and levelling an Augur can prove exceptionally deadly to your opponent. Intelligent Augurs level within 2 kills. Whichever strategy you use, be sure to kill, and not just hurt your opponent, because your opponent will flee and have the unit return to fight again.&lt;br /&gt;
&lt;br /&gt;
==Drakes vs Dunefolk==&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24clasher.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24saurians%24augur%24augur.png A&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24glider.png B&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24fighter.png C+&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24saurians%24skirmisher%24skirmisher.png C+&lt;br /&gt;
https://units.wesnoth.org/1.15/pics/core%24images%24units%24drakes%24burner.png D&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tleft&amp;quot;&amp;gt;https://units.wesnoth.org/1.15/pics/core%24images%24units%24dunefolk%24soldier%24soldier.png&amp;lt;/div&amp;gt;&lt;br /&gt;
Dunefolk is similar to loyalists or rebels. They have enough pierce to kill your drakes and enough blade, impact and fire to kill your saurians. They have fast and dangerous cavalry. But they do not have what you have - wings. Be careful, dunefolk units are fast in desert hexes.&lt;br /&gt;
&lt;br /&gt;
* '''Drake Burner''': Good, but not great. Dune riders are faster, cheaper and have pierce. Skirmishers and rowers are also good against this strong, but vulnerable and expensive drake.&lt;br /&gt;
&lt;br /&gt;
* '''Drake Clasher''': Clashers are great. Dunefolk have some strange vulnerabilities, so strong unit with multiple types of attack is exactly what you want. Take them to the battlefield!&lt;br /&gt;
&lt;br /&gt;
* '''Drake Glider''': Fast, good for village grabbing, but not resilient enough. Many dunefolk units are effective against them.&lt;br /&gt;
&lt;br /&gt;
* '''Drake Fighter''': Similar weaknesses like burners and gliders. Do not recruit a lot of them. Good against herbalists.&lt;br /&gt;
&lt;br /&gt;
* '''Saurian Augur''': Don't leave them out on Flat, because fast cavalry can kill them easily. If you are going for a slow push with lots of Clashers, these are your guys. Weak to Dune Burners, but who will go for dune burners against drakes?&lt;br /&gt;
&lt;br /&gt;
* '''Saurian Skirmisher''': They can kill or at least force riders to pull back. Good skirmisher against Dune skirmishers and herbalists. Do not take too many.&lt;br /&gt;
&lt;br /&gt;
'''Tactics''': Two possibilities. Play with everything, or go for slowpush. Slowpush with clashers, augurs and 2-3 fast units (gliders or fighters) might work well on maps with small quantity of water.&lt;br /&gt;
&lt;br /&gt;
== Specialists ==&lt;br /&gt;
How to play specialists: [[How to play Horseman|Horseman]] - [[How to play Mages|Mages]] - [[How to play Skirmishers|Skirmishers]]&lt;br /&gt;
&lt;br /&gt;
[[Category: How to Play]]&lt;/div&gt;</summary>
		<author><name>Spixi</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=EasyCoding&amp;diff=57877</id>
		<title>EasyCoding</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=EasyCoding&amp;diff=57877"/>
		<updated>2016-08-12T22:50:39Z</updated>

		<summary type="html">&lt;p&gt;Spixi: /* Enhancements to Existing Actions */ Implemented by PR#170&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''We are permanently updating this page. Parts marked by &amp;lt;s&amp;gt;strikeout&amp;lt;/s&amp;gt; will likely be deleted shortly.&lt;br /&gt;
&lt;br /&gt;
This page is here to document easy to do coding tasks. It is not here to double the feature request database, and should only be filled by people that know the code well enough to judge the difficulty of a given task. &lt;br /&gt;
&lt;br /&gt;
If you are such a person, you should feel free to edit this page.&lt;br /&gt;
&lt;br /&gt;
If you're not, you should post a feature request and discuss your idea on the forum or IRC. A coder with better knowledge of the code might give you the green light to add your feature here.&lt;br /&gt;
&lt;br /&gt;
Anybody should feel free to add &amp;quot;clues&amp;quot; to any tasks, that is entry points, traps to avoid, person to contact to discuss and so on.&lt;br /&gt;
&lt;br /&gt;
If you plan to work on a feature, write your name at the bottom of the feature, with the date. Note that if you are too long at working on a feature we'll &amp;quot;free&amp;quot; it back (that is if you're not working on it. If you have problems implementing it, just tell us....)&lt;br /&gt;
&lt;br /&gt;
If none of these are to your liking, feel free to check our [http://gna.org/bugs/?group=wesnoth bug tracker] with a broad spectrum of tasks.&lt;br /&gt;
&lt;br /&gt;
== Engine related features ==&lt;br /&gt;
&lt;br /&gt;
=== Make a &amp;quot;map diff&amp;quot; tool to visualizes changes between two version of a map ===&lt;br /&gt;
&lt;br /&gt;
Maintainers of maps often make small tweaks for balance purposes. For someone who doesn't know the map like the back of their hand it may be very difficult to spot exactly what changed. There isn't any really good way to do this right now -- using the 'diff' tool at command line doesn't give good results for .map files.&lt;br /&gt;
&lt;br /&gt;
Such a tool would be helpful for someone who maintains a map pool containing maps made by others, also for someone who wants to browse a repository and examine balance changes on several maps, which could be instructive for someone who wants to make and balance their own maps.&lt;br /&gt;
&lt;br /&gt;
There's any number of ways to actually do this, one might be to have a feature in the map editor that takes the name of another map and adds map labels to indicate what hexes changed. It could also be a command accessible in debug mode when playing the game, or it could be an additional command-line argument (--diff [map1] [map2] ?) for the game. (It could be a standalone application but that's probably going to end up with much more work for you.)&lt;br /&gt;
&lt;br /&gt;
Henry Stone (3/17/16)&lt;br /&gt;
&lt;br /&gt;
== MP related features ==&lt;br /&gt;
&lt;br /&gt;
=== Add possibility to switch off mod dependency checking ===&lt;br /&gt;
MP modifications can define dependencies. Currently there's no way to force a &amp;quot;broken&amp;quot; configuration, although overzealous use of the system by UMC authors could make this feature useful. Add an option to the MP game creation screen to switch on/off dependency checking. Ask lipk (forum)/lipkab (IRC).&lt;br /&gt;
&lt;br /&gt;
=== Make a header for the add-on when we organize scenarios by add-on in the MP create dialog ===&lt;br /&gt;
&lt;br /&gt;
Using an established GUI technique to signal when one block of scenarios for an add-on ends and the next begins would make it much easier to use this dialog, if the user has several add-ons.&lt;br /&gt;
&lt;br /&gt;
See one proposal here:&lt;br /&gt;
https://gna.org/bugs/?21653&lt;br /&gt;
&lt;br /&gt;
Note that we still intend to move the mp lobby to gui2, it might make sense to adress this while doing that porting (which is not easy)&lt;br /&gt;
&lt;br /&gt;
=== Timer pause button ===&lt;br /&gt;
&lt;br /&gt;
Longstanding feature request here:&lt;br /&gt;
https://gna.org/bugs/?16733&lt;br /&gt;
&lt;br /&gt;
Request is for either a button, or a simple chat command like :pause, :unpause, to allow players to put the timer on hold if they are interrupted.&lt;br /&gt;
&lt;br /&gt;
Ideally would be accompanied with a multiplayer-only scenario attribute &amp;quot;number_of_pauses&amp;quot; which decreases each time a client pauses the game. Pause should use a blindfold object to black out the screen, and send a chat message automatically when it occurs / resume occurs. For an example of how it might look, start a local hotseat mp game and enable the Preferences-&amp;gt;General-&amp;gt;Turn Dialog option. (This behavior was introduced in this commit: https://github.com/wesnoth/wesnoth/commit/bab03d554bea92f1ce6f585ef1123202173a3491)&lt;br /&gt;
&lt;br /&gt;
Wintermute/happygrue also has other ideas about how the timer should/could work. For example, instead of their client ending their turn, the networked opponents could be required to &amp;quot;confirm&amp;quot; the time out. (This is probably a networked MP-only idea.)&lt;br /&gt;
&lt;br /&gt;
A very fancy implementation might instead of a counter, allow the other players to vote on whether a pause request is granted.&lt;br /&gt;
&lt;br /&gt;
Make sure that the paused client still responds to network commands, so that it is possible to kick a person who pauses and then doesn't ever unpause.&lt;br /&gt;
&lt;br /&gt;
=== Add a &amp;quot;concede&amp;quot; button ===&lt;br /&gt;
&lt;br /&gt;
Often times in mp, players concede the game before their leader is actually killed. When the game ends 'officially' the map is revealed, which can sometimes be instructive for the losing player. Additionally, it makes it easier to analyze the results of many games, for purposes of balancing, or for maintaining a ladder. So while it may seem small, this would actually be a pretty useful feature.&lt;br /&gt;
&lt;br /&gt;
== WML-related features ==&lt;br /&gt;
&lt;br /&gt;
=== Support variable village healing, variable poison properties ===&lt;br /&gt;
&lt;br /&gt;
See a feature request here:&lt;br /&gt;
&lt;br /&gt;
https://gna.org/bugs/index.php?20919&lt;br /&gt;
&lt;br /&gt;
=== Enhancements to Existing Actions ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;s&amp;gt;* [fire_event] id=X - allow firing an event by id instead of by name&amp;lt;/s&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Events Manipulation ===&lt;br /&gt;
&lt;br /&gt;
* [event] recognized at the root level of the WML document (outside [scenario]) to define event handlers that are registered for the entirety of a campaign, as opposed to specific scenarios&lt;br /&gt;
* [event] persistent=&amp;quot;yes&amp;quot; - creates an event that lasts for the rest of the campaign&lt;br /&gt;
* [disable_event][/disable_event] disables the event within which it appears (useful with conditionals). A more complex take on first_time_only=yes/no.&lt;br /&gt;
''This is largely possible with event IDs, but could be useful when multiple copies of an event should be floating around''&lt;br /&gt;
&lt;br /&gt;
=== Game Information ===&lt;br /&gt;
&lt;br /&gt;
* [query_location] - queries a location from the user&lt;br /&gt;
** variable&lt;br /&gt;
** [filter_location]&lt;br /&gt;
''Regarding [query_location]: probably a better name would be choose_location. This is used when a wml event is running and needs to get a target location hex from the user. For example, you right click on a catapult unit and choose the menu item &amp;quot;fire Catapult.&amp;quot; Now a [message] says to click on any target within 5 hexes. Now [choose_location] is encountered and the mouse cursor changes to a target sign (possibly customizable). If the user's mouse drifts outside of the allowed locations it changes to a cancel icon. If the operation is cancelled then the variable is cleared and no location stored. --Sapient''&lt;br /&gt;
&lt;br /&gt;
''This can be implemented in lua by using wesnoth.game_events.on_mouse_action and wesnoth.syncronize_choice''&lt;br /&gt;
&lt;br /&gt;
==== Automatically stored variables ====&lt;br /&gt;
&lt;br /&gt;
* $side_info - auto-stored side information&lt;br /&gt;
* $game_info - auto-stored game information&lt;br /&gt;
* $map_info - auto-stored map information&lt;br /&gt;
&lt;br /&gt;
== Improvements to AI ==&lt;br /&gt;
&lt;br /&gt;
=== Existing bugs or undesirable features ===&lt;br /&gt;
&lt;br /&gt;
Most of these are probably relatively easy to fix, although we can, of course, not guarantee that.&lt;br /&gt;
&lt;br /&gt;
* Feature: Make the (old) simple aspect syntax work when the Lua engine is defined for a side.  Setting aspects in the [side] tag like this:&lt;br /&gt;
 [ai]&lt;br /&gt;
     aggression=0.123&lt;br /&gt;
 [/ai]&lt;br /&gt;
does not work if a Lua engine is defined in the tag. You either need to use the [aspect] tag in the [side] tag with 'engine=lua', or use the code above in a [modify_side] tag in an event.  Making the above syntax available (as it is with the C++ engine) would be nice.  The same also applies to the FAI engine and to aspects set for AI sides in MP games.&lt;br /&gt;
&lt;br /&gt;
* Bug: AI units with 0/0 moves will not attack adjacent enemies: http://gna.org/bugs/?23720&lt;br /&gt;
&lt;br /&gt;
* Feature: Convert E_NOT_REACHED_DESTINATION from an error to a warning.&lt;br /&gt;
&lt;br /&gt;
* Bug of sorts: AI move evaluation on maps with many guardians (units with ai_special=guardian) can take a very long time, even though those guardians don't move at all most of the time.&lt;br /&gt;
&lt;br /&gt;
* Bug: Adding a candidate action mid-term does not include it where it belongs in terms of its evaluation score. Instead, it gets added at the end of the candidate action list and might not be executed on the current turn, because other CAs with lower scores get evaluated first.&lt;br /&gt;
&lt;br /&gt;
*Bug?: not all options/parameters of wesnoth.find_cost_map() work as described [[LuaWML:Pathfinder#wesnoth.find_cost_map|here]].  I don't know if that is a bug in the code or if the description on that page is wrong.&lt;br /&gt;
&lt;br /&gt;
* Mix of bugs and features: ai.get_new_enemy_dst_src and related functions have several problems:&lt;br /&gt;
** They use the current moves of the enemy units, which generally are all zero.&lt;br /&gt;
** Hexes occupied by other enemy units count as not reachable.&lt;br /&gt;
** Units with zero moves are not listed at all, not even for the hex they are on.&lt;br /&gt;
** Working around this with a Lua wrapper makes this actually slower than ai_helper.get_enemy_dst_src, which makes the functions pretty much useless, as speed is the only thing speaking for them.&lt;br /&gt;
&lt;br /&gt;
=== Add new features to the AI ===&lt;br /&gt;
&lt;br /&gt;
* Add a cost function to the C++ path finding code that takes avoided hexes into account, that is, hexes defined in an [ai][avoid] tag onto which the AI never moves.  Also add an option to the Lua wesnoth.find_path() function with which using this cost functions can be turned on and off.&lt;br /&gt;
** The background behind this task is the way how the default AI's move-to-targets candidate action works.  It does path finding for units without taking avoided hexes into account, and ''afterwards'' eliminates moves for which the end point falls onto an avoided hex.  As a result, some units might not move at all, even if it is, in principle, easily possible to move around an avoided area.  The inclusion of the new path-finding in the AI's move-to-targets phase could therefore be a follow-up task.&lt;br /&gt;
&lt;br /&gt;
* Add a Lua function ai.get_individual_attacks() that returns all the single attacks the side can do (as opposed to attack combinations).  This needs to include an option to recalculate and take the current situation on the map into account (making the function believe that the game state has changed).&lt;br /&gt;
&lt;br /&gt;
* Set up an option the allows us to exclude units from the move-to-targets phase similar to [filter_own] for the combat phase (other than setting ai_special=guardian, which has a number of other side effects). Actually, having this option for all CA's would be nice.&lt;br /&gt;
&lt;br /&gt;
* Change the aspects &amp;quot;passive_leader&amp;quot;, &amp;quot;passive_leader_shares_keep&amp;quot;, &amp;quot;leader_ignores_keep&amp;quot; to work with multiple leaders. The idea is to change the type of those aspects from yes/no to string so both &amp;quot;passive_leader=yes&amp;quot; and &amp;quot;passive_leader=leader_id_1,leader_id_2&amp;quot; is possible.&lt;br /&gt;
&lt;br /&gt;
* Add new options (keys or tags) to the Micro AIs.  As an example, some (but certainly not all) Micro AIs might benefit from taking some (but certainly not all) of the default AI aspects into account.&lt;br /&gt;
&lt;br /&gt;
* Write a script that automatically changes WML from the deprecated [ai][target] to the new [ai][goal] syntax.  Ideally, this would be part of wmllint.&lt;br /&gt;
** There are [http://wiki.wesnoth.org/AiWML#Deprecated_AI_Targeting_Aspects more deprecated AI aspect] which should eventually be added to this, but the [target] -&amp;gt; [goal] change would be a good and important start.&lt;br /&gt;
&lt;br /&gt;
== GUI1 features ==&lt;br /&gt;
&lt;br /&gt;
=== Widget changes ===&lt;br /&gt;
&lt;br /&gt;
* Make games sortable in the lobby (open slots, total number of players, era, XP modifier, gold per village, fog/shroud)&lt;br /&gt;
* Input history and completion (for in-game and lobby chat, commands, etc.)&lt;br /&gt;
&lt;br /&gt;
== GUI2 features ==&lt;br /&gt;
&lt;br /&gt;
Although mordante developed a new GUI system, GUI2, some dialogs still use the older GUI1 and could be improved or transferred. mordante has since disappeared, leaving GUI2's core code unmaintained; shadowm and vultraz should be able to answer most GUI2 (and even GUI1) related questions in his absence.&lt;br /&gt;
&lt;br /&gt;
* Information on the wiki can be found under [[GUIToolkit]] on the wiki.&lt;br /&gt;
* The source code is under src/gui/&lt;br /&gt;
* All mainline GUI2 WML resides in data/gui/default/&lt;br /&gt;
&lt;br /&gt;
=== Port the random map generator dialog to GUI2 ===&lt;br /&gt;
&lt;br /&gt;
The map generator currently doesn't use the GUI2 framework, but there's no reason why it couldn't.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
=== Debug mode ===&lt;br /&gt;
&lt;br /&gt;
* New debug command functionality (setting additional status.variables, possibly terrain)&lt;br /&gt;
&lt;br /&gt;
=== wesnoth-optipng ===&lt;br /&gt;
&lt;br /&gt;
For lossless png compression we use wesnoth-optipng, a script using an external toolchain (ImageMagick, OptiPNG, Advdef). Perhaps the performance could be improved by using PNGOut instead of advdef. This task includes&lt;br /&gt;
* a quick profiling of compression ratio and decompression speed for both tools&lt;br /&gt;
* if it provides a higher compression while not significantly slowing down decompression, adapt wesnoth-optipng to use PNGOut&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[NotSoEasyCoding]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Future]]&lt;/div&gt;</summary>
		<author><name>Spixi</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=LuaWML/Events&amp;diff=57876</id>
		<title>LuaWML/Events</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=LuaWML/Events&amp;diff=57876"/>
		<updated>2016-08-12T22:49:41Z</updated>

		<summary type="html">&lt;p&gt;Spixi: /* wesnoth.fire_event_by_id */ fixed function signature&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the [[LuaWML]] functions and helpers for interacting with events and action handlers.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.fire ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.fire(''wml_action_name'', ''wml_action_contents'')'''&lt;br /&gt;
&lt;br /&gt;
Fires a [[ActionWML|WML action]]. Argument 1 is the name of the action. Argument 2 is the WML table describing the action. Note: WML variables are substituted.&lt;br /&gt;
&lt;br /&gt;
 wesnoth.fire(&amp;quot;message&amp;quot;, { speaker=&amp;quot;narrator&amp;quot;, message=_ &amp;quot;Hello World!&amp;quot; })&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.wml_actions ====&lt;br /&gt;
&lt;br /&gt;
This is not a function but an associative table indexed by WML action names. It contains functions performing the corresponding actions. Using these functions is similar to calling [[#wesnoth.fire]], while setting entries of the table is similar to calling [[#wesnoth.register_wml_action]].&lt;br /&gt;
&lt;br /&gt;
 function wesnoth.wml_actions.freeze_unit(cfg)&lt;br /&gt;
     local unit_id = cfg.id or helper.wml_error &amp;quot;[freeze_unit] expects an id= attribute.&amp;quot;&lt;br /&gt;
     helper.modify_unit({ id = unit_id }, { moves = 0 })&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
The new tag can now be used in plain WML code.&lt;br /&gt;
 [freeze_unit]&lt;br /&gt;
     id=Delfador&lt;br /&gt;
 [/freeze_unit]&lt;br /&gt;
&lt;br /&gt;
You can override functions already assigned to the table. This is useful if you need to extend functionality of core tags. For instance, the following script overrides the [[InterfaceActionsWML#Other interface tags|[print]]] tag so that messages are displayed with a bigger font.&lt;br /&gt;
&lt;br /&gt;
 function wesnoth.wml_actions.print(cfg)&lt;br /&gt;
   cfg.size = (cfg.size or 12) + 10&lt;br /&gt;
   wml_actions.print(cfg)&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
Note: When calling an action handler directly through its function stored in ''wesnoth.wml_actions'', the engine is not involved. As a consequence, whether variable substitution will happen is up to the handler. In particular, if the argument is a plain table, the caller should have substituted WML variables beforehand to be on the safe side. Moreover, table arguments might be modified by the action handler, so they should usually not be reused for consecutive calls. If variable substitution should happen and/or table content should be preserved, one can call [[#wesnoth.tovconfig]] and pass its result to the handler. Calling [[#wesnoth.fire]] is another possibility.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.wml_conditionals ====&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|0}}&lt;br /&gt;
&lt;br /&gt;
This is an associative table like wesnoth.wml_actions. You can use it to define new conditional wml tags that will be recognized in WML when using [if], [show_if], [while], etc., or more generally when '''wesnoth.eval_conditional''' is run.&lt;br /&gt;
&lt;br /&gt;
Use it like&lt;br /&gt;
&lt;br /&gt;
  function wesnoth.wml_conditionals.foo(cfg)&lt;br /&gt;
      local bar = cfg.bar or error(&amp;quot;[foo] tag did not have 'bar' attribute&amp;quot;)&lt;br /&gt;
  &lt;br /&gt;
      return (bar == &amp;quot;baz&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
If this lua code is executed, it would make the following syntax be valid WML in your add-on:&lt;br /&gt;
&lt;br /&gt;
  [if]&lt;br /&gt;
     [foo]&lt;br /&gt;
        bar = $X&lt;br /&gt;
     [/foo]&lt;br /&gt;
     [then]&lt;br /&gt;
        [message]&lt;br /&gt;
           ...&lt;br /&gt;
        [/message]&lt;br /&gt;
     [/then]&lt;br /&gt;
  [/if]&lt;br /&gt;
&lt;br /&gt;
You cannot override the meaning of any core conditional tags.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.game_events ====&lt;br /&gt;
&lt;br /&gt;
This is not a function but an associative table indexed by engine action names. It contains function hooks the engine calls whenever it performs a particular action.&lt;br /&gt;
&lt;br /&gt;
* '''on_save''': function called when the engine (auto)saves a scenario file; it should return a WML table and the children of this table are added to the savefile.&lt;br /&gt;
* '''on_load''': function called when the engine loads a scenario file; its argument is a WML table that contains all the children of the savefile that the engine did not handle.&lt;br /&gt;
* '''on_event''': function called before each WML event is executed; its argument is the event name; other event arguments can be recovered from [[LuaWML:Misc#wesnoth.current|wesnoth.current.event_context]].&lt;br /&gt;
&lt;br /&gt;
The ''on_save'' and ''on_load'' hooks can be used to manipulate data that are neither meant to be forwarded to the next level nor substituted on the fly. (For either of these two purposes, WML variables are the best choice.) For instance, toplevel tags like [item], [event], [time_area], and so on, could typically be handled by such hooks.&lt;br /&gt;
&lt;br /&gt;
 -- some value that survives save/load cycles, but that is not forwarded to the next level&lt;br /&gt;
 local level_local_data = 0&lt;br /&gt;
 &lt;br /&gt;
 local old_on_load = wesnoth.game_event.on_load&lt;br /&gt;
 function wesnoth.game_event.on_load(cfg)&lt;br /&gt;
     for i = 1,#cfg do&lt;br /&gt;
         if cfg[i][1] == &amp;quot;my_data&amp;quot; then&lt;br /&gt;
             -- recover the value stored in the savefile&lt;br /&gt;
             level_local_data = cfg[i][2].value&lt;br /&gt;
             -- erase the child, since it has been handled&lt;br /&gt;
             table.remove(cfg, i)&lt;br /&gt;
             break&lt;br /&gt;
         end&lt;br /&gt;
     end&lt;br /&gt;
     -- call the previous hook, in case there are still some containers in the savefile&lt;br /&gt;
     old_on_load(cfg)&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 local old_on_save = wesnoth.game_events.on_save&lt;br /&gt;
 function wesnoth.game_events.on_save()&lt;br /&gt;
     -- call the previous hook, in case it had some containers to store&lt;br /&gt;
     local cfg = old_on_save()&lt;br /&gt;
     -- add our own container to them&lt;br /&gt;
     table.insert(cfg, { &amp;quot;my_data&amp;quot;, { value = level_local_data } })&lt;br /&gt;
     -- tell the engine to store them in the savefile&lt;br /&gt;
     return cfg&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
Note: since the ''on_load'' hook is called very early in the scenario, it cannot be set inside a [lua] tag in an [event], not even a ''preload'' one. It has to be set inside a [lua] tag outside or at [scenario] level.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: Some tag names are reserved for engine use and should not be modified using the above on_save/on_load method. These tag names are:&lt;br /&gt;
 &amp;quot;color_palette&amp;quot;, &amp;quot;color_range&amp;quot;, &amp;quot;era&amp;quot;, &amp;quot;event&amp;quot;, &amp;quot;generator&amp;quot;,&lt;br /&gt;
 &amp;quot;label&amp;quot;, &amp;quot;lua&amp;quot;, &amp;quot;menu_item&amp;quot;, &amp;quot;music&amp;quot;, &amp;quot;side&amp;quot;, &amp;quot;sound_source&amp;quot;, &amp;quot;story&amp;quot;,&lt;br /&gt;
 &amp;quot;terrain_graphics&amp;quot;, &amp;quot;time&amp;quot;, &amp;quot;time_area&amp;quot;, &amp;quot;tunnel&amp;quot;, &amp;quot;variables&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note: a on_event handler will not prevent undoing of that event, so usually you need to add an event to diallow undo to prevent OOS. You can add an event handler for that event inside a on_event callback. A possible way to define a disallow_undo function is:&lt;br /&gt;
 function disallow_undo()&lt;br /&gt;
 	wesnoth.wml_actions.event { name = wesnoth.current.event_context.name }&lt;br /&gt;
 end&lt;br /&gt;
Which should then be called from every on_event callback which changes the gamestate.&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|5}}:&lt;br /&gt;
The event names passed to ''on_event'' always use underscores instead of spaces&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.fire_event ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.fire_event(''event_name'', [''x1'', ''y1'', [''x2'', ''y2'']], [''first_weapon'', [''second_weapon'']])'''&lt;br /&gt;
&lt;br /&gt;
Fires all the WML events with the given name. Optional parameters allow passing two locations and two tables. These parameters will be matched against the [filter], [filter_second], [filter_attack], and [filter_second_attack] of any event handler, and are used to fill the WML variables &amp;quot;unit&amp;quot;, &amp;quot;second_unit&amp;quot;, &amp;quot;weapon&amp;quot;, and &amp;quot;second_weapon&amp;quot;. These parameters can also be read through ''current.event_context''. The function returns a boolean indicating whether the game state was modified.&lt;br /&gt;
&lt;br /&gt;
 wesnoth.fire_event(&amp;quot;explosion&amp;quot;, 17, 42, { damage = &amp;quot;fire&amp;quot; })&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.fire_event_by_name ====&lt;br /&gt;
{{DevFeature1.13|6}}&lt;br /&gt;
&lt;br /&gt;
* Preferred alias of [[#wesnoth.fire_event|wesnoth.fire_event]] to make it more distinguishable from the new function [[#wesnoth.fire_event_by_id|wesnoth.fire_event_by_id]]&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.fire_event_by_id ====&lt;br /&gt;
{{DevFeature1.13|6}}&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.fire_event_by_id(''event_id'', [''x1'', ''y1'', [''x2'', ''y2'']], [''first_weapon'', [''second_weapon'']])'''&lt;br /&gt;
&lt;br /&gt;
Fires a single WML event with the given id. Optional parameters allow passing two locations and two tables. These parameters will be matched against the [filter], [filter_second], [filter_attack], and [filter_second_attack] of the event handler, and are used to fill the WML variables &amp;quot;unit&amp;quot;, &amp;quot;second_unit&amp;quot;, &amp;quot;weapon&amp;quot;, and &amp;quot;second_weapon&amp;quot;. These parameters can also be read through ''current.event_context''. The function returns a boolean indicating whether the game state was modified.&lt;br /&gt;
&lt;br /&gt;
 wesnoth.fire_event_by_id(&amp;quot;explosion_1&amp;quot;, 17, 42, { damage = &amp;quot;fire&amp;quot; })&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.add_event_handler ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.add_event_handler(''cfg'')'''&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|0}}&lt;br /&gt;
&lt;br /&gt;
Registers a new event handler. This takes a WML table containing the same information normally used by the [[EventWML#The_.5Bevent.5D_Tag|[event]]] tag.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.remove_event_handler ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.remove_event_handler(''id'')'''&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|0}}&lt;br /&gt;
&lt;br /&gt;
Removes an event handler. This requires the event handler to have been assigned an [[EventWML#id|id]] at creation time.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.eval_conditional ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.eval_conditional(''conditional_tags'')'''&lt;br /&gt;
&lt;br /&gt;
Returns true if the conditional described by the WML table passes. Note: WML variables are substituted.&lt;br /&gt;
&lt;br /&gt;
 local result = wesnoth.eval_conditional {&lt;br /&gt;
   { &amp;quot;have_unit&amp;quot;, { id = &amp;quot;hero&amp;quot; } },&lt;br /&gt;
   { &amp;quot;variable&amp;quot;, { name = &amp;quot;counter&amp;quot;, numerical_equals = &amp;quot;$old_counter&amp;quot; } }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.tovconfig ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.tovconfig(''config'')'''&lt;br /&gt;
&lt;br /&gt;
Converts a WML table into a proxy object which performs variable substitution on the fly.&lt;br /&gt;
&lt;br /&gt;
 wesnoth.set_variable(&amp;quot;varname&amp;quot;, &amp;quot;to_be_deleted&amp;quot;)&lt;br /&gt;
 wesnoth.wml_actions.clear_variable { name = &amp;quot;to_be_deleted&amp;quot; }              -- correct&lt;br /&gt;
 wesnoth.wml_actions.clear_variable { name = &amp;quot;$varname&amp;quot; }                    -- error: try to delete a variable literally called &amp;quot;$varname&amp;quot;&lt;br /&gt;
 wesnoth.wml_actions.clear_variable(wesnoth.tovconfig { name = &amp;quot;$varname&amp;quot; }) -- correct: &amp;quot;$varname&amp;quot; is replaced by &amp;quot;to_be_deleted&amp;quot; at the right time&lt;br /&gt;
&lt;br /&gt;
==== helper.set_wml_action_metatable ====&lt;br /&gt;
&lt;br /&gt;
* '''helper.set_wml_action_metatable{}'''&lt;br /&gt;
&lt;br /&gt;
Sets the metatable of a table so that it can be used to fire WML actions. Returns the table. The fields of the table are then simple wrappers around a call to [[#wesnoth.fire]].&lt;br /&gt;
&lt;br /&gt;
 local W = helper.set_wml_action_metatable {}&lt;br /&gt;
 W.message { speaker = &amp;quot;narrator&amp;quot;, message = &amp;quot;?&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
==== helper.wml_error ====&lt;br /&gt;
&lt;br /&gt;
* '''helper.wml_error(''message'')'''&lt;br /&gt;
&lt;br /&gt;
Interrupts the current execution and displays a chat message that looks like a WML error.&lt;br /&gt;
&lt;br /&gt;
 local names = cfg.name or helper.wml_error(&amp;quot;[clear_variable] missing required name= attribute.&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==== helper.literal ====&lt;br /&gt;
&lt;br /&gt;
* '''helper.literal(''config'')'''&lt;br /&gt;
&lt;br /&gt;
Returns the ''__literal'' field of its argument if it is a userdata, the argument itself otherwise. This function is meant to be called when a WML action handler can be called indifferently from WML (hence receiving a userdata) or from Lua (hence possibly receiving a table).&lt;br /&gt;
&lt;br /&gt;
 function wml_actions.display_literal_value(cfg)&lt;br /&gt;
    cfg = helper.literal(cfg)&lt;br /&gt;
    wesnoth.message(tostring(cfg.value)) &lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
Note: when the argument is a plain table, the function returns it as is. In particular, modifying the fields of the returned table causes the original table to be modified too.&lt;br /&gt;
&lt;br /&gt;
==== helper.parsed ====&lt;br /&gt;
&lt;br /&gt;
* '''helper.parsed(''config'')'''&lt;br /&gt;
&lt;br /&gt;
Returns the ''__parsed'' field of its argument if it is a userdata, the argument itself otherwise. See also [[#helper.literal]].&lt;br /&gt;
&lt;br /&gt;
==== helper.shallow_literal ====&lt;br /&gt;
&lt;br /&gt;
* '''helper.shallow_literal(''config'')'''&lt;br /&gt;
&lt;br /&gt;
Returns the ''__shallow_literal'' field of its argument if it is a userdata, the argument itself otherwise. See also [[#helper.literal]].&lt;br /&gt;
&lt;br /&gt;
==== helper.shallow_parsed ====&lt;br /&gt;
&lt;br /&gt;
* '''helper.shallow_parsed(''config'')'''&lt;br /&gt;
&lt;br /&gt;
Returns the ''__shallow_parsed'' field of its argument if it is a userdata, the argument itself otherwise. See also [[#helper.literal]].&lt;br /&gt;
&lt;br /&gt;
[[Category: Lua Reference]]&lt;/div&gt;</summary>
		<author><name>Spixi</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=LuaWML/Events&amp;diff=57875</id>
		<title>LuaWML/Events</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=LuaWML/Events&amp;diff=57875"/>
		<updated>2016-08-12T22:48:44Z</updated>

		<summary type="html">&lt;p&gt;Spixi: removed unneccessary newlines&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the [[LuaWML]] functions and helpers for interacting with events and action handlers.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.fire ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.fire(''wml_action_name'', ''wml_action_contents'')'''&lt;br /&gt;
&lt;br /&gt;
Fires a [[ActionWML|WML action]]. Argument 1 is the name of the action. Argument 2 is the WML table describing the action. Note: WML variables are substituted.&lt;br /&gt;
&lt;br /&gt;
 wesnoth.fire(&amp;quot;message&amp;quot;, { speaker=&amp;quot;narrator&amp;quot;, message=_ &amp;quot;Hello World!&amp;quot; })&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.wml_actions ====&lt;br /&gt;
&lt;br /&gt;
This is not a function but an associative table indexed by WML action names. It contains functions performing the corresponding actions. Using these functions is similar to calling [[#wesnoth.fire]], while setting entries of the table is similar to calling [[#wesnoth.register_wml_action]].&lt;br /&gt;
&lt;br /&gt;
 function wesnoth.wml_actions.freeze_unit(cfg)&lt;br /&gt;
     local unit_id = cfg.id or helper.wml_error &amp;quot;[freeze_unit] expects an id= attribute.&amp;quot;&lt;br /&gt;
     helper.modify_unit({ id = unit_id }, { moves = 0 })&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
The new tag can now be used in plain WML code.&lt;br /&gt;
 [freeze_unit]&lt;br /&gt;
     id=Delfador&lt;br /&gt;
 [/freeze_unit]&lt;br /&gt;
&lt;br /&gt;
You can override functions already assigned to the table. This is useful if you need to extend functionality of core tags. For instance, the following script overrides the [[InterfaceActionsWML#Other interface tags|[print]]] tag so that messages are displayed with a bigger font.&lt;br /&gt;
&lt;br /&gt;
 function wesnoth.wml_actions.print(cfg)&lt;br /&gt;
   cfg.size = (cfg.size or 12) + 10&lt;br /&gt;
   wml_actions.print(cfg)&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
Note: When calling an action handler directly through its function stored in ''wesnoth.wml_actions'', the engine is not involved. As a consequence, whether variable substitution will happen is up to the handler. In particular, if the argument is a plain table, the caller should have substituted WML variables beforehand to be on the safe side. Moreover, table arguments might be modified by the action handler, so they should usually not be reused for consecutive calls. If variable substitution should happen and/or table content should be preserved, one can call [[#wesnoth.tovconfig]] and pass its result to the handler. Calling [[#wesnoth.fire]] is another possibility.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.wml_conditionals ====&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|0}}&lt;br /&gt;
&lt;br /&gt;
This is an associative table like wesnoth.wml_actions. You can use it to define new conditional wml tags that will be recognized in WML when using [if], [show_if], [while], etc., or more generally when '''wesnoth.eval_conditional''' is run.&lt;br /&gt;
&lt;br /&gt;
Use it like&lt;br /&gt;
&lt;br /&gt;
  function wesnoth.wml_conditionals.foo(cfg)&lt;br /&gt;
      local bar = cfg.bar or error(&amp;quot;[foo] tag did not have 'bar' attribute&amp;quot;)&lt;br /&gt;
  &lt;br /&gt;
      return (bar == &amp;quot;baz&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
If this lua code is executed, it would make the following syntax be valid WML in your add-on:&lt;br /&gt;
&lt;br /&gt;
  [if]&lt;br /&gt;
     [foo]&lt;br /&gt;
        bar = $X&lt;br /&gt;
     [/foo]&lt;br /&gt;
     [then]&lt;br /&gt;
        [message]&lt;br /&gt;
           ...&lt;br /&gt;
        [/message]&lt;br /&gt;
     [/then]&lt;br /&gt;
  [/if]&lt;br /&gt;
&lt;br /&gt;
You cannot override the meaning of any core conditional tags.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.game_events ====&lt;br /&gt;
&lt;br /&gt;
This is not a function but an associative table indexed by engine action names. It contains function hooks the engine calls whenever it performs a particular action.&lt;br /&gt;
&lt;br /&gt;
* '''on_save''': function called when the engine (auto)saves a scenario file; it should return a WML table and the children of this table are added to the savefile.&lt;br /&gt;
* '''on_load''': function called when the engine loads a scenario file; its argument is a WML table that contains all the children of the savefile that the engine did not handle.&lt;br /&gt;
* '''on_event''': function called before each WML event is executed; its argument is the event name; other event arguments can be recovered from [[LuaWML:Misc#wesnoth.current|wesnoth.current.event_context]].&lt;br /&gt;
&lt;br /&gt;
The ''on_save'' and ''on_load'' hooks can be used to manipulate data that are neither meant to be forwarded to the next level nor substituted on the fly. (For either of these two purposes, WML variables are the best choice.) For instance, toplevel tags like [item], [event], [time_area], and so on, could typically be handled by such hooks.&lt;br /&gt;
&lt;br /&gt;
 -- some value that survives save/load cycles, but that is not forwarded to the next level&lt;br /&gt;
 local level_local_data = 0&lt;br /&gt;
 &lt;br /&gt;
 local old_on_load = wesnoth.game_event.on_load&lt;br /&gt;
 function wesnoth.game_event.on_load(cfg)&lt;br /&gt;
     for i = 1,#cfg do&lt;br /&gt;
         if cfg[i][1] == &amp;quot;my_data&amp;quot; then&lt;br /&gt;
             -- recover the value stored in the savefile&lt;br /&gt;
             level_local_data = cfg[i][2].value&lt;br /&gt;
             -- erase the child, since it has been handled&lt;br /&gt;
             table.remove(cfg, i)&lt;br /&gt;
             break&lt;br /&gt;
         end&lt;br /&gt;
     end&lt;br /&gt;
     -- call the previous hook, in case there are still some containers in the savefile&lt;br /&gt;
     old_on_load(cfg)&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 local old_on_save = wesnoth.game_events.on_save&lt;br /&gt;
 function wesnoth.game_events.on_save()&lt;br /&gt;
     -- call the previous hook, in case it had some containers to store&lt;br /&gt;
     local cfg = old_on_save()&lt;br /&gt;
     -- add our own container to them&lt;br /&gt;
     table.insert(cfg, { &amp;quot;my_data&amp;quot;, { value = level_local_data } })&lt;br /&gt;
     -- tell the engine to store them in the savefile&lt;br /&gt;
     return cfg&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
Note: since the ''on_load'' hook is called very early in the scenario, it cannot be set inside a [lua] tag in an [event], not even a ''preload'' one. It has to be set inside a [lua] tag outside or at [scenario] level.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: Some tag names are reserved for engine use and should not be modified using the above on_save/on_load method. These tag names are:&lt;br /&gt;
 &amp;quot;color_palette&amp;quot;, &amp;quot;color_range&amp;quot;, &amp;quot;era&amp;quot;, &amp;quot;event&amp;quot;, &amp;quot;generator&amp;quot;,&lt;br /&gt;
 &amp;quot;label&amp;quot;, &amp;quot;lua&amp;quot;, &amp;quot;menu_item&amp;quot;, &amp;quot;music&amp;quot;, &amp;quot;side&amp;quot;, &amp;quot;sound_source&amp;quot;, &amp;quot;story&amp;quot;,&lt;br /&gt;
 &amp;quot;terrain_graphics&amp;quot;, &amp;quot;time&amp;quot;, &amp;quot;time_area&amp;quot;, &amp;quot;tunnel&amp;quot;, &amp;quot;variables&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note: a on_event handler will not prevent undoing of that event, so usually you need to add an event to diallow undo to prevent OOS. You can add an event handler for that event inside a on_event callback. A possible way to define a disallow_undo function is:&lt;br /&gt;
 function disallow_undo()&lt;br /&gt;
 	wesnoth.wml_actions.event { name = wesnoth.current.event_context.name }&lt;br /&gt;
 end&lt;br /&gt;
Which should then be called from every on_event callback which changes the gamestate.&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|5}}:&lt;br /&gt;
The event names passed to ''on_event'' always use underscores instead of spaces&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.fire_event ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.fire_event(''event_name'', [''x1'', ''y1'', [''x2'', ''y2'']], [''first_weapon'', [''second_weapon'']])'''&lt;br /&gt;
&lt;br /&gt;
Fires all the WML events with the given name. Optional parameters allow passing two locations and two tables. These parameters will be matched against the [filter], [filter_second], [filter_attack], and [filter_second_attack] of any event handler, and are used to fill the WML variables &amp;quot;unit&amp;quot;, &amp;quot;second_unit&amp;quot;, &amp;quot;weapon&amp;quot;, and &amp;quot;second_weapon&amp;quot;. These parameters can also be read through ''current.event_context''. The function returns a boolean indicating whether the game state was modified.&lt;br /&gt;
&lt;br /&gt;
 wesnoth.fire_event(&amp;quot;explosion&amp;quot;, 17, 42, { damage = &amp;quot;fire&amp;quot; })&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.fire_event_by_name ====&lt;br /&gt;
{{DevFeature1.13|6}}&lt;br /&gt;
&lt;br /&gt;
* Preferred alias of [[#wesnoth.fire_event|wesnoth.fire_event]] to make it more distinguishable from the new function [[#wesnoth.fire_event_by_id|wesnoth.fire_event_by_id]]&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.fire_event_by_id ====&lt;br /&gt;
{{DevFeature1.13|6}}&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.fire_event(''event_id'', [''x1'', ''y1'', [''x2'', ''y2'']], [''first_weapon'', [''second_weapon'']])'''&lt;br /&gt;
&lt;br /&gt;
Fires a single WML event with the given id. Optional parameters allow passing two locations and two tables. These parameters will be matched against the [filter], [filter_second], [filter_attack], and [filter_second_attack] of the event handler, and are used to fill the WML variables &amp;quot;unit&amp;quot;, &amp;quot;second_unit&amp;quot;, &amp;quot;weapon&amp;quot;, and &amp;quot;second_weapon&amp;quot;. These parameters can also be read through ''current.event_context''. The function returns a boolean indicating whether the game state was modified.&lt;br /&gt;
&lt;br /&gt;
 wesnoth.fire_event_by_id(&amp;quot;explosion_1&amp;quot;, 17, 42, { damage = &amp;quot;fire&amp;quot; })&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.add_event_handler ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.add_event_handler(''cfg'')'''&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|0}}&lt;br /&gt;
&lt;br /&gt;
Registers a new event handler. This takes a WML table containing the same information normally used by the [[EventWML#The_.5Bevent.5D_Tag|[event]]] tag.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.remove_event_handler ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.remove_event_handler(''id'')'''&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|0}}&lt;br /&gt;
&lt;br /&gt;
Removes an event handler. This requires the event handler to have been assigned an [[EventWML#id|id]] at creation time.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.eval_conditional ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.eval_conditional(''conditional_tags'')'''&lt;br /&gt;
&lt;br /&gt;
Returns true if the conditional described by the WML table passes. Note: WML variables are substituted.&lt;br /&gt;
&lt;br /&gt;
 local result = wesnoth.eval_conditional {&lt;br /&gt;
   { &amp;quot;have_unit&amp;quot;, { id = &amp;quot;hero&amp;quot; } },&lt;br /&gt;
   { &amp;quot;variable&amp;quot;, { name = &amp;quot;counter&amp;quot;, numerical_equals = &amp;quot;$old_counter&amp;quot; } }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.tovconfig ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.tovconfig(''config'')'''&lt;br /&gt;
&lt;br /&gt;
Converts a WML table into a proxy object which performs variable substitution on the fly.&lt;br /&gt;
&lt;br /&gt;
 wesnoth.set_variable(&amp;quot;varname&amp;quot;, &amp;quot;to_be_deleted&amp;quot;)&lt;br /&gt;
 wesnoth.wml_actions.clear_variable { name = &amp;quot;to_be_deleted&amp;quot; }              -- correct&lt;br /&gt;
 wesnoth.wml_actions.clear_variable { name = &amp;quot;$varname&amp;quot; }                    -- error: try to delete a variable literally called &amp;quot;$varname&amp;quot;&lt;br /&gt;
 wesnoth.wml_actions.clear_variable(wesnoth.tovconfig { name = &amp;quot;$varname&amp;quot; }) -- correct: &amp;quot;$varname&amp;quot; is replaced by &amp;quot;to_be_deleted&amp;quot; at the right time&lt;br /&gt;
&lt;br /&gt;
==== helper.set_wml_action_metatable ====&lt;br /&gt;
&lt;br /&gt;
* '''helper.set_wml_action_metatable{}'''&lt;br /&gt;
&lt;br /&gt;
Sets the metatable of a table so that it can be used to fire WML actions. Returns the table. The fields of the table are then simple wrappers around a call to [[#wesnoth.fire]].&lt;br /&gt;
&lt;br /&gt;
 local W = helper.set_wml_action_metatable {}&lt;br /&gt;
 W.message { speaker = &amp;quot;narrator&amp;quot;, message = &amp;quot;?&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
==== helper.wml_error ====&lt;br /&gt;
&lt;br /&gt;
* '''helper.wml_error(''message'')'''&lt;br /&gt;
&lt;br /&gt;
Interrupts the current execution and displays a chat message that looks like a WML error.&lt;br /&gt;
&lt;br /&gt;
 local names = cfg.name or helper.wml_error(&amp;quot;[clear_variable] missing required name= attribute.&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==== helper.literal ====&lt;br /&gt;
&lt;br /&gt;
* '''helper.literal(''config'')'''&lt;br /&gt;
&lt;br /&gt;
Returns the ''__literal'' field of its argument if it is a userdata, the argument itself otherwise. This function is meant to be called when a WML action handler can be called indifferently from WML (hence receiving a userdata) or from Lua (hence possibly receiving a table).&lt;br /&gt;
&lt;br /&gt;
 function wml_actions.display_literal_value(cfg)&lt;br /&gt;
    cfg = helper.literal(cfg)&lt;br /&gt;
    wesnoth.message(tostring(cfg.value)) &lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
Note: when the argument is a plain table, the function returns it as is. In particular, modifying the fields of the returned table causes the original table to be modified too.&lt;br /&gt;
&lt;br /&gt;
==== helper.parsed ====&lt;br /&gt;
&lt;br /&gt;
* '''helper.parsed(''config'')'''&lt;br /&gt;
&lt;br /&gt;
Returns the ''__parsed'' field of its argument if it is a userdata, the argument itself otherwise. See also [[#helper.literal]].&lt;br /&gt;
&lt;br /&gt;
==== helper.shallow_literal ====&lt;br /&gt;
&lt;br /&gt;
* '''helper.shallow_literal(''config'')'''&lt;br /&gt;
&lt;br /&gt;
Returns the ''__shallow_literal'' field of its argument if it is a userdata, the argument itself otherwise. See also [[#helper.literal]].&lt;br /&gt;
&lt;br /&gt;
==== helper.shallow_parsed ====&lt;br /&gt;
&lt;br /&gt;
* '''helper.shallow_parsed(''config'')'''&lt;br /&gt;
&lt;br /&gt;
Returns the ''__shallow_parsed'' field of its argument if it is a userdata, the argument itself otherwise. See also [[#helper.literal]].&lt;br /&gt;
&lt;br /&gt;
[[Category: Lua Reference]]&lt;/div&gt;</summary>
		<author><name>Spixi</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=LuaWML/Events&amp;diff=57874</id>
		<title>LuaWML/Events</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=LuaWML/Events&amp;diff=57874"/>
		<updated>2016-08-12T22:47:09Z</updated>

		<summary type="html">&lt;p&gt;Spixi: /* wesnoth.fire_event */ See PR#710&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the [[LuaWML]] functions and helpers for interacting with events and action handlers.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.fire ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.fire(''wml_action_name'', ''wml_action_contents'')'''&lt;br /&gt;
&lt;br /&gt;
Fires a [[ActionWML|WML action]]. Argument 1 is the name of the action. Argument 2 is the WML table describing the action. Note: WML variables are substituted.&lt;br /&gt;
&lt;br /&gt;
 wesnoth.fire(&amp;quot;message&amp;quot;, { speaker=&amp;quot;narrator&amp;quot;, message=_ &amp;quot;Hello World!&amp;quot; })&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.wml_actions ====&lt;br /&gt;
&lt;br /&gt;
This is not a function but an associative table indexed by WML action names. It contains functions performing the corresponding actions. Using these functions is similar to calling [[#wesnoth.fire]], while setting entries of the table is similar to calling [[#wesnoth.register_wml_action]].&lt;br /&gt;
&lt;br /&gt;
 function wesnoth.wml_actions.freeze_unit(cfg)&lt;br /&gt;
     local unit_id = cfg.id or helper.wml_error &amp;quot;[freeze_unit] expects an id= attribute.&amp;quot;&lt;br /&gt;
     helper.modify_unit({ id = unit_id }, { moves = 0 })&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
The new tag can now be used in plain WML code.&lt;br /&gt;
 [freeze_unit]&lt;br /&gt;
     id=Delfador&lt;br /&gt;
 [/freeze_unit]&lt;br /&gt;
&lt;br /&gt;
You can override functions already assigned to the table. This is useful if you need to extend functionality of core tags. For instance, the following script overrides the [[InterfaceActionsWML#Other interface tags|[print]]] tag so that messages are displayed with a bigger font.&lt;br /&gt;
&lt;br /&gt;
 function wesnoth.wml_actions.print(cfg)&lt;br /&gt;
   cfg.size = (cfg.size or 12) + 10&lt;br /&gt;
   wml_actions.print(cfg)&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
Note: When calling an action handler directly through its function stored in ''wesnoth.wml_actions'', the engine is not involved. As a consequence, whether variable substitution will happen is up to the handler. In particular, if the argument is a plain table, the caller should have substituted WML variables beforehand to be on the safe side. Moreover, table arguments might be modified by the action handler, so they should usually not be reused for consecutive calls. If variable substitution should happen and/or table content should be preserved, one can call [[#wesnoth.tovconfig]] and pass its result to the handler. Calling [[#wesnoth.fire]] is another possibility.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.wml_conditionals ====&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|0}}&lt;br /&gt;
&lt;br /&gt;
This is an associative table like wesnoth.wml_actions. You can use it to define new conditional wml tags that will be recognized in WML when using [if], [show_if], [while], etc., or more generally when '''wesnoth.eval_conditional''' is run.&lt;br /&gt;
&lt;br /&gt;
Use it like&lt;br /&gt;
&lt;br /&gt;
  function wesnoth.wml_conditionals.foo(cfg)&lt;br /&gt;
      local bar = cfg.bar or error(&amp;quot;[foo] tag did not have 'bar' attribute&amp;quot;)&lt;br /&gt;
  &lt;br /&gt;
      return (bar == &amp;quot;baz&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
If this lua code is executed, it would make the following syntax be valid WML in your add-on:&lt;br /&gt;
&lt;br /&gt;
  [if]&lt;br /&gt;
     [foo]&lt;br /&gt;
        bar = $X&lt;br /&gt;
     [/foo]&lt;br /&gt;
     [then]&lt;br /&gt;
        [message]&lt;br /&gt;
           ...&lt;br /&gt;
        [/message]&lt;br /&gt;
     [/then]&lt;br /&gt;
  [/if]&lt;br /&gt;
&lt;br /&gt;
You cannot override the meaning of any core conditional tags.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.game_events ====&lt;br /&gt;
&lt;br /&gt;
This is not a function but an associative table indexed by engine action names. It contains function hooks the engine calls whenever it performs a particular action.&lt;br /&gt;
&lt;br /&gt;
* '''on_save''': function called when the engine (auto)saves a scenario file; it should return a WML table and the children of this table are added to the savefile.&lt;br /&gt;
* '''on_load''': function called when the engine loads a scenario file; its argument is a WML table that contains all the children of the savefile that the engine did not handle.&lt;br /&gt;
* '''on_event''': function called before each WML event is executed; its argument is the event name; other event arguments can be recovered from [[LuaWML:Misc#wesnoth.current|wesnoth.current.event_context]].&lt;br /&gt;
&lt;br /&gt;
The ''on_save'' and ''on_load'' hooks can be used to manipulate data that are neither meant to be forwarded to the next level nor substituted on the fly. (For either of these two purposes, WML variables are the best choice.) For instance, toplevel tags like [item], [event], [time_area], and so on, could typically be handled by such hooks.&lt;br /&gt;
&lt;br /&gt;
 -- some value that survives save/load cycles, but that is not forwarded to the next level&lt;br /&gt;
 local level_local_data = 0&lt;br /&gt;
 &lt;br /&gt;
 local old_on_load = wesnoth.game_event.on_load&lt;br /&gt;
 function wesnoth.game_event.on_load(cfg)&lt;br /&gt;
     for i = 1,#cfg do&lt;br /&gt;
         if cfg[i][1] == &amp;quot;my_data&amp;quot; then&lt;br /&gt;
             -- recover the value stored in the savefile&lt;br /&gt;
             level_local_data = cfg[i][2].value&lt;br /&gt;
             -- erase the child, since it has been handled&lt;br /&gt;
             table.remove(cfg, i)&lt;br /&gt;
             break&lt;br /&gt;
         end&lt;br /&gt;
     end&lt;br /&gt;
     -- call the previous hook, in case there are still some containers in the savefile&lt;br /&gt;
     old_on_load(cfg)&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 local old_on_save = wesnoth.game_events.on_save&lt;br /&gt;
 function wesnoth.game_events.on_save()&lt;br /&gt;
     -- call the previous hook, in case it had some containers to store&lt;br /&gt;
     local cfg = old_on_save()&lt;br /&gt;
     -- add our own container to them&lt;br /&gt;
     table.insert(cfg, { &amp;quot;my_data&amp;quot;, { value = level_local_data } })&lt;br /&gt;
     -- tell the engine to store them in the savefile&lt;br /&gt;
     return cfg&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
Note: since the ''on_load'' hook is called very early in the scenario, it cannot be set inside a [lua] tag in an [event], not even a ''preload'' one. It has to be set inside a [lua] tag outside or at [scenario] level.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: Some tag names are reserved for engine use and should not be modified using the above on_save/on_load method. These tag names are:&lt;br /&gt;
 &amp;quot;color_palette&amp;quot;, &amp;quot;color_range&amp;quot;, &amp;quot;era&amp;quot;, &amp;quot;event&amp;quot;, &amp;quot;generator&amp;quot;,&lt;br /&gt;
 &amp;quot;label&amp;quot;, &amp;quot;lua&amp;quot;, &amp;quot;menu_item&amp;quot;, &amp;quot;music&amp;quot;, &amp;quot;side&amp;quot;, &amp;quot;sound_source&amp;quot;, &amp;quot;story&amp;quot;,&lt;br /&gt;
 &amp;quot;terrain_graphics&amp;quot;, &amp;quot;time&amp;quot;, &amp;quot;time_area&amp;quot;, &amp;quot;tunnel&amp;quot;, &amp;quot;variables&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note: a on_event handler will not prevent undoing of that event, so usually you need to add an event to diallow undo to prevent OOS. You can add an event handler for that event inside a on_event callback. A possible way to define a disallow_undo function is:&lt;br /&gt;
 function disallow_undo()&lt;br /&gt;
 	wesnoth.wml_actions.event { name = wesnoth.current.event_context.name }&lt;br /&gt;
 end&lt;br /&gt;
Which should then be called from every on_event callback which changes the gamestate.&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|5}}:&lt;br /&gt;
The event names passed to ''on_event'' always use underscores instead of spaces&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.fire_event ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.fire_event(''event_name'', [''x1'', ''y1'', [''x2'', ''y2'']], [''first_weapon'', [''second_weapon'']])'''&lt;br /&gt;
&lt;br /&gt;
Fires all the WML events with the given name. Optional parameters allow passing two locations and two tables. These parameters will be matched against the [filter], [filter_second], [filter_attack], and [filter_second_attack] of any event handler, and are used to fill the WML variables &amp;quot;unit&amp;quot;, &amp;quot;second_unit&amp;quot;, &amp;quot;weapon&amp;quot;, and &amp;quot;second_weapon&amp;quot;. These parameters can also be read through ''current.event_context''. The function returns a boolean indicating whether the game state was modified.&lt;br /&gt;
&lt;br /&gt;
 wesnoth.fire_event(&amp;quot;explosion&amp;quot;, 17, 42, { damage = &amp;quot;fire&amp;quot; })&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.fire_event_by_name ====&lt;br /&gt;
{{DevFeature1.13|6}}&lt;br /&gt;
&lt;br /&gt;
* Preferred alias of [[#wesnoth.fire_event|wesnoth.fire_event]] to make it more distinguishable from the new function [[#wesnoth.fire_event_by_id|wesnoth.fire_event_by_id]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.fire_event_by_id ====&lt;br /&gt;
{{DevFeature1.13|6}}&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.fire_event(''event_id'', [''x1'', ''y1'', [''x2'', ''y2'']], [''first_weapon'', [''second_weapon'']])'''&lt;br /&gt;
&lt;br /&gt;
Fires a single WML event with the given id. Optional parameters allow passing two locations and two tables. These parameters will be matched against the [filter], [filter_second], [filter_attack], and [filter_second_attack] of the event handler, and are used to fill the WML variables &amp;quot;unit&amp;quot;, &amp;quot;second_unit&amp;quot;, &amp;quot;weapon&amp;quot;, and &amp;quot;second_weapon&amp;quot;. These parameters can also be read through ''current.event_context''. The function returns a boolean indicating whether the game state was modified.&lt;br /&gt;
&lt;br /&gt;
 wesnoth.fire_event_by_id(&amp;quot;explosion_1&amp;quot;, 17, 42, { damage = &amp;quot;fire&amp;quot; })&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.add_event_handler ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.add_event_handler(''cfg'')'''&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|0}}&lt;br /&gt;
&lt;br /&gt;
Registers a new event handler. This takes a WML table containing the same information normally used by the [[EventWML#The_.5Bevent.5D_Tag|[event]]] tag.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.remove_event_handler ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.remove_event_handler(''id'')'''&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|0}}&lt;br /&gt;
&lt;br /&gt;
Removes an event handler. This requires the event handler to have been assigned an [[EventWML#id|id]] at creation time.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.eval_conditional ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.eval_conditional(''conditional_tags'')'''&lt;br /&gt;
&lt;br /&gt;
Returns true if the conditional described by the WML table passes. Note: WML variables are substituted.&lt;br /&gt;
&lt;br /&gt;
 local result = wesnoth.eval_conditional {&lt;br /&gt;
   { &amp;quot;have_unit&amp;quot;, { id = &amp;quot;hero&amp;quot; } },&lt;br /&gt;
   { &amp;quot;variable&amp;quot;, { name = &amp;quot;counter&amp;quot;, numerical_equals = &amp;quot;$old_counter&amp;quot; } }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.tovconfig ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.tovconfig(''config'')'''&lt;br /&gt;
&lt;br /&gt;
Converts a WML table into a proxy object which performs variable substitution on the fly.&lt;br /&gt;
&lt;br /&gt;
 wesnoth.set_variable(&amp;quot;varname&amp;quot;, &amp;quot;to_be_deleted&amp;quot;)&lt;br /&gt;
 wesnoth.wml_actions.clear_variable { name = &amp;quot;to_be_deleted&amp;quot; }              -- correct&lt;br /&gt;
 wesnoth.wml_actions.clear_variable { name = &amp;quot;$varname&amp;quot; }                    -- error: try to delete a variable literally called &amp;quot;$varname&amp;quot;&lt;br /&gt;
 wesnoth.wml_actions.clear_variable(wesnoth.tovconfig { name = &amp;quot;$varname&amp;quot; }) -- correct: &amp;quot;$varname&amp;quot; is replaced by &amp;quot;to_be_deleted&amp;quot; at the right time&lt;br /&gt;
&lt;br /&gt;
==== helper.set_wml_action_metatable ====&lt;br /&gt;
&lt;br /&gt;
* '''helper.set_wml_action_metatable{}'''&lt;br /&gt;
&lt;br /&gt;
Sets the metatable of a table so that it can be used to fire WML actions. Returns the table. The fields of the table are then simple wrappers around a call to [[#wesnoth.fire]].&lt;br /&gt;
&lt;br /&gt;
 local W = helper.set_wml_action_metatable {}&lt;br /&gt;
 W.message { speaker = &amp;quot;narrator&amp;quot;, message = &amp;quot;?&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
==== helper.wml_error ====&lt;br /&gt;
&lt;br /&gt;
* '''helper.wml_error(''message'')'''&lt;br /&gt;
&lt;br /&gt;
Interrupts the current execution and displays a chat message that looks like a WML error.&lt;br /&gt;
&lt;br /&gt;
 local names = cfg.name or helper.wml_error(&amp;quot;[clear_variable] missing required name= attribute.&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==== helper.literal ====&lt;br /&gt;
&lt;br /&gt;
* '''helper.literal(''config'')'''&lt;br /&gt;
&lt;br /&gt;
Returns the ''__literal'' field of its argument if it is a userdata, the argument itself otherwise. This function is meant to be called when a WML action handler can be called indifferently from WML (hence receiving a userdata) or from Lua (hence possibly receiving a table).&lt;br /&gt;
&lt;br /&gt;
 function wml_actions.display_literal_value(cfg)&lt;br /&gt;
    cfg = helper.literal(cfg)&lt;br /&gt;
    wesnoth.message(tostring(cfg.value)) &lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
Note: when the argument is a plain table, the function returns it as is. In particular, modifying the fields of the returned table causes the original table to be modified too.&lt;br /&gt;
&lt;br /&gt;
==== helper.parsed ====&lt;br /&gt;
&lt;br /&gt;
* '''helper.parsed(''config'')'''&lt;br /&gt;
&lt;br /&gt;
Returns the ''__parsed'' field of its argument if it is a userdata, the argument itself otherwise. See also [[#helper.literal]].&lt;br /&gt;
&lt;br /&gt;
==== helper.shallow_literal ====&lt;br /&gt;
&lt;br /&gt;
* '''helper.shallow_literal(''config'')'''&lt;br /&gt;
&lt;br /&gt;
Returns the ''__shallow_literal'' field of its argument if it is a userdata, the argument itself otherwise. See also [[#helper.literal]].&lt;br /&gt;
&lt;br /&gt;
==== helper.shallow_parsed ====&lt;br /&gt;
&lt;br /&gt;
* '''helper.shallow_parsed(''config'')'''&lt;br /&gt;
&lt;br /&gt;
Returns the ''__shallow_parsed'' field of its argument if it is a userdata, the argument itself otherwise. See also [[#helper.literal]].&lt;br /&gt;
&lt;br /&gt;
[[Category: Lua Reference]]&lt;/div&gt;</summary>
		<author><name>Spixi</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=LuaWML&amp;diff=57873</id>
		<title>LuaWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=LuaWML&amp;diff=57873"/>
		<updated>2016-08-12T22:39:07Z</updated>

		<summary type="html">&lt;p&gt;Spixi: /* Events and WML actions */ See PR#710&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
&lt;br /&gt;
== The '''[lua]''' tag ==&lt;br /&gt;
&lt;br /&gt;
This tag is a part of [[ActionWML]], thus can be used inside [event] and at other places where [[ActionWML]] can be used. It makes it possible to write actions with the [http://www.lua.org Lua 5.2] language.&lt;br /&gt;
&lt;br /&gt;
It is also possible to put this tag inside a [scenario] [[ScenarioWML]], those tags will be executed immideately when the lua engine loads which is even before the scenario preload event is fired.&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|0}}&lt;br /&gt;
[lua] is now also allowed in [era] and [modification] those [lua] tags are then copied into the [scenario]/[multiplayer] when it is played just like [event]s inside [era] or [modification]&lt;br /&gt;
&lt;br /&gt;
The tag supports only the '''code''' key, which is a string containing the Lua scripts. Since Lua makes usage of the quotes and the { and } symbols, it is certainly wise to enclose the script between stronger quotes, as they prevent the preprocessor from performing macro expansion and tokenization.&lt;br /&gt;
&lt;br /&gt;
 [lua]&lt;br /&gt;
     code = &amp;lt;&amp;lt; wesnoth.message &amp;quot;Hello World!&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 [/lua]&lt;br /&gt;
&lt;br /&gt;
The Lua kernel can also be accessed from the [[CommandMode|command mode]]:&lt;br /&gt;
&lt;br /&gt;
 :lua local u = wesnoth.get_units({ id = &amp;quot;Konrad&amp;quot; })[1]; u.moves = 5&lt;br /&gt;
&lt;br /&gt;
The '''[args]''' sub-tag can be used to pass a WML object to the script via its variadic local variable &amp;quot;'''...'''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 [lua]&lt;br /&gt;
     code = &amp;lt;&amp;lt; local t = ...; wesnoth.message(tostring(t.text)) &amp;gt;&amp;gt;&lt;br /&gt;
     [args]&lt;br /&gt;
         text = _ &amp;quot;Hello world!&amp;quot;&lt;br /&gt;
     [/args]&lt;br /&gt;
 [/lua]&lt;br /&gt;
&lt;br /&gt;
== Global environment ==&lt;br /&gt;
&lt;br /&gt;
All the Lua scripts of a scenario share the same global environment (aka Lua state). For instance, a function defined in an event can be used in all the events that happen after it.&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name = preload&lt;br /&gt;
     first_time_only = no&lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt;&lt;br /&gt;
             function narrator(t)&lt;br /&gt;
                 -- Behave like the [message] tag.&lt;br /&gt;
                 wesnoth.fire(&amp;quot;message&amp;quot;,&lt;br /&gt;
                   { speaker = &amp;quot;narrator&amp;quot;, message = t.sentence })&lt;br /&gt;
             end&lt;br /&gt;
         &amp;gt;&amp;gt;&lt;br /&gt;
     [/lua]&lt;br /&gt;
 [/event]&lt;br /&gt;
 &lt;br /&gt;
 [event]&lt;br /&gt;
     name = turn 1&lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt; narrator(...) &amp;gt;&amp;gt;&lt;br /&gt;
         [args]&lt;br /&gt;
             sentence = _ &amp;quot;Hello world!&amp;quot;&lt;br /&gt;
         [/args]&lt;br /&gt;
     [/lua]&lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt; narrator(...) &amp;gt;&amp;gt;&lt;br /&gt;
         [args]&lt;br /&gt;
             sentence = _ &amp;quot;How are you today?&amp;quot;&lt;br /&gt;
         [/args]&lt;br /&gt;
     [/lua]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
In the example above, the redundant structure could be hidden behind macros. But it may be better to simply define a new WML tag.&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name = preload&lt;br /&gt;
     first_time_only = no&lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt;&lt;br /&gt;
             -- The function is now placed in the wesnoth.wml_actions table&lt;br /&gt;
             -- The tag is [narrator], same as the function name&lt;br /&gt;
             function wesnoth.wml_actions.narrator(t)&lt;br /&gt;
                 -- Behave like the [message] tag.&lt;br /&gt;
                 wesnoth.fire(&amp;quot;message&amp;quot;,&lt;br /&gt;
                   { speaker = &amp;quot;narrator&amp;quot;, message = t.sentence })&lt;br /&gt;
             end&lt;br /&gt;
         &amp;gt;&amp;gt;&lt;br /&gt;
     [/lua]&lt;br /&gt;
 [/event]&lt;br /&gt;
 &lt;br /&gt;
 [event]&lt;br /&gt;
     name = turn 1&lt;br /&gt;
     [narrator]&lt;br /&gt;
         sentence = _ &amp;quot;Hello world!&amp;quot;&lt;br /&gt;
     [/narrator]&lt;br /&gt;
     [narrator]&lt;br /&gt;
         sentence = _ &amp;quot;How are you today?&amp;quot;&lt;br /&gt;
     [/narrator]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
The global environment is not preserved over save/load cycles. Therefore, storing values in the global environment is generally a bad idea (unless it has been redirected to WML variables, see [[LuaWML:Variables#set_wml_var_metatable|helper.set_wml_var_metatable]]). The only time assigning global variables (including function definitions) makes sense is during a [[EventWML#Predefined 'name' Key Values|preload]] event, as this event is always run. Therefore, helper functions defined at that time will be available to all the later scripts.&lt;br /&gt;
&lt;br /&gt;
The global environment initially contains the following modules: [http://www.lua.org/manual/5.1/manual.html#5.1 basic] (no name), [http://www.lua.org/manual/5.1/manual.html#5.4 string], [http://www.lua.org/manual/5.1/manual.html#5.5 table], and [http://www.lua.org/manual/5.1/manual.html#5.6 math]. {{DevFeature1.13|0}} The [http://www.lua.org/manual/5.2/manual.html#6.7 bit32] library is supported as well. A '''wesnoth''' module is also available, it provides access to the [[#Interface to the C++ engine|C++ engine]]. Additionally, the functions clock, date, time and difftime from the [http://www.lua.org/manual/5.1/manual.html#5.8 os] library (keep in mind that they aren't multiplayer- and replay-safe), as well as traceback from the [http://www.lua.org/manual/5.1/manual.html#5.9 debug] library are also available.&lt;br /&gt;
&lt;br /&gt;
At the start of a script, the variadic local variable '''...''' (three dots) is a proxy table representing [[#Encoding WML objects into Lua tables|WML data]]. This table is the content of the '''[args]''' sub-tag of the '''[lua]''' tag, if any.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
The following WML event is taken from Wesnoth' tutorial. It will serve as an example to present how Lua scripts are embedded into Wesnoth. The event is fired whenever a unit from side 1 (that is, the hero controlled by the user) moves to a tile that is not the one set in the WML variable ''target_hex''.&lt;br /&gt;
&lt;br /&gt;
 # General catch for them moving to the wrong place.&lt;br /&gt;
 [event]&lt;br /&gt;
     name=moveto&lt;br /&gt;
     first_time_only=no&lt;br /&gt;
     [allow_undo][/allow_undo]&lt;br /&gt;
     [filter]&lt;br /&gt;
         side=1&lt;br /&gt;
     [/filter]&lt;br /&gt;
 &lt;br /&gt;
     [if]&lt;br /&gt;
         [variable]&lt;br /&gt;
             name=target_hex.is_set&lt;br /&gt;
             equals=yes&lt;br /&gt;
         [/variable]&lt;br /&gt;
         [then]&lt;br /&gt;
             [if]&lt;br /&gt;
                 [variable]&lt;br /&gt;
                     name=x1&lt;br /&gt;
                     equals=$target_hex.x&lt;br /&gt;
                 [/variable]&lt;br /&gt;
                 [variable]&lt;br /&gt;
                     name=y1&lt;br /&gt;
                     equals=$target_hex.y&lt;br /&gt;
                 [/variable]&lt;br /&gt;
                 [then]&lt;br /&gt;
                 [/then]&lt;br /&gt;
                 [else]&lt;br /&gt;
                     [redraw][/redraw]&lt;br /&gt;
                     [message]&lt;br /&gt;
                         speaker=narrator&lt;br /&gt;
                         message=_ &amp;quot;*Oops!&lt;br /&gt;
 You moved to the wrong place! After this message, you can press 'u' to undo, then try again.&amp;quot; +&lt;br /&gt;
                         _ &amp;quot;&lt;br /&gt;
 *Left click or press spacebar to continue...&amp;quot;&lt;br /&gt;
                     [/message]&lt;br /&gt;
                 [/else]&lt;br /&gt;
             [/if]&lt;br /&gt;
         [/then]&lt;br /&gt;
     [/if]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
A Lua script that performs the same action is presented below.&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=moveto&lt;br /&gt;
     first_time_only=no&lt;br /&gt;
     [allow_undo][/allow_undo]&lt;br /&gt;
     [filter]&lt;br /&gt;
         side=1&lt;br /&gt;
     [/filter]&lt;br /&gt;
 &lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt;&lt;br /&gt;
             local event_data = wesnoth.current.event_context&lt;br /&gt;
             if V.target_hex.is_set and&lt;br /&gt;
                (event_data.x1 ~= V.target_hex.x or event_data.y1 ~= V.target_hex.y)&lt;br /&gt;
             then&lt;br /&gt;
                 W.redraw()&lt;br /&gt;
                 narrator_says(_ &amp;quot;*Oops!\nYou moved to the wrong place! After this message, you can press 'u' to undo, then try again.&amp;quot;)&lt;br /&gt;
             end&lt;br /&gt;
         &amp;gt;&amp;gt;&lt;br /&gt;
     [/lua]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
Here is a more detailed explanation of the Lua code. Its first line&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang='lua'&amp;gt;&lt;br /&gt;
local event_data = wesnoth.current.event_context&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
puts the event data into the ''event_data'' local variable. Since it is a ''moveto'' event, the ''event_data'' table contains the destination of the unit in the ''x1'' and ''y1'' fields.&lt;br /&gt;
&lt;br /&gt;
The next two lines then test&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang='lua'&amp;gt;&lt;br /&gt;
if V.target_hex.is_set and&lt;br /&gt;
    (event_data.x1 ~= V.target_hex.x or event_data.y1 ~= V.target_hex.y)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
whether the variable ''V.target_hex'' matches the event parameters. Since ''V'' is not a local variable, it is taken from the global environment. Usually, variables from the global environment are not persistent (they get lost on reloading), so it shouldn't be used to store data. In order to have an easy way to access the usual persistent Wml variables, the global variable ''V''  was mapped to the storage of WML variables by the following ''preload'' event.&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=preload&lt;br /&gt;
     first_time_only=no&lt;br /&gt;
     [lua]&lt;br /&gt;
         code = &amp;lt;&amp;lt;&lt;br /&gt;
             H = wesnoth.require &amp;quot;lua/helper.lua&amp;quot;&lt;br /&gt;
             -- skipping some other initializations&lt;br /&gt;
             -- ...&lt;br /&gt;
             V = H.set_wml_var_metatable {}&lt;br /&gt;
         &amp;gt;&amp;gt;&lt;br /&gt;
     [/lua]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
Without a prelude redirecting ''V'', the conditional would have been written&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang='lua'&amp;gt;&lt;br /&gt;
if wesnoth.get_variable(&amp;quot;target_hex.is_set&amp;quot;) and&lt;br /&gt;
    (event_data.x1 ~= wesnoth.get_variable(&amp;quot;target_hex.x&amp;quot;) or event_data.y1 ~= wesnoth.get_variable(&amp;quot;target_hex.y&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The body of the conditional then performs the [[InterfaceActionsWML#Other interface tags|[redraw]]] action.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang='lua'&amp;gt;&lt;br /&gt;
W.redraw()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Again, this short syntax is made possible by a line of the prelude that makes ''W'' a proxy for performing WML actions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang='lua'&amp;gt;&lt;br /&gt;
W = H.set_wml_action_metatable {}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Without this shortcut, the first statement would have been written&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang='lua'&amp;gt;&lt;br /&gt;
wesnoth.fire(&amp;quot;redraw&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally the script displays a message by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang='lua'&amp;gt;&lt;br /&gt;
narrator_says(_ &amp;quot;*Oops!\nYou moved to the wrong place! After this message, you can press 'u' to undo, then try again.&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ''narrator_says'' function is defined in the prelude too, since the construct behind it occurs several times in the tutorial. In plain WML, macros would have been used instead. The definition of the function is&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang='lua'&amp;gt;&lt;br /&gt;
function narrator_says(m)&lt;br /&gt;
    W.message { speaker=&amp;quot;narrator&amp;quot;,&lt;br /&gt;
                message = m .. _ &amp;quot;\n*Left click or press spacebar to continue...&amp;quot; }&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The function fires a [[InterfaceActionsWML#.5Bmessage.5D|[message]]] action and passes a WML object containing the usual two fields to it. The second field is initialized by concatenating the function argument with another string. Both strings are prefixed by the ''_'' symbol to mark them as translatable. (Note that ''_'' is just a unary function, not a keyword.) Again, this is made possible by a specific line of the prelude:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang='lua'&amp;gt;&lt;br /&gt;
_ = wesnoth.textdomain &amp;quot;wesnoth-tutorial&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A longer translation of the tutorial is available at [https://gna.org/patch/download.php?file_id=5483].&lt;br /&gt;
&lt;br /&gt;
== Interface to the engine and helper functions ==&lt;br /&gt;
&lt;br /&gt;
Functionalities of the game engine are available through the functions contained in the '''wesnoth''' global table. Some of these functions return proxy tables. Writes to fields marked &amp;quot;read-only&amp;quot; are ignored. The '''__cfg''' fields return plain tables; in particular, writes do not modify the original object, and reads return the values from the time the dump was performed.&lt;br /&gt;
&lt;br /&gt;
Some helper functions are provided by the '''lua/helper.lua''' library. They are stored inside a table that is returned when loading the library with [[LuaWML:Files#wesnoth.require|wesnoth.require]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang='lua'&amp;gt;&lt;br /&gt;
helper = wesnoth.require &amp;quot;lua/helper.lua&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== WML variables ===&lt;br /&gt;
&lt;br /&gt;
* [[LuaWML:Variables#wesnoth.get_variable|wesnoth.get_variable]]&lt;br /&gt;
* [[LuaWML:Variables#wesnoth.set_variable|wesnoth.set_variable]]&lt;br /&gt;
* [[LuaWML:Variables#wesnoth.get_all_vars|wesnoth.get_all_vars]] {{DevFeature1.13|0}}&lt;br /&gt;
* [[LuaWML:Variables#helper.set_wml_var_metatable|helper.set_wml_var_metatable]]&lt;br /&gt;
* [[LuaWML:Variables#helper.get_child|helper.get_child]]&lt;br /&gt;
* [[LuaWML:Variables#helper.get_nth_child|helper.get_nth_child]] {{DevFeature1.13|2}}&lt;br /&gt;
* [[LuaWML:Variables#helper.child_count|helper.child_count]] {{DevFeature1.13|2}}&lt;br /&gt;
* [[LuaWML:Variables#helper.child_range|helper.child_range]]&lt;br /&gt;
* [[LuaWML:Variables#helper.child_array|helper.child_array]] {{DevFeature1.13|2}}&lt;br /&gt;
* [[LuaWML:Variables#helper.get_variable_array|helper.get_variable_array]]&lt;br /&gt;
* [[LuaWML:Variables#helper.get_variable_proxy_array|helper.get_variable_proxy_array]]&lt;br /&gt;
* [[LuaWML:Variables#helper.set_variable_array|helper.set_variable_array]]&lt;br /&gt;
&lt;br /&gt;
=== Events and WML actions ===&lt;br /&gt;
&lt;br /&gt;
* [[LuaWML:Events#wesnoth.fire|wesnoth.fire]]&lt;br /&gt;
* [[LuaWML:Events#wesnoth.wml_actions|wesnoth.wml_actions]]&lt;br /&gt;
* [[LuaWML:Events#wesnoth.wml_actions|wesnoth.wml_conditionals]] {{DevFeature1.13|0}}&lt;br /&gt;
* [[LuaWML:Events#wesnoth.game_events|wesnoth.game_events]]&lt;br /&gt;
* [[LuaWML:Events#wesnoth.fire_event|wesnoth.fire_event]]&lt;br /&gt;
* [[LuaWML:Events#wesnoth.fire_event_by_name|wesnoth.fire_event_by_name]] {{DevFeature1.13|6}}&lt;br /&gt;
* [[LuaWML:Events#wesnoth.fire_event_by_id|wesnoth.fire_event_by_id]] {{DevFeature1.13|6}}&lt;br /&gt;
* [[LuaWML:Events#wesnoth.add_event_handler|wesnoth.add_event_handler]] {{DevFeature1.13|0}}&lt;br /&gt;
* [[LuaWML:Events#wesnoth.remove_event_handler|wesnoth.remove_event_handler]] {{DevFeature1.13|0}}&lt;br /&gt;
* [[LuaWML:Events#wesnoth.eval_conditional|wesnoth.eval_conditional]]&lt;br /&gt;
* [[LuaWML:Events#wesnoth.tovconfig|wesnoth.tovconfig]]&lt;br /&gt;
* [[LuaWML:Events#helper.set_wml_action_metatable|helper.set_wml_action_metatable]]&lt;br /&gt;
* [[LuaWML:Events#helper.wml_error|helper.wml_error]]&lt;br /&gt;
* [[LuaWML:Events#helper.literal|helper.literal]]&lt;br /&gt;
* [[LuaWML:Events#helper.parsed|helper.parsed]]&lt;br /&gt;
* [[LuaWML:Events#helper.shallow_literal|helper.shallow_literal]]&lt;br /&gt;
* [[LuaWML:Events#helper.shallow_parsed|helper.shallow_parsed]]&lt;br /&gt;
&lt;br /&gt;
=== User interface ===&lt;br /&gt;
&lt;br /&gt;
* [[LuaWML:Display#wesnoth.message|wesnoth.message]]&lt;br /&gt;
* [[LuaWML:Display#wesnoth.clear_messages|wesnoth.clear_messages]]&lt;br /&gt;
* [[LuaWML:Display#wesnoth.textdomain|wesnoth.textdomain]]&lt;br /&gt;
* [[LuaWML:Display#wesnoth.delay|wesnoth.delay]]&lt;br /&gt;
* [[LuaWML:Display#wesnoth.float_label|wesnoth.float_label]]&lt;br /&gt;
* [[LuaWML:Display#wesnoth.select_unit|wesnoth.select_hex]]&lt;br /&gt;
* [[LuaWML:Display#wesnoth.select_unit|wesnoth.select_unit]]&lt;br /&gt;
* [[LuaWML:Display#wesnoth.highlight_hex|wesnoth.highlight_hex]]&lt;br /&gt;
* [[LuaWML:Display#wesnoth.deselect_hex|wesnoth.deselect_hex]] {{DevFeature1.13|2}}&lt;br /&gt;
* [[LuaWML:Display#wesnoth.scroll_to_tile|wesnoth.scroll_to_tile]]&lt;br /&gt;
* [[LuaWML:Display#wesnoth.lock_view|wesnoth.lock_view]]&lt;br /&gt;
* [[LuaWML:Display#wesnoth.view_locked|wesnoth.view_locked]]&lt;br /&gt;
* [[LuaWML:Display#wesnoth.play_sound|wesnoth.play_sound]]&lt;br /&gt;
* [[LuaWML:Display#wesnoth.set_music|wesnoth.set_music]]&lt;br /&gt;
* [[LuaWML:Display#wesnoth.show_message_dialog|wesnoth.show_message_dialog]] {{DevFeature1.13|2}}&lt;br /&gt;
* [[LuaWML:Display#wesnoth.show_popup_dialog|wesnoth.show_popup_dialog]] {{DevFeature1.13|2}}&lt;br /&gt;
* [[LuaWML:Display#wesnoth.show_dialog|wesnoth.show_dialog]]&lt;br /&gt;
* [[LuaWML:Display#wesnoth.set_dialog_value|wesnoth.set_dialog_value]]&lt;br /&gt;
* [[LuaWML:Display#wesnoth.get_dialog_value|wesnoth.get_dialog_value]]&lt;br /&gt;
* [[LuaWML:Display#wesnoth.set_dialog_active|wesnoth.set_dialog_active]]&lt;br /&gt;
* [[LuaWML:Display#wesnoth.set_dialog_callback|wesnoth.set_dialog_callback]]&lt;br /&gt;
* [[LuaWML:Display#wesnoth.set_dialog_markup|wesnoth.set_dialog_markup]]&lt;br /&gt;
* [[LuaWML:Display#wesnoth.set_dialog_focus|wesnoth.set_dialog_focus]] {{DevFeature1.13|2}}&lt;br /&gt;
* [[LuaWML:Display#wesnoth.set_dialog_visible|wesnoth.set_dialog_visible]] {{DevFeature1.13|2}}&lt;br /&gt;
* [[LuaWML:Display#wesnoth.set_dialog_canvas|wesnoth.set_dialog_canvas]]&lt;br /&gt;
* [[LuaWML:Display#wesnoth.add_dialog_tree_node|wesnoth.add_dialog_tree_node]] {{DevFeature1.13|0}}&lt;br /&gt;
* [[LuaWML:Display#wesnoth.remove_dialog_item|wesnoth.remove_dialog_item]] {{DevFeature1.13|1}}&lt;br /&gt;
* [[LuaWML:Display#wesnoth.get_displayed_unit|wesnoth.get_displayed_unit]]&lt;br /&gt;
* [[LuaWML:Display#wesnoth.theme_items|wesnoth.theme_items]]&lt;br /&gt;
* [[LuaWML:Display#helper.get_user_choice|helper.get_user_choice]]&lt;br /&gt;
* [[LuaWML:Display#wesnoth.is_skipping_messages|wesnoth.is_skipping_messages]] {{DevFeature1.13|2}}&lt;br /&gt;
* [[LuaWML:Display#wesnoth.skip_messages|wesnoth.skip_messages]] {{DevFeature1.13|2}}&lt;br /&gt;
* [[LuaWML:Display#wesnoth.log|wesnoth.log]] {{DevFeature1.13|5}}&lt;br /&gt;
&lt;br /&gt;
=== Map and terrains ===&lt;br /&gt;
&lt;br /&gt;
* [[LuaWML:Tiles#wesnoth.get_map_size|wesnoth.get_map_size]]&lt;br /&gt;
* [[LuaWML:Tiles#wesnoth.get_terrain|wesnoth.get_terrain]]&lt;br /&gt;
* [[LuaWML:Tiles#wesnoth.set_terrain|wesnoth.set_terrain]]&lt;br /&gt;
* [[LuaWML:Tiles#wesnoth.get_terrain_info|wesnoth.get_terrain_info]]&lt;br /&gt;
* [[LuaWML:Tiles#wesnoth.get_selected_tile|wesnoth.get_selected_tile]]&lt;br /&gt;
* [[LuaWML:Tiles#wesnoth.get_locations|wesnoth.get_locations]]&lt;br /&gt;
* [[LuaWML:Tiles#wesnoth.get_villages|wesnoth.get_villages]]&lt;br /&gt;
* [[LuaWML:Tiles#wesnoth.match_location|wesnoth.match_location]]&lt;br /&gt;
* [[LuaWML:Tiles#wesnoth.add_tile_overlay|wesnoth.add_tile_overlay]]&lt;br /&gt;
* [[LuaWML:Tiles#wesnoth.remove_tile_overlay|wesnoth.remove_tile_overlay]]&lt;br /&gt;
* [[LuaWML:Tiles#wesnoth.add_fog|wesnoth.add_fog]] {{DevFeature1.13|5}}&lt;br /&gt;
* [[LuaWML:Tiles#wesnoth.remove_fog|wesnoth.remove_fog]] {{DevFeature1.13|5}}&lt;br /&gt;
* [[LuaWML:Tiles#wesnoth.add_sound_source|wesnoth.add_sound_source]] {{DevFeature1.13|5}}&lt;br /&gt;
* [[LuaWML:Tiles#wesnoth.remove_sound_source|wesnoth.remove_sound_source]] {{DevFeature1.13|5}}&lt;br /&gt;
* [[LuaWML:Tiles#wesnoth.get_sound_source|wesnoth.get_sound_source]] {{DevFeature1.13|5}}&lt;br /&gt;
* [[LuaWML:Tiles#items.place_image|items.place_image]]&lt;br /&gt;
* [[LuaWML:Tiles#items.place_halo|items.place_halo]]&lt;br /&gt;
* [[LuaWML:Tiles#items.remove|items.remove]]&lt;br /&gt;
&lt;br /&gt;
=== Time of day schedule ===&lt;br /&gt;
&lt;br /&gt;
* [[LuaWML:Time#wesnoth.get_time_of_day|wesnoth.get_time_of_day]]&lt;br /&gt;
* [[LuaWML:Time#wesnoth.add_time_area|wesnoth.add_time_area]] {{DevFeature1.13|0}}&lt;br /&gt;
* [[LuaWML:Time#wesnoth.remove_time_area|wesnoth.remove_time_area]] {{DevFeature1.13|0}}&lt;br /&gt;
&lt;br /&gt;
=== Units ===&lt;br /&gt;
&lt;br /&gt;
* [[LuaWML:Units#wesnoth.get_units|wesnoth.get_units]]&lt;br /&gt;
* [[LuaWML:Units#wesnoth.get_unit|wesnoth.get_unit]]&lt;br /&gt;
* [[LuaWML:Units#wesnoth.match_unit|wesnoth.match_unit]]&lt;br /&gt;
* [[LuaWML:Units#wesnoth.put_unit|wesnoth.put_unit]]&lt;br /&gt;
* [[LuaWML:Units#wesnoth.erase_unit|wesnoth.erase_unit]] {{DevFeature1.13|2}}&lt;br /&gt;
* [[LuaWML:Units#wesnoth.get_recall_units|wesnoth.get_recall_units]]&lt;br /&gt;
* [[LuaWML:Units#wesnoth.put_recall_unit|wesnoth.put_recall_unit]]&lt;br /&gt;
* [[LuaWML:Units#wesnoth.create_unit|wesnoth.create_unit]]&lt;br /&gt;
* [[LuaWML:Units#wesnoth.copy_unit|wesnoth.copy_unit]]&lt;br /&gt;
* [[LuaWML:Units#wesnoth.extract_unit|wesnoth.extract_unit]]&lt;br /&gt;
* [[LuaWML:Units#wesnoth.add_modification|wesnoth.add_modification]]&lt;br /&gt;
* [[LuaWML:Units#wesnoth.unit_resistance|wesnoth.unit_resistance]]&lt;br /&gt;
* [[LuaWML:Units#wesnoth.unit_defense|wesnoth.unit_defense]]&lt;br /&gt;
* [[LuaWML:Units#wesnoth.unit_movement_cost|wesnoth.unit_movement_cost]]&lt;br /&gt;
* [[LuaWML:Units#wesnoth.unit_vision_cost|wesnoth.unit_vision_cost]]&lt;br /&gt;
* [[LuaWML:Units#wesnoth.unit_jamming_cost|wesnoth.unit_jamming_cost]]&lt;br /&gt;
* [[LuaWML:Units#wesnoth.unit_ability|wesnoth.unit_ability]]&lt;br /&gt;
* [[LuaWML:Units#wesnoth.unit_types|wesnoth.unit_types]]&lt;br /&gt;
* [[LuaWML:Units#wesnoth.races|wesnoth.races]]&lt;br /&gt;
* [[LuaWML:Units#wesnoth.get_traits|wesnoth.get_traits]]&lt;br /&gt;
* [[LuaWML:Units#wesnoth.simulate_combat|wesnoth.simulate_combat]]&lt;br /&gt;
* [[LuaWML:Units#wesnoth.transform_unit|wesnoth.transform_unit]]&lt;br /&gt;
* [[LuaWML:Units#wesnoth.effects|wesnoth.effects]] {{DevFeature1.13|2}}&lt;br /&gt;
&lt;br /&gt;
=== Sides ===&lt;br /&gt;
&lt;br /&gt;
* [[LuaWML:Sides#wesnoth.sides|wesnoth.sides]]&lt;br /&gt;
* [[LuaWML:Sides#wesnoth.get_sides|wesnoth.get_sides]]&lt;br /&gt;
* [[LuaWML:Sides#wesnoth.get_village_owner|wesnoth.get_village_owner]]&lt;br /&gt;
* [[LuaWML:Sides#wesnoth.set_village_owner|wesnoth.set_village_owner]]&lt;br /&gt;
* [[LuaWML:Sides#wesnoth.is_enemy|wesnoth.is_enemy]]&lt;br /&gt;
* [[LuaWML:Sides#wesnoth.match_side|wesnoth.match_side]]&lt;br /&gt;
* [[LuaWML:Sides#wesnoth.get_starting_location|wesnoth.get_starting_location]]&lt;br /&gt;
* [[LuaWML:Sides#helper.all_teams|helper.all_teams]]&lt;br /&gt;
&lt;br /&gt;
=== Pathfinder ===&lt;br /&gt;
&lt;br /&gt;
* [[LuaWML:Pathfinder#wesnoth.find_path|wesnoth.find_path]]&lt;br /&gt;
* [[LuaWML:Pathfinder#wesnoth.find_vacant_tile|wesnoth.find_vacant_tile]]&lt;br /&gt;
* [[LuaWML:Pathfinder#wesnoth.find_reach|wesnoth.find_reach]]&lt;br /&gt;
* [[LuaWML:Pathfinder#wesnoth.find_cost_map|wesnoth.find_cost_map]]&lt;br /&gt;
* [[LuaWML:Pathfinder#helper.distance_between|helper.distance_between]]&lt;br /&gt;
* [[LuaWML:Pathfinder#helper.adjacent_tiles|helper.adjacent_tiles]]&lt;br /&gt;
&lt;br /&gt;
=== Lua files ===&lt;br /&gt;
&lt;br /&gt;
* [[LuaWML:Files#wesnoth.dofile|wesnoth.dofile]]&lt;br /&gt;
* [[LuaWML:Files#wesnoth.require|wesnoth.require]]&lt;br /&gt;
* [[LuaWML:Files#wesnoth.read_file|wesnoth.read_file]] {{DevFeature1.13|5}}&lt;br /&gt;
&lt;br /&gt;
=== Location sets ===&lt;br /&gt;
&lt;br /&gt;
* [[LuaWML:Location_set#location_set.create|location_set.create]]&lt;br /&gt;
* [[LuaWML:Location_set#location_set.of_pairs|location_set.of_pairs]]&lt;br /&gt;
* [[LuaWML:Location_set#location_set.of_wml_var|location_set.of_wml_var]]&lt;br /&gt;
* [[LuaWML:Location_set#location_set:empty|location_set:empty]]&lt;br /&gt;
* [[LuaWML:Location_set#location_set:size|location_set:size]]&lt;br /&gt;
* [[LuaWML:Location_set#location_set:clear|location_set:clear]]&lt;br /&gt;
* [[LuaWML:Location_set#location_set:get|location_set:get]]&lt;br /&gt;
* [[LuaWML:Location_set#location_set:insert|location_set:insert]]&lt;br /&gt;
* [[LuaWML:Location_set#location_set:remove|location_set:remove]]&lt;br /&gt;
* [[LuaWML:Location_set#location_set:of_pairs|location_set:of_pairs]]&lt;br /&gt;
* [[LuaWML:Location_set#location_set:of_wml_var|location_set:of_wml_var]]&lt;br /&gt;
* [[LuaWML:Location_set#location_set:to_pairs|location_set:to_pairs]]&lt;br /&gt;
* [[LuaWML:Location_set#location_set:to_stable_pairs|location_set:to_stable_pairs]]&lt;br /&gt;
* [[LuaWML:Location_set#location_set:to_wml_var|location_set:to_wml_var]]&lt;br /&gt;
* [[LuaWML:Location_set#location_set:union|location_set:union]]&lt;br /&gt;
* [[LuaWML:Location_set#location_set:inter|location_set:inter]]&lt;br /&gt;
* [[LuaWML:Location_set#location_set:iter|location_set:iter]]&lt;br /&gt;
* [[LuaWML:Location_set#location_set:stable_iter|location_set:stable_iter]]&lt;br /&gt;
* [[LuaWML:Location_set#location_set:filter|location_set:filter]]&lt;br /&gt;
* [[LuaWML:Location_set#location_set:union_merge|location_set:union_merge]]&lt;br /&gt;
* [[LuaWML:Location_set#location_set:inter_merge|location_set:inter_merge]]&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous ===&lt;br /&gt;
&lt;br /&gt;
* [[LuaWML:Misc#wesnoth.game_config|wesnoth.game_config]]&lt;br /&gt;
* [[LuaWML:Misc#wesnoth.get_era|wesnoth.get_era]]&lt;br /&gt;
* [[LuaWML:Misc#wesnoth.current|wesnoth.current]]&lt;br /&gt;
* [[LuaWML:Misc#wesnoth.synchronize_choice|wesnoth.synchronize_choice]]&lt;br /&gt;
* [[LuaWML:Misc#wesnoth.get_image_size|wesnoth.get_image_size]]&lt;br /&gt;
* [[LuaWML:Misc#wesnoth.compare_versions|wesnoth.compare_versions]]&lt;br /&gt;
* [[LuaWML:Misc#wesnoth.have_file|wesnoth.have_file]]&lt;br /&gt;
* [[LuaWML:Misc#wesnoth.debug|wesnoth.debug]]&lt;br /&gt;
* [[LuaWML:Misc#wesnoth.get_time_stamp|wesnoth.get_time_stamp]]&lt;br /&gt;
* [[LuaWML:Misc#wesnoth.random|wesnoth.random]]  {{DevFeature1.13|2}}&lt;br /&gt;
* [[LuaWML:Misc#wesnoth.eval_formula|wesnoth.eval_formula]] {{DevFeature1.13|5}}&lt;br /&gt;
* [[LuaWML:Misc#wesnoth.compile_formula|wesnoth.compile_formula]] {{DevFeature1.13|5}}&lt;br /&gt;
* [[LuaWML:Misc#wesnoth.name_generator|wesnoth.name_generator]] {{DevFeature1.13|5}}&lt;br /&gt;
* [[LuaWML:Misc#wesnoth.set_next_scenario|wesnoth.set_next_scenario]] {{DevFeature1.13|5}}&lt;br /&gt;
* [[LuaWML:Misc#helper.set_wml_tag_metatable|helper.set_wml_tag_metatable]]&lt;br /&gt;
* [[LuaWML:Misc#helper.modify_unit|helper.modify_unit]]&lt;br /&gt;
* [[LuaWML:Misc#helper.move_unit_fake|helper.move_unit_fake]]&lt;br /&gt;
* [[LuaWML:Misc#helper.rand|helper.rand]]&lt;br /&gt;
* [[LuaWML:Misc#helper.round|helper.round]]&lt;br /&gt;
* [[LuaWML:Misc#helper.shuffle|helper.shuffle]]&lt;br /&gt;
&lt;br /&gt;
== Encoding WML objects into Lua tables ==&lt;br /&gt;
&lt;br /&gt;
Function [[LuaWML:Events#wesnoth.fire|wesnoth.fire]] expects a table representing a WML object as its second argument (if needed). Function [[LuaWML:Variables#wesnoth.set_variable|wesnoth.set_variable]] allows to modify whole WML objects, again by passing it a table. Function [[LuaWML:Variables#wesnoth.get_variable|wesnoth.get_variable]] transforms a WML object into a table, if its second argument is not set to ''true''. All these tables have the same format.&lt;br /&gt;
&lt;br /&gt;
Scalar fields are transformed into WML attributes. For instance, the following Lua table&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang='lua'&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    a_bool = true,&lt;br /&gt;
    an_int = 42,&lt;br /&gt;
    a_float = 1.25,&lt;br /&gt;
    a_string = &amp;quot;scout&amp;quot;,&lt;br /&gt;
    a_translation = _ &amp;quot;Hello World!&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is equivalent to the content of the following WML object&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang='wml'&amp;gt;&lt;br /&gt;
[dummy]&lt;br /&gt;
    a_bool = &amp;quot;yes&amp;quot;&lt;br /&gt;
    an_int = &amp;quot;42&amp;quot;&lt;br /&gt;
    a_float = &amp;quot;1.25&amp;quot;&lt;br /&gt;
    a_string = &amp;quot;scout&amp;quot;&lt;br /&gt;
    a_translation = _ &amp;quot;Hello World!&amp;quot;&lt;br /&gt;
[/dummy]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WML child objects are not stored as Lua named fields, since several of them can have the same tag. Moreover, their tags can conflict with the attribute keys. So child objects are stored as pairs string + table in the unnamed fields in definition order. This means that for every subtag appearing in the wml code there is an additional table &amp;quot;layer&amp;quot; in the corresponding WML table of the form &amp;lt;code&amp;gt;{[1] = &amp;quot;tag_name&amp;quot;, [2] = {}}&amp;lt;/code&amp;gt; which is equivalent to &amp;lt;code&amp;gt;{&amp;quot;tag_name&amp;quot;, {}}&amp;lt;/code&amp;gt;. [1] etc are the unnamed fields (as opposed to wml attributes). The table under [2] in this subtable then holds the wml attributes from inside the wml subtag. So every subtag other than the toplevel tag corresponds to two nested tables each. For instance, the following Lua table&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang='lua'&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    foo = 42,&lt;br /&gt;
    { &amp;quot;bar&amp;quot;, { v = 1, w = 2 } },&lt;br /&gt;
    { &amp;quot;foo&amp;quot;, { x = false } },&lt;br /&gt;
    { &amp;quot;bar&amp;quot;, { y = &amp;quot;foo&amp;quot; } },&lt;br /&gt;
    { &amp;quot;foobar&amp;quot;, { z = 5, { &amp;quot;barfoo&amp;quot;, {} } } }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is equivalent to the content of the following WML object&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang='wml'&amp;gt;&lt;br /&gt;
[dummy]&lt;br /&gt;
    foo = 42&lt;br /&gt;
    [bar]&lt;br /&gt;
        v = 1&lt;br /&gt;
        w = 2&lt;br /&gt;
    [/bar]&lt;br /&gt;
    [foo]&lt;br /&gt;
        x = no&lt;br /&gt;
    [/foo]&lt;br /&gt;
    [bar]&lt;br /&gt;
        y = foo&lt;br /&gt;
    [bar]&lt;br /&gt;
    [foobar]&lt;br /&gt;
        z = 5&lt;br /&gt;
        [barfoo]&lt;br /&gt;
        [/barfoo]&lt;br /&gt;
    [/foobar]&lt;br /&gt;
[/dummy]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both tables above are also equivalent to this WML table, where all unnamed fields are displayed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang='lua'&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    foo = 42,&lt;br /&gt;
    [1] = { [1] = &amp;quot;bar&amp;quot;, [2] = { v = 1, w = 2 } },&lt;br /&gt;
    [2] = { [1] = &amp;quot;foo&amp;quot;, [2] = { x = false } },&lt;br /&gt;
    [3] = { [1] = &amp;quot;bar&amp;quot;, [2] = { y = &amp;quot;foo&amp;quot; } },&lt;br /&gt;
    [4] = { [1] = &amp;quot;foobar&amp;quot;, [2] = { z = 5, [1] = { [1] = &amp;quot;barfoo&amp;quot;, [2] = {} } } }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So assuming ''cfg'' contains the above WML object, the following accesses are possible:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=lua&amp;gt;&lt;br /&gt;
a_int = cfg.foo        -- &amp;quot;dummy.foo&amp;quot;, 42&lt;br /&gt;
a_string = cfg[3][2].y -- &amp;quot;dummy.bar[1].y&amp;quot;, &amp;quot;foo&amp;quot;&lt;br /&gt;
a_table = cfg[4][2]    -- &amp;quot;dummy.foobar&amp;quot;, { z = 5, { &amp;quot;barfoo&amp;quot;, {} } }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For creating valid wml table in lua it is usully easier to use ''T = helper.set_wml_tag_metatable {}'' asuming you did that you can create the above wml document with&lt;br /&gt;
&amp;lt;syntaxhighlight lang=lua&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    foo = 42,&lt;br /&gt;
    T.bar {&lt;br /&gt;
         v = 1,&lt;br /&gt;
         w = 1,&lt;br /&gt;
    },&lt;br /&gt;
    T.foo {&lt;br /&gt;
        x = false,&lt;br /&gt;
    },&lt;br /&gt;
    T.bar {&lt;br /&gt;
         y = &amp;quot;foo&amp;quot;,&lt;br /&gt;
    },&lt;br /&gt;
    T.foobar {&lt;br /&gt;
         z = 5,&lt;br /&gt;
         T.barfoo {&lt;br /&gt;
         },&lt;br /&gt;
    },&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Consider using the [[LuaWML:Variables#helper.get_child|helper.get_child]] and [[LuaWML:Variables#helper.child_range|helper.child_range]] to ease the access to subtags.&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|5}} As a convenience, attributes with array values (tables with only integer keys) are concatenated into a string when converting a Lua table into WML. For example, the following Lua code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=lua&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    x = {1, 2, 3, 4},&lt;br /&gt;
    y = {7, 8, 9, 10}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
produces the following WML table:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=wml&amp;gt;&lt;br /&gt;
[dummy]&lt;br /&gt;
    x=1,2,3,4&lt;br /&gt;
    y=7,8,9,10&lt;br /&gt;
[/dummy]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Functions registered in [[LuaWML:Events#wesnoth.wml_actions|wesnoth.wml_actions]] receive their data in a userdata object which has the exact same structure as above. It is read-only however. Accessing fields or children performs variable substitution on the fly. Its '''__parsed''' and '''__literal''' fields provide translations to plain tables (therefore writable). '''__literal''' returns the original text of the data (including dollar symbols in attributes and [insert_tag] children), while '''__parsed''' performs a variable substitution.&lt;br /&gt;
&lt;br /&gt;
For instance, if you cannot stand any longer the fact that '''first_time_only''' is set to yes by default for the '''[event]''' tag, you can redefine it. But we have to be careful not to cause variable substitution, since the engine would perform a second variable substitution afterwards.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=lua&amp;gt;&lt;br /&gt;
local old_event_handler = wesnoth.wml_actions.event&lt;br /&gt;
function wesnoth.wml_actions.event(cfg)&lt;br /&gt;
    -- Get the plain text from the user.&lt;br /&gt;
    local new_cfg = cfg.__literal&lt;br /&gt;
    -- The expression below is equivalent to cfg.__parsed.first_time_only,&lt;br /&gt;
    -- only faster. It is needed, since the first_time_only attribute may&lt;br /&gt;
    -- reference variables.&lt;br /&gt;
    local first = cfg.first_time_only&lt;br /&gt;
    -- Modify the default behavior of first_time_only.&lt;br /&gt;
    if first == nil then first = false end&lt;br /&gt;
    new_cfg.first_time_only = first&lt;br /&gt;
    -- Call the engine handler.&lt;br /&gt;
    old_event_handler(new_cfg)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Note: The above example will only affect nested events. Toplevel events will still default to ''first_time_only=yes''.)&lt;br /&gt;
&amp;lt;!-- This should probably be replaced with a better example. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, since the object is a userdata and not a table, '''pairs''' and '''ipairs''' are unfortunately not usable on it. So scripts have to work at a lower level. For instance, the following function returns the first sub-tag with a given name and it works both on WML tables and WML userdata:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=lua&amp;gt;&lt;br /&gt;
function get_child(cfg, name)&lt;br /&gt;
    for i = 1, #cfg do&lt;br /&gt;
        local v = cfg[i]&lt;br /&gt;
        if v[1] == name then return v[2] end&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|2}} '''pairs''' and '''ipairs''' now work on vconfig objects (contrary to the above statement). However, '''pairs''' works a little differently than on plain configs (tables) - it returns only string keys (attributes in WML terms) and not integer keys (tags in WML terms).&lt;br /&gt;
&lt;br /&gt;
Another approach for handling userdata and tables in the same way, would be to convert the former into the latter beforehand:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=lua&amp;gt;&lt;br /&gt;
if getmetatable(cfg) == &amp;quot;wml object&amp;quot; then cfg = cfg.__parsed end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The WML userdata provides two other special fields: '''__shallow_parsed''' and '''__shallow_literal'''. They return a table corresponding to the WML userdata with variable substitution performed on the attributes (or not). [insert_tag] tags have also been parsed, so the number of children is faithful. But contrarily to '''__parsed''' and '''__literal''', the process is not recursive: all the children are still WML userdata and variable substitution can still happen for them. These shallow translators are meant as optimized versions of the deep ones, when only the toplevel attributes need to be writable.&lt;br /&gt;
&lt;br /&gt;
== Skeleton of a preload event ==&lt;br /&gt;
&lt;br /&gt;
The following event is a skeleton for a prelude enabling Lua in your WML events. It creates a table ''H'' containing the functions from helper.lua and a table ''W'' that serves as a proxy for firing WML actions. It sets up a table ''T'' so be used for easier creation of valid WML tables. It also sets up a table ''V'' so that any access to it is redirected to the persistent WML storage. Finally, it loads a textdomain to be accessed through the ''_'' variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang='wml'&amp;gt;&lt;br /&gt;
[event]&lt;br /&gt;
    name=preload&lt;br /&gt;
    first_time_only=no&lt;br /&gt;
    [lua]&lt;br /&gt;
        code = &amp;lt;&amp;lt;&lt;br /&gt;
            H = wesnoth.require &amp;quot;lua/helper.lua&amp;quot;&lt;br /&gt;
            W = H.set_wml_action_metatable {}&lt;br /&gt;
            T = H.set_wml_tag_metatable {}&lt;br /&gt;
            V = H.set_wml_var_metatable {}&lt;br /&gt;
            _ = wesnoth.textdomain &amp;quot;my-campaign&amp;quot;&lt;br /&gt;
&lt;br /&gt;
            -- Define your global constants here.&lt;br /&gt;
            -- ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
            -- Define your global functions here.&lt;br /&gt;
            -- ...&lt;br /&gt;
        &amp;gt;&amp;gt;&lt;br /&gt;
    [/lua]&lt;br /&gt;
[/event]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It may be worth putting the whole Lua script above inside a separate file and having the ''preload'' event load it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang='wml'&amp;gt;&lt;br /&gt;
[event]&lt;br /&gt;
    name=preload&lt;br /&gt;
    first_time_only=no&lt;br /&gt;
    [lua]&lt;br /&gt;
        code = &amp;lt;&amp;lt; wesnoth.dofile &amp;quot;~add-ons/Whatever/file.lua&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
    [/lua]&lt;br /&gt;
[/event]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Remarks on Random Numbers ==&lt;br /&gt;
&lt;br /&gt;
The math.random function is not safe for replays and multiplayer games, since the random values will be different each time and on all the clients. Instead, the Lua code should use the [[LuaWML:Misc#helper.rand|helper.rand()]] function to synchronize random values. It takes the same argument in the same format as [[InternalActionsWML#.5Bset_variable.5D|[set_variable]]] rand=.&lt;br /&gt;
&lt;br /&gt;
 local random_variable = helper.rand(&amp;quot;1,2,3&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Also available is [[LuaWML:Misc#wesnoth.random|wesnoth.random]], which has the same interface as math.random but is multiplayer-safe.&lt;br /&gt;
&lt;br /&gt;
[[Category: Lua Reference|*]]&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Spixi</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=InternalActionsWML&amp;diff=57872</id>
		<title>InternalActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=InternalActionsWML&amp;diff=57872"/>
		<updated>2016-08-12T22:36:09Z</updated>

		<summary type="html">&lt;p&gt;Spixi: /* [fire_event] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
&lt;br /&gt;
Part of [[ActionWML]], Internal actions are actions that WML uses internally that do not directly affect game play (or, at least, are not readily apparent to the player). For example, storing a variable is an internal action.&lt;br /&gt;
&lt;br /&gt;
== Variable Actions ==&lt;br /&gt;
&lt;br /&gt;
These actions are focused, in one way or another, on [[VariablesWML|variables]]. Creating them, modifying them, capturing game data to them, you name it, these actions are all about the variables.&lt;br /&gt;
&lt;br /&gt;
=== [set_variable] ===&lt;br /&gt;
&lt;br /&gt;
The '''[set_variable]''' tag is used to create and manipulate WML variables. The [http://www.wesnoth.org/macro-reference.xhtml#VARIABLE VARIABLE] macro is a quick syntactic shortcut for simple variable creation and the [http://www.wesnoth.org/macro-reference.xhtml#VARIABLE_OP VARIABLE_OP] macro is a quick syntactic shortcut for performing simple mathematical operations on variables.&lt;br /&gt;
&lt;br /&gt;
* '''name''': the name of the variable to manipulate&lt;br /&gt;
&lt;br /&gt;
* '''value''': set the variable to the given value (can be numeric or string).Use literal for no substitution. (see [[VariablesWML]])&lt;br /&gt;
&lt;br /&gt;
* '''literal''': set the variable to the given value (can be numeric or string). This does not interpret any dollar signs.&lt;br /&gt;
&lt;br /&gt;
* '''to_variable''': set the variable to the value of the given variable, e.g. 'to_variable=temp' would be equivalent to 'value=$temp'.&lt;br /&gt;
&lt;br /&gt;
* '''add''': add the given amount to the variable.&lt;br /&gt;
&lt;br /&gt;
* '''sub''': subtract the given amount from the variable.&lt;br /&gt;
&lt;br /&gt;
* '''multiply''': multiply the variable by the given number. The result is a float.&amp;lt;br /&amp;gt;To negate a number, multiply by -1. If you negate 0, the result is a floating-point negative zero -0. To display -0 as 0, use a second tag with add=0; it will flip -0 to 0 but not affect other numbers.&lt;br /&gt;
&lt;br /&gt;
* '''divide''': divide the variable by the given number. The result is a float. Wesnoth 1.9 and later no longer uses integer division. Use a second tag with round=floor if you relied on this.&lt;br /&gt;
&lt;br /&gt;
* '''modulo''': returns the remainder of a division.&lt;br /&gt;
&lt;br /&gt;
* '''rand''': the variable will be randomly set.&amp;lt;br&amp;gt;You may provide a comma separated list of possibilities, e.g. 'rand=Bob,Bill,Bella'.&amp;lt;br&amp;gt;You may provide a range of numbers (integers), e.g. 'rand=3..5'.&amp;lt;br&amp;gt;You may combine these, e.g. 'rand=100,1..9', in which case there would be 1/10th chance of getting 100, just like for each of 1 to 9. If a number or item is repeated, it is sampled more frequently as appropriate. See [[MultiplayerContent]] for more info on the MP case.&amp;lt;br&amp;gt;Using rand= will automatically result in the current action being non undoable. Ignoring possible [allow_undo].&lt;br /&gt;
&lt;br /&gt;
* '''time=stamp''': Retrieves a timestamp in milliseconds since wesnoth was started, can be used as timing aid. Don't try to use this as random value in MP since it will cause an OOS.&lt;br /&gt;
&lt;br /&gt;
* '''string_length''': Retrieves the length in characters of the string passed as this attribute's value; such string is parsed and variable substitution applied automatically (see [[VariablesWML]] for details).&lt;br /&gt;
&lt;br /&gt;
* '''[join]''' joins an array of strings to create a textual list&lt;br /&gt;
** '''variable''': name of the array&lt;br /&gt;
** '''key''': the key of each array element(array[$i].foo) in which the strings are stored&lt;br /&gt;
** '''separator''': separator to connect the elements&lt;br /&gt;
** '''remove_empty''': whether to ignore empty elements&lt;br /&gt;
&lt;br /&gt;
* '''ipart''': Assigns the integer part (the part to the left of the decimal point) of the referenced variable.&lt;br /&gt;
&lt;br /&gt;
* '''fpart''': Assigns the decimal part (the part to the right of the decimal point) of the referenced variable.&lt;br /&gt;
&lt;br /&gt;
* '''round''': Rounds the variable to the specified number of digits of precision. Negative precision works as expected (rounding 19517 to -2 = 19500). Special values:&lt;br /&gt;
**'''round=ceil''': Rounds upward to the nearest integer.&lt;br /&gt;
**'''round=floor''': Rounds down to the nearest integer.&lt;br /&gt;
&lt;br /&gt;
=== [set_variables] ===&lt;br /&gt;
&lt;br /&gt;
Manipulates a WML array or container&lt;br /&gt;
&lt;br /&gt;
* '''name''': the name of the array or container to manipulate&lt;br /&gt;
&lt;br /&gt;
* '''mode''': one of the following values:&lt;br /&gt;
** ''replace'': will clean the array '''name''' and replace it with given data&lt;br /&gt;
** ''append'': will append given data to the current array&lt;br /&gt;
** ''merge'': will merge in the given data into '''name'''&lt;br /&gt;
** ''insert'': will insert the given data at the index specified in the '''name''' attribute, such as name=my_array[1]. The default index is zero, which will insert to the front of the array. '''Note:''' if an invalid index is used, empty containers will be created before the insertion is performed. In other words, do not attempt to insert at an index greater than (or equal to) the array's current length. This limitation may be removed in future versions.&lt;br /&gt;
&lt;br /&gt;
* '''to_variable''': data will be set to the given array&lt;br /&gt;
&lt;br /&gt;
* '''[value]''': the WML inside the [value] tags will be stored in data, variables will be interpolated directly, use $| in order to escape the $ sign, you can store arrays of WML by supplying multiple [value] tags. ([[#Using_.5Bset_variables.5D_to_Create_Arrays_of_WML|See Example]])&lt;br /&gt;
&lt;br /&gt;
* '''[literal]''': same as '''[value]''', but variables will not be substituted, '''[literal]''' and '''[value]''' can not be used in the same [set_variables] tag, i.e. you can not create arrays by piling a mix of '''[value]''' and '''[literal]''' tags&lt;br /&gt;
&lt;br /&gt;
*'''[split]''' splits a textual list into an array which will then be set to data&lt;br /&gt;
** '''list''': textual list to split&lt;br /&gt;
** '''key''': the key of each array element(array[$i].foo) in which the strings are stored&lt;br /&gt;
** '''separator''': separator to separate the elements&lt;br /&gt;
** '''remove_empty''': whether to ignore empty elements&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|4}} You can now mix '''[value]''', '''[literal]''', and '''[split]''' in the same '''[set_variables]''' tag. They will be processed in order of appearance. Multiple instances of [split] are also supported now.&lt;br /&gt;
&lt;br /&gt;
=== Capturing Game Data ===&lt;br /&gt;
&lt;br /&gt;
These actions capture different bits of game data and store them to variables so they can be examined and/or manipulated.&lt;br /&gt;
&lt;br /&gt;
==== [store_gold] ====&lt;br /&gt;
&lt;br /&gt;
Stores a side's gold into a variable.&lt;br /&gt;
&lt;br /&gt;
* '''[[StandardSideFilter]]''': The first matching side's gold will be stored in the variable &amp;quot;variable&amp;quot;.&lt;br /&gt;
* '''variable''': (default='gold') the name of the variable to store the gold in&lt;br /&gt;
&lt;br /&gt;
==== [store_locations] ====&lt;br /&gt;
&lt;br /&gt;
Stores a series of locations that pass certain criteria into an array. Each member of the array has members 'x' and 'y' (the position) and 'terrain' (the terrain type) and 'owner_side' (villages only). The array will include any unreachable border hexes, if applicable.&lt;br /&gt;
&lt;br /&gt;
* [[StandardLocationFilter]]: a location or location range which specifies the locations to store. By default, all locations on the map are stored.&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable (array) into which to store the locations.&lt;br /&gt;
&lt;br /&gt;
==== [store_reachable_locations] ====&lt;br /&gt;
&lt;br /&gt;
Stores locations reachable by the given units. Can store either the movement, attack or vision ranges.&lt;br /&gt;
&lt;br /&gt;
* '''[filter]''': a [[StandardUnitFilter]]. The locations reachable by any of the matching units will be stored.&lt;br /&gt;
* '''[filter_location]''': (optional) a [[StandardLocationFilter]]. Only locations which also match this filter will be stored.&lt;br /&gt;
* '''range''': possible values ''movement'' (default), ''attack'', ''vision''. If ''movement'', stores the locations within the movement range of the unit, taking Zone of Control into account. If ''attack'', stores the attack range (movement range + 1 hex). If ''vision'', stores the vision range (movement range ignoring Zone of Control + 1 hex).&lt;br /&gt;
* '''moves''':  possible values ''current'' (default), ''max''. Specifies whether to use the current or maximum movement points when calculating the range.&lt;br /&gt;
* '''viewing_side''': (optional) the side whose vision to use when calculating the reach. This only has meaning in the presence of fog, shroud, or units with the ambush ability. If left out, then fog, shroud and ambushers are ignored and the real reach of the units is stored.&lt;br /&gt;
* '''variable''': the name of the variable (array) into which to store the locations.&lt;br /&gt;
&lt;br /&gt;
==== [store_map_dimensions] ====&lt;br /&gt;
&lt;br /&gt;
Stores the map dimensions in a variable.&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable where the values will be saved into. If it is skipped, a variable 'map_size' is used, and its contents overridden, if they existed already. The result is a container variable, with members ''width'' and ''height''.&lt;br /&gt;
&lt;br /&gt;
==== [store_side] ====&lt;br /&gt;
&lt;br /&gt;
Stores information about a certain side in a variable.&lt;br /&gt;
&lt;br /&gt;
'''Keys:'''&lt;br /&gt;
* '''[[StandardSideFilter]]''': All matching sides are stored. (An array is created if several sides match - access it with side[2].team_name and so on.)&lt;br /&gt;
* '''variable''': the name of the variable to store the information in (default: &amp;quot;side&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
'''Result'''&lt;br /&gt;
&lt;br /&gt;
Variable will contain following members:&lt;br /&gt;
* '''color''': It indicates team color. Can be one of the following:&lt;br /&gt;
{| border = 1&lt;br /&gt;
| ''color''&lt;br /&gt;
| red&lt;br /&gt;
| blue&lt;br /&gt;
| green&lt;br /&gt;
| purple&lt;br /&gt;
| black&lt;br /&gt;
| brown&lt;br /&gt;
| orange&lt;br /&gt;
| white&lt;br /&gt;
| teal&lt;br /&gt;
|-&lt;br /&gt;
| ''value''&lt;br /&gt;
| 1&lt;br /&gt;
| 2&lt;br /&gt;
| 3&lt;br /&gt;
| 4&lt;br /&gt;
| 5&lt;br /&gt;
| 6&lt;br /&gt;
| 7&lt;br /&gt;
| 8&lt;br /&gt;
| 9&lt;br /&gt;
|}&lt;br /&gt;
* '''controller''': Indicates type of player that control this side. ''In networked multiplayer, the controller attribute is ambiguous. Be very careful or you have OOS errors.''&lt;br /&gt;
** '''human''': Human player&lt;br /&gt;
** '''ai''': If players assigns &amp;quot;Computer Player&amp;quot; to &amp;quot;Player/Type&amp;quot; in game lobby&lt;br /&gt;
** '''network''': In multiplayer for sides that client does not control, both what would normally be human and ai. For host values are as usual, this is where OOS comes from.&lt;br /&gt;
** '''null''': If players assigns &amp;quot;Empty&amp;quot; to &amp;quot;Player/Type&amp;quot; in game lobby&lt;br /&gt;
* '''fog''': Indicates whether this side is affected by fog of war.&lt;br /&gt;
* '''gold''': The amount of gold the side have.&lt;br /&gt;
* '''hidden''': (boolean) If 'yes', side is not shown in status table.&lt;br /&gt;
* '''income''': Base income for this side (without villages).&lt;br /&gt;
* '''name''': Name of player.&lt;br /&gt;
* '''recruit''': A comma-separated list of unit types that can be recruited by this side.&lt;br /&gt;
* '''shroud''': Whether this side is affected by shroud.&lt;br /&gt;
* '''side''': The $side_number of the side belonging to this container&lt;br /&gt;
* '''team_name''': String representing the team's description.&lt;br /&gt;
* '''user_team_name''': Translated string representing the team's description.&lt;br /&gt;
* '''village_gold''': The amount of gold given to this side per village it controls per turn.&lt;br /&gt;
* '''scroll_to_leader''': (boolean) Whether the game view scrolls to the side leader at the start of their turn.&lt;br /&gt;
* '''flag''': Flag animation for villages owned by this side (see [[SideWML|[side]]]). Unless previously specified in [side] or changed with WML (see [[DirectActionsWML#.5Bmodify_side.5D|[modify_side]]]), this value may be empty for the default flag animation.&lt;br /&gt;
* '''flag_icon''': Flag icon for the status bar for this side (see [[SideWML|[side]]]). Unless previously specified in [side] or changed with WML (see [[DirectActionsWML#.5Bmodify_side.5D|[modify_side]]]), this value may be empty for the default flag icon.&lt;br /&gt;
* '''village_support''': The number of unit levels this side is able to support (does not pay upkeep on) per village it controls.&lt;br /&gt;
&lt;br /&gt;
==== [store_starting_location] ====&lt;br /&gt;
&lt;br /&gt;
Stores the starting location of a side's leader in a variable. The variable is a composite type which will have members 'x', 'y', 'terrain' and 'owner_side' (villages only)&lt;br /&gt;
&lt;br /&gt;
* [[StandardSideFilter]]: The starting locations of all matching sides will be stored. If multiple sides are matched, a WML array will be created.&lt;br /&gt;
* '''variable''': (default='location'): the name of the variable to store the location in&lt;br /&gt;
&lt;br /&gt;
==== [store_time_of_day] ====&lt;br /&gt;
&lt;br /&gt;
Stores time of day information from the current scenario into a WML variable container.&lt;br /&gt;
&lt;br /&gt;
* '''x, y''': Location to store the time for. [[DirectActionsWML#.5Btime_area.5D|Time areas]] matter; illumination does not. If this is omitted, the global (location-independent) time is stored.&lt;br /&gt;
&lt;br /&gt;
* '''variable''': (default='time_of_day') name of the container on which to store the information. The container will be filled with the same attributes found on [[TimeWML]].&lt;br /&gt;
&lt;br /&gt;
* '''turn''': (defaults to the current turn number) changes the turn number for which time of day information should be retrieved.&lt;br /&gt;
&lt;br /&gt;
==== [store_turns] ====&lt;br /&gt;
&lt;br /&gt;
Stores the turn limit (the maximum number of turns). If there is no limit, this stores ''-1''.&lt;br /&gt;
&lt;br /&gt;
* '''variable''': (default='turns') the name of the variable in which to store the turn limit.&lt;br /&gt;
&lt;br /&gt;
==== [store_unit] ====&lt;br /&gt;
&lt;br /&gt;
Stores details about units into a [[VariablesWML#Container|container]] variable. When a unit is stored, all keys and tags in the unit definition may be manipulated, including some others, with [[InternalActionsWML#.5Bset_variable.5D|[set_variable]]]. A sample '''list of these tags and keys''' can be found at [[InternalActionsWMLUnitTags]].&lt;br /&gt;
&lt;br /&gt;
If you have a doubt about what keys are valid or what the valid value range is for each key, code a [store_unit] event, save the game, and examine what keys are in the file (or just examine the '''[unit]''' tag(s) in any save file). One can also use the [[CommandMode|:inspect]] command or the [[InterfaceActionsWML#.5Binspect.5D|[inspect]]] tag to open a game-state inspector dialog, which can be used to view unit properties.&lt;br /&gt;
&lt;br /&gt;
Common usage is to manipulate a unit by using '''[store_unit]''' to store it into a variable, followed by manipulation of the variable, and then [[DirectActionsWML#.5Bunstore_unit.5D|[unstore_unit]]] to re-create the unit with the modified variables.&lt;br /&gt;
&lt;br /&gt;
''Note: stored units also exist on the field, and modifying the stored variable will not automatically change the stats of the units. You need to use [unstore_unit]. See also [[DirectActionsWML#.5Bunstore_unit.5D|[unstore_unit]]] and [http://www.wesnoth.org/macro-reference.xhtml#FOREACH FOREACH].''&lt;br /&gt;
&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. All units matching this filter will be stored. If there are multiple units, they will be stored into an array of variables. The units will be stored in order of their internal ''underlying_id'' attribute, which is usually in creation order (but you normally should not depend on the order).&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable into which to store the unit(s)&lt;br /&gt;
&lt;br /&gt;
* '''mode''': defaults to ''always_clear'', which clears the variable, whether or not a match is found. If mode is set to ''replace'', the variable will not be cleared, and units which match the filter will overwrite existing elements at the start of the array, leaving any additional elements intact if the original array contained more elements than there are units matching the filter. If mode is set to ''append'', the variable will not be cleared, and units which match the filter will be added to the array after the existing elements.&lt;br /&gt;
&lt;br /&gt;
* '''kill''': if 'yes' the units that are stored will be removed from play. This is useful for instance to remove access to a player's recall list, with the intent to restore the recall list later.&lt;br /&gt;
&lt;br /&gt;
==== [store_unit_type] ====&lt;br /&gt;
&lt;br /&gt;
* '''type''': (required) the defined ID of the unit type, for example &amp;quot;Goblin Knight&amp;quot;. Do not use a translation mark or it will not work correctly for different languages. A comma-separated list of IDs may also be used to store an array of unit types.&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable into which to store the unit type information (default &amp;quot;unit_type&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==== [store_unit_type_ids] ====&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable into which to store a comma-separated list of all unit type IDs including all from all loaded addons&lt;br /&gt;
&lt;br /&gt;
==== [store_villages] ====&lt;br /&gt;
&lt;br /&gt;
Stores a series of locations of villages that pass certain criteria into an array. Each member of the result array will have members 'x' and 'y' (the position) and 'terrain' (the terrain type) and 'owner_side'. note: The only advantage/difference this tag has, in comparison to using [store_locations]terrain=*^V*, is that the amount of hexes which are considered for a possible match is previously restricted to those with villages.&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable (array) into which to store the locations (default: &amp;quot;location&amp;quot;)&lt;br /&gt;
* '''[[StandardLocationFilter]]''' tags and keys as arguments&lt;br /&gt;
&lt;br /&gt;
==== [store_items] ====&lt;br /&gt;
&lt;br /&gt;
Stores current items in the scenario into an array. Each entry has at least members x and y and can have all of the other keys listed in the documentation of [[InterfaceActionsWML#.5Bitem.5D|[item]]] (depending on what was set during creating the item).&lt;br /&gt;
&lt;br /&gt;
*'''variable''': name of the wml variable array to use (default &amp;quot;items&amp;quot;)&lt;br /&gt;
*'''[[StandardLocationFilter]]''' keys as arguments: only items on locations matching this [[StandardLocationFilter]] will be stored&lt;br /&gt;
&lt;br /&gt;
==== [store_relative_direction] ====&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|0}}&lt;br /&gt;
&lt;br /&gt;
Gets the relative direction from one hex to another. This is an interface to the function wesnoth uses to decide how a unit will face while it is moving / attacking / defending.&lt;br /&gt;
&lt;br /&gt;
* '''[source]''' x and y must describe a map location&lt;br /&gt;
* '''[destination]''' similar&lt;br /&gt;
* '''variable''' name of the variable to store string result in (one of 'n', 'nw', 'ne', 's', 'sw', 'se')&lt;br /&gt;
* '''mode''' optional. 0 is the default setting corresponding to default wesnoth implementation used in animations. 1 is an alternate &amp;quot;radially symmetric&amp;quot; mode. The default mode breaks ties in the direction of south, since this makes more units face the player directly on screen. The radially symmetric mode breaks ties in the direction of counter-clockwise, and might be more appropriate in some cases.&lt;br /&gt;
&lt;br /&gt;
==== [find_path] ====&lt;br /&gt;
&lt;br /&gt;
A WML interface to the pathfinder. Calculates the path between a unit and a location and returns the result in a WML variable, that contains also an array for every step of the path.&lt;br /&gt;
&lt;br /&gt;
*'''[traveler]''': [[StandardUnitFilter]], only the first matching unit will be used for calculation&lt;br /&gt;
*'''[destination]''': [[StandardLocationFilter]], only the first matching nearest hex will be used&lt;br /&gt;
*'''variable''': the variable name where the result will be stored, if no value is supplied 'path' will be used as default name. Each step will be stored in a [step] array inside that variable.&lt;br /&gt;
*'''allow_multiple_turns''': default no, if yes also moves that require more than one turn will be calculated.&lt;br /&gt;
*'''check_visibility''': default no, if yes the path will not be computed if some hexes are not visible due to shroud.&lt;br /&gt;
*'''check_teleport''': default yes; if no, teleport won't be taken in account while computing path.&lt;br /&gt;
*'''check_zoc''': default yes; if no, unit ZOCs won't be considered while calculating the path.&lt;br /&gt;
This is the structure of the variable returned by [find_path]:&lt;br /&gt;
 [path]&lt;br /&gt;
 	hexes = the total length of the path&lt;br /&gt;
 		if the path is calculated to an impassable hex, or the move requires multiple turns&lt;br /&gt;
 		and allow_multiple_turns is no, its value will be 0.&lt;br /&gt;
 	from_x, from_y = location of the unit&lt;br /&gt;
 	to_x, to_y = destination&lt;br /&gt;
 	movement_cost = total movement cost required by unit to reach that hex&lt;br /&gt;
 	required_turns = total turns required by unit to reach that hex&lt;br /&gt;
 	[step]&lt;br /&gt;
 		x, y = location of the step&lt;br /&gt;
 		terrain = terrain of the step&lt;br /&gt;
 		movement_cost = movement cost required by unit to reach that hex&lt;br /&gt;
 		required_turns = turns required by unit to reach that hex&lt;br /&gt;
 	[/step]&lt;br /&gt;
 [/path]&lt;br /&gt;
&lt;br /&gt;
==== [unit_worth] ====&lt;br /&gt;
Takes only an inline [[StandardUnitFilter]] (only the first matching unit will be used for calculation) and outputs the following variables: &lt;br /&gt;
*''cost'', the current unit cost;&lt;br /&gt;
*''next_cost'', the cost of the most expensive advancement;&lt;br /&gt;
*''health'', the health of the unit in percentage;&lt;br /&gt;
*''experience'', current experience in percentage;&lt;br /&gt;
*''unit_worth'', how much the unit is worth.&lt;br /&gt;
&lt;br /&gt;
Mainly used for internal AI checks, but one could in theory just do anything with it.&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=moveto&lt;br /&gt;
     [unit_worth]&lt;br /&gt;
        x,y=$x1,$y1&lt;br /&gt;
     [/unit_worth]&lt;br /&gt;
     [message]&lt;br /&gt;
         id=$unit.id&lt;br /&gt;
         message=_&amp;quot;I cost $cost gold, with $health|% of my hitpoints and $experience|% on the way to cost $next_cost|.&lt;br /&gt;
 I am estimated to be worth $unit_worth&amp;quot;&lt;br /&gt;
     [/message]&lt;br /&gt;
     [clear_variable]&lt;br /&gt;
         name=cost,next_cost,health,experience,unit_worth&lt;br /&gt;
     [/clear_variable]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
=== [clear_variable] ===&lt;br /&gt;
&lt;br /&gt;
This will delete the given variable. This tag can delete a scalar or an entire array; it can also delete one container at an array index. The macro [http://www.wesnoth.org/macro-reference.xhtml#CLEAR_VARIABLE CLEAR_VARIABLE] is a shortcut for this tag.&lt;br /&gt;
&lt;br /&gt;
This action is good to use to clean up the set of variables; for example, a well-behaved scenario will delete any variables that should not be kept for the next scenario before the end of the scenario. One can also clear tags and variables of stored units; for example, one can remove [trait]s and [object]s.&lt;br /&gt;
&lt;br /&gt;
* '''name''': the name of the variable to clear. This can also be a comma-separated list of multiple variable names.&lt;br /&gt;
** If a name ends with an array index, then it deletes that one container, and shifts the indexes of all subsequent containers. For example, &amp;lt;code&amp;gt;{CLEAR_VARIABLE my_awesome_array[2]}&amp;lt;/code&amp;gt; deletes &amp;lt;code&amp;gt;my_awesome_array[2]&amp;lt;/code&amp;gt;, but then moves &amp;lt;code&amp;gt;my_awesome_array[3]&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;my_awesome_array[2]&amp;lt;/code&amp;gt;, moves &amp;lt;code&amp;gt;my_awesome_array[4]&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;my_awesome_array[3]&amp;lt;/code&amp;gt;, and so on until the end of the array.&lt;br /&gt;
** Note that &amp;lt;code&amp;gt;{CLEAR_VARIABLE my_awesome_array}&amp;lt;/code&amp;gt; deletes the entire array, but &amp;lt;code&amp;gt;{CLEAR_VARIABLE my_awesome_array[0]}&amp;lt;/code&amp;gt; deletes only the first container.&lt;br /&gt;
&lt;br /&gt;
=== [sync_variable] ===&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|0}}&lt;br /&gt;
&lt;br /&gt;
Sets one or multiple variables to the same value as on all clients and also on replays, it uses the value from the currently active side.&lt;br /&gt;
* '''name''' the name of the variable to synchonize this can be a comma seperated list.&lt;br /&gt;
&lt;br /&gt;
== Other Internal Actions ==&lt;br /&gt;
&lt;br /&gt;
Believe it or not, there are some internal actions that are not focused primarily on variables. They are all grouped here.&lt;br /&gt;
&lt;br /&gt;
=== [fire_event] ===&lt;br /&gt;
&lt;br /&gt;
Trigger a WML event (used often for [[EventWML#Custom_events|custom events]])&lt;br /&gt;
&lt;br /&gt;
* '''name''': the name of event to trigger&lt;br /&gt;
** ''(Optional)'' {{DevFeature1.13|6}}&lt;br /&gt;
&lt;br /&gt;
* '''id''': ''(Optional)'' the id of a single event to trigger {{DevFeature1.13|6}}&lt;br /&gt;
&lt;br /&gt;
* '''[primary_unit]''': ''(Optional)'' Primary unit for the event. Will never match on a recall list unit. The first unit matching the filter will be chosen.&lt;br /&gt;
**[[StandardUnitFilter]] as argument. Do not use a [filter] tag.&lt;br /&gt;
&lt;br /&gt;
* '''[secondary_unit]''': ''(Optional)'' Same as '''[primary_unit]''' except for the secondary unit.&lt;br /&gt;
**[[StandardUnitFilter]] as argument. Do not use a [filter] tag.&lt;br /&gt;
&lt;br /&gt;
* '''[primary_attack]''': Information passed to the primary attack filter and $weapon variable on the new event.&lt;br /&gt;
&lt;br /&gt;
* '''[secondary_attack]''': Information passed to the second attack filter and $second_weapon variable on the new event.&lt;br /&gt;
&lt;br /&gt;
=== [remove_event] ===&lt;br /&gt;
{{DevFeature1.13|0}}&lt;br /&gt;
&lt;br /&gt;
Removes the event with the specified id. Equivalent to &amp;lt;i&amp;gt;[event] id=foo remove=yes&amp;lt;/i&amp;gt;. See [[EventWML#remove|EventWML]].&lt;br /&gt;
&lt;br /&gt;
* '''id''': the id of the event to remove. May be a comma separated list.&lt;br /&gt;
&lt;br /&gt;
=== [insert_tag] ===&lt;br /&gt;
&lt;br /&gt;
Inserts a variable as WML. In other words, the value of the passed [[VariablesWML#Container|container variable]] will be injected into the game as if they had been written out in WML form. ([[#.5Binsert_tag.5D_Example|See Example]]).&lt;br /&gt;
&lt;br /&gt;
Tag insertion is a special case in that it can be used in places where other ActionWML cannot be used. The basic rule is that anywhere that $variable syntax works, tag insertion will also work. In practice this means pretty much everywhere except directly within top-level scenario tags.&lt;br /&gt;
&lt;br /&gt;
*'''name''': The [&amp;quot;name&amp;quot;] to be given to the tag. This must be a tag which would be valid at the place where [insert_tag] is used, for anything to happen. (For example, if used as ActionWML, it should be a [[ActionWML]] tag name, and it may be a recognized subtag such as &amp;quot;option&amp;quot; when used within a [message]).&lt;br /&gt;
&lt;br /&gt;
*'''variable''': Name of the container variable which will have its value inserted into the tag.&lt;br /&gt;
&lt;br /&gt;
=== [role] ===&lt;br /&gt;
&lt;br /&gt;
Tries to find a unit to assign a role to.&amp;lt;br&amp;gt;This is useful if you want to choose a non-major character to say some things during the game. Once a role is assigned, you can use '''role=''' in a unit filter to identify the unit with that role (See [[FilterWML]]).&amp;lt;br&amp;gt;However, there is no guarantee that roles will ever be assigned. You can use '''[have_unit]''' (see [[ConditionalActionsWML#Condition_Tags|Condition Tags]]) to see whether a role was assigned. This tag uses a [[StandardUnitFilter]] (without [filter]) with the modification to order the search by type, mark only the first unit found with the role, and the role attribute is not used in the search. If for some reason you want to search for units that have or don't have existing roles, you can use one or more [not] filters. The will check recall lists in addition to units on the map. In normal use, you will probably want to include a ''side'' attribute to force the unit to be on a particular side.&lt;br /&gt;
&lt;br /&gt;
* '''role''': the value to store as the unit's role. This role is not used in the [[StandardUnitFilter]] when doing the search for the unit to assign this role to.&lt;br /&gt;
&lt;br /&gt;
* '''type''': a comma-separated list of possible types the unit can be. If any types are given, then units will be searched by type in the order listed. If no type is given, then no particular order with respect to type is guaranteed.&lt;br /&gt;
&lt;br /&gt;
* '''search_recall_list''': {{DevFeature1.13|5}} whether to consider units on the recall list when assigning the role. Can be either yes or no, defaults to yes. {{DevFeature1.13|6}} If set to 'only', then units on the map are not considered when assigning the role - only units on the recall list can receive it.&lt;br /&gt;
&lt;br /&gt;
* '''[else]''' {{DevFeature1.13|5}} ActionWML to execute if the game is unable to find a unit to assign the role to. For example, this could be used to create a new unit satisfying the role.&lt;br /&gt;
&lt;br /&gt;
* '''[auto_recall]''' {{DevFeature1.13|6}} If present, and the role is assigned to a unit on the recall list, then that unit is recalled. Supports all unique keys of [[DirectActionsWML#.5Brecall.5D|&amp;amp;#x5b;recall&amp;amp;#x5d;]], but no [[StandardUnitFilter]].&lt;br /&gt;
&lt;br /&gt;
* [[StandardUnitFilter]], do not use a [filter] sub-tag. SUF's role= and type= keys are not used: if you want to use them, use a nested SUF wrapped inside a [and] tag.&lt;br /&gt;
&lt;br /&gt;
=== [random_placement] ===&lt;br /&gt;
{{DevFeature1.13|2}}&lt;br /&gt;
&lt;br /&gt;
Selects randomly a given number of locations from a given set of locations and exectutes the given code for each of those locations.&lt;br /&gt;
&lt;br /&gt;
* '''[filter_location]''': a [[StandardLocationFilter]].&lt;br /&gt;
* '''[command]''': contains ActionWml that is executed for each of the locations.&lt;br /&gt;
* '''num_items''': the number of locations that should be selected, this can be a (lua) expression to calculate the number of locations based on the number of locations that match the filter, for example (size * 0.5) will execute the command for exactly half of the locations (rounded down)&lt;br /&gt;
* '''variable''': The name of the variable that contains the current location during the execution of [command]. This is a container with the attributes x and y.&lt;br /&gt;
* '''min_distance''': The minimum distance of 2 chosen locations, a value less than 0 means that the same locations can be chosen more than one time.&lt;br /&gt;
* '''allow_less''': If yes, the tag will not show an error in case there were less than num_items locations available.&lt;br /&gt;
&lt;br /&gt;
=== Flow control actions ===&lt;br /&gt;
&lt;br /&gt;
{{DevFeature1.13|2}}&lt;br /&gt;
&lt;br /&gt;
There are three actions that alter the flow of execution. They are '''[break]''', '''[continue]''', and '''[return]'''. All of them take no arguments.&lt;br /&gt;
&lt;br /&gt;
* '''[break]''': The nearest enclosing loop immediately stops executing, and control continues with the next action after the end of that loop. If there is no enclosing loop, this is equivalent to '''[return]'''.&lt;br /&gt;
* '''[continue]''': The nearest enclosing loop immediately stops executing, and control continues at the beginning of that loop, with any iteration variables updated for the next iteration. If there is no enclosing loop, this is an error.&lt;br /&gt;
* '''[return]''': Control immediately returns to the Wesnoth engine. No further WML actions are executed in this context. If there was another event queued, that event will be run as usual.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Using [set_variables] to Create Arrays of WML ===&lt;br /&gt;
&lt;br /&gt;
 [set_variables]&lt;br /&gt;
     name=arr&lt;br /&gt;
     mode=replace&lt;br /&gt;
     [value]&lt;br /&gt;
         foo=bar&lt;br /&gt;
     [/value]&lt;br /&gt;
     [value]&lt;br /&gt;
        foo=more&lt;br /&gt;
     [/value]&lt;br /&gt;
 [/set_variables]&lt;br /&gt;
 {DEBUG_MSG $arr[0].foo}&lt;br /&gt;
 {DEBUG_MSG $arr[1].foo}&lt;br /&gt;
&lt;br /&gt;
This will produce two output messages, first one saying '''bar''' and next one saying '''more'''.&lt;br /&gt;
&lt;br /&gt;
=== [insert_tag] Example ===&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=moveto&lt;br /&gt;
     &lt;br /&gt;
     [set_variable]&lt;br /&gt;
         name=temp.speaker&lt;br /&gt;
         value=Konrad&lt;br /&gt;
     [/set_variable]&lt;br /&gt;
     &lt;br /&gt;
     [set_variable]&lt;br /&gt;
         name=temp.message&lt;br /&gt;
         value= _ &amp;quot;Yo Kalenz!&amp;quot;&lt;br /&gt;
     [/set_variable]    &lt;br /&gt;
     &lt;br /&gt;
     [insert_tag]&lt;br /&gt;
         name=message&lt;br /&gt;
         variable=temp&lt;br /&gt;
     [/insert_tag]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
This is effectively identical to:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=moveto&lt;br /&gt;
     &lt;br /&gt;
     [message]&lt;br /&gt;
         speaker=Konrad&lt;br /&gt;
         message= _ &amp;quot;Yo Kalenz!&amp;quot;&lt;br /&gt;
     [/message]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[VariablesWML]]&lt;br /&gt;
* [[ActionWML]]&lt;br /&gt;
** [[ConditionalWML]]&lt;br /&gt;
** [[DirectActionsWML]]&lt;br /&gt;
** [[InterfaceActionsWML]]&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;br /&gt;
[[Category: ActionsWML]]&lt;/div&gt;</summary>
		<author><name>Spixi</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=MapGeneratorWML&amp;diff=57861</id>
		<title>MapGeneratorWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=MapGeneratorWML&amp;diff=57861"/>
		<updated>2016-08-07T14:32:19Z</updated>

		<summary type="html">&lt;p&gt;Spixi: removed confusing examples and added a note to the cave generator&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Map Generator WML is used to create scenarios which are randomly generated. Of course, any scenario may reconfigure itself during a start / prestart event as much as it likes, using randomness, but the Map Generator WML has the following advantages:&lt;br /&gt;
&lt;br /&gt;
* Wesnoth has several built-in map generators which can be configured with options, and these are much better developed than any existing pure WML options.&lt;br /&gt;
* Map generation occurs before the scenario is even loaded, something which is not possible for WML events. In an mp game, the map generator code will run only on the host, side-stepping any synchronization issues, and keeping your scenario code as simple as possible.&lt;br /&gt;
* For scenarios with &amp;quot;allow_new_game=yes&amp;quot; and which use map generators, the generator may be reconfigured in the mp create screen (assuming that someone has coded a dialog for it). The user can also select to regenerate the map and get instant feedback from the minimap display.&lt;br /&gt;
&lt;br /&gt;
== Scenario vs map generation ==&lt;br /&gt;
&lt;br /&gt;
Every map generator can be used in either '''scenario_generation''' mode or '''map_generation''' mode. In map_generation mode, the generator is only used to replace the map_data of your scenario. In scenario_generation mode, the entire [scenario] tag is replaced.&lt;br /&gt;
&lt;br /&gt;
To select a map generator and mode, in your [scenario] tag you must place '''one of'''&lt;br /&gt;
* '''scenario_generation=algorithm'''&lt;br /&gt;
* '''map_generation=algorithm'''&lt;br /&gt;
where '''algorithm''' is the generator algorithm you want to use. Note that not every algorithm is designed to be use with both of these options.&lt;br /&gt;
&lt;br /&gt;
You must additionally place a [generator] tag in your scenario, which contains the options to the map generator.&lt;br /&gt;
&lt;br /&gt;
== [generator] ==&lt;br /&gt;
&lt;br /&gt;
The exact things that should be placed in [generator] depend on what algorithm you pick. There are three kinds of generators, '''default''', '''cave''', '''lua''' {{DevFeature1.13|0}}, and '''yamg''' {{DevFeature1.13|0}}.&lt;br /&gt;
&lt;br /&gt;
For which key to use and what value, see the section for the generator you want to use.&lt;br /&gt;
&lt;br /&gt;
===The lua generator===&lt;br /&gt;
The lua generator type specifies a custom map generator, which you provide via lua scripts.&lt;br /&gt;
&lt;br /&gt;
The following keys are recognized for '''[generator]''' when the lua generator is used:&lt;br /&gt;
* '''create_map''' : A lua routine which returns a string containing the new map_data. The entire contents of the '''[generator]''' are passed to the script in a lua table (see [[LuaWML]]), via the argument '''...''' (see http://www.lua.org/pil/5.2.html).&lt;br /&gt;
* '''create_scenario''' : The same, but returning a '''[scenario]''' tag for the new scenario, as a lua table.&lt;br /&gt;
&lt;br /&gt;
Any other keys are used only by the lua script.&lt;br /&gt;
&lt;br /&gt;
The following keys of the output [scenario] are specifically watched by the mp create screen:&lt;br /&gt;
* '''id'''&lt;br /&gt;
* '''name'''&lt;br /&gt;
* '''description'''&lt;br /&gt;
* '''error_message'''&lt;br /&gt;
&lt;br /&gt;
====Available Lua API====&lt;br /&gt;
Most of the usual in-game API, in the table '''wesnoth''', is not available to lua scripts. However the usual standard lua libs are available, and a random number generator object is available from the Rng table. This is an instance of the Mersenne Twister 19937 random number generator from the C++11 standard.&lt;br /&gt;
&lt;br /&gt;
* '''rng = Rng:create()''' : creates a new rng object&lt;br /&gt;
* '''rng:seed()''' : seed an rng, expects a string in hexadecimal format&lt;br /&gt;
* '''rng:draw()''' : draw a 32-bit random integer from the rng&lt;br /&gt;
&lt;br /&gt;
It is highly recomended NOT to use the math.random function in random map generators, becasue math.random breaks the 'seed' function for random map generators in the editor.&lt;br /&gt;
&lt;br /&gt;
===The Default Generator===&lt;br /&gt;
The default generator can be used to generate map data for any scenario. The data in this section is inferred from “data/multiplayer/scenarios/Random_Scenario.cfg”, usage in add-on content, and inspection of mapgen.cpp&lt;br /&gt;
&lt;br /&gt;
'''Excerpt from mapgenerator comments:'''&lt;br /&gt;
&lt;br /&gt;
* Basically we generate alot of hills, each hill being centered at a certain point, with a certain radius - being a half sphere. Hills are combined additively to form a bumpy surface. The size of each hill varies randomly from 1-hill_size. We generate 'iterations' hills in total. The range of heights is normalized to 0-1000. 'island_size' controls whether or not the map should tend toward an island shape, and if so, how large the island should be. Hills with centers that are more than 'island_size' away from the center of the map will be inverted (i.e. be valleys). 'island_size' as 0 indicates no island.&lt;br /&gt;
&lt;br /&gt;
To use the default '''[generator]''' your '''[scenario]''' tag must contain one of the following keys:&lt;br /&gt;
* '''scenario_generation=default'''&lt;br /&gt;
* '''map_generation=default'''&lt;br /&gt;
If ‘scenario_generation’ is used, the engine will expect for your entire '''[scenario]''' sub tags to be inside a '''[scenario]''' tag inside '''[generator]'''. Tags outside of this will be ignored.  There may be value in this, but at this writing, it’s not clear.&lt;br /&gt;
‘map_generation=default’ is simpler and more commonly used.  It is also necessary to use this key so that you can regenerate a map in MP game creation.&lt;br /&gt;
In its use only generator data is in the '''[generator]''' tag, all other '''[scenario]''' data is placed outside of it. The exception is if you are making an initial MP scenario available in MP game creation, for this a '''[scenario]''' tag must appear inside of '''[generator]''', containing the '''[scenario]''' subtags you want to use. See “data/multiplayer/scenarios/Random_Scenario.cfg” for an example.&lt;br /&gt;
&lt;br /&gt;
The following key/tags are recognized for '''[generator]''' when the default generator is used:&lt;br /&gt;
* '''[scenario]''': See [[ScenarioWML]]&lt;br /&gt;
* '''name'''&lt;br /&gt;
** '''default'''&lt;br /&gt;
* '''map_width''','''map_height''': size of the map to generate&lt;br /&gt;
* '''iterations''': the number of times an attempt is being made to generate a hill&lt;br /&gt;
* '''hill_size''': hills will have a random size between 1 and ''hill_size''&lt;br /&gt;
* '''max_lakes''': the number of times an attempt is being made to generate a lake&lt;br /&gt;
* '''min_lake_height''': lakes are the starting point of rivers and need to start above a certain height&lt;br /&gt;
* '''lake_size''': the size of a lake still randomly generated&lt;br /&gt;
* '''river_frequency''': determine how much a river can run uphill and thus generate more rivers&lt;br /&gt;
&lt;br /&gt;
* '''villages''': villages per 1,000 hexes&lt;br /&gt;
* '''players''': Number of starting locations for the map.&lt;br /&gt;
* '''castle_size''': Number of castle tiles (including the keep), per player.&lt;br /&gt;
* '''temperature_iterations''': Same as iterations, but for the temperature map.&lt;br /&gt;
* '''temperature_size''': Same as hill_size, but for the temperature map. (Temperature map is generated the same way as a hill map, but is hard coded with a island_size of 0.)&lt;br /&gt;
* '''roads''': number of roads the generator will attempt to make&lt;br /&gt;
* '''road_windiness''': Use 1 for the road to be made using the cheapest path (based on [road_cost] tags), higher values introduce randomness to make the road wind a bit.&lt;br /&gt;
* '''island_size''': Use 1-5 for coastal maps and 6-10 for island maps. Bigger values may crash map generation process. Bigger numbers makes more water (and less land)&lt;br /&gt;
* '''default_flatland''': If not specified, is Grassland. If your height tags don't go down to 0, the default_flatland will be used (possibly in other cases as well).&lt;br /&gt;
* '''[height]''': list of common terrain types that come in at different heights, from highest to lowest. Good WML will have the range of 1000-0 covered.&lt;br /&gt;
** '''height''': the terrain specified below will appear at this height and up.&lt;br /&gt;
** '''terrain''': 1 terrain code&lt;br /&gt;
* '''[convert]''': used to make terrain conversions. For example, water becomes ice at low temperatures, grass snow, etc. If the terrain is between the min_x and max_x it will be converted. If min_x is not defined it will default to a large negative number. If max_x is not defined it will default to a large positive number&lt;br /&gt;
** '''min_height'''&lt;br /&gt;
** '''max_height'''&lt;br /&gt;
** '''min_temperature'''&lt;br /&gt;
** '''max_temperature'''&lt;br /&gt;
** '''from''': a comma separated terrains to convert from&lt;br /&gt;
** '''to''': The terrain to convert these terrains to&lt;br /&gt;
* '''[road_cost]'''&lt;br /&gt;
** '''terrain''' 1 terrain code&lt;br /&gt;
** '''cost''': how expensive it is the create a road on this terrain, this influences the odds of this terrain getting a road&lt;br /&gt;
** '''convert_to_bridge''': a comma separated list of terrains; N/S, then NE/SW, then NW/SE.&lt;br /&gt;
** '''convert_to''': 1 terrain code (note using both ''convert_to_bridge'' and ''convert_to'' might result in unwanted results)&lt;br /&gt;
* '''[village]''': The conversion of terrains to villages&lt;br /&gt;
** '''terrain''': 1 terrain code which will be converted to a village&lt;br /&gt;
** '''convert_to''': 1 terrain code for the village&lt;br /&gt;
** '''adjacent_liked''': a comma separated terrain list. This list increases the rating for a certain location, every tile around the location will be tested against this list and for every match the rating of the location is increased. The same terrain twice in the list will double the rating increase for that location.&lt;br /&gt;
** '''rating''': chance of appearing&lt;br /&gt;
* '''[castle]''': the conversion of castles&lt;br /&gt;
** '''valid_terrain''': a comma-separated terrain list with terrains which are allowed to be converted to a castle.&lt;br /&gt;
** '''min_distance''': all castles generated must be this number of hexes apart from each other&lt;br /&gt;
* '''[naming]''': The names used to label landscape features (forests, lakes, etc.). This controls, for example, the &amp;quot;Sal&amp;quot; part of &amp;quot;Sal's Crossing&amp;quot;. If this tag is empty, those labels should be suppressed. (Due to a bug, they are not suppressed prior to 1.11.1.) The predefined macro VILLAGE_NAMES is one option for the contents of this tag. If that macro is not used, this tag takes one key.&lt;br /&gt;
** '''Changes in release 1.13.5''':&lt;br /&gt;
*** The new [[Context-free grammar|Context-free grammar name]] (CFG) generator is now supported&lt;br /&gt;
*** '''male_names''' is now deprecated. Use '''base_names''' for the Markov-chain based or '''base_name_generator''' for the CFG generator instead&lt;br /&gt;
*** It is now possible to have generator-specific overrides of the default naming rules which are defined in &amp;quot;data/english.cfg&amp;quot;. You may override the following naming rules by adding them to the [naming] tag of your generator instance:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Key&lt;br /&gt;
!Supported variables&lt;br /&gt;
|-&lt;br /&gt;
|bridge_name_generator=&lt;br /&gt;
|$base&lt;br /&gt;
|-&lt;br /&gt;
|road_name_generator=&lt;br /&gt;
|$base&lt;br /&gt;
|-&lt;br /&gt;
|river_name_generator=&lt;br /&gt;
|$base&lt;br /&gt;
|-&lt;br /&gt;
|forest_name_generator=&lt;br /&gt;
|$base&lt;br /&gt;
|-&lt;br /&gt;
|lake_name_generator=&lt;br /&gt;
|$base&lt;br /&gt;
|-&lt;br /&gt;
|mountain_name_generator=&lt;br /&gt;
|$base&lt;br /&gt;
|-&lt;br /&gt;
|swamp_name_generator=&lt;br /&gt;
|$base&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* '''[village_naming]''': The names used to label villages. This controls, for example, the &amp;quot;Fox&amp;quot; part of &amp;quot;Foxham&amp;quot;. If this tag is empty, those labels should be suppressed. (Due to a bug, they are not suppressed prior to 1.11.1.) The predefined macro VILLAGE_NAMES is one option for the contents of this tag. If that macro is not used, this tag takes one key. The village naming depends on the adjacent landscape features, e.g. a village near a forest with the name &amp;quot;Rock Forest&amp;quot; may be named &amp;quot;Rockwood&amp;quot;.&lt;br /&gt;
** '''male_names'''&lt;br /&gt;
** '''Changes in release 1.13.5''':&lt;br /&gt;
*** The new [[Context-free grammar|Context-free grammar name]] (CFG) generator is now supported&lt;br /&gt;
*** '''male_names''' is now deprecated. Use '''base_names''' for the Markov-chain based or '''base_name_generator''' for the CFG generator instead&lt;br /&gt;
*** It is now possible to have generator-specific overrides of the default village naming rules which are defined in &amp;quot;data/english.cfg&amp;quot;. You may override the following village naming rules by adding them to the [village_naming] tag of your generator instance:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Key&lt;br /&gt;
!Supported variables&lt;br /&gt;
|-&lt;br /&gt;
|name_generator=&lt;br /&gt;
|$base&lt;br /&gt;
|-&lt;br /&gt;
|lake_name_generator=&lt;br /&gt;
|$base, $lake&lt;br /&gt;
|-&lt;br /&gt;
|river_name_generator=&lt;br /&gt;
|$base, $river&lt;br /&gt;
|-&lt;br /&gt;
|bridge_name_generator=&lt;br /&gt;
|$base, $river, $bridge&lt;br /&gt;
|-&lt;br /&gt;
|grassland_name_generator=&lt;br /&gt;
|$base&lt;br /&gt;
|-&lt;br /&gt;
|forest_name_generator=&lt;br /&gt;
|$base, $forest&lt;br /&gt;
|-&lt;br /&gt;
|hill_name_generator=&lt;br /&gt;
|$base&lt;br /&gt;
|-&lt;br /&gt;
|mountain_name_generator=&lt;br /&gt;
|$base, $mountain&lt;br /&gt;
|-&lt;br /&gt;
|mountain_anon_name_generator=&lt;br /&gt;
|$base&lt;br /&gt;
|-&lt;br /&gt;
|road_name_generator=&lt;br /&gt;
|$base, $road&lt;br /&gt;
|-&lt;br /&gt;
|swamp_name_generator=&lt;br /&gt;
|$base, $swamp&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===The Cave Generator===&lt;br /&gt;
The cave generator generates a system of chambers and passages similar to the levels in dungeon crawling games like Rogue. It does not appear to have been written for multiplayer scenario game creation like the default generator was.  It is used in '''campaigns\Sceptre_of_Fire\scenarios\4_Gathering_Materials.cfg''' &amp;amp; '''campaigns\Heir_To_The_Throne\scenarios\ 17_Scepter_of_Fire.cfg '''. The data here is inferred from those scenarios and an inspection of cavegen.cpp&lt;br /&gt;
&lt;br /&gt;
To use the cave '''[generator]''' your '''[scenario]'''  tag must contain one of the following keys:&lt;br /&gt;
* '''scenario_generation=cave'''&lt;br /&gt;
* '''map_generation=cave'''&lt;br /&gt;
Here it is recommend you use ‘scenario_generation’ as there are examples to follow, though it may be possible to use’ map_generation’.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following key/tags are recognized for '''[generator]''' when the cave generator is used:&lt;br /&gt;
* '''[settings]''':  behaves as if '''[scenario]''', See [[ScenarioWML]]&lt;br /&gt;
* '''map_width''','''map_height''': size of the map to generate&lt;br /&gt;
* '''village_density''': influences number of villages&lt;br /&gt;
* '''flipx_chance''': Chance to flip x coordinates, that meens the map is mirrored at the vertical axis in its midth.&lt;br /&gt;
* '''flipy_chance''': Chance to flip y coordinates, that meens the map is mirrored at the horizontal axis in its midth.&lt;br /&gt;
* '''[chamber]''': for underground maps&lt;br /&gt;
** '''id''': a name used to identify where the passages lead.  See the [passage] tag, below.&lt;br /&gt;
** '''x''','''y''': approximate location of the center hex of the chamber.  Unfortunately it isn't always exact.  Can be a single number (x=5) or a range (x=10-20)&lt;br /&gt;
** '''size''': circular radius of the chamber, including the center hex&lt;br /&gt;
** '''jagged''': a good value is probably between 0-50 (not sure exactly)&lt;br /&gt;
** '''chance''': chance for the chamber to be generated, between 0 and 100, 100 if key not present&lt;br /&gt;
** '''[items]''': See [[ScenarioWML]].  This can contain tags normally found under [scenario] like [side], [item], and [event].  Moveto events definitely work here (using the same_location_as_previous key instead of a location filter).  Other events can be placed in the [settings] tag, above.  Locations of items will be generated randomly.  The attribute '''same_location_as_previous=yes''' means that the filter for a moveto event (see [[EventWML]]) is the same as the location of the previous item.&lt;br /&gt;
** '''[passage]''': defines a pathway between chambers&lt;br /&gt;
*** '''destination''': the id key of the destination chamber&lt;br /&gt;
*** '''windiness''': a good value is probably between 1-10&lt;br /&gt;
*** '''laziness''':&lt;br /&gt;
*** '''width''': number of hexes&lt;br /&gt;
*** '''jagged''': a good value is probably between 1-10&lt;br /&gt;
*** '''chance''': chance for the passage to be generated, between 0 and 100, 100 if key not present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== YAMG generator ===&lt;br /&gt;
&lt;br /&gt;
*** Please document me! ***&lt;br /&gt;
&lt;br /&gt;
== Infrastructure ==&lt;br /&gt;
&lt;br /&gt;
* The default generator settings are loaded from a scenario file under data/multiplayer/scenarios.&lt;br /&gt;
* mapgen_dialog overwrites these values if necessary.&lt;br /&gt;
* The create_map / create_scenario function is called by one of the following&lt;br /&gt;
** multiplayer_create_engine.cpp:394&lt;br /&gt;
** context_manager.cpp:648&lt;br /&gt;
** map_create.cpp:56&lt;br /&gt;
* A map buffer is written to res[&amp;quot;map_data&amp;quot;]&lt;br /&gt;
* the config res is passed to the calling function.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[ScenarioWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Spixi</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=MapGeneratorWML&amp;diff=57856</id>
		<title>MapGeneratorWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=MapGeneratorWML&amp;diff=57856"/>
		<updated>2016-08-07T00:07:20Z</updated>

		<summary type="html">&lt;p&gt;Spixi: /* The Default Generator */ Added changes of release 1.13.5&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Map Generator WML is used to create scenarios which are randomly generated. Of course, any scenario may reconfigure itself during a start / prestart event as much as it likes, using randomness, but the Map Generator WML has the following advantages:&lt;br /&gt;
&lt;br /&gt;
* Wesnoth has several built-in map generators which can be configured with options, and these are much better developed than any existing pure WML options.&lt;br /&gt;
* Map generation occurs before the scenario is even loaded, something which is not possible for WML events. In an mp game, the map generator code will run only on the host, side-stepping any synchronization issues, and keeping your scenario code as simple as possible.&lt;br /&gt;
* For scenarios with &amp;quot;allow_new_game=yes&amp;quot; and which use map generators, the generator may be reconfigured in the mp create screen (assuming that someone has coded a dialog for it). The user can also select to regenerate the map and get instant feedback from the minimap display.&lt;br /&gt;
&lt;br /&gt;
== Scenario vs map generation ==&lt;br /&gt;
&lt;br /&gt;
Every map generator can be used in either '''scenario_generation''' mode or '''map_generation''' mode. In map_generation mode, the generator is only used to replace the map_data of your scenario. In scenario_generation mode, the entire [scenario] tag is replaced.&lt;br /&gt;
&lt;br /&gt;
To select a map generator and mode, in your [scenario] tag you must place '''one of'''&lt;br /&gt;
* '''scenario_generation=algorithm'''&lt;br /&gt;
* '''map_generation=algorithm'''&lt;br /&gt;
where '''algorithm''' is the generator algorithm you want to use. Note that not every algorithm is designed to be use with both of these options.&lt;br /&gt;
&lt;br /&gt;
You must additionally place a [generator] tag in your scenario, which contains the options to the map generator.&lt;br /&gt;
&lt;br /&gt;
== [generator] ==&lt;br /&gt;
&lt;br /&gt;
The exact things that should be placed in [generator] depend on what algorithm you pick. There are three kinds of generators, '''default''', '''cave''', '''lua''' {{DevFeature1.13|0}}, and '''yamg''' {{DevFeature1.13|0}}.&lt;br /&gt;
&lt;br /&gt;
For which key to use and what value, see the section for the generator you want to use.&lt;br /&gt;
&lt;br /&gt;
===The lua generator===&lt;br /&gt;
The lua generator type specifies a custom map generator, which you provide via lua scripts.&lt;br /&gt;
&lt;br /&gt;
The following keys are recognized for '''[generator]''' when the lua generator is used:&lt;br /&gt;
* '''create_map''' : A lua routine which returns a string containing the new map_data. The entire contents of the '''[generator]''' are passed to the script in a lua table (see [[LuaWML]]), via the argument '''...''' (see http://www.lua.org/pil/5.2.html).&lt;br /&gt;
* '''create_scenario''' : The same, but returning a '''[scenario]''' tag for the new scenario, as a lua table.&lt;br /&gt;
&lt;br /&gt;
Any other keys are used only by the lua script.&lt;br /&gt;
&lt;br /&gt;
The following keys of the output [scenario] are specifically watched by the mp create screen:&lt;br /&gt;
* '''id'''&lt;br /&gt;
* '''name'''&lt;br /&gt;
* '''description'''&lt;br /&gt;
* '''error_message'''&lt;br /&gt;
&lt;br /&gt;
====Available Lua API====&lt;br /&gt;
Most of the usual in-game API, in the table '''wesnoth''', is not available to lua scripts. However the usual standard lua libs are available, and a random number generator object is available from the Rng table. This is an instance of the Mersenne Twister 19937 random number generator from the C++11 standard.&lt;br /&gt;
&lt;br /&gt;
* '''rng = Rng:create()''' : creates a new rng object&lt;br /&gt;
* '''rng:seed()''' : seed an rng, expects a string in hexadecimal format&lt;br /&gt;
* '''rng:draw()''' : draw a 32-bit random integer from the rng&lt;br /&gt;
&lt;br /&gt;
It is highly recomended NOT to use the math.random function in random map generators, becasue math.random breaks the 'seed' function for random map generators in the editor.&lt;br /&gt;
&lt;br /&gt;
===The Default Generator===&lt;br /&gt;
The default generator can be used to generate map data for any scenario. The data in this section is inferred from “data/multiplayer/scenarios/Random_Scenario.cfg”, usage in add-on content, and inspection of mapgen.cpp&lt;br /&gt;
&lt;br /&gt;
'''Excerpt from mapgenerator comments:'''&lt;br /&gt;
&lt;br /&gt;
* Basically we generate alot of hills, each hill being centered at a certain point, with a certain radius - being a half sphere. Hills are combined additively to form a bumpy surface. The size of each hill varies randomly from 1-hill_size. We generate 'iterations' hills in total. The range of heights is normalized to 0-1000. 'island_size' controls whether or not the map should tend toward an island shape, and if so, how large the island should be. Hills with centers that are more than 'island_size' away from the center of the map will be inverted (i.e. be valleys). 'island_size' as 0 indicates no island.&lt;br /&gt;
&lt;br /&gt;
To use the default '''[generator]''' your '''[scenario]''' tag must contain one of the following keys:&lt;br /&gt;
* '''scenario_generation=default'''&lt;br /&gt;
* '''map_generation=default'''&lt;br /&gt;
If ‘scenario_generation’ is used, the engine will expect for your entire '''[scenario]''' sub tags to be inside a '''[scenario]''' tag inside '''[generator]'''. Tags outside of this will be ignored.  There may be value in this, but at this writing, it’s not clear.&lt;br /&gt;
‘map_generation=default’ is simpler and more commonly used.  It is also necessary to use this key so that you can regenerate a map in MP game creation.&lt;br /&gt;
In its use only generator data is in the '''[generator]''' tag, all other '''[scenario]''' data is placed outside of it. The exception is if you are making an initial MP scenario available in MP game creation, for this a '''[scenario]''' tag must appear inside of '''[generator]''', containing the '''[scenario]''' subtags you want to use. See “data/multiplayer/scenarios/Random_Scenario.cfg” for an example.&lt;br /&gt;
&lt;br /&gt;
The following key/tags are recognized for '''[generator]''' when the default generator is used:&lt;br /&gt;
* '''[scenario]''': See [[ScenarioWML]]&lt;br /&gt;
* '''name'''&lt;br /&gt;
** '''default'''&lt;br /&gt;
* '''map_width''','''map_height''': size of the map to generate&lt;br /&gt;
* '''iterations''': the number of times an attempt is being made to generate a hill&lt;br /&gt;
* '''hill_size''': hills will have a random size between 1 and ''hill_size''&lt;br /&gt;
* '''max_lakes''': the number of times an attempt is being made to generate a lake&lt;br /&gt;
* '''min_lake_height''': lakes are the starting point of rivers and need to start above a certain height&lt;br /&gt;
* '''lake_size''': the size of a lake still randomly generated&lt;br /&gt;
* '''river_frequency''': determine how much a river can run uphill and thus generate more rivers&lt;br /&gt;
&lt;br /&gt;
* '''villages''': villages per 1,000 hexes&lt;br /&gt;
* '''players''': Number of starting locations for the map.&lt;br /&gt;
* '''castle_size''': Number of castle tiles (including the keep), per player.&lt;br /&gt;
* '''temperature_iterations''': Same as iterations, but for the temperature map.&lt;br /&gt;
* '''temperature_size''': Same as hill_size, but for the temperature map. (Temperature map is generated the same way as a hill map, but is hard coded with a island_size of 0.)&lt;br /&gt;
* '''roads''': number of roads the generator will attempt to make&lt;br /&gt;
* '''road_windiness''': Use 1 for the road to be made using the cheapest path (based on [road_cost] tags), higher values introduce randomness to make the road wind a bit.&lt;br /&gt;
* '''island_size''': Use 1-5 for coastal maps and 6-10 for island maps. Bigger values may crash map generation process. Bigger numbers makes more water (and less land)&lt;br /&gt;
* '''default_flatland''': If not specified, is Grassland. If your height tags don't go down to 0, the default_flatland will be used (possibly in other cases as well).&lt;br /&gt;
* '''[height]''': list of common terrain types that come in at different heights, from highest to lowest. Good WML will have the range of 1000-0 covered.&lt;br /&gt;
** '''height''': the terrain specified below will appear at this height and up.&lt;br /&gt;
** '''terrain''': 1 terrain code&lt;br /&gt;
* '''[convert]''': used to make terrain conversions. For example, water becomes ice at low temperatures, grass snow, etc. If the terrain is between the min_x and max_x it will be converted. If min_x is not defined it will default to a large negative number. If max_x is not defined it will default to a large positive number&lt;br /&gt;
** '''min_height'''&lt;br /&gt;
** '''max_height'''&lt;br /&gt;
** '''min_temperature'''&lt;br /&gt;
** '''max_temperature'''&lt;br /&gt;
** '''from''': a comma separated terrains to convert from&lt;br /&gt;
** '''to''': The terrain to convert these terrains to&lt;br /&gt;
* '''[road_cost]'''&lt;br /&gt;
** '''terrain''' 1 terrain code&lt;br /&gt;
** '''cost''': how expensive it is the create a road on this terrain, this influences the odds of this terrain getting a road&lt;br /&gt;
** '''convert_to_bridge''': a comma separated list of terrains; N/S, then NE/SW, then NW/SE.&lt;br /&gt;
** '''convert_to''': 1 terrain code (note using both ''convert_to_bridge'' and ''convert_to'' might result in unwanted results)&lt;br /&gt;
* '''[village]''': The conversion of terrains to villages&lt;br /&gt;
** '''terrain''': 1 terrain code which will be converted to a village&lt;br /&gt;
** '''convert_to''': 1 terrain code for the village&lt;br /&gt;
** '''adjacent_liked''': a comma separated terrain list. This list increases the rating for a certain location, every tile around the location will be tested against this list and for every match the rating of the location is increased. The same terrain twice in the list will double the rating increase for that location.&lt;br /&gt;
** '''rating''': chance of appearing&lt;br /&gt;
* '''[castle]''': the conversion of castles&lt;br /&gt;
** '''valid_terrain''': a comma-separated terrain list with terrains which are allowed to be converted to a castle.&lt;br /&gt;
** '''min_distance''': all castles generated must be this number of hexes apart from each other&lt;br /&gt;
* '''[naming]''': The names used to label landscape features (forests, lakes, etc.). This controls, for example, the &amp;quot;Sal&amp;quot; part of &amp;quot;Sal's Crossing&amp;quot;. If this tag is empty, those labels should be suppressed. (Due to a bug, they are not suppressed prior to 1.11.1.) The predefined macro VILLAGE_NAMES is one option for the contents of this tag. If that macro is not used, this tag takes one key.&lt;br /&gt;
** '''Changes in release 1.13.5''':&lt;br /&gt;
*** The new [[Context-free grammar|Context-free grammar name]] (CFG) generator is now supported&lt;br /&gt;
*** '''male_names''' is now deprecated. Use '''base_names''' for the Markov-chain based or '''base_name_generator''' for the CFG generator instead&lt;br /&gt;
*** It is now possible to have generator-specific overrides of the default naming rules which are defined in &amp;quot;data/english.cfg&amp;quot;. You may override the following naming rules by adding them to the [naming] tag of your generator instance:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Key&lt;br /&gt;
!Supported variables&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|bridge_name_generator=&lt;br /&gt;
|$base&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;_ &amp;lt;&amp;lt; main=$base{!}’s Bridge|$base{!}’s Crossing &amp;gt;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|road_name_generator=&lt;br /&gt;
|$base&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;_ &amp;lt;&amp;lt; main=$base{!}’s Highway|$base{!}’s Pass|Path of $base &amp;gt;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|river_name_generator=&lt;br /&gt;
|$base&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;_ &amp;lt;&amp;lt; main=$base River|River $base &amp;gt;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|forest_name_generator=&lt;br /&gt;
|$base&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;_ &amp;lt;&amp;lt; main=$base Forest|$base{!}’s Forest &amp;gt;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|lake_name_generator=&lt;br /&gt;
|$base&lt;br /&gt;
|_ &amp;lt;&amp;lt; main=$base{!} Lake &amp;gt;&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|mountain_name_generator=&lt;br /&gt;
|$base&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;_ &amp;lt;&amp;lt; main=$base{!}’s Peak|Mount $base &amp;gt;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|swamp_name_generator=&lt;br /&gt;
|$base&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;_ &amp;lt;&amp;lt; main=$base{!}’s Swamp|$base{!}marsh|$base{!}fen &amp;gt;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''[village_naming]''': The names used to label villages. This controls, for example, the &amp;quot;Fox&amp;quot; part of &amp;quot;Foxham&amp;quot;. If this tag is empty, those labels should be suppressed. (Due to a bug, they are not suppressed prior to 1.11.1.) The predefined macro VILLAGE_NAMES is one option for the contents of this tag. If that macro is not used, this tag takes one key. The village naming depends on the adjacent landscape features, e.g. a village near a forest with the name &amp;quot;Rock Forest&amp;quot; may be named &amp;quot;Rockwood&amp;quot;.&lt;br /&gt;
** '''male_names'''&lt;br /&gt;
** '''Changes in release 1.13.5''':&lt;br /&gt;
*** The new [[Context-free grammar|Context-free grammar name]] (CFG) generator is now supported&lt;br /&gt;
*** '''male_names''' is now deprecated. Use '''base_names''' for the Markov-chain based or '''base_name_generator''' for the CFG generator instead&lt;br /&gt;
*** It is now possible to have generator-specific overrides of the default village naming rules which are defined in &amp;quot;data/english.cfg&amp;quot;. You may override the following village naming rules by adding them to the [village_naming] tag of your generator instance:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Key&lt;br /&gt;
!Supported variables&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|name_generator=&lt;br /&gt;
|$base&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;_ &amp;lt;&amp;lt; main = $base{!}bury|$base{!}ham|$base{!}ton|$base{!}bury &amp;gt;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|lake_name_generator=&lt;br /&gt;
|$base, $lake&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;_ &amp;lt;&amp;lt; main=$base{!}harbor|$base{!}port|$lake{!}port|$lake{!}harbor &amp;gt;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|river_name_generator=&lt;br /&gt;
|$base, $river&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;_ &amp;lt;&amp;lt; main=$base{!}ham|$base{!}ford|$base{!}cross|$river{!}ford|$river{!}cross|$base on $river &amp;gt;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|bridge_name_generator=&lt;br /&gt;
|$base, $river, $bridge&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;_ &amp;lt;&amp;lt; main=$river{!}bridge|$river{!}bridge|$river{!}bridge|$base{!}ham|$base{!}bridge|$bridge{!}ham|$bridge{!}ton &amp;gt;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|grassland_name_generator=&lt;br /&gt;
|$base&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;_ &amp;lt;&amp;lt; main=$base{!}ham|$base{!}ton|$base{!}field &amp;gt;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|forest_name_generator=&lt;br /&gt;
|$base, $forest&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;_ &amp;lt;&amp;lt; main=$base{!}ham|$base{!}ton|$base{!}wood|$base Forest|$forest{!}wood|$forest{!}ham|$forest{!}ton &amp;gt;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|hill_name_generator=&lt;br /&gt;
|$base&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;_ &amp;lt;&amp;lt; main=$base{!}ham|$base{!}bury|$base{!}ton|$base{!}hill|$base{!}crest &amp;gt;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|mountain_name_generator=&lt;br /&gt;
|$base, $mountain&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;_ &amp;lt;&amp;lt; main=$mountain{!}mont|$mountain{!}cliff|$mountain{!}bury|$mountain{!}ham &amp;gt;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|mountain_anon_name_generator=&lt;br /&gt;
|$base&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;_ &amp;lt;&amp;lt; main=$base{!}ham|$base{!}bury|$base{!}ton|$base{!}mont|$base{!}mont|$base{!}cliff|$base{!}cliff &amp;gt;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|road_name_generator=&lt;br /&gt;
|$base, $road&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;_ &amp;lt;&amp;lt; main=$road{!}’s Rest|$road{!}’s Waypoint|$road{!}bury|$road{!}ham|$base{!}bury|$base{!}ham &amp;gt;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|swamp_name_generator=&lt;br /&gt;
|$base, $swamp&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;_ &amp;lt;&amp;lt; main=$base{!}bury|$base{!}ham|$base{!}ton|$swamp{!}bury|$swamp{!}ham|$swamp{!}ton &amp;gt;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===The Cave Generator===&lt;br /&gt;
The cave generator does not appear to have been written for multiplayer scenario game creation like the default generator was.  It is used in '''campaigns\Sceptre_of_Fire\scenarios\4_Gathering_Materials.cfg''' &amp;amp; '''campaigns\Heir_To_The_Throne\scenarios\ 17_Scepter_of_Fire.cfg '''. The data here is inferred from those scenarios and an inspection of cavegen.cpp&lt;br /&gt;
&lt;br /&gt;
To use the cave '''[generator]''' your '''[scenario]'''  tag must contain one of the following keys:&lt;br /&gt;
* '''scenario_generation=cave'''&lt;br /&gt;
* '''map_generation=cave'''&lt;br /&gt;
Here it is recommend you use ‘scenario_generation’ as there are examples to follow, though it may be possible to use’ map_generation’.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following key/tags are recognized for '''[generator]''' when the cave generator is used:&lt;br /&gt;
* '''[settings]''':  behaves as if '''[scenario]''', See [[ScenarioWML]]&lt;br /&gt;
* '''map_width''','''map_height''': size of the map to generate&lt;br /&gt;
* '''village_density''': influences number of villages&lt;br /&gt;
* '''flipx_chance''': Chance to flip x coordinates, that meens the map is mirrored at the vertical axis in its midth.&lt;br /&gt;
* '''flipy_chance''': Chance to flip y coordinates, that meens the map is mirrored at the horizontal axis in its midth.&lt;br /&gt;
* '''[chamber]''': for underground maps&lt;br /&gt;
** '''id''': a name used to identify where the passages lead.  See the [passage] tag, below.&lt;br /&gt;
** '''x''','''y''': approximate location of the center hex of the chamber.  Unfortunately it isn't always exact.  Can be a single number (x=5) or a range (x=10-20)&lt;br /&gt;
** '''size''': circular radius of the chamber, including the center hex&lt;br /&gt;
** '''jagged''': a good value is probably between 0-50 (not sure exactly)&lt;br /&gt;
** '''chance''': chance for the chamber to be generated, between 0 and 100, 100 if key not present&lt;br /&gt;
** '''[items]''': See [[ScenarioWML]].  This can contain tags normally found under [scenario] like [side], [item], and [event].  Moveto events definitely work here (using the same_location_as_previous key instead of a location filter).  Other events can be placed in the [settings] tag, above.  Locations of items will be generated randomly.  The attribute '''same_location_as_previous=yes''' means that the filter for a moveto event (see [[EventWML]]) is the same as the location of the previous item.&lt;br /&gt;
** '''[passage]''': defines a pathway between chambers&lt;br /&gt;
*** '''destination''': the id key of the destination chamber&lt;br /&gt;
*** '''windiness''': a good value is probably between 1-10&lt;br /&gt;
*** '''laziness''':&lt;br /&gt;
*** '''width''': number of hexes&lt;br /&gt;
*** '''jagged''': a good value is probably between 1-10&lt;br /&gt;
*** '''chance''': chance for the passage to be generated, between 0 and 100, 100 if key not present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== YAMG generator ===&lt;br /&gt;
&lt;br /&gt;
*** Please document me! ***&lt;br /&gt;
&lt;br /&gt;
== Infrastructure ==&lt;br /&gt;
&lt;br /&gt;
* The default generator settings are loaded from a scenario file under data/multiplayer/scenarios.&lt;br /&gt;
* mapgen_dialog overwrites these values if necessary.&lt;br /&gt;
* The create_map / create_scenario function is called by one of the following&lt;br /&gt;
** multiplayer_create_engine.cpp:394&lt;br /&gt;
** context_manager.cpp:648&lt;br /&gt;
** map_create.cpp:56&lt;br /&gt;
* A map buffer is written to res[&amp;quot;map_data&amp;quot;]&lt;br /&gt;
* the config res is passed to the calling function.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[ScenarioWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Spixi</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=LuaWML/Sides&amp;diff=57855</id>
		<title>LuaWML/Sides</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=LuaWML/Sides&amp;diff=57855"/>
		<updated>2016-08-06T18:49:25Z</updated>

		<summary type="html">&lt;p&gt;Spixi: small typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the [[LuaWML]] functions and helpers for handling sides and villages.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.sides ====&lt;br /&gt;
&lt;br /&gt;
This is not a function but a table indexed by side numbers. Its elements are proxy tables with these fields:&lt;br /&gt;
* '''side''': the side number&lt;br /&gt;
* '''gold''', '''village_gold''', '''base_income''': integers (read/write)&lt;br /&gt;
* '''total_income''': integer (read only)&lt;br /&gt;
* '''objectives''', '''user_team_name''': translatable strings (read/write)&lt;br /&gt;
* '''objectives_changed''': boolean (read/write)&lt;br /&gt;
* '''team_name''': string (read/write)&lt;br /&gt;
* '''controller''': string (read/write) :&lt;br /&gt;
:''note: In networked multiplayer, the controller attribute is ambiguous (won't be the same on all clients). Be very careful or you'll have OOS errors.''&lt;br /&gt;
: The controller attribute has 6 possible values: human, network, ai, network_ai, null, idle. &lt;br /&gt;
&lt;br /&gt;
: A local human should always be &amp;quot;human&amp;quot;, a local ai should always be &amp;quot;ai&amp;quot;, a remote human should always be &amp;quot;network&amp;quot;. and a remote ai should always be &amp;quot;network_ai&amp;quot;. An empty side should be null on all clients. &lt;br /&gt;
&lt;br /&gt;
: An idle side should appear similarly as a &amp;quot;human&amp;quot; side for all sides that don't own the idle side, i.e. as &amp;quot;network&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
: These values may be checked using lua, or the :controller command in game.&lt;br /&gt;
&lt;br /&gt;
: This value can only be set to 'human', 'ai' or 'null'.&lt;br /&gt;
* '''fog''': boolean (read)&lt;br /&gt;
* '''shroud''': boolean (read)&lt;br /&gt;
* '''hidden''': boolean (read/write)&lt;br /&gt;
* '''name''': string (read)&lt;br /&gt;
* '''faction''': {{DevFeature1.13|5}} id of the selected faction, string (multiplayer-only, read)&lt;br /&gt;
* '''faction_name''': {{DevFeature1.13|5}} name of the selected faction, string (multiplayer-only, read)&lt;br /&gt;
* '''color''': string (read/write)&lt;br /&gt;
* '''recruit''': table of strings (read/write)&lt;br /&gt;
* '''scroll_to_leader''': boolean (read/write)&lt;br /&gt;
* '''village_support''': string (read/write)&lt;br /&gt;
* '''flag''': string (read)&lt;br /&gt;
* '''flag_icon''': string (read)&lt;br /&gt;
* '''defeat_condition''': string (read/write) See description at [[SideWML]], [[ScenarioWML#Scenario_End_Conditions]]&lt;br /&gt;
* '''lost''': bool (read/write) If lost=true this side will be removed from the persitent list at the end of the scenario. This key can also be used to stop the engine from removing a side by setting it to false. Writing this key only works in a victory/defeat event.&lt;br /&gt;
* '''persistent''' {{DevFeature1.13|5}}: boolean (read/write)&lt;br /&gt;
* '''__cfg''': WML table (dump)&lt;br /&gt;
&lt;br /&gt;
The metatable of these proxy tables appears as '''&amp;quot;side&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
 local team = wesnoth.sides[1]&lt;br /&gt;
 team.gold = team.gold + 50&lt;br /&gt;
 wesnoth.message(string.format(&amp;quot;%d sides&amp;quot;, #wesnoth.sides))&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_sides ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.get_sides(''filter'')'''&lt;br /&gt;
&lt;br /&gt;
Returns a table array containing proxy tables for these sides matching the passed [[StandardSideFilter]]. The output is the same format as the wesnoth.sides table, above.&lt;br /&gt;
 --set gold to 0 for all sides with a leader&lt;br /&gt;
 local sides = wesnoth.get_sides({ {&amp;quot;has_unit&amp;quot;, { canrecruit = true }} })&lt;br /&gt;
 for i,v in ipairs(sides) do&lt;br /&gt;
     v.gold = 0&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_village_owner ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.get_village_owner(''x'', ''y'')'''&lt;br /&gt;
&lt;br /&gt;
Returns the side that owns the village at the given location.&lt;br /&gt;
&lt;br /&gt;
 local owned_by_side_1 = wesnoth.get_village_owner(12, 15) == 1&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.set_village_owner ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.set_village_owner(''x'', ''y'', ''side'', [''fire_events''])'''&lt;br /&gt;
&lt;br /&gt;
Gives ownership of the village at the given location to the given side (or remove ownership if none). Ownership is also removed if nil or 0 is passed for the third parameter, but no capture events are fired in this case.&lt;br /&gt;
An optional 4th parameter (boolean true|false, default: false) can be passed determining whether to fire any capture events.&lt;br /&gt;
&lt;br /&gt;
 wesnoth.set_village_owner(12, 15, 1)&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.is_enemy ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.is_enemy(''side1'', ''side2'')'''&lt;br /&gt;
&lt;br /&gt;
Returns true if side A is enemy of side B, false otherwise.&lt;br /&gt;
&lt;br /&gt;
 local enemy_flag = wesnoth.is_enemy(1, 3)&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.match_side ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.match_side(''side'', ''filter'')'''&lt;br /&gt;
&lt;br /&gt;
Matches a side against a given [[StandardSideFilter]].&lt;br /&gt;
&lt;br /&gt;
 wesnoth.message(tostring(wesnoth.match_side(1, {{&amp;quot;has_unit&amp;quot;, { type = &amp;quot;Troll&amp;quot; }}})))&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_starting_location ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.get_starting_location(''side'')'''&lt;br /&gt;
&lt;br /&gt;
Returns the starting location of the given side.&lt;br /&gt;
&lt;br /&gt;
 local loc = wesnoth.get_starting_location(1)&lt;br /&gt;
 wesnoth.message(string.format(&amp;quot;side 1 starts at (%u, %u)&amp;quot;, loc[1], loc[2]))&lt;br /&gt;
&lt;br /&gt;
==== helper.all_teams ====&lt;br /&gt;
&lt;br /&gt;
* '''helper.all_teams()'''&lt;br /&gt;
&lt;br /&gt;
Returns an iterator over teams that can be used in a for-in loop.&lt;br /&gt;
&lt;br /&gt;
 for team in helper.all_teams() do team.gold = 200 end&lt;br /&gt;
&lt;br /&gt;
[[Category: Lua Reference]]&lt;/div&gt;</summary>
		<author><name>Spixi</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=LuaWML/Sides&amp;diff=57854</id>
		<title>LuaWML/Sides</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=LuaWML/Sides&amp;diff=57854"/>
		<updated>2016-08-06T18:48:55Z</updated>

		<summary type="html">&lt;p&gt;Spixi: /* wesnoth.sides */ Commit a8f625f: Added faction and faction name to Lua Side proxy&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the [[LuaWML]] functions and helpers for handling sides and villages.&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.sides ====&lt;br /&gt;
&lt;br /&gt;
This is not a function but a table indexed by side numbers. Its elements are proxy tables with these fields:&lt;br /&gt;
* '''side''': the side number&lt;br /&gt;
* '''gold''', '''village_gold''', '''base_income''': integers (read/write)&lt;br /&gt;
* '''total_income''': integer (read only)&lt;br /&gt;
* '''objectives''', '''user_team_name''': translatable strings (read/write)&lt;br /&gt;
* '''objectives_changed''': boolean (read/write)&lt;br /&gt;
* '''team_name''': string (read/write)&lt;br /&gt;
* '''controller''': string (read/write) :&lt;br /&gt;
:''note: In networked multiplayer, the controller attribute is ambiguous (won't be the same on all clients). Be very careful or you'll have OOS errors.''&lt;br /&gt;
: The controller attribute has 6 possible values: human, network, ai, network_ai, null, idle. &lt;br /&gt;
&lt;br /&gt;
: A local human should always be &amp;quot;human&amp;quot;, a local ai should always be &amp;quot;ai&amp;quot;, a remote human should always be &amp;quot;network&amp;quot;. and a remote ai should always be &amp;quot;network_ai&amp;quot;. An empty side should be null on all clients. &lt;br /&gt;
&lt;br /&gt;
: An idle side should appear similarly as a &amp;quot;human&amp;quot; side for all sides that don't own the idle side, i.e. as &amp;quot;network&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
: These values may be checked using lua, or the :controller command in game.&lt;br /&gt;
&lt;br /&gt;
: This value can only be set to 'human', 'ai' or 'null'.&lt;br /&gt;
* '''fog''': boolean (read)&lt;br /&gt;
* '''shroud''': boolean (read)&lt;br /&gt;
* '''hidden''': boolean (read/write)&lt;br /&gt;
* '''name''': string (read)&lt;br /&gt;
* '''faction''': {{DevFeature1.13|5}} id of the selected faction, string (multiplayer-only, read)&lt;br /&gt;
* '''faction_name''': {{DevFeature1.13|5}} name of the selected faction, string(multiplayer-only, read)&lt;br /&gt;
* '''color''': string (read/write)&lt;br /&gt;
* '''recruit''': table of strings (read/write)&lt;br /&gt;
* '''scroll_to_leader''': boolean (read/write)&lt;br /&gt;
* '''village_support''': string (read/write)&lt;br /&gt;
* '''flag''': string (read)&lt;br /&gt;
* '''flag_icon''': string (read)&lt;br /&gt;
* '''defeat_condition''': string (read/write) See description at [[SideWML]], [[ScenarioWML#Scenario_End_Conditions]]&lt;br /&gt;
* '''lost''': bool (read/write) If lost=true this side will be removed from the persitent list at the end of the scenario. This key can also be used to stop the engine from removing a side by setting it to false. Writing this key only works in a victory/defeat event.&lt;br /&gt;
* '''persistent''' {{DevFeature1.13|5}}: boolean (read/write)&lt;br /&gt;
* '''__cfg''': WML table (dump)&lt;br /&gt;
&lt;br /&gt;
The metatable of these proxy tables appears as '''&amp;quot;side&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
 local team = wesnoth.sides[1]&lt;br /&gt;
 team.gold = team.gold + 50&lt;br /&gt;
 wesnoth.message(string.format(&amp;quot;%d sides&amp;quot;, #wesnoth.sides))&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_sides ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.get_sides(''filter'')'''&lt;br /&gt;
&lt;br /&gt;
Returns a table array containing proxy tables for these sides matching the passed [[StandardSideFilter]]. The output is the same format as the wesnoth.sides table, above.&lt;br /&gt;
 --set gold to 0 for all sides with a leader&lt;br /&gt;
 local sides = wesnoth.get_sides({ {&amp;quot;has_unit&amp;quot;, { canrecruit = true }} })&lt;br /&gt;
 for i,v in ipairs(sides) do&lt;br /&gt;
     v.gold = 0&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_village_owner ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.get_village_owner(''x'', ''y'')'''&lt;br /&gt;
&lt;br /&gt;
Returns the side that owns the village at the given location.&lt;br /&gt;
&lt;br /&gt;
 local owned_by_side_1 = wesnoth.get_village_owner(12, 15) == 1&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.set_village_owner ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.set_village_owner(''x'', ''y'', ''side'', [''fire_events''])'''&lt;br /&gt;
&lt;br /&gt;
Gives ownership of the village at the given location to the given side (or remove ownership if none). Ownership is also removed if nil or 0 is passed for the third parameter, but no capture events are fired in this case.&lt;br /&gt;
An optional 4th parameter (boolean true|false, default: false) can be passed determining whether to fire any capture events.&lt;br /&gt;
&lt;br /&gt;
 wesnoth.set_village_owner(12, 15, 1)&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.is_enemy ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.is_enemy(''side1'', ''side2'')'''&lt;br /&gt;
&lt;br /&gt;
Returns true if side A is enemy of side B, false otherwise.&lt;br /&gt;
&lt;br /&gt;
 local enemy_flag = wesnoth.is_enemy(1, 3)&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.match_side ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.match_side(''side'', ''filter'')'''&lt;br /&gt;
&lt;br /&gt;
Matches a side against a given [[StandardSideFilter]].&lt;br /&gt;
&lt;br /&gt;
 wesnoth.message(tostring(wesnoth.match_side(1, {{&amp;quot;has_unit&amp;quot;, { type = &amp;quot;Troll&amp;quot; }}})))&lt;br /&gt;
&lt;br /&gt;
==== wesnoth.get_starting_location ====&lt;br /&gt;
&lt;br /&gt;
* '''wesnoth.get_starting_location(''side'')'''&lt;br /&gt;
&lt;br /&gt;
Returns the starting location of the given side.&lt;br /&gt;
&lt;br /&gt;
 local loc = wesnoth.get_starting_location(1)&lt;br /&gt;
 wesnoth.message(string.format(&amp;quot;side 1 starts at (%u, %u)&amp;quot;, loc[1], loc[2]))&lt;br /&gt;
&lt;br /&gt;
==== helper.all_teams ====&lt;br /&gt;
&lt;br /&gt;
* '''helper.all_teams()'''&lt;br /&gt;
&lt;br /&gt;
Returns an iterator over teams that can be used in a for-in loop.&lt;br /&gt;
&lt;br /&gt;
 for team in helper.all_teams() do team.gold = 200 end&lt;br /&gt;
&lt;br /&gt;
[[Category: Lua Reference]]&lt;/div&gt;</summary>
		<author><name>Spixi</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Talk:TheDarkHordes&amp;diff=47550</id>
		<title>Talk:TheDarkHordes</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Talk:TheDarkHordes&amp;diff=47550"/>
		<updated>2012-10-07T21:27:23Z</updated>

		<summary type="html">&lt;p&gt;Spixi: Created page with 'This article seems to be orphaned - it would be great to add a link to this article in this wiki anywhere. --~~~~'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article seems to be orphaned - it would be great to add a link to this article in this wiki anywhere. --[[User:Spixi|Spixi]] 21:27, 7 October 2012 (UTC)&lt;/div&gt;</summary>
		<author><name>Spixi</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=GermanTranslationErrors&amp;diff=46596</id>
		<title>GermanTranslationErrors</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=GermanTranslationErrors&amp;diff=46596"/>
		<updated>2012-05-16T23:26:33Z</updated>

		<summary type="html">&lt;p&gt;Spixi: /* Hilfe */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hier bitte die in der Uebersetzung gefundenen Fehler eintragen.&lt;br /&gt;
&lt;br /&gt;
== Generelles ==&lt;br /&gt;
Bitte entfernt doch die ganzen Deppenleerzeichen aus dem Spiel! Es ist kein Zwergen Kämpfer, sondern ein Zwergenkämpfer. Dies betrifft fast alle Einheiten, und einige andere Teile des Spiels.&lt;br /&gt;
&lt;br /&gt;
-------------------------&lt;br /&gt;
Wesnoth 1.10.0&lt;br /&gt;
&lt;br /&gt;
Ist es so richtig, dass auf der Landkarte von Wesnoth (die im Hauptmenü) das eine Gebirge &amp;quot;Erzgebierge&amp;quot; heißt?&lt;br /&gt;
Müsste es nicht &amp;quot;Erzgebirge&amp;quot; heißen?&lt;br /&gt;
&lt;br /&gt;
Gruß Michieru&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: &amp;quot;Erzgebirge&amp;quot; wäre &amp;quot;Ore Mountains&amp;quot; auf englisch.&lt;br /&gt;
: Im Original (en-US) heißt es jedoch &amp;quot;Heart Mountains&amp;quot;.&lt;br /&gt;
: Die korrekte wörtliche Übersetzung müsste also &amp;quot;Herzgebirge&amp;quot; lauten.&lt;br /&gt;
: Die ensprechende Datei dazu ist:&lt;br /&gt;
: &amp;lt;pre&amp;gt;/data/core/images/maps/l10n/de/wesnoth--overlay.png&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: Übrigens liest sich &amp;quot;Schwarzwasser Hafen&amp;quot; ein bisschen merkwürdig. Das klingt IMO so, als hätte es mal einen König &amp;quot;Schwarzwas&amp;quot; gegeben, der dort einen Hafen errichtet hat. Die Betonung liegt bei dieser Schreibweise auf &amp;quot;Haf-&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
: Wenn man &amp;quot;Schwarzwasserhafen&amp;quot; ohne Leerzeichen schreiben würde, dann liegt die Betonung auf &amp;quot;Schwarz-&amp;quot;. Dies ist sowohl einfacher zu lesen, als auch grammatikalisch korrekter.&lt;br /&gt;
: --[[User:Spixi|Spixi]] 21:07, 30 March 2012 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Einstellungen-Dialog==&lt;br /&gt;
Wesnoth 1.10.0&lt;br /&gt;
&lt;br /&gt;
Allgemein -&amp;gt; &amp;quot;Planungsmodus bei Start aktivieren&amp;quot; [http://img1.bildupload.com/e70d2099c321144bc357ebc5c8c0728d.jpg]&lt;br /&gt;
&lt;br /&gt;
Gruß Michieru&lt;br /&gt;
&lt;br /&gt;
==Hilfe==&lt;br /&gt;
Beschreibung der Fähigkeit Heilen +4&lt;br /&gt;
&lt;br /&gt;
Ist: &amp;quot;Angrenzende eigene oder verbündete Einheiten werden zu ihres Zuges geheilt.&amp;quot;&lt;br /&gt;
Soll: &amp;quot;Angrenzende eigene oder verbündete Einheiten werden zu Beginn ihres Zuges geheilt.&amp;quot;&lt;br /&gt;
Dieser Bug tritt nur bei Heilen +4 auf, der Text bei Teilen +8 ist richtig.&lt;br /&gt;
--[[User:Spixi|Spixi]] 23:26, 16 May 2012 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Einheitenbeschreibungen==&lt;br /&gt;
&lt;br /&gt;
==Mehrspielerkarten==&lt;br /&gt;
Wesnoth 1.10.0&lt;br /&gt;
&lt;br /&gt;
Kartenbeschreibungen&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Isars Kreuz&amp;quot; [http://img1.bildupload.com/9461bf044c3bc44ccd468510e673efba.jpg]&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Freies Land&amp;quot; [http://img1.bildupload.com/ac9ed4edaaa8457bf327f4d5e7dd1c93.jpg]&lt;br /&gt;
&lt;br /&gt;
Gruß Michieru&lt;br /&gt;
&lt;br /&gt;
==Einführung==&lt;br /&gt;
&lt;br /&gt;
== Kampagnen ==&lt;br /&gt;
&lt;br /&gt;
=== Das Zepter des Feuers ===&lt;br /&gt;
&lt;br /&gt;
=== Die dunklen Künste ===&lt;br /&gt;
&lt;br /&gt;
=== Die Geschichte zweier Brüder ===&lt;br /&gt;
&lt;br /&gt;
=== Die Südwacht ===&lt;br /&gt;
&lt;br /&gt;
=== Der Thronerbe ===&lt;br /&gt;
&lt;br /&gt;
=== Der Aufstieg Wesnoths ===&lt;br /&gt;
&lt;br /&gt;
=== Die Legende von Wesmere ===&lt;br /&gt;
Wesnoth 1.10.0&lt;br /&gt;
&lt;br /&gt;
Beschreibung der Kampagne im Kampagnenmenü: [http://img1.bildupload.com/0a919dbd2fbe973bf8fb8bf8bb3c13b1.jpg]&lt;br /&gt;
&lt;br /&gt;
Gruß Michieru&lt;br /&gt;
&lt;br /&gt;
=== Ein Einmarsch der Orks ===&lt;br /&gt;
&lt;br /&gt;
=== Freiheit ===&lt;br /&gt;
Mission &amp;quot;Ringen um Recht&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
Fehler im Intro-Dialog von Maddock. Ein falsches &amp;quot;wären&amp;quot;, siehe [http://imageshack.us/f/838/wesnothtranslation.png/ hier]&lt;br /&gt;
&lt;br /&gt;
wären -&amp;gt; währen (im Sinne &amp;quot;Ehrlich währt am Längsten&amp;quot;). Gruß Crommy&lt;br /&gt;
&lt;br /&gt;
=== Invasion der Finsternis ===&lt;br /&gt;
&lt;br /&gt;
=== Schwarzauges Sohn ===&lt;br /&gt;
&lt;br /&gt;
=== Unter brennenden Sonnen ===&lt;br /&gt;
&lt;br /&gt;
=== Wiedergeburt des Nordens ===&lt;br /&gt;
&lt;br /&gt;
=== Der Hammer von Thursagan ===&lt;br /&gt;
&lt;br /&gt;
=== Delfadors Memoiren ===&lt;br /&gt;
&lt;br /&gt;
=== Stille Wasser ===&lt;br /&gt;
Beim Durchspielen fiel mir im SKlavenhalterszenario folgendes auf: &lt;br /&gt;
&lt;br /&gt;
Telöe ist im Bild ein Mann, Krellis spricht von einer &amp;quot;Meerjungfrau&amp;quot; also besser hier mit &amp;quot;Meermensch&amp;quot; übersetzen.&lt;br /&gt;
&lt;br /&gt;
Im selben Dialog - Gwabbo &amp;quot;ihr habt eurem Volk aus der Seele gesprochen&amp;quot; besser &amp;quot;Ihr sprecht eurem Volk aus der Seele&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Im selben Dialog: Sprecher &amp;quot;hießen das Ultimatum willkommen&amp;quot; kommt irgednwie aus dem nichts - besser &amp;quot; akzeptierten das Unausweichliche und &amp;quot; usw.&lt;br /&gt;
&lt;br /&gt;
Gruß Crommy&lt;br /&gt;
&lt;br /&gt;
== Siehe auch ==&lt;br /&gt;
&lt;br /&gt;
* [[GermanTranslation|Hauptseite für deutsche Übersetzung]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Translations]]&lt;/div&gt;</summary>
		<author><name>Spixi</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=GermanTranslationErrors&amp;diff=45942</id>
		<title>GermanTranslationErrors</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=GermanTranslationErrors&amp;diff=45942"/>
		<updated>2012-03-30T21:07:32Z</updated>

		<summary type="html">&lt;p&gt;Spixi: /* Generelles */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hier bitte die in der Uebersetzung gefundenen Fehler eintragen.&lt;br /&gt;
&lt;br /&gt;
== Generelles ==&lt;br /&gt;
Bitte entfernt doch die ganzen Deppenleerzeichen aus dem Spiel! Es ist kein Zwergen Kämpfer, sondern ein Zwergenkämpfer. Dies betrifft fast alle Einheiten, und einige andere Teile des Spiels.&lt;br /&gt;
&lt;br /&gt;
-------------------------&lt;br /&gt;
Wesnoth 1.10.0&lt;br /&gt;
&lt;br /&gt;
Ist es so richtig, dass auf der Landkarte von Wesnoth (die im Hauptmenü) das eine Gebirge &amp;quot;Erzgebierge&amp;quot; heißt?&lt;br /&gt;
Müsste es nicht &amp;quot;Erzgebirge&amp;quot; heißen?&lt;br /&gt;
&lt;br /&gt;
Gruß Michieru&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: &amp;quot;Erzgebirge&amp;quot; wäre &amp;quot;Ore Mountains&amp;quot; auf englisch.&lt;br /&gt;
: Im Original (en-US) heißt es jedoch &amp;quot;Heart Mountains&amp;quot;.&lt;br /&gt;
: Die korrekte wörtliche Übersetzung müsste also &amp;quot;Herzgebirge&amp;quot; lauten.&lt;br /&gt;
: Die ensprechende Datei dazu ist:&lt;br /&gt;
: &amp;lt;pre&amp;gt;/data/core/images/maps/l10n/de/wesnoth--overlay.png&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: Übrigens liest sich &amp;quot;Schwarzwasser Hafen&amp;quot; ein bisschen merkwürdig. Das klingt IMO so, als hätte es mal einen König &amp;quot;Schwarzwas&amp;quot; gegeben, der dort einen Hafen errichtet hat. Die Betonung liegt bei dieser Schreibweise auf &amp;quot;Haf-&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
: Wenn man &amp;quot;Schwarzwasserhafen&amp;quot; ohne Leerzeichen schreiben würde, dann liegt die Betonung auf &amp;quot;Schwarz-&amp;quot;. Dies ist sowohl einfacher zu lesen, als auch grammatikalisch korrekter.&lt;br /&gt;
: --[[User:Spixi|Spixi]] 21:07, 30 March 2012 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Einstellungen-Dialog==&lt;br /&gt;
Wesnoth 1.10.0&lt;br /&gt;
&lt;br /&gt;
Allgemein -&amp;gt; &amp;quot;Planungsmodus bei Start aktivieren&amp;quot; [http://img1.bildupload.com/e70d2099c321144bc357ebc5c8c0728d.jpg]&lt;br /&gt;
&lt;br /&gt;
Gruß Michieru&lt;br /&gt;
&lt;br /&gt;
==Hilfe==&lt;br /&gt;
&lt;br /&gt;
==Einheitenbeschreibungen==&lt;br /&gt;
&lt;br /&gt;
==Mehrspielerkarten==&lt;br /&gt;
Wesnoth 1.10.0&lt;br /&gt;
&lt;br /&gt;
Kartenbeschreibungen&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Isars Kreuz&amp;quot; [http://img1.bildupload.com/9461bf044c3bc44ccd468510e673efba.jpg]&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Freies Land&amp;quot; [http://img1.bildupload.com/ac9ed4edaaa8457bf327f4d5e7dd1c93.jpg]&lt;br /&gt;
&lt;br /&gt;
Gruß Michieru&lt;br /&gt;
&lt;br /&gt;
==Einführung==&lt;br /&gt;
&lt;br /&gt;
== Kampagnen ==&lt;br /&gt;
&lt;br /&gt;
=== Das Zepter des Feuers ===&lt;br /&gt;
&lt;br /&gt;
=== Die dunklen Künste ===&lt;br /&gt;
&lt;br /&gt;
=== Die Geschichte zweier Brüder ===&lt;br /&gt;
&lt;br /&gt;
=== Die Südwacht ===&lt;br /&gt;
&lt;br /&gt;
=== Der Thronerbe ===&lt;br /&gt;
&lt;br /&gt;
=== Der Aufstieg Wesnoths ===&lt;br /&gt;
&lt;br /&gt;
=== Die Legende von Wesmere ===&lt;br /&gt;
Wesnoth 1.10.0&lt;br /&gt;
&lt;br /&gt;
Beschreibung der Kampagne im Kampagnenmenü: [http://img1.bildupload.com/0a919dbd2fbe973bf8fb8bf8bb3c13b1.jpg]&lt;br /&gt;
&lt;br /&gt;
Gruß Michieru&lt;br /&gt;
&lt;br /&gt;
=== Ein Einmarsch der Orks ===&lt;br /&gt;
&lt;br /&gt;
=== Freiheit ===&lt;br /&gt;
Mission &amp;quot;Ringen um Recht&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
Fehler im Intro-Dialog von Maddock. Ein falsches &amp;quot;wären&amp;quot;, siehe [http://imageshack.us/f/838/wesnothtranslation.png/ hier]&lt;br /&gt;
&lt;br /&gt;
wären -&amp;gt; währen (im Sinne &amp;quot;Ehrlich währt am Längsten&amp;quot;). Gruß Crommy&lt;br /&gt;
&lt;br /&gt;
=== Invasion der Finsternis ===&lt;br /&gt;
&lt;br /&gt;
=== Schwarzauges Sohn ===&lt;br /&gt;
&lt;br /&gt;
=== Unter brennenden Sonnen ===&lt;br /&gt;
&lt;br /&gt;
=== Wiedergeburt des Nordens ===&lt;br /&gt;
&lt;br /&gt;
=== Der Hammer von Thursagan ===&lt;br /&gt;
&lt;br /&gt;
=== Delfadors Memoiren ===&lt;br /&gt;
&lt;br /&gt;
=== Stille Wasser ===&lt;br /&gt;
Beim Durchspielen fiel mir im SKlavenhalterszenario folgendes auf: &lt;br /&gt;
&lt;br /&gt;
Telöe ist im Bild ein Mann, Krellis spricht von einer &amp;quot;Meerjungfrau&amp;quot; also besser hier mit &amp;quot;Meermensch&amp;quot; übersetzen.&lt;br /&gt;
&lt;br /&gt;
Im selben Dialog - Gwabbo &amp;quot;ihr habt eurem Volk aus der Seele gesprochen&amp;quot; besser &amp;quot;Ihr sprecht eurem Volk aus der Seele&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Im selben Dialog: Sprecher &amp;quot;hießen das Ultimatum willkommen&amp;quot; kommt irgednwie aus dem nichts - besser &amp;quot; akzeptierten das Unausweichliche und &amp;quot; usw.&lt;br /&gt;
&lt;br /&gt;
Gruß Crommy&lt;br /&gt;
&lt;br /&gt;
== Siehe auch ==&lt;br /&gt;
&lt;br /&gt;
* [[GermanTranslation|Hauptseite für deutsche Übersetzung]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Translations]]&lt;/div&gt;</summary>
		<author><name>Spixi</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SpellingMistakes&amp;diff=45938</id>
		<title>SpellingMistakes</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SpellingMistakes&amp;diff=45938"/>
		<updated>2012-03-30T18:44:31Z</updated>

		<summary type="html">&lt;p&gt;Spixi: Titel screen: German overlay&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is meant to be a list of spelling mistakes in campaigns and other translatable texts in the en_US development version of the game.&lt;br /&gt;
&lt;br /&gt;
Note: The house style of Wesnoth uses a good many words and constructions that are archaic, poetic, or dialectal. If you speak modern English as a second language you may incorrectly read these as errors.  Please see [[NotSpellingMistakes]] for a list of things you will encounter that may look like spelling or usage errors but are not. Note that the mainline campaigns are now using correct typography, including sexed quotes and en and em dashes. These will appear as three byte sequences if you are not using a viewer that supports UTF-8.&lt;br /&gt;
&lt;br /&gt;
==Mainline Campaigns==&lt;br /&gt;
&lt;br /&gt;
===An Orcish Incursion===&lt;br /&gt;
&lt;br /&gt;
===Dead Water===&lt;br /&gt;
&lt;br /&gt;
===Delfador’s Memoirs===&lt;br /&gt;
&lt;br /&gt;
===Descent into Darkness===&lt;br /&gt;
&lt;br /&gt;
===Eastern Invasion===&lt;br /&gt;
&lt;br /&gt;
===Heir to the Throne===&lt;br /&gt;
&lt;br /&gt;
===Liberty===&lt;br /&gt;
&lt;br /&gt;
===Northern Rebirth===&lt;br /&gt;
&lt;br /&gt;
===Sceptre of Fire===&lt;br /&gt;
&lt;br /&gt;
===Son of the Black Eye===&lt;br /&gt;
&lt;br /&gt;
===The Hammer of Thursagan===&lt;br /&gt;
&lt;br /&gt;
===The Legend of Wesmere===&lt;br /&gt;
&lt;br /&gt;
===The Rise of Wesnoth===&lt;br /&gt;
&lt;br /&gt;
===The South Guard===&lt;br /&gt;
&lt;br /&gt;
===Two Brothers===&lt;br /&gt;
&lt;br /&gt;
===Under the Burning Suns===&lt;br /&gt;
&lt;br /&gt;
S6a, line 685 in the .cfg: seems to be missing a verb: ''&amp;quot;[...] but I will '''''???''''' once you finish your mission.&amp;quot;'' Maybe &amp;quot;return&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
==Wesnoth Game==&lt;br /&gt;
&lt;br /&gt;
===Editor===&lt;br /&gt;
&lt;br /&gt;
===Help===&lt;br /&gt;
&lt;br /&gt;
===Tutorial===&lt;br /&gt;
&lt;br /&gt;
===Manual===&lt;br /&gt;
&lt;br /&gt;
===Manpages===&lt;br /&gt;
&lt;br /&gt;
===Units===&lt;br /&gt;
&lt;br /&gt;
===1.10 Announcement===&lt;br /&gt;
&lt;br /&gt;
===Other (unit descriptions, ...)===&lt;br /&gt;
src/tools/validator/validator_tool.cpp:46 an extra ] appearing in the help of the schema validator tool (&amp;lt;tt&amp;gt;schema_validator -h&amp;lt;/tt&amp;gt;):&lt;br /&gt;
 usage: ./schema_validator [-hV] [-s &amp;lt;schema_file&amp;gt;] ]&lt;br /&gt;
The line 46 should be:&lt;br /&gt;
                     &amp;lt;&amp;lt; &amp;quot; [-hV] [-i &amp;lt;input_file&amp;gt;] [-s &amp;lt;schema_file&amp;gt;]\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
====Title screen overlay: /data/core/images/maps/l10n/de/wesnoth--overlay.png====&lt;br /&gt;
In the German map overlay &amp;quot;Heart Mountains&amp;quot; is translated with &amp;quot;Erzgebierge&amp;quot;.&lt;br /&gt;
* As a native German speaker I know that &amp;quot;Gebirge&amp;quot; is spelled with a single &amp;quot;i&amp;quot;, not with an &amp;quot;ie&amp;quot;.&lt;br /&gt;
* Translated literally &amp;quot;Erzgebirge&amp;quot; means &amp;quot;Ore Mountains&amp;quot;.&lt;br /&gt;
* However I feel that the correct translation must be &amp;quot;Herzgebirge&amp;quot;, since &amp;quot;Herz&amp;quot; is the German word for &amp;quot;heart&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Multiplayer maps===&lt;br /&gt;
&lt;br /&gt;
===Translation code bugs===&lt;br /&gt;
&lt;br /&gt;
==Unofficial campaigns==&lt;br /&gt;
&lt;br /&gt;
===Invasion from the Unknown===&lt;/div&gt;</summary>
		<author><name>Spixi</name></author>
		
	</entry>
</feed>