https://wiki.wesnoth.org/api.php?action=feedcontributions&user=Xudojnik&feedformat=atomThe Battle for Wesnoth Wiki - User contributions [en]2024-03-29T04:56:43ZUser contributionsMediaWiki 1.31.16https://wiki.wesnoth.org/index.php?title=Nested_Quoted_String&diff=55833Nested Quoted String2014-11-02T12:32:37Z<p>Xudojnik: Redirected page to NestedQuotedString</p>
<hr />
<div>#REDIRECT [[NestedQuotedString]]</div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=NestedQuotedString&diff=55832NestedQuotedString2014-11-02T07:51:44Z<p>Xudojnik: spelling</p>
<hr />
<div>== Nested quoted string ==<br />
If your add-on produces an error on the loading stage, and it looks like the quote below, then you can find a solution to your problem here.<br />
<br />
'''Nested quoted string'''<br />
at core/macros/image-utils.cfg:28 <br />
included from ai/ais/ai_default_rca_strong.cfg:2<br />
included from _main.cfg:30<br />
included from ~add-ons/Add-on_Name/scenarios/01_Scenario.cfg:62<br />
included from ~add-ons/Add-on_Name/_main.cfg:36<br />
<br />
This error message consist of three parts:<br />
* '''Error name.'''. In this case, it is "Nested quoted string".<br />
* (upper) list of mainline files, which are core of the Battle for Wesnoth<br />
* (lower) list of ''your add-on files''. Their names are usually started from "~add-ons/Add-on_Name", where Add-on_Name is the name of folder, which contains your add-on codebase.<br />
<br />
'''Source of the error''' is some string, which misses double quote sign at the end.<br />
<br />
For example:<br />
caption = _"Welcome to Wesnoth!<br />
speaker = narrator<br />
<br />
There is no double quote sign at the end of caption value. In the other example, "message" key contains a multi-string value and lacks a double quote sign too:<br />
<br />
message = _"For this tutorial, you are playing Konrad.<br />
You are standing in the keep, and your mentor Delfador is on the east side of the river.<br />
speaker = narrator<br />
<br />
'''To find source of the error,''' you need to check the listed files from the upper one to the lower one. If you hadn't modified core files by yourself, then you can skip all mainline files listed in second part of the error message. Your add-on file names are started from: ~add-ons/Add-on_Name/scenarios/01_Scenario.cfg and ends with ~add-ons/Add-on_Name/_main.cfg<br />
<br />
In each file, go to the line, which number is written after the name of the file. For ~add-ons/Add-on_Name/scenarios/01_Scenario.cfg you need to go to line 62. Then start looking upwards. If you haven't found the source of the problem in this file, then check the next file in similar manner.<br />
<br />
'''To fix this error''' you need to add a closing quote for string, which produced the problem. For first example in this tutorial it will look like:<br />
caption= _"Welcome to Wesnoth!"<br />
speaker = narrator<br />
<br />
Pay attention to the closing quote at the end of the string.<br />
<br />
message = _"For this tutorial, you are playing Konrad.<br />
You are standing in the keep, and your mentor Delfador is on the east side of the river."<br />
speaker = narrator<br />
<br />
The closing quote should be at the end of ''second'' string. If you add a double quote at the end of the first string of "message" value, then you produce the other error.<br />
<br />
[[Category: WML Tips]]</div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=NestedQuotedString&diff=55829NestedQuotedString2014-11-01T21:41:53Z<p>Xudojnik: Created page with "== Nested quoted string == If your add-on produce error on loading stage and it looks like quote below, then you can find solution to your problem here. '''Nested quoted st..."</p>
<hr />
<div>== Nested quoted string ==<br />
If your add-on produce error on loading stage and it looks like quote below, then you can find solution to your problem here.<br />
<br />
'''Nested quoted string'''<br />
at core/macros/image-utils.cfg:28 <br />
included from ai/ais/ai_default_rca_strong.cfg:2<br />
included from _main.cfg:30<br />
included from ~add-ons/Add-on_Name/scenarios/01_Scenario.cfg:62<br />
included from ~add-ons/Add-on_Name/_main.cfg:36<br />
<br />
This error message consist of three parts:<br />
* '''Error name.'''. In this case it is "Nested quoted string".<br />
* (upper) list of mainline files, which are core of Battle for Wesnoth<br />
* (lower) list of ''your add-on files''. Their names are usually started from "~add-ons/Add-on_Name", where Add-on_Name is the name of folder, which contains your add-on codebase.<br />
<br />
<br />
'''Source of the error''' is some string, which misses double quote sign at the end.<br />
<br />
For example:<br />
caption = _"Welcome to Wesnoth!<br />
speaker = narrator<br />
<br />
There is no double quote sign in the end of caption value. In other example, "message" key contains multi-string value and lacks double quote sign too:<br />
<br />
message = _"For this tutorial, you are playing Konrad.<br />
You are standing in the keep, and your mentor Delfador is on the east side of the river.<br />
speaker = narrator<br />
<br />
'''To find source of the error,''' you need to check listed files from upper one to lower one. If you hadn't modified core files by yourself, then you can skip all mainline files listed in second part of the error message. Your add-on are started from: ~add-ons/Add-on_Name/scenarios/01_Scenario.cfg and ends with ~add-ons/Add-on_Name/_main.cfg<br />
<br />
In each file, go to line, which number is written after name of the file. For ~add-ons/Add-on_Name/scenarios/01_Scenario.cfg you need to go to line 62. Then start looking upwards. If you haven't found the source of the problem in this file, then check next file in similar manner.<br />
<br />
'''To fix this error''' you need to add closing qoute for string, which produce the problem. For first example in this tutorial it will look like:<br />
caption= _"Welcome to Wesnoth!"<br />
speaker = narrator<br />
<br />
Pay attention to the closing quote in the end of the string.<br />
<br />
message = _"For this tutorial, you are playing Konrad.<br />
You are standing in the keep, and your mentor Delfador is on the east side of the river."<br />
speaker = narrator<br />
<br />
Closing quote should be on the end of ''second'' string. If you add double quote at the end of the first string of "message" value, then you produce other error.<br />
<br />
[[Category: WML Tips]]</div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=WesnothTranslationsHowTo&diff=55820WesnothTranslationsHowTo2014-10-30T16:29:04Z<p>Xudojnik: typo</p>
<hr />
<div>This page contains information on how-to translate and submit translation updates.<br />
<br />
== How to submit your translations ==<br />
<br />
Important: Please '''do not submit translations as pull requests''' on the Wesnoth github repository site. While that seems like a good idea, it causes potential complications that we cannot always easily resolve. As a result, we cannot accept translations submitted via pull request and will close such PRs immediately.<br />
<br />
'' ''' Translation Maintainers ''' ''<br />
<br />
The translation maintainers should send the updated/new translation<br />
po-files to the language coordinator:<br />
Ivanovic (crazy-ivanovic AT gmx DOT net).<br />
Additionally they have to quickly check over other people's translations<br />
(other people translating the same language) as the other translators<br />
(if any) will have to send their translations to their language maintainer<br />
before inclusion in the source-code repository. You should also subscribe to the [http://www.wesnoth.org/wiki/WesnothTranslations#Mailing_List wesnoth-i18n mailinglist].<br />
<br />
Send the files as an archive containing the complete .po files (no .mo or .gmo files) and ensure that they follow the directory structure used in version control. For example, the archive with the German (de) translations should therefore be structured as follows:<br />
wesnoth/de.po<br />
wesnoth-httt/de.po <br />
wesnoth-tutorial/de.po<br />
etc.<br />
<br />
'' ''' Translators ''' ''<br />
<br />
The other translators (those who are not maintainers) should contact<br />
the maintainer for their language to see if there is some work to do.<br />
After you have done some work on the translation you should email it<br />
to your language maintainer. He/she will then (if needed) check it over<br />
before sending it on to the language coordinators. A list of all translators<br />
currently working on a language is found on each language page.<br />
<br />
'' ''' NEW Translators ''' ''<br />
<br />
If you want to help out with the translation of an language already started on,<br />
contact the translation maintainer for the language.<br />
If you want to start translation of Wesnoth to a new language,<br />
first contact Ivanovic.<br />
And then just follow the instructions written in '' Translators '' .<br />
<br />
== Translations How-To ==<br />
<br />
Notes:<br />
* If you haven't got Wesnoth from the source-code repository, start out by doing so. Take a look at [[WesnothRepository]] for instructions about that.<br />
* The old translation system, using cfg files and some wesnoth-specific tools (make_translation, merge_translation, weslang) was abandoned in the 0.8.3 release of Wesnoth in favor of the standard [[GetText|GNU GetText]] system.<br />
* Info about how the two branches do work can be found in the [http://www.wesnoth.org/forum/viewtopic.php?t=7618 Forum].<br />
<br />
If you are a translator, see [[GettextForTranslators]] for more information.<br />
<br />
If you are a developer, gettext internals for Wesnoth are discussed here: [[GettextForWesnothDevelopers]].<br />
<br />
== Specifying typefaces and fonts for a translation ==<br />
<br />
Translations in a language which mainly uses characters outside of the Latin1 character set may want to specify different typefaces. In the translatable strings, there is a string named<br />
"DejaVuSans.ttf,wqy-zenhei.ttc"<br />
which specifies the order in which fonts are to be tried, for each character, before the program finds a font which contains this character: the font appearing first in the list is tried first. Translators may change this string in the translation.<br />
For example, it would be a good idea to specify first a font which contains all the characters generally used in the target language. This is especially important for translations into Asian languages.<br />
If you have to add a font that is not listed in the main font list, just add it in your translation of this string and do '''not''' alter the original string (or your translation of the string won't work...).<br />
<br />
== See Also ==<br />
* [[GettextForTranslators]]<br />
* [[WesnothTranslations]]<br />
* [[TranslatorsGuide]]<br />
* [http://gettext.wesnoth.org Translation statistics]<br />
* [[TranslationSpellcheckingOnWindows]]<br />
<br />
[[Category:Translations]]</div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Template:Documentation&diff=55810Template:Documentation2014-10-26T15:01:13Z<p>Xudojnik: </p>
<hr />
<div><div class="template-documentation" style="margin-top:1em;">{{#if:{{{heading|defaultnotblank}}}|<div style="padding-bottom:3px; border-bottom:1px solid #aaa; margin-bottom:1ex;"><br />
<span class="editsection plainlinks">[[{{fullurl:{{{1|{{SUBJECTPAGENAME}}/doc}}}|action=edit{{#ifexist: {{{1|{{SUBJECTSPACE}}:{{SUBJECTPAGENAME}}/doc}}} ||&preload=Template:Documentation/preload}}}} edit]]</span><br />
<span style="font-size: 150%">{{{heading|Documentation}}}</span></div>}}<br />
<div id="template_doc_page_transcluded" class="dablink plainlinks">''This [[Wikipedia:Template documentation|documentation]] is [[Wikipedia:Transclusion|transcluded]] from [[{{{1|{{FULLPAGENAME}}/doc}}}]].'' <small>([[{{{1|{{SUBJECTPAGENAME}}/doc}}}|view]] | [{{fullurl:{{{1|{{SUBJECTPAGENAME}}/doc}}}|action=edit{{#ifexist: {{{1|{{SUBJECTSPACE}}:{{SUBJECTPAGENAME}}/doc}}} ||&preload=Template:Documentation/preload}}}} edit] | [{{fullurl:{{{1|{{SUBJECTPAGENAME}}/doc}}}|action=history}} history])</small> {{#ifexist: {{#rel2abs: /sandbox }} | {{#ifexist: {{#rel2abs: /testcases}} | <br> ''This template has a [[{{FULLPAGENAME}}/sandbox|sandbox]]'' <small>([{{fullurl:{{FULLPAGENAME}}/sandbox|action=edit}} edit])</small> ''and [[{{FULLPAGENAME}}/testcases|testcases]] for editors to experiment.''}}<!-- else don't show when just 1 of /sandbox or /testcases exists -->}} </div>{{{{{1|{{SUBJECTPAGENAME}}/doc}}}}} <div style="clear:both;" /></div></div><br />
<noinclude>[[Category:Templates]]</noinclude></div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Template:PD_Help_Page&diff=55808Template:PD Help Page2014-10-26T14:52:56Z<p>Xudojnik: </p>
<hr />
<div><div style="color:#000000; border:solid 1px #A8A8A8; padding:0.5em 1em 0.5em 0.7em; margin:0.5em 0.5em 0.5em 0.5em; background-color:#FFFFFF;font-size:95%; vertical-align:middle;"><br />
{|<br />
| '''Important note:''' When you edit this page, you agree to release your contribution into the [[:en:Public domain|public domain]]. If you don't want this or can't do this because of license restrictions, please don't edit. This page is one of the [[Project:PD help|Public Domain Help Pages]], which can be freely copied into fresh wiki installations and/or distributed with MediaWiki software; see [[Help:Contents]] for an overview of all pages.<br />
|}</div><br />
<noinclude>[[Category:Templates|{{PAGENAME}}]]</noinclude></div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Template:PD_Help_Page&diff=55807Template:PD Help Page2014-10-26T14:52:17Z<p>Xudojnik: </p>
<hr />
<div><div style="color:#000000; border:solid 1px #A8A8A8; padding:0.5em 1em 0.5em 0.7em; margin:0.5em 0.5em 0.5em 0.5em; background-color:#FFFFFF;font-size:95%; vertical-align:middle;"><br />
{|<br />
| '''Important note:''' When you edit this page, you agree to release your contribution into the [[:en:Public domain|public domain]]. If you don't want this or can't do this because of license restrictions, please don't edit. This page is one of the [[Project:PD help|Public Domain Help Pages]], which can be freely copied into fresh wiki installations and/or distributed with MediaWiki software; see [[Help:Contents]] for an overview of all pages.<br />
|}</div><br />
<noinclude>{{Languages|Template:PD Help Page}}[[Category:Templates|{{PAGENAME}}]]</noinclude></div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Template:GPL&diff=55805Template:GPL2014-10-26T14:48:24Z<p>Xudojnik: </p>
<hr />
<div><br style="clear:both;" /><br />
{| align="center" style="width:95%; background-color:#f8f8f8; border:2px solid #e0e0e0; padding:5px;"<br />
|-<br />
| align="center" | ''This work is'' '''''[[w:Free software|free software]]'''''; ''you can redistribute it and/or modify it under the terms of the '''[http://www.gnu.org/copyleft/gpl.html GNU General Public License]''' as published by the [[w:Free Software Foundation|Free Software Foundation]]; either version 2 of the license, or (at your option) any later version. This work is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.''<br />
|}<br />
<includeonly>[[Category:GPL images|{{PAGENAME}}]]</includeonly><br />
<noinclude>[[Category:Templates|{{PAGENAME}}]]</noinclude></div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Template:GFDL&diff=55804Template:GFDL2014-10-26T14:48:02Z<p>Xudojnik: </p>
<hr />
<div><br style="clear:both;" /><br />
{| align="center" style="width:95%; background-color:#f8f8f8; border:2px solid #e0e0e0; padding:5px;"<br />
|-<br />
| align="center" | ''Permission is granted to copy, distribute and/or modify this document under the terms of the '''[[w:GNU Free Documentation License|GNU Free Documentation License]]''', Version 1.2 or any later version published by the [[w:Free Software Foundation|Free Software Foundation]]; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "[[GNU Free Documentation License|Text of the GNU Free Documentation License]]."'' {{languages|Template:GFDL}}<br />
|}<br />
<includeonly>[[Category:GFDL images|{{PAGENAME}}]]</includeonly><br />
<noinclude>[[Category:Templates|{{PAGENAME}}]]</noinclude></div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Template:PD&diff=55803Template:PD2014-10-26T14:47:35Z<p>Xudojnik: </p>
<hr />
<div><br style="clear:both;" /><br />
{| align="center" style="width:95%; background-color:#f8f8f8; border:2px solid #e0e0e0; padding:5px;"<br />
|-<br />
| align="center" | ''This file has been released into the '''[[w:public domain|public domain]]''' by the [[w:Copyrights|copyright]] holder, its copyright has expired, or it is ineligible for copyright. This applies worldwide.''<br />
|}<br />
<includeonly>[[Category:PD images|{{PAGENAME}}]]</includeonly><br />
<noinclude>[[Category:Templates|{{PAGENAME}}]]</noinclude></div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Template:Thankyou&diff=55802Template:Thankyou2014-10-26T14:42:34Z<p>Xudojnik: </p>
<hr />
<div><noinclude>{{Delete}}</noinclude><br />
<div class="noprint" style="float:right; border:1px solid blue;width:200px;background-color:#fff;padding:3px;"><br />
'''A little thank you...''' <br /><small>for {{{1}}}. <br />hugs, {{{2}}}</small><br />
</div><br />
<noinclude>[[Category:Templates]]</noinclude></div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Template:Thankyou&diff=55801Template:Thankyou2014-10-26T14:42:12Z<p>Xudojnik: Looks useless</p>
<hr />
<div>{{Delete}}<br />
<div class="noprint" style="float:right; border:1px solid blue;width:200px;background-color:#fff;padding:3px;"><br />
'''A little thank you...''' <br /><small>for {{{1}}}. <br />hugs, {{{2}}}</small><br />
</div><br />
<noinclude>[[Category:Templates]]</noinclude></div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Template:CreatorsGuideNavbox&diff=55798Template:CreatorsGuideNavbox2014-10-26T14:32:55Z<p>Xudojnik: </p>
<hr />
<div><div class="navtemplate" style="box-sizing: border-box; min-height: /* 72-4.5 */ 67.5px; padding: 1em .75em 0 1.5em;"><br />
<div style="position: relative; top: -2.25px; margin: -2.25px 0; float:right;">https://raw.github.com/wesnoth/wesnoth/master/data/core/images/terrain/village/human3.png</div><b style="font-size:1.25em">Creator's Guide</b><br />
<p style="margin: .5em 0 0 .5em">[[AddonStructure|Add-on Structure]] • [[BuildingMaps|Maps]] • [[BuildingScenarios|Scenarios]] • [[BuildingCampaigns|Campaigns]] • [[MultiplayerContent|Multiplayer]] • [[BuildingUnits|Units]] • [[Distributing_content|Distributing Content]]</p><br />
</div><includeonly>[[Category:Create]]</includeonly><noinclude>{{template}}</noinclude><br />
<noinclude>[[Category:Templates]]</noinclude></div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Template:DevDownload&diff=55797Template:DevDownload2014-10-26T14:29:11Z<p>Xudojnik: Added category</p>
<hr />
<div><noinclude><br />
== Development (1.11 branch) ==<br />
==== Source code ====<br />
</noinclude><br />
* [http://sourceforge.net/projects/wesnoth/files/wesnoth/wesnoth-1.11.18/wesnoth-1.11.18.tar.bz2/download {{{1|Current Version}}}] (1.11.18, 384.8 MB)<br />
* [http://sourceforge.net/projects/wesnoth/files/wesnoth/wesnoth-1.11.18/wesnoth-1.11.18.tar.bz2.md5/download {{{3|md5sum for current source code}}}]<br />
* [http://sourceforge.net/projects/wesnoth/files/wesnoth/wesnoth-1.11.17/wesnoth-1.11.17.tar.bz2/download {{{2|Previous Version}}}] (1.11.17, 384.7 MB)<br />
<br />
==== MS Windows {{{4|}}} ====<br />
* [http://sourceforge.net/projects/wesnoth/files/wesnoth/wesnoth-1.11.18/wesnoth-1.11.18-win32.exe/download {{{1|Current Version}}}] (1.11.18, 354.9 MB)<br />
* [http://sourceforge.net/projects/wesnoth/files/wesnoth/wesnoth-1.11.17/wesnoth-1.11.17-win32.exe/download {{{2|Previous Version}}}] (1.11.17, 354.5 MB)<br />
<br />
==== Apple OS X (10.5+) {{{5|}}} ====<br />
* [http://sourceforge.net/projects/wesnoth/files/wesnoth/wesnoth-1.11.18/Wesnoth_1.11.18.dmg/download {{{1|Current Version}}}] (1.11.18, 385.0 MB)<br />
* [http://sourceforge.net/projects/wesnoth/files/wesnoth/wesnoth-1.11.17/Wesnoth_1.11.17.dmg/download {{{2|Previous Version}}}] (1.11.17, 384.6 MB)<br />
<br />
==== OpenPandora {{{6|}}} ====<br />
* The 1.11.18 build for OpenPandora is not available yet.<br />
* [http://sourceforge.net/projects/wesnoth/files/wesnoth/wesnoth-1.11.17/wesnoth-1.11.17-1.pnd/download {{{2|Previous Version}}}] (1.11.17, 374.0 MB)<br />
<noinclude>[[Category:Templates]]</noinclude></div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=A_Shop_Like_Thing&diff=55772A Shop Like Thing2014-10-23T18:52:59Z<p>Xudojnik: I will update it later.</p>
<hr />
<div>{{WML Tags}}<br />
<br />
== A Shop Like Thing ==<br />
<br />
In this page you can see different tecniques of creating a shop.<br />
<br />
=== Simple ===<br />
Use this macro to place a moveto event in your scenario that defines a magic-items shop. Argument is a [[StandardLocationFilter]]. <br />
<br />
Used macros:<br />
* VARIABLE_CONDITIONAL (from file [http://www.wesnoth.org/macro-reference.xhtml#file:utils.cfg utils.cfg])<br />
* CLEAR_VARAIBLE (from file [http://www.wesnoth.org/macro-reference.xhtml#file:utils.cfg utils.cfg])<br />
* WEAPON_SPECIAL_MAGICAL (from file[http://www.wesnoth.org/macro-reference.xhtml#file:abilities.cfg abilities.cfg])<br />
<br />
#define CREATE_SIMPLE_SHOP FILTER<br />
[event]<br />
name=moveto<br />
first_time_only=no<br />
[filter]<br />
# this is not a macro. It is a argument token, <br />
# which will be substituted with argument value<br />
{FILTER}<br />
[/filter]<br />
[store_gold]<br />
side=$side_number<br />
variable=css_gold<br />
# it is bad idea to use simple variable names like "gold" inside macro<br />
# because you can overwrite values of variables,<br />
# which was defined outside of this macro and was supposed to be used for<br />
# anything else. To prevent any side effects, preceed macro-specific variables<br />
# with abbreviation of macro name<br />
[/store_gold]<br />
# this is easiest way to create menu in the game.<br />
# you just define each value and player sees them anytime he trigger this event<br />
[message]<br />
speaker=narrator<br />
message=_ "What items would you like to purchase?"<br />
image=wesnoth-icon.png<br />
<br />
[option]<br />
message=_ "140 GP: Sharpen Melee Weapon, damage:+2"<br />
[show_if]<br />
{VARIABLE_CONDITIONAL gold greater_than 140}<br />
[/show_if]<br />
[command]<br />
[gold]<br />
amount=-140<br />
side=$side_number<br />
[/gold]<br />
[object]<br />
silent = yes<br />
[effect]<br />
apply_to=attack<br />
# You need to specify filter for your effect<br />
# but you should't use [filter] tags<br />
# [filter]<br />
range=melee<br />
# [/filter]<br />
increase_damage=2<br />
[/effect]<br />
[/object]<br />
[/command]<br />
[/option]<br />
<br />
[option]<br />
message=_ "150 GP: Enchance Ranged Weapon, damage +2"<br />
[show_if]<br />
{VARIABLE_CONDITIONAL gold greater_than 150}<br />
[/show_if]<br />
[command]<br />
[gold]<br />
side=$side_number<br />
amount=-150<br />
[/gold]<br />
[object]<br />
silent = yes<br />
[effect]<br />
apply_to=attack<br />
# [filter]<br />
range=ranged<br />
# [/filter]<br />
increase_damage=2<br />
[/effect]<br />
[/object]<br />
[/command]<br />
[/option]<br />
<br />
[option]<br />
message=_ "150 GP: Crystal Orb, damage +2 on magical attack"<br />
[show_if]<br />
{VARIABLE_CONDITIONAL gold greater_than 150}<br />
[/show_if]<br />
[command]<br />
[gold]<br />
amount=-150<br />
side=$side_number<br />
[/gold]<br />
[object]<br />
silent = yes<br />
[effect]<br />
apply_to=attack<br />
# [filter]<br />
special=chance_to_hit<br />
# [/filter]<br />
increase_damage=2<br />
[/effect]<br />
[/object]<br />
[/command]<br />
[/option]<br />
<br />
[option]<br />
message=_ "250 GP: Toughness Increase Scroll, Max HP+10"<br />
[show_if]<br />
{VARIABLE_CONDITIONAL gold greater_than 250}<br />
[/show_if]<br />
[command]<br />
[gold]<br />
amount=-250<br />
side=$side_number<br />
[/gold]<br />
[object]<br />
silent = yes<br />
[effect]<br />
apply_to=hitpoints<br />
increase_total=10<br />
[/effect]<br />
[/object]<br />
[/command]<br />
[/option]<br />
<br />
[option]<br />
message=_ "400 GP: Seven-League Boots, gives MP of 10"<br />
[show_if]<br />
{VARIABLE_CONDITIONAL gold greater_than 400}<br />
[/show_if]<br />
[command]<br />
[gold]<br />
amount=-400<br />
side=$side_number<br />
[/gold]<br />
[object]<br />
silent = yes<br />
[effect]<br />
apply_to=movement<br />
set=10<br />
[/effect]<br />
[/object]<br />
[/command]<br />
[/option]<br />
<br />
[option]<br />
message=_ "400 GP: Boot Upgrade, MP+1"<br />
[show_if]<br />
{VARIABLE_CONDITIONAL gold greater_than 400}<br />
[/show_if]<br />
[command]<br />
[gold]<br />
amount=-400<br />
side=1<br />
[/gold]<br />
[object]<br />
silent = yes<br />
[effect]<br />
apply_to=movement<br />
increase=1<br />
[/effect]<br />
[/object]<br />
[/command]<br />
[/option]<br />
<br />
[option]<br />
message=_ "All GP: Healing Fountain, HP:+50"<br />
[show_if]<br />
{VARIABLE_CONDITIONAL gold greater_than 0}<br />
[/show_if]<br />
[command]<br />
[gold]<br />
amount=-$css_gold<br />
side=$side_number<br />
[/gold]<br />
[object]<br />
silent = yes<br />
[effect]<br />
apply_to=hitpoints<br />
increase=50<br />
violate_max=1<br />
[/effect]<br />
[/object]<br />
[/command]<br />
[/option]<br />
<br />
[option]<br />
message=_ "300 GP: Rage Stone, add a melee swing"<br />
[show_if]<br />
{VARIABLE_CONDITIONAL gold greater_than 300}<br />
[/show_if]<br />
[command]<br />
[gold]<br />
amount=-300<br />
side=$side_number<br />
[/gold]<br />
[object]<br />
silent = yes<br />
[effect]<br />
apply_to=attack<br />
# [filter]<br />
range=melee<br />
# [/filter]<br />
increase_attacks=1<br />
[/effect]<br />
[/object]<br />
[/command]<br />
[/option]<br />
<br />
[option]<br />
message=_ "350 GP: Sight Stone, add a ranged attack"<br />
[show_if]<br />
{VARIABLE_CONDITIONAL gold greater_than 350}<br />
[/show_if]<br />
[command]<br />
[gold]<br />
amount=-350<br />
side=$side_number<br />
[/gold]<br />
[object]<br />
silent = yes<br />
[effect]<br />
apply_to=attack<br />
# [filter]<br />
range=ranged<br />
# [/filter]<br />
increase_attacks=1<br />
[/effect]<br />
[/object]<br />
[/command]<br />
[/option]<br />
<br />
[option]<br />
message=_ "350 GP: Fire Scepter, adds 8-1 ranged magical fire"<br />
[show_if]<br />
{VARIABLE_CONDITIONAL gold greater_than 350}<br />
[/show_if]<br />
[command]<br />
[gold]<br />
amount=-350<br />
side=$side_number<br />
[/gold]<br />
[object]<br />
silent = yes<br />
[effect]<br />
apply_to=new_attack<br />
name=Fire Scepter<br />
type=fire<br />
range=ranged<br />
[specials]<br />
{WEAPON_SPECIAL_MAGICAL}<br />
[/specials]<br />
damage=8<br />
number=1<br />
[/effect]<br />
[/object]<br />
[/command]<br />
[/option]<br />
<br />
[option]<br />
message=_ "350GP: Ice Scepter, adds 8-1 ranged magical ice"<br />
[show_if]<br />
{VARIABLE_CONDITIONAL gold greater_than 350}<br />
[/show_if]<br />
[command]<br />
[gold]<br />
amount=-350<br />
side=$side_number<br />
[/gold]<br />
[object]<br />
silent = yes<br />
[effect]<br />
apply_to=new_attack<br />
name=Ice Scepter<br />
type=cold<br />
range=ranged<br />
[specials]<br />
{WEAPON_SPECIAL_MAGICAL}<br />
[/specials]<br />
damage=8<br />
number=1<br />
[/effect]<br />
[/object]<br />
[/command]<br />
[/option]<br />
[/message]<br />
{CLEAR_VARIABLE css_gold}<br />
[/event]<br />
#enddef<br />
<br />
=== Allow multiple choices in single dialog ===<br />
<br />
In this example I show how to use infinite loop, which breaks when player chooses "exit" option.<br />
<br />
=== Optionally enter the shop ===<br />
In this example I show how to use [set_menu_item] to allow player to decide: whether he want to enter the shop or not.<br />
<br />
=== Limit quantity of items ===<br />
<br />
In this example I modify previous show with variables, indicating quantity of items in shop. Trivial options like "sharpen weapon" will be infinite.<br />
<br />
=== Limit number of uses per each unit ===<br />
<br />
In this example I show how to limit infinite options for every unit entering the shop.<br />
<br />
=== Create random options ===<br />
<br />
In this example I show how to use [insert_tag] to show options, created at runtime.<br />
The random option will be "Healing" with variable price and value.<br />
<br />
=== Allow user to track bought items ===<br />
<br />
In this example I show how to create additional menu, which allow user to see: which items was bought for this unit.<br />
<br />
=== Allow to sell bought items ===<br />
<br />
In this example I show how to sell items to the shop.<br />
<br />
== See Also ==<br />
* [[UsefulWMLFragments]]<br />
* [[ReferenceWML]]<br />
<br />
[[Category: UsefulWMLFragments]]</div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Category:Stub&diff=55770Category:Stub2014-10-23T17:33:54Z<p>Xudojnik: Created page with "These are stub pages. These pages have a minimal amount of content and need filling out to reach a good standard of article content and serve as a more useful reference. To ma..."</p>
<hr />
<div>These are stub pages. These pages have a minimal amount of content and need filling out to reach a good standard of article content and serve as a more useful reference. To mark a page as a stub, use the <nowiki>{{Stub}}</nowiki> template.</div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Template:Stub&diff=55766Template:Stub2014-10-23T17:16:43Z<p>Xudojnik: </p>
<hr />
<div><div class="navtemplate" style="display: table; margin: 2em 12.5%; padding: 0 .5em; border: 1px solid darkred; border-left-width: .75em;"><div style="position: relative; top: -14px; float: left;"></div><p style="display: table-cell; min-height: 72px; margin: 0; padding: 0; vertical-align: middle;"><strong>This section is a stub.</strong> Please help us by [{{fullurl:{{FULLPAGENAME}}|action=edit}} expanding] it</p></div><includeonly>[[Category:Stub]]</includeonly><br />
<noinclude>[[Category:Templates]]</noinclude></div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Template:Stub&diff=55765Template:Stub2014-10-23T17:15:50Z<p>Xudojnik: </p>
<hr />
<div><div class="navtemplate" style="display: table; margin: 2em 12.5%; padding: 0 .5em; border: 1px solid darkred; border-left-width: .75em;"><div style="position: relative; top: -14px; float: left;"></div><p style="display: table-cell; min-height: 72px; margin: 0; padding: 0; vertical-align: middle;"><strong>This section is a stub.</strong> Please help us by [{{fullurl:{{FULLPAGENAME}}|action=edit&section={{{1}}}}} expanding] it</p></div><includeonly>[[Category:Stub]]</includeonly><br />
<noinclude>[[Category:Templates]]</noinclude></div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Template:Stub&diff=55764Template:Stub2014-10-23T17:15:35Z<p>Xudojnik: Created page with "<div class="navtemplate" style="display: table; margin: 2em 12.5%; padding: 0 .5em; border: 1px solid darkred; border-left-width: .75em;"><div style="position: relative; top:..."</p>
<hr />
<div><div class="navtemplate" style="display: table; margin: 2em 12.5%; padding: 0 .5em; border: 1px solid darkred; border-left-width: .75em;"><div style="position: relative; top: -14px; float: left;"></div><p style="display: table-cell; min-height: 72px; margin: 0; padding: 0; vertical-align: middle;"><strong>This page is obsolete.</strong>This section is a stub. Please help us by [{{fullurl:{{FULLPAGENAME}}|action=edit&section={{{1}}}}} expanding] it</p></div><includeonly>[[Category:Stub]]</includeonly><br />
<noinclude>[[Category:Templates]]</noinclude></div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Template:Obsolete&diff=55763Template:Obsolete2014-10-23T17:11:29Z<p>Xudojnik: </p>
<hr />
<div><div class="navtemplate" style="display: table; margin: 2em 12.5%; padding: 0 .5em; border: 1px solid darkred; border-left-width: .75em;"><div style="position: relative; top: -14px; float: left;">https://raw.github.com/wesnoth/wesnoth/master/data/core/images/items/bones.png</div><p style="display: table-cell; min-height: 72px; margin: 0; padding: 0; vertical-align: middle;"><strong>This page is obsolete.</strong> It should not be relied upon as a source of information.<br />
If you are willing and able to update this page, please do so. If it cannot be brought up to date it may be removed.</p></div><includeonly>[[Category:Obsolete]]<br />
</includeonly><br />
<noinclude>[[Category:Templates]]</noinclude></div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Template:Obsolete&diff=55762Template:Obsolete2014-10-23T17:08:57Z<p>Xudojnik: Added "Templates" category</p>
<hr />
<div><div class="navtemplate" style="display: table; margin: 2em 12.5%; padding: 0 .5em; border: 1px solid darkred; border-left-width: .75em;"><div style="position: relative; top: -14px; float: left;">https://raw.github.com/wesnoth/wesnoth/master/data/core/images/items/bones.png</div><p style="display: table-cell; min-height: 72px; margin: 0; padding: 0; vertical-align: middle;"><strong>This page is obsolete.</strong> It should not be relied upon as a source of information.<br />
If you are willing and able to update this page, please do so. If it cannot be brought up to date it may be removed.</p></div><includeonly>[[Category:Obsolete]]<br />
[[Category:Templates]]</includeonly></div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Aethaeryn%27s_Maps&diff=55756Aethaeryn's Maps2014-10-23T16:26:06Z<p>Xudojnik: Looks abandoned.</p>
<hr />
<div>{{Obsolete}}<br />
<br />
''The forum thread for Aethaeryn's Maps is located '''[http://www.wesnoth.org/forum/viewtopic.php?f=15&t=27742 here]'''.<br />
<br />
A collection of various multiplayer maps that I have worked on over the years and will continue to work on, Aethaeryn's Maps is my flagship add-on. Aethaeryn's Maps is a variety pack of many different kinds of maps whose only common denominator is that I made them. The latest version, 0.5, contains the following maps:<br />
<br />
===2p - Gladiator Arena===<br />
'''Version:''' 0.5<br />
<br />
'''Type:''' Duel (Special Gameplay)<br />
<br />
'''Description:''' ''Two recently deceased necromancers gather in an unholy arena of the Underworld to entertain their overlords. Only one will earn his freedom.<br />
<br />
===2p Twin Rivers===<br />
'''Version:''' 0.5<br />
<br />
'''Type:''' Duel (Mainline Style)<br />
<br />
'''Description:''' As winter descends on a calm mountain valley, two factions wage a bloody war.<br />
<br />
===3p Fortress Defense===<br />
'''Version:''' 0.7<br />
<br />
'''Type:''' Team Survival<br />
<br />
'''Description:''' ''Three great armies stand up against an insurmountable alliance of humans and orcs.<br />
<br />
===3p Hide and Seek===<br />
'''Version:''' 0.1<br />
<br />
'''Type:''' Team (2v1)<br />
<br />
'''Description:''' ''Elves struggle to defend their native forest from foreign invaders.<br />
<br />
===4p Chambers===<br />
'''Version:''' 0.5<br />
<br />
'''Type:''' Free-For-All<br />
<br />
'''Description:''' ''Four small armies infiltrating an old temple fight over the overgrown ruins.<br />
<br />
===4p Fortress Assault===<br />
'''Version:''' 1.1<br />
<br />
'''Type:''' Team (3v1)<br />
<br />
'''Description:''' ''Three armies gather to assault a seemingly insurmountable fortress after a long siege. A variety of attack routes leads to a strategical challenge for both sides in this tactically difficult map.<br />
<br />
===4p Four Bases===<br />
'''Version:''' 0.3<br />
<br />
'''Type:''' Free-For-All<br />
<br />
'''Description:''' ''Four nobles fight over the rich valley in between their four bases.<br />
<br />
===5p Aethaeryn's Empires===<br />
'''Version:''' 0.2<br />
<br />
'''Type:''' Free-For-All (Special Gameplay)<br />
<br />
'''Description:''' ''The human kingdom is in crisis as four invaders scheme to split it up!<br />
<br />
===5p Dwarven Fortress===<br />
'''Version:''' 0.1<br />
<br />
'''Type:''' Team (3v2)<br />
<br />
'''Description:''' ''Two Dwarven clans struggle desperately to defend their native lands from greedy outsiders.<br />
<br />
===6p Random Rumble===<br />
'''Version:''' 0.3<br />
<br />
'''Type:''' Free-For-All (Rumble-Style)<br />
<br />
'''Description:''' ''Six armies fight over an enchanted ruin where anything can happen.<br />
<br />
[[Category: Maps]]</div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Template:WML_Tags&diff=55754Template:WML Tags2014-10-23T16:07:57Z<p>Xudojnik: Removed rarily used tags from ThemeWML</p>
<hr />
<div>{| class="gallery" style="width:225px;float: right;border: 1px solid #B48648; color:#B48648; font-size: 7pt;margin-left;10px;"<br />
|-<br />
|<br />
<span style="float: right;"><small class="editlink noprint plainlinksneverexpand">[{{SERVER}}{{localurl:Template:WML Tags|action=edit}} edit ]</small></span><br />
'''WML Tags'''<br />
<br />
|-<br />
|''A:'' <br />
[[AbilitiesWML|abilities]],<br />
[[CampaignWML#Campaign credits|about]],<br />
[[Lua_AI_Howto#Behavior_.28Sticky.29_Candidate_Actions|add_ai_behavior]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_ability|adjacent_description]],<br />
[[SingleUnitWML|advance]],<br />
[[AdvancedPreferenceWML|advanced_preference]],<br />
[[UnitTypeWML|advancefrom]],<br />
[[UnitTypeWML#After_max_level_advancement_.28AMLA.29|advancement]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|advances]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_ability|affect_adjacent]],<br />
[[AiWML#The_.5Bai.5D_Tag:_Defining_Aspects|ai]],<br />
[[StandardSideFilter|allied_with]], <br />
[[DirectActionsWML#.5Ballow_end_turn.5D|allow_end_turn]],<br />
[[DirectActionsWML#.5Ballow_extra_recruit.5D|allow_extra_recruit]],<br />
[[DirectActionsWML#.5Ballow_recruit.5D|allow_recruit]],<br />
[[DirectActionsWML#.5Ballow_undo.5D|allow_undo]],<br />
[[ConditionalActionsWML#Meta-Condition_Tags|and]],<br />
[[InterfaceActionsWML#.5Banimate_unit.5D|animate]],<br />
[[InterfaceActionsWML#.5Banimate_unit.5D|animate_unit]],<br />
[[AnimationWML|animation]],<br />
[[VariablesWML#Array|array]],<br />
[[AiWML#A_Bit_More_on_Simple_vs._Composite_Aspects|aspect]],<br />
[[UnitTypeWML#Attacks|attack]],<br />
[[AnimationWML|attack_anim]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|attacks]],<br />
[[AiWML#The_.5Bai.5D_Tag:_Defining_Aspects|avoid]];<br />
|-<br />
|''B:'' <br />
[[UnitTypeWML#Other_tags|base_unit]], <br />
[[AbilitiesWML|berserk]], <br />
[[BinaryPathWML|binary_path]];<br />
|-<br />
|''C:'' <br />
[[CampaignWML#The_.5Bcampaign.5D_tag|campaign]],<br />
[[Formula_AI_Howto#Setting_up_the_RCA_main_loop_Stage_and_Candidate_Actions|candidate_action]], <br />
[[DirectActionsWML#.5Bcapture_village.5D|capture_village]],<br />
[[ConditionalActionsWML#.5Bswitch.5D|case]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|chance_to_hit]], <br />
[[InterfaceActionsWML#.5Bchat.5D|chat]],<br />
[[ReplayWML|choose]],<br />
[[PersistenceWML|clear_global_variable]],<br />
[[InterfaceActionsWML#.5Bclear_menu_item.5D|clear_menu_item]],<br />
[[InternalActionsWML#.5Bclear_variable.5D|clear_variable]],<br />
[[InterfaceActionsWML#.5Bcolor_adjust.5D|color_adjust]],<br />
command&nbsp;([[ConditionalActionsWML#.5Bcommand.5D|action]], [[ReplayWML|replay]]),<br />
[[AiWML#The_.5Bgoal.5D_Tag|criteria]];<br />
|-<br />
|''D:'' <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|damage]],<br />
[[AnimationWML#death|death]], <br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|deaths]],<br />
[[AnimationWML#default|default]], <br />
[[AnimationWML#defend|defend]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|defends]],<br />
[[UnitsWML#.5Bmovetype.5D|defense]],<br />
[[InterfaceActionsWML#.5Bdelay.5D|delay]],<br />
[[InterfaceActionsWML#.5Bdeprecated_message.5D|deprecated_message]],<br />
[[ReplayWML|destination]],<br />
[[AbilitiesWML|disable]],<br />
[[DirectActionsWML#.5Bdisallow_end_turn.5D|disallow_end_turn]],<br />
[[DirectActionsWML#.5Bdisallow_extra_recruit.5D|disallow_extra_recruit]],<br />
[[DirectActionsWML#.5Bdisallow_recruit.5D|disallow_recruit]],<br />
[[ConditionalActionsWML#.5Bwhile.5D|do]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|drains]], <br />
[[AnimationWML#draw_weapon_anim|draw_weapon_anim]];<br />
|-<br />
|''E:'' <br />
[[EffectWML|effect]],<br />
else&nbsp;([[ConditionalActionsWML#.5Bif.5D|action]], [[AnimationWML#.5Bif.5D_and_.5Belse.5D|animation]]),<br />
[[DirectActionsWML#.5Bendlevel.5D|endlevel]],<br />
end_turn&nbsp;([[DirectActionsWML#.5Bend_turn.5D|action]], [[ReplayWML|replay]]),<br />
[[StandardSideFilter|enemy_of]], <br />
[[Customizing_AI_in_Wesnoth_1.8#AI_engines_.28_via_.5Bengine.5D_tags_.29|engine]], <br />
[[CampaignWML#Campaign_credits|entry]], <br />
[[EraWML|era]],<br />
[[EventWML|event]],<br />
[[AnimationWML#Simplified_animation_blocks|extra_anim]];<br />
|-<br />
|''F:''<br />
[[AiWML#A_Bit_More_on_Simple_vs._Composite_Aspects|facet]],<br />
[[InterfaceActionsWML#.5Banimate_unit.5D|facing]], <br />
[[InterfaceActionsWML#.5Bmove_units_fake.5D|fake_unit]], <br />
[[ConditionalActionsWML#True_Condition_Tags|false]],<br />
[[UnitTypeWML#Other_tags|female]], <br />
[[FilterWML|filter]],<br />
[[StandardUnitFilter|filter_adjacent]], <br />
[[StandardLocationFilter|filter_adjacent_location]], <br />
[[FilterWML#Filtering_Weapons|filter_attack]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_attacker]], <br />
[[AbilitiesWML#Common_keys_and_tags_for_every_ability|filter_base_value]], <br />
[[EventWML#.5Bfilter_condition.5D|filter_condition]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_defender]], <br />
[[AiWML#Filtering_Combat_with_the_.27attacks.27_Aspect|filter_enemy]],<br />
[[StandardLocationFilter|filter_location]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_opponent]], <br />
[[AiWML#Filtering_Combat_with_the_.27attacks.27_Aspect|filter_own]],<br />
[[StandardLocationFilter|filter_owner]], <br />
[[StandardLocationFilter|filter_radius]], <br />
[[SingleUnitWML|filter_recall]], <br />
[[StandardUnitFilter|filter_second]],<br />
[[FilterWML#Filtering_Weapons|filter_second_attack]],<br />
[[AbilitiesWML|filter_self]], <br />
[[StandardSideFilter|filter_side]],<br />
[[FilterWML#Filtering_Vision|filter_vision]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_weapon]], <br />
[[StandardUnitFilter|filter_wml]],<br />
[[InternalActionsWML#.5Bfind_path.5D|find_path]],<br />
[[InternalActionsWML#.5Bfire_event.5D|fire_event]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|firststrike]], <br />
[[InterfaceActionsWML#.5Bfloating_text.5D|floating_text]],<br />
[[AnimationWML#Frames|frame]];<br />
[[DirectActionsWML#.5Bfull_heal.5D|full_heal]];<br />
|-<br />
|''G:'' <br />
[[GameConfigWML|game_config]],<br />
[[PersistenceWML|get_global_variable]],<br />
[[AiWML#The_.5Bgoal.5D_Tag|goal]],<br />
[[DirectActionsWML#.5Bgold.5D|gold]],<br />
[[InterfaceActionsWML#.5Bobjectives.5D|gold_carryover]];<br />
|-<br />
|''H:'' <br />
[[DirectActionsWML#.5Bharm_unit.5D|harm_unit]],<br />
[[StandardSideFilter|has_unit]], <br />
[[ConditionalActionsWML#Condition_Tags|have_location]],<br />
[[ConditionalActionsWML#Condition_Tags|have_unit]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|heal_on_hit]], <br />
[[DirectActionsWML#.5Bheal_unit.5D|heal_unit]],<br />
[[AnimationWML#healed|healed_anim]], <br />
[[AnimationWML#healing|healing_anim]], <br />
[[AbilitiesWML|heals]], <br />
[[UnitsWML#.5Bhide_help.5D|hide_help]],<br />
[[InterfaceActionsWML#.5Bhide_unit.5D|hide_unit]],<br />
[[AbilitiesWML|hides]];<br />
|-<br />
|''I:'' <br />
[[AnimationWML#idling|idle_anim]], <br />
if&nbsp;([[ConditionalActionsWML#.5Bif.5D|action]], [[AnimationWML#.5Bif.5D_and_.5Belse.5D|animation]]),<br />
[[AbilitiesWML|illuminates]], <br />
[[TerrainGraphicsWML|image]],<br />
[[ReplayWML|init_side]],<br />
[[InternalActionsWML#.5Binsert_tag.5D|insert_tag]],<br />
[[InterfaceActionsWML#.5Binspect.5D|inspect]],<br />
[[InterfaceActionsWML#.5Bitem.5D|item]];<br />
|-<br />
|''J:''<br />
[[InternalActionsWML#.5Bset_variables.5D|join]];<br />
|-<br />
|''K:'' <br />
[[DirectActionsWML#.5Bkill.5D|kill]],<br />
[[StatisticalScenarioWML|killed]];<br />
|-<br />
|''L:'' <br />
[[InterfaceActionsWML#.5Blabel.5D|label]],<br />
[[LanguageWML|language]],<br />
[[AiWML#The_.5Bai.5D_Tag:_Defining_Aspects|leader_goal]],<br />
[[AbilitiesWML|leadership]], <br />
[[AnimationWML#leading|leading_anim]], <br />
[[AnimationWML#levelin|levelin_anim]],<br />
[[AnimationWML#levelout|levelout_anim]], <br />
[[DirectActionsWML#.5Blift_fog.5D|lift_fog]],<br />
[[AiWML#Limiting_Recruiting_with_the_.27recruitment.27_Aspect|limit]],<br />
[[InternalActionsWML#.5Bset_variables.5D|literal]], <br />
[[LocaleWML|locale]],<br />
[[InterfaceActionsWML#.5Block_view.5D|lock_view]],<br />
[[LuaWML|lua]];<br />
|-<br />
|''M:'' <br />
[[UnitTypeWML#Other_tags|male]], <br />
[[SavefileWML|menu_item]], <br />
[[InterfaceActionsWML#.5Bmessage.5D|message]],<br />
[[Micro AIs|micro_ai]],<br />
[[AnimationWML#The_content_of_a_frame|missile_frame]],<br />
[[ModificationWML|modification]],<br />
[[SingleUnitWML|modifications]],<br />
[[DirectActionsWML#.5Bmodify_ai.5D|modify_ai]],<br />
[[DirectActionsWML#.5Bmodify_side.5D|modify_side]],<br />
[[DirectActionsWML#.5Bmodify_turns.5D|modify_turns]],<br />
[[DirectActionsWML#.5Bmodify_unit.5D|modify_unit]],<br />
[[ReplayWML|move]],<br />
[[DirectActionsWML#.5Bmove_unit.5D|move_unit]],<br />
[[InterfaceActionsWML#.5Bmove_unit_fake.5D|move_unit_fake]],<br />
[[InterfaceActionsWML#.5Bmove_units_fake.5D|move_units_fake]],<br />
[[AnimationWML#movement|movement_anim]], <br />
[[UnitsWML#.5Bmovetype.5D|movement costs]],<br />
[[UnitsWML#.5Bmovetype.5D|movetype]],<br />
[[ScenarioWML|multiplayer]],<br />
[[EraWML|multiplayer_side]],<br />
[[MusicListWML#.5Bmusic.5D|music]];<br />
|-<br />
|''N:'' <br />
[[ConditionalActionsWML#Meta-Condition_Tags|not]], <br />
[[InterfaceActionsWML#.5Bobjectives.5D|note]];<br />
|-<br />
|''O:'' <br />
[[DirectActionsWML#.5Bobject.5D|object]],<br />
[[InterfaceActionsWML#.5Bobjectives.5D|objective]],<br />
[[InterfaceActionsWML#.5Bobjectives.5D|objectives]],<br />
[[InterfaceActionsWML#.5Bopen_help.5D|open_help]],<br />
[[InterfaceActionsWML#.5Bmessage.5D|option]],<br />
[[OptionWML|options]],<br />
[[ConditionalActionsWML#Meta-Condition_Tags|or]];<br />
|-<br />
|''P:'' <br />
[[IntroWML|part]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|petrifies]], <br />
[[DirectActionsWML#.5Bpetrify.5D|petrify]], <br />
[[DirectActionsWML#.5Bplace_shroud.5D|place_shroud]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|plague]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|poison]], <br />
[[UnitTypeWML#Other_tags|portrait]], <br />
[[AnimationWML#post_movement|post_movement_anim]], <br />
[[AnimationWML#pre_movement|pre_movement_anim]], <br />
[[FilterWML#Filtering_Weapons|primary_attack]], <br />
[[StandardUnitFilter|primary_unit]], <br />
[[InterfaceActionsWML#.5Bprint.5D|print]], <br />
[[AiWML#Deprecated_AI_Targeting_Aspects|protect_location]], <br />
[[AiWML#Deprecated_AI_Targeting_Aspects|protect_unit]];<br />
[[DirectActionsWML#.5Bput_to_recall_list.5D|put_to_recall_list]];<br />
|-<br />
|''R:'' <br />
[[UnitsWML#.5Brace.5D|race]], <br />
[[ReplayWML|random]], <br />
recall&nbsp;([[DirectActionsWML#.5Brecall.5D|action]], [[ReplayWML|replay]]), <br />
[[StatisticalScenarioWML|recalls]],<br />
[[ReplayWML|recruit]], <br />
[[AnimationWML#recruited|recruit_anim]], <br />
[[AnimationWML#recruiting|recruiting_anim]], <br />
[[StatisticalScenarioWML|recruits]], <br />
[[InterfaceActionsWML#.5Bredraw.5D|redraw]],<br />
[[AbilitiesWML|regenerate]], <br />
[[InterfaceActionsWML#.5Bremove_item.5D|remove_item]], <br />
[[DirectActionsWML#.5Bremove_shroud.5D|remove_shroud]], <br />
[[InterfaceActionsWML#.5Bremove_sound_source.5D|remove_sound_source]], <br />
[[InterfaceActionsWML#.5Bremove_unit_overlay.5D|remove_unit_overlay]],<br />
[[DirectActionsWML#.5Breplace_map.5D|replace_map]], <br />
[[DirectActionsWML#.5Breplace_schedule.5D|replace_schedule]], <br />
[[ReplayWML|replay]], <br />
[[SavefileWML|replay_start]],<br />
[[DirectActionsWML#.5Breset_fog.5D|reset_fog]], <br />
resistance&nbsp;([[AbilitiesWML|ability]], [[UnitsWML#.5Bmovetype.5D|unit]]),<br />
[[ReplayWML|results]], <br />
[[InternalActionsWML#.5Brole.5D|role]], <br />
[[TerrainMaskWML|rule]];<br />
|-<br />
|''S:'' <br />
[[SavefileWML|save]], <br />
[[ScenarioWML|scenario]],<br />
[[InterfaceActionsWML#.5Bscroll.5D|scroll]], <br />
[[InterfaceActionsWML#.5Bscroll_to.5D|scroll_to]],<br />
[[InterfaceActionsWML#.5Bscroll_to_unit.5D|scroll_to_unit]], <br />
[[FilterWML#Filtering_Weapons|secondary_attack]], <br />
[[StandardUnitFilter|secondary_unit]], <br />
[[HelpWML|section]], <br />
[[InterfaceActionsWML#.5Bselect_unit.5D|select_unit]], <br />
[[ReplayWML|sequence]], <br />
[[DirectActionsWML#.5Bset_extra_recruit.5D|set_extra_recruit]],<br />
[[PersistenceWML|set_global_variable]],<br />
[[InterfaceActionsWML#.5Bset_menu_item.5D|set_menu_item]], <br />
[[DirectActionsWML#.5Bset_recruit.5D|set_recruit]],<br />
[[EffectWML|set_specials]], <br />
[[InternalActionsWML#.5Bset_variable.5D|set_variable]], <br />
[[InternalActionsWML#.5Bset_variables.5D|set_variables]], <br />
[[AnimationWML#sheath_weapon|sheath_weapon_anim]], <br />
show_if&nbsp;([[InterfaceActionsWML#.5Bmessage.5D|message]], [[InterfaceActionsWML#.5Bset_menu_item.5D|set_menu_item]]),<br />
[[InterfaceActionsWML#.5Bshow_objectives.5D|show_objectives]],<br />
[[SideWML|side]], <br />
[[AbilitiesWML|skirmisher]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|slow]], <br />
[[SavefileWML|snapshot]],<br />
[[InterfaceActionsWML#.5Bsound.5D|sound]], <br />
[[InterfaceActionsWML#.5Bsound_source.5D|sound_source]], <br />
source&nbsp;([[ReplayWML|replay]], [[DirectActionsWML#.5Btunnel.5D|teleport]]),<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|specials]], <br />
[[InternalActionsWML#.5Bset_variables.5D|split]],<br />
[[Customizing_AI_in_Wesnoth_1.8#Working_with_main_loop_of_the_RCA_AI|stage]], <br />
[[AnimationWML#standing|standing_anim]], <br />
[[StatisticalScenarioWML#The_.5Bstatistics.5D_tag|statistics]],<br />
[[SingleUnitWML|status]], <br />
[[InternalActionsWML#.5Bstore_gold.5D|store_gold]], <br />
[[InternalActionsWML#.5Bstore_items.5D|store_items]], <br />
[[InternalActionsWML#.5Bstore_locations.5D|store_locations]],<br />
[[InternalActionsWML#.5Bstore_map_dimensions.5D|store_map_dimensions]],<br />
[[InternalActionsWML#.5Bstore_reachable_locations.5D|store_reachable_locations]],<br />
[[InternalActionsWML#.5Bstore_side.5D|store_side]], <br />
[[InternalActionsWML#.5Bstore_starting_location.5D|store_starting_location]], <br />
[[InternalActionsWML#.5Bstore_time_of_day.5D|store_time_of_day]], <br />
[[InternalActionsWML#.5Bstore_turns.5D|store_turns]], <br />
[[InternalActionsWML#.5Bstore_unit.5D|store_unit]], <br />
[[InternalActionsWML#.5Bstore_unit_type.5D|store_unit_type]], <br />
[[InternalActionsWML#.5Bstore_unit_type_ids.5D|store_unit_type_ids]], <br />
[[InternalActionsWML#.5Bstore_villages.5D|store_villages]], <br />
[[IntroWML|story]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|swarm]], <br />
[[ConditionalActionsWML#.5Bswitch.5D|switch]];<br />
|-<br />
|''T:'' <br />
[[DirectActionsWML#.5Btunnel.5D|target]], <br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|team]],<br />
teleport&nbsp;([[AbilitiesWML|ability]], [[DirectActionsWML#.5Bteleport.5D|action]]),<br />
[[AnimationWML#pre_teleport|teleport_anim]],<br />
[[DirectActionsWML#.5Bterrain.5D|terrain]], <br />
[[TerrainGraphicsWML|terrain_graphics]], <br />
[[TerrainMaskWML|terrain_mask]], <br />
[[TerrainWML|terrain_type]], <br />
[[ScenarioWML#Test_scenario|test]],<br />
[[InterfaceActionsWML#.5Bmessage.5D|text_input]], <br />
[[WesCamp#The_textdomain_declaration|textdomain]],<br />
[[ConditionalActionsWML#.5Bif.5D|then]],<br />
[[TerrainGraphicsWML|tile]], <br />
[[TimeWML|time]], <br />
[[DirectActionsWML#.5Btime_area.5D|time_area]], <br />
[[HelpWML|topic]], <br />
[[HelpWML|toplevel]], <br />
[[UnitsWML#.5Btrait.5D|trait]], <br />
[[DirectActionsWML#.5Btransform_unit.5D|transform_unit]], <br />
[[InternalActionsWML#.5Bfind_path.5D|traveler]], <br />
[[ConditionalActionsWML#True_Condition_Tags|true]],<br />
[[DirectActionsWML#.5Btunnel.5D|tunnel]], <br />
[[ScenarioWML|tutorial]];<br />
|-<br />
|''U:'' <br />
[[InterfaceActionsWML#.5Bunhide_unit.5D|unhide_unit]], <br />
[[SingleUnitWML|unit]],<br />
[[InterfaceActionsWML#.5Bunit_overlay.5D|unit_overlay]], <br />
[[UnitTypeWML|unit_type]], <br />
[[InternalActionsWML|unit_worth]], <br />
[[UnitsWML|units]],<br />
[[InterfaceActionsWML#.5Bunlock_view.5D|unlock_view]],<br />
[[DirectActionsWML#.5Bunpetrify.5D|unpetrify]], <br />
[[DirectActionsWML#.5Bunstore_unit.5D|unstore_unit]];<br />
|-<br />
| ''V:'' <br />
[[InternalActionsWML#.5Bset_variables.5D|value]], <br />
[[ConditionalActionsWML#Condition_Tags|variable]],<br />
[[VariablesWML#The_.5Bvariables.5D_tag|variables]],<br />
[[UnitTypeWML#Other_tags|variation]], <br />
[[AnimationWML#victory|victory_anim]], <br />
[[SideWML|village]],<br />
[[InterfaceActionsWML#.5Bvolume.5D|volume]];<br />
|-<br />
| ''W:'' <br />
[[ConditionalActionsWML#.5Bwhile.5D|while]],<br />
[[InterfaceActionsWML#.5Bwml_message.5D|wml_message]];<br />
|}<br />
<br />
<includeonly>[[Category:WML Reference]]</includeonly><br />
<br />
<noinclude>A box with all the WML tags, each one linking to the page and section they are described in. This box should be included in each of the WML reference pages.</noinclude></div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Template:WML_Tags&diff=55753Template:WML Tags2014-10-23T16:04:24Z<p>Xudojnik: Removed rarily used tags from MapGeneratorWML and EditorWML</p>
<hr />
<div>{| class="gallery" style="width:225px;float: right;border: 1px solid #B48648; color:#B48648; font-size: 7pt;margin-left;10px;"<br />
|-<br />
|<br />
<span style="float: right;"><small class="editlink noprint plainlinksneverexpand">[{{SERVER}}{{localurl:Template:WML Tags|action=edit}} edit ]</small></span><br />
'''WML Tags'''<br />
<br />
|-<br />
|''A:'' <br />
[[AbilitiesWML|abilities]],<br />
[[CampaignWML#Campaign credits|about]],<br />
[[Lua_AI_Howto#Behavior_.28Sticky.29_Candidate_Actions|add_ai_behavior]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_ability|adjacent_description]],<br />
[[SingleUnitWML|advance]],<br />
[[AdvancedPreferenceWML|advanced_preference]],<br />
[[UnitTypeWML|advancefrom]],<br />
[[UnitTypeWML#After_max_level_advancement_.28AMLA.29|advancement]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|advances]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_ability|affect_adjacent]],<br />
[[AiWML#The_.5Bai.5D_Tag:_Defining_Aspects|ai]],<br />
[[StandardSideFilter|allied_with]], <br />
[[DirectActionsWML#.5Ballow_end_turn.5D|allow_end_turn]],<br />
[[DirectActionsWML#.5Ballow_extra_recruit.5D|allow_extra_recruit]],<br />
[[DirectActionsWML#.5Ballow_recruit.5D|allow_recruit]],<br />
[[DirectActionsWML#.5Ballow_undo.5D|allow_undo]],<br />
[[ConditionalActionsWML#Meta-Condition_Tags|and]],<br />
[[InterfaceActionsWML#.5Banimate_unit.5D|animate]],<br />
[[InterfaceActionsWML#.5Banimate_unit.5D|animate_unit]],<br />
[[AnimationWML|animation]],<br />
[[VariablesWML#Array|array]],<br />
[[AiWML#A_Bit_More_on_Simple_vs._Composite_Aspects|aspect]],<br />
[[UnitTypeWML#Attacks|attack]],<br />
[[AnimationWML|attack_anim]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|attacks]],<br />
[[AiWML#The_.5Bai.5D_Tag:_Defining_Aspects|avoid]];<br />
|-<br />
|''B:'' <br />
[[UnitTypeWML#Other_tags|base_unit]], <br />
[[AbilitiesWML|berserk]], <br />
[[BinaryPathWML|binary_path]];<br />
|-<br />
|''C:'' <br />
[[CampaignWML#The_.5Bcampaign.5D_tag|campaign]],<br />
[[Formula_AI_Howto#Setting_up_the_RCA_main_loop_Stage_and_Candidate_Actions|candidate_action]], <br />
[[DirectActionsWML#.5Bcapture_village.5D|capture_village]],<br />
[[ConditionalActionsWML#.5Bswitch.5D|case]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|chance_to_hit]], <br />
[[InterfaceActionsWML#.5Bchat.5D|chat]],<br />
[[ReplayWML|choose]],<br />
[[PersistenceWML|clear_global_variable]],<br />
[[InterfaceActionsWML#.5Bclear_menu_item.5D|clear_menu_item]],<br />
[[InternalActionsWML#.5Bclear_variable.5D|clear_variable]],<br />
[[InterfaceActionsWML#.5Bcolor_adjust.5D|color_adjust]],<br />
command&nbsp;([[ConditionalActionsWML#.5Bcommand.5D|action]], [[ReplayWML|replay]]),<br />
[[AiWML#The_.5Bgoal.5D_Tag|criteria]];<br />
|-<br />
|''D:'' <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|damage]],<br />
[[AnimationWML#death|death]], <br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|deaths]],<br />
[[AnimationWML#default|default]], <br />
[[AnimationWML#defend|defend]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|defends]],<br />
[[UnitsWML#.5Bmovetype.5D|defense]],<br />
[[InterfaceActionsWML#.5Bdelay.5D|delay]],<br />
[[InterfaceActionsWML#.5Bdeprecated_message.5D|deprecated_message]],<br />
[[ReplayWML|destination]],<br />
[[AbilitiesWML|disable]],<br />
[[DirectActionsWML#.5Bdisallow_end_turn.5D|disallow_end_turn]],<br />
[[DirectActionsWML#.5Bdisallow_extra_recruit.5D|disallow_extra_recruit]],<br />
[[DirectActionsWML#.5Bdisallow_recruit.5D|disallow_recruit]],<br />
[[ConditionalActionsWML#.5Bwhile.5D|do]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|drains]], <br />
[[AnimationWML#draw_weapon_anim|draw_weapon_anim]];<br />
|-<br />
|''E:'' <br />
[[EffectWML|effect]],<br />
else&nbsp;([[ConditionalActionsWML#.5Bif.5D|action]], [[AnimationWML#.5Bif.5D_and_.5Belse.5D|animation]]),<br />
[[DirectActionsWML#.5Bendlevel.5D|endlevel]],<br />
end_turn&nbsp;([[DirectActionsWML#.5Bend_turn.5D|action]], [[ReplayWML|replay]]),<br />
[[StandardSideFilter|enemy_of]], <br />
[[Customizing_AI_in_Wesnoth_1.8#AI_engines_.28_via_.5Bengine.5D_tags_.29|engine]], <br />
[[CampaignWML#Campaign_credits|entry]], <br />
[[EraWML|era]],<br />
[[EventWML|event]],<br />
[[ThemeWML#.5Bstatus.5D|expenses]], <br />
[[AnimationWML#Simplified_animation_blocks|extra_anim]];<br />
|-<br />
|''F:''<br />
[[AiWML#A_Bit_More_on_Simple_vs._Composite_Aspects|facet]],<br />
[[InterfaceActionsWML#.5Banimate_unit.5D|facing]], <br />
[[InterfaceActionsWML#.5Bmove_units_fake.5D|fake_unit]], <br />
[[ConditionalActionsWML#True_Condition_Tags|false]],<br />
[[UnitTypeWML#Other_tags|female]], <br />
[[FilterWML|filter]],<br />
[[StandardUnitFilter|filter_adjacent]], <br />
[[StandardLocationFilter|filter_adjacent_location]], <br />
[[FilterWML#Filtering_Weapons|filter_attack]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_attacker]], <br />
[[AbilitiesWML#Common_keys_and_tags_for_every_ability|filter_base_value]], <br />
[[EventWML#.5Bfilter_condition.5D|filter_condition]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_defender]], <br />
[[AiWML#Filtering_Combat_with_the_.27attacks.27_Aspect|filter_enemy]],<br />
[[StandardLocationFilter|filter_location]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_opponent]], <br />
[[AiWML#Filtering_Combat_with_the_.27attacks.27_Aspect|filter_own]],<br />
[[StandardLocationFilter|filter_owner]], <br />
[[StandardLocationFilter|filter_radius]], <br />
[[SingleUnitWML|filter_recall]], <br />
[[StandardUnitFilter|filter_second]],<br />
[[FilterWML#Filtering_Weapons|filter_second_attack]],<br />
[[AbilitiesWML|filter_self]], <br />
[[StandardSideFilter|filter_side]],<br />
[[FilterWML#Filtering_Vision|filter_vision]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_weapon]], <br />
[[StandardUnitFilter|filter_wml]],<br />
[[InternalActionsWML#.5Bfind_path.5D|find_path]],<br />
[[InternalActionsWML#.5Bfire_event.5D|fire_event]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|firststrike]], <br />
[[InterfaceActionsWML#.5Bfloating_text.5D|floating_text]],<br />
[[AnimationWML#Frames|frame]];<br />
[[DirectActionsWML#.5Bfull_heal.5D|full_heal]];<br />
|-<br />
|''G:'' <br />
[[GameConfigWML|game_config]],<br />
[[PersistenceWML|get_global_variable]],<br />
[[AiWML#The_.5Bgoal.5D_Tag|goal]],<br />
gold&nbsp;([[DirectActionsWML#.5Bgold.5D|action]], [[ThemeWML|theme]]),<br />
[[InterfaceActionsWML#.5Bobjectives.5D|gold_carryover]];<br />
|-<br />
|''H:'' <br />
[[DirectActionsWML#.5Bharm_unit.5D|harm_unit]],<br />
[[StandardSideFilter|has_unit]], <br />
[[ConditionalActionsWML#Condition_Tags|have_location]],<br />
[[ConditionalActionsWML#Condition_Tags|have_unit]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|heal_on_hit]], <br />
[[DirectActionsWML#.5Bheal_unit.5D|heal_unit]],<br />
[[AnimationWML#healed|healed_anim]], <br />
[[AnimationWML#healing|healing_anim]], <br />
[[AbilitiesWML|heals]], <br />
[[UnitsWML#.5Bhide_help.5D|hide_help]],<br />
[[InterfaceActionsWML#.5Bhide_unit.5D|hide_unit]],<br />
[[AbilitiesWML|hides]];<br />
|-<br />
|''I:'' <br />
[[AnimationWML#idling|idle_anim]], <br />
if&nbsp;([[ConditionalActionsWML#.5Bif.5D|action]], [[AnimationWML#.5Bif.5D_and_.5Belse.5D|animation]]),<br />
[[AbilitiesWML|illuminates]], <br />
[[TerrainGraphicsWML|image]],<br />
[[ThemeWML#.5Bstatus.5D|income]],<br />
[[ReplayWML|init_side]],<br />
[[InternalActionsWML#.5Binsert_tag.5D|insert_tag]],<br />
[[InterfaceActionsWML#.5Binspect.5D|inspect]],<br />
[[InterfaceActionsWML#.5Bitem.5D|item]];<br />
|-<br />
|''J:''<br />
[[InternalActionsWML#.5Bset_variables.5D|join]];<br />
|-<br />
|''K:'' <br />
[[DirectActionsWML#.5Bkill.5D|kill]],<br />
[[StatisticalScenarioWML|killed]];<br />
|-<br />
|''L:'' <br />
label&nbsp;([[InterfaceActionsWML#.5Blabel.5D|map]], [[ThemeWML|theme]]),<br />
[[LanguageWML|language]],<br />
[[AiWML#The_.5Bai.5D_Tag:_Defining_Aspects|leader_goal]],<br />
[[AbilitiesWML|leadership]], <br />
[[AnimationWML#leading|leading_anim]], <br />
[[AnimationWML#levelin|levelin_anim]],<br />
[[AnimationWML#levelout|levelout_anim]], <br />
[[DirectActionsWML#.5Blift_fog.5D|lift_fog]],<br />
[[AiWML#Limiting_Recruiting_with_the_.27recruitment.27_Aspect|limit]],<br />
[[InternalActionsWML#.5Bset_variables.5D|literal]], <br />
[[LocaleWML|locale]],<br />
[[InterfaceActionsWML#.5Block_view.5D|lock_view]],<br />
[[LuaWML|lua]];<br />
|-<br />
|''M:'' <br />
[[ThemeWML#.5Bmain_map.5D|main_map]],<br />
[[ThemeWML#.5Bmain_map_border.5D|main_map_border]], <br />
[[UnitTypeWML#Other_tags|male]], <br />
[[ThemeWML#.5Bmenu.5D|menu]], <br />
[[SavefileWML|menu_item]], <br />
[[InterfaceActionsWML#.5Bmessage.5D|message]],<br />
[[Micro AIs|micro_ai]],<br />
[[ThemeWML#.5Bmini_map.5D|mini_map]],<br />
[[AnimationWML#The_content_of_a_frame|missile_frame]],<br />
[[ModificationWML|modification]],<br />
[[SingleUnitWML|modifications]],<br />
[[DirectActionsWML#.5Bmodify_ai.5D|modify_ai]],<br />
[[DirectActionsWML#.5Bmodify_side.5D|modify_side]],<br />
[[DirectActionsWML#.5Bmodify_turns.5D|modify_turns]],<br />
[[DirectActionsWML#.5Bmodify_unit.5D|modify_unit]],<br />
[[ReplayWML|move]],<br />
[[DirectActionsWML#.5Bmove_unit.5D|move_unit]],<br />
[[InterfaceActionsWML#.5Bmove_unit_fake.5D|move_unit_fake]],<br />
[[InterfaceActionsWML#.5Bmove_units_fake.5D|move_units_fake]],<br />
[[AnimationWML#movement|movement_anim]], <br />
[[UnitsWML#.5Bmovetype.5D|movement costs]],<br />
[[UnitsWML#.5Bmovetype.5D|movetype]],<br />
[[ScenarioWML|multiplayer]],<br />
[[EraWML|multiplayer_side]],<br />
[[MusicListWML#.5Bmusic.5D|music]];<br />
|-<br />
|''N:'' <br />
[[ConditionalActionsWML#Meta-Condition_Tags|not]], <br />
[[InterfaceActionsWML#.5Bobjectives.5D|note]], <br />
[[ThemeWML#.5Bstatus.5D|num_units]];<br />
|-<br />
|''O:'' <br />
[[DirectActionsWML#.5Bobject.5D|object]],<br />
[[InterfaceActionsWML#.5Bobjectives.5D|objective]],<br />
[[InterfaceActionsWML#.5Bobjectives.5D|objectives]],<br />
[[ThemeWML#.5Bstatus.5D|observers]],<br />
[[InterfaceActionsWML#.5Bopen_help.5D|open_help]],<br />
[[InterfaceActionsWML#.5Bmessage.5D|option]],<br />
[[OptionWML|options]],<br />
[[ConditionalActionsWML#Meta-Condition_Tags|or]];<br />
|-<br />
|''P:'' <br />
[[ThemeWML#.5Bpanel.5D|panel]], <br />
[[IntroWML|part]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|petrifies]], <br />
[[DirectActionsWML#.5Bpetrify.5D|petrify]], <br />
[[DirectActionsWML#.5Bplace_shroud.5D|place_shroud]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|plague]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|poison]], <br />
[[UnitTypeWML#Other_tags|portrait]], <br />
[[ThemeWML#.5Bstatus.5D|position]],<br />
[[AnimationWML#post_movement|post_movement_anim]], <br />
[[AnimationWML#pre_movement|pre_movement_anim]], <br />
[[FilterWML#Filtering_Weapons|primary_attack]], <br />
[[StandardUnitFilter|primary_unit]], <br />
[[InterfaceActionsWML#.5Bprint.5D|print]], <br />
[[AiWML#Deprecated_AI_Targeting_Aspects|protect_location]], <br />
[[AiWML#Deprecated_AI_Targeting_Aspects|protect_unit]];<br />
[[DirectActionsWML#.5Bput_to_recall_list.5D|put_to_recall_list]];<br />
|-<br />
|''R:'' <br />
[[UnitsWML#.5Brace.5D|race]], <br />
[[ReplayWML|random]], <br />
recall&nbsp;([[DirectActionsWML#.5Brecall.5D|action]], [[ReplayWML|replay]]), <br />
[[StatisticalScenarioWML|recalls]],<br />
[[ReplayWML|recruit]], <br />
[[AnimationWML#recruited|recruit_anim]], <br />
[[AnimationWML#recruiting|recruiting_anim]], <br />
[[StatisticalScenarioWML|recruits]], <br />
[[InterfaceActionsWML#.5Bredraw.5D|redraw]],<br />
[[AbilitiesWML|regenerate]], <br />
[[InterfaceActionsWML#.5Bremove_item.5D|remove_item]], <br />
[[DirectActionsWML#.5Bremove_shroud.5D|remove_shroud]], <br />
[[InterfaceActionsWML#.5Bremove_sound_source.5D|remove_sound_source]], <br />
[[InterfaceActionsWML#.5Bremove_unit_overlay.5D|remove_unit_overlay]],<br />
[[DirectActionsWML#.5Breplace_map.5D|replace_map]], <br />
[[DirectActionsWML#.5Breplace_schedule.5D|replace_schedule]], <br />
[[ReplayWML|replay]], <br />
[[SavefileWML|replay_start]],<br />
[[DirectActionsWML#.5Breset_fog.5D|reset_fog]], <br />
resistance&nbsp;([[AbilitiesWML|ability]], [[UnitsWML#.5Bmovetype.5D|unit]]),<br />
[[ThemeWML|resolution]], <br />
[[ReplayWML|results]], <br />
[[InternalActionsWML#.5Brole.5D|role]], <br />
[[TerrainMaskWML|rule]];<br />
|-<br />
|''S:'' <br />
[[SavefileWML|save]], <br />
[[ScenarioWML|scenario]],<br />
[[InterfaceActionsWML#.5Bscroll.5D|scroll]], <br />
[[InterfaceActionsWML#.5Bscroll_to.5D|scroll_to]],<br />
[[InterfaceActionsWML#.5Bscroll_to_unit.5D|scroll_to_unit]], <br />
[[FilterWML#Filtering_Weapons|secondary_attack]], <br />
[[StandardUnitFilter|secondary_unit]], <br />
[[HelpWML|section]], <br />
[[InterfaceActionsWML#.5Bselect_unit.5D|select_unit]], <br />
[[ReplayWML|sequence]], <br />
[[DirectActionsWML#.5Bset_extra_recruit.5D|set_extra_recruit]],<br />
[[PersistenceWML|set_global_variable]],<br />
[[InterfaceActionsWML#.5Bset_menu_item.5D|set_menu_item]], <br />
[[DirectActionsWML#.5Bset_recruit.5D|set_recruit]],<br />
[[EffectWML|set_specials]], <br />
[[InternalActionsWML#.5Bset_variable.5D|set_variable]], <br />
[[InternalActionsWML#.5Bset_variables.5D|set_variables]], <br />
[[AnimationWML#sheath_weapon|sheath_weapon_anim]], <br />
show_if&nbsp;([[InterfaceActionsWML#.5Bmessage.5D|message]], [[InterfaceActionsWML#.5Bset_menu_item.5D|set_menu_item]]),<br />
[[InterfaceActionsWML#.5Bshow_objectives.5D|show_objectives]],<br />
[[SideWML|side]], <br />
[[ThemeWML|side_playing]], <br />
[[AbilitiesWML|skirmisher]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|slow]], <br />
[[SavefileWML|snapshot]],<br />
[[InterfaceActionsWML#.5Bsound.5D|sound]], <br />
[[InterfaceActionsWML#.5Bsound_source.5D|sound_source]], <br />
source&nbsp;([[ReplayWML|replay]], [[DirectActionsWML#.5Btunnel.5D|teleport]]),<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|specials]], <br />
[[InternalActionsWML#.5Bset_variables.5D|split]],<br />
[[Customizing_AI_in_Wesnoth_1.8#Working_with_main_loop_of_the_RCA_AI|stage]], <br />
[[AnimationWML#standing|standing_anim]], <br />
[[StatisticalScenarioWML#The_.5Bstatistics.5D_tag|statistics]],<br />
status&nbsp;([[SingleUnitWML|single unit]], [[ThemeWML|theme]]), <br />
[[InternalActionsWML#.5Bstore_gold.5D|store_gold]], <br />
[[InternalActionsWML#.5Bstore_items.5D|store_items]], <br />
[[InternalActionsWML#.5Bstore_locations.5D|store_locations]],<br />
[[InternalActionsWML#.5Bstore_map_dimensions.5D|store_map_dimensions]],<br />
[[InternalActionsWML#.5Bstore_reachable_locations.5D|store_reachable_locations]],<br />
[[InternalActionsWML#.5Bstore_side.5D|store_side]], <br />
[[InternalActionsWML#.5Bstore_starting_location.5D|store_starting_location]], <br />
[[InternalActionsWML#.5Bstore_time_of_day.5D|store_time_of_day]], <br />
[[InternalActionsWML#.5Bstore_turns.5D|store_turns]], <br />
[[InternalActionsWML#.5Bstore_unit.5D|store_unit]], <br />
[[InternalActionsWML#.5Bstore_unit_type.5D|store_unit_type]], <br />
[[InternalActionsWML#.5Bstore_unit_type_ids.5D|store_unit_type_ids]], <br />
[[InternalActionsWML#.5Bstore_villages.5D|store_villages]], <br />
[[IntroWML|story]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|swarm]], <br />
[[ConditionalActionsWML#.5Bswitch.5D|switch]];<br />
|-<br />
|''T:'' <br />
[[DirectActionsWML#.5Btunnel.5D|target]], <br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|team]],<br />
teleport&nbsp;([[AbilitiesWML|ability]], [[DirectActionsWML#.5Bteleport.5D|action]]),<br />
[[AnimationWML#pre_teleport|teleport_anim]],<br />
[[DirectActionsWML#.5Bterrain.5D|terrain]], <br />
[[TerrainGraphicsWML|terrain_graphics]], <br />
[[TerrainMaskWML|terrain_mask]], <br />
[[TerrainWML|terrain_type]], <br />
[[ScenarioWML#Test_scenario|test]],<br />
[[InterfaceActionsWML#.5Bmessage.5D|text_input]], <br />
[[WesCamp#The_textdomain_declaration|textdomain]],<br />
[[ThemeWML|theme]], <br />
[[ConditionalActionsWML#.5Bif.5D|then]],<br />
[[TerrainGraphicsWML|tile]], <br />
[[TimeWML|time]], <br />
[[DirectActionsWML#.5Btime_area.5D|time_area]], <br />
[[ThemeWML#.5Bstatus.5D|time_of_day]],<br />
[[HelpWML|topic]], <br />
[[HelpWML|toplevel]], <br />
[[UnitsWML#.5Btrait.5D|trait]], <br />
[[DirectActionsWML#.5Btransform_unit.5D|transform_unit]], <br />
[[InternalActionsWML#.5Bfind_path.5D|traveler]], <br />
[[ConditionalActionsWML#True_Condition_Tags|true]],<br />
[[DirectActionsWML#.5Btunnel.5D|tunnel]], <br />
[[ThemeWML#.5Bstatus.5D|turn]], <br />
[[ScenarioWML|tutorial]];<br />
|-<br />
|''U:'' <br />
[[InterfaceActionsWML#.5Bunhide_unit.5D|unhide_unit]], <br />
[[SingleUnitWML|unit]],<br />
[[ThemeWML#.5Bstatus.5D|unit_abilities]], <br />
[[ThemeWML#.5Bstatus.5D|unit_alignment]], <br />
[[ThemeWML#.5Bstatus.5D|unit_description]], <br />
[[ThemeWML#.5Bstatus.5D|unit_hp]], <br />
[[ThemeWML#.5Bstatus.5D|unit_image]], <br />
[[ThemeWML#.5Bstatus.5D|unit_level]], <br />
[[ThemeWML#.5Bstatus.5D|unit_moves]],<br />
[[InterfaceActionsWML#.5Bunit_overlay.5D|unit_overlay]], <br />
[[ThemeWML#.5Bstatus.5D|unit_profile]], <br />
[[ThemeWML#.5Bstatus.5D|unit_status]],<br />
[[ThemeWML#.5Bstatus.5D|unit_traits]], <br />
[[UnitTypeWML|unit_type]], <br />
[[ThemeWML#.5Bstatus.5D|unit_weapons]],<br />
[[InternalActionsWML|unit_worth]], <br />
[[ThemeWML#.5Bstatus.5D|unit_xp]],<br />
[[UnitsWML|units]],<br />
[[InterfaceActionsWML#.5Bunlock_view.5D|unlock_view]],<br />
[[DirectActionsWML#.5Bunpetrify.5D|unpetrify]], <br />
[[DirectActionsWML#.5Bunstore_unit.5D|unstore_unit]], <br />
[[ThemeWML#.5Bstatus.5D|upkeep]];<br />
|-<br />
| ''V:'' <br />
[[InternalActionsWML#.5Bset_variables.5D|value]], <br />
[[ConditionalActionsWML#Condition_Tags|variable]],<br />
[[VariablesWML#The_.5Bvariables.5D_tag|variables]],<br />
[[UnitTypeWML#Other_tags|variation]], <br />
[[AnimationWML#victory|victory_anim]], <br />
[[SideWML|village]],<br />
[[ThemeWML#.5Bstatus.5D|villages]],<br />
[[InterfaceActionsWML#.5Bvolume.5D|volume]];<br />
|-<br />
| ''W:'' <br />
[[ConditionalActionsWML#.5Bwhile.5D|while]],<br />
[[InterfaceActionsWML#.5Bwml_message.5D|wml_message]];<br />
|}<br />
<br />
<includeonly>[[Category:WML Reference]]</includeonly><br />
<br />
<noinclude>A box with all the WML tags, each one linking to the page and section they are described in. This box should be included in each of the WML reference pages.</noinclude></div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=EffectWML&diff=55704EffectWML2014-10-19T11:14:41Z<p>Xudojnik: I have attacked this rake recently. I don't want to do it anymore. Added example for effect: apply_to = new_animation.</p>
<hr />
<div>{{WML Tags}}<br />
<br />
The tag [effect] is used to describe one modification to a unit. Any number of [effect] tags can be used to describe a complete modification. Modifications are permanent changes to a unit; currently there is no way of removing a modification.<br />
<br />
The following keys and subtags are always recognized:<br />
* '''[filter]''': only apply this effect if the affected unit matches. See [[StandardUnitFilter]] for details.<br />
* '''unit_type''': only apply this effect if the affected unit's type name matches the value. (can be a list) {{DevFeature1.11}} Support for the key is removed in favor of [effect][filter]type=.<br />
* '''unit_gender''': only apply this effect if the affected unit's gender name matches the value. (can be a list) {{DevFeature1.11}} Support for the key is removed in favor of [effect][filter]gender=.<br />
* '''times''': describes how many times the effect is applied. The default is to apply the effect once. Other possible value : "per level" which means that the effect is applied level times, where level is the unit level.<br />
* '''apply_to''': describes what the effect actually affects.<br />
[effect] uses different keys depending on the value of '''apply_to'''. '''apply_to''' can take the following values:<br />
* '''new_attack''': will use all other keys and tags as the description of an attack that will be added to the unit. See [attack] in [[UnitTypeWML#Attacks|UnitTypeWML]].<br />
* '''remove_attacks''': remove the matching attacks. All tags from the attack filter construct will be used to match the attack; see [[FilterWML#Filtering Weapons|FilterWML]]. Do not use a [filter] tag otherwise it will not work properly.<br />
* '''attack''': find an attack and modify it. All tags from the attack filter construct will be used to match the attack; see [[FilterWML#Filtering Weapons|FilterWML]]. After that, the following keys and tags can be used to modify the attack. Note: do not use a [filter] tag. Just put the keys you want to filter on inside the [effect] tag.<br />
** '''set_name''': change the attack's name (ie identifier).<br />
** '''set_description''': change the attack's description (ie displayed name). <br />
** '''set_type''': change the attack type. The standard values are '''blade''', '''pierce''', '''impact''', '''fire''', '''cold''', and '''arcane'''.<br />
** '''set_icon''': change the attack's icon. {{DevFeature1.11}}<br />
** '''[set_specials]''': change the attack's specials. The specials to add are given exactly as in the [specials] tag.<br />
*** '''mode''': if '''append''', adds the given specials to the attack. If '''replace''', replaces the existing specials with the given ones. Default '''replace'''.<br />
** '''remove_specials''': remove the listed specials. The value of this key is the coma-separated list of the id of the specials to remove. This key is always evaluated before a [set_specials] tags in the same [effect]<br />
** '''increase_damage''': increases the attack's damage. This can be positive or negative, so you can use it to decrease damage as well. If it ends in a percent(''''%''''), the change in damage will be a percentage ratio of the attack's original damage.<br />
** '''increase_attacks''': increases the number of attack strikes. Like '''increase_damage''', it can be positive or negative, or a percentage.<br />
** '''attack_weight''': change the attack's attack_weight. See [attack] in [[UnitTypeWML#Attacks|UnitTypeWML]] for explanations about attack_weight.<br />
** '''defense_weight''': change the attack's defense_weight. See [attack] in [[UnitTypeWML#Attacks|UnitTypeWML]] for explanations about defense_weight.<br />
* '''hitpoints''': modifies the unit's HP and/or max HP.<br />
** '''increase''': the amount to increase the unit's HP.<br />
** '''heal_full''': if present and not set to "no" the unit will be put back to full HP.<br />
** '''increase_total''': will increase the total HP of the unit. Can be specified either as a negative or a positive value. It can also be specified as a percentage of the current total; i.e. "-50%" will cut max HP in half.<br />
** '''violate_maximum''': it the unit ends up with more than its max HP after these modifications, and this key is present (set to any non-null value, ex. '''yes'''), the unit's HP won't be lowered to its max HP.<br />
* '''movement''': modifies the unit's movement points.<br />
** '''increase''': maximum movement is increased by this amount. It can be positive, negative, or specified as a percentage.<br />
** '''set''': maximum movement is set to a specific value.<br />
* {{DevFeature1.11}} '''experience''': affects the unit's current XP.<br />
** '''increase''': current XP is increased by this amount. It can be positive, negative, or specified as a percentage.<br />
** '''set''': current XP is set to a specific value.<br />
* '''max_experience''': affects the amount of XP the unit needs for the next level.<br />
** '''increase''': how to change the xp; again it can be negative, positive or a percentage.<br />
* '''loyal''': no keys associated. The affected unit will be loyal i.e have an upkeep of 0.<br />
* '''movement_costs''': speed through specific terrain is modified<br />
** '''replace''': If set to "yes", any new values replace the old ones. Otherwise, new values are added to old values (negative values allowed).<br />
** '''[movement_costs]''': a subtag that describes the new movement costs just like in [[UnitsWML#.5Bmovetype.5D|UnitsWML]]<br />
* '''defense''': Sets the unit's chance to be hit in specific terrain (100 - the unit's defense as shown in-game). <br />
** '''replace''': If set to "yes", any new values replace the old ones. Otherwise, new values are added to old values. In most cases, adding a positive number makes the unit easier to hit, while adding a negative number makes the unit harder to hit. (The exception occurs when the old value is negative, indicating a defense that cannot be improved when this terrain is combined with another.) {{DevFeature1.11}} The exception has been removed; the new value is added to the absolute value of the old, and the sign of the old value is preserved.<br />
** '''[defense]''': a subtag that describes the new defense just like in [[UnitsWML#.5Bmovetype.5D|UnitsWML]]<br />
* '''resistance''': Sets percent damage taken from combat (100 - the unit's resistance as shown in-game)<br />
** '''replace''': If set to "yes", any new values replace the old ones. Otherwise, new values are added to old values. Adding a positive number makes the unit take more damage, while adding a negative number makes the unit take less damage.<br />
** '''[resistance]''': a subtag that describes the new resistance just like in [[UnitsWML#.5Bmovetype.5D|UnitsWML]]<br />
* '''variation''': switches the unit into one of its variations.<br />
** '''name''': the id of the variation to invoke.<br />
* '''type''': transforms the unit into a new unit_type.<br />
** '''name''': the id of the unit_type to invoke.<br />
* '''status''': modifies the status affecting the unit.<br />
** '''add''': a list of status modifications to add. Beware, these may be reapplied later, such as when the unit is recalled or levels up; if in an event, you can use [[InternalActionsWML|[store_unit]]] and [[DirectActionsWML|[unstore_unit]]], modifying unit.status.name directly, to avoid this, or if you are creating the unit, you can just add it to the unit's [status] tag in the [unit] tag. These are listed in [status], [[SingleUnitWML]].<br />
** '''remove''': a list of status modifications to remove.<br />
* '''zoc''': toggle the zone of control.<br />
** '''value''': new value for zoc (boolean).<br />
* '''profile''': customize the profile of the unit. See [[UnitTypeWML]].<br />
** '''portrait''': new image to display when the unit speaks.<br />
** '''small_portrait''': new image to display in unit reports.<br />
** '''description''': sets the text to display when hovering over the unit's type in the righthand pane.<br />
* '''new_ability''': Adds one or more abilities to a unit.<br />
** '''[abilities]''': A subtag that contains the ability definitions.<br />
* '''remove_ability''': Removes one or more abilities from a unit. Abilities are not reference counted: added, added, removed = gone.<br />
** '''[abilities]''': A subtag that contains the ability definitions. Strictly speaking, all that is needed is the id= inside some tag.<br />
* '''new_animation''': contain animations that will be added to the unit, it can contain multiple animation blocks, and a single "id=" line. That Id should be unique for each effect block and is used by the engine to reuse WML parsing, making the loading faster. <br />
* '''image_mod''': modify the image path function ([[ImagePathFunctionWML]]) of all the unit's frames.<br />
** '''replace''': replaces the image path function(s) to be used, e.g. "RC(magenta>red)"<br />
** '''add''': adds an image path function without removing any existing ones.<br />
* '''ellipse''': Change the image used for the unit's ellipse.<br />
**'''ellipse''' : the new image to use.<br />
* {{DevFeature1.11}} '''halo''': Change the image used for the unit's halo.<br />
**'''halo''': the new image to use.<br />
* {{DevFeature1.11}} '''overlay''': Change the unit's overlays.<br />
**'''add''': the specified overlay will be added to the unit's overlays. It can be a comma separated list with multiple overlays. ''Note: overlays added in this way cannot be removed by [remove_unit_overlay] until the effect's duration is over.''<br />
**'''replace''': all the unit's overlays will be removed and replaced with the specified one. Again, it can be a comma separated list. ''Note: overlays replaced in this way cannot be modified by [unit_overlay] or [remove_unit_overlay] until the effect's duration is over.''<br />
<br />
=== Examples ===<br />
== Effect: apply_to = new_animation ==<br />
This is the only way to change animations of units after they have been placed on the map.<br />
In this example, I add very simple idle animation (taken from Goblin Spearman) to the unit, which moves to hex (x=1, y=5). If you want something more complex, you need to check [[AnimationWML]] page.<br />
<br />
[event]<br />
name = moveto<br />
[filter]<br />
x,y = 1,5<br />
[/filter]<br />
[object]<br />
[filter]<br />
x,y = 1,5<br />
[/filter]<br />
[effect]<br />
apply_to = new_animation<br />
[idle_anim]<br />
{STANDARD_IDLE_FILTER}<br />
start_time=0<br />
[frame]<br />
image="units/goblins/spearman-idle-[1~12].png:[150*3,300,150*8]"<br />
[/frame]<br />
[/idle_anim]<br />
[/effect]<br />
[/object]<br />
[/event]<br />
<br />
If you are going to use '''advanced WML''' and want to add animation to unit, stored in variable, then following example might help you. '''This way is not efficient if you have no additional logic like inventoriy, shops, advanced unit modifications in your add-on.''' Is is preferred to use first variant or define all needed animation in unit_type.<br />
[event]<br />
name = moveto<br />
[filter]<br />
x,y = 1,5<br />
[/filter]<br />
[store_unit]<br />
[filter]<br />
x,y=1,5<br />
[/filter]<br />
variable = stored_unit<br />
[/store_unit]<br />
[set_variables]<br />
name = stored_unit.modifications.object<br />
[value]<br />
[effect]<br />
apply_to = new_animation<br />
[idle_anim]<br />
{STANDARD_IDLE_FILTER}<br />
start_time=0<br />
[frame]<br />
image="units/goblins/spearman-idle-[1~12].png:[150*3,300,150*8]"<br />
[/frame]<br />
[/idle_anim]<br />
[/effect]<br />
[/value]<br />
[/set_variables]<br />
[unstore_unit]<br />
variable = stored_unit<br />
[/unstore_unit]<br />
[/event]<br />
<br />
== See Also ==<br />
<br />
* [[UnitTypeWML]]<br />
* [[ReferenceWML]]<br />
* [[AnimationWML]]<br />
<br />
<br />
[[Category: WML Reference]]</div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Template:WML_Tags_by_Category&diff=55701Template:WML Tags by Category2014-10-18T10:29:19Z<p>Xudojnik: </p>
<hr />
<div>{| class="gallery" style="width:225px;float: right;border: 1px solid #B48648; color:#B48648; font-size: 7pt;margin-left;10px;"<br />
|-<br />
|<br />
<span style="float: right;"><small class="editlink noprint plainlinksneverexpand">[{{SERVER}}{{localurl:Template:WML Tags by Category|action=edit}} edit ]</small></span><br />
'''WML Tags by Category'''<br />
<br />
|-<br />
|''Top-level tags:'' <br />
[[AdvancedPreferenceWML|advanced_preference]], <br />
[[BinaryPathWML|binary_path]],<br />
[[CampaignWML#The_.5Bcampaign.5D_tag|campaign]],<br />
[[CoreWML|core]],<br />
[[EraWML|era]],<br />
[[FontsWML|fonts]],<br />
[[GameConfigWML|game_config]],<br />
[[HelpWML|help]],<br />
[[LanguageWML|language]],<br />
[[LocaleWML|locale]],<br />
[[ModificationWML|modification]],<br />
[[ScenarioWML|multiplayer]],<br />
[[TerrainGraphicsWML|terrain_graphics]], <br />
[[TerrainWML|terrain_type]], <br />
[[ThemeWML|theme]], <br />
[[ScenarioWML|tutorial]], <br />
[[UnitsWML|units]];<br />
<br />
|-<br />
|''AI:'' <br />
[[Lua_AI_Howto#Behavior_.28Sticky.29_Candidate_Actions|add_ai_behavior]],<br />
[[AiWML#The_.5Bai.5D_Tag:_Defining_Aspects|ai]],<br />
[[AiWML#A_Bit_More_on_Simple_vs._Composite_Aspects|aspect]],<br />
[[AiWML#The_.5Bai.5D_Tag:_Defining_Aspects|avoid]],<br />
[[Formula_AI_Howto#Setting_up_the_RCA_main_loop_Stage_and_Candidate_Actions|candidate_action]], <br />
[[AiWML#The_.5Bgoal.5D_Tag|criteria]],<br />
[[Customizing_AI_in_Wesnoth_1.8#AI_engines_.28_via_.5Bengine.5D_tags_.29|engine]], <br />
[[AiWML#A_Bit_More_on_Simple_vs._Composite_Aspects|facet]],<br />
[[AiWML#Filtering_Combat_with_the_.27attacks.27_Aspect|filter_enemy]],<br />
[[AiWML#Filtering_Combat_with_the_.27attacks.27_Aspect|filter_own]],<br />
[[AiWML#The_.5Bgoal.5D_Tag|goal]],<br />
[[AiWML#The_.5Bai.5D_Tag:_Defining_Aspects|leader_goal]],<br />
[[AiWML#Limiting_Recruiting_with_the_.27recruitment.27_Aspect|limit]],<br />
[[Micro AIs|micro_ai]],<br />
[[AiWML#Deprecated_AI_Targeting_Aspects|protect_location]], <br />
[[AiWML#Deprecated_AI_Targeting_Aspects|protect_unit]],<br />
[[Customizing_AI_in_Wesnoth_1.8#Working_with_main_loop_of_the_RCA_AI|stage]];<br />
<br />
|-<br />
|''Savefile and replay WML:'' <br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|advances]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|attacks]],<br />
[[ReplayWML|choose]],<br />
[[ReplayWML|command]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|deaths]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|defends]],<br />
[[ReplayWML|destination]],<br />
[[ReplayWML|end_turn]],<br />
[[ReplayWML|init_side]],<br />
[[StatisticalScenarioWML|killed]],<br />
[[ReplayWML|move]],<br />
[[ReplayWML|random]], <br />
[[ReplayWML|recall]],<br />
[[StatisticalScenarioWML|recalls]],<br />
[[ReplayWML|recruit]], <br />
[[StatisticalScenarioWML|recruits]],<br />
[[ReplayWML|replay]], <br />
[[SavefileWML|replay_start]],<br />
[[ReplayWML|results]], <br />
[[ReplayWML|sequence]], <br />
[[StatisticalScenarioWML#The_.5Bstatistics.5D_tag|statistics]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|team]],<br />
[[SavefileWML|menu_item]], <br />
[[SavefileWML|save]], <br />
[[SavefileWML|snapshot]],<br />
[[ReplayWML|source]],<br />
[[VariablesWML#The_.5Bvariables.5D_tag|variables]];<br />
<br />
|-<br />
|''Editor and maps WML:'' <br />
[[EditorWML#The_.5Bbrush.5D_tag|brush]],<br />
[[MapGeneratorWML#The_Default_Generator|castle]], <br />
[[MapGeneratorWML#The_Cave_Generator|chamber]], <br />
[[MapGeneratorWML#The_Default_Generator|convert]], <br />
[[EditorWML#The_.5Beditor_group.5D_tag|editor_group]],<br />
[[EditorWML#The_.5Beditor_music.5D_tag|editor_music]], <br />
[[EditorWML#The_.5Beditor_times.5D_tag|editor_times]],<br />
[[MapGeneratorWML|generator]],<br />
[[MapGeneratorWML|height]], <br />
[[MapGeneratorWML#The_Cave_Generator|items]],<br />
[[MapGeneratorWML|naming]], <br />
[[MapGeneratorWML|road_cost]],<br />
[[MapGeneratorWML#The_Cave_Generator|settings]], <br />
[[MapGeneratorWML|village_naming]]; <br />
<br />
|-<br />
|''Wesnoth interface markup''<br />
[[ThemeWML#.5Bstatus.5D|expenses]],<br />
[[ThemeWML|gold]],<br />
[[ThemeWML#.5Bstatus.5D|income]],<br />
[[ThemeWML|label]],<br />
[[ThemeWML#.5Bmain_map.5D|main_map]],<br />
[[ThemeWML#.5Bmain_map_border.5D|main_map_border]], <br />
[[ThemeWML#.5Bmenu.5D|menu]], <br />
[[ThemeWML#.5Bmini_map.5D|mini_map]],<br />
[[ThemeWML#.5Bstatus.5D|num_units]],<br />
[[ThemeWML#.5Bstatus.5D|observers]],<br />
[[ThemeWML#.5Bpanel.5D|panel]], <br />
[[ThemeWML#.5Bstatus.5D|position]],<br />
[[ThemeWML|resolution]], <br />
[[ThemeWML|side_playing]], <br />
[[ThemeWML|status]],<br />
[[ThemeWML#.5Bstatus.5D|time_of_day]],<br />
[[ThemeWML#.5Bstatus.5D|turn]], <br />
[[ThemeWML#.5Bstatus.5D|unit_abilities]], <br />
[[ThemeWML#.5Bstatus.5D|unit_alignment]], <br />
[[ThemeWML#.5Bstatus.5D|unit_description]], <br />
[[ThemeWML#.5Bstatus.5D|unit_hp]], <br />
[[ThemeWML#.5Bstatus.5D|unit_image]], <br />
[[ThemeWML#.5Bstatus.5D|unit_level]], <br />
[[ThemeWML#.5Bstatus.5D|unit_moves]],<br />
[[ThemeWML#.5Bstatus.5D|unit_profile]], <br />
[[ThemeWML#.5Bstatus.5D|unit_status]],<br />
[[ThemeWML#.5Bstatus.5D|unit_traits]], <br />
[[ThemeWML#.5Bstatus.5D|unit_weapons]],<br />
[[ThemeWML#.5Bstatus.5D|unit_xp]],<br />
[[ThemeWML#.5Bstatus.5D|upkeep]],<br />
[[ThemeWML#.5Bstatus.5D|villages]];<br />
|-<br />
|''Units animation WML''<br />
[[AnimationWML|animation]],<br />
[[AnimationWML|attack_anim]],<br />
[[AnimationWML#death|death]], <br />
[[AnimationWML#defend|defend]],<br />
[[AnimationWML#draw_weapon_anim|draw_weapon_anim]],<br />
[[AnimationWML#.5Bif.5D_and_.5Belse.5D|else]],<br />
[[AnimationWML#Frames|frame]],<br />
[[AnimationWML#healed|healed_anim]], <br />
[[AnimationWML#healing|healing_anim]], <br />
[[AnimationWML#idling|idle_anim]], <br />
[[AnimationWML#.5Bif.5D_and_.5Belse.5D|if]],<br />
[[AnimationWML#leading|leading_anim]], <br />
[[AnimationWML#levelin|levelin_anim]],<br />
[[AnimationWML#levelout|levelout_anim]], <br />
[[AnimationWML#The_content_of_a_frame|missile_frame]],<br />
[[AnimationWML#movement|movement_anim]], <br />
[[AnimationWML#post_movement|post_movement_anim]], <br />
[[AnimationWML#pre_movement|pre_movement_anim]], <br />
[[AnimationWML#recruited|recruit_anim]], <br />
[[AnimationWML#recruiting|recruiting_anim]], <br />
[[AnimationWML#Simplified_animation_blocks|extra_anim]],<br />
[[AnimationWML#sheath_weapon|sheath_weapon_anim]], <br />
[[AnimationWML#standing|standing_anim]], <br />
[[AnimationWML#pre_teleport|teleport_anim]],<br />
[[AnimationWML#victory|victory_anim]];<br />
|-<br />
|''Everything else in alphabetical order''<br />
<br />
''A:'' <br />
<br />
[[CampaignWML#Campaign credits|about]],<br />
[[AbilitiesWML|abilities]],<br />
[[SingleUnitWML|advance]],<br />
[[UnitTypeWML|advancefrom]],<br />
[[UnitTypeWML#After_max_level_advancement_.28AMLA.29|advancement]],<br />
[[DirectActionsWML#.5Ballow_end_turn.5D|allow_end_turn]],<br />
[[DirectActionsWML#.5Ballow_extra_recruit.5D|allow_extra_recruit]],<br />
[[DirectActionsWML#.5Ballow_recruit.5D|allow_recruit]],<br />
[[DirectActionsWML#.5Ballow_undo.5D|allow_undo]],<br />
[[InterfaceActionsWML#.5Banimate_unit.5D|animate]],<br />
[[InterfaceActionsWML#.5Banimate_unit.5D|animate_unit]],<br />
[[UnitTypeWML#Attacks|attack]];<br />
<br />
''B:'' <br />
<br />
[[UnitTypeWML#Other_tags|base_unit]], <br />
[[AbilitiesWML|berserk]]; <br />
<br />
''C:'' <br />
<br />
[[ConditionalActionsWML#.5Bcommand.5D|command]],<br />
[[DirectActionsWML#.5Bcapture_village.5D|capture_village]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|chance_to_hit]], <br />
[[InterfaceActionsWML#.5Bchat.5D|chat]],<br />
[[InterfaceActionsWML#.5Bclear_menu_item.5D|clear_menu_item]],<br />
[[InterfaceActionsWML#.5Bcolor_adjust.5D|color_adjust]];<br />
<br />
''D:'' <br />
<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|damage]],<br />
[[UnitsWML#.5Bmovetype.5D|defense]],<br />
[[InterfaceActionsWML#.5Bdelay.5D|delay]],<br />
[[InterfaceActionsWML#.5Bdeprecated_message.5D|deprecated_message]],<br />
[[AbilitiesWML|disable]],<br />
[[DirectActionsWML#.5Bdisallow_end_turn.5D|disallow_end_turn]],<br />
[[DirectActionsWML#.5Bdisallow_extra_recruit.5D|disallow_extra_recruit]],<br />
[[DirectActionsWML#.5Bdisallow_recruit.5D|disallow_recruit]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|drains]]; <br />
<br />
''E:'' <br />
<br />
[[EffectWML|effect]],<br />
[[DirectActionsWML#.5Bendlevel.5D|endlevel]],<br />
[[DirectActionsWML#.5Bend_turn.5D|end_turn]],<br />
[[CampaignWML#Campaign_credits|entry]], <br />
[[EventWML|event]];<br />
<br />
''F:''<br />
<br />
[[InterfaceActionsWML#.5Banimate_unit.5D|facing]], <br />
[[InterfaceActionsWML#.5Bmove_units_fake.5D|fake_unit]], <br />
[[UnitTypeWML#Other_tags|female]], <br />
[[InternalActionsWML#.5Bfire_event.5D|fire_event]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|firststrike]], <br />
[[InterfaceActionsWML#.5Bfloating_text.5D|floating_text]];<br />
<br />
''G:'' <br />
<br />
[[DirectActionsWML#.5Bgold.5D|gold]],<br />
[[InterfaceActionsWML#.5Bobjectives.5D|gold_carryover]];<br />
<br />
''H:'' <br />
<br />
[[DirectActionsWML#.5Bharm_unit.5D|harm_unit]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|heal_on_hit]], <br />
[[DirectActionsWML#.5Bheal_unit.5D|heal_unit]],<br />
[[AbilitiesWML|heals]], <br />
[[UnitsWML#.5Bhide_help.5D|hide_help]],<br />
[[InterfaceActionsWML#.5Bhide_unit.5D|hide_unit]],<br />
[[AbilitiesWML|hides]];<br />
<br />
''I:'' <br />
<br />
[[AbilitiesWML|illuminates]], <br />
[[TerrainGraphicsWML|image]],<br />
[[InterfaceActionsWML#.5Binspect.5D|inspect]],<br />
[[InterfaceActionsWML#.5Bitem.5D|item]]; <br />
<br />
''K:'' <br />
<br />
[[DirectActionsWML#.5Bkill.5D|kill]];<br />
<br />
''L:'' <br />
<br />
[[InterfaceActionsWML#.5Blabel.5D|label]],<br />
[[AbilitiesWML|leadership]], <br />
[[DirectActionsWML#.5Blift_fog.5D|lift_fog]],<br />
[[InterfaceActionsWML#.5Block_view.5D|lock_view]];<br />
<br />
''M:'' <br />
<br />
[[UnitTypeWML#Other_tags|male]], <br />
[[InterfaceActionsWML#.5Bmessage.5D|message]],<br />
[[SingleUnitWML|modifications]],<br />
[[DirectActionsWML#.5Bmodify_ai.5D|modify_ai]],<br />
[[DirectActionsWML#.5Bmodify_side.5D|modify_side]],<br />
[[DirectActionsWML#.5Bmodify_turns.5D|modify_turns]],<br />
[[DirectActionsWML#.5Bmodify_unit.5D|modify_unit]],<br />
[[DirectActionsWML#.5Bmove_unit.5D|move_unit]],<br />
[[InterfaceActionsWML#.5Bmove_unit_fake.5D|move_unit_fake]],<br />
[[InterfaceActionsWML#.5Bmove_units_fake.5D|move_units_fake]],<br />
[[UnitsWML#.5Bmovetype.5D|movement costs]],<br />
[[UnitsWML#.5Bmovetype.5D|movetype]],<br />
[[EraWML|multiplayer_side]],<br />
[[MusicListWML#.5Bmusic.5D|music]];<br />
<br />
''N:'' <br />
<br />
[[InterfaceActionsWML#.5Bobjectives.5D|note]]; <br />
<br />
''O:'' <br />
<br />
[[DirectActionsWML#.5Bobject.5D|object]],<br />
[[InterfaceActionsWML#.5Bobjectives.5D|objective]],<br />
[[InterfaceActionsWML#.5Bobjectives.5D|objectives]],<br />
[[InterfaceActionsWML#.5Bopen_help.5D|open_help]],<br />
[[InterfaceActionsWML#.5Bmessage.5D|option]],<br />
[[OptionWML|options]];<br />
<br />
''P:'' <br />
<br />
[[IntroWML|part]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|petrifies]], <br />
[[DirectActionsWML#.5Bpetrify.5D|petrify]], <br />
[[DirectActionsWML#.5Bplace_shroud.5D|place_shroud]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|plague]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|poison]], <br />
[[UnitTypeWML#Other_tags|portrait]], <br />
[[InterfaceActionsWML#.5Bprint.5D|print]]; <br />
<br />
''R:'' <br />
<br />
[[UnitsWML#.5Brace.5D|race]], <br />
[[DirectActionsWML#.5Brecall.5D|recall]], <br />
[[InterfaceActionsWML#.5Bredraw.5D|redraw]],<br />
[[AbilitiesWML|regenerate]], <br />
[[InterfaceActionsWML#.5Bremove_item.5D|remove_item]], <br />
[[DirectActionsWML#.5Bremove_shroud.5D|remove_shroud]], <br />
[[InterfaceActionsWML#.5Bremove_sound_source.5D|remove_sound_source]], <br />
[[InterfaceActionsWML#.5Bremove_unit_overlay.5D|remove_unit_overlay]],<br />
[[DirectActionsWML#.5Breplace_map.5D|replace_map]], <br />
[[DirectActionsWML#.5Breplace_schedule.5D|replace_schedule]], <br />
[[DirectActionsWML#.5Breset_fog.5D|reset_fog]], <br />
resistance&nbsp;([[AbilitiesWML|ability]], [[UnitsWML#.5Bmovetype.5D|unit]]),<br />
[[InternalActionsWML#.5Brole.5D|role]], <br />
[[TerrainMaskWML|rule]];<br />
<br />
''S:'' <br />
<br />
[[ScenarioWML|scenario]],<br />
[[InterfaceActionsWML#.5Bscroll.5D|scroll]], <br />
[[InterfaceActionsWML#.5Bscroll_to.5D|scroll_to]],<br />
[[InterfaceActionsWML#.5Bscroll_to_unit.5D|scroll_to_unit]], <br />
[[HelpWML|section]], <br />
[[InterfaceActionsWML#.5Bselect_unit.5D|select_unit]], <br />
[[DirectActionsWML#.5Bset_extra_recruit.5D|set_extra_recruit]],<br />
[[InterfaceActionsWML#.5Bset_menu_item.5D|set_menu_item]], <br />
[[DirectActionsWML#.5Bset_recruit.5D|set_recruit]],<br />
[[EffectWML|set_specials]], <br />
show_if&nbsp;([[InterfaceActionsWML#.5Bmessage.5D|message]], [[InterfaceActionsWML#.5Bset_menu_item.5D|set_menu_item]]),<br />
[[InterfaceActionsWML#.5Bshow_objectives.5D|show_objectives]],<br />
[[SideWML|side]], <br />
[[AbilitiesWML|skirmisher]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|slow]], <br />
[[InterfaceActionsWML#.5Bsound.5D|sound]], <br />
[[InterfaceActionsWML#.5Bsound_source.5D|sound_source]], <br />
[[DirectActionsWML#.5Btunnel.5D|source]]&nbsp;(teleport),<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|specials]], <br />
[[SingleUnitWML|status]], <br />
[[IntroWML|story]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|swarm]];<br />
<br />
''T:'' <br />
<br />
[[DirectActionsWML#.5Btunnel.5D|target]], <br />
teleport&nbsp;([[AbilitiesWML|ability]], [[DirectActionsWML#.5Bteleport.5D|action]]),<br />
[[DirectActionsWML#.5Bterrain.5D|terrain]], <br />
[[TerrainMaskWML|terrain_mask]], <br />
[[ScenarioWML#Test_scenario|test]],<br />
[[InterfaceActionsWML#.5Bmessage.5D|text_input]], <br />
[[WesCamp#The_textdomain_declaration|textdomain]],<br />
[[TerrainGraphicsWML|tile]], <br />
[[TimeWML|time]], <br />
[[DirectActionsWML#.5Btime_area.5D|time_area]], <br />
[[HelpWML|topic]], <br />
[[HelpWML|toplevel]], <br />
[[UnitsWML#.5Btrait.5D|trait]], <br />
[[DirectActionsWML#.5Btransform_unit.5D|transform_unit]], <br />
[[DirectActionsWML#.5Btunnel.5D|tunnel]];<br />
<br />
''U:'' <br />
<br />
[[InterfaceActionsWML#.5Bunhide_unit.5D|unhide_unit]], <br />
[[SingleUnitWML|unit]],<br />
[[InterfaceActionsWML#.5Bunit_overlay.5D|unit_overlay]], <br />
[[UnitTypeWML|unit_type]], <br />
[[UnitsWML|units]],<br />
[[InterfaceActionsWML#.5Bunlock_view.5D|unlock_view]],<br />
[[DirectActionsWML#.5Bunpetrify.5D|unpetrify]];<br />
<br />
''V:'' <br />
<br />
[[UnitTypeWML#Other_tags|variation]], <br />
[[SideWML|village]],<br />
[[InterfaceActionsWML#.5Bvolume.5D|volume]];<br />
<br />
''W:'' <br />
<br />
[[InterfaceActionsWML#.5Bwml_message.5D|wml_message]];<br />
|-<br />
|''Filtering''<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_ability|affect_adjacent]],<br />
[[StandardSideFilter|allied_with]], <br />
[[StandardSideFilter|enemy_of]], <br />
[[StandardUnitFilter|filter_adjacent]], <br />
[[StandardLocationFilter|filter_adjacent_location]], <br />
[[FilterWML#Filtering_Weapons|filter_attack]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_attacker]], <br />
[[AbilitiesWML#Common_keys_and_tags_for_every_ability|filter_base_value]], <br />
[[EventWML#.5Bfilter_condition.5D|filter_condition]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_defender]], <br />
[[StandardLocationFilter|filter_location]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_opponent]], <br />
[[StandardLocationFilter|filter_owner]], <br />
[[StandardLocationFilter|filter_radius]], <br />
[[SingleUnitWML|filter_recall]], <br />
[[StandardUnitFilter|filter_second]],<br />
[[FilterWML#Filtering_Weapons|filter_second_attack]],<br />
[[AbilitiesWML|filter_self]], <br />
[[StandardSideFilter|filter_side]],<br />
[[FilterWML#Filtering_Vision|filter_vision]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_weapon]], <br />
[[StandardUnitFilter|filter_wml]],<br />
[[StandardSideFilter|has_unit]], <br />
[[FilterWML#Filtering_Weapons|primary_attack]], <br />
[[StandardUnitFilter|primary_unit]],<br />
[[FilterWML#Filtering_Weapons|secondary_attack]], <br />
[[StandardUnitFilter|secondary_unit]], <br />
<br />
|-<br />
|''Variable operations''<br />
general-purpose:<br />
[[PersistenceWML|clear_global_variable]],<br />
[[InternalActionsWML#.5Bclear_variable.5D|clear_variable]],<br />
[[PersistenceWML|get_global_variable]],<br />
[[InternalActionsWML#.5Binsert_tag.5D|insert_tag]],<br />
[[LuaWML|lua]],<br />
[[PersistenceWML|set_global_variable]],<br />
[[InternalActionsWML#.5Bset_variable.5D|set_variable]], <br />
[[DirectActionsWML#.5Bunstore_unit.5D|unstore_unit]];<br />
<br />
conditionals: <br />
[[ConditionalActionsWML#.5Bif.5D|if]],<br />
[[ConditionalActionsWML#.5Bif.5D|then]],<br />
[[ConditionalActionsWML#.5Bif.5D|else]],<br />
[[ConditionalActionsWML#.5Bswitch.5D|switch]],<br />
[[ConditionalActionsWML#.5Bswitch.5D|case]],<br />
[[AnimationWML#default|default]],<br />
[[ConditionalActionsWML#Condition_Tags|variable]],<br />
[[ConditionalActionsWML#Condition_Tags|have_location]],<br />
[[ConditionalActionsWML#Condition_Tags|have_unit]],<br />
[[ConditionalActionsWML#True_Condition_Tags|true]],<br />
[[ConditionalActionsWML#True_Condition_Tags|false]],<br />
[[ConditionalActionsWML#Meta-Condition_Tags|and]],<br />
[[ConditionalActionsWML#Meta-Condition_Tags|not]], <br />
[[ConditionalActionsWML#Meta-Condition_Tags|or]];<br />
<br />
loops:<br />
[[ConditionalActionsWML#.5Bwhile.5D|while]],<br />
[[ConditionalActionsWML#.5Bwhile.5D|do]];<br />
<br />
arrays:<br />
[[InternalActionsWML#.5Bset_variables.5D|set_variables]],<br />
[[InternalActionsWML#.5Bset_variables.5D|join]],<br />
[[InternalActionsWML#.5Bset_variables.5D|split]],<br />
[[InternalActionsWML#.5Bset_variables.5D|literal]], <br />
[[InternalActionsWML#.5Bset_variables.5D|value]]; <br />
<br />
capturing game data:<br />
[[InternalActionsWML#.5Bfind_path.5D|destination]],<br />
[[InternalActionsWML#.5Bfind_path.5D|find_path]],<br />
[[InternalActionsWML#.5Bstore_gold.5D|store_gold]], <br />
[[InternalActionsWML#.5Bstore_items.5D|store_items]], <br />
[[InternalActionsWML#.5Bstore_locations.5D|store_locations]],<br />
[[InternalActionsWML#.5Bstore_map_dimensions.5D|store_map_dimensions]],<br />
[[InternalActionsWML#.5Bstore_reachable_locations.5D|store_reachable_locations]],<br />
[[InternalActionsWML#.5Bstore_side.5D|store_side]], <br />
[[InternalActionsWML#.5Bstore_starting_location.5D|store_starting_location]], <br />
[[InternalActionsWML#.5Bstore_time_of_day.5D|store_time_of_day]], <br />
[[InternalActionsWML#.5Bstore_turns.5D|store_turns]], <br />
[[InternalActionsWML#.5Bstore_unit.5D|store_unit]], <br />
[[InternalActionsWML#.5Bstore_unit_type.5D|store_unit_type]], <br />
[[InternalActionsWML#.5Bstore_unit_type_ids.5D|store_unit_type_ids]], <br />
[[InternalActionsWML#.5Bstore_villages.5D|store_villages]], <br />
[[InternalActionsWML#.5Bfind_path.5D|traveler]],<br />
[[InternalActionsWML|unit_worth]]; <br />
|}<br />
<br />
<includeonly>[[Category:WML Reference]]</includeonly><br />
<br />
<noinclude>Alternative box to {{WML Tags}}</noinclude></div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Template:WML_Tags_by_Category&diff=55700Template:WML Tags by Category2014-10-18T10:21:40Z<p>Xudojnik: Extracted filtering</p>
<hr />
<div>{| class="gallery" style="width:225px;float: right;border: 1px solid #B48648; color:#B48648; font-size: 7pt;margin-left;10px;"<br />
|-<br />
|<br />
<span style="float: right;"><small class="editlink noprint plainlinksneverexpand">[{{SERVER}}{{localurl:Template:WML Tags by Category|action=edit}} edit ]</small></span><br />
'''WML Tags by Category'''<br />
<br />
|-<br />
|''Top-level tags:'' <br />
[[AdvancedPreferenceWML|advanced_preference]], <br />
[[BinaryPathWML|binary_path]],<br />
[[CampaignWML#The_.5Bcampaign.5D_tag|campaign]],<br />
[[CoreWML|core]],<br />
[[EraWML|era]],<br />
[[FontsWML|fonts]],<br />
[[GameConfigWML|game_config]],<br />
[[HelpWML|help]],<br />
[[LanguageWML|language]],<br />
[[LocaleWML|locale]],<br />
[[TerrainGraphicsWML|terrain_graphics]], <br />
[[TerrainWML|terrain_type]], <br />
[[ThemeWML|theme]], <br />
[[ScenarioWML|tutorial]], <br />
[[UnitsWML|units]],<br />
[[ScenarioWML|multiplayer]];<br />
<br />
|-<br />
|''AI:'' <br />
[[Lua_AI_Howto#Behavior_.28Sticky.29_Candidate_Actions|add_ai_behavior]],<br />
[[AiWML#The_.5Bai.5D_Tag:_Defining_Aspects|ai]],<br />
[[AiWML#A_Bit_More_on_Simple_vs._Composite_Aspects|aspect]],<br />
[[AiWML#The_.5Bai.5D_Tag:_Defining_Aspects|avoid]],<br />
[[Formula_AI_Howto#Setting_up_the_RCA_main_loop_Stage_and_Candidate_Actions|candidate_action]], <br />
[[AiWML#The_.5Bgoal.5D_Tag|criteria]],<br />
[[Customizing_AI_in_Wesnoth_1.8#AI_engines_.28_via_.5Bengine.5D_tags_.29|engine]], <br />
[[AiWML#A_Bit_More_on_Simple_vs._Composite_Aspects|facet]],<br />
[[AiWML#Filtering_Combat_with_the_.27attacks.27_Aspect|filter_enemy]],<br />
[[AiWML#Filtering_Combat_with_the_.27attacks.27_Aspect|filter_own]],<br />
[[AiWML#The_.5Bgoal.5D_Tag|goal]],<br />
[[AiWML#The_.5Bai.5D_Tag:_Defining_Aspects|leader_goal]],<br />
[[AiWML#Limiting_Recruiting_with_the_.27recruitment.27_Aspect|limit]],<br />
[[Micro AIs|micro_ai]],<br />
[[AiWML#Deprecated_AI_Targeting_Aspects|protect_location]], <br />
[[AiWML#Deprecated_AI_Targeting_Aspects|protect_unit]],<br />
[[Customizing_AI_in_Wesnoth_1.8#Working_with_main_loop_of_the_RCA_AI|stage]];<br />
<br />
|-<br />
|''Savefile and replay WML:'' <br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|advances]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|attacks]],<br />
[[ReplayWML|choose]],<br />
[[ReplayWML|command]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|deaths]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|defends]],<br />
[[ReplayWML|destination]],<br />
[[ReplayWML|end_turn]],<br />
[[ReplayWML|init_side]],<br />
[[StatisticalScenarioWML|killed]],<br />
[[ReplayWML|move]],<br />
[[ReplayWML|random]], <br />
[[ReplayWML|recall]],<br />
[[StatisticalScenarioWML|recalls]],<br />
[[ReplayWML|recruit]], <br />
[[StatisticalScenarioWML|recruits]],<br />
[[ReplayWML|replay]], <br />
[[SavefileWML|replay_start]],<br />
[[ReplayWML|results]], <br />
[[ReplayWML|sequence]], <br />
[[StatisticalScenarioWML#The_.5Bstatistics.5D_tag|statistics]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|team]],<br />
[[SavefileWML|menu_item]], <br />
[[SavefileWML|save]], <br />
[[SavefileWML|snapshot]],<br />
[[ReplayWML|source]],<br />
[[VariablesWML#The_.5Bvariables.5D_tag|variables]];<br />
<br />
|-<br />
|''Editor and maps WML:'' <br />
[[EditorWML#The_.5Bbrush.5D_tag|brush]],<br />
[[MapGeneratorWML#The_Default_Generator|castle]], <br />
[[MapGeneratorWML#The_Cave_Generator|chamber]], <br />
[[MapGeneratorWML#The_Default_Generator|convert]], <br />
[[EditorWML#The_.5Beditor_group.5D_tag|editor_group]],<br />
[[EditorWML#The_.5Beditor_music.5D_tag|editor_music]], <br />
[[EditorWML#The_.5Beditor_times.5D_tag|editor_times]],<br />
[[MapGeneratorWML|generator]],<br />
[[MapGeneratorWML|height]], <br />
[[MapGeneratorWML#The_Cave_Generator|items]],<br />
[[MapGeneratorWML|naming]], <br />
[[MapGeneratorWML|road_cost]],<br />
[[MapGeneratorWML#The_Cave_Generator|settings]], <br />
[[MapGeneratorWML|village_naming]]; <br />
<br />
|-<br />
|''Wesnoth interface markup''<br />
[[ThemeWML#.5Bstatus.5D|expenses]],<br />
[[ThemeWML|gold]],<br />
[[ThemeWML#.5Bstatus.5D|income]],<br />
[[ThemeWML|label]],<br />
[[ThemeWML#.5Bmain_map.5D|main_map]],<br />
[[ThemeWML#.5Bmain_map_border.5D|main_map_border]], <br />
[[ThemeWML#.5Bmenu.5D|menu]], <br />
[[ThemeWML#.5Bmini_map.5D|mini_map]],<br />
[[ThemeWML#.5Bstatus.5D|num_units]],<br />
[[ThemeWML#.5Bstatus.5D|observers]],<br />
[[ThemeWML#.5Bpanel.5D|panel]], <br />
[[ThemeWML#.5Bstatus.5D|position]],<br />
[[ThemeWML|resolution]], <br />
[[ThemeWML|side_playing]], <br />
[[ThemeWML|status]],<br />
[[ThemeWML#.5Bstatus.5D|time_of_day]],<br />
[[ThemeWML#.5Bstatus.5D|turn]], <br />
[[ThemeWML#.5Bstatus.5D|unit_abilities]], <br />
[[ThemeWML#.5Bstatus.5D|unit_alignment]], <br />
[[ThemeWML#.5Bstatus.5D|unit_description]], <br />
[[ThemeWML#.5Bstatus.5D|unit_hp]], <br />
[[ThemeWML#.5Bstatus.5D|unit_image]], <br />
[[ThemeWML#.5Bstatus.5D|unit_level]], <br />
[[ThemeWML#.5Bstatus.5D|unit_moves]],<br />
[[ThemeWML#.5Bstatus.5D|unit_profile]], <br />
[[ThemeWML#.5Bstatus.5D|unit_status]],<br />
[[ThemeWML#.5Bstatus.5D|unit_traits]], <br />
[[ThemeWML#.5Bstatus.5D|unit_weapons]],<br />
[[ThemeWML#.5Bstatus.5D|unit_xp]],<br />
[[ThemeWML#.5Bstatus.5D|upkeep]],<br />
[[ThemeWML#.5Bstatus.5D|villages]];<br />
|-<br />
|''Units animation WML''<br />
[[AnimationWML|animation]],<br />
[[AnimationWML|attack_anim]],<br />
[[AnimationWML#death|death]], <br />
[[AnimationWML#defend|defend]],<br />
[[AnimationWML#draw_weapon_anim|draw_weapon_anim]],<br />
[[AnimationWML#.5Bif.5D_and_.5Belse.5D|else]],<br />
[[AnimationWML#Frames|frame]],<br />
[[AnimationWML#healed|healed_anim]], <br />
[[AnimationWML#healing|healing_anim]], <br />
[[AnimationWML#idling|idle_anim]], <br />
[[AnimationWML#.5Bif.5D_and_.5Belse.5D|if]],<br />
[[AnimationWML#leading|leading_anim]], <br />
[[AnimationWML#levelin|levelin_anim]],<br />
[[AnimationWML#levelout|levelout_anim]], <br />
[[AnimationWML#The_content_of_a_frame|missile_frame]],<br />
[[AnimationWML#movement|movement_anim]], <br />
[[AnimationWML#post_movement|post_movement_anim]], <br />
[[AnimationWML#pre_movement|pre_movement_anim]], <br />
[[AnimationWML#recruited|recruit_anim]], <br />
[[AnimationWML#recruiting|recruiting_anim]], <br />
[[AnimationWML#Simplified_animation_blocks|extra_anim]],<br />
[[AnimationWML#sheath_weapon|sheath_weapon_anim]], <br />
[[AnimationWML#standing|standing_anim]], <br />
[[AnimationWML#pre_teleport|teleport_anim]],<br />
[[AnimationWML#victory|victory_anim]];<br />
|-<br />
|''Everything else in alphabetical order''<br />
<br />
''A:'' <br />
<br />
[[CampaignWML#Campaign credits|about]],<br />
[[AbilitiesWML|abilities]],<br />
[[SingleUnitWML|advance]],<br />
[[UnitTypeWML|advancefrom]],<br />
[[UnitTypeWML#After_max_level_advancement_.28AMLA.29|advancement]],<br />
[[DirectActionsWML#.5Ballow_end_turn.5D|allow_end_turn]],<br />
[[DirectActionsWML#.5Ballow_extra_recruit.5D|allow_extra_recruit]],<br />
[[DirectActionsWML#.5Ballow_recruit.5D|allow_recruit]],<br />
[[DirectActionsWML#.5Ballow_undo.5D|allow_undo]],<br />
[[InterfaceActionsWML#.5Banimate_unit.5D|animate]],<br />
[[InterfaceActionsWML#.5Banimate_unit.5D|animate_unit]],<br />
[[UnitTypeWML#Attacks|attack]];<br />
<br />
''B:'' <br />
<br />
[[UnitTypeWML#Other_tags|base_unit]], <br />
[[AbilitiesWML|berserk]]; <br />
<br />
''C:'' <br />
<br />
[[ConditionalActionsWML#.5Bcommand.5D|command]]&nbsp;(action),<br />
[[DirectActionsWML#.5Bcapture_village.5D|capture_village]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|chance_to_hit]], <br />
[[InterfaceActionsWML#.5Bchat.5D|chat]],<br />
[[InterfaceActionsWML#.5Bclear_menu_item.5D|clear_menu_item]],<br />
[[InternalActionsWML#.5Bclear_variable.5D|clear_variable]],<br />
[[InterfaceActionsWML#.5Bcolor_adjust.5D|color_adjust]];<br />
<br />
''D:'' <br />
<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|damage]],<br />
[[UnitsWML#.5Bmovetype.5D|defense]],<br />
[[InterfaceActionsWML#.5Bdelay.5D|delay]],<br />
[[InterfaceActionsWML#.5Bdeprecated_message.5D|deprecated_message]],<br />
[[AbilitiesWML|disable]],<br />
[[DirectActionsWML#.5Bdisallow_end_turn.5D|disallow_end_turn]],<br />
[[DirectActionsWML#.5Bdisallow_extra_recruit.5D|disallow_extra_recruit]],<br />
[[DirectActionsWML#.5Bdisallow_recruit.5D|disallow_recruit]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|drains]]; <br />
<br />
''E:'' <br />
<br />
[[EffectWML|effect]],<br />
[[DirectActionsWML#.5Bendlevel.5D|endlevel]],<br />
[[DirectActionsWML#.5Bend_turn.5D|end_turn]]&nbsp;(action),<br />
[[CampaignWML#Campaign_credits|entry]], <br />
[[EventWML|event]];<br />
<br />
''F:''<br />
<br />
[[InterfaceActionsWML#.5Banimate_unit.5D|facing]], <br />
[[InterfaceActionsWML#.5Bmove_units_fake.5D|fake_unit]], <br />
[[UnitTypeWML#Other_tags|female]], <br />
[[InternalActionsWML#.5Bfire_event.5D|fire_event]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|firststrike]], <br />
[[InterfaceActionsWML#.5Bfloating_text.5D|floating_text]];<br />
<br />
''G:'' <br />
<br />
[[PersistenceWML|get_global_variable]],<br />
[[DirectActionsWML#.5Bgold.5D|gold]],<br />
[[InterfaceActionsWML#.5Bobjectives.5D|gold_carryover]];<br />
<br />
''H:'' <br />
<br />
[[DirectActionsWML#.5Bharm_unit.5D|harm_unit]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|heal_on_hit]], <br />
[[DirectActionsWML#.5Bheal_unit.5D|heal_unit]],<br />
[[AbilitiesWML|heals]], <br />
[[UnitsWML#.5Bhide_help.5D|hide_help]],<br />
[[InterfaceActionsWML#.5Bhide_unit.5D|hide_unit]],<br />
[[AbilitiesWML|hides]];<br />
<br />
''I:'' <br />
<br />
[[AbilitiesWML|illuminates]], <br />
[[TerrainGraphicsWML|image]],<br />
[[InterfaceActionsWML#.5Binspect.5D|inspect]],<br />
[[InterfaceActionsWML#.5Bitem.5D|item]]; <br />
<br />
''K:'' <br />
<br />
[[DirectActionsWML#.5Bkill.5D|kill]];<br />
<br />
''L:'' <br />
<br />
[[InterfaceActionsWML#.5Blabel.5D|label]],<br />
[[AbilitiesWML|leadership]], <br />
[[DirectActionsWML#.5Blift_fog.5D|lift_fog]],<br />
[[InterfaceActionsWML#.5Block_view.5D|lock_view]];<br />
<br />
''M:'' <br />
<br />
[[UnitTypeWML#Other_tags|male]], <br />
[[InterfaceActionsWML#.5Bmessage.5D|message]],<br />
[[ModificationWML|modification]],<br />
[[SingleUnitWML|modifications]],<br />
[[DirectActionsWML#.5Bmodify_ai.5D|modify_ai]],<br />
[[DirectActionsWML#.5Bmodify_side.5D|modify_side]],<br />
[[DirectActionsWML#.5Bmodify_turns.5D|modify_turns]],<br />
[[DirectActionsWML#.5Bmodify_unit.5D|modify_unit]],<br />
[[DirectActionsWML#.5Bmove_unit.5D|move_unit]],<br />
[[InterfaceActionsWML#.5Bmove_unit_fake.5D|move_unit_fake]],<br />
[[InterfaceActionsWML#.5Bmove_units_fake.5D|move_units_fake]],<br />
[[UnitsWML#.5Bmovetype.5D|movement costs]],<br />
[[UnitsWML#.5Bmovetype.5D|movetype]],<br />
[[EraWML|multiplayer_side]],<br />
[[MusicListWML#.5Bmusic.5D|music]];<br />
<br />
''N:'' <br />
<br />
[[InterfaceActionsWML#.5Bobjectives.5D|note]]; <br />
<br />
''O:'' <br />
<br />
[[DirectActionsWML#.5Bobject.5D|object]],<br />
[[InterfaceActionsWML#.5Bobjectives.5D|objective]],<br />
[[InterfaceActionsWML#.5Bobjectives.5D|objectives]],<br />
[[InterfaceActionsWML#.5Bopen_help.5D|open_help]],<br />
[[InterfaceActionsWML#.5Bmessage.5D|option]],<br />
[[OptionWML|options]];<br />
<br />
''P:'' <br />
<br />
[[IntroWML|part]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|petrifies]], <br />
[[DirectActionsWML#.5Bpetrify.5D|petrify]], <br />
[[DirectActionsWML#.5Bplace_shroud.5D|place_shroud]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|plague]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|poison]], <br />
[[UnitTypeWML#Other_tags|portrait]], <br />
[[InterfaceActionsWML#.5Bprint.5D|print]]; <br />
<br />
''R:'' <br />
<br />
[[UnitsWML#.5Brace.5D|race]], <br />
[[DirectActionsWML#.5Brecall.5D|recall]], <br />
[[InterfaceActionsWML#.5Bredraw.5D|redraw]],<br />
[[AbilitiesWML|regenerate]], <br />
[[InterfaceActionsWML#.5Bremove_item.5D|remove_item]], <br />
[[DirectActionsWML#.5Bremove_shroud.5D|remove_shroud]], <br />
[[InterfaceActionsWML#.5Bremove_sound_source.5D|remove_sound_source]], <br />
[[InterfaceActionsWML#.5Bremove_unit_overlay.5D|remove_unit_overlay]],<br />
[[DirectActionsWML#.5Breplace_map.5D|replace_map]], <br />
[[DirectActionsWML#.5Breplace_schedule.5D|replace_schedule]], <br />
[[DirectActionsWML#.5Breset_fog.5D|reset_fog]], <br />
resistance&nbsp;([[AbilitiesWML|ability]], [[UnitsWML#.5Bmovetype.5D|unit]]),<br />
[[InternalActionsWML#.5Brole.5D|role]], <br />
[[TerrainMaskWML|rule]];<br />
<br />
''S:'' <br />
<br />
[[ScenarioWML|scenario]],<br />
[[InterfaceActionsWML#.5Bscroll.5D|scroll]], <br />
[[InterfaceActionsWML#.5Bscroll_to.5D|scroll_to]],<br />
[[InterfaceActionsWML#.5Bscroll_to_unit.5D|scroll_to_unit]], <br />
[[HelpWML|section]], <br />
[[InterfaceActionsWML#.5Bselect_unit.5D|select_unit]], <br />
[[DirectActionsWML#.5Bset_extra_recruit.5D|set_extra_recruit]],<br />
[[InterfaceActionsWML#.5Bset_menu_item.5D|set_menu_item]], <br />
[[DirectActionsWML#.5Bset_recruit.5D|set_recruit]],<br />
[[EffectWML|set_specials]], <br />
show_if&nbsp;([[InterfaceActionsWML#.5Bmessage.5D|message]], [[InterfaceActionsWML#.5Bset_menu_item.5D|set_menu_item]]),<br />
[[InterfaceActionsWML#.5Bshow_objectives.5D|show_objectives]],<br />
[[SideWML|side]], <br />
[[AbilitiesWML|skirmisher]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|slow]], <br />
[[InterfaceActionsWML#.5Bsound.5D|sound]], <br />
[[InterfaceActionsWML#.5Bsound_source.5D|sound_source]], <br />
[[DirectActionsWML#.5Btunnel.5D|source]]&nbsp;(teleport),<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|specials]], <br />
[[SingleUnitWML|status]], <br />
[[IntroWML|story]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|swarm]];<br />
<br />
''T:'' <br />
<br />
[[DirectActionsWML#.5Btunnel.5D|target]], <br />
teleport&nbsp;([[AbilitiesWML|ability]], [[DirectActionsWML#.5Bteleport.5D|action]]),<br />
[[DirectActionsWML#.5Bterrain.5D|terrain]], <br />
[[TerrainMaskWML|terrain_mask]], <br />
[[ScenarioWML#Test_scenario|test]],<br />
[[InterfaceActionsWML#.5Bmessage.5D|text_input]], <br />
[[WesCamp#The_textdomain_declaration|textdomain]],<br />
[[TerrainGraphicsWML|tile]], <br />
[[TimeWML|time]], <br />
[[DirectActionsWML#.5Btime_area.5D|time_area]], <br />
[[HelpWML|topic]], <br />
[[HelpWML|toplevel]], <br />
[[UnitsWML#.5Btrait.5D|trait]], <br />
[[DirectActionsWML#.5Btransform_unit.5D|transform_unit]], <br />
[[DirectActionsWML#.5Btunnel.5D|tunnel]];<br />
<br />
''U:'' <br />
<br />
[[InterfaceActionsWML#.5Bunhide_unit.5D|unhide_unit]], <br />
[[SingleUnitWML|unit]],<br />
[[InterfaceActionsWML#.5Bunit_overlay.5D|unit_overlay]], <br />
[[UnitTypeWML|unit_type]], <br />
[[UnitsWML|units]],<br />
[[InterfaceActionsWML#.5Bunlock_view.5D|unlock_view]],<br />
[[DirectActionsWML#.5Bunpetrify.5D|unpetrify]];<br />
<br />
''V:'' <br />
<br />
[[UnitTypeWML#Other_tags|variation]], <br />
[[SideWML|village]],<br />
[[InterfaceActionsWML#.5Bvolume.5D|volume]];<br />
<br />
''W:'' <br />
<br />
[[InterfaceActionsWML#.5Bwml_message.5D|wml_message]];<br />
|-<br />
|''Filtering''<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_ability|affect_adjacent]],<br />
[[StandardSideFilter|allied_with]], <br />
[[StandardSideFilter|enemy_of]], <br />
[[StandardUnitFilter|filter_adjacent]], <br />
[[StandardLocationFilter|filter_adjacent_location]], <br />
[[FilterWML#Filtering_Weapons|filter_attack]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_attacker]], <br />
[[AbilitiesWML#Common_keys_and_tags_for_every_ability|filter_base_value]], <br />
[[EventWML#.5Bfilter_condition.5D|filter_condition]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_defender]], <br />
[[StandardLocationFilter|filter_location]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_opponent]], <br />
[[StandardLocationFilter|filter_owner]], <br />
[[StandardLocationFilter|filter_radius]], <br />
[[SingleUnitWML|filter_recall]], <br />
[[StandardUnitFilter|filter_second]],<br />
[[FilterWML#Filtering_Weapons|filter_second_attack]],<br />
[[AbilitiesWML|filter_self]], <br />
[[StandardSideFilter|filter_side]],<br />
[[FilterWML#Filtering_Vision|filter_vision]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_weapon]], <br />
[[StandardUnitFilter|filter_wml]],<br />
[[StandardSideFilter|has_unit]], <br />
[[FilterWML#Filtering_Weapons|primary_attack]], <br />
[[StandardUnitFilter|primary_unit]],<br />
[[FilterWML#Filtering_Weapons|secondary_attack]], <br />
[[StandardUnitFilter|secondary_unit]], <br />
<br />
|-<br />
|''Variable operations''<br />
general-purpose:<br />
[[PersistenceWML|clear_global_variable]],<br />
[[InternalActionsWML#.5Binsert_tag.5D|insert_tag]],<br />
[[LuaWML|lua]],<br />
[[PersistenceWML|set_global_variable]],<br />
[[InternalActionsWML#.5Bset_variable.5D|set_variable]], <br />
[[DirectActionsWML#.5Bunstore_unit.5D|unstore_unit]];<br />
<br />
conditionals: <br />
[[ConditionalActionsWML#.5Bif.5D|if]],<br />
[[ConditionalActionsWML#.5Bif.5D|then]],<br />
[[ConditionalActionsWML#.5Bif.5D|else]],<br />
[[ConditionalActionsWML#.5Bswitch.5D|switch]],<br />
[[ConditionalActionsWML#.5Bswitch.5D|case]],<br />
[[AnimationWML#default|default]],<br />
[[ConditionalActionsWML#Condition_Tags|variable]],<br />
[[ConditionalActionsWML#Condition_Tags|have_location]],<br />
[[ConditionalActionsWML#Condition_Tags|have_unit]],<br />
[[ConditionalActionsWML#True_Condition_Tags|true]],<br />
[[ConditionalActionsWML#True_Condition_Tags|false]],<br />
[[ConditionalActionsWML#Meta-Condition_Tags|and]],<br />
[[ConditionalActionsWML#Meta-Condition_Tags|not]], <br />
[[ConditionalActionsWML#Meta-Condition_Tags|or]];<br />
<br />
loops:<br />
[[ConditionalActionsWML#.5Bwhile.5D|while]],<br />
[[ConditionalActionsWML#.5Bwhile.5D|do]];<br />
<br />
arrays:<br />
[[InternalActionsWML#.5Bset_variables.5D|set_variables]],<br />
[[InternalActionsWML#.5Bset_variables.5D|join]],<br />
[[InternalActionsWML#.5Bset_variables.5D|split]],<br />
[[InternalActionsWML#.5Bset_variables.5D|literal]], <br />
[[InternalActionsWML#.5Bset_variables.5D|value]]; <br />
<br />
capturing game data:<br />
[[InternalActionsWML#.5Bfind_path.5D|destination]],<br />
[[InternalActionsWML#.5Bfind_path.5D|find_path]],<br />
[[InternalActionsWML#.5Bstore_gold.5D|store_gold]], <br />
[[InternalActionsWML#.5Bstore_items.5D|store_items]], <br />
[[InternalActionsWML#.5Bstore_locations.5D|store_locations]],<br />
[[InternalActionsWML#.5Bstore_map_dimensions.5D|store_map_dimensions]],<br />
[[InternalActionsWML#.5Bstore_reachable_locations.5D|store_reachable_locations]],<br />
[[InternalActionsWML#.5Bstore_side.5D|store_side]], <br />
[[InternalActionsWML#.5Bstore_starting_location.5D|store_starting_location]], <br />
[[InternalActionsWML#.5Bstore_time_of_day.5D|store_time_of_day]], <br />
[[InternalActionsWML#.5Bstore_turns.5D|store_turns]], <br />
[[InternalActionsWML#.5Bstore_unit.5D|store_unit]], <br />
[[InternalActionsWML#.5Bstore_unit_type.5D|store_unit_type]], <br />
[[InternalActionsWML#.5Bstore_unit_type_ids.5D|store_unit_type_ids]], <br />
[[InternalActionsWML#.5Bstore_villages.5D|store_villages]], <br />
[[InternalActionsWML#.5Bfind_path.5D|traveler]],<br />
[[InternalActionsWML|unit_worth]]; <br />
|}<br />
<br />
<includeonly>[[Category:WML Reference]]</includeonly><br />
<br />
<noinclude>Alternative box to {{WML Tags}}</noinclude></div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Template:WML_Tags_by_Category&diff=55699Template:WML Tags by Category2014-10-18T09:18:16Z<p>Xudojnik: Extracted loops</p>
<hr />
<div>{| class="gallery" style="width:225px;float: right;border: 1px solid #B48648; color:#B48648; font-size: 7pt;margin-left;10px;"<br />
|-<br />
|<br />
<span style="float: right;"><small class="editlink noprint plainlinksneverexpand">[{{SERVER}}{{localurl:Template:WML Tags by Category|action=edit}} edit ]</small></span><br />
'''WML Tags by Category'''<br />
<br />
|-<br />
|''Top-level tags:'' <br />
[[AdvancedPreferenceWML|advanced_preference]], <br />
[[BinaryPathWML|binary_path]],<br />
[[CampaignWML#The_.5Bcampaign.5D_tag|campaign]],<br />
[[CoreWML|core]],<br />
[[EraWML|era]],<br />
[[FontsWML|fonts]],<br />
[[GameConfigWML|game_config]],<br />
[[HelpWML|help]],<br />
[[LanguageWML|language]],<br />
[[LocaleWML|locale]],<br />
[[TerrainGraphicsWML|terrain_graphics]], <br />
[[TerrainWML|terrain_type]], <br />
[[ThemeWML|theme]], <br />
[[UnitsWML|units]],<br />
[[ScenarioWML|multiplayer]];<br />
<br />
|-<br />
|''AI:'' <br />
[[Lua_AI_Howto#Behavior_.28Sticky.29_Candidate_Actions|add_ai_behavior]],<br />
[[AiWML#The_.5Bai.5D_Tag:_Defining_Aspects|ai]],<br />
[[AiWML#A_Bit_More_on_Simple_vs._Composite_Aspects|aspect]],<br />
[[AiWML#The_.5Bai.5D_Tag:_Defining_Aspects|avoid]],<br />
[[Formula_AI_Howto#Setting_up_the_RCA_main_loop_Stage_and_Candidate_Actions|candidate_action]], <br />
[[AiWML#The_.5Bgoal.5D_Tag|criteria]],<br />
[[Customizing_AI_in_Wesnoth_1.8#AI_engines_.28_via_.5Bengine.5D_tags_.29|engine]], <br />
[[AiWML#A_Bit_More_on_Simple_vs._Composite_Aspects|facet]],<br />
[[AiWML#Filtering_Combat_with_the_.27attacks.27_Aspect|filter_enemy]],<br />
[[AiWML#Filtering_Combat_with_the_.27attacks.27_Aspect|filter_own]],<br />
[[AiWML#The_.5Bgoal.5D_Tag|goal]],<br />
[[AiWML#The_.5Bai.5D_Tag:_Defining_Aspects|leader_goal]],<br />
[[AiWML#Limiting_Recruiting_with_the_.27recruitment.27_Aspect|limit]],<br />
[[Micro AIs|micro_ai]],<br />
[[AiWML#Deprecated_AI_Targeting_Aspects|protect_location]], <br />
[[AiWML#Deprecated_AI_Targeting_Aspects|protect_unit]],<br />
[[Customizing_AI_in_Wesnoth_1.8#Working_with_main_loop_of_the_RCA_AI|stage]];<br />
<br />
|-<br />
|''Savefile and replay WML:'' <br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|advances]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|attacks]],<br />
[[ReplayWML|choose]],<br />
[[ReplayWML|command]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|deaths]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|defends]],<br />
[[ReplayWML|destination]],<br />
[[ReplayWML|end_turn]],<br />
[[ReplayWML|init_side]],<br />
[[StatisticalScenarioWML|killed]],<br />
[[ReplayWML|move]],<br />
[[ReplayWML|random]], <br />
[[ReplayWML|recall]],<br />
[[StatisticalScenarioWML|recalls]],<br />
[[ReplayWML|recruit]], <br />
[[StatisticalScenarioWML|recruits]],<br />
[[ReplayWML|replay]], <br />
[[SavefileWML|replay_start]],<br />
[[ReplayWML|results]], <br />
[[ReplayWML|sequence]], <br />
[[StatisticalScenarioWML#The_.5Bstatistics.5D_tag|statistics]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|team]],<br />
[[SavefileWML|menu_item]], <br />
[[SavefileWML|save]], <br />
[[SavefileWML|snapshot]],<br />
[[ReplayWML|source]],<br />
[[VariablesWML#The_.5Bvariables.5D_tag|variables]];<br />
<br />
|-<br />
|''Editor and maps WML:'' <br />
[[EditorWML#The_.5Bbrush.5D_tag|brush]],<br />
[[MapGeneratorWML#The_Default_Generator|castle]], <br />
[[MapGeneratorWML#The_Cave_Generator|chamber]], <br />
[[MapGeneratorWML#The_Default_Generator|convert]], <br />
[[EditorWML#The_.5Beditor_group.5D_tag|editor_group]],<br />
[[EditorWML#The_.5Beditor_music.5D_tag|editor_music]], <br />
[[EditorWML#The_.5Beditor_times.5D_tag|editor_times]],<br />
[[MapGeneratorWML|generator]],<br />
[[MapGeneratorWML|height]], <br />
[[MapGeneratorWML#The_Cave_Generator|items]],<br />
[[MapGeneratorWML|naming]], <br />
[[MapGeneratorWML|road_cost]],<br />
[[MapGeneratorWML#The_Cave_Generator|settings]], <br />
[[MapGeneratorWML|village_naming]]; <br />
<br />
|-<br />
|''Wesnoth interface markup''<br />
[[ThemeWML#.5Bstatus.5D|expenses]],<br />
[[ThemeWML|gold]],<br />
[[ThemeWML#.5Bstatus.5D|income]],<br />
[[ThemeWML|label]],<br />
[[ThemeWML#.5Bmain_map.5D|main_map]],<br />
[[ThemeWML#.5Bmain_map_border.5D|main_map_border]], <br />
[[ThemeWML#.5Bmenu.5D|menu]], <br />
[[ThemeWML#.5Bmini_map.5D|mini_map]],<br />
[[ThemeWML#.5Bstatus.5D|num_units]],<br />
[[ThemeWML#.5Bstatus.5D|observers]],<br />
[[ThemeWML#.5Bpanel.5D|panel]], <br />
[[ThemeWML#.5Bstatus.5D|position]],<br />
[[ThemeWML|resolution]], <br />
[[ThemeWML|side_playing]], <br />
[[ThemeWML|status]],<br />
[[ThemeWML#.5Bstatus.5D|time_of_day]],<br />
[[ThemeWML#.5Bstatus.5D|turn]], <br />
[[ThemeWML#.5Bstatus.5D|unit_abilities]], <br />
[[ThemeWML#.5Bstatus.5D|unit_alignment]], <br />
[[ThemeWML#.5Bstatus.5D|unit_description]], <br />
[[ThemeWML#.5Bstatus.5D|unit_hp]], <br />
[[ThemeWML#.5Bstatus.5D|unit_image]], <br />
[[ThemeWML#.5Bstatus.5D|unit_level]], <br />
[[ThemeWML#.5Bstatus.5D|unit_moves]],<br />
[[ThemeWML#.5Bstatus.5D|unit_profile]], <br />
[[ThemeWML#.5Bstatus.5D|unit_status]],<br />
[[ThemeWML#.5Bstatus.5D|unit_traits]], <br />
[[ThemeWML#.5Bstatus.5D|unit_weapons]],<br />
[[ThemeWML#.5Bstatus.5D|unit_xp]],<br />
[[ThemeWML#.5Bstatus.5D|upkeep]],<br />
[[ThemeWML#.5Bstatus.5D|villages]];<br />
|-<br />
|''Units animation WML''<br />
[[AnimationWML|animation]],<br />
[[AnimationWML|attack_anim]],<br />
[[AnimationWML#death|death]], <br />
[[AnimationWML#defend|defend]],<br />
[[AnimationWML#draw_weapon_anim|draw_weapon_anim]],<br />
[[AnimationWML#.5Bif.5D_and_.5Belse.5D|else]],<br />
[[AnimationWML#Frames|frame]],<br />
[[AnimationWML#healed|healed_anim]], <br />
[[AnimationWML#healing|healing_anim]], <br />
[[AnimationWML#idling|idle_anim]], <br />
[[AnimationWML#.5Bif.5D_and_.5Belse.5D|if]],<br />
[[AnimationWML#leading|leading_anim]], <br />
[[AnimationWML#levelin|levelin_anim]],<br />
[[AnimationWML#levelout|levelout_anim]], <br />
[[AnimationWML#The_content_of_a_frame|missile_frame]],<br />
[[AnimationWML#movement|movement_anim]], <br />
[[AnimationWML#post_movement|post_movement_anim]], <br />
[[AnimationWML#pre_movement|pre_movement_anim]], <br />
[[AnimationWML#recruited|recruit_anim]], <br />
[[AnimationWML#recruiting|recruiting_anim]], <br />
[[AnimationWML#Simplified_animation_blocks|extra_anim]],<br />
[[AnimationWML#sheath_weapon|sheath_weapon_anim]], <br />
[[AnimationWML#standing|standing_anim]], <br />
[[AnimationWML#pre_teleport|teleport_anim]],<br />
[[AnimationWML#victory|victory_anim]];<br />
|-<br />
|''A:'' <br />
[[CampaignWML#Campaign credits|about]],<br />
[[AbilitiesWML|abilities]],<br />
[[SingleUnitWML|advance]],<br />
[[UnitTypeWML|advancefrom]],<br />
[[UnitTypeWML#After_max_level_advancement_.28AMLA.29|advancement]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_ability|affect_adjacent]],<br />
[[StandardSideFilter|allied_with]], <br />
[[DirectActionsWML#.5Ballow_end_turn.5D|allow_end_turn]],<br />
[[DirectActionsWML#.5Ballow_extra_recruit.5D|allow_extra_recruit]],<br />
[[DirectActionsWML#.5Ballow_recruit.5D|allow_recruit]],<br />
[[DirectActionsWML#.5Ballow_undo.5D|allow_undo]],<br />
[[InterfaceActionsWML#.5Banimate_unit.5D|animate]],<br />
[[InterfaceActionsWML#.5Banimate_unit.5D|animate_unit]],<br />
[[UnitTypeWML#Attacks|attack]];<br />
|-<br />
|''B:'' <br />
[[UnitTypeWML#Other_tags|base_unit]], <br />
[[AbilitiesWML|berserk]]; <br />
|-<br />
|''C:'' <br />
[[ConditionalActionsWML#.5Bcommand.5D|command]]&nbsp;(action),<br />
[[DirectActionsWML#.5Bcapture_village.5D|capture_village]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|chance_to_hit]], <br />
[[InterfaceActionsWML#.5Bchat.5D|chat]],<br />
[[PersistenceWML|clear_global_variable]],<br />
[[InterfaceActionsWML#.5Bclear_menu_item.5D|clear_menu_item]],<br />
[[InternalActionsWML#.5Bclear_variable.5D|clear_variable]],<br />
[[InterfaceActionsWML#.5Bcolor_adjust.5D|color_adjust]];<br />
|-<br />
|''D:'' <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|damage]],<br />
[[UnitsWML#.5Bmovetype.5D|defense]],<br />
[[InterfaceActionsWML#.5Bdelay.5D|delay]],<br />
[[InterfaceActionsWML#.5Bdeprecated_message.5D|deprecated_message]],<br />
[[AbilitiesWML|disable]],<br />
[[DirectActionsWML#.5Bdisallow_end_turn.5D|disallow_end_turn]],<br />
[[DirectActionsWML#.5Bdisallow_extra_recruit.5D|disallow_extra_recruit]],<br />
[[DirectActionsWML#.5Bdisallow_recruit.5D|disallow_recruit]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|drains]]; <br />
|-<br />
|''E:'' <br />
[[EffectWML|effect]],<br />
[[DirectActionsWML#.5Bendlevel.5D|endlevel]],<br />
[[DirectActionsWML#.5Bend_turn.5D|end_turn]]&nbsp;(action),<br />
[[StandardSideFilter|enemy_of]], <br />
[[CampaignWML#Campaign_credits|entry]], <br />
[[EventWML|event]];<br />
|-<br />
|''F:''<br />
[[InterfaceActionsWML#.5Banimate_unit.5D|facing]], <br />
[[InterfaceActionsWML#.5Bmove_units_fake.5D|fake_unit]], <br />
[[UnitTypeWML#Other_tags|female]], <br />
[[FilterWML|filter]],<br />
[[StandardUnitFilter|filter_adjacent]], <br />
[[StandardLocationFilter|filter_adjacent_location]], <br />
[[FilterWML#Filtering_Weapons|filter_attack]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_attacker]], <br />
[[AbilitiesWML#Common_keys_and_tags_for_every_ability|filter_base_value]], <br />
[[EventWML#.5Bfilter_condition.5D|filter_condition]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_defender]], <br />
[[StandardLocationFilter|filter_location]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_opponent]], <br />
[[StandardLocationFilter|filter_owner]], <br />
[[StandardLocationFilter|filter_radius]], <br />
[[SingleUnitWML|filter_recall]], <br />
[[StandardUnitFilter|filter_second]],<br />
[[FilterWML#Filtering_Weapons|filter_second_attack]],<br />
[[AbilitiesWML|filter_self]], <br />
[[StandardSideFilter|filter_side]],<br />
[[FilterWML#Filtering_Vision|filter_vision]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_weapon]], <br />
[[StandardUnitFilter|filter_wml]],<br />
[[InternalActionsWML#.5Bfire_event.5D|fire_event]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|firststrike]], <br />
[[InterfaceActionsWML#.5Bfloating_text.5D|floating_text]];<br />
|-<br />
|''G:'' <br />
[[PersistenceWML|get_global_variable]],<br />
[[DirectActionsWML#.5Bgold.5D|gold]],<br />
[[InterfaceActionsWML#.5Bobjectives.5D|gold_carryover]];<br />
|-<br />
|''H:'' <br />
[[DirectActionsWML#.5Bharm_unit.5D|harm_unit]],<br />
[[StandardSideFilter|has_unit]], <br />
[[ConditionalActionsWML#Condition_Tags|have_location]],<br />
[[ConditionalActionsWML#Condition_Tags|have_unit]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|heal_on_hit]], <br />
[[DirectActionsWML#.5Bheal_unit.5D|heal_unit]],<br />
[[AbilitiesWML|heals]], <br />
[[UnitsWML#.5Bhide_help.5D|hide_help]],<br />
[[InterfaceActionsWML#.5Bhide_unit.5D|hide_unit]],<br />
[[AbilitiesWML|hides]];<br />
|-<br />
|''I:'' <br />
[[AbilitiesWML|illuminates]], <br />
[[TerrainGraphicsWML|image]],<br />
[[InterfaceActionsWML#.5Binspect.5D|inspect]],<br />
[[InterfaceActionsWML#.5Bitem.5D|item]]; <br />
|-<br />
|''K:'' <br />
[[DirectActionsWML#.5Bkill.5D|kill]];<br />
|-<br />
|''L:'' <br />
[[InterfaceActionsWML#.5Blabel.5D|label]],<br />
[[AbilitiesWML|leadership]], <br />
[[DirectActionsWML#.5Blift_fog.5D|lift_fog]],<br />
[[InterfaceActionsWML#.5Block_view.5D|lock_view]];<br />
|-<br />
|''M:'' <br />
[[UnitTypeWML#Other_tags|male]], <br />
[[InterfaceActionsWML#.5Bmessage.5D|message]],<br />
[[ModificationWML|modification]],<br />
[[SingleUnitWML|modifications]],<br />
[[DirectActionsWML#.5Bmodify_ai.5D|modify_ai]],<br />
[[DirectActionsWML#.5Bmodify_side.5D|modify_side]],<br />
[[DirectActionsWML#.5Bmodify_turns.5D|modify_turns]],<br />
[[DirectActionsWML#.5Bmodify_unit.5D|modify_unit]],<br />
[[DirectActionsWML#.5Bmove_unit.5D|move_unit]],<br />
[[InterfaceActionsWML#.5Bmove_unit_fake.5D|move_unit_fake]],<br />
[[InterfaceActionsWML#.5Bmove_units_fake.5D|move_units_fake]],<br />
[[UnitsWML#.5Bmovetype.5D|movement costs]],<br />
[[UnitsWML#.5Bmovetype.5D|movetype]],<br />
[[EraWML|multiplayer_side]],<br />
[[MusicListWML#.5Bmusic.5D|music]];<br />
|-<br />
|''N:'' <br />
[[InterfaceActionsWML#.5Bobjectives.5D|note]]; <br />
|-<br />
|''O:'' <br />
[[DirectActionsWML#.5Bobject.5D|object]],<br />
[[InterfaceActionsWML#.5Bobjectives.5D|objective]],<br />
[[InterfaceActionsWML#.5Bobjectives.5D|objectives]],<br />
[[InterfaceActionsWML#.5Bopen_help.5D|open_help]],<br />
[[InterfaceActionsWML#.5Bmessage.5D|option]],<br />
[[OptionWML|options]],<br />
|-<br />
|''P:'' <br />
[[IntroWML|part]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|petrifies]], <br />
[[DirectActionsWML#.5Bpetrify.5D|petrify]], <br />
[[DirectActionsWML#.5Bplace_shroud.5D|place_shroud]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|plague]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|poison]], <br />
[[UnitTypeWML#Other_tags|portrait]], <br />
[[FilterWML#Filtering_Weapons|primary_attack]], <br />
[[StandardUnitFilter|primary_unit]], <br />
[[InterfaceActionsWML#.5Bprint.5D|print]]; <br />
|-<br />
|''R:'' <br />
[[UnitsWML#.5Brace.5D|race]], <br />
[[DirectActionsWML#.5Brecall.5D|recall]] <br />
[[InterfaceActionsWML#.5Bredraw.5D|redraw]],<br />
[[AbilitiesWML|regenerate]], <br />
[[InterfaceActionsWML#.5Bremove_item.5D|remove_item]], <br />
[[DirectActionsWML#.5Bremove_shroud.5D|remove_shroud]], <br />
[[InterfaceActionsWML#.5Bremove_sound_source.5D|remove_sound_source]], <br />
[[InterfaceActionsWML#.5Bremove_unit_overlay.5D|remove_unit_overlay]],<br />
[[DirectActionsWML#.5Breplace_map.5D|replace_map]], <br />
[[DirectActionsWML#.5Breplace_schedule.5D|replace_schedule]], <br />
[[DirectActionsWML#.5Breset_fog.5D|reset_fog]], <br />
resistance&nbsp;([[AbilitiesWML|ability]], [[UnitsWML#.5Bmovetype.5D|unit]]),<br />
[[InternalActionsWML#.5Brole.5D|role]], <br />
[[TerrainMaskWML|rule]];<br />
|-<br />
|''S:'' <br />
[[ScenarioWML|scenario]],<br />
[[InterfaceActionsWML#.5Bscroll.5D|scroll]], <br />
[[InterfaceActionsWML#.5Bscroll_to.5D|scroll_to]],<br />
[[InterfaceActionsWML#.5Bscroll_to_unit.5D|scroll_to_unit]], <br />
[[FilterWML#Filtering_Weapons|secondary_attack]], <br />
[[StandardUnitFilter|secondary_unit]], <br />
[[HelpWML|section]], <br />
[[InterfaceActionsWML#.5Bselect_unit.5D|select_unit]], <br />
[[DirectActionsWML#.5Bset_extra_recruit.5D|set_extra_recruit]],<br />
[[InterfaceActionsWML#.5Bset_menu_item.5D|set_menu_item]], <br />
[[DirectActionsWML#.5Bset_recruit.5D|set_recruit]],<br />
[[EffectWML|set_specials]], <br />
show_if&nbsp;([[InterfaceActionsWML#.5Bmessage.5D|message]], [[InterfaceActionsWML#.5Bset_menu_item.5D|set_menu_item]]),<br />
[[InterfaceActionsWML#.5Bshow_objectives.5D|show_objectives]],<br />
[[SideWML|side]], <br />
[[AbilitiesWML|skirmisher]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|slow]], <br />
[[InterfaceActionsWML#.5Bsound.5D|sound]], <br />
[[InterfaceActionsWML#.5Bsound_source.5D|sound_source]], <br />
[[DirectActionsWML#.5Btunnel.5D|source]]&nbsp;(teleport),<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|specials]], <br />
[[SingleUnitWML|status]], <br />
[[IntroWML|story]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|swarm]];<br />
|-<br />
|''T:'' <br />
[[DirectActionsWML#.5Btunnel.5D|target]], <br />
teleport&nbsp;([[AbilitiesWML|ability]], [[DirectActionsWML#.5Bteleport.5D|action]]),<br />
[[DirectActionsWML#.5Bterrain.5D|terrain]], <br />
[[TerrainMaskWML|terrain_mask]], <br />
[[ScenarioWML#Test_scenario|test]],<br />
[[InterfaceActionsWML#.5Bmessage.5D|text_input]], <br />
[[WesCamp#The_textdomain_declaration|textdomain]],<br />
[[TerrainGraphicsWML|tile]], <br />
[[TimeWML|time]], <br />
[[DirectActionsWML#.5Btime_area.5D|time_area]], <br />
[[HelpWML|topic]], <br />
[[HelpWML|toplevel]], <br />
[[UnitsWML#.5Btrait.5D|trait]], <br />
[[DirectActionsWML#.5Btransform_unit.5D|transform_unit]], <br />
[[DirectActionsWML#.5Btunnel.5D|tunnel]], <br />
[[ScenarioWML|tutorial]];<br />
|-<br />
|''U:'' <br />
[[InterfaceActionsWML#.5Bunhide_unit.5D|unhide_unit]], <br />
[[SingleUnitWML|unit]],<br />
[[InterfaceActionsWML#.5Bunit_overlay.5D|unit_overlay]], <br />
[[UnitTypeWML|unit_type]], <br />
[[InternalActionsWML|unit_worth]], <br />
[[UnitsWML|units]],<br />
[[InterfaceActionsWML#.5Bunlock_view.5D|unlock_view]],<br />
[[DirectActionsWML#.5Bunpetrify.5D|unpetrify]];<br />
|-<br />
| ''V:'' <br />
[[UnitTypeWML#Other_tags|variation]], <br />
[[SideWML|village]],<br />
[[InterfaceActionsWML#.5Bvolume.5D|volume]];<br />
|-<br />
| ''W:'' <br />
[[InterfaceActionsWML#.5Bwml_message.5D|wml_message]];<br />
<br />
|-<br />
|''Variable operations''<br />
[[InternalActionsWML#.5Binsert_tag.5D|insert_tag]],<br />
[[LuaWML|lua]],<br />
[[InternalActionsWML#.5Bset_variable.5D|set_variable]], <br />
[[DirectActionsWML#.5Bunstore_unit.5D|unstore_unit]];<br />
<br />
conditionals: <br />
[[ConditionalActionsWML#.5Bif.5D|if]],<br />
[[ConditionalActionsWML#Condition_Tags|variable]],<br />
[[ConditionalActionsWML#.5Bif.5D|then]],<br />
[[ConditionalActionsWML#.5Bif.5D|else]],<br />
[[ConditionalActionsWML#True_Condition_Tags|true]],<br />
[[ConditionalActionsWML#True_Condition_Tags|false]],<br />
[[ConditionalActionsWML#Meta-Condition_Tags|and]],<br />
[[ConditionalActionsWML#Meta-Condition_Tags|not]], <br />
[[ConditionalActionsWML#Meta-Condition_Tags|or]],<br />
[[ConditionalActionsWML#.5Bswitch.5D|switch]],<br />
[[ConditionalActionsWML#.5Bswitch.5D|case]],<br />
[[AnimationWML#default|default]];<br />
loops:<br />
[[ConditionalActionsWML#.5Bwhile.5D|while]],<br />
[[ConditionalActionsWML#.5Bwhile.5D|do]];<br />
<br />
arrays:<br />
[[InternalActionsWML#.5Bset_variables.5D|set_variables]],<br />
[[InternalActionsWML#.5Bset_variables.5D|join]],<br />
[[InternalActionsWML#.5Bset_variables.5D|split]],<br />
[[InternalActionsWML#.5Bset_variables.5D|literal]], <br />
[[InternalActionsWML#.5Bset_variables.5D|value]]; <br />
<br />
capturing game data:<br />
[[InternalActionsWML#.5Bfind_path.5D|destination]],<br />
[[InternalActionsWML#.5Bfind_path.5D|find_path]],<br />
[[PersistenceWML|set_global_variable]],<br />
[[InternalActionsWML#.5Bstore_gold.5D|store_gold]], <br />
[[InternalActionsWML#.5Bstore_items.5D|store_items]], <br />
[[InternalActionsWML#.5Bstore_locations.5D|store_locations]],<br />
[[InternalActionsWML#.5Bstore_map_dimensions.5D|store_map_dimensions]],<br />
[[InternalActionsWML#.5Bstore_reachable_locations.5D|store_reachable_locations]],<br />
[[InternalActionsWML#.5Bstore_side.5D|store_side]], <br />
[[InternalActionsWML#.5Bstore_starting_location.5D|store_starting_location]], <br />
[[InternalActionsWML#.5Bstore_time_of_day.5D|store_time_of_day]], <br />
[[InternalActionsWML#.5Bstore_turns.5D|store_turns]], <br />
[[InternalActionsWML#.5Bstore_unit.5D|store_unit]], <br />
[[InternalActionsWML#.5Bstore_unit_type.5D|store_unit_type]], <br />
[[InternalActionsWML#.5Bstore_unit_type_ids.5D|store_unit_type_ids]], <br />
[[InternalActionsWML#.5Bstore_villages.5D|store_villages]], <br />
[[InternalActionsWML#.5Bfind_path.5D|traveler]]; <br />
|}<br />
<br />
<includeonly>[[Category:WML Reference]]</includeonly><br />
<br />
<noinclude>Alternative box to {{WML Tags}}</noinclude></div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Template:WML_Tags_by_Category&diff=55698Template:WML Tags by Category2014-10-18T09:15:04Z<p>Xudojnik: Extracted variables operations</p>
<hr />
<div>{| class="gallery" style="width:225px;float: right;border: 1px solid #B48648; color:#B48648; font-size: 7pt;margin-left;10px;"<br />
|-<br />
|<br />
<span style="float: right;"><small class="editlink noprint plainlinksneverexpand">[{{SERVER}}{{localurl:Template:WML Tags by Category|action=edit}} edit ]</small></span><br />
'''WML Tags by Category'''<br />
<br />
|-<br />
|''Top-level tags:'' <br />
[[AdvancedPreferenceWML|advanced_preference]], <br />
[[BinaryPathWML|binary_path]],<br />
[[CampaignWML#The_.5Bcampaign.5D_tag|campaign]],<br />
[[CoreWML|core]],<br />
[[EraWML|era]],<br />
[[FontsWML|fonts]],<br />
[[GameConfigWML|game_config]],<br />
[[HelpWML|help]],<br />
[[LanguageWML|language]],<br />
[[LocaleWML|locale]],<br />
[[TerrainGraphicsWML|terrain_graphics]], <br />
[[TerrainWML|terrain_type]], <br />
[[ThemeWML|theme]], <br />
[[UnitsWML|units]],<br />
[[ScenarioWML|multiplayer]];<br />
<br />
|-<br />
|''AI:'' <br />
[[Lua_AI_Howto#Behavior_.28Sticky.29_Candidate_Actions|add_ai_behavior]],<br />
[[AiWML#The_.5Bai.5D_Tag:_Defining_Aspects|ai]],<br />
[[AiWML#A_Bit_More_on_Simple_vs._Composite_Aspects|aspect]],<br />
[[AiWML#The_.5Bai.5D_Tag:_Defining_Aspects|avoid]],<br />
[[Formula_AI_Howto#Setting_up_the_RCA_main_loop_Stage_and_Candidate_Actions|candidate_action]], <br />
[[AiWML#The_.5Bgoal.5D_Tag|criteria]],<br />
[[Customizing_AI_in_Wesnoth_1.8#AI_engines_.28_via_.5Bengine.5D_tags_.29|engine]], <br />
[[AiWML#A_Bit_More_on_Simple_vs._Composite_Aspects|facet]],<br />
[[AiWML#Filtering_Combat_with_the_.27attacks.27_Aspect|filter_enemy]],<br />
[[AiWML#Filtering_Combat_with_the_.27attacks.27_Aspect|filter_own]],<br />
[[AiWML#The_.5Bgoal.5D_Tag|goal]],<br />
[[AiWML#The_.5Bai.5D_Tag:_Defining_Aspects|leader_goal]],<br />
[[AiWML#Limiting_Recruiting_with_the_.27recruitment.27_Aspect|limit]],<br />
[[Micro AIs|micro_ai]],<br />
[[AiWML#Deprecated_AI_Targeting_Aspects|protect_location]], <br />
[[AiWML#Deprecated_AI_Targeting_Aspects|protect_unit]],<br />
[[Customizing_AI_in_Wesnoth_1.8#Working_with_main_loop_of_the_RCA_AI|stage]];<br />
<br />
|-<br />
|''Savefile and replay WML:'' <br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|advances]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|attacks]],<br />
[[ReplayWML|choose]],<br />
[[ReplayWML|command]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|deaths]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|defends]],<br />
[[ReplayWML|destination]],<br />
[[ReplayWML|end_turn]],<br />
[[ReplayWML|init_side]],<br />
[[StatisticalScenarioWML|killed]],<br />
[[ReplayWML|move]],<br />
[[ReplayWML|random]], <br />
[[ReplayWML|recall]],<br />
[[StatisticalScenarioWML|recalls]],<br />
[[ReplayWML|recruit]], <br />
[[StatisticalScenarioWML|recruits]],<br />
[[ReplayWML|replay]], <br />
[[SavefileWML|replay_start]],<br />
[[ReplayWML|results]], <br />
[[ReplayWML|sequence]], <br />
[[StatisticalScenarioWML#The_.5Bstatistics.5D_tag|statistics]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|team]],<br />
[[SavefileWML|menu_item]], <br />
[[SavefileWML|save]], <br />
[[SavefileWML|snapshot]],<br />
[[ReplayWML|source]],<br />
[[VariablesWML#The_.5Bvariables.5D_tag|variables]];<br />
<br />
|-<br />
|''Editor and maps WML:'' <br />
[[EditorWML#The_.5Bbrush.5D_tag|brush]],<br />
[[MapGeneratorWML#The_Default_Generator|castle]], <br />
[[MapGeneratorWML#The_Cave_Generator|chamber]], <br />
[[MapGeneratorWML#The_Default_Generator|convert]], <br />
[[EditorWML#The_.5Beditor_group.5D_tag|editor_group]],<br />
[[EditorWML#The_.5Beditor_music.5D_tag|editor_music]], <br />
[[EditorWML#The_.5Beditor_times.5D_tag|editor_times]],<br />
[[MapGeneratorWML|generator]],<br />
[[MapGeneratorWML|height]], <br />
[[MapGeneratorWML#The_Cave_Generator|items]],<br />
[[MapGeneratorWML|naming]], <br />
[[MapGeneratorWML|road_cost]],<br />
[[MapGeneratorWML#The_Cave_Generator|settings]], <br />
[[MapGeneratorWML|village_naming]]; <br />
<br />
|-<br />
|''Wesnoth interface markup''<br />
[[ThemeWML#.5Bstatus.5D|expenses]],<br />
[[ThemeWML|gold]],<br />
[[ThemeWML#.5Bstatus.5D|income]],<br />
[[ThemeWML|label]],<br />
[[ThemeWML#.5Bmain_map.5D|main_map]],<br />
[[ThemeWML#.5Bmain_map_border.5D|main_map_border]], <br />
[[ThemeWML#.5Bmenu.5D|menu]], <br />
[[ThemeWML#.5Bmini_map.5D|mini_map]],<br />
[[ThemeWML#.5Bstatus.5D|num_units]],<br />
[[ThemeWML#.5Bstatus.5D|observers]],<br />
[[ThemeWML#.5Bpanel.5D|panel]], <br />
[[ThemeWML#.5Bstatus.5D|position]],<br />
[[ThemeWML|resolution]], <br />
[[ThemeWML|side_playing]], <br />
[[ThemeWML|status]],<br />
[[ThemeWML#.5Bstatus.5D|time_of_day]],<br />
[[ThemeWML#.5Bstatus.5D|turn]], <br />
[[ThemeWML#.5Bstatus.5D|unit_abilities]], <br />
[[ThemeWML#.5Bstatus.5D|unit_alignment]], <br />
[[ThemeWML#.5Bstatus.5D|unit_description]], <br />
[[ThemeWML#.5Bstatus.5D|unit_hp]], <br />
[[ThemeWML#.5Bstatus.5D|unit_image]], <br />
[[ThemeWML#.5Bstatus.5D|unit_level]], <br />
[[ThemeWML#.5Bstatus.5D|unit_moves]],<br />
[[ThemeWML#.5Bstatus.5D|unit_profile]], <br />
[[ThemeWML#.5Bstatus.5D|unit_status]],<br />
[[ThemeWML#.5Bstatus.5D|unit_traits]], <br />
[[ThemeWML#.5Bstatus.5D|unit_weapons]],<br />
[[ThemeWML#.5Bstatus.5D|unit_xp]],<br />
[[ThemeWML#.5Bstatus.5D|upkeep]],<br />
[[ThemeWML#.5Bstatus.5D|villages]];<br />
|-<br />
|''Units animation WML''<br />
[[AnimationWML|animation]],<br />
[[AnimationWML|attack_anim]],<br />
[[AnimationWML#death|death]], <br />
[[AnimationWML#defend|defend]],<br />
[[AnimationWML#draw_weapon_anim|draw_weapon_anim]],<br />
[[AnimationWML#.5Bif.5D_and_.5Belse.5D|else]],<br />
[[AnimationWML#Frames|frame]],<br />
[[AnimationWML#healed|healed_anim]], <br />
[[AnimationWML#healing|healing_anim]], <br />
[[AnimationWML#idling|idle_anim]], <br />
[[AnimationWML#.5Bif.5D_and_.5Belse.5D|if]],<br />
[[AnimationWML#leading|leading_anim]], <br />
[[AnimationWML#levelin|levelin_anim]],<br />
[[AnimationWML#levelout|levelout_anim]], <br />
[[AnimationWML#The_content_of_a_frame|missile_frame]],<br />
[[AnimationWML#movement|movement_anim]], <br />
[[AnimationWML#post_movement|post_movement_anim]], <br />
[[AnimationWML#pre_movement|pre_movement_anim]], <br />
[[AnimationWML#recruited|recruit_anim]], <br />
[[AnimationWML#recruiting|recruiting_anim]], <br />
[[AnimationWML#Simplified_animation_blocks|extra_anim]],<br />
[[AnimationWML#sheath_weapon|sheath_weapon_anim]], <br />
[[AnimationWML#standing|standing_anim]], <br />
[[AnimationWML#pre_teleport|teleport_anim]],<br />
[[AnimationWML#victory|victory_anim]];<br />
|-<br />
|''A:'' <br />
[[CampaignWML#Campaign credits|about]],<br />
[[AbilitiesWML|abilities]],<br />
[[SingleUnitWML|advance]],<br />
[[UnitTypeWML|advancefrom]],<br />
[[UnitTypeWML#After_max_level_advancement_.28AMLA.29|advancement]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_ability|affect_adjacent]],<br />
[[StandardSideFilter|allied_with]], <br />
[[DirectActionsWML#.5Ballow_end_turn.5D|allow_end_turn]],<br />
[[DirectActionsWML#.5Ballow_extra_recruit.5D|allow_extra_recruit]],<br />
[[DirectActionsWML#.5Ballow_recruit.5D|allow_recruit]],<br />
[[DirectActionsWML#.5Ballow_undo.5D|allow_undo]],<br />
[[InterfaceActionsWML#.5Banimate_unit.5D|animate]],<br />
[[InterfaceActionsWML#.5Banimate_unit.5D|animate_unit]],<br />
[[UnitTypeWML#Attacks|attack]];<br />
|-<br />
|''B:'' <br />
[[UnitTypeWML#Other_tags|base_unit]], <br />
[[AbilitiesWML|berserk]]; <br />
|-<br />
|''C:'' <br />
[[ConditionalActionsWML#.5Bcommand.5D|command]]&nbsp;(action),<br />
[[DirectActionsWML#.5Bcapture_village.5D|capture_village]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|chance_to_hit]], <br />
[[InterfaceActionsWML#.5Bchat.5D|chat]],<br />
[[PersistenceWML|clear_global_variable]],<br />
[[InterfaceActionsWML#.5Bclear_menu_item.5D|clear_menu_item]],<br />
[[InternalActionsWML#.5Bclear_variable.5D|clear_variable]],<br />
[[InterfaceActionsWML#.5Bcolor_adjust.5D|color_adjust]];<br />
|-<br />
|''D:'' <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|damage]],<br />
[[UnitsWML#.5Bmovetype.5D|defense]],<br />
[[InterfaceActionsWML#.5Bdelay.5D|delay]],<br />
[[InterfaceActionsWML#.5Bdeprecated_message.5D|deprecated_message]],<br />
[[AbilitiesWML|disable]],<br />
[[DirectActionsWML#.5Bdisallow_end_turn.5D|disallow_end_turn]],<br />
[[DirectActionsWML#.5Bdisallow_extra_recruit.5D|disallow_extra_recruit]],<br />
[[DirectActionsWML#.5Bdisallow_recruit.5D|disallow_recruit]],<br />
[[ConditionalActionsWML#.5Bwhile.5D|do]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|drains]]; <br />
|-<br />
|''E:'' <br />
[[EffectWML|effect]],<br />
[[DirectActionsWML#.5Bendlevel.5D|endlevel]],<br />
[[DirectActionsWML#.5Bend_turn.5D|end_turn]]&nbsp;(action),<br />
[[StandardSideFilter|enemy_of]], <br />
[[CampaignWML#Campaign_credits|entry]], <br />
[[EventWML|event]];<br />
|-<br />
|''F:''<br />
[[InterfaceActionsWML#.5Banimate_unit.5D|facing]], <br />
[[InterfaceActionsWML#.5Bmove_units_fake.5D|fake_unit]], <br />
[[UnitTypeWML#Other_tags|female]], <br />
[[FilterWML|filter]],<br />
[[StandardUnitFilter|filter_adjacent]], <br />
[[StandardLocationFilter|filter_adjacent_location]], <br />
[[FilterWML#Filtering_Weapons|filter_attack]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_attacker]], <br />
[[AbilitiesWML#Common_keys_and_tags_for_every_ability|filter_base_value]], <br />
[[EventWML#.5Bfilter_condition.5D|filter_condition]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_defender]], <br />
[[StandardLocationFilter|filter_location]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_opponent]], <br />
[[StandardLocationFilter|filter_owner]], <br />
[[StandardLocationFilter|filter_radius]], <br />
[[SingleUnitWML|filter_recall]], <br />
[[StandardUnitFilter|filter_second]],<br />
[[FilterWML#Filtering_Weapons|filter_second_attack]],<br />
[[AbilitiesWML|filter_self]], <br />
[[StandardSideFilter|filter_side]],<br />
[[FilterWML#Filtering_Vision|filter_vision]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_weapon]], <br />
[[StandardUnitFilter|filter_wml]],<br />
[[InternalActionsWML#.5Bfire_event.5D|fire_event]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|firststrike]], <br />
[[InterfaceActionsWML#.5Bfloating_text.5D|floating_text]];<br />
|-<br />
|''G:'' <br />
[[PersistenceWML|get_global_variable]],<br />
[[DirectActionsWML#.5Bgold.5D|gold]],<br />
[[InterfaceActionsWML#.5Bobjectives.5D|gold_carryover]];<br />
|-<br />
|''H:'' <br />
[[DirectActionsWML#.5Bharm_unit.5D|harm_unit]],<br />
[[StandardSideFilter|has_unit]], <br />
[[ConditionalActionsWML#Condition_Tags|have_location]],<br />
[[ConditionalActionsWML#Condition_Tags|have_unit]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|heal_on_hit]], <br />
[[DirectActionsWML#.5Bheal_unit.5D|heal_unit]],<br />
[[AbilitiesWML|heals]], <br />
[[UnitsWML#.5Bhide_help.5D|hide_help]],<br />
[[InterfaceActionsWML#.5Bhide_unit.5D|hide_unit]],<br />
[[AbilitiesWML|hides]];<br />
|-<br />
|''I:'' <br />
[[AbilitiesWML|illuminates]], <br />
[[TerrainGraphicsWML|image]],<br />
[[InterfaceActionsWML#.5Binspect.5D|inspect]],<br />
[[InterfaceActionsWML#.5Bitem.5D|item]]; <br />
|-<br />
|''K:'' <br />
[[DirectActionsWML#.5Bkill.5D|kill]];<br />
|-<br />
|''L:'' <br />
[[InterfaceActionsWML#.5Blabel.5D|label]],<br />
[[AbilitiesWML|leadership]], <br />
[[DirectActionsWML#.5Blift_fog.5D|lift_fog]],<br />
[[InterfaceActionsWML#.5Block_view.5D|lock_view]];<br />
|-<br />
|''M:'' <br />
[[UnitTypeWML#Other_tags|male]], <br />
[[InterfaceActionsWML#.5Bmessage.5D|message]],<br />
[[ModificationWML|modification]],<br />
[[SingleUnitWML|modifications]],<br />
[[DirectActionsWML#.5Bmodify_ai.5D|modify_ai]],<br />
[[DirectActionsWML#.5Bmodify_side.5D|modify_side]],<br />
[[DirectActionsWML#.5Bmodify_turns.5D|modify_turns]],<br />
[[DirectActionsWML#.5Bmodify_unit.5D|modify_unit]],<br />
[[DirectActionsWML#.5Bmove_unit.5D|move_unit]],<br />
[[InterfaceActionsWML#.5Bmove_unit_fake.5D|move_unit_fake]],<br />
[[InterfaceActionsWML#.5Bmove_units_fake.5D|move_units_fake]],<br />
[[UnitsWML#.5Bmovetype.5D|movement costs]],<br />
[[UnitsWML#.5Bmovetype.5D|movetype]],<br />
[[EraWML|multiplayer_side]],<br />
[[MusicListWML#.5Bmusic.5D|music]];<br />
|-<br />
|''N:'' <br />
[[InterfaceActionsWML#.5Bobjectives.5D|note]]; <br />
|-<br />
|''O:'' <br />
[[DirectActionsWML#.5Bobject.5D|object]],<br />
[[InterfaceActionsWML#.5Bobjectives.5D|objective]],<br />
[[InterfaceActionsWML#.5Bobjectives.5D|objectives]],<br />
[[InterfaceActionsWML#.5Bopen_help.5D|open_help]],<br />
[[InterfaceActionsWML#.5Bmessage.5D|option]],<br />
[[OptionWML|options]],<br />
|-<br />
|''P:'' <br />
[[IntroWML|part]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|petrifies]], <br />
[[DirectActionsWML#.5Bpetrify.5D|petrify]], <br />
[[DirectActionsWML#.5Bplace_shroud.5D|place_shroud]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|plague]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|poison]], <br />
[[UnitTypeWML#Other_tags|portrait]], <br />
[[FilterWML#Filtering_Weapons|primary_attack]], <br />
[[StandardUnitFilter|primary_unit]], <br />
[[InterfaceActionsWML#.5Bprint.5D|print]]; <br />
|-<br />
|''R:'' <br />
[[UnitsWML#.5Brace.5D|race]], <br />
[[DirectActionsWML#.5Brecall.5D|recall]] <br />
[[InterfaceActionsWML#.5Bredraw.5D|redraw]],<br />
[[AbilitiesWML|regenerate]], <br />
[[InterfaceActionsWML#.5Bremove_item.5D|remove_item]], <br />
[[DirectActionsWML#.5Bremove_shroud.5D|remove_shroud]], <br />
[[InterfaceActionsWML#.5Bremove_sound_source.5D|remove_sound_source]], <br />
[[InterfaceActionsWML#.5Bremove_unit_overlay.5D|remove_unit_overlay]],<br />
[[DirectActionsWML#.5Breplace_map.5D|replace_map]], <br />
[[DirectActionsWML#.5Breplace_schedule.5D|replace_schedule]], <br />
[[DirectActionsWML#.5Breset_fog.5D|reset_fog]], <br />
resistance&nbsp;([[AbilitiesWML|ability]], [[UnitsWML#.5Bmovetype.5D|unit]]),<br />
[[InternalActionsWML#.5Brole.5D|role]], <br />
[[TerrainMaskWML|rule]];<br />
|-<br />
|''S:'' <br />
[[ScenarioWML|scenario]],<br />
[[InterfaceActionsWML#.5Bscroll.5D|scroll]], <br />
[[InterfaceActionsWML#.5Bscroll_to.5D|scroll_to]],<br />
[[InterfaceActionsWML#.5Bscroll_to_unit.5D|scroll_to_unit]], <br />
[[FilterWML#Filtering_Weapons|secondary_attack]], <br />
[[StandardUnitFilter|secondary_unit]], <br />
[[HelpWML|section]], <br />
[[InterfaceActionsWML#.5Bselect_unit.5D|select_unit]], <br />
[[DirectActionsWML#.5Bset_extra_recruit.5D|set_extra_recruit]],<br />
[[InterfaceActionsWML#.5Bset_menu_item.5D|set_menu_item]], <br />
[[DirectActionsWML#.5Bset_recruit.5D|set_recruit]],<br />
[[EffectWML|set_specials]], <br />
show_if&nbsp;([[InterfaceActionsWML#.5Bmessage.5D|message]], [[InterfaceActionsWML#.5Bset_menu_item.5D|set_menu_item]]),<br />
[[InterfaceActionsWML#.5Bshow_objectives.5D|show_objectives]],<br />
[[SideWML|side]], <br />
[[AbilitiesWML|skirmisher]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|slow]], <br />
[[InterfaceActionsWML#.5Bsound.5D|sound]], <br />
[[InterfaceActionsWML#.5Bsound_source.5D|sound_source]], <br />
[[DirectActionsWML#.5Btunnel.5D|source]]&nbsp;(teleport),<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|specials]], <br />
[[SingleUnitWML|status]], <br />
[[IntroWML|story]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|swarm]];<br />
|-<br />
|''T:'' <br />
[[DirectActionsWML#.5Btunnel.5D|target]], <br />
teleport&nbsp;([[AbilitiesWML|ability]], [[DirectActionsWML#.5Bteleport.5D|action]]),<br />
[[DirectActionsWML#.5Bterrain.5D|terrain]], <br />
[[TerrainMaskWML|terrain_mask]], <br />
[[ScenarioWML#Test_scenario|test]],<br />
[[InterfaceActionsWML#.5Bmessage.5D|text_input]], <br />
[[WesCamp#The_textdomain_declaration|textdomain]],<br />
[[TerrainGraphicsWML|tile]], <br />
[[TimeWML|time]], <br />
[[DirectActionsWML#.5Btime_area.5D|time_area]], <br />
[[HelpWML|topic]], <br />
[[HelpWML|toplevel]], <br />
[[UnitsWML#.5Btrait.5D|trait]], <br />
[[DirectActionsWML#.5Btransform_unit.5D|transform_unit]], <br />
[[DirectActionsWML#.5Btunnel.5D|tunnel]], <br />
[[ScenarioWML|tutorial]];<br />
|-<br />
|''U:'' <br />
[[InterfaceActionsWML#.5Bunhide_unit.5D|unhide_unit]], <br />
[[SingleUnitWML|unit]],<br />
[[InterfaceActionsWML#.5Bunit_overlay.5D|unit_overlay]], <br />
[[UnitTypeWML|unit_type]], <br />
[[InternalActionsWML|unit_worth]], <br />
[[UnitsWML|units]],<br />
[[InterfaceActionsWML#.5Bunlock_view.5D|unlock_view]],<br />
[[DirectActionsWML#.5Bunpetrify.5D|unpetrify]];<br />
|-<br />
| ''V:'' <br />
[[UnitTypeWML#Other_tags|variation]], <br />
[[SideWML|village]],<br />
[[InterfaceActionsWML#.5Bvolume.5D|volume]];<br />
|-<br />
| ''W:'' <br />
[[ConditionalActionsWML#.5Bwhile.5D|while]],<br />
[[InterfaceActionsWML#.5Bwml_message.5D|wml_message]];<br />
|-<br />
|''Variable operations''<br />
[[InternalActionsWML#.5Binsert_tag.5D|insert_tag]],<br />
[[LuaWML|lua]],<br />
[[InternalActionsWML#.5Bset_variable.5D|set_variable]], <br />
[[DirectActionsWML#.5Bunstore_unit.5D|unstore_unit]];<br />
<br />
conditionals: <br />
[[ConditionalActionsWML#.5Bif.5D|if]],<br />
[[ConditionalActionsWML#Condition_Tags|variable]],<br />
[[ConditionalActionsWML#.5Bif.5D|then]],<br />
[[ConditionalActionsWML#.5Bif.5D|else]],<br />
[[ConditionalActionsWML#True_Condition_Tags|true]],<br />
[[ConditionalActionsWML#True_Condition_Tags|false]],<br />
[[ConditionalActionsWML#Meta-Condition_Tags|and]],<br />
[[ConditionalActionsWML#Meta-Condition_Tags|not]], <br />
[[ConditionalActionsWML#Meta-Condition_Tags|or]],<br />
[[ConditionalActionsWML#.5Bswitch.5D|switch]],<br />
[[ConditionalActionsWML#.5Bswitch.5D|case]],<br />
[[AnimationWML#default|default]];<br />
<br />
arrays:<br />
[[InternalActionsWML#.5Bset_variables.5D|set_variables]],<br />
[[InternalActionsWML#.5Bset_variables.5D|join]],<br />
[[InternalActionsWML#.5Bset_variables.5D|split]],<br />
[[InternalActionsWML#.5Bset_variables.5D|literal]], <br />
[[InternalActionsWML#.5Bset_variables.5D|value]]; <br />
<br />
capturing game data:<br />
[[InternalActionsWML#.5Bfind_path.5D|destination]],<br />
[[InternalActionsWML#.5Bfind_path.5D|find_path]],<br />
[[PersistenceWML|set_global_variable]],<br />
[[InternalActionsWML#.5Bstore_gold.5D|store_gold]], <br />
[[InternalActionsWML#.5Bstore_items.5D|store_items]], <br />
[[InternalActionsWML#.5Bstore_locations.5D|store_locations]],<br />
[[InternalActionsWML#.5Bstore_map_dimensions.5D|store_map_dimensions]],<br />
[[InternalActionsWML#.5Bstore_reachable_locations.5D|store_reachable_locations]],<br />
[[InternalActionsWML#.5Bstore_side.5D|store_side]], <br />
[[InternalActionsWML#.5Bstore_starting_location.5D|store_starting_location]], <br />
[[InternalActionsWML#.5Bstore_time_of_day.5D|store_time_of_day]], <br />
[[InternalActionsWML#.5Bstore_turns.5D|store_turns]], <br />
[[InternalActionsWML#.5Bstore_unit.5D|store_unit]], <br />
[[InternalActionsWML#.5Bstore_unit_type.5D|store_unit_type]], <br />
[[InternalActionsWML#.5Bstore_unit_type_ids.5D|store_unit_type_ids]], <br />
[[InternalActionsWML#.5Bstore_villages.5D|store_villages]], <br />
[[InternalActionsWML#.5Bfind_path.5D|traveler]]; <br />
|}<br />
<br />
<includeonly>[[Category:WML Reference]]</includeonly><br />
<br />
<noinclude>Alternative box to {{WML Tags}}</noinclude></div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Template:WML_Tags_by_Category&diff=55697Template:WML Tags by Category2014-10-18T08:14:57Z<p>Xudojnik: Edited some toplevel tags</p>
<hr />
<div>{| class="gallery" style="width:225px;float: right;border: 1px solid #B48648; color:#B48648; font-size: 7pt;margin-left;10px;"<br />
|-<br />
|<br />
<span style="float: right;"><small class="editlink noprint plainlinksneverexpand">[{{SERVER}}{{localurl:Template:WML Tags by Category|action=edit}} edit ]</small></span><br />
'''WML Tags by Category'''<br />
<br />
|-<br />
|''Top-level tags:'' <br />
[[AdvancedPreferenceWML|advanced_preference]], <br />
[[BinaryPathWML|binary_path]],<br />
[[CampaignWML#The_.5Bcampaign.5D_tag|campaign]],<br />
[[CoreWML|core]],<br />
[[EraWML|era]],<br />
[[FontsWML|fonts]],<br />
[[GameConfigWML|game_config]],<br />
[[HelpWML|help]],<br />
[[LanguageWML|language]],<br />
[[LocaleWML|locale]],<br />
[[TerrainGraphicsWML|terrain_graphics]], <br />
[[TerrainWML|terrain_type]], <br />
[[ThemeWML|theme]], <br />
[[UnitsWML|units]],<br />
[[ScenarioWML|multiplayer]];<br />
<br />
|-<br />
|''AI:'' <br />
[[Lua_AI_Howto#Behavior_.28Sticky.29_Candidate_Actions|add_ai_behavior]],<br />
[[AiWML#The_.5Bai.5D_Tag:_Defining_Aspects|ai]],<br />
[[AiWML#A_Bit_More_on_Simple_vs._Composite_Aspects|aspect]],<br />
[[AiWML#The_.5Bai.5D_Tag:_Defining_Aspects|avoid]],<br />
[[Formula_AI_Howto#Setting_up_the_RCA_main_loop_Stage_and_Candidate_Actions|candidate_action]], <br />
[[AiWML#The_.5Bgoal.5D_Tag|criteria]],<br />
[[Customizing_AI_in_Wesnoth_1.8#AI_engines_.28_via_.5Bengine.5D_tags_.29|engine]], <br />
[[AiWML#A_Bit_More_on_Simple_vs._Composite_Aspects|facet]],<br />
[[AiWML#Filtering_Combat_with_the_.27attacks.27_Aspect|filter_enemy]],<br />
[[AiWML#Filtering_Combat_with_the_.27attacks.27_Aspect|filter_own]],<br />
[[AiWML#The_.5Bgoal.5D_Tag|goal]],<br />
[[AiWML#The_.5Bai.5D_Tag:_Defining_Aspects|leader_goal]],<br />
[[AiWML#Limiting_Recruiting_with_the_.27recruitment.27_Aspect|limit]],<br />
[[Micro AIs|micro_ai]],<br />
[[AiWML#Deprecated_AI_Targeting_Aspects|protect_location]], <br />
[[AiWML#Deprecated_AI_Targeting_Aspects|protect_unit]],<br />
[[Customizing_AI_in_Wesnoth_1.8#Working_with_main_loop_of_the_RCA_AI|stage]];<br />
<br />
|-<br />
|''Savefile and replay WML:'' <br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|advances]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|attacks]],<br />
[[ReplayWML|choose]],<br />
[[ReplayWML|command]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|deaths]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|defends]],<br />
[[ReplayWML|destination]],<br />
[[ReplayWML|end_turn]],<br />
[[ReplayWML|init_side]],<br />
[[StatisticalScenarioWML|killed]],<br />
[[ReplayWML|move]],<br />
[[ReplayWML|random]], <br />
[[ReplayWML|recall]],<br />
[[StatisticalScenarioWML|recalls]],<br />
[[ReplayWML|recruit]], <br />
[[StatisticalScenarioWML|recruits]],<br />
[[ReplayWML|replay]], <br />
[[SavefileWML|replay_start]],<br />
[[ReplayWML|results]], <br />
[[ReplayWML|sequence]], <br />
[[StatisticalScenarioWML#The_.5Bstatistics.5D_tag|statistics]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|team]],<br />
[[SavefileWML|menu_item]], <br />
[[SavefileWML|save]], <br />
[[SavefileWML|snapshot]],<br />
[[ReplayWML|source]];<br />
<br />
|-<br />
|''Editor and maps WML:'' <br />
[[EditorWML#The_.5Bbrush.5D_tag|brush]],<br />
[[MapGeneratorWML#The_Default_Generator|castle]], <br />
[[MapGeneratorWML#The_Cave_Generator|chamber]], <br />
[[MapGeneratorWML#The_Default_Generator|convert]], <br />
[[EditorWML#The_.5Beditor_group.5D_tag|editor_group]],<br />
[[EditorWML#The_.5Beditor_music.5D_tag|editor_music]], <br />
[[EditorWML#The_.5Beditor_times.5D_tag|editor_times]],<br />
[[MapGeneratorWML|generator]],<br />
[[MapGeneratorWML|height]], <br />
[[MapGeneratorWML#The_Cave_Generator|items]],<br />
[[MapGeneratorWML|naming]], <br />
[[MapGeneratorWML|road_cost]],<br />
[[MapGeneratorWML#The_Cave_Generator|settings]], <br />
[[MapGeneratorWML|village_naming]]; <br />
<br />
|-<br />
|''Wesnoth interface markup''<br />
[[ThemeWML#.5Bstatus.5D|expenses]],<br />
[[ThemeWML|gold]],<br />
[[ThemeWML#.5Bstatus.5D|income]],<br />
[[ThemeWML|label]],<br />
[[ThemeWML#.5Bmain_map.5D|main_map]],<br />
[[ThemeWML#.5Bmain_map_border.5D|main_map_border]], <br />
[[ThemeWML#.5Bmenu.5D|menu]], <br />
[[ThemeWML#.5Bmini_map.5D|mini_map]],<br />
[[ThemeWML#.5Bstatus.5D|num_units]],<br />
[[ThemeWML#.5Bstatus.5D|observers]],<br />
[[ThemeWML#.5Bpanel.5D|panel]], <br />
[[ThemeWML#.5Bstatus.5D|position]],<br />
[[ThemeWML|resolution]], <br />
[[ThemeWML|side_playing]], <br />
[[ThemeWML|status]],<br />
[[ThemeWML#.5Bstatus.5D|time_of_day]],<br />
[[ThemeWML#.5Bstatus.5D|turn]], <br />
[[ThemeWML#.5Bstatus.5D|unit_abilities]], <br />
[[ThemeWML#.5Bstatus.5D|unit_alignment]], <br />
[[ThemeWML#.5Bstatus.5D|unit_description]], <br />
[[ThemeWML#.5Bstatus.5D|unit_hp]], <br />
[[ThemeWML#.5Bstatus.5D|unit_image]], <br />
[[ThemeWML#.5Bstatus.5D|unit_level]], <br />
[[ThemeWML#.5Bstatus.5D|unit_moves]],<br />
[[ThemeWML#.5Bstatus.5D|unit_profile]], <br />
[[ThemeWML#.5Bstatus.5D|unit_status]],<br />
[[ThemeWML#.5Bstatus.5D|unit_traits]], <br />
[[ThemeWML#.5Bstatus.5D|unit_weapons]],<br />
[[ThemeWML#.5Bstatus.5D|unit_xp]],<br />
[[ThemeWML#.5Bstatus.5D|upkeep]],<br />
[[ThemeWML#.5Bstatus.5D|villages]];<br />
|-<br />
|''Units animation WML''<br />
[[AnimationWML|animation]],<br />
[[AnimationWML|attack_anim]],<br />
[[AnimationWML#death|death]], <br />
[[AnimationWML#default|default]], <br />
[[AnimationWML#defend|defend]],<br />
[[AnimationWML#draw_weapon_anim|draw_weapon_anim]],<br />
[[AnimationWML#.5Bif.5D_and_.5Belse.5D|else]],<br />
[[AnimationWML#Frames|frame]],<br />
[[AnimationWML#healed|healed_anim]], <br />
[[AnimationWML#healing|healing_anim]], <br />
[[AnimationWML#idling|idle_anim]], <br />
[[AnimationWML#.5Bif.5D_and_.5Belse.5D|if]],<br />
[[AnimationWML#leading|leading_anim]], <br />
[[AnimationWML#levelin|levelin_anim]],<br />
[[AnimationWML#levelout|levelout_anim]], <br />
[[AnimationWML#The_content_of_a_frame|missile_frame]],<br />
[[AnimationWML#movement|movement_anim]], <br />
[[AnimationWML#post_movement|post_movement_anim]], <br />
[[AnimationWML#pre_movement|pre_movement_anim]], <br />
[[AnimationWML#recruited|recruit_anim]], <br />
[[AnimationWML#recruiting|recruiting_anim]], <br />
[[AnimationWML#Simplified_animation_blocks|extra_anim]],<br />
[[AnimationWML#sheath_weapon|sheath_weapon_anim]], <br />
[[AnimationWML#standing|standing_anim]], <br />
[[AnimationWML#pre_teleport|teleport_anim]],<br />
[[AnimationWML#victory|victory_anim]];<br />
|-<br />
|''A:'' <br />
[[CampaignWML#Campaign credits|about]],<br />
[[AbilitiesWML|abilities]],<br />
[[SingleUnitWML|advance]],<br />
[[UnitTypeWML|advancefrom]],<br />
[[UnitTypeWML#After_max_level_advancement_.28AMLA.29|advancement]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_ability|affect_adjacent]],<br />
[[StandardSideFilter|allied_with]], <br />
[[DirectActionsWML#.5Ballow_end_turn.5D|allow_end_turn]],<br />
[[DirectActionsWML#.5Ballow_extra_recruit.5D|allow_extra_recruit]],<br />
[[DirectActionsWML#.5Ballow_recruit.5D|allow_recruit]],<br />
[[DirectActionsWML#.5Ballow_undo.5D|allow_undo]],<br />
[[ConditionalActionsWML#Meta-Condition_Tags|and]],<br />
[[InterfaceActionsWML#.5Banimate_unit.5D|animate]],<br />
[[InterfaceActionsWML#.5Banimate_unit.5D|animate_unit]],<br />
[[VariablesWML#Array|array]],<br />
[[UnitTypeWML#Attacks|attack]];<br />
|-<br />
|''B:'' <br />
[[UnitTypeWML#Other_tags|base_unit]], <br />
[[AbilitiesWML|berserk]]; <br />
|-<br />
|''C:'' <br />
[[ConditionalActionsWML#.5Bcommand.5D|command]]&nbsp;(action),<br />
[[DirectActionsWML#.5Bcapture_village.5D|capture_village]],<br />
[[ConditionalActionsWML#.5Bswitch.5D|case]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|chance_to_hit]], <br />
[[InterfaceActionsWML#.5Bchat.5D|chat]],<br />
[[PersistenceWML|clear_global_variable]],<br />
[[InterfaceActionsWML#.5Bclear_menu_item.5D|clear_menu_item]],<br />
[[InternalActionsWML#.5Bclear_variable.5D|clear_variable]],<br />
[[InterfaceActionsWML#.5Bcolor_adjust.5D|color_adjust]];<br />
|-<br />
|''D:'' <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|damage]],<br />
[[UnitsWML#.5Bmovetype.5D|defense]],<br />
[[InterfaceActionsWML#.5Bdelay.5D|delay]],<br />
[[InterfaceActionsWML#.5Bdeprecated_message.5D|deprecated_message]],<br />
[[AbilitiesWML|disable]],<br />
[[DirectActionsWML#.5Bdisallow_end_turn.5D|disallow_end_turn]],<br />
[[DirectActionsWML#.5Bdisallow_extra_recruit.5D|disallow_extra_recruit]],<br />
[[DirectActionsWML#.5Bdisallow_recruit.5D|disallow_recruit]],<br />
[[ConditionalActionsWML#.5Bwhile.5D|do]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|drains]]; <br />
|-<br />
|''E:'' <br />
[[EffectWML|effect]],<br />
[[ConditionalActionsWML#.5Bif.5D|else]]&nbsp;(action)<br />
[[DirectActionsWML#.5Bendlevel.5D|endlevel]],<br />
[[DirectActionsWML#.5Bend_turn.5D|end_turn]]&nbsp;(action),<br />
[[StandardSideFilter|enemy_of]], <br />
[[CampaignWML#Campaign_credits|entry]], <br />
[[EventWML|event]];<br />
|-<br />
|''F:''<br />
[[InterfaceActionsWML#.5Banimate_unit.5D|facing]], <br />
[[InterfaceActionsWML#.5Bmove_units_fake.5D|fake_unit]], <br />
[[ConditionalActionsWML#True_Condition_Tags|false]],<br />
[[UnitTypeWML#Other_tags|female]], <br />
[[FilterWML|filter]],<br />
[[StandardUnitFilter|filter_adjacent]], <br />
[[StandardLocationFilter|filter_adjacent_location]], <br />
[[FilterWML#Filtering_Weapons|filter_attack]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_attacker]], <br />
[[AbilitiesWML#Common_keys_and_tags_for_every_ability|filter_base_value]], <br />
[[EventWML#.5Bfilter_condition.5D|filter_condition]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_defender]], <br />
[[StandardLocationFilter|filter_location]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_opponent]], <br />
[[StandardLocationFilter|filter_owner]], <br />
[[StandardLocationFilter|filter_radius]], <br />
[[SingleUnitWML|filter_recall]], <br />
[[StandardUnitFilter|filter_second]],<br />
[[FilterWML#Filtering_Weapons|filter_second_attack]],<br />
[[AbilitiesWML|filter_self]], <br />
[[StandardSideFilter|filter_side]],<br />
[[FilterWML#Filtering_Vision|filter_vision]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_weapon]], <br />
[[StandardUnitFilter|filter_wml]],<br />
[[InternalActionsWML#.5Bfind_path.5D|find_path]],<br />
[[InternalActionsWML#.5Bfire_event.5D|fire_event]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|firststrike]], <br />
[[InterfaceActionsWML#.5Bfloating_text.5D|floating_text]];<br />
|-<br />
|''G:'' <br />
[[PersistenceWML|get_global_variable]],<br />
[[DirectActionsWML#.5Bgold.5D|gold]]&nbsp;(action),<br />
[[InterfaceActionsWML#.5Bobjectives.5D|gold_carryover]];<br />
|-<br />
|''H:'' <br />
[[DirectActionsWML#.5Bharm_unit.5D|harm_unit]],<br />
[[StandardSideFilter|has_unit]], <br />
[[ConditionalActionsWML#Condition_Tags|have_location]],<br />
[[ConditionalActionsWML#Condition_Tags|have_unit]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|heal_on_hit]], <br />
[[DirectActionsWML#.5Bheal_unit.5D|heal_unit]],<br />
[[AbilitiesWML|heals]], <br />
[[UnitsWML#.5Bhide_help.5D|hide_help]],<br />
[[InterfaceActionsWML#.5Bhide_unit.5D|hide_unit]],<br />
[[AbilitiesWML|hides]];<br />
|-<br />
|''I:'' <br />
[[ConditionalActionsWML#.5Bif.5D|if]]&nbsp;(action),<br />
[[AbilitiesWML|illuminates]], <br />
[[TerrainGraphicsWML|image]],<br />
[[InternalActionsWML#.5Binsert_tag.5D|insert_tag]],<br />
[[InterfaceActionsWML#.5Binspect.5D|inspect]],<br />
[[InterfaceActionsWML#.5Bitem.5D|item]]; <br />
|-<br />
|''J:''<br />
[[InternalActionsWML#.5Bset_variables.5D|join]];<br />
|-<br />
|''K:'' <br />
[[DirectActionsWML#.5Bkill.5D|kill]];<br />
|-<br />
|''L:'' <br />
[[InterfaceActionsWML#.5Blabel.5D|label]]&nbsp;(map),<br />
[[AbilitiesWML|leadership]], <br />
[[DirectActionsWML#.5Blift_fog.5D|lift_fog]],<br />
[[InternalActionsWML#.5Bset_variables.5D|literal]], <br />
[[InterfaceActionsWML#.5Block_view.5D|lock_view]],<br />
[[LuaWML|lua]];<br />
|-<br />
|''M:'' <br />
[[UnitTypeWML#Other_tags|male]], <br />
[[InterfaceActionsWML#.5Bmessage.5D|message]],<br />
[[ModificationWML|modification]],<br />
[[SingleUnitWML|modifications]],<br />
[[DirectActionsWML#.5Bmodify_ai.5D|modify_ai]],<br />
[[DirectActionsWML#.5Bmodify_side.5D|modify_side]],<br />
[[DirectActionsWML#.5Bmodify_turns.5D|modify_turns]],<br />
[[DirectActionsWML#.5Bmodify_unit.5D|modify_unit]],<br />
[[DirectActionsWML#.5Bmove_unit.5D|move_unit]],<br />
[[InterfaceActionsWML#.5Bmove_unit_fake.5D|move_unit_fake]],<br />
[[InterfaceActionsWML#.5Bmove_units_fake.5D|move_units_fake]],<br />
[[UnitsWML#.5Bmovetype.5D|movement costs]],<br />
[[UnitsWML#.5Bmovetype.5D|movetype]],<br />
[[EraWML|multiplayer_side]],<br />
[[MusicListWML#.5Bmusic.5D|music]];<br />
|-<br />
|''N:'' <br />
[[ConditionalActionsWML#Meta-Condition_Tags|not]], <br />
[[InterfaceActionsWML#.5Bobjectives.5D|note]]; <br />
|-<br />
|''O:'' <br />
[[DirectActionsWML#.5Bobject.5D|object]],<br />
[[InterfaceActionsWML#.5Bobjectives.5D|objective]],<br />
[[InterfaceActionsWML#.5Bobjectives.5D|objectives]],<br />
[[InterfaceActionsWML#.5Bopen_help.5D|open_help]],<br />
[[InterfaceActionsWML#.5Bmessage.5D|option]],<br />
[[OptionWML|options]],<br />
[[ConditionalActionsWML#Meta-Condition_Tags|or]];<br />
|-<br />
|''P:'' <br />
[[IntroWML|part]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|petrifies]], <br />
[[DirectActionsWML#.5Bpetrify.5D|petrify]], <br />
[[DirectActionsWML#.5Bplace_shroud.5D|place_shroud]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|plague]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|poison]], <br />
[[UnitTypeWML#Other_tags|portrait]], <br />
[[FilterWML#Filtering_Weapons|primary_attack]], <br />
[[StandardUnitFilter|primary_unit]], <br />
[[InterfaceActionsWML#.5Bprint.5D|print]]; <br />
|-<br />
|''R:'' <br />
[[UnitsWML#.5Brace.5D|race]], <br />
[[DirectActionsWML#.5Brecall.5D|recall]]&nbsp;(action), <br />
[[InterfaceActionsWML#.5Bredraw.5D|redraw]],<br />
[[AbilitiesWML|regenerate]], <br />
[[InterfaceActionsWML#.5Bremove_item.5D|remove_item]], <br />
[[DirectActionsWML#.5Bremove_shroud.5D|remove_shroud]], <br />
[[InterfaceActionsWML#.5Bremove_sound_source.5D|remove_sound_source]], <br />
[[InterfaceActionsWML#.5Bremove_unit_overlay.5D|remove_unit_overlay]],<br />
[[DirectActionsWML#.5Breplace_map.5D|replace_map]], <br />
[[DirectActionsWML#.5Breplace_schedule.5D|replace_schedule]], <br />
[[DirectActionsWML#.5Breset_fog.5D|reset_fog]], <br />
resistance&nbsp;([[AbilitiesWML|ability]], [[UnitsWML#.5Bmovetype.5D|unit]]),<br />
[[InternalActionsWML#.5Brole.5D|role]], <br />
[[TerrainMaskWML|rule]];<br />
|-<br />
|''S:'' <br />
[[ScenarioWML|scenario]],<br />
[[InterfaceActionsWML#.5Bscroll.5D|scroll]], <br />
[[InterfaceActionsWML#.5Bscroll_to.5D|scroll_to]],<br />
[[InterfaceActionsWML#.5Bscroll_to_unit.5D|scroll_to_unit]], <br />
[[FilterWML#Filtering_Weapons|secondary_attack]], <br />
[[StandardUnitFilter|secondary_unit]], <br />
[[HelpWML|section]], <br />
[[InterfaceActionsWML#.5Bselect_unit.5D|select_unit]], <br />
[[DirectActionsWML#.5Bset_extra_recruit.5D|set_extra_recruit]],<br />
[[PersistenceWML|set_global_variable]],<br />
[[InterfaceActionsWML#.5Bset_menu_item.5D|set_menu_item]], <br />
[[DirectActionsWML#.5Bset_recruit.5D|set_recruit]],<br />
[[EffectWML|set_specials]], <br />
[[InternalActionsWML#.5Bset_variable.5D|set_variable]], <br />
[[InternalActionsWML#.5Bset_variables.5D|set_variables]], <br />
show_if&nbsp;([[InterfaceActionsWML#.5Bmessage.5D|message]], [[InterfaceActionsWML#.5Bset_menu_item.5D|set_menu_item]]),<br />
[[InterfaceActionsWML#.5Bshow_objectives.5D|show_objectives]],<br />
[[SideWML|side]], <br />
[[AbilitiesWML|skirmisher]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|slow]], <br />
[[InterfaceActionsWML#.5Bsound.5D|sound]], <br />
[[InterfaceActionsWML#.5Bsound_source.5D|sound_source]], <br />
[[DirectActionsWML#.5Btunnel.5D|source]]&nbsp;(teleport),<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|specials]], <br />
[[InternalActionsWML#.5Bset_variables.5D|split]],<br />
([[SingleUnitWML|status]]&nbsp;(single_unit), <br />
[[InternalActionsWML#.5Bstore_gold.5D|store_gold]], <br />
[[InternalActionsWML#.5Bstore_items.5D|store_items]], <br />
[[InternalActionsWML#.5Bstore_locations.5D|store_locations]],<br />
[[InternalActionsWML#.5Bstore_map_dimensions.5D|store_map_dimensions]],<br />
[[InternalActionsWML#.5Bstore_reachable_locations.5D|store_reachable_locations]],<br />
[[InternalActionsWML#.5Bstore_side.5D|store_side]], <br />
[[InternalActionsWML#.5Bstore_starting_location.5D|store_starting_location]], <br />
[[InternalActionsWML#.5Bstore_time_of_day.5D|store_time_of_day]], <br />
[[InternalActionsWML#.5Bstore_turns.5D|store_turns]], <br />
[[InternalActionsWML#.5Bstore_unit.5D|store_unit]], <br />
[[InternalActionsWML#.5Bstore_unit_type.5D|store_unit_type]], <br />
[[InternalActionsWML#.5Bstore_unit_type_ids.5D|store_unit_type_ids]], <br />
[[InternalActionsWML#.5Bstore_villages.5D|store_villages]], <br />
[[IntroWML|story]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|swarm]], <br />
[[ConditionalActionsWML#.5Bswitch.5D|switch]];<br />
|-<br />
|''T:'' <br />
[[DirectActionsWML#.5Btunnel.5D|target]], <br />
teleport&nbsp;([[AbilitiesWML|ability]], [[DirectActionsWML#.5Bteleport.5D|action]]),<br />
[[DirectActionsWML#.5Bterrain.5D|terrain]], <br />
[[TerrainMaskWML|terrain_mask]], <br />
[[ScenarioWML#Test_scenario|test]],<br />
[[InterfaceActionsWML#.5Bmessage.5D|text_input]], <br />
[[WesCamp#The_textdomain_declaration|textdomain]],<br />
[[ConditionalActionsWML#.5Bif.5D|then]],<br />
[[TerrainGraphicsWML|tile]], <br />
[[TimeWML|time]], <br />
[[DirectActionsWML#.5Btime_area.5D|time_area]], <br />
[[HelpWML|topic]], <br />
[[HelpWML|toplevel]], <br />
[[UnitsWML#.5Btrait.5D|trait]], <br />
[[DirectActionsWML#.5Btransform_unit.5D|transform_unit]], <br />
[[InternalActionsWML#.5Bfind_path.5D|traveler]], <br />
[[ConditionalActionsWML#True_Condition_Tags|true]],<br />
[[DirectActionsWML#.5Btunnel.5D|tunnel]], <br />
[[ScenarioWML|tutorial]];<br />
|-<br />
|''U:'' <br />
[[InterfaceActionsWML#.5Bunhide_unit.5D|unhide_unit]], <br />
[[SingleUnitWML|unit]],<br />
[[InterfaceActionsWML#.5Bunit_overlay.5D|unit_overlay]], <br />
[[UnitTypeWML|unit_type]], <br />
[[InternalActionsWML|unit_worth]], <br />
[[UnitsWML|units]],<br />
[[InterfaceActionsWML#.5Bunlock_view.5D|unlock_view]],<br />
[[DirectActionsWML#.5Bunpetrify.5D|unpetrify]], <br />
[[DirectActionsWML#.5Bunstore_unit.5D|unstore_unit]]; <br />
|-<br />
| ''V:'' <br />
[[InternalActionsWML#.5Bset_variables.5D|value]], <br />
[[ConditionalActionsWML#Condition_Tags|variable]],<br />
[[VariablesWML#The_.5Bvariables.5D_tag|variables]],<br />
[[UnitTypeWML#Other_tags|variation]], <br />
[[SideWML|village]],<br />
[[InterfaceActionsWML#.5Bvolume.5D|volume]];<br />
|-<br />
| ''W:'' <br />
[[ConditionalActionsWML#.5Bwhile.5D|while]],<br />
[[InterfaceActionsWML#.5Bwml_message.5D|wml_message]];<br />
|}<br />
<br />
<includeonly>[[Category:WML Reference]]</includeonly><br />
<br />
<noinclude>Alternative box to {{WML Tags}}</noinclude></div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Template:WML_Tags_by_Category&diff=55696Template:WML Tags by Category2014-10-18T07:59:26Z<p>Xudojnik: semicolons</p>
<hr />
<div>{| class="gallery" style="width:225px;float: right;border: 1px solid #B48648; color:#B48648; font-size: 7pt;margin-left;10px;"<br />
|-<br />
|<br />
<span style="float: right;"><small class="editlink noprint plainlinksneverexpand">[{{SERVER}}{{localurl:Template:WML Tags by Category|action=edit}} edit ]</small></span><br />
'''WML Tags by Category'''<br />
<br />
|-<br />
|''Top-level tags:'' <br />
[[AdvancedPreferenceWML|advanced_preference]],<br />
[[CampaignWML#The_.5Bcampaign.5D_tag|campaign]],<br />
[[CoreWML|core]],<br />
[[EraWML|era]],<br />
[[GameConfigWML|game_config]],<br />
[[ThemeWML|theme]], <br />
[[LanguageWML|language]],<br />
[[LocaleWML|locale]];<br />
<br />
|-<br />
|''AI:'' <br />
[[Lua_AI_Howto#Behavior_.28Sticky.29_Candidate_Actions|add_ai_behavior]],<br />
[[AiWML#The_.5Bai.5D_Tag:_Defining_Aspects|ai]],<br />
[[AiWML#A_Bit_More_on_Simple_vs._Composite_Aspects|aspect]],<br />
[[AiWML#The_.5Bai.5D_Tag:_Defining_Aspects|avoid]],<br />
[[Formula_AI_Howto#Setting_up_the_RCA_main_loop_Stage_and_Candidate_Actions|candidate_action]], <br />
[[AiWML#The_.5Bgoal.5D_Tag|criteria]],<br />
[[Customizing_AI_in_Wesnoth_1.8#AI_engines_.28_via_.5Bengine.5D_tags_.29|engine]], <br />
[[AiWML#A_Bit_More_on_Simple_vs._Composite_Aspects|facet]],<br />
[[AiWML#Filtering_Combat_with_the_.27attacks.27_Aspect|filter_enemy]],<br />
[[AiWML#Filtering_Combat_with_the_.27attacks.27_Aspect|filter_own]],<br />
[[AiWML#The_.5Bgoal.5D_Tag|goal]],<br />
[[AiWML#The_.5Bai.5D_Tag:_Defining_Aspects|leader_goal]],<br />
[[AiWML#Limiting_Recruiting_with_the_.27recruitment.27_Aspect|limit]],<br />
[[Micro AIs|micro_ai]],<br />
[[AiWML#Deprecated_AI_Targeting_Aspects|protect_location]], <br />
[[AiWML#Deprecated_AI_Targeting_Aspects|protect_unit]],<br />
[[Customizing_AI_in_Wesnoth_1.8#Working_with_main_loop_of_the_RCA_AI|stage]];<br />
<br />
|-<br />
|''Replay WML:'' <br />
[[ReplayWML|choose]],<br />
[[ReplayWML|command]],<br />
[[ReplayWML|destination]],<br />
[[ReplayWML|end_turn]],<br />
[[ReplayWML|init_side]],<br />
[[ReplayWML|move]],<br />
[[ReplayWML|random]], <br />
[[ReplayWML|recall]],<br />
[[ReplayWML|recruit]], <br />
[[ReplayWML|replay]], <br />
[[ReplayWML|results]], <br />
[[ReplayWML|sequence]], <br />
[[ReplayWML|source]];<br />
<br />
|-<br />
|''Savefile WML:'' <br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|advances]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|attacks]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|deaths]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|defends]],<br />
[[SavefileWML|menu_item]], <br />
[[SavefileWML|replay_start]],<br />
[[SavefileWML|save]], <br />
[[SavefileWML|snapshot]];<br />
<br />
|-<br />
|''Editor and maps WML:'' <br />
[[EditorWML#The_.5Bbrush.5D_tag|brush]],<br />
[[MapGeneratorWML#The_Default_Generator|castle]], <br />
[[MapGeneratorWML#The_Cave_Generator|chamber]], <br />
[[MapGeneratorWML#The_Default_Generator|convert]], <br />
[[EditorWML#The_.5Beditor_group.5D_tag|editor_group]],<br />
[[EditorWML#The_.5Beditor_music.5D_tag|editor_music]], <br />
[[EditorWML#The_.5Beditor_times.5D_tag|editor_times]],<br />
[[MapGeneratorWML|generator]],<br />
[[MapGeneratorWML|height]], <br />
[[MapGeneratorWML#The_Cave_Generator|items]],<br />
[[MapGeneratorWML|naming]], <br />
[[MapGeneratorWML|road_cost]],<br />
[[MapGeneratorWML#The_Cave_Generator|settings]], <br />
[[MapGeneratorWML|village_naming]]; <br />
<br />
|-<br />
|''Wesnoth interface markup''<br />
[[ThemeWML#.5Bstatus.5D|expenses]],<br />
[[ThemeWML|gold]],<br />
[[ThemeWML#.5Bstatus.5D|income]],<br />
[[ThemeWML|label]],<br />
[[ThemeWML#.5Bmain_map.5D|main_map]],<br />
[[ThemeWML#.5Bmain_map_border.5D|main_map_border]], <br />
[[ThemeWML#.5Bmenu.5D|menu]], <br />
[[ThemeWML#.5Bmini_map.5D|mini_map]],<br />
[[ThemeWML#.5Bstatus.5D|num_units]],<br />
[[ThemeWML#.5Bstatus.5D|observers]],<br />
[[ThemeWML#.5Bpanel.5D|panel]], <br />
[[ThemeWML#.5Bstatus.5D|position]],<br />
[[ThemeWML|resolution]], <br />
[[ThemeWML|side_playing]], <br />
[[ThemeWML|status]],<br />
[[ThemeWML#.5Bstatus.5D|time_of_day]],<br />
[[ThemeWML#.5Bstatus.5D|turn]], <br />
[[ThemeWML#.5Bstatus.5D|unit_abilities]], <br />
[[ThemeWML#.5Bstatus.5D|unit_alignment]], <br />
[[ThemeWML#.5Bstatus.5D|unit_description]], <br />
[[ThemeWML#.5Bstatus.5D|unit_hp]], <br />
[[ThemeWML#.5Bstatus.5D|unit_image]], <br />
[[ThemeWML#.5Bstatus.5D|unit_level]], <br />
[[ThemeWML#.5Bstatus.5D|unit_moves]],<br />
[[ThemeWML#.5Bstatus.5D|unit_profile]], <br />
[[ThemeWML#.5Bstatus.5D|unit_status]],<br />
[[ThemeWML#.5Bstatus.5D|unit_traits]], <br />
[[ThemeWML#.5Bstatus.5D|unit_weapons]],<br />
[[ThemeWML#.5Bstatus.5D|unit_xp]],<br />
[[ThemeWML#.5Bstatus.5D|upkeep]],<br />
[[ThemeWML#.5Bstatus.5D|villages]];<br />
|-<br />
|''Units animation WML''<br />
[[AnimationWML|animation]],<br />
[[AnimationWML|attack_anim]],<br />
[[AnimationWML#death|death]], <br />
[[AnimationWML#default|default]], <br />
[[AnimationWML#defend|defend]],<br />
[[AnimationWML#draw_weapon_anim|draw_weapon_anim]],<br />
[[AnimationWML#.5Bif.5D_and_.5Belse.5D|else]],<br />
[[AnimationWML#Frames|frame]],<br />
[[AnimationWML#healed|healed_anim]], <br />
[[AnimationWML#healing|healing_anim]], <br />
[[AnimationWML#idling|idle_anim]], <br />
[[AnimationWML#.5Bif.5D_and_.5Belse.5D|if]],<br />
[[AnimationWML#leading|leading_anim]], <br />
[[AnimationWML#levelin|levelin_anim]],<br />
[[AnimationWML#levelout|levelout_anim]], <br />
[[AnimationWML#The_content_of_a_frame|missile_frame]],<br />
[[AnimationWML#movement|movement_anim]], <br />
[[AnimationWML#post_movement|post_movement_anim]], <br />
[[AnimationWML#pre_movement|pre_movement_anim]], <br />
[[AnimationWML#recruited|recruit_anim]], <br />
[[AnimationWML#recruiting|recruiting_anim]], <br />
[[AnimationWML#Simplified_animation_blocks|extra_anim]],<br />
[[AnimationWML#sheath_weapon|sheath_weapon_anim]], <br />
[[AnimationWML#standing|standing_anim]], <br />
[[AnimationWML#pre_teleport|teleport_anim]],<br />
[[AnimationWML#victory|victory_anim]];<br />
|-<br />
|''A:'' <br />
[[CampaignWML#Campaign credits|about]],<br />
[[AbilitiesWML|abilities]],<br />
[[SingleUnitWML|advance]],<br />
[[UnitTypeWML|advancefrom]],<br />
[[UnitTypeWML#After_max_level_advancement_.28AMLA.29|advancement]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_ability|affect_adjacent]],<br />
[[StandardSideFilter|allied_with]], <br />
[[DirectActionsWML#.5Ballow_end_turn.5D|allow_end_turn]],<br />
[[DirectActionsWML#.5Ballow_extra_recruit.5D|allow_extra_recruit]],<br />
[[DirectActionsWML#.5Ballow_recruit.5D|allow_recruit]],<br />
[[DirectActionsWML#.5Ballow_undo.5D|allow_undo]],<br />
[[ConditionalActionsWML#Meta-Condition_Tags|and]],<br />
[[InterfaceActionsWML#.5Banimate_unit.5D|animate]],<br />
[[InterfaceActionsWML#.5Banimate_unit.5D|animate_unit]],<br />
[[VariablesWML#Array|array]],<br />
[[UnitTypeWML#Attacks|attack]];<br />
|-<br />
|''B:'' <br />
[[UnitTypeWML#Other_tags|base_unit]], <br />
[[AbilitiesWML|berserk]], <br />
[[BinaryPathWML|binary_path]]; <br />
|-<br />
|''C:'' <br />
[[ConditionalActionsWML#.5Bcommand.5D|command]]&nbsp;(action),<br />
[[DirectActionsWML#.5Bcapture_village.5D|capture_village]],<br />
[[ConditionalActionsWML#.5Bswitch.5D|case]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|chance_to_hit]], <br />
[[InterfaceActionsWML#.5Bchat.5D|chat]],<br />
[[PersistenceWML|clear_global_variable]],<br />
[[InterfaceActionsWML#.5Bclear_menu_item.5D|clear_menu_item]],<br />
[[InternalActionsWML#.5Bclear_variable.5D|clear_variable]],<br />
[[InterfaceActionsWML#.5Bcolor_adjust.5D|color_adjust]];<br />
|-<br />
|''D:'' <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|damage]],<br />
[[UnitsWML#.5Bmovetype.5D|defense]],<br />
[[InterfaceActionsWML#.5Bdelay.5D|delay]],<br />
[[InterfaceActionsWML#.5Bdeprecated_message.5D|deprecated_message]],<br />
[[AbilitiesWML|disable]],<br />
[[DirectActionsWML#.5Bdisallow_end_turn.5D|disallow_end_turn]],<br />
[[DirectActionsWML#.5Bdisallow_extra_recruit.5D|disallow_extra_recruit]],<br />
[[DirectActionsWML#.5Bdisallow_recruit.5D|disallow_recruit]],<br />
[[ConditionalActionsWML#.5Bwhile.5D|do]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|drains]]; <br />
|-<br />
|''E:'' <br />
[[EffectWML|effect]],<br />
[[ConditionalActionsWML#.5Bif.5D|else]]&nbsp;(action)<br />
[[DirectActionsWML#.5Bendlevel.5D|endlevel]],<br />
[[DirectActionsWML#.5Bend_turn.5D|end_turn]]&nbsp;(action),<br />
[[StandardSideFilter|enemy_of]], <br />
[[CampaignWML#Campaign_credits|entry]], <br />
[[EventWML|event]];<br />
|-<br />
|''F:''<br />
[[InterfaceActionsWML#.5Banimate_unit.5D|facing]], <br />
[[InterfaceActionsWML#.5Bmove_units_fake.5D|fake_unit]], <br />
[[ConditionalActionsWML#True_Condition_Tags|false]],<br />
[[UnitTypeWML#Other_tags|female]], <br />
[[FilterWML|filter]],<br />
[[StandardUnitFilter|filter_adjacent]], <br />
[[StandardLocationFilter|filter_adjacent_location]], <br />
[[FilterWML#Filtering_Weapons|filter_attack]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_attacker]], <br />
[[AbilitiesWML#Common_keys_and_tags_for_every_ability|filter_base_value]], <br />
[[EventWML#.5Bfilter_condition.5D|filter_condition]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_defender]], <br />
[[StandardLocationFilter|filter_location]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_opponent]], <br />
[[StandardLocationFilter|filter_owner]], <br />
[[StandardLocationFilter|filter_radius]], <br />
[[SingleUnitWML|filter_recall]], <br />
[[StandardUnitFilter|filter_second]],<br />
[[FilterWML#Filtering_Weapons|filter_second_attack]],<br />
[[AbilitiesWML|filter_self]], <br />
[[StandardSideFilter|filter_side]],<br />
[[FilterWML#Filtering_Vision|filter_vision]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_weapon]], <br />
[[StandardUnitFilter|filter_wml]],<br />
[[InternalActionsWML#.5Bfind_path.5D|find_path]],<br />
[[InternalActionsWML#.5Bfire_event.5D|fire_event]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|firststrike]], <br />
[[InterfaceActionsWML#.5Bfloating_text.5D|floating_text]];<br />
|-<br />
|''G:'' <br />
[[PersistenceWML|get_global_variable]],<br />
[[DirectActionsWML#.5Bgold.5D|gold]]&nbsp;(action),<br />
[[InterfaceActionsWML#.5Bobjectives.5D|gold_carryover]];<br />
|-<br />
|''H:'' <br />
[[DirectActionsWML#.5Bharm_unit.5D|harm_unit]],<br />
[[StandardSideFilter|has_unit]], <br />
[[ConditionalActionsWML#Condition_Tags|have_location]],<br />
[[ConditionalActionsWML#Condition_Tags|have_unit]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|heal_on_hit]], <br />
[[DirectActionsWML#.5Bheal_unit.5D|heal_unit]],<br />
[[AbilitiesWML|heals]], <br />
[[UnitsWML#.5Bhide_help.5D|hide_help]],<br />
[[InterfaceActionsWML#.5Bhide_unit.5D|hide_unit]],<br />
[[AbilitiesWML|hides]];<br />
|-<br />
|''I:'' <br />
[[ConditionalActionsWML#.5Bif.5D|if]]&nbsp;(action),<br />
[[AbilitiesWML|illuminates]], <br />
[[TerrainGraphicsWML|image]],<br />
[[InternalActionsWML#.5Binsert_tag.5D|insert_tag]],<br />
[[InterfaceActionsWML#.5Binspect.5D|inspect]],<br />
[[InterfaceActionsWML#.5Bitem.5D|item]]; <br />
|-<br />
|''J:''<br />
[[InternalActionsWML#.5Bset_variables.5D|join]];<br />
|-<br />
|''K:'' <br />
[[DirectActionsWML#.5Bkill.5D|kill]],<br />
[[StatisticalScenarioWML|killed]];<br />
|-<br />
|''L:'' <br />
[[InterfaceActionsWML#.5Blabel.5D|label]]&nbsp;(map),<br />
[[AbilitiesWML|leadership]], <br />
[[DirectActionsWML#.5Blift_fog.5D|lift_fog]],<br />
[[InternalActionsWML#.5Bset_variables.5D|literal]], <br />
[[InterfaceActionsWML#.5Block_view.5D|lock_view]],<br />
[[LuaWML|lua]];<br />
|-<br />
|''M:'' <br />
[[UnitTypeWML#Other_tags|male]], <br />
[[InterfaceActionsWML#.5Bmessage.5D|message]],<br />
[[ModificationWML|modification]],<br />
[[SingleUnitWML|modifications]],<br />
[[DirectActionsWML#.5Bmodify_ai.5D|modify_ai]],<br />
[[DirectActionsWML#.5Bmodify_side.5D|modify_side]],<br />
[[DirectActionsWML#.5Bmodify_turns.5D|modify_turns]],<br />
[[DirectActionsWML#.5Bmodify_unit.5D|modify_unit]],<br />
[[DirectActionsWML#.5Bmove_unit.5D|move_unit]],<br />
[[InterfaceActionsWML#.5Bmove_unit_fake.5D|move_unit_fake]],<br />
[[InterfaceActionsWML#.5Bmove_units_fake.5D|move_units_fake]],<br />
[[UnitsWML#.5Bmovetype.5D|movement costs]],<br />
[[UnitsWML#.5Bmovetype.5D|movetype]],<br />
[[ScenarioWML|multiplayer]],<br />
[[EraWML|multiplayer_side]],<br />
[[MusicListWML#.5Bmusic.5D|music]];<br />
|-<br />
|''N:'' <br />
[[ConditionalActionsWML#Meta-Condition_Tags|not]], <br />
[[InterfaceActionsWML#.5Bobjectives.5D|note]]; <br />
|-<br />
|''O:'' <br />
[[DirectActionsWML#.5Bobject.5D|object]],<br />
[[InterfaceActionsWML#.5Bobjectives.5D|objective]],<br />
[[InterfaceActionsWML#.5Bobjectives.5D|objectives]],<br />
[[InterfaceActionsWML#.5Bopen_help.5D|open_help]],<br />
[[InterfaceActionsWML#.5Bmessage.5D|option]],<br />
[[OptionWML|options]],<br />
[[ConditionalActionsWML#Meta-Condition_Tags|or]];<br />
|-<br />
|''P:'' <br />
[[IntroWML|part]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|petrifies]], <br />
[[DirectActionsWML#.5Bpetrify.5D|petrify]], <br />
[[DirectActionsWML#.5Bplace_shroud.5D|place_shroud]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|plague]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|poison]], <br />
[[UnitTypeWML#Other_tags|portrait]], <br />
[[FilterWML#Filtering_Weapons|primary_attack]], <br />
[[StandardUnitFilter|primary_unit]], <br />
[[InterfaceActionsWML#.5Bprint.5D|print]]; <br />
|-<br />
|''R:'' <br />
[[UnitsWML#.5Brace.5D|race]], <br />
[[DirectActionsWML#.5Brecall.5D|recall]]&nbsp;(action), <br />
[[StatisticalScenarioWML|recalls]],<br />
[[StatisticalScenarioWML|recruits]], <br />
[[InterfaceActionsWML#.5Bredraw.5D|redraw]],<br />
[[AbilitiesWML|regenerate]], <br />
[[InterfaceActionsWML#.5Bremove_item.5D|remove_item]], <br />
[[DirectActionsWML#.5Bremove_shroud.5D|remove_shroud]], <br />
[[InterfaceActionsWML#.5Bremove_sound_source.5D|remove_sound_source]], <br />
[[InterfaceActionsWML#.5Bremove_unit_overlay.5D|remove_unit_overlay]],<br />
[[DirectActionsWML#.5Breplace_map.5D|replace_map]], <br />
[[DirectActionsWML#.5Breplace_schedule.5D|replace_schedule]], <br />
[[DirectActionsWML#.5Breset_fog.5D|reset_fog]], <br />
resistance&nbsp;([[AbilitiesWML|ability]], [[UnitsWML#.5Bmovetype.5D|unit]]),<br />
[[InternalActionsWML#.5Brole.5D|role]], <br />
[[TerrainMaskWML|rule]];<br />
|-<br />
|''S:'' <br />
[[ScenarioWML|scenario]],<br />
[[InterfaceActionsWML#.5Bscroll.5D|scroll]], <br />
[[InterfaceActionsWML#.5Bscroll_to.5D|scroll_to]],<br />
[[InterfaceActionsWML#.5Bscroll_to_unit.5D|scroll_to_unit]], <br />
[[FilterWML#Filtering_Weapons|secondary_attack]], <br />
[[StandardUnitFilter|secondary_unit]], <br />
[[HelpWML|section]], <br />
[[InterfaceActionsWML#.5Bselect_unit.5D|select_unit]], <br />
[[DirectActionsWML#.5Bset_extra_recruit.5D|set_extra_recruit]],<br />
[[PersistenceWML|set_global_variable]],<br />
[[InterfaceActionsWML#.5Bset_menu_item.5D|set_menu_item]], <br />
[[DirectActionsWML#.5Bset_recruit.5D|set_recruit]],<br />
[[EffectWML|set_specials]], <br />
[[InternalActionsWML#.5Bset_variable.5D|set_variable]], <br />
[[InternalActionsWML#.5Bset_variables.5D|set_variables]], <br />
show_if&nbsp;([[InterfaceActionsWML#.5Bmessage.5D|message]], [[InterfaceActionsWML#.5Bset_menu_item.5D|set_menu_item]]),<br />
[[InterfaceActionsWML#.5Bshow_objectives.5D|show_objectives]],<br />
[[SideWML|side]], <br />
[[AbilitiesWML|skirmisher]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|slow]], <br />
[[InterfaceActionsWML#.5Bsound.5D|sound]], <br />
[[InterfaceActionsWML#.5Bsound_source.5D|sound_source]], <br />
[[DirectActionsWML#.5Btunnel.5D|source]]&nbsp;(teleport),<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|specials]], <br />
[[InternalActionsWML#.5Bset_variables.5D|split]],<br />
[[StatisticalScenarioWML#The_.5Bstatistics.5D_tag|statistics]],<br />
([[SingleUnitWML|status]]&nbsp;(single_unit), <br />
[[InternalActionsWML#.5Bstore_gold.5D|store_gold]], <br />
[[InternalActionsWML#.5Bstore_items.5D|store_items]], <br />
[[InternalActionsWML#.5Bstore_locations.5D|store_locations]],<br />
[[InternalActionsWML#.5Bstore_map_dimensions.5D|store_map_dimensions]],<br />
[[InternalActionsWML#.5Bstore_reachable_locations.5D|store_reachable_locations]],<br />
[[InternalActionsWML#.5Bstore_side.5D|store_side]], <br />
[[InternalActionsWML#.5Bstore_starting_location.5D|store_starting_location]], <br />
[[InternalActionsWML#.5Bstore_time_of_day.5D|store_time_of_day]], <br />
[[InternalActionsWML#.5Bstore_turns.5D|store_turns]], <br />
[[InternalActionsWML#.5Bstore_unit.5D|store_unit]], <br />
[[InternalActionsWML#.5Bstore_unit_type.5D|store_unit_type]], <br />
[[InternalActionsWML#.5Bstore_unit_type_ids.5D|store_unit_type_ids]], <br />
[[InternalActionsWML#.5Bstore_villages.5D|store_villages]], <br />
[[IntroWML|story]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|swarm]], <br />
[[ConditionalActionsWML#.5Bswitch.5D|switch]];<br />
|-<br />
|''T:'' <br />
[[DirectActionsWML#.5Btunnel.5D|target]], <br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|team]],<br />
teleport&nbsp;([[AbilitiesWML|ability]], [[DirectActionsWML#.5Bteleport.5D|action]]),<br />
[[DirectActionsWML#.5Bterrain.5D|terrain]], <br />
[[TerrainGraphicsWML|terrain_graphics]], <br />
[[TerrainMaskWML|terrain_mask]], <br />
[[TerrainWML|terrain_type]], <br />
[[ScenarioWML#Test_scenario|test]],<br />
[[InterfaceActionsWML#.5Bmessage.5D|text_input]], <br />
[[WesCamp#The_textdomain_declaration|textdomain]],<br />
[[ConditionalActionsWML#.5Bif.5D|then]],<br />
[[TerrainGraphicsWML|tile]], <br />
[[TimeWML|time]], <br />
[[DirectActionsWML#.5Btime_area.5D|time_area]], <br />
[[HelpWML|topic]], <br />
[[HelpWML|toplevel]], <br />
[[UnitsWML#.5Btrait.5D|trait]], <br />
[[DirectActionsWML#.5Btransform_unit.5D|transform_unit]], <br />
[[InternalActionsWML#.5Bfind_path.5D|traveler]], <br />
[[ConditionalActionsWML#True_Condition_Tags|true]],<br />
[[DirectActionsWML#.5Btunnel.5D|tunnel]], <br />
[[ScenarioWML|tutorial]];<br />
|-<br />
|''U:'' <br />
[[InterfaceActionsWML#.5Bunhide_unit.5D|unhide_unit]], <br />
[[SingleUnitWML|unit]],<br />
[[InterfaceActionsWML#.5Bunit_overlay.5D|unit_overlay]], <br />
[[UnitTypeWML|unit_type]], <br />
[[InternalActionsWML|unit_worth]], <br />
[[UnitsWML|units]],<br />
[[InterfaceActionsWML#.5Bunlock_view.5D|unlock_view]],<br />
[[DirectActionsWML#.5Bunpetrify.5D|unpetrify]], <br />
[[DirectActionsWML#.5Bunstore_unit.5D|unstore_unit]]; <br />
|-<br />
| ''V:'' <br />
[[InternalActionsWML#.5Bset_variables.5D|value]], <br />
[[ConditionalActionsWML#Condition_Tags|variable]],<br />
[[VariablesWML#The_.5Bvariables.5D_tag|variables]],<br />
[[UnitTypeWML#Other_tags|variation]], <br />
[[SideWML|village]],<br />
[[InterfaceActionsWML#.5Bvolume.5D|volume]];<br />
|-<br />
| ''W:'' <br />
[[ConditionalActionsWML#.5Bwhile.5D|while]],<br />
[[InterfaceActionsWML#.5Bwml_message.5D|wml_message]];<br />
|}<br />
<br />
<includeonly>[[Category:WML Reference]]</includeonly><br />
<br />
<noinclude>A box with all the WML tags, each one linking to the page and section they are described in. This box should be included in each of the WML reference pages.</noinclude></div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Template:WML_Tags_by_Category&diff=55695Template:WML Tags by Category2014-10-18T07:54:18Z<p>Xudojnik: Extracted tags, which are rarely used for scenario creation</p>
<hr />
<div>{| class="gallery" style="width:225px;float: right;border: 1px solid #B48648; color:#B48648; font-size: 7pt;margin-left;10px;"<br />
|-<br />
|<br />
<span style="float: right;"><small class="editlink noprint plainlinksneverexpand">[{{SERVER}}{{localurl:Template:WML Tags by Category|action=edit}} edit ]</small></span><br />
'''WML Tags by Category'''<br />
<br />
|-<br />
|''Top-level tags:'' <br />
[[AdvancedPreferenceWML|advanced_preference]],<br />
[[CampaignWML#The_.5Bcampaign.5D_tag|campaign]],<br />
[[EraWML|era]],<br />
[[GameConfigWML|game_config]],<br />
[[ThemeWML|theme]], <br />
[[LanguageWML|language]],<br />
[[LocaleWML|locale]],<br />
<br />
|-<br />
|''AI:'' <br />
[[Lua_AI_Howto#Behavior_.28Sticky.29_Candidate_Actions|add_ai_behavior]],<br />
[[AiWML#The_.5Bai.5D_Tag:_Defining_Aspects|ai]],<br />
[[AiWML#A_Bit_More_on_Simple_vs._Composite_Aspects|aspect]],<br />
[[AiWML#The_.5Bai.5D_Tag:_Defining_Aspects|avoid]],<br />
[[Formula_AI_Howto#Setting_up_the_RCA_main_loop_Stage_and_Candidate_Actions|candidate_action]], <br />
[[AiWML#The_.5Bgoal.5D_Tag|criteria]],<br />
[[Customizing_AI_in_Wesnoth_1.8#AI_engines_.28_via_.5Bengine.5D_tags_.29|engine]], <br />
[[AiWML#A_Bit_More_on_Simple_vs._Composite_Aspects|facet]],<br />
[[AiWML#Filtering_Combat_with_the_.27attacks.27_Aspect|filter_enemy]],<br />
[[AiWML#Filtering_Combat_with_the_.27attacks.27_Aspect|filter_own]],<br />
[[AiWML#The_.5Bgoal.5D_Tag|goal]],<br />
[[AiWML#The_.5Bai.5D_Tag:_Defining_Aspects|leader_goal]],<br />
[[AiWML#Limiting_Recruiting_with_the_.27recruitment.27_Aspect|limit]],<br />
[[Micro AIs|micro_ai]],<br />
[[AiWML#Deprecated_AI_Targeting_Aspects|protect_location]], <br />
[[AiWML#Deprecated_AI_Targeting_Aspects|protect_unit]],<br />
[[Customizing_AI_in_Wesnoth_1.8#Working_with_main_loop_of_the_RCA_AI|stage]];<br />
<br />
|-<br />
|''Replay WML:'' <br />
[[ReplayWML|choose]],<br />
[[ReplayWML|command]],<br />
[[ReplayWML|destination]],<br />
[[ReplayWML|end_turn]],<br />
[[ReplayWML|init_side]],<br />
[[ReplayWML|move]],<br />
[[ReplayWML|random]], <br />
[[ReplayWML|recall]],<br />
[[ReplayWML|recruit]], <br />
[[ReplayWML|replay]], <br />
[[ReplayWML|results]], <br />
[[ReplayWML|sequence]], <br />
[[ReplayWML|source]]<br />
<br />
|-<br />
|''Savefile WML:'' <br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|advances]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|attacks]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|deaths]],<br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|defends]],<br />
[[SavefileWML|menu_item]], <br />
[[SavefileWML|replay_start]],<br />
[[SavefileWML|save]], <br />
[[SavefileWML|snapshot]],<br />
<br />
|-<br />
|''Editor and maps WML:'' <br />
[[EditorWML#The_.5Bbrush.5D_tag|brush]],<br />
[[MapGeneratorWML#The_Default_Generator|castle]], <br />
[[MapGeneratorWML#The_Cave_Generator|chamber]], <br />
[[MapGeneratorWML#The_Default_Generator|convert]], <br />
[[EditorWML#The_.5Beditor_group.5D_tag|editor_group]],<br />
[[EditorWML#The_.5Beditor_music.5D_tag|editor_music]], <br />
[[EditorWML#The_.5Beditor_times.5D_tag|editor_times]],<br />
[[MapGeneratorWML|generator]],<br />
[[MapGeneratorWML|height]], <br />
[[MapGeneratorWML#The_Cave_Generator|items]],<br />
[[MapGeneratorWML|naming]], <br />
[[MapGeneratorWML|road_cost]],<br />
[[MapGeneratorWML#The_Cave_Generator|settings]], <br />
[[MapGeneratorWML|village_naming]], <br />
<br />
|-<br />
|''Wesnoth interface markup''<br />
[[ThemeWML#.5Bstatus.5D|expenses]],<br />
[[ThemeWML|gold]],<br />
[[ThemeWML#.5Bstatus.5D|income]],<br />
[[ThemeWML|label]],<br />
[[ThemeWML#.5Bmain_map.5D|main_map]],<br />
[[ThemeWML#.5Bmain_map_border.5D|main_map_border]], <br />
[[ThemeWML#.5Bmenu.5D|menu]], <br />
[[ThemeWML#.5Bmini_map.5D|mini_map]],<br />
[[ThemeWML#.5Bstatus.5D|num_units]],<br />
[[ThemeWML#.5Bstatus.5D|observers]],<br />
[[ThemeWML#.5Bpanel.5D|panel]], <br />
[[ThemeWML#.5Bstatus.5D|position]],<br />
[[ThemeWML|resolution]], <br />
[[ThemeWML|side_playing]], <br />
[[ThemeWML|status]],<br />
[[ThemeWML#.5Bstatus.5D|time_of_day]],<br />
[[ThemeWML#.5Bstatus.5D|turn]], <br />
[[ThemeWML#.5Bstatus.5D|unit_abilities]], <br />
[[ThemeWML#.5Bstatus.5D|unit_alignment]], <br />
[[ThemeWML#.5Bstatus.5D|unit_description]], <br />
[[ThemeWML#.5Bstatus.5D|unit_hp]], <br />
[[ThemeWML#.5Bstatus.5D|unit_image]], <br />
[[ThemeWML#.5Bstatus.5D|unit_level]], <br />
[[ThemeWML#.5Bstatus.5D|unit_moves]],<br />
[[ThemeWML#.5Bstatus.5D|unit_profile]], <br />
[[ThemeWML#.5Bstatus.5D|unit_status]],<br />
[[ThemeWML#.5Bstatus.5D|unit_traits]], <br />
[[ThemeWML#.5Bstatus.5D|unit_weapons]],<br />
[[ThemeWML#.5Bstatus.5D|unit_xp]],<br />
[[ThemeWML#.5Bstatus.5D|upkeep]],<br />
[[ThemeWML#.5Bstatus.5D|villages]],<br />
|-<br />
|''Units animation WML''<br />
[[AnimationWML|animation]],<br />
[[AnimationWML|attack_anim]],<br />
[[AnimationWML#death|death]], <br />
[[AnimationWML#default|default]], <br />
[[AnimationWML#defend|defend]],<br />
[[AnimationWML#draw_weapon_anim|draw_weapon_anim]],<br />
[[AnimationWML#.5Bif.5D_and_.5Belse.5D|else]],<br />
[[AnimationWML#Frames|frame]];<br />
[[AnimationWML#healed|healed_anim]], <br />
[[AnimationWML#healing|healing_anim]], <br />
[[AnimationWML#idling|idle_anim]], <br />
[[AnimationWML#.5Bif.5D_and_.5Belse.5D|if]],<br />
[[AnimationWML#leading|leading_anim]], <br />
[[AnimationWML#levelin|levelin_anim]],<br />
[[AnimationWML#levelout|levelout_anim]], <br />
[[AnimationWML#The_content_of_a_frame|missile_frame]],<br />
[[AnimationWML#movement|movement_anim]], <br />
[[AnimationWML#post_movement|post_movement_anim]], <br />
[[AnimationWML#pre_movement|pre_movement_anim]], <br />
[[AnimationWML#recruited|recruit_anim]], <br />
[[AnimationWML#recruiting|recruiting_anim]], <br />
[[AnimationWML#Simplified_animation_blocks|extra_anim]],<br />
[[AnimationWML#sheath_weapon|sheath_weapon_anim]], <br />
[[AnimationWML#standing|standing_anim]], <br />
[[AnimationWML#pre_teleport|teleport_anim]],<br />
[[AnimationWML#victory|victory_anim]];<br />
|-<br />
|''A:'' <br />
[[CampaignWML#Campaign credits|about]],<br />
[[AbilitiesWML|abilities]],<br />
[[SingleUnitWML|advance]],<br />
[[UnitTypeWML|advancefrom]],<br />
[[UnitTypeWML#After_max_level_advancement_.28AMLA.29|advancement]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_ability|affect_adjacent]],<br />
[[StandardSideFilter|allied_with]], <br />
[[DirectActionsWML#.5Ballow_end_turn.5D|allow_end_turn]],<br />
[[DirectActionsWML#.5Ballow_extra_recruit.5D|allow_extra_recruit]],<br />
[[DirectActionsWML#.5Ballow_recruit.5D|allow_recruit]],<br />
[[DirectActionsWML#.5Ballow_undo.5D|allow_undo]],<br />
[[ConditionalActionsWML#Meta-Condition_Tags|and]],<br />
[[InterfaceActionsWML#.5Banimate_unit.5D|animate]],<br />
[[InterfaceActionsWML#.5Banimate_unit.5D|animate_unit]],<br />
[[VariablesWML#Array|array]],<br />
[[UnitTypeWML#Attacks|attack]],<br />
|-<br />
|''B:'' <br />
[[UnitTypeWML#Other_tags|base_unit]], <br />
[[AbilitiesWML|berserk]], <br />
[[BinaryPathWML|binary_path]], <br />
|-<br />
|''C:'' <br />
[[ConditionalActionsWML#.5Bcommand.5D|command]]&nbsp;(action),<br />
[[DirectActionsWML#.5Bcapture_village.5D|capture_village]],<br />
[[ConditionalActionsWML#.5Bswitch.5D|case]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|chance_to_hit]], <br />
[[InterfaceActionsWML#.5Bchat.5D|chat]],<br />
[[PersistenceWML|clear_global_variable]],<br />
[[InterfaceActionsWML#.5Bclear_menu_item.5D|clear_menu_item]],<br />
[[InternalActionsWML#.5Bclear_variable.5D|clear_variable]],<br />
[[InterfaceActionsWML#.5Bcolor_adjust.5D|color_adjust]],<br />
|-<br />
|''D:'' <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|damage]],<br />
[[UnitsWML#.5Bmovetype.5D|defense]],<br />
[[InterfaceActionsWML#.5Bdelay.5D|delay]],<br />
[[InterfaceActionsWML#.5Bdeprecated_message.5D|deprecated_message]],<br />
[[AbilitiesWML|disable]],<br />
[[DirectActionsWML#.5Bdisallow_end_turn.5D|disallow_end_turn]],<br />
[[DirectActionsWML#.5Bdisallow_extra_recruit.5D|disallow_extra_recruit]],<br />
[[DirectActionsWML#.5Bdisallow_recruit.5D|disallow_recruit]],<br />
[[ConditionalActionsWML#.5Bwhile.5D|do]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|drains]], <br />
|-<br />
|''E:'' <br />
[[EffectWML|effect]],<br />
[[ConditionalActionsWML#.5Bif.5D|else]]&nbsp;(action)<br />
[[DirectActionsWML#.5Bendlevel.5D|endlevel]],<br />
[[DirectActionsWML#.5Bend_turn.5D|end_turn]]&nbsp;(action),<br />
[[StandardSideFilter|enemy_of]], <br />
[[CampaignWML#Campaign_credits|entry]], <br />
[[EventWML|event]],<br />
|-<br />
|''F:''<br />
[[InterfaceActionsWML#.5Banimate_unit.5D|facing]], <br />
[[InterfaceActionsWML#.5Bmove_units_fake.5D|fake_unit]], <br />
[[ConditionalActionsWML#True_Condition_Tags|false]],<br />
[[UnitTypeWML#Other_tags|female]], <br />
[[FilterWML|filter]],<br />
[[StandardUnitFilter|filter_adjacent]], <br />
[[StandardLocationFilter|filter_adjacent_location]], <br />
[[FilterWML#Filtering_Weapons|filter_attack]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_attacker]], <br />
[[AbilitiesWML#Common_keys_and_tags_for_every_ability|filter_base_value]], <br />
[[EventWML#.5Bfilter_condition.5D|filter_condition]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_defender]], <br />
[[StandardLocationFilter|filter_location]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_opponent]], <br />
[[StandardLocationFilter|filter_owner]], <br />
[[StandardLocationFilter|filter_radius]], <br />
[[SingleUnitWML|filter_recall]], <br />
[[StandardUnitFilter|filter_second]],<br />
[[FilterWML#Filtering_Weapons|filter_second_attack]],<br />
[[AbilitiesWML|filter_self]], <br />
[[StandardSideFilter|filter_side]],<br />
[[FilterWML#Filtering_Vision|filter_vision]],<br />
[[AbilitiesWML#Common_keys_and_tags_for_every_weapon_special|filter_weapon]], <br />
[[StandardUnitFilter|filter_wml]],<br />
[[InternalActionsWML#.5Bfind_path.5D|find_path]],<br />
[[InternalActionsWML#.5Bfire_event.5D|fire_event]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|firststrike]], <br />
[[InterfaceActionsWML#.5Bfloating_text.5D|floating_text]],<br />
|-<br />
|''G:'' <br />
[[PersistenceWML|get_global_variable]],<br />
[[DirectActionsWML#.5Bgold.5D|gold]]&nbsp;(action),<br />
[[InterfaceActionsWML#.5Bobjectives.5D|gold_carryover]];<br />
|-<br />
|''H:'' <br />
[[DirectActionsWML#.5Bharm_unit.5D|harm_unit]],<br />
[[StandardSideFilter|has_unit]], <br />
[[ConditionalActionsWML#Condition_Tags|have_location]],<br />
[[ConditionalActionsWML#Condition_Tags|have_unit]],<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|heal_on_hit]], <br />
[[DirectActionsWML#.5Bheal_unit.5D|heal_unit]],<br />
[[AbilitiesWML|heals]], <br />
[[UnitsWML#.5Bhide_help.5D|hide_help]],<br />
[[InterfaceActionsWML#.5Bhide_unit.5D|hide_unit]],<br />
[[AbilitiesWML|hides]];<br />
|-<br />
|''I:'' <br />
[[ConditionalActionsWML#.5Bif.5D|if]]&nbsp;(action),<br />
[[AbilitiesWML|illuminates]], <br />
[[TerrainGraphicsWML|image]],<br />
[[InternalActionsWML#.5Binsert_tag.5D|insert_tag]],<br />
[[InterfaceActionsWML#.5Binspect.5D|inspect]],<br />
[[InterfaceActionsWML#.5Bitem.5D|item]], <br />
|-<br />
|''J:''<br />
[[InternalActionsWML#.5Bset_variables.5D|join]];<br />
|-<br />
|''K:'' <br />
[[DirectActionsWML#.5Bkill.5D|kill]],<br />
[[StatisticalScenarioWML|killed]];<br />
|-<br />
|''L:'' <br />
[[InterfaceActionsWML#.5Blabel.5D|label]]&nbsp;(map),<br />
[[AbilitiesWML|leadership]], <br />
[[DirectActionsWML#.5Blift_fog.5D|lift_fog]],<br />
[[InternalActionsWML#.5Bset_variables.5D|literal]], <br />
[[InterfaceActionsWML#.5Block_view.5D|lock_view]],<br />
[[LuaWML|lua]];<br />
|-<br />
|''M:'' <br />
[[UnitTypeWML#Other_tags|male]], <br />
[[InterfaceActionsWML#.5Bmessage.5D|message]],<br />
[[ModificationWML|modification]],<br />
[[SingleUnitWML|modifications]],<br />
[[DirectActionsWML#.5Bmodify_ai.5D|modify_ai]],<br />
[[DirectActionsWML#.5Bmodify_side.5D|modify_side]],<br />
[[DirectActionsWML#.5Bmodify_turns.5D|modify_turns]],<br />
[[DirectActionsWML#.5Bmodify_unit.5D|modify_unit]],<br />
[[DirectActionsWML#.5Bmove_unit.5D|move_unit]],<br />
[[InterfaceActionsWML#.5Bmove_unit_fake.5D|move_unit_fake]],<br />
[[InterfaceActionsWML#.5Bmove_units_fake.5D|move_units_fake]],<br />
[[UnitsWML#.5Bmovetype.5D|movement costs]],<br />
[[UnitsWML#.5Bmovetype.5D|movetype]],<br />
[[ScenarioWML|multiplayer]],<br />
[[EraWML|multiplayer_side]],<br />
[[MusicListWML#.5Bmusic.5D|music]];<br />
|-<br />
|''N:'' <br />
[[ConditionalActionsWML#Meta-Condition_Tags|not]], <br />
[[InterfaceActionsWML#.5Bobjectives.5D|note]], <br />
|-<br />
|''O:'' <br />
[[DirectActionsWML#.5Bobject.5D|object]],<br />
[[InterfaceActionsWML#.5Bobjectives.5D|objective]],<br />
[[InterfaceActionsWML#.5Bobjectives.5D|objectives]],<br />
[[InterfaceActionsWML#.5Bopen_help.5D|open_help]],<br />
[[InterfaceActionsWML#.5Bmessage.5D|option]],<br />
[[OptionWML|options]],<br />
[[ConditionalActionsWML#Meta-Condition_Tags|or]];<br />
|-<br />
|''P:'' <br />
[[IntroWML|part]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|petrifies]], <br />
[[DirectActionsWML#.5Bpetrify.5D|petrify]], <br />
[[DirectActionsWML#.5Bplace_shroud.5D|place_shroud]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|plague]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|poison]], <br />
[[UnitTypeWML#Other_tags|portrait]], <br />
[[FilterWML#Filtering_Weapons|primary_attack]], <br />
[[StandardUnitFilter|primary_unit]], <br />
[[InterfaceActionsWML#.5Bprint.5D|print]], <br />
|-<br />
|''R:'' <br />
[[UnitsWML#.5Brace.5D|race]], <br />
[[DirectActionsWML#.5Brecall.5D|recall]]&nbsp;(action), <br />
[[StatisticalScenarioWML|recalls]],<br />
[[StatisticalScenarioWML|recruits]], <br />
[[InterfaceActionsWML#.5Bredraw.5D|redraw]],<br />
[[AbilitiesWML|regenerate]], <br />
[[InterfaceActionsWML#.5Bremove_item.5D|remove_item]], <br />
[[DirectActionsWML#.5Bremove_shroud.5D|remove_shroud]], <br />
[[InterfaceActionsWML#.5Bremove_sound_source.5D|remove_sound_source]], <br />
[[InterfaceActionsWML#.5Bremove_unit_overlay.5D|remove_unit_overlay]],<br />
[[DirectActionsWML#.5Breplace_map.5D|replace_map]], <br />
[[DirectActionsWML#.5Breplace_schedule.5D|replace_schedule]], <br />
[[DirectActionsWML#.5Breset_fog.5D|reset_fog]], <br />
resistance&nbsp;([[AbilitiesWML|ability]], [[UnitsWML#.5Bmovetype.5D|unit]]),<br />
[[InternalActionsWML#.5Brole.5D|role]], <br />
[[TerrainMaskWML|rule]];<br />
|-<br />
|''S:'' <br />
[[ScenarioWML|scenario]],<br />
[[InterfaceActionsWML#.5Bscroll.5D|scroll]], <br />
[[InterfaceActionsWML#.5Bscroll_to.5D|scroll_to]],<br />
[[InterfaceActionsWML#.5Bscroll_to_unit.5D|scroll_to_unit]], <br />
[[FilterWML#Filtering_Weapons|secondary_attack]], <br />
[[StandardUnitFilter|secondary_unit]], <br />
[[HelpWML|section]], <br />
[[InterfaceActionsWML#.5Bselect_unit.5D|select_unit]], <br />
[[DirectActionsWML#.5Bset_extra_recruit.5D|set_extra_recruit]],<br />
[[PersistenceWML|set_global_variable]],<br />
[[InterfaceActionsWML#.5Bset_menu_item.5D|set_menu_item]], <br />
[[DirectActionsWML#.5Bset_recruit.5D|set_recruit]],<br />
[[EffectWML|set_specials]], <br />
[[InternalActionsWML#.5Bset_variable.5D|set_variable]], <br />
[[InternalActionsWML#.5Bset_variables.5D|set_variables]], <br />
show_if&nbsp;([[InterfaceActionsWML#.5Bmessage.5D|message]], [[InterfaceActionsWML#.5Bset_menu_item.5D|set_menu_item]]),<br />
[[InterfaceActionsWML#.5Bshow_objectives.5D|show_objectives]],<br />
[[SideWML|side]], <br />
[[AbilitiesWML|skirmisher]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|slow]], <br />
[[InterfaceActionsWML#.5Bsound.5D|sound]], <br />
[[InterfaceActionsWML#.5Bsound_source.5D|sound_source]], <br />
[[DirectActionsWML#.5Btunnel.5D|source]]&nbsp;(teleport),<br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|specials]], <br />
[[InternalActionsWML#.5Bset_variables.5D|split]],<br />
[[StatisticalScenarioWML#The_.5Bstatistics.5D_tag|statistics]],<br />
([[SingleUnitWML|status]]&nbsp;(single_unit), <br />
[[InternalActionsWML#.5Bstore_gold.5D|store_gold]], <br />
[[InternalActionsWML#.5Bstore_items.5D|store_items]], <br />
[[InternalActionsWML#.5Bstore_locations.5D|store_locations]],<br />
[[InternalActionsWML#.5Bstore_map_dimensions.5D|store_map_dimensions]],<br />
[[InternalActionsWML#.5Bstore_reachable_locations.5D|store_reachable_locations]],<br />
[[InternalActionsWML#.5Bstore_side.5D|store_side]], <br />
[[InternalActionsWML#.5Bstore_starting_location.5D|store_starting_location]], <br />
[[InternalActionsWML#.5Bstore_time_of_day.5D|store_time_of_day]], <br />
[[InternalActionsWML#.5Bstore_turns.5D|store_turns]], <br />
[[InternalActionsWML#.5Bstore_unit.5D|store_unit]], <br />
[[InternalActionsWML#.5Bstore_unit_type.5D|store_unit_type]], <br />
[[InternalActionsWML#.5Bstore_unit_type_ids.5D|store_unit_type_ids]], <br />
[[InternalActionsWML#.5Bstore_villages.5D|store_villages]], <br />
[[IntroWML|story]], <br />
[[AbilitiesWML#The_.5Bspecials.5D_tag|swarm]], <br />
[[ConditionalActionsWML#.5Bswitch.5D|switch]];<br />
|-<br />
|''T:'' <br />
[[DirectActionsWML#.5Btunnel.5D|target]], <br />
[[StatisticalScenarioWML#The_.5Bteam.5D_tag|team]],<br />
teleport&nbsp;([[AbilitiesWML|ability]], [[DirectActionsWML#.5Bteleport.5D|action]]),<br />
[[DirectActionsWML#.5Bterrain.5D|terrain]], <br />
[[TerrainGraphicsWML|terrain_graphics]], <br />
[[TerrainMaskWML|terrain_mask]], <br />
[[TerrainWML|terrain_type]], <br />
[[ScenarioWML#Test_scenario|test]],<br />
[[InterfaceActionsWML#.5Bmessage.5D|text_input]], <br />
[[WesCamp#The_textdomain_declaration|textdomain]],<br />
[[ConditionalActionsWML#.5Bif.5D|then]],<br />
[[TerrainGraphicsWML|tile]], <br />
[[TimeWML|time]], <br />
[[DirectActionsWML#.5Btime_area.5D|time_area]], <br />
[[HelpWML|topic]], <br />
[[HelpWML|toplevel]], <br />
[[UnitsWML#.5Btrait.5D|trait]], <br />
[[DirectActionsWML#.5Btransform_unit.5D|transform_unit]], <br />
[[InternalActionsWML#.5Bfind_path.5D|traveler]], <br />
[[ConditionalActionsWML#True_Condition_Tags|true]],<br />
[[DirectActionsWML#.5Btunnel.5D|tunnel]], <br />
[[ScenarioWML|tutorial]];<br />
|-<br />
|''U:'' <br />
[[InterfaceActionsWML#.5Bunhide_unit.5D|unhide_unit]], <br />
[[SingleUnitWML|unit]],<br />
[[InterfaceActionsWML#.5Bunit_overlay.5D|unit_overlay]], <br />
[[UnitTypeWML|unit_type]], <br />
[[InternalActionsWML|unit_worth]], <br />
[[UnitsWML|units]],<br />
[[InterfaceActionsWML#.5Bunlock_view.5D|unlock_view]],<br />
[[DirectActionsWML#.5Bunpetrify.5D|unpetrify]], <br />
[[DirectActionsWML#.5Bunstore_unit.5D|unstore_unit]], <br />
|-<br />
| ''V:'' <br />
[[InternalActionsWML#.5Bset_variables.5D|value]], <br />
[[ConditionalActionsWML#Condition_Tags|variable]],<br />
[[VariablesWML#The_.5Bvariables.5D_tag|variables]],<br />
[[UnitTypeWML#Other_tags|variation]], <br />
[[SideWML|village]],<br />
[[InterfaceActionsWML#.5Bvolume.5D|volume]];<br />
|-<br />
| ''W:'' <br />
[[ConditionalActionsWML#.5Bwhile.5D|while]],<br />
[[InterfaceActionsWML#.5Bwml_message.5D|wml_message]];<br />
|}<br />
<br />
<includeonly>[[Category:WML Reference]]</includeonly><br />
<br />
<noinclude>A box with all the WML tags, each one linking to the page and section they are described in. This box should be included in each of the WML reference pages.</noinclude></div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Advanced_Animation_Tutorial&diff=55694Advanced Animation Tutorial2014-10-18T06:40:08Z<p>Xudojnik: Added a link to AnimationWML page in "how to write animations" section</p>
<hr />
<div>== How to write animations ==<br />
<br />
This page deals with how to write the [[AnimationWML|animation WML]] when you got the frames drawn and ready as well as general guidelines for animation lengths and timing. Proper timing is in many cases almost as important in getting an animation to look nice, smooth and consistent with the rest of the game as the actual frames are.<br />
<br />
=== Timing ===<br />
<br />
As a general rule, a melee swing should last at least 300ms and at most 400ms: about 200ms before and after the moment when the swing hits, to keep the speed at which the unit slides back and forth somewhat constant. Naturally there can be exceptions to the "normal" animation lengths, like woses, which have much slower attack animations than most. With ranged attacks, the length of the animation isn't quite as important, since the units aren't taking turns in sliding back and forth (as is the case with melee combat), which makes different animation speeds much more visible. With ranged attacks, however, you have an additional animation to consider: the missile itself. Most normal missiles such as arrows, knives and spears should fly for 150ms. Magical missiles, big rocks or other unusual projectiles can fly longer, but 150ms is the unofficial standard for normal missiles.<br />
<br />
=== Filler frames ===<br />
<br />
The most common use of this is when you only got one frame to represent an attack. Usually, a single attack frame sliding back and forth (if it's a melee attack) looks pretty bad. Ideally, you'd want to have an animation that has the unit stepping forwards and backwards while swinging his weapon, but now we'll assume that for some reason you have to do with just one drawn frame.<br />
<br />
Instead of using the common method, which looks like this:<br />
<br />
[animation]<br />
[frame]<br />
begin=-100<br />
end=100<br />
image=unit-attack.png<br />
[/frame]<br />
[/animation]<br />
<br />
...you can with little trouble make that attack smoother, by having the attack frame kick in only at about halfway into the attack and also having it last only slightly past the point where it actually hits the enemy. How do you do this, if you only got one frame to work with? Well, the easiest solution - and one that works fine with almost any kind of unit - is to use the base frame:<br />
<br />
[animation]<br />
[frame]<br />
begin=-200<br />
end=-150<br />
image=unit.png<br />
[/frame]<br />
[frame]<br />
begin=-150<br />
end=100<br />
image=unit-attack.png<br />
[/frame]<br />
[frame]<br />
begin=100<br />
end=200<br />
image=unit.png<br />
[/frame]<br />
[/animation]<br />
<br />
This makes most melee attack frames look much more natural, since this way it seems more like the attacker is hitting the enemy he's approaching, instead of hitting air where he stands and then sliding towards the enemy and back. The same technique can and should be used whenever you have less than 3 drawn attack frames, whereas animations that have more than that would probably benefit very little from this.<br />
<br />
=== Simple way of getting new drawn frames ===<br />
<br />
Sometimes, the unit has frames made for other animations that can be used as part of the attack animation. Most usually this is a defense, movement or a leadership frame. Quite a few defense frames, for example, are quite suitable as a wind-up to the attack.<br />
<br />
...<br />
<br />
=== Sounds ===<br />
<br />
For the vast majority of attacks it is important that it has different sounds for when the attack hits and when it misses. Especially important are "normal" weapons, such as swords, bows, spears and so on. Magical attacks don't necessarily need a different sound when they miss, but if one is available, it should naturally be put to use. Absolutely never leave an attack without any sound altogether! If there isn't a fitting sound available for that weapon or attack, use the second best fitting sound. No attack, unless it's by a silent psychic assassin perhaps, should ever be without an accompanying sound.<br />
<br />
One common way to create hit and miss sound variations is by creating two separate ''[animation]''s for the attack and filtering them by the ''hits='' condition, like this:<br />
<br />
[animation]<br />
hits=no<br />
[frame]<br />
begin=-200<br />
end=-150<br />
image=unit.png<br />
[/frame]<br />
[frame]<br />
begin=-150<br />
end=100<br />
image=unit-attack.png<br />
sound={SOUND_LIST:MISS}<br />
[/frame]<br />
[frame]<br />
begin=100<br />
end=200<br />
image=unit.png<br />
[/frame]<br />
[/animation]<br />
[animation]<br />
hits=yes<br />
[frame]<br />
begin=-200<br />
end=-150<br />
image=unit.png<br />
[/frame]<br />
[frame]<br />
begin=-150<br />
end=100<br />
image=unit-attack.png<br />
sound=axe.ogg<br />
[/frame]<br />
[frame]<br />
begin=100<br />
end=200<br />
image=unit.png<br />
[/frame]<br />
[/animation]<br />
<br />
The other way is to use ''[if]'' and ''[else]'' tags in the animation. In this case, they could be used like this:<br />
<br />
[animation]<br />
[frame]<br />
begin=-200<br />
end=-150<br />
image=unit.png<br />
[/frame]<br />
[if]<br />
hits=no<br />
[frame]<br />
begin=-150<br />
end=100<br />
image=unit-attack.png<br />
sound={SOUND_LIST:MISS}<br />
[/frame]<br />
[/if]<br />
[else]<br />
hits=yes<br />
[frame]<br />
begin=-150<br />
end=100<br />
image=unit-attack.png<br />
sound=axe.ogg<br />
[/frame]<br />
[/else]<br />
[frame]<br />
begin=100<br />
end=200<br />
image=unit.png<br />
[/frame]<br />
[/animation]<br />
<br />
In case you're wondering, the ''{SOUND_LIST:MISS}'' is a simple macro that just expands to ''miss-1.ogg,miss-2.ogg,miss-3.ogg''. A comma-separated list of sounds can be given to all ''sound='' keys, making the game pick one of them at random whenever the sound is triggered, and the macros (you can find them in ''data/core/macros/sound-utils.cfg'') exist simply to make writing them more convenient.<br />
<br />
=== Slows, poison and other special situations ===<br />
<br />
Attacks with the slows or poison specials should emit appropriate sounds when they successfully slow or poison an enemy. We have two ready-made macros, FRAME_ON_SLOW and FRAME_ON_POISON available for this which should make the task trivial. Below is an example of how FRAME_OF_POISON is used on mainline units (also note the use of the above-described HIT_MISS_SOUNDS):<br />
<br />
[animation]<br />
[missile_frame]<br />
begin=-150<br />
end=0<br />
image="projectiles/dagger-n.png"<br />
image_diagonal="projectiles/dagger-ne.png"<br />
[/missile_frame]<br />
{HIT_MISS_SOUNDS throwing-knife.ogg throwing-knife-miss.ogg (<br />
[frame]<br />
begin=-200<br />
end=-100<br />
image="units/orcs/assassin-ranged1.png"<br />
[/frame]<br />
)}<br />
{FRAME_ON_POISON (<br />
[frame]<br />
begin=-100<br />
end=0<br />
image="units/orcs/assassin-ranged2.png"<br />
sound=poison.ogg<br />
[/frame]<br />
)}<br />
[/animation]<br />
<br />
The FRAME_ON_POISON macro makes whatever sound you specify inside the enclosed ''[frame]'' (so you could give different poisoning sounds to different units, for example to make magical poisoning sound different from traditional poison, like that on poisoned knives) to be played when the attack hits and the target is not already poisoned, with no sound played if the attack misses or the target is already poisoned. The FRAME_ON_SLOW macro is used in an identical manner, except of course with a different sound (slowed.ogg) as the standard one to use.<br />
<br />
[[Category: Art Tutorials]]</div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=UnitTypeWML&diff=55693UnitTypeWML2014-10-17T16:25:28Z<p>Xudojnik: Added a tip about image_icon key.</p>
<hr />
<div>{{WML Tags}}<br />
<br />
__TOC__<br />
<br />
Each '''[unit_type]''' tag defines one unit type. (for the use of [unit] to create a unit, see [[SingleUnitWML]])<br />
<br />
Unit animation syntax is described in [[AnimationWML]]. In addition to the animation tags described there, the following key/tags are recognized:<br />
* '''[advancefrom]''': Defines the previous unit type on the advancement tree. Allows a campaign-specific unit to be spliced into an already existing advancement tree. It should generally be used only inside a campaign ifdef, to prevent changes to other campaigns. This tag makes changes to the ''advances_to'' and ''experience'' keys of a base unit to make it advance into this unit. It takes these keys:<br />
** ''unit'': the id of the base unit from which this unit advances. This adds the unit into the list of units which ''unit'' can advance into.<br />
** ''experience'': (optional) If present the experience needed to advance is set to this value. If there are more than one [advancefrom] tags referencing the same base unit within the same preprocessor scope (e.g. a campaign #ifdef) with experience= keys, the lowest value of these is chosen. Note: this will also lower the experience required to advance to other units which the base unit can advance into.<br />
: If the previous unit type makes use of '''[male]''' and/or '''[female]''' tags, then the current (new) unit type is expected to also. That is, the subtypes defined by those tags will only receive this advancement if the new type has a corresponding tag.<br />
* '''advances_to''': When this unit has ''experience'' greater than or equal to ''experience'', it is replaced by a unit of the type that the value of ''advances_to'' refers to. All modifications that have been done to the unit are applied to the unit it is replaced by. The special value 'null' says that the unit does not advance but gets an AMLA instead. Can be a comma-separated list of units that can be chosen from upon advancing.<br />
* '''alignment''': one of lawful/neutral/chaotic/liminal (See [[TimeWML]]). Default is "neutral".<br />
* '''attacks''': the number of times that this unit can attack each turn.<br />
* '''cost''': when a player recruits a unit of this type, the player loses ''cost'' gold. If this would cause gold to drop below 0, the unit cannot be recruited.<br />
* '''recall_cost''': {{DevFeature1.13|0}} the default recall cost of units of this type, overriding the recall cost set in scenario [[SideWML|[side]]] tags or the global [[GameConfigWML|[game_config]]] value. Individual units may override this value in [[SingleUnitWML|[unit]]]. A value of -1 is equivalent to not specifying this attribute.<br />
* '''description''': (translatable) the text displayed in the unit descriptor box for this unit. Default 'No description available...'. <br />
* '''do_not_list''': Not used by the game, but by tools for browsing and listing the unit tree. If this is 'yes', the unit will be ignored by these tools. <br />
* '''ellipse''': the ellipse image to display under the unit, which is normally team-colored. Default is the normal ellipse; "misc/ellipse-nozoc" is a dashed ellipse that should be used for units without zone of control. {{DevFeature1.11}} Default is "misc/ellipse"; "-nozoc" and "-leader" are automatically appended for units without zone of control and with canrecruit=yes respectively. The [http://www.wesnoth.org/macro-reference.xhtml#IS_HERO IS_HERO]/[http://www.wesnoth.org/macro-reference.xhtml#MAKE_HERO MAKE_HERO]/[http://www.wesnoth.org/macro-reference.xhtml#UNMAKE_HERO UNMAKE_HERO] macros change the ellipse to/back from "misc/ellipse-hero".<br />
* '''experience''': When this unit has experience greater than or equal to ''experience'', it is replaced by a unit with 0 experience of the type that the value of ''advances_to'' refers to. All modifications that have been done to the unit are applied to the unit it is replaced by.<br />
* '''flag_rgb''': usually set by [http://www.wesnoth.org/macro-reference.xhtml#MAGENTA_IS_THE_TEAM_COLOR MAGENTA_IS_THE_TEAM_COLOR]; specifies the colours in the base flag to use for team-colouring the unit, expressed as a colour name (such as magenta) or a comma-separated list of RGB values (in hex format).<br />
* '''gender''': has a value of either ''male'' or ''female'', and determines which of the keys ''male_names'' and ''female_names'' should be read. When a unit of this type is recruited, it will be randomly assigned a name by the random name generator, which will use these names as a base.<br />
* '''hide_help''': determines if the unit type will appear in the in-game help. Possible values ''true'' and ''false'', defaults to ''false''.<br />
* '''hitpoints''': the maximum HP that the unit has, and the HP it has when it is created.<br />
* '''id''': the value of the ''type'' key for units of this type. This is required and must be unique among all [unit_type] tags. An ''id'' should consist only of alphanumerics and spaces (or underscores). ''type'' keys are found in [[SingleUnitWML]] and [[FilterWML]]. For example, id=Drake Flare<br />
::WARNING : characters "$", "&", "*", "-", "(" and ")" are illegal for use in the unit type id and must be avoided because they might lead to corrupted saved games<br />
*'''ignore_race_traits''': 'yes' or 'no' (default). Determines whether racial traits (see [[UnitsWML]]) are applied. <br />
* '''image''': sets the base image of the unit, which is used on the map.<br />
* '''image_icon''': sets the image used to represent the unit in areas such as the attack dialog and the unit image box in the sidebar. [[ImagePathFunctionWML#Crop_Function|~CROP]] function can be useful here. You can see Loyalists Paladin as an example.<br />
* '''level''': the amount of upkeep the unit costs. After this unit fights, its opponent gains ''level'' experience. See also kill_experience ([[GameConfigWML]]), and leadership ([[AbilitiesWML]]).<br />
* '''movement''': the number of move points that this unit receives each turn.<br />
* '''movement_type''': See [[UnitsWML#.5Bmovetype.5D|movetype]]. Note that the tags '''[movement_costs]''', '''[vision_costs]''', '''[defense]''', and '''[resistance]''' can be used to modify this movetype.<br />
* '''name''':(translatable) displayed in the Status Table for units of this type.<br />
* '''num_traits''': the number of traits that units of this type should receive when they are recruited, overriding the value set in the [race] tag.<br />
* '''profile''': the portrait image to use for this unit type. You can also set a portrait for an individual unit instead of the whole unit type (see [[SingleUnitWML]]). The engine first looks for the image in the transparent subdirectory and if found that image is used. If not found it will use the image as-is. Depending on the size the engine will or will not scale the image, the cutoff currently is at 300x300. For images which should only be shown on the right side in the dialog append ~RIGHT() to the image.<br />
* '''small_profile''': the image to use when a smaller portrait is needed than the one used for messages (e.g., in the help system). When this attribute is missing, the value of the '''profile''' attribute is used instead. When present, the heuristic for finding a transparent portrait is disabled for the '''profile''' attribute, so the correct '''profile''' should be set too. Note that image modifiers are allowed; they might be useful for cropping and rescaling a portrait:<br />
small_profile="portraits/elves/transparent/marksman+female.png~CROP(0,20,380,380)~SCALE(205,205)"<br />
profile="portraits/elves/transparent/marksman+female.png"<br />
* '''race''': See {{tag|UnitsWML|race}}. Also used in standard unit filter (see [[FilterWML]]). Mainline Wesnoth features following values: bats, drake, dwarf, elf, falcon, goblin, gryphon, human, khalifate, lizard, mechanical, merman, monster, naga, ogre, orc, troll, undead, wolf, wose. They are defined in /data/core/units.cfg.<br />
* '''undead_variation''': When a unit of this type is killed by a weapon with the plague special, this variation is applied to the new plague unit that is created, whatever its type. For example, if the plague special creates Walking Corpses and undead_variation is set to "troll", you'll get a troll Walking Corpse. Defaults to the undead_variation set in this unit type's race.<br />
* '''usage''': the way that the AI should recruit this unit, as determined by the scenario designer. (See ''recruitment_pattern'', [[AiWML]]). The following are conventions on usage:<br> ** ''scout'': Fast, mobile unit meant for exploration and village grabbing.<br> ** ''fighter'': Melee fighter, melee attack substantially more powerful than ranged.<br> ** ''archer'': Ranged fighter, ranged attack substantially more powerful than melee.<br> ** ''mixed fighter'': Melee and ranged fighter, melee and ranged attacks roughly equal.<br> ** ''healer'': Specialty 'heals' or 'cures'.<br>Note that this field primarily affects recruitment. It also has a small effect on unit movement (the AI tries to keep scouts away from enemies, to some extent). It does not affect the AI's behavior in combat; that is always computed from attack power and hitpoints. Non-standard usages may be used as well.<br />
* '''vision''': the number of vision points to calculate the unit's sight range. Defaults to ''movement'' if not present.{{DevFeature1.11}}<br />
* '''zoc''': if "yes" the unit will have a zone of control regardless of level. If present but set to anything other than "yes," the unit will have no zone of control. If the tag is omitted, zone of control is dictated by unit level (level 0 = no zoc, level 1+ = has zoc).<br />
* '''die_sound''': sets the sound, which is used when the unit dies.<br />
* '''healed_sound''': {{DevFeature1.11}} sets the sound used when the unit is healed in any way (default: heal.wav).<br />
<br />
== After max level advancement (AMLA) ==<br />
* '''[advancement]''': describes what happens to a unit when it reaches the XP required for advancement. It is considered as an advancement in the same way as advancement described by '''advances_to'''; however, if the player chooses this advancement, the unit will have one or more effects applied to it instead of advancing.<br />
** '''id''': unique identifier for this advancement; ''Required'' if there are multiple advancement options, or if ''strict_amla=no''.<br />
** '''always_display''': if set to true displays the AMLA option even if it is the only available one.<br />
** '''description''': a description (see [[DescriptionWML]]) displayed as the option for this advancement if there is another advancement option that the player must choose from; otherwise, the advancement is chosen automatically and this key is irrelevant.<br />
** '''image''': an image to display next to the description in the advancement menu.<br />
** '''max_times''': default 1. The maximum times the unit can be awarded this advancement. Pass -1 for "unlimited".<br />
** '''strict_amla''': (yes|no) default=no. Disable the AMLA if the unit can advance to another unit.<br />
** '''require_amla''': An optional list of AMLA ''id'' keys that act as prerequisites for this advancement to become available. Order is not important, and an AMLA id can be repeated any number of times to indicate that another advancement must be chosen several times before this advancement option will become available.<br />
*** example: <tt>require_amla=tough,tough,incr_damage</tt> assumes there exist other [advancement] options called ''id=tough'' and ''id=incr_damage''. Once ''tough'' is chosen twice and ''incr_damage'' is chosen once, then the current [advancement] will become available.<br />
*** ''require_amla=tough,incr_damage,tough'' is an equivalent way of expressing this.<br />
** '''[effect]''': A modification applied to the unit whenever this advancement is chosen. See [[EffectWML]]<br />
<br />
== Attacks ==<br />
* '''[attack]''': one of the unit's attacks.<br />
** '''description''': a translatable text for name of the attack, to be displayed to the user.<br />
** '''name''': the name of the attack. Used as a default description, if ''description'' is not present, and to determine the default icon, if ''icon'' is not present (if ''name=x'' then ''icon=attacks/x.png'' is assumed unless present). Non-translatable. Used for the ''has_weapon'' key and animation filters; see [[StandardUnitFilter]] and [[AnimationWML]]<br />
** '''type''': the damage type of the attack. Used in determining resistance to this attack (see {{tag|UnitsWML|movetype|resistance}}).<br />
** '''[specials]''': contains the specials of the attack. See [[AbilitiesWML#The_.5Bspecials.5D_tag|AbilitiesWML]].<br />
** '''icon''': the image to use as an icon for the attack in the attack choice menu, as a path relative to the images directory.<br />
** '''range''': the range of the attack. Used to determine the enemy's retaliation, which will be of the same type. Also displayed on the status table in parentheses; 'melee'(default) displays "melee", while 'ranged' displays "ranged". Range can be anything. Standard values are now "melee" and "ranged". From now on, ''short'' and ''long'' will be treated as totally different ranges. You can create any number of ranges now (with any name), and units can only retaliate against attacks for which they have a corresponding attack of the same range. This value is translatable.<br />
** '''damage''': the damage of this attack<br />
** '''number''': the number of strikes per attack this weapon has<br />
** '''movement_used''': determines how many movement points using this attack expends. By default all movement is used up, set this to 0 to make attacking with this attack expend no movement.<br />
** '''attack_weight''': helps the AI to choose which attack to use when attacking; highly weighted attacks are more likely to be used. Setting it to 0 disables the attack on attack<br />
** '''defense_weight''': used to determine which attack is used for retaliation. This affects gameplay, as the player is not allowed to determine his unit's retaliation weapon. Setting it to 0 disable the attacks on defense <br />
For the weight settings, the engine usually chooses the attack with the best average total damages * weight (default weight = 1.0).<br />
<br />
== Other tags ==<br />
* '''[base_unit]''': Contains one attribute, '''id''', which must be the ID of a unit type. If specified, the UnitTypeWML for that unit is copied into this one. Attributes in this unit overwrite the copy. Tags modify the corresponding tag of the original, so for example the first '''[attack]''' tag in the derived unit would modify the first attack of the base unit rather than defining a new attack.<br />
<br />
* '''[portrait]''': Describes a unit portrait for dialogue. However, generally you should use the profile key instead; [portrait] is mostly for internal use.<br />
** '''size''': The size of the portrait, in pixels.<br />
** '''side''': One of left or right.<br />
** '''mirror''': Whether to flip the image horizontally.<br />
** '''image''': The image path.<br />
<br />
* '''[abilities]''': Defines the abilities of a unit. See [[AbilitiesWML]]<br />
<br />
* '''[event]''': Any [event] written inside the [unit_type] tag will get included into any scenario where a unit of this type appears in. Note that such events get included when a unit of this type first appears in the scenario, not automatically when the scenario begins (meaning that ''name=prestart'' events, for example, would usually never trigger). See [[EventWML]] and [[WML_Abilities]]<br />
<br />
* '''[variation]''': Defines a variation of a unit. Variations are invoked with an [effect] tag or the variation= attribute in [[SingleUnitWML]]. They are currently used for graphical variations (giving character sprites new weapons) but theoretically you could do anything with it.<br />
** {{DevFeature1.11}} '''variation_id''': The id of this variation. Defaults to ''variation_name''.<br />
** '''variation_name''': The name of the variation. Since {{DevFeature1.11}} is this attribute translatable.<br />
** '''inherit''': if ''yes'', inherits all the properties of the base unit, which are then overwritten by the keys and tags of this variation. Defaults to no.<br />
*** {{DevFeature1.11}} The '''id''' key is always inherited, regardless of the value of '''inherit'''.<br />
** All keys and tags of '''[unit_type]''', except ''[advancefrom]'', ''[base_unit]'', ''[female]'', ''[male]'', and ''[variation]''. A special case is the '''id''' key, for which support is incomplete. If '''id''' is set for a variation, then it applies when filtering existing units (including the breakdown of units in the "damage versus" tooltip), but it cannot be used to create a new unit. For reliable behavior, '''id''' should match the parent type's id. {{DevFeature1.11}} Changing the id for a variation is fully supported starting in 1.11.2.<br />
<br />
* '''[male]''', '''[female]''': These can specify a variation based on gender for a unit. If these are provided, they will automatically apply based upon the gender of a unit.<br />
** '''inherit''': if ''yes'', inherits all the properties of the base unit. Defaults to yes.<br />
*** {{DevFeature1.11}} The '''id''' key is always inherited, regardless of the value of '''inherit'''.<br />
** All '''[unit_type]''' tags and keys, excluding ''[advancefrom]'', ''[base_unit]'', ''[female]'', and ''[male]''. A special case is the '''id''' key, for which support is incomplete. If '''id''' is set for a variation, then it applies when filtering existing units (including the breakdown of units in the "damage versus" tooltip), but it cannot be used to create a new unit. For reliable behavior, '''id''' should match the parent type's id. {{DevFeature1.11}} Changing the id for a variation is fully supported starting in 1.11.2.<br />
<br />
== See Also ==<br />
<br />
* [[AnimationWML]]<br />
* [[ReferenceWML]]<br />
* [[TerrainWML]]<br />
<br />
[[Category: WML Reference]]</div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Wml_optimisation&diff=55669Wml optimisation2014-10-12T07:20:47Z<p>Xudojnik: Added warning about premature optimisation</p>
<hr />
<div>==The basics==<br />
The first thing you need to know: '''If you have no problems with performance, then don't bother'''.<br />
Any optimisation is supposed to help you in following situations:<br />
* Game freezes for several seconds after each user action<br />
* Your scenario loading time longer than several minutes<br />
* Your add-on codebase larger than 5 megabytes<br />
<br />
===What you should know next===<br />
*[[PreprocessorRef#Preprocessor_directives|Macros]]<br />
*[[EventWML]]<br />
*[[EventWML#Custom_events|Custom events]]<br />
*[[ConditionalActionsWML#.5Bwhile.5D|While loops]]<br />
<br />
===How do I optimise my code?===<br />
<br />
So, you've written your campaign, scenario or era and it works. Congratulations, but your work is far from over! If your campaign or scenario is big enough, you'll often notice that it runs very slowly, and you need to do something about it. Or maybe you have a powerful computer and you'd like to make sure that other, weaker machines won't have troubles with running your content. Or perhaps, you just want to learn how to write code that not only works, but is also efficient.<br />
<br />
The first thing to know, since apparently it's not stressed enough, macros '''do not''' improve performance! Macros only make your code more readable and easier to maintain. Try to refrain from using big macros, and more importantly, avoid using macros inside macros (inside macros, inside macros... yes, I've seen it happen, and yes I've tried doing it myself when I was new to wml). Under the covers, WML macros are replaced by the code they represent, and if there are macros inside macros (especially big ones), lines of code multiply horribly fast.<br />
<br />
What's a better way to write code that appears often? ''Custom events''' and ''while loops''! By defining a '''custom event''', and firing it when needed, you'll save a lot of code lines, make your code nicer to read and much more efficient. Same goes for the '''while loop''': instead of copy/pasting your code, try to use a loop, whenever you can. Let's take a look at this example problem: whenever side 1 unit enters a village, you want to place 5 walking corpses around this village. Let's say there are 6 villages in question with coordinates (1,1), (2,2), (3,3), (4,4), (5,5), (6,6).<br />
<br />
====Inefficient example====<br />
<br />
#NOTE: remember, this should work alright, but it is not efficient! Imagine if you have much more villages in mind, or you want to spawn more zombies<br />
<br />
#define SPAWN_ZOMBIES X Y SIDE<br />
[unit]<br />
side={SIDE}<br />
type=Walking Corpse<br />
x,y={X},{Y}<br />
placement=map_passable<br />
[unit]<br />
[unit]<br />
side={SIDE}<br />
type=Walking Corpse<br />
x,y={X},{Y}<br />
placement=map_passable<br />
[unit]<br />
[unit]<br />
side={SIDE}<br />
type=Walking Corpse<br />
x,y={X},{Y}<br />
placement=map_passable<br />
[unit]<br />
[unit]<br />
side={SIDE}<br />
type=Walking Corpse<br />
x,y={X},{Y}<br />
placement=map_passable<br />
[unit]<br />
[unit]<br />
side={SIDE}<br />
type=Walking Corpse<br />
x,y={X},{Y}<br />
placement=map_passable<br />
[unit]<br />
#enddef<br />
<br />
[event]<br />
name=moveto<br />
[filter]<br />
side=1<br />
x,y=1,1<br />
[or]<br />
x,y=2,2<br />
[/or]<br />
[or]<br />
x,y=3,3<br />
[/or]<br />
[or]<br />
x,y=4,4<br />
[/or]<br />
[or]<br />
x,y=5,5<br />
[/or]<br />
[or]<br />
x,y=6,6<br />
[/or]<br />
[/filter]<br />
<br />
{SPAWN_ZOMBIES $unit.x $unit.y 2}<br />
[/event]<br />
<br />
Looks pretty innocent, right? But imagine that there are more villages. Or better yet, imagine you want to increase the amount of zombies, you'll have to copy/paste even more, and it's easy to make a mistake while doing it. <br />
<br />
====More efficient example====<br />
<br />
#first, let's define our custom event:<br />
[event]<br />
name=spawn_zombies<br />
first_time_only=no<br />
#it's easy to forget, but you have to set first_time_only in custom events too<br />
{VARIABLE i 0}<br />
[while]<br />
[variable]<br />
name=i<br />
less_than_equal_to=5<br />
#repeating the loop 5 times for 5 zombies, note how easy it is now to change the amount of zombies you want to spawn!<br />
[/variable]<br />
[do]<br />
[unit]<br />
side=2<br />
type=Walking Corpse<br />
x,y=$unit.x,$unit.y<br />
#unit variable is passed to this event from the parent event. <br />
placement=map_passable<br />
[unit]<br />
{VARIABLE_OP i add 1}<br />
[/do]<br />
[/while]<br />
{CLEAR_VARIABLE i}<br />
[/event]<br />
<br />
[event]<br />
name=moveto<br />
[filter]<br />
side=1<br />
x,y=1,1<br />
[or]<br />
x,y=2,2<br />
[/or]<br />
[or]<br />
x,y=3,3<br />
[/or]<br />
[or]<br />
x,y=4,4<br />
[/or]<br />
[or]<br />
x,y=5,5<br />
[/or]<br />
[or]<br />
x,y=6,6<br />
[/or]<br />
[/filter]<br />
<br />
[fire_event]<br />
name=spawn_zombies<br />
[/fire_event]<br />
[/event]<br />
<br />
===Fired events vs macros===<br />
<br />
But if ''fire events'' are so cool and efficient, what is the advantage of using ''macros''? Good question. As you can see, custom events have one issue: ''it's harder to set dynamic variables in fired events''. When defining macros, you specify arguments and those arguments are declared ''whenever we're using that macro'' and can be changed in any way you, and more importantly, someone else wants. Remember, that you might want to start a bigger project and invite someone to help you with the code. '''Macros are obvious and transparent in usage''' - when reading a macro definition you always know what is the changing variable and what is a constant. In custom events, it is not so obvious.<br />
<br />
Let's take a look at one of the default macros included with wesnoth:<br />
<br />
#define ABILITY_REGENERATES<br />
# Canned definition of the Regenerate ability to be included in an [abilities]<br />
# clause.<br />
[regenerate]<br />
value=8<br />
id=regenerates<br />
name= _ "regenerates"<br />
female_name= _ "female^regenerates"<br />
description= _ "Regenerates:<br />
The unit will heal itself 8 HP per turn. If it is poisoned, it will remove the poison instead of healing."<br />
affect_self=yes<br />
poison=cured<br />
[/regenerate]<br />
#enddef<br />
<br />
This is a good macro, because replacing it by a custom event would be complicated and messy and it wouldn't save a lot of code, anyway. Another example is<br />
<br />
#define GENERIC_UNIT SIDE TYPE X Y<br />
# Creates a generic unit of TYPE belonging to SIDE at X,Y, which has a<br />
# random name, gender and traits (just like a recruited unit).<br />
[unit]<br />
side={SIDE}<br />
type={TYPE}<br />
x={X}<br />
y={Y}<br />
generate_name=yes<br />
random_traits=yes<br />
random_gender=yes<br />
upkeep=full<br />
[/unit]<br />
#enddef<br />
<br />
This time, making a custom event would be fairly easy, but it would be much less transparent in usage. The code {GENERIC_UNIT 1 Spearman 12 3} is self-explanatory, simple and versatile.<br />
<br />
<br />
==Do not treat macroses as functions==<br />
Main advantage of macroses is that they allow you to reuse your code with less effort. But you need to take into account how ''exactly'' they are used by Wesnoth. Look at the example<br />
<br />
#define CREATE_REINFORCMENT SIDE <br />
{VARIABLE temp_side {SIDE}}<br />
[variable]<br />
name = temp_side<br />
value = 1<br />
[/variable]<br />
[if]<br />
{VARIABLE_CONDITIONAL temp_side equals 1}<br />
[then]<br />
{GENERIC_UNIT 1 "Walking Corpse" 12 3}<br />
[/then]<br />
[/if]<br />
[if]<br />
{VARIABLE_CONDITIONAL temp_side equals 2}<br />
[then]<br />
{GENERIC_UNIT 2 "Spearman" 3 16}<br />
[/then]<br />
[/if]<br />
{CLEAR_VARIABLE temp_side}<br />
#enddef<br />
[event]<br />
name=turn 10<br />
{CREATE_REINFORCMENT 1}<br />
{CREATE_REINFORCMENT 2}<br />
[/event]<br />
<br />
In this example I wanted to create additional units for each side at turn 10. Side 1 is undeads and side 2 is loyalists. Everything looks good, but there is a mistake. When Wesnoth loads scenario, all macroses are substituted with their meaning. This example becomes:<br />
<br />
[event]<br />
name="turn 10"<br />
[set_variable]<br />
name="temp_side"<br />
value=1<br />
[/set_variable]<br />
[if]<br />
[variable]<br />
equals=1<br />
name="temp_side"<br />
[/variable]<br />
[then]<br />
[unit]<br />
generate_name=yes<br />
random_gender=yes<br />
random_traits=yes<br />
side=1<br />
type="Walking Corpse"<br />
upkeep="full"<br />
x=12<br />
y=3<br />
[/unit]<br />
[/then]<br />
[/if]<br />
[if]<br />
[variable]<br />
equals=2<br />
name="temp_side"<br />
[/variable]<br />
[then]<br />
# PART 1 BEGINS<br />
[unit]<br />
generate_name=yes<br />
random_gender=yes<br />
random_traits=yes<br />
side=2<br />
type="Spearman"<br />
upkeep="full"<br />
x=3<br />
y=16<br />
[/unit]<br />
# PART 1 ENDS<br />
[/then]<br />
[/if]<br />
[clear_variable]<br />
name="temp_side"<br />
[/clear_variable]<br />
[set_variable]<br />
name="temp_side"<br />
value=2<br />
[/set_variable]<br />
[if]<br />
[variable]<br />
equals=1<br />
name="temp_side"<br />
[/variable]<br />
[then]<br />
# PART 2 BEGINS<br />
[unit]<br />
generate_name=yes<br />
random_gender=yes<br />
random_traits=yes<br />
side=1<br />
type="Walking Corpse"<br />
upkeep="full"<br />
x=12<br />
y=3<br />
[/unit]<br />
# PART 2 ENDS<br />
[/then]<br />
[/if]<br />
[if]<br />
[variable]<br />
equals=2<br />
name="temp_side"<br />
[/variable]<br />
[then]<br />
[unit]<br />
generate_name=yes<br />
random_gender=yes<br />
random_traits=yes<br />
side=2<br />
type="Spearman"<br />
upkeep="full"<br />
x=3<br />
y=16<br />
[/unit]<br />
[/then]<br />
[/if]<br />
[clear_variable]<br />
name="temp_side"<br />
[/clear_variable]<br />
[/event]<br />
<br />
Obviously part 1 and part 2 will never happen. It makes conditional check useless while you code becomes more complex. This is very common mistake even in advanced scenarios and add-ons. To avoid this problem, you need to follow the rule: '''Do not make conditional actions based on values of arguments'''. If you need to do this, then you need to think over situation again. In our example it might be:<br />
<br />
[event]<br />
name=turn 10<br />
{GENERIC_UNIT 1 "Walking Corpse" 12 3}<br />
{GENERIC_UNIT 2 "Spearman" 3 16}<br />
[/event]<br />
<br />
<br />
==Analogies to "real" programming==<br />
<br />
Now that you know how to use macros and custom events to optimise your code, let's take a moment to think how you could use your knowledge outside Wesnoth. You've probably heard about c++, python, lua or any other programming language. Just like them, WML has some common features but under slightly different names. For example, instead of making custom ''events'', you're making custom ''functions'' and ''procedures'' that can be used further in your code in a very similar way. That's why understanding optimisation is so important - it'll help you understand real programming problems, and develop good habits!<br />
<br />
==Further reading==<br />
<br />
*[http://wiki.wesnoth.org/Advanced_Optimisations_and_Hacks More complex optimisations] - read this only if you believe you know everything!<br />
*[http://www.wesnoth.org/macro-reference.xhtml Macro reference]<br />
*[[LuaWML]]<br />
*[[ConventionsWML]]<br />
<br />
[[Category:WML_Tips]]</div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Talk:Wml_optimisation&diff=55668Talk:Wml optimisation2014-10-12T07:03:29Z<p>Xudojnik: </p>
<hr />
<div>Thoughts (iceiceice):<br />
<br />
So I think you might want to say a few words, (or link to a general explanation of) the programming mantra "premature optimization is the root of all evil". Maybe something like http://en.wikipedia.org/wiki/Program_optimization#When_to_optimize, although I'm not sure its the best. <br />
<br />
I'm slightly concerned that some parts of on lines like <br />
<br />
"Or perhaps, you just want to learn how to write code that not only works, but is also efficient." <br />
<br />
will encourage people to start just employing all optimization techniques throughout their code, which is generally a bad thing.<br />
<br />
In case of wml, the mantra would say that even though wml bloat can be a problem, its still best to just write things in the most natural and clear way first and then only start eliminating macros / going to custom events / insert tag syntax after project is mostly done and you have a performance issue. You might also want to mention that people can use things like saving time stamps to profile their code to try to figure out where the slow parts are, or look at a savefile to see what wml their leaning tower of macros is actually creating.<br />
<br />
I have never worked on an add-on large enough to require this stuff so what I'm writing above is just boilerplate, but afaik this is part of "best practice" in any programming context.<br />
<br />
I think you might also want to include more explanation in the line "macros [b] do not [/b] improve performance!". Maybe add something like "macros are fully expanded inline whenever your scenario is loaded into memory." I guess you do kind of say this but you don't use the word inline anywhere.<br />
<br />
--[[User:Xudojnik|Xudojnik]] ([[User talk:Xudojnik|talk]]) 07:03, 12 October 2014 (UTC)<br />
I think that first example with zombies is not an optimisation.<br />
<br />
First: Even if it is not about zombies and villages. Why do you use custom event if you can just write loop in moveto event?<br />
<br />
Second: One rarely need to spawn a lot of units in one point. In campaigns one usually spawn them in some area or in predefined points. Thats why it is easier to use GENERIC_UNIT macro several times with different coordinates.</div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Talk:Wml_optimisation&diff=55667Talk:Wml optimisation2014-10-12T07:03:04Z<p>Xudojnik: </p>
<hr />
<div>Thoughts (iceiceice):<br />
<br />
So I think you might want to say a few words, (or link to a general explanation of) the programming mantra "premature optimization is the root of all evil". Maybe something like http://en.wikipedia.org/wiki/Program_optimization#When_to_optimize, although I'm not sure its the best. <br />
<br />
I'm slightly concerned that some parts of on lines like <br />
<br />
"Or perhaps, you just want to learn how to write code that not only works, but is also efficient." <br />
<br />
will encourage people to start just employing all optimization techniques throughout their code, which is generally a bad thing.<br />
<br />
In case of wml, the mantra would say that even though wml bloat can be a problem, its still best to just write things in the most natural and clear way first and then only start eliminating macros / going to custom events / insert tag syntax after project is mostly done and you have a performance issue. You might also want to mention that people can use things like saving time stamps to profile their code to try to figure out where the slow parts are, or look at a savefile to see what wml their leaning tower of macros is actually creating.<br />
<br />
I have never worked on an add-on large enough to require this stuff so what I'm writing above is just boilerplate, but afaik this is part of "best practice" in any programming context.<br />
<br />
I think you might also want to include more explanation in the line "macros [b] do not [/b] improve performance!". Maybe add something like "macros are fully expanded inline whenever your scenario is loaded into memory." I guess you do kind of say this but you don't use the word inline anywhere.<br />
<br />
--[[User:Xudojnik|Xudojnik]] ([[User talk:Xudojnik|talk]]) 07:03, 12 October 2014 (UTC)<br />
I think that first example with zombies is not an optimisation.<br />
First: Even if it is not about zombies and villages. Why do you use custom event if you can just write loop in moveto event?<br />
Second: One rarely need to spawn a lot of units in one point. In campaigns one usually spawn them in some area or in predefined points. Thats why it is easier to use GENERIC_UNIT macro several times with different coordinates.</div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=Wml_optimisation&diff=55665Wml optimisation2014-10-12T06:49:11Z<p>Xudojnik: Added a description of common mistake "macros is function"</p>
<hr />
<div>==The basics==<br />
<br />
===What you should know first===<br />
*[[PreprocessorRef#Preprocessor_directives|Macros]]<br />
*[[EventWML]]<br />
*[[EventWML#Custom_events|Custom events]]<br />
*[[ConditionalActionsWML#.5Bwhile.5D|While loops]]<br />
<br />
===How do I optimise my code?===<br />
<br />
So, you've written your campaign, scenario or era and it works. Congratulations, but your work is far from over! If your campaign or scenario is big enough, you'll often notice that it runs very slowly, and you need to do something about it. Or maybe you have a powerful computer and you'd like to make sure that other, weaker machines won't have troubles with running your content. Or perhaps, you just want to learn how to write code that not only works, but is also efficient.<br />
<br />
The first thing to know, since apparently it's not stressed enough, macros '''do not''' improve performance! Macros only make your code more readable and easier to maintain. Try to refrain from using big macros, and more importantly, avoid using macros inside macros (inside macros, inside macros... yes, I've seen it happen, and yes I've tried doing it myself when I was new to wml). Under the covers, WML macros are replaced by the code they represent, and if there are macros inside macros (especially big ones), lines of code multiply horribly fast.<br />
<br />
What's a better way to write code that appears often? ''Custom events''' and ''while loops''! By defining a '''custom event''', and firing it when needed, you'll save a lot of code lines, make your code nicer to read and much more efficient. Same goes for the '''while loop''': instead of copy/pasting your code, try to use a loop, whenever you can. Let's take a look at this example problem: whenever side 1 unit enters a village, you want to place 5 walking corpses around this village. Let's say there are 6 villages in question with coordinates (1,1), (2,2), (3,3), (4,4), (5,5), (6,6).<br />
<br />
====Inefficient example====<br />
<br />
#NOTE: remember, this should work alright, but it is not efficient! Imagine if you have much more villages in mind, or you want to spawn more zombies<br />
<br />
#define SPAWN_ZOMBIES X Y SIDE<br />
[unit]<br />
side={SIDE}<br />
type=Walking Corpse<br />
x,y={X},{Y}<br />
placement=map_passable<br />
[unit]<br />
[unit]<br />
side={SIDE}<br />
type=Walking Corpse<br />
x,y={X},{Y}<br />
placement=map_passable<br />
[unit]<br />
[unit]<br />
side={SIDE}<br />
type=Walking Corpse<br />
x,y={X},{Y}<br />
placement=map_passable<br />
[unit]<br />
[unit]<br />
side={SIDE}<br />
type=Walking Corpse<br />
x,y={X},{Y}<br />
placement=map_passable<br />
[unit]<br />
[unit]<br />
side={SIDE}<br />
type=Walking Corpse<br />
x,y={X},{Y}<br />
placement=map_passable<br />
[unit]<br />
#enddef<br />
<br />
[event]<br />
name=moveto<br />
[filter]<br />
side=1<br />
x,y=1,1<br />
[or]<br />
x,y=2,2<br />
[/or]<br />
[or]<br />
x,y=3,3<br />
[/or]<br />
[or]<br />
x,y=4,4<br />
[/or]<br />
[or]<br />
x,y=5,5<br />
[/or]<br />
[or]<br />
x,y=6,6<br />
[/or]<br />
[/filter]<br />
<br />
{SPAWN_ZOMBIES $unit.x $unit.y 2}<br />
[/event]<br />
<br />
Looks pretty innocent, right? But imagine that there are more villages. Or better yet, imagine you want to increase the amount of zombies, you'll have to copy/paste even more, and it's easy to make a mistake while doing it. <br />
<br />
====More efficient example====<br />
<br />
#first, let's define our custom event:<br />
[event]<br />
name=spawn_zombies<br />
first_time_only=no<br />
#it's easy to forget, but you have to set first_time_only in custom events too<br />
{VARIABLE i 0}<br />
[while]<br />
[variable]<br />
name=i<br />
less_than_equal_to=5<br />
#repeating the loop 5 times for 5 zombies, note how easy it is now to change the amount of zombies you want to spawn!<br />
[/variable]<br />
[do]<br />
[unit]<br />
side=2<br />
type=Walking Corpse<br />
x,y=$unit.x,$unit.y<br />
#unit variable is passed to this event from the parent event. <br />
placement=map_passable<br />
[unit]<br />
{VARIABLE_OP i add 1}<br />
[/do]<br />
[/while]<br />
{CLEAR_VARIABLE i}<br />
[/event]<br />
<br />
[event]<br />
name=moveto<br />
[filter]<br />
side=1<br />
x,y=1,1<br />
[or]<br />
x,y=2,2<br />
[/or]<br />
[or]<br />
x,y=3,3<br />
[/or]<br />
[or]<br />
x,y=4,4<br />
[/or]<br />
[or]<br />
x,y=5,5<br />
[/or]<br />
[or]<br />
x,y=6,6<br />
[/or]<br />
[/filter]<br />
<br />
[fire_event]<br />
name=spawn_zombies<br />
[/fire_event]<br />
[/event]<br />
<br />
===Fired events vs macros===<br />
<br />
But if ''fire events'' are so cool and efficient, what is the advantage of using ''macros''? Good question. As you can see, custom events have one issue: ''it's harder to set dynamic variables in fired events''. When defining macros, you specify arguments and those arguments are declared ''whenever we're using that macro'' and can be changed in any way you, and more importantly, someone else wants. Remember, that you might want to start a bigger project and invite someone to help you with the code. '''Macros are obvious and transparent in usage''' - when reading a macro definition you always know what is the changing variable and what is a constant. In custom events, it is not so obvious.<br />
<br />
Let's take a look at one of the default macros included with wesnoth:<br />
<br />
#define ABILITY_REGENERATES<br />
# Canned definition of the Regenerate ability to be included in an [abilities]<br />
# clause.<br />
[regenerate]<br />
value=8<br />
id=regenerates<br />
name= _ "regenerates"<br />
female_name= _ "female^regenerates"<br />
description= _ "Regenerates:<br />
The unit will heal itself 8 HP per turn. If it is poisoned, it will remove the poison instead of healing."<br />
affect_self=yes<br />
poison=cured<br />
[/regenerate]<br />
#enddef<br />
<br />
This is a good macro, because replacing it by a custom event would be complicated and messy and it wouldn't save a lot of code, anyway. Another example is<br />
<br />
#define GENERIC_UNIT SIDE TYPE X Y<br />
# Creates a generic unit of TYPE belonging to SIDE at X,Y, which has a<br />
# random name, gender and traits (just like a recruited unit).<br />
[unit]<br />
side={SIDE}<br />
type={TYPE}<br />
x={X}<br />
y={Y}<br />
generate_name=yes<br />
random_traits=yes<br />
random_gender=yes<br />
upkeep=full<br />
[/unit]<br />
#enddef<br />
<br />
This time, making a custom event would be fairly easy, but it would be much less transparent in usage. The code {GENERIC_UNIT 1 Spearman 12 3} is self-explanatory, simple and versatile.<br />
<br />
<br />
==Do not treat macroses as functions==<br />
Main advantage of macroses is that they allow you to reuse your code with less effort. But you need to take into account how ''exactly'' they are used by Wesnoth. Look at the example<br />
<br />
#define CREATE_REINFORCMENT SIDE <br />
{VARIABLE temp_side {SIDE}}<br />
[variable]<br />
name = temp_side<br />
value = 1<br />
[/variable]<br />
[if]<br />
{VARIABLE_CONDITIONAL temp_side equals 1}<br />
[then]<br />
{GENERIC_UNIT 1 "Walking Corpse" 12 3}<br />
[/then]<br />
[/if]<br />
[if]<br />
{VARIABLE_CONDITIONAL temp_side equals 2}<br />
[then]<br />
{GENERIC_UNIT 2 "Spearman" 3 16}<br />
[/then]<br />
[/if]<br />
{CLEAR_VARIABLE temp_side}<br />
#enddef<br />
[event]<br />
name=turn 10<br />
{CREATE_REINFORCMENT 1}<br />
{CREATE_REINFORCMENT 2}<br />
[/event]<br />
<br />
In this example I wanted to create additional units for each side at turn 10. Side 1 is undeads and side 2 is loyalists. Everything looks good, but there is a mistake. When Wesnoth loads scenario, all macroses are substituted with their meaning. This example becomes:<br />
<br />
[event]<br />
name="turn 10"<br />
[set_variable]<br />
name="temp_side"<br />
value=1<br />
[/set_variable]<br />
[if]<br />
[variable]<br />
equals=1<br />
name="temp_side"<br />
[/variable]<br />
[then]<br />
[unit]<br />
generate_name=yes<br />
random_gender=yes<br />
random_traits=yes<br />
side=1<br />
type="Walking Corpse"<br />
upkeep="full"<br />
x=12<br />
y=3<br />
[/unit]<br />
[/then]<br />
[/if]<br />
[if]<br />
[variable]<br />
equals=2<br />
name="temp_side"<br />
[/variable]<br />
[then]<br />
# PART 1 BEGINS<br />
[unit]<br />
generate_name=yes<br />
random_gender=yes<br />
random_traits=yes<br />
side=2<br />
type="Spearman"<br />
upkeep="full"<br />
x=3<br />
y=16<br />
[/unit]<br />
# PART 1 ENDS<br />
[/then]<br />
[/if]<br />
[clear_variable]<br />
name="temp_side"<br />
[/clear_variable]<br />
[set_variable]<br />
name="temp_side"<br />
value=2<br />
[/set_variable]<br />
[if]<br />
[variable]<br />
equals=1<br />
name="temp_side"<br />
[/variable]<br />
[then]<br />
# PART 2 BEGINS<br />
[unit]<br />
generate_name=yes<br />
random_gender=yes<br />
random_traits=yes<br />
side=1<br />
type="Walking Corpse"<br />
upkeep="full"<br />
x=12<br />
y=3<br />
[/unit]<br />
# PART 2 ENDS<br />
[/then]<br />
[/if]<br />
[if]<br />
[variable]<br />
equals=2<br />
name="temp_side"<br />
[/variable]<br />
[then]<br />
[unit]<br />
generate_name=yes<br />
random_gender=yes<br />
random_traits=yes<br />
side=2<br />
type="Spearman"<br />
upkeep="full"<br />
x=3<br />
y=16<br />
[/unit]<br />
[/then]<br />
[/if]<br />
[clear_variable]<br />
name="temp_side"<br />
[/clear_variable]<br />
[/event]<br />
<br />
Obviously part 1 and part 2 will never happen. It makes conditional check useless while you code becomes more complex. This is very common mistake even in advanced scenarios and add-ons. To avoid this problem, you need to follow the rule: '''Do not make conditional actions based on values of arguments'''. If you need to do this, then you need to think over situation again. In our example it might be:<br />
<br />
[event]<br />
name=turn 10<br />
{GENERIC_UNIT 1 "Walking Corpse" 12 3}<br />
{GENERIC_UNIT 2 "Spearman" 3 16}<br />
[/event]<br />
<br />
<br />
==Analogies to "real" programming==<br />
<br />
Now that you know how to use macros and custom events to optimise your code, let's take a moment to think how you could use your knowledge outside Wesnoth. You've probably heard about c++, python, lua or any other programming language. Just like them, WML has some common features but under slightly different names. For example, instead of making custom ''events'', you're making custom ''functions'' and ''procedures'' that can be used further in your code in a very similar way. That's why understanding optimisation is so important - it'll help you understand real programming problems, and develop good habits!<br />
<br />
==Further reading==<br />
<br />
*[http://wiki.wesnoth.org/Advanced_Optimisations_and_Hacks More complex optimisations] - read this only if you believe you know everything!<br />
*[http://www.wesnoth.org/macro-reference.xhtml Macro reference]<br />
*[[LuaWML]]<br />
*[[ConventionsWML]]<br />
<br />
[[Category:WML_Tips]]</div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=EraWML&diff=55661EraWML2014-10-11T17:28:59Z<p>Xudojnik: Added a note that "leader" must be present.</p>
<hr />
<div>{{WML Tags}}<br />
== The [era] top level tag ==<br />
<br />
This tag describes one era. An era is a set of teams to play in multiplayer.<br />
<br />
In the multiplayer game creation screen, an era is chosen by the host by the 'Era' option button.<br />
<br />
The following key/tags are recognized for '''[era]'''<br />
* '''id''': ID of the era - must be unique. No gameplay effect<br />
* '''name''': displayed name of the era.<br />
* '''description''': {{DevFeature1.11}} a short description of the era.<br />
* <span id="require_era">'''require_era'''</span>: whether clients are required to have this era installed beforehand to be allowed join a game using this era. Possible values 'yes' (the default) and 'no'.<br />
* '''allow_scenario''': {{DevFeature1.11}} a list of scenario ids. Only the scenarios with matching ids will be allowed to be played with this era.<br />
* '''disallow_scenario''': {{DevFeature1.11}} a list of scenario ids. Only the scenarios with matching ids will not be allowed to be played with this era. Cannot be used in parallel with allow_scenario.<br />
* '''ignore_incompatible_scenario''': {{DevFeature1.11}} a list of scenario ids. The scenarios with matching ids will be considered compatible with this era regardless their dependencies.<br />
* '''allow_modification''': {{DevFeature1.11}} same as allow_scenario, but for modifications.<br />
* '''disallow_modification''': {{DevFeature1.11}} same as disallow_scenario, but for modifications. Cannot be used in parallel with allow_modification.<br />
* '''ignore_incompatible_modification''': {{DevFeature1.11}} same as ignore_incompatible_scenario, but for modifications.<br />
* '''force_modification''': {{DevFeature1.11}} a list of modification ids. The specified modifications must be enabled to play this era.<br />
* '''[multiplayer_side]''': a faction in the era. This tag contains many of the same keys as a [side] tag (A description of the [side] tag can be found in [[SideWML]]). When a multiplayer game is played, then the [side] tag for the scenario is merged with the keys(currently, not tags) of the [multiplayer_side] tag of the faction which the side chose.<br />
** '''id''': faction ID - must be unique to your era. No gameplay effect<br />
** '''name''': a description that Wesnoth displays as the option selecting that faction; see [[DescriptionWML]]. Any image in this description will ''not'' use the team color.<br />
** '''image''': an image to display in the option. This image will use the team color.<br />
** '''flag_rgb''': often set by [http://www.wesnoth.org/macro-reference.xhtml#MAGENTA_IS_THE_TEAM_COLOR MAGENTA_IS_THE_TEAM_COLOR]<br />
** '''leader''': a list of unit types. Must be present. When this faction is chosen, the side can choose any of these unit types to be the side's leader (i.e. "Choose your Leader"). They will also have the option of having one of these types being chosen randomly.<br />
** '''random_leader''': if this list of types is present, it would use this list to instead to choose a random leader. If not it would use '''leader'''<br />
** '''random_faction''': default 'no'. If 'yes', then when this faction is chosen, another non random faction will be randomly chosen instead. The leader will also be chosen randomly.<br />
** '''choices''': Empty by default. If non-empty and the faction has '''random_faction=yes''', it is the list of the IDs of the non random factions that will be choosen randomly. If empty, any faction can be chosen.<br />
** '''except''': Empty by default. If the faction has random_faction=yes, it is the list of the IDs of the non random factions that will not be choosen randomly.<br />
** '''type''': the unit type of the default leader for the side. This must be present. 'random' is a valid value here and will cause a random leader choice by default.<br />
** '''recruit''': a comma-separated list of unit types this faction can recruit.<br />
** '''terrain_liked''': an unseparated list of terrains (see [[TerrainCodesWML]]). On random maps, these terrains will determine which keep the side is assigned, attempting to put it near the listed terrains.<br />
* '''[event]''': any [event]s written inside the [era] tag will get included into scenarios that are played using this era. See [[EventWML]].<br />
* '''[options]''': {{DevFeature1.11}} custom options. See [[OptionWML]] for details.<br />
* '''[ai]''': See [[AiWML]] for details.<br />
<br />
== See Also ==<br />
<br />
* [[ReferenceWML]]<br />
* [[SideWML]]<br />
<br />
<br />
[[Category: WML Reference]]</div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=UnitTypeWML&diff=55657UnitTypeWML2014-10-11T16:03:32Z<p>Xudojnik: Added list of mainline races to "race" key</p>
<hr />
<div>{{WML Tags}}<br />
<br />
__TOC__<br />
<br />
Each '''[unit_type]''' tag defines one unit type. (for the use of [unit] to create a unit, see [[SingleUnitWML]])<br />
<br />
Unit animation syntax is described in [[AnimationWML]]. In addition to the animation tags described there, the following key/tags are recognized:<br />
* '''[advancefrom]''': Defines the previous unit type on the advancement tree. Allows a campaign-specific unit to be spliced into an already existing advancement tree. It should generally be used only inside a campaign ifdef, to prevent changes to other campaigns. This tag makes changes to the ''advances_to'' and ''experience'' keys of a base unit to make it advance into this unit. It takes these keys:<br />
** ''unit'': the id of the base unit from which this unit advances. This adds the unit into the list of units which ''unit'' can advance into.<br />
** ''experience'': (optional) If present the experience needed to advance is set to this value. If there are more than one [advancefrom] tags referencing the same base unit within the same preprocessor scope (e.g. a campaign #ifdef) with experience= keys, the lowest value of these is chosen. Note: this will also lower the experience required to advance to other units which the base unit can advance into.<br />
: If the previous unit type makes use of '''[male]''' and/or '''[female]''' tags, then the current (new) unit type is expected to also. That is, the subtypes defined by those tags will only receive this advancement if the new type has a corresponding tag.<br />
* '''advances_to''': When this unit has ''experience'' greater than or equal to ''experience'', it is replaced by a unit of the type that the value of ''advances_to'' refers to. All modifications that have been done to the unit are applied to the unit it is replaced by. The special value 'null' says that the unit does not advance but gets an AMLA instead. Can be a comma-separated list of units that can be chosen from upon advancing.<br />
* '''alignment''': one of lawful/neutral/chaotic/liminal (See [[TimeWML]]). Default is "neutral".<br />
* '''attacks''': the number of times that this unit can attack each turn.<br />
* '''cost''': when a player recruits a unit of this type, the player loses ''cost'' gold. If this would cause gold to drop below 0, the unit cannot be recruited.<br />
* '''recall_cost''': {{DevFeature1.13|0}} the default recall cost of units of this type, overriding the recall cost set in scenario [[SideWML|[side]]] tags or the global [[GameConfigWML|[game_config]]] value. Individual units may override this value in [[SingleUnitWML|[unit]]]. A value of -1 is equivalent to not specifying this attribute.<br />
* '''description''': (translatable) the text displayed in the unit descriptor box for this unit. Default 'No description available...'. <br />
* '''do_not_list''': Not used by the game, but by tools for browsing and listing the unit tree. If this is 'yes', the unit will be ignored by these tools. <br />
* '''ellipse''': the ellipse image to display under the unit, which is normally team-colored. Default is the normal ellipse; "misc/ellipse-nozoc" is a dashed ellipse that should be used for units without zone of control. {{DevFeature1.11}} Default is "misc/ellipse"; "-nozoc" and "-leader" are automatically appended for units without zone of control and with canrecruit=yes respectively. The [http://www.wesnoth.org/macro-reference.xhtml#IS_HERO IS_HERO]/[http://www.wesnoth.org/macro-reference.xhtml#MAKE_HERO MAKE_HERO]/[http://www.wesnoth.org/macro-reference.xhtml#UNMAKE_HERO UNMAKE_HERO] macros change the ellipse to/back from "misc/ellipse-hero".<br />
* '''experience''': When this unit has experience greater than or equal to ''experience'', it is replaced by a unit with 0 experience of the type that the value of ''advances_to'' refers to. All modifications that have been done to the unit are applied to the unit it is replaced by.<br />
* '''flag_rgb''': usually set by [http://www.wesnoth.org/macro-reference.xhtml#MAGENTA_IS_THE_TEAM_COLOR MAGENTA_IS_THE_TEAM_COLOR]; specifies the colours in the base flag to use for team-colouring the unit, expressed as a colour name (such as magenta) or a comma-separated list of RGB values (in hex format).<br />
* '''gender''': has a value of either ''male'' or ''female'', and determines which of the keys ''male_names'' and ''female_names'' should be read. When a unit of this type is recruited, it will be randomly assigned a name by the random name generator, which will use these names as a base.<br />
* '''hide_help''': determines if the unit type will appear in the in-game help. Possible values ''true'' and ''false'', defaults to ''false''.<br />
* '''hitpoints''': the maximum HP that the unit has, and the HP it has when it is created.<br />
* '''id''': the value of the ''type'' key for units of this type. This is required and must be unique among all [unit_type] tags. An ''id'' should consist only of alphanumerics and spaces (or underscores). ''type'' keys are found in [[SingleUnitWML]] and [[FilterWML]]. For example, id=Drake Flare<br />
::WARNING : characters "$", "&", "*", "-", "(" and ")" are illegal for use in the unit type id and must be avoided because they might lead to corrupted saved games<br />
*'''ignore_race_traits''': 'yes' or 'no' (default). Determines whether racial traits (see [[UnitsWML]]) are applied. <br />
* '''image''': sets the base image of the unit, which is used on the map.<br />
* '''image_icon''': sets the image used to represent the unit in areas such as the attack dialog and the unit image box in the sidebar<br />
* '''level''': the amount of upkeep the unit costs. After this unit fights, its opponent gains ''level'' experience. See also kill_experience ([[GameConfigWML]]), and leadership ([[AbilitiesWML]]).<br />
* '''movement''': the number of move points that this unit receives each turn.<br />
* '''movement_type''': See [[UnitsWML#.5Bmovetype.5D|movetype]]. Note that the tags '''[movement_costs]''', '''[vision_costs]''', '''[defense]''', and '''[resistance]''' can be used to modify this movetype.<br />
* '''name''':(translatable) displayed in the Status Table for units of this type.<br />
* '''num_traits''': the number of traits that units of this type should receive when they are recruited, overriding the value set in the [race] tag.<br />
* '''profile''': the portrait image to use for this unit type. You can also set a portrait for an individual unit instead of the whole unit type (see [[SingleUnitWML]]). The engine first looks for the image in the transparent subdirectory and if found that image is used. If not found it will use the image as-is. Depending on the size the engine will or will not scale the image, the cutoff currently is at 300x300. For images which should only be shown on the right side in the dialog append ~RIGHT() to the image.<br />
* '''small_profile''': the image to use when a smaller portrait is needed than the one used for messages (e.g., in the help system). When this attribute is missing, the value of the '''profile''' attribute is used instead. When present, the heuristic for finding a transparent portrait is disabled for the '''profile''' attribute, so the correct '''profile''' should be set too. Note that image modifiers are allowed; they might be useful for cropping and rescaling a portrait:<br />
small_profile="portraits/elves/transparent/marksman+female.png~CROP(0,20,380,380)~SCALE(205,205)"<br />
profile="portraits/elves/transparent/marksman+female.png"<br />
* '''race''': See {{tag|UnitsWML|race}}. Also used in standard unit filter (see [[FilterWML]]). Mainline Wesnoth features following values: bats, drake, dwarf, elf, falcon, goblin, gryphon, human, khalifate, lizard, mechanical, merman, monster, naga, ogre, orc, troll, undead, wolf, wose. They are defined in /data/core/units.cfg.<br />
* '''undead_variation''': When a unit of this type is killed by a weapon with the plague special, this variation is applied to the new plague unit that is created, whatever its type. For example, if the plague special creates Walking Corpses and undead_variation is set to "troll", you'll get a troll Walking Corpse. Defaults to the undead_variation set in this unit type's race.<br />
* '''usage''': the way that the AI should recruit this unit, as determined by the scenario designer. (See ''recruitment_pattern'', [[AiWML]]). The following are conventions on usage:<br> ** ''scout'': Fast, mobile unit meant for exploration and village grabbing.<br> ** ''fighter'': Melee fighter, melee attack substantially more powerful than ranged.<br> ** ''archer'': Ranged fighter, ranged attack substantially more powerful than melee.<br> ** ''mixed fighter'': Melee and ranged fighter, melee and ranged attacks roughly equal.<br> ** ''healer'': Specialty 'heals' or 'cures'.<br>Note that this field primarily affects recruitment. It also has a small effect on unit movement (the AI tries to keep scouts away from enemies, to some extent). It does not affect the AI's behavior in combat; that is always computed from attack power and hitpoints. Non-standard usages may be used as well.<br />
* '''vision''': the number of vision points to calculate the unit's sight range. Defaults to ''movement'' if not present.{{DevFeature1.11}}<br />
* '''zoc''': if "yes" the unit will have a zone of control regardless of level. If present but set to anything other than "yes," the unit will have no zone of control. If the tag is omitted, zone of control is dictated by unit level (level 0 = no zoc, level 1+ = has zoc).<br />
* '''die_sound''': sets the sound, which is used when the unit dies.<br />
* '''healed_sound''': {{DevFeature1.11}} sets the sound used when the unit is healed in any way (default: heal.wav).<br />
<br />
== After max level advancement (AMLA) ==<br />
* '''[advancement]''': describes what happens to a unit when it reaches the XP required for advancement. It is considered as an advancement in the same way as advancement described by '''advances_to'''; however, if the player chooses this advancement, the unit will have one or more effects applied to it instead of advancing.<br />
** '''id''': unique identifier for this advancement; ''Required'' if there are multiple advancement options, or if ''strict_amla=no''.<br />
** '''always_display''': if set to true displays the AMLA option even if it is the only available one.<br />
** '''description''': a description (see [[DescriptionWML]]) displayed as the option for this advancement if there is another advancement option that the player must choose from; otherwise, the advancement is chosen automatically and this key is irrelevant.<br />
** '''image''': an image to display next to the description in the advancement menu.<br />
** '''max_times''': default 1. The maximum times the unit can be awarded this advancement. Pass -1 for "unlimited".<br />
** '''strict_amla''': (yes|no) default=no. Disable the AMLA if the unit can advance to another unit.<br />
** '''require_amla''': An optional list of AMLA ''id'' keys that act as prerequisites for this advancement to become available. Order is not important, and an AMLA id can be repeated any number of times to indicate that another advancement must be chosen several times before this advancement option will become available.<br />
*** example: <tt>require_amla=tough,tough,incr_damage</tt> assumes there exist other [advancement] options called ''id=tough'' and ''id=incr_damage''. Once ''tough'' is chosen twice and ''incr_damage'' is chosen once, then the current [advancement] will become available.<br />
*** ''require_amla=tough,incr_damage,tough'' is an equivalent way of expressing this.<br />
** '''[effect]''': A modification applied to the unit whenever this advancement is chosen. See [[EffectWML]]<br />
<br />
== Attacks ==<br />
* '''[attack]''': one of the unit's attacks.<br />
** '''description''': a translatable text for name of the attack, to be displayed to the user.<br />
** '''name''': the name of the attack. Used as a default description, if ''description'' is not present, and to determine the default icon, if ''icon'' is not present (if ''name=x'' then ''icon=attacks/x.png'' is assumed unless present). Non-translatable. Used for the ''has_weapon'' key and animation filters; see [[StandardUnitFilter]] and [[AnimationWML]]<br />
** '''type''': the damage type of the attack. Used in determining resistance to this attack (see {{tag|UnitsWML|movetype|resistance}}).<br />
** '''[specials]''': contains the specials of the attack. See [[AbilitiesWML#The_.5Bspecials.5D_tag|AbilitiesWML]].<br />
** '''icon''': the image to use as an icon for the attack in the attack choice menu, as a path relative to the images directory.<br />
** '''range''': the range of the attack. Used to determine the enemy's retaliation, which will be of the same type. Also displayed on the status table in parentheses; 'melee'(default) displays "melee", while 'ranged' displays "ranged". Range can be anything. Standard values are now "melee" and "ranged". From now on, ''short'' and ''long'' will be treated as totally different ranges. You can create any number of ranges now (with any name), and units can only retaliate against attacks for which they have a corresponding attack of the same range. This value is translatable.<br />
** '''damage''': the damage of this attack<br />
** '''number''': the number of strikes per attack this weapon has<br />
** '''movement_used''': determines how many movement points using this attack expends. By default all movement is used up, set this to 0 to make attacking with this attack expend no movement.<br />
** '''attack_weight''': helps the AI to choose which attack to use when attacking; highly weighted attacks are more likely to be used. Setting it to 0 disables the attack on attack<br />
** '''defense_weight''': used to determine which attack is used for retaliation. This affects gameplay, as the player is not allowed to determine his unit's retaliation weapon. Setting it to 0 disable the attacks on defense <br />
For the weight settings, the engine usually chooses the attack with the best average total damages * weight (default weight = 1.0).<br />
<br />
== Other tags ==<br />
* '''[base_unit]''': Contains one attribute, '''id''', which must be the ID of a unit type. If specified, the UnitTypeWML for that unit is copied into this one. Attributes in this unit overwrite the copy. Tags modify the corresponding tag of the original, so for example the first '''[attack]''' tag in the derived unit would modify the first attack of the base unit rather than defining a new attack.<br />
<br />
* '''[portrait]''': Describes a unit portrait for dialogue. However, generally you should use the profile key instead; [portrait] is mostly for internal use.<br />
** '''size''': The size of the portrait, in pixels.<br />
** '''side''': One of left or right.<br />
** '''mirror''': Whether to flip the image horizontally.<br />
** '''image''': The image path.<br />
<br />
* '''[abilities]''': Defines the abilities of a unit. See [[AbilitiesWML]]<br />
<br />
* '''[event]''': Any [event] written inside the [unit_type] tag will get included into any scenario where a unit of this type appears in. Note that such events get included when a unit of this type first appears in the scenario, not automatically when the scenario begins (meaning that ''name=prestart'' events, for example, would usually never trigger). See [[EventWML]] and [[WML_Abilities]]<br />
<br />
* '''[variation]''': Defines a variation of a unit. Variations are invoked with an [effect] tag or the variation= attribute in [[SingleUnitWML]]. They are currently used for graphical variations (giving character sprites new weapons) but theoretically you could do anything with it.<br />
** {{DevFeature1.11}} '''variation_id''': The id of this variation. Defaults to ''variation_name''.<br />
** '''variation_name''': The name of the variation. Since {{DevFeature1.11}} is this attribute translatable.<br />
** '''inherit''': if ''yes'', inherits all the properties of the base unit, which are then overwritten by the keys and tags of this variation. Defaults to no.<br />
*** {{DevFeature1.11}} The '''id''' key is always inherited, regardless of the value of '''inherit'''.<br />
** All keys and tags of '''[unit_type]''', except ''[advancefrom]'', ''[base_unit]'', ''[female]'', ''[male]'', and ''[variation]''. A special case is the '''id''' key, for which support is incomplete. If '''id''' is set for a variation, then it applies when filtering existing units (including the breakdown of units in the "damage versus" tooltip), but it cannot be used to create a new unit. For reliable behavior, '''id''' should match the parent type's id. {{DevFeature1.11}} Changing the id for a variation is fully supported starting in 1.11.2.<br />
<br />
* '''[male]''', '''[female]''': These can specify a variation based on gender for a unit. If these are provided, they will automatically apply based upon the gender of a unit.<br />
** '''inherit''': if ''yes'', inherits all the properties of the base unit. Defaults to yes.<br />
*** {{DevFeature1.11}} The '''id''' key is always inherited, regardless of the value of '''inherit'''.<br />
** All '''[unit_type]''' tags and keys, excluding ''[advancefrom]'', ''[base_unit]'', ''[female]'', and ''[male]''. A special case is the '''id''' key, for which support is incomplete. If '''id''' is set for a variation, then it applies when filtering existing units (including the breakdown of units in the "damage versus" tooltip), but it cannot be used to create a new unit. For reliable behavior, '''id''' should match the parent type's id. {{DevFeature1.11}} Changing the id for a variation is fully supported starting in 1.11.2.<br />
<br />
== See Also ==<br />
<br />
* [[AnimationWML]]<br />
* [[ReferenceWML]]<br />
* [[TerrainWML]]<br />
<br />
[[Category: WML Reference]]</div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=ReferenceWML&diff=48007ReferenceWML2012-12-03T04:00:36Z<p>Xudojnik: /* Predefined macros */</p>
<hr />
<div>{{WML Tags}}<br />
== The Wesnoth Markup Language ==<br />
<br />
The Wesnoth Markup Language (WML) is used to code almost everything in Wesnoth, including scenarios, units, savefiles, and the user interface layout. WML files are simple, human-readable text files, usually with the .cfg extension, with similarities to INI files and XML. A major feature in WML are macros, which are alike those found in the C language and similarily are handled by a preprocessor. Implementation-wise, WML files are handled mainly by the ''config'' class (and ''simple_wml'' in [[wesnothd]]).<br />
<br />
This page is a collection of pointers to different common WML structures. See [[AlphabeticalWML]] for a quick listing of all WML tags. The more comprehensive [[BuildingScenariosIndex]] lists tags and keys.<br />
<br />
See [[BuildingScenarios]], [[BuildingCampaigns]] and [[BuildingUnits]]<br />
for a tutorial style overview.<br />
<br />
<br />
<br />
''Note: this reference may contain slight inaccuracies, might not list all existing keys and tags or might contain some deprecated syntax. If you find that this reference doesn't give you the answer to how to implement some feature in WML, the most reliable way is to look at the WML code of existing units and campaigns that have done so.''<br />
<br />
== How WML works ==<br />
<br />
* [[SyntaxWML]] the syntactical definition of WML, and how to use variables<br />
* [[PreprocessorRef]] the WML preprocessor syntax<br />
<br />
== WML toplevel tags ==<br />
<br />
* [[GameConfigWML]] the top level '''[game_config]''' tag<br />
* [[UnitsWML]] the top level '''[units]''' tag<br />
** [[UnitTypeWML]] how to describe a unit type<br />
** [[AnimationWML]] how to animate units<br />
* [[CampaignWML]] the top level '''[campaign]''' tag<br />
* [[ScenarioWML]] the top level tags '''[scenario]''', '''[multiplayer]''', '''[test]''', and '''[tutorial]'''<br />
** [[EventWML]] how to describe an event<br />
** [[SideWML]] how to describe a side<br />
** [[MapGeneratorWML]] the random map generator<br />
** [[TimeWML]] how to describe a day<br />
** [[IntroWML]] how to describe the intro screen<br />
* [[SavefileWML]] a description of the format of savegames<br />
** [[ReplayWML]] a description of the format of player actions such as moving a unit<br />
** [[StatisticalScenarioWML]] used to generate statistics of a savegame<br />
* [[PblWML]] a description of the format of server-uploadable campaigns<br />
* [[EraWML]] the top level '''[era]''' tag<br />
* [[TerrainWML]] the top level '''[terrain_type]''' tag<br />
* [[TerrainGraphicsWML]], the top level '''[terrain_graphics]''' tag<br />
* [[ThemeWML]] the top level '''[theme]''' tag<br />
* [[LanguageWML]] the top level '''[language]''' tag<br />
* [[LocaleWML]] the top level '''[locale]''' tag<br />
* [[HelpWML]] the top level '''[help]''' tag<br />
* [[BinaryPathWML]] the top level '''[binary_path]''' tag<br />
* [[FontsWML]] the top level '''[fonts]''' tag<br />
<br />
== Other WML tags ==<br />
<br />
* [[EventWML]] how to describe an event<br />
** [[FilterWML]] the construct to filter on units, locations, and weapons<br />
** [[ActionWML]] to describe the actions which occur when the event is fired<br />
*** [[ConditionalActionsWML]] actions that encapsulate conditional filters and the actions to execute if the conditions are met<br />
*** [[DirectActionsWML]] actions that directly affect gameplay: for example creating a unit<br />
**** [[SingleUnitWML]] how to describe a unit<br />
*** [[InternalActionsWML]] actions that WML uses internally: for example storing a variable<br />
*** [[InterfaceActionsWML]] actions that do not affect gameplay: for example displaying a message<br />
*** [[LuaWML]] how to code actions with the Lua language<br />
* [[AiWML]] how to describe parameters for AI<br />
* [[EffectWML]] the construct to modify a unit<br />
* [[AbilitiesWML]] a list of the different abilities a unit or weapon can have<br />
* [[DescriptionWML]] the structure of WML coded menus like the difficulty chooser of campaigns<br />
* [[EditorWML]] tags controlling the post-1.4 editor's behavior<br />
<br />
== Predefined macros == <br />
<br />
Wesnoth ships with a library of predefined macros you should find useful in writing your own WML.<br />
* [http://www.wesnoth.org/macro-reference.html WML Macroses] - description of all such macros.<br />
<br />
== Other ==<br />
<br />
* [[ReferenceWMLSyntax]] how this wiki and the pages it links to should be formatted<br />
* [[ConventionsWML]] how to make your WML more readable<br />
* [[UsefulWMLFragments]] Various pieces of WML for various purposes. If you have some WML you're proud of that you think others can use, add it here.<br />
* [[Maintenance tools]] for wmlindent, wmllint, wmlscope<br />
* [[CommandMode]] commands are not strictly speaking part of WML, these could be a little hard to find so there's a link here.<br />
* [[MultiplayerServerWML]] is used when communicating with the multiplayer server.<br />
* [[CampaignServerWML]] is used when managing contributed campaigns on the campaign server.<br />
* [[ImagePathFunctionWML]] is used when applying the team-color function to images.<br />
* [[BinaryWML]] how WML is sent over the network<br />
<br />
== See Also ==<br />
<br />
* [[BuildingMaps]] the text-based format for Wesnoth maps<br />
* [[TerrainCodesWML]] a list of all terrains<br />
* [[MultiHexTutorial]] a description of the multi-hex tiling system<br />
* [[IGNFileFormat]] a description of the ignore file format<br />
<br />
<br />
[[Category: WML Reference]]</div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=User:Xudojnik&diff=47910User:Xudojnik2012-11-20T14:17:02Z<p>Xudojnik: </p>
<hr />
<div>{{WML Tags}}<br />
I know Wesnoth from version 1.1.2a. This is really perspective game not only as strategy, but as RPG too. Large world, filled by history, epic battles, heroes and factions, is perfect for creating RPG. It's not so hard because Wesnoth have simple language, what support wide variety of events, easy way to define dialogs, items, forum and Wiki, where always can be found answer for any question.<br />
<br />
===WesMMO===<br />
To play it (now only in theory):<br />
#*Download WesMMO era.<br />
#*Download any map, designed for WesMMO.<br />
#*Create game in lobby.<br />
#*WesMMO era will automatically use your account.<br />
#*Now choose any three units from your account or create new and play.<br />
#*Persistent data will be stored at the end of each turn<br />
<br />
Character is a "team" of three units. Each unit have own stats and small inventory<br />
;Stats:<br />
:Stamina - increases your hitpoints. ''Each point of stamina should increase survivalalibity of unit for an average amount of damage, given by 1 strength or agility, multiplied by 6.<br />
:Strength - increases your melee damage and armor contribution from items.<br />
:Speed - increases your movement points.<br />
:Agility - increase your ranged damage and defense on each type of terrain.<br />
::100 * A / (A + 30) 60% Defence at 45 agility<br />
::100 * A / (A + 20) 60% Defence at 30 agility<br />
::100 * A / (A + 10) 60% Defence at 15 agility<br />
:Intellect - increase magical potence of unit in some ways<br />
<br />
;Inventory:<br />
:Melee Weapon - affects melee combat: multiplies damage from strength and number of strikes.<br />
:Ranged Weapon - affects ranged combat: multiplies damage from agility and number of strikes.<br />
:Amulet - affects base stats, magical resistances and magical potency of unit<br />
:Body Armor - affects base stats, all resistances and defenses.<br />
:Boots - affects base stats and multiplies speed of unit.<br />
:Helm - affects melee resistances and magical potence of unit.<br />
<br />
Each item have it's own stats.<br />
<br />
;Spell system:<br />
:Each class have some predefined spells. ''In most cases they are not simple "damage unit X for Y hp". That's why they are the greatest headache for me.''<br />
:Each unit can use it's spell once per turn.<br />
:There are no limit of uses through whole scenario.<br />
<br />
Each item has it own's id. This ID is the key to macro what will apply effect of item stats to unit structure. Data about it will be stored inside WesMMO era. That allows me to implement 'inventory slots'. Players will carry unused items in them.<br />
<br />
<br />
<br />
Ideas:<br />
#situation: players A,B,C,D starts the game. player B leaves game before it ends. spectator E (player A) takes control of units B. players A,E,C,D ends the game and information about their units is stored to persistent. player E gets units of player B.<br />
#suggestion: Best items should kill much time before player get them, but players should get something each time they play this game. Ways to reach this objective:<br />
#*1) Add "random stats" to items. Then item drops, RNG choose stats on them between predefined sets. 1/4 of randem stat set (RaSS) should be awesome and 1/4 should be real crap.<br />
#*2) Add "crafted items". Players should collect some resourses and get to place where they can craft this item.<br />
#Itemisation(1). WesMMO will be published by patches. In each patch I will add some new items and functions to players. Items added in new patch should be better than items added in previous patch. But difference should not be enormous.<br />
#levelling(1). I would not change standart mechanic of XP colection of BfW. Each player have 3 unit, what allows them to prapare and perform last-hit for any unit. Levelling shouldn't make items of this patch worster.<br />
#Levelling(2). Data, stored in unit.class[], should contain multipliers of stats. Later this will be used to recalculate stats of unit.<br />
#Itemisation(2). There are three items: A(require 1-3 of X), B(require 2-5 of X), C(require 4-8 of X). While player have 3 X, he can't share A and B to others if he get them and can not use C. But when he collect 4 X, he can share A, can't share B and can use C.<br />
#Crafted items++. If craft of new items will require resourses from old patch, old maps will become outdated only if I will want this.<br />
#Itemisation(3). Items should have requirments by level.<br />
#Levelling(3). There should be a level cap in each patch.<br />
#Itemisation(4). Items can have no requirements by level, but stats on item can be influensed by level.<br />
#Itemisation(5). Add "mantle". It will have +int, +stam and magical resistances. Body no longer affect magical resistences and stam.<br />
#Development(1). Add various "count" functions to collect statistical data about each option in dialogs. This data should be stored in special namespace. Then this will be done, I should add to feedback thread request to put file with this data to the forum.<br />
#UI(1). Frankensteining. Each equipped item will have it's own overlay on unit. During the fights overlays aren't shown. Thats why I should create attack and defend animations what will look like cloud with "Ouch" messages jumped out of it.<br />
#UI(2). Fast backpack browser<br />
+-----------------------------+<br />
| Backpack browser<br />
| +-------------------------+ |<br />
| | Back<br />
| +-------------------------+ |<br />
| +-------------------------+ |<br />
| | Next 10(5?)<br />
| +-------------------------+ |<br />
| +-------------------------+ |<br />
| | Previous 10(5?)<br />
| +-------------------------+ |<br />
| +-------------------------+ |<br />
| | item_slot) item_name id | |<br />
| +-------------------------+ |<br />
| +-------------------------+ |<br />
| | 2) Cracked Bow <id><br />
| +-------------------------+ |<br />
+-----------------------------+<br />
<br />
#UI(3). Resourse browser<br />
<br />
===WesMMO. Theorycraft===<br />
;Main questions:<br />
:1) I have some 'slots' of equipped items. Why player should fill all this slots?<br />
:2) I have some 'stats' on items. Why player should concentrate on some stats and ignore other?<br />
:3) There are some 'classes' of characters. How to make real difference between any two classes?<br />
:4) How to make class system where anticlasses will exists.<br />
<br />
;Base statements:<br />
:Player control 3 units.<br />
:Units have around 5 equipment 'slots' and few stats.<br />
:Any damage dealing should be based on stadart battle system.<br />
:There are around 5-10 different classes.<br />
:Each class have at least 2 good, 2 worst and 2 average attack types and defenses.<br />
:Item can not affect 2 good or 2 worst stats for any class at once.<br />
:Bonuses from items should not break class balance.<br />
:Items are not able to affect all stats.<br />
:All characters have same movement cost and base defence at any type of terrain.<br />
:Any character is able to wear any item he gets.<br />
<br />
;Stat system<br />
Handling good/average/worst stats for any class.<br />
Each class will have set of modifiers, what will affect resistances. It can be equal to 1 (good), 2 (average), 4 (worst).<br />
''main formula of effect diminishing'':<br />
y = x / (a * x + 20) * 100%, where<br />
x - value from gear,<br />
a - class modifier.<br />
According to this formula, there are 3 tier of armor exists:<br />
1 tier: gear give 1-20 value (5-50;5-33;5-20)<br />
2 tier: gear give 20-40 value (50-66;33-40;20-22)<br />
3 tier: gear give 40-80 value (66-80;40-45;22-23)<br />
The following stats are good for any class:<br />
:hitpoint amount. ''Even mages with ranged combat should stand face-to-face to it's current opponent. Noone can one-shot any other class with full hp. Thats why mage surely will get some amount of damage from counterattack.<br />
:movepoints amount. ''Difference in 1 point of movement make one unit unreachable by other.<br />
<br />
There are 5 equippable slots:<br />
:1 - affects magical combat<br />
:2 - affects defences<br />
:3 - affects melee combat<br />
:4 - affects ranged combat<br />
:5 - affects movement<br />
<br />
If item affects combat, it always says how many strikes you have and how much damage you will deal with this item. This should also be influenced by class, in some way, to make sure, what character A can not be owerpowered just because enemy have wrong and this class - right weapon.<br />
<br />
How can I make difference for class A between weapon a and b?<br />
:1) Class multiplier. ''Multipliers for damage is not a good idea.<br />
:2) Gear hacking. ''This way is rather hard, but possible.<br />
:3) Weapon blocking. ''Easy as pie.<br />
<br />
Damage and number of strikes completely influenced by weapon. That means, what weapons of same tier, will have same damage output.<br />
:Blade-based melee weapons are fast. Ex: 2-6<br />
:Blow-based melee weapons have average characterictics. 3-4 or 4-3<br />
:Only arcane melee weapon allowed. it's speed and damage is not good itself, but it is not influenced by common physical resistances.<br />
:Pierce weapons are usually ranged and rather fast. 3-4 or 2-6.<br />
:Fire magic is one-shottable. 12-1 and cannot miss, of course.<br />
:Cold magic is a pain. 1-12.<br />
<br />
There are 2 group of stats:<br />
:''Active''<br />
:''Passive''<br />
There are two ''active'' stat: hitpoint and damage, and two ''passive'': dodge chance and absorbition.<br />
And total list of stats will look like this:<br />
+--------------------+---+<br />
| stat |PPL|<br />
+--------------------+---+<br />
| hitpoints |60 |<br />
+-------+------------+---+<br />
| blade | | |<br />
| blow | | |<br />
| pierce|absorbitions| 5 |<br />
| arcane| | |<br />
| fire | | |<br />
| cold | | |<br />
+-------+------------+---+<br />
| blade | | |<br />
| blow | | |<br />
| pierce| power |10 |<br />
| arcane| | |<br />
| fire | | |<br />
| cold | | |<br />
+-------+------------+---+<br />
| avoidance | 4 |<br />
+-------+------------+---+<br />
Absorbitions have limits in 12 levels.<br />
Let's imagine, what absorbition capped at 75% value. According to ''main formula of effect diminishing'', character with a=1 will achieve 75% mitigation at x=60. And 60 / 5 = 12.<br />
<br />
Look to this table:<br />
x value difference value difference value difference<br />
0 0 0 0 <br />
5 16,66666667 16,66666667 12,5 12,5 20 20<br />
10 25 8,333333333 16,66666667 4,166666667 33,33333333 13,33333333<br />
15 30 5 18,75 2,083333333 42,85714286 9,523809524<br />
20 33,33333333 3,333333333 20 1,25 50 7,142857143<br />
25 35,71428571 2,380952381 20,83333333 0,833333333 55,55555556 5,555555556<br />
30 37,5 1,785714286 21,42857143 0,595238095 60 4,444444444<br />
35 38,88888889 1,388888889 21,875 0,446428571 63,63636364 3,636363636<br />
40 40 1,111111111 22,22222222 0,347222222 66,66666667 3,03030303<br />
45 40,90909091 0,909090909 22,5 0,277777778 69,23076923 2,564102564<br />
50 41,66666667 0,757575758 22,72727273 0,227272727 71,42857143 2,197802198<br />
55 42,30769231 0,641025641 22,91666667 0,189393939 73,33333333 1,904761905<br />
60 42,85714286 0,549450549 23,07692308 0,16025641 75 1,666666667<br />
2'nd column shows mitigation value at a = 2, 4'th at a = 4 and 6'th at a = 1. If you calculate average value of all difference columns and turn float value to int, you get 4. This is Avoidance PPL.<br />
There are also ''Soft cap'' and ''hard cap'' of mitigation. Soft cap means what further collecting of this stat is useful, but player can spend training points into something more valuable. Hard cap means what further improvement is not recommended (by me of course).<br />
:for a = 1. SC = 30. HC = 60<br />
:for a = 2. SC = 20. HC = 40.<br />
:for a = 4. SC = 10. HC = 20.<br />
Avoidance should give static value, because it is not depend from character class. And it should be capped too. According to wesnoth phylosophy, defence should not be higner than 60. 60 / 4 = 15 levels of stat.</div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=InternalActionsWML&diff=47265InternalActionsWML2012-09-20T07:13:53Z<p>Xudojnik: Added description of return values for [store_side]</p>
<hr />
<div>{{WML Tags}}<br />
<br />
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.<br />
<br />
== Variable Actions ==<br />
<br />
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.<br />
<br />
=== [set_variable] ===<br />
<br />
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.<br />
<br />
* '''name''': the name of the variable to manipulate<br />
<br />
* '''value''': set the variable to the given value (can be numeric or string).Use literal for no substitution. (see [[VariablesWML]])<br />
<br />
* '''literal''': set the variable to the given value (can be numeric or string). This does not interpret any dollars signs.<br />
<br />
* '''to_variable''': set the variable to the value of the given variable, e.g. 'to_variable=temp' would be equivalent to 'value=$temp'.<br />
<br />
* '''add''': add the given amount to the variable.<br />
<br />
* '''sub''': subtract the given amount from the variable.<br />
<br />
* '''multiply''': multiply the variable by the given number. The result is a float.<br />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.<br />
<br />
* '''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.<br />
<br />
* '''modulo''': returns the remainder of a division.<br />
<br />
* '''rand''': the variable will be randomly set.<br>You may provide a comma separated list of possibilities, e.g. 'random=Bob,Bill,Bella'.<br>You may provide a range of numbers (integers), e.g. 'random=3..5'.<br>You may combine these, e.g. 'random=100,1..9', in which case there would be 1/10th chance of getting 100, just like for each of 1 to 9. See [[BuildingMultiplayerExamples]] for more info on the MP case.<br />
<br />
* '''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.<br />
<br />
* '''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).<br />
<br />
* '''[join]''' joins an array of strings to create a textual list<br />
** '''variable''': name of the array<br />
** '''key''': the key of each array element(array[$i].foo) in which the strings are stored<br />
** '''separator''': separator to connect the elements<br />
** '''remove_empty''': whether to ignore empty elements<br />
<br />
* '''ipart''': Assigns the integer part (the part to the left of the comma) of the referenced variable.<br />
<br />
* '''fpart''': Assigns the decimal part (the part to the right of the comma) of the referenced variable.<br />
<br />
* '''round''': Rounds the variable to the specified number of digits of precision. Negative precision works as expected (rounding 19517 to -2 = 19500). Special values:<br />
**'''round=ceil''': Rounds upward to the nearest integer.<br />
**'''round=floor''': Rounds down to the nearest integer.<br />
<br />
=== [set_variables] ===<br />
<br />
Manipulates a WML array or container<br />
<br />
* '''name''': the name of the array or container to manipulate<br />
<br />
* '''mode''': one of the following values:<br />
** ''replace'': will clean the array '''name''' and replace it with given data<br />
** ''append'': will append given data to the current array<br />
** ''merge'': will merge in the given data into '''name'''<br />
** ''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.<br />
<br />
* '''to_variable''': data will be set to the given array<br />
<br />
* '''[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]])<br />
<br />
* '''[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<br />
<br />
*'''[split]''' splits a textual list into an array which will then be set to data<br />
** '''list''': textual list to split<br />
** '''key''': the key of each array element(array[$i].foo) in which the strings are stored<br />
** '''separator''': separator to separate the elements<br />
** '''remove_empty''': whether to ignore empty elements<br />
<br />
=== Capturing Game Data ===<br />
<br />
These actions capture different bits of game data and store them to variables so they can be examined and/or manipulated.<br />
<br />
==== [store_gold] ====<br />
<br />
Stores a side's gold into a variable.<br />
<br />
* '''[[StandardSideFilter]]''': The first matching side's gold will be stored in the variable "variable".<br />
* '''variable''': (default='gold') the name of the variable to store the gold in<br />
<br />
==== [store_locations] ====<br />
<br />
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.<br />
<br />
* [[StandardLocationFilter]]: a location or location range which specifies the locations to store. By default, all locations on the map are stored.<br />
<br />
* '''variable''': the name of the variable (array) into which to store the locations.<br />
<br />
==== [store_reachable_locations] ====<br />
<br />
Stores locations reachable by the given units. Can store either the movement, attack or vision ranges.<br />
<br />
* '''[filter]''': a [[StandardUnitFilter]]. The locations reachable by any of the matching units will be stored.<br />
* '''[filter_location]''': (optional) a [[StandardLocationFilter]]. Only locations which also match this filter will be stored.<br />
* '''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).<br />
* '''moves''': possible values ''current'' (default), ''max''. Specifies whether to use the current or maximum movement points when calculating the range.<br />
* '''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.<br />
* '''variable''': the name of the variable (array) into which to store the locations.<br />
<br />
==== [store_map_dimensions] ====<br />
<br />
Stores the map dimensions in a variable.<br />
<br />
* '''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''.<br />
<br />
==== [store_side] ====<br />
<br />
Stores information about a certain side in a variable.<br />
<br />
'''Keys:'''<br />
* '''[[StandardSideFilter]]''': All matching sides are stored. (An array is created if several sides match - access it with side[2].team_name and so on.)<br />
* '''variable''': the name of the variable to store the information in (default: "side")<br />
<br />
'''Result'''<br />
<br />
Variable will contain following members:<br />
* '''color''': It indicates team color. Can be one of the following:<br />
{| border = 1<br />
| ''color''<br />
| red<br />
| blue<br />
| green<br />
| purple<br />
| black<br />
| brown<br />
| orange<br />
| white<br />
| teal<br />
|-<br />
| ''value''<br />
| 1<br />
| 2<br />
| 3<br />
| 4<br />
| 5<br />
| 6<br />
| 7<br />
| 8<br />
| 9<br />
|}<br />
* '''colour''': Same as above.<br />
* '''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.''<br />
** '''human''': Human player<br />
** '''human_ai''': If human player was replaced by AI player by "droid" command.<br />
** '''null''': If players assigns "Empty" to "Player/Type" in game lobby<br />
** '''ai''': If players assigns "Computer Player" to "Player/Type" in game lobby<br />
* '''fog''': Indicates whether this side is affected by fog of war.<br />
* '''gold''': The amount of gold the side have.<br />
* '''hidden''': (boolean) If 'yes', side is not shown in status table.<br />
* '''income''': Base income for this side (without villages).<br />
* '''name''': Name of player.<br />
* '''recruit''': A comma-separated list of unit types that can be recruited by this side.<br />
* '''shroud''': Whether this side is affected by shroud.<br />
* '''side''': The $side_number of the side belonging to this container<br />
* '''team_name''': String representing the team's description.<br />
* '''user_team_name''': Translated string representing the team's description.<br />
* '''village_gold''': The amount of gold given to this side per village it controls per turn.<br />
<br />
==== [store_starting_location] ====<br />
<br />
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)<br />
<br />
* [[StandardSideFilter]]: The starting locations of all matching sides will be stored. If multiple sides are matched, a WML array will be created.<br />
* '''variable''': (default='location'): the name of the variable to store the location in<br />
<br />
==== [store_time_of_day] ====<br />
<br />
Stores time of day information from the current scenario into a WML variable container.<br />
<br />
* '''x, y''': Location to store the time for. Time areas matter, illumination does not.<br />
<br />
* '''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]].<br />
<br />
* '''turn''': (defaults to the current turn number) changes the turn number for which time of day information should be retrieved.<br />
<br />
==== [store_turns] ====<br />
<br />
Stores the turn limit (the maximum number of turns). If there is no limit, this stores ''-1''.<br />
<br />
* '''variable''': (default='turns') the name of the variable in which to store the turn limit.<br />
<br />
==== [store_unit] ====<br />
<br />
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 [[InternalActionsWMLUnitTags|here]]. 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).<br />
<br />
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.<br />
<br />
''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].''<br />
<br />
* '''[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).<br />
<br />
* '''variable''': the name of the variable into which to store the unit(s)<br />
<br />
* '''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.<br />
<br />
* '''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.<br />
<br />
==== [store_unit_type] ====<br />
<br />
* '''type''': (required) the defined ID of the unit type, for example "Goblin Knight". 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.<br />
<br />
* '''variable''': the name of the variable into which to store the unit type information (default "unit_type")<br />
<br />
==== [store_unit_type_ids] ====<br />
<br />
* '''variable''': the name of the variable into which to store a comma-separated list of all unit type IDs<br />
<br />
==== [store_villages] ====<br />
<br />
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.<br />
<br />
* '''variable''': the name of the variable (array) into which to store the locations (default: "location")<br />
* '''[[StandardLocationFilter]]''' tags and keys as arguments<br />
<br />
==== [store_items] ====<br />
<br />
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).<br />
<br />
*'''variable''': name of the wml variable array to use (default "items")<br />
*'''[[StandardLocationFilter]]''' keys as arguments: only items on locations matching this [[StandardLocationFilter]] will be stored<br />
<br />
==== [find_path] ====<br />
<br />
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.<br />
<br />
*'''[traveler]''': [[StandardUnitFilter]], only the first matching unit will be used for calculation<br />
*'''[destination]''': [[StandardLocationFilter]], only the first matching nearest hex will be used<br />
*'''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.<br />
*'''allow_multiple_turns''': default no, if yes also moves that require more than one turn will be calculated.<br />
*'''check_visibility''': default no, if yes the path will not be computed if some hexes are not visible due to shroud.<br />
*'''check_teleport''': default yes, if no teleport won't be taken in account while computing path.<br />
*'''check_zoc''': default yes, if no unit ZOCs won't be considered while calculating the path.<br />
This is the structure of the variable returned by [find_path]:<br />
[path]<br />
length = the total length of the path<br />
if the path is calculated to an impassable hex, or the move requires multiple turns<br />
and allow_multiple_turns is no, its value will be 0.<br />
hexes = in 1.11, this will replace the length key above<br />
from_x, from_y = location of the unit<br />
to_x, to_y = destination<br />
movement_cost = total movement cost required by unit to reach that hex<br />
required_turns = total turns required by unit to reach that hex<br />
[step]<br />
x, y = location of the step<br />
terrain = terrain of the step<br />
movement_cost = movement cost required by unit to reach that hex<br />
required_turns = turns required by unit to reach that hex<br />
[/step]<br />
[/path]<br />
To read the total length of the path on 1.10, use ''path.step.length''.<br><br />
{{DevFeature1.11}} ''length'' is replaced by ''hexes'' in the output array.<br />
<br />
=== [clear_variable] ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
* '''name''': the name of the variable to clear. This can also be a comma-separated list of multiple variable names.<br />
** If a name ends with an array index, then it deletes that one container, and shifts the indexes of all subsequent containers. For example, <code>{CLEAR_VARIABLE my_awesome_array[2]}</code> deletes <code>my_awesome_array[2]</code>, but then moves <code>my_awesome_array[3]</code> to <code>my_awesome_array[2]</code>, moves <code>my_awesome_array[4]</code> to <code>my_awesome_array[3]</code>, and so on until the end of the array.<br />
** Note that <code>{CLEAR_VARIABLE my_awesome_array}</code> deletes the entire array, but <code>{CLEAR_VARIABLE my_awesome_array[0]}</code> deletes only the first container.<br />
<br />
== Other Internal Actions ==<br />
<br />
Believe it or not, there are some internal actions that are not focused primarily on variables. They are all grouped here.<br />
<br />
=== [fire_event] ===<br />
<br />
Trigger a WML event<br />
<br />
* '''name''': the name of event to trigger<br />
<br />
* '''[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.<br />
**[[StandardUnitFilter]] as argument. Do not use a [filter] tag.<br />
<br />
* '''[secondary_unit]''': ''(Optional)'' Same as '''[primary_unit]''' except for the secondary unit.<br />
**[[StandardUnitFilter]] as argument. Do not use a [filter] tag.<br />
<br />
* '''[primary_attack]''': Information passed to the primary attack filter and $weapon variable on the new event.<br />
<br />
* '''[secondary_attack]''': Information passed to the second attack filter and $second_weapon variable on the new event.<br />
<br />
=== [insert_tag] ===<br />
<br />
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]]).<br />
<br />
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.<br />
<br />
*'''name''': The ["name"] 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 "option" when used within a [message]).<br />
<br />
*'''variable''': Name of the container variable which will have its value inserted into the tag.<br />
<br />
=== [role] ===<br />
<br />
Tries to find a unit to assign a role to.<br>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]]).<br>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.<br />
<br />
* '''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.<br />
<br />
* '''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.<br />
<br />
* [[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.<br />
<br />
== Examples ==<br />
<br />
=== Using [set_variables] to Create Arrays of WML ===<br />
<br />
[set_variables]<br />
name=arr<br />
mode=replace<br />
[value]<br />
foo=bar<br />
[/value]<br />
[value]<br />
foo=more<br />
[/value]<br />
[/set_variables]<br />
{DEBUG_MSG $arr[0].foo}<br />
{DEBUG_MSG $arr[1].foo}<br />
<br />
This will produce two output messages, first one saying '''bar''' and next one saying '''more'''.<br />
<br />
=== [insert_tag] Example ===<br />
<br />
[event]<br />
name=moveto<br />
<br />
[set_variable]<br />
name=temp.speaker<br />
value=Konrad<br />
[/set_variable]<br />
<br />
[set_variable]<br />
name=temp.message<br />
value= _ "Yo Kalenz!"<br />
[/set_variable] <br />
<br />
[insert_tag]<br />
name=message<br />
variable=temp<br />
[/insert_tag]<br />
[/event]<br />
<br />
This is effectively identical to:<br />
<br />
[event]<br />
name=moveto<br />
<br />
[message]<br />
speaker=Konrad<br />
message= _ "Yo Kalenz!"<br />
[/message]<br />
[/event]<br />
<br />
=== Firing the event via [insert_tag] ===<br />
Sometimes you need to fire specific event out of a wide variety, but when you make scenario you don't know which one. But before you use this, make sure what all other solutions aren't suit you.<br />
One of possible solutions is use all power of internal actions: [set_variable]+[insert_tag]+[fire_event].<br />
<br />
First of all, make sure a event is defined and included.<br />
[event]<br />
name = custom_event<br />
<br />
[message]<br />
speaker=Konrad<br />
message= _ "Yo Kalenz!"<br />
[/message]<br />
[/event]<br />
<br />
Then set a variable, which will contain name of your event.<br />
[event]<br />
name = start<br />
<br />
[set_variable]<br />
name = event_name_container.name<br />
value = "custom_event"<br />
[/set_variable]<br />
[/event]<br />
<br />
Then add insert tag where you need it. It can be [command] of menu item, or even other event.<br />
[insert_tag]<br />
name = fire_event<br />
variable = event_name_container<br />
[/insert_tag]<br />
<br />
== See Also ==<br />
* [[VariablesWML]]<br />
* [[ActionWML]]<br />
** [[ConditionalWML]]<br />
** [[DirectActionsWML]]<br />
** [[InterfaceActionsWML]]<br />
* [[EventWML]]<br />
* [[ReferenceWML]]<br />
<br />
[[Category: WML Reference]]<br />
[[Category: ActionsWML]]</div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=User:Xudojnik&diff=46855User:Xudojnik2012-07-29T09:48:34Z<p>Xudojnik: /* Zombie Apocalypse Engine */</p>
<hr />
<div>{{WML Tags}}<br />
I know Wesnoth from version 1.1.2a. This is really perspective game not only as strategy, but as RPG too. Large world, filled by history, epic battles, heroes and factions, is perfect for creating RPG. It's not so hard because Wesnoth have simple language, what support wide variety of events, easy way to define dialogs, items, forum and Wiki, where always can be found answer for any question.<br />
<br />
=== Zombie Apocalypse Engine ===<br />
This is a framework for Zombie-survival maps.<br />
I'm going to add following features:<br />
* Restore "knokback" weapon special<br />
* Make load of core database optional - split it to two events: filling database by data, linking tables<br />
* Flexible power-ups<br />
* Update quick-travel signs and stairs to the new engine<br />
<br />
===WesMMO===<br />
To play it (now only in theory):<br />
#*Download WesMMO era.<br />
#*Download any map, designed for WesMMO.<br />
#*Create game in lobby.<br />
#*WesMMO era will automatically use your account.<br />
#*Now choose any three units from your account or create new and play.<br />
#*Persistent data will be stored at the end of each turn<br />
<br />
Character is a "team" of three units. Each unit have own stats, small inventory and spellbook.<br />
;Stats:<br />
:Stamina - increases your hitpoints. ''Each point of stamina should increase survivalalibity of unit for an average amount of damage, given by 1 strength or agility, multiplied by 6.<br />
:Strength - increases your melee damage and armor contribution from items.<br />
:Speed - increases your movement points.<br />
:Agility - increase your ranged damage and defense on each type of terrain.<br />
::100 * A / (A + 30) 60% Defence at 45 agility<br />
::100 * A / (A + 20) 60% Defence at 30 agility<br />
::100 * A / (A + 10) 60% Defence at 15 agility<br />
:Intellect - increase magical potence of unit in some ways<br />
<br />
;Inventory:<br />
:Melee Weapon - affects melee combat: multiplies damage from strength and number of strikes.<br />
:Ranged Weapon - affects ranged combat: multiplies damage from agility and number of strikes.<br />
:Amulet - affects base stats, magical resistances and magical potency of unit<br />
:Body Armor - affects base stats, all resistances and defenses.<br />
:Boots - affects base stats and multiplies speed of unit.<br />
:Helm - affects melee resistances and magical potence of unit.<br />
<br />
Free slots are shared between all units on the gamefield. Each side had it own free slot inventory. I don't like this but I have no way to do it personal. Virtual data about them should be stored in structure "character[<side>]..."<br />
{|border="1"<br />
|free_slot<br />
|item_id<br>item_type<br />
|}<br />
Virtual data about units will be stored in structure "character[<side>].unit[<unit id>]..."<br />
Each item have it's own stats. Stats are directly named.<br />
<table width=100%><tr><td colspan="3" align="center"><h4>Content of "unit" structure.</h4></td></tr><tr><td><br />
{| border="1"<br />
|rowspan="8"|inv<br />
|body_item_id<br>boots_item_id<br>head_item_id<br>amulet_item_id<br>melee_item_id<br>ranged_item_id<br />
|<br />
|-<br />
|body_user_name<br>boots_user_name<br>head_user_name<br>amulet_user_name <br>melee_user_name<br>ranged_user_name<br />
|<br />
|-<br />
|body<br />
|0 - stamina<br>1 - strength<br>2 - agility<br>3 - pierce<br>4 - blade<br>5 - blow<br>6 - arcane<br>7 - fire<br>8 - cold<br />
|-<br />
|boots<br />
|0 - stamina<br>1 - strength<br>2 - agility<br>3 - speed<br>4 - speed_multiplier<br />
|-<br />
|head<br />
|0 - intellect<br>1 - pierce<br>2 - blade<br>3 - blow<br />
|-<br />
|amulet<br />
|0 - intellect<br>1 - stamina<br>2 - arcane<br>3 - fire<br>4 - cold<br />
|-<br />
|melee<br />
|0 - strength_multiplier<br>1 - base damage<br>2 - speed<br>3 - type<br>4 - defense<br />
|-<br />
|ranged<br />
|0 - agility_multiplier<br>1 - base damage<br>2 - speed<br>3 - type<br />
|}<br />
</td><br />
<td><br />
''Class should not determine defenses and resistances''<br />
{|border="1"<br />
|class<br />
|0 - stamina<br>1 - strength<br>2 - agility<br>3 - speed<br>4 -intellect<br />
|}<br />
</td><br />
<td><br />
{|border="2"<br />
|buffed<br />
|0 - strength<br>1 - agility<br>2 - speed<br>3 - pierce<br>4 - blade<br>5 - blow<br>6 - arcane<br>7 - fire<br>8 - cold<br>9 - hitpoints_multiplier<br>10 - damage_multiplier<br>11 - speed_multiplier<br>12 - defense<br />
|}<br />
</td><br />
</tr><br />
</table><br />
<br />
;Spell system:<br />
:Each class have some predefined spells. ''In most cases they are not simple "damage unit X for Y hp". That's why they are the greatest headache for me.''<br />
:Each unit can use it's spell once per turn.<br />
:There are no limit of uses through whole scenario.<br />
<br />
Each item has it own's id. This ID is the key to macro what will apply effect of item stats to unit structure. Data about it will be stored inside WesMMO era. That allows me to implement 'inventory slots'. Players will carry unused items in them.<br />
<br />
;Persistent data:<br />
:amulet_item_id_<unit index><br><br />
:body_item_id_<unit index><br />
:boots_item_id_<unit index><br />
:class_name_<unit index><br />
:head_item_id_<unit index><br />
:level_<unit index><br />
:melee_item_id_<unit index><br />
:ranged_item_id_<unit index><br />
:total_characters<br />
:total_free_slots<br />
:free_slot_item_type_<slot number><br />
:free_slot_item_id_<slot number><br />
<br />
I will add to the Era thread sample feedback:<br />
<br />
1) What version of Wesnoth, WesMMO and which scenario have you played?<br />
2) How difficult did you find the scenario? (1-10)<br />
3) How clear did you find the scenario objectives?<br />
4) How clear and interesting did you find the dialog and storyline of the scenario?<br />
5) What were your major challenges in meeting the objectives of the scenario?<br />
6) How fun do you think the scenario is? (1-10)<br />
7) What, if any, are changes you would have made to the scenario to make it more fun?<br />
8) Was there any event that caused you to lose the game and forced you to restart the game?<br />
9) WesMMO needs new title. Propose your opinion about it. (optional)<br />
10) How convenient do you think the UI is (inventory, trade, creation dialogs)? (1-10)<br />
11) What, if any, are changes you would made to the UI to make it more convenient?<br />
12) How balansed did you find the units? (1-10)<br />
13) Name the most owerpowered unit. Why does you name it?<br />
14) What is your favorite unit? Why?<br />
15) What, if any, are changes you would made to units to make game more fun?<br />
Thoughts:<br />
<br />
Ideas:<br />
#situation: players A,B,C,D starts the game. player B leaves game before it ends. spectator E (player A) takes control of units B. players A,E,C,D ends the game and information about their units is stored to persistent. player E gets units of player B.<br />
#suggestion: Best items should kill much time before player get them, but players should get something each time they play this game. Ways to reach this objective:<br />
#*1) Add "random stats" to items. Then item drops, RNG choose stats on them between predefined sets. 1/4 of randem stat set (RaSS) should be awesome and 1/4 should be real crap.<br />
#*2) Add "crafted items". Players should collect some resourses and get to place where they can craft this item.<br />
#Itemisation(1). WesMMO will be published by patches. In each patch I will add some new items and functions to players. Items added in new patch should be better than items added in previous patch. But difference should not be enormous.<br />
#levelling(1). I would not change standart mechanic of XP colection of BfW. Each player have 3 unit, what allows them to prapare and perform last-hit for any unit. Levelling shouldn't make items of this patch worster.<br />
#Levelling(2). Data, stored in unit.class[], should contain multipliers of stats. Later this will be used to recalculate stats of unit.<br />
#Itemisation(2). There are three items: A(require 1-3 of X), B(require 2-5 of X), C(require 4-8 of X). While player have 3 X, he can't share A and B to others if he get them and can not use C. But when he collect 4 X, he can share A, can't share B and can use C.<br />
#Crafted items++. If craft of new items will require resourses from old patch, old maps will become outdated only if I will want this.<br />
#Itemisation(3). Items should have requirments by level.<br />
#Levelling(3). There should be a level cap in each patch.<br />
#Itemisation(4). Items can have no requirements by level, but stats on item can be influensed by level.<br />
#Itemisation(5). Add "mantle". It will have +int, +stam and magical resistances. Body no longer affect magical resistences and stam.<br />
#Development(1). Add various "count" functions to collect statistical data about each option in dialogs. This data should be stored in special namespace. Then this will be done, I should add to feedback thread request to put file with this data to the forum.<br />
#UI(1). Frankensteining. Each equipped item will have it's own overlay on unit. During the fights overlays aren't shown. Thats why I should create attack and defend animations what will look like cloud with "Ouch" messages jumped out of it.<br />
#UI(2). Fast backpack browser<br />
+-----------------------------+<br />
| Backpack browser<br />
| +-------------------------+ |<br />
| | Back<br />
| +-------------------------+ |<br />
| +-------------------------+ |<br />
| | Next 10(5?)<br />
| +-------------------------+ |<br />
| +-------------------------+ |<br />
| | Previous 10(5?)<br />
| +-------------------------+ |<br />
| +-------------------------+ |<br />
| | item_slot) item_name id | |<br />
| +-------------------------+ |<br />
| +-------------------------+ |<br />
| | 2) Cracked Bow <id><br />
| +-------------------------+ |<br />
+-----------------------------+<br />
<br />
#UI(3). Resourse browser<br />
<br />
===WesMMO. Theorycraft===<br />
;Main questions:<br />
:1) I have some 'slots' of equipped items. Why player should fill all this slots?<br />
:2) I have some 'stats' on items. Why player should concentrate on some stats and ignore other?<br />
:3) There are some 'classes' of characters. How to make real difference between any two classes?<br />
:4) How to make class system where anticlasses will exists.<br />
<br />
;Base statements:<br />
:Player control 3 units.<br />
:Units have around 5 equipment 'slots' and few stats.<br />
:Any damage dealing should be based on stadart battle system.<br />
:There are around 5-10 different classes.<br />
:Each class have at least 2 good, 2 worst and 2 average attack types and defenses.<br />
:Item can not affect 2 good or 2 worst stats for any class at once.<br />
:Bonuses from items should not break class balance.<br />
:Items are not able to affect all stats.<br />
:All characters have same movement cost and base defence at any type of terrain.<br />
:Any character is able to wear any item he gets.<br />
<br />
;Stat system<br />
Handling good/average/worst stats for any class.<br />
Each class will have set of modifiers, what will affect resistances. It can be equal to 1 (good), 2 (average), 4 (worst).<br />
''main formula of effect diminishing'':<br />
y = x / (a * x + 20) * 100%, where<br />
x - value from gear,<br />
a - class modifier.<br />
According to this formula, there are 3 tier of armor exists:<br />
1 tier: gear give 1-20 value (5-50;5-33;5-20)<br />
2 tier: gear give 20-40 value (50-66;33-40;20-22)<br />
3 tier: gear give 40-80 value (66-80;40-45;22-23)<br />
The following stats are good for any class:<br />
:hitpoint amount. ''Even mages with ranged combat should stand face-to-face to it's current opponent. Noone can one-shot any other class with full hp. Thats why mage surely will get some amount of damage from counterattack.<br />
:movepoints amount. ''Difference in 1 point of movement make one unit unreachable by other.<br />
<br />
There are 5 equippable slots:<br />
:1 - affects magical combat<br />
:2 - affects defences<br />
:3 - affects melee combat<br />
:4 - affects ranged combat<br />
:5 - affects movement<br />
<br />
If item affects combat, it always says how many strikes you have and how much damage you will deal with this item. This should also be influenced by class, in some way, to make sure, what character A can not be owerpowered just because enemy have wrong and this class - right weapon.<br />
<br />
How can I make difference for class A between weapon a and b?<br />
:1) Class multiplier. ''Multipliers for damage is not a good idea.<br />
:2) Gear hacking. ''This way is rather hard, but possible.<br />
:3) Weapon blocking. ''Easy as pie.<br />
<br />
How much classes I can create?<br />
There are 6 types of resistance. Let's imagine what all stats have counterstats. One cannot be good if other is not worst. There is absolutely no difference about deciding how to divide them, this also can be changed later via name-swapping.<br />
There is my division:<br />
:blade - fire<br />
:pierce - arcane<br />
:blow - cold<br />
There are 11 combination of stats after this rule. Thats should be enough, I think. At this moment, i'll take 3 of them.<br />
:Class: good (worst) [average]<br />
:A: Blade + blow (Fire - cold) [arcane + pierce]<br />
:B: Pierce + fire (Arcane - blade) [arcane + blade]<br />
:C: Arcane + cold (Blow - pierce) [blow + pierce]<br />
<br />
Class cannot wield weapons, what deal 'worst' type of damage. Race "who deal first attack" is result of this. And there should not be any other limits. Players should decide what to do next without my help.<br />
<br />
Damage and number of strikes completely influenced by weapon. That means, what weapons of same tier, will have same damage output.<br />
:Blade-based melee weapons are fast. Ex: 2-6<br />
:Blow-based melee weapons are true average. 3-4 or 4-3<br />
:Only arcane melee weapon allowed. it's speed and damage is not good, but it is not influenced by common physical miss chance.<br />
:Pierce weapons are usually ranged and rather fast. 3-4 or 2-6.<br />
:Fire magic is one-shottable. 12-1 and cannot miss, of cource.<br />
:Cold magic is a pain. 1-12.<br />
<br />
There are 2 group of stats:<br />
:''Active''<br />
:''Passive''<br />
There are two ''active'' stat: hitpoint and damage, and two ''passive'': dodge chance and absorbition.<br />
And total list of stats will look like this:<br />
+--------------------+---+<br />
| stat |PPL|<br />
+--------------------+---+<br />
| hitpoints |60 |<br />
+-------+------------+---+<br />
| blade | | |<br />
| blow | | |<br />
| pierce|absorbitions| 5 |<br />
| arcane| | |<br />
| fire | | |<br />
| cold | | |<br />
+-------+------------+---+<br />
| blade | | |<br />
| blow | | |<br />
| pierce| power |10 |<br />
| arcane| | |<br />
| fire | | |<br />
| cold | | |<br />
+-------+------------+---+<br />
| avoidance | 4 |<br />
+-------+------------+---+<br />
Absorbitions have limits in 12 levels.<br />
Let's imagine, what absorbition capped at 75% value. According to ''main formula of effect diminishing'', character with a=1 will achieve 75% mitigation at x=60. And 60 / 5 = 12.<br />
<br />
Look to this table:<br />
x value difference value difference value difference<br />
0 0 0 0 <br />
5 16,66666667 16,66666667 12,5 12,5 20 20<br />
10 25 8,333333333 16,66666667 4,166666667 33,33333333 13,33333333<br />
15 30 5 18,75 2,083333333 42,85714286 9,523809524<br />
20 33,33333333 3,333333333 20 1,25 50 7,142857143<br />
25 35,71428571 2,380952381 20,83333333 0,833333333 55,55555556 5,555555556<br />
30 37,5 1,785714286 21,42857143 0,595238095 60 4,444444444<br />
35 38,88888889 1,388888889 21,875 0,446428571 63,63636364 3,636363636<br />
40 40 1,111111111 22,22222222 0,347222222 66,66666667 3,03030303<br />
45 40,90909091 0,909090909 22,5 0,277777778 69,23076923 2,564102564<br />
50 41,66666667 0,757575758 22,72727273 0,227272727 71,42857143 2,197802198<br />
55 42,30769231 0,641025641 22,91666667 0,189393939 73,33333333 1,904761905<br />
60 42,85714286 0,549450549 23,07692308 0,16025641 75 1,666666667<br />
2'nd column shows mitigation value at a = 2, 4'th at a = 4 and 6'th at a = 1. If you calculate average value of all difference columns and turn float value to int, you get 4. This is Avoidance PPL.<br />
There are also ''Soft cap'' and ''hard cap'' of mitigation. Soft cap means what further collecting of this stat is useful, but player can spend training points into something more valuable. Hard cap means what further improvement is not recommended (by me of course).<br />
:for a = 1. SC = 30. HC = 60<br />
:for a = 2. SC = 20. HC = 40.<br />
:for a = 4. SC = 10. HC = 20.<br />
Avoidance should give static value, because it is not depend from character class. And it should be capped too. According to wesnoth phylosophy, defence should not be higner than 60. 60 / 4 = 15 levels of stat.<br />
<br />
Each character have 2 good stat, 2 average, 2 bad and some avoidance value. To HC them, player should level it up 2 * 12 + 2 * 8 + 2 * 4 + 16 = 64 times. And some infinite number times to build damage and hitpoints. Actually I think that player should build SC value of all defences or HC ''good stat'' and without (!) defence, build hitpoints or damage, depending from purpose of this unit. This is around 30 or 40 levels up. How much experience should character have to level up fast enough to see all it's powers?</div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=User:Xudojnik&diff=46854User:Xudojnik2012-07-29T08:19:45Z<p>Xudojnik: /* Zombie Apocalypse Engine */</p>
<hr />
<div>{{WML Tags}}<br />
I know Wesnoth from version 1.1.2a. This is really perspective game not only as strategy, but as RPG too. Large world, filled by history, epic battles, heroes and factions, is perfect for creating RPG. It's not so hard because Wesnoth have simple language, what support wide variety of events, easy way to define dialogs, items, forum and Wiki, where always can be found answer for any question.<br />
<br />
=== Zombie Apocalypse Engine ===<br />
This is a framework for Zombie-survival maps.<br />
I'm going to add following features:<br />
* Fix animations. Move animation definition to database.<br />
* Restore "knokback" weapon special<br />
* Make load of core database optional - split it to two events: filling database by data, linking tables<br />
* Flexible power-ups<br />
* Update quick-travel signs and stairs to the new engine<br />
<br />
===WesMMO===<br />
To play it (now only in theory):<br />
#*Download WesMMO era.<br />
#*Download any map, designed for WesMMO.<br />
#*Create game in lobby.<br />
#*WesMMO era will automatically use your account.<br />
#*Now choose any three units from your account or create new and play.<br />
#*Persistent data will be stored at the end of each turn<br />
<br />
Character is a "team" of three units. Each unit have own stats, small inventory and spellbook.<br />
;Stats:<br />
:Stamina - increases your hitpoints. ''Each point of stamina should increase survivalalibity of unit for an average amount of damage, given by 1 strength or agility, multiplied by 6.<br />
:Strength - increases your melee damage and armor contribution from items.<br />
:Speed - increases your movement points.<br />
:Agility - increase your ranged damage and defense on each type of terrain.<br />
::100 * A / (A + 30) 60% Defence at 45 agility<br />
::100 * A / (A + 20) 60% Defence at 30 agility<br />
::100 * A / (A + 10) 60% Defence at 15 agility<br />
:Intellect - increase magical potence of unit in some ways<br />
<br />
;Inventory:<br />
:Melee Weapon - affects melee combat: multiplies damage from strength and number of strikes.<br />
:Ranged Weapon - affects ranged combat: multiplies damage from agility and number of strikes.<br />
:Amulet - affects base stats, magical resistances and magical potency of unit<br />
:Body Armor - affects base stats, all resistances and defenses.<br />
:Boots - affects base stats and multiplies speed of unit.<br />
:Helm - affects melee resistances and magical potence of unit.<br />
<br />
Free slots are shared between all units on the gamefield. Each side had it own free slot inventory. I don't like this but I have no way to do it personal. Virtual data about them should be stored in structure "character[<side>]..."<br />
{|border="1"<br />
|free_slot<br />
|item_id<br>item_type<br />
|}<br />
Virtual data about units will be stored in structure "character[<side>].unit[<unit id>]..."<br />
Each item have it's own stats. Stats are directly named.<br />
<table width=100%><tr><td colspan="3" align="center"><h4>Content of "unit" structure.</h4></td></tr><tr><td><br />
{| border="1"<br />
|rowspan="8"|inv<br />
|body_item_id<br>boots_item_id<br>head_item_id<br>amulet_item_id<br>melee_item_id<br>ranged_item_id<br />
|<br />
|-<br />
|body_user_name<br>boots_user_name<br>head_user_name<br>amulet_user_name <br>melee_user_name<br>ranged_user_name<br />
|<br />
|-<br />
|body<br />
|0 - stamina<br>1 - strength<br>2 - agility<br>3 - pierce<br>4 - blade<br>5 - blow<br>6 - arcane<br>7 - fire<br>8 - cold<br />
|-<br />
|boots<br />
|0 - stamina<br>1 - strength<br>2 - agility<br>3 - speed<br>4 - speed_multiplier<br />
|-<br />
|head<br />
|0 - intellect<br>1 - pierce<br>2 - blade<br>3 - blow<br />
|-<br />
|amulet<br />
|0 - intellect<br>1 - stamina<br>2 - arcane<br>3 - fire<br>4 - cold<br />
|-<br />
|melee<br />
|0 - strength_multiplier<br>1 - base damage<br>2 - speed<br>3 - type<br>4 - defense<br />
|-<br />
|ranged<br />
|0 - agility_multiplier<br>1 - base damage<br>2 - speed<br>3 - type<br />
|}<br />
</td><br />
<td><br />
''Class should not determine defenses and resistances''<br />
{|border="1"<br />
|class<br />
|0 - stamina<br>1 - strength<br>2 - agility<br>3 - speed<br>4 -intellect<br />
|}<br />
</td><br />
<td><br />
{|border="2"<br />
|buffed<br />
|0 - strength<br>1 - agility<br>2 - speed<br>3 - pierce<br>4 - blade<br>5 - blow<br>6 - arcane<br>7 - fire<br>8 - cold<br>9 - hitpoints_multiplier<br>10 - damage_multiplier<br>11 - speed_multiplier<br>12 - defense<br />
|}<br />
</td><br />
</tr><br />
</table><br />
<br />
;Spell system:<br />
:Each class have some predefined spells. ''In most cases they are not simple "damage unit X for Y hp". That's why they are the greatest headache for me.''<br />
:Each unit can use it's spell once per turn.<br />
:There are no limit of uses through whole scenario.<br />
<br />
Each item has it own's id. This ID is the key to macro what will apply effect of item stats to unit structure. Data about it will be stored inside WesMMO era. That allows me to implement 'inventory slots'. Players will carry unused items in them.<br />
<br />
;Persistent data:<br />
:amulet_item_id_<unit index><br><br />
:body_item_id_<unit index><br />
:boots_item_id_<unit index><br />
:class_name_<unit index><br />
:head_item_id_<unit index><br />
:level_<unit index><br />
:melee_item_id_<unit index><br />
:ranged_item_id_<unit index><br />
:total_characters<br />
:total_free_slots<br />
:free_slot_item_type_<slot number><br />
:free_slot_item_id_<slot number><br />
<br />
I will add to the Era thread sample feedback:<br />
<br />
1) What version of Wesnoth, WesMMO and which scenario have you played?<br />
2) How difficult did you find the scenario? (1-10)<br />
3) How clear did you find the scenario objectives?<br />
4) How clear and interesting did you find the dialog and storyline of the scenario?<br />
5) What were your major challenges in meeting the objectives of the scenario?<br />
6) How fun do you think the scenario is? (1-10)<br />
7) What, if any, are changes you would have made to the scenario to make it more fun?<br />
8) Was there any event that caused you to lose the game and forced you to restart the game?<br />
9) WesMMO needs new title. Propose your opinion about it. (optional)<br />
10) How convenient do you think the UI is (inventory, trade, creation dialogs)? (1-10)<br />
11) What, if any, are changes you would made to the UI to make it more convenient?<br />
12) How balansed did you find the units? (1-10)<br />
13) Name the most owerpowered unit. Why does you name it?<br />
14) What is your favorite unit? Why?<br />
15) What, if any, are changes you would made to units to make game more fun?<br />
Thoughts:<br />
<br />
Ideas:<br />
#situation: players A,B,C,D starts the game. player B leaves game before it ends. spectator E (player A) takes control of units B. players A,E,C,D ends the game and information about their units is stored to persistent. player E gets units of player B.<br />
#suggestion: Best items should kill much time before player get them, but players should get something each time they play this game. Ways to reach this objective:<br />
#*1) Add "random stats" to items. Then item drops, RNG choose stats on them between predefined sets. 1/4 of randem stat set (RaSS) should be awesome and 1/4 should be real crap.<br />
#*2) Add "crafted items". Players should collect some resourses and get to place where they can craft this item.<br />
#Itemisation(1). WesMMO will be published by patches. In each patch I will add some new items and functions to players. Items added in new patch should be better than items added in previous patch. But difference should not be enormous.<br />
#levelling(1). I would not change standart mechanic of XP colection of BfW. Each player have 3 unit, what allows them to prapare and perform last-hit for any unit. Levelling shouldn't make items of this patch worster.<br />
#Levelling(2). Data, stored in unit.class[], should contain multipliers of stats. Later this will be used to recalculate stats of unit.<br />
#Itemisation(2). There are three items: A(require 1-3 of X), B(require 2-5 of X), C(require 4-8 of X). While player have 3 X, he can't share A and B to others if he get them and can not use C. But when he collect 4 X, he can share A, can't share B and can use C.<br />
#Crafted items++. If craft of new items will require resourses from old patch, old maps will become outdated only if I will want this.<br />
#Itemisation(3). Items should have requirments by level.<br />
#Levelling(3). There should be a level cap in each patch.<br />
#Itemisation(4). Items can have no requirements by level, but stats on item can be influensed by level.<br />
#Itemisation(5). Add "mantle". It will have +int, +stam and magical resistances. Body no longer affect magical resistences and stam.<br />
#Development(1). Add various "count" functions to collect statistical data about each option in dialogs. This data should be stored in special namespace. Then this will be done, I should add to feedback thread request to put file with this data to the forum.<br />
#UI(1). Frankensteining. Each equipped item will have it's own overlay on unit. During the fights overlays aren't shown. Thats why I should create attack and defend animations what will look like cloud with "Ouch" messages jumped out of it.<br />
#UI(2). Fast backpack browser<br />
+-----------------------------+<br />
| Backpack browser<br />
| +-------------------------+ |<br />
| | Back<br />
| +-------------------------+ |<br />
| +-------------------------+ |<br />
| | Next 10(5?)<br />
| +-------------------------+ |<br />
| +-------------------------+ |<br />
| | Previous 10(5?)<br />
| +-------------------------+ |<br />
| +-------------------------+ |<br />
| | item_slot) item_name id | |<br />
| +-------------------------+ |<br />
| +-------------------------+ |<br />
| | 2) Cracked Bow <id><br />
| +-------------------------+ |<br />
+-----------------------------+<br />
<br />
#UI(3). Resourse browser<br />
<br />
===WesMMO. Theorycraft===<br />
;Main questions:<br />
:1) I have some 'slots' of equipped items. Why player should fill all this slots?<br />
:2) I have some 'stats' on items. Why player should concentrate on some stats and ignore other?<br />
:3) There are some 'classes' of characters. How to make real difference between any two classes?<br />
:4) How to make class system where anticlasses will exists.<br />
<br />
;Base statements:<br />
:Player control 3 units.<br />
:Units have around 5 equipment 'slots' and few stats.<br />
:Any damage dealing should be based on stadart battle system.<br />
:There are around 5-10 different classes.<br />
:Each class have at least 2 good, 2 worst and 2 average attack types and defenses.<br />
:Item can not affect 2 good or 2 worst stats for any class at once.<br />
:Bonuses from items should not break class balance.<br />
:Items are not able to affect all stats.<br />
:All characters have same movement cost and base defence at any type of terrain.<br />
:Any character is able to wear any item he gets.<br />
<br />
;Stat system<br />
Handling good/average/worst stats for any class.<br />
Each class will have set of modifiers, what will affect resistances. It can be equal to 1 (good), 2 (average), 4 (worst).<br />
''main formula of effect diminishing'':<br />
y = x / (a * x + 20) * 100%, where<br />
x - value from gear,<br />
a - class modifier.<br />
According to this formula, there are 3 tier of armor exists:<br />
1 tier: gear give 1-20 value (5-50;5-33;5-20)<br />
2 tier: gear give 20-40 value (50-66;33-40;20-22)<br />
3 tier: gear give 40-80 value (66-80;40-45;22-23)<br />
The following stats are good for any class:<br />
:hitpoint amount. ''Even mages with ranged combat should stand face-to-face to it's current opponent. Noone can one-shot any other class with full hp. Thats why mage surely will get some amount of damage from counterattack.<br />
:movepoints amount. ''Difference in 1 point of movement make one unit unreachable by other.<br />
<br />
There are 5 equippable slots:<br />
:1 - affects magical combat<br />
:2 - affects defences<br />
:3 - affects melee combat<br />
:4 - affects ranged combat<br />
:5 - affects movement<br />
<br />
If item affects combat, it always says how many strikes you have and how much damage you will deal with this item. This should also be influenced by class, in some way, to make sure, what character A can not be owerpowered just because enemy have wrong and this class - right weapon.<br />
<br />
How can I make difference for class A between weapon a and b?<br />
:1) Class multiplier. ''Multipliers for damage is not a good idea.<br />
:2) Gear hacking. ''This way is rather hard, but possible.<br />
:3) Weapon blocking. ''Easy as pie.<br />
<br />
How much classes I can create?<br />
There are 6 types of resistance. Let's imagine what all stats have counterstats. One cannot be good if other is not worst. There is absolutely no difference about deciding how to divide them, this also can be changed later via name-swapping.<br />
There is my division:<br />
:blade - fire<br />
:pierce - arcane<br />
:blow - cold<br />
There are 11 combination of stats after this rule. Thats should be enough, I think. At this moment, i'll take 3 of them.<br />
:Class: good (worst) [average]<br />
:A: Blade + blow (Fire - cold) [arcane + pierce]<br />
:B: Pierce + fire (Arcane - blade) [arcane + blade]<br />
:C: Arcane + cold (Blow - pierce) [blow + pierce]<br />
<br />
Class cannot wield weapons, what deal 'worst' type of damage. Race "who deal first attack" is result of this. And there should not be any other limits. Players should decide what to do next without my help.<br />
<br />
Damage and number of strikes completely influenced by weapon. That means, what weapons of same tier, will have same damage output.<br />
:Blade-based melee weapons are fast. Ex: 2-6<br />
:Blow-based melee weapons are true average. 3-4 or 4-3<br />
:Only arcane melee weapon allowed. it's speed and damage is not good, but it is not influenced by common physical miss chance.<br />
:Pierce weapons are usually ranged and rather fast. 3-4 or 2-6.<br />
:Fire magic is one-shottable. 12-1 and cannot miss, of cource.<br />
:Cold magic is a pain. 1-12.<br />
<br />
There are 2 group of stats:<br />
:''Active''<br />
:''Passive''<br />
There are two ''active'' stat: hitpoint and damage, and two ''passive'': dodge chance and absorbition.<br />
And total list of stats will look like this:<br />
+--------------------+---+<br />
| stat |PPL|<br />
+--------------------+---+<br />
| hitpoints |60 |<br />
+-------+------------+---+<br />
| blade | | |<br />
| blow | | |<br />
| pierce|absorbitions| 5 |<br />
| arcane| | |<br />
| fire | | |<br />
| cold | | |<br />
+-------+------------+---+<br />
| blade | | |<br />
| blow | | |<br />
| pierce| power |10 |<br />
| arcane| | |<br />
| fire | | |<br />
| cold | | |<br />
+-------+------------+---+<br />
| avoidance | 4 |<br />
+-------+------------+---+<br />
Absorbitions have limits in 12 levels.<br />
Let's imagine, what absorbition capped at 75% value. According to ''main formula of effect diminishing'', character with a=1 will achieve 75% mitigation at x=60. And 60 / 5 = 12.<br />
<br />
Look to this table:<br />
x value difference value difference value difference<br />
0 0 0 0 <br />
5 16,66666667 16,66666667 12,5 12,5 20 20<br />
10 25 8,333333333 16,66666667 4,166666667 33,33333333 13,33333333<br />
15 30 5 18,75 2,083333333 42,85714286 9,523809524<br />
20 33,33333333 3,333333333 20 1,25 50 7,142857143<br />
25 35,71428571 2,380952381 20,83333333 0,833333333 55,55555556 5,555555556<br />
30 37,5 1,785714286 21,42857143 0,595238095 60 4,444444444<br />
35 38,88888889 1,388888889 21,875 0,446428571 63,63636364 3,636363636<br />
40 40 1,111111111 22,22222222 0,347222222 66,66666667 3,03030303<br />
45 40,90909091 0,909090909 22,5 0,277777778 69,23076923 2,564102564<br />
50 41,66666667 0,757575758 22,72727273 0,227272727 71,42857143 2,197802198<br />
55 42,30769231 0,641025641 22,91666667 0,189393939 73,33333333 1,904761905<br />
60 42,85714286 0,549450549 23,07692308 0,16025641 75 1,666666667<br />
2'nd column shows mitigation value at a = 2, 4'th at a = 4 and 6'th at a = 1. If you calculate average value of all difference columns and turn float value to int, you get 4. This is Avoidance PPL.<br />
There are also ''Soft cap'' and ''hard cap'' of mitigation. Soft cap means what further collecting of this stat is useful, but player can spend training points into something more valuable. Hard cap means what further improvement is not recommended (by me of course).<br />
:for a = 1. SC = 30. HC = 60<br />
:for a = 2. SC = 20. HC = 40.<br />
:for a = 4. SC = 10. HC = 20.<br />
Avoidance should give static value, because it is not depend from character class. And it should be capped too. According to wesnoth phylosophy, defence should not be higner than 60. 60 / 4 = 15 levels of stat.<br />
<br />
Each character have 2 good stat, 2 average, 2 bad and some avoidance value. To HC them, player should level it up 2 * 12 + 2 * 8 + 2 * 4 + 16 = 64 times. And some infinite number times to build damage and hitpoints. Actually I think that player should build SC value of all defences or HC ''good stat'' and without (!) defence, build hitpoints or damage, depending from purpose of this unit. This is around 30 or 40 levels up. How much experience should character have to level up fast enough to see all it's powers?</div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=User:Xudojnik&diff=46853User:Xudojnik2012-07-28T19:13:25Z<p>Xudojnik: /* Zombie Apocalypse Engine */</p>
<hr />
<div>{{WML Tags}}<br />
I know Wesnoth from version 1.1.2a. This is really perspective game not only as strategy, but as RPG too. Large world, filled by history, epic battles, heroes and factions, is perfect for creating RPG. It's not so hard because Wesnoth have simple language, what support wide variety of events, easy way to define dialogs, items, forum and Wiki, where always can be found answer for any question.<br />
<br />
=== Zombie Apocalypse Engine ===<br />
This is a framework for Zombie-survival maps.<br />
I'm going to add following features:<br />
* Fix animations. Move animation definition to database.<br />
* Restore "knokback" weapon special<br />
* Make load of core database optional - split it to two events: filling database by data, linking tables<br />
* Flexible power-ups<br />
* Update quick-travel signs and stairs to the new engine<br />
* Add to key a "additional image" atribute. It should be cleared when key is picked up.<br />
<br />
===WesMMO===<br />
To play it (now only in theory):<br />
#*Download WesMMO era.<br />
#*Download any map, designed for WesMMO.<br />
#*Create game in lobby.<br />
#*WesMMO era will automatically use your account.<br />
#*Now choose any three units from your account or create new and play.<br />
#*Persistent data will be stored at the end of each turn<br />
<br />
Character is a "team" of three units. Each unit have own stats, small inventory and spellbook.<br />
;Stats:<br />
:Stamina - increases your hitpoints. ''Each point of stamina should increase survivalalibity of unit for an average amount of damage, given by 1 strength or agility, multiplied by 6.<br />
:Strength - increases your melee damage and armor contribution from items.<br />
:Speed - increases your movement points.<br />
:Agility - increase your ranged damage and defense on each type of terrain.<br />
::100 * A / (A + 30) 60% Defence at 45 agility<br />
::100 * A / (A + 20) 60% Defence at 30 agility<br />
::100 * A / (A + 10) 60% Defence at 15 agility<br />
:Intellect - increase magical potence of unit in some ways<br />
<br />
;Inventory:<br />
:Melee Weapon - affects melee combat: multiplies damage from strength and number of strikes.<br />
:Ranged Weapon - affects ranged combat: multiplies damage from agility and number of strikes.<br />
:Amulet - affects base stats, magical resistances and magical potency of unit<br />
:Body Armor - affects base stats, all resistances and defenses.<br />
:Boots - affects base stats and multiplies speed of unit.<br />
:Helm - affects melee resistances and magical potence of unit.<br />
<br />
Free slots are shared between all units on the gamefield. Each side had it own free slot inventory. I don't like this but I have no way to do it personal. Virtual data about them should be stored in structure "character[<side>]..."<br />
{|border="1"<br />
|free_slot<br />
|item_id<br>item_type<br />
|}<br />
Virtual data about units will be stored in structure "character[<side>].unit[<unit id>]..."<br />
Each item have it's own stats. Stats are directly named.<br />
<table width=100%><tr><td colspan="3" align="center"><h4>Content of "unit" structure.</h4></td></tr><tr><td><br />
{| border="1"<br />
|rowspan="8"|inv<br />
|body_item_id<br>boots_item_id<br>head_item_id<br>amulet_item_id<br>melee_item_id<br>ranged_item_id<br />
|<br />
|-<br />
|body_user_name<br>boots_user_name<br>head_user_name<br>amulet_user_name <br>melee_user_name<br>ranged_user_name<br />
|<br />
|-<br />
|body<br />
|0 - stamina<br>1 - strength<br>2 - agility<br>3 - pierce<br>4 - blade<br>5 - blow<br>6 - arcane<br>7 - fire<br>8 - cold<br />
|-<br />
|boots<br />
|0 - stamina<br>1 - strength<br>2 - agility<br>3 - speed<br>4 - speed_multiplier<br />
|-<br />
|head<br />
|0 - intellect<br>1 - pierce<br>2 - blade<br>3 - blow<br />
|-<br />
|amulet<br />
|0 - intellect<br>1 - stamina<br>2 - arcane<br>3 - fire<br>4 - cold<br />
|-<br />
|melee<br />
|0 - strength_multiplier<br>1 - base damage<br>2 - speed<br>3 - type<br>4 - defense<br />
|-<br />
|ranged<br />
|0 - agility_multiplier<br>1 - base damage<br>2 - speed<br>3 - type<br />
|}<br />
</td><br />
<td><br />
''Class should not determine defenses and resistances''<br />
{|border="1"<br />
|class<br />
|0 - stamina<br>1 - strength<br>2 - agility<br>3 - speed<br>4 -intellect<br />
|}<br />
</td><br />
<td><br />
{|border="2"<br />
|buffed<br />
|0 - strength<br>1 - agility<br>2 - speed<br>3 - pierce<br>4 - blade<br>5 - blow<br>6 - arcane<br>7 - fire<br>8 - cold<br>9 - hitpoints_multiplier<br>10 - damage_multiplier<br>11 - speed_multiplier<br>12 - defense<br />
|}<br />
</td><br />
</tr><br />
</table><br />
<br />
;Spell system:<br />
:Each class have some predefined spells. ''In most cases they are not simple "damage unit X for Y hp". That's why they are the greatest headache for me.''<br />
:Each unit can use it's spell once per turn.<br />
:There are no limit of uses through whole scenario.<br />
<br />
Each item has it own's id. This ID is the key to macro what will apply effect of item stats to unit structure. Data about it will be stored inside WesMMO era. That allows me to implement 'inventory slots'. Players will carry unused items in them.<br />
<br />
;Persistent data:<br />
:amulet_item_id_<unit index><br><br />
:body_item_id_<unit index><br />
:boots_item_id_<unit index><br />
:class_name_<unit index><br />
:head_item_id_<unit index><br />
:level_<unit index><br />
:melee_item_id_<unit index><br />
:ranged_item_id_<unit index><br />
:total_characters<br />
:total_free_slots<br />
:free_slot_item_type_<slot number><br />
:free_slot_item_id_<slot number><br />
<br />
I will add to the Era thread sample feedback:<br />
<br />
1) What version of Wesnoth, WesMMO and which scenario have you played?<br />
2) How difficult did you find the scenario? (1-10)<br />
3) How clear did you find the scenario objectives?<br />
4) How clear and interesting did you find the dialog and storyline of the scenario?<br />
5) What were your major challenges in meeting the objectives of the scenario?<br />
6) How fun do you think the scenario is? (1-10)<br />
7) What, if any, are changes you would have made to the scenario to make it more fun?<br />
8) Was there any event that caused you to lose the game and forced you to restart the game?<br />
9) WesMMO needs new title. Propose your opinion about it. (optional)<br />
10) How convenient do you think the UI is (inventory, trade, creation dialogs)? (1-10)<br />
11) What, if any, are changes you would made to the UI to make it more convenient?<br />
12) How balansed did you find the units? (1-10)<br />
13) Name the most owerpowered unit. Why does you name it?<br />
14) What is your favorite unit? Why?<br />
15) What, if any, are changes you would made to units to make game more fun?<br />
Thoughts:<br />
<br />
Ideas:<br />
#situation: players A,B,C,D starts the game. player B leaves game before it ends. spectator E (player A) takes control of units B. players A,E,C,D ends the game and information about their units is stored to persistent. player E gets units of player B.<br />
#suggestion: Best items should kill much time before player get them, but players should get something each time they play this game. Ways to reach this objective:<br />
#*1) Add "random stats" to items. Then item drops, RNG choose stats on them between predefined sets. 1/4 of randem stat set (RaSS) should be awesome and 1/4 should be real crap.<br />
#*2) Add "crafted items". Players should collect some resourses and get to place where they can craft this item.<br />
#Itemisation(1). WesMMO will be published by patches. In each patch I will add some new items and functions to players. Items added in new patch should be better than items added in previous patch. But difference should not be enormous.<br />
#levelling(1). I would not change standart mechanic of XP colection of BfW. Each player have 3 unit, what allows them to prapare and perform last-hit for any unit. Levelling shouldn't make items of this patch worster.<br />
#Levelling(2). Data, stored in unit.class[], should contain multipliers of stats. Later this will be used to recalculate stats of unit.<br />
#Itemisation(2). There are three items: A(require 1-3 of X), B(require 2-5 of X), C(require 4-8 of X). While player have 3 X, he can't share A and B to others if he get them and can not use C. But when he collect 4 X, he can share A, can't share B and can use C.<br />
#Crafted items++. If craft of new items will require resourses from old patch, old maps will become outdated only if I will want this.<br />
#Itemisation(3). Items should have requirments by level.<br />
#Levelling(3). There should be a level cap in each patch.<br />
#Itemisation(4). Items can have no requirements by level, but stats on item can be influensed by level.<br />
#Itemisation(5). Add "mantle". It will have +int, +stam and magical resistances. Body no longer affect magical resistences and stam.<br />
#Development(1). Add various "count" functions to collect statistical data about each option in dialogs. This data should be stored in special namespace. Then this will be done, I should add to feedback thread request to put file with this data to the forum.<br />
#UI(1). Frankensteining. Each equipped item will have it's own overlay on unit. During the fights overlays aren't shown. Thats why I should create attack and defend animations what will look like cloud with "Ouch" messages jumped out of it.<br />
#UI(2). Fast backpack browser<br />
+-----------------------------+<br />
| Backpack browser<br />
| +-------------------------+ |<br />
| | Back<br />
| +-------------------------+ |<br />
| +-------------------------+ |<br />
| | Next 10(5?)<br />
| +-------------------------+ |<br />
| +-------------------------+ |<br />
| | Previous 10(5?)<br />
| +-------------------------+ |<br />
| +-------------------------+ |<br />
| | item_slot) item_name id | |<br />
| +-------------------------+ |<br />
| +-------------------------+ |<br />
| | 2) Cracked Bow <id><br />
| +-------------------------+ |<br />
+-----------------------------+<br />
<br />
#UI(3). Resourse browser<br />
<br />
===WesMMO. Theorycraft===<br />
;Main questions:<br />
:1) I have some 'slots' of equipped items. Why player should fill all this slots?<br />
:2) I have some 'stats' on items. Why player should concentrate on some stats and ignore other?<br />
:3) There are some 'classes' of characters. How to make real difference between any two classes?<br />
:4) How to make class system where anticlasses will exists.<br />
<br />
;Base statements:<br />
:Player control 3 units.<br />
:Units have around 5 equipment 'slots' and few stats.<br />
:Any damage dealing should be based on stadart battle system.<br />
:There are around 5-10 different classes.<br />
:Each class have at least 2 good, 2 worst and 2 average attack types and defenses.<br />
:Item can not affect 2 good or 2 worst stats for any class at once.<br />
:Bonuses from items should not break class balance.<br />
:Items are not able to affect all stats.<br />
:All characters have same movement cost and base defence at any type of terrain.<br />
:Any character is able to wear any item he gets.<br />
<br />
;Stat system<br />
Handling good/average/worst stats for any class.<br />
Each class will have set of modifiers, what will affect resistances. It can be equal to 1 (good), 2 (average), 4 (worst).<br />
''main formula of effect diminishing'':<br />
y = x / (a * x + 20) * 100%, where<br />
x - value from gear,<br />
a - class modifier.<br />
According to this formula, there are 3 tier of armor exists:<br />
1 tier: gear give 1-20 value (5-50;5-33;5-20)<br />
2 tier: gear give 20-40 value (50-66;33-40;20-22)<br />
3 tier: gear give 40-80 value (66-80;40-45;22-23)<br />
The following stats are good for any class:<br />
:hitpoint amount. ''Even mages with ranged combat should stand face-to-face to it's current opponent. Noone can one-shot any other class with full hp. Thats why mage surely will get some amount of damage from counterattack.<br />
:movepoints amount. ''Difference in 1 point of movement make one unit unreachable by other.<br />
<br />
There are 5 equippable slots:<br />
:1 - affects magical combat<br />
:2 - affects defences<br />
:3 - affects melee combat<br />
:4 - affects ranged combat<br />
:5 - affects movement<br />
<br />
If item affects combat, it always says how many strikes you have and how much damage you will deal with this item. This should also be influenced by class, in some way, to make sure, what character A can not be owerpowered just because enemy have wrong and this class - right weapon.<br />
<br />
How can I make difference for class A between weapon a and b?<br />
:1) Class multiplier. ''Multipliers for damage is not a good idea.<br />
:2) Gear hacking. ''This way is rather hard, but possible.<br />
:3) Weapon blocking. ''Easy as pie.<br />
<br />
How much classes I can create?<br />
There are 6 types of resistance. Let's imagine what all stats have counterstats. One cannot be good if other is not worst. There is absolutely no difference about deciding how to divide them, this also can be changed later via name-swapping.<br />
There is my division:<br />
:blade - fire<br />
:pierce - arcane<br />
:blow - cold<br />
There are 11 combination of stats after this rule. Thats should be enough, I think. At this moment, i'll take 3 of them.<br />
:Class: good (worst) [average]<br />
:A: Blade + blow (Fire - cold) [arcane + pierce]<br />
:B: Pierce + fire (Arcane - blade) [arcane + blade]<br />
:C: Arcane + cold (Blow - pierce) [blow + pierce]<br />
<br />
Class cannot wield weapons, what deal 'worst' type of damage. Race "who deal first attack" is result of this. And there should not be any other limits. Players should decide what to do next without my help.<br />
<br />
Damage and number of strikes completely influenced by weapon. That means, what weapons of same tier, will have same damage output.<br />
:Blade-based melee weapons are fast. Ex: 2-6<br />
:Blow-based melee weapons are true average. 3-4 or 4-3<br />
:Only arcane melee weapon allowed. it's speed and damage is not good, but it is not influenced by common physical miss chance.<br />
:Pierce weapons are usually ranged and rather fast. 3-4 or 2-6.<br />
:Fire magic is one-shottable. 12-1 and cannot miss, of cource.<br />
:Cold magic is a pain. 1-12.<br />
<br />
There are 2 group of stats:<br />
:''Active''<br />
:''Passive''<br />
There are two ''active'' stat: hitpoint and damage, and two ''passive'': dodge chance and absorbition.<br />
And total list of stats will look like this:<br />
+--------------------+---+<br />
| stat |PPL|<br />
+--------------------+---+<br />
| hitpoints |60 |<br />
+-------+------------+---+<br />
| blade | | |<br />
| blow | | |<br />
| pierce|absorbitions| 5 |<br />
| arcane| | |<br />
| fire | | |<br />
| cold | | |<br />
+-------+------------+---+<br />
| blade | | |<br />
| blow | | |<br />
| pierce| power |10 |<br />
| arcane| | |<br />
| fire | | |<br />
| cold | | |<br />
+-------+------------+---+<br />
| avoidance | 4 |<br />
+-------+------------+---+<br />
Absorbitions have limits in 12 levels.<br />
Let's imagine, what absorbition capped at 75% value. According to ''main formula of effect diminishing'', character with a=1 will achieve 75% mitigation at x=60. And 60 / 5 = 12.<br />
<br />
Look to this table:<br />
x value difference value difference value difference<br />
0 0 0 0 <br />
5 16,66666667 16,66666667 12,5 12,5 20 20<br />
10 25 8,333333333 16,66666667 4,166666667 33,33333333 13,33333333<br />
15 30 5 18,75 2,083333333 42,85714286 9,523809524<br />
20 33,33333333 3,333333333 20 1,25 50 7,142857143<br />
25 35,71428571 2,380952381 20,83333333 0,833333333 55,55555556 5,555555556<br />
30 37,5 1,785714286 21,42857143 0,595238095 60 4,444444444<br />
35 38,88888889 1,388888889 21,875 0,446428571 63,63636364 3,636363636<br />
40 40 1,111111111 22,22222222 0,347222222 66,66666667 3,03030303<br />
45 40,90909091 0,909090909 22,5 0,277777778 69,23076923 2,564102564<br />
50 41,66666667 0,757575758 22,72727273 0,227272727 71,42857143 2,197802198<br />
55 42,30769231 0,641025641 22,91666667 0,189393939 73,33333333 1,904761905<br />
60 42,85714286 0,549450549 23,07692308 0,16025641 75 1,666666667<br />
2'nd column shows mitigation value at a = 2, 4'th at a = 4 and 6'th at a = 1. If you calculate average value of all difference columns and turn float value to int, you get 4. This is Avoidance PPL.<br />
There are also ''Soft cap'' and ''hard cap'' of mitigation. Soft cap means what further collecting of this stat is useful, but player can spend training points into something more valuable. Hard cap means what further improvement is not recommended (by me of course).<br />
:for a = 1. SC = 30. HC = 60<br />
:for a = 2. SC = 20. HC = 40.<br />
:for a = 4. SC = 10. HC = 20.<br />
Avoidance should give static value, because it is not depend from character class. And it should be capped too. According to wesnoth phylosophy, defence should not be higner than 60. 60 / 4 = 15 levels of stat.<br />
<br />
Each character have 2 good stat, 2 average, 2 bad and some avoidance value. To HC them, player should level it up 2 * 12 + 2 * 8 + 2 * 4 + 16 = 64 times. And some infinite number times to build damage and hitpoints. Actually I think that player should build SC value of all defences or HC ''good stat'' and without (!) defence, build hitpoints or damage, depending from purpose of this unit. This is around 30 or 40 levels up. How much experience should character have to level up fast enough to see all it's powers?</div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=User:Xudojnik&diff=46852User:Xudojnik2012-07-28T18:58:24Z<p>Xudojnik: /* Zombie Apocalypse Engine */</p>
<hr />
<div>{{WML Tags}}<br />
I know Wesnoth from version 1.1.2a. This is really perspective game not only as strategy, but as RPG too. Large world, filled by history, epic battles, heroes and factions, is perfect for creating RPG. It's not so hard because Wesnoth have simple language, what support wide variety of events, easy way to define dialogs, items, forum and Wiki, where always can be found answer for any question.<br />
<br />
=== Zombie Apocalypse Engine ===<br />
This is a framework for Zombie-survival maps.<br />
I'm going to add following features:<br />
* Fix animations. Move animation definition to database.<br />
* Restore "knokback" weapon special<br />
* Make load of core database optional - split it to two events: filling database by data, linking tables<br />
* Flexible power-ups<br />
* Update quick-travel signs and stairs to the new engine<br />
<br />
===WesMMO===<br />
To play it (now only in theory):<br />
#*Download WesMMO era.<br />
#*Download any map, designed for WesMMO.<br />
#*Create game in lobby.<br />
#*WesMMO era will automatically use your account.<br />
#*Now choose any three units from your account or create new and play.<br />
#*Persistent data will be stored at the end of each turn<br />
<br />
Character is a "team" of three units. Each unit have own stats, small inventory and spellbook.<br />
;Stats:<br />
:Stamina - increases your hitpoints. ''Each point of stamina should increase survivalalibity of unit for an average amount of damage, given by 1 strength or agility, multiplied by 6.<br />
:Strength - increases your melee damage and armor contribution from items.<br />
:Speed - increases your movement points.<br />
:Agility - increase your ranged damage and defense on each type of terrain.<br />
::100 * A / (A + 30) 60% Defence at 45 agility<br />
::100 * A / (A + 20) 60% Defence at 30 agility<br />
::100 * A / (A + 10) 60% Defence at 15 agility<br />
:Intellect - increase magical potence of unit in some ways<br />
<br />
;Inventory:<br />
:Melee Weapon - affects melee combat: multiplies damage from strength and number of strikes.<br />
:Ranged Weapon - affects ranged combat: multiplies damage from agility and number of strikes.<br />
:Amulet - affects base stats, magical resistances and magical potency of unit<br />
:Body Armor - affects base stats, all resistances and defenses.<br />
:Boots - affects base stats and multiplies speed of unit.<br />
:Helm - affects melee resistances and magical potence of unit.<br />
<br />
Free slots are shared between all units on the gamefield. Each side had it own free slot inventory. I don't like this but I have no way to do it personal. Virtual data about them should be stored in structure "character[<side>]..."<br />
{|border="1"<br />
|free_slot<br />
|item_id<br>item_type<br />
|}<br />
Virtual data about units will be stored in structure "character[<side>].unit[<unit id>]..."<br />
Each item have it's own stats. Stats are directly named.<br />
<table width=100%><tr><td colspan="3" align="center"><h4>Content of "unit" structure.</h4></td></tr><tr><td><br />
{| border="1"<br />
|rowspan="8"|inv<br />
|body_item_id<br>boots_item_id<br>head_item_id<br>amulet_item_id<br>melee_item_id<br>ranged_item_id<br />
|<br />
|-<br />
|body_user_name<br>boots_user_name<br>head_user_name<br>amulet_user_name <br>melee_user_name<br>ranged_user_name<br />
|<br />
|-<br />
|body<br />
|0 - stamina<br>1 - strength<br>2 - agility<br>3 - pierce<br>4 - blade<br>5 - blow<br>6 - arcane<br>7 - fire<br>8 - cold<br />
|-<br />
|boots<br />
|0 - stamina<br>1 - strength<br>2 - agility<br>3 - speed<br>4 - speed_multiplier<br />
|-<br />
|head<br />
|0 - intellect<br>1 - pierce<br>2 - blade<br>3 - blow<br />
|-<br />
|amulet<br />
|0 - intellect<br>1 - stamina<br>2 - arcane<br>3 - fire<br>4 - cold<br />
|-<br />
|melee<br />
|0 - strength_multiplier<br>1 - base damage<br>2 - speed<br>3 - type<br>4 - defense<br />
|-<br />
|ranged<br />
|0 - agility_multiplier<br>1 - base damage<br>2 - speed<br>3 - type<br />
|}<br />
</td><br />
<td><br />
''Class should not determine defenses and resistances''<br />
{|border="1"<br />
|class<br />
|0 - stamina<br>1 - strength<br>2 - agility<br>3 - speed<br>4 -intellect<br />
|}<br />
</td><br />
<td><br />
{|border="2"<br />
|buffed<br />
|0 - strength<br>1 - agility<br>2 - speed<br>3 - pierce<br>4 - blade<br>5 - blow<br>6 - arcane<br>7 - fire<br>8 - cold<br>9 - hitpoints_multiplier<br>10 - damage_multiplier<br>11 - speed_multiplier<br>12 - defense<br />
|}<br />
</td><br />
</tr><br />
</table><br />
<br />
;Spell system:<br />
:Each class have some predefined spells. ''In most cases they are not simple "damage unit X for Y hp". That's why they are the greatest headache for me.''<br />
:Each unit can use it's spell once per turn.<br />
:There are no limit of uses through whole scenario.<br />
<br />
Each item has it own's id. This ID is the key to macro what will apply effect of item stats to unit structure. Data about it will be stored inside WesMMO era. That allows me to implement 'inventory slots'. Players will carry unused items in them.<br />
<br />
;Persistent data:<br />
:amulet_item_id_<unit index><br><br />
:body_item_id_<unit index><br />
:boots_item_id_<unit index><br />
:class_name_<unit index><br />
:head_item_id_<unit index><br />
:level_<unit index><br />
:melee_item_id_<unit index><br />
:ranged_item_id_<unit index><br />
:total_characters<br />
:total_free_slots<br />
:free_slot_item_type_<slot number><br />
:free_slot_item_id_<slot number><br />
<br />
I will add to the Era thread sample feedback:<br />
<br />
1) What version of Wesnoth, WesMMO and which scenario have you played?<br />
2) How difficult did you find the scenario? (1-10)<br />
3) How clear did you find the scenario objectives?<br />
4) How clear and interesting did you find the dialog and storyline of the scenario?<br />
5) What were your major challenges in meeting the objectives of the scenario?<br />
6) How fun do you think the scenario is? (1-10)<br />
7) What, if any, are changes you would have made to the scenario to make it more fun?<br />
8) Was there any event that caused you to lose the game and forced you to restart the game?<br />
9) WesMMO needs new title. Propose your opinion about it. (optional)<br />
10) How convenient do you think the UI is (inventory, trade, creation dialogs)? (1-10)<br />
11) What, if any, are changes you would made to the UI to make it more convenient?<br />
12) How balansed did you find the units? (1-10)<br />
13) Name the most owerpowered unit. Why does you name it?<br />
14) What is your favorite unit? Why?<br />
15) What, if any, are changes you would made to units to make game more fun?<br />
Thoughts:<br />
<br />
Ideas:<br />
#situation: players A,B,C,D starts the game. player B leaves game before it ends. spectator E (player A) takes control of units B. players A,E,C,D ends the game and information about their units is stored to persistent. player E gets units of player B.<br />
#suggestion: Best items should kill much time before player get them, but players should get something each time they play this game. Ways to reach this objective:<br />
#*1) Add "random stats" to items. Then item drops, RNG choose stats on them between predefined sets. 1/4 of randem stat set (RaSS) should be awesome and 1/4 should be real crap.<br />
#*2) Add "crafted items". Players should collect some resourses and get to place where they can craft this item.<br />
#Itemisation(1). WesMMO will be published by patches. In each patch I will add some new items and functions to players. Items added in new patch should be better than items added in previous patch. But difference should not be enormous.<br />
#levelling(1). I would not change standart mechanic of XP colection of BfW. Each player have 3 unit, what allows them to prapare and perform last-hit for any unit. Levelling shouldn't make items of this patch worster.<br />
#Levelling(2). Data, stored in unit.class[], should contain multipliers of stats. Later this will be used to recalculate stats of unit.<br />
#Itemisation(2). There are three items: A(require 1-3 of X), B(require 2-5 of X), C(require 4-8 of X). While player have 3 X, he can't share A and B to others if he get them and can not use C. But when he collect 4 X, he can share A, can't share B and can use C.<br />
#Crafted items++. If craft of new items will require resourses from old patch, old maps will become outdated only if I will want this.<br />
#Itemisation(3). Items should have requirments by level.<br />
#Levelling(3). There should be a level cap in each patch.<br />
#Itemisation(4). Items can have no requirements by level, but stats on item can be influensed by level.<br />
#Itemisation(5). Add "mantle". It will have +int, +stam and magical resistances. Body no longer affect magical resistences and stam.<br />
#Development(1). Add various "count" functions to collect statistical data about each option in dialogs. This data should be stored in special namespace. Then this will be done, I should add to feedback thread request to put file with this data to the forum.<br />
#UI(1). Frankensteining. Each equipped item will have it's own overlay on unit. During the fights overlays aren't shown. Thats why I should create attack and defend animations what will look like cloud with "Ouch" messages jumped out of it.<br />
#UI(2). Fast backpack browser<br />
+-----------------------------+<br />
| Backpack browser<br />
| +-------------------------+ |<br />
| | Back<br />
| +-------------------------+ |<br />
| +-------------------------+ |<br />
| | Next 10(5?)<br />
| +-------------------------+ |<br />
| +-------------------------+ |<br />
| | Previous 10(5?)<br />
| +-------------------------+ |<br />
| +-------------------------+ |<br />
| | item_slot) item_name id | |<br />
| +-------------------------+ |<br />
| +-------------------------+ |<br />
| | 2) Cracked Bow <id><br />
| +-------------------------+ |<br />
+-----------------------------+<br />
<br />
#UI(3). Resourse browser<br />
<br />
===WesMMO. Theorycraft===<br />
;Main questions:<br />
:1) I have some 'slots' of equipped items. Why player should fill all this slots?<br />
:2) I have some 'stats' on items. Why player should concentrate on some stats and ignore other?<br />
:3) There are some 'classes' of characters. How to make real difference between any two classes?<br />
:4) How to make class system where anticlasses will exists.<br />
<br />
;Base statements:<br />
:Player control 3 units.<br />
:Units have around 5 equipment 'slots' and few stats.<br />
:Any damage dealing should be based on stadart battle system.<br />
:There are around 5-10 different classes.<br />
:Each class have at least 2 good, 2 worst and 2 average attack types and defenses.<br />
:Item can not affect 2 good or 2 worst stats for any class at once.<br />
:Bonuses from items should not break class balance.<br />
:Items are not able to affect all stats.<br />
:All characters have same movement cost and base defence at any type of terrain.<br />
:Any character is able to wear any item he gets.<br />
<br />
;Stat system<br />
Handling good/average/worst stats for any class.<br />
Each class will have set of modifiers, what will affect resistances. It can be equal to 1 (good), 2 (average), 4 (worst).<br />
''main formula of effect diminishing'':<br />
y = x / (a * x + 20) * 100%, where<br />
x - value from gear,<br />
a - class modifier.<br />
According to this formula, there are 3 tier of armor exists:<br />
1 tier: gear give 1-20 value (5-50;5-33;5-20)<br />
2 tier: gear give 20-40 value (50-66;33-40;20-22)<br />
3 tier: gear give 40-80 value (66-80;40-45;22-23)<br />
The following stats are good for any class:<br />
:hitpoint amount. ''Even mages with ranged combat should stand face-to-face to it's current opponent. Noone can one-shot any other class with full hp. Thats why mage surely will get some amount of damage from counterattack.<br />
:movepoints amount. ''Difference in 1 point of movement make one unit unreachable by other.<br />
<br />
There are 5 equippable slots:<br />
:1 - affects magical combat<br />
:2 - affects defences<br />
:3 - affects melee combat<br />
:4 - affects ranged combat<br />
:5 - affects movement<br />
<br />
If item affects combat, it always says how many strikes you have and how much damage you will deal with this item. This should also be influenced by class, in some way, to make sure, what character A can not be owerpowered just because enemy have wrong and this class - right weapon.<br />
<br />
How can I make difference for class A between weapon a and b?<br />
:1) Class multiplier. ''Multipliers for damage is not a good idea.<br />
:2) Gear hacking. ''This way is rather hard, but possible.<br />
:3) Weapon blocking. ''Easy as pie.<br />
<br />
How much classes I can create?<br />
There are 6 types of resistance. Let's imagine what all stats have counterstats. One cannot be good if other is not worst. There is absolutely no difference about deciding how to divide them, this also can be changed later via name-swapping.<br />
There is my division:<br />
:blade - fire<br />
:pierce - arcane<br />
:blow - cold<br />
There are 11 combination of stats after this rule. Thats should be enough, I think. At this moment, i'll take 3 of them.<br />
:Class: good (worst) [average]<br />
:A: Blade + blow (Fire - cold) [arcane + pierce]<br />
:B: Pierce + fire (Arcane - blade) [arcane + blade]<br />
:C: Arcane + cold (Blow - pierce) [blow + pierce]<br />
<br />
Class cannot wield weapons, what deal 'worst' type of damage. Race "who deal first attack" is result of this. And there should not be any other limits. Players should decide what to do next without my help.<br />
<br />
Damage and number of strikes completely influenced by weapon. That means, what weapons of same tier, will have same damage output.<br />
:Blade-based melee weapons are fast. Ex: 2-6<br />
:Blow-based melee weapons are true average. 3-4 or 4-3<br />
:Only arcane melee weapon allowed. it's speed and damage is not good, but it is not influenced by common physical miss chance.<br />
:Pierce weapons are usually ranged and rather fast. 3-4 or 2-6.<br />
:Fire magic is one-shottable. 12-1 and cannot miss, of cource.<br />
:Cold magic is a pain. 1-12.<br />
<br />
There are 2 group of stats:<br />
:''Active''<br />
:''Passive''<br />
There are two ''active'' stat: hitpoint and damage, and two ''passive'': dodge chance and absorbition.<br />
And total list of stats will look like this:<br />
+--------------------+---+<br />
| stat |PPL|<br />
+--------------------+---+<br />
| hitpoints |60 |<br />
+-------+------------+---+<br />
| blade | | |<br />
| blow | | |<br />
| pierce|absorbitions| 5 |<br />
| arcane| | |<br />
| fire | | |<br />
| cold | | |<br />
+-------+------------+---+<br />
| blade | | |<br />
| blow | | |<br />
| pierce| power |10 |<br />
| arcane| | |<br />
| fire | | |<br />
| cold | | |<br />
+-------+------------+---+<br />
| avoidance | 4 |<br />
+-------+------------+---+<br />
Absorbitions have limits in 12 levels.<br />
Let's imagine, what absorbition capped at 75% value. According to ''main formula of effect diminishing'', character with a=1 will achieve 75% mitigation at x=60. And 60 / 5 = 12.<br />
<br />
Look to this table:<br />
x value difference value difference value difference<br />
0 0 0 0 <br />
5 16,66666667 16,66666667 12,5 12,5 20 20<br />
10 25 8,333333333 16,66666667 4,166666667 33,33333333 13,33333333<br />
15 30 5 18,75 2,083333333 42,85714286 9,523809524<br />
20 33,33333333 3,333333333 20 1,25 50 7,142857143<br />
25 35,71428571 2,380952381 20,83333333 0,833333333 55,55555556 5,555555556<br />
30 37,5 1,785714286 21,42857143 0,595238095 60 4,444444444<br />
35 38,88888889 1,388888889 21,875 0,446428571 63,63636364 3,636363636<br />
40 40 1,111111111 22,22222222 0,347222222 66,66666667 3,03030303<br />
45 40,90909091 0,909090909 22,5 0,277777778 69,23076923 2,564102564<br />
50 41,66666667 0,757575758 22,72727273 0,227272727 71,42857143 2,197802198<br />
55 42,30769231 0,641025641 22,91666667 0,189393939 73,33333333 1,904761905<br />
60 42,85714286 0,549450549 23,07692308 0,16025641 75 1,666666667<br />
2'nd column shows mitigation value at a = 2, 4'th at a = 4 and 6'th at a = 1. If you calculate average value of all difference columns and turn float value to int, you get 4. This is Avoidance PPL.<br />
There are also ''Soft cap'' and ''hard cap'' of mitigation. Soft cap means what further collecting of this stat is useful, but player can spend training points into something more valuable. Hard cap means what further improvement is not recommended (by me of course).<br />
:for a = 1. SC = 30. HC = 60<br />
:for a = 2. SC = 20. HC = 40.<br />
:for a = 4. SC = 10. HC = 20.<br />
Avoidance should give static value, because it is not depend from character class. And it should be capped too. According to wesnoth phylosophy, defence should not be higner than 60. 60 / 4 = 15 levels of stat.<br />
<br />
Each character have 2 good stat, 2 average, 2 bad and some avoidance value. To HC them, player should level it up 2 * 12 + 2 * 8 + 2 * 4 + 16 = 64 times. And some infinite number times to build damage and hitpoints. Actually I think that player should build SC value of all defences or HC ''good stat'' and without (!) defence, build hitpoints or damage, depending from purpose of this unit. This is around 30 or 40 levels up. How much experience should character have to level up fast enough to see all it's powers?</div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=User:Xudojnik&diff=46851User:Xudojnik2012-07-28T18:02:03Z<p>Xudojnik: /* Zombie Apocalypse Engine */</p>
<hr />
<div>{{WML Tags}}<br />
I know Wesnoth from version 1.1.2a. This is really perspective game not only as strategy, but as RPG too. Large world, filled by history, epic battles, heroes and factions, is perfect for creating RPG. It's not so hard because Wesnoth have simple language, what support wide variety of events, easy way to define dialogs, items, forum and Wiki, where always can be found answer for any question.<br />
<br />
=== Zombie Apocalypse Engine ===<br />
This is a framework for Zombie-survival maps.<br />
I'm going to add following features:<br />
* Fix animations. Move animation definition to database.<br />
* Restore "knokback" weapon special<br />
* Make load of core database optional - split it to two events: filling database by data, linking tables<br />
* Flexible power-ups<br />
<br />
===WesMMO===<br />
To play it (now only in theory):<br />
#*Download WesMMO era.<br />
#*Download any map, designed for WesMMO.<br />
#*Create game in lobby.<br />
#*WesMMO era will automatically use your account.<br />
#*Now choose any three units from your account or create new and play.<br />
#*Persistent data will be stored at the end of each turn<br />
<br />
Character is a "team" of three units. Each unit have own stats, small inventory and spellbook.<br />
;Stats:<br />
:Stamina - increases your hitpoints. ''Each point of stamina should increase survivalalibity of unit for an average amount of damage, given by 1 strength or agility, multiplied by 6.<br />
:Strength - increases your melee damage and armor contribution from items.<br />
:Speed - increases your movement points.<br />
:Agility - increase your ranged damage and defense on each type of terrain.<br />
::100 * A / (A + 30) 60% Defence at 45 agility<br />
::100 * A / (A + 20) 60% Defence at 30 agility<br />
::100 * A / (A + 10) 60% Defence at 15 agility<br />
:Intellect - increase magical potence of unit in some ways<br />
<br />
;Inventory:<br />
:Melee Weapon - affects melee combat: multiplies damage from strength and number of strikes.<br />
:Ranged Weapon - affects ranged combat: multiplies damage from agility and number of strikes.<br />
:Amulet - affects base stats, magical resistances and magical potency of unit<br />
:Body Armor - affects base stats, all resistances and defenses.<br />
:Boots - affects base stats and multiplies speed of unit.<br />
:Helm - affects melee resistances and magical potence of unit.<br />
<br />
Free slots are shared between all units on the gamefield. Each side had it own free slot inventory. I don't like this but I have no way to do it personal. Virtual data about them should be stored in structure "character[<side>]..."<br />
{|border="1"<br />
|free_slot<br />
|item_id<br>item_type<br />
|}<br />
Virtual data about units will be stored in structure "character[<side>].unit[<unit id>]..."<br />
Each item have it's own stats. Stats are directly named.<br />
<table width=100%><tr><td colspan="3" align="center"><h4>Content of "unit" structure.</h4></td></tr><tr><td><br />
{| border="1"<br />
|rowspan="8"|inv<br />
|body_item_id<br>boots_item_id<br>head_item_id<br>amulet_item_id<br>melee_item_id<br>ranged_item_id<br />
|<br />
|-<br />
|body_user_name<br>boots_user_name<br>head_user_name<br>amulet_user_name <br>melee_user_name<br>ranged_user_name<br />
|<br />
|-<br />
|body<br />
|0 - stamina<br>1 - strength<br>2 - agility<br>3 - pierce<br>4 - blade<br>5 - blow<br>6 - arcane<br>7 - fire<br>8 - cold<br />
|-<br />
|boots<br />
|0 - stamina<br>1 - strength<br>2 - agility<br>3 - speed<br>4 - speed_multiplier<br />
|-<br />
|head<br />
|0 - intellect<br>1 - pierce<br>2 - blade<br>3 - blow<br />
|-<br />
|amulet<br />
|0 - intellect<br>1 - stamina<br>2 - arcane<br>3 - fire<br>4 - cold<br />
|-<br />
|melee<br />
|0 - strength_multiplier<br>1 - base damage<br>2 - speed<br>3 - type<br>4 - defense<br />
|-<br />
|ranged<br />
|0 - agility_multiplier<br>1 - base damage<br>2 - speed<br>3 - type<br />
|}<br />
</td><br />
<td><br />
''Class should not determine defenses and resistances''<br />
{|border="1"<br />
|class<br />
|0 - stamina<br>1 - strength<br>2 - agility<br>3 - speed<br>4 -intellect<br />
|}<br />
</td><br />
<td><br />
{|border="2"<br />
|buffed<br />
|0 - strength<br>1 - agility<br>2 - speed<br>3 - pierce<br>4 - blade<br>5 - blow<br>6 - arcane<br>7 - fire<br>8 - cold<br>9 - hitpoints_multiplier<br>10 - damage_multiplier<br>11 - speed_multiplier<br>12 - defense<br />
|}<br />
</td><br />
</tr><br />
</table><br />
<br />
;Spell system:<br />
:Each class have some predefined spells. ''In most cases they are not simple "damage unit X for Y hp". That's why they are the greatest headache for me.''<br />
:Each unit can use it's spell once per turn.<br />
:There are no limit of uses through whole scenario.<br />
<br />
Each item has it own's id. This ID is the key to macro what will apply effect of item stats to unit structure. Data about it will be stored inside WesMMO era. That allows me to implement 'inventory slots'. Players will carry unused items in them.<br />
<br />
;Persistent data:<br />
:amulet_item_id_<unit index><br><br />
:body_item_id_<unit index><br />
:boots_item_id_<unit index><br />
:class_name_<unit index><br />
:head_item_id_<unit index><br />
:level_<unit index><br />
:melee_item_id_<unit index><br />
:ranged_item_id_<unit index><br />
:total_characters<br />
:total_free_slots<br />
:free_slot_item_type_<slot number><br />
:free_slot_item_id_<slot number><br />
<br />
I will add to the Era thread sample feedback:<br />
<br />
1) What version of Wesnoth, WesMMO and which scenario have you played?<br />
2) How difficult did you find the scenario? (1-10)<br />
3) How clear did you find the scenario objectives?<br />
4) How clear and interesting did you find the dialog and storyline of the scenario?<br />
5) What were your major challenges in meeting the objectives of the scenario?<br />
6) How fun do you think the scenario is? (1-10)<br />
7) What, if any, are changes you would have made to the scenario to make it more fun?<br />
8) Was there any event that caused you to lose the game and forced you to restart the game?<br />
9) WesMMO needs new title. Propose your opinion about it. (optional)<br />
10) How convenient do you think the UI is (inventory, trade, creation dialogs)? (1-10)<br />
11) What, if any, are changes you would made to the UI to make it more convenient?<br />
12) How balansed did you find the units? (1-10)<br />
13) Name the most owerpowered unit. Why does you name it?<br />
14) What is your favorite unit? Why?<br />
15) What, if any, are changes you would made to units to make game more fun?<br />
Thoughts:<br />
<br />
Ideas:<br />
#situation: players A,B,C,D starts the game. player B leaves game before it ends. spectator E (player A) takes control of units B. players A,E,C,D ends the game and information about their units is stored to persistent. player E gets units of player B.<br />
#suggestion: Best items should kill much time before player get them, but players should get something each time they play this game. Ways to reach this objective:<br />
#*1) Add "random stats" to items. Then item drops, RNG choose stats on them between predefined sets. 1/4 of randem stat set (RaSS) should be awesome and 1/4 should be real crap.<br />
#*2) Add "crafted items". Players should collect some resourses and get to place where they can craft this item.<br />
#Itemisation(1). WesMMO will be published by patches. In each patch I will add some new items and functions to players. Items added in new patch should be better than items added in previous patch. But difference should not be enormous.<br />
#levelling(1). I would not change standart mechanic of XP colection of BfW. Each player have 3 unit, what allows them to prapare and perform last-hit for any unit. Levelling shouldn't make items of this patch worster.<br />
#Levelling(2). Data, stored in unit.class[], should contain multipliers of stats. Later this will be used to recalculate stats of unit.<br />
#Itemisation(2). There are three items: A(require 1-3 of X), B(require 2-5 of X), C(require 4-8 of X). While player have 3 X, he can't share A and B to others if he get them and can not use C. But when he collect 4 X, he can share A, can't share B and can use C.<br />
#Crafted items++. If craft of new items will require resourses from old patch, old maps will become outdated only if I will want this.<br />
#Itemisation(3). Items should have requirments by level.<br />
#Levelling(3). There should be a level cap in each patch.<br />
#Itemisation(4). Items can have no requirements by level, but stats on item can be influensed by level.<br />
#Itemisation(5). Add "mantle". It will have +int, +stam and magical resistances. Body no longer affect magical resistences and stam.<br />
#Development(1). Add various "count" functions to collect statistical data about each option in dialogs. This data should be stored in special namespace. Then this will be done, I should add to feedback thread request to put file with this data to the forum.<br />
#UI(1). Frankensteining. Each equipped item will have it's own overlay on unit. During the fights overlays aren't shown. Thats why I should create attack and defend animations what will look like cloud with "Ouch" messages jumped out of it.<br />
#UI(2). Fast backpack browser<br />
+-----------------------------+<br />
| Backpack browser<br />
| +-------------------------+ |<br />
| | Back<br />
| +-------------------------+ |<br />
| +-------------------------+ |<br />
| | Next 10(5?)<br />
| +-------------------------+ |<br />
| +-------------------------+ |<br />
| | Previous 10(5?)<br />
| +-------------------------+ |<br />
| +-------------------------+ |<br />
| | item_slot) item_name id | |<br />
| +-------------------------+ |<br />
| +-------------------------+ |<br />
| | 2) Cracked Bow <id><br />
| +-------------------------+ |<br />
+-----------------------------+<br />
<br />
#UI(3). Resourse browser<br />
<br />
===WesMMO. Theorycraft===<br />
;Main questions:<br />
:1) I have some 'slots' of equipped items. Why player should fill all this slots?<br />
:2) I have some 'stats' on items. Why player should concentrate on some stats and ignore other?<br />
:3) There are some 'classes' of characters. How to make real difference between any two classes?<br />
:4) How to make class system where anticlasses will exists.<br />
<br />
;Base statements:<br />
:Player control 3 units.<br />
:Units have around 5 equipment 'slots' and few stats.<br />
:Any damage dealing should be based on stadart battle system.<br />
:There are around 5-10 different classes.<br />
:Each class have at least 2 good, 2 worst and 2 average attack types and defenses.<br />
:Item can not affect 2 good or 2 worst stats for any class at once.<br />
:Bonuses from items should not break class balance.<br />
:Items are not able to affect all stats.<br />
:All characters have same movement cost and base defence at any type of terrain.<br />
:Any character is able to wear any item he gets.<br />
<br />
;Stat system<br />
Handling good/average/worst stats for any class.<br />
Each class will have set of modifiers, what will affect resistances. It can be equal to 1 (good), 2 (average), 4 (worst).<br />
''main formula of effect diminishing'':<br />
y = x / (a * x + 20) * 100%, where<br />
x - value from gear,<br />
a - class modifier.<br />
According to this formula, there are 3 tier of armor exists:<br />
1 tier: gear give 1-20 value (5-50;5-33;5-20)<br />
2 tier: gear give 20-40 value (50-66;33-40;20-22)<br />
3 tier: gear give 40-80 value (66-80;40-45;22-23)<br />
The following stats are good for any class:<br />
:hitpoint amount. ''Even mages with ranged combat should stand face-to-face to it's current opponent. Noone can one-shot any other class with full hp. Thats why mage surely will get some amount of damage from counterattack.<br />
:movepoints amount. ''Difference in 1 point of movement make one unit unreachable by other.<br />
<br />
There are 5 equippable slots:<br />
:1 - affects magical combat<br />
:2 - affects defences<br />
:3 - affects melee combat<br />
:4 - affects ranged combat<br />
:5 - affects movement<br />
<br />
If item affects combat, it always says how many strikes you have and how much damage you will deal with this item. This should also be influenced by class, in some way, to make sure, what character A can not be owerpowered just because enemy have wrong and this class - right weapon.<br />
<br />
How can I make difference for class A between weapon a and b?<br />
:1) Class multiplier. ''Multipliers for damage is not a good idea.<br />
:2) Gear hacking. ''This way is rather hard, but possible.<br />
:3) Weapon blocking. ''Easy as pie.<br />
<br />
How much classes I can create?<br />
There are 6 types of resistance. Let's imagine what all stats have counterstats. One cannot be good if other is not worst. There is absolutely no difference about deciding how to divide them, this also can be changed later via name-swapping.<br />
There is my division:<br />
:blade - fire<br />
:pierce - arcane<br />
:blow - cold<br />
There are 11 combination of stats after this rule. Thats should be enough, I think. At this moment, i'll take 3 of them.<br />
:Class: good (worst) [average]<br />
:A: Blade + blow (Fire - cold) [arcane + pierce]<br />
:B: Pierce + fire (Arcane - blade) [arcane + blade]<br />
:C: Arcane + cold (Blow - pierce) [blow + pierce]<br />
<br />
Class cannot wield weapons, what deal 'worst' type of damage. Race "who deal first attack" is result of this. And there should not be any other limits. Players should decide what to do next without my help.<br />
<br />
Damage and number of strikes completely influenced by weapon. That means, what weapons of same tier, will have same damage output.<br />
:Blade-based melee weapons are fast. Ex: 2-6<br />
:Blow-based melee weapons are true average. 3-4 or 4-3<br />
:Only arcane melee weapon allowed. it's speed and damage is not good, but it is not influenced by common physical miss chance.<br />
:Pierce weapons are usually ranged and rather fast. 3-4 or 2-6.<br />
:Fire magic is one-shottable. 12-1 and cannot miss, of cource.<br />
:Cold magic is a pain. 1-12.<br />
<br />
There are 2 group of stats:<br />
:''Active''<br />
:''Passive''<br />
There are two ''active'' stat: hitpoint and damage, and two ''passive'': dodge chance and absorbition.<br />
And total list of stats will look like this:<br />
+--------------------+---+<br />
| stat |PPL|<br />
+--------------------+---+<br />
| hitpoints |60 |<br />
+-------+------------+---+<br />
| blade | | |<br />
| blow | | |<br />
| pierce|absorbitions| 5 |<br />
| arcane| | |<br />
| fire | | |<br />
| cold | | |<br />
+-------+------------+---+<br />
| blade | | |<br />
| blow | | |<br />
| pierce| power |10 |<br />
| arcane| | |<br />
| fire | | |<br />
| cold | | |<br />
+-------+------------+---+<br />
| avoidance | 4 |<br />
+-------+------------+---+<br />
Absorbitions have limits in 12 levels.<br />
Let's imagine, what absorbition capped at 75% value. According to ''main formula of effect diminishing'', character with a=1 will achieve 75% mitigation at x=60. And 60 / 5 = 12.<br />
<br />
Look to this table:<br />
x value difference value difference value difference<br />
0 0 0 0 <br />
5 16,66666667 16,66666667 12,5 12,5 20 20<br />
10 25 8,333333333 16,66666667 4,166666667 33,33333333 13,33333333<br />
15 30 5 18,75 2,083333333 42,85714286 9,523809524<br />
20 33,33333333 3,333333333 20 1,25 50 7,142857143<br />
25 35,71428571 2,380952381 20,83333333 0,833333333 55,55555556 5,555555556<br />
30 37,5 1,785714286 21,42857143 0,595238095 60 4,444444444<br />
35 38,88888889 1,388888889 21,875 0,446428571 63,63636364 3,636363636<br />
40 40 1,111111111 22,22222222 0,347222222 66,66666667 3,03030303<br />
45 40,90909091 0,909090909 22,5 0,277777778 69,23076923 2,564102564<br />
50 41,66666667 0,757575758 22,72727273 0,227272727 71,42857143 2,197802198<br />
55 42,30769231 0,641025641 22,91666667 0,189393939 73,33333333 1,904761905<br />
60 42,85714286 0,549450549 23,07692308 0,16025641 75 1,666666667<br />
2'nd column shows mitigation value at a = 2, 4'th at a = 4 and 6'th at a = 1. If you calculate average value of all difference columns and turn float value to int, you get 4. This is Avoidance PPL.<br />
There are also ''Soft cap'' and ''hard cap'' of mitigation. Soft cap means what further collecting of this stat is useful, but player can spend training points into something more valuable. Hard cap means what further improvement is not recommended (by me of course).<br />
:for a = 1. SC = 30. HC = 60<br />
:for a = 2. SC = 20. HC = 40.<br />
:for a = 4. SC = 10. HC = 20.<br />
Avoidance should give static value, because it is not depend from character class. And it should be capped too. According to wesnoth phylosophy, defence should not be higner than 60. 60 / 4 = 15 levels of stat.<br />
<br />
Each character have 2 good stat, 2 average, 2 bad and some avoidance value. To HC them, player should level it up 2 * 12 + 2 * 8 + 2 * 4 + 16 = 64 times. And some infinite number times to build damage and hitpoints. Actually I think that player should build SC value of all defences or HC ''good stat'' and without (!) defence, build hitpoints or damage, depending from purpose of this unit. This is around 30 or 40 levels up. How much experience should character have to level up fast enough to see all it's powers?</div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=InternalActionsWML&diff=46850InternalActionsWML2012-07-28T17:33:35Z<p>Xudojnik: </p>
<hr />
<div>{{WML Tags}}<br />
<br />
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.<br />
<br />
== Variable Actions ==<br />
<br />
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.<br />
<br />
=== [set_variable] ===<br />
<br />
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.<br />
<br />
* '''name''': the name of the variable to manipulate<br />
<br />
* '''value''': set the variable to the given value (can be numeric or string).Use literal for no substitution. (see [[VariablesWML]])<br />
<br />
* '''literal''': set the variable to the given value (can be numeric or string). This does not interpret any dollars signs.<br />
<br />
* '''to_variable''': set the variable to the value of the given variable, e.g. 'to_variable=temp' would be equivalent to 'value=$temp'.<br />
<br />
* '''add''': add the given amount to the variable.<br />
<br />
* '''sub''': subtract the given amount from the variable.<br />
<br />
* '''multiply''': multiply the variable by the given number. The result is a float.<br />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.<br />
<br />
* '''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.<br />
<br />
* '''modulo''': returns the remainder of a division.<br />
<br />
* '''rand''': the variable will be randomly set.<br>You may provide a comma separated list of possibilities, e.g. 'random=Bob,Bill,Bella'.<br>You may provide a range of numbers (integers), e.g. 'random=3..5'.<br>You may combine these, e.g. 'random=100,1..9', in which case there would be 1/10th chance of getting 100, just like for each of 1 to 9. See [[BuildingMultiplayerExamples]] for more info on the MP case.<br />
<br />
* '''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.<br />
<br />
* '''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).<br />
<br />
* '''[join]''' joins an array of strings to create a textual list<br />
** '''variable''': name of the array<br />
** '''key''': the key of each array element(array[$i].foo) in which the strings are stored<br />
** '''separator''': separator to connect the elements<br />
** '''remove_empty''': whether to ignore empty elements<br />
<br />
* '''ipart''': Assigns the integer part (the part to the left of the comma) of the referenced variable.<br />
<br />
* '''fpart''': Assigns the decimal part (the part to the right of the comma) of the referenced variable.<br />
<br />
* '''round''': Rounds the variable to the specified number of digits of precision. Negative precision works as expected (rounding 19517 to -2 = 19500). Special values:<br />
**'''round=ceil''': Rounds upward to the nearest integer.<br />
**'''round=floor''': Rounds down to the nearest integer.<br />
<br />
=== [set_variables] ===<br />
<br />
Manipulates a WML array or container<br />
<br />
* '''name''': the name of the array or container to manipulate<br />
<br />
* '''mode''': one of the following values:<br />
** ''replace'': will clean the array '''name''' and replace it with given data<br />
** ''append'': will append given data to the current array<br />
** ''merge'': will merge in the given data into '''name'''<br />
** ''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.<br />
<br />
* '''to_variable''': data will be set to the given array<br />
<br />
* '''[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]])<br />
<br />
* '''[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<br />
<br />
*'''[split]''' splits a textual list into an array which will then be set to data<br />
** '''list''': textual list to split<br />
** '''key''': the key of each array element(array[$i].foo) in which the strings are stored<br />
** '''separator''': separator to separate the elements<br />
** '''remove_empty''': whether to ignore empty elements<br />
<br />
=== Capturing Game Data ===<br />
<br />
These actions capture different bits of game data and store them to variables so they can be examined and/or manipulated.<br />
<br />
==== [store_gold] ====<br />
<br />
Stores a side's gold into a variable.<br />
<br />
* '''[[StandardSideFilter]]''': The first matching side's gold will be stored in the variable "variable".<br />
* '''variable''': (default='gold') the name of the variable to store the gold in<br />
<br />
==== [store_locations] ====<br />
<br />
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.<br />
<br />
* [[StandardLocationFilter]]: a location or location range which specifies the locations to store. By default, all locations on the map are stored.<br />
<br />
* '''variable''': the name of the variable (array) into which to store the locations.<br />
<br />
==== [store_reachable_locations] ====<br />
<br />
Stores locations reachable by the given units. Can store either the movement, attack or vision ranges.<br />
<br />
* '''[filter]''': a [[StandardUnitFilter]]. The locations reachable by any of the matching units will be stored.<br />
* '''[filter_location]''': (optional) a [[StandardLocationFilter]]. Only locations which also match this filter will be stored.<br />
* '''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).<br />
* '''moves''': possible values ''current'' (default), ''max''. Specifies whether to use the current or maximum movement points when calculating the range.<br />
* '''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.<br />
* '''variable''': the name of the variable (array) into which to store the locations.<br />
<br />
==== [store_map_dimensions] ====<br />
<br />
Stores the map dimensions in a variable.<br />
<br />
* '''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''.<br />
<br />
==== [store_side] ====<br />
<br />
Stores information about a certain side in a variable. The variable will contain the member variables 'name', 'team_name', 'gold' and 'income', 'fog', 'shroud', 'hidden', 'user_team_name', 'color', 'controller', 'village_gold', 'recruit', and 'side' (the $side_number of the side belonging to this container).<br />
<br />
* '''[[StandardSideFilter]]''': All matching sides are stored. (An array is created if several sides match - access it with side[2].team_name and so on.)<br />
* '''variable''': the name of the variable to store the information in (default: "side")<br />
<br />
''note: In networked multiplayer, the controller attribute is ambiguous. Be very careful or you have OOS errors.''<br />
<br />
==== [store_starting_location] ====<br />
<br />
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)<br />
<br />
* [[StandardSideFilter]]: The starting locations of all matching sides will be stored. If multiple sides are matched, a WML array will be created.<br />
* '''variable''': (default='location'): the name of the variable to store the location in<br />
<br />
==== [store_time_of_day] ====<br />
<br />
Stores time of day information from the current scenario into a WML variable container.<br />
<br />
* '''x, y''': Location to store the time for. Time areas matter, illumination does not.<br />
<br />
* '''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]].<br />
<br />
* '''turn''': (defaults to the current turn number) changes the turn number for which time of day information should be retrieved.<br />
<br />
==== [store_turns] ====<br />
<br />
Stores the turn limit (the maximum number of turns). If there is no limit, this stores ''-1''.<br />
<br />
* '''variable''': (default='turns') the name of the variable in which to store the turn limit.<br />
<br />
==== [store_unit] ====<br />
<br />
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 [[InternalActionsWMLUnitTags|here]]. 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).<br />
<br />
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.<br />
<br />
''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].''<br />
<br />
* '''[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).<br />
<br />
* '''variable''': the name of the variable into which to store the unit(s)<br />
<br />
* '''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.<br />
<br />
* '''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.<br />
<br />
==== [store_unit_type] ====<br />
<br />
* '''type''': (required) the defined ID of the unit type, for example "Goblin Knight". 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.<br />
<br />
* '''variable''': the name of the variable into which to store the unit type information (default "unit_type")<br />
<br />
==== [store_unit_type_ids] ====<br />
<br />
* '''variable''': the name of the variable into which to store a comma-separated list of all unit type IDs<br />
<br />
==== [store_villages] ====<br />
<br />
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.<br />
<br />
* '''variable''': the name of the variable (array) into which to store the locations (default: "location")<br />
* '''[[StandardLocationFilter]]''' tags and keys as arguments<br />
<br />
==== [store_items] ====<br />
<br />
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).<br />
<br />
*'''variable''': name of the wml variable array to use (default "items")<br />
*'''[[StandardLocationFilter]]''' keys as arguments: only items on locations matching this [[StandardLocationFilter]] will be stored<br />
<br />
==== [find_path] ====<br />
<br />
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.<br />
<br />
*'''[traveler]''': [[StandardUnitFilter]], only the first matching unit will be used for calculation<br />
*'''[destination]''': [[StandardLocationFilter]], only the first matching nearest hex will be used<br />
*'''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.<br />
*'''allow_multiple_turns''': default no, if yes also moves that require more than one turn will be calculated.<br />
*'''check_visibility''': default no, if yes the path will not be computed if some hexes are not visible due to shroud.<br />
*'''check_teleport''': default yes, if no teleport won't be taken in account while computing path.<br />
*'''check_zoc''': default yes, if no unit ZOCs won't be considered while calculating the path.<br />
This is the structure of the variable returned by [find_path]:<br />
[path]<br />
length = the total length of the path<br />
if the path is calculated to an impassable hex, or the move requires multiple turns<br />
and allow_multiple_turns is no, its value will be 0.<br />
hexes = in 1.11, this will replace the length key above<br />
from_x, from_y = location of the unit<br />
to_x, to_y = destination<br />
movement_cost = total movement cost required by unit to reach that hex<br />
required_turns = total turns required by unit to reach that hex<br />
[step]<br />
x, y = location of the step<br />
terrain = terrain of the step<br />
movement_cost = movement cost required by unit to reach that hex<br />
required_turns = turns required by unit to reach that hex<br />
[/step]<br />
[/path]<br />
To read the total length of the path on 1.10, use ''path.step.length''.<br><br />
{{DevFeature1.11}} ''length'' is replaced by ''hexes'' in the output array.<br />
<br />
=== [clear_variable] ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
* '''name''': the name of the variable to clear. This can also be a comma-separated list of multiple variable names.<br />
** If a name ends with an array index, then it deletes that one container, and shifts the indexes of all subsequent containers. For example, <code>{CLEAR_VARIABLE my_awesome_array[2]}</code> deletes <code>my_awesome_array[2]</code>, but then moves <code>my_awesome_array[3]</code> to <code>my_awesome_array[2]</code>, moves <code>my_awesome_array[4]</code> to <code>my_awesome_array[3]</code>, and so on until the end of the array.<br />
** Note that <code>{CLEAR_VARIABLE my_awesome_array}</code> deletes the entire array, but <code>{CLEAR_VARIABLE my_awesome_array[0]}</code> deletes only the first container.<br />
<br />
== Other Internal Actions ==<br />
<br />
Believe it or not, there are some internal actions that are not focused primarily on variables. They are all grouped here.<br />
<br />
=== [fire_event] ===<br />
<br />
Trigger a WML event<br />
<br />
* '''name''': the name of event to trigger<br />
<br />
* '''[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.<br />
**[[StandardUnitFilter]] as argument. Do not use a [filter] tag.<br />
<br />
* '''[secondary_unit]''': ''(Optional)'' Same as '''[primary_unit]''' except for the secondary unit.<br />
**[[StandardUnitFilter]] as argument. Do not use a [filter] tag.<br />
<br />
* '''[primary_attack]''': Information passed to the primary attack filter and $weapon variable on the new event.<br />
<br />
* '''[secondary_attack]''': Information passed to the second attack filter and $second_weapon variable on the new event.<br />
<br />
=== [insert_tag] ===<br />
<br />
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]]).<br />
<br />
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.<br />
<br />
*'''name''': The ["name"] 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 "option" when used within a [message]).<br />
<br />
*'''variable''': Name of the container variable which will have its value inserted into the tag.<br />
<br />
=== [role] ===<br />
<br />
Tries to find a unit to assign a role to.<br>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]]).<br>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.<br />
<br />
* '''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.<br />
<br />
* '''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.<br />
<br />
* [[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.<br />
<br />
== Examples ==<br />
<br />
=== Using [set_variables] to Create Arrays of WML ===<br />
<br />
[set_variables]<br />
name=arr<br />
mode=replace<br />
[value]<br />
foo=bar<br />
[/value]<br />
[value]<br />
foo=more<br />
[/value]<br />
[/set_variables]<br />
{DEBUG_MSG $arr[0].foo}<br />
{DEBUG_MSG $arr[1].foo}<br />
<br />
This will produce two output messages, first one saying '''bar''' and next one saying '''more'''.<br />
<br />
=== [insert_tag] Example ===<br />
<br />
[event]<br />
name=moveto<br />
<br />
[set_variable]<br />
name=temp.speaker<br />
value=Konrad<br />
[/set_variable]<br />
<br />
[set_variable]<br />
name=temp.message<br />
value= _ "Yo Kalenz!"<br />
[/set_variable] <br />
<br />
[insert_tag]<br />
name=message<br />
variable=temp<br />
[/insert_tag]<br />
[/event]<br />
<br />
This is effectively identical to:<br />
<br />
[event]<br />
name=moveto<br />
<br />
[message]<br />
speaker=Konrad<br />
message= _ "Yo Kalenz!"<br />
[/message]<br />
[/event]<br />
<br />
=== Firing the event via [insert_tag] ===<br />
Sometimes you need to fire specific event out of a wide variety, but when you make scenario you don't know which one. But before you use this, make sure what all other solutions aren't suit you.<br />
One of possible solutions is use all power of internal actions: [set_variable]+[insert_tag]+[fire_event].<br />
<br />
First of all, make sure a event is defined and included.<br />
[event]<br />
name = custom_event<br />
<br />
[message]<br />
speaker=Konrad<br />
message= _ "Yo Kalenz!"<br />
[/message]<br />
[/event]<br />
<br />
Then set a variable, which will contain name of your event.<br />
[event]<br />
name = start<br />
<br />
[set_variable]<br />
name = event_name_container.name<br />
value = "custom_event"<br />
[/set_variable]<br />
[/event]<br />
<br />
Then add insert tag where you need it. It can be [command] of menu item, or even other event.<br />
[insert_tag]<br />
name = fire_event<br />
variable = event_name_container<br />
[/insert_tag]<br />
<br />
== See Also ==<br />
* [[VariablesWML]]<br />
* [[ActionWML]]<br />
** [[ConditionalWML]]<br />
** [[DirectActionsWML]]<br />
** [[InterfaceActionsWML]]<br />
* [[EventWML]]<br />
* [[ReferenceWML]]<br />
<br />
[[Category: WML Reference]]<br />
[[Category: ActionsWML]]</div>Xudojnikhttps://wiki.wesnoth.org/index.php?title=InternalActionsWML&diff=46849InternalActionsWML2012-07-28T16:47:14Z<p>Xudojnik: /* Examples */</p>
<hr />
<div>{{WML Tags}}<br />
<br />
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.<br />
<br />
== Variable Actions ==<br />
<br />
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.<br />
<br />
=== [set_variable] ===<br />
<br />
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.<br />
<br />
* '''name''': the name of the variable to manipulate<br />
<br />
* '''value''': set the variable to the given value (can be numeric or string).Use literal for no substitution. (see [[VariablesWML]])<br />
<br />
* '''literal''': set the variable to the given value (can be numeric or string). This does not interpret any dollars signs.<br />
<br />
* '''to_variable''': set the variable to the value of the given variable, e.g. 'to_variable=temp' would be equivalent to 'value=$temp'.<br />
<br />
* '''add''': add the given amount to the variable.<br />
<br />
* '''sub''': subtract the given amount from the variable.<br />
<br />
* '''multiply''': multiply the variable by the given number. The result is a float.<br />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.<br />
<br />
* '''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.<br />
<br />
* '''modulo''': returns the remainder of a division.<br />
<br />
* '''rand''': the variable will be randomly set.<br>You may provide a comma separated list of possibilities, e.g. 'random=Bob,Bill,Bella'.<br>You may provide a range of numbers (integers), e.g. 'random=3..5'.<br>You may combine these, e.g. 'random=100,1..9', in which case there would be 1/10th chance of getting 100, just like for each of 1 to 9. See [[BuildingMultiplayerExamples]] for more info on the MP case.<br />
<br />
* '''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.<br />
<br />
* '''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).<br />
<br />
* '''[join]''' joins an array of strings to create a textual list<br />
** '''variable''': name of the array<br />
** '''key''': the key of each array element(array[$i].foo) in which the strings are stored<br />
** '''separator''': separator to connect the elements<br />
** '''remove_empty''': whether to ignore empty elements<br />
<br />
* '''ipart''': Assigns the integer part (the part to the left of the comma) of the referenced variable.<br />
<br />
* '''fpart''': Assigns the decimal part (the part to the right of the comma) of the referenced variable.<br />
<br />
* '''round''': Rounds the variable to the specified number of digits of precision. Negative precision works as expected (rounding 19517 to -2 = 19500). Special values:<br />
**'''round=ceil''': Rounds upward to the nearest integer.<br />
**'''round=floor''': Rounds down to the nearest integer.<br />
<br />
=== [set_variables] ===<br />
<br />
Manipulates a WML array or container<br />
<br />
* '''name''': the name of the array or container to manipulate<br />
<br />
* '''mode''': one of the following values:<br />
** ''replace'': will clean the array '''name''' and replace it with given data<br />
** ''append'': will append given data to the current array<br />
** ''merge'': will merge in the given data into '''name'''<br />
** ''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.<br />
<br />
* '''to_variable''': data will be set to the given array<br />
<br />
* '''[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]])<br />
<br />
* '''[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<br />
<br />
*'''[split]''' splits a textual list into an array which will then be set to data<br />
** '''list''': textual list to split<br />
** '''key''': the key of each array element(array[$i].foo) in which the strings are stored<br />
** '''separator''': separator to separate the elements<br />
** '''remove_empty''': whether to ignore empty elements<br />
<br />
=== Capturing Game Data ===<br />
<br />
These actions capture different bits of game data and store them to variables so they can be examined and/or manipulated.<br />
<br />
==== [store_gold] ====<br />
<br />
Stores a side's gold into a variable.<br />
<br />
* '''[[StandardSideFilter]]''': The first matching side's gold will be stored in the variable "variable".<br />
* '''variable''': (default='gold') the name of the variable to store the gold in<br />
<br />
==== [store_locations] ====<br />
<br />
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.<br />
<br />
* [[StandardLocationFilter]]: a location or location range which specifies the locations to store. By default, all locations on the map are stored.<br />
<br />
* '''variable''': the name of the variable (array) into which to store the locations.<br />
<br />
==== [store_reachable_locations] ====<br />
<br />
Stores locations reachable by the given units. Can store either the movement, attack or vision ranges.<br />
<br />
* '''[filter]''': a [[StandardUnitFilter]]. The locations reachable by any of the matching units will be stored.<br />
* '''[filter_location]''': (optional) a [[StandardLocationFilter]]. Only locations which also match this filter will be stored.<br />
* '''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).<br />
* '''moves''': possible values ''current'' (default), ''max''. Specifies whether to use the current or maximum movement points when calculating the range.<br />
* '''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.<br />
* '''variable''': the name of the variable (array) into which to store the locations.<br />
<br />
==== [store_map_dimensions] ====<br />
<br />
Stores the map dimensions in a variable.<br />
<br />
* '''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''.<br />
<br />
==== [store_side] ====<br />
<br />
Stores information about a certain side in a variable. The variable will contain the member variables 'name', 'team_name', 'gold' and 'income', 'fog', 'shroud', 'hidden', 'user_team_name', 'color', 'controller', 'village_gold', 'recruit', and 'side' (the $side_number of the side belonging to this container).<br />
<br />
* '''[[StandardSideFilter]]''': All matching sides are stored. (An array is created if several sides match - access it with side[2].team_name and so on.)<br />
* '''variable''': the name of the variable to store the information in (default: "side")<br />
<br />
''note: In networked multiplayer, the controller attribute is ambiguous. Be very careful or you have OOS errors.''<br />
<br />
==== [store_starting_location] ====<br />
<br />
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)<br />
<br />
* [[StandardSideFilter]]: The starting locations of all matching sides will be stored. If multiple sides are matched, a WML array will be created.<br />
* '''variable''': (default='location'): the name of the variable to store the location in<br />
<br />
==== [store_time_of_day] ====<br />
<br />
Stores time of day information from the current scenario into a WML variable container.<br />
<br />
* '''x, y''': Location to store the time for. Time areas matter, illumination does not.<br />
<br />
* '''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]].<br />
<br />
* '''turn''': (defaults to the current turn number) changes the turn number for which time of day information should be retrieved.<br />
<br />
==== [store_turns] ====<br />
<br />
Stores the turn limit (the maximum number of turns). If there is no limit, this stores ''-1''.<br />
<br />
* '''variable''': (default='turns') the name of the variable in which to store the turn limit.<br />
<br />
==== [store_unit] ====<br />
<br />
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 [[InternalActionsWMLUnitTags|here]]. 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).<br />
<br />
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.<br />
<br />
''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].''<br />
<br />
* '''[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).<br />
<br />
* '''variable''': the name of the variable into which to store the unit(s)<br />
<br />
* '''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.<br />
<br />
* '''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.<br />
<br />
==== [store_unit_type] ====<br />
<br />
* '''type''': (required) the defined ID of the unit type, for example "Goblin Knight". 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.<br />
<br />
* '''variable''': the name of the variable into which to store the unit type information (default "unit_type")<br />
<br />
==== [store_unit_type_ids] ====<br />
<br />
* '''variable''': the name of the variable into which to store a comma-separated list of all unit type IDs<br />
<br />
==== [store_villages] ====<br />
<br />
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.<br />
<br />
* '''variable''': the name of the variable (array) into which to store the locations (default: "location")<br />
* '''[[StandardLocationFilter]]''' tags and keys as arguments<br />
<br />
==== [store_items] ====<br />
<br />
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).<br />
<br />
*'''variable''': name of the wml variable array to use (default "items")<br />
*'''[[StandardLocationFilter]]''' keys as arguments: only items on locations matching this [[StandardLocationFilter]] will be stored<br />
<br />
==== [find_path] ====<br />
<br />
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.<br />
<br />
*'''[traveler]''': [[StandardUnitFilter]], only the first matching unit will be used for calculation<br />
*'''[destination]''': [[StandardLocationFilter]], only the first matching nearest hex will be used<br />
*'''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.<br />
*'''allow_multiple_turns''': default no, if yes also moves that require more than one turn will be calculated.<br />
*'''check_visibility''': default no, if yes the path will not be computed if some hexes are not visible due to shroud.<br />
*'''check_teleport''': default yes, if no teleport won't be taken in account while computing path.<br />
*'''check_zoc''': default yes, if no unit ZOCs won't be considered while calculating the path.<br />
This is the structure of the variable returned by [find_path]:<br />
[path]<br />
length = the total length of the path<br />
if the path is calculated to an impassable hex, or the move requires multiple turns<br />
and allow_multiple_turns is no, its value will be 0.<br />
hexes = in 1.11, this will replace the length key above<br />
from_x, from_y = location of the unit<br />
to_x, to_y = destination<br />
movement_cost = total movement cost required by unit to reach that hex<br />
required_turns = total turns required by unit to reach that hex<br />
[step]<br />
x, y = location of the step<br />
terrain = terrain of the step<br />
movement_cost = movement cost required by unit to reach that hex<br />
required_turns = turns required by unit to reach that hex<br />
[/step]<br />
[/path]<br />
To read the total length of the path on 1.10, use ''path.step.length''.<br><br />
{{DevFeature1.11}} ''length'' is replaced by ''hexes'' in the output array.<br />
<br />
=== [clear_variable] ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
* '''name''': the name of the variable to clear. This can also be a comma-separated list of multiple variable names.<br />
** If a name ends with an array index, then it deletes that one container, and shifts the indexes of all subsequent containers. For example, <code>{CLEAR_VARIABLE my_awesome_array[2]}</code> deletes <code>my_awesome_array[2]</code>, but then moves <code>my_awesome_array[3]</code> to <code>my_awesome_array[2]</code>, moves <code>my_awesome_array[4]</code> to <code>my_awesome_array[3]</code>, and so on until the end of the array.<br />
** Note that <code>{CLEAR_VARIABLE my_awesome_array}</code> deletes the entire array, but <code>{CLEAR_VARIABLE my_awesome_array[0]}</code> deletes only the first container.<br />
<br />
== Other Internal Actions ==<br />
<br />
Believe it or not, there are some internal actions that are not focused primarily on variables. They are all grouped here.<br />
<br />
=== [fire_event] ===<br />
<br />
Trigger a WML event<br />
<br />
* '''name''': the name of event to trigger<br />
<br />
* '''[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.<br />
**[[StandardUnitFilter]] as argument. Do not use a [filter] tag.<br />
<br />
* '''[secondary_unit]''': ''(Optional)'' Same as '''[primary_unit]''' except for the secondary unit.<br />
**[[StandardUnitFilter]] as argument. Do not use a [filter] tag.<br />
<br />
* '''[primary_attack]''': Information passed to the primary attack filter and $weapon variable on the new event.<br />
<br />
* '''[secondary_attack]''': Information passed to the second attack filter and $second_weapon variable on the new event.<br />
<br />
=== [insert_tag] ===<br />
<br />
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]]).<br />
<br />
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.<br />
<br />
*'''name''': The ["name"] 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 "option" when used within a [message]).<br />
<br />
*'''variable''': Name of the container variable which will have its value inserted into the tag.<br />
<br />
=== [role] ===<br />
<br />
Tries to find a unit to assign a role to.<br>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]]).<br>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.<br />
<br />
* '''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.<br />
<br />
* '''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.<br />
<br />
* [[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.<br />
<br />
== Examples ==<br />
<br />
=== Using [set_variables] to Create Arrays of WML ===<br />
<br />
[set_variables]<br />
name=arr<br />
mode=replace<br />
[value]<br />
foo=bar<br />
[/value]<br />
[value]<br />
foo=more<br />
[/value]<br />
[/set_variables]<br />
{DEBUG_MSG $arr[0].foo}<br />
{DEBUG_MSG $arr[1].foo}<br />
<br />
This will produce two output messages, first one saying '''bar''' and next one saying '''more'''.<br />
<br />
=== [insert_tag] Example ===<br />
<br />
[event]<br />
name=moveto<br />
<br />
[set_variable]<br />
name=temp.speaker<br />
value=Konrad<br />
[/set_variable]<br />
<br />
[set_variable]<br />
name=temp.message<br />
value= _ "Yo Kalenz!"<br />
[/set_variable] <br />
<br />
[insert_tag]<br />
name=message<br />
variable=temp<br />
[/insert_tag]<br />
[/event]<br />
<br />
This is effectively identical to:<br />
<br />
[event]<br />
name=moveto<br />
<br />
[message]<br />
speaker=Konrad<br />
message= _ "Yo Kalenz!"<br />
[/message]<br />
[/event]<br />
<br />
=== Firing the event via [insert_tag] ===<br />
Sometimes you need to fire specific event out of a wide variety, but when you make scenario you don't know which one. But before you use this, make sure what all other solutions aren't suit you.<br />
One of possible solutions is use all power of internal actions: [set_variable]+[insert_tag]+[fire_event].<br />
<br />
First of all, make sure a event is defined and included.<br />
[event]<br />
name = custom_event<br />
<br />
[message]<br />
speaker=Konrad<br />
message= _ "Yo Kalenz!"<br />
[/message]<br />
[/event]<br />
<br />
Then set a variable, which will contain name of your event.<br />
[event]<br />
name = start<br />
<br />
[set_variable]<br />
name = event_name_container<br />
value = "custom_event"<br />
[/set_variable]<br />
[/event]<br />
<br />
Then add insert tag where you need it. It can be [command] of menu item, or even other event.<br />
[insert_tag]<br />
name = fire_event<br />
variable = event_name_container<br />
[/insert_tag]<br />
<br />
== See Also ==<br />
* [[VariablesWML]]<br />
* [[ActionWML]]<br />
** [[ConditionalWML]]<br />
** [[DirectActionsWML]]<br />
** [[InterfaceActionsWML]]<br />
* [[EventWML]]<br />
* [[ReferenceWML]]<br />
<br />
[[Category: WML Reference]]<br />
[[Category: ActionsWML]]</div>Xudojnik