<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.wesnoth.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Uncleshelby</id>
	<title>The Battle for Wesnoth Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.wesnoth.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Uncleshelby"/>
	<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/Special:Contributions/Uncleshelby"/>
	<updated>2026-05-18T14:04:09Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.16</generator>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=EditingWesnoth&amp;diff=44648</id>
		<title>EditingWesnoth</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=EditingWesnoth&amp;diff=44648"/>
		<updated>2012-01-08T18:09:00Z</updated>

		<summary type="html">&lt;p&gt;Uncleshelby: Added the 64-bit path on Windows.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{EditingWesnoth/Translations}}&lt;br /&gt;
&amp;lt;!-- single enters on this page are intentional --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Game and User Directories ==&lt;br /&gt;
&lt;br /&gt;
Wherever you install the game, there will be a game data directory that contains, of course, the game's data.  This directory should have the following subdirectories: data, music, sounds, and images.  There are several others, but these are the important ones. In this wiki, the terms &amp;quot;game data&amp;quot;, wesnoth/data,  or ./data refers to the wesnoth/data directory. You normally should not modify these files, but you can if you want to modify a unit or something.&lt;br /&gt;
&lt;br /&gt;
The user data directory holds your preferences file, custom maps, saved games, the WML cache and data files corresponding to user-created content. In this wiki, &amp;quot;user data&amp;quot; and ''userdata''/ refer to this dir.&lt;br /&gt;
&lt;br /&gt;
The paths to the game data and user data dirs vary according to the operating system and packager. &lt;br /&gt;
&lt;br /&gt;
=== Where is my '''game''' data directory? ===&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
&lt;br /&gt;
* ''X:\Program Files\Battle for Wesnoth &amp;lt;version&amp;gt;\data'', where X: corresponds to the drive where Windows is installed (normally C:).&lt;br /&gt;
* On 64-bit computers, it will be in ''X:\Program Files (x86)\Battle for Wesnoth &amp;lt;version&amp;gt;\data''.&lt;br /&gt;
* The path may be different if you originally chose to install the game in a different location. In such case, look for the data folder in the folder where you installed the game.&lt;br /&gt;
&lt;br /&gt;
====Mac OS X====&lt;br /&gt;
&lt;br /&gt;
* SourceForge.net bundle: Control+click on the application icon.  Select &amp;quot;Show Package Contents.&amp;quot;  Select &amp;quot;Contents&amp;quot;, then &amp;quot;Resources&amp;quot;.&lt;br /&gt;
* Custom builds: ''/usr/local/share/wesnoth''&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
&lt;br /&gt;
* Custom builds: ''/usr/local/share/wesnoth''&lt;br /&gt;
* Debian/Ubuntu packages, or emerge (Gentoo): ''/usr/share/games/wesnoth''&lt;br /&gt;
* Red Hat Linux-based distributions in general (openSUSE, Fedora): ''/usr/share/wesnoth''&lt;br /&gt;
* Mandriva: ''/usr/share/games/wesnoth''&lt;br /&gt;
* Slackware Linux: ''/usr/local/share/wesnoth''&lt;br /&gt;
* Alternatively, you can try one of commands &amp;lt;code&amp;gt;slocate wesnoth&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;find / -name '*wesnoth*'&amp;lt;/code&amp;gt; (as yourself, not as superuser) if you are using a different distribution or the locations mentioned above don't exist.&lt;br /&gt;
&lt;br /&gt;
=== Where is my '''user''' data directory? ===&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
&lt;br /&gt;
* Windows 2000/XP (1.8 and later): ''My Documents\My Games\Wesnoth1.8''&lt;br /&gt;
* Windows Vista/7 (1.8 and later): ''Documents\My Games\Wesnoth1.8''&lt;br /&gt;
* General (before 1.8): ''X:\Program Files\Battle for Wesnoth &amp;lt;version&amp;gt;\userdata'', where X: corresponds to the drive where Windows is installed (normally C:).&lt;br /&gt;
&lt;br /&gt;
''Note: If you don't remember where you installed the game, right click on the game's shortcut, open properties, and click on the &amp;quot;Find target&amp;quot; button, then search for the &amp;quot;data&amp;quot; folder.''&lt;br /&gt;
&lt;br /&gt;
''Note: If you chose &amp;quot;Store userdata in the install location&amp;quot; during installation you will find your userdata as mentioned above under &amp;quot;General&amp;quot;. This will also apply if you launch wesnoth.exe directly instead of using the start menu shortcut.''&lt;br /&gt;
&lt;br /&gt;
''Note: If your userdata folder is located in the install location (for the reasons mentioned above) and you are not an administrator on this machine Windows Vista/7 will silently redirect any write access to the so called Virtual Store. You can find your userdata folder in e.g. C:\Users\&amp;lt;yourname&amp;gt;\AppData\Local\VirtualStore\Program Files\Battle for Wesnoth &amp;lt;version&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
====Mac OS X====&lt;br /&gt;
&lt;br /&gt;
* SourceForge.net bundle: ''~/Library/Application Support/Wesnoth_1.x/'' (1.8 and later), or ''~/Library/Preferences/Wesnoth'' (older versions).&lt;br /&gt;
* Custom builds: same as Linux - see below for details.&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
* Wesnoth 1.9: ''~/.local/share/wesnoth/''&lt;br /&gt;
* Wesnoth 1.8: ''~/.wesnoth1.8''&lt;br /&gt;
* Older versions: ''~/.wesnoth''.&lt;br /&gt;
* It's also possible to check the beginning of Wesnoth's stderr output in a terminal emulator to see the path Wesnoth uses to access its configuration.&lt;br /&gt;
&lt;br /&gt;
== Game data ==&lt;br /&gt;
&lt;br /&gt;
The major directories you need to know about are wesnoth/data, wesnoth/data/core/units, wesnoth/data/campaigns, wesnoth/data/multiplayer, wesnoth/images and wesnoth/data/core/images&lt;br /&gt;
&lt;br /&gt;
Become familiar with what is in ./data/campaigns and ./data/multiplayer/scenarios.  These have the officially distributed campaigns and multiplayer maps.  If you ever want to examine or edit one of the scenario configuration files, this is where you would go.  For example, a common question is how a new player can give himself more turns or gold in scenario X.  This is where you would go to do that.&lt;br /&gt;
&lt;br /&gt;
Two very important directories are ./data/core/units/ and ./images.  You have the ability to drop new units or images in these directories and have the game recognize them.  When specifying an image for something, you do so relative to ./images.&lt;br /&gt;
&lt;br /&gt;
== User data ==&lt;br /&gt;
&lt;br /&gt;
The user data directory can do a lot of things.  The game looks here for several things:&lt;br /&gt;
* ''userdata''/data/add-ons - campaign configuration files and subdirectories&lt;br /&gt;
* ''userdata''/editor/maps - multiplayer standalone maps (map data only)&lt;br /&gt;
&lt;br /&gt;
The ''userdata''/data/add-ons directory is particularly useful.  A single configuration file here can selectively point to an entire subdirectory tree of units, images, sounds, scenarios, and macros.  This allows you to wall off parts. Content included in the userdata units or images directories will be available globally whether you want it or not.&lt;br /&gt;
&lt;br /&gt;
For example, assume you have a campaign called MyCampaign.  This is what the ''userdata''/data/add-ons directory might look like:&lt;br /&gt;
* ''userdata''/data/add-ons/MyCampaign/ - your campaign's directory&lt;br /&gt;
* ''userdata''/data/add-ons/MyCampaign/_main.cfg - a text file containing your instructions for the game about how to load the campaign&lt;br /&gt;
** ''userdata''/data/add-ons/MyCampaign/scenarios&lt;br /&gt;
** ''userdata''/data/add-ons/MyCampaign/units&lt;br /&gt;
** ''userdata''/data/add-ons/MyCampaign/images&lt;br /&gt;
** ''userdata''/data/add-ons/MyCampaign/music&lt;br /&gt;
** ''userdata''/data/add-ons/MyCampaign/sounds&lt;br /&gt;
** ''userdata''/data/add-ons/MyCampaign/utils&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Create]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Create]]&lt;/div&gt;</summary>
		<author><name>Uncleshelby</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=InternalActionsWML&amp;diff=43756</id>
		<title>InternalActionsWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=InternalActionsWML&amp;diff=43756"/>
		<updated>2011-09-27T00:57:28Z</updated>

		<summary type="html">&lt;p&gt;Uncleshelby: Edited [store_unit] so that it points to the [unstore_unit] instead of just DirectActionsWML&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
&lt;br /&gt;
Part of [[ActionWML]], Internal actions are actions that WML uses internally that do not directly affect game play (or, at least, are not readily apparent to the player). For example, storing a variable is an internal action.&lt;br /&gt;
&lt;br /&gt;
== Variable Actions ==&lt;br /&gt;
&lt;br /&gt;
These actions are focused, in one way or another, on [[VariablesWML|variables]]. Creating them, modifying them, capturing game data to them, you name it, these actions are all about the variables.&lt;br /&gt;
&lt;br /&gt;
=== [set_variable] ===&lt;br /&gt;
&lt;br /&gt;
The '''[set_variable]''' tag is used to create and manipulate WML variables. The [http://www.wesnoth.org/macro-reference.xhtml#VARIABLE VARIABLE] macro is a quick syntactic shortcut for simple variable creation and the [http://www.wesnoth.org/macro-reference.xhtml#VARIABLE_OP VARIABLE_OP] macro is a quick syntactic shortcut for performing simple mathematical operations on variables.&lt;br /&gt;
&lt;br /&gt;
* '''name''': the name of the variable to manipulate&lt;br /&gt;
&lt;br /&gt;
* '''value''': set the variable to the given value (can be numeric or string).Use literal for no substitution. (see [[VariablesWML]])&lt;br /&gt;
&lt;br /&gt;
* '''literal''': set the variable to the given value (can be numeric or string). This does not interpret any dollars signs.&lt;br /&gt;
&lt;br /&gt;
* '''format''': This attribute will be deprecated from 1.7 on. Same behaviour as value.&lt;br /&gt;
&lt;br /&gt;
* '''to_variable''': set the variable to the value of the given variable, e.g. 'to_variable=temp' would be equivalent to 'value=$temp'.&lt;br /&gt;
&lt;br /&gt;
* '''add''': add the given amount to the variable. To subtract, add a negative number.&lt;br /&gt;
&lt;br /&gt;
* '''sub''' {{DevFeature}}: subtract the given amount from the variable.&lt;br /&gt;
&lt;br /&gt;
* '''multiply''': multiply the variable by the given number. To divide, multiply by the inverse eg: 4/2 = 4 * 1/2 = 4 * 0.5. To negate, multiply by -1. Floating point values are not rounded.&lt;br /&gt;
&lt;br /&gt;
* '''divide''': divide the variable by the given number. The result is an integer. Floating point results are not rounded. If both variables are integers, [http://en.wikipedia.org/wiki/Division_(mathematics)#Division_of_integers Integer division] is used. {{DevFeature1.9}}Integer division is no longer used. Use floor function in addition if you relied on this.&lt;br /&gt;
&lt;br /&gt;
* '''modulo''': returns the remainder of a division.&lt;br /&gt;
&lt;br /&gt;
* '''random''': the variable will be randomly set.&amp;lt;br&amp;gt;You may provide a comma separated list of possibilities, e.g. 'random=Bob,Bill,Bella'.&amp;lt;br&amp;gt;You may provide a range of numbers (integers), e.g. 'random=3..5'.&amp;lt;br&amp;gt;You may combine these, e.g. 'random=100,1..9', in which case there would be 1/10th chance of getting 100, just like for each of 1 to 9. {{DevFeature1.9}} random is deprecated, use rand instead.&lt;br /&gt;
&lt;br /&gt;
* '''rand''': does the same as random, but has better MP support. See [[BuildingMultiplayerExamples]] for more info on the MP case. '''It is highly recommended that you use this feature for randomization.'''&lt;br /&gt;
&lt;br /&gt;
* '''time=stamp''': Retrieves a timestamp in milliseconds since wesnoth was started, can be used as timing aid. Don't try to use this as random value in MP since it will cause an OOS.&lt;br /&gt;
&lt;br /&gt;
* '''string_length''': Retrieves the length in characters of the string passed as this attribute's value; such string is parsed and variable substitution applied automatically (see [[VariablesWML]] for details).&lt;br /&gt;
&lt;br /&gt;
* '''[join]''' joins an array of strings to create a textual list&lt;br /&gt;
** '''variable''': name of the array&lt;br /&gt;
** '''key''': the key of each array element(array[$i].foo) in which the strings are stored&lt;br /&gt;
** '''separator''': separator to connect the elements&lt;br /&gt;
** '''remove_empty''': whether to ignore empty elements&lt;br /&gt;
&lt;br /&gt;
* '''ipart''': Assigns the integer part (the part to the left of the comma) of the referenced variable.&lt;br /&gt;
&lt;br /&gt;
* '''fpart''': Assigns the decimal part (the part to the right of the comma) of the referenced variable.&lt;br /&gt;
&lt;br /&gt;
* '''round''': Rounds the variable to the specified number of digits of precision. Negative precision works as expected (rounding 19517 to -2 = 19500). Special values:&lt;br /&gt;
**'''ceil''': Rounds upward to the nearest integer.&lt;br /&gt;
**'''floor''': Rounds down to the nearest integer.&lt;br /&gt;
&lt;br /&gt;
=== [set_variables] ===&lt;br /&gt;
&lt;br /&gt;
Manipulates a WML array or container&lt;br /&gt;
&lt;br /&gt;
* '''name''': the name of the array or container to manipulate&lt;br /&gt;
&lt;br /&gt;
* '''mode''': one of the following values:&lt;br /&gt;
** ''replace'': will clean the array '''name''' and replace it with given data&lt;br /&gt;
** ''append'': will append given data to the current array&lt;br /&gt;
** ''merge'': will merge in the given data into '''name'''&lt;br /&gt;
** ''insert'': will insert the given data at the index specified in the '''name''' attribute, such as name=my_array[1]. The default index is zero, which will insert to the front of the array. '''Note:''' if an invalid index is used, empty containers will be created before the insertion is performed. In other words, do not attempt to insert at an index greater than (or equal to) the array's current length. This limitation may be removed in future versions.&lt;br /&gt;
&lt;br /&gt;
* '''to_variable''': data will be set to the given array&lt;br /&gt;
&lt;br /&gt;
* '''[value]''': the WML inside the [value] tags will be stored in data, variables will be interpolated directly, use $| in order to escape the $ sign, you can store arrays of WML by supplying multiple [value] tags. ([[#Using_.5Bset_variables.5D_to_Create_Arrays_of_WML|See Example]])&lt;br /&gt;
&lt;br /&gt;
* '''[literal]''': same as '''[value]''', but variables will not be substituted, '''[literal]''' and '''[value]''' can not be used in the same [set_variables] tag, i.e. you can not create arrays by piling a mix of '''[value]''' and '''[literal]''' tags&lt;br /&gt;
&lt;br /&gt;
*'''[split]''' splits a textual list into an array which will then be set to data&lt;br /&gt;
** '''list''': textual list to split&lt;br /&gt;
** '''key''': the key of each array element(array[$i].foo) in which the strings are stored&lt;br /&gt;
** '''separator''': separator to separate the elements&lt;br /&gt;
** '''remove_empty''': whether to ignore empty elements&lt;br /&gt;
&lt;br /&gt;
=== Capturing Game Data ===&lt;br /&gt;
&lt;br /&gt;
These actions capture different bits of game data and store them to variables so they can be examined and/or manipulated.&lt;br /&gt;
&lt;br /&gt;
==== [store_gold] ====&lt;br /&gt;
&lt;br /&gt;
Stores a side's gold into a variable.&lt;br /&gt;
&lt;br /&gt;
* '''side''': (default=1) the side for which the gold should be stored &lt;br /&gt;
* '''[[StandardSideFilter]]''' {{DevFeature1.9}} (instead of just side= above) The first matching side's gold will be stored in the variable &amp;quot;variable&amp;quot;.&lt;br /&gt;
* '''variable''': (default='gold') the name of the variable to store the gold in&lt;br /&gt;
&lt;br /&gt;
==== [store_locations] ====&lt;br /&gt;
&lt;br /&gt;
Stores a series of locations that pass certain criteria into an array. Each member of the array has members 'x' and 'y' (the position) and 'terrain' (the terrain type) and 'owner_side' (villages only). The array will include any unreachable border hexes, if applicable.&lt;br /&gt;
&lt;br /&gt;
* [[StandardLocationFilter]]: a location or location range which specifies the locations to store. You must specify this or no locations will be stored.&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable (array) into which to store the locations.&lt;br /&gt;
&lt;br /&gt;
==== [store_reachable_locations] {{DevFeature1.9}} ====&lt;br /&gt;
&lt;br /&gt;
Stores locations reachable by the given units. Can store either the movement, attack or vision ranges.&lt;br /&gt;
&lt;br /&gt;
* '''[filter]''': a [[StandardUnitFilter]]. The locations reachable by any of the matching units will be stored.&lt;br /&gt;
* '''[filter_location]''': (optional) a [[StandardLocationFilter]]. Only locations which also match this filter will be stored.&lt;br /&gt;
* '''range''': possible values ''movement'' (default), ''attack'', ''vision''. If ''movement'', stores the locations within the movement range of the unit, taking Zone of Control into account. If ''attack'', stores the attack range (movement range + 1 hex). If ''vision'', stores the vision range (movement range ignoring Zone of Control + 1 hex).&lt;br /&gt;
* '''moves''':  possible values ''current'' (default), ''max''. Specifies whether to use the current or maximum movement points when calculating the range.&lt;br /&gt;
* '''viewing_side''': (optional) the side whose vision to use when calculating the reach. This only has meaning in the presence of fog, shroud, or units with the ambush ability. If left out, then fog, shroud and ambushers are ignored and the real reach of the units is stored.&lt;br /&gt;
* '''variable''': the name of the variable (array) into which to store the locations.&lt;br /&gt;
&lt;br /&gt;
==== [store_map_dimensions] ====&lt;br /&gt;
&lt;br /&gt;
Stores the map dimensions in a variable.&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable where the values will be saved into. If it is skipped, a variable 'map_size' is used, and its contents overridden, if they existed already. The result is a container variable, with members ''width'' and ''height''.&lt;br /&gt;
&lt;br /&gt;
==== [store_side] ====&lt;br /&gt;
&lt;br /&gt;
Stores information about a certain side in a variable. The variable will contain the member variables 'name', 'team_name', 'gold' and 'income', 'fog', 'shroud', 'hidden', 'user_team_name', 'colour' (becomes 'color' in 1.9+), 'controller', 'village_gold', 'recruit' and {{DevFeature1.9}} 'side' (the $side_number of the side belonging to this container)&lt;br /&gt;
&lt;br /&gt;
* '''side''': the side whose information should be stored&lt;br /&gt;
* '''[[StandardSideFilter]]''': {{DevFeature1.9}} instead of only side=. All matching sides are stored. (An array is created if several sides match - access it with side[2].team_name and so on.)&lt;br /&gt;
* '''variable''': the name of the variable to store the information in (default: &amp;quot;side&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
''note: In networked multiplayer, the controller attribute is ambiguous. Be very careful or you have OOS errors.''&lt;br /&gt;
&lt;br /&gt;
==== [store_starting_location] ====&lt;br /&gt;
&lt;br /&gt;
Stores the starting location of a side's leader in a variable. The variable is a composite type which will have members 'x', 'y', 'terrain' (the terrain type for a starting location is always 'K' unless it has been changed) and 'owner_side' (villages only)&lt;br /&gt;
&lt;br /&gt;
* '''side''': the side whose starting location is to be stored&lt;br /&gt;
&lt;br /&gt;
* '''variable''': (default='location'): the name of the variable to store the location in&lt;br /&gt;
&lt;br /&gt;
==== [store_time_of_day] ====&lt;br /&gt;
&lt;br /&gt;
Stores time of day information from the current scenario into a WML variable container.&lt;br /&gt;
&lt;br /&gt;
* '''variable''': (default='time_of_day') name of the container on which to store the information. The container will be filled with the same attributes found on [[TimeWML]].&lt;br /&gt;
&lt;br /&gt;
* '''turn''': (defaults to the current turn number) changes the turn number for which time of day information should be retrieved.&lt;br /&gt;
&lt;br /&gt;
==== [store_unit] ====&lt;br /&gt;
&lt;br /&gt;
Stores details about units into a [[VariablesWML#Container|container]] variable. When a unit is stored, all keys and tags in the unit definition may be manipulated, including some others, with [[InternalActionsWML#.5Bset_variable.5D|[set_variable]]]. A sample list of these tags and keys can be found [[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).&lt;br /&gt;
&lt;br /&gt;
Common usage is to manipulate a unit by using '''[store_unit]''' to store it into a variable, followed by manipulation of the variable, and then [[DirectActionsWML#.5Bunstore_unit.5D|[unstore_unit]]] to re-create the unit with the modified variables.&lt;br /&gt;
&lt;br /&gt;
''Note: stored units also exist on the field, and modifying the stored variable will not automatically change the stats of the units. You need to use [unstore_unit]. See also [[DirectActionsWML#.5Bunstore_unit.5D|[unstore_unit]]] and [http://www.wesnoth.org/macro-reference.xhtml#FOREACH FOREACH].''&lt;br /&gt;
&lt;br /&gt;
* '''[filter]''' with a [[StandardUnitFilter]] as argument. All units matching this filter will be stored. If there are multiple units, they will be stored into an array of variables. The units will be stored in order of their internal ''underlying_id'' attribute, which is usually in creation order (but you normally should not depend on the order).&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable into which to store the unit(s)&lt;br /&gt;
&lt;br /&gt;
* '''mode''': defaults to ''always_clear'', which clears the variable, whether or not a match is found. If mode is set to ''replace'', the variable will only be cleared if a match is found. If mode is set to ''append'', the variable will not be cleared.&lt;br /&gt;
&lt;br /&gt;
* '''kill''': if 'yes' the units that are stored will be removed from play. This is useful for instance to remove access to a player's recall list, with the intent to restore the recall list later.&lt;br /&gt;
&lt;br /&gt;
==== [store_unit_type] ====&lt;br /&gt;
&lt;br /&gt;
* '''type''': (required) the defined ID of the unit type, for example &amp;quot;Goblin Knight&amp;quot;. Do not use a translation mark or it will not work correctly for different languages. A comma-separated list of IDs may also be used to store an array of unit types.&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable into which to store the unit type information (default &amp;quot;unit_type&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==== [store_unit_type_ids] ====&lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable into which to store a comma-separated list of all unit type IDs&lt;br /&gt;
&lt;br /&gt;
==== [store_villages] ====&lt;br /&gt;
&lt;br /&gt;
Stores a series of locations of villages that pass certain criteria into an array. Each member of the array has members 'x' and 'y' (the position) and 'terrain' (the terrain type) and 'owner_side'.&lt;br /&gt;
&lt;br /&gt;
* '''owner_side''': a side number. If present, only villages owned by this side will be choosen. If owner_side=0, store the unowned villages. &lt;br /&gt;
&lt;br /&gt;
* '''variable''': the name of the variable (array) into which to store the locations&lt;br /&gt;
&lt;br /&gt;
* '''terrain''': a series of terrain characters. (See [[TerrainLettersWML]] for possible values.) If present, villages will only be chosen if the terrain code of the terrain type of that location is listed.  You may give a comma separated list of terrains.&lt;br /&gt;
&lt;br /&gt;
==== [store_items] ====&lt;br /&gt;
{{DevFeature1.9}}&lt;br /&gt;
&lt;br /&gt;
Stores current items in the scenario into an array. Each entry has at least members x and y and can have all of the other keys listed in the documentation of [[InterfaceActionsWML#.5Bitem.5D|[item]]] (depending on what was set during creating the item).&lt;br /&gt;
&lt;br /&gt;
*'''variable''': name of the wml variable array to use (default &amp;quot;items&amp;quot;)&lt;br /&gt;
*'''[[StandardLocationFilter]]''' keys as arguments: only items on locations matching this [[StandardLocationFilter]] will be stored&lt;br /&gt;
&lt;br /&gt;
=== [clear_variable] ===&lt;br /&gt;
&lt;br /&gt;
This will delete the given variable or array. This is good to use to clean up the set of variables -- e.g. a well-behaved scenario will delete any variables that shouldn't be kept for the next scenario before the end of the scenario.&amp;lt;br&amp;gt; Tags and variables of stored units can also be cleared, meaning that [trait]s and [object]s, for example, can be removed.&lt;br /&gt;
&lt;br /&gt;
* '''name''': the name of the variable to clear, multiple comma-separated variable names can be given.&lt;br /&gt;
&lt;br /&gt;
== Other Internal Actions ==&lt;br /&gt;
&lt;br /&gt;
Believe it or not, there are some internal actions that are not focused primarily on variables. They are all grouped here.&lt;br /&gt;
&lt;br /&gt;
=== [fire_event] ===&lt;br /&gt;
&lt;br /&gt;
Trigger a WML event&lt;br /&gt;
&lt;br /&gt;
* '''name''': the name of event to trigger&lt;br /&gt;
&lt;br /&gt;
* '''[primary_unit]''': ''(Optional)'' Primary unit for the event. Will never match on a recall list unit. The first unit matching the filter will be chosen.&lt;br /&gt;
**[[StandardUnitFilter]] as argument. Do not use a [filter] tag.&lt;br /&gt;
&lt;br /&gt;
* '''[secondary_unit]''': ''(Optional)'' Same as '''[primary_unit]''' except for the secondary unit.&lt;br /&gt;
**[[StandardUnitFilter]] as argument. Do not use a [filter] tag.&lt;br /&gt;
&lt;br /&gt;
* '''[primary_attack]''': Information passed to the primary attack filter and $weapon variable on the new event.&lt;br /&gt;
&lt;br /&gt;
* '''[secondary_attack]''': Information passed to the second attack filter and $second_weapon variable on the new event.&lt;br /&gt;
&lt;br /&gt;
=== [insert_tag] ===&lt;br /&gt;
&lt;br /&gt;
Inserts a variable as WML. In other words, the value of the passed [[VariablesWML#Container|container variable]] will be injected into the game as if they had been written out in WML form. ([[#.5Binsert_tag.5D_Example|See Example]]).&lt;br /&gt;
&lt;br /&gt;
Tag insertion is a special case in that it can be used in places where other ActionWML cannot be used. The basic rule is that anywhere that $variable syntax works, tag insertion will also work. In practice this means pretty much everywhere except directly within top-level scenario tags.&lt;br /&gt;
&lt;br /&gt;
*'''name''': The [&amp;quot;name&amp;quot;] to be given to the tag. This must be a tag which would be valid at the place where [insert_tag] is used, for anything to happen. (For example, if used as ActionWML, it should be a [[ActionWML]] tag name, and it may be a recognized subtag such as &amp;quot;option&amp;quot; when used within a [message]).&lt;br /&gt;
&lt;br /&gt;
*'''variable''': Name of the container variable which will have its value inserted into the tag.&lt;br /&gt;
&lt;br /&gt;
=== [role] ===&lt;br /&gt;
&lt;br /&gt;
Tries to find a unit to assign a role to.&amp;lt;br&amp;gt;This is useful if you want to choose a non-major character to say some things during the game. Once a role is assigned, you can use '''role=''' in a unit filter to identify the unit with that role (See [[FilterWML]]).&amp;lt;br&amp;gt;However, there is no guarantee that roles will ever be assigned. You can use '''[have_unit]''' (see [[ConditionalActionsWML#Condition_Tags|Condition Tags]]) to see whether a role was assigned. This tag uses a [[StandardUnitFilter]] (without [filter]) with the modification to order the search by type, mark only the first unit found with the role, and the role attribute is not used in the search. If for some reason you want to search for units that have or don't have existing roles, you can use one or more [not] filters. The will check recall lists in addition to units on the map. In normal use, you will probably want to include a ''side'' attribute to force the unit to be on a particular side.&lt;br /&gt;
&lt;br /&gt;
* '''role''': the value to store as the unit's role. This role is not used in the [[StandardUnitFilter]] when doing the search for the unit to assign this role to.&lt;br /&gt;
&lt;br /&gt;
* '''type''': a comma-separated list of possible types the unit can be. If any types are given, then units will be searched by type in the order listed. If no type is given, then no particular order with respect to type is guaranteed.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Using [set_variables] to Create Arrays of WML ===&lt;br /&gt;
&lt;br /&gt;
 [set_variables]&lt;br /&gt;
     name=arr&lt;br /&gt;
     mode=replace&lt;br /&gt;
     [value]&lt;br /&gt;
         foo=bar&lt;br /&gt;
     [/value]&lt;br /&gt;
     [value]&lt;br /&gt;
        foo=more&lt;br /&gt;
     [/value]&lt;br /&gt;
 [/set_variables]&lt;br /&gt;
 {DEBUG_MSG $arr[0].foo}&lt;br /&gt;
 {DEBUG_MSG $arr[1].foo}&lt;br /&gt;
&lt;br /&gt;
This will produce two output messages, first one saying '''bar''' and next one saying '''more'''.&lt;br /&gt;
&lt;br /&gt;
=== [insert_tag] Example ===&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=moveto&lt;br /&gt;
     &lt;br /&gt;
     [set_variable]&lt;br /&gt;
         name=temp.speaker&lt;br /&gt;
         value=Konrad&lt;br /&gt;
     [/set_variable]&lt;br /&gt;
     &lt;br /&gt;
     [set_variable]&lt;br /&gt;
         name=temp.message&lt;br /&gt;
         value= _ &amp;quot;Yo Kalenz!&amp;quot;&lt;br /&gt;
     [/set_variable]    &lt;br /&gt;
     &lt;br /&gt;
     [insert_tag]&lt;br /&gt;
         name=message&lt;br /&gt;
         variable=temp&lt;br /&gt;
     [/insert_tag]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
This is effectively identical to:&lt;br /&gt;
&lt;br /&gt;
 [event]&lt;br /&gt;
     name=moveto&lt;br /&gt;
     &lt;br /&gt;
     [message]&lt;br /&gt;
         speaker=Konrad&lt;br /&gt;
         message= _ &amp;quot;Yo Kalenz!&amp;quot;&lt;br /&gt;
     [/message]&lt;br /&gt;
 [/event]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[VariablesWML]]&lt;br /&gt;
* [[ActionWML]]&lt;br /&gt;
** [[ConditionalWML]]&lt;br /&gt;
** [[DirectActionsWML]]&lt;br /&gt;
** [[InterfaceActionsWML]]&lt;br /&gt;
* [[EventWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;br /&gt;
[[Category: ActionsWML]]&lt;/div&gt;</summary>
		<author><name>Uncleshelby</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Uncleshelby&amp;diff=43537</id>
		<title>User:Uncleshelby</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Uncleshelby&amp;diff=43537"/>
		<updated>2011-08-23T15:00:00Z</updated>

		<summary type="html">&lt;p&gt;Uncleshelby: added &amp;quot;introduction&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
I'm a geek, who loves Wesnoth. I have been playing since 1.6 came out.&lt;br /&gt;
&lt;br /&gt;
==My Campaigns==&lt;br /&gt;
I have currently 1 campaign in work.&lt;br /&gt;
===The Brotherhood of Wesnoth===&lt;br /&gt;
I am a laid-back Wesnoth add-ons developer. I am only working on one project in particular, a campaign call ''The Brotherhood of Wesnoth''. Check it out if you have the time.&lt;br /&gt;
&lt;br /&gt;
Leave feedback [http://www.forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=33818 here]&lt;/div&gt;</summary>
		<author><name>Uncleshelby</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Uncleshelby&amp;diff=43371</id>
		<title>User:Uncleshelby</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Uncleshelby&amp;diff=43371"/>
		<updated>2011-08-12T22:27:39Z</updated>

		<summary type="html">&lt;p&gt;Uncleshelby: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==My Campaigns==&lt;br /&gt;
I have currently 1 campaign in work.&lt;br /&gt;
===The Brotherhood of Wesnoth===&lt;br /&gt;
I am a laid-back Wesnoth add-ons developer. I am only working on one project in particular, a campaign call ''The Brotherhood of Wesnoth''. Check it out if you have the time.&lt;br /&gt;
&lt;br /&gt;
Leave feedback [http://www.forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=33818 here]&lt;/div&gt;</summary>
		<author><name>Uncleshelby</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Uncleshelby&amp;diff=43350</id>
		<title>User:Uncleshelby</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Uncleshelby&amp;diff=43350"/>
		<updated>2011-08-09T23:00:20Z</updated>

		<summary type="html">&lt;p&gt;Uncleshelby: Created page with '==My Campaigns== I have currently 1 campaign in work. ===The Brotherhood of Wesnoth=== I am a laid-back Wesnoth add-ons developer. I am only working on one project in particular,…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==My Campaigns==&lt;br /&gt;
I have currently 1 campaign in work.&lt;br /&gt;
===The Brotherhood of Wesnoth===&lt;br /&gt;
I am a laid-back Wesnoth add-ons developer. I am only working on one project in particular, a campaign call ''The Brotherhood of Wesnoth''. Check it out if you have the time.&lt;br /&gt;
&lt;br /&gt;
Leave feedback [http://www.forums.wesnoth.org/viewtopic.php?f=8&amp;amp;t=33818 &amp;quot;here&amp;quot;]&lt;/div&gt;</summary>
		<author><name>Uncleshelby</name></author>
		
	</entry>
</feed>