Characters

 

 

Each different sort of character has its own subdirectory. A particular type of character is called a race. In addition, each race has one or more subtypes, all contained within the same subdirectory. This document enumerates all the files that go into forming a race subdirectory, what information is contained in each file, and how subtypes of the race can be generated.

 

File Roster

 

The following is a roster of file types that each race subdirectory has:

.act - "Actor File"*

.att - "Attributes"*

.def - "Default Positions"*

.dmv/.scr - "Moves"

_fwp.lst - "Free Weapons"*

.mas - "Materials & Sounds"*

.mvl - "Move List"*

.off - "OFFs"*

.prj - "Projectile"*

.sta - "Statistics"*

.vue - "Get-up Animations"

.wpn - "Weapon File"*

 

 

* indicates that this type of file is a text-file.

 

Actor File (.act)

 

Every subtype has its own actor file, named "subtype_name.act" The purpose of an actor file is to give the limb hierarchy of the characters, which specifies the manner in which the character is put together out of body parts. Each line of data corresponds to a body part. For each line, the following data is specified:

The # of types of body part that might appear in this slot. This is almost always 1, but can be 2 for a hand that can hold a weapon.

The .off files for the body part(s).

The number of "children", or body parts that stem from this body part.

The X,Y,and Z offsets of this body part in relation to its parent body part, given in Treyarchs (60T = 1 meter.)

What kind of body part it is.

 

Attributes File (.att)

 

Every subtype has its own attribute file, named "subtype_name.att" An attribute file lists various attribute variables and what value each variable should have for the subtype. Some default values are given in the file /data/misc/default.att, and other default values are computed. Listing a particular attribute in a subtype's attribute file overrides any default values. Conversly, failing to list a particular attribute means that this subtype will accept the default value for that attribute. A detailed explanation of the various attributes is given in the Attributes document.

 

Default Positions File (.def)

 

Every subtype has its own default positions file, named "subtype_name.def" This file primarily lists the orientations for each of the limbs when a character of the subtype is in its "default" position. This is created by a program. If a character is modified, the last thing to do is to re-build its .def file, which is done by using the "old" move editor (type MOVED from the main menu while holding down right-shift.) See Old Move Editor document.

"Moves" (.dmv/.scr)

 

A race subdirectory will contain various move files, named "move_name.dmv" or "move_name.scr," which are files recorded using the move editor. The moves that each subtype uses are listed in their respective Move List files, and these moves must be located in the race subdirectory. The .scr files are hold-overs from an older version of the move editor. See the Move List explanation for further details regarding moves.

 

Free Weapons File (_fwp.lst)

 

Every subtype has its own free weapons file, named "subtype_name_fwp.lst"

This file specifies the .off file to be used when a creature of this subtype sheathes its weapon, and what material the weapon is made of (for use when generating collision sounds.)

 

 

Materials and Sounds File (.mas)

 

Every subtype has its own materials & sounds file, named "subtype_name.mas" This file performs two functions:

  1. It indicates what material type each of the subtype's body parts is made of, so that the proper sounds can be generated for collisions.
  2. It specifies which sound file should be used when a creature of that subtype is supposed to make in several given situations.

 

The material specifications are a list of material names, given in the same order as the body parts are listed in the .act file for that subtype. In the case of the hands, the material should be that of the weapon carried in that hand, if any. Valid material names are: rock, hammer, sword, spear, shield, flesh, armor, bone, straw.

 

The sounds specifications cover the following situations, in order.

  1. Screaming from being hit: There are three variations, and the 0 will be replaced by a 1 or 2 for the 2nd and 3rd variant.
  2. Exertion noise as you are jumping.
  3. A death cry: There are two variations, and the 0 will be replaced with a 1 for the 2nd variant.
  4. Walking. The number at the end of the file name is incremented by one for the other foot. So that, if z_wlk2 is listed, z_wlk2 and z_wlk3 are used.
  5. Landing on your feet after jumping.
  6. Falling down.
  7. A victory exclamation.

 

Move List (.mvl)

 

Every subtype has its own move list, named "subtype_name.mvl" The purpose of the move list is to catalogue each move that the computer-controlled characters of that subtype can use. There are four classes of move listed in this file:

  1. "ai" Attacking moves for the AI to choose from.
  2. "maneuver" Maneuvering moves for the AI to choose from.
  3. "environment" Moves that are launched in certain situations by the scripting language files. Typically, this is done in the scripts for the Quest in order to get some creature to behave in a certain way.
  4. "projectile" A move that will launch a projectile.

 

A move list begins with a number that indicates how many moves there are in the list. Then, each subsequent line contains the name of a move file followed by the class of move that it is. For "ai" and "maneuver" class moves, it is possible to list a given move more than once in order to get the AI to choose that move more often than it would normally.

 

All moves in the move list must be located in the race subdirectory.

 

OFFs (.off)

 

Each race subdirectory will contain several OFFs. The purpose of the OFFs is to represent the physical geometry of the various body parts for the subtypes of the race. The OFFs contain data generated from 3D-modeling, including texture-mapping information. More information is available in the Modeling document.

 

Projectile File (.prj)

 

A race subdirectory may contain some projectile files. Each such file represents a projectile that can be used by some subtype of that race. A projectile file contains the following information, in order:

  1. The number of things to display as the representation of the projectile. A projectile can be represented either by a physical model (an .off), a sprite, or 2 sprites displayed on top of each other. Usually 1.
  2. The .off, .bmp, or .ban to use for the representation of the projectile.
  3. MAGIC_BULLET, MAGIC_BOLT or THROWN_OBJECT, depending upon which type it is. A MAGIC_BULLET forms as the projectile user raises his hands, then shoots out at the target. A MAGIC_BOLT, which must be a physical model, stretches out to strike the target (the Wizard's lightning.) A THROWN_OBJECT is tossed by the projectile user.
  4. Whenever the physical representation is a .bmp or a .ban, three numbers which represent the apparent size of the sprite in each of the three dimensions. If more than one sprite is being used, each sprite will have its own set of size data.
  5. The word "none." (Parameter no longer used)
  6. Speed. This is the speed of a MAGIC_BOLT or MAGIC_BULLET, and is the extra boost of speed a THROWN_OBJECT gets upon release. Given in Treyarchs/sec.
  7. Damage. How much damage is inflicted by the projectile. A THROWN_OBJECT will have its damage done modified by a factor dependant upon its speed.
  8. The mass of the projectile. Given in kilograms. A heavy projectile knocks the target back.
  9. Duration. How long in seconds it will travel before disappearing.
  10. Reload time. How long in seconds before the user can reload another.
  11. Minimum range. Tells the AI user to switch to melee weapon inside this range.
  12. Ideal range. Tells the AI what range to try to maintain while firing.
  13. Range tolerance. Tells the AI the width of the ideal range band.
  14. The name of the sound file to be used when the projectile is launched. "none" indicates that no sound is to be used.

 

Statistics File (.sta)

 

Every subtype has its own statistics file, named "subtype_name.sta" Each statistics file lists the following information, in order:

  1. The name of the subtype
  2. The maximum hit points for a creature of that subtype
  3. Whether the creature is right-handed (unused?)
  4. The creature's mass, in kilograms
  5. The creature's AI number, which is a four-digit number. Each digit controls a different AI feature, but only the first and second digit do anything anymore. The first digit is aggressiveness, rated from 0 to 2. The second digit controls what the AI character will try to do while closing range. If the second digit is a 0, then he will try to move to the rear of the opponent. Otherwise, he closes normally.
  6. For each body part, the following data:
  1. The armor level. This value is subtracted from the damage that a blow taken to that body part does.
  2. How many hit points of damage that part can take.
  3. Whether the body part is severable.

 

Get-up Animations (.vue)

 

The .vue format is created by 3D-Studio. Every race can specify a getup_b.vue and a getup_f.vue animation to use when getting up from its back/front. If the file does not exist, a mathematical algorithm is used instead.

 

Weapon File (.wpn)

 

A race subdirectory will contain various weapon files, named "move_name.wpn" There will be one weapon file for each type of weapon that can be wielded by the subtypes of that race. A weapon is a triangle that damages opponents when it collides with them. It is attached to physical geometry that represents the weapon, but the triangle is the only thing that collides and does damage. Within each weapon file is the following information, in order:

  1. Name. The name of the .off file that the weapon triangle is attached to.
  2. The type of weapon that this is. 0=Sword. 1=Hammer. 2=Axe. 3=Dagger. 4=Shield. 5=Fist. 6=Changa Blade. 7=Mantis Claw. Different weapon types are held and aimed differently. Particularly when extended or blocking.
  3. The mass of the weapon, in kilograms. Heavy weapons will knock back.
  4. The weapon tip vector, the weapon blade vector, and the weapon base vector. these represent the positions of the three points of the weapon triangle, relative to the .off to which the triangle is attached.
  5. The distance to the blade base, from the hand. This is given as a fraction of the total length of the triangle. It indicates how far up the weapon triangle the "sharp" part of the triangle begins. So, if this were set to 0, then the whole triangle is sharp, whereas setting this number to .5 will make the lower half of the triangle non-damaging.
  6. Default mode. Set it to 0.
  7. Double sided. Whether both sides of the triangle are sharp. If this is set to 0, then only the edge from the weapon base point to the weapon blade point is sharp.
  8. Two handed. Don't do it. Set it to 0.
  9. Edged. Whether the weapon should try to aim its edge when swung. With an axe or a sword, you want the weapon to turn so that the edge will hit the opponent. With a mace or club, you don't care.
  10. Thrust, Chop, Bash factors. Thrust is ignored. The chop and bash factors are multipliers to the speed of the weapon that will determine how much damage is done from a blow. The difference between chop and bash damage is that chop damage is reduced if the weapon does not hit edge-on.
  11. directory. The directory containing the weapon.
  12. color file. Obsolete.
  13. rigid file. Obsolete.
  14.   by Treyarch

  15. Back to Scripting