UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 IP: 198.54.202.210 URI: http://wesnoth.slack.it/?UnitWML - - - - - Index: UnitWML =================================================================== RCS file: /home/wesnoth/cvsroot/wikiroot/UnitWML,v retrieving revision 1.22 diff -u -r1.22 UnitWML --- UnitWML 19 May 2005 19:59:23 -0000 1.22 +++ UnitWML 13 Jun 2005 19:29:10 -0000 @@ -3,112 +3,136 @@ [unit] tags are stored in the directory units/. Each [unit] tag defines one unit type. -the following keys are recognized. -* //id// the value that must be entered in a ||type|| key to describe this unit type. -* //name// (translatable) displayed in the Status Table for units of this type. - +The following keys of the [unit] tag are recognized. +* //id// the value that must be entered in a ||type|| + key to describe this unit type. +* //name// (translatable) displayed in the Status Table + for units of this type. * //race// used in standard unit filter (see FilterWML). -Also a shortcut to the keys -//num_traits//, //markov_chain_size//, //not_living//, //male_names//, and //female_names// -(see UnitsWML for information on shortcuts). -* //num_traits// the number of traits that units of this type should recieve when they are recruited. -* //male_names//, //female_names// a list of names. -* //markov_chain_size// the wesnoth engine will cut the names provided in the keys above into syllables, and will then -run -a probability algorithm to guess from your name list what syllables fit well together, can start or end a name. this key -tells the name generation engine how long a syllable is for that particular race. default is 2 letters.<br/>In my -experience, the two above keys only work properly inside a [race] tag. -* //not_living// units of this type cannot be poisoned, drained from, or plagued (see AbilitiesWML). + Also a shortcut to the keys //num_traits//, //markov_chain_size//, + //not_living//, //male_names//, and //female_names// + (see UnitsWML for information on shortcuts). +* //num_traits// the number of traits that units of this + type should receive when they are recruited, + overriding the value set in the [race] tag. * //gender// has a value of either //male// or //female//, -and determines which of the keys //male_names// and //female_names// should be read. -When a unit of this type is recruited, -it will be randomly assigned a name by the random name generator, which will use these names as a base. - -(all images assume the unit is facing right; when the unit is facing left the images will be inverted.) -* //image// the unit image displayed on the main map -* //image_moving// the image displayed while the unit is moving -* //image_defensive// the image for when the unit is defending -* //image_long// the image when the unit is using a long-range attack (can be overloaded see AttackWML) -* //image_short// the image when the unit is unisng a short range attack (can be overloaded see AttackWML) -* //image_defensive_long// the image when the unit is defending against a long-range attack -* //image_defensive_short// the image when the unit is defending against a short-range attack -* //image_leading// the image for when the unit is using its leadership ability (if present) -* //image_healing// the image for when the unit is using its healing ability (if present) -* //profile// the image when the unit is talking. See [message], InterfaceActionsWML -* //unit_description// (translatable) the text displayed in the unit descriptor box for this unit. -Default 'No description available...' -* //get_hit_sound// the sound played when this unit is damaged. -* //alpha// to what extent is the unit transparent (float) -* //die_sound// the sound played when the unit dies -* ||[defend]|| describes an animation for when this unit defends. Multiple [defend]s can be used - * //range// if this key is present, the attack must be at this range in order for the animation to trigger. -Values 'short', 'long' - * //hits// whether the attack should hit in order for the animation to trigger - * ||[frame]|| describes one frame of the defense animation. See [frame], AttackWML -* ||[death]|| describes an animation for when this unit dies. Time 0 marks when the death blow hits, so start with time -0. If you start with time //x//, -Wesnoth will map everything to being 0 based by subtracting x from all the times in the animation. If a unit has a -defense animation, the defense -animation will play in full, followed by the death animation. - * ||[frame]|| describes one frame of the death animation. See [frame], AttackWML -* ||[teleport_anim]|| describes an animation for when this unit teleports. the frames before time 0 are used before the -actual teleport takes place, the ones after are displayed after (at the new location) - -* //movetype// a shortcut to the tags ||[movement_costs]||, ||[defense]||, and ||[resistance]||, and to the -keys //flies//, . -See UnitsWML for information on shortcuts. -* ||[movement_costs]|| describes how fast the unit moves on different terrains. -Takes in any string as a key. -The attribute ||//terrain//=//speed//|| -makes the unit use //speed// move points to move onto terrain with ||name=//terrain//||. -* ||[defense]|| describes how likely the unit is to be hit on different terrains. -The attribute ||//terrain//=//defense//|| -makes the unit have a //defense// % chance to be hit in terrain with ||name=//terrain//||. -* ||[resistance]|| describes how much damage the unit takes from different types of attacks. -The attribute ||//type//=//resistance//|| -makes the unit take //resistance// % damage from attacks with ||type=//type//|| (See AttackWML). -* //flies// is either //true// or //false//. -A unit that flies does not have its height adjusted for different terrains. - -After max level advancement support: -* ||[advancement]|| describes what happens to a unit when it reaches the XP required for advancement. - If the unit has advanceto=null set, the action specified by the advancement tag automatically happens. - However, if the unit both can level up into a new unit and has an advancement tag set, the player will get - to choose whether or not the unit should level up or get the advancement. -* //id//: normal internationalization id. -* //description//: a description of the advancement -* //max_times//: the maximum times the unit can be awarded this advancement. Defaults to 1. -* ||[effect]||: Each [advancement] tag contains [effect] tags which are in the exact same format as the [effect] tags -inside a [trait] tag. -See EffectWML - -See Also TerrainWML + and determines which of the keys //male_names// and //female_names// + should be read. When a unit of this type is recruited, + it will be randomly assigned a name by the random name generator, + which will use these names as a base. * //ability// a list of the unit's abilities. -See AbilitiesWML for a description of abilities. -* //hitpoints// the maximum HP that the unit has, and the HP it has when it is created -* //movement// the number of move points that this unit recieves each turn -* //experience//, //advanceto// When this unit has experience equal to //experience//, -it is replaced by a unit of the type that the value of //advanceto// refers to. -All modifications that have been done to the unit are applied to the unit it is replaced by. -* //cost// when a player recruits a unit of this type, he loses //cost// gold. -If this would cause him to have <0 gold, he cannot recruit the unit. + See AbilitiesWML for a description of abilities. +* //hitpoints// the maximum HP that the unit has, and the HP it has + when it is created. +* //movement// the number of move points that this unit recieves each turn. +* //experience//, //advanceto// When this unit has experience equal to + //experience//, it is replaced by a unit of the type that the value of + //advanceto// refers to. All modifications that have been done to the + unit are applied to the unit it is replaced by. +* //cost// when a player recruits a unit of this type, the player + loses //cost// gold. If this would cause gold to drop below 0, + the unit cannot be recruited. * //level// the amount of upkeep the unit costs. -After this unit fights, its opponent gains //level// experience. -See also kill_experience (GameConfigWML), and leadership -(AbilitiesWML). + After this unit fights, its opponent gains //level// experience. + See also kill_experience (GameConfigWML), and leadership (AbilitiesWML). * //alignment// how the unit's damage should be affected by its lawful bonus -(See TimeWML). -* //usage// the way that the AI should recruit this unit, as determined by the scenario designer. -(See //recruitment_pattern//, AiWML). The following are conventions on use: - * 'scout' Fast - * 'fighter' Melee fighter - * 'archer' Ranged fighter - * 'mixed fighter' Melee and ranged fighter - * 'healer' Specialty 'heals' or 'cures' + (See TimeWML). +* //usage// the way that the AI should recruit this unit, as determined + by the scenario designer. (See //recruitment_pattern//, AiWML). + The following are conventions on usage: + * 'scout' Fast, + * 'fighter' Melee fighter, + * 'archer' Ranged fighter, + * 'mixed fighter' Melee and ranged fighter, and + * 'healer' Specialty 'heals' or 'cures'. +* //unit_description// (translatable) the text displayed in the + unit descriptor box for this unit. Default 'No description available...'. +* //movetype// a shortcut to the tags ||[movement_costs]||, ||[defense]||, + and ||[resistance]||, and to the keys //flies//, . + See UnitsWML for information on shortcuts. +* ||[movement_costs]|| describes how fast the unit moves on different + terrains. Takes any string as a key. The attribute + ||//terrain//=//speed//|| makes the unit use //speed// move + points to move onto terrain with ||name=//terrain//||. +* ||[defense]|| describes how likely the unit is to be hit on different + terrains. The attribute ||//terrain//=//defense//|| makes the unit + have a //defense// % chance to be hit in terrain with ||name=//terrain//||. +* ||[resistance]|| describes how much damage the unit takes from + different types of attacks. The attribute ||//type//=//resistance//|| + makes the unit take //resistance// % damage from attacks + with ||type=//type//|| (See AttackWML). +* //flies// is either //true// or //false//. + A unit that flies does not have its height adjusted for different terrains. -The unit tag also recognizes the tag ||[attack]||, which is an attack for the unit. +The [unit] tag also recognizes the tag ||[attack]||, which is an +attack for the unit. See AttackWML for a description of the syntax of [attack]. + +||Animation and sound keys|| + +Several keys of the [unit] tag are available to control the way +units of this type will be animated, and the sounds associated +with their actions. All images assume the unit is facing right; +when the unit is facing left the images will be reversed. +* //image// the unit image displayed on the main map. +* //image_moving// the image displayed while the unit is moving. +* //image_defensive// the image for when the unit is defending. +* //image_long// the image when the unit is using a + long-range attack (can be overloaded see AttackWML). +* //image_short// the image when the unit is using a + short range attack (can be overloaded see AttackWML). +* //image_defensive_long// the image when the unit is + defending against a long-range attack. +* //image_defensive_short// the image when the unit is + defending against a short-range attack. +* //image_leading// the image for when the unit is using + its leadership ability (if present). +* //image_healing// the image for when the unit is using + its healing ability (if present). +* //profile// the image when the unit is talking. + See [message], InterfaceActionsWML . +* //get_hit_sound// the sound played when this unit is damaged. +* //alpha// to what extent is the unit transparent (floating point value). +* //die_sound// the sound played when the unit dies. +* ||[defend]|| describes an animation for when this unit defends. + Multiple [defend]s tags can be used. + * //range// if this key is present, the attack must be at this range + in order for the animation to trigger. Values 'short', 'long'. + * //hits// whether the attack should hit in order for the + animation to trigger. + * ||[frame]|| describes one frame of the defense animation. + See [frame], AttackWML . +* ||[death]|| describes an animation for when this unit dies. + Time 0 marks when the death blow hits, so start with time 0. + If you start with time //x//, Wesnoth will map everything to being 0 + based by subtracting x from all the times in the animation. + If a unit has a defense animation, the defense animation will play + in full, followed by the death animation. + * ||[frame]|| describes one frame of the death animation. + See [frame], AttackWML . +* ||[teleport_anim]|| describes an animation for when this unit teleports. + The frames before time 0 are used before the actual teleport takes place, + the ones after are displayed after (at the new location). + + +After max level advancement support: +* ||[advancement]|| describes what happens to a unit when it reaches the XP + required for advancement. If the unit has advanceto=null set, the action + specified by the advancement tag automatically happens. However, if the + unit both can level up into a new unit and has an advancement tag set, + the player will get to choose whether or not the unit should level up + or get the advancement. +* //id//: normal internationalization id. +* //description//: a description of the advancement. +* //max_times//: the maximum times the unit can be awarded this + advancement. Defaults to 1. +* ||[effect]||: Each [advancement] tag contains [effect] tags which are + in the exact same format as the [effect] tags inside a [trait] tag. + + ||See Also|| * AttackWML * ReferenceWML +* EffectWML +* TerrainWML
_______________________________________________ Wesnoth-wiki-changes mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/wesnoth-wiki-changes
