These are attributes that are common to ALL accessories. It does not matter whether the accessory is an item, a weapon or a shield. Some of these attributes such as cost/icon/bundlesize are optional, but only when the maximumnumber is set to 0 and the accessory is not purchasable or usable by the player directly.
<accessory>
<name>accessory name</name>
^ name of the accessory
<armslevel>0-10</armslevel>
^ used to determine weapon availability and reward
- KillReward = PlayerHealth * Armslevel * MoneyPerKillPoint
- HealthReward = PlayerHealth * Armslevel * MoneyPerHitPoint
- lower value = larger weapon with lower reward
- higher value = smaller weapon with higher reward
- can adjust availability on server with StartArmsLevel & EndArmsLevel
<description>weapon description</description> (optional)
^ contents of this attribute are displayed in the in game pop-up
<icon>icon.bmp</icon> (optional)
^ location and name of the icon to display in buy menus/windows
<cost>#</cost> (optional)
^ cost to buy <bundlesize> amount of the accessory
<bundlesize>#</bundlesize> (optional)
^ the amount of the accessory you buy per purchase
<activationsound>sound.wav</activationsound>
^ sound that is played when the accessory is used/shot
<deathanimationweight>#</deathanimationweight> (optional)
^ weight the weapon receives in determining random death events
- default is 0 if omitted
<startingnumber>#</startingnumber> (optional)
^ number of this weapon players will start with
- default is 0 if omitted
- using -1 means the weapon is unlimited
<maximumnumber>#</maximumnumber> (optional)
^ 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)
^ 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
<modelscale>#</modelscale> (optional)
^ used to scale the model, 1=100% size, 2=200%, etc
<nomuzzleflash/> (optional)
^ weapon will not create a muzzle flash if this is supplied
<aionly>true or false</aionly> (optional)
^ if true, only AI players (bots) can use this accessory
<accessoryaction type="..."> (any primitive)
...
</accessoryaction>
Items include autodefense, batteries, fuel and parachutes. Remember each of these will need to have all the accessory head attributes mentioned above as well.
Auto defense can be used to activate shields and parachutes during the end of the buying phase instead of at the beginning of their turn. This is mainly useful in sequential games where you would have to wait until your turn to activate your defenses.
Fuel is used to move the player about the landscape. The maximum slope on which the player can move is limited on the server by the MaxClimbingDistance setting in server.xml.
<accessoryaction type='Fuel'>
<steptime>#</steptime> (optional)
^ used to determine rate at which the player moves
- lower = faster movement (default = 0.05)
</accessoryaction>
Shields protect the player by absorbing damage and deflecting shots in a variety of ways. They can have different colors, sizes and damage absorption capabilities.
Normal shields protect the player by simply absorbing the damage. All of the attributes of the normal shield apply to all of the other shield types as well.
<accessoryaction type="Shield">
<removepower>#</removepower>
^ base damage done to shield in a projectile collision
- adjustable in the projectile by <shieldhurtfactor>
<penetration>#</penetration>
^ how much damage makes it through to the shield
<power>#</power>
^ amount of damage the shield can absorb
<radius>#</radius>
^ distance from the tank to the edge of the shield
<collisionsound>sound.wav</collisionsound>
^ sound to play when a weapon collides with the shield
<color>
<r>0 to 1</r>
^ amount of red to color the shield
<g>0 to 1</g>
^ amount of green to color the shield
< b>0 to 1</b>
^ amount of blue to color the shield
</color>
<halfshield>true or false</halfshield>
^ shield only covers above the player (not sides) if true
<laserproof>true or false</laserproof> (optional)
^ whether or not lasers can pierce the shield
<movementproof>true or false</movementproof> (optional)
^ whether or not other players can move through the shield
<glow>true or false</glow> (optional)
^ whether or not the shield has the glowing halo effect
Reflective or force shields protect the player by reflecting direct hits in addition to absorbing damage like regular shields. All the attributes that apply to regular shields apply to force shields as well.
<accessoryaction type="ShieldReflective">
<deflectfactor>#</deflectfactor>
^ intensity of the projectile deflection, higher = more intense
Mag shields protect the player by 'pushing' away projectiles that travel above the player in addition to absorbing damage like regular shields. All the attributes that apply to regular shields apply to mag shields as well.
<accessoryaction type="ShieldMag">
<deflectpower>#</deflectpower>
^ intensity of the projectile deflection, higher = more intense
The <penetration> and <power> attributes determine how much explosion damage a shield can absorb. This doesn't apply to projectile collisions though. You can determine the total amount of explosion damage the shield can absorb by using this formula:
totalshieldpower = power / penetration
So if a shield has 100 power and a 0.8 penetration factor, it will take 100/0.8 or 125 points of damage to neutralize the shield.
Another way of looking at this is to say that the amount of damage you do to a shield with damaging primitives is equal to damage*penetration. So if you hit a shield that has 0.8 penetration with 100 damage worth of explosives, you really only do 80 points of damage to the shield.
Keep in mind that any time you see "Weapon..." below, that means that another primitive would then follow here. And, as with all the accessories, you will need to have all the proper accessory head attributes at the beginning of the weapon before the <accessoryaction> tag. Also, each section of a weapon (each primitive) can have its own armslevel. You can use this to adjust reward levels for different parts of a weapon. This allows you to have a higher armslevel in the accessory head and bring the weapon into the game earlier using StartArmsLevel and EndArmsLevel but still maintain a lower reward for kills made with the weapon. Just look through the default and Apocalypse accessories.xml files that come with the game for plenty of examples.
Used to add targets to the landscape. Targets can have shields and parachutes and a set amount of life. They can be made to do different things when destroyed or burnt.
<accessoryaction type="WeaponAddTarget">
<name>text</name>
^ name of the target, appears on mouseover and when it kills something
<model>filename</model>
^ location of the model to use for this target
<modelburnt>filename</modelburnt> (optional)
^ model to switch to when the target has been burnt by napalm
<modelscale>#</modelscale> (optional)
^ amount to scale the model's size by
<modelrotation>#</modelrotation> (optional)
^ angle to rotate the model by about the y-axis
<modelrotationsnap>#</modelrotationsnap> (optional)
^ snaps the model to the nearest increment of the angle specified
^ default = 0, snap target to 0 degrees rotation
<border>#</border> (optional)
^ prevents models from being placed within area specified
^ default = 0 = disabled, negative = sets to model's size
<size><a>#</a>< b>#</b><c>#</c> (optional)
^ scale model in specific directions???
<driveovertodestroy>true/false</driveovertodestroy> (optional)
^ whether or not you can drive over the object to destroy it
^ default = false, you cannot drive over it to destory it
<removeaction>accessory name</removeaction> (optional)
^ name of accessory to fire off when the object is destroyed
<burnaction>accessory name</burnaction> (optional)
^ name of accessory to fire off when the object is napalmed
<life>#</life> (optional)
^ amount of health the target has
<shield>shield name</shield> (optional)
^ type of shield the target has, default=none
<parachute>parachute name</parachutes> (optional)
^ type of parachutes the target has, default=none
<boundingsphere>true/false<boundingsphere> (optional)
^ default = true, use bounding sphere for collisions
^ if set to false, target will use its bounding box for collisions instead
Aims a number of the next primitive at nearby targets. Projectiles shot with this primitive are aimed upward somewhat and will travel toward the target 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 tanks. The weapons are shot straight at the tanks 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>
Used to generate a few of the hard-coded animation effects like the laser beam death or the small blue ring that flashes when you die.
<accessoryaction type="WeaponAnimation">
<data>sound.wav</data>
^ sound that is played when running the animation
<animation>name</animation>
^ can be ExplosionLaserBeamRenderer or ExplosionRingRenderer
Explodes at the given size, creating or removing earth and possibly damaging targets
<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> (optional)
^ animation to use for the explosion, contained in textureset.xml
<explosionsound>nameofsound, none</explosionsound> (optional)
^ sound to play when the explosion goes off, none for no sound
<createmushroomamount>#</createmushroomamount>
^ amount of mushroom clouds to make, default is 0 (none)
<explosionshake>#</explosionshake> (optional)
^ amount to shake the screen, default is 0
<animate/> (optional)
^ cycles explosion particle textures through textureset
<multicolor/> (optional)
^ makes the explosion a random color
<nocreatedebris/> (optional)
^ explosion will not create debris or dirt splash
<nocreatesplash/> (optional)
^ explosion will not splash if it hits water
<noluminance/> (optional)
^ explosion will not light up
<nowindaffected/> (optional)
^ explosion particles will not be affected by wind
<onlyhurtshield>true or false</onlyhurtshield> (optional)
^ explosion will only do damage to shields, default is false
<deformtexture>...</deformtexture> (optional)
^ custom decal to apply to the ground, instead of landscape default
<minlife>#, in seconds</minlife> (optional)
^ minimum lifespan for the explosion particles, default is 0.5
<maxlife>#, in seconds</maxlife> (optional)
^ minimum lifespan for the explosion particles, default is 1.0
Gives a specified number of the given accessory to the player
<accessoryaction type="WeaponGiveAccessory">
<giveaccessory>name</giveaccessory>
^ Name of the accessory to give
- The accessory to be given MUST COME BEFORE this one
<number>#</number>
^ Amount of this accessory to give to the player
This primitive calls another pre-defined weapon 'X'. If a person is killed by this weapon it would say killed by weapon X. The kill money etc would be calculated from X's attributes.
<accessoryaction type="WeaponInvokeWeapon">
<invoke>#</invoke>
^ Name of the accessory to give
- The accessory invoked MUST COME BEFORE this one
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)
< B>0 to 1</B> (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</napalmsound>
^ 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
<deformtexture>file</deformtexture> (optional)
^ texture that is used when scorching the ground
<groundscorchper>#, in seconds?</groundscorchper>(optional)
^ time to wait between ground scorches (default = 0.8)
Makes a projectile of a given size and shape that collides with the ground/opponents
<accessoryaction type="WeaponProjectile">
<apexcollision></apexcollision> (optional)
^ makes the projectile collide in mid air instead of with the ground
<apexnodud/> (optional)
^ projectile will not dud during ground collisions before the shot's apex
<timedcollision>#, in seconds</timedcollision> (optional)
^ makes the projectile collide after a number of seconds or the ground
<nocreateflame/> (optional)
^ prevents the projectile from creating a fire trail
<nocreatesmoke/> (optional)
^ prevents the projectile from creating a smoke trail
<spinspeed>#</spinspeed> (optional)
^ how fast the projectile rotates, 1.0 is default if omitted
<under/> (optional)
^ used with WeaponAimedUnder, spawns weapon underground
<projectilescale>#</projectilescale> (optional)
^ amount to scale the model by, 1.0 is default if omitted
<projectilemodel>...</projectilemodel> (optional)
^ model to use for the projectile, tank's default is used if omitted
<enginesound>filename or none</enginesound> (optional)
^ sound to play while the projectile is in flight, none = no sound
<shieldhurtfactor>#</shieldhurtfactor> (optional)
^ affects damage the projectile does during shield collision, 1 = 100%
<smokelife>#, in seconds</smokelife> (optional)
^ number of seconds projectile's smoke will last (4.0 is default)
<smokestartsize>#</smokestartsize> (optional)
^ starting size of smoke particles (0.5 is default)
<smokeendsize>#</smokeendsize> (optional)
^ ending size of smoke particles (4.0 is default)
<flamelife>#, in seconds</flamelife> (optional)
^ number of seconds projectile's flame will last (1.0 is default)
<flamestartsize>#</flamestartsize> (optional)
^ starting size of flame particles (0.5 is default)
<flameendsize>#</flameendsize> (optional)
^ ending size of flame particles (3.0 is default)
<flamestartcolor1> (optional)
<a>#</a>< b>#</b><c>#</c>
</flamestartcolor1>
^ initial flame color, default is (0.9, 0.0, 0.0)
<flamestartcolor2> (optional)
<a>#</a>< b>#</b><c>#</c>
</flamestartcolor2>
^ initial flame color, default is (1.0, 0.2, 0.2)
<flameendcolor1> (optional)
<a>#</a>< b>#</b><c>#</c>
</flameendcolor1>
^ final flame color, default is (0.95, 0.9, 0.2)
<flameendcolor2> (optional)
<a>#</a>< b>#</b><c>#</c>
</flameendcolor2>
^ final flame color, default is (1.0, 1.0, 0.3)
<flaretype>#</flaretype> (optional)
^ flare color: 1=red, 2=green, 3=blue
^ higher numbers cause the flare to be invisible
<showshotpath/> (optional)
^ the projectiles will leave a colored trail visible to the player
<showendpoint/> (optional)
^ the projectiles will leave a colored mark on the ground visible to the player
<collisionaction type="Weapon..."> (usually explosion, can be any primitive)
...
</collisionaction>
Used to randomly choose between different segments of code
<accessoryaction type="WeaponRandomChoice">
<weaponchoice1>
<weight>#</weight>
^ Weight is used to determine which weapon is used
- Total weight is added and a number chosen between 1 and total weight
- Higher weight than siblings = more likely to happen than siblings
- Less weight than siblings = less likely to occur than siblings
<weapon type="Weapon..."> (any primitive)
...
</weapon>
</weaponchoice1>
<weaponchoice2 type="Weapon..."> (any primitive)
<weight>#</weight>
<weapon type="Weapon..."> (any primitive)
...
</weapon>
</weaponchoice2>
<weaponchoice...> (optional, can keep going if necessary)
...
</weaponchoice...>
<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 in Weapon 'Y' to fire off a predefined weapon 'X' contained elsewhere in the xml. If a person is killed by weapon Y, it would say killed by weapon Y. The kill money etc would be calculated from Y's attributes.
NOTE:The referenced weapon X MUST come BEFORE the Weapon Y 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
Performs the given xml a specified number of times
<accessoryaction type="WeaponRepeat">
<repeat>#</repeat>
^ the number of times to repeat the action
<delay>#</delay> (optional attribute)
^ number of seconds to delay between repeats
<repeatweapon type="Weapon..."> (can be any primitive)
...
</repeatweapon>
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
<rollermodel type="ase or MilkShape">modelname</rollermodel>
^ model to use for the roller
<shieldhurtfactor>#</shieldhurtfactor> (optional)
^ amount of damage the roller does during shield collisions
- 1 = 100%, 2 = 200%, 0 = no damage, etc
<collisionaction type="Weapon..."> (usually explosion, can be anything)
...
</collisionaction>
Changes the direction by an offset and a random part.
<accessoryaction type="WeaponScatterDirection">
<direction><A>#</A>< B>#</B><C>#</C></direction>
^ X, Y and Z direction to aim the weapon in
<directionoffset><A>#</A>< B>#</B><C>#</C></directionoffset>
^ maximum amount to offset the direction by
<aimedweapon type='Weapon...'> (can be any primitive)
...
</aimedweapon>
Randomly offsets the current position by a percentage of the landscape size
<accessoryaction type="WeaponScatterPosition">
<landonly>true or false</landonly>
^ true = weapon cannot occur over water
<landheight>true of false</landheight>
^ true = weapon is snapped to landscape height
<scatterpercentage>#</scatterpercentage>
^ percentage of landscape size to scatter by
- 100 pixel map & 90 scatterpercent = 90 max offset
<aimedweapon type='Weapon...'> (can be any primitive)
...
</aimedweapon>
<sound>file name</sound> (optional)
^ the location and name of the sound file to play
<gain>#</gain> (optional)
^ amount to increase/decrease the sound by (2.0 = 200%)
<relative>true/false</relative> (optional)
^ if true, sound is played from in front of the camera
^ default is false, sound is played from weapon's position
<rolloff>#</rolloff> (optional)
^ affects distance the sound travels (default = 1.0)
^ higher value means the sound won't travel as far
^ setting to 0 means the sound never gets quieter
<referencedistance>#</referencedistance> (optional)
^ used to calibrate the sound rolloff (default = 75.0)
^ distance at which the sound's volume will drop by half
<translatedist>#</translatedist>
^ distance to move along the axis before performing next action
<nextaction type="Weapon..."> (can be any primitive you want to use)
...
</nextaction>
Changes the velocity of the current projectile via one of two methods
<accessoryaction type="WeaponVelocity">
<abs>true/false</abs> (optional attribute)
^ Whether or not the velocity change is absolute, default = false
<velocitychange>#</velocitychange>
^ Amount to change the velocity
- If abs is false: 0.5 = 50%, 1.5 = 150%, etc
- If abs is true: 0.5 = 500 power, 1.0 = 1000 power, etc
<aimedweapon type="Weapon..."> (can be any primitive)
...
</aimedweapon>