#define ACTION_TAG NAME EXTRA [tag] name="{NAME}" super="$action_wml" {EXTRA} [/tag] #enddef #define SHOW_IF_TAG [tag] name="show_if" super="$conditional_wml" [/tag] #enddef #define COLOR_KEYS TYPE {SIMPLE_KEY red {TYPE}} {SIMPLE_KEY green {TYPE}} {SIMPLE_KEY blue {TYPE}} #enddef #define FORMATTING_KEYS {SIMPLE_KEY font string} {SIMPLE_KEY font_family string} {SIMPLE_KEY font_size font_size} {SIMPLE_KEY font_style font_style} {SIMPLE_KEY font_weight font_weight} {SIMPLE_KEY font_variant font_variant} {SIMPLE_KEY font_stretch font_stretch} {SIMPLE_KEY color html_color} {SIMPLE_KEY bgcolor html_color} {SIMPLE_KEY underline font_underline} {SIMPLE_KEY underline_color html_color} {SIMPLE_KEY rise s_int} {SIMPLE_KEY strikethrough s_bool} {SIMPLE_KEY strikethrough_color html_color} {SIMPLE_KEY fallback s_bool} {SIMPLE_KEY letter_spacing s_unsigned} {SIMPLE_KEY gravity font_gravity} {SIMPLE_KEY gravity_hint font_gravity_hint} #enddef [tag] name="$action_wml" max=0 {INSERT_TAG} {ACTION_TAG "command" max=infinite} [link] name="event" [/link] [link] name="lua" [/link] # Flow control (ConditionalActionsWML) [tag] name="if" max=infinite super="$conditional_wml" {ACTION_TAG "then" max=infinite} [tag] name="elseif" max=infinite super="$conditional_wml" {ACTION_TAG "then" max=infinite} [/tag] {ACTION_TAG "else" max=infinite} [/tag] [tag] name="switch" max=infinite {REQUIRED_KEY variable string} {INSERT_TAG} [tag] name="case" max=infinite super="$action_wml" {REQUIRED_KEY value string} [/tag] {ACTION_TAG "else" max=infinite} [/tag] [tag] name="while" max=infinite super="$conditional_wml" {ACTION_TAG "do" min,max=0,infinite} [tag] name="do" max=infinite super="$action_wml" [/tag] [/tag] [tag] name="for" max=infinite {SIMPLE_KEY variable string} {INSERT_TAG} [if] glob_on_array=* [then] {SIMPLE_KEY array string} {DEFAULT_KEY reverse s_bool no} [/then] [else] {SIMPLE_KEY start s_int} {SIMPLE_KEY end s_int} {SIMPLE_KEY step s_int} [/else] [/if] {ACTION_TAG "do" min,max=0,infinite} [/tag] [tag] name="foreach" max=infinite {INSERT_TAG} {SIMPLE_KEY array string} {SIMPLE_KEY variable string} {SIMPLE_KEY index_var string} {DEFAULT_KEY readonly s_bool no} {ACTION_TAG "do" min,max=0,infinite} [/tag] [tag] name="repeat" max=infinite {INSERT_TAG} {SIMPLE_KEY times s_int} {ACTION_TAG "do" min,max=0,infinite} [/tag] # Direct actions (DirectActionsWML) [tag] name="endlevel" max=infinite {INSERT_TAG} {DEFAULT_KEY result endlevel_result victory} {SIMPLE_KEY side s_unsigned} {DEFAULT_KEY bonus s_bool,s_unsigned yes} {DEFAULT_KEY carryover_report s_bool yes} {DEFAULT_KEY save s_bool yes} {DEFAULT_KEY replay_save s_bool yes} {DEFAULT_KEY linger_mode s_bool yes} {DEFAULT_KEY reveal_map s_bool yes} {SIMPLE_KEY next_scenario string} {SIMPLE_KEY carryover_percentage int} {DEFAULT_KEY carryover_add s_bool no} {SIMPLE_KEY music string_list} {DEFAULT_KEY end_credits s_bool yes} {SIMPLE_KEY end_text t_string} {SIMPLE_KEY end_text_duration s_unsigned} [tag] name="result" max=infinite {INSERT_TAG} {REQUIRED_KEY result endlevel_result} {REQUIRED_KEY side s_unsigned} {DEFAULT_KEY bonus s_bool,s_unsigned yes} {SIMPLE_KEY carryover_percentage int} {DEFAULT_KEY carryover_add s_bool no} [/tag] [/tag] [tag] name="unit" max=infinite super="units/$unit" {INSERT_TAG} {DEFAULT_KEY animate s_bool no} {SIMPLE_KEY to_variable string} [/tag] [tag] name="recall" max=infinite super="$filter_unit,$action_wml/role/auto_recall" {INSERT_TAG} {FILTER_TAG "secondary_unit" unit {INSERT_TAG}} [/tag] [tag] name="teleport" max=infinite {INSERT_TAG} {FILTER_TAG "filter" unit {INSERT_TAG}} {SIMPLE_KEY x s_int} {SIMPLE_KEY y s_int} {DEFAULT_KEY clear_shroud s_bool yes} {DEFAULT_KEY animate s_bool no} {DEFAULT_KEY check_passability s_bool yes} [/tag] [tag] name="terrain_mask" max=infinite {INSERT_TAG} {SIMPLE_KEY x s_int} {SIMPLE_KEY y s_int} {SIMPLE_KEY mask map_data} {SIMPLE_KEY mask_file string} {DEFAULT_KEY border s_bool no} [tag] name="rule" max=infinite {INSERT_TAG} {SIMPLE_KEY old terrain_list} {SIMPLE_KEY new terrain_list} {SIMPLE_KEY terrain terrain_code} {DEFAULT_KEY layer terrain_layer both} {DEFAULT_KEY replace_if_failed s_bool no} {DEFAULT_KEY use_old s_bool no} [/tag] [/tag] [tag] name="terrain" max=infinite super="$filter_location" {INSERT_TAG} {REQUIRED_KEY terrain s_terrain_code} {DEFAULT_KEY layer terrain_layer both} {DEFAULT_KEY replace_if_failed s_bool no} [/tag] [tag] name="gold" max=infinite super="$filter_side" {INSERT_TAG} {REQUIRED_KEY amount s_int} [/tag] [tag] name="unstore_unit" max=infinite {INSERT_TAG} {REQUIRED_KEY variable string} {DEFAULT_KEY find_vacant s_bool no} {DEFAULT_KEY check_passability s_bool yes} {SIMPLE_KEY text t_string} {SIMPLE_KEY male_text t_string} {SIMPLE_KEY female_text t_string} {COLOR_KEYS s_unsigned} # TODO: These are probably deprecated? {SIMPLE_KEY color s_color} {DEFAULT_KEY advance s_bool yes} {DEFAULT_KEY fire_event s_bool no} {DEFAULT_KEY animate s_bool yes} {SIMPLE_KEY x s_coordinates} {SIMPLE_KEY y s_coordinates} [/tag] [tag] name="allow_recruit,disallow_recruit,set_recruit" max=infinite super="$filter_side" {INSERT_TAG} {REQUIRED_KEY types string_list} [/tag] [tag] name="allow_extra recruit,disallow_extra_recruit,set_recruit" max=infinite super="$filter_unit" {INSERT_TAG} {REQUIRED_KEY extra_recruit string_list} [/tag] [tag] name="modify_side" max=infinite {INSERT_TAG} {FILTER_TAG "filter_side" side {INSERT_TAG}} {SIMPLE_KEY side s_range_list} {SIMPLE_KEY income s_int} {SIMPLE_KEY recruit string_list} {SIMPLE_KEY team_name string} {SIMPLE_KEY side_name string} {SIMPLE_KEY user_team_name t_string} {SIMPLE_KEY gold s_int} {SIMPLE_KEY village_gold s_int} {SIMPLE_KEY controller controller} {SIMPLE_KEY fog s_bool} {SIMPLE_KEY shroud s_bool} {SIMPLE_KEY hidden s_bool} {SIMPLE_KEY color string} {SIMPLE_KEY switch_ai string} {SIMPLE_KEY reset_maps s_bool} {SIMPLE_KEY reset_view s_bool} {SIMPLE_KEY share_vision share_vision} {DEPRECATED_KEY share_maps s_bool} {DEPRECATED_KEY share_view s_bool} {SIMPLE_KEY shroud_data shroud_data} {SIMPLE_KEY suppress_end_turn_confirmation s_bool} {SIMPLE_KEY scroll_to_leader s_bool} {SIMPLE_KEY flag string} {SIMPLE_KEY flag_icon string} {SIMPLE_KEY village_support s_int} {SIMPLE_KEY defeat_condition defeat_condition} [tag] name="ai" super="$side/ai" {INSERT_TAG} [/tag] [/tag] [tag] name="modify_turns" max=infinite {INSERT_TAG} {SIMPLE_KEY value s_unsigned,turns} {SIMPLE_KEY add s_int} {SIMPLE_KEY current s_unsigned} [/tag] {EMPTY_TAG "allow_end_turn,disallow_end_turn" 0 infinite} [tag] name="capture_village" max=infinite super="$filter_location" {INSERT_TAG} {SIMPLE_KEY side s_unsigned} {DEFAULT_KEY fire_event s_bool no} {FILTER_TAG "filter_side" side {INSERT_TAG}} [/tag] [tag] name="kill" max=infinite super="$filter_unit" {INSERT_TAG} {SIMPLE_KEY animate s_bool} {SIMPLE_KEY fire_event s_bool} {FILTER_TAG "secondary_unit" unit {INSERT_TAG}} {FILTER_TAG "primary_attack" weapon {INSERT_TAG}} {FILTER_TAG "secondary_attack" weapon {INSERT_TAG}} [/tag] [tag] name="move_unit" max=infinite super="$filter_unit" {INSERT_TAG} {SIMPLE_KEY to_x s_range_list} {SIMPLE_KEY to_y s_range_list} {SIMPLE_KEY to_location string} {DEFAULT_KEY fire_event s_bool no} {DEFAULT_KEY check_passability s_bool yes} {SIMPLE_KEY force_scroll s_bool} [/tag] [tag] name="modify_ai" super="$ai/modify_ai" {INSERT_TAG} [/tag] [tag] name="modify_unit" max=infinite super="units/$unit" {INSERT_TAG} {FILTER_TAG "filter" unit {INSERT_TAG}} {SIMPLE_KEY mode string} # TODO: This is undocumented and it's unclear what's allowed here; probably should be an enum though? [link] name="units/$modifications/trait" [/link] [link] name="units/$modifications/advancement" [/link] [link] name="units/$modifications/object" [/link] [link] name="units/$modifications/base/effect" [/link] [/tag] [tag] name="transform_unit" max=infinite super="$filter_unit" {INSERT_TAG} {SIMPLE_KEY transform_to string} [/tag] {FILTER_TAG "petrify,unpetrify" unit ( max=infinite {INSERT_TAG} )} [tag] name="object" max=infinite super="units/$modifications/object" {INSERT_TAG} {DEFAULT_KEY take_only_once s_bool yes} {DEFAULT_KEY delayed_variable_substitution s_bool no} {SIMPLE_KEY silent s_bool} {SIMPLE_KEY image string} {SIMPLE_KEY name t_string} {SIMPLE_KEY description t_string} {SIMPLE_KEY cannot_use_message t_string} {FILTER_TAG "filter" unit {INSERT_TAG}} {ACTION_TAG "then" ()} {ACTION_TAG "else" ()} [/tag] [tag] name="remove_object" max=infinite super="$filter_unit" {INSERT_TAG} {SIMPLE_KEY object_id string} [/tag] [tag] name="place_shroud" max=infinite super="$filter_location" {INSERT_TAG} {SIMPLE_KEY side s_range_list} {FILTER_TAG "filter_side" side {INSERT_TAG}} [/tag] [tag] name="lift_fog" max=infinite super="$filter_location" {INSERT_TAG} {FILTER_TAG "filter_side" side {INSERT_TAG}} {DEFAULT_KEY multiturn s_bool no} [/tag] [tag] name="reset_fog" max=infinite super="$filter_location" {INSERT_TAG} {FILTER_TAG "filter_side" side {INSERT_TAG}} {DEFAULT_KEY reset_view s_bool no} [/tag] {EMPTY_TAG "allow_undo,cancel_action" 0 infinite} {ACTION_TAG "on_undo" ( max=infinite {DEFAULT_KEY delayed_variable_substitution s_bool no} )} [tag] name="heal_unit" max=infinite {INSERT_TAG} {FILTER_TAG "filter" unit {INSERT_TAG}} {FILTER_TAG "filter_second" unit {INSERT_TAG}} {SIMPLE_KEY amount heal_amount} {DEFAULT_KEY animate s_bool no} {DEFAULT_KEY moves heal_amount 0} {DEFAULT_KEY restore_attacks s_bool no} {DEFAULT_KEY restore_statuses s_bool yes} [/tag] [tag] name="harm_unit" max=infinite {INSERT_TAG} {FILTER_TAG "filter" unit ( min=1 {INSERT_TAG} )} {FILTER_TAG "filter_second" unit {INSERT_TAG}} {REQUIRED_KEY amount s_int} {SIMPLE_KEY alignment alignment} {SIMPLE_KEY damage_type string} {DEFAULT_KEY kill s_bool yes} {DEFAULT_KEY fire_event s_bool no} {DEFAULT_KEY animate s_bool no} {DEFAULT_KEY delay s_unsigned 500} {SIMPLE_KEY variable string} {DEFAULT_KEY poisoned s_bool no} {DEFAULT_KEY slowed s_bool no} {DEFAULT_KEY petrified s_bool no} {DEFAULT_KEY unhealable s_bool no} {DEFAULT_KEY experience s_bool no} {DEFAULT_KEY resistance_modifier s_real 1} {FILTER_TAG "primary_attack" weapon {INSERT_TAG}} {FILTER_TAG "secondary_attack" weapon {INSERT_TAG}} [/tag] [tag] name="time_area" max=infinite super="scenario/time_area,$filter_location" {INSERT_TAG} {SIMPLE_KEY id string} # TODO: Is this allowed in scenario-level areas too? {DEFAULT_KEY remove s_bool no} {SIMPLE_KEY current_time s_unsigned} [/tag] [tag] name="remove_time_area" max=infinite {INSERT_TAG} {REQUIRED_KEY id string} [/tag] {EMPTY_TAG "end_turn" 0 infinite} [tag] name="replace_map" max=infinite {INSERT_TAG} {SIMPLE_KEY map map_data} {SIMPLE_KEY map_file string} {DEFAULT_KEY expand s_bool no} {DEFAULT_KEY shrink s_bool no} [/tag] [tag] name="replace_schedule" max=infinite {INSERT_TAG} [link] name="scenario/time" [/link] {SIMPLE_KEY current_time s_unsigned} [/tag] [tag] name="tunnel" max=infinite super="units/unit_type~core/abilities/teleport/tunnel" {INSERT_TAG} {SIMPLE_KEY id string} {DEFAULT_KEY remove s_bool no} [/tag] [tag] name="do_command" max=infinite {INSERT_TAG} # TODO: Move these to SaveWML schema and link them from here? [tag] name="attack" {INSERT_TAG} {SIMPLE_KEY weapon int} {SIMPLE_KEY defender_weapon int} [tag] name="source" {SIMPLE_KEY x int} {SIMPLE_KEY y int} [/tag] [tag] name="destination" {SIMPLE_KEY x int} {SIMPLE_KEY y int} [/tag] [/tag] [tag] name="move" {SIMPLE_KEY x int} {SIMPLE_KEY y int} {SIMPLE_KEY skip_sighted string} # TODO: Make this an enum type [/tag] [tag] name="recruit" {INSERT_TAG} {SIMPLE_KEY type string} {SIMPLE_KEY x int} {SIMPLE_KEY y int} [tag] name="from" {SIMPLE_KEY x int} {SIMPLE_KEY y int} [/tag] [/tag] [tag] name="recall" {INSERT_TAG} {SIMPLE_KEY value string} {SIMPLE_KEY x int} {SIMPLE_KEY y int} [tag] name="from" {SIMPLE_KEY x int} {SIMPLE_KEY y int} [/tag] [/tag] [tag] name="disband" {SIMPLE_KEY value string} [/tag] [tag] name="fire_event" {INSERT_TAG} {SIMPLE_KEY raise string} [tag] name="source" {SIMPLE_KEY x int} {SIMPLE_KEY y int} [/tag] [tag] name="set_variable" deprecated=yes {SIMPLE_KEY name string} {SIMPLE_KEY value string} [/tag] [/tag] [tag] name="lua_ai" deprecated=yes {SIMPLE_KEY code string} [/tag] [tag] name="custom_command" {SIMPLE_KEY name string} {DATA_TAG "data" 1 1} [/tag] [/tag] [tag] name="put_to_recall_list" max=infinite super="$filter_unit" {INSERT_TAG} {DEFAULT_KEY heal s_bool no} [/tag] # Display actions (InterfaceActionsWML) [tag] name="inspect" max=infinite {SIMPLE_KEY name string} [/tag] [tag] name="message" max=infinite super="$filter_unit" {INSERT_TAG} {SIMPLE_KEY speaker string} {SIMPLE_KEY message t_string} {SIMPLE_KEY male_message t_string} {SIMPLE_KEY female_message t_string} {SIMPLE_KEY wait_description t_string} {SIMPLE_KEY side_for s_range_list} {SIMPLE_KEY image string} {SIMPLE_KEY mirror s_bool} {SIMPLE_KEY second_image string} {SIMPLE_KEY second_mirror s_bool} {SIMPLE_KEY image_pos image_pos} {SIMPLE_KEY caption t_string} {DEFAULT_KEY scroll s_bool yes} {DEFAULT_KEY highlight s_bool yes} {SIMPLE_KEY sound string_list} {SIMPLE_KEY voice string_list} {SIMPLE_KEY variable string} {FORMATTING_KEYS} {SHOW_IF_TAG} [tag] name="option" max=infinite {INSERT_TAG} {DEPRECATED_KEY message t_string} {SIMPLE_KEY image string} {SIMPLE_KEY label t_string} {SIMPLE_KEY description t_string} {SIMPLE_KEY default s_bool} {SIMPLE_KEY value string} {SHOW_IF_TAG} {ACTION_TAG "command" max=infinite} [/tag] [tag] name="text_input" {SIMPLE_KEY variable string} {SIMPLE_KEY label t_string} {SIMPLE_KEY max_length s_unsigned} {SIMPLE_KEY text string} [/tag] [/tag] [tag] name="objectives" max=infinite super="$filter_side" {INSERT_TAG} {SIMPLE_KEY bullet string} {SIMPLE_KEY summary t_string} {SIMPLE_KEY note t_string} {SIMPLE_KEY victory_string t_string} {SIMPLE_KEY defeat_string t_string} {SIMPLE_KEY gold_carryover_string t_string} {SIMPLE_KEY notes_string t_string} {DEFAULT_KEY silent s_bool no} {DEFAULT_KEY delayed_variable_substitution s_bool no} [tag] name="objective~base" max=0 {SIMPLE_KEY bullet string} {COLOR_KEYS s_unsigned} {SHOW_IF_TAG} [/tag] [tag] name="objective" max=infinite super="$action_wml/objectives/objective~base" {SIMPLE_KEY description t_string} {SIMPLE_KEY caption t_string} {SIMPLE_KEY condition objective_condition} {DEFAULT_KEY show_turn_counter s_bool no} [/tag] [tag] name="gold_carryover" max=infinite super="$action_wml/objectives/objective~base" {SIMPLE_KEY bonus s_bool} {SIMPLE_KEY carryover_percentage int} [/tag] [tag] name="note" max=infinite super="$action_wml/objectives/objective~base" {SIMPLE_KEY description t_string} [/tag] [/tag] [tag] name="set_menu_item" max=infinite {INSERT_TAG} {SIMPLE_KEY id string} {SIMPLE_KEY description t_string} {SIMPLE_KEY image string} {DEPRECATED_KEY needs_select s_bool} {DEFAULT_KEY synced s_bool yes} {DEFAULT_KEY use_hotkey s_bool yes} {SHOW_IF_TAG} {FILTER_TAG "filter_location" location {INSERT_TAG}} {ACTION_TAG "command" {DEFAULT_KEY delayed_variable_substitution s_bool yes}} [tag] name="default_hotkey" {SIMPLE_KEY key string} {SIMPLE_KEY alt bool} {SIMPLE_KEY ctrl bool} {SIMPLE_KEY shift bool} {SIMPLE_KEY cmd bool} {DEFAULT_KEY repeat_on_hold s_bool no} [/tag] [/tag] [tag] name="clear_menu_item" max=infinite {REQUIRED_KEY id string} [/tag] [tag] name="change_theme" max=infinite {REQUIRED_KEY theme string} [/tag] [tag] name="item" max=infinite super="$filter_location,scenario/item" {INSERT_TAG} {DEFAULT_KEY redraw s_bool yes} {SIMPLE_KEY write_name string} {SIMPLE_KEY name string} # Override some supertag keys to allow variable substitutions {DEFAULT_KEY visible_in_fog s_bool yes} [/tag] [tag] name="remove_item" max=infinite super="$filter_location" {INSERT_TAG} {SIMPLE_KEY image string} [/tag] [tag] name="print" max=infinite {SIMPLE_KEY text t_string} {SIMPLE_KEY size s_unsigned} {SIMPLE_KEY duration s_unsigned} {COLOR_KEYS s_unsigned} [/tag] [tag] name="$fake_unit" max=0 {SIMPLE_KEY type string} {SIMPLE_KEY x s_range_list} {SIMPLE_KEY y s_range_list} {SIMPLE_KEY side s_unsigned} {SIMPLE_KEY gender gender} {SIMPLE_KEY variation string} {SIMPLE_KEY image_mods string} [/tag] [tag] name="move_unit_fake" max=infinite super="$action_wml/$fake_unit" {DEFAULT_KEY force_scroll s_bool yes} [/tag] [tag] name="move_units_fake" max=infinite {INSERT_TAG} {DEFAULT_KEY force_scroll s_bool no} [tag] name="fake_unit" super="$action_wml/$fake_unit" {SIMPLE_KEY skip_steps s_unsigned} [/tag] [/tag] {FILTER_TAG "hide_unit,unhide_unit" unit ( max=infinite {INSERT_TAG} )} {EMPTY_TAG "lock_view,unlock_view" 0 infinite} [tag] name="scroll" max=infinite {INSERT_TAG} {SIMPLE_KEY x s_int} {SIMPLE_KEY y s_int} {SIMPLE_KEY side s_unsigned} {FILTER_TAG "filter_side" side {INSERT_TAG}} [/tag] [tag] name="scroll_to" max=infinite super="$filter_location" {INSERT_TAG} {DEFAULT_KEY check_fogged s_bool no} {DEFAULT_KEY immediate s_bool no} {DEFAULT_KEY highlight s_bool no} {SIMPLE_KEY side s_unsigned} {FILTER_TAG "filter_side" side {INSERT_TAG}} [/tag] [tag] name="scroll_to_unit" max=infinite super="$filter_unit" {INSERT_TAG} {DEFAULT_KEY check_fogged s_bool no} {DEFAULT_KEY immediate s_bool no} {DEFAULT_KEY highlight s_bool no} {SIMPLE_KEY for_side s_unsigned} {FILTER_TAG "for_side" side {INSERT_TAG}} [/tag] [tag] name="select_unit" max=infinite super="$filter_unit" {INSERT_TAG} {DEFAULT_KEY fire_event s_bool no} {DEFAULT_KEY highlight s_bool yes} [/tag] [tag] name="sound" max=infinite {REQUIRED_KEY name string_list} {DEFAULT_KEY repeat s_unsigned 0} [/tag] [link] name="scenario/sound_source" [/link] [tag] name="story" max=infinite super="scenario/story" [/tag] [link] name="titlescreen_music/music" [/link] [tag] name="volume" max=infinite {SIMPLE_KEY music s_unsigned} {SIMPLE_KEY sound s_unsigned} [/tag] [tag] name="color_adjust" max=infinite {COLOR_KEYS s_int} [/tag] [tag] name="delay" max=infinite {REQUIRED_KEY time s_unsigned} {DEFAULT_KEY accelerate s_bool no} [/tag] [tag] name="redraw" max=infinite super="$filter_side" {INSERT_TAG} {DEFAULT_KEY clear_shroud s_bool no} [/tag] [tag] name="unit_overlay,remove_unit_overlay" max=infinite super="$filter_unit" {INSERT_TAG} {REQUIRED_KEY image string} [/tag] [tag] name="animate_unit" max=infinite {REQUIRED_KEY flag string} {SIMPLE_KEY hits anim_hits} {SIMPLE_KEY text t_string} {SIMPLE_KEY male_text t_string} {SIMPLE_KEY female_text t_string} {COLOR_KEYS s_unsigned} {SIMPLE_KEY with_bars s_bool} {FILTER_TAG "filter" unit {INSERT_TAG}} {FILTER_TAG "primary_attack" weapon {INSERT_TAG}} {FILTER_TAG "secondary_attack" weapon {INSERT_TAG}} {FILTER_TAG "facing" location {INSERT_TAG}} [tag] name="animate" super="$action_wml/animate_unit" # TODO: [filter] is now mandatory rather than optional... # TODO: Also, is nested [aniamte] allowed? [/tag] [/tag] [tag] name="label" max=infinite super="scenario/label,$filter_location" {INSERT_TAG} [/tag] [tag] name="floating_text" max=infinite super="$filter_location" {INSERT_TAG} {REQUIRED_KEY text t_string} {SIMPLE_KEY color s_color} [/tag] [tag] name="deprecated_message" max=infinite {SIMPLE_KEY message string} {SIMPLE_KEY level deprecation_level} {SIMPLE_KEY what string} {SIMPLE_KEY version version} [/tag] [tag] name="wml_message" max=infinite {SIMPLE_KEY message string} {SIMPLE_KEY logger logger} [/tag] [tag] name="test_condition" max=infinite super="$conditional_wml" {DEFAULT_KEY result s_bool no} {SIMPLE_KEY logger logger} [/tag] [tag] name="open_help" max=infinite {SIMPLE_KEY topic string} [/tag] [tag] name="show_objectives" max=infinite super="$filter_side" {INSERT_TAG} [/tag] [tag] name="chat" max=infinite super="$filter_side" {INSERT_TAG} {DEFAULT_KEY speaker string "WML"} {REQUIRED_KEY message string} {DEFAULT_KEY observable s_bool yes} [/tag] [tag] name="zoom" max=infinite {SIMPLE_KEY factor s_unsigned} {SIMPLE_KEY relative s_bool} [/tag] # Internal actions (InternalActionsWML) [tag] name="set_variable" max=infinite {INSERT_TAG} {REQUIRED_KEY name string} {SIMPLE_KEY value string} {SIMPLE_KEY literal string} {SIMPLE_KEY to_variable string} {SIMPLE_KEY suffix string} {SIMPLE_KEY prefix string} {SIMPLE_KEY add s_real} {SIMPLE_KEY sub s_real} {SIMPLE_KEY multiply s_real} {SIMPLE_KEY divide s_real} {SIMPLE_KEY modulo s_real} {SIMPLE_KEY abs s_bool} {SIMPLE_KEY root root_base} {SIMPLE_KEY power s_real} {SIMPLE_KEY rand string_list} {SIMPLE_KEY time stamp} {SIMPLE_KEY string_length string} {SIMPLE_KEY round rounding_method} {SIMPLE_KEY ipart s_real} {SIMPLE_KEY fpart s_real} {SIMPLE_KEY formula formula} [tag] name="join" {REQUIRED_KEY variable string} {DEFAULT_KEY key string "value"} {SIMPLE_KEY separator string} {SIMPLE_KEY remove_empty s_bool} [/tag] [/tag] [tag] name="set_variables" max=infinite {INSERT_TAG} {REQUIRED_KEY name string} {SIMPLE_KEY to_variable string} [if] [not] glob_on_to_variable=* [/not] [then] {SIMPLE_KEY mode set_variables_mode} {DATA_TAG value 0 infinite} {DATA_TAG literal 0 infinite} [tag] name="split" max=infinite {SIMPLE_KEY list string} {DEFAULT_KEY key string "value"} {SIMPLE_KEY separator char} {SIMPLE_KEY remove_empty s_bool} [/tag] [/then] [/if] [/tag] [tag] name="store_gold" max=infinite super="$filter_side" {INSERT_TAG} {SIMPLE_KEY variable string} [/tag] [tag] name="store_side" max=infinite super="$filter_side" {INSERT_TAG} {DEFAULT_KEY variable string "side"} [/tag] [tag] name="store_starting_location" max=infinite super="$filter_side" {INSERT_TAG} {SIMPLE_KEY variable string} [/tag] [tag] name="store_locations" max=infinite super="$filter_location" {INSERT_TAG} {DEFAULT_KEY variable string "location"} [/tag] [tag] name="store_unit" max=infinite {INSERT_TAG} {FILTER_TAG "filter" unit ( min=1 {INSERT_TAG} )} {DEFAULT_KEY variable string "unit"} {SIMPLE_KEY mode store_unit_mode} {SIMPLE_KEY kill s_bool} [/tag] [tag] name="store_reachable_locations" max=infinite {INSERT_TAG} {DEFAULT_KEY range reachable_range movement} {DEFAULT_KEY moves reachable_moves current} {SIMPLE_KEY viewing_side s_unsigned} {REQUIRED_KEY variable string} {FILTER_TAG "filter" unit ( min=1 {INSERT_TAG} )} {FILTER_TAG "filter_location" location {INSERT_TAG}} [/tag] [tag] name="store_map_dimensions" max=infinite {DEFAULT_KEY variable string "map_size"} [/tag] [tag] name="store_time_of_day" max=infinite {SIMPLE_KEY x s_unsigned} {SIMPLE_KEY y s_unsigned} {DEFAULT_KEY variable string "time_of_day"} {SIMPLE_KEY turn s_unsigned} [/tag] [tag] name="store_turns" max=infinite {DEFAULT_KEY variable string turns} [/tag] [tag] name="store_unit_defense" max=infinite super="$filter_unit" {SIMPLE_KEY loc_x s_unsigned} {SIMPLE_KEY loc_y s_unsigned} {SIMPLE_KEY terrain terrain_code} {SIMPLE_KEY variable string} [/tag] [tag] name="store_unit_type" max=infinite {REQUIRED_KEY type string} {SIMPLE_KEY variable string} [/tag] [tag] name="store_unit_type_ids" max=infinite {SIMPLE_KEY variable string} [/tag] [tag] name="store_villages" max=infinite super="$action_wml/store_locations" deprecated=yes [/tag] [tag] name="store_items" max=infinite super="$action_wml/store_locations" [/tag] [tag] name="store_relative_direction" max=infinite {INSERT_TAG} {REQUIRED_KEY variable string} {SIMPLE_KEY mode s_unsigned} # TODO: This should really be an enum type [tag] name="source" min=1 {SIMPLE_KEY x s_unsigned} {SIMPLE_KEY y s_unsigned} [/tag] [tag] name="destination" min=1 {SIMPLE_KEY x s_unsigned} {SIMPLE_KEY y s_unsigned} [/tag] [/tag] [tag] name="find_path" max=infinite {INSERT_TAG} {SIMPLE_KEY variable string} {DEFAULT_KEY allow_multiple_turns s_bool no} {DEFAULT_KEY check_visibility s_bool no} {DEFAULT_KEY check_teleport s_bool yes} {DEFAULT_KEY check_zoc s_bool yes} {FILTER_TAG "traveler" unit ( min=1 {INSERT_TAG} )} {FILTER_TAG "destination" location ( min=1 {INSERT_TAG} )} [/tag] [tag] name="unit_worth" max=infinite super="$filter_unit" {INSERT_TAG} [/tag] [tag] name="clear_variable" max=infinite {REQUIRED_KEY name string_list} [/tag] [tag] name="sync_variable" max=infinite {SIMPLE_KEY name string} [/tag] [tag] name="fire_event" max=infinite {INSERT_TAG} {SIMPLE_KEY name string} {SIMPLE_KEY id string} {FILTER_TAG "primary_unit" unit {INSERT_TAG}} {FILTER_TAG "secondary_unit" unit {INSERT_TAG}} {FILTER_TAG "primary_attack" weapon {INSERT_TAG}} {FILTER_TAG "secondary_attack" weapon {INSERT_TAG}} [/tag] [tag] name="remove_event" max=infinite {REQUIRED_KEY id string} [/tag] [tag] name="role" max=infinite super="$filter_unit" {INSERT_TAG} {SIMPLE_KEY role string} {SIMPLE_KEY type string_list} {DEFAULT_KEY search_recall_list search_recall_list yes} {DEFAULT_KEY reassign s_bool yes} {ACTION_TAG else max=infinite} [tag] name="auto_recall" {DEFAULT_KEY show s_bool yes} {DEFAULT_KEY fire_event s_bool no} {DEFAULT_KEY check_passability s_bool yes} {SIMPLE_KEY facing dir} [/tag] [/tag] [tag] name="random_placement" max=infinite {INSERT_TAG} {REQUIRED_KEY num_items f_unsigned,s_unsigned} {REQUIRED_KEY variable string} {DEFAULT_KEY min_distance s_unsigned 0} {DEFAULT_KEY allow_less s_bool no} {FILTER_TAG "filter_location" location {INSERT_TAG}} {ACTION_TAG "command" min=1} [/tag] {EMPTY_TAG "break,continue,return" 0 infinite} # The MicroAI tag is in a league of its own... [tag] name="micro_ai" max=infinite {INSERT_TAG} {REQUIRED_KEY ai_type string} {REQUIRED_KEY side s_unsigned} {REQUIRED_KEY action micro_ai_action} {SIMPLE_KEY ca_id string} [switch] key=ai_type [case] value=wolves {FILTER_TAG "filter" unit min=1} {FILTER_TAG "filter_second" unit min=1} {DEFAULT_KEY attack_only_prey s_bool no} {SIMPLE_KEY avoid_type string_list} {DEFAULT_KEY ca_score s_unsigned 90000} [/case] [case] value=wolves_multipacks {DEFAULT_KEY ca_score s_unsigned 300000} {DEFAULT_KEY pack_size s_unsigned 3} {DEFAULT_KEY show_pack_number s_bool no} {DEFAULT_KEY type string Wolf} [/case] [case] value=big_animals {FILTER_TAG "filter" unit min=1} {DEFAULT_KEY ca_score s_unsigned 300000} {FILTER_TAG "filter_location" location ()} {FILTER_TAG "filter_location_wander" location ()} {FILTER_TAG "avoid_unit" unit ()} [/case] [case] value=forest_animals {DEFAULT_KEY ca_score s_unsigned 300000} {SIMPLE_KEY rabbit_type string} {SIMPLE_KEY tusker_type string} {SIMPLE_KEY tusklet_type string} {SIMPLE_KEY deer_type string} {FILTER_TAG "filter_location" location ()} {DEFAULT_KEY rabbit_number s_unsigned 6} {DEFAULT_KEY rabbit_enemy_distance s_unsigned 3} {SIMPLE_KEY rabbit_hole_img string} [/case] [case] value=herding {FILTER_TAG "filter" unit min=1} {FILTER_TAG "filter_second" unit min=1} {FILTER_TAG "filter_location" location min=1} {REQUIRED_KEY herd_x s_unsigned} {REQUIRED_KEY herd_y s_unsigned} {DEFAULT_KEY attention_distance s_unsigned 8} {DEFAULT_KEY attack_distance s_unsigned 4} {DEFAULT_KEY ca_score s_unsigned 300000} [/case] [case] value=hunter {FILTER_TAG "filter" unit min=1} {DEPRECATED_KEY id string} {REQUIRED_KEY home_x s_unsigned} {REQUIRED_KEY home_y s_unsigned} {DEFAULT_KEY ca_score s_unsigned 300000} {FILTER_TAG "filter_location" location ()} {DEFAULT_KEY rest_turns s_unsigned 3} {DEFAULT_KEY show_messages s_bool no} [/case] [case] value=swarm {DEFAULT_KEY ca_score s_unsigned 300000} {DEFAULT_KEY enemy_distance s_unsigned 5} {DEFAULT_KEY scatter_distance s_unsigned 3} {DEFAULT_KEY vision_distance s_unsigned 12} [/case] [case] value=assassin {FILTER_TAG "filter" unit min=1} {FILTER_TAG "filter_second" unit min=1} {FILTER_TAG "prefer" location ()} [/case] [case] value=bottleneck_defense {REQUIRED_KEY x s_range_list} {REQUIRED_KEY y s_range_list} {REQUIRED_KEY enemy_x s_range_list} {REQUIRED_KEY enemy_y s_range_list} {DEFAULT_KEY active_side_leader s_bool no} {DEFAULT_KEY ca_score s_unsigned 300000} {SIMPLE_KEY healer_x s_range_list} {SIMPLE_KEY healer_y s_range_list} {SIMPLE_KEY leadership_x s_range_list} {SIMPLE_KEY leadership_y s_range_list} [/case] [case] value=fast_ai {DEFAULT_KEY attack_hidden_enemies s_bool no} {DEFAULT_KEY dungeon_mode s_bool no} {DEFAULT_KEY include_occupied_attack_hexes s_bool no} {DEFAULT_KEY leader_weight s_unsigned 2} {DEFAULT_KEY leader_additional_threat s_unsigned 1} {DEFAULT_KEY leader_attack_max_units s_unsigned 3} {DEFAULT_KEY move_cost_factor s_real 2} {DEFAULT_KEY weak_units_first s_bool no} {DEFAULT_KEY skip_combat_ca s_bool no} {DEFAULT_KEY skip_move_ca s_bool no} {DEFAULT_KEY threatened_leader_fights s_bool no} {FILTER_TAG "avoid" location ()} {FILTER_TAG "filter" unit ()} {FILTER_TAG "filter_secont" unit ()} [/case] [case] value=goto {FILTER_TAG "filter_location" location min=1} {DEFAULT_KEY avoid_enemies s_unsigned 0} {DEFAULT_KEY ca_score s_unsigned 300000} {DEFAULT_KEY ignore_enemy_at_goal s_bool no} {DEFAULT_KEY ignore_units s_bool no} {DEFAULT_KEY release_unit_at_goal s_bool no} {DEFAULT_KEY release_all_units_at_goal s_bool no} {DEFAULT_KEY unique_goals s_bool no} {DEFAULT_KEY use_straight_line s_bool no} {FILTER_TAG "filter" unit ()} [/case] [case] value=return_guardian {FILTER_TAG "filter" unit min=1} {DEPRECATED_KEY id string} {SIMPLE_KEY return_x s_unsigned} {SIMPLE_KEY return_y s_unsigned} {DEFAULT_KEY ca_score s_unsigned 100100} [/case] [case] value=stationed_guardian {FILTER_TAG "filter" unit min=1} {DEPRECATED_KEY id string} {REQUIRED_KEY distance s_unsigned} {REQUIRED_KEY station_x s_unsigned} {REQUIRED_KEY station_y s_unsigned} {REQUIRED_KEY guard_x s_unsigned} {REQUIRED_KEY guard_Y s_unsigned} {DEFAULT_KEY ca_score s_unsigned 300000} [/case] [case] value=coward {FILTER_TAG "filter" unit min=1} {DEPRECATED_KEY id string} {REQUIRED_KEY distance s_unsigned} {DEFAULT_KEY attack_if_trapped s_bool no} {SIMPLE_KEY avoid_x s_unsigned} {SIMPLE_KEY avoid_y s_unsigned} {SIMPLE_KEY seek_x s_unsigned} {SIMPLE_KEY seek_y s_unsigned} {DEFAULT_KEY ca_score s_unsigned 300000} {FILTER_TAG "filter_second" unit ()} [/case] [case] value=zone_guardian {FILTER_TAG "filter" unit min=1} {FILTER_TAG "filter_location" location min=1} {DEPRECATED_KEY id string} {DEFAULT_KEY ca_score s_unsigned 300000} {SIMPLE_KEY station_x s_unsigned} {SIMPLE_KEY station_y s_unsigned} {FILTER_TAG "filter_location_enemy" location ()} [/case] [case] value=hang_out {DEFAULT_KEY ca_score s_unsigned 170000} {SIMPLE_KEY mobilize_on_gold_less_than s_unsigned} {FILTER_TAG "avoid" location ()} {FILTER_TAG "filter" unit ()} {FILTER_TAG "filter_location" location ()} [tag] name="mobilize_condition" super="$condition_wml" [/tag] [/case] [case] value=healer_support {DEFAULT_KEY aggression s_real 1.0} {DEFAULT_KEY injured_units_only s_bool no} {DEFAULT_KEY max_threats s_unsigned 9999} {FILTER_TAG "filter" unit ()} {FILTER_TAG "filter_second" unit ()} [/case] [case] value=lurkers {FILTER_TAG "filter" unit min=1} {FILTER_TAG "filter_location" location min=1} {FILTER_TAG "filter_location_wander" location ()} {DEFAULT_KEY ca_score s_unsigned 300000} {DATA_TAG stationary s_bool no} [/case] [case] value=messenger_escort {FILTER_TAG "filter" unit min=1} {DEPRECATED_KEY id string} {REQUIRED_KEY waypoint_x s_range_list} {REQUIRED_KEY waypoint_y s_range_list} {DEFAULT_KEY ca_score s_unsigned 300000} {DEFAULT_KEY enemy_death_chance s_real 0.67} {DEFAULT_KEY messenger_death_chance s_bool 0.0} {DEFAULT_KEY invert_order s_bool no} {FILTER_TAG "filter_second" unit ()} [/case] [case] value=patrol {FILTER_TAG "filter" unit min=1} {DEPRECATED_KEY id string} {REQUIRED_KEY waypoint_x s_range_list} {REQUIRED_KEY waypoint_y s_range_list} {SIMPLE_KEY attack string_list} {DEFAULT_KEY ca_score s_unsigned 300000} {DEFAULT_KEY one_time_only s_bool no} {DEFAULT_KEY out_and_back s_bool no} [/case] [case] value=protect_unit [tag] name="unit" min=1 max=infinite {REQUIRED_KEY id string} {REQUIRED_KEY goal_x s_unsigned} {REQUIRED_KEY goal_y s_unsigned} [/tag] {DEFAULT_KEY disable_move_leader_to_keep s_bool no} [/case] [case] value=recruit_random {DEFAULT_KEY ca_score s_unsigned 180000} {DEFAULT_KEY skip_low_gold_recruit s_bool no} [tag] name="probability" max=infinite {REQUIRED_KEY type string_list} {REQUIRED_KEY probability s_real} [/tag] [/case] [case] value=recruit_rushers {DEFAULT_KEY ca_score s_unsigned 180000} {DEFAULT_KEY randomness s_real 0.1} [/case] [case] value=simple_attack {DEFAULT_KEY ca_score s_unsigned 110000} {DEFAULT_KEY weapon s_int -1} {FILTER_TAG "filter" unit ()} {FILTER_TAG "filter_second" unit ()} [/case] [/switch] [/tag] # Undocumented tags (or at least not linked from ActionWML wiki page) [tag] name="add_ai_behaviour" max=infinite deprecated=yes {FILTER_TAG "filter" unit min=1} {REQUIRED_KEY side s_unsigned} {DEFAULT_KEY sticky s_bool no} {DEFAULT_KEY loop_id string main_loop} {SIMPLE_KEY evaluation string} {SIMPLE_KEY execution string} {SIMPLE_KEY bca_id string} [/tag] {ACTION_TAG "unsynced" max=infinite} [tag] name="clear_global_variable" {REQUIRED_KEY global string} {REQUIRED_KEY namespace string} {SIMPLE_KEY side s_unsigned} {DEFAULT_KEY immediate s_bool no} [/tag] [tag] name="get_global_variable" {REQUIRED_KEY from_global string} {REQUIRED_KEY to_local string} {REQUIRED_KEY namespace string} {SIMPLE_KEY side s_unsigned} [/tag] [tag] name="set_global_variable" {REQUIRED_KEY to_global string} {REQUIRED_KEY from_local string} {REQUIRED_KEY namespace string} {SIMPLE_KEY side s_unsigned} {DEFAULT_KEY immediate s_bool no} [/tag] [tag] name="store_rotate_map_location" max=infinite {INSERT_TAG} {REQUIRED_KEY variable string} {DEFAULT_KEY angle s_int 1} {SIMPLE_KEY mode s_unsigned} # TODO: This should really be an enum type [tag] name="source" min=1 {SIMPLE_KEY x s_unsigned} {SIMPLE_KEY y s_unsigned} [/tag] [tag] name="destination" min=1 {SIMPLE_KEY x s_unsigned} {SIMPLE_KEY y s_unsigned} [/tag] [/tag] any_tag=yes [/tag]