https://wiki.wesnoth.org/api.php?action=feedcontributions&user=Db0&feedformat=atomThe Battle for Wesnoth Wiki - User contributions [en]2024-03-28T22:50:12ZUser contributionsMediaWiki 1.31.16https://wiki.wesnoth.org/index.php?title=DirectActionsWML&diff=27750DirectActionsWML2008-12-30T16:44:58Z<p>Db0: /* Useful Macros */ Removed linkmacro template which does not exist</p>
<hr />
<div>{{WML Tags}}<br />
== Direct actions ==<br />
<br />
Direct actions are actions that have a direct effect on gameplay.<br />
<br />
The following tags are actions:<br />
* '''[endlevel]''': ends the scenario.<br />
** '''result''': before the scenario is over, all events with ''name=result'' are triggered. The message ''result_message'' with the heading ''result_heading'' (see [[LanguageWML]]) are displayed. If ''result=victory'', the player progresses to the next level; if ''result=defeat'', the game returns to the main menu. These last two are rarely used: ''result=continue'' behaves identically to ''result=victory'' except the player's gold is not reduced to 80%, and it does not bring up a "Victory" message or the gold changing message (since it doesn't change); ''result=continue_no_save'' works similarly, except the player is not asked whether to save the game, and is taken directly to the next scenario without any messages. Unless ''result=defeat'', the following keys can also be used:<br />
** '''bonus''': whether the player should get bonus gold (maximum possible gold that could have been earned by waiting the level out). The default is bonus=yes.<br />
** '''carryover_report''': whether the player should receive a summary of the scenario outcome, the default is carryover_report=yes.<br />
** '''save''': whether a start-of-scenario save should be created for the next scenario, the default is save=yes.<br />
** '''linger_mode''': whether the game should switch to linger_mode before advancing to the next scenario, the default is linger_mode=yes.<br />
** '''next_scenario''': (default specified in '''[scenario]''' tag) the ID of the next scenario that should be played. All units that side 1 controls at this point become available for recall in ''next_scenario''.<br />
** When the result is "victory" the following keys can be used:<br />
*** '''carryover_percentage''' {{DevFeature}}: by default 80% of the gold is carried over to the next scenario, with this key the amount can be changed.<br />
*** '''carryover_add''' {{DevFeature}}: if true the gold will be added to the starting gold the next scenario, if false the next scenario will start with the amount of the current scenario (after taxes) or the minimum in the next scenario. Default is false.<br />
** '''music''' {{DevFeature}}: (default specified in '''[scenario]''' or '''[game_config]''' tags) a comma-separated list of music tracks from which one will be chosen and played once after any events related to the end of level result are executed; by default, victory_music is used on victory, and defeat_music on defeat.<br />
** '''end_text''' {{DevFeature}}: Text that is shown centered in a black screen at the end of a campaign. Defaults to "The End". Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].<br />
** '''end_text_duration''' {{DevFeature}}: Delay, in milliseconds, before displaying the game credits at the end of a campaign. In other words, for how much time '''end_text''' is displayed on screen. Defaults to 3500. Note that this has cumulative effects over the campaign - it persists even if the endlevel does not trigger the end of the campaign. See also [[CampaignWML]].<br />
* '''[unit]''': places a unit on the map. For syntax see [[SingleUnitWML]].{{Short Note:Predefined Macro|GENERIC_UNIT}}<br />
* '''[recall]''': recalls a unit. The unit is recalled free of charge, and is placed near the leader.<br />
** [[StandardUnitFilter]]: the first matching unit will be recalled. If no units match this tag is ignored.<br />
** '''x,y''': the unit is placed here instead of next to the leader.<br />
** '''show''': if not "no", display the unit being recalled.<br />
* '''[teleport]''': teleports a unit on map. {{Short Note:Predefined Macro|TELEPORT_UNIT}}<br />
** '''[filter]''': [[StandardUnitFilter]] all units matching the filter will be teleported.<br />
** '''x,y''': the position to teleport to.<br />
* '''[terrain_mask]''': changes the terrain on the map. See [[TerrainMaskWML]].<br />
* '''[terrain]''': changes the terrain on the map.<br />
** '''terrain''': the character of the terrain to use. See [[TerrainCodesWML]] to see what letter a type of terrain uses.<br />
** '''x,y''': the position (or range of positions) to change.<br />
** {{DevFeature}} '''layer''': (overlay|base|both, default=both) only change the specified layer.<br />
** {{DevFeature}} '''replace_if_failed''': (default=no) When replacing just one layer failed, try to replace the whole terrain. If '''terrain''' is an overlay only terrain, use the default_base as base layer. If the terrain has no default base, do nothing.<br />
* '''[gold]''': give one side gold.<br />
** '''amount''': the amount of gold to give.<br />
** '''side''': (default=1) the number of the side to give the gold to.<br />
* '''[unstore_unit]''': creates a unit from a game variable, and activates it on the playing field. This must be a specific variable describing a unit, and may not be an array -- to unstore an entire array, iterate over it. The variable is not cleared. See also '''[store_unit]''', '''[while]''' and [clear_variable] in [[InternalActionsWML]]. Note units with a negative amount of hitpoints will be unstored with 1 hitpoint.<br />
** '''variable''': the name of the variable.<br />
** '''find_vacant''': whether the unit should be placed on the nearest vacant tile to its specified location. If this is set to 'no'(default), then any unit on the same tile as the unit being unstored will be destroyed.<br />
** '''text''': (translatable) floating text to display above the unit, such as a damage amount<br />
** '''red''', '''green''', '''blue''': (default=0,0,0) the color to display the text in. Values vary from 0-255. You may find it convenient to use the {COLOR_HARM} or {COLOR_HEAL} macro instead. (Use {COLOR_HARM} or {COLOR_HEAL} instead of the whole red,green,blue= line.)<br />
** '''advance''': if the XP has been modified then there will be tried to advance the unit, default true. <br />
* '''[allow_recruit]''': allows a side to recruit units it couldn't previously recruit.<br />
** '''type''': the types of units that the side can now recruit.<br />
** '''side''': (default=1) the number of the side that is being allowed to recruit the units.<br />
* '''[disallow_recruit]''': prevents a side from recruiting units it could previously recruit.<br />
** '''type''': the types of units that the side can no longer recruit.<br />
** '''side''': (default=1) the number of the side that may no longer recruit the units.<br />
* '''[set_recruit]''': sets the units a side can recruit.<br />
** '''recruit''': the types of units that the side can now recruit.<br />
** '''side''': (default=1) the number of the side that is having its recruitment set.<br />
* '''[modify_side]''': modifies some details of a given side in the middle of a scenario. '''The following listed properties are the only properties that [modify_side] can affect!'<br />
** '''side''': (default=1) the number of the side that is to be changed.<br />
** '''income''': the income given at the begining of each turn.<br />
** '''team_name''': the team in which the side plays the scenario.<br />
** '''user_team_name''': a translatable string representing the team's description. This has no effect on alliances. Defaults to ''team_name''.<br />
** '''gold''': the amount of gold the side owns.<br />
** '''village_gold''': the income setting per village for the side.<br />
** '''controller''': the identifier string of the side's controller. Uses the same syntax of the ''controller'' key in the [[SideWML|[side]]] tag.<br />
** '''fog''': a boolean string (yes/no) describing the status of Fog for the side.<br />
** '''shroud''': a boolean string describing the status of Shroud for the side.<br />
** {{DevFeature}} '''[ai]''': replaces a side's AI parameters with the new specified ones. Uses the same syntax described in [[AiWML]].<br />
* '''[modify_turns]''': modifies the turn limit in the middle of a scenario.<br />
** '''value''': the new turn limit.<br />
** '''add''': if used instead of ''value'', specifies the number of turns to add to the current limit (can be negative).<br />
** {{DevFeature}} '''current''': changes the current turn number after applying turn limit modifications, if any. It is possible to change the current turn number to a greater one than the current only; also, it is not possible to change the turn number to exceed the turn limit.<br />
* '''[capture_village]''': changes the ownership of a village.<br />
** '''side''': the side that takes control of the village. If not given, the village will become neutral.<br />
** '''x, y''': the location of the village.<br />
* '''[kill]''': Removes all units (including units in a recall list) that match the filter from the game.<br />
** [[StandardUnitFilter]]: selection criterion<br />
** '''animate''': if 'yes', displays the unit dying (fading away).<br />
** '''fire_event''': if 'yes', triggers any appropriate 'die' events (See [[EventWML]]). Note that any 'die' events triggered by this are executed immediately, interrupting the current event and thus causing the x1, y1, x2, and y2 variables to be reset for that 'die' event, which in turn causes those variables to be invalid for the remainder of this event. {{DevFeature}} 'last breath' events are also fired.<br />
* '''[unstone]''': Unstones all units that match the filter.<br />
** '''[filter]''': [[StandardUnitFilter]] all units matching the filter will be unstoned. If no unit matches the filter, then nothing happens (probably). If absent, all units on the map are unstoned.<br />
* '''[object]''': gives some unit an object and removes all items on the tile the unit is on.<br />
** '''id''': when the object is picked up, a flag is set for ''id''. The object cannot be picked up if a flag for ''id'' has been set. This means that any object with an id can only be used once, even if first_time_only=no is set for the event. This restriction is per level. In a campaign objects with the same id can be assigned once per level.<br />
** '''[effect]''': one or more effect elements may be listed. See [[EffectWML]] for a description of [effect].<br />
** '''duration''': if 'level', effects only last until the end of the level (note : 'level' is the scenario, so this doesn't mean it last until the unit levels-up).<br />
** '''[filter]''': [[StandardUnitFilter]] the first unit found that matches the filter will be given the object. If no unit matches the filter, then a message is displayed and the object is not removed.<br />
** '''[then]''': a subtag that lets you execute actions if the filter conditions are met. The most common action that should be inside here is a '''[removeitem]''' tag, but you could probably put any tags that otherwise work in a [then] tag.<br />
** '''silent''': whether or not messages should be suppressed. Default is "no".<br />
** '''image''': the displayed image of the object.<br />
** '''name''': (translatable) displayed as a caption of the image.<br />
<br />
** '''user_description''': {{DevFeature}} (translatable) displayed as a message of the image. In 1.4 and older versions this is just '''description'''; that will still be expected for compatibility.<br />
** '''cannot_use_message''': (translatable) displayed instead of '''description''' if no unit passes the filter test.<br />
** If you do not supply a filter, the object action will be applied to a unit at the location of the moveto event. Currently this isn't recommended as it is not clear that this will continue working this way. Instead it is better to explicitly include a location filter.<br />
** The object action does not act on units in the recall list. There is a feature request in to allow this, but it is not clear whether or not it will be accepted.<br />
* '''[remove_shroud]''': removes some shroud from the map for a certain side (only relevant for sides that have shroud=yes).<br />
** '''side''': (default=1) the side for which to remove shroud.<br />
** [[StandardLocationFilter]]: the range of tiles for which shroud should be removed.<br />
* '''[place_shroud]''': places some shroud on the map for a certain side (only relevant for sides that have shroud=yes).<br />
** '''side''': (default=1) the side for which to place shroud.<br />
** [[StandardLocationFilter]]: the range of tiles on which shroud should be placed.<br />
* '''[allow_undo]''': allows the player to undo the event that this tag is inside. Has an effect only inside moveto events. If the move is undone, only the position of the unit will be restored; any altered variables or changes to the game will remain changed after the move is undone. It is up to the scenario designer to avoid abusing this command.<br />
** Technically, if '''[allow_undo]''' is inside an '''[event]''' with ''first_time_only=yes'' (the default setting), and the user undoes the event, then the state of the game has changed in this way: the event will not fire a second time, even though the user undid the move the first time.<br />
* '''[heal_unit]''' {{DevFeature}}: heal a unit. The variable '''$heal_amount''' will be set to the exact number of points healed (i.e can be lesser than the parameter '''amount''' if the unit is fully healed).<br />
** '''[filter]''': [[StandardUnitFilter]] the first unit matching the filter will be healed. <br />
** '''[secondary_unit_filter]''': [[StandardUnitFilter]] all the units matching the filter ''and'' having the ''heals'' ability will have their animation played (if ''animate'' is set to true).<br />
** '''amount''': the maximum points the unit will be healed.<br />
** '''animate''': a boolean which indicate if the healing animations must be played.<br />
* '''[time_area]''' {{DevFeature}}: changes the schedule in the given locations.<br />
** [[StandardLocationFilter]]: the locations to affect.<br />
** [[TimeWML]]: the new schedule.<br />
* '''[end_turn]''' {{DevFeature}}: end the current side's turn.<br />
<br />
== Useful Macros ==<br />
There are some predefined macros that you find useful for direct actions. You can find a complete list along with a detailed explanation of how they work [http://www.wesnoth.org/macro-reference.xhtml here].<br />
* '''{MOVE_UNIT}''': Moves a unit to another location in the map and the player sees the movement (unlike [teleport])<br />
* '''{FULL_HEAL}''': Brings a unit to full HP<br />
* '''{LOYAL_UNIT}''': Create a loyal unit<br />
* '''{MODIFY_TERRAIN_MASK}''': Modify an area of terrain<br />
<br />
== See Also ==<br />
<br />
* [[InternalActionsWML]]<br />
* [[InterfaceActionsWML]]<br />
* [[EventWML]]<br />
* [[ReferenceWML]]<br />
<br />
[[Category: WML Reference]]</div>Db0https://wiki.wesnoth.org/index.php?title=SideWML&diff=25599SideWML2008-05-11T14:41:29Z<p>Db0: /* the [side] tag */ Note about village gold 0</p>
<hr />
<div>{{WML Tags}}<br />
== the [side] tag ==<br />
<br />
The [side] tag is used to describe a side in a particular scenario.<br />
<br />
The following keys are recognized:<br />
<br />
* '''side''': a digit. The leader of this side is placed on the tile represented by this digit (see [[BuildingMaps]]). When defining sides, they must be defined in order since the side number is checked against the number of sides seen so far.<br />
<br />
* '''controller''': how moves for this side should be inputted.<br />
** '''ai''': the Wesnoth AI makes this side's moves. This is the default setting.<br />
** '''human''': a player controls this side's moves.<br />
** '''null''': the side doesn't get a turn to move and doesn't have a leader generated from the contents of the [side] tag. (It still can get units from [unit] tags in the [side] tag.)<br />
<br />
* '''no_leader''': if "no" (default), then keys describing a unit which will begin on the side's keep will be the remainder of the '''[side]''' tag, See [[SingleUnitWML]]. Note that if the keys '''x''', '''y''' are included, the leader will begin there regardless of keep location. If this side has a recall list from a previous level, then the recall list will be searched for a leader (using '''canrecruit=yes''') and if one is found it will be used instead of the one described in the '''[side]''' tag. Typical keys used for defining the leader unit are '''type''' (mandatory), '''description''', '''id''' {{DevFeature}}, '''user_description''', '''name''' {{DevFeature}} and '''unrenamable=yes''', see [[UnitWML]].<br />
<br />
* '''recruit''': a list of unit types. At the beginning of the scenario, the side gains recruitment of these units.<br />
<br />
* '''gold''': the starting gold for this side. Default 100. (If gold is carried over from a previous scenario, this value is the minimum starting gold.)<br />
<br />
* '''income''': the base income for this side, default 0. This is added to ''base_income'', '''[game_config]''' to determine the side's base income. (see [[GameConfigWML]]).<br />
<br />
* '''fog''': if 'yes', this side cannot see any tiles it is not within vision of, except at the start.<br />
<br />
* '''shroud''': if 'yes', this side cannot see any tiles it has not moved within sight of.<br />
<br />
* '''shroud_data''': describes the area which this team has de-shrouded. An example:<br />
|<br />
|00011111000<br />
This would leave the first column on the map unaltered and would change the second column for 11 tiles. A '0' means: shrouded, '1' means unshrouded. You can either call an external file using {@filename} (see [[PreprocessorRef]]) or place the data in quotes. For making an external file see [[BuildingScenariosShroudData]].<br />
<br />
* '''persistent''': whether the side exists in any other scenarios. If '1'(yes), then ''save_id''(see below) becomes active for this side. Default '0'(no); when '''controller=human''', this is always '1'.<br />
<br />
* '''save_id''': default ''description'' if available, 'Unknown' otherwise. The ID of the side with respect to the previous and next scenarios. Used to carry over the side's recall list (including the side's leader), recruitment list, and starting gold from scenario to scenario. Also used for the side's displayed name in the victory gold-calculation dialog.<br />
<br />
* '''team_name''': a non translatable string representing the team's description. Sides with the same team_name are allied. Default ''side''.<br />
<br />
* '''user_team_name''': a translatable string representing the team's description. This has no effect on alliances. Default ''team_name''.<br />
<br />
* '''colour''': May be either a numeric color index or a color name (e.g. 'blue', 'purple', 'orange', etc.). The numeric form is deprecated. The default list of numbers and corresponding colours can be found in data/core/team_colors.cfg.<br />
<br />
* '''flag''': a custom flag animation to use instead of the default one to mark captured villages. An automatic side-coloring is applied.<br />
** Example animation that has three frames and loops every 750ms: ''flag=misc/myflag-1.png:250,misc/myflag-2.png:250,misc/myflag-3.png:250''<br />
<br />
* '''flag_icon''': a custom flag icon to indicate the side playing in the statusbar (a size of 24x16 is recommended). An automatic side-coloring is applied.<br />
<br />
* '''village_gold''': the amount of gold given to this side per village it controls per turn. Default specified in ''village_income'', '''[game_config]''' ([[GameConfigWML]]). '''Note:''' If you need village gold to be 0. Set the variable to -1.<br />
<br />
* '''share_maps''': whether sides allied with this side see all terrains that this side sees, if they are on shroud.<br />
<br />
* '''share_view''': whether sides allied with this side see the units that this side sees, if they are on FoW (fog).<br />
<br />
* '''disallow_observers''': prevents observers from seeing this side turn. (default: no)<br />
<br />
* '''name''', '''id''', '''leader''': not used; see [[EraWML]].<br />
<br />
* ''music'' music to play for this player. Default specified in [scenario] (see [[ScenarioWML]]).<br />
<br />
* '''[ai]''' if '''controller=ai''', gives parameters to the AI. See [[AiWML]].<br />
<br />
* '''[village]''' describes a village the side begins in control of.<br />
** ''x'', ''y'' the location of the village.<br />
<br />
* '''[unit]''' describes a unit which begins on the side. See [[SingleUnitWML]]. If the side has a recall list and the unit is not given a location, it will start on the recall list. Note that the ''side'' attribute under '''[unit]''' will be ignored, as the side will come from the ''side'' attribute of '''[side]'''.<br />
<br />
<br />
The following keys are multiplayer only:<br />
<br />
* '''allow_player''': if false then this side will not be allowed to be modified and will be hidden during game creation.<br />
<br />
* '''team_lock''': if true then this side's team is not allowed to be modified.<br />
<br />
* '''colour_lock''': if true then this side's color is not allowed to be modified.<br />
<br />
* '''gold_lock''': if true then this side's gold is not allowed to be modified. <br />
<br />
* '''income_lock''': if true then this side's income is not allowed to be modified.<br />
<br />
== See Also ==<br />
* [[EraWML]]<br />
* [[ScenarioWML]]<br />
* [[ReferenceWML]]<br />
<br />
<br />
[[Category: WML Reference]]</div>Db0https://wiki.wesnoth.org/index.php?title=InterfaceActionsWML&diff=21614InterfaceActionsWML2008-02-13T20:02:58Z<p>Db0: /* Other interface tags */</p>
<hr />
<div>{{WML Tags}}<br />
== Interface actions ==<br />
<br />
Interface actions are actions that do not have an effect on gameplay;<br />
instead, they show something to the player. The main interface tags<br />
are '''[message]''' and '''[objectives]''', but several other tags affect<br />
the interface also.<br />
<br />
== [message] ==<br />
The most commonly used interface action is [message], which displays a message to the user in a dialog box. It can also be used to take input from the user.<br />
<br />
The following key/tags are accepted for [message]:<br />
* standard unit filter - the unit whose profile and name are displayed. If no unit matching this filter is found, the message is not displayed (The unit has probably been killed).<br>'''[message]''' elements should be constructed so that it is either guaranteed that a certain unit is alive, or so that dialog flows smoothly even if the message isn't displayed.<br />
<br />
* ''speaker'' an alternative to standard unit filter<br />
** 'narrator' the dialog box is displayed without a caption for the unit speaking or a unit image<br />
** 'unit' the primary unit for the event is speaking<br />
** 'second_unit' the secondary unit for the event is speaking<br />
<br />
* ''message'' (translatable) the text to display to the right of the image. ''message'' is sometimes multiple lines; if it is, be sure to use quotes(''' ' ''' or ''' " ''')<br />
* ''side_for'' (default: all sides) comma seperated list of sides for who message is shown. {{DevFeature}}<br />
* ''image'' (default: profile image of speaker) the image to display next to the message.<br />
* ''caption'' (default: name of speaker) the caption to display beside the image. Name to be displayed.<br />
* ''duration'' (default: 10) the minimum number of frames for this message to be displayed. (A frame lasts about 30 milliseconds.) During this time any dialog decisions will be disregarded. {{DevFeature}}<br />
* ''sound'' a sound effect (wav file) to play as the message is displayed. This can be a comma-separated list, from which one will be randomly chosen.<br />
* '''[option]''' zero or more '''[option]''' elements may be present. If '''[option]''' elements are present, then each option will be displayed in a menu for the user to select one option.<br />
** ''message'' (translatable) the text displayed for the option (see [[DescriptionWML]])<br />
** '''[show_if]''' if present then this option will only be displayed if the conditional statement in this tag is passed (see [[InternalActionsWML]]) {{DevFeature}}<br />
** '''[command]''' an element containing actions which are executed if the option is selected.<br />
* '''[text_input]''' there can be only one [text_input] tag. this adds a text input field to the message.<br />
** ''variable'' the variable that the user's input will be written to<br />
** ''label'' a text label to the left of the input field<br />
** ''max_chars'' the maximum number of characters that may be typed into the field<br />
** ''text'' text that is written into the field in the beginning<br />
* note that '''[option]''' and '''[text_input]''' can only be used in moveto events in MP, otherwise they cause OOS<br />
<br />
Text formatting options for '''[message]'''. These can also be used in unit names (user_description), objectives, and such.<br />
* A tilde (~) as the first character causes the line to be boldfaced.<br />
* An at symbol (@) as the first character causes the line to be green, as done with victory conditions.<br />
* A pound symbol (#) as the first character causes the line to be red, as done with defeat conditions.<br />
* An asterisk (*) as the first character causes the line to be bigger.<br />
* A backquote (`) as the first character causes the line to be smaller.<br />
* If used, the caption key text is boldfaced.<br />
* An RGB colour code in the beginning causes the line to be the given colour. This can still be preceded by the above characters. Example: ''message=_"<255,0,0>Red!"''<br />
<br />
== [objectives] ==<br />
The other tag used for plot development is '''[objectives]'''.<br />
The '''[objectives]''' tag overwrites any previously set objectives,<br />
and displays text which should describe the objectives of the scenario.<br />
Scenario objectives are displayed on the player's first turn after the tag is used,<br />
or as part of the event if it triggers during that player's turn.<br />
Objectives can also be accessed at any time in a scenario using the<br />
"Scenario Objectives" game menu option, making this tag useful for<br />
scenario-specific information that the player may need to refer to during play.<br />
<br />
This tag renders the ''objectives'' attribute of [scenario] obsolete (see ''objectives'', [[ScenarioWML]]).<br />
Instead of using ''objectives'', use '''[objectives]''' to set scenario objectives inside a prestart event.<br />
It can also be used to overwrite the starting objectives mid-scenario.<br />
<br />
Attributes of '''[objectives]''':<br />
* ''side'' Default '0'. The side to set the objectives for. A value of 0 sets objectives for all sides.<br />
* ''summary'' Displayed first in the objectives text, this should describe the basic objective for the overall scenario. Can be omitted.<br />
* ''note'' Displayed last in the objectives text, this is sometimes used for hints or additional information. Can be omitted.<br />
* ''victory_string'' Default ' _ "Victory:"', this text precedes the victory objectives.<br />
* ''defeat_string'' Default ' _ "Defeat:"', this text precedes the defeat objectives.<br />
* ''silent'' Default: not present. If set to "yes", the objectives are silently changed. Else, they will be shown to the user when appropriate.<br />
<br />
Tags of '''[objectives]''':<br />
* '''[objective]''' describes a win or loss condition. Most scenarios have multiple win or loss conditions, so use a separate [objective] subtag for each line; this helps with translations.<br />
** ''description'' text for the specific win or loss condition.<br />
** ''condition'' The color and placement of the text. Values are 'win'(colored green, placed after ''victory_string'') and 'lose'(colored red, placed after ''defeat_string'')<br />
<br />
=== Macros ===<br />
There are a few predefined macros for Objectives that you can use to shorten the code. '''{SET_OBJECTIVES}''', '''{VICTORY_CONDITION}''' and '''{DEFEAT_CONDITION}'''. There are all used together. For more information look [http://www.wesnoth.org/misc/macro-reference.xhtml here]<br />
<br />
== [set_menu_item] {{DevFeature}} ==<br />
This tag is used to add a custom option in the right-click context menu which can then be used to trigger arbitrary WML commands.<br />
<br />
* ''id'' the unique id for this menu item. If a menu item with this id already exists, it allows you to set specific changes to that item.<br />
* ''description'' the in-game text that will appear for this item in the menu.<br />
* ''image'' the image to display next to this item.<br />
* ''needs_select'' if ''yes'' (default ''no''), then the latest select event (see [[EventWML]]) that triggered before this menu item was chosen will be transmitted over the network before this menu item action will be. This only has any effect in networked multiplayer, and is intended to allow more elaborate menu item behaviour there without causing out of sync errors. If you don't know what this means, just leave it false.<br />
* '''[show_if]''' If present, the menu item will only be available if the conditional statement (see [[InternalActionsWML]]) within evaluates to true. When this is evaluated, the WML variables ''$x1'' and ''$y1'' will point to the location on which the context menu was invoked, so it's possible to for example only enable the option on empty hexes or on a particular unit.<br />
* '''[filter_location]''' contains a location filter similar to the one found inside Single Unit Filters (see [[FilterWML]]). The menu item will only be available on matching locations.<br />
* '''[command]''' contains the WML actions to be executed when the menu item is selected. Again, the WML variables ''$x1'' and ''$y1'' will point to the location on which the context menu was invoked on.<br />
<br />
== Other interface tags ==<br />
<br />
The following tags are also action tags:<br />
* '''[item]''' makes a graphical item appear on a certain hex. Note this only places the graphics for an item. It does not make the item do anything. Use a moveto event to make moving onto the item do something. <tt>''('''Hint:''' There are a number of predefined items that are used in various campaigns that you can make use of. You can find a list of them if you look into the items.cfg file in the wesnoth install directory (under /data/core/macros))''</tt><br />
** ''x'', ''y'' the location to place the item.<br />
** ''image'' the image (in ''images/ ''as .png) to place on the hex.<br />
** ''halo'' an image to place centered on the hex. Use this instead of ''image'' if the image is bigger than the hex.<br />
* '''[removeitem]''' removes any graphical items on a given hex<br />
** ''x'', ''y'' the hex to remove items off<br />
* '''[print]''' displays a message across the screen. The message will disappear after a certain time.<br />
** ''text'' (translatable) the text to display.<br />
** ''size'' (default=12) the pointsize of the font to use<br />
** ''duration'' (default=50) the length of time to display the text for. This is measured in the number of 'frames'. A frame in Wesnoth is usually displayed for around 30ms.<br />
** ''red'', ''green'', ''blue'' (default=0,0,0) the color to display the text in. Values vary from 0-255.<br />
* '''[move_unit_fake]''' moves an image of a unit along a certain path on the map. The path does not need to be a continuous list of adjacent hexes, so for example only the start and end points can be given, in which case the straightest line between those points will be calculated and used.<br />
** ''type'' the type of the unit whose image to use<br />
** ''x'' a comma-seperated list of x locations to move along<br />
** ''y'' a comma-seperated list of y locations to move along (x and y values are matched pairs)<br />
** ''side'' the side of the fake unit, used for team colouring the fake unit<br />
* '''[hide_unit]''' makes the given unit become invisible. Useful in conjunction with '''[move_unit_fake]''' to move a leader unit into position on-screen. Only one unit may be hidden at a time.<br />
** ''x'', ''y'' location of the unit to be hidden. (NOT a standard unit filter! Just x and y.)<br />
* '''[unhide_unit]''' stops the currently hidden unit from being hidden.<br />
* '''[scroll]''' Scroll a certain number of pixels in a given direction. Useful for earthquake/shaking effects.<br />
** ''x'', ''y'' the number of pixels to scroll along the x and y axis<br />
* '''[scroll_to]''' Scroll to a given hex<br />
** ''x'', ''y'' the hex to scroll to<br />
** ''check_fogged'' whether to scroll even to locations covered in fog or shroud. Possible values ''true'' (don't scroll to fog) and ''false'' (scroll even to fog), with ''false'' as the default.<br />
* '''[scroll_to_unit]''' Scroll to a given unit<br />
** standard unit filter<br />
** ''check_fogged'' whether to scroll even to locations covered in fog or shroud. Possible values ''true'' (don't scroll to fog) and ''false'' (scroll even to fog), with ''false'' as the default.<br />
* '''[sound]''' Plays a sound<br />
** ''name'' the filename of the sound to play (in ''sounds/'' as .wav or .ogg)<br />
** ''repeat'' {{DevFeature}} repeats the sound for a specified additional number of times (default=0)<br />
* '''[sound_source]''' {{DevFeature}} Creates a sound source. "Sound sources" is a general name for a mechanism, which makes possible for map elements to emit sounds according to some rules, where "map elements" can be specific locations or terrain types. For now, only sound sources tied to locations are supported.<br />
** ''id'' a unique identification key of the sound source<br />
** ''sounds'' a list of comma separated, randomly played sounds associated with the sound source<br />
** ''delay'' a numerical value (in milliseconds) of the minimal delay between two playbacks of the source's sound if the source remains visible on the screen; if one scrolls out and back in, the source will be considered as ready to play<br />
** ''chance'' a percentage (a value from 0 to 100) describing the chance of the source being activated every second after the delay has passed or when the source's location appears on the screen (note that it cannot play more than one file at the same time)<br />
** ''check_fogged'' possible values "true" and "false" - if true the source will not play if its locations are fogged/shrouded<br />
** ''x,y'' a standard location filter for the locations associated with the sound source<br />
* '''[remove_sound_source]''' {{DevFeature}} Removes a previously defined sound source.<br />
** ''id'' the identification key of the sound source to remove<br />
* '''[music]''' Switches to playing different music<br />
** ''name'' the filename of the music to play (in ''music/'' as .ogg)<br />
** see [[MusicListWML]] for the correct syntax<br />
* '''[colour_adjust]''' tints the colour of the screen.<br />
** ''red'', ''green'', ''blue'' values from -255 to 255, the amount to tint by for each colour<br />
* '''[delay]''' pauses the game<br />
** ''time'' the time to pause in milliseconds<br />
* '''[redraw]''' redraws the screen (this normally isn't done during events, although some of the other interface actions cause the screen or parts of it to be redrawn).<br />
** ''side'' if used, recalculates fog and shroud for that side. Useful if you for example spawn friendly units in the middle of an event and want the shroud to update accordingly (otherwise units that spawn inside fog would remain invisible for the duration of the event, since the fog would not automatically get cleared around them).<br />
* '''[unit_overlay]''' sets an image that will be drawn over a particular unit, and follow it around<br />
** ''x'', ''y'' the location of the unit to overlay on<br />
** ''image'' the image to place on the unit<br />
* '''[remove_unit_overlay]''' removes a particular overlayed image from a unit<br />
** ''x'', ''y'' the location of the unit to remove an overlay from<br />
** ''image'' the image to remove from the unit<br />
* '''[animate_unit]''' uses the custom animation of a unit to animate it on screen (if the unit has the corresponding animation)<br />
** ''flag'' the key to find the good custom animation in the unit description see the '''[extra_anim]''' description in [[AnimationWML]] Standar anims can be triggered with the following keywors ''leading recruited standing idling levelin levelout healing healed poisoned movement defend attack death victory pre_teleport post_teleport''<br />
** '''[filter]''' a standard unit filter see [[FilterWML]] by default, the unit at the event location will be animated. You can use this tag to choose any other unit to animate<br />
** '''[primary_attack]''' if this tag is not present, the filter for animation will be triggered with no attack. If it is here, all attacks from the unit will be filtered, and a matching one will be used to filter the animation<br />
** '''[secondary_attack]''' same for the second attack<br />
** ''hit'' the hit type to filter unit on<br />
** ''text'' a text to hover during the animation<br />
** ''text_color'' r,g,b value for the text color<br />
** ''with_bars'' whether to display the status bars or not.<br />
* '''[label]''' places a label on the map.<br />
** ''x'', ''y'' the location of the label<br />
** ''text'' what the label should say<br />
** ''team_name'' if specified, the label will only be visible to the given team.<br />
* '''[deprecated_message]''' {{DevFeature}} shows a deprecated message in the message area, this feature is only intended to be used to warn about deprecated macros in mainline. The message is not translatable.<br />
** ''message'' the message to show.<br />
* '''[debug_message]''' {{DevFeature}} outputs a message to Wesnoth's console output. Intended for campaign designers to output silent text to the console, without annoying the player; then, that text might contain information useful for later bug-reporting.<br />
** ''message'' the message to show<br />
** ''logger'' the Wesnoth engine output logger that should catch the text; this might be 'err' (the errors log level), 'warn'/'wrn' (the warnings log level) or anything else (the information log level). Not all information will be displayed depending on the log level chosen when starting Wesnoth.<br />
<br />
== Useful Macros ==<br />
There are some predefined macros that you find useful for interface actions. You can find a complete list along with a detailed explanation of how they work [http://www.wesnoth.org/misc/macro-reference.xhtml here].<br />
* '''{FLOATING_TEXT}''' Float some text over a unit similar to the damage numbers.<br />
* '''{HIGHLIGHT_UNIT}''' Highlight a unit on the map. Use this to show important units<br />
* '''{HIGHLIGHT_IMAGE}''' Places and highlights an image on the map. Use this to show important items or locations<br />
* '''{SET_IMAGE}''' Places an image on the map which has no other function.<br />
* '''{TREMOR}''' Creates a tremor like screenshake<br />
* '''{FLASH_WHITE}''' Flash the screen white momentarily. You can also replace WHITE with RED, BLUE or GREEN for a different colour.<br />
<br />
== See Also ==<br />
* [[DirectActionsWML]]<br />
* [[InternalActionsWML]]<br />
* [[EventWML]]<br />
* [[ReferenceWML]]<br />
<br />
<br />
[[Category: WML Reference]]</div>Db0https://wiki.wesnoth.org/index.php?title=InterfaceActionsWML&diff=21613InterfaceActionsWML2008-02-13T20:01:31Z<p>Db0: added some useful macros list</p>
<hr />
<div>{{WML Tags}}<br />
== Interface actions ==<br />
<br />
Interface actions are actions that do not have an effect on gameplay;<br />
instead, they show something to the player. The main interface tags<br />
are '''[message]''' and '''[objectives]''', but several other tags affect<br />
the interface also.<br />
<br />
== [message] ==<br />
The most commonly used interface action is [message], which displays a message to the user in a dialog box. It can also be used to take input from the user.<br />
<br />
The following key/tags are accepted for [message]:<br />
* standard unit filter - the unit whose profile and name are displayed. If no unit matching this filter is found, the message is not displayed (The unit has probably been killed).<br>'''[message]''' elements should be constructed so that it is either guaranteed that a certain unit is alive, or so that dialog flows smoothly even if the message isn't displayed.<br />
<br />
* ''speaker'' an alternative to standard unit filter<br />
** 'narrator' the dialog box is displayed without a caption for the unit speaking or a unit image<br />
** 'unit' the primary unit for the event is speaking<br />
** 'second_unit' the secondary unit for the event is speaking<br />
<br />
* ''message'' (translatable) the text to display to the right of the image. ''message'' is sometimes multiple lines; if it is, be sure to use quotes(''' ' ''' or ''' " ''')<br />
* ''side_for'' (default: all sides) comma seperated list of sides for who message is shown. {{DevFeature}}<br />
* ''image'' (default: profile image of speaker) the image to display next to the message.<br />
* ''caption'' (default: name of speaker) the caption to display beside the image. Name to be displayed.<br />
* ''duration'' (default: 10) the minimum number of frames for this message to be displayed. (A frame lasts about 30 milliseconds.) During this time any dialog decisions will be disregarded. {{DevFeature}}<br />
* ''sound'' a sound effect (wav file) to play as the message is displayed. This can be a comma-separated list, from which one will be randomly chosen.<br />
* '''[option]''' zero or more '''[option]''' elements may be present. If '''[option]''' elements are present, then each option will be displayed in a menu for the user to select one option.<br />
** ''message'' (translatable) the text displayed for the option (see [[DescriptionWML]])<br />
** '''[show_if]''' if present then this option will only be displayed if the conditional statement in this tag is passed (see [[InternalActionsWML]]) {{DevFeature}}<br />
** '''[command]''' an element containing actions which are executed if the option is selected.<br />
* '''[text_input]''' there can be only one [text_input] tag. this adds a text input field to the message.<br />
** ''variable'' the variable that the user's input will be written to<br />
** ''label'' a text label to the left of the input field<br />
** ''max_chars'' the maximum number of characters that may be typed into the field<br />
** ''text'' text that is written into the field in the beginning<br />
* note that '''[option]''' and '''[text_input]''' can only be used in moveto events in MP, otherwise they cause OOS<br />
<br />
Text formatting options for '''[message]'''. These can also be used in unit names (user_description), objectives, and such.<br />
* A tilde (~) as the first character causes the line to be boldfaced.<br />
* An at symbol (@) as the first character causes the line to be green, as done with victory conditions.<br />
* A pound symbol (#) as the first character causes the line to be red, as done with defeat conditions.<br />
* An asterisk (*) as the first character causes the line to be bigger.<br />
* A backquote (`) as the first character causes the line to be smaller.<br />
* If used, the caption key text is boldfaced.<br />
* An RGB colour code in the beginning causes the line to be the given colour. This can still be preceded by the above characters. Example: ''message=_"<255,0,0>Red!"''<br />
<br />
== [objectives] ==<br />
The other tag used for plot development is '''[objectives]'''.<br />
The '''[objectives]''' tag overwrites any previously set objectives,<br />
and displays text which should describe the objectives of the scenario.<br />
Scenario objectives are displayed on the player's first turn after the tag is used,<br />
or as part of the event if it triggers during that player's turn.<br />
Objectives can also be accessed at any time in a scenario using the<br />
"Scenario Objectives" game menu option, making this tag useful for<br />
scenario-specific information that the player may need to refer to during play.<br />
<br />
This tag renders the ''objectives'' attribute of [scenario] obsolete (see ''objectives'', [[ScenarioWML]]).<br />
Instead of using ''objectives'', use '''[objectives]''' to set scenario objectives inside a prestart event.<br />
It can also be used to overwrite the starting objectives mid-scenario.<br />
<br />
Attributes of '''[objectives]''':<br />
* ''side'' Default '0'. The side to set the objectives for. A value of 0 sets objectives for all sides.<br />
* ''summary'' Displayed first in the objectives text, this should describe the basic objective for the overall scenario. Can be omitted.<br />
* ''note'' Displayed last in the objectives text, this is sometimes used for hints or additional information. Can be omitted.<br />
* ''victory_string'' Default ' _ "Victory:"', this text precedes the victory objectives.<br />
* ''defeat_string'' Default ' _ "Defeat:"', this text precedes the defeat objectives.<br />
* ''silent'' Default: not present. If set to "yes", the objectives are silently changed. Else, they will be shown to the user when appropriate.<br />
<br />
Tags of '''[objectives]''':<br />
* '''[objective]''' describes a win or loss condition. Most scenarios have multiple win or loss conditions, so use a separate [objective] subtag for each line; this helps with translations.<br />
** ''description'' text for the specific win or loss condition.<br />
** ''condition'' The color and placement of the text. Values are 'win'(colored green, placed after ''victory_string'') and 'lose'(colored red, placed after ''defeat_string'')<br />
<br />
=== Macros ===<br />
There are a few predefined macros for Objectives that you can use to shorten the code. '''{SET_OBJECTIVES}''', '''{VICTORY_CONDITION}''' and '''{DEFEAT_CONDITION}'''. There are all used together. For more information look [http://www.wesnoth.org/misc/macro-reference.xhtml here]<br />
<br />
== [set_menu_item] {{DevFeature}} ==<br />
This tag is used to add a custom option in the right-click context menu which can then be used to trigger arbitrary WML commands.<br />
<br />
* ''id'' the unique id for this menu item. If a menu item with this id already exists, it allows you to set specific changes to that item.<br />
* ''description'' the in-game text that will appear for this item in the menu.<br />
* ''image'' the image to display next to this item.<br />
* ''needs_select'' if ''yes'' (default ''no''), then the latest select event (see [[EventWML]]) that triggered before this menu item was chosen will be transmitted over the network before this menu item action will be. This only has any effect in networked multiplayer, and is intended to allow more elaborate menu item behaviour there without causing out of sync errors. If you don't know what this means, just leave it false.<br />
* '''[show_if]''' If present, the menu item will only be available if the conditional statement (see [[InternalActionsWML]]) within evaluates to true. When this is evaluated, the WML variables ''$x1'' and ''$y1'' will point to the location on which the context menu was invoked, so it's possible to for example only enable the option on empty hexes or on a particular unit.<br />
* '''[filter_location]''' contains a location filter similar to the one found inside Single Unit Filters (see [[FilterWML]]). The menu item will only be available on matching locations.<br />
* '''[command]''' contains the WML actions to be executed when the menu item is selected. Again, the WML variables ''$x1'' and ''$y1'' will point to the location on which the context menu was invoked on.<br />
<br />
== Other interface tags ==<br />
<br />
The following tags are also action tags:<br />
* '''[item]''' makes a graphical item appear on a certain hex. Note this only places the graphics for an item. It does not make the item do anything. Use a moveto event to make moving onto the item do something. <tt>''('''Hint:''' There are a number of predefined items that are used in various campaigns that you can make use of. You can find a list of them if you look into the items.cfg file in the wesnoth install directory)''</tt><br />
** ''x'', ''y'' the location to place the item.<br />
** ''image'' the image (in ''images/ ''as .png) to place on the hex.<br />
** ''halo'' an image to place centered on the hex. Use this instead of ''image'' if the image is bigger than the hex.<br />
* '''[removeitem]''' removes any graphical items on a given hex<br />
** ''x'', ''y'' the hex to remove items off<br />
* '''[print]''' displays a message across the screen. The message will disappear after a certain time.<br />
** ''text'' (translatable) the text to display.<br />
** ''size'' (default=12) the pointsize of the font to use<br />
** ''duration'' (default=50) the length of time to display the text for. This is measured in the number of 'frames'. A frame in Wesnoth is usually displayed for around 30ms.<br />
** ''red'', ''green'', ''blue'' (default=0,0,0) the color to display the text in. Values vary from 0-255.<br />
* '''[move_unit_fake]''' moves an image of a unit along a certain path on the map. The path does not need to be a continuous list of adjacent hexes, so for example only the start and end points can be given, in which case the straightest line between those points will be calculated and used.<br />
** ''type'' the type of the unit whose image to use<br />
** ''x'' a comma-seperated list of x locations to move along<br />
** ''y'' a comma-seperated list of y locations to move along (x and y values are matched pairs)<br />
** ''side'' the side of the fake unit, used for team colouring the fake unit<br />
* '''[hide_unit]''' makes the given unit become invisible. Useful in conjunction with '''[move_unit_fake]''' to move a leader unit into position on-screen. Only one unit may be hidden at a time.<br />
** ''x'', ''y'' location of the unit to be hidden. (NOT a standard unit filter! Just x and y.)<br />
* '''[unhide_unit]''' stops the currently hidden unit from being hidden.<br />
* '''[scroll]''' Scroll a certain number of pixels in a given direction. Useful for earthquake/shaking effects.<br />
** ''x'', ''y'' the number of pixels to scroll along the x and y axis<br />
* '''[scroll_to]''' Scroll to a given hex<br />
** ''x'', ''y'' the hex to scroll to<br />
** ''check_fogged'' whether to scroll even to locations covered in fog or shroud. Possible values ''true'' (don't scroll to fog) and ''false'' (scroll even to fog), with ''false'' as the default.<br />
* '''[scroll_to_unit]''' Scroll to a given unit<br />
** standard unit filter<br />
** ''check_fogged'' whether to scroll even to locations covered in fog or shroud. Possible values ''true'' (don't scroll to fog) and ''false'' (scroll even to fog), with ''false'' as the default.<br />
* '''[sound]''' Plays a sound<br />
** ''name'' the filename of the sound to play (in ''sounds/'' as .wav or .ogg)<br />
** ''repeat'' {{DevFeature}} repeats the sound for a specified additional number of times (default=0)<br />
* '''[sound_source]''' {{DevFeature}} Creates a sound source. "Sound sources" is a general name for a mechanism, which makes possible for map elements to emit sounds according to some rules, where "map elements" can be specific locations or terrain types. For now, only sound sources tied to locations are supported.<br />
** ''id'' a unique identification key of the sound source<br />
** ''sounds'' a list of comma separated, randomly played sounds associated with the sound source<br />
** ''delay'' a numerical value (in milliseconds) of the minimal delay between two playbacks of the source's sound if the source remains visible on the screen; if one scrolls out and back in, the source will be considered as ready to play<br />
** ''chance'' a percentage (a value from 0 to 100) describing the chance of the source being activated every second after the delay has passed or when the source's location appears on the screen (note that it cannot play more than one file at the same time)<br />
** ''check_fogged'' possible values "true" and "false" - if true the source will not play if its locations are fogged/shrouded<br />
** ''x,y'' a standard location filter for the locations associated with the sound source<br />
* '''[remove_sound_source]''' {{DevFeature}} Removes a previously defined sound source.<br />
** ''id'' the identification key of the sound source to remove<br />
* '''[music]''' Switches to playing different music<br />
** ''name'' the filename of the music to play (in ''music/'' as .ogg)<br />
** see [[MusicListWML]] for the correct syntax<br />
* '''[colour_adjust]''' tints the colour of the screen.<br />
** ''red'', ''green'', ''blue'' values from -255 to 255, the amount to tint by for each colour<br />
* '''[delay]''' pauses the game<br />
** ''time'' the time to pause in milliseconds<br />
* '''[redraw]''' redraws the screen (this normally isn't done during events, although some of the other interface actions cause the screen or parts of it to be redrawn).<br />
** ''side'' if used, recalculates fog and shroud for that side. Useful if you for example spawn friendly units in the middle of an event and want the shroud to update accordingly (otherwise units that spawn inside fog would remain invisible for the duration of the event, since the fog would not automatically get cleared around them).<br />
* '''[unit_overlay]''' sets an image that will be drawn over a particular unit, and follow it around<br />
** ''x'', ''y'' the location of the unit to overlay on<br />
** ''image'' the image to place on the unit<br />
* '''[remove_unit_overlay]''' removes a particular overlayed image from a unit<br />
** ''x'', ''y'' the location of the unit to remove an overlay from<br />
** ''image'' the image to remove from the unit<br />
* '''[animate_unit]''' uses the custom animation of a unit to animate it on screen (if the unit has the corresponding animation)<br />
** ''flag'' the key to find the good custom animation in the unit description see the '''[extra_anim]''' description in [[AnimationWML]] Standar anims can be triggered with the following keywors ''leading recruited standing idling levelin levelout healing healed poisoned movement defend attack death victory pre_teleport post_teleport''<br />
** '''[filter]''' a standard unit filter see [[FilterWML]] by default, the unit at the event location will be animated. You can use this tag to choose any other unit to animate<br />
** '''[primary_attack]''' if this tag is not present, the filter for animation will be triggered with no attack. If it is here, all attacks from the unit will be filtered, and a matching one will be used to filter the animation<br />
** '''[secondary_attack]''' same for the second attack<br />
** ''hit'' the hit type to filter unit on<br />
** ''text'' a text to hover during the animation<br />
** ''text_color'' r,g,b value for the text color<br />
** ''with_bars'' whether to display the status bars or not.<br />
* '''[label]''' places a label on the map.<br />
** ''x'', ''y'' the location of the label<br />
** ''text'' what the label should say<br />
** ''team_name'' if specified, the label will only be visible to the given team.<br />
* '''[deprecated_message]''' {{DevFeature}} shows a deprecated message in the message area, this feature is only intended to be used to warn about deprecated macros in mainline. The message is not translatable.<br />
** ''message'' the message to show.<br />
* '''[debug_message]''' {{DevFeature}} outputs a message to Wesnoth's console output. Intended for campaign designers to output silent text to the console, without annoying the player; then, that text might contain information useful for later bug-reporting.<br />
** ''message'' the message to show<br />
** ''logger'' the Wesnoth engine output logger that should catch the text; this might be 'err' (the errors log level), 'warn'/'wrn' (the warnings log level) or anything else (the information log level). Not all information will be displayed depending on the log level chosen when starting Wesnoth.<br />
== Useful Macros ==<br />
There are some predefined macros that you find useful for interface actions. You can find a complete list along with a detailed explanation of how they work [http://www.wesnoth.org/misc/macro-reference.xhtml here].<br />
* '''{FLOATING_TEXT}''' Float some text over a unit similar to the damage numbers.<br />
* '''{HIGHLIGHT_UNIT}''' Highlight a unit on the map. Use this to show important units<br />
* '''{HIGHLIGHT_IMAGE}''' Places and highlights an image on the map. Use this to show important items or locations<br />
* '''{SET_IMAGE}''' Places an image on the map which has no other function.<br />
* '''{TREMOR}''' Creates a tremor like screenshake<br />
* '''{FLASH_WHITE}''' Flash the screen white momentarily. You can also replace WHITE with RED, BLUE or GREEN for a different colour.<br />
<br />
== See Also ==<br />
* [[DirectActionsWML]]<br />
* [[InternalActionsWML]]<br />
* [[EventWML]]<br />
* [[ReferenceWML]]<br />
<br />
<br />
[[Category: WML Reference]]</div>Db0https://wiki.wesnoth.org/index.php?title=DirectActionsWML&diff=21611DirectActionsWML2008-02-13T19:46:14Z<p>Db0: /* Useful Macros */</p>
<hr />
<div>{{WML Tags}}<br />
== Direct actions ==<br />
<br />
Direct actions are actions that have a direct effect on gameplay.<br />
<br />
The following tags are actions:<br />
* '''[endlevel]''' ends the scenario.<br />
** ''result'' before the scenario is over, all events with ''name=result'' are triggered. The message ''result_message'' with the heading ''result_heading'' (see [[LanguageWML]]) are displayed. If ''result=victory'', the player progresses to the next level; if ''result=defeat'', the game returns to the main menu. These last two are rarely used: ''result=continue'' behaves identically to ''result=victory'' except the player's gold is not reduced to 80%, and it does not bring up a "Victory" message or the gold changing message (since it doesn't change); ''result=continue_no_save'' works similarly, except the player is not asked whether to save the game, and is taken directly to the next scenario without any messages. Unless ''result=defeat'', the following keys can also be used:<br />
** ''bonus'' whether the player should get bonus gold (maximum possible gold that could have been earned by waiting the level out). The default is bonus=yes.<br />
** ''next_scenario'' (default specified in '''[scenario]''' tag) the ID of the next scenario that should be played. All units that side 1 controls at this point become available for recall in ''next_scenario''.<br />
** When the result is "victory" the following keys can be used:{{DevFeature}}<br />
*** ''carryover_percentage'' by default 80% of the gold is carried over to the next scenario, with this key the amount can be changed.<br />
*** ''carryover_add'' if true the gold will be added to the starting gold the next scenario, if false the next scenario will start with the amount of the current scenario (after taxes) or the minimum in the next scenario. Default is false.<br />
* '''[unit]''' places a unit on the map. For syntax see [[SingleUnitWML]].{{Short Note:Predefined Macro|GENERIC_UNIT}}<br />
* '''[recall]''' recalls a unit. The unit is recalled free of charge, and is placed near the leader.<br />
** ''standard unit filter'' the first matching unit will be recalled. If no units match this tag is ignored.<br />
** ''x,y'' the unit is placed here instead of next to the leader.<br />
** ''show'' if not "no", display the unit being recalled.<br />
* '''[teleport]''' teleports a unit on map. {{Short Note:Predefined Macro|TELEPORT_UNIT}}<br />
** '''[filter]''' (standard unit filter) all units matching the filter will be teleported.<br />
** ''x,y'' the position to teleport to.<br />
* '''[terrain_mask]''' changes the terrain on the map. See [[TerrainMaskWML]].<br />
* '''[terrain]''' changes the terrain on the map.<br />
** ''terrain'' the character of the terrain to use. See [[TerrainLettersWML]] to see what letter a type of terrain uses.<br />
** standard location filter- the area to change the terrain of.<br />
* '''[gold]''' give one side gold.<br />
** ''amount'' the amount of gold to give.<br />
** ''side'' (default=1) the number of the side to give the gold to.<br />
* '''[unstore_unit]''' creates a unit from a game variable, and activates it on the playing field. This must be a specific variable describing a unit, and may not be an array -- to unstore an entire array, iterate over it. The variable is not cleared. See also [store_unit], [while] and [clear_variable] in [[InternalActionsWML]]. Note units with a negative amount of hitpoints will be unstored with 1 hitpoint.<br />
** ''variable'' the name of the variable.<br />
** ''find_vacant'' whether the unit should be placed on the nearest vacant tile to its specified location. If this is set to 'no'(default), then any unit on the same tile as the unit being unstored will be destroyed.<br />
** ''text'' (translatable) floating text to display above the unit, such as a damage amount<br />
** ''red'', ''green'', ''blue'' (default=0,0,0) the color to display the text in. Values vary from 0-255. You may find it convenient to use the {COLOR_HARM} or {COLOR_HEAL} macro instead. (Use {COLOR_HARM} or {COLOR_HEAL} instead of the whole red,green,blue= line.)<br />
** ''advance'' if the XP has been modified then there will be tried to advance the unit, default true. {{DevFeature}} <br />
* '''[allow_recruit]''' allows a side to recruit units it couldn't previously recruit.<br />
** ''type'' the types of units that the side can now recruit.<br />
** ''side'' (default=1) the number of the side that is being allowed to recruit the units.<br />
* '''[disallow_recruit]''' prevents a side from recruiting units it could previously recruit.<br />
** ''type'' the types of units that the side can no longer recruit.<br />
** ''side'' (default=1) the number of the side that may no longer recruit the units.<br />
* '''[set_recruit]''' sets the units a side can recruit.<br />
** ''recruit'' the types of units that the side can now recruit.<br />
** ''side'' (default=1) the number of the side that is having its recruitment set.<br />
* '''[modify_side]''' modifies some details of a given side in the middle of a scenario. '''The following listed properties are the only properties that [modify_side] can affect!'<br />
** ''side'' (default=1) the number of the side that is to be changed.<br />
** ''income'' the income given at the begining of each turn.<br />
** ''team_name'' the team in which the side plays the scenario.<br />
** ''user_team_name'' a translatable string representing the team's description. This has no effect on alliances. Defaults to ''team_name''.<br />
** ''gold'' the amount of gold the side owns.<br />
** ({{DevFeature}}) The following keys are only recognized in the latest development versions:<br />
*** ''village_gold'' the income setting per village for the side.<br />
*** ''controller'' the identifier string of the side's controller. Uses the same syntax of the ''controller'' key in the [[SideWML|[side]]] tag.<br />
*** ''fog'' a boolean string (yes/no) describing the status of Fog for the side.<br />
*** ''shroud'' a boolean string describing the status of Shroud for the side.<br />
* '''[modify_turns]''' modifies the turn limit in the middle of a scenario.<br />
** ''value'' the new turn limit.<br />
** ''add'' if used instead of ''value'', specifies the number of turns to add to the current limit (can be negative).<br />
* '''[capture_village]''' changes the ownership of a village.<br />
** ''side'' the side that takes control of the village. If not given, the village will become neutral.<br />
** ''x, y'' the location of the village.<br />
* '''[kill]''' Removes all units (including units in a recall list) that match the filter from the game.<br />
** standard unit filter<br />
** ''animate'' if 'yes', displays the unit dying (fading away).<br />
** ''fire_event'' if 'yes', triggers any appropriate 'die' events (See [[EventWML]]). Note that any 'die' events triggered by this are executed immediately, interrupting the current event and thus causing the x1, y1, x2, and y2 variables to be reset for that 'die' event, which in turn causes those variables to be invalid for the remainder of this event.<br />
* '''[unstone]''' Unstones all units that match the filter.<br />
** '''[filter]''' (standard unit filter) all units matching the filter will be unstoned. If no unit matches the filter, then nothing happens (probably). If absent, all units on the map are unstoned.<br />
* '''[object]''' gives some unit an object and removes all items on the tile the unit is on.<br />
** ''id'' when the object is picked up, a flag is set for ''id''. The object cannot be picked up if a flag for ''id'' has been set. This means that any object with an id can only be used once, even if first_time_only=no is set for the event. This restriction is per level. In a campaign objects with the same id can be assigned once per level.<br />
** '''[effect]''' one or more effect elements may be listed. See [[EffectWML]] for a description of [effect].<br />
** ''duration'' if 'level', effects only last until the end of the level (note : 'level' is the scenario, so this doesn't mean it last until the unit levels-up).<br />
** '''[filter]''' (standard unit filter) the first unit found that matches the filter will be given the object. If no unit matches the filter, then a message is displayed and the object is not removed.<br />
** '''[then]''' a subtag that lets you execute actions if the filter conditions are met. The most common action that should be inside here is a '''[removeitem]''' tag, but you could probably put any tags that otherwise work in a [then] tag.<br />
** ''silent'' whether or not messages should be suppressed. Default is "no".<br />
** ''image'' the displayed image of the object.<br />
** ''name'' (translatable) displayed as a caption of the image.<br />
<br />
** ''description'' (translatable) displayed as a message of the image.<br />
** ''cannot_use_message'' (translatable) displayed instead of '''description''' if no unit passes the filter test.<br />
** If you do not supply a filter, the object action will be applied to a unit at the location of the moveto event. Currently this isn't recommended as it is not clear that this will continue working this way. Instead it is better to explicitly include a location filter.<br />
** The object action does not act on units in the recall list. There is a feature request in to allow this, but it is not clear whether or not it will be accepted.<br />
* '''[remove_shroud]''' removes some shroud from the map for a certain side (only relevant for sides that have shroud=yes).<br />
** ''side'' (default=1) the side for which to remove shroud.<br />
** standard location filter- the range of tiles for which shroud should be removed.<br />
* '''[place_shroud]''' places some shroud on the map for a certain side (only relevant for sides that have shroud=yes).<br />
** ''side'' (default=1) the side for which to place shroud.<br />
** standard location filter- the range of tiles on which shroud should be placed.<br />
* '''[allow_undo]''' allows the player to undo the event that this tag is inside. Has an effect only inside moveto events. If the move is undone, only the position of the unit will be restored; any altered variables or changes to the game will remain changed after the move is undone. It is up to the scenario designer to avoid abusing this command.<br />
** There is a bug in 1.2 versions that causes '''[allow_undo]''' command to have no effect within a '''[then]''' or '''[else]''' or '''[do]''' command. Thus, in 1.2 versions it is impossible to check a conditional using '''[if]''' or '''[while]''', then only '''[allow_undo]''' some of the time. You have a choice: the moveto event may either allow undo whenever the event fires, or it may never allow undo; you may use filters to control whether the event fires. ({{DevFeature}}This bug was fixed in 1.3.4 and later)<br />
** Technically, if '''[allow_undo]''' is inside an '''[event]''' with ''first_time_only=yes'' (the default setting), and the user undoes the event, then the state of the game has changed in this way: the event will not fire a second time, even though the user undid the move the first time.<br />
** There have been reports that using '''[allow_undo]''' in multiplayer scenarios, can causes out-of-sync errors. If this is true, someone should report it to the bug-tracker with example code so that it can be fixed.<br />
<br />
== Useful Macros ==<br />
There are some predefined macros that you find useful for direct actions. You can find a complete list along with a detailed explanation of how they work [http://www.wesnoth.org/misc/macro-reference.xhtml here].<br />
* '''{MOVE_UNIT}''' Moves a unit to another location in the map and the player sees the movement (unlike [teleport])<br />
* '''{FULL_HEAL}''' Brings a unit to full HP<br />
* '''{LOYAL_UNIT}''' Create a loyal unit<br />
* '''{MODIFY_TERRAIN_MASK}''' Modify an area of terrain<br />
<br />
== See Also ==<br />
<br />
* [[InternalActionsWML]]<br />
* [[InterfaceActionsWML]]<br />
* [[EventWML]]<br />
* [[ReferenceWML]]<br />
<br />
[[Category: WML Reference]]</div>Db0https://wiki.wesnoth.org/index.php?title=InterfaceActionsWML&diff=21610InterfaceActionsWML2008-02-13T19:43:55Z<p>Db0: /* [objectives] */ Added the macro information</p>
<hr />
<div>{{WML Tags}}<br />
== Interface actions ==<br />
<br />
Interface actions are actions that do not have an effect on gameplay;<br />
instead, they show something to the player. The main interface tags<br />
are '''[message]''' and '''[objectives]''', but several other tags affect<br />
the interface also.<br />
<br />
== [message] ==<br />
The most commonly used interface action is [message], which displays a message to the user in a dialog box. It can also be used to take input from the user.<br />
<br />
The following key/tags are accepted for [message]:<br />
* standard unit filter - the unit whose profile and name are displayed. If no unit matching this filter is found, the message is not displayed (The unit has probably been killed).<br>'''[message]''' elements should be constructed so that it is either guaranteed that a certain unit is alive, or so that dialog flows smoothly even if the message isn't displayed.<br />
<br />
* ''speaker'' an alternative to standard unit filter<br />
** 'narrator' the dialog box is displayed without a caption for the unit speaking or a unit image<br />
** 'unit' the primary unit for the event is speaking<br />
** 'second_unit' the secondary unit for the event is speaking<br />
<br />
* ''message'' (translatable) the text to display to the right of the image. ''message'' is sometimes multiple lines; if it is, be sure to use quotes(''' ' ''' or ''' " ''')<br />
* ''side_for'' (default: all sides) comma seperated list of sides for who message is shown. {{DevFeature}}<br />
* ''image'' (default: profile image of speaker) the image to display next to the message.<br />
* ''caption'' (default: name of speaker) the caption to display beside the image. Name to be displayed.<br />
* ''duration'' (default: 10) the minimum number of frames for this message to be displayed. (A frame lasts about 30 milliseconds.) During this time any dialog decisions will be disregarded. {{DevFeature}}<br />
* ''sound'' a sound effect (wav file) to play as the message is displayed. This can be a comma-separated list, from which one will be randomly chosen.<br />
* '''[option]''' zero or more '''[option]''' elements may be present. If '''[option]''' elements are present, then each option will be displayed in a menu for the user to select one option.<br />
** ''message'' (translatable) the text displayed for the option (see [[DescriptionWML]])<br />
** '''[show_if]''' if present then this option will only be displayed if the conditional statement in this tag is passed (see [[InternalActionsWML]]) {{DevFeature}}<br />
** '''[command]''' an element containing actions which are executed if the option is selected.<br />
* '''[text_input]''' there can be only one [text_input] tag. this adds a text input field to the message.<br />
** ''variable'' the variable that the user's input will be written to<br />
** ''label'' a text label to the left of the input field<br />
** ''max_chars'' the maximum number of characters that may be typed into the field<br />
** ''text'' text that is written into the field in the beginning<br />
* note that '''[option]''' and '''[text_input]''' can only be used in moveto events in MP, otherwise they cause OOS<br />
<br />
Text formatting options for '''[message]'''. These can also be used in unit names (user_description), objectives, and such.<br />
* A tilde (~) as the first character causes the line to be boldfaced.<br />
* An at symbol (@) as the first character causes the line to be green, as done with victory conditions.<br />
* A pound symbol (#) as the first character causes the line to be red, as done with defeat conditions.<br />
* An asterisk (*) as the first character causes the line to be bigger.<br />
* A backquote (`) as the first character causes the line to be smaller.<br />
* If used, the caption key text is boldfaced.<br />
* An RGB colour code in the beginning causes the line to be the given colour. This can still be preceded by the above characters. Example: ''message=_"<255,0,0>Red!"''<br />
<br />
== [objectives] ==<br />
The other tag used for plot development is '''[objectives]'''.<br />
The '''[objectives]''' tag overwrites any previously set objectives,<br />
and displays text which should describe the objectives of the scenario.<br />
Scenario objectives are displayed on the player's first turn after the tag is used,<br />
or as part of the event if it triggers during that player's turn.<br />
Objectives can also be accessed at any time in a scenario using the<br />
"Scenario Objectives" game menu option, making this tag useful for<br />
scenario-specific information that the player may need to refer to during play.<br />
<br />
This tag renders the ''objectives'' attribute of [scenario] obsolete (see ''objectives'', [[ScenarioWML]]).<br />
Instead of using ''objectives'', use '''[objectives]''' to set scenario objectives inside a prestart event.<br />
It can also be used to overwrite the starting objectives mid-scenario.<br />
<br />
Attributes of '''[objectives]''':<br />
* ''side'' Default '0'. The side to set the objectives for. A value of 0 sets objectives for all sides.<br />
* ''summary'' Displayed first in the objectives text, this should describe the basic objective for the overall scenario. Can be omitted.<br />
* ''note'' Displayed last in the objectives text, this is sometimes used for hints or additional information. Can be omitted.<br />
* ''victory_string'' Default ' _ "Victory:"', this text precedes the victory objectives.<br />
* ''defeat_string'' Default ' _ "Defeat:"', this text precedes the defeat objectives.<br />
* ''silent'' Default: not present. If set to "yes", the objectives are silently changed. Else, they will be shown to the user when appropriate.<br />
<br />
Tags of '''[objectives]''':<br />
* '''[objective]''' describes a win or loss condition. Most scenarios have multiple win or loss conditions, so use a separate [objective] subtag for each line; this helps with translations.<br />
** ''description'' text for the specific win or loss condition.<br />
** ''condition'' The color and placement of the text. Values are 'win'(colored green, placed after ''victory_string'') and 'lose'(colored red, placed after ''defeat_string'')<br />
<br />
=== Macros ===<br />
There are a few predefined macros for Objectives that you can use to shorten the code. '''{SET_OBJECTIVES}''', '''{VICTORY_CONDITION}''' and '''{DEFEAT_CONDITION}'''. There are all used together. For more information look [http://www.wesnoth.org/misc/macro-reference.xhtml here]<br />
<br />
== [set_menu_item] {{DevFeature}} ==<br />
This tag is used to add a custom option in the right-click context menu which can then be used to trigger arbitrary WML commands.<br />
<br />
* ''id'' the unique id for this menu item. If a menu item with this id already exists, it allows you to set specific changes to that item.<br />
* ''description'' the in-game text that will appear for this item in the menu.<br />
* ''image'' the image to display next to this item.<br />
* ''needs_select'' if ''yes'' (default ''no''), then the latest select event (see [[EventWML]]) that triggered before this menu item was chosen will be transmitted over the network before this menu item action will be. This only has any effect in networked multiplayer, and is intended to allow more elaborate menu item behaviour there without causing out of sync errors. If you don't know what this means, just leave it false.<br />
* '''[show_if]''' If present, the menu item will only be available if the conditional statement (see [[InternalActionsWML]]) within evaluates to true. When this is evaluated, the WML variables ''$x1'' and ''$y1'' will point to the location on which the context menu was invoked, so it's possible to for example only enable the option on empty hexes or on a particular unit.<br />
* '''[filter_location]''' contains a location filter similar to the one found inside Single Unit Filters (see [[FilterWML]]). The menu item will only be available on matching locations.<br />
* '''[command]''' contains the WML actions to be executed when the menu item is selected. Again, the WML variables ''$x1'' and ''$y1'' will point to the location on which the context menu was invoked on.<br />
<br />
== Other interface tags ==<br />
<br />
The following tags are also action tags:<br />
* '''[item]''' makes a graphical item appear on a certain hex. Note this only places the graphics for an item. It does not make the item do anything. Use a moveto event to make moving onto the item do something.<br />
** ''x'', ''y'' the location to place the item.<br />
** ''image'' the image (in ''images/ ''as .png) to place on the hex.<br />
** ''halo'' an image to place centered on the hex. Use this instead of ''image'' if the image is bigger than the hex.<br />
* '''[removeitem]''' removes any graphical items on a given hex<br />
** ''x'', ''y'' the hex to remove items off<br />
* '''[print]''' displays a message across the screen. The message will disappear after a certain time.<br />
** ''text'' (translatable) the text to display.<br />
** ''size'' (default=12) the pointsize of the font to use<br />
** ''duration'' (default=50) the length of time to display the text for. This is measured in the number of 'frames'. A frame in Wesnoth is usually displayed for around 30ms.<br />
** ''red'', ''green'', ''blue'' (default=0,0,0) the color to display the text in. Values vary from 0-255.<br />
* '''[move_unit_fake]''' moves an image of a unit along a certain path on the map. The path does not need to be a continuous list of adjacent hexes, so for example only the start and end points can be given, in which case the straightest line between those points will be calculated and used.<br />
** ''type'' the type of the unit whose image to use<br />
** ''x'' a comma-seperated list of x locations to move along<br />
** ''y'' a comma-seperated list of y locations to move along (x and y values are matched pairs)<br />
** ''side'' the side of the fake unit, used for team colouring the fake unit<br />
* '''[hide_unit]''' makes the given unit become invisible. Useful in conjunction with '''[move_unit_fake]''' to move a leader unit into position on-screen. Only one unit may be hidden at a time.<br />
** ''x'', ''y'' location of the unit to be hidden. (NOT a standard unit filter! Just x and y.)<br />
* '''[unhide_unit]''' stops the currently hidden unit from being hidden.<br />
* '''[scroll]''' Scroll a certain number of pixels in a given direction. Useful for earthquake/shaking effects.<br />
** ''x'', ''y'' the number of pixels to scroll along the x and y axis<br />
* '''[scroll_to]''' Scroll to a given hex<br />
** ''x'', ''y'' the hex to scroll to<br />
** ''check_fogged'' whether to scroll even to locations covered in fog or shroud. Possible values ''true'' (don't scroll to fog) and ''false'' (scroll even to fog), with ''false'' as the default.<br />
* '''[scroll_to_unit]''' Scroll to a given unit<br />
** standard unit filter<br />
** ''check_fogged'' whether to scroll even to locations covered in fog or shroud. Possible values ''true'' (don't scroll to fog) and ''false'' (scroll even to fog), with ''false'' as the default.<br />
* '''[sound]''' Plays a sound<br />
** ''name'' the filename of the sound to play (in ''sounds/'' as .wav or .ogg)<br />
** ''repeat'' {{DevFeature}} repeats the sound for a specified additional number of times (default=0)<br />
* '''[sound_source]''' {{DevFeature}} Creates a sound source. "Sound sources" is a general name for a mechanism, which makes possible for map elements to emit sounds according to some rules, where "map elements" can be specific locations or terrain types. For now, only sound sources tied to locations are supported.<br />
** ''id'' a unique identification key of the sound source<br />
** ''sounds'' a list of comma separated, randomly played sounds associated with the sound source<br />
** ''delay'' a numerical value (in milliseconds) of the minimal delay between two playbacks of the source's sound if the source remains visible on the screen; if one scrolls out and back in, the source will be considered as ready to play<br />
** ''chance'' a percentage (a value from 0 to 100) describing the chance of the source being activated every second after the delay has passed or when the source's location appears on the screen (note that it cannot play more than one file at the same time)<br />
** ''check_fogged'' possible values "true" and "false" - if true the source will not play if its locations are fogged/shrouded<br />
** ''x,y'' a standard location filter for the locations associated with the sound source<br />
* '''[remove_sound_source]''' {{DevFeature}} Removes a previously defined sound source.<br />
** ''id'' the identification key of the sound source to remove<br />
* '''[music]''' Switches to playing different music<br />
** ''name'' the filename of the music to play (in ''music/'' as .ogg)<br />
** see [[MusicListWML]] for the correct syntax<br />
* '''[colour_adjust]''' tints the colour of the screen.<br />
** ''red'', ''green'', ''blue'' values from -255 to 255, the amount to tint by for each colour<br />
* '''[delay]''' pauses the game<br />
** ''time'' the time to pause in milliseconds<br />
* '''[redraw]''' redraws the screen (this normally isn't done during events, although some of the other interface actions cause the screen or parts of it to be redrawn).<br />
** ''side'' if used, recalculates fog and shroud for that side. Useful if you for example spawn friendly units in the middle of an event and want the shroud to update accordingly (otherwise units that spawn inside fog would remain invisible for the duration of the event, since the fog would not automatically get cleared around them).<br />
* '''[unit_overlay]''' sets an image that will be drawn over a particular unit, and follow it around<br />
** ''x'', ''y'' the location of the unit to overlay on<br />
** ''image'' the image to place on the unit<br />
* '''[remove_unit_overlay]''' removes a particular overlayed image from a unit<br />
** ''x'', ''y'' the location of the unit to remove an overlay from<br />
** ''image'' the image to remove from the unit<br />
* '''[animate_unit]''' uses the custom animation of a unit to animate it on screen (if the unit has the corresponding animation)<br />
** ''flag'' the key to find the good custom animation in the unit description see the '''[extra_anim]''' description in [[AnimationWML]] Standar anims can be triggered with the following keywors ''leading recruited standing idling levelin levelout healing healed poisoned movement defend attack death victory pre_teleport post_teleport''<br />
** '''[filter]''' a standard unit filter see [[FilterWML]] by default, the unit at the event location will be animated. You can use this tag to choose any other unit to animate<br />
** '''[primary_attack]''' if this tag is not present, the filter for animation will be triggered with no attack. If it is here, all attacks from the unit will be filtered, and a matching one will be used to filter the animation<br />
** '''[secondary_attack]''' same for the second attack<br />
** ''hit'' the hit type to filter unit on<br />
** ''text'' a text to hover during the animation<br />
** ''text_color'' r,g,b value for the text color<br />
** ''with_bars'' whether to display the status bars or not.<br />
* '''[label]''' places a label on the map.<br />
** ''x'', ''y'' the location of the label<br />
** ''text'' what the label should say<br />
** ''team_name'' if specified, the label will only be visible to the given team.<br />
* '''[deprecated_message]''' {{DevFeature}} shows a deprecated message in the message area, this feature is only intended to be used to warn about deprecated macros in mainline. The message is not translatable.<br />
** ''message'' the message to show.<br />
* '''[debug_message]''' {{DevFeature}} outputs a message to Wesnoth's console output. Intended for campaign designers to output silent text to the console, without annoying the player; then, that text might contain information useful for later bug-reporting.<br />
** ''message'' the message to show<br />
** ''logger'' the Wesnoth engine output logger that should catch the text; this might be 'err' (the errors log level), 'warn'/'wrn' (the warnings log level) or anything else (the information log level). Not all information will be displayed depending on the log level chosen when starting Wesnoth.<br />
<br />
== See Also ==<br />
* [[DirectActionsWML]]<br />
* [[InternalActionsWML]]<br />
* [[EventWML]]<br />
* [[ReferenceWML]]<br />
<br />
<br />
[[Category: WML Reference]]</div>Db0https://wiki.wesnoth.org/index.php?title=InternalActionsWML&diff=21609InternalActionsWML2008-02-13T19:39:39Z<p>Db0: /* [while] */ Added repeat macro reference</p>
<hr />
<div>{{WML Tags}}<br />
== Internal actions ==<br />
<br />
Internal actions are actions that WML uses internally that do not directly affect gameplay, for example storing a variable.<br />
<br />
The internal actions '''[if]''', '''[while]''', and '''[event]''' describe when/whether sets of actions should be executed.<br />
<br />
== [if] ==<br />
<br />
Executes different sets of actions based on whether the conditions described in the condition tags are true or not.<br />
<br />
Condition tags:<br />
* '''[have_unit]''' a unit passing this filter with >0 HP exists<br />
** standard unit filter<br />
<br />
* '''[have_location]''' {{DevFeature}} a location passing this filter exists <br />
** standard location filter<br />
<br />
* '''[and]''' If an [and] is present, all must evaluate to true in order for the [if] to evaluate true. Useful as a bracket for complex conditions, but not strictly necessary.<br />
** condition tags as in [if] - if these evaluate to true, [and] evaluates to true.<br />
<br />
* '''[or]''' If an [or] is present, one must evaluate to true in order for the [if] to evaluate true. ([[AdvancedConditionalWML|Example]])<br />
** condition tags as in [if] - if these evaluate to true, [or] evaluates to true. <br />
<br />
* '''[not]''' If a [not] is present, none must evaluate to true in order for the [if] to evaluate true.<br />
** condition tags as in [if] - if these evaluate to true, [not] evaluates to false.<br />
<br />
* {{DevFeature}} '''[and],[or],[not]''' - the behavior is changing in the development version, where all top-level filters will support in-order conditional handling of and, or, and not. One important thing to remember with the new syntax is, if you have multiple [or]s, you no longer should wrap your first conditional statement into an [or] block.<br />
<br />
* '''[variable]''' tests something about the value of a WML variable (see [[VariablesWML]])<br />
** ''name'' the name of the variable to test the value of<br>Only one of the following keys should be used for comparing the value of the variable to another value:<br />
** ''equals'' $name is equal (string wise) to this<br />
** ''not_equals'' $name is not equal to this<br />
** ''greater_than'' $name is numerically greater than this<br />
** ''less_than'' $name is less than this<br />
** ''greater_than_equal_to'' $name is not less than this<br />
** ''less_than_equal_to'' $name is not greater than this<br />
** ''numerical_not_equals'' $name is greater than or less than this<br />
** ''numerical_equals'' $name is not greater than or less than this<br />
** ''boolean_equals'' {{DevFeature}} $name has the same boolean value (e.g. off, false, 0, no)<br />
** ''contains'' {{DevFeature}} $name contains this string<br />
<br />
After condition tags:<br />
* '''[then]''' contains a set of action tags which should be executed if all conditions are true, or all conditions in any single [or] are true<br />
* '''[else]''' contains a set of action tags which should be executed if any condition is false, and all [or] tags are false<br />
<br />
== [while] ==<br />
<br />
executes commands if all conditions are true.<br />
Continues to execute them until a condition is not true.<br />
<br />
Executes a maximum of 1024 iterations per invocation.<br />
Condition tags are the same as for [if]<br />
<br />
After condition tags:<br />
* '''[do]''' contains actions that should be executed repeatedly until some condition is false.<br />
<br />
The [while] tag is useful for iterating over an array.<br />
An ''array'' is a list of values.<br />
The ''number''th value in the array ''array'' is stored in the WML variable '''''array''[number]'''.<br />
Note that if ''number'' is the value of the variable ''variable'',<br />
the expression '''$''array''[$variable]''' will return the ''number''th value in ''array''.<br />
The macros 'FOREACH' and 'NEXT' ([[UtilWML]]) can be used to iterate over an array;<br />
i.e. run a set of actions once per element of the array.<br />
<br />
=== {FOREACH} ===<br />
If you wish to use a "for-each" iteration format (useful for example when you want to do an iteration for each row in a table) you can use the [http://www.wesnoth.org/misc/macro-reference.xhtml FOREACH] and [http://www.wesnoth.org/misc/macro-reference.xhtml NEXT] prededined macros.<br />
<br />
=== {REPEAT} ===<br />
You can use the REPEAT macro to perform a quick iteration for a number of times you specify.<br />
<br />
== [event] ==<br />
<br />
This adds a new event to the scenario.<br />
The event is in the normal format for an '''[event]''' tag (See [[EventWML]]).<br />
This is useful if you want an event that can only be triggered when a prior event is fulfilled<br />
<br />
These tags describe actions that affect the values of WML variables<br />
(see [[VariablesWML]] for information on WML variables,<br />
and [[UtilWML]] for convenient macro shortcuts for some of these):<br />
* '''[set_variable]''' manipulates a WML variable. {{Note:Predefined Macro|VARIABLE}} <br />
** ''name'' the name of the variable to manipulate<br />
** ''value'' set the variable to the given value (can be numeric or string). This only interprets dollars signs if it is the very first character, and then the entire value must be a simple variable name. (in 1.3.2, has the same effect as format. Use literal for no substitution)<br />
** ''literal'' set the variable to the given value (can be numeric or string). This does not interpret any dollars signs. {{DevFeature}}<br />
** ''format'' set the variable to the given value. Interprets the dollar sign to a higher degree than most actions. (see [[VariablesWML]])<br />
** ''to_variable'' Fully processes its value as in ''format'', and then gets the variable with that name.<br />
** ''add'' add the given amount to the variable. To subtract, add a negative number.<br />
** ''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. The result is an integer.<br />
** ''divide'' {{DevFeature}} divide the variable by the given number. The result is an integer.<br />
** ''modulo'' {{DevFeature}} returns the remainder of an integer division. Both variables need to be an integer, the result is also an integer. eg 5 % 2 = 1.<br />
** ''random'' 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. Dollars signs are only normally interpreted here, so it is harder to have a dynamically determined range. You would need to create the random-string with ''format''.<br />
** ''rand'' {{DevFeature}} 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.'''<br />
** ''time=stamp'' {{DevFeature}} 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 />
* '''[store_unit]''' stores details about units into game variables.<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 [unstore_unit] to re-create the unit with the modified variables.<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 [unstore_unit], [[DirectActionsWML]], and '''FOREACH''', [[UtilWML]]<br />
** '''[filter]''' (standard unit filter) all units matching this filter will be stored. If there are multiple units, they will be stored into an array of variables.<br />
** ''variable'' the name of the variable into which to store the unit(s)<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 only be cleared if a match is found. If mode is set to ''append'', the variable will not be cleared.<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 />
:When a unit is stored, the following values may be manipulated with '''[set_variable]'''<br />
:* description<br />
:* experience<br />
:* facing<br />
:* gender<br />
:* canrecruit<br />
:* overlays<br />
:* goto_x<br />
:* goto_y<br />
:* hitpoints<br />
:* moves<br />
:* resting<br />
:* side<br />
:* type<br />
:* unrenamable<br />
:* upkeep<br />
:* user_description<br />
:* x<br />
:* y<br />
:* [variables]<br />
:* [status]<br />
:* [modifications]<br />
Variables, status, and modifications are children of the stored unit variable. Example:<br />
[set_variable]<br />
name=unit_store.status.poisoned<br />
value=yes<br />
[/set_variable]<br />
<br />
:All keys and tags in the unit definition may be manipulated, including some others. Here is a sample list. 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.<br />
:* advanceto<br />
:* alignment<br />
:* alpha<br />
:* attacks_left<br />
:* canrecruit<br />
:* controller<br />
:* cost<br />
:* description<br />
:* experience<br />
:* facing<br />
:* flying<br />
:* fog<br />
:* gender<br />
:* get_hit_sound<br />
:* gold<br />
:* goto_x<br />
:* goto_y<br />
:* hitpoints<br />
:* id<br />
:* image<br />
:* image_defensive<br />
:* income<br />
:* language_name (same as the name key in the unit config)<br />
:* level<br />
:* max_attacks<br />
:* max_experience<br />
:* max_hitpoints<br />
:* max_moves<br />
:* movement<br />
:* movement_type<br />
:* moves<br />
:* race<br />
:* resting<br />
:* shroud<br />
:* side<br />
:* team_name<br />
:* type<br />
:* unit_description<br />
:* unrenamable<br />
:* usage<br />
:* value<br />
:* x<br />
:* y<br />
:* zoc<br />
:* [advancement]<br />
:* [/advancement]<br />
:* [movement_costs]<br />
:* [/movement_costs]<br />
:* [defense]<br />
:* [/defense]<br />
:* [resistance]<br />
:* [/resistance]<br />
:* [variables]<br />
:* [/variables]<br />
:* [status]<br />
:* [/status]<br />
:* [attack]<br />
:* [/attack]<br />
:* [modifications_description]<br />
:* [/modifications_description]<br />
:* [modifications]<br />
:* [/modifications]<br />
<br />
* '''[store_starting_location]''' Stores the starting location of a side's leader in a variable. The variable is a composite type which will have members 'x', 'y', and 'terrain' (the terrain type for a starting location is always 'K' unless it has been changed)<br />
** ''side'' the side whose starting location is to be stored<br />
** ''variable'' (default='location'): the name of the variable to store the location in<br />
* '''[store_locations]''' 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).<br />
** standard location filter- a location or location range which specifies the locations to store. You must specify this or no locations will be stored.<br />
** ''variable'' the name of the variable (array) into which to store the locations<br />
** ''terrain'' a series of terrain characters. (See [[TerrainLettersWML]] for possible values.) If present, locations will only be chosen if the letter of the terrain type of that location is listed. '''''[[User:SkeletonCrew#Branch_terrain|(SVN terrain only)]]''''' Here the list will be a comma separated list of terrains.<br />
** ''radius'' if present, any locations which are within ''radius'' hexes of the location filter will also be stored<br />
** '''[filter]''' (standard unit filter) only locations with units on them that match the filter will be stored. Use a blank filter to only store locations with units.<br />
* '''[store_villages]''' {{DevFeature}} 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).<br />
** ''owner_side'' a side number. If present, only villages owned by this side will be choosen. If owner_side=0, store the unowned villages. <br />
** ''variable'' the name of the variable (array) into which to store the locations<br />
** ''terrain'' a series of terrain characters. (See [[TerrainLettersWML]] for possible values.) If present, villages will only be chosen if the letter of the terrain type of that location is listed. '''''[[User:SkeletonCrew#Branch_terrain|(SVN terrain only)]]''''' Here the list will be a comma separated list of terrains.<br />
* '''[store_gold]''' stores the gold for a certain side in a variable. ({{DevFeature}} : this tag is no longer available)<br />
** ''side'' (default=1) the side for which the gold should be stored<br />
** ''variable'' (default='gold') the name of the variable to store the gold in<br />
* '''[store_side]''' stores information about a certain side in a variable. The variable will contain the member variables 'name', 'team_name', 'gold' and 'income'. ({{DevFeature}} : in SVN trunk, after 1.3.9 release, this tag's resultant variable was extended to contain the members 'fog', 'shroud', 'user_team_name', 'colour', 'controller', 'village_gold' and 'recruit'.)<br />
** ''side'' the side whose information should be stored<br />
** ''variable'' the name of the variable to store the information in<br />
* '''[clear_variable]''' 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.<br> Tags and variables of stored units can also be cleared, meaning that [trait]s and [object]s, for example, can be removed.<br />
** ''name'' the name of the variable to clear.<br />
* '''[role]''' 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 [if]) to see whether a role was assigned. This tag uses a Standard Unit 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 />
** ''role'' the value to store as the unit's role. This role is not used in the Standard Unit Filter when doing the search for the unit to assign this role to.<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 />
== See Also ==<br />
* [[VariablesWML]]<br />
* [[DirectActionsWML]]<br />
* [[InterfaceActionsWML]]<br />
* [[EventWML]]<br />
* [[ReferenceWML]]<br />
<br />
[[Category: WML Reference]]</div>Db0https://wiki.wesnoth.org/index.php?title=DirectActionsWML&diff=21608DirectActionsWML2008-02-13T19:37:08Z<p>Db0: /* Useful Macros */</p>
<hr />
<div>{{WML Tags}}<br />
== Direct actions ==<br />
<br />
Direct actions are actions that have a direct effect on gameplay.<br />
<br />
The following tags are actions:<br />
* '''[endlevel]''' ends the scenario.<br />
** ''result'' before the scenario is over, all events with ''name=result'' are triggered. The message ''result_message'' with the heading ''result_heading'' (see [[LanguageWML]]) are displayed. If ''result=victory'', the player progresses to the next level; if ''result=defeat'', the game returns to the main menu. These last two are rarely used: ''result=continue'' behaves identically to ''result=victory'' except the player's gold is not reduced to 80%, and it does not bring up a "Victory" message or the gold changing message (since it doesn't change); ''result=continue_no_save'' works similarly, except the player is not asked whether to save the game, and is taken directly to the next scenario without any messages. Unless ''result=defeat'', the following keys can also be used:<br />
** ''bonus'' whether the player should get bonus gold (maximum possible gold that could have been earned by waiting the level out). The default is bonus=yes.<br />
** ''next_scenario'' (default specified in '''[scenario]''' tag) the ID of the next scenario that should be played. All units that side 1 controls at this point become available for recall in ''next_scenario''.<br />
** When the result is "victory" the following keys can be used:{{DevFeature}}<br />
*** ''carryover_percentage'' by default 80% of the gold is carried over to the next scenario, with this key the amount can be changed.<br />
*** ''carryover_add'' if true the gold will be added to the starting gold the next scenario, if false the next scenario will start with the amount of the current scenario (after taxes) or the minimum in the next scenario. Default is false.<br />
* '''[unit]''' places a unit on the map. For syntax see [[SingleUnitWML]].{{Short Note:Predefined Macro|GENERIC_UNIT}}<br />
* '''[recall]''' recalls a unit. The unit is recalled free of charge, and is placed near the leader.<br />
** ''standard unit filter'' the first matching unit will be recalled. If no units match this tag is ignored.<br />
** ''x,y'' the unit is placed here instead of next to the leader.<br />
** ''show'' if not "no", display the unit being recalled.<br />
* '''[teleport]''' teleports a unit on map. {{Short Note:Predefined Macro|TELEPORT_UNIT}}<br />
** '''[filter]''' (standard unit filter) all units matching the filter will be teleported.<br />
** ''x,y'' the position to teleport to.<br />
* '''[terrain_mask]''' changes the terrain on the map. See [[TerrainMaskWML]].<br />
* '''[terrain]''' changes the terrain on the map.<br />
** ''terrain'' the character of the terrain to use. See [[TerrainLettersWML]] to see what letter a type of terrain uses.<br />
** standard location filter- the area to change the terrain of.<br />
* '''[gold]''' give one side gold.<br />
** ''amount'' the amount of gold to give.<br />
** ''side'' (default=1) the number of the side to give the gold to.<br />
* '''[unstore_unit]''' creates a unit from a game variable, and activates it on the playing field. This must be a specific variable describing a unit, and may not be an array -- to unstore an entire array, iterate over it. The variable is not cleared. See also [store_unit], [while] and [clear_variable] in [[InternalActionsWML]]. Note units with a negative amount of hitpoints will be unstored with 1 hitpoint.<br />
** ''variable'' the name of the variable.<br />
** ''find_vacant'' whether the unit should be placed on the nearest vacant tile to its specified location. If this is set to 'no'(default), then any unit on the same tile as the unit being unstored will be destroyed.<br />
** ''text'' (translatable) floating text to display above the unit, such as a damage amount<br />
** ''red'', ''green'', ''blue'' (default=0,0,0) the color to display the text in. Values vary from 0-255. You may find it convenient to use the {COLOR_HARM} or {COLOR_HEAL} macro instead. (Use {COLOR_HARM} or {COLOR_HEAL} instead of the whole red,green,blue= line.)<br />
** ''advance'' if the XP has been modified then there will be tried to advance the unit, default true. {{DevFeature}} <br />
* '''[allow_recruit]''' allows a side to recruit units it couldn't previously recruit.<br />
** ''type'' the types of units that the side can now recruit.<br />
** ''side'' (default=1) the number of the side that is being allowed to recruit the units.<br />
* '''[disallow_recruit]''' prevents a side from recruiting units it could previously recruit.<br />
** ''type'' the types of units that the side can no longer recruit.<br />
** ''side'' (default=1) the number of the side that may no longer recruit the units.<br />
* '''[set_recruit]''' sets the units a side can recruit.<br />
** ''recruit'' the types of units that the side can now recruit.<br />
** ''side'' (default=1) the number of the side that is having its recruitment set.<br />
* '''[modify_side]''' modifies some details of a given side in the middle of a scenario. '''The following listed properties are the only properties that [modify_side] can affect!'<br />
** ''side'' (default=1) the number of the side that is to be changed.<br />
** ''income'' the income given at the begining of each turn.<br />
** ''team_name'' the team in which the side plays the scenario.<br />
** ''user_team_name'' a translatable string representing the team's description. This has no effect on alliances. Defaults to ''team_name''.<br />
** ''gold'' the amount of gold the side owns.<br />
** ({{DevFeature}}) The following keys are only recognized in the latest development versions:<br />
*** ''village_gold'' the income setting per village for the side.<br />
*** ''controller'' the identifier string of the side's controller. Uses the same syntax of the ''controller'' key in the [[SideWML|[side]]] tag.<br />
*** ''fog'' a boolean string (yes/no) describing the status of Fog for the side.<br />
*** ''shroud'' a boolean string describing the status of Shroud for the side.<br />
* '''[modify_turns]''' modifies the turn limit in the middle of a scenario.<br />
** ''value'' the new turn limit.<br />
** ''add'' if used instead of ''value'', specifies the number of turns to add to the current limit (can be negative).<br />
* '''[capture_village]''' changes the ownership of a village.<br />
** ''side'' the side that takes control of the village. If not given, the village will become neutral.<br />
** ''x, y'' the location of the village.<br />
* '''[kill]''' Removes all units (including units in a recall list) that match the filter from the game.<br />
** standard unit filter<br />
** ''animate'' if 'yes', displays the unit dying (fading away).<br />
** ''fire_event'' if 'yes', triggers any appropriate 'die' events (See [[EventWML]]). Note that any 'die' events triggered by this are executed immediately, interrupting the current event and thus causing the x1, y1, x2, and y2 variables to be reset for that 'die' event, which in turn causes those variables to be invalid for the remainder of this event.<br />
* '''[unstone]''' Unstones all units that match the filter.<br />
** '''[filter]''' (standard unit filter) all units matching the filter will be unstoned. If no unit matches the filter, then nothing happens (probably). If absent, all units on the map are unstoned.<br />
* '''[object]''' gives some unit an object and removes all items on the tile the unit is on.<br />
** ''id'' when the object is picked up, a flag is set for ''id''. The object cannot be picked up if a flag for ''id'' has been set. This means that any object with an id can only be used once, even if first_time_only=no is set for the event. This restriction is per level. In a campaign objects with the same id can be assigned once per level.<br />
** '''[effect]''' one or more effect elements may be listed. See [[EffectWML]] for a description of [effect].<br />
** ''duration'' if 'level', effects only last until the end of the level (note : 'level' is the scenario, so this doesn't mean it last until the unit levels-up).<br />
** '''[filter]''' (standard unit filter) the first unit found that matches the filter will be given the object. If no unit matches the filter, then a message is displayed and the object is not removed.<br />
** '''[then]''' a subtag that lets you execute actions if the filter conditions are met. The most common action that should be inside here is a '''[removeitem]''' tag, but you could probably put any tags that otherwise work in a [then] tag.<br />
** ''silent'' whether or not messages should be suppressed. Default is "no".<br />
** ''image'' the displayed image of the object.<br />
** ''name'' (translatable) displayed as a caption of the image.<br />
<br />
** ''description'' (translatable) displayed as a message of the image.<br />
** ''cannot_use_message'' (translatable) displayed instead of '''description''' if no unit passes the filter test.<br />
** If you do not supply a filter, the object action will be applied to a unit at the location of the moveto event. Currently this isn't recommended as it is not clear that this will continue working this way. Instead it is better to explicitly include a location filter.<br />
** The object action does not act on units in the recall list. There is a feature request in to allow this, but it is not clear whether or not it will be accepted.<br />
* '''[remove_shroud]''' removes some shroud from the map for a certain side (only relevant for sides that have shroud=yes).<br />
** ''side'' (default=1) the side for which to remove shroud.<br />
** standard location filter- the range of tiles for which shroud should be removed.<br />
* '''[place_shroud]''' places some shroud on the map for a certain side (only relevant for sides that have shroud=yes).<br />
** ''side'' (default=1) the side for which to place shroud.<br />
** standard location filter- the range of tiles on which shroud should be placed.<br />
* '''[allow_undo]''' allows the player to undo the event that this tag is inside. Has an effect only inside moveto events. If the move is undone, only the position of the unit will be restored; any altered variables or changes to the game will remain changed after the move is undone. It is up to the scenario designer to avoid abusing this command.<br />
** There is a bug in 1.2 versions that causes '''[allow_undo]''' command to have no effect within a '''[then]''' or '''[else]''' or '''[do]''' command. Thus, in 1.2 versions it is impossible to check a conditional using '''[if]''' or '''[while]''', then only '''[allow_undo]''' some of the time. You have a choice: the moveto event may either allow undo whenever the event fires, or it may never allow undo; you may use filters to control whether the event fires. ({{DevFeature}}This bug was fixed in 1.3.4 and later)<br />
** Technically, if '''[allow_undo]''' is inside an '''[event]''' with ''first_time_only=yes'' (the default setting), and the user undoes the event, then the state of the game has changed in this way: the event will not fire a second time, even though the user undid the move the first time.<br />
** There have been reports that using '''[allow_undo]''' in multiplayer scenarios, can causes out-of-sync errors. If this is true, someone should report it to the bug-tracker with example code so that it can be fixed.<br />
<br />
== Useful Macros ==<br />
There are some prefedined macros that you find useful for direct actions. You can find a complete list along with a detailed explanation of how they work [http://www.wesnoth.org/misc/macro-reference.xhtml here].<br />
* '''{MOVE_UNIT}''' Moves a unit to another location in the map and the player sees the movement (unlike [teleport])<br />
* '''{FULL_HEAL}''' Brings a unit to full HP<br />
* '''{LOYAL_UNIT}''' Create a loyal unit<br />
* '''{MODIFY_TERRAIN_MASK}''' Modify an area of terrain<br />
<br />
== See Also ==<br />
<br />
* [[InternalActionsWML]]<br />
* [[InterfaceActionsWML]]<br />
* [[EventWML]]<br />
* [[ReferenceWML]]<br />
<br />
[[Category: WML Reference]]</div>Db0https://wiki.wesnoth.org/index.php?title=DirectActionsWML&diff=21607DirectActionsWML2008-02-13T19:36:14Z<p>Db0: /* Direct actions */ Added some common macros</p>
<hr />
<div>{{WML Tags}}<br />
== Direct actions ==<br />
<br />
Direct actions are actions that have a direct effect on gameplay.<br />
<br />
The following tags are actions:<br />
* '''[endlevel]''' ends the scenario.<br />
** ''result'' before the scenario is over, all events with ''name=result'' are triggered. The message ''result_message'' with the heading ''result_heading'' (see [[LanguageWML]]) are displayed. If ''result=victory'', the player progresses to the next level; if ''result=defeat'', the game returns to the main menu. These last two are rarely used: ''result=continue'' behaves identically to ''result=victory'' except the player's gold is not reduced to 80%, and it does not bring up a "Victory" message or the gold changing message (since it doesn't change); ''result=continue_no_save'' works similarly, except the player is not asked whether to save the game, and is taken directly to the next scenario without any messages. Unless ''result=defeat'', the following keys can also be used:<br />
** ''bonus'' whether the player should get bonus gold (maximum possible gold that could have been earned by waiting the level out). The default is bonus=yes.<br />
** ''next_scenario'' (default specified in '''[scenario]''' tag) the ID of the next scenario that should be played. All units that side 1 controls at this point become available for recall in ''next_scenario''.<br />
** When the result is "victory" the following keys can be used:{{DevFeature}}<br />
*** ''carryover_percentage'' by default 80% of the gold is carried over to the next scenario, with this key the amount can be changed.<br />
*** ''carryover_add'' if true the gold will be added to the starting gold the next scenario, if false the next scenario will start with the amount of the current scenario (after taxes) or the minimum in the next scenario. Default is false.<br />
* '''[unit]''' places a unit on the map. For syntax see [[SingleUnitWML]].{{Short Note:Predefined Macro|GENERIC_UNIT}}<br />
* '''[recall]''' recalls a unit. The unit is recalled free of charge, and is placed near the leader.<br />
** ''standard unit filter'' the first matching unit will be recalled. If no units match this tag is ignored.<br />
** ''x,y'' the unit is placed here instead of next to the leader.<br />
** ''show'' if not "no", display the unit being recalled.<br />
* '''[teleport]''' teleports a unit on map. {{Short Note:Predefined Macro|TELEPORT_UNIT}}<br />
** '''[filter]''' (standard unit filter) all units matching the filter will be teleported.<br />
** ''x,y'' the position to teleport to.<br />
* '''[terrain_mask]''' changes the terrain on the map. See [[TerrainMaskWML]].<br />
* '''[terrain]''' changes the terrain on the map.<br />
** ''terrain'' the character of the terrain to use. See [[TerrainLettersWML]] to see what letter a type of terrain uses.<br />
** standard location filter- the area to change the terrain of.<br />
* '''[gold]''' give one side gold.<br />
** ''amount'' the amount of gold to give.<br />
** ''side'' (default=1) the number of the side to give the gold to.<br />
* '''[unstore_unit]''' creates a unit from a game variable, and activates it on the playing field. This must be a specific variable describing a unit, and may not be an array -- to unstore an entire array, iterate over it. The variable is not cleared. See also [store_unit], [while] and [clear_variable] in [[InternalActionsWML]]. Note units with a negative amount of hitpoints will be unstored with 1 hitpoint.<br />
** ''variable'' the name of the variable.<br />
** ''find_vacant'' whether the unit should be placed on the nearest vacant tile to its specified location. If this is set to 'no'(default), then any unit on the same tile as the unit being unstored will be destroyed.<br />
** ''text'' (translatable) floating text to display above the unit, such as a damage amount<br />
** ''red'', ''green'', ''blue'' (default=0,0,0) the color to display the text in. Values vary from 0-255. You may find it convenient to use the {COLOR_HARM} or {COLOR_HEAL} macro instead. (Use {COLOR_HARM} or {COLOR_HEAL} instead of the whole red,green,blue= line.)<br />
** ''advance'' if the XP has been modified then there will be tried to advance the unit, default true. {{DevFeature}} <br />
* '''[allow_recruit]''' allows a side to recruit units it couldn't previously recruit.<br />
** ''type'' the types of units that the side can now recruit.<br />
** ''side'' (default=1) the number of the side that is being allowed to recruit the units.<br />
* '''[disallow_recruit]''' prevents a side from recruiting units it could previously recruit.<br />
** ''type'' the types of units that the side can no longer recruit.<br />
** ''side'' (default=1) the number of the side that may no longer recruit the units.<br />
* '''[set_recruit]''' sets the units a side can recruit.<br />
** ''recruit'' the types of units that the side can now recruit.<br />
** ''side'' (default=1) the number of the side that is having its recruitment set.<br />
* '''[modify_side]''' modifies some details of a given side in the middle of a scenario. '''The following listed properties are the only properties that [modify_side] can affect!'<br />
** ''side'' (default=1) the number of the side that is to be changed.<br />
** ''income'' the income given at the begining of each turn.<br />
** ''team_name'' the team in which the side plays the scenario.<br />
** ''user_team_name'' a translatable string representing the team's description. This has no effect on alliances. Defaults to ''team_name''.<br />
** ''gold'' the amount of gold the side owns.<br />
** ({{DevFeature}}) The following keys are only recognized in the latest development versions:<br />
*** ''village_gold'' the income setting per village for the side.<br />
*** ''controller'' the identifier string of the side's controller. Uses the same syntax of the ''controller'' key in the [[SideWML|[side]]] tag.<br />
*** ''fog'' a boolean string (yes/no) describing the status of Fog for the side.<br />
*** ''shroud'' a boolean string describing the status of Shroud for the side.<br />
* '''[modify_turns]''' modifies the turn limit in the middle of a scenario.<br />
** ''value'' the new turn limit.<br />
** ''add'' if used instead of ''value'', specifies the number of turns to add to the current limit (can be negative).<br />
* '''[capture_village]''' changes the ownership of a village.<br />
** ''side'' the side that takes control of the village. If not given, the village will become neutral.<br />
** ''x, y'' the location of the village.<br />
* '''[kill]''' Removes all units (including units in a recall list) that match the filter from the game.<br />
** standard unit filter<br />
** ''animate'' if 'yes', displays the unit dying (fading away).<br />
** ''fire_event'' if 'yes', triggers any appropriate 'die' events (See [[EventWML]]). Note that any 'die' events triggered by this are executed immediately, interrupting the current event and thus causing the x1, y1, x2, and y2 variables to be reset for that 'die' event, which in turn causes those variables to be invalid for the remainder of this event.<br />
* '''[unstone]''' Unstones all units that match the filter.<br />
** '''[filter]''' (standard unit filter) all units matching the filter will be unstoned. If no unit matches the filter, then nothing happens (probably). If absent, all units on the map are unstoned.<br />
* '''[object]''' gives some unit an object and removes all items on the tile the unit is on.<br />
** ''id'' when the object is picked up, a flag is set for ''id''. The object cannot be picked up if a flag for ''id'' has been set. This means that any object with an id can only be used once, even if first_time_only=no is set for the event. This restriction is per level. In a campaign objects with the same id can be assigned once per level.<br />
** '''[effect]''' one or more effect elements may be listed. See [[EffectWML]] for a description of [effect].<br />
** ''duration'' if 'level', effects only last until the end of the level (note : 'level' is the scenario, so this doesn't mean it last until the unit levels-up).<br />
** '''[filter]''' (standard unit filter) the first unit found that matches the filter will be given the object. If no unit matches the filter, then a message is displayed and the object is not removed.<br />
** '''[then]''' a subtag that lets you execute actions if the filter conditions are met. The most common action that should be inside here is a '''[removeitem]''' tag, but you could probably put any tags that otherwise work in a [then] tag.<br />
** ''silent'' whether or not messages should be suppressed. Default is "no".<br />
** ''image'' the displayed image of the object.<br />
** ''name'' (translatable) displayed as a caption of the image.<br />
<br />
** ''description'' (translatable) displayed as a message of the image.<br />
** ''cannot_use_message'' (translatable) displayed instead of '''description''' if no unit passes the filter test.<br />
** If you do not supply a filter, the object action will be applied to a unit at the location of the moveto event. Currently this isn't recommended as it is not clear that this will continue working this way. Instead it is better to explicitly include a location filter.<br />
** The object action does not act on units in the recall list. There is a feature request in to allow this, but it is not clear whether or not it will be accepted.<br />
* '''[remove_shroud]''' removes some shroud from the map for a certain side (only relevant for sides that have shroud=yes).<br />
** ''side'' (default=1) the side for which to remove shroud.<br />
** standard location filter- the range of tiles for which shroud should be removed.<br />
* '''[place_shroud]''' places some shroud on the map for a certain side (only relevant for sides that have shroud=yes).<br />
** ''side'' (default=1) the side for which to place shroud.<br />
** standard location filter- the range of tiles on which shroud should be placed.<br />
* '''[allow_undo]''' allows the player to undo the event that this tag is inside. Has an effect only inside moveto events. If the move is undone, only the position of the unit will be restored; any altered variables or changes to the game will remain changed after the move is undone. It is up to the scenario designer to avoid abusing this command.<br />
** There is a bug in 1.2 versions that causes '''[allow_undo]''' command to have no effect within a '''[then]''' or '''[else]''' or '''[do]''' command. Thus, in 1.2 versions it is impossible to check a conditional using '''[if]''' or '''[while]''', then only '''[allow_undo]''' some of the time. You have a choice: the moveto event may either allow undo whenever the event fires, or it may never allow undo; you may use filters to control whether the event fires. ({{DevFeature}}This bug was fixed in 1.3.4 and later)<br />
** Technically, if '''[allow_undo]''' is inside an '''[event]''' with ''first_time_only=yes'' (the default setting), and the user undoes the event, then the state of the game has changed in this way: the event will not fire a second time, even though the user undid the move the first time.<br />
** There have been reports that using '''[allow_undo]''' in multiplayer scenarios, can causes out-of-sync errors. If this is true, someone should report it to the bug-tracker with example code so that it can be fixed.<br />
<br />
== Useful Macros ==<br />
There are some prefedined macros that you find useful for direct actions. You can find a complete list along with a detailed explanation of how they work [http://www.wesnoth.org/misc/macro-reference.xhtml here].<br />
* '''MOVE_UNIT''' Moves a unit to another location in the map and the player sees the movement (unlike [teleport])<br />
* '''FULL_HEAL''' Brings a unit to full HP<br />
* '''LOYAL_UNIT''' Create a loyal unit<br />
* '''MODIFY_TERRAIN_MASK''' Modify an area of terrain<br />
<br />
== See Also ==<br />
<br />
* [[InternalActionsWML]]<br />
* [[InterfaceActionsWML]]<br />
* [[EventWML]]<br />
* [[ReferenceWML]]<br />
<br />
[[Category: WML Reference]]</div>Db0https://wiki.wesnoth.org/index.php?title=Template:Short_Note:Predefined_Macro&diff=21606Template:Short Note:Predefined Macro2008-02-13T19:25:04Z<p>Db0: Created Macro SHORT note for inline inserting</p>
<hr />
<div><tt>''('''Hint:''' Use the [http://www.wesnoth.org/misc/macro-reference.xhtml {{{1}}}] macro)''</tt></div>Db0https://wiki.wesnoth.org/index.php?title=InternalActionsWML&diff=21605InternalActionsWML2008-02-13T19:17:51Z<p>Db0: /* {Foreach} */</p>
<hr />
<div>{{WML Tags}}<br />
== Internal actions ==<br />
<br />
Internal actions are actions that WML uses internally that do not directly affect gameplay, for example storing a variable.<br />
<br />
The internal actions '''[if]''', '''[while]''', and '''[event]''' describe when/whether sets of actions should be executed.<br />
<br />
== [if] ==<br />
<br />
Executes different sets of actions based on whether the conditions described in the condition tags are true or not.<br />
<br />
Condition tags:<br />
* '''[have_unit]''' a unit passing this filter with >0 HP exists<br />
** standard unit filter<br />
<br />
* '''[have_location]''' {{DevFeature}} a location passing this filter exists <br />
** standard location filter<br />
<br />
* '''[and]''' If an [and] is present, all must evaluate to true in order for the [if] to evaluate true. Useful as a bracket for complex conditions, but not strictly necessary.<br />
** condition tags as in [if] - if these evaluate to true, [and] evaluates to true.<br />
<br />
* '''[or]''' If an [or] is present, one must evaluate to true in order for the [if] to evaluate true. ([[AdvancedConditionalWML|Example]])<br />
** condition tags as in [if] - if these evaluate to true, [or] evaluates to true. <br />
<br />
* '''[not]''' If a [not] is present, none must evaluate to true in order for the [if] to evaluate true.<br />
** condition tags as in [if] - if these evaluate to true, [not] evaluates to false.<br />
<br />
* {{DevFeature}} '''[and],[or],[not]''' - the behavior is changing in the development version, where all top-level filters will support in-order conditional handling of and, or, and not. One important thing to remember with the new syntax is, if you have multiple [or]s, you no longer should wrap your first conditional statement into an [or] block.<br />
<br />
* '''[variable]''' tests something about the value of a WML variable (see [[VariablesWML]])<br />
** ''name'' the name of the variable to test the value of<br>Only one of the following keys should be used for comparing the value of the variable to another value:<br />
** ''equals'' $name is equal (string wise) to this<br />
** ''not_equals'' $name is not equal to this<br />
** ''greater_than'' $name is numerically greater than this<br />
** ''less_than'' $name is less than this<br />
** ''greater_than_equal_to'' $name is not less than this<br />
** ''less_than_equal_to'' $name is not greater than this<br />
** ''numerical_not_equals'' $name is greater than or less than this<br />
** ''numerical_equals'' $name is not greater than or less than this<br />
** ''boolean_equals'' {{DevFeature}} $name has the same boolean value (e.g. off, false, 0, no)<br />
** ''contains'' {{DevFeature}} $name contains this string<br />
<br />
After condition tags:<br />
* '''[then]''' contains a set of action tags which should be executed if all conditions are true, or all conditions in any single [or] are true<br />
* '''[else]''' contains a set of action tags which should be executed if any condition is false, and all [or] tags are false<br />
<br />
== [while] ==<br />
<br />
executes commands if all conditions are true.<br />
Continues to execute them until a condition is not true.<br />
<br />
Executes a maximum of 1024 iterations per invocation.<br />
Condition tags are the same as for [if]<br />
<br />
After condition tags:<br />
* '''[do]''' contains actions that should be executed repeatedly until some condition is false.<br />
<br />
The [while] tag is useful for iterating over an array.<br />
An ''array'' is a list of values.<br />
The ''number''th value in the array ''array'' is stored in the WML variable '''''array''[number]'''.<br />
Note that if ''number'' is the value of the variable ''variable'',<br />
the expression '''$''array''[$variable]''' will return the ''number''th value in ''array''.<br />
The macros 'FOREACH' and 'NEXT' ([[UtilWML]]) can be used to iterate over an array;<br />
i.e. run a set of actions once per element of the array.<br />
<br />
=== {Foreach} ===<br />
If you wish to use a "for-each" iteration format (useful for example when you want to do an iteration for each row in a table) you can use the [http://www.wesnoth.org/misc/macro-reference.xhtml FOREACH] and [http://www.wesnoth.org/misc/macro-reference.xhtml NEXT] prededined macros.<br />
<br />
== [event] ==<br />
<br />
This adds a new event to the scenario.<br />
The event is in the normal format for an '''[event]''' tag (See [[EventWML]]).<br />
This is useful if you want an event that can only be triggered when a prior event is fulfilled<br />
<br />
These tags describe actions that affect the values of WML variables<br />
(see [[VariablesWML]] for information on WML variables,<br />
and [[UtilWML]] for convenient macro shortcuts for some of these):<br />
* '''[set_variable]''' manipulates a WML variable. {{Note:Predefined Macro|VARIABLE}} <br />
** ''name'' the name of the variable to manipulate<br />
** ''value'' set the variable to the given value (can be numeric or string). This only interprets dollars signs if it is the very first character, and then the entire value must be a simple variable name. (in 1.3.2, has the same effect as format. Use literal for no substitution)<br />
** ''literal'' set the variable to the given value (can be numeric or string). This does not interpret any dollars signs. {{DevFeature}}<br />
** ''format'' set the variable to the given value. Interprets the dollar sign to a higher degree than most actions. (see [[VariablesWML]])<br />
** ''to_variable'' Fully processes its value as in ''format'', and then gets the variable with that name.<br />
** ''add'' add the given amount to the variable. To subtract, add a negative number.<br />
** ''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. The result is an integer.<br />
** ''divide'' {{DevFeature}} divide the variable by the given number. The result is an integer.<br />
** ''modulo'' {{DevFeature}} returns the remainder of an integer division. Both variables need to be an integer, the result is also an integer. eg 5 % 2 = 1.<br />
** ''random'' 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. Dollars signs are only normally interpreted here, so it is harder to have a dynamically determined range. You would need to create the random-string with ''format''.<br />
** ''rand'' {{DevFeature}} 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.'''<br />
** ''time=stamp'' {{DevFeature}} 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 />
* '''[store_unit]''' stores details about units into game variables.<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 [unstore_unit] to re-create the unit with the modified variables.<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 [unstore_unit], [[DirectActionsWML]], and '''FOREACH''', [[UtilWML]]<br />
** '''[filter]''' (standard unit filter) all units matching this filter will be stored. If there are multiple units, they will be stored into an array of variables.<br />
** ''variable'' the name of the variable into which to store the unit(s)<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 only be cleared if a match is found. If mode is set to ''append'', the variable will not be cleared.<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 />
:When a unit is stored, the following values may be manipulated with '''[set_variable]'''<br />
:* description<br />
:* experience<br />
:* facing<br />
:* gender<br />
:* canrecruit<br />
:* overlays<br />
:* goto_x<br />
:* goto_y<br />
:* hitpoints<br />
:* moves<br />
:* resting<br />
:* side<br />
:* type<br />
:* unrenamable<br />
:* upkeep<br />
:* user_description<br />
:* x<br />
:* y<br />
:* [variables]<br />
:* [status]<br />
:* [modifications]<br />
Variables, status, and modifications are children of the stored unit variable. Example:<br />
[set_variable]<br />
name=unit_store.status.poisoned<br />
value=yes<br />
[/set_variable]<br />
<br />
:All keys and tags in the unit definition may be manipulated, including some others. Here is a sample list. 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.<br />
:* advanceto<br />
:* alignment<br />
:* alpha<br />
:* attacks_left<br />
:* canrecruit<br />
:* controller<br />
:* cost<br />
:* description<br />
:* experience<br />
:* facing<br />
:* flying<br />
:* fog<br />
:* gender<br />
:* get_hit_sound<br />
:* gold<br />
:* goto_x<br />
:* goto_y<br />
:* hitpoints<br />
:* id<br />
:* image<br />
:* image_defensive<br />
:* income<br />
:* language_name (same as the name key in the unit config)<br />
:* level<br />
:* max_attacks<br />
:* max_experience<br />
:* max_hitpoints<br />
:* max_moves<br />
:* movement<br />
:* movement_type<br />
:* moves<br />
:* race<br />
:* resting<br />
:* shroud<br />
:* side<br />
:* team_name<br />
:* type<br />
:* unit_description<br />
:* unrenamable<br />
:* usage<br />
:* value<br />
:* x<br />
:* y<br />
:* zoc<br />
:* [advancement]<br />
:* [/advancement]<br />
:* [movement_costs]<br />
:* [/movement_costs]<br />
:* [defense]<br />
:* [/defense]<br />
:* [resistance]<br />
:* [/resistance]<br />
:* [variables]<br />
:* [/variables]<br />
:* [status]<br />
:* [/status]<br />
:* [attack]<br />
:* [/attack]<br />
:* [modifications_description]<br />
:* [/modifications_description]<br />
:* [modifications]<br />
:* [/modifications]<br />
<br />
* '''[store_starting_location]''' Stores the starting location of a side's leader in a variable. The variable is a composite type which will have members 'x', 'y', and 'terrain' (the terrain type for a starting location is always 'K' unless it has been changed)<br />
** ''side'' the side whose starting location is to be stored<br />
** ''variable'' (default='location'): the name of the variable to store the location in<br />
* '''[store_locations]''' 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).<br />
** standard location filter- a location or location range which specifies the locations to store. You must specify this or no locations will be stored.<br />
** ''variable'' the name of the variable (array) into which to store the locations<br />
** ''terrain'' a series of terrain characters. (See [[TerrainLettersWML]] for possible values.) If present, locations will only be chosen if the letter of the terrain type of that location is listed. '''''[[User:SkeletonCrew#Branch_terrain|(SVN terrain only)]]''''' Here the list will be a comma separated list of terrains.<br />
** ''radius'' if present, any locations which are within ''radius'' hexes of the location filter will also be stored<br />
** '''[filter]''' (standard unit filter) only locations with units on them that match the filter will be stored. Use a blank filter to only store locations with units.<br />
* '''[store_villages]''' {{DevFeature}} 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).<br />
** ''owner_side'' a side number. If present, only villages owned by this side will be choosen. If owner_side=0, store the unowned villages. <br />
** ''variable'' the name of the variable (array) into which to store the locations<br />
** ''terrain'' a series of terrain characters. (See [[TerrainLettersWML]] for possible values.) If present, villages will only be chosen if the letter of the terrain type of that location is listed. '''''[[User:SkeletonCrew#Branch_terrain|(SVN terrain only)]]''''' Here the list will be a comma separated list of terrains.<br />
* '''[store_gold]''' stores the gold for a certain side in a variable. ({{DevFeature}} : this tag is no longer available)<br />
** ''side'' (default=1) the side for which the gold should be stored<br />
** ''variable'' (default='gold') the name of the variable to store the gold in<br />
* '''[store_side]''' stores information about a certain side in a variable. The variable will contain the member variables 'name', 'team_name', 'gold' and 'income'. ({{DevFeature}} : in SVN trunk, after 1.3.9 release, this tag's resultant variable was extended to contain the members 'fog', 'shroud', 'user_team_name', 'colour', 'controller', 'village_gold' and 'recruit'.)<br />
** ''side'' the side whose information should be stored<br />
** ''variable'' the name of the variable to store the information in<br />
* '''[clear_variable]''' 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.<br> Tags and variables of stored units can also be cleared, meaning that [trait]s and [object]s, for example, can be removed.<br />
** ''name'' the name of the variable to clear.<br />
* '''[role]''' 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 [if]) to see whether a role was assigned. This tag uses a Standard Unit 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 />
** ''role'' the value to store as the unit's role. This role is not used in the Standard Unit Filter when doing the search for the unit to assign this role to.<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 />
== See Also ==<br />
* [[VariablesWML]]<br />
* [[DirectActionsWML]]<br />
* [[InterfaceActionsWML]]<br />
* [[EventWML]]<br />
* [[ReferenceWML]]<br />
<br />
[[Category: WML Reference]]</div>Db0https://wiki.wesnoth.org/index.php?title=InternalActionsWML&diff=21604InternalActionsWML2008-02-13T19:17:21Z<p>Db0: /* [while] */ Added foreach mention</p>
<hr />
<div>{{WML Tags}}<br />
== Internal actions ==<br />
<br />
Internal actions are actions that WML uses internally that do not directly affect gameplay, for example storing a variable.<br />
<br />
The internal actions '''[if]''', '''[while]''', and '''[event]''' describe when/whether sets of actions should be executed.<br />
<br />
== [if] ==<br />
<br />
Executes different sets of actions based on whether the conditions described in the condition tags are true or not.<br />
<br />
Condition tags:<br />
* '''[have_unit]''' a unit passing this filter with >0 HP exists<br />
** standard unit filter<br />
<br />
* '''[have_location]''' {{DevFeature}} a location passing this filter exists <br />
** standard location filter<br />
<br />
* '''[and]''' If an [and] is present, all must evaluate to true in order for the [if] to evaluate true. Useful as a bracket for complex conditions, but not strictly necessary.<br />
** condition tags as in [if] - if these evaluate to true, [and] evaluates to true.<br />
<br />
* '''[or]''' If an [or] is present, one must evaluate to true in order for the [if] to evaluate true. ([[AdvancedConditionalWML|Example]])<br />
** condition tags as in [if] - if these evaluate to true, [or] evaluates to true. <br />
<br />
* '''[not]''' If a [not] is present, none must evaluate to true in order for the [if] to evaluate true.<br />
** condition tags as in [if] - if these evaluate to true, [not] evaluates to false.<br />
<br />
* {{DevFeature}} '''[and],[or],[not]''' - the behavior is changing in the development version, where all top-level filters will support in-order conditional handling of and, or, and not. One important thing to remember with the new syntax is, if you have multiple [or]s, you no longer should wrap your first conditional statement into an [or] block.<br />
<br />
* '''[variable]''' tests something about the value of a WML variable (see [[VariablesWML]])<br />
** ''name'' the name of the variable to test the value of<br>Only one of the following keys should be used for comparing the value of the variable to another value:<br />
** ''equals'' $name is equal (string wise) to this<br />
** ''not_equals'' $name is not equal to this<br />
** ''greater_than'' $name is numerically greater than this<br />
** ''less_than'' $name is less than this<br />
** ''greater_than_equal_to'' $name is not less than this<br />
** ''less_than_equal_to'' $name is not greater than this<br />
** ''numerical_not_equals'' $name is greater than or less than this<br />
** ''numerical_equals'' $name is not greater than or less than this<br />
** ''boolean_equals'' {{DevFeature}} $name has the same boolean value (e.g. off, false, 0, no)<br />
** ''contains'' {{DevFeature}} $name contains this string<br />
<br />
After condition tags:<br />
* '''[then]''' contains a set of action tags which should be executed if all conditions are true, or all conditions in any single [or] are true<br />
* '''[else]''' contains a set of action tags which should be executed if any condition is false, and all [or] tags are false<br />
<br />
== [while] ==<br />
<br />
executes commands if all conditions are true.<br />
Continues to execute them until a condition is not true.<br />
<br />
Executes a maximum of 1024 iterations per invocation.<br />
Condition tags are the same as for [if]<br />
<br />
After condition tags:<br />
* '''[do]''' contains actions that should be executed repeatedly until some condition is false.<br />
<br />
The [while] tag is useful for iterating over an array.<br />
An ''array'' is a list of values.<br />
The ''number''th value in the array ''array'' is stored in the WML variable '''''array''[number]'''.<br />
Note that if ''number'' is the value of the variable ''variable'',<br />
the expression '''$''array''[$variable]''' will return the ''number''th value in ''array''.<br />
The macros 'FOREACH' and 'NEXT' ([[UtilWML]]) can be used to iterate over an array;<br />
i.e. run a set of actions once per element of the array.<br />
<br />
=== {Foreach} ===<br />
If you wish to use a "for-each" iteration format (useful for example when you want to do an iteration for each row in a table) you can use the [http://www.wesnoth.org/misc/macro-reference.xhtml FOREACH] prededined macro.<br />
<br />
== [event] ==<br />
<br />
This adds a new event to the scenario.<br />
The event is in the normal format for an '''[event]''' tag (See [[EventWML]]).<br />
This is useful if you want an event that can only be triggered when a prior event is fulfilled<br />
<br />
These tags describe actions that affect the values of WML variables<br />
(see [[VariablesWML]] for information on WML variables,<br />
and [[UtilWML]] for convenient macro shortcuts for some of these):<br />
* '''[set_variable]''' manipulates a WML variable. {{Note:Predefined Macro|VARIABLE}} <br />
** ''name'' the name of the variable to manipulate<br />
** ''value'' set the variable to the given value (can be numeric or string). This only interprets dollars signs if it is the very first character, and then the entire value must be a simple variable name. (in 1.3.2, has the same effect as format. Use literal for no substitution)<br />
** ''literal'' set the variable to the given value (can be numeric or string). This does not interpret any dollars signs. {{DevFeature}}<br />
** ''format'' set the variable to the given value. Interprets the dollar sign to a higher degree than most actions. (see [[VariablesWML]])<br />
** ''to_variable'' Fully processes its value as in ''format'', and then gets the variable with that name.<br />
** ''add'' add the given amount to the variable. To subtract, add a negative number.<br />
** ''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. The result is an integer.<br />
** ''divide'' {{DevFeature}} divide the variable by the given number. The result is an integer.<br />
** ''modulo'' {{DevFeature}} returns the remainder of an integer division. Both variables need to be an integer, the result is also an integer. eg 5 % 2 = 1.<br />
** ''random'' 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. Dollars signs are only normally interpreted here, so it is harder to have a dynamically determined range. You would need to create the random-string with ''format''.<br />
** ''rand'' {{DevFeature}} 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.'''<br />
** ''time=stamp'' {{DevFeature}} 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 />
* '''[store_unit]''' stores details about units into game variables.<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 [unstore_unit] to re-create the unit with the modified variables.<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 [unstore_unit], [[DirectActionsWML]], and '''FOREACH''', [[UtilWML]]<br />
** '''[filter]''' (standard unit filter) all units matching this filter will be stored. If there are multiple units, they will be stored into an array of variables.<br />
** ''variable'' the name of the variable into which to store the unit(s)<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 only be cleared if a match is found. If mode is set to ''append'', the variable will not be cleared.<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 />
:When a unit is stored, the following values may be manipulated with '''[set_variable]'''<br />
:* description<br />
:* experience<br />
:* facing<br />
:* gender<br />
:* canrecruit<br />
:* overlays<br />
:* goto_x<br />
:* goto_y<br />
:* hitpoints<br />
:* moves<br />
:* resting<br />
:* side<br />
:* type<br />
:* unrenamable<br />
:* upkeep<br />
:* user_description<br />
:* x<br />
:* y<br />
:* [variables]<br />
:* [status]<br />
:* [modifications]<br />
Variables, status, and modifications are children of the stored unit variable. Example:<br />
[set_variable]<br />
name=unit_store.status.poisoned<br />
value=yes<br />
[/set_variable]<br />
<br />
:All keys and tags in the unit definition may be manipulated, including some others. Here is a sample list. 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.<br />
:* advanceto<br />
:* alignment<br />
:* alpha<br />
:* attacks_left<br />
:* canrecruit<br />
:* controller<br />
:* cost<br />
:* description<br />
:* experience<br />
:* facing<br />
:* flying<br />
:* fog<br />
:* gender<br />
:* get_hit_sound<br />
:* gold<br />
:* goto_x<br />
:* goto_y<br />
:* hitpoints<br />
:* id<br />
:* image<br />
:* image_defensive<br />
:* income<br />
:* language_name (same as the name key in the unit config)<br />
:* level<br />
:* max_attacks<br />
:* max_experience<br />
:* max_hitpoints<br />
:* max_moves<br />
:* movement<br />
:* movement_type<br />
:* moves<br />
:* race<br />
:* resting<br />
:* shroud<br />
:* side<br />
:* team_name<br />
:* type<br />
:* unit_description<br />
:* unrenamable<br />
:* usage<br />
:* value<br />
:* x<br />
:* y<br />
:* zoc<br />
:* [advancement]<br />
:* [/advancement]<br />
:* [movement_costs]<br />
:* [/movement_costs]<br />
:* [defense]<br />
:* [/defense]<br />
:* [resistance]<br />
:* [/resistance]<br />
:* [variables]<br />
:* [/variables]<br />
:* [status]<br />
:* [/status]<br />
:* [attack]<br />
:* [/attack]<br />
:* [modifications_description]<br />
:* [/modifications_description]<br />
:* [modifications]<br />
:* [/modifications]<br />
<br />
* '''[store_starting_location]''' Stores the starting location of a side's leader in a variable. The variable is a composite type which will have members 'x', 'y', and 'terrain' (the terrain type for a starting location is always 'K' unless it has been changed)<br />
** ''side'' the side whose starting location is to be stored<br />
** ''variable'' (default='location'): the name of the variable to store the location in<br />
* '''[store_locations]''' 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).<br />
** standard location filter- a location or location range which specifies the locations to store. You must specify this or no locations will be stored.<br />
** ''variable'' the name of the variable (array) into which to store the locations<br />
** ''terrain'' a series of terrain characters. (See [[TerrainLettersWML]] for possible values.) If present, locations will only be chosen if the letter of the terrain type of that location is listed. '''''[[User:SkeletonCrew#Branch_terrain|(SVN terrain only)]]''''' Here the list will be a comma separated list of terrains.<br />
** ''radius'' if present, any locations which are within ''radius'' hexes of the location filter will also be stored<br />
** '''[filter]''' (standard unit filter) only locations with units on them that match the filter will be stored. Use a blank filter to only store locations with units.<br />
* '''[store_villages]''' {{DevFeature}} 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).<br />
** ''owner_side'' a side number. If present, only villages owned by this side will be choosen. If owner_side=0, store the unowned villages. <br />
** ''variable'' the name of the variable (array) into which to store the locations<br />
** ''terrain'' a series of terrain characters. (See [[TerrainLettersWML]] for possible values.) If present, villages will only be chosen if the letter of the terrain type of that location is listed. '''''[[User:SkeletonCrew#Branch_terrain|(SVN terrain only)]]''''' Here the list will be a comma separated list of terrains.<br />
* '''[store_gold]''' stores the gold for a certain side in a variable. ({{DevFeature}} : this tag is no longer available)<br />
** ''side'' (default=1) the side for which the gold should be stored<br />
** ''variable'' (default='gold') the name of the variable to store the gold in<br />
* '''[store_side]''' stores information about a certain side in a variable. The variable will contain the member variables 'name', 'team_name', 'gold' and 'income'. ({{DevFeature}} : in SVN trunk, after 1.3.9 release, this tag's resultant variable was extended to contain the members 'fog', 'shroud', 'user_team_name', 'colour', 'controller', 'village_gold' and 'recruit'.)<br />
** ''side'' the side whose information should be stored<br />
** ''variable'' the name of the variable to store the information in<br />
* '''[clear_variable]''' 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.<br> Tags and variables of stored units can also be cleared, meaning that [trait]s and [object]s, for example, can be removed.<br />
** ''name'' the name of the variable to clear.<br />
* '''[role]''' 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 [if]) to see whether a role was assigned. This tag uses a Standard Unit 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 />
** ''role'' the value to store as the unit's role. This role is not used in the Standard Unit Filter when doing the search for the unit to assign this role to.<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 />
== See Also ==<br />
* [[VariablesWML]]<br />
* [[DirectActionsWML]]<br />
* [[InterfaceActionsWML]]<br />
* [[EventWML]]<br />
* [[ReferenceWML]]<br />
<br />
[[Category: WML Reference]]</div>Db0https://wiki.wesnoth.org/index.php?title=InternalActionsWML&diff=21603InternalActionsWML2008-02-13T19:14:53Z<p>Db0: /* [event] */ Added link to Variable macro</p>
<hr />
<div>{{WML Tags}}<br />
== Internal actions ==<br />
<br />
Internal actions are actions that WML uses internally that do not directly affect gameplay, for example storing a variable.<br />
<br />
The internal actions '''[if]''', '''[while]''', and '''[event]''' describe when/whether sets of actions should be executed.<br />
<br />
== [if] ==<br />
<br />
Executes different sets of actions based on whether the conditions described in the condition tags are true or not.<br />
<br />
Condition tags:<br />
* '''[have_unit]''' a unit passing this filter with >0 HP exists<br />
** standard unit filter<br />
<br />
* '''[have_location]''' {{DevFeature}} a location passing this filter exists <br />
** standard location filter<br />
<br />
* '''[and]''' If an [and] is present, all must evaluate to true in order for the [if] to evaluate true. Useful as a bracket for complex conditions, but not strictly necessary.<br />
** condition tags as in [if] - if these evaluate to true, [and] evaluates to true.<br />
<br />
* '''[or]''' If an [or] is present, one must evaluate to true in order for the [if] to evaluate true. ([[AdvancedConditionalWML|Example]])<br />
** condition tags as in [if] - if these evaluate to true, [or] evaluates to true. <br />
<br />
* '''[not]''' If a [not] is present, none must evaluate to true in order for the [if] to evaluate true.<br />
** condition tags as in [if] - if these evaluate to true, [not] evaluates to false.<br />
<br />
* {{DevFeature}} '''[and],[or],[not]''' - the behavior is changing in the development version, where all top-level filters will support in-order conditional handling of and, or, and not. One important thing to remember with the new syntax is, if you have multiple [or]s, you no longer should wrap your first conditional statement into an [or] block.<br />
<br />
* '''[variable]''' tests something about the value of a WML variable (see [[VariablesWML]])<br />
** ''name'' the name of the variable to test the value of<br>Only one of the following keys should be used for comparing the value of the variable to another value:<br />
** ''equals'' $name is equal (string wise) to this<br />
** ''not_equals'' $name is not equal to this<br />
** ''greater_than'' $name is numerically greater than this<br />
** ''less_than'' $name is less than this<br />
** ''greater_than_equal_to'' $name is not less than this<br />
** ''less_than_equal_to'' $name is not greater than this<br />
** ''numerical_not_equals'' $name is greater than or less than this<br />
** ''numerical_equals'' $name is not greater than or less than this<br />
** ''boolean_equals'' {{DevFeature}} $name has the same boolean value (e.g. off, false, 0, no)<br />
** ''contains'' {{DevFeature}} $name contains this string<br />
<br />
After condition tags:<br />
* '''[then]''' contains a set of action tags which should be executed if all conditions are true, or all conditions in any single [or] are true<br />
* '''[else]''' contains a set of action tags which should be executed if any condition is false, and all [or] tags are false<br />
<br />
== [while] ==<br />
<br />
executes commands if all conditions are true.<br />
Continues to execute them until a condition is not true.<br />
<br />
Executes a maximum of 1024 iterations per invocation.<br />
Condition tags are the same as for [if]<br />
<br />
After condition tags:<br />
* '''[do]''' contains actions that should be executed repeatedly until some condition is false.<br />
<br />
The [while] tag is useful for iterating over an array.<br />
An ''array'' is a list of values.<br />
The ''number''th value in the array ''array'' is stored in the WML variable '''''array''[number]'''.<br />
Note that if ''number'' is the value of the variable ''variable'',<br />
the expression '''$''array''[$variable]''' will return the ''number''th value in ''array''.<br />
The macros 'FOREACH' and 'NEXT' ([[UtilWML]]) can be used to iterate over an array;<br />
i.e. run a set of actions once per element of the array.<br />
<br />
== [event] ==<br />
<br />
This adds a new event to the scenario.<br />
The event is in the normal format for an '''[event]''' tag (See [[EventWML]]).<br />
This is useful if you want an event that can only be triggered when a prior event is fulfilled<br />
<br />
These tags describe actions that affect the values of WML variables<br />
(see [[VariablesWML]] for information on WML variables,<br />
and [[UtilWML]] for convenient macro shortcuts for some of these):<br />
* '''[set_variable]''' manipulates a WML variable. {{Note:Predefined Macro|VARIABLE}} <br />
** ''name'' the name of the variable to manipulate<br />
** ''value'' set the variable to the given value (can be numeric or string). This only interprets dollars signs if it is the very first character, and then the entire value must be a simple variable name. (in 1.3.2, has the same effect as format. Use literal for no substitution)<br />
** ''literal'' set the variable to the given value (can be numeric or string). This does not interpret any dollars signs. {{DevFeature}}<br />
** ''format'' set the variable to the given value. Interprets the dollar sign to a higher degree than most actions. (see [[VariablesWML]])<br />
** ''to_variable'' Fully processes its value as in ''format'', and then gets the variable with that name.<br />
** ''add'' add the given amount to the variable. To subtract, add a negative number.<br />
** ''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. The result is an integer.<br />
** ''divide'' {{DevFeature}} divide the variable by the given number. The result is an integer.<br />
** ''modulo'' {{DevFeature}} returns the remainder of an integer division. Both variables need to be an integer, the result is also an integer. eg 5 % 2 = 1.<br />
** ''random'' 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. Dollars signs are only normally interpreted here, so it is harder to have a dynamically determined range. You would need to create the random-string with ''format''.<br />
** ''rand'' {{DevFeature}} 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.'''<br />
** ''time=stamp'' {{DevFeature}} 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 />
* '''[store_unit]''' stores details about units into game variables.<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 [unstore_unit] to re-create the unit with the modified variables.<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 [unstore_unit], [[DirectActionsWML]], and '''FOREACH''', [[UtilWML]]<br />
** '''[filter]''' (standard unit filter) all units matching this filter will be stored. If there are multiple units, they will be stored into an array of variables.<br />
** ''variable'' the name of the variable into which to store the unit(s)<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 only be cleared if a match is found. If mode is set to ''append'', the variable will not be cleared.<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 />
:When a unit is stored, the following values may be manipulated with '''[set_variable]'''<br />
:* description<br />
:* experience<br />
:* facing<br />
:* gender<br />
:* canrecruit<br />
:* overlays<br />
:* goto_x<br />
:* goto_y<br />
:* hitpoints<br />
:* moves<br />
:* resting<br />
:* side<br />
:* type<br />
:* unrenamable<br />
:* upkeep<br />
:* user_description<br />
:* x<br />
:* y<br />
:* [variables]<br />
:* [status]<br />
:* [modifications]<br />
Variables, status, and modifications are children of the stored unit variable. Example:<br />
[set_variable]<br />
name=unit_store.status.poisoned<br />
value=yes<br />
[/set_variable]<br />
<br />
:All keys and tags in the unit definition may be manipulated, including some others. Here is a sample list. 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.<br />
:* advanceto<br />
:* alignment<br />
:* alpha<br />
:* attacks_left<br />
:* canrecruit<br />
:* controller<br />
:* cost<br />
:* description<br />
:* experience<br />
:* facing<br />
:* flying<br />
:* fog<br />
:* gender<br />
:* get_hit_sound<br />
:* gold<br />
:* goto_x<br />
:* goto_y<br />
:* hitpoints<br />
:* id<br />
:* image<br />
:* image_defensive<br />
:* income<br />
:* language_name (same as the name key in the unit config)<br />
:* level<br />
:* max_attacks<br />
:* max_experience<br />
:* max_hitpoints<br />
:* max_moves<br />
:* movement<br />
:* movement_type<br />
:* moves<br />
:* race<br />
:* resting<br />
:* shroud<br />
:* side<br />
:* team_name<br />
:* type<br />
:* unit_description<br />
:* unrenamable<br />
:* usage<br />
:* value<br />
:* x<br />
:* y<br />
:* zoc<br />
:* [advancement]<br />
:* [/advancement]<br />
:* [movement_costs]<br />
:* [/movement_costs]<br />
:* [defense]<br />
:* [/defense]<br />
:* [resistance]<br />
:* [/resistance]<br />
:* [variables]<br />
:* [/variables]<br />
:* [status]<br />
:* [/status]<br />
:* [attack]<br />
:* [/attack]<br />
:* [modifications_description]<br />
:* [/modifications_description]<br />
:* [modifications]<br />
:* [/modifications]<br />
<br />
* '''[store_starting_location]''' Stores the starting location of a side's leader in a variable. The variable is a composite type which will have members 'x', 'y', and 'terrain' (the terrain type for a starting location is always 'K' unless it has been changed)<br />
** ''side'' the side whose starting location is to be stored<br />
** ''variable'' (default='location'): the name of the variable to store the location in<br />
* '''[store_locations]''' 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).<br />
** standard location filter- a location or location range which specifies the locations to store. You must specify this or no locations will be stored.<br />
** ''variable'' the name of the variable (array) into which to store the locations<br />
** ''terrain'' a series of terrain characters. (See [[TerrainLettersWML]] for possible values.) If present, locations will only be chosen if the letter of the terrain type of that location is listed. '''''[[User:SkeletonCrew#Branch_terrain|(SVN terrain only)]]''''' Here the list will be a comma separated list of terrains.<br />
** ''radius'' if present, any locations which are within ''radius'' hexes of the location filter will also be stored<br />
** '''[filter]''' (standard unit filter) only locations with units on them that match the filter will be stored. Use a blank filter to only store locations with units.<br />
* '''[store_villages]''' {{DevFeature}} 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).<br />
** ''owner_side'' a side number. If present, only villages owned by this side will be choosen. If owner_side=0, store the unowned villages. <br />
** ''variable'' the name of the variable (array) into which to store the locations<br />
** ''terrain'' a series of terrain characters. (See [[TerrainLettersWML]] for possible values.) If present, villages will only be chosen if the letter of the terrain type of that location is listed. '''''[[User:SkeletonCrew#Branch_terrain|(SVN terrain only)]]''''' Here the list will be a comma separated list of terrains.<br />
* '''[store_gold]''' stores the gold for a certain side in a variable. ({{DevFeature}} : this tag is no longer available)<br />
** ''side'' (default=1) the side for which the gold should be stored<br />
** ''variable'' (default='gold') the name of the variable to store the gold in<br />
* '''[store_side]''' stores information about a certain side in a variable. The variable will contain the member variables 'name', 'team_name', 'gold' and 'income'. ({{DevFeature}} : in SVN trunk, after 1.3.9 release, this tag's resultant variable was extended to contain the members 'fog', 'shroud', 'user_team_name', 'colour', 'controller', 'village_gold' and 'recruit'.)<br />
** ''side'' the side whose information should be stored<br />
** ''variable'' the name of the variable to store the information in<br />
* '''[clear_variable]''' 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.<br> Tags and variables of stored units can also be cleared, meaning that [trait]s and [object]s, for example, can be removed.<br />
** ''name'' the name of the variable to clear.<br />
* '''[role]''' 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 [if]) to see whether a role was assigned. This tag uses a Standard Unit 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 />
** ''role'' the value to store as the unit's role. This role is not used in the Standard Unit Filter when doing the search for the unit to assign this role to.<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 />
== See Also ==<br />
* [[VariablesWML]]<br />
* [[DirectActionsWML]]<br />
* [[InterfaceActionsWML]]<br />
* [[EventWML]]<br />
* [[ReferenceWML]]<br />
<br />
[[Category: WML Reference]]</div>Db0https://wiki.wesnoth.org/index.php?title=Template:Note:Predefined_Macro&diff=21602Template:Note:Predefined Macro2008-02-13T19:14:29Z<p>Db0: using tt to make it stand out</p>
<hr />
<div><tt>''('''Note:''' You can use the [http://www.wesnoth.org/misc/macro-reference.xhtml {{{1}}}] prededined macro to achieve the same result in a shorter format)''</tt></div>Db0https://wiki.wesnoth.org/index.php?title=Template:Note:Predefined_Macro&diff=21601Template:Note:Predefined Macro2008-02-13T19:13:39Z<p>Db0: </p>
<hr />
<div><small>''('''Note:''' You can use the [http://www.wesnoth.org/misc/macro-reference.xhtml {{{1}}}] prededined macro to achieve the same result in a shorter format)''</small></div>Db0https://wiki.wesnoth.org/index.php?title=Template:Note:Predefined_Macro&diff=21600Template:Note:Predefined Macro2008-02-13T19:13:05Z<p>Db0: Created Macro note for inline inserting</p>
<hr />
<div><small>''('''Note:''' You can use the {{{1}}} prededined macro to achieve the same result in a shorter format)''</small></div>Db0https://wiki.wesnoth.org/index.php?title=Download&diff=21590Download2008-02-13T00:59:24Z<p>Db0: /* Source code */ Changed 1.3.15 to "Previous version"</p>
<hr />
<div>Welcome to the Battle for Wesnoth downloads page. The BFW project team only officially releases the source code. Binary packages are only provided by community volunteers and hosted here. Torrents are also unofficial.<br />
<br />
If the latest binaries are not currently available for your OS, please check back in a few days to see if they have been placed here. Packagers have been informed of the release, please be patient. In the meantime, read the [[FAQ#A_new_version_is_out.2C_but_where_is_the_download_for_.5BWindows.2C_Mac_OS.2C_etc..5D.3F|FAQ]].<br />
<br />
__NOTOC__<br />
Jump to: [[Download#Stable_.281.2_branch.29|Stable Branch]] | [[Download#Development_.281.3_branch.29|Development Branch]]<br />
<br />
<br />
== Stable (1.2 branch) ==<br />
<br />
We're coming up on a stable 1.4 release, so this branch is no longer in development. There will be no further releases except in the unlikely case of a security emergency.<br />
<br />
==== Source code ====<br />
* [http://downloads.sourceforge.net/wesnoth/wesnoth-1.2.8.tar.bz2?download Current stable version] (1.2.8, 69.7 MB)<br />
* [http://downloads.sourceforge.net/wesnoth/wesnoth-1.2.7.tar.bz2?download Previous stable version] (1.2.7, 69.7 MB)<br />
* [[CompilingWesnoth|Compiling Guide]] - how to compile the source code<br />
<br />
==== [[BeOS]] ====<br />
* The current version (1.2.8) is not available yet.<br />
* [http://zeta-games.com/index.php?option=com_remository&Itemid=28&func=fileinfo&id=24 Previous stable version] (1.2.1, 70.11 MB)<br />
* [http://downloads.sourceforge.net/wesnoth/Wesnoth-1.0.2-BeOS-x86.pkg.zip?download Older stable version, not compatible with 1.2] (1.0.2, 42.3 MB)<br />
<br />
==== GNU/Linux ====<br />
* There are specific binaries for many different GNU/Linux Distributions. Not all are always up to date with the current release. Please have a look at the [[WesnothBinariesLinux|Linux binary page]] for more informations about the binaries for your Distribution.<br />
<br />
==== OpenBSD ====<br />
'''Note:''' OpenBSD-current is required to play with these binaries:<br />
* [http://downloads.sourceforge.net/wesnoth/wesnoth-openbsd--1.2.8.tgz?download Current stable version ] (1.2.8, 74.9 MiB)<br />
* [ftp://pkg@ftp.enqlave.net/wesnoth-1.2.8.tgz Current stable version (mirror @ Enqlave) ] (1.2.8, 74.9 MiB)<br />
* [http://downloads.sourceforge.net/wesnoth/wesnoth-openbsd--1.2.7.tgz?download Previous stable version ] (1.2.7, 75.0 MiB)<br />
* [ftp://pkg@ftp.enqlave.net/wesnoth-1.2.7.tgz Previous stable version (mirror @ Enqlave) ] (1.2.7, 75.0 MiB)<br />
<br />
==== FreeBSD ====<br />
* There is a lot of versions available as FreeBSD package. Look to the [http://www.freebsd.org/cgi/ports.cgi?query=wesnoth&stype=all ports] for the latest version.<br />
<br />
==== OS/2 & eComStation ====<br />
* The current version (1.2.8) not available yet.<br />
* [http://download.smedley.info/wesnoth-1.2.5-os2.zip Previous stable version (1.2.5)] (1.2.5, 70 MB)<br />
<br />
==== Mac OS X ====<br />
Be aware that OSX 10.3.9+ is required to play with these binaries.<br />
* [http://downloads.sourceforge.net/wesnoth/Wesnoth_MacOSX_1.2.8d.dmg?download Current stable version] (1.2.8, Universal, 80.7 MB)<br />
* [http://downloads.sourceforge.net/wesnoth/Wesnoth_MacOSX_1.2.8f_lite.dmg?download Current stable version - lite] (1.2.8, Universal, no art or music, 51.7 MB)<br />
* [http://downloads.sourceforge.net/wesnoth/Wesnoth_MacOSX_1.2.7.dmg?download Previous stable version] (1.2.7, Universal, 80.8 MB)<br />
* [http://downloads.sourceforge.net/wesnoth/Wesnoth_MacOSX_1.2.7_lite.dmg?download Previous stable version - lite] (1.2.7, Universal, no art or music, 51.5 MB)<br />
<br />
==== MS Windows ====<br />
* [http://downloads.sourceforge.net/wesnoth/wesnoth-1.2.8-windows.exe?download Current version] (1.2.8, 63.0 MB)<br />
* [http://downloads.sourceforge.net/wesnoth/wesnoth-1.2.7-windows.exe?download Previous version] (1.2.7, 63.1 MB)<br />
<br />
==== AmigaOS4 ====<br />
* The current version (1.2.8) is not available yet.<br />
* [http://os4depot.net/index.php?function=showfile&file=game/strategy/wesnoth.lha Previous stable version ] (1.2.5, 63 MB)<br />
<br />
==== Syllable ====<br />
* The current version (1.2.8) is not available yet.<br />
* [http://www.syllable-software.info/download.php?view.28 Previous stable version] (1.2.6, 60.8 MB)<br />
<br />
==== Miscellaneous ====<br />
* [http://downloads.sourceforge.net/wesnoth/wesnoth-1.2.8.tar.bz2.md5?download Source code md5sum]<br />
* [http://www.wesnoth.org/wiki/Download_Xdeltas#Source_code Xdelta for the source code]<br />
* [http://www.wesnoth.org/wiki/Download_Xdeltas#MS_Windows Xdelta for the Windows binary]<br />
<br />
== Development (1.3 branch) ==<br />
<br />
Version 1.3.x is the latest development version, boasting updated graphics and new exciting features. However, there may be occasional bugs or performance problems in the development versions since heavy changes are taking place all the time. For balanced and stable gaming, it is recommended you use the latest version of the 1.2.x branch. This version is recommended for coders and campaign developers, as well as those who want to preview the future of Wesnoth.<br />
<br />
==== Source code ====<br />
* [http://downloads.sourceforge.net/wesnoth/wesnoth-1.3.16.tar.bz2?download Current Version] (1.3.16, 115.0 MB)<br />
* [http://downloads.sourceforge.net/wesnoth/wesnoth-1.3.15.tar.bz2?download Previous Version] (1.3.15, 114.6 MB)<br />
<br />
* [[CompilingWesnoth|Compiling Guide]] - how to compile the source code<br />
<br />
==== MS Windows ====<br />
* The current version (1.3.16) is not available yet.<br />
* [http://downloads.sourceforge.net/wesnoth/wesnoth-1.3.15a-windows.exe?download Previous version] (1.3.15a, 107.3 MB)<br />
<br />
==== Mac OS X ====<br />
* The current version (1.3.16) is not available yet.<br />
* [http://downloads.sourceforge.net/wesnoth/Wesnoth_MacOSX_1.3.14.dmg?download Older Version] (1.3.14, Universal, 126.4 MB)<br />
* [http://downloads.sourceforge.net/wesnoth/Wesnoth_MacOSX_1.3.14_lite.dmg?download Older Version - lite] (1.3.14, Universal, no art or music, 66.7 MB)<br />
<br />
==== GNU/Linux ====<br />
* There are binaries for many different GNU/Linux Distributions. Not all are always up to date with the current release. Please have a look at the [[WesnothBinariesLinux|Linux binary page]] for more information about the binaries for your Distribution.<br />
<br />
==== (Open)Solaris ====<br />
* The current version (1.3.16) is not available yet.<br />
* [http://downloads.sourceforge.net/wesnoth/wesnoth-opensolaris-1.3.12.i386.pkg.bz2?download Older version for x86] (1.3.12, OpenSolaris package for x86, 97.6 MB)<br />
<br />
==== AmigaOS4 ====<br />
* The current version (1.3.16) is not available yet.<br />
* [http://os4depot.net/index.php?function=showfile&file=game/strategy/wesnoth-devel.lha Older Version] (1.3.12, 105 MB)<br />
<br />
==== OS/2 & eComStation ====<br />
* The current version not available.<br />
* [http://download.smedley.info/wesnoth-1.1.8-os2.zip Older Version] (1.1.8, 66 MB)<br />
<br />
==== Syllable ====<br />
* The current version (1.3.15) is not available yet.<br />
* [http://www.syllable-software.info/download.php?view.32 Older Version] (1.3.8, 82.2 MB)<br />
<br />
<br />
==== Miscellaneous ====<br />
* [http://downloads.sourceforge.net/wesnoth/wesnoth-1.3.16.tar.bz2.md5?download md5sum for current source code]<br />
* [http://www.wesnoth.org/wiki/Download_Xdeltas#Source_code Xdelta for the source code]<br />
* [http://sourceforge.net/project/showfiles.php?group_id=89495 SourceForge page for current and all previous versions]<br />
<br />
== License ==<br />
This program is free software; you can redistribute it and/or modify it under the terms of the [http://www.fsf.org/copyleft/gpl.html GNU General Public License version 2], as published by the [http://www.fsf.org/ Free Software Foundation].<br />
This program 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. See the GNU General Public License for more details.<br />
<br />
== See also ==<br />
* [http://changelog.wesnoth.org Changelog]<br />
* [[WesnothBinaries| More binaries]]<br />
* [[WesnothSVN]] - bleeding edge version from SVN</div>Db0https://wiki.wesnoth.org/index.php?title=Create&diff=21529Create2008-02-08T22:03:05Z<p>Db0: /* The world of Wesnoth */ Added fan fiction link</p>
<hr />
<div>{| style="float:right"<br />
|<br />
__TOC__<br />
|}<br />
Interested in creating your own scenarios and campaigns? One of Wesnoth's best features is its extensibility. Players can create new maps, units, races, scenarios, art, music, and even entire campaigns. Access to the "guts" of the game is both simple and difficult; if you have an ASCII text editor you have everything you need to build your own world. However, learning the Wesnoth Markup Language (WML) takes some effort. This section will guide you through the process of creating and distributing your own content.<br />
<br />
It should also be noted that '''we need a lot of help creating artwork for the core of the game.''' The current projects we are working on are [http://www.wesnoth.org/forum/viewtopic.php?t=2014&start=0&postdays=0&postorder=asc&highlight= listed here]. We'll happily help you out, if you take a swing at them.<br />
<br />
== Read this first! ==<br />
Before you modify or add anything, it is important to understand how the game stores and organizes its data. This article will explain the game's directory structure and introduce the ''userdata'' directory.<br />
* [[EditingWesnoth]]<br />
<br />
== What can I create, and how? ==<br />
<br />
<div class="thumb tright"><div><br />
[http://www.wesnoth.org/images/sshots/wesnoth_editor-1.3.4.jpg http://www.wesnoth.org/images/sshots/wesnoth_editor-1.3.4-175.jpg]<br />
<div class="thumbcaption">Battle for Wesnoth map editor</div></div><br />
</div><br />
<br />
* [[BuildingMaps|Maps]] - the layout of terrain tiles<br />
* [[BuildingScenarios|Scenarios]] - a scenario makes things happen on a map, making it playable<br />
* [[BuildingCampaigns|Campaigns]] - how to put it all together into a campaign<br />
* [[BuildingMultiplayer|Multiplayer Maps and Scenarios]] - a specialized look at maps and scenarios<br />
* [[MultiplayerCampaigns|Multiplayer Campaigns]] - making a campaign accessible in multiplayer<br />
<br />
* [[BuildingUnits|Units]]<br />
* [[BuildingFactions|Multiplayer factions and eras]]<br />
<br />
* '''[[Create Art|Art]]''' - complete with '''tutorials!'''<br />
* [[Create Music|Music]]<br />
* [[WesnothTranslations|Translations]] - work on translating Wesnoth<br />
<br />
* [[Distributing content]] - all about the campaign server<br />
* [[Maintenance tools]] - tools for helping you sanity-check and maintain campaigns.<br />
<br />
== What have others done? ==<br />
Quick descriptions of the campaigns and scenarios that have been published on the campaign server.<br />
* [[UserScenarios|User contributed campaigns]]<br />
List of abandoned campaigns you can work on<br />
* [[Abandoned_Campaigns]]<br />
There are a multitude multiplayer maps and discussion of the campaigns on the [http://www.wesnoth.org/forum Wesnoth forum]<br />
* [http://www.wesnoth.org/forum/viewforum.php?f=15 Multiplayer development forum]<br />
* [http://www.wesnoth.org/forum/viewforum.php?f=8 Scenario and campaign development forum]<br />
* [[Complete Faction List (unfinished)|Complete Faction List]]<br />
<br />
== The world of Wesnoth ==<br />
Not all campaigns take place in Wesnoth, but many do. There is definitely a certain flavor to campaigns that are intended to take place somewhere in the world of Wesnoth. Stake out a time period or a map locale and tell a story.<br />
* [[WesnothHistory|The history of Wesnoth]]<br />
* [[WesnothGeography|The geography of Wesnoth]]<br />
* [[RaceDescriptions|The races of creatures in Wesnoth]]<br />
* [[WesnothPoetry|Wesnothian poetry]]<br />
* [[Fan fiction]]<br />
<br />
== Miscellaneous ==<br />
* [[ExternalUtilities| External Utilities]] - some extra tools for easier creating stuff<br />
* [[ReferenceWML|WML Reference]] - a quicklink<br />
* [[FAQ#Scenario_and_Campaigns|FAQ]] - if you have a question, post it<br />
* Campaign server [http://wolff.to/campaigns/list.html web interface] - An alternate way to download user campaigns<br />
* [[Status_of_User_Scenarios| Status of User Scenarios]] - Lists which usercampaigns are working and which ones are broken<br />
{{Home}}</div>Db0https://wiki.wesnoth.org/index.php?title=SideWML&diff=21435SideWML2008-02-02T23:13:24Z<p>Db0: /* the [side] tag */ added the unit_description key that was missing</p>
<hr />
<div>{{WML Tags}}<br />
== the [side] tag ==<br />
<br />
The [side] tag is used to describe a side in a particular scenario.<br />
<br />
The following keys are recognized:<br />
<br />
* ''side'' a digit. The leader of this side is placed on the tile represented by this digit (see [[BuildingMaps]]). When defining sides, they must be defined in order since the side number is checked against the number of sides seen so far.<br />
<br />
* ''controller'' how moves for this side should be inputted.<br />
** 'ai' the Wesnoth AI makes this side's moves. This is the default setting.<br />
** 'human' a player controls this side's moves.<br />
** 'null' the side doesn't get a turn to move and doesn't have a leader generated from the contents of the [side] tag. (It still can get units from [unit] tags in the [side] tag.)<br />
<br />
* ''no_leader'' if "no" (default), then keys describing a unit which will begin on the side's keep will be the remainder of the '''[side]''' tag, See [[SingleUnitWML]]. Note that if the keys ''x'', ''y'' are included, the leader will begin there regardless of keep location. If this side has a recall list from a previous level, then the recall list will be searched for a leader (using canrecruit) and if one is found it will be used instead of the one described in the '''[side]''' tag.<br />
<br />
* ''type'' the unit type of the side's leader. This must be present if ''no_leader'' is not set to "yes." ''Description'', ''type'', ''x'', ''y'', ''profile'', and ''hitpoints'' are examples of keys from [[SingleUnitWML]] that will describe the leader if placed within the [side] tag.<br />
<br />
* ''description'' a unique identifier for the side's leader. This is not displayed to the player, but is to be used only for identifying and filtering for units. {{DevFeature}}<br />
<br />
* ''user_description'' the name of the unit that is shown to the player. Note that the player may use the "rename unit" action to change this.<br />
<br />
* ''unrenamable'' if "no" (default), the player can rename the unit. Renaming the unit alters the ''user_description'' key, so the ''description'' key can still be used for filtering. It is generally a good idea to set this to yes in campaigns since dialog will usually refer to the leader by name. It is technically possible to read ''user_description'' into a variable every time you want to call the leader by name, but this is a hassle.<br />
<br />
* ''recruit'' a list of unit types. At the beginning of the scenario, the side gains recruitment of these units.<br />
<br />
* ''gold'' the starting gold for this side. Default 100. (If gold is carried over from a previous scenario, this value is the minimum starting gold.)<br />
<br />
* ''income'' the base income for this side, default 0. This is added to ''base_income'', '''[game_config]''' to determine the side's base income. (see [[GameConfigWML]]).<br />
<br />
* ''fog'' if 'yes', this side cannot see any tiles it is not within vision of, except at the start.<br />
<br />
* ''shroud'' if 'yes', this side cannot see any tiles it has not moved within sight of.<br />
<br />
* ''shroud_data'' describes the area which this team has de-shrouded. An example:<br />
|<br />
|00011111000<br />
This would leave the first column on the map unaltered and would change the second column for 11 tiles. A '0' means: shrouded, '1' means unshrouded. You can either call an external file using {@filename} (see [[PreprocessorRef]]) or place the data in quotes. For making an external file see [[BuildingScenariosShroudData]].<br />
<br />
* ''persistent'' whether the side exists in any other scenarios. If '1'(yes), then ''save_id''(see below) becomes active for this side. Default '0'(no); when '''controller=human''', this is always '1'.<br />
<br />
* ''save_id'' default ''description'' if available, 'Unknown' otherwise. The ID of the side with respect to the previous and next scenarios. Used to carry over the side's recall list (including the side's leader), recruitment list, and starting gold from scenario to scenario. Also used for the side's displayed name in the victory gold-calculation dialog.<br />
<br />
* ''team_name'' a non translatable string representing the team's description. Sides with the same team_name are allied. Default ''side''.<br />
<br />
* ''user_team_name'' a translatable string representing the team's description. This has no effect on alliances. Default ''team_name''.<br />
<br />
* ''colour'' if you want side 4 to be the same colour as side 2 normally is, put colour=2. <br />
** The default list of numbers and corresponding colours can be found in data/team_colors.cfg.<br />
** Note that in Wesnoth 1.3.4 and later releases, the IDs of the color ranges shipped with Wesnoth are descriptive names (e.g. 'teal', 'orange', etc.), declared in data data/core/team_colors.cfg. Old numeric IDs are kept for backwards compatibility.<br />
<br />
* ''flag'' a custom flag animation to use instead of the default one to mark captured villages. {{DevFeature}} an automatic side-coloring is applied.<br />
** Example animation that has three frames and loops every 750ms: ''flag=misc/myflag-1.png:250,misc/myflag-2.png:250,misc/myflag-3.png:250''<br />
<br />
* ''flag_icon'' {{DevFeature}} a custom flag icon to indicate the side playing in the statusbar (a size of 24x16 is recommended). An automatic side-coloring is applied.<br />
<br />
* ''village_gold'' the amount of gold given to this side per village it controls per turn. Default specified in ''village_income'', '''[game_config]''' ([[GameConfigWML]]).<br />
<br />
* ''share_maps'' whether sides allied with this side see all terrains that this side sees, if they are on shroud.<br />
<br />
* ''share_view'' whether sides allied with this side see the units that this side sees, if they are on FoW (fog).<br />
<br />
* ''disallow_observers'' {{DevFeature}} prevents observers from seeing this side turn. (default: no)<br />
<br />
* ''name'', ''id'', ''leader'' not used; see [[EraWML]].<br />
<br />
* ''music'' music to play for this player. Default specified in [scenario] (see [[ScenarioWML]]).<br />
<br />
* '''[ai]''' if '''controller=ai''', gives parameters to the AI. See [[AiWML]].<br />
<br />
* '''[village]''' describes a village the side begins in control of.<br />
** ''x'', ''y'' the location of the village.<br />
<br />
* '''[unit]''' describes a unit which begins on the side. See [[SingleUnitWML]]. If the side has a recall list and the unit is not given a location, it will start on the recall list. Note that the ''side'' attribute under '''[unit]''' will be ignored, as the side will come from the ''side'' attribute of '''[side]'''.<br />
<br />
<br />
The following keys are multiplayer only:<br />
<br />
* ''allow_player'' if false then this side will not be allowed to be modified and will be hidden during game creation.<br />
<br />
* ''team_lock'' if true then this side's team is not allowed to be modified.<br />
<br />
* ''colour_lock'' if true then this side's color is not allowed to be modified.<br />
<br />
* ''gold_lock'' if true then this side's gold is not allowed to be modified. <br />
<br />
* ''income_lock'' if true then this side's income is not allowed to be modified.<br />
<br />
== See Also ==<br />
* [[EraWML]]<br />
* [[ScenarioWML]]<br />
* [[ReferenceWML]]<br />
<br />
<br />
[[Category: WML Reference]]</div>Db0https://wiki.wesnoth.org/index.php?title=WesnothPhilosophy&diff=21410WesnothPhilosophy2008-02-01T21:20:14Z<p>Db0: Marked as obsolete. This page is still mostly referring to reaching V1.0</p>
<hr />
<div>{{Needs update}}<br />
== The History of, and Philosophy behind Wesnoth ==<br />
<br />
The 18th of December [2003] will mark six months since the first version of Battle for Wesnoth, version 0.1, was released.<br />
<br />
At this time, I feel it is appropriate to respond to something Bazarov said in another thread:<br />
<br />
<blockquote>am having a little difficulty understanding the core values of the game in the eyes of the creators. I think having an established, ordered list of these would help a lot in my attempts to help. A white paper of sorts. I don't think this should be done by voting, either; a clear, concise vision would be nice. Where does originality factor in? I, too, felt that the game's focus was on the units rather than the strategy, that the building of my colourful army was more important than the logic of any scenario.</blockquote><br />
<br />
We talk about the 'KISS [1] principle' here a lot, and I think that that is the most core<br />
design principle used in Wesnoth. It was the key principle that enabled Wesnoth<br />
to get off the ground, and it is the principle that has kept it alive since.<br />
<br />
First of all, the concept of 'KISS' is a software development principle.<br />
Not a game-design principle. The idea of game rules being simple is not<br />
necessarily a bad one, and can be linked to KISS in that game rules<br />
that are simple to implement are often ones that most players would<br />
consider 'simple'. However simple game rules are not directly related<br />
to KISS, as many people on the forum mistakenly seem to have thought.<br />
<br />
When I was a teenager, I attempted to write games several times.<br />
Some of them were playable, even impressive - especially considering<br />
my resources and skill - but none of them were professional, and polished.<br />
When I showed them to people, they would be impressed, and say<br />
"this looks good", but I knew that none of them would actually want to take<br />
the game home and play it for themselves.<br />
<br />
My programming skills back then left alot of room for improvement.<br />
I had a basic, self-taught knowledge of C and C++.<br />
Then I went to college, and after that got a job programming,<br />
where my skills improved immensely.<br />
<br />
In some of my spare time, I decided to try writing a game again.<br />
What kind of game? Well, I was confident of my skills,<br />
so I would write a complex game, using all the latest programming tools.<br />
<br />
I wanted to write a Civilization-like game, but with some major rule changes,<br />
and a better AI. I had thought up sophisticated systems for everything.<br />
The result? It failed before it even got started, collapsing in a mountain of<br />
complexity.<br />
<br />
I gave up on writing a game for a long time after that.<br />
I was busy with other things anyhow. But then one day, I played<br />
a game that I had played when I was much younger, a Genesis game:<br />
Master of Monsters. It was fun, lots of fun, yet it was simple.<br />
Simple enough that I was confident I could program a game like it easily enough.<br />
<br />
I had analyzed that most Free games fall into one of two categories:<br />
they are either boringly trivial, or they are insanely complex,<br />
and never really get off the ground. I decided I would claim the middle ground:<br />
make it simple enough to write, but substantial enough to be lots of fun.<br />
It wouldn't be as ambitious as some things I wanted to write, but at<br />
least it would work.<br />
<br />
But, I don't see the point of writing a Free game which is simply<br />
a copy of a commercial game. My aim would be to write<br />
something new, something better, something which borrows the best ideas<br />
from a number of other games, and which adds new ideas of its own.<br />
<br />
The idea of KISS is that the feature must be easy enough to program<br />
that before the programmer starts working on it, they have a very clear<br />
and strong understanding of how they're going to make it work.<br />
Not a 'yes I can do this but it is kinda complicated'.<br />
Rather they should be thinking 'this is so stupid and simple that it's<br />
really really easy for me to do'. So I decided on a simple rule for the<br />
game: a feature would be added only if I knew immediately how to implement it.<br />
I wouldn't make vague promises to myself about features that would be later added,<br />
but which I had no idea how to do.<br />
<br />
I started with a few basic units, and two races: Orcs and Elves.<br />
Elves had horsemen, which could advance to knights, archers which<br />
could advance to rangers, and fighters which could advance to heroes.<br />
<br />
I considered different systems of advancement. Even considering<br />
something which keeps track of the activity the unit undergoes,<br />
and advances it in that area, but I rejected such a system for<br />
something simple, something similiar to Master<br />
of Monsters with the added choice of letting the player<br />
choose what their unit advances into at some points.<br />
<br />
The focus would be around building your own army, and watching<br />
it grow as its members became more experienced.<br />
You would only have basic control over the advancement of<br />
a particular member of the army, but you would decide what units go<br />
into the army.<br />
<br />
I also fleshed out a very basic interface. There would be only a few commands:<br />
to move a unit, and to attack with that unit, as well as to recruit and<br />
recall units. I added in unit skills, which was something Master of Monsters<br />
didn't have, but I made the skills occur implicitly -- healing would be<br />
dispensed to all units around a specific unit for instance.<br />
<br />
Obviously, Wesnoth is a fantasy game, so it contains some implication of<br />
spells/magic, however I have always disliked games that got deep<br />
into sophisticated systems of spells.<br />
<br />
In Wesnoth, wars would be decided with sword and bow.<br />
Mages would be involved too, of course, but warfare was to be<br />
about guiding troops around strategically, not about which spell<br />
to cast and where. So, from the beginning I decided<br />
that all spells would be implicit, or simply a type of attack.<br />
<br />
This was a big divergence from Master of Monsters where<br />
one spell could be cast every turn by each master at any place<br />
on the battlefield. That was, in my opinion, one of the game's<br />
worst features - if your enemy had advanced a unit on<br />
the other side of the map, you could try to kill him with a spell.<br />
<br />
I also made the combat very simple. An example of this is the<br />
way in which the chance to hit is calculated. I'm<br />
wondering how many people know how the chance to hit is calculated<br />
in Wesnoth? I thought it was alot more complex in<br />
Master of Monsters until I studied how they did it.<br />
<br />
What I suspect most people would immediately consider for a<br />
chance-to-hit system would be a formula that relies on the<br />
attacker's skill with the weapon, and the defender's defensiveness,<br />
as well as the terrain the defender is in.<br />
<br />
The way Wesnoth does it is in fact so insanely simple that<br />
I suspect many people who did not know how it is done will<br />
think 'what a naive, silly system!' when they read the following:<br />
<br />
<blockquote>The chance to hit is taken entirely from the defender's defensive rating in the terrain it is in.</blockquote><br />
<br />
So, there is always 30% chance to hit Elves in forest,<br />
and 60% chance to hit them in grassland. The attacker's skill doesn't come<br />
into the equation.<br />
<br />
I decided it would add interesting strategy, though, if just<br />
a very few weapons had a special attribute that would<br />
guarantee them a certain chance to hit. I decided that was<br />
an appropriate thing for magic, to differentiate it: so, I<br />
decided that magic attacks would always have 70% chance to hit.<br />
<br />
For all my efforts though, and for all the people who say that<br />
graphics are of little importance or unimportant, I don't<br />
think that Wesnoth would have gotten anywhere if fmunoz hadn't<br />
seen it, and drawn some very good graphics for it. The<br />
graphics I had drawn were pathetic, but he drew some nice ones,<br />
and added the undead and later humans to the game, as<br />
well as doing some scenarios, and adding some very good ideas to the game.<br />
<br />
I think it's important for us to remember the KISS principle<br />
as development continues. Remember: Wesnoth has not reached<br />
1.0 yet. It's not a finished work. It could still fail.<br />
Let's make it easy for it to succeed by keeping everything simple.<br />
<br />
Oh and how did I come up with the name 'Wesnoth'?<br />
It was late at night, and I wanted to release version 0.1.<br />
I muttered syllables to myself, until I came up with a pair<br />
that sounded halfway reasonable: 'Wesnoth'.<br />
<br />
David<br />
<br />
[1] Keep It Simple, Stupid<br />
<br />
== More on the KISS principle ==<br />
<br />
The reason behind the KISS principle is fairly straightforward:<br />
often programmers will be confronted with someone -<br />
perhaps a user, perhaps a designer, perhaps themselves -<br />
who wants them to implement something to work in a certain way.<br />
Oftentimes the programmer can only just work their head around<br />
all the requirements, and when they start implementing the feature,<br />
they don't have a clear idea of how the entire feature<br />
is to be implemented, because it's so complicated.<br />
<br />
Such a situation inevitably leads to low-quality and very buggy software.<br />
<br />
KISS intentionally has the 'stupid' part, because often<br />
'architecture astronauts' as they're known come up with 'super<br />
elegant generic designs' that to them are simple, and most<br />
importantly, elegant. Elegance is nice, but in a real-world<br />
situation, it doesn't defeat KISS. Without the 'stupid' part<br />
in there, some people would claim that elegance and<br />
simplicity are strongly related, and so their 'elegant'<br />
design should be implemented.<br />
<br />
But no, it doesn't matter how elegant it is. If the coder can't<br />
understand exactly how to do it, it's not KISS. A less<br />
elegant design, one that is simple and stupid, should be used instead.<br />
<br />
So that's it I guess: if the implementer finds it very very easy<br />
to do, then it's KISS. If they don't, it's not.<br />
<br />
This can be related back to game rules somewhat. One of the aims<br />
of Wesnoth was to make a game with a pretty good AI.<br />
One of the things I noticed about other games, was that they added<br />
in alot of game rules that their users wanted, which<br />
were very very difficult for the AIs of those games to use or understand.<br />
<br />
So, I decided I'd make a game where the rules were detailed<br />
enough to be fun, but structured in a way that the AI can work with them.<br />
<br />
I think that's the best definition of KISS for game rules that<br />
we will find: if it's very easy to implement, including<br />
making the AI use the rules effectively, then it's KISS.<br />
<br />
This makes most but not all of our current game rules KISS.<br />
In particular, special abilities involving auras<br />
(leadership, healing, illumination) are not currently used at all<br />
effectively by the AI. It might not be so complicated<br />
for the AI to be able to use them though.<br />
<br />
Things like skirmish are very KISS, since the AI immediately<br />
understands how to use it effectively.<br />
<br />
You'll note that originally, when Wesnoth consisted of<br />
no multiplayer, and no campaigns other than Heir to the Throne,<br />
it was structured so the AI would only control units that it can<br />
use effectively: it didn't have access to any aura<br />
effects, while it did have access to things like poison.<br />
<br />
This is the cornerstone of KISS: what is laughably easy for<br />
a programmer to do is going to result in high quality,<br />
bug-free software. What is 'simple' for users, or 'elegant'<br />
for designers, but not easy for a programmer is not going<br />
to result in high quality software.<br />
<br />
David<br />
<br />
<br />
== Wesnoth Philosophy II: Where Next? ==<br />
<br />
I've been asked by Steelp (and others) to write something on<br />
where we plan to take Wesnoth next. So here is my opinion<br />
on where we should take Wesnoth next, as at version 0.8:<br />
<br />
I am now happy with Wesnoth's game rules. I think it is a good,<br />
fun, simple, and addictive game. A game that is fun to play, and challenging.<br />
<br />
I don't think we need any more game rules, or any game rule changes.<br />
The game has met and exceeded most of its original design goals.<br />
<br />
We have met many challenges during Wesnoth development,<br />
but we now have a new challenge: making Wesnoth a polished and<br />
high enough quality product to declare it 1.0, and show it to 'the world at large'.<br />
<br />
I think that we have a very real chance of failing.<br />
That we can continue adding features, debating changes, going<br />
sideways, and end up with a product that is too large, too bloated,<br />
too unstable to make it to 1.0. With a development<br />
team that is too burned out on adding features and debating<br />
insignificant changes to polish and debug the program enough.<br />
<br />
I think we have to accept that version 1.0 need not have<br />
every feature imaginable. That we will in fact have to leave<br />
out good ideas in order to deliver a finished product.<br />
<br />
I want to start moving aggressively toward a version 1.0.<br />
I think the longer we delay, the more developers and users<br />
will become frustrated at slow progress. My feeling is that<br />
the time is now to finish off all engine features, or<br />
decide that they will be left until after 1.0.<br />
<br />
IMO the engine is now feature-complete enough for a 1.0.<br />
It'd be nice to add a few more features, but it has enough<br />
features to ship a 1.0 already. gettext support would be especially nice,<br />
but I don't think it's absolutely necessary.<br />
<br />
I think that I would like to declare a feature freeze sometime<br />
within the next few weeks. Features that are not added<br />
in this time will have to wait until after 1.0. I think we've<br />
been waiting long enough for this already, and I am<br />
unwilling to wait much longer. We have stayed in the very<br />
dangerous '90% done, 10% to go' state for far too long now.<br />
It is time to move toward 1.0.<br />
<br />
To ensure that 1.0 is a stable program, we will take a number of measures.<br />
We will have a fairly long beta-testing period, in which time bugs<br />
will be hunted down and squashed. We will take a more rigorous approach<br />
to squashing every minor bug we can find than previously.<br />
<br />
During this time, campaigns will also be completed,<br />
as will graphics, sound and music. Translations will be finished,<br />
documentation written, and balancing done.<br />
<br />
I will discuss this further with developers, but IMO,<br />
campaigns that are not completed by 1.0 should be removed for the 1.0 release.<br />
1.0 should be an entirely finished product, with no 'loose ends' at all.<br />
<br />
After 1.0, I still don't think that we will have too many<br />
game rule changes. However, I would like to put some effort<br />
into making Wesnoth more flexible, to allow people who want<br />
to make forks to make their own projects.<br />
<br />
Personally, I am mostly committed to getting the project to 1.0 at the moment.<br />
After that, we can decide what will happen next.<br />
<br />
David<br />
<br />
== See Also ==<br />
* [[FrequentlyProposedIdeas]]<br />
* [http://www.wesnoth.org/forum/viewtopic.php?t=441 The History of, and Philosophy behind Wesnoth]<br />
* [http://www.wesnoth.org/forum/viewtopic.php?t=2190 Wesnoth Philosophy II: Where Next?]</div>Db0https://wiki.wesnoth.org/index.php?title=User:Db0&diff=21357User:Db02008-01-31T12:41:37Z<p>Db0: </p>
<hr />
<div>[http://dbzer0.com Personal Haven]<br />
<br />
Admin of the [http://wesnoth.dbzer0.com/blog/ Wesnoth Journals], a Free Wesnoth blog platform and gallery. Discuss it [http://www.wesnoth.org/forum/viewtopic.php?t=19495 here]<br />
<br />
== Current Projects ==<br />
<br />
*Finishing the [[Campaign/Forgotten_Legacy | Forgotten_Legacy]] campaign<br />
*Importing the [[GraphicLibrary]] into the [http://wesnoth.dbzer0.com/blog/wpg2 Unofficial Graphic Library] for better categorization.<br />
<br />
== On Hold ==<br />
* Contributing to the storylines of Legend of Wesmere and Invasion of Arendia.<br />
* Rebalancing the Default Era</div>Db0https://wiki.wesnoth.org/index.php?title=Contrib:Ca%C3%83%C2%A7ada_Selvagem&diff=21353Contrib:Caçada Selvagem2008-01-31T12:19:56Z<p>Db0: Imported to gallery</p>
<hr />
<div>{{Imported to Gallery|8199}}<br />
== Caçada Selvagem ==<br />
<br />
http://exong.net/wesnoth-attach/files/centaur-chieftain.png<br />
http://exong.net/wesnoth-attach/files/centaur-chieftain-attack.png<br />
http://exong.net/wesnoth-attach/files/centaur-chieftain_198.png<br />
http://exong.net/wesnoth-attach/files/centaur-chieftain-hair2.png<br />
http://exong.net/wesnoth-attach/files/centaur-spearman-alt_176.png<br />
http://exong.net/wesnoth-attach/files/elvish_centaur_179.png<br />
http://exong.net/wesnoth-attach/files/centaur_overview_001.png<br />
http://exong.net/wesnoth-attach/files/centaur_overview_002.png</div>Db0https://wiki.wesnoth.org/index.php?title=Template:Imported_to_Gallery&diff=21294Template:Imported to Gallery2008-01-31T09:10:26Z<p>Db0: Fixed url linkage</p>
<hr />
<div>This artist has also been [http://wesnoth.dbzer0.com/blog/wpg2?g2_itemId={{{1}}} Imported] into the unofficial Wesnoth Gallery. If you are the creator of this work and you wish to receive ownership of the album, please contact the [[user:Db0|admin]]</div>Db0https://wiki.wesnoth.org/index.php?title=Template:Imported_to_Gallery&diff=21292Template:Imported to Gallery2008-01-31T08:49:20Z<p>Db0: </p>
<hr />
<div>This artist has also been [{{{1}}} Imported] into the unofficial Wesnoth Gallery. If you are the creator of this work and you wish to receive ownership of the album, please contact the [[user:Db0|admin]]</div>Db0https://wiki.wesnoth.org/index.php?title=Template:Imported_to_Gallery&diff=21291Template:Imported to Gallery2008-01-31T08:48:54Z<p>Db0: </p>
<hr />
<div>This artist has also been {{{1}}} into the unofficial Wesnoth Gallery. If you are the creator of this work and you wish to receive ownership of the album, please contact the [[user:Db0|admin]]</div>Db0https://wiki.wesnoth.org/index.php?title=Template:Imported_to_Gallery&diff=21290Template:Imported to Gallery2008-01-31T08:35:13Z<p>Db0: Created template for imported albums</p>
<hr />
<div>This artist has also been [{{{1}}} imported] into the unofficial Wesnoth Gallery. If you are the creator of this work and you wish to receive ownership of the album, please contact the [[user:Db0|admin]]</div>Db0https://wiki.wesnoth.org/index.php?title=UsefulWMLFragments&diff=21255UsefulWMLFragments2008-01-29T22:31:21Z<p>Db0: </p>
<hr />
<div>{{Needs update}}<br />
<br />
== Useful WML Fragments ==<br />
<br />
NOTES ABOUT ADDING PAGES: try not to add new pages here. Find a category in which your code fits and add it to that page.<br />
<br />
Most of the things found here are macros (see [[PreprocessorRef]]) that must be copied into a scenario file or another file included first by the campaign, and then used in the scenario (or multiplayer map). Remember that a macro cannot be used at a point before it is defined.<br />
<br />
For a step by step instruction, look here: [[HowTo: IncludeMacros]] and then here: [[HowTo: UseMacros]]<br />
<br />
High level macros often require the lower level macros found in ProgrammingMacros, Utilities, and Scenario Tools.<br />
<br />
<br />
=== Logic Structure Macros ===<br />
*[[ProgrammingMacros]]: Definitions for some low-level macros to make it easier to write program-like WML.<br />
*[[WML Utilities]]: Macros to assist other macros. Test Value of Variable. If Have Unit. Store Unit Attribute. Filter by Terrain. Iterate. Overlay with Filter. Determine Opposite Coordinates. <br />
<br />
<br />
=== Campaign Tools ===<br />
*[[WML Scenario Tools]]: Macros directly useful in a scenario. Modify unit. Give villages to a side. Return Unit to Recall List. Trap Unit. Change Keep Terrain. Hero die message. Item effect.<br />
*[[WML Dialog Tools]]: Macros useful for unit dialog/storyboarding. Character Speaker, Blank story section, Delays and Fades.<br />
*[[Victory Conditions]]: Number of Villages, Amount of Gold. Suitable for multiplayer scenarios.<br />
<br />
==== Map Tools ====<br />
*[[A Shop Like Thing]]: How to add even more RPG elements to your scenarios.<br />
*[[Rain effect]]: Creating an overlay of rain in a scenario. (old)<br />
*[[Map Modification WML]] Tools for editing the terrain in creative ways<br />
<br />
==== Unit Tools ====<br />
*[[MoveExistingUnit]]: Move a unit from one place to another, displaying its movement. Move Unit 1. Move Unit 2. Move Unit 3.<br />
*[[WML Abilities]]: Knockback. Charm. Bloodlust. Abilities cannot currently be incorporated in the unit type definitions themselves, but must be included in the scenario file.<br />
*[[WML Buildings]]: Generic Buildings, Light House/Dark Tower, Wishing Well #1, Wishing Well #2.<br />
*[[RandomTraitUnit]]: Create a unit with two random traits. (very simple.) (updated)<br />
<br />
==== Item Tools ====<br />
*[[DroppableItem]]: Macros to drop items. Currently only macros for dropping items on unit death including a permenant item that can be picked up, and dropped, multiple times by different units.<br />
*[[General Item WML]]<br />
<br />
<br />
=== Multiplayer Tools ===<br />
*[[PseudoRandom]]: A replacement for {RANDOM} in multiplayer, where {RANDOM} is buggy.<br />
*[[General Multiplayer WML]]<br />
<br />
<br />
=== Advanced WML ===<br />
*[[Advanced WML]]: Branch on Village Type. Recruit from a Ship. Point Rotation Scheme.<br />
<br />
<br />
=== Templates ===<br />
*[[WML Templates]]: Generic campaign, scenario and unit templates. (updated)<br />
<br />
== See Also ==<br />
<br />
* [[ReferenceWML]]<br />
<br />
<br />
[[Category: UsefulWMLFragments]]</div>Db0https://wiki.wesnoth.org/index.php?title=Campaign/Forgotten_Legacy&diff=21243Campaign/Forgotten Legacy2008-01-29T17:30:03Z<p>Db0: /* Custom Units */</p>
<hr />
<div>== Forgotten Legacy ==<br />
<br />
This is the Forgotten Legacy campaign wiki, a try to see how well collaborative campaign creation works. You can edit any scenario you wish and fix typing or WML errors or even contribute to the dialogues in order to make them more immersive.<br />
Please check the discussion page of each scenario to see its story and anything that still need to be designed for it.<br />
<br />
;Spoiler Warning<br />
Be aware that this is a complete spoiler. If you wish to contribute adequately you'll have no choice but to see the storyline.<br />
<br />
<br />
Here's what you can edit right now<br />
=== Scenarios ===<br />
*1. [[Campaign/Forgotten_Legacy/Out_Of_The_Swamps | Out of the Swamps]]<br />
*2. [[Campaign/Forgotten_Legacy/Unexpected_Allies | Unexpected Allies]]<br />
*3. [[Campaign/Forgotten_Legacy/The_Bitter_Swamp | The Bitter Swamp]]<br />
*4. [[Campaign/Forgotten_Legacy/The Great River | The Great River]]<br />
<br />
=== Scenario Related Files ===<br />
<br />
* [[Campaign/Forgotten_Legacy/Deaths | Deaths]]<br />
* [[Campaign/Forgotten_Legacy/Story | Story]]<br />
<br />
=== Custom Units ===<br />
(Some of these need a lot of editing to bring them up to date with the changes of 1.4. Any and all help appreciated)<br />
<br />
* [[Campaign/Forgotten_Legacy/Saurian_Brave | Saurian Brave]]<br />
** [[Campaign/Forgotten_Legacy/Saurian_Warrior | Saurian Warrior]]<br />
*** [[Campaign/Forgotten_Legacy/Saurian_Stalker | Saurian Stalker]]<br />
** [[Campaign/Forgotten_Legacy/Saurian_Headhunter | Saurian Headhunter]]<br />
*** [[Campaign/Forgotten_Legacy/Headhunter_Champion | Headhunter Champion]]<br />
<br />
* [[Campaign/Forgotten_Legacy/Witch_Doctor | Witch Doctor]]<br />
** [[Campaign/Forgotten_Legacy/Soothsayer | Soothsayer]]<br />
** [[Campaign/Forgotten_Legacy/Swamp_Alchemist | Swamp Alchemist]]<br />
*** [[Campaign/Forgotten_Legacy/Swamp_Lord | Swamp Lord]]<br />
<br />
* [[Campaign/Forgotten_Legacy/Skald | Skald]]<br />
** [[Campaign/Forgotten_Legacy/Skald_Hunter | Skald Hunter]]<br />
*** [[Campaign/Forgotten_Legacy/Skald Chieftain | Skald Chieftain (Ikmass)]]<br />
** [[Campaign/Forgotten_Legacy/Skald_Maniac | Skald Maniac]]<br />
<br />
* [[Campaign/Forgotten_Legacy/Bloodborn | Bloodborn]]<br />
** [[Campaign/Forgotten_Legacy/Bloodborn _Chieftain| Bloodborn Chieftain]]<br />
*** [[Campaign/Forgotten_Legacy/The Blood Chosen | The Blood Chosen]]<br />
<br />
=== Custom Utilities and Macros ===<br />
<br />
* [[Campaign/Forgotten_Legacy/Unit_Utils | Unit Utils]]<br />
* [[Campaign/Forgotten_Legacy/Items | Items]]<br />
* [[Campaign/Forgotten_Legacy/General_Utils | General Utils]]</div>Db0https://wiki.wesnoth.org/index.php?title=Campaign/Forgotten_Legacy/The_Blood_Chosen&diff=21242Campaign/Forgotten Legacy/The Blood Chosen2008-01-29T17:28:54Z<p>Db0: </p>
<hr />
<div><pre><br />
<br />
#textdomain wesnoth-Forgotten_Legacy<br />
<br />
[unit]<br />
<br />
id=Bloodchosen<br />
<br />
name= _ "The Blood Chosen"<br />
<br />
race=lizard<br />
<br />
image=bloodchosen.png<br />
<br />
hitpoints=50<br />
<br />
movement_type=lizard<br />
<br />
movement=7<br />
<br />
experience=500<br />
<br />
level=3<br />
<br />
alignment=chaotic<br />
<br />
advanceto=null<br />
<br />
cost=400<br />
<br />
usage=fighter<br />
<br />
unit_description= _ "When a bloodborn chief manages to subdue many other saurian tribes, the saurians proclaim him The Blood Chosen. He has proven himself the undisputed leader of the saurian race, and under his rule they will prosper.<br />
<br />
<br />
<br />
"+{SPECIAL_NOTES_SKIRMISHER}+{SPECIAL_NOTES_LEADERSHIP}<br />
<br />
<br />
<br />
die_sound=hiss-die.wav<br />
<br />
{DEFENSE_ANIM "Saurian_Brave/bloodchosen.png" "bloodchosen.png" hiss.wav }<br />
<br />
[abilities]<br />
<br />
{ABILITY_SKIRMISHER}<br />
<br />
{ABILITY_LEADERSHIP_LEVEL_3}<br />
<br />
[/abilities]<br />
<br />
[attack]<br />
<br />
name=pole-axe<br />
<br />
description=_"pole-axe"<br />
<br />
type=blade<br />
<br />
damage=12<br />
<br />
number=4<br />
<br />
icon=attacks/axe.png<br />
<br />
[/attack]<br />
<br />
[attack]<br />
<br />
name=bite<br />
<br />
description=_"poison bite"<br />
<br />
type=pierce<br />
<br />
range=melee<br />
<br />
icon=attacks/fangs.png<br />
<br />
damage=18<br />
<br />
number=1<br />
<br />
special=poison<br />
<br />
[/attack]<br />
<br />
[attack_anim]<br />
<br />
[attack_filter]<br />
<br />
name=pole-axe<br />
<br />
range=melee<br />
<br />
[/attack_filter]<br />
<br />
[frame]<br />
<br />
begin=-150<br />
<br />
end=-100<br />
<br />
image="bloodchosen.png"<br />
<br />
[/frame]<br />
<br />
[if]<br />
<br />
hits=no<br />
<br />
[frame]<br />
<br />
sound=spear-miss.ogg<br />
<br />
begin=-100<br />
<br />
end=50<br />
<br />
image="bloodchosen.png"<br />
<br />
[/frame]<br />
<br />
[/if]<br />
<br />
[else]<br />
<br />
hits=yes<br />
<br />
[frame]<br />
<br />
sound=axe.ogg<br />
<br />
begin=-100<br />
<br />
end=50<br />
<br />
image="bloodchosen.png"<br />
<br />
[/frame]<br />
<br />
[/else]<br />
<br />
[frame]<br />
<br />
begin=50<br />
<br />
end=100<br />
<br />
image="bloodchosen.png"<br />
<br />
[/frame]<br />
<br />
[/attack_anim]<br />
<br />
[attack_anim]<br />
<br />
[attack_filter]<br />
<br />
name=bite<br />
<br />
range=melee<br />
<br />
[/attack_filter]<br />
<br />
[frame]<br />
<br />
begin=-150<br />
<br />
end=-100<br />
<br />
image="bloodchosen.png"<br />
<br />
[/frame]<br />
<br />
[if]<br />
<br />
hits=no<br />
<br />
[frame]<br />
<br />
begin=-100<br />
<br />
end=50<br />
<br />
image="bloodchosen.png"<br />
<br />
sound={SOUND_LIST:MISS}<br />
<br />
[/frame]<br />
<br />
[/if]<br />
<br />
[else]<br />
<br />
hits=yes<br />
<br />
[frame]<br />
<br />
sound=bite.ogg<br />
<br />
begin=-100<br />
<br />
end=50<br />
<br />
image="bloodchosen.png"<br />
<br />
[/frame]<br />
<br />
[/else]<br />
<br />
[frame]<br />
<br />
begin=50<br />
<br />
end=100<br />
<br />
image="bloodchosen.png"<br />
<br />
[/frame]<br />
<br />
[/attack_anim]<br />
<br />
[/unit]<br />
</pre></div>Db0https://wiki.wesnoth.org/index.php?title=Campaign/Forgotten_Legacy/The_Blood_Chosen&diff=21241Campaign/Forgotten Legacy/The Blood Chosen2008-01-29T17:28:33Z<p>Db0: Updated unit with recent changes</p>
<hr />
<div><pre><br />
#textdomain wesnoth-Forgotten_Legacy<br />
<br />
[unit]<br />
<br />
id=Bloodchosen<br />
<br />
name= _ "The Blood Chosen"<br />
<br />
race=lizard<br />
<br />
image=bloodchosen.png<br />
<br />
hitpoints=50<br />
<br />
movement_type=lizard<br />
<br />
movement=7<br />
<br />
experience=500<br />
<br />
level=3<br />
<br />
alignment=chaotic<br />
<br />
advanceto=null<br />
<br />
cost=400<br />
<br />
usage=fighter<br />
<br />
unit_description= _ "When a bloodborn chief manages to subdue many other saurian tribes, the saurians proclaim him The Blood Chosen. He has proven himself the undisputed leader of the saurian race, and under his rule they will prosper.<br />
<br />
<br />
<br />
"+{SPECIAL_NOTES_SKIRMISHER}+{SPECIAL_NOTES_LEADERSHIP}<br />
<br />
<br />
<br />
die_sound=hiss-die.wav<br />
<br />
{DEFENSE_ANIM "Saurian_Brave/bloodchosen.png" "bloodchosen.png" hiss.wav }<br />
<br />
[abilities]<br />
<br />
{ABILITY_SKIRMISHER}<br />
<br />
{ABILITY_LEADERSHIP_LEVEL_3}<br />
<br />
[/abilities]<br />
<br />
[attack]<br />
<br />
name=pole-axe<br />
<br />
description=_"pole-axe"<br />
<br />
type=blade<br />
<br />
damage=12<br />
<br />
number=4<br />
<br />
icon=attacks/axe.png<br />
<br />
[/attack]<br />
<br />
[attack]<br />
<br />
name=bite<br />
<br />
description=_"poison bite"<br />
<br />
type=pierce<br />
<br />
range=melee<br />
<br />
icon=attacks/fangs.png<br />
<br />
damage=18<br />
<br />
number=1<br />
<br />
special=poison<br />
<br />
[/attack]<br />
<br />
[attack_anim]<br />
<br />
[attack_filter]<br />
<br />
name=pole-axe<br />
<br />
range=melee<br />
<br />
[/attack_filter]<br />
<br />
[frame]<br />
<br />
begin=-150<br />
<br />
end=-100<br />
<br />
image="bloodchosen.png"<br />
<br />
[/frame]<br />
<br />
[if]<br />
<br />
hits=no<br />
<br />
[frame]<br />
<br />
sound=spear-miss.ogg<br />
<br />
begin=-100<br />
<br />
end=50<br />
<br />
image="bloodchosen.png"<br />
<br />
[/frame]<br />
<br />
[/if]<br />
<br />
[else]<br />
<br />
hits=yes<br />
<br />
[frame]<br />
<br />
sound=axe.ogg<br />
<br />
begin=-100<br />
<br />
end=50<br />
<br />
image="bloodchosen.png"<br />
<br />
[/frame]<br />
<br />
[/else]<br />
<br />
[frame]<br />
<br />
begin=50<br />
<br />
end=100<br />
<br />
image="bloodchosen.png"<br />
<br />
[/frame]<br />
<br />
[/attack_anim]<br />
<br />
[attack_anim]<br />
<br />
[attack_filter]<br />
<br />
name=bite<br />
<br />
range=melee<br />
<br />
[/attack_filter]<br />
<br />
[frame]<br />
<br />
begin=-150<br />
<br />
end=-100<br />
<br />
image="bloodchosen.png"<br />
<br />
[/frame]<br />
<br />
[if]<br />
<br />
hits=no<br />
<br />
[frame]<br />
<br />
begin=-100<br />
<br />
end=50<br />
<br />
image="bloodchosen.png"<br />
<br />
sound={SOUND_LIST:MISS}<br />
<br />
[/frame]<br />
<br />
[/if]<br />
<br />
[else]<br />
<br />
hits=yes<br />
<br />
[frame]<br />
<br />
sound=bite.ogg<br />
<br />
begin=-100<br />
<br />
end=50<br />
<br />
image="bloodchosen.png"<br />
<br />
[/frame]<br />
<br />
[/else]<br />
<br />
[frame]<br />
<br />
begin=50<br />
<br />
end=100<br />
<br />
image="bloodchosen.png"<br />
<br />
[/frame]<br />
<br />
[/attack_anim]<br />
<br />
[/unit]<br />
<br />
</pre></div>Db0https://wiki.wesnoth.org/index.php?title=Campaign/Forgotten_Legacy/Bloodborn_Chieftain&diff=21240Campaign/Forgotten Legacy/Bloodborn Chieftain2008-01-29T17:27:53Z<p>Db0: Updated unit with recent changes</p>
<hr />
<div><pre><br />
#textdomain wesnoth-Forgotten_Legacy<br />
[unit]<br />
id=Bloodborn Chieftain<br />
name= _ "Bloodborn Chieftain"<br />
race=lizard<br />
image=bloodborn-chief.png<br />
hitpoints=40<br />
movement_type=lizard<br />
movement=7<br />
experience=90<br />
level=2<br />
alignment=chaotic<br />
advanceto=Bloodchosen<br />
cost=140<br />
usage=fighter<br />
unit_description= _ "When Bloodborns have proved themselves in battle the tribe will give them one last test; They must hunt down the old chief and kill him bare-handed as a sign of prowess. If they make it out alive, they become the tribe's new chief. Tribes led by bloodborn are always the most powerful and influential.<br />
<br />
"+{SPECIAL_NOTES_SKIRMISHER}+{SPECIAL_NOTES_LEADERSHIP}<br />
<br />
die_sound=hiss-die.wav<br />
{DEFENSE_ANIM "Saurian_Brave/bloodborn-chief.png" "bloodborn-chief.png" hiss.wav }<br />
[abilities]<br />
{ABILITY_SKIRMISHER}<br />
{ABILITY_LEADERSHIP_LEVEL_2}<br />
[/abilities]<br />
[attack]<br />
name=pole-axe<br />
description=_"pole-axe"<br />
range=melee<br />
type=blade<br />
damage=8<br />
number=4<br />
icon=attacks/axe.png<br />
[/attack]<br />
[attack]<br />
name=bite<br />
description=_"poison bite"<br />
range=melee<br />
icon=attacks/fangs.png<br />
damage=13<br />
number=1<br />
special=poison<br />
[/attack]<br />
[attack_anim]<br />
[attack_filter]<br />
name=pole-axe<br />
range=melee<br />
[/attack_filter]<br />
[frame]<br />
begin=-150<br />
end=-100<br />
image="bloodborn-chief.png"<br />
[/frame]<br />
[if]<br />
hits=no<br />
[frame]<br />
sound=spear-miss.ogg<br />
begin=-100<br />
end=50<br />
image="bloodborn-chief.png"<br />
[/frame]<br />
[/if]<br />
[else]<br />
hits=yes<br />
[frame]<br />
sound=axe.ogg<br />
begin=-100<br />
end=50<br />
image="bloodborn-chief.png"<br />
[/frame]<br />
[/else]<br />
[frame]<br />
begin=50<br />
end=100<br />
image="bloodborn-chief.png"<br />
[/frame]<br />
[/attack_anim]<br />
[attack_anim]<br />
[attack_filter]<br />
name=bite<br />
range=melee<br />
[/attack_filter]<br />
[frame]<br />
begin=-150<br />
end=-100<br />
image="bloodborn-chief.png"<br />
[/frame]<br />
[if]<br />
hits=no<br />
[frame]<br />
begin=-100<br />
end=50<br />
image="bloodborn-chief.png"<br />
sound={SOUND_LIST:MISS}<br />
[/frame]<br />
[/if]<br />
[else]<br />
hits=yes<br />
[frame]<br />
sound=bite.ogg<br />
begin=-100<br />
end=50<br />
image="bloodborn-chief.png"<br />
[/frame]<br />
[/else]<br />
[frame]<br />
begin=50<br />
end=100<br />
image="bloodborn-chief.png"<br />
[/frame]<br />
[/attack_anim]<br />
[/unit]<br />
</pre></div>Db0https://wiki.wesnoth.org/index.php?title=Campaign/Forgotten_Legacy/Bloodborn&diff=21239Campaign/Forgotten Legacy/Bloodborn2008-01-29T17:26:40Z<p>Db0: Updated unit with recent changes</p>
<hr />
<div><pre><br />
#textdomain wesnoth-Forgotten_Legacy<br />
<br />
[unit]<br />
<br />
id=Bloodborn<br />
<br />
name= _ "Bloodborn"<br />
<br />
race=lizard<br />
<br />
image=bloodborn.png<br />
<br />
hitpoints=40<br />
<br />
movement_type=lizard<br />
<br />
movement=7<br />
<br />
experience=50<br />
<br />
level=1<br />
<br />
alignment=chaotic<br />
<br />
advanceto=Bloodborn Chieftain<br />
<br />
cost=40<br />
<br />
usage=fighter<br />
<br />
unit_description= _ "Bloodborns are considered by the saurians as the sign of a natural leader. The name comes from the way they come out of their womb. They eat though it, killing their mother in the process. Considering that saurians are born in eggs, this is a big difference.<br />
<br />
Bloodborns are very violent and demanding but also respected and feared by the rest of the tribe. Their bite is always poisonous but they prefer to enter battle with the nastiest weapon they can find.<br />
<br />
<br />
<br />
"+{SPECIAL_NOTES_SKIRMISHER}<br />
<br />
<br />
<br />
die_sound=hiss-die.wav<br />
<br />
{DEFENSE_ANIM "Saurian_Brave/bloodborn.png" "bloodborn.png" hiss.wav }<br />
<br />
[abilities]<br />
<br />
{ABILITY_SKIRMISHER}<br />
<br />
[/abilities]<br />
<br />
[attack]<br />
<br />
name=pole-axe<br />
<br />
description=_"pole-axe"<br />
<br />
range=melee<br />
<br />
type=blade<br />
<br />
damage=7<br />
<br />
number=3<br />
<br />
icon=attacks/axe.png<br />
<br />
[/attack]<br />
<br />
[attack]<br />
<br />
name=bite<br />
<br />
description=_"poison bite"<br />
<br />
type=pierce<br />
<br />
range=melee<br />
<br />
icon=attacks/fangs.png<br />
<br />
damage=10<br />
<br />
number=1<br />
<br />
special=poison<br />
<br />
[/attack]<br />
<br />
[attack_anim]<br />
<br />
[attack_filter]<br />
<br />
name=pole-axe<br />
<br />
range=melee<br />
<br />
[/attack_filter]<br />
<br />
[frame]<br />
<br />
begin=-150<br />
<br />
end=-100<br />
<br />
image="bloodborn.png"<br />
<br />
[/frame]<br />
<br />
[if]<br />
<br />
hits=no<br />
<br />
[frame]<br />
<br />
sound=spear-miss.ogg<br />
<br />
begin=-100<br />
<br />
end=50<br />
<br />
image="bloodborn.png"<br />
<br />
[/frame]<br />
<br />
[/if]<br />
<br />
[else]<br />
<br />
hits=yes<br />
<br />
[frame]<br />
<br />
sound=axe.ogg<br />
<br />
begin=-100<br />
<br />
end=50<br />
<br />
image="bloodborn.png"<br />
<br />
[/frame]<br />
<br />
[/else]<br />
<br />
[frame]<br />
<br />
begin=50<br />
<br />
end=100<br />
<br />
image="bloodborn.png"<br />
<br />
[/frame]<br />
<br />
[/attack_anim]<br />
<br />
[attack_anim]<br />
<br />
[attack_filter]<br />
<br />
name=bite<br />
<br />
range=melee<br />
<br />
[/attack_filter]<br />
<br />
[frame]<br />
<br />
begin=-150<br />
<br />
end=-100<br />
<br />
image="bloodborn.png"<br />
<br />
[/frame]<br />
<br />
[if]<br />
<br />
hits=no<br />
<br />
[frame]<br />
<br />
begin=-100<br />
<br />
end=50<br />
<br />
image="bloodborn.png"<br />
<br />
sound={SOUND_LIST:MISS}<br />
<br />
[/frame]<br />
<br />
[/if]<br />
<br />
[else]<br />
<br />
hits=yes<br />
<br />
[frame]<br />
<br />
sound=bite.ogg<br />
<br />
begin=-100<br />
<br />
end=50<br />
<br />
image="bloodborn.png"<br />
<br />
[/frame]<br />
<br />
[/else]<br />
<br />
[frame]<br />
<br />
begin=50<br />
<br />
end=100<br />
<br />
image="bloodborn.png"<br />
<br />
[/frame]<br />
<br />
[/attack_anim]<br />
<br />
[/unit]<br />
</pre></div>Db0https://wiki.wesnoth.org/index.php?title=Campaign/Forgotten_Legacy/Witch_Doctor&diff=21238Campaign/Forgotten Legacy/Witch Doctor2008-01-29T17:25:47Z<p>Db0: Updated unit with recent changes</p>
<hr />
<div><pre><br />
#textdomain wesnoth-Forgotten_Legacy<br />
[unit]<br />
id=Witch Doctor<br />
name= _ "Witch Doctor"<br />
race=lizard<br />
image="Witch_Doctor/witch-doctor.png"<br />
image_defensive="Witch_Doctor/witch-doctor-defend.png"<br />
image_healing="Witch_Doctor/witch-doctor-ranged1.png"<br />
hitpoints=18<br />
movement_type=lizard<br />
movement=6<br />
experience=26<br />
level=1<br />
alignment=chaotic<br />
advanceto=Swamp Alchemist,Soothsayer<br />
undead_variation=saurian<br />
cost=16<br />
usage=healer<br />
unit_description= _ "Despite their lethargic cold blooded heritage, and their relative frailty, Witch doctors are nevertheless valued in the battlefield for the aid they provide to wounded allies as well as feared for their ability to turn normal swamp water to a dreaded acid. Every saurian tribe has at least one witch doctor who is revered and protected.<br />
<br />
Special Notes: Due to the quantity of the acid attack it has a great chance to hit it's target. However it cannot reach far and the witch doctor is subject to reprisal."+{SPECIAL_NOTES}+{SPECIAL_NOTES_MAGICAL}+{SPECIAL_NOTES_HEALS}<br />
<br />
die_sound=hiss-die.wav<br />
{DEFENSE_ANIM "units/saurians/Witch_Doctor/witch-doctor-defend.png" "units/saurians/witch-doctor.png" hiss-hit.wav } <br />
[abilities]<br />
{ABILITY_HEALS}<br />
[/abilities]<br />
[attack]<br />
name=acid-spray<br />
description=_"acid spray"<br />
type=fire<br />
range=melee<br />
damage=7<br />
number=3<br />
special=magical<br />
icon=misc/acidspray.png<br />
[/attack]<br />
[attack_anim]<br />
<br />
[attack_filter]<br />
<br />
name=acid-spray<br />
<br />
range=melee<br />
<br />
[/attack_filter]<br />
<br />
[frame]<br />
<br />
begin=-250<br />
<br />
end=-150<br />
<br />
image="Witch_Doctor/witch-doctor-ranged2.png"<br />
<br />
[/frame]<br />
<br />
[if]<br />
<br />
hits=no<br />
<br />
[frame]<br />
<br />
sound=squisy-miss.wav<br />
<br />
begin=-150<br />
<br />
end=50<br />
<br />
image="Witch_Doctor/witch-doctor-ranged3-acid.png"<br />
<br />
[/frame]<br />
<br />
[/if]<br />
<br />
[else]<br />
<br />
hits=yes<br />
<br />
[frame]<br />
<br />
sound=squisy-hit.wav<br />
<br />
begin=-150<br />
<br />
end=50<br />
<br />
image="Witch_Doctor/witch-doctor-ranged3-acid.png"<br />
<br />
[/frame]<br />
<br />
[/else]<br />
<br />
[frame]<br />
<br />
begin=50<br />
<br />
end=150<br />
<br />
image="Witch_Doctor/witch-doctor-ranged2.png"<br />
<br />
[/frame]<br />
<br />
[/attack_anim]<br />
<br />
[/unit]<br />
</pre></div>Db0https://wiki.wesnoth.org/index.php?title=Campaign/Forgotten_Legacy/Saurian_Stalker&diff=21237Campaign/Forgotten Legacy/Saurian Stalker2008-01-29T17:25:08Z<p>Db0: Updated unit with recent changes</p>
<hr />
<div><pre><br />
#textdomain wesnoth-Forgotten_Legacy<br />
<br />
[unit]<br />
<br />
id=Saurian Stalker<br />
<br />
name= _ "Saurian Stalker"<br />
<br />
race=lizard<br />
<br />
image="units/saurians/flanker.png"<br />
<br />
hitpoints=43<br />
<br />
movement_type=lizard<br />
<br />
movement=7<br />
<br />
experience=80<br />
<br />
level=3<br />
<br />
alignment=chaotic<br />
<br />
advanceto=null<br />
<br />
{AMLA_TOUGH 4}<br />
<br />
undead_variation=saurian<br />
<br />
cost=45<br />
<br />
usage=scout<br />
<br />
unit_description= _ "The Stalkers are a unit who's name brings chills down on every Spellcasters' spine. Passing like the wind among opponents they find the least defended target and prove to him once and for all, that you can run but you can't hide.<br />
<br />
<br />
<br />
"+{SPECIAL_NOTES_SKIRMISHER}<br />
<br />
<br />
<br />
die_sound=hiss-die.wav<br />
<br />
{DEFENSE_ANIM "units/saurians/flanker-defend.png" "units/saurians/flanker.png" hiss-hit.wav }<br />
<br />
[abilities]<br />
<br />
{ABILITY_SKIRMISHER}<br />
<br />
[/abilities]<br />
<br />
[attack]<br />
<br />
name=spear<br />
<br />
description=_"spear"<br />
<br />
range=melee<br />
<br />
type=pierce<br />
<br />
damage=7<br />
<br />
number=4<br />
<br />
icon=attacks/spear.png<br />
<br />
special=backstab<br />
<br />
[/attack]<br />
<br />
[attack]<br />
<br />
name=spear<br />
<br />
description=_"spear throw"<br />
<br />
range=ranged<br />
<br />
type=pierce<br />
<br />
damage=8<br />
<br />
number=2<br />
<br />
icon=attacks/spear.png<br />
<br />
[/attack]<br />
<br />
[attack_anim]<br />
[attack_filter]<br />
name=spear<br />
range=ranged<br />
[/attack_filter]<br />
[missile_frame]<br />
begin=-150<br />
end=0<br />
image="projectiles/spear-n.png"<br />
image_diagonal="projectiles/spear-ne.png"<br />
[/missile_frame]<br />
[frame]<br />
begin=-225<br />
end=-200<br />
image="units/saurians/flanker-attack-ranged-1.png"<br />
[/frame]<br />
[frame]<br />
begin=-200<br />
end=-150<br />
image="units/saurians/flanker-attack-ranged-2.png"<br />
sound={SOUND_LIST:THROW}<br />
[/frame]<br />
[frame]<br />
begin=-150<br />
end=-100<br />
image="units/saurians/flanker-attack-ranged-3.png"<br />
[/frame]<br />
[if]<br />
hits=yes<br />
[frame]<br />
begin=-100<br />
end=0<br />
sound=spear.ogg<br />
image="units/saurians/flanker-attack-ranged-4.png"<br />
[/frame]<br />
[/if]<br />
[else]<br />
hits=no<br />
[frame]<br />
begin=-100<br />
end=0<br />
image="units/saurians/flanker-attack-ranged-4.png"<br />
[/frame]<br />
[/else]<br />
[frame]<br />
begin=0<br />
end=50<br />
image="units/saurians/flanker-attack1.png"<br />
[/frame]<br />
[/attack_anim]<br />
[attack_anim]<br />
[attack_filter]<br />
name=spear<br />
range=melee<br />
[/attack_filter]<br />
[frame]<br />
begin=-150<br />
end=-100<br />
image="units/saurians/flanker-attack1.png"<br />
[/frame]<br />
[if]<br />
hits=yes<br />
[frame]<br />
sound=spear.ogg<br />
begin=-100<br />
end=50<br />
image="units/saurians/flanker-attack2.png"<br />
[/frame]<br />
[/if]<br />
[else]<br />
hits=no<br />
[frame]<br />
sound=spear-miss.ogg<br />
begin=-100<br />
end=50<br />
image="units/saurians/flanker-attack2.png"<br />
[/frame]<br />
[/else]<br />
[frame]<br />
begin=50<br />
end=125<br />
image="units/saurians/flanker-attack1.png"<br />
[/frame]<br />
[frame]<br />
begin=125<br />
end=200<br />
image="units/saurians/flanker.png"<br />
[/frame]<br />
[/attack_anim]<br />
<br />
[/unit]<br />
<br />
</pre></div>Db0https://wiki.wesnoth.org/index.php?title=Campaign/Forgotten_Legacy/Saurian_Warrior&diff=21236Campaign/Forgotten Legacy/Saurian Warrior2008-01-29T17:24:10Z<p>Db0: Updated unit with recent changes</p>
<hr />
<div><pre><br />
#textdomain wesnoth-Forgotten_Legacy<br />
<br />
[unit]<br />
<br />
id=Saurian Warrior alt<br />
<br />
name= _ "Saurian Warrior"<br />
<br />
race=lizard<br />
<br />
image="units/saurians/ambusher.png"<br />
<br />
profile=portraits/saurian-ambusher.png<br />
<br />
hitpoints=32<br />
<br />
movement_type=lizard<br />
<br />
movement=7<br />
<br />
experience=60<br />
<br />
level=2<br />
<br />
alignment=chaotic<br />
<br />
advanceto=Saurian Stalker<br />
<br />
undead_variation=saurian<br />
<br />
cost=28<br />
<br />
usage=scout<br />
<br />
unit_description= _ "The warriors of the saurians are not what most opponents are used to fight, but they are effective nonetheless. Many an tired opponent has thought to retreat from the battlefield only to find a saurian waiting for him to let his guard down. A Warrior who has seen many battles has the knowledge to become a stalker.<br />
<br />
<br />
<br />
"+{SPECIAL_NOTES_SKIRMISHER}<br />
<br />
<br />
<br />
die_sound=hiss-die.wav<br />
<br />
{DEFENSE_ANIM "units/saurians/ambusher-defend.png" "units/saurians/ambusher.png" hiss-hit.wav }<br />
<br />
[abilities]<br />
<br />
{ABILITY_SKIRMISHER}<br />
<br />
[/abilities]<br />
<br />
[attack]<br />
<br />
name=spear<br />
<br />
description=_"spear"<br />
<br />
range=melee<br />
<br />
type=pierce<br />
<br />
damage=6<br />
<br />
number=4<br />
<br />
icon=attacks/spear.png<br />
<br />
[/attack]<br />
<br />
[attack]<br />
<br />
name=spear<br />
<br />
description=_"spear throw"<br />
<br />
range=ranged<br />
<br />
type=pierce<br />
<br />
damage=6<br />
<br />
number=2<br />
<br />
icon=attacks/spear.png<br />
<br />
[/attack]<br />
<br />
[attack_anim]<br />
[attack_filter]<br />
name=spear<br />
range=ranged<br />
[/attack_filter]<br />
[missile_frame]<br />
begin=-150<br />
end=0<br />
image="projectiles/spear-n.png"<br />
image_diagonal="projectiles/spear-ne.png"<br />
[/missile_frame]<br />
[frame]<br />
begin=-225<br />
end=-175<br />
image="units/saurians/ambusher-ranged-1.png"<br />
[/frame]<br />
[frame]<br />
begin=-175<br />
end=-100<br />
image="units/saurians/ambusher-ranged-2.png"<br />
sound={SOUND_LIST:THROW}<br />
[/frame]<br />
[if]<br />
hits=yes<br />
[frame]<br />
sound=spear.ogg<br />
begin=-100<br />
end=0<br />
image="units/saurians/ambusher-ranged-3.png"<br />
[/frame]<br />
[/if]<br />
[else]<br />
hits=no<br />
[frame]<br />
begin=-100<br />
end=0<br />
image="units/saurians/ambusher-ranged-3.png"<br />
[/frame]<br />
[/else]<br />
[frame]<br />
begin=0<br />
end=50<br />
image="units/saurians/ambusher-attack1.png"<br />
[/frame]<br />
[/attack_anim]<br />
[attack_anim]<br />
[attack_filter]<br />
name=spear<br />
range=melee<br />
[/attack_filter]<br />
[frame]<br />
begin=-150<br />
end=-100<br />
image="units/saurians/ambusher-attack1.png"<br />
[/frame]<br />
[if]<br />
hits=yes<br />
[frame]<br />
begin=-100<br />
end=50<br />
image="units/saurians/ambusher-attack2.png"<br />
sound=spear.ogg<br />
[/frame]<br />
[/if]<br />
[else]<br />
hits=no<br />
[frame]<br />
begin=-100<br />
end=50<br />
image="units/saurians/ambusher-attack2.png"<br />
sound=spear-miss.ogg<br />
[/frame]<br />
[/else]<br />
[frame]<br />
begin=50<br />
end=150<br />
image="units/saurians/ambusher-attack1.png"<br />
[/frame]<br />
[frame]<br />
begin=150<br />
end=200<br />
image="units/saurians/ambusher.png"<br />
[/frame]<br />
[/attack_anim]<br />
<br />
[/unit]<br />
<br />
</pre></div>Db0https://wiki.wesnoth.org/index.php?title=Campaign/Forgotten_Legacy/Out_Of_The_Swamps&diff=21235Campaign/Forgotten Legacy/Out Of The Swamps2008-01-29T17:21:08Z<p>Db0: Updated scenario with recent changes</p>
<hr />
<div><pre><br />
[scenario]<br />
id="Out_Of_The_Swamps"<br />
name= _ "Out of the Swamps"<br />
# next_scenario="Unexpected_Allies"<br />
<br />
{FL_MAP Out_Of_The_Swamps.map}<br />
<br />
{DEFAULT_SCHEDULE}<br />
<br />
{DEFAULT_MUSIC_PLAYLIST}<br />
<br />
{TURNS 20 16 13}<br />
<br />
# Scenario Introduction<br />
<br />
{INTRO_OUT_OF_THE_SWAMPS}<br />
<br />
# The Saurians<br />
<br />
[side]<br />
side=1 <br />
type=Bloodborn<br />
description=S'Saskin the Bloodborn<br />
user_description= _ "S'Saskin the Bloodborn"<br />
unrenamable=yes<br />
{IS_HERO}<br />
<br />
controller=human<br />
team_name=Reptiles<br />
<br />
canrecruit=1<br />
recruit=Saurian Brave<br />
<br />
{GOLD 135 110 80}<br />
[/side]<br />
<br />
# The Blackblood clan<br />
<br />
[side]<br />
side=2<br />
type=Orcish Grunt<br />
description=Kraglow<br />
<br />
canrecruit=1<br />
#ifdef EASY<br />
recruit=Orcish Grunt<br />
#endif<br />
<br />
#ifdef NORMAL<br />
recruit=Wolf Rider,Orcish Grunt<br />
#endif<br />
<br />
#ifdef HARD<br />
recruit=Wolf Rider,Orcish Grunt,Orcish Archer<br />
#endif<br />
<br />
[ai]<br />
#ifdef EASY<br />
recruitment_pattern=fighter<br />
#endif<br />
#ifdef MEDIUM<br />
recruitment_pattern=fighter,scout<br />
#endif<br />
#ifdef HARD<br />
recruitment_pattern=fighter,scout,archer<br />
#endif<br />
villages_per_scout=6<br />
[/ai]<br />
{GOLD 100 135 170}<br />
[/side]<br />
<br />
[event]<br />
name=prestart<br />
[set_variable]<br />
name=village_visited<br />
value=no<br />
[/set_variable]<br />
[/event]<br />
<br />
# Scenario Start<br />
<br />
[event]<br />
name=start<br />
[message]<br />
speaker=narrator<br />
message= _ "Due to the coming of the clan wars, the orc guard at the Salty Swamp has been thinned considerably in the last few weeks. S'Saskin took this chance to stockpile new weapons for the events to follow..."<br />
[/message]<br />
<br />
[message]<br />
description=Kraglow<br />
message= _ "Saurians! The times of war are approaching once again. You know what this means..."<br />
image=portraits/core/James_Woo/orc-warlord5.png<br />
[/message]<br />
<br />
[message]<br />
description=S'Saskin the Bloodborn<br />
message= _ "You won't be taking any of our braves today orc. I am thinking the time has come to learn to fight your own battles instead of hiding you cowardly hide behind us."<br />
[/message]<br />
<br />
[message]<br />
speaker=Kraglow<br />
message= _ "What?! Why you insolent slimy whelp, I'll make you regret those words."<br />
image=portraits/core/James_Woo/orc-warlord5.png<br />
[/message]<br />
<br />
[message]<br />
description=S'Saskin the Bloodborn<br />
message= _ "Regret is the one thing we have enough. Brothers, Arm yourselves! Today we die free. Skalith Hyksa!"<br />
[/message]<br />
<br />
[objectives]<br />
side=1<br />
[objective]<br />
description= _ "Engage the Orcs"<br />
condition=win<br />
[/objective]<br />
[objective]<br />
description= _ "Death of S'Saskin the Bloodborn"<br />
condition=lose<br />
[/objective]<br />
[objective]<br />
description= _ "Time runs out"<br />
condition=lose<br />
[/objective]<br />
[/objectives]<br />
[/event]<br />
<br />
[event]<br />
name=last breath<br />
first_time_only=yes<br />
[filter]<br />
side=1<br />
[/filter]<br />
[message]<br />
speaker=unit<br />
message= _ "Shasss! For Skalithhh! "<br />
[/message]<br />
[if]<br />
[variable]<br />
name=village_visited<br />
equals=no<br />
[/variable]<br />
[then]<br />
[message]<br />
description=S'Saskin the Bloodborn<br />
message= _ "Blizzards! The orcs are prepared to fight and well defended. We need a way to break them."<br />
[/message]<br />
[role]<br />
role=guide<br />
type=Saurian Stalker,Saurian Warrior alt,Saurian Brave<br />
[/role]<br />
[message]<br />
role=guide<br />
message= _ "Bloodborn, there isss another tribe clossse that isss known for itsss ssecret knowledge. We ssseek out their help yesss?"<br />
[/message]<br />
<br />
[message]<br />
description=S'Saskin the Bloodborn<br />
message= _ "You are right, lets make haste"<br />
[/message]<br />
<br />
{PUT_IMG (items/gohere.png) 29 4}<br />
[scroll_to]<br />
x=29<br />
y=4<br />
[/scroll_to]<br />
<br />
[objectives]<br />
side=1<br />
[objective]<br />
description= _ "Seek help from the other tribe"<br />
condition=win<br />
[/objective]<br />
[objective]<br />
description= _ "Death of S'Saskin"<br />
condition=lose<br />
[/objective]<br />
[objective]<br />
description= _ "Time runs out"<br />
condition=lose<br />
[/objective]<br />
[/objectives]<br />
[/then]<br />
[else]<br />
[message]<br />
description=S'Saskin the Bloodborn<br />
message= _ "Blizzards! The orcs are prepared to fight and well defended. Many braves will die to take down their fort."<br />
[/message]<br />
<br />
[message]<br />
speaker=Iktha Toskh<br />
message= _ "Do not worry Bloodborn. My tribe excels at healing of wounded warriors. Move anyone who needs aid next to one of us and we'll take care of him."<br />
image=portraits/saurian-tribalist.png<br />
[/message]<br />
<br />
[message]<br />
description=S'Saskin the Bloodborn<br />
message= _ "Very well. Death to the Blackbloods, Chaaarge!"<br />
[/message]<br />
[/else]<br />
[/if]<br />
[/event]<br />
<br />
[event]<br />
name=moveto<br />
<br />
[filter]<br />
side=1<br />
x,y=29,4<br />
[/filter]<br />
<br />
[message]<br />
description=S'Saskin the Bloodborn<br />
message= _ "By Ikhor! What happened to this place? It seems deserted?"<br />
[/message]<br />
<br />
[message]<br />
speaker=narrator<br />
message= _ "And just like that, as if he has always been there, the nearby trees seem to coalesce into the form of an elder saurian"<br />
[/message]<br />
<br />
[unit]<br />
side=1<br />
#ifdef EASY<br />
type=Soothsayer<br />
#endif<br />
#ifdef MEDIUM<br />
type=Witch Doctor<br />
#endif<br />
#ifdef HARD<br />
type=Witch Doctor<br />
#endif<br />
description=Iktha Toskh<br />
{IS_HERO}<br />
x,y=27,4<br />
[modifications]<br />
{TRAIT_RESILIENT}<br />
{TRAIT_QUICK}<br />
[/modifications]<br />
[/unit]<br />
<br />
[message]<br />
speaker=Iktha Toskh<br />
message= _ "Halt warrior. What do you seek in this place. There is nothing here to find."<br />
image=portraits/saurian-tribalist.png<br />
[/message]<br />
<br />
[message]<br />
description=S'Saskin the Bloodborn<br />
message= _ "I seek the tribe that lives here."<br />
[/message]<br />
<br />
[message]<br />
speaker=Iktha Toskh<br />
message= _ "Nobody lives here anymore. The orcs took our best to war and left us to slowly die. We are no more."<br />
image=portraits/saurian-tribalist.png<br />
[/message]<br />
<br />
[message]<br />
description=S'Saskin the Bloodborn<br />
message= _ "No, I do not permit this. Now you join me and obey my commands. The saurians will live. This is to be"<br />
[/message]<br />
<br />
[message]<br />
speaker=Iktha Toskh<br />
message= _ "Hmmm, yes. I can sense you are born in blood. You have the leader's gift and your word I, and the rest of my tribe, will follow"<br />
image=portraits/saurian-tribalist.png<br />
[/message]<br />
<br />
[message]<br />
speaker=narrator<br />
message= _ "From now on you can recruit Witch Doctors as well. Witch doctors are healers and have a short range magical attack."<br />
[/message]<br />
[allow_recruit]<br />
side=1<br />
type=Witch Doctor<br />
[/allow_recruit]<br />
<br />
[objectives]<br />
side=1<br />
[objective]<br />
description= _ "Kill Kraglow and capture the orcish guardpost"<br />
condition=win<br />
[/objective]<br />
[objective]<br />
description= _ "Death of S'Saskin"<br />
condition=lose<br />
[/objective]<br />
[objective]<br />
description= _ "Death of Iktha Toskh"<br />
condition=lose<br />
[/objective]<br />
[objective]<br />
description= _ "Time runs out"<br />
condition=lose<br />
[/objective]<br />
[/objectives]<br />
[set_variable]<br />
name=village_visited<br />
value=yes<br />
[/set_variable]<br />
[/event]<br />
<br />
[event]<br />
name=die<br />
[filter]<br />
description=Kraglow<br />
[/filter]<br />
[message]<br />
speaker=unit<br />
message= _ "Aaargh! So you have steel lizard? *Cough* It doesn't matter, a runner is already away to tell the clan. With your defiance you have doomed your tribe..."<br />
image=portraits/core/James_Woo/orc-warlord5.png<br />
[/message]<br />
[message]<br />
description=Iktha Toskh<br />
message= _ "The guardhouse is ours Bloodborn! We are free!"<br />
image=portraits/saurian-tribalist.png<br />
[/message]<br />
[message]<br />
description=S'Saskin the Bloodborn<br />
message= _ "That may be, but the orcs will be coming to retaliate. And this time they will not just enslave us."<br />
[/message]<br />
<br />
[message]<br />
description=Iktha Toskh<br />
message= _ "What shall we do then. Our losses were great just taking this guardpost. Shall we flee?"<br />
image=portraits/saurian-tribalist.png<br />
[/message]<br />
<br />
[message]<br />
description=S'Saskin the Bloodborn<br />
message= _ "No, prepare defenses. We will teach them a lesson in guile..."<br />
[/message]<br />
<br />
[endlevel]<br />
result=victory<br />
bonus=yes<br />
[/endlevel]<br />
[clear_variable]<br />
name=village_visited<br />
[/clear_variable]<br />
[/event]<br />
[/scenario]<br />
</pre></div>Db0https://wiki.wesnoth.org/index.php?title=Talk:UserCampaigns&diff=21234Talk:UserCampaigns2008-01-29T17:17:32Z<p>Db0: NoTOC?</p>
<hr />
<div>Is someone responsible for keeping this current? It seems like a lot of work. Good job, though. [[User:Scott|Scott]]<br />
<br />
== NoTOC? ==<br />
<br />
Is there any specific reason why the TOC has been hidden? Especially with the list of Campaigns listed here it seems to be more needed. If noone responds I will add it again as a first step in bringing the page up to date --[[User:Db0|Db0]] 17:17, 29 January 2008 (UTC)</div>Db0https://wiki.wesnoth.org/index.php?title=Create&diff=21232Create2008-01-29T17:13:37Z<p>Db0: Fixed obsolete link</p>
<hr />
<div>{| style="float:right"<br />
|<br />
__TOC__<br />
|}<br />
Interested in creating your own scenarios and campaigns? One of Wesnoth's best features is its extensibility. Players can create new maps, units, races, scenarios, art, music, and even entire campaigns. Access to the "guts" of the game is both simple and difficult; if you have an ASCII text editor you have everything you need to build your own world. However, learning the Wesnoth Markup Language (WML) takes some effort. This section will guide you through the process of creating and distributing your own content.<br />
<br />
It should also be noted that '''we need a lot of help creating artwork for the core of the game.''' The current projects we are working on are [http://www.wesnoth.org/forum/viewtopic.php?t=2014&start=0&postdays=0&postorder=asc&highlight= listed here]. We'll happily help you out, if you take a swing at them.<br />
<br />
== Read this first! ==<br />
Before you modify or add anything, it is important to understand how the game stores and organizes its data. This article will explain the game's directory structure and introduce the ''userdata'' directory.<br />
* [[EditingWesnoth]]<br />
<br />
== What can I create, and how? ==<br />
<br />
<div class="thumb tright"><div><br />
[http://www.wesnoth.org/images/sshots/wesnoth_editor-1.3.4.jpg http://www.wesnoth.org/images/sshots/wesnoth_editor-1.3.4-175.jpg]<br />
<div class="thumbcaption">Battle for Wesnoth map editor</div></div><br />
</div><br />
<br />
* [[BuildingMaps|Maps]] - the layout of terrain tiles<br />
* [[BuildingScenarios|Scenarios]] - a scenario makes things happen on a map, making it playable<br />
* [[BuildingCampaigns|Campaigns]] - how to put it all together into a campaign<br />
* [[BuildingMultiplayer|Multiplayer Maps and Scenarios]] - a specialized look at maps and scenarios<br />
* [[MultiplayerCampaigns|Multiplayer Campaigns]] - making a campaign accessible in multiplayer<br />
<br />
* [[BuildingUnits|Units]]<br />
* [[BuildingFactions|Multiplayer factions and eras]]<br />
<br />
* '''[[Create Art|Art]]''' - complete with '''tutorials!'''<br />
* [[Create Music|Music]]<br />
* [[WesnothTranslations|Translations]] - work on translating Wesnoth<br />
<br />
* [[Distributing content]] - all about the campaign server<br />
* [[Maintenance tools]] - tools for helping you sanity-check and maintain campaigns.<br />
<br />
== What have others done? ==<br />
Quick descriptions of the campaigns and scenarios that have been published on the campaign server.<br />
* [[UserScenarios|User contributed campaigns]]<br />
List of abandoned campaigns you can work on<br />
* [[Abandoned_Campaigns]]<br />
There are a multitude multiplayer maps and discussion of the campaigns on the [http://www.wesnoth.org/forum Wesnoth forum]<br />
* [http://www.wesnoth.org/forum/viewforum.php?f=15 Multiplayer development forum]<br />
* [http://www.wesnoth.org/forum/viewforum.php?f=8 Scenario and campaign development forum]<br />
* [[Complete Faction List (unfinished)|Complete Faction List]]<br />
<br />
== The world of Wesnoth ==<br />
Not all campaigns take place in Wesnoth, but many do. There is definitely a certain flavor to campaigns that are intended to take place somewhere in the world of Wesnoth. Stake out a time period or a map locale and tell a story.<br />
* [[WesnothHistory|The history of Wesnoth]]<br />
* [[WesnothGeography|The geography of Wesnoth]]<br />
* [[RaceDescriptions|The races of creatures in Wesnoth]]<br />
* [[WesnothPoetry|Wesnothian poetry]]<br />
<br />
== Miscellaneous ==<br />
* [[ExternalUtilities| External Utilities]] - some extra tools for easier creating stuff<br />
* [[ReferenceWML|WML Reference]] - a quicklink<br />
* [[FAQ#Scenario_and_Campaigns|FAQ]] - if you have a question, post it<br />
* Campaign server [http://wolff.to/campaigns/list.html web interface] - An alternate way to download user campaigns<br />
* [[Status_of_User_Scenarios| Status of User Scenarios]] - Lists which usercampaigns are working and which ones are broken<br />
{{Home}}</div>Db0https://wiki.wesnoth.org/index.php?title=Trailer&diff=21154Trailer2008-01-25T22:05:11Z<p>Db0: /* Online presence */ Added gallery link for videos</p>
<hr />
<div>Here is a video showcasing some of the artwork, gameplay, and music of "The Battle for Wesnoth." Its purpose is to publicize the game and show people what they're missing! You are free to distribute the video to online video sites. Since the art used was licensed under the Gnu General Public License (GPL), the video itself is a GPL'd work, and you are obligated to indicate this when distributing the video.<br />
<br />
== Trailer based on Wesnoth 1.1.2, by Radoz ==<br />
It is really based on 1.1.2, not 1.2 sadly. So while very good and still fitting, it doesn't show the latest features until someone creates a new trailer. Are you the one who can do it?<br />
* [http://prdownloads.sourceforge.net/wesnoth/bfw-trailer-320x240.ogg?download 320x240 video in OGG Theora format] (4.8 MB)<br />
* [http://prdownloads.sourceforge.net/wesnoth/bfw-trailer-640x480.ogg?download 640x480 video in OGG Theora format] (14.6 MB)<br />
<br />
== Online presence ==<br />
If you distribute the video somewhere, post the link here. You may have to convert the video to another format first (leading to some loss of quality), because some sites do not support OGG Theora.<br />
* [http://wesnoth.dbzer0.com/blog/wpg2 Unofficial wesnoth gallery] (You can upload a full quality video here. It will not be converted in any way and there is currently no size limit. If it is more than 7mb you will need to contact the admin to upload it for you)<br />
* [http://www.revver.com/watch/421888 Revver]<br />
* [http://video.google.com/videoplay?docid=2326396283485985651 Google Video]<br />
* [http://youtube.com/watch?v=EIt69vznegs YouTube *] / [http://www.youtube.com/watch?v=0qTm9oPHZzU YouTube] (first converted to DIVX) / [http://youtube.com/watch?v=NpH21jH3jtE YouTube] (first converted to MPEG4) / <br />
* [http://www.linuxvideos.fr/index.php?25-trailer-de-wesnoth-1-1-2-par-radoz LinuxVideos] (in OGG Theora format)<br />
* [http://www.crunchyroll.com/showmedia?id=80393 CrunchyRoll.com] (Viewable by Registered Users only. registration is free)<br />
<br />
&nbsp;* Note that the first time the video was uploaded to YouTube it was removed, and replaced with the message "This video is no longer available due to a copyright claim by Viacom International Inc." Note that this claim is false. The [http://www.eff.org/deeplinks/archives/005109.php EFF has a page] on Viacom video takedowns. YouTube has since reinstated the video.<br />
<br />
== File format ==<br />
The video files' extension is <tt>.ogg</tt>, which indicates that it uses the Ogg container format. Ogg is capable of containing a range of codecs, but it usually holds audio encoded with the Vorbis codec and/or video encoded with the Theora codec. Our trailer contains both.<br />
<br />
If a file contains just audio, it is normally called an "Ogg Vorbis" file. If it also contains video, then it is normally called "Ogg Theora", although "Ogg Theora+Vorbis" might more accurately convey the fact that it is a video with a soundtrack.<br />
<br />
We use these codecs because they offer high quality at small file sizes; plus they are free and Open Source, which fits in with the philosophy of ''Battle for Wesnoth'' as free, Open Source software.<br />
<br />
The following links may be helpful for further information:<br />
* [http://www.vorbis.com/faq/#what FAQ at Vorbis.com]<br />
* [http://www.theora.org/theorafaq.html#10 FAQ at Theora.org]<br />
* [http://en.wikipedia.org/wiki/Ogg Article on Ogg at Wikipedia.org]<br />
<br />
===Playing the file===<br />
Wikipedia has a guide to viewing Ogg files which you may find helpful: [http://en.wikipedia.org/wiki/Wikipedia:Media_help_%28Ogg%29 link].<br />
<br />
====Linux and similar Unix-based systems====<br />
If you have a reasonably recent Linux system, you will probably be able to play the video immediately.<br />
<br />
Linux distros vary so much that specific advice may not be helpful, but a good approach is just to try playing the file in your favourite player. If it fails, try another one. If they all fail, use your distro's approved installation method (e.g. Synaptic, YaST...) to search for the relevant libraries (libtheora and libvorbis) and a decent player (VLC, Kplayer, Mplayer, Xine, Kaffeine, Helix, Totem...).<br />
<br />
====Windows and Macs====<br />
Usually, you won't be able to play the trailer until you install some software with Ogg support. There are several available. The simplest option is probably to install the [http://www.videolan.org/ VLC] player.</div>Db0https://wiki.wesnoth.org/index.php?title=Play&diff=21055Play2008-01-21T21:23:13Z<p>Db0: /* Miscellaneous */ Added the Wesnoth journals</p>
<hr />
<div>== Getting Battle for Wesnoth ==<br />
* [[Description|About the project]]<br />
* [[Download|Downloads and Source Code Page]]<br />
* [[CompilingWesnoth| Compiling Wesnoth]]<br />
<br />
== Playing Battle for Wesnoth ==<br />
<div class="thumb tright"><div><br />
[http://www.wesnoth.org/images/sshots/wesnoth-1.0-urug.jpg http://www.wesnoth.org/images/sshots/wesnoth-1.0-urug-175.jpg]<br />
<div class="thumbcaption">The Elves Besieged</div></div><br />
</div><br />
<br />
* [[GettingStarted|Get Started]]<br />
* [[WesnothManual|Game Manual]]<br />
* [[BasicStrategy|Basic Tactics]]<br />
* [[MainlineScenarios|Walkthroughs of Official Campaigns]]<br />
* [[UserScenarios | User-made Add-On Campaigns]]<br />
* [[Competitive_Gaming | Competitive Gaming]]<br />
<br />
<br />
* [[FAQ]]<br />
<br />
== Advanced Players ==<br />
* [[CommandMode|Debugging and Multiplayer Command Reference]]<br />
* [[AdvancedTactics|Advanced Tactics]]<br />
* [http://zapicm.freeshell.org Units Reference]<br />
* [[MultiplayerServers|Multiplayer Servers]]<br />
* [[How to play...|The "How to play" Series]]<br />
<br />
== The world of Wesnoth ==<br />
<div class="thumb tright"><div><br />
[http://www.wesnoth.org/images/sshots/wesnoth-map-1.jpg http://www.wesnoth.org/images/sshots/wesnoth-map-1-175.jpg]<br />
<div class="thumbcaption"> Wesnoth and Surrounding Lands</div></div><br />
</div><br />
<br />
* [[WesnothHistory|The history of Wesnoth]]<br />
* [[WesnothGeography|The geography of Wesnoth]]<br />
* [[WesnothFigures|Notable figures of Wesnoth]]<br />
* [[RaceDescriptions|The races of creatures in Wesnoth]]<br />
* [[WesnothPoetry|Wesnothian poetry]]<br />
<br />
== Miscellaneous ==<br />
* [[WhatArePlayersSaying|Comments from Wesnoth Players]]<br />
* [[WesnothReviews|Third party Wesnoth reviews]]<br />
* [[Screenshots]]<br />
* [[FAQ#Do_you_want_help_making_this_game.3F_How_can_I_help.3F|Help to improve the game]]<br />
* [[The Observer|The Observer]] -- The Unofficial Wesnoth Newspaper<br />
* [http://wesnoth.dbzer0.com/blog/ The Wesnoth Journals] -- A collaborative Wesnoth blog. <br />
__NOTOC__<br />
{{Home}}</div>Db0https://wiki.wesnoth.org/index.php?title=Create_Art&diff=21038Create Art2008-01-21T17:42:49Z<p>Db0: /* See Also */ Added link to the external graphic library</p>
<hr />
<div>{| style="float:right; margin-left:1em;"<br />
|__TOC__<br />
|}<br />
<br />
== Getting Started ==<br />
<br />
=== General Information ===<br />
<br />
Graphic artists usually meet on the [http://www.wesnoth.org/forum/viewforum.php?f=9 artwork development forum] or on the [http://www.wesnoth.org/forum/viewforum.php?f=18 restricted art development forum]. The former is a great place to post and discuss new and current Wesnoth art and graphics, and the latter to see what the art development team is working on.<br />
<br />
Unit and terrain art is stored in the portable network graphics (PNG) format. Each frame of a unit animation, and each variation of a terrain is stored as a separate .png file in the "images" subdirectory of wesnoth, and generally these files will be 72 x 72 pixels (the size of Wesnoth's basic hexagonal tile) with an alpha channel (a part of the file that indicates how transparent each pixel is). When creating your own images, you can test them without overwriting any game data by putting them in your userdata directory (see [[EditingWesnoth]] for details on Wesnoth's directory structure). The game also supports JPEG images, though these are better suited for story art.<br />
<br />
To edit these graphics, you'll need some program capable of creating PNGs - some of the programs in the following list are free, open-source software, and will do the job nicely: [[Art Programs]]<br />
<br />
If you need some inspiration, we have a [[GraphicLibrary|Graphics Library]] which collects art posted on the forum. You can use this for ideas, and as a scrap heap for different parts of unit images (a technique described [[Give Your Hero A Personality|here]]).<br />
<br />
=== Roadmap ===<br />
A list of what's being done and what needs doing:<br />
* '''[[Tiles Status]]''' - a roadmap/plan of sorts for future work on terrain tiles<br />
* [http://www.wesnoth.org/forum/viewtopic.php?t=9162&sid=21cf168d2b077d06bb0017c059b4add6 A list] of current work that needs to be done with sprites.<br />
<br />
== Art Tutorials ==<br />
<br />
These are a work-in-progress, and describe both how to make art fit into wesnoth's style, as well as giving some considerable tips on drawing in general. Especially useful is the [[External Tutorials]] page which lists a large number of art tutorials available on the web.<br />
<br />
=== General Art and Computer Graphics ===<br />
* [[Using the Levels Adjustment]] - making scanned pencil drawings ''not'' look washed out.<br />
* [[Extending dynamic range]] - The Grooviest (so far) tutorial about extending the dynamic range of images and how this technique can be used to make better scans of pencil drawings.<br />
* [[Scanning with camera]] - How to transfer real-life art to computer using a digital camera instead of a scanner.<br />
* [[How to Anti-Alias Sprite Art]] - A means of removing the jagged edges on pixel lines<br />
* [[Art Supplies]] - What physical items you need to do larger cell-shaded art like that of Jetryl/Jormungadr/et al<br />
* [[Inking With Pencils|Computer Inking a Sketch]] - Info from Jason Lutes on his portrait workflow<br />
* [[Scaling Digital Images]] - how to properly resize an image on a computer<br />
* [[How to Shade]] - at attempt at tackling a very complicated topic<br />
* [[Cartography for Wesnoth|How to make Wesnoth-style Maps ]] - Kestenvarn's tricks of the trade<br />
* [[Designing weapons and armour]] - Advice from zookeeper on designing realistic weapons for your characters<br />
* [[Making portrait art in vector]] - Sgt. Groovy's complete tutorial for making Wesnoth unit portraits in vector graphics.<br />
<br />
=== [[Terrain|Terrain Graphics]] ===<br />
<br />
The following is information specific to drawing terrain for Wesnoth. Read Frame's "Tiles Tutorial" for a good overview of how terrain graphics work.<br />
<br />
* [[Tiles Tutorial]] - Frame's tutorial describing the process of making terrain tiles in wesnoth, and how they interact with adjacent tiles.<br />
* [[How To Make Seamless Tiles]] - The tutorial is aimed at Photoshop users, but the technique is similar with The GIMP.<br />
* [[Seamless Tiles Using Inkscape]] - This tutorial teaches a method for making seamless hex tiles in vector craphics (to be rendered in raster).<br />
* [[Turning Square Tiles into Hex]] - Nifty tricks for transforming square (or any rectangle) shaped seamless tiles into hexagon seamless tiles.<br />
* [[CastleTutorial|Castle Tutorial]] - A description of how Wesnoth's castle tiles work (needs updating, but useful nonetheless)<br />
* [[MultiHexTutorial|Multi-Hex Tiling Tutorial]] - A description of how multi-hex tiles work.<br />
* [[Editing Castles]] - Instructions for how to make/edit castles (and other corner-based terrains) using yobbo's GIMP script.<br />
<br />
These describe the system used to specify how terrains behave in game:<br />
* [[TerrainLettersWML]] - A list of the letters used to represent terrain types.<br />
* [[TerrainGraphicsWML]] - If you really need to get technical, start here.<br />
* [http://www.anathas.org/ayin/wesnoth/doc/terrain_graphics_wml Ayin's Terrain Graphics document] - If you really, ''really'' need to get technical, this describes the terrain graphics WML system in depth.<br />
<br />
=== Sprite Art ===<br />
The following are different tutorials about sprite work compiled by various wesnoth sprite artists. These will give you the most specific-to-wesnoth information about making sprites, and are well worth a read.<br />
<br />
* [[Creating Unit Art]] - a list of specifications you will need to match.<br />
* [[Give Your Hero A Personality]] - tricks for editing existing images, including some clip art.<br />
* [[Basic Animation Tutorial]] - or "How to Animate Sprites for Dummies," covering the basic theory, and all of the mistakes to avoid.<br />
* [[Advanced Animation Tutorial]] - how to wire in the animation frames to units in a way that makes the animation look good in-game. Doesn't cover any drawing as such, but focuses on timing conventions and some standard techniques for getting as much as possible out of the frames that are already drawn.<br />
* [[Team Color Shifting]] - how to use our new team color system.<br />
* [[Creating Shadows Under Units]] - how we create the shadows for the units in-game<br />
* [[Making Bow Animations]] - the current standard for how we want bow animations to work<br />
* [[Rotate Pixel Art Without Blurring]]<br />
* [[Creating a scratch built sprite]] - an attempt to show some ways creating a sprite from scratch<br />
<br />
=== External Tutorials ===<br />
The following page contains dozens of links to tutorials covering all manner of artwork, including sprite art. These were not made by wesnoth artists, but should prove very useful for general instruction.<br />
<br />
* [[External Tutorials]]<br />
<br />
== See Also ==<br />
* [[Create]]<br />
* [[EditingWesnoth]]<br />
* [[GraphicLibrary]] - Lots of usercontributed graphics (most should be GPL'ed)<br />
* [[Project]]<br />
* [http://wesnoth.dbzer0.com/blog/wpg2 External Graphic Library] - A project to better organize the art of Wesnoth.</div>Db0https://wiki.wesnoth.org/index.php?title=User:Db0&diff=20961User:Db02008-01-19T17:18:31Z<p>Db0: </p>
<hr />
<div>Creator of the [[Campaign/Forgotten_Legacy | Forgotten_Legacy]] campaign.<br />
<br />
Contributing to the storylines of Legend of Wesmere and Invasion of Arendia.<br />
<br />
Admin of the [http://wesnoth.dbzer0.com/blog/ Wesnoth Journals]. Free Wesnoth blog platform and gallery if you want it ;). Discuss [http://www.wesnoth.org/forum/viewtopic.php?t=19495 here]</div>Db0https://wiki.wesnoth.org/index.php?title=Template:Needs_update&diff=20914Template:Needs update2008-01-18T14:34:34Z<p>Db0: Added link to obsolete category</p>
<hr />
<div>----<br />
'''Attention:''' This page has been [[:Category:Obsolete|marked for review]] for version 1.4. The information contained here appears to be outdated or obsolete. <br />
<br />
If you can, please take the time to review and edit it to bring it up to date (if needed) for the lastest version of Wesnoth.<br />
For more information and discussion, check the [http://www.wesnoth.org/forum/viewtopic.php?t=19462 appropriate thread] in the fora.<br />
<br />
Once this is done, remove this notice<br />
<includeonly><br />
[[category:Obsolete]]<br />
</includeonly><br />
----</div>Db0https://wiki.wesnoth.org/index.php?title=How_to_play_Drakes&diff=20913How to play Drakes2008-01-18T14:24:42Z<p>Db0: Floated the TOC on the right</p>
<hr />
<div>{{Needs update}}<br />
{| style="float:right;"<br />
|<br />
__TOC__<br />
|}<br />
==General Drake Strategies==<br />
On the first turn when you have a random opponent it is good to get a mixture of units. A Scout, Fighter, Burner, Clasher, and Skirmisher would be an example of such a recruit. When you discover what faction your opponent is, go to the appropriate section below for more advice.<br />
Drakes generally win by dealing the most damage. your units are big and deadly, but they're also more expensive than most. Take advantage of having the best mobility in the game by placing your units in hard-to-access places such as behind mountains or across water from your opponent. You'll have the <br />
advantage by being able to decide when and where battles will happen. Your major disadvantage is how easily your units will take damage. Because of this you'll usually want to be the aggressor in battle to kill a unit or two, get damaged, and then flee to heal. Having a mobile healer helps with this if villages are sparse.<br />
<br />
Since you trade your defense for other abilities, Fighting battles where your opponent has low defense will give you a greater advantage than it will any other faction. If your opponent refuses to leave 70% defensive terrain you'll probably want an Augr or 2 to attack at night.<br />
<br />
<br />
<br />
==Drakes v. Undead==<br />
Playing as Drakes in this matchup is some of the most fun for me. The deadliest matchup in Wesnoth, this game will result in lots of casualties, and quickly. Both factions are incredibly offensive and of opposite alignment. Skeletons are weak to Fire, Adepts to melee, and Drakes are weak to Pierce and Cold. Basically, whoever is left standing wins.<br />
<br />
===Drake Burner=== <br />
You'll want a coulpe of these to burn any Skeletons, Ghosts, Bats, WCs, Ghouls, well, basically any unit it can burn other than Adepts. Even burning Archers at daytime isn't a bad idea as it's the most effective way to kill them. The most expensive unit you can recruit, you'll want to recruit them sparingly and keep them alive.<br />
<br />
===Drake Clasher=== <br />
With Strong Clashers dealing an awesome 9-4 Pierce damage during the day, these are great Adept butchering units, as well as damage soakers. Due to their price you'll want to avoid recruiting too many. Level one of these into Gladiator and skeletons won't pose a threat anymore, even at night.<br />
<br />
===Drake Glider=== <br />
Dealing Impat melee and Fire ranged, these guys won't be worthless at any point, but their damage is still very weak compared to what the rest of your army can do. If you get one to level 2 you'll be able to take advantage of a current glitch if the unit.cfg that removes the unit's weakness to Cold. Even with the presence of the glitch, recruiting more than 1 isn't smart.<br />
<br />
===Drake Fighter=== <br />
A good Adept killer moreso for their mobility than damage, the presence of a Fire ranged gives them some slight flexibility in their usage.<br />
<br />
===Saurian Augr=== <br />
Don't recruit this unit when fighting Undead.<br />
<br />
===Saurian Skirmisher=== <br />
This little guy actually plays a very crucial role in your army against Undead. If the Undead didn't have Adepts you'd simply roll right over them. Well, since Adepts are such a necessary unit in their attack against you you'll need to take them out, and you'll need to be able to do that under any circumstances. The Skirmisher gives you a weapon that not only can hustle around enemy units to strike protected DAs, but he also gets better at night - the time when you'll want them to be dead the fastest. Having a couple of these guys around can really save your ass.<br />
<br />
===Tactics===<br />
On the first turn you'll want a couple Burners, a Fighter or Clasher, a Skirmisher, and another useful unit. If your opponent gets mass Skeleton Archers, get Clashers and Burners. If he gets lots of Adepts get Skirmishers and Fighters. If he likes Ghouls & Ghosts, you'll want Burners.<br />
<br />
Deal as much damage as you can at day, because you won't be dealing much at night. Keep Burners in front as they'll do great return damage to any Adepts that try to counter-attack you during your daytime assault: they'll do 12-2 while you do 7-4. Adepts have 28 base hp.<br />
<br />
At night simply retreat out of Adept range and have Skirmishers ready to take out any that get too close. Even if you have to retreat from a village to avoid Adepts it's worth it. You may lose a few gold, but it shouldn't add up to the 16+ you'd lose for a lost Drake. If your opponent takes the village and moves closer he'll also be closer to your new recruits to counter-attack. As day turns chase them away and you should net some gold for the units your opponent will have to replace.<br />
<br />
<br />
==Drakes v. Rebels==<br />
Playing Drakes in this matchup can be difficult. Your units have low defense and are weak to Pierce where the Rebels have high defense and use Pierce. You'll want to recruit a mix of drakes and saurians so that their neutrality doesn't become an advantage at any time of day. Take cheap shots when you can, because they will alwyas be taking cheap shots at you.<br />
<br />
===Drake Burner===<br />
This unit is a great weapon to take out Elvish Fighters and they absolutely massacre Woses. Effective in both melee and ranged combat, this unit is always useful against Rebels on attack or defense. He costs 21g though, and there are other units you will need to recruit to be sucessful.<br />
<br />
===Drake Clasher=== <br />
The only drake without a weakness to Pierce, this unit is great against Rebels. He will tear through Archers and he will beat EFs in a fight. He will overpower any Rebel and it's essential to have these guys in your force.<br />
<br />
===Drake Glider=== <br />
Good for their movement, and can be useful to get to those hard to reach hexes to get extra shots at Archers or Shamans. Recruit according to map need for scouts.<br />
<br />
===Drake Fighter=== <br />
Useful as a mobile fighter, the Fighter is what you'll want if there are 2 deperate battlefields within close flying range of each other. The ability to leave one battle to help the other is quite useful, which is true of Burners as well, though they move slower. For pure fighting power the Clasher is better, and he is hardier. If mobility is necessary on the map though, get 1 or 2 of these guys.<br />
<br />
===Saurian Augr=== <br />
I find these guys essential to fighting Rebels. This guy is the only easy way yuo'll be taking elves out of forest. Augrs have incredibly low hp, so keep them behind the line to heal your power units, or stick him in forest hexes your opponent will want. Using these guys as your first attackers at night will allow you to get their damage in and then move other units in fron of them and consequently heal.<br />
<br />
===Saurian Skirmisher=== <br />
Useful mainly against Scouts, Archers, and Mages at night, don't recruit too many of this unit even if you're tempted. They're fragile units<br />
<br />
=== Tactics ===<br />
On the first turn you'll want to recruit a Clasher, a Burner, an Augr, and a mix of other units like a Scout, another Clasher, or a Skirmisher. During daytime you'll want to deal as much damage as possible, as that's when you'll have the advantage. Elves fighting you will suffer massive return damage during the day. To help you out, keep your units away from places where the Rebels can use forest to attack you from, and remember to have your Augr(s) heal.<br />
<br />
At night you can still be aggresive with Augrs. You'll probably want to retreat your drakes slightly and put any Skirmishers (or even Clashers) you have up front on good terrain. Don't be afraid to keep a mobile unit up front either if it can survive 1 round of attacks; if it can do this and survive it will slow the progress of your enemy and you can easily fly the unit back behind your line to heal. Always make sure that the front line cannot be attacked from forest hexes if possible, though this won't be as big of a deal if you have several Augrs to cut through their defense. Don't be afraid to trade a Skirmisher for an Acher if you get a chance to kill one on poor terrain: you'll get a gold advantage as well as taking out the most dangerous unit the Rebels have against you.<br />
<br />
Another strategy is to strike hard at day and then completely retreat at night. Keep your units just out of reach of your opponent and allow them to come closer to your recruits to make your counter-attack swifter and more deadly. This strategy is often quite effective as it prevents your drakes from fighting at unfavorable TOD and it allows you to decide how tohe first battle takes place.<br />
<br />
Generaly your targets to kill will start with Archers, as they are the most deadly unit to your forces (especially to Clashers). Next you'll want to get rid of any low hp units your opponent has and any units on poor terrain making themselves targets. Try to keep your Clashers away from Shamen if possible (free Slow), and ignore Fighters if another unit presents itself as an equally appealing target. Elvish Fighters can't deal significant damage to your drakes without taking a good amount of return damage, so let them hurt themselves on you while you take out units that you won't receive much return damage from (Burners on Fighters at day though can be quite devastating).<br />
<br />
Genreally, pick your spots where the advantage presents itself when you can deal the most damage with little return damage if possible. Keep Elves from Forest hexes if possible, and use your advantagrous mobility.<br />
<br />
<br />
==Drakes v. Northerners==<br />
<br />
This matchup can be rather interesting. The main thing you generally worry about is the cheap northerner units and the expensive drake units. Drakes have much better units but unfortunately they are expensive. Usually when I lose vs. Northerners it is because of the sheer number of units they are capable of sending.<br />
<br />
===Drake Burner===<br />
A very useful unit during the day and even effective at night vs fighters and whelps and wolf riders due to their lack of ranged defense. And with at least 7-2 melee, they have the ability to defend their melee attacks. Be very careful with the number of burners you recruit though because they are rather expensive and you need to be able to defend against the shear number of units northerners are able to send.<br />
<br />
===Drake Clasher===<br />
I prefer the drake clasher over the drake fighter in most cases and especially when playing against northerners. The clasher is best to defeat those pesky and annoying assassins. Even though they cannot defend ranged attacks, their 6-4 pierce attack will definitely hurt an assassin as the assassin has -20% to pierce. Clashers have high amounts of HP and can are very effective in fighting northerners, even though it will normally be melee against melee much of the time.<br />
<br />
===Drake Glider===<br />
Personally, I use maybe one or two gliders in the original recruiting to get to villages quickly. I usually use them afterwords as a quick unit that can run around and aid in damage in order to kill and level other units. I'll also use them for gaining info on recruits. Perhaps I'll use one to capture an enemy village in hopes to distract an area that i feel i may be losing dominance in.<br />
<br />
===Drake Fighter===<br />
I try to stay away from fighters but if you need a unit and can't wait for an extra turn, fighters are good to recruit because they are quicker then clashers and have at least minor defense with their ranged attack, and occasionally offense when you just need to deal that little bit of extra damage to make the kill and can't afford to risk with your melee attack.<br />
<br />
===Saurian Augr===<br />
These units are pretty effective and very useful but do not keep them in the front of the battle. Use them behind other units to heal and to finish off with magical attacks. These units are easy to level and very effective with 8-3 magical and heal. Be careful with saurians because they do not have large amounts of hp.<br />
<br />
===Saurian Skirmisher===<br />
Because of their small amount of HP you should try to refrain from using skirmishers however they can be helpful at times. I generally get a couple in battle and attempt to level them. They are pretty effective level 2 units.<br />
<br />
=== Tactics ===<br />
Your first depend highly on the map, exp percentage, gpv. As a general rule of thumb I try to get all villages on the 3rd turn and then recruit depending on the units i see from my opponent.<br />
<br />
<br />
== Drakes v. Drakes ==<br />
This is possibly the deadliest mirror match in the game. Saurians have low hp, but deal good damage to their Drake counterparts. You'll want a good mix of both units as you'll likely be fighting at all times of the day.<br />
<br />
=== Drake Burner === <br />
Generally bad recruit in this matchup. Burners cannot do significant damage to other Drakes, though they do get free shots on Clashers. They can also torch any Saurians found on bad terrain, which is unlikely, though this is probably their greatest use.<br />
<br />
===Drake Clasher=== <br />
This unit should be the majority of your forces. Dealing heavy Pierce damage and having the most hp out of any recruit (as well as not having a negative Pierce resistance), makes him the beast of burden in this matchup. Hope that yours get the Strong and Resiliant traits and his get the Quick and Intelligent traits. He will beat Fighters and Burners 1v1, and the only units he needs to fear are Augrs and other Clashers, and Skirmishers at night.<br />
<br />
===Drake Glider=== <br />
As like the Burner, this unit is just a poor recruit. It has no upside other than the inconsequential Marksman on his breath attack. Do not recruit them unless the map is huge.<br />
<br />
===Drake Fighter=== <br />
Not the best recruit, but he can be handy if the map makes Clashers slow. They can also tear Augrs to pieces, so if Augrs become a problem a few of these are an alright recruit. Also good as a replacement for the Glider for village grabbing, especially if Quick.<br />
<br />
===Saurian Augr=== <br />
An essential unit. Their Cold magic deals 9-3 damage to Drakes at night, ripping them to pieces. Their healing will also be essential if used properly, as this is a bloody fight. Be careful not to over-recruit these guys, as they are quite weak in defense against any unit.<br />
<br />
===Saurian Skirmisher=== <br />
These guys are also a good force to have, but again, not too many. Your Pierce damage should mainly come from your Clashers, but a couple of Skirmishers to attack opposing Augrs as well as Drakes at night can prove very valuable, especially with their high defence. Their ability to get behind the enemy lines gives you more hexes to attack the enemy from.<br />
<br />
=== Tactics ===<br />
On the first turn you'll want several Clashers, a couple Saurians, and possibly a Fighter or Glider to grab villages. Village distribution will determine if you need a Glider or not, as well as map size.<br />
<br />
At night, use your Augrs on the opposing Clashers first, using your Clashers and Skirmishers to finish up. Make sure to protect your Augrs though, as they die easily, even at night. Killing a Clasher will remove a major threat come daytime, as well as net you 19g. If you must trade a Skirmisher to kill a Clasher at night, it can often be worth it.<br />
<br />
At day you'll want to attack first with your Augrs again. Their Cold magic will do 6-3 in daytime to Drakes, which is still quite powerful. Follow up with your now incredibly deadly Clashers: Strong Clashers in day will deal 10-4 to any non-Clasher Drake.<br />
<br />
Genreally, this is the danger level of your enemy units: Clasher, Augr, Skirmisher, Fighter, Burner, Glider. You may choose to either target the deadliest units first (Clashers being easy targets for Augrs), or go for the weaker units first to give yourself a monetary advantage quickly, while receiving little retaliation damage. Either strategy can work, and levelling an Augr can prove exceptionally deadly to your opponent. Intelligent Augrs level within 2 kills. Whichever strategy you use, be sure to kill, and not just hurt your opponent, because your opponent will flee and have the unit return to fight again.</div>Db0https://wiki.wesnoth.org/index.php?title=How_to_play_Drakes&diff=20912How to play Drakes2008-01-18T14:20:16Z<p>Db0: /* Drakes v. Drakes */</p>
<hr />
<div>{{Needs update}}<br />
<br />
==General Drake Strategies==<br />
On the first turn when you have a random opponent it is good to get a mixture of units. A Scout, Fighter, Burner, Clasher, and Skirmisher would be an example of such a recruit. When you discover what faction your opponent is, go to the appropriate section below for more advice.<br />
Drakes generally win by dealing the most damage. your units are big and deadly, but they're also more expensive than most. Take advantage of having the best mobility in the game by placing your units in hard-to-access places such as behind mountains or across water from your opponent. You'll have the <br />
advantage by being able to decide when and where battles will happen. Your major disadvantage is how easily your units will take damage. Because of this you'll usually want to be the aggressor in battle to kill a unit or two, get damaged, and then flee to heal. Having a mobile healer helps with this if villages are sparse.<br />
<br />
Since you trade your defense for other abilities, Fighting battles where your opponent has low defense will give you a greater advantage than it will any other faction. If your opponent refuses to leave 70% defensive terrain you'll probably want an Augr or 2 to attack at night.<br />
<br />
<br />
<br />
==Drakes v. Undead==<br />
Playing as Drakes in this matchup is some of the most fun for me. The deadliest matchup in Wesnoth, this game will result in lots of casualties, and quickly. Both factions are incredibly offensive and of opposite alignment. Skeletons are weak to Fire, Adepts to melee, and Drakes are weak to Pierce and Cold. Basically, whoever is left standing wins.<br />
<br />
===Drake Burner=== <br />
You'll want a coulpe of these to burn any Skeletons, Ghosts, Bats, WCs, Ghouls, well, basically any unit it can burn other than Adepts. Even burning Archers at daytime isn't a bad idea as it's the most effective way to kill them. The most expensive unit you can recruit, you'll want to recruit them sparingly and keep them alive.<br />
<br />
===Drake Clasher=== <br />
With Strong Clashers dealing an awesome 9-4 Pierce damage during the day, these are great Adept butchering units, as well as damage soakers. Due to their price you'll want to avoid recruiting too many. Level one of these into Gladiator and skeletons won't pose a threat anymore, even at night.<br />
<br />
===Drake Glider=== <br />
Dealing Impat melee and Fire ranged, these guys won't be worthless at any point, but their damage is still very weak compared to what the rest of your army can do. If you get one to level 2 you'll be able to take advantage of a current glitch if the unit.cfg that removes the unit's weakness to Cold. Even with the presence of the glitch, recruiting more than 1 isn't smart.<br />
<br />
===Drake Fighter=== <br />
A good Adept killer moreso for their mobility than damage, the presence of a Fire ranged gives them some slight flexibility in their usage.<br />
<br />
===Saurian Augr=== <br />
Don't recruit this unit when fighting Undead.<br />
<br />
===Saurian Skirmisher=== <br />
This little guy actually plays a very crucial role in your army against Undead. If the Undead didn't have Adepts you'd simply roll right over them. Well, since Adepts are such a necessary unit in their attack against you you'll need to take them out, and you'll need to be able to do that under any circumstances. The Skirmisher gives you a weapon that not only can hustle around enemy units to strike protected DAs, but he also gets better at night - the time when you'll want them to be dead the fastest. Having a couple of these guys around can really save your ass.<br />
<br />
===Tactics===<br />
On the first turn you'll want a couple Burners, a Fighter or Clasher, a Skirmisher, and another useful unit. If your opponent gets mass Skeleton Archers, get Clashers and Burners. If he gets lots of Adepts get Skirmishers and Fighters. If he likes Ghouls & Ghosts, you'll want Burners.<br />
<br />
Deal as much damage as you can at day, because you won't be dealing much at night. Keep Burners in front as they'll do great return damage to any Adepts that try to counter-attack you during your daytime assault: they'll do 12-2 while you do 7-4. Adepts have 28 base hp.<br />
<br />
At night simply retreat out of Adept range and have Skirmishers ready to take out any that get too close. Even if you have to retreat from a village to avoid Adepts it's worth it. You may lose a few gold, but it shouldn't add up to the 16+ you'd lose for a lost Drake. If your opponent takes the village and moves closer he'll also be closer to your new recruits to counter-attack. As day turns chase them away and you should net some gold for the units your opponent will have to replace.<br />
<br />
<br />
==Drakes v. Rebels==<br />
Playing Drakes in this matchup can be difficult. Your units have low defense and are weak to Pierce where the Rebels have high defense and use Pierce. You'll want to recruit a mix of drakes and saurians so that their neutrality doesn't become an advantage at any time of day. Take cheap shots when you can, because they will alwyas be taking cheap shots at you.<br />
<br />
===Drake Burner===<br />
This unit is a great weapon to take out Elvish Fighters and they absolutely massacre Woses. Effective in both melee and ranged combat, this unit is always useful against Rebels on attack or defense. He costs 21g though, and there are other units you will need to recruit to be sucessful.<br />
<br />
===Drake Clasher=== <br />
The only drake without a weakness to Pierce, this unit is great against Rebels. He will tear through Archers and he will beat EFs in a fight. He will overpower any Rebel and it's essential to have these guys in your force.<br />
<br />
===Drake Glider=== <br />
Good for their movement, and can be useful to get to those hard to reach hexes to get extra shots at Archers or Shamans. Recruit according to map need for scouts.<br />
<br />
===Drake Fighter=== <br />
Useful as a mobile fighter, the Fighter is what you'll want if there are 2 deperate battlefields within close flying range of each other. The ability to leave one battle to help the other is quite useful, which is true of Burners as well, though they move slower. For pure fighting power the Clasher is better, and he is hardier. If mobility is necessary on the map though, get 1 or 2 of these guys.<br />
<br />
===Saurian Augr=== <br />
I find these guys essential to fighting Rebels. This guy is the only easy way yuo'll be taking elves out of forest. Augrs have incredibly low hp, so keep them behind the line to heal your power units, or stick him in forest hexes your opponent will want. Using these guys as your first attackers at night will allow you to get their damage in and then move other units in fron of them and consequently heal.<br />
<br />
===Saurian Skirmisher=== <br />
Useful mainly against Scouts, Archers, and Mages at night, don't recruit too many of this unit even if you're tempted. They're fragile units<br />
<br />
=== Tactics ===<br />
On the first turn you'll want to recruit a Clasher, a Burner, an Augr, and a mix of other units like a Scout, another Clasher, or a Skirmisher. During daytime you'll want to deal as much damage as possible, as that's when you'll have the advantage. Elves fighting you will suffer massive return damage during the day. To help you out, keep your units away from places where the Rebels can use forest to attack you from, and remember to have your Augr(s) heal.<br />
<br />
At night you can still be aggresive with Augrs. You'll probably want to retreat your drakes slightly and put any Skirmishers (or even Clashers) you have up front on good terrain. Don't be afraid to keep a mobile unit up front either if it can survive 1 round of attacks; if it can do this and survive it will slow the progress of your enemy and you can easily fly the unit back behind your line to heal. Always make sure that the front line cannot be attacked from forest hexes if possible, though this won't be as big of a deal if you have several Augrs to cut through their defense. Don't be afraid to trade a Skirmisher for an Acher if you get a chance to kill one on poor terrain: you'll get a gold advantage as well as taking out the most dangerous unit the Rebels have against you.<br />
<br />
Another strategy is to strike hard at day and then completely retreat at night. Keep your units just out of reach of your opponent and allow them to come closer to your recruits to make your counter-attack swifter and more deadly. This strategy is often quite effective as it prevents your drakes from fighting at unfavorable TOD and it allows you to decide how tohe first battle takes place.<br />
<br />
Generaly your targets to kill will start with Archers, as they are the most deadly unit to your forces (especially to Clashers). Next you'll want to get rid of any low hp units your opponent has and any units on poor terrain making themselves targets. Try to keep your Clashers away from Shamen if possible (free Slow), and ignore Fighters if another unit presents itself as an equally appealing target. Elvish Fighters can't deal significant damage to your drakes without taking a good amount of return damage, so let them hurt themselves on you while you take out units that you won't receive much return damage from (Burners on Fighters at day though can be quite devastating).<br />
<br />
Genreally, pick your spots where the advantage presents itself when you can deal the most damage with little return damage if possible. Keep Elves from Forest hexes if possible, and use your advantagrous mobility.<br />
<br />
<br />
==Drakes v. Northerners==<br />
<br />
This matchup can be rather interesting. The main thing you generally worry about is the cheap northerner units and the expensive drake units. Drakes have much better units but unfortunately they are expensive. Usually when I lose vs. Northerners it is because of the sheer number of units they are capable of sending.<br />
<br />
===Drake Burner===<br />
A very useful unit during the day and even effective at night vs fighters and whelps and wolf riders due to their lack of ranged defense. And with at least 7-2 melee, they have the ability to defend their melee attacks. Be very careful with the number of burners you recruit though because they are rather expensive and you need to be able to defend against the shear number of units northerners are able to send.<br />
<br />
===Drake Clasher===<br />
I prefer the drake clasher over the drake fighter in most cases and especially when playing against northerners. The clasher is best to defeat those pesky and annoying assassins. Even though they cannot defend ranged attacks, their 6-4 pierce attack will definitely hurt an assassin as the assassin has -20% to pierce. Clashers have high amounts of HP and can are very effective in fighting northerners, even though it will normally be melee against melee much of the time.<br />
<br />
===Drake Glider===<br />
Personally, I use maybe one or two gliders in the original recruiting to get to villages quickly. I usually use them afterwords as a quick unit that can run around and aid in damage in order to kill and level other units. I'll also use them for gaining info on recruits. Perhaps I'll use one to capture an enemy village in hopes to distract an area that i feel i may be losing dominance in.<br />
<br />
===Drake Fighter===<br />
I try to stay away from fighters but if you need a unit and can't wait for an extra turn, fighters are good to recruit because they are quicker then clashers and have at least minor defense with their ranged attack, and occasionally offense when you just need to deal that little bit of extra damage to make the kill and can't afford to risk with your melee attack.<br />
<br />
===Saurian Augr===<br />
These units are pretty effective and very useful but do not keep them in the front of the battle. Use them behind other units to heal and to finish off with magical attacks. These units are easy to level and very effective with 8-3 magical and heal. Be careful with saurians because they do not have large amounts of hp.<br />
<br />
===Saurian Skirmisher===<br />
Because of their small amount of HP you should try to refrain from using skirmishers however they can be helpful at times. I generally get a couple in battle and attempt to level them. They are pretty effective level 2 units.<br />
<br />
=== Tactics ===<br />
Your first depend highly on the map, exp percentage, gpv. As a general rule of thumb I try to get all villages on the 3rd turn and then recruit depending on the units i see from my opponent.<br />
<br />
<br />
== Drakes v. Drakes ==<br />
This is possibly the deadliest mirror match in the game. Saurians have low hp, but deal good damage to their Drake counterparts. You'll want a good mix of both units as you'll likely be fighting at all times of the day.<br />
<br />
=== Drake Burner === <br />
Generally bad recruit in this matchup. Burners cannot do significant damage to other Drakes, though they do get free shots on Clashers. They can also torch any Saurians found on bad terrain, which is unlikely, though this is probably their greatest use.<br />
<br />
===Drake Clasher=== <br />
This unit should be the majority of your forces. Dealing heavy Pierce damage and having the most hp out of any recruit (as well as not having a negative Pierce resistance), makes him the beast of burden in this matchup. Hope that yours get the Strong and Resiliant traits and his get the Quick and Intelligent traits. He will beat Fighters and Burners 1v1, and the only units he needs to fear are Augrs and other Clashers, and Skirmishers at night.<br />
<br />
===Drake Glider=== <br />
As like the Burner, this unit is just a poor recruit. It has no upside other than the inconsequential Marksman on his breath attack. Do not recruit them unless the map is huge.<br />
<br />
===Drake Fighter=== <br />
Not the best recruit, but he can be handy if the map makes Clashers slow. They can also tear Augrs to pieces, so if Augrs become a problem a few of these are an alright recruit. Also good as a replacement for the Glider for village grabbing, especially if Quick.<br />
<br />
===Saurian Augr=== <br />
An essential unit. Their Cold magic deals 9-3 damage to Drakes at night, ripping them to pieces. Their healing will also be essential if used properly, as this is a bloody fight. Be careful not to over-recruit these guys, as they are quite weak in defense against any unit.<br />
<br />
===Saurian Skirmisher=== <br />
These guys are also a good force to have, but again, not too many. Your Pierce damage should mainly come from your Clashers, but a couple of Skirmishers to attack opposing Augrs as well as Drakes at night can prove very valuable, especially with their high defence. Their ability to get behind the enemy lines gives you more hexes to attack the enemy from.<br />
<br />
=== Tactics ===<br />
On the first turn you'll want several Clashers, a couple Saurians, and possibly a Fighter or Glider to grab villages. Village distribution will determine if you need a Glider or not, as well as map size.<br />
<br />
At night, use your Augrs on the opposing Clashers first, using your Clashers and Skirmishers to finish up. Make sure to protect your Augrs though, as they die easily, even at night. Killing a Clasher will remove a major threat come daytime, as well as net you 19g. If you must trade a Skirmisher to kill a Clasher at night, it can often be worth it.<br />
<br />
At day you'll want to attack first with your Augrs again. Their Cold magic will do 6-3 in daytime to Drakes, which is still quite powerful. Follow up with your now incredibly deadly Clashers: Strong Clashers in day will deal 10-4 to any non-Clasher Drake.<br />
<br />
Genreally, this is the danger level of your enemy units: Clasher, Augr, Skirmisher, Fighter, Burner, Glider. You may choose to either target the deadliest units first (Clashers being easy targets for Augrs), or go for the weaker units first to give yourself a monetary advantage quickly, while receiving little retaliation damage. Either strategy can work, and levelling an Augr can prove exceptionally deadly to your opponent. Intelligent Augrs level within 2 kills. Whichever strategy you use, be sure to kill, and not just hurt your opponent, because your opponent will flee and have the unit return to fight again.</div>Db0https://wiki.wesnoth.org/index.php?title=How_to_play_Drakes&diff=20911How to play Drakes2008-01-18T14:18:44Z<p>Db0: Marked as obsolete and fixed formatting</p>
<hr />
<div>{{Needs update}}<br />
<br />
==General Drake Strategies==<br />
On the first turn when you have a random opponent it is good to get a mixture of units. A Scout, Fighter, Burner, Clasher, and Skirmisher would be an example of such a recruit. When you discover what faction your opponent is, go to the appropriate section below for more advice.<br />
Drakes generally win by dealing the most damage. your units are big and deadly, but they're also more expensive than most. Take advantage of having the best mobility in the game by placing your units in hard-to-access places such as behind mountains or across water from your opponent. You'll have the <br />
advantage by being able to decide when and where battles will happen. Your major disadvantage is how easily your units will take damage. Because of this you'll usually want to be the aggressor in battle to kill a unit or two, get damaged, and then flee to heal. Having a mobile healer helps with this if villages are sparse.<br />
<br />
Since you trade your defense for other abilities, Fighting battles where your opponent has low defense will give you a greater advantage than it will any other faction. If your opponent refuses to leave 70% defensive terrain you'll probably want an Augr or 2 to attack at night.<br />
<br />
<br />
<br />
==Drakes v. Undead==<br />
Playing as Drakes in this matchup is some of the most fun for me. The deadliest matchup in Wesnoth, this game will result in lots of casualties, and quickly. Both factions are incredibly offensive and of opposite alignment. Skeletons are weak to Fire, Adepts to melee, and Drakes are weak to Pierce and Cold. Basically, whoever is left standing wins.<br />
<br />
===Drake Burner=== <br />
You'll want a coulpe of these to burn any Skeletons, Ghosts, Bats, WCs, Ghouls, well, basically any unit it can burn other than Adepts. Even burning Archers at daytime isn't a bad idea as it's the most effective way to kill them. The most expensive unit you can recruit, you'll want to recruit them sparingly and keep them alive.<br />
<br />
===Drake Clasher=== <br />
With Strong Clashers dealing an awesome 9-4 Pierce damage during the day, these are great Adept butchering units, as well as damage soakers. Due to their price you'll want to avoid recruiting too many. Level one of these into Gladiator and skeletons won't pose a threat anymore, even at night.<br />
<br />
===Drake Glider=== <br />
Dealing Impat melee and Fire ranged, these guys won't be worthless at any point, but their damage is still very weak compared to what the rest of your army can do. If you get one to level 2 you'll be able to take advantage of a current glitch if the unit.cfg that removes the unit's weakness to Cold. Even with the presence of the glitch, recruiting more than 1 isn't smart.<br />
<br />
===Drake Fighter=== <br />
A good Adept killer moreso for their mobility than damage, the presence of a Fire ranged gives them some slight flexibility in their usage.<br />
<br />
===Saurian Augr=== <br />
Don't recruit this unit when fighting Undead.<br />
<br />
===Saurian Skirmisher=== <br />
This little guy actually plays a very crucial role in your army against Undead. If the Undead didn't have Adepts you'd simply roll right over them. Well, since Adepts are such a necessary unit in their attack against you you'll need to take them out, and you'll need to be able to do that under any circumstances. The Skirmisher gives you a weapon that not only can hustle around enemy units to strike protected DAs, but he also gets better at night - the time when you'll want them to be dead the fastest. Having a couple of these guys around can really save your ass.<br />
<br />
===Tactics===<br />
On the first turn you'll want a couple Burners, a Fighter or Clasher, a Skirmisher, and another useful unit. If your opponent gets mass Skeleton Archers, get Clashers and Burners. If he gets lots of Adepts get Skirmishers and Fighters. If he likes Ghouls & Ghosts, you'll want Burners.<br />
<br />
Deal as much damage as you can at day, because you won't be dealing much at night. Keep Burners in front as they'll do great return damage to any Adepts that try to counter-attack you during your daytime assault: they'll do 12-2 while you do 7-4. Adepts have 28 base hp.<br />
<br />
At night simply retreat out of Adept range and have Skirmishers ready to take out any that get too close. Even if you have to retreat from a village to avoid Adepts it's worth it. You may lose a few gold, but it shouldn't add up to the 16+ you'd lose for a lost Drake. If your opponent takes the village and moves closer he'll also be closer to your new recruits to counter-attack. As day turns chase them away and you should net some gold for the units your opponent will have to replace.<br />
<br />
<br />
==Drakes v. Rebels==<br />
Playing Drakes in this matchup can be difficult. Your units have low defense and are weak to Pierce where the Rebels have high defense and use Pierce. You'll want to recruit a mix of drakes and saurians so that their neutrality doesn't become an advantage at any time of day. Take cheap shots when you can, because they will alwyas be taking cheap shots at you.<br />
<br />
===Drake Burner===<br />
This unit is a great weapon to take out Elvish Fighters and they absolutely massacre Woses. Effective in both melee and ranged combat, this unit is always useful against Rebels on attack or defense. He costs 21g though, and there are other units you will need to recruit to be sucessful.<br />
<br />
===Drake Clasher=== <br />
The only drake without a weakness to Pierce, this unit is great against Rebels. He will tear through Archers and he will beat EFs in a fight. He will overpower any Rebel and it's essential to have these guys in your force.<br />
<br />
===Drake Glider=== <br />
Good for their movement, and can be useful to get to those hard to reach hexes to get extra shots at Archers or Shamans. Recruit according to map need for scouts.<br />
<br />
===Drake Fighter=== <br />
Useful as a mobile fighter, the Fighter is what you'll want if there are 2 deperate battlefields within close flying range of each other. The ability to leave one battle to help the other is quite useful, which is true of Burners as well, though they move slower. For pure fighting power the Clasher is better, and he is hardier. If mobility is necessary on the map though, get 1 or 2 of these guys.<br />
<br />
===Saurian Augr=== <br />
I find these guys essential to fighting Rebels. This guy is the only easy way yuo'll be taking elves out of forest. Augrs have incredibly low hp, so keep them behind the line to heal your power units, or stick him in forest hexes your opponent will want. Using these guys as your first attackers at night will allow you to get their damage in and then move other units in fron of them and consequently heal.<br />
<br />
===Saurian Skirmisher=== <br />
Useful mainly against Scouts, Archers, and Mages at night, don't recruit too many of this unit even if you're tempted. They're fragile units<br />
<br />
=== Tactics ===<br />
On the first turn you'll want to recruit a Clasher, a Burner, an Augr, and a mix of other units like a Scout, another Clasher, or a Skirmisher. During daytime you'll want to deal as much damage as possible, as that's when you'll have the advantage. Elves fighting you will suffer massive return damage during the day. To help you out, keep your units away from places where the Rebels can use forest to attack you from, and remember to have your Augr(s) heal.<br />
<br />
At night you can still be aggresive with Augrs. You'll probably want to retreat your drakes slightly and put any Skirmishers (or even Clashers) you have up front on good terrain. Don't be afraid to keep a mobile unit up front either if it can survive 1 round of attacks; if it can do this and survive it will slow the progress of your enemy and you can easily fly the unit back behind your line to heal. Always make sure that the front line cannot be attacked from forest hexes if possible, though this won't be as big of a deal if you have several Augrs to cut through their defense. Don't be afraid to trade a Skirmisher for an Acher if you get a chance to kill one on poor terrain: you'll get a gold advantage as well as taking out the most dangerous unit the Rebels have against you.<br />
<br />
Another strategy is to strike hard at day and then completely retreat at night. Keep your units just out of reach of your opponent and allow them to come closer to your recruits to make your counter-attack swifter and more deadly. This strategy is often quite effective as it prevents your drakes from fighting at unfavorable TOD and it allows you to decide how tohe first battle takes place.<br />
<br />
Generaly your targets to kill will start with Archers, as they are the most deadly unit to your forces (especially to Clashers). Next you'll want to get rid of any low hp units your opponent has and any units on poor terrain making themselves targets. Try to keep your Clashers away from Shamen if possible (free Slow), and ignore Fighters if another unit presents itself as an equally appealing target. Elvish Fighters can't deal significant damage to your drakes without taking a good amount of return damage, so let them hurt themselves on you while you take out units that you won't receive much return damage from (Burners on Fighters at day though can be quite devastating).<br />
<br />
Genreally, pick your spots where the advantage presents itself when you can deal the most damage with little return damage if possible. Keep Elves from Forest hexes if possible, and use your advantagrous mobility.<br />
<br />
<br />
==Drakes v. Northerners==<br />
<br />
This matchup can be rather interesting. The main thing you generally worry about is the cheap northerner units and the expensive drake units. Drakes have much better units but unfortunately they are expensive. Usually when I lose vs. Northerners it is because of the sheer number of units they are capable of sending.<br />
<br />
===Drake Burner===<br />
A very useful unit during the day and even effective at night vs fighters and whelps and wolf riders due to their lack of ranged defense. And with at least 7-2 melee, they have the ability to defend their melee attacks. Be very careful with the number of burners you recruit though because they are rather expensive and you need to be able to defend against the shear number of units northerners are able to send.<br />
<br />
===Drake Clasher===<br />
I prefer the drake clasher over the drake fighter in most cases and especially when playing against northerners. The clasher is best to defeat those pesky and annoying assassins. Even though they cannot defend ranged attacks, their 6-4 pierce attack will definitely hurt an assassin as the assassin has -20% to pierce. Clashers have high amounts of HP and can are very effective in fighting northerners, even though it will normally be melee against melee much of the time.<br />
<br />
===Drake Glider===<br />
Personally, I use maybe one or two gliders in the original recruiting to get to villages quickly. I usually use them afterwords as a quick unit that can run around and aid in damage in order to kill and level other units. I'll also use them for gaining info on recruits. Perhaps I'll use one to capture an enemy village in hopes to distract an area that i feel i may be losing dominance in.<br />
<br />
===Drake Fighter===<br />
I try to stay away from fighters but if you need a unit and can't wait for an extra turn, fighters are good to recruit because they are quicker then clashers and have at least minor defense with their ranged attack, and occasionally offense when you just need to deal that little bit of extra damage to make the kill and can't afford to risk with your melee attack.<br />
<br />
===Saurian Augr===<br />
These units are pretty effective and very useful but do not keep them in the front of the battle. Use them behind other units to heal and to finish off with magical attacks. These units are easy to level and very effective with 8-3 magical and heal. Be careful with saurians because they do not have large amounts of hp.<br />
<br />
===Saurian Skirmisher===<br />
Because of their small amount of HP you should try to refrain from using skirmishers however they can be helpful at times. I generally get a couple in battle and attempt to level them. They are pretty effective level 2 units.<br />
<br />
=== Tactics ===<br />
Your first depend highly on the map, exp percentage, gpv. As a general rule of thumb I try to get all villages on the 3rd turn and then recruit depending on the units i see from my opponent.<br />
<br />
<br />
=== Drakes v. Drakes ===<br />
This is possibly the deadliest mirror match in the game. Saurians have low hp, but deal good damage to their Drake counterparts. You'll want a good mix of both units as you'll likely be fighting at all times of the day.<br />
<br />
=== Drake Burner === <br />
Generally bad recruit in this matchup. Burners cannot do significant damage to other Drakes, though they do get free shots on Clashers. They can also torch any Saurians found on bad terrain, which is unlikely, though this is probably their greatest use.<br />
<br />
===Drake Clasher=== <br />
This unit should be the majority of your forces. Dealing heavy Pierce damage and having the most hp out of any recruit (as well as not having a negative Pierce resistance), makes him the beast of burden in this matchup. Hope that yours get the Strong and Resiliant traits and his get the Quick and Intelligent traits. He will beat Fighters and Burners 1v1, and the only units he needs to fear are Augrs and other Clashers, and Skirmishers at night.<br />
<br />
===Drake Glider=== <br />
As like the Burner, this unit is just a poor recruit. It has no upside other than the inconsequential Marksman on his breath attack. Do not recruit them unless the map is huge.<br />
<br />
===Drake Fighter=== <br />
Not the best recruit, but he can be handy if the map makes Clashers slow. They can also tear Augrs to pieces, so if Augrs become a problem a few of these are an alright recruit. Also good as a replacement for the Glider for village grabbing, especially if Quick.<br />
<br />
===Saurian Augr=== <br />
An essential unit. Their Cold magic deals 9-3 damage to Drakes at night, ripping them to pieces. Their healing will also be essential if used properly, as this is a bloody fight. Be careful not to over-recruit these guys, as they are quite weak in defense against any unit.<br />
<br />
===Saurian Skirmisher=== <br />
These guys are also a good force to have, but again, not too many. Your Pierce damage should mainly come from your Clashers, but a couple of Skirmishers to attack opposing Augrs as well as Drakes at night can prove very valuable, especially with their high defence. Their ability to get behind the enemy lines gives you more hexes to attack the enemy from.<br />
<br />
=== Tactics ===<br />
On the first turn you'll want several Clashers, a couple Saurians, and possibly a Fighter or Glider to grab villages. Village distribution will determine if you need a Glider or not, as well as map size.<br />
<br />
At night, use your Augrs on the opposing Clashers first, using your Clashers and Skirmishers to finish up. Make sure to protect your Augrs though, as they die easily, even at night. Killing a Clasher will remove a major threat come daytime, as well as net you 19g. If you must trade a Skirmisher to kill a Clasher at night, it can often be worth it.<br />
<br />
At day you'll want to attack first with your Augrs again. Their Cold magic will do 6-3 in daytime to Drakes, which is still quite powerful. Follow up with your now incredibly deadly Clashers: Strong Clashers in day will deal 10-4 to any non-Clasher Drake.<br />
<br />
Genreally, this is the danger level of your enemy units: Clasher, Augr, Skirmisher, Fighter, Burner, Glider. You may choose to either target the deadliest units first (Clashers being easy targets for Augrs), or go for the weaker units first to give yourself a monetary advantage quickly, while receiving little retaliation damage. Either strategy can work, and levelling an Augr can prove exceptionally deadly to your opponent. Intelligent Augrs level within 2 kills. Whichever strategy you use, be sure to kill, and not just hurt your opponent, because your opponent will flee and have the unit return to fight again.</div>Db0https://wiki.wesnoth.org/index.php?title=How_to_play_Knalgans&diff=20910How to play Knalgans2008-01-18T14:09:34Z<p>Db0: Marked as obsolete - Remove if inaccurate</p>
<hr />
<div>{{Needs update}}<br />
==General Knalgan strategies:==<br />
On the first turn when you have a random opponent it is good to get a mixture of units that will be good in any situation. A Gryphon, a Dwarvish Fighter (DF), a Dwarvish Thunderer (DT), a Poacher, and a Dwarvish Ulfserker (DU) recruit would be an example of such a recruit. When you discover what faction your opponent is, go to the appropriate section below for more advice.<br />
<br />
Obviously, you'll want to stay in hills and mountains with Dwarves at all times, unless on village. With Outlaws, stay on non-grass terrain - mostly forests as your Dwarves will occupy the hils and mountains. Use Gryphons to plug other hexes with his 50% defense.<br />
<br />
Neutrality and high defense, hp and resists make your Dwarves a powerful force. There is no time they are weak if they are on the right terrain. Your units can endure more blows, and more attempted blows than most other units in the game. Use this to your advantage and finish off the weaker opposing units and then ZOC and heal if you can. Ulfs are great utility killers against any unit with weak or no melee attacks. Remember they cost 19, so use them wisely.<br />
<br />
With Knalgans, generally counter-attacks are the best attacks. They can sustain a lot of damage before they die, so the first wave of an opponents attack is likely not to kill any of your units. This will allow you to pick off particular units you wish to get rid of before your opponents next turn. Focus on killing their high damage units first, if possible, if not, kill and weaken as many units as possible to decrease the chances of success for your opponent on his second turn of the attack.<br />
<br />
<br />
<br />
==Knalgans versus Undead==<br />
If you know you're playing against Undead, the smartest thing to do is to recruit an ulfserker. He will automatically kill any Dark Adept (DA) that he attacks. He is also good for taking on Ghosts during day, or even Ghouls. Here are units you will want to recruit to counter Undead units:<br />
<br />
'''Dwarvish Ulfserker:''' counters Dark Adepts, and most other UD units in daytime. Don't recruit many unless the opponent has no Skeletons. Skeletons can kill an ulf even in day. Ulfs are also expensive, so you don't want to trade them 1-for-1 with Undead units, unless you get a Ghost.<br />
<br />
'''Dwarvish Fighter:''' counters Skeletons, Skele Archers, and is just a good high hp unit that can soak up nighttime damage for your front line.<br />
<br />
'''Dwarvish Guardsman:''' Do not recruit this unit if you are fighting Undead. His Pierce damage is less useful than even Blade against Undead. His low damage also makes him a bad unit to counter-attack with.<br />
<br />
'''Dwarvish Thunderer:''' This is a good unit to have in your front line in mountains. His 70% defense and decent resists should keep him alive from nighttime Skele attacks, and his 18-1 ranged will make Dark Adepts take a risk to come after you. They are also good to attack Ghosts, as 2 ranged hits will kill them - which even works at night.<br />
<br />
'''Thief:''' Do not recruit this unit when fighting against Undead.<br />
<br />
'''Poacher:''' A utility unit versus Undead. It's good for finishing Ghosts and killing Walking Corpses. It can also be used to pick at Skeletons and Ghouls. Money is spent better on other units, but don't forget that he may be useful.<br />
<br />
'''Footpad:''' This weak character is really only useful versus Undead as a cheap scout. His Impact damage is good against Skeletons and Skele Archers, and he has the added bonuses of being Chaotic (which deals more damage when Undead try to advance at night), and being hard to hit. His best utility is his ranged attack versus Skeletons at night, and that's only 6-2. Recruiting 1 on your first turn to grab villages is likely the only use you'll get from this guy, unless you need a unit to occupy forest hexes (which dwarves do very poorly at 30% defense).<br />
<br />
'''Gryphon:''' Probably not the best expenditure of gold versus Undead, but they do serve many purposes that can justify their cost: they give extended view of battle, allowing you to know what is coming and to counter appropriately; they are good for getting behind enemy lines to finish hurt Dark adepts; They serve as good ZOC units for plains and forest hexes. Unlike the Footpad they do not have negative resistance to Blade and Pierce - the weapons of skeletons.<br />
<br />
Generally you'll want a good dose of Dwarvish Fighters, a few Thunderers, throw in a Gryphon for vision/utility, an ulf or two, and maybe a Poacher or Footpad. Dwarfs are really what you want to use mostly for their high hp and decent resists. This helps them survive the nightttime onslaught, and their neutrality will give them good damage in defense and also to press the attack at day. Don't be afraid to ulf a ghost in daytime - you won't see the CTK, but it will be good if your ulf is at high hp - and it will be nearly certain if he is Strong.<br />
<br />
==Knalgans versus Rebels==<br />
This is one of the trickiest matchups to play. Both factions are Neutral, so neither has an advantageous time of day to attack (with their main units). To win this battle you will need smart recruits and good unit placement, as well as a little luck; the same goes for your opponent. Knalgans have what I would consider a slight advantage with the "one unit must die" Ulfsersker, but Rebel defense as well as heal, slow, and magic could factor to your demise. Look for opportunities grab mountains and hills, especially if the have no forest next to them. Forests are your biggest enemy, so occupy them with your Outlaw counterparts or Gryphons.<br />
<br />
'''Dwarvish Ulfserker:''' counters Mages, Elvish Shaman, and often times Elvish Archers. Again, don't recruit too many of these, as Elvish Fighters will easily come back to finish you up, and they are 5 gold cheaper. If you get a chance to take out a mage, do so. Not only will you gain 1 gold in attrition, but another unit will likely have to expose itself or get hurt to finish you off. Elvish Archers should be #2 on the "to kill" list, and they are sometimes worth jeopardizing your ulf for if you catch one of them off of forest. Again, the reasoning is you only lose 2 gold in the trade and the opponent must waste moves and usually hp in order to finish you. Again, they may also expose themselves. You might be able to get away with ulfing Woses if it's nighttime and you're in mountain. Make sure he isn' a Quick, Intelligent Ulf, and check the CTK as always.<br />
<br />
'''Dwarvish Fighter:''' Again, these are the meat of your forces. Any front without one of these will succumb to Elvish Fighters. Dwarfs beat Elves 1-on-1, but they are more expensive. They are good damage soakers and damage dealers. Stay on preferred terrain at all times.<br />
<br />
'''Dwarvish Guardsman:''' Guardsmen are great for holding frontline villages and chokepoints - with backup. A lone Guardsman can hold out for a turn, if lucky 2 or 3, while on a town, but he deals very little damage in return, especially against the ranged specialized Rebels. Recruit 1 if necessary, and no more than 2. They just aren't worth the lack of offensive/counter-attack units.<br />
<br />
'''Dwarvish Thunderer:''' Another staple. This unit is great against Rebels with luck. Stick him on a mountain and Elves will hurt themselves trying to remove you. They aren't so great for dependable offense, but their counter-attacks are great.<br />
<br />
'''Thief:''' Unlike when fighting Undead, you'll want 1 or 2 of these guys depending on your play style. At night, a combo of thieves can destroy Woses, Elvish Archers, Mages, and Shaman. Keep them in the forest hexes your opponent will want, but not in daytime.<br />
<br />
'''Poacher:''' I like using Poachers to fill up forest hexes and to attack Elvish Fighters. Their main usefulness is as a counter-attacking utility unit to grab forest and press at night. They are cheap, somewhat weak, but deal more dependable offensive damage than the Thunderer. 5-4 at night is equivalent to a 17 gold Elvish Archer, and you only spend 14. <br />
<br />
Whichever Chaotic unit if any you use, make sure to protect them at day.<br />
<br />
'''Footpad:''' Don't recruit this unit when fighting Rebels.<br />
<br />
'''Gryphon:''' These monsters are more useful against Rebels than Undead. Their utility lies in fighting any water battles against the weak Merman Hunters, scouting, taking opportunistic attacks agaist poorly placed Elves, and if you find a hurt Wose, you may cosider attacking one - even though Gryphons have a weakness for Impact. At night they do essentiall equal damage to each other, and you may not be able to get the finishing blow with one of your slower units. Do so as a calculated risk when you only need 1 hit to kill. Otherwise it's quite a risk.<br />
<br />
Recruit a Gryphon (maybe 2 if there's enough water or the towns are spread out) first turn along with a mix of DFs, DTs, a DU, and perhaps a DG, or some Outlaws. If your opponent purchases scouts, feel lucky - they are next to useless against you. Beware of ambushes, and don't scout unsure forests with your Gryphon in daytime. Take as much tactical forest as you can with the appropriate units, and make a stranglehold on mountains. Ulf when you get a good chance, and be ready to counter in day as well as pressing at night. Each battle will play out differently in this matchup according to what your opponent recruits, so see what he has early, and keep track of any Woses. Also, do not let your Ulf be slowed or he is certainly dead.<br />
<br />
==Knalgans versus Drakes==<br />
These guys are big and nasty. They will burn and freeze you. Thunderers will be your main weapon, but he will require support units as well.<br />
<br />
'''Dwarvish Ulfserker:''' Good for killing Augrs, scouts, and maybe Burners. Not really a good choice against Drakes in general, but can serve purposes.<br />
<br />
'''Dwarvish Fighter:''' A good unit to use against saurians, but generally the DF is not how you want to go against Drakes.<br />
<br />
'''Dwarvish Guardsman:''' Guardsmen are worth the price against Drakes. They're Pierce goes through their resistance, and a Strong one actually gets an additional point of damage on top of the point he gets for having the Strong trait (but not against Clashers). A couple of these are an alright buy, especially if you plop them on villages.<br />
<br />
'''Dwarvish Thunderer:''' This should be your unit of choice versus Drakes. A DT does 20-1 damage to Drakes in ranged, and Burners will do (6/5/3)-4 damage in return. DTs have much better defense than Burners, but do suffer from having 8 less hp. DTs have the benefit of costing 4 less gold though. You'll want to use their "luck" attack on the easily hit Drakes as much as possible. Thunderers should be the meat of your army.<br />
<br />
'''Thief:''' Not really useful against the Drakes, they are best used to counter Saurian Augrs, which are better countered by using Dwarven Fighters. No real need to recruit any.<br />
<br />
'''Poacher:''' Another great unit against Drakes. Their attack at night deals a good 5-4 against all Drakes. Having better defense on Forest and villages, 1 or 2 of these guys aren't a bad idea.<br />
<br />
'''Footpad:''' Don't recruit this unit when fighting Drakes.<br />
<br />
'''Gryphon:''' Useful for early village grabbing, Gryphons also can be used against the weak Saurians or Drake Burners. These flyers are probably the only way you'll hunt down retreating hurt Drakes. Don't recruit too many due to their cost and lack of a ranged defensive weapon. Drakes can ZOC these units far better than any other faction.<br />
<br />
Recruit a Gryphon, and a good mix of DTs, DGs, a Poacher or 2, and maybe a DF. Your opponent will likely get some Saurian mages to take away your high defense advantage, so having that DF around to take them out is usually quite helpful along with the Gryphon. Basically, recruit Pierce, Pierce, and more Pierce. Maintain your advantageoud defensive terrain as much as possible, because if you don't, and you put yourself on an even playing field in that respect, you will quickly be torn apart by the Drakes superior daytime damage and hp. The daytime onslaught will be brutal, so prepare for a counter-attack and try to keep your Guardsmen up front to utilize their Steadfast. It will be the difference between 7-4 and 6-4 daytime Burner damage and 6-4 to 5-4 daytime non-Strong Clasher damage. The Guardsmen also have 8 more hp than the Thunderers. If you can level a Guardsman (with 4 kills at 70% xp, or 3 kills and 1 battle if he's Intelligent), you will have a nearly undefeatable roadblock to use at your disposal.<br />
<br />
==Knalgans versus Knalgans==<br />
A tough battle. Dwarves have great defense, and no way to combat great defense. The high hp and the resists will make this a game needing a lot of strikes to kill. Don't think you'll be able to rush in and win - you're going to need intelligent unit placement and again, some luck. Focus on levelling (non-Gryphon) units if possible as the added damage will be needed.<br />
<br />
'''Dwarvish Ulfserker:''' As always, one of these utility guys isn't a bad buy. Catch a thunderer off his perch, or a Thief or Poacher in daytime, and that's one less unit to deal with.<br />
<br />
'''Dwarvish Fighter:''' One of these is a must. Use it against any unit. These guys are hard to kill.<br />
<br />
'''Dwarvish Guardsman:''' Use these to hold villages and frustrate your opponent.<br />
<br />
'''Dwarvish Thunderer:''' Use these to siege enemy villages or poke at DFs or Gryphons.<br />
<br />
'''Thief:''' Not a good buy unless used to counter Thunderers and Poachers. Their Blade attack does little to Dwarves unless backstabbing at night (8-3). Better to use DFs for melee.<br />
<br />
'''Poacher:''' An alright cheap buy for ranged forest grabbing.<br />
<br />
'''Footpad:''' Don't buy this unit even if your opponent is bothering you with Gryphons. You can get 3+ Footpads for the price of 2 Gryphons, but it's not worth it. The weakness to Impact guarantees at least a 4-2 attack with these guys even in daytime, but unfortunately, unless you get bonus hp from traits, they will die in 2 hits from Gryphons, so it is still a risky buy - especially since they are useless against all other Knalgans. Just say no once again.<br />
<br />
'''Gryphon:''' Useful as your only scout unit. Use these to get behind enemy lines to village steal, kill the wounded, or to ZOC a Dwarf on bad terrain. These guys are also good forest and plains holders for crucial areas that your Dwarves will fare poorly on.<br />
<br />
Recruit a Gryphon, a DG, a DT, a DF, probably a DU, and a mix of other useful units. This game will be won through maintaining the hills and mountain, getting and keeping a money advantage, levelling a unit, and by waiting for your opponent to take a risk that they shouldn't. Keep them off of your mountains at any cost. If they get there you will spend precious moves, attacks, and hp trying to take them off. It's usually better to ignore enemies on mountains than to fight them.<br />
<br />
==Knalgans versus Loyalists==<br />
Defend in day, strike at night. That's how the battle will go. Beware the Horseman and Mage and be prepared to counter these heavy daytime hitters. Again, an Ulf can be your best friend, especially if you can catch a Horseman at night or a Mage.<br />
<br />
'''Dwarvish Ulfserker:''' If you get one, don't get it until turn 2 or later. Grabbing one in your initial recruit will only make him be impotent during the first few truns of daytime. Ulfs you will use to kill Mages, grind up horse meat at night, as well as get rid of Bowmen - though they shuoldn't be recruiting many. You shouldn't need more than 1 unless they go mad with Mages.<br />
<br />
'''Dwarvish Fighter:''' Good to fight Spearmen, having these guys is a necessity. These are also your best unit to defend against Heavy Infantry.<br />
<br />
'''Dwarvish Guardsman:''' Get one of these guys. These will make your front line immune to Horsemen. Also useful to counter-attack Cavalry, Mages, and Bowmen. If HI get close enough, milk xp off of them with your ranged. The level will come faster than you expect.<br />
<br />
'''Dwarvish Thunderer:''' Get 1 or 2. Good against essentially all of the Loyalist units, the Pierce ranged is even better against the 2 mounted units.<br />
<br />
'''Thief:''' These guys can be used against most Loyalist units at night, but avoid trying to backstab Spearmen. Even at night their firststrike can get nasty on this low hp unit. I recommend the Poacher instead of this guy.<br />
<br />
'''Poacher:''' A great unit to counter-attack Loyalists and press at night. His multiple strikes are of better use against the high defense Fencer, though his ranged Pierce is best against the mounted units. His attack does a modest 3-4 to HI at night (compared to a Thunderers 11-1), and this unit that you'll want to use against Spearmen outside of day as well. Although they will be weak during day, they serve many purposes and are well worth the 14 gold.<br />
<br />
'''Footpad:''' Do not recruit this unit when fighting Loyalists.<br />
<br />
'''Gryphon:''' Useful as scouts mainly, you can use these to run down hurt horses, go for 1-attack-kills on Fencers (9% chance if they have no bonus hp), or again, to try to hold important grassland hexes. Beware during day though, as HI, Mages, and Horsemen can all tear Gryphons apart quickly. Recruit no more than 1.<br />
<br />
Recruit a DF, a DT, a DG, and a Gryphon depending on the layout of villages. Fill out your army with what you think will serve you best for that particular battle. Water battles will be nearly pointless. Cheap Mermen with higher defense will easily rout your Gryphon(s). Avoid sea battles unless you can taunt a Merman within range of a ranged unit (who can stand on decent terrain). A Gryphon's extra sight is good for spotting long range Horsemen, so it usually is worth having one around, but recruit no more than one. They don't counter any unit very cost-efficiently, so use it primarily as a scout and utility unit.<br />
<br />
You'll want to press as hard as you can at night, moreso than even against Drakes. The reason for this is that Loyalists have no level 1 Neutral or Chaotic units. Every unit the opposing player has will suffer a penalty at night - unless he has a Sergeant behind his front line. Because of this possibility, don't press too close to his castle until you have maintained a monetary advantage, as you will start losing units more rapidly when he comes back at you with an additional +25%. Put your guardsman up front - this will dissuade any Charges. Keep a DF or DU nearby in case the player chooses to siege you with Mages. Spearmen that attack a DG in day will deal nearly equal damage to each other, which can add up quickly. counter any advance with Thunderers and Poachers. Don't expose your Dwarves to poor terrain or they will die.<br />
<br />
You'll want to whittle away at HI with Poachers and DTs and you'll want to give the killing blow to a Fighter. Upgrading DFs should be your #1 priority as they are your best defense and counter to the easy Spearman spam. The massive hp on the level 2 will also give it the ability to withstand attacking HI and Mages.<br />
<br />
Basically, Loyalists have an incredible amount of versatility. You'll have to play smart and counter-attack very well in order to win. Deal free damage when you can, and limit the number of hexes you can be attacked from - especially during day. Start commencing your attack before night actually breaks. You'll want to maximize your advantage over those 2 turns, so make sure they don't creep away before night hits. As always, stay on good terrain, and make sure Fencers can't skirmish around to kill any weak units you may be hiding.<br />
<br />
==Knalgans versus Northerners==<br />
The biggest problem you will have with Northerners will be their numbers. Northies will gladly trade units with you and gain a monetary advantage. Make them depend on luck by staying on good terrain, and their high upkeep may start to become a factor.<br />
<br />
'''Dwarvish Ulfserker:''' Recruit one of these guys if you're really having a problem finishing their units off, or your opponent likes to use Assassins. He's expensive, and Northerners are melee oriented, so most of their units will be able to take a majority of this units hp away, if not kill him. Assassins Poison will quickly deteriorate your army's hp though, so having one may prove valuable. Since Assassins cost 17 gold you'll only lose 2 in attrition, and you'll likely take lots of hp from another unit with you.<br />
<br />
'''Dwarvish Fighter:''' Again a necessity. His damage dealt in defense is how you'll deal a majority of your damage. If possible, get a rotation of these guys in the front line. You'll deal more damage than your opponent on average, but he will come with more units - 4 Grunts cost the same as 3 DFs.<br />
<br />
'''Dwarvish Guardsman:''' Another good guys to have 1 of if not more. He can survive nighttime assaults better than the fighter, and will still do respectable damage back to the enemy. Use your ranged attack on Grunts to make them turn around and heal.<br />
<br />
'''Dwarvish Thunderer:''' Nice to have. Their combination of good resists and ranged damage make them good counter-attackers. For cheaper ranged counter-attackers, use Poachers as they will also be used to hold forest hexes. Recruiting DTs may crowd your hill hexes, especially since that's what the Northies will be grabbing.<br />
<br />
'''Thief:''' Not a great buy against Northies. His melee only nature along with his Chaotic alignment make him most effective in the same way Northeners are. Avoid the urge to recruit these guys.<br />
<br />
'''Poacher:''' Again, these guys you'll want to recruit a few of. When the Northies come after you at night, you can make a strong counter-attack with their 5-4 ranged. <br />
<br />
'''Footpad:''' This guy can be a utility unit against Northerners, but the money is better spent elsewhere. Footpads can harass Grunts and Wolfs, take forest hexes, and block Assassins from poisoning your Dwarves. Not the best buy, but you may be able to get your money's worth.<br />
<br />
'''Gryphon:''' Again, it's usually good to have one of these guys to scout, plug up grassland, and be a defensive damage dealer. He's also good for trapping/killing Assassins and being a target for their poison.<br />
<br />
The biggest thing you need to worry about will be Poison. If you get a good foothold on mountains and hills, Poison will be the weapon of choice to knock you offyour perch. Be ready to fill in with a replacement unit, and try to kill assassins before any other units. Melee strikes will have to get through your resistance - poison does not. You also don't deal any damage back when poison hits you.<br />
<br />
Recruit a DF and a mix of other good units. Stay on towns or mountains for the first assault to minimize the effect any poison will have and reduce the chance of it hitting. Let your opponent attack you, and then counter-attack with your Poachers and DTs if you have them - even DGs ranged will add up. Ulf Assassins whenever you get a decent chance, as the Poison will hurt more than their melee attacks.<br />
<br />
Allow your opponent to attack you from forest hexes if they are next to mountains that you occupy. Your 70% defense will outdo his 50% defense, and his confidence will be higher to attack since he won't be on grass. Even if an Assassin uses that hex, if an Ulf is within reach, he should be able to take him out from on top the mountain.<br />
<br />
To kill Trolls, you will want to focus exclusively on them until they die. It is best to ignore them and kill others than to only do a minimal amoun of damage to Trolls each turn. Their regeneration will give them essentially limitless hp if you do this. Kill his friends and then focus on him. If there are several, take them out one at a time. Try to avoid water battles with Nagas, unless there is only 1. You won't want any Gryphons you get to be ZOCd, especially where you cannot help them, so be cautious with water battles. <br />
<br />
To sum up, kill poisoners, get units that deal good melee damage in defense, and get good counter-attacking ranged units<br />
<br />
<br />
<br />
<br />
Back to The "[[How to play...]]" Series.</div>Db0https://wiki.wesnoth.org/index.php?title=ATaleOfTwoBrothers&diff=20909ATaleOfTwoBrothers2008-01-18T14:04:58Z<p>Db0: Marked as obsolete - Remove if inaccurate</p>
<hr />
<div>{{Needs update}}<br />
First scenario:Easy recruit a bunch of units and attack use spermen and maybe a few bowmen to smash the undead leader.<br />
<br />
<br />
Second scenario:A bit harder you should use horsemen to deal with the elves then spermen and bowmen to kill the undead leader.Take the help from the level 3 heavy infantry man.<br />
<br />
<br />
<br />
Third scenario:Recruit alot of heavy infantry and recall any experienced units.After the fight get aren to bjarn(he is hidden in the cave).<br />
<br />
<br />
<br />
Fourth scenario:Um....</div>Db0https://wiki.wesnoth.org/index.php?title=CampaignStrategies&diff=20907CampaignStrategies2008-01-18T14:01:57Z<p>Db0: Marked as obsolete - Remove if inaccurate</p>
<hr />
<div>{{Needs update}}<br />
== Campaign Strategies ==<br />
<br />
Campaigns are multiple scenarios with a common storyline, played against the computer in single player mode. Once you have won a campaign scenario, you progress to the next. Keep in mind the following points.<br />
<br />
== Recalling units ==<br />
<br />
The main difference between campaigns and individual scenarios is recalling units that survived previous scenarios. This is an important advantage that balances out later scenarios in a campaign being more difficult than early ones. Later in a campaign, you should usually have several high level units available to recall.<br />
<br />
== The importance of loyalty ==<br />
<br />
Units with the ''loyal'' trait do not require any upkeep, regardless of their level. During a 20 turn scenario each level 3 unit will cost 80 gold to recall and maintain, but if that unit is Loyal it will cost only 40 gold. Multiply by the number of units you recall, and soon you are talking serious money! This is especially important in longer campaigns, where you will typically advance and recall many units.<br />
<br />
In previous versions of the game (0.8.11 and earlier), Loyal was a trait that could be assigned randomly. Because of its economic effect, it was probably the most important trait for playing a long campaign. Loyal is no longer random, and is only given to those units that join your cause of their own choice -- your leader, friendly units you discover hiding in villages, riders joining you, and so on. Keep them safe, their upkeep cost is much lower than normal units!<br />
<br />
== Go back and redo ==<br />
<br />
If you are struggling in a campaign scenario, perhaps you should go back to an earlier scenario and try to win it more convincingly. If you lose all your high level units and your leader barely survives, or you use up all your gold, then later scenarios in the campaign may be very difficult to play. Note that some scenarios are designed to sap your army and gold, so this isn't a hard and fast rule.<br />
<br />
== Balance your army ==<br />
<br />
Most campaigns call for a range of units. Especially when playing the campaign for the first time, you don't know what types of terrain or opponents you are going to face later in the campaign. Some scenarios are mostly open grassland,<br />
some are underground, some have lots of water, or lots of mountains. To succeed in completing a campaign, you will usually need to recall level 2 or 3 units of several different types.<br />
Keep this in mind when choosing what types of units to recruit.<br />
For instance, if your army has lots of mages, consider recruiting and levelling up some melee units in case you meet some Dark Adepts. If available, consider developing healers early in the campaign, you will probably need them later.<br />
<br />
Once you have mastered a campaign, it may be fun going back and replaying it with an unbalanced army. For instance, some people have played most of [[HeirToTheThrone]] with only Shamans, Druids and Shydes. But doing this when playing the first time is probably just going to be frustrating and not much fun!<br />
<br />
== Exploit your last moves ==<br />
<br />
When you are about to win a scenario, it is worthwhile maximizing<br />
the experience your units gain before you clinch the win.<br />
Normally you have to worry about counterattack by the enemy,<br />
but if you win the scenario the enemy won't have a chance to!<br />
So, on the last few turns, it is worth aggressively attacking enemy units as long as your own units do not die while attacking.<br />
On the last round, attack that Paladin with your Lich.<br />
You don't have to worry about the Lich being surrounded and killed next turn, since there will not be another turn.<br />
<br />
Usually, it is worth trying to finish a scenario early. However,<br />
in some scenarios you may have gained control of all the villages<br />
on the map -- in this case it might be worth just collecting the<br />
income while milking the few remaining enemies for experience,<br />
instead of going for a quick kill.<br />
<br />
== See Also ==<br />
* [[AdvancedTactics]]</div>Db0https://wiki.wesnoth.org/index.php?title=Template:Needs_update&diff=20905Template:Needs update2008-01-18T13:55:21Z<p>Db0: </p>
<hr />
<div>----<br />
'''Attention:''' This page has been marked for review for version 1.4. The information contained here appears to be outdated or obsolete. <br />
<br />
If you can, please take the time to review and edit it to bring it up to date (if needed) for the lastest version of Wesnoth.<br />
For more information and discussion, check the [http://www.wesnoth.org/forum/viewtopic.php?t=19462 appropriate thread] in the fora.<br />
<br />
Once this is done, remove this notice<br />
<includeonly><br />
[[category:Obsolete]]<br />
</includeonly><br />
----</div>Db0