Difference between revisions of "KFWeapon" - Tripwire Interactive Wiki

  • Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/
(Created page with "{{KFClassInfo|Object >> Actor >> Inventory >> Weapon >> BaseKFWeapon|name=KFWeapon|pkg=KFMod}} Base weapon class for Killing Floor. == Properties...")
 
(Added more descriptions)
 
(2 intermediate revisions by the same user not shown)
Line 6: Line 6:
  
 
'''int AppID'''
 
'''int AppID'''
: <<Description>>
+
: Unique ID used to identify paid DLC weapons.
 
'''bool bAimingRifle'''
 
'''bool bAimingRifle'''
: <<Description>>
+
: Set to true if using the scope or iron sights.
 
'''bool bAmmoHUDAsBar'''
 
'''bool bAmmoHUDAsBar'''
: <<Description>>
+
: Unused.
 
'''bool bConsumesPhysicalAmmo'''
 
'''bool bConsumesPhysicalAmmo'''
: <<Description>>
+
: Set to true if the weapon consumes some form of ammunition (false for [[syringe]] and [[welder]]).
 
'''bool bDoSingleReload'''
 
'''bool bDoSingleReload'''
 
: <<Description>>
 
: <<Description>>
 
'''bool bDualWeapon'''
 
'''bool bDualWeapon'''
: <<Description>>
+
: Set to true if the dual version of a weapon ([[dualies]], etc).
 
'''bool bHasScope'''
 
'''bool bHasScope'''
: <<Description>>
+
: Set to true if the weapon has a scope.
 
'''bool bHasSecondaryAmmo'''
 
'''bool bHasSecondaryAmmo'''
: <<Description>>
+
: Set to true if weapon has secondary ammo ([[M4 203]]).
 
'''bool bIsReloading'''
 
'''bool bIsReloading'''
: <<Description>>
+
: Set to true while reloading.
 
'''bool bIsTier2Weapon'''
 
'''bool bIsTier2Weapon'''
: <<Description>>
+
: Set to true if if the weapon is tier 2 (used for achievements).
 
'''bool bIsTier3Weapon'''
 
'''bool bIsTier3Weapon'''
: <<Description>>
+
: Set to true if if the weapon is tier 3 (used for achievements).
 
'''bool bKFNeverThrow'''
 
'''bool bKFNeverThrow'''
: <<Description>>
+
: If set to true the weapon cannot be thrown.
 
'''bool bModeZeroCanDryFire
 
'''bool bModeZeroCanDryFire
: <<Description>>
+
: If set to true, pulling the trigger when the weapon is empty will cause an auto-reload.
 
'''bool bNoHit'''
 
'''bool bNoHit'''
 
: <<Description>>
 
: <<Description>>
 
'''bool bPendingFlashlight'''
 
'''bool bPendingFlashlight'''
: <<Description>>
+
: Set to true when the player has pressed the flashlight key but the associated weapon has not yet been brought up.
 
'''bool bPreviouslyDropped'''
 
'''bool bPreviouslyDropped'''
: <<Description>>
+
: Set to true if a player had previously dropped this weapon.
 
'''bool bReduceMagAmmoOnSecondaryFire'''
 
'''bool bReduceMagAmmoOnSecondaryFire'''
: <<Description>>
+
: Setting to true will prevent primary ammo from being consumed when using secondary fire ([[M4 203]]).
 
'''bool bReloadEffectDone'''
 
'''bool bReloadEffectDone'''
: <<Description>>
+
: Set to false when starting a reload, and true when complete.
 
'''bool bShowPullOutHint'''
 
'''bool bShowPullOutHint'''
: <<Description>>
+
: Used exclusively for the [[knife]] to check if a relevant hint should be shown.
 
'''bool bSpeedMeUp'''
 
'''bool bSpeedMeUp'''
: <<Description>>
+
: If set to true, holding this weapon can increase the player's speed.
 
'''bool bSteadyAim'''
 
'''bool bSteadyAim'''
: <<Description>>
+
: If set to true, this weapon's accuracy is not affected by movement.
 
'''bool bUseCombos'''
 
'''bool bUseCombos'''
: <<Description>>
+
: Unused.
 
'''Vector EndBeamEffect'''
 
'''Vector EndBeamEffect'''
: <<Description>>
+
: Location of the end of the red dot laser that some weapons have (M14EBR). Updated every tick in RenderOverlays().
 
'''name FlashBoneName'''
 
'''name FlashBoneName'''
: <<Description>>
+
: Bone to attach muzzle flash effect to. This is usually 'tip'.
 
'''Effect_TacLightProjector FlashLight'''
 
'''Effect_TacLightProjector FlashLight'''
: <<Description>>
+
: Flashlight actor.
 
'''string HudImageRef'''
 
'''string HudImageRef'''
: <<Description>>
+
: Reference to 'unselected' weapon image in the HUD (used when cycling using the mouse wheel).
 
'''KFScopeDetailSettings KFScopeDetail'''
 
'''KFScopeDetailSettings KFScopeDetail'''
: <<Description>>
+
: Detail settings for scope ([[Crossbow]], [[M99]])
 
'''float LastAmmoResult'''
 
'''float LastAmmoResult'''
 
: <<Description>>
 
: <<Description>>
 
'''float LastHasGunMsgTime'''
 
'''float LastHasGunMsgTime'''
: <<Description>>
+
: Time when last "you already have this weapon" message was displayed.
 
'''int MagAmmoRemaining'''
 
'''int MagAmmoRemaining'''
: <<Description>>
+
: Amount of rounds remaining in the current magazine.
 
'''string MeshRef'''
 
'''string MeshRef'''
: <<Description>>
+
: Reference to weapon mesh.
 
'''float NextAmmoCheckTime'''
 
'''float NextAmmoCheckTime'''
 
: <<Description>>
 
: <<Description>>
 
'''int NumClicks'''
 
'''int NumClicks'''
: <<Description>>
+
: Number of times the player has dry-fired their weapon. Resets when they successfully fire a shot.
 
'''int NumLoadedThisReload'''
 
'''int NumLoadedThisReload'''
: <<Description>>
+
: Amount of shells reloaded in the last reload cycle (shotguns).
 
'''float QuickBringUpTime'''
 
'''float QuickBringUpTime'''
 
: <<Description>>
 
: <<Description>>
Line 78: Line 78:
 
: <<Description>>
 
: <<Description>>
 
'''int ReferenceCount'''
 
'''int ReferenceCount'''
: <<Description>>
+
: Reference counter to track how many instances of this actor exist.
 
'''float ReloadTimer'''
 
'''float ReloadTimer'''
 
: <<Description>>
 
: <<Description>>
 
'''string SelectedHudImageRef'''
 
'''string SelectedHudImageRef'''
: <<Description>>
+
: Reference to 'selected' weapon image in the HUD (used when cycling using the mouse wheel).
 
'''string SelectSoundRef'''
 
'''string SelectSoundRef'''
: <<Description>>
+
: Reference to sound that is played when weapon is brought up.
 
'''int SellValue'''
 
'''int SellValue'''
: <<Description>>
+
: Stores the value for weapons that were purchased, then dropped, to keep people from cheating the system.
 
'''array<string> SkinRefs'''
 
'''array<string> SkinRefs'''
: <<Description>>
+
: References to skins. Loaded into their respective ''Skins'' array slots.
 
'''float StandardDisplayFOV'''
 
'''float StandardDisplayFOV'''
 
: <<Description>>
 
: <<Description>>
 
'''int StoppingPower'''
 
'''int StoppingPower'''
: <<Description>>
+
: Unused.
 
'''Actor TacShine'''
 
'''Actor TacShine'''
 
: <<Description>>
 
: <<Description>>
 
'''PlayerController Tier3WeaponGiver'''
 
'''PlayerController Tier3WeaponGiver'''
: <<Description>>
+
: Player who last dropped this weapon, if tier 3 (used for achievements).
 
'''texture TraderInfoTexture'''
 
'''texture TraderInfoTexture'''
: <<Description>>
+
: Image used for weapon in trader.
 
'''name WeaponReloadAnim'''
 
'''name WeaponReloadAnim'''
: <<Description>>
+
: Name of reload animation.
 
'''bool bHoldToReload'''
 
'''bool bHoldToReload'''
: <<Description>>
+
: If set to true, weapon reloads one shell at a time and can be interrupted (shotguns, etc.).
 
'''bool bTorchEnabled'''
 
'''bool bTorchEnabled'''
: <<Description>>
+
: If set to true, allows flashlight to be used.
 
'''EClientGrenadeState ClientGrenadeState'''
 
'''EClientGrenadeState ClientGrenadeState'''
 
: <<Description>>
 
: <<Description>>
 
'''vector FirstPersonFlashlightOffset'''
 
'''vector FirstPersonFlashlightOffset'''
: <<Description>>
+
: Offset for flashlight effect in first person.
 
'''material HudImage'''
 
'''material HudImage'''
 
: <<Description>>
 
: <<Description>>
Line 114: Line 114:
 
: <<Description>>
 
: <<Description>>
 
'''int MagCapacity'''
 
'''int MagCapacity'''
: <<Description>>
+
: Magazine capacity.
 
'''int MinimumFireRange'''
 
'''int MinimumFireRange'''
: <<Description>>
+
: Minimum diring distance for bots.
 
'''name ModeSwitchAnim'''
 
'''name ModeSwitchAnim'''
: <<Description>>
+
: Name of fire mode switching animation. Used when enabling flashlight on the [[9mm]].
 
'''name ReloadAnim'''
 
'''name ReloadAnim'''
: <<Description>>
+
: Name of reload animation.
 
'''float ReloadAnimRate'''
 
'''float ReloadAnimRate'''
: <<Description>>
+
: Rate of reload animation (1.0 = normal, 0.5 = half-speed, 2.0 = twice-speed).
 
'''float ReloadRate'''
 
'''float ReloadRate'''
: <<Description>>
+
: Rate of reload (1.0 = normal, 0.5 = half-speed, 2.0 = twice-speed).
 
'''material SelectedHudImage'''
 
'''material SelectedHudImage'''
 
: <<Description>>
 
: <<Description>>
Line 134: Line 134:
 
: <<Description>>
 
: <<Description>>
 
'''float Weight'''
 
'''float Weight'''
: <<Description>>
+
: How many weight slots this weapon consumes when held by a player. See also the [[KFWeaponPickup]] version.
 
'''sound AimInSound'''
 
'''sound AimInSound'''
 
: <<Description>>
 
: <<Description>>

Latest revision as of 02:32, 28 November 2012

Killing Floor class KFWeapon (source)
Object >> Actor >> Inventory >> Weapon >> BaseKFWeapon >> KFWeapon


Base weapon class for Killing Floor.

Properties

int AppID

Unique ID used to identify paid DLC weapons.

bool bAimingRifle

Set to true if using the scope or iron sights.

bool bAmmoHUDAsBar

Unused.

bool bConsumesPhysicalAmmo

Set to true if the weapon consumes some form of ammunition (false for syringe and welder).

bool bDoSingleReload

<<Description>>

bool bDualWeapon

Set to true if the dual version of a weapon (dualies, etc).

bool bHasScope

Set to true if the weapon has a scope.

bool bHasSecondaryAmmo

Set to true if weapon has secondary ammo (M4 203).

bool bIsReloading

Set to true while reloading.

bool bIsTier2Weapon

Set to true if if the weapon is tier 2 (used for achievements).

bool bIsTier3Weapon

Set to true if if the weapon is tier 3 (used for achievements).

bool bKFNeverThrow

If set to true the weapon cannot be thrown.

bool bModeZeroCanDryFire

If set to true, pulling the trigger when the weapon is empty will cause an auto-reload.

bool bNoHit

<<Description>>

bool bPendingFlashlight

Set to true when the player has pressed the flashlight key but the associated weapon has not yet been brought up.

bool bPreviouslyDropped

Set to true if a player had previously dropped this weapon.

bool bReduceMagAmmoOnSecondaryFire

Setting to true will prevent primary ammo from being consumed when using secondary fire (M4 203).

bool bReloadEffectDone

Set to false when starting a reload, and true when complete.

bool bShowPullOutHint

Used exclusively for the knife to check if a relevant hint should be shown.

bool bSpeedMeUp

If set to true, holding this weapon can increase the player's speed.

bool bSteadyAim

If set to true, this weapon's accuracy is not affected by movement.

bool bUseCombos

Unused.

Vector EndBeamEffect

Location of the end of the red dot laser that some weapons have (M14EBR). Updated every tick in RenderOverlays().

name FlashBoneName

Bone to attach muzzle flash effect to. This is usually 'tip'.

Effect_TacLightProjector FlashLight

Flashlight actor.

string HudImageRef

Reference to 'unselected' weapon image in the HUD (used when cycling using the mouse wheel).

KFScopeDetailSettings KFScopeDetail

Detail settings for scope (Crossbow, M99)

float LastAmmoResult

<<Description>>

float LastHasGunMsgTime

Time when last "you already have this weapon" message was displayed.

int MagAmmoRemaining

Amount of rounds remaining in the current magazine.

string MeshRef

Reference to weapon mesh.

float NextAmmoCheckTime

<<Description>>

int NumClicks

Number of times the player has dry-fired their weapon. Resets when they successfully fire a shot.

int NumLoadedThisReload

Amount of shells reloaded in the last reload cycle (shotguns).

float QuickBringUpTime

<<Description>>

float QuickPutDownTime

<<Description>>

int ReferenceCount

Reference counter to track how many instances of this actor exist.

float ReloadTimer

<<Description>>

string SelectedHudImageRef

Reference to 'selected' weapon image in the HUD (used when cycling using the mouse wheel).

string SelectSoundRef

Reference to sound that is played when weapon is brought up.

int SellValue

Stores the value for weapons that were purchased, then dropped, to keep people from cheating the system.

array<string> SkinRefs

References to skins. Loaded into their respective Skins array slots.

float StandardDisplayFOV

<<Description>>

int StoppingPower

Unused.

Actor TacShine

<<Description>>

PlayerController Tier3WeaponGiver

Player who last dropped this weapon, if tier 3 (used for achievements).

texture TraderInfoTexture

Image used for weapon in trader.

name WeaponReloadAnim

Name of reload animation.

bool bHoldToReload

If set to true, weapon reloads one shell at a time and can be interrupted (shotguns, etc.).

bool bTorchEnabled

If set to true, allows flashlight to be used.

EClientGrenadeState ClientGrenadeState

<<Description>>

vector FirstPersonFlashlightOffset

Offset for flashlight effect in first person.

material HudImage

<<Description>>

name IdleAimAnim

<<Description>>

int MagCapacity

Magazine capacity.

int MinimumFireRange

Minimum diring distance for bots.

name ModeSwitchAnim

Name of fire mode switching animation. Used when enabling flashlight on the 9mm.

name ReloadAnim

Name of reload animation.

float ReloadAnimRate

Rate of reload animation (1.0 = normal, 0.5 = half-speed, 2.0 = twice-speed).

float ReloadRate

Rate of reload (1.0 = normal, 0.5 = half-speed, 2.0 = twice-speed).

material SelectedHudImage

<<Description>>

byte SleeveNum

<<Description>>

class<InventoryAttachment> TacShineClass

<<Description>>

sound ToggleSound

<<Description>>

float Weight

How many weight slots this weapon consumes when held by a player. See also the KFWeaponPickup version.

sound AimInSound

<<Description>>

sound AimOutSound

<<Description>>

bool bHasAimingMode

<<Description>>

float ZoomedDisplayFOVHigh

<<Description>>