Weapon Commands
April 22, 2003 - 04:04
Author: tibmaker
Requirements:
Rules.ini or Rulesmd.ini
This is just a little tut to explain what certain commands do with weapons. The Weapon is the grouping of the projectile, warhead, and sound. The projectile is what the object looks like in air and the warhead is what the object looks like on impact. Here is some code you put into your unit:
Ammo=number (how much rounds it has. Putting –1 will mean it has unlimited which is standard)
DeployFire=yes (fires when deployed)
DeployFireWeapon=weapon (weapon it fires when deployed)
DistributedFire=yes (the unit will target units nearby and attacks all of them)
EmptyReload=-1 (how long it takes to fire. –1 means none)
GuardRange=5 (distance to scan for enemies to attack)
InitialAmmo=-1 (number of rounds a unit starts with. –1 means full)
OmniFire=no (doesn’t rotate when fires)
OpportunityFire=yes (Can fire at targets while moving)
Primary=weapon (primary weapon equipped with)
Secondary=2nd Weapon (secondary weapon equipped with)
ElitePrimary=Elite Weapon (primary weapon when at elite veteran status. Replaces primary.)
EliteSecondary=2nd Elite weapon (secondary weapon when unit is an elite. Replaces secondary.)
Reload=0 (time delay between reloads)
ReloadIncrement=0 (amount to add to how long a unit reloads at every time a unit fires.)
TargetLaser=yes (Does it have a targeting laser)
 
Insert this in units as well but this is how the Dreadnaught or whatever launches other units and missiles. You have to create these units or missiles though or you can use current game ones and you need a spawning weapon.
 
Spawns=unit that it spawns
SpawnsNumber=number of units
SpawnRegenRate=time it takes to respawn
SpawnReloadRate=how long it takes to launch another
 
Insertable commands in Weapons Section
 
Anim=image (animation to display as a firing effect)
AreaFire=no (weapon fires and does damage in a radius. Works only for secondary)
Bright=yes   (Does this weapons bullet cause a lighting effect on the ground?)
Burst=1     (number of rapid succession shots from this weapon)
Camera=no   (Reveals area around shooter)
Damage=1000 (the amount of damage dealt with every bullet)
Floater=no (weapon floats like a frizbee)
Lobber=no (does the projectile fly to target in a high arc that goes over walls)
Projectile=projectile (projectile to use)
RadLevel=0 (the radiation level left by the weapon.)
Range=8 (maximum cell range of a weapon)
ROF=15 (delay between shots [15 = 1 second at middle speed setting])
Report=sound (List of sounds to random play when firing)
Speed=50 (speed of projectile to target. 100 is maximum)
TurboBoost=yes (Should the weapon get a boosted speed bonus when firing upon aircraft?)
UseFireParticles=no       (Should the weapon spawn a flame particle system?)
Warhead=warhead (warhead to attach to projectile (explosion))
 
Other code for Weapons:
 
AttachedParticleSystem=partical system (secondary image that goes along with projectile)
IsRailgun=true (if it has railgun abilities)
AmbientDamage=150 (damage field)
SabotageCursor=yes (displays a cursor for C4’s)
RevealOnFire=yes (clears shroud when fired)
Floater=yes (hovers in air before impacting)
OmniFire=yes (can fire multiple shots)
LimboLaunch=yes (just mean unit will act as bullet)
PenetratesBunker=yes         (If shot at a bunkered tank, no, bunker gets damaged, yes, unit in bunker does)
FireInTransport=no (cant fire in a transport like Battle Fortress)
Spawner=yes (means weapon spawns)
DecloakToFire=no (unit decloaks when fires)
LaserOuterSpread= 0,0,0 (how far it spreads outwards)
LaserDuration = 15 (how long it stays on)
IsLaser=true (this flag tells the game to use the special laser draw effect)
IsHouseColor=true (looks like the color you selected)
IsElectricBolt=true (flag that tells it has abilities of an electric bolt)