Difference between revisions of "InternalActionsWMLUnitTags"
From The Battle for Wesnoth Wiki
(Initial creation.) |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{WML Tags}} | ||
+ | |||
When a unit is stored, all keys and tags in the unit definition may be manipulated, including some others, with '''[set_variable]'''. 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.) | When a unit is stored, all keys and tags in the unit definition may be manipulated, including some others, with '''[set_variable]'''. 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.) | ||
Line 15: | Line 17: | ||
* hitpoints | * hitpoints | ||
* id | * id | ||
− | * language_name (same as the name key in the unit config) | + | * language_name (same as the name key in the unit type config) |
* max_experience | * max_experience | ||
* max_hitpoints | * max_hitpoints | ||
Line 30: | Line 32: | ||
* y | * y | ||
* zoc | * zoc | ||
− | |||
* [movement_costs] | * [movement_costs] | ||
* [defense] | * [defense] | ||
Line 40: | Line 41: | ||
* [modifications] | * [modifications] | ||
− | These values are all children of the stored unit variable (it is a [[VariablesWML#Container|container]] variable) and the bracketed values ( | + | These values are all children of the stored unit variable (it is a [[VariablesWML#Container|container]] variable) and the bracketed values (movement_costs, defense, etc.) are, themselves, container variables. Example: |
[set_variable] | [set_variable] | ||
name=unit_store.status.poisoned | name=unit_store.status.poisoned | ||
value=yes | value=yes | ||
[/set_variable] | [/set_variable] | ||
+ | |||
+ | == See Also == | ||
+ | * [[VariablesWML]] | ||
+ | * [[InternalActionsWML]] | ||
+ | |||
+ | [[Category: WML Reference]] | ||
+ | [[Category: ActionsWML]] |
Latest revision as of 14:42, 25 July 2024
When a unit is stored, all keys and tags in the unit definition may be manipulated, including some others, with [set_variable]. 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.)
- advances_to
- alignment
- alpha
- attacks_left
- canrecruit
- cost
- experience
- facing
- flying
- gender
- goto_x
- goto_y
- hitpoints
- id
- language_name (same as the name key in the unit type config)
- max_experience
- max_hitpoints
- max_moves
- moves
- overlays
- resting
- side
- type
- unit_description
- unrenamable
- upkeep
- x
- y
- zoc
- [movement_costs]
- [defense]
- [resistance]
- [variables]
- [status]
- [attack]
- [modifications_description]
- [modifications]
These values are all children of the stored unit variable (it is a container variable) and the bracketed values (movement_costs, defense, etc.) are, themselves, container variables. Example:
[set_variable] name=unit_store.status.poisoned value=yes [/set_variable]
See Also
This page was last edited on 25 July 2024, at 14:42.