WeaponScripts: Difference between revisions

From Empires Wiki
Jump to navigation Jump to search
(Reordered page somewhat.)
Line 40: Line 40:
[[WeaponScript.ProjectileSpread | Projectile Spread]]: only applicable to machine guns at the moment.  A value of 1 is likely a full 180 degree cone.<br>
[[WeaponScript.ProjectileSpread | Projectile Spread]]: only applicable to machine guns at the moment.  A value of 1 is likely a full 180 degree cone.<br>
[[WeaponScript.HeatToTarget | Heat To Target]]: Amount of heat inflicted on the target upon impact. (not included the heat added by the damage to heat modifier of armor).<br>
[[WeaponScript.HeatToTarget | Heat To Target]]: Amount of heat inflicted on the target upon impact. (not included the heat added by the damage to heat modifier of armor).<br>
[[WeaponScript.Inertia | Inertia]]: Determines if the velocity of the vehicle firing the weapon affects the velocity of the projectile fired.<br>
[[WeaponScript.ExplosionRadius | Explosion Radius]]: The amount of area around the impact location of a projectile affected by the impact.  Making this value too large can bog-down servers.  Current range is from 0 to 2000+.<br>
[[WeaponScript.ExplosionRadius | Explosion Radius]]: The amount of area around the impact location of a projectile affected by the impact.  Making this value too large can bog-down servers.  Current range is from 0 to 2000+.<br>
[[WeaponScript.ExplosionForce | Explosion Force]]: amount of concussive force applied to physics objects in the blast radius.<br>
[[WeaponScript.ExplosionForce | Explosion Force]]: amount of concussive force applied to physics objects in the blast radius.<br>

Revision as of 03:12, 25 June 2017

Empires Scripting Documentation
Scripting Overview | Vehicle Script Overview | Vehicle Handling Script Overview | Weapon Script Overview | Armor Script Overview | Building Script Overview | Infantry Script Overview | Hint Messages | Loading Screen Script Overview | Tutorials



Overview

This is a glossary of all the attributes that can be used in a vehicle weapon script.

You place comments in a script file by putting a "//" in front of the comment.

General Characteristics

Name: name given when selecting weapons.
HUD Name: name displayed in the weapon area of the vehicle HUD
Description: description given when selecting weapons
Icon: icon drawn in the GUI
HUD Icon: icon drawn in the vehicle HUD
Size: number of slots required when selecting weapons. Current possible values [1,2,3].
Type: 0=machine gun, 1=tank cannon, 2=artillery cannon, 3=missile launcher, 4=grenade launcher, 5=aircraft bomb bay
Cost: The amount of resources required(deducted from the team) to equip a tank with the weapon.
Team: Which team is allowed to use it. Current possible values ['IMP','NF','ALL'].
Research: The name of a research item that unlocks this weapon, taken from the research scripts.

Sound Characteristics

Sound Firing: The sound played when weapon is being fired.
Sound Impact: The sound played when the weapon makes its final impact.
Sound Reloading: The sound played when the weapon reloads.

Weapon Characteristics

Damage Type: The name of a damage type to be used by the resistance system.
Ammo Type: This value determines what things mg weapons can damage. 0=infantry, 1=infantry+vehicles, 2=buildings+vehicles+infantry.
Damage: The amount of damage inflicted to an enemy target on impact. This value is affected by many things.
MinimalDamage
Falloff
Falloffbase
Speed: The initial velocity of the projectile.
Gravity: effects of gravity on the projectile, only for projectiles. Gravity should normally be constant, although this value is often messed with to compansate for short-comings of the speed modifier.
Heat: Amount of heat inflicted on self when weapon is fired. Vehicles have 200 heat points before they over-heat.
Weight: weight in terms of effects on engine and weight restrictions for chassis
Cycle Time: time between shots in seconds
Clip Size: number of shots before reload.
Total Ammo Clips: number of possible reloads.
Reload Time: time spent reloading in seconds.
Projectile Spread: only applicable to machine guns at the moment. A value of 1 is likely a full 180 degree cone.
Heat To Target: Amount of heat inflicted on the target upon impact. (not included the heat added by the damage to heat modifier of armor).
Explosion Radius: The amount of area around the impact location of a projectile affected by the impact. Making this value too large can bog-down servers. Current range is from 0 to 2000+.
Explosion Force: amount of concussive force applied to physics objects in the blast radius.

Variables for missiles

Dumb Missile: '1' if missile flies straight ahead
Homing Missile: '1' if missile flies towards locked on target
Guided Missile: '1' if missile follows crosshairs after launch
Missile Range: max range in HL2 units (1 inch = 1) that the player can lock onto a target with a homing missile, or range from vehicle being fired from when a guided missile stops following the player's crosshairs
Lock On Time: time it takes for a homing missile to lock onto the target under the player crosshairs
Lock Range Modifier: modifies lock on time based on range (as range increases, lock on time increases based on the modifier: modifier * range to target + lock on time = total lock on time)
Countermeasure Effectiveness
Turning Ability: determines how effective the missile can turn to home in on its target or guide itself to the crosshair for a guided missile; 1.0 means the missile can turn instantly towards its target, 0.0 and the missile doesn't turn at all

Variables for bio damage

Player Bio Damage: damage inflicted to players every interval
Player Bio Time: total time to inflict damage to players
Player Bio Interval: time inbetween each infliction of damage to players
Vehicle Bio Damage: damage inflicted to a vehicle every interval
Vehicle Bio Time: total time to inflict damage to s vehicle
Vehicle Bio Interval: time inbetween each infliction of damage to a vehicle

Variables for particles

ExplosionSprite: explosion sprite to use for explosion, 0 = default, 1 = green (bio), 2 = blue (plasma)
ExplosionSpeed: how fast the explosion sprite fades (15 is default fps)
Tracer Type: Tracer effect, tracer names are logical, a list: tracer_du, tracer_bio, tracer_he, tracer_rifle, tracer_smg, tracer_vehiclemg, tracer_cg, tracer_plasma