WeaponInfo

Values used to determine a weapon types behavior. To access this type you should use the WeaponInfo list rfg.WeaponInfos. See the example scripts WeaponInfoTest1.lua and WeaponInfoTest2.lua in RSL/Scripts/Included scripts/ for examples of how this can be done (included in each release). Note that when you edit a WeaponInfo instance, that you’re editing the behavior of all weapons based off of that, unless you make your own copy of it.

Variables

Name (String)
The instances name.
NameCrc (ChecksumStri)
The CRC checksum for the name.
UniqueId (int)
The unique id of this instance.
Flags (WeaponInfoFlags)
Flags which determine additional behavior of the weapon.
WeaponClass (WeaponClasses)
The weapon class.
WeaponInvItemInfo (InvItemInfo)
The weapons inventory info.
DefaultTeam (HumanTeams)
The default team for this instance.
IconName (String)
The name of the icon used. May be nil.
SmallIconName (String)
The name of the small icon used. May be nil.
ReticuleName (String)
The name of the reticule used. May be nil.
FineAimReticuleName (String)
The name of the fine aim reticule used. May be nil.
WeaponAnimGroup (AnimationGroups)
The animation group for this weapon.
MuzzleFlashEffect (unsigned int)
The id for the muzzle flash effect.
MuzzleSmokeEffect (unsigned int)
The id for the muzzle smoke effect.
SpecialHitEffect (unsigned int)
Unknown value.
SpecialEffect (unsigned int)
Unknown value.
SecondarySpecialEffect (unsigned int)
Unknown value.
OverheatedEffect (unsigned int)
The id for the overheating effect.
TracerEffect (unsigned int)
The id for the tracer effect.
FireCameraShakeIgnoreDisabled (bool)
Unknown value.
AttachmentPoint (String)
Unknown value.
FireSound (int)
The id for the fire sound.
SecondarySound (int)
The id for the secondary fire sound.
UpgradeSound (int)
The id for the upgrade sound.
ReloadSound (int)
The id for the reload sound.
ReloadSoundDelay (int)
The delay for the reload sound in unknown units.
NoAmmoSound (int)
The id for the no ammo sound.
SpecialSound (int)
Unknown value.
FlybySound (int)
The id for the bullet fly by sound.
NumWeaponPersonas (int)
Unknown value.
NpcFireSounds[16] (int)
Unknown value.
MaxRange (float)
The max range in meters for the weapon.
RedRange (float)
Unknown value.
MaxEngagementDist (float)
Unknown value.
MinEngagementDist (float)
Unknown value.
MaxAiPenetratingDist (float)
Unknown value.
TriggerType (TriggerTypes)
The trigger type (automatic/single).
AmmoType (AmmoTypes)
The ammo type (electric, bullet, projectile, etc).
MagazineSize (unsigned int16)
Magazine size.
MagazineStartNum (unsigned int16)
The starting number of rounds in a magazine.
MaxRounds (unsigned int16)
The max rounds carried.
MaxRoundsUpgrade (unsigned int16)
Unknown value.
AmmoBoxRestock (unsigned int16)
The amount of rounds to be restocked by an ammo box.
ToMinSpread (unsigned int16)
Unknown value.
ToMaxSpread (unsigned int16)
Unknown value.
MeleeGroupIndex (int8)
Unknown value.
BulletGroupIndex (int8)
Unknown value.
TracerFrequency (int8)
Unknown value.
ShotsPerRound (int8)
Unknown value.
FiringSoundRadius (float)
The radius in meters that the weapon can be heard firing from.
NpcRefireDelay (float)
The delay between shots for NPCs in seconds.
DefaultRefireDelay (float)
The delay between shots for the player in seconds.
PrefireDelay (float)
Unknown value.
DefaultReloadDelay (int)
Unknown value.
LowScaleDamage (DamageScalingInfo)
Unknown value.
HighScaleDamage (DamageScalingInfo)
Unknown value.
ExplosionInfo (ExplosionInfo)
The explosion that should be created when this weapons rounds impact. Will be nil if there’s no explosion for this weapon.
AiExplosionInfo (ExplosionInfo)
An optional separate explosion that is used for AI. May be nil.
FireConeDot (float)
The angle of the fire cone. Range should be from 0.0 to 1.0. At 1.0 the fire cone is perfectly accurate, firing exactly where you point, at 0.0 it’s a 180 degree cone.
EvenSpreadAccuracyDot (float)
Unknown value.
MaxSpread (float)
The maximum spread of the weapons rounds. Units if any are unknown.
MinSpread (float)
The minimum spread of the weapons rounds. Units if any are unknown.
FineAimMaxSpread (float)
The max spread when in fine aim mode.
FineAimMinSpread (float)
The min spread when in fine aim mode.
NpcMaxSpread (float)
The max spread for NPCs.
NpcMinSpread (float)
The min spread for NPCs.
SpreadMultiplierRun (float)
The number spread should be multiplied by if you’re running. If this is greater than 1.0 then your spread will increase while running.
RagdollForceShoot (float)
The amount of force to apply to a ragdoll when shot by this weapon. Units unknown, but likely in newtons.
RagdollChance (float)
The chance that getting hit by this weapon will cause the target to ragdoll.
RecoilCameraKick (float)
How much the camera should react to recoil.
RecoilImpulse (float)
Unknown value. Likely the impulse that should be applied to the player when this is fired.
OutOfAmmoReloadDelay (int)
Unknown value.
OverheatCoolDownTime (float)
Unknown value.
OverheatPercentPerShot (float)
Unknown value.
DroppedAmmoScale (float)
Unknown value.
BulletHoleScale (float)
Unknown value.
HeadshotMultiplier (float)
A number that damage is multiplied by when doing headshot damage.
ZoomMagnification (float)
How much the view should be magnified when using fine aim.
AutoaimOverride (float)
Unknown value.
NpcAutoaim (float)
Unknown value.
AimAssist (float)
Unknown value.
PlayerMoveSpeedMultiplier (float)
Unknown value.
NpcMoveSpeedMultiplier (float)
Unknown value.
AlertMultiplier (float)
Unknown value.
ProjectileInfo (WeaponProjectileInfo)
Information about the weapons projectiles if it uses projectile ammo.
StandingPrimaryMeleeAttack (int)
Unknown value.
StandingSecondaryMeleeAttack (int)
Unknown value.
StandingTertiaryMeleeAttack (int)
Unknown value.
CrouchingPrimaryMeleeAttack (int)
Unknown value.
CrouchingSecondaryMeleeAttack (int)
Unknown value.
CrouchingTertiaryMeleeAttack (int)
Unknown value.