Home
Screenshots
Downloads
Forums
Docs
Servers
Stats
IRC Chat
Mods

Special Special    Search Search    Login/Logout Login

Main Page » Scorched3D v41

Version 41 Accessory Primivites & Their Attributes

This page is still a work in progress. As a result, it may be lacking features or descriptions for some things available in the final release of v41.

Contents

Basic Accessory Syntax

All accessories will follow this basic format:

<accessory>

  <accessoryaction type="..."> (any primitive)
     <attribute>value</attribute> (attribute accepting a value)
     <attribute/> (optional on/off type attribute)
  </accessoryaction>

</accessory>

Remember, optional attributes are not required. So you only have to put those in your accessory if you desire that particular effect.

Types Of Values

Throughout the accessory documentation, you'll see that each tag will have a specific type of value listed for it. Some tags only will only accept numerical values, some will want a string or boolean value, etc. Following are the types of values that will be accepted by tags in the XML.

int = Integer : A whole number (0, 100, -5, etc)
float = Floating Point : A decimal value (0.05, -1.7, 3.1415, etc)
bool = Boolean : Only the values 'true' or 'false' may be entered
string : Usually string values are used when pointing to file locations
Vector : A vector value usually consists of three floating point values (0.5, 1.0, 0.0)
ModelID : Models can be either Milkshape ascii format or ASE.
Weapon : Any of the weapon types can be inserted here
NumParse = Number Parser : Accepts either a float value or a function. More information on this below.

The Number Parser Value Type

As of version 41 of Scorched3D, a new type of value can be used in many places throughout the accessories file that previously accepted a floating point value. This type is called the Number Parser class and it has several interesting features. Any time you see a tag that accepts the NumberParser type, you can do any one of the following:

a) Provide, as before, a floating point value like <bounce>0.6</bounce>

b) Provide a random range, like <bounce>RANGE(0.3,0.9)</bounce>
This would yield a random decimal value from 0.3 to 0.9

c) Provide a random range with a step value, like <bounce>RANGE(0.3,0.9,0.3)</bounce>
This would yield a random value of exactly 0.3, 0.6, or 0.9

d) Provide a random distribution like <bounce>DISTRIBUTION(0.1,0.3,0.4,0.6,0.65,0.7,0.9)</bounce>
Any number of values can be used, one value will randomly be chosen.

Accessory Head Attributes

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>string</name>
             The name of the accessory, as shown to the
             user and also how it is referred to in other
             accessories like WeaponReference.
             ie: When a tank is killed, the message will read "Player x killed by "Accessory"
   <armslevel>int</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>string</description>
             The contents of this attribute are displayed in the game.
   <cost>int</cost>
             The buying price of the accessory. (Also see bundlesize) 
   <bundlesize>int</bundlesize>
             The amount of the accessory you buy per purchase.
   <nomuzzleflash/>
             Weapon will not create a muzzle flash if this is supplied
   <icon>string</icon>
             Location and name of the icon to display in buy menus/windows.
   <activationsound>string</activationsound>
             Sound that is played when the accessory is used/shot.
   <aionly>bool</aionly>
             true = available only to AI (landscape), false = available to anyone.
             You can supply both ai and bot only to give an item to all AI's, but not players
   <botonly>bool</botonly>
             true = available only to AI (bots), false = available to anyone.
             You can supply both ai and bot only to give an item to all AI's, but not players
   <maximumnumber>int</maximumnumber>
             The maximum number of this object that can be purchased.
             Set to 0 to have it not appear in the store and to make the accessory
             unavailable as a selectable weapon to the user.
   <startingnumber>int</startingnumber>
             The number of this weapon players will start with.
             For infinite weapons, set to -1.
   <modelscale>float</modelscale>
             The scale of the model. 1 = 100%, 0.5 - 50%, etc
   <model>Model ID</model>
             The model that will appear in the weapon window at lower left
             - Defaults to the projectile defined for the user's tank if omitted
             - The model can be set explicitely by setting
               the model tag like <model type="x">filename</model>, where
               type can be ASE or MilkShape, depending on the format,
               and "filename" is the relative path to the model file
   <positionselection>string</positionselection>
             The type of position select to be used:
             - fuel: Player can select a postion based on a limited range
               dependant on the amount of fuel in inventory.
             - limit: Player can select a postion based on a limited range
               dependant on the positionselectionlimit value.
             - fuellimit: same as limit but restricts to movable areas as well
             - generic: Player can select any position
   <positionselectionlimit>int</positionselectionlimit>
             The maximum distance of position selection from the player's position.
   <group>string</group>
             Accessory group the item falls into (weapon, defense, fuel, etc)
             Items in the 'fuel' group show up in the fuel list in the player window
             Can also be used to make new tabs in the buy window
             Supplying something other than a default group creates a new custom group
   <tabgroup>string</tabgroup>
             The tab group the item falls into in the buying screen
   <accessoryaction>AccessoryPart</accessoryaction>
             Specifies what happens when this accessory is invoked.
             Can be any of the accessory primitives.

</accessory>

Items

Items include autodefense, batteries, fuel and parachutes. Remember each of these will need to have all the accessory head attributes mentioned above as well.


AutoDefense

Auto defense can be used to activate shields and parachutes during the end of the buying phase instead of a t 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.

<accessoryaction type="AutoDefense"> </accessoryaction>

Batteries

Batteries are used to regenerate the player's power or health.

<accessoryaction type="Battery"> </accessoryaction>

Fuel/Move

Changed for v40.1 WeaponMoveTank is used to move/relocate an object about the landscape. The maximum slope on which and object can move by type "fuel" is limited on the server by the MaxClimbingDistance setting in server.xml.

<accessoryaction type="WeaponMoveTank">

   <steptime>float</steptime>
           Used to determine rate at which the player moves.
           Lower = faster movement (default = 0.05)
   <usefuel>bool</usefuel>
           "true"= use fuel from inventory, "false"= Don't.
   <maximumrange>int</maximumrange>
           maximum distance the player can move per turn

</accessoryaction>

Parachutes

Parachutes protect the player from falling damage. You can configure how fast an object using them will fall.

<accessoryaction type="Parachute">

   <slowforce>
       <A>float</A>
       <B>float</B>
       <C>float</C>
   </slowforce>
           The force to apply against a falling object in x,y,z coordinates.
Very sensative, 0.1 will slow by half, -0.1 will double the speed

</accessoryaction>

Shields

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. As of v40.1, they can also be used to restrict movement to players on specific teams.

Square Shields

As of version 40.1, Scorched 3D supports square (cubicle) shaped shields in addition to the classic round (spherical) shields. To use them, replace the word "Round" with "Square" in the shield's definition. Remember, however, that square shields cannot use the glow effect or the halfshield effect. Square shields also do not use the old radius tag to determine size, they have their own specific size definition: (<size><a>#</a><b>#</b><c>#</c></size>).

Note that is is not possible to make a square mag shield.

Shield

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="ShieldRound">

   <removepower>float</removepower>
           Base damage done to shield in a projectile collision.
           This is also adjustable in the projectile by <shieldhurtfactor> in WeaponProjectile
   <penetration>float</penetration>
           How much damage makes it through to the shield
   <power>float</power>
           The amount of damage the shield can absorb.
   <radius>float</radius>
           The distance from the tank to the edge of the shield
  <collisionsound>string</collisionsound>
           Sound to play when a weapon collides with the shield.
   <color>
      <r>float</r>
      <g>float</g>
      <b>float</b>
   </color>
           The color of the shield in RGB.
           0,0,0 = black, 1,0,0 =  red, 1,1,1 = white, etc
   <halfshield>bool</halfshield>
           true = Hero in a half-shield (only the top half is shielded)
   <laserproof>bool</laserproof>
           true/false/total. 
           false = no protection 
           true = stops beam only, Ambiant Heat will penetrate based on laser vs shield sizes.
           total = lasers will stop and cause no damage.
                 Note: Shields can only be Laserproof if halfshield=false
   <movementproof>string</movementproof>
           Whether or not other players can move through the shield
           none will disable movement for everyone (including wearer)
           team1, team2, team3 and team4 will disable movement for that team
   <glow>bool</glow>
           Whether or not the shield has the glowing halo effect

</accessoryaction>

ShieldMag

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="ShieldRoundMag">

   <removepower>float</removepower>
           Base damage done to shield in a projectile collision.
           This is also adjustable in the projectile by <shieldhurtfactor> in WeaponProjectile
   <penetration>float</penetration>
           How much damage makes it through to the shield
   <power>float</power>
           The amount of damage the shield can absorb.
   <radius>float</radius>
           The distance from the tank to the edge of the shield
  <collisionsound>string</collisionsound>
           Sound to play when a weapon collides with the shield.
   <color>
      <r>float</r>
      <g>float</g>
      <b>float</b>
   </color>
           The color of the shield in RGB.
           0,0,0 = black, 1,0,0 =  red, 1,1,1 = white, etc
   <halfshield>bool</halfshield>
           true = Hero in a half-shield (only the top half is shielded)
   <laserproof>bool</laserproof>
           true/false/total. 
           false = no protection 
           true = stops beam only, Ambiant Heat will penetrate based on laser vs shield sizes.
           total = lasers will stop and cause no damage.
                 Note: Shields can only be Laserproof if halfshield=false
   <movementproof>string</movementproof>
           Whether or not other players can move through the shield
           none will disable movement for everyone (including wearer)
           team1, team2, team3 and team4 will disable movement for that team
   <glow>bool</glow>
           Whether or not the shield has the glowing halo effect
   <deflectpower>float</deflectpower>
           Intensity of the projectile deflection.

</accessoryaction>

ShieldReflective

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="ShieldRoundReflective">

   <removepower>float</removepower>
           Base damage done to shield in a projectile collision.
           This is also adjustable in the projectile by <shieldhurtfactor> in WeaponProjectile
   <penetration>float</penetration>
           How much damage makes it through to the shield
   <power>float</power>
           The amount of damage the shield can absorb.
   <radius>float</radius>
           The distance from the tank to the edge of the shield
  <collisionsound>string</collisionsound>
           Sound to play when a weapon collides with the shield.
   <color>
      <r>float</r>
      <g>float</g>
      <b>float</b>
   </color>
           The color of the shield in RGB.
           0,0,0 = black, 1,0,0 =  red, 1,1,1 = white, etc
   <halfshield>bool</halfshield>
           true = Hero in a half-shield (only the top half is shielded)
   <laserproof>bool</laserproof>
           true/false/total. 
           false = no protection 
           true = stops beam only, Ambiant Heat will penetrate based on laser vs shield sizes.
           total = lasers will stop and cause no damage.
                 Note: Shields can only be Laserproof if halfshield=false
   <movementproof>string</movementproof>
           Whether or not other players can move through the shield
           none will disable movement for everyone (including wearer)
           team1, team2, team3 and team4 will disable movement for that team
   <glow>bool</glow>
           Whether or not the shield has the glowing halo effect
   <deflectfactor>float</deflectfactor>
           Intensity of the projectile deflection.

</accessoryaction>

Weapons

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.

WeaponAddTarget

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">

   <armslevel>int</armslevel>
   <name>string</name>
           name of the object, leave blank for no name
   <model>modelname</model>
           location/filename of the model to use
   <modelburnt>modelname</modelburnt>(optional)
           model to use when object is hit with napalm
   <modelscale>float</modelscale> (optional)
           How large to scale the model, higher = larger
           when using modelscalediff, this is the minimum scale of the model
   <modelscalediff>float</modelscalediff>(optional)
           the object will be randomly scaled by an additional maximum factor of the value given
           default = 0, do not randomly scale the model
           modelscale=3 and modelscalediff=3 would mean scale the model to 3 to 6 times normal
   <modelrotation>float</modelrotation> (optional)
           The 2d angle to rotate the model to.
   <modelrotationsnap>float</modelrotationsnap> (optional)
           The rotation of the model is snapped to n x float, 
           where float is an angle in degrees. ie: 90 will force the 
           model to be rotated to the angle specified above in 
           <modelrotation> + float x (random), forcing the model to
           face one of four directions. Setting this to 1 will yield a 
           random rotation (model could be any angle, at intervals of
           1 degree of rotation)
   <border>float</border>(optional)
           prevents models from being placed within area specified
           default = 0 = disabled, negative = sets to model's size
   <size>Vector</size>(optional)
           scale model in specific directions?
   <driveovertodestroy>bool</driveovertodestroy>(optional)
           whether or not you can drive over the object to destroy it
           default = false, you cannot drive over it to destory it
   <flattendestroy>bool</flattendestroy>
           whether or not the object is destroyed when terrain around it is flattened
           default = false, object is not destroyed
   <removeaction>string</removeaction>(optional)
           accessory to fire when the object is destroyed
   <burnaction>string</burnaction>(optional)
           accessory to fire when the object is burnt with napalm
   <life>float</life>(optional)
           amount of health the object will have
   <shield>string</shield>(optional)
           name of the shield the object will have, default=none
   <parachute>string</parachute>(optional)
           paracbute type the object will use, default=none
   <boundingsphere>bool</boundingsphere>(optional)
           default = true, use bounding sphere for collisions
           if set to false, target will use its bounding box for collisions instead
   <nocollision>bool</nocollision>(optional)
           default = false, projectiles will collide with the object
   <nofalling>bool</nofalling>(optional)
           default = false, object will fall if there is no land below it
   <nofallingdamage>bool</nofallingdamage>(optional)
           default = false, object will take damage when falling
   <nodamageburn>bool</nodamageburn>(optional)
           default = false, object takes damage from being burnt
   <displaydamage>bool</displaydamage>(optional)
           default = true, damage is displayed on screen
   <displayshadow>bool</displayshadow>(optional)
           default = true, object will cause a shadow

</accessoryaction>

WeaponAimedOver

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">

   <armslevel>int</armslevel>
   <nowarheads>int</nowarheads>
           number of instances of the next primitive to create
   <maxaimdistance>NumParse</maxaimdistance>
           weapon will aim at targets within this distance
   <percentagemiss>NumParse</percentagemiss>
           chance a projectile will miss (higher = less accurate)
   <inaccuracy>NumParse</inaccuracy>
           amount of weapon innaccuracy (higher = less accurate)
   <aimedweapon>Weapon</aimedweapon>
           Can be any of the weapon accessories

</accessoryaction>

WeaponAimedUnder

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">

   <armslevel>int</armslevel>
   <nowarheads>int</nowarheads>
           number of instances of the next primitive to create
   <maxaimdistance>NumParse</maxaimdistance>
           weapon will aim at targets within this distance
   <percentagemiss>NumParse</percentagemiss>
           chance the projectiles will miss (higher = less accurate)
   <inaccuracy>NumParse</inaccuracy>
           amount of weapon innaccuracy (higher = less accurate)
   <moveunderground>bool</moveunderground> (optional)
           Whether or not to move weapon position underground
   <aimedweapon>Weapon</aimedweapon>
           Can be any of the weapon accessories

</accessoryaction>

WeaponAnimation

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">

   <armslevel>int</armslevel>
   <data>string</data>
           sound that is played when running the animation
   <animation>string</animation>
           can be ExplosionLaserBeamRenderer or ExplosionRingRenderer

</accessoryaction>

WeaponCenterPosition

Moves the weapons position to the center of the landscape at a specified height.

<accessoryaction type="WeaponCenterPosition">

   <armslevel>int</armslevel>
   <height>NumParse</height>
           altitude to move position to, 0 = landscape height
   <nextaction>Weapon</nextaction>
           Can be any of the weapon accessories

</accessoryaction>

WeaponDelay

Delays for a specific amount of time before performing the next action.

<accessoryaction type="WeaponDelay">

   <armslevel>int</armslevel>
   <delay>NumParse</delay>
           Amount of time in seconds to delay before performing the following action
   <delayedweapon>Weapon</delayedweapon>
           Can be any of the weapon accessories

</accessoryaction>

WeaponExplosion

Creates an explosion of the given size. Explosions can be used for creating or removing earth, damaging tanks, creating particles and debris and various other effects.

<accessoryaction type="WeaponExplosion">

   <armslevel>int</armslevel>
   <size>float</size>
           radius of the explosion, in world units
   <hurtamount>float</hurtamount>
           how much damage the explosion will do, 1 = 100 pts
   <deform>Explosion::DeformType</deform>
           determines how the explosion effects the landscape
           types available are up, down and none
   <multicolor/> (optional)
           makes the explosion a random color
   <explosionshake>NumParse</explosionshake> (optional)
           amount to shake the screen, default is 0
   <onlyhurtshield>bool</onlyhurtshield> (optional)
           explosion will only do damage to shields, default is false
   <nocreatedebris/> (optional)
           explosion will not create debris or dirt splash
   <nocreatesplash/> (optional)
           explosion will not splash if it hits water
   <createmushroomamount>NumParse</createmushroomamount> (optional)
           amount of mushroom clouds to make, default is 0 (none)
   <nowindaffected/> (optional)
           explosion particles will not be affected by wind
   <noluminance/> (optional)
           explosion will not light up
   <animate>bool</animate> (optional)
           cycles explosion particle textures through textureset as it decays
   <minlife>float</minlife> (optional)
           minimum lifespan for the explosion particles, default is 0.5
   <maxlife>float</maxlife> (optional)
           maximum lifespan for the explosion particles, default is 1.0
   <deformtexture>string</deformtexture> (optional)
           custom decal to apply to the ground, instead of landscape default
   <explosiontexture>string</explosiontexture> (optional)
           texture to use for the explosion particles, contained in textureset.xml
   <explosionsound>string</explosionsound> (optional)
           sound to play when the explosion goes off, none for no sound

</accessoryaction>

WeaponGiveAccessory

Gives a specified number of the specified accessory to the player. It can also be used to take away a specified amount of that accessory if you supply a negative number.

<accessoryaction type="WeaponGiveAccessory">

   <armslevel>int</armslevel>
   <giveaccessory>string</giveaccessory>
           Name of the accessory to give
           The accessory being given MUST COME BEFORE this one
   <number>int</number>
           Amount of this accessory to give to the player

</accessoryaction>

WeaponGiveLife

Gives a specified amount of life (health) to the player. It can also be used to reduce the player's health.

<accessoryaction type="WeaponGiveLife">

   <armslevel>int</armslevel>
   <life>NumParse</life>
           Amount of life to give to the player
   <exceedmax>bool</exceedmax>
           If true, player can exceed their maximum health

When exceedmax is true, the value used must be over 100 to give a maximum health over 100

</accessoryaction>

WeaponGiveLives

Gives a specified number of lives to the player, used to ressurect the player after death.

<accessoryaction type="WeaponGiveLives">

   <armslevel>int</armslevel>
   <lives>int</lives>
           Number of lives to give to the player

</accessoryaction>

WeaponGiveMoney

Gives a specified amount of money to the player, can also be used to reduce the amount of money a player has.

<accessoryaction type="WeaponGiveMoney">

   <armslevel>int</armslevel>
   <money>int</money>
           Amount of money to give to the player

</accessoryaction>

WeaponGivePower

Sets the player's maximum shot power to the specified amount.

<accessoryaction type="WeaponGivePower">

   <armslevel>int</armslevel>
   <power>NumParse</power>
           What to set the player's max shot power to

Must be set over 1000 to give a maximum power above 1000

</accessoryaction>

WeaponGiveScore

Gives a specified amount of score points to the player. It can also be used to take score away from the player for doing something they shouldn't do.

<accessoryaction type="WeaponGiveScore">

   <armslevel>int</armslevel>
   <score>int</score>
           Amount of points to give to (or take away from) the player

</accessoryaction>

WeaponGiveWin

Used to award the round win to the player or team that triggers the event.

<accessoryaction type="WeaponGiveWin">

   <armslevel>int</armslevel>
   <objective>string</objective>
           Message that is displayed when the round win is awarded
   <winningteam>int</winningteam>
           team that gets the win, 1 = red, 2 = blue, etc

</accessoryaction>

WeaponGotoLabel

Loops back to a place in the XML defined by a WeaponLabel tag. This can be used to make chains of translates and other hard to repeat actions.

<accessoryaction type="WeaponGotoLabel">

   <armslevel>int</armslevel>
   <label>Weapon</label>
           Label name of spot in code to loop back to
   <count>int</count>
           Number of times to loop back

</accessory>

WeaponGroupSelect

Instructs weapon to shift it's origin to an object with a pre-specified <groupname>.
Groups may include boids, placements, ships, trees, or weapon-created objects(eg. mines).

<accessoryaction type="WeaponGroupSelect">

   <armslevel>int</armslevel>
   <groupname>std::string</groupname>
           Specific keyword referring to another object class in your mod containing a <groupname> identifier. 
   <nextaction>Weapon</nextaction>
           Can be any one of the weapon accessories.

</accessory>

WeaponInvokeWeapon

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">

   <armslevel>int</armslevel>
   <invoke>string</invoke>
           Name of the accessory to give
           The accessory being invoked MUST COME BEFORE this one

</accessoryaction>

WeaponLabel

Used to tag a spot in the code so that you can loop back to it later on using WeaponGotoLabel.

<accessoryaction type="WeaponLabel">

   <armslevel>int</armslevel>
   <label>std::string</label>
           *
   <nextweapon>Weapon</nextweapon>
           Can be any one of the weapon accessories.

</accessory>

WeaponLaser

Shoots a laser beam in the direction currently being aimed at.

<accessoryaction type="WeaponLaser">

   <armslevel>int</armslevel>
   <minimumhurt>float</minimumhurt>
           minimum damage the laser will do (@ 1000 power)
   <maximumhurt>float</maximumhurt>
           maximum damage the laser will do (@ 0 power)
   <hurtradius>float</hurtradius>
           radius within which tanks will take damage from the laser
   <minimumdistance>float</minimumdistance>
           minimum distance the laser can travel (@ 0 power)
   <maximumdistance>float</maximumdistance>
           maximum distance the laser can travel (@ 1000 power)
   <totaltime>float</totaltime>
           total length of time the laser is visible, in seconds
   <color> Determines the color of the laser beam
       <a>0 to 1</a> amount of red
       <b>0 to 1</b> amount of green
       <c>0 to 1</c> amount of blue
   </color>
   <hurtfirer>bool</hurtfirer>>
           Whether or not the laser can hurt the firer of the weapon

</accessoryaction>

WeaponLeapFrog

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">

   <armslevel>int</armslevel>
   <bounce>NumParse</bounce>
           amount to change the velocity by (newvelocity = velocity * bounce)
           1 = 100%, 5 = 50%, 2 = 200%, etc
   <collisionaction>Weapon</collisionaction>
           Can be any one of the weapon accessories.

</accessoryaction>

WeaponLightning

Creates a bolt of lightning with the specified properties.

<accessoryaction type="WeaponLightning">

   <armslevel>int</armslevel>
   <conelength>float</conelength>
           Length of the lightning bolt
   <seglength>float</seglength>
           Length of each segment of the bolt
   <segvar>float</segvar>
           Max length variance of each segment
   <size>float</size>
           Width of the lightning segments
   <sizevar>float</sizevar>
           The amount added to the width for each new segment
           Segments get larger each itteration
   <minsize>float</minsize>
           Minimum width of a segment
   <splitprob>float</splitprob>
           Probability that the bolt will fork into multiple segments
   <splitvar>float</splitvar>
           The chance the lightning will split as it gets longer.
           The chance gets larger the longer it is and this increase is controlled by this item 
   <deathprob>float</deathprob>
           Probability that the bolt will stop at a given segment
   <derivangle>float</derivangle>
           The minimum allowed angle change between the very first segment and current segment's direction
   <anglevar>float</anglevar>
           The maximum angle change that will be tried for the next segment 
   <totaltime>float</totaltime>
           Total life time of the lightning particles, in seconds
   <seghurt>float</seghurt>
           Amount of damage done to tanks per segment
   <seghurtradius>float</seghurtradius>
           Radius within which segments will do damage
   <sound>string</sound>
           Sound to play for this bolt, none = no sound

</accessoryaction>

WeaponMessage

Broadcasts the given message on the combat chat channel

<accessoryaction type="WeaponMessage">

   <armslevel>int</armslevel>
   <message>string</message>
           Message to broadcast

</accessoryaction>

WeaponMirv

Splits up into a number of weapons fanned out from the current position in the direction it is aimed. MIRVs can be configured to spread out vertically, horizontally, or both.

<accessoryaction type="WeaponMirv">

   <armslevel>int</armslevel>
   <nowarheads>int</nowarheads>
           number of instances of the next primitive to create
   <hspreaddist>NumParse</hspreaddist>
           amount the mirv will fan out horizontally
           unlike vspread, projectiles fan out randomly within this max value
   <vspreaddist>NumParse</vspreaddist>
           amount the mirv will fan out vertically
   <aimedweapon>Weapon</aimedweapon>
           Can be any one of the weapon accessories.

</accessoryaction>

WeaponMoveTank

Moves the players tank to the current position. The player will gradually move across the landscape at a configurable speed. This primitive can configured to use the accessory as 'fuel' so that the range is limited by the amount of that item the player has. If the item is not used as fuel, the maximumrange is always whatever the current max range is defined as.

<accessoryaction type="WeaponMoveTank">

   <armslevel>int</armslevel>
   <steptime>float</steptime> (optional)
           Used to determine rate at which the player moves.
           Lower = faster movement (default = 0.05)
   <usefuel>bool</usefuel> (optional)
           "true"= use fuel from inventory, "false"= Don't.
   <maximumrange>int</maximumrange> (optional)
           maximum distance the player can move per turn

</accessoryaction>

WeaponMulti

Used to fire off multiple sets of primitives from the same point in time and space. It is a necessity if you want to do more than one thing at a time.

<accessoryaction type="WeaponMulti">

 <subweapon1 type="Weapon..."> (any weapon accessory)
    ...
 </subweapon1>
 <subweapon2 type="Weapon..."> (any weapon accessory)
    ...
 </subweapon2>
 <subweapon...> (optional, can keep going if necessary)
    ...
 </subweapon...>

</accessoryaction>

WeaponNapalm

Flows and burns downhill over a given time for a given amount of damage.

<accessoryaction type="WeaponNapalm">

   <armslevel>int</armslevel>
   <napalmtime>NumParse</napalmtime>
           time in seconds to burn and flow down hill
   <napalmheight>NumParse</napalmheight>
           height of the flames
   <steptime>NumParse</steptime>
           time in seconds between movements downhill
   <hurtsteptime>NumParse</hurtsteptime>
           time in seconds between updates of the player health?
   <hurtpersecond>NumParse</hurtpersecond>
           amount of damage napalm does per second
   <numberstreams>int</numberstreams>
           number of napalm streams to create at the start point
   <effectradius>int</effectradius>
           radius within which the napalm will damage opponents
   <napalmsound>string</napalmsound>
           sound to play when the napalm goes off, none = no sound
   <napalmtexture>string</napalmtexture>
           animation texture to use, contained in textureset.xml
   <allowunderwater>bool</allowunderwater>
           whether or not this napalm can travel under water
   <noluminance/> (optional)
           napalm will not appear luminant
   <deformtexture>string</deformtexture> (optional)
           texture that is used when scorching the ground
   <groundscorchper>NumParse</groundscorchper> (optional)
           time to wait between ground scorches (default = 0.8)
   <nosmoke>bool</nosmoke> (optional)
           if true, the napalm will not generate smoke
   <noobjectdamage>bool</noobjectdamage> (optional)
           if true, the weapon will not damage landscape objects

</accessoryaction>

WeaponNull

Does nothing. It can be useful if you want to prematurely 'cap off' a weapon before you are totally finished with it so you can test it out. For instance, you have just wrote a really long and complex weapon that ends up shooting some projectiles. You have a really complex explosion in mind, but haven't wrote it yet. You can just use a WeaponNull on the projectile's collisionactions to test the weapon out before you are finished making the explosions.

<accessoryaction type="WeaponNull">

   <armslevel>int</armslevel>

</accessoryaction>

WeaponPosition

Sets the position of an accessory explicitly on (or over or under) the landscape.

<accessoryaction type="WeaponPosition">

   <position><a>float</a><b>float></b><c>float</c></position>
           The coordinates of the position desired for the next accessory
    <positionoffset><a>float</a><b>float</b><c>float</c></positionoffset> (optional)
           A random offset value. The position will be offset by up to +/- each of these coordinates
   <onground>bool</onground> (optional - default=false)
           When set to true the height will be forced to ground level, ignoring any "c" value in position. 
           The offset value can still be used (carefully!) 
   <aimedweapon>Weapon</aimedweapon>
           Can be any of the weapon accessories

</accessoryaction>

WeaponProjectile

Makes a projectile of a given size and shape that collides with the ground or other targets.

<accessoryaction type="WeaponProjectile">

   <armslevel>int</armslevel> (optional)
   <under>bool</under> (optional)
           used with WeaponAimedUnder
   <spinspeed>float</spinspeed> (optional)
           how fast the projectile rotates, 1.0 is default if omitted
   <projectilescale>NumParse</projectilescale> (optional)
           amount to scale the model by, 1.0 is default if omitted
   <projectilemodel>ModelID</projectilemodel> (optional)
           model to use for the projectile, tank's default is used if omitted
   <smokelife>float</smokelife> (optional)
           number of seconds projectile's smoke will last (4.0 is default)
   <flamelife>float</flamelife> (optional)
           number of seconds projectile's flame will last (1.0 is default)
   <flamestartsize>float</flamestartsize> (optional)
           starting size of flame particles (0.5 is default)
   <flameendsize>float</flameendsize> (optional)
           ending size of flame particles (3.0 is default)
   <smokestartsize>float</smokestartsize> (optional)
           starting size of smoke particles (0.5 is default)
   <smokeendsize>float</smokeendsize> (optional)
           ending size of smoke particles (4.0 is default)
   <flamestartcolor1>Vector</flamestartcolor1> (optional)
           initial flame color, default is (0.9, 0.0, 0.0)
   <flamestartcolor2>Vector</flamestartcolor2> (optional)
           initial flame color, default is (1.0, 0.2, 0.2)
   <flameendcolor1>Vector</flameendcolor1> (optional)
           final flame color before decay, default is (0.95, 0.9, 0.2)
   <flameendcolor2>Vector</flameendcolor2> (optional)
           final flame color before decay, default is (1.0, 1.0, 0.3)
   <drag>float</drag> (optional)
           amount of drag placed on the projectile, default = 0
   <thrustamount>float</thrustamount> (optional)
           amount of force applied when using thrust, default = 0
   <thrusttime>float</thrusttime> (optional)
           amount of time to apply thrust, default = 0
   <showshotpath>bool</showshotpath> (optional)
           the projectiles will leave a colored trail visible to the player
   <showendpoint>bool</showendpoint> (optional)
           the projectiles will leave a colored mark on the ground visible to the player
   <apexcollision>bool</apexcollision> (optional)
           makes the projectile collide in mid air instead of with the ground
   <apexnodud>bool</apexnodud> (optional)
           projectile will not dud during ground collisions before the shot's apex
   <watercollision>float</watercollision> (optional)
           if true, the projectile will collide with water surface, default = false
   <timedcollision>float</timedcollision> (optional)
           makes the projectile collide after a number of seconds
   <timeddud>bool</timeddud> (optional)
           projectile will dud if it collides before the timer is up
   <nocreatesmoke/> (optional)
           prevents the projectile from creating a smoke trail
   <nocreateflame/> (optional)
           prevents the projectile from creating a fire trail
   <enginesound>string</enginesound> (optional)
           sound to play while the projectile is in flight
           default = 'data/wav/misc/rocket.wav', 'none' = no sound
   <flaretype>int</flaretype> (optional)
           flare color: 0 = white (default), 1=red, 2=green, 3=blue
           higher numbers cause the flare to be invisible
   <shieldhurtfactor>NumParse</shieldhurtfactor> (optional)
           affects damage the projectile does during shield collision, 1 = 100%
   <windfactor>NumParse</windfactor> (optional)
           scale of wind's effect on the projectile, default = 1.0, 0.0 = no effect
   <collisionaction>Weapon</collisionaction>
           Can be any one of the weapon accessories.

</accessoryaction>

WeaponRandomChoice

Used to randomly choose between different segments of code.

<accessoryaction type="WeaponRandomChoice">

   <armslevel>int</armslevel>
   <weaponchoice1>
       <armslevel>int</armslevel>
       <weight>int</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...">
           ...
       </weapon>
                 Can be any  weapon accessory
   </weaponchoice1>
   <weaponchoice2>
       <armslevel>int</armslevel>
       <weight>int</weight>
       <weapon>Weapon</weapon>
   </weaponchoice2>
   <weaponchoice...> You can create as many as you need.
       ...
   </weaponchoice...>

</accessoryaction>

WeaponRedirect

Used to re-aim projectiles and other weapons either relative to their current direction or to a specific angle.

<accessoryaction type="WeaponRedirect">

   <armslevel>int</armslevel>
   <habs>bool</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>bool</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>NumParse</hredirect>
   <vredirect>NumParse</vredirect>
           if habs or vabs is true:
              weapon is re-aimed to the angle specified in h or vredirect
           if habs or vabs is false:
              the adjustment in h or vredirect is added to the weapons current angle
   <nextaction>Weapon</nextaction>
           Can be any weapon accessory.

</accessoryaction>

WeaponReference

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. Weapon X MUST COME BEFORE Weapon Y.

<accessoryaction type="WeaponReference">

   <armslevel>int</armslevel>
   <weapon>Weapon</weapon>
           name of the weapon you want to fire at this point
           the referenced weapon must come before the current weapon

</accessoryaction>

WeaponRepeat

Performs the given xml a specified number of times with a specified delay in between.

<accessoryaction type="WeaponRepeat">

   <armslevel>int</armslevel>
   <repeat>int</repeat>
           the number of times to repeat the action
   <delay>NumParse</delay>
           number of seconds to delay between repeats
   <repeatweapon>Weapon</repeatweapon>
           Can be any weapon accessory.

</accessoryaction>

WeaponRoller

Creates a number of rolling warheads which roll downhill and go off when they collide with a target or time out.

<accessoryaction type="WeaponRoller">

   <armslevel>int</armslevel>
   <numberrollers>NumParse</numberrollers>
           number of rollers to create
   <time>float</time>
           number of seconds the rollers will roll before exploding
   <shieldhurtfactor>float</shieldhurtfactor>
           amount of damage the roller does during shield collisions
           1 = 100%, 2 = 200%, 0 = no damage, etc
   <windfactor>float</windfactor> (optional>
           scale of wind's effect on the rollers
   <maintainvelocity>bool</maintainvelocity> (optional>
           if true, the roller will keep its momentum when it spawns, default = false
   <dampenvelocity>float</dampenvelocity> (optional)
           If maintainvelocity=true, multiplies the velocity by this factor to
           control the amount of velocity retained by the rollers.
           0 = none, 1.0 = full
   <roll>bool</roll> (optional>
           whether or not the roller model will roll, default = false
   <rollermodel>ModelID</rollermodel>
           model to use for the roller
   <collisionaction>Weapon</collisionaction>
           Can be any weapon accessory.

</accessoryaction>

WeaponScatterDirection

Changes the direction to a specific direction with a random offset.

<accessoryaction type="WeaponScatterDirection">

   <armslevel>int</armslevel>
   <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 X, Y, and Z amounts to offset the direction by. 
           For example, <a>10</a><b>10</b><c>0</c> will offset the 
           direction with a random factor of +/- 10 degrees in each 
           the x and y directions
   <aimedweapon>Weapon</aimedweapon>
           Can be any weapon accessory

</accessoryaction>

WeaponScatterPosition

Randomly offsets the current position by a percentage of the landscape size.

<accessoryaction type="WeaponScatterPosition">

   <armslevel>int</armslevel>
   <landonly>bool</landonly>
           true = weapon cannot occur over water
   <landheight>bool</landheight>
           true = weapon is snapped to landscape height
   <scatterpercentage>NumParse</scatterpercentage>
           percentage of landscape size to randomize the weapon's position by
           100 pixel map & 90 scatterpercentage = 90 max offset
   <aimedweapon>Weapon</aimedweapon>
           Can be any weapon accessory

</accessoryaction>

WeaponSelectPosition

Allows the player to select the position where the weapon will be placed. There are various types of position selection available that can be defined in the accessory's header area.

<accessoryaction type="WeaponSelectPosition">

   <armslevel>int</armslevel>
   <aimedweapon>Weapon</aimedweapon>
           Can be any weapon accessory

</accessoryaction>

WeaponSkyFlash

Used to illuminate the sky for lightning.

<accessoryaction type="WeaponSkyFlash">

   <armslevel>int</armslevel>

</accessoryaction>

WeaponSound

Plays the specified sound with the given properties.

<accessoryaction type="WeaponSound">

   <armslevel>int</armslevel>
   <sound>string</sound>
           the location and name of the sound file to play
   <gain>float</gain>
           amount to increase/decrease the sound by (2.0 = 200%)
   <rolloff>float</rolloff>
           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>float</referencedistance>
           used to calibrate the sound rolloff (default = 75.0)
           distance at which the sound's volume will drop by half
   <relative>bool</relative>
           if true, sound is played from in front of the camera
           default is false, sound is played from weapon's position

</accessoryaction>

WeaponTankPosition

Moves the next action to the player's current position. This can be used for firing from a moving tank.

<accessoryaction type="WeaponTankPosition">

   <armslevel>int</armslevel>
   <sightpos>bool</sightpos> (optional)
           If true, the tank's gun position is used.  Default = false
   <aimedweapon>Weapon</aimedweapon>
           Can be any weapon accessory

</accessoryaction>

WeaponTankVelocity

Sets the next action's velocity to the player's current shot velocitiy.

<accessoryaction type="WeaponTankVelocity">

   <armslevel>int</armslevel>
   <aimedweapon>Weapon</aimedweapon>
           Can be any weapon accessory

</accessoryaction>

WeaponTeamAction

Used to trigger different events based on which team the player is on. Team0 is the event that occurs when no teams are in play. You can define different events for all 4 teams.

<accessoryaction type="WeaponTeamAction">

   <armslevel>int</armslevel>
   <team0 type="Weapon..."> (can be any weapon accessory)
      ...
   </team0>
           The team0 event fires when playing in FFA mode when there are no teams
   <team1 type="Weapon...">
      ...
   </team1>
   <team2 type="Weapon...">
      ...
   </team2>
   ...
           You can also define events for each of the 4 teams when using teamplay

</accessory>

WeaponTeleport

Teleports the user to the weapons current position.

<accessoryaction type="WeaponTeleport">

   <armslevel>int</armslevel>
   <delay>NumParse</delay>
           number of seconds to delay before teleporting
   <sound>string</sound>
           wav file to play when teleporting
   <groundonly>bool</groundonly> (optional>
           true = default = teleports to landscape height
           false = player can teleport above ground level

</accessoryaction>

WeaponTranslate

Moves the projectile or other weapon to a further point along the current trajectory by a specified distance.

<accessoryaction type="WeaponTranslate">

   <armslevel>int</armslevel>
   <translatedist>NumParse</translatedist>
           distance to move along the axis before performing next action
   <nextaction>Weapon</nextaction>
           Can be any weapon accessory

</accessoryaction>

WeaponTypeAction

Used to trigger different events based on which tank type the player is using. Below, "none" and "tanktype1" refer to tank types you have defined in your mod's tanktypes.xml file. You can define events for every tanktype you have in the mod.

<accessoryaction type="WeaponTypeAction">

   <armslevel>int</armslevel>
   <none type="Weapon..."> (can be any weapon accessory)
   </none>
   <tanktype1 type="Weapon...">
   </tanktype1>
   ...
           you can keep defining events for each tank type specified in tanktypes.xml

</accessory>

WeaponVelocity

Changes the velocity of the current weapon either relative to its current velocity or to a pre-defined velocity.

<accessoryaction type="WeaponVelocity">

   <armslevel>int</armslevel>
   <abs>bool</abs> (optional)
           Whether or not the velocity change is absolute, default = false
   <velocitychange>NumParse</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>Weapon</aimedweapon>
           Can be any weapon accessory

</accessoryaction>




Edit this pagePage historyWhat links hereRelated changes
Donate to Scorched3D Visit Scorched3D at SourceForge.net Get it from CNET Download.com! 5 Stars
© Copyright 2008 Gavin Camp. All Rights reserved.