#textdomain wesnoth # These are clutter, scheduled to be removed. # ! in comments is used for generating HTML documentation, ignore it otherwise. #wmllint: markcheck off #define DEPRECATE MACRO_NAME VERSION_NAME # Tag macros for removal, the VERSION_NAME argument is the # release where the message is shown the first time. # The removal will be 2 versions later. [deprecated_message] message="Macro '" + {MACRO_NAME} + "' is scheduled for removal in Wesnoth " + {VERSION_NAME} + "." [/deprecated_message] #enddef #wmllint: markcheck on #define SET_LABEL_PERSISTENT X Y STRING {DEPRECATE SET_LABEL_PERSISTENT 1.9.3} [label] x={X} y={Y} text={STRING} [/label] #enddef #define SET_IMAGE_AND_LABEL_PERSISTENT X Y IMAGE STRING {DEPRECATE SET_IMAGE_AND_LABEL_PERSISTENT 1.9.3} [label] x={X} y={Y} text={STRING} [/label] [item] x={X} y={Y} image={IMAGE} [/item] #enddef #define TIME_ACTIONS CONTENT_WML # Messing with the variable is annoying, so I'll deprecate this in favour of # TIMED_ACTIONS {DEPRECATE TIME_ACTIONS 1.9.4} # Measure (in milliseconds) the time arbitrary event WML takes to # execute. Afterwards, the time the enclosed WML took to execute # is found in the variable $timed_actions_ms. # # Example: #! [event] #! name=start #! #! {TIME_ACTIONS ( #! {MODIFY_UNIT race=orc name ( _ "Azir")} #! )} #! #! {DEBUG_MSG "Renaming all orcs to Azir took $timed_actions_ms|ms."} #! [/event] [set_variable] name=TIME_ACTIONS_time_begin time=stamp [/set_variable] {CONTENT_WML} [set_variable] name=TIME_ACTIONS_time_end time=stamp [/set_variable] [set_variable] name=timed_actions_ms value=$TIME_ACTIONS_time_end [/set_variable] [set_variable] name=timed_actions_ms sub=$TIME_ACTIONS_time_begin [/set_variable] [clear_variable] name=TIME_ACTIONS_time_begin [/clear_variable] [clear_variable] name=TIME_ACTIONS_time_end [/clear_variable] #enddef #define FLOATING_TEXT FILTER COLOR_VALUE TEXT {DEPRECATE FLOATING_TEXT 1.9.4} # Floats the given text above the given unit in the same manner as # damage numbers are displayed in combat. For example when a unit # steps on a hidden trap and is dealt 8 damage, let's show this to # the player like all other damage is: #! {FLOATING_TEXT x,y=$x1,$y1 255,0,0 "8"} [store_unit] [filter] {FILTER} [/filter] kill=no variable=FLOATING_TEXT_temp [/store_unit] [unstore_unit] variable=FLOATING_TEXT_temp find_vacant=no red,green,blue={COLOR_VALUE} text={TEXT} [/unstore_unit] [clear_variable] name=FLOATING_TEXT_temp [/clear_variable] #enddef #define CAPTURE_FILTERED_VILLAGES SIDE FILTER {DEPRECATE CAPTURE_FILTERED_VILLAGES 1.9.4} # Change ownership of villages matching the specified location filter. [capture_village] side={SIDE} {FILTER} [/capture_village] #enddef #define SET_OBJECTIVES SIDE SUMMARY_TEXT NOTE_TEXT CONDITION_WML {DEPRECATE SET_OBJECTIVES 1.9.4} # Sets the objectives for a given player # Side 0 means every player. Does not affect gameplay, # except that it tells the player what the objectives of a scenario are. # # For example, we could set the objective for all players to: "survive for # 3 turns" with this: #! {SET_OBJECTIVES 0 "Survive for 3 turns" () ()} # [objectives] side = {SIDE} summary = {SUMMARY_TEXT} note = {NOTE_TEXT} {CONDITION_WML} [/objectives] #enddef #define VICTORY_CONDITION DESCRIPTION {DEPRECATE VICTORY_CONDITION 1.9.4} # Used in conjunction with SET_OBJECTIVES this sets a victory condition # (marked green). # # For example we could tell player 2 to win by killing all other players #! {SET_OBJECTIVES 0 "Kill eachother." ( #! {VICTORY_CONDITION "Kill all other players."} #! )} # [objective] condition = "win" description = {DESCRIPTION} [/objective] #enddef #define DEFEAT_CONDITION DESCRIPTION {DEPRECATE DEFEAT_CONDITION 1.9.4} # Used in conjunction with SET_OBJECTIVES this sets a defeat condition # (marked red). # # For example we could tell all players that they lose if they die. #! {SET_OBJECTIVES 0 "Survive." ( #! {DEFEAT_CONDITION "Death of your leader."} #! )} # [objective] condition = "lose" description = {DESCRIPTION} [/objective] #enddef #define ON_EVENT NAME ACTION_WML {DEPRECATE ON_EVENT 1.9.4} # Creates a generic event. Strictly a syntactic shortcut [event] name={NAME} {ACTION_WML} [/event] #enddef #define ON_PRESTART ACTION_WML {DEPRECATE ON_PRESTART 1.9.4} # Creates an event that triggers when the scenario starts but before the user # gets any visible output. Strictly a syntactic shortcut. # # For example, you can make side 2 start the scenario with ownership of the # village at 13,15: # #! {ON_PRESTART ( #! [capture_village] #! side=2 #! x,y=13,15 #! [/capture_village] #! )} [event] name=prestart {ACTION_WML} [/event] #enddef #define ON_START ACTION_WML {DEPRECATE ON_START 1.9.4} # Creates an event that triggers when the scenario starts, after the map is # displayed but before the player can act. Strictly a syntactic shortcut. # # For example you could display some dialogue when the scenario starts: # #! {ON_START ( #! [message] #! speaker=Konrad #! message= _ "Hey, I can see some enemies up ahead!" #! [/message] #! #! [message] #! speaker=Delfador #! message= _ "Yes, so it would seem. Charge!" #! [/message] #! )} [event] name=start {ACTION_WML} [/event] #enddef #define ON_SIDETURN ACTION_WML {DEPRECATE ON_SIDETURN 1.9.4} # Creates an event that triggers at the start of every players turn # For example, you could set each players gold to a fixed amount every turn. #! {ON_SIDETURN ( #! [modify_side] #! side=3 #! gold=0 #! [/modify_side] #! )} [event] name=side turn first_time_only=no {ACTION_WML} [/event] #enddef #define ON_TURN TURN ACTION_WML {DEPRECATE ON_TURN 1.9.4} # Creates an event that triggers at the start of turn TURN # For example you can create a Wose belonging to player 1 at turn 3: # Strictly a syntactic shortcut. #! {ON_TURN 3 ( #! [unit] #! side=1 #! type=wose #! x,y=12,4 #! [/unit] #! )} [event] name=turn {TURN} {ACTION_WML} [/event] #enddef #define ON_VICTORY ACTION_WML {DEPRECATE ON_VICTORY 1.9.4} # Creates an event that triggers when a player wins the game, before # the game ends. Strictly a syntactic shortcut. # # For example you could congratulate the player: #! {ON_VICTORY ( #! [message] #! speaker=narrator #! message="Congratulations!" #! [/message] #! )} [event] name=victory {ACTION_WML} [/event] #enddef #define ON_DEFEAT ACTION_WML {DEPRECATE ON_DEFEAT 1.9.4} # Creates an event that triggers when a player wins the game, before # the game ends. Strictly a syntactic shortcut. # # For example you could suggest an easier difficulty # the player: #! {ON_DEFEAT ( #! [message] #! speaker=narrator #! message="Aww.. you lost. Try again with 800g and +40g income?" #! [/message] #! )} [event] name=defeat {ACTION_WML} [/event] #enddef #define ALLOW_UNDO {DEPRECATE ALLOW_UNDO 1.9.4} # Allows the player to undo the effects of a moveto event. # Strictly a syntactic shortcut. # # For example, let's allow undoing reading a note: #! {ON_TILE 5 7 () ( #! [message] #! speaker=narrator #! message="This is a note." #! [/message] #! {ALLOW_UNDO} #! )} [allow_undo] [/allow_undo] #enddef #define ON_TILE_ONCE X Y FILTER ACTION_WML {DEPRECATE ON_TILE_ONCE 1.9.4} # Creates an event that triggers the first time a unit steps on a # given tile. The filter can be used to only affect special units, or # units of a given player. # # For example we could make a text-message # that is only readable once: #! {ON_TILE_ONCE 5 7 () ( #! [message] #! speaker=narrator #! message="This is a note." #! [/message] #! )} [event] name=moveto first_time_only=yes [filter] x={X} y={Y} {FILTER} [/filter] {ACTION_WML} [/event] #enddef #define SIDE_PLAYER SIDE TEAM_NAME DESCRIPTION GOLD_AMOUNT INCOME_AMOUNT SIDE_WML {DEPRECATE SIDE_PLAYER 1.9.4} # Defines a multiplayer side in a scenario that is controllable by the player. # # For example we can set side 1 to be a player belonging to team "Good Guys" # starting with 200g and no income: #! {SIDE_PLAYER 1 "Good Guys" "Good Guy #1" 200 -2 ()} [side] # wmllint: validate-off user_team_name={DESCRIPTION} side={SIDE} team_name={TEAM_NAME} canrecruit=yes controller=human gold={GOLD_AMOUNT} income={INCOME_AMOUNT} {SIDE_WML} [/side] # wmllint: validate-on #enddef #define SIDE_COMPUTER SIDE TEAM_NAME DESCRIPTION GOLD_AMOUNT INCOME_AMOUNT SIDE_WML AI_WML {DEPRECATE SIDE_COMPUTER 1.9.4} # Defines a multiplayer side in a scenario that is controllad by # the computer. # # For example, we can set side 4 to be a computer belonging to # team "Evil Guys" starting with 666g and 999 income. # We also make it more aggressive: #! {SIDE_COMPUTER 4 "Evil Guys" "Evil One" 666 999 ( #! aggression=0.95 #! )} # [side] # wmllint: validate-off user_team_name={DESCRIPTION} side={SIDE} team_name={TEAM_NAME} canrecruit=yes controller=ai allow_player=no disallow_observers=yes gold={GOLD_AMOUNT} income={INCOME_AMOUNT} {SIDE_WML} [ai] {AI_WML} [/ai] [/side] # wmllint: validate-on #enddef #define AMLA_TOUGH HP_ADVANCE_NUMBER {DEPRECATE AMLA_TOUGH 1.9.4} # Canned definition of an AMLA adding HP, without fullhealing. [advancement] strict_amla=yes max_times=100 id=tough_{HP_ADVANCE_NUMBER} description= _ "Max HP bonus +" {HP_ADVANCE_NUMBER} _", MAX XP +25%" image="misc/icon-amla-tough.png" [effect] apply_to=hitpoints increase={HP_ADVANCE_NUMBER} increase_total={HP_ADVANCE_NUMBER} [/effect] [effect] apply_to=max_experience increase=25% [/effect] [/advancement] #enddef #define ITM_BOOK1 X Y {DEPRECATE ITM_BOOK1 1.9.4} [item] x={X} y={Y} image=items/book1.png [/item] #enddef #define ITM_TREE1 X Y {DEPRECATE ITM_TREE1 1.9.4} [item] x={X} y={Y} image=scenery/pine1.png [/item] #enddef #define RECALL_OR_CREATE_UNIT WML ID_STRING {DEPRECATE RECALL_OR_CREATE_UNIT 1.9.4} # A substitute for [recall] that works even when there's no-one to recall # useful for testing scenarios out of order. [recall] id={ID_STRING} [/recall] [if] [have_unit] id={ID_STRING} [/have_unit] [else] [store_starting_location] side=1 variable=tmp [/store_starting_location] [unit] {WML} side=1 x=$tmp.x y=$tmp.y [/unit] [clear_variable] name=tmp [/clear_variable] [/else] [/if] #enddef #define RECALL_OR_CREATE TYPE ID_STRING {DEPRECATE RECALL_OR_CREATE 1.9.4} # A substitute for [recall] that works even when there's no-one to recall # useful for testing scenarios out of order. {RECALL_OR_CREATE_UNIT (type={TYPE} id={ID_STRING}) {ID_STRING}} #enddef #define ITM_GLOWING_BRAZIER X Y {DEPRECATE ITM_GLOWING_BRAZIER 1.9.4} [item] x={X} y={Y} image=items/brazier-lit1.png halo=halo/fire-aura.png [/item] #enddef #define REDRAW {DEPRECATE REDRAW 1.9.4} [redraw] [/redraw] #enddef