Weapon Defs
Here we provide a list of engine defined weapondefs:
Name | Description | Values |
---|---|---|
name | string The descriptive name of the weapon as listed in FPS mode. | Default: Weapon |
weaponType | string | Default: Cannon |
id | int | Default: 0 |
customParams | table | |
avoidFriendly | bool | Default: 1 |
avoidFeature | bool | Default: 1 |
avoidNeutral | bool | Default: 0 |
avoidGround | bool | Default: 1 |
avoidCloaked | bool | Default: 0 |
collideEnemy | bool | Default: 1 |
collideFriendly | bool | Default: 1 |
collideFeature | bool | Default: 1 |
collideNeutral | bool | Default: 1 |
collideFireBase | bool | Default: 0 |
collideNonTarget | bool | Default: 1 |
collideGround | bool | Default: 1 |
collideCloaked | bool | Default: 1 |
damage | table | |
damage.default | float | Default: 1 |
size | float | |
explosionSpeed | float | |
impactOnly | bool | Default: 0 |
noSelfDamage | bool | Default: 0 |
noExplode | bool | Default: 0 |
burnblow | bool | Default: 0 |
damageAreaOfEffect | float | Fallback: areaOfEffect Default: 8 Scale Value: 0.5 Scale String: 0.5f |
edgeEffectiveness | float | Default: 0 Max: 0.999 |
collisionSize | float | Default: 0.05 |
weaponVelocity | float | Fallback: maxVelocity Default: 0 Min: 0.01 Scale Value: 0.0333333 Scale String: 1.0f / GAME_SPEED |
startvelocity | float | Default: 0 Min: 0.01 Scale Value: 0.0333333 Scale String: 1.0f / GAME_SPEED |
weaponacceleration | float | Fallback: acceleration Default: 0 Scale Value: 0.00111111 Scale String: 1.0f / (GAME_SPEED * GAME_SPEED) |
reloadTime | float | Default: 1 |
burstRate | float | Default: 0.1 |
burst | int | Default: 1 |
projectiles | int | Default: 1 |
waterBounce | bool | Default: 0 |
groundBounce | bool | Default: 0 |
bounceSlip | float | Default: 1 |
bounceRebound | float | Default: 1 |
numBounce | int | Default: -1 |
impulseFactor | float | Default: 1 |
impulseBoost | float | Default: 0 |
craterMult | float | Fallback: impulseFactor Default: 1 |
craterBoost | float | Default: 0 |
craterAreaOfEffect | float | Fallback: areaOfEffect Default: 8 Scale Value: 0.5 Scale String: 0.5f |
waterweapon | bool | Default: 0 |
submissile | bool | Default: 0 |
fireSubmersed | bool | Fallback: waterweapon Default: 0 |
commandfire | bool | Default: 0 |
range | float | Default: 10 |
heightmod | float | Default: 0.2 |
targetBorder | float | Default: 0 Min: -1 Max: 1 |
cylinderTargeting | float | Fallback: cylinderTargetting Default: 0 Min: 0 Max: 128 |
turret | bool Does the unit aim within an arc (up-to and including full 360° turret traverse) or always aim along the owner's heading? | Default: 0 |
fixedLauncher | bool | Default: 0 |
tolerance | float | Default: 3000 Scale Value: 9.58738e-05 Scale String: TAANG2RAD |
firetolerance | float | Default: 3640 Scale Value: 9.58738e-05 Scale String: TAANG2RAD |
highTrajectory | int | Default: 2 |
trajectoryHeight | float | Default: 0 |
tracks | bool | Default: 0 |
wobble | float | Default: 0 Scale Value: 3.19579e-06 Scale String: float(TAANG2RAD) / GAME_SPEED |
dance | float | Default: 0 Scale Value: 0.0333333 Scale String: 1.0f / GAME_SPEED |
gravityAffected | bool | Default: 0 |
myGravity | float | Default: 0 |
canAttackGround | bool | Default: 1 |
weaponTimer | float | Default: 0 |
flighttime | float Flighttime of missiles in seconds. | Default: 0 Scale Value: 30 Scale String: GAME_SPEED |
turnrate | float | Default: 0 Scale Value: 3.19579e-06 Scale String: float(TAANG2RAD) / GAME_SPEED |
heightBoostFactor | float | Default: -1 |
proximityPriority | float | Default: 1 |
allowNonBlockingAim | bool When false, the weapon is blocked from firing until AimWeapon() returns. | Default: 0 |
accuracy | float | Default: 0 |
sprayAngle | float | Default: 0 |
movingAccuracy | float | Fallback: accuracy Default: 0 |
targetMoveError | float | Default: 0 |
leadLimit | float | Default: -1 |
leadBonus | float | Default: 0 |
predictBoost | float | Default: 0 |
ownerExpAccWeight | float | |
minIntensity | float The minimum percentage the weapon's damage can fall-off to over its range. Setting to 1.0 will disable fall off entirely. Unrelated to the visual-only intensity tag. | Default: 0 |
duration | float | Default: 0.05 |
beamtime | float | Default: 1 |
beamburst | bool | Default: 0 |
beamTTL | int | Default: 0 |
sweepFire | bool Makes BeamLasers continue firing while aiming for a new target, 'sweeping' across the terrain. | Default: 0 |
largeBeamLaser | bool | Default: 0 |
sizeGrowth | float | Default: 0.5 |
flameGfxTime | float | |
metalPerShot | float | Default: 0 |
energyPerShot | float | Default: 0 |
fireStarter | float The percentage chance of the weapon setting fire to static map features on impact. | Default: 0 Min: 0 Scale Value: 0.01 Scale String: 0.01f |
paralyzer | bool Is the weapon a paralyzer? If true the weapon only stuns enemy units and does not cause damage in the form of lost hit-points. | Default: 0 |
paralyzeTime | int Determines the maximum length of time in seconds that the target will be paralyzed. The timer is restarted every time the target is hit by the weapon. Cannot be less than 0. | Default: 10 Min: 0 |
stockpile | bool Does each round of the weapon have to be built and stockpiled by the player? Will only correctly function for the first of each stockpiled weapons a unit has. | Default: 0 |
stockpileTime | float The time in seconds taken to stockpile one round of the weapon. | Fallback: reload Default: 1 Scale Value: 30 Scale String: GAME_SPEED |
targetable | int Bitmask representing the types of weapon that can intercept this weapon. Each digit of binary that is set to one means that a weapon with the corresponding digit in its interceptor tag will intercept this weapon. Instant-hitting weapons such as [#BeamLaser], [#LightningCannon] and [#Rifle] cannot be targeted. | Default: 0 |
interceptor | int Bitmask representing the types of weapons that this weapon can intercept. Each digit of binary that is set to one means that a weapon with the corresponding digit in its targetable tag will be intercepted by this weapon. | Default: 0 |
interceptedByShieldType | unsigned int | |
coverage | float The radius in elmos within which an interceptor weapon will fire on targetable weapons. | Default: 0 |
interceptSolo | bool If true no other interceptors may target the same projectile. | Default: 1 |
dynDamageInverted | bool If true the damage curve is inverted i.e. the weapon does more damage at greater ranges as opposed to less. | Default: 0 |
dynDamageExp | float Exponent of the range-dependent damage formula, the default of 0.0 disables dynamic damage, 1.0 means linear scaling, 2.0 quadratic and so on. | Default: 0 |
dynDamageMin | float The minimum floor value that range-dependent damage can drop to. | Default: 0 |
dynDamageRange | float If set to non-zero values the weapon will use this value in the range-dependant damage formula instead of the actual range. | Default: 0 |
shield.repulser | bool Does the shield repulse (deflect) projectiles or absorb them? | Fallback: shieldRepulser Default: 0 |
shield.smart | bool Determines whether or not projectiles fired by allied units can pass through the shield (true) or are intercepted as enemy weapons are (false). | Fallback: smartShield Default: 0 |
shield.exterior | bool Determines whether or not projectiles fired within the shield's radius can pass through the shield (true) or are intercepted (false). | Fallback: exteriorShield Default: 0 |
shield.maxSpeed | float The maximum speed the repulsor will impart to deflected projectiles. | Fallback: shieldMaxSpeed Default: 0 |
shield.force | float The force applied by the repulsor to the weapon - higher values will deflect weapons away at higher velocities. | Fallback: shieldForce Default: 0 |
shield.radius | float The radius of the circular area the shield covers. | Fallback: shieldRadius Default: 0 |
shield.power | float Essentially the maximum allowed hit-points of the shield - reduced by the damage of a weapon upon impact. | Fallback: shieldPower Default: 0 |
shield.startingPower | float How many hit-points the shield starts with - otherwise the shield must regenerate from 0 until it reaches maximum power. | Fallback: shieldStartingPower Default: 0 |
shield.powerRegen | float How many hit-points the shield regenerates each second. | Fallback: shieldPowerRegen Default: 0 |
shield.powerRegenEnergy | float How much energy resource is consumed to regenerate each hit-point. | Fallback: shieldPowerRegenEnergy Default: 0 |
shield.energyUse | float The amount of the energy resource consumed by the shield to absorb or repulse weapons, continually drained by a repulsor as long as the projectile is in range. | Fallback: shieldEnergyUse Default: 0 |
rechargeDelay | float The delay in seconds before a shield begins to regenerate after it is hit. | Fallback: shieldRechargeDelay Default: 0 Scale Value: 30 Scale String: GAME_SPEED |
shield.interceptType | unsigned int Bitmask representing the types of weapons that this shield can intercept. Each digit of binary that is set to one means that a weapon with the corresponding digit in its interceptedByShieldType will be intercepted by this shield (See [[Shield Interception Tag]] Use). | Fallback: shieldInterceptType Default: 0 |
shield.visible | bool Is the shield visible or not? | Fallback: visibleShield Default: 0 |
shield.visibleRepulse | bool Is the (hard-coded) repulse effect rendered or not? | Fallback: visibleShieldRepulse Default: 0 |
shield.visibleHitFrames | int The number of frames a shield becomes visible for when hit. | Fallback: visibleShieldHitFrames Default: 0 |
shield.badColor | float4 The RGBA colour the shield transitions to as its hit-points are reduced towards 0. | Fallback: shieldBadColor Default: 1, 0.5, 0.5 |
shield.goodColor | float4 The RGBA colour the shield transitions to as its hit-points are regenerated towards its maximum power. | Fallback: shieldGoodColor Default: 0.5, 0.5, 1 |
shield.alpha | float The alpha transparency of the shield whilst it is visible. | Fallback: shieldAlpha Default: 0.2 |
shield.armorType | string Specifies the armorclass of the shield; you can input either an armorclass name OR a unitdef name to share that unit's armorclass | Fallback: shieldArmorType Default: default |
model | string | |
explosionScar | bool | Default: 1 |
alwaysVisible | bool | Default: 0 |
cameraShake | float | Fallback: damage.default Default: 0 Min: 0 |
smokeTrail | bool | Default: 0 |
smokeTrailCastShadow | bool | Default: 1 |
smokePeriod | int | Default: 8 |
smokeTime | int | Default: 60 |
smokeSize | float | Default: 7 |
smokeColor | float | Default: 0.65 |
castShadow | bool | Default: 1 |
sizeDecay | float | Default: 0 |
alphaDecay | float | Default: 1 |
separation | float | Default: 1 |
noGap | bool | Default: 1 |
stages | int | Default: 5 |
lodDistance | int | Default: 1000 |
thickness | float | Default: 2 |
coreThickness | float | Default: 0.25 |
laserFlareSize | float | Default: 15 |
tileLength | float | Default: 200 |
scrollSpeed | float | Default: 5 |
pulseSpeed | float | Default: 1 |
beamDecay | float | Default: 1 |
falloffRate | float | Default: 0.5 |
hardstop | bool | Default: 0 |
rgbColor | float3 | Default: 1, 0.5, 0 |
rgbColor2 | float3 | Default: 1, 1, 1 |
intensity | float Alpha transparency for non-model projectiles. Lower values are more opaque, but 0.0 will cause the projectile to disappear entirely. | Default: 0.9 |
colormap | string | |
textures.1 | string | Fallback: texture1 |
textures.2 | string | Fallback: texture2 |
textures.3 | string | Fallback: texture3 |
textures.4 | string | Fallback: texture4 |
cegTag | string The name, without prefixes, of a CEG to be emitted by the projectile each frame. | |
explosionGenerator | string | |
bounceExplosionGenerator | string | |
soundTrigger | bool | |
soundStart | string | |
soundHitDry | string | Fallback: soundHit |
soundHitWet | string | Fallback: soundHit |
soundStartVolume | float | Default: -1 |
soundHitDryVolume | float | Fallback: soundHitVolume Default: -1 |
soundHitWetVolume | float | Fallback: soundHitVolume Default: -1 |