<name>weapon name</name>
^ name of the weapon, different sections can have different names
<armslevel>0-10</armslevel>
^ used to determine weapon availability and reward
- lower value = larger weapon with lower reward
- higher value = smaller weapon with higher reward
<description>weapon description</description>
^ contents of this attribute are displayed in the in game pop-up
<icon>icon.bmp</icon>
^ location and name of the icon to display in buy menus/windows
<cost>#</cost>
^ cost to buy <bundlesize> amount of the accessory
<bundlesize>#</bundlesize>
^ the amount of the accessory you buy per purchase
<deathanimationweight>#</deathanimationweight> (optional attribute)
^ weight the weapon receives in determining random death events
- default is 0 if omitted
<startingnumber>#</startingnumber> (optional attribute)
^ number of this weapon players will start with
- default is 0 if omitted
- using -1 means the weapon is unlimited
<maximumnumber>#</maximumnumber> (optional attribute)
^ maximum number of this weapon players are allowed to have
- default is no limit
- item is non-buyable if you set this to 0
<model type="...">filename</model> (optional attribute)
^ model that will appear in the weapon window at lower left
- defaults to the projectile defined for the user's tank if omitted
- type can be ASE or MilkShape currently
Some things to keep in mind, any time you see "Weapon..." that means that another primitive would then follow here. Below, the attributes that are specific to each primitive are listed. In a real weapon, you will need to add in the proper weapon head attributes that are listed above for your accessory to work. And finally, optional attributes are not required, so you only put them in when you desire that particular effect. Just look through the default and Apocalypse accessories.xml files that come with the game for plenty of examples.
Aims a number of the next primitive at nearby opponents from the current position. The weapons are shot upward in a parabolic arc.
<accessoryaction type="WeaponAimedOver">
<nowarheads>#<nowarheads>
^ number of instances of the next primitive to create
<percentagemiss>#</percentagemiss>
^ chance a projectile will miss (higher = less accurate)
<maxaimdistance>#</maxaimdistance>
^ weapon will aim at targets within this distance
<inaccuracy>#</inaccuracy>
^ amount of weapon innaccuracy (higher = less accurate)
<aimedweapon type="Weapon..."> (usually projectile, can be any primitive)
...
</aimedweapon>
Aims a number of the next primitive at nearby opponents from the current position. The weapons are shot straight at the targets and are always shot with the same amount of power.
<accessoryaction type="WeaponAimedUnder">
<nowarheads>#<nowarheads>
^ number of instances of the next primitive to create
<percentagemiss>#</percentagemiss>
^ chance a projectile will miss (higher = less accurate)
<maxaimdistance>#</maxaimdistance>
^ weapon will aim at targets within this distance
<inaccuracy>#</inaccuracy>
^ amount of weapon innaccuracy (higher = less accurate)
<aimedweapon type="Weapon..."> (usually projectile with <under/> attribute)
...
</aimedweapon>
Explodes at the given size, creating or removing earth and possibly damaging opponts
<accessoryaction type="WeaponExplosion">
<deform>up, down, none</deform>
^ creates dirt, removes it or does nothing
<hurtamount>#</hurtamount>
^ scale of damage the explosion will do, 1 = 100%
<size>#</size>
^ radius of the explosion, in world units
<explosiontexture>textureset name</explosiontexture>
^ animation to use for the explosion, contained in textureset.xml
<explosionsound>nameofsound, none</explosionsound>
^ sound to play when the explosion goes off, none for no sound
<explosionshake>#</explosionshake> (optional attribute)
^ amount to shake the screen, default is 0
<animate/> (optional attribute)
^ cycles explosion particle textures through textureset
<multicolor/> (optional attribute)
^ makes the explosion a random color
<nocreatedebris/> (optional attribute)
^ explosion will not create debris or dirt splash
<nocreatesplash/> (optional attribute)
^ explosion will not splash if it hits water
<noluminance/> (optional attribute)
^ explosion will not light up
<nowindaffected/> (optional attribute)
^ explosion particles will not be affected by wind
<onlyhurtshield>true or false</onlyhurtshield> (optional attribute)
^ explosion will only do damage to shields, default is false
<deformtexture>...</deformtexture> (optional attribute)
^ custom decal to apply to the ground, instead of landscape default
<minlife>#</minlife> (optional attribute)
^ minimum lifespan for the explosion particles in seconds
<maxlife>#</maxlife> (optional attribute)
^ minimum lifespan for the explosion particles in seconds
Shoots a laser beam in the direction currently aimed at
<accessoryaction type="WeaponLaser">
<totaltime>#</totaltime>
^ total length of time the laser is visible, in seconds
<minimumdistance>#</minimumdistance>
^ minimum distance the laser can travel (@ 0 power)
<maximumdistance>#</maximumdistance>
^ maximimum distance the laser can travel (@ 1000 power)
<minimumhurt>#</minimumhurt>
^ minimum damage the laser will do (@ 1000 power)
<maximumhurt>#</maximumhurt>
^ maximimum damage the laser will do (@ 0 power)
<hurtradius>#</hurtradius>
^ radius within which tanks will take damage
<color>
<A>0 to 1</A> (amount of red to color laser)
0 to 1 (amount of green to color laser)
<C>0 to 1</C> (amount of blue to color laser)
</color>
Causes the next primitive to be shot at the same angle of inclination that it came in at and with a given change in velocity. So if it was coming down at an angle of 60 degrees, it will be shot at 60 degrees toward the direction it was traveling before it hit.
<accessoryaction type="WeaponLeapFrog">
<bounce>#</bounce>
^ amount to change the velocity by (newvelocity = velocity * bounce)
- 1 = 100%, 5 = 50%, 2 = 200%, etc
<collisionaction type="Weapon..."> (usually projectile, can be anything)
...
</collisionaction>
<conelength>#</conelength>
^ length of the lightning bolt
<seglength>#</seglength>
^ length of each segment of the bolt
<segvar>#</segvar>
^ max length variance of each segment? not sure
<size>#</size>
^ width of the lightning segments
<sizevar>#</sizevar>
^ amount the width can vary? not sure
<minsize>#</minsize>
^ minimum width of the bolt? not sure
<splitprob>#</splitprob>
^ probability that the bolt will fork into multiple segments
<splitvar>#</splitvar>
^ not sure
<deathprob>#</deathprob>
^ probability that the bolt will stop at a given segment
<derivangle>#</derivangle>
^ amount the angle of the bolt can change per segment? not sure
<anglevar>#</anglevar>
^ not sure
<totaltime>#</totaltime>
^ total life time of the lightning particles, in seconds
<seghurt>#</seghurt>
^ amount of damage done to tanks per segment
<seghurtradius>#</seghurtradius>
^ radius within which segments will do damage
<sound>filename or none</sound>
^ sound to play for this bolt, none = no sound
Splits up into a number of weapons fanned out from the current position in the direction it is aimed
<accessoryaction type="WeaponMirv">
<nowarheads>#<nowarheads>
^ number of instances of the next primitive to create
<hspreaddist>#</hspreaddist>
^ amount the mirv will fan out horizontally
- unlike vspread, projectiles fan out randomly within this max value
<vspreaddist>#</vspreaddist>
^ amount the mirv will fan out vertically
<aimedweapon type="Weapon..."> (usually projectile, can be anything)
...
</aimedweapon>
Flows and burns downhill over a given time for a given amount of damage
<accessoryaction type="WeaponNapalm">
<allowunderwater>true or false</allowunderwater>
^ whether or not this napalm can travel under water
<napalmtime>#</napalmtime>
^ time in seconds to burn and flow down hill
<napalmheight>#</napalmheight>
^ height of the flames
<steptime>#</steptime>
^ time in seconds between movements downhill
<hurtsteptime>#</hurtsteptime>
^ time in seconds between updates of the player health?
<hurtpersecond>#</hurtpersecond>
^ amount of damage napalm does per second
<numberstreams>#</numberstreams>
^ number of napalm streams to create at the start point
<effectradius>#</effectradius>
^ radius within which the napalm will damage opponents
<napalmtexture>textureset name</napalmtexture>
^ animation texture to use, contained in textureset.xml
<napalmsound>filename or none</explosionsound>
^ sound to play when the napalm goes off, none = no sound
<nosmoke/> (optional)
^ if used, the napalm will not generate smoke
<noobjectdamage/> (optional)
^ if used, the weapon will not damage landscape objects
Makes a projectile of a given size and shape that collides with the ground/opponents
<accessoryaction type="WeaponProjectile">
<apexcollision></apexcollision> (optional attribute)
^ makes the projectile collide in mid air instead of with the ground
<apexnodud/> (optional attribute)
^ causes projectile to collide with ground even when hitting
before the apex
<timedcollision>#, in seconds</timedcollision> (optional attribute)
^ makes the projectile collide after a number of seconds or the ground
<nocreateflame/> (optional attribute)
^ prevents the projectile from creating a fire trail
<nocreatesmoke/> (optional attribute)
^ prevents the projectile from creating a smoke trail
<spinspeed>#</spinspeed> (optional attribute)
^ how fast the projectile rotates, 1.0 is default if omitted
<under/> (optional attribute)
^ used with WeaponAimedUnder, spawns weapon underground
<projectilescale>#</projectilescale> (optional attribute)
^ amount to scale the model by, 1.0 is default if omitted
<projectilemodel>...</projectilemodel> (optional attribute)
^ model to use for the projectile, tank's default is used if omitted
<enginesound>filename or none</enginesound> (optional attribute)
^ sound to play while the projectile is in flight, none = no sound
<shieldhurtfactor>#</shieldhurtfactor> (optional attribute)
^ affects damage the projectile does during shield collision, 1 = 100%
<smokelife>#, in seconds</smokelife> (optional attribute)
^ number of seconds projectile's smoke will last
<flamelife>#, in seconds</flamelife> (optional attribute)
^ number of seconds projectile's flame will last
<collisionaction type="Weapon..."> (usually explosion, can be any primitive)
...
</collisionaction>
<habs>true or false</habs>
^ whether or not the horizontal angle adjustment will
be to a pre-set angle or a change to current angle
(absolute or relative)
<vabs>true or false</vabs>
^ whether or not the vertical angle adjustment will
be to a pre-set angle or a change to current angle
(absolute or relative)
<hredirect>#, in degrees</hredirect>
<vredirect>#, in degrees</vredirect>
^ if habs or vabs is true:
- weapon is re-aimed to the angle specified
^ if habs or vabs is false:
- the adjustment is added to the weapons current angle setting
<nextaction type="Weapon..."> (can be any primitive)
...
</nextaction>
Used to fire off a weapon contained elsewhere in the xml
NOTE:The referenced weapon MUST come BEFORE the WeaponReference
in the accessories.xml file or it will throw an error.
<accessoryaction type="WeaponReference">
<weapon>weapon name</weapon>
^ name of the weapon you want to fire at this point
Creates a number of rolling warheads which roll downhill and go off when they collide with a tank or time out
<accessoryaction type="WeaponRoller">
<numberrollers>#</numberrollers>
^ number of rollers to create
<time>#</time>
^ number of seconds the rollers will roll before exploding
<collisionaction type="Weapon..."> (usually explosion, can be anything)
...
</collisionaction>
Moves the current weapon position to a random location within a range of coordinates
<accessoryaction type="WeaponScatter">
<position><A>#</A>#<C>#</C></position>
^ X, Y and Z coodinates to move to
- Z of 0 will snap to the landscape height
<positionoffset><A>#</A>#<C>#</C></positionoffset>
^ maximum amount of offset the X, Y and Z coordinates
<direction><A>#</A>#<C>#</C></direction>
^ X, Y and Z direction to aim the weapon in
<directionoffset><A>#</A>#<C>#</C></directionoffset>
^ maximum amount to offset the direction by
<aimedweapon type='Weapon...'> (can be any primitive)
...
</aimedweapon>
<translatedist>#</translatedist>
^ distance to move along the axis before performing next action
<nextaction type="Weapon..."> (can be any primitive you want to use)
...
</nextaction>
<velocitychange>#</velocitychange>
^ Amount to multiply the current velocity by
- (0.5 = 50%, 1.5 = 150%, etc)
<aimedweapon type="Weapon..."> (usually projectile, can be any primitive)
...
</aimedweapon>