AttackWML
From Wesnoth
the [attack] tag
the following keys are used to describe an attack in WML:
- name the name of the attack
- description the display name of the weapon, eg used for translations
- type the damage type of the attack. Used in determining resistance to this attack (see [resistances], UnitWML). Possible values are 'blade', 'pierce', 'impact', 'fire', 'cold', and 'holy'.
- special the special abilitiy of the attack. Currently having more than 1 ability is not supported. See AbilitiesWML for a list of possible values
- icon the image to use as an icon for the attack in the attack choice menu
- range the range of the attack. Used to determine the enemy's retaliation, which will be of the same type. Also displayed on the status table in parentheses.
- 'short' displays "melee" (default)
- 'long' displays "ranged"
- damage the damage of the attack
- number the number of strikes the attack has
- attack_weight helps the AI to choose which attack to use when attacking; highly weighted attacks are more likely to be used.
- defense_weight used to determine which attack is used for retaliation. This affects gameplay, as the player is not allowed to determine his unit's retaliation weapon.
These tags are used to describe the attack's animation. Any number of them can be used in a single [attack]
- [frame] describes one frame of the attack animation. Usually used for melee attacks (range=short).
- begin when to start displaying this frame (in milliseconds; 0 is the impact moment. For example, -500 is half a second before impact.)
- end when to stop displaying this frame
- xoffset how much the image must be moved toward the enemy (in pixels)
- image the image to display during this frame facing right; it is flipped when the unit is facing the opposite direction.
- halo comma separated list of halo images to be displayed. Allow for at least 50 time units per image. If your list contains 5 images, the amount of * time between the begin and end keys should be at least 250.
- halo_x, halo_y offset for the center of the halo image. 0,0 puts the center of the halo image on the center of the unit
- [missile_frame] describes a missile image and how to display it. Usually used for ranged attacks (range=long).
- begin when to start displaying this particular unit
- end' when to stop displaying this image
- xoffset how much the image must be moved toward the enemy
- image the image to display when the unit is attacking northwards. Flipped horizontally if the unit attacks southwards.
- image_diagonal the image to display if the unit is attacking diagonally. Displayed normally if the unit is facing northeast, otherwise flipped.
- [sound] describes a sound to play during the attack
- sound the sound to play if the attack hits
- sound_miss the sound to play if the attack misses
- time when to start playing the sound (in milliseconds; 0 is the impact moment)
See Also
This page was last modified 09:53, 19 July 2007.
