Version 38 Weapon Primivites & Their Attributes>
This information is based on version 38.1 of Scorched3D. Version 38.0 still used the old accessory format from v37.2 and earlier.
<accessory> - weapon head attributes
<accessoryaction type="Weapon..." (any primitive)>
<attribute>value</attribute> (typical required attribute)
<attribute/> (typical optional attribute)
</accessoryaction>
</accessory>
<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
- only used at the head of an accessory
<icon>icon.bmp</icon>
^ location and name of the icon to display in buy/weapon menus
<cost>#</cost>
^ cost to buy <bundlesize> amount of the accessory
<bundlesize>#</bundlesize>
^ the amount of the accessory you buy per purchase
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. You will need to add in the proper weapon head attributes that are listed above for your accessory for it to wor. 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 apoc 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
<accessoryaction type="WeaponAimedOver">
<nowarheads>#<nowarheads>
^ number of instances of the next primitive to create
<percentagemiss>#</percentagemiss>
^ chance a projectile will miss??? not sure
<maxaimdistance>#</maxaimdistance>
^ weapon will aim at targets within this distance
<inaccuracy>#</inaccuracy>
^ how inaccurate the aiming is??? not sure
<aimedweapon type="Weapon..."> (usually projectile, can be any primitive)
...
</aimedweapon>
</accessoryaction>
Aims a number of the next primitive at nearby opponents from under the ground at the current position
<accessoryaction type="WeaponAimedUnder">
<nowarheads>#<nowarheads>
^ number of instances of the next primitive to create
<percentagemiss>#</percentagemiss>
^ chance a projectile will miss??? not sure
<maxaimdistance>#</maxaimdistance>
^ weapon will aim at targets within this distance
<inaccuracy>#</inaccuracy>
^ how inaccurate the aiming is??? not sure
<aimedweapon type="Weapon..."> (usually projectile with <under/> attribute)
...
</aimedweapon>
</accessoryaction>
Delays for a specific amount of time before performing the next action.
<accessoryaction type="WeaponDelay">
<delay>#</delay>
^ Amount of time in seconds to delay before continuing
<delayedweapon type="Weapon..."> (can be any primitive)
...
</delayedweapon>
</accessoryaction>
Explodes at the given size, creating or removing earth and possibly damaging opponts
<accessoryaction type="WeaponExplosion">
<deform>up, down</deform>
^ removes dirt or creates it
<hurts>yes, no</hurts>
^ whether or not the explosion does damage
<size>#</size>
^ radius of the explosion
<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
<explosiontexture>textureset name</explosiontexture>
^ animation to use for the explosion, contained in textureset.xml
<explosionsound>...</explosionsound>
^sound to play when the explosion goes off
</accessoryaction>
Causes the next primitive to bounce
<accessoryaction type="WeaponLeapFrog">
<bounce>#</bounce>
^ How far you want the weapon to bounce
<collisionaction type="Weapon..."> (usually projectile, can be anything)
...
</collisionaction>
</accessoryaction>
Creates a bolt of lightning
<accessoryaction type="WeaponLightning">
<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>4</size>
^ width of the lightning segments
<sizevar>-1</sizevar>
^ amount the width can vary? not sure
<minsize>0.1</minsize>
^ minimum width of the bolt? not sure
<splitprob>0.2</splitprob>
^ probability that the bolt will fork into multiple segments
<splitvar>0.03</splitvar>
^ not sure
<deathprob>0.03</deathprob>
^ probability that the bolt will stop at a given segment
<derivangle>0.5</derivangle>
^ amount the angle of the bolt can change per segment? not sure
<anglevar>0.94</anglevar>
^ not sure
<totaltime>1</totaltime>
^ total life time of the lightning particles
<seghurt>0</seghurt>
^ amount of damage done to tanks per segment
<seghurtradius>0</seghurtradius>
^ radius within which segments will do damage
<sound>none</sound>
^ sound to play for this bolt
</accessoryaction>
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
<vspreaddist>#</vspreaddist>
^ amount the mirv will fan out vertically
<aimedweapon type="Weapon..."> (usually projectile, can be anything)
...
</aimedweapon>
</accessoryaction>
Used to fire off multiple sets of primitives from the same point
<accessoryaction type="WeaponMulti">
<subweapon1 type="Weapon..."> (any primitive)
...
</subweapon1>
<subweapon2 type="Weapon..."> (any primitive)
...
</subweapon2>
<subweapon...> (optional, can keep going if necessary)
...
</subweapon...>
</accessoryaction>
Flows and burns downhill over a given time for a given amount of damage
<accessoryaction type="WeaponNapalm">
<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>...</explosionsound>
^ sound to play when the napalm goes off
</accessoryaction>
Does Nothing
<accessoryaction type="WeaponNull">
<name>Weapon Name</name> <armslevel>0-10</armslevel>
</accessoryaction>
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
<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, not sure exactly what it does
<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
<collisionaction type="Weapon..."> (usually explosion, can be any primitive)
...
</collisionaction>
</accessoryaction>
Used to re-aim projectiles and other weapons
<accessoryaction type="WeaponRedirect">
<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>
</accessoryaction>
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
</accessoryaction>
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>
</accessoryaction>
Used to illuminate the sky for lightning
<accessoryaction type="WeaponSkyFlash">
<name>Weapon Name</name> <armslevel>0-10</armslevel>
</accessoryaction>
Plays a sound in the form of a wav file
<accessoryaction type="WeaponSound">
<sound>file name</sound>
^ the location and name of the sound file to play
</accessoryaction>
Moves the projectile along the current axis
<accessoryaction type="WeaponTranslate">
<translatedist>#</translatedist>
^ distance to move along the axis before performing next action
<nextaction type="Weapon..."> (can be any primitive you want to use)
...
</nextaction>
</accessoryaction>
Changes the velocity of the current projectile
<accessoryaction type="WeaponVelocity">
<velocity>#</velocity>
^ Amount to multiply the current velocity by
- (0.5 = 50%, 1.5 = 150%, etc)
<aimedweapon type="Weapon..."> (usually projectile, can be any primitive)
...
</aimedweapon>
</accessoryaction>