Cyberpunk 2077

File information

Last updated

Original upload

Created by

DJ_Kovrik

Uploaded by

djkovrik

Virus scan

Safe to use

Tags for this mod

About this mod

Repeats FirstEquip animation each time you equip your weapon or press a hotkey.

Requirements
Permissions and credits
Changelogs
Donations
Info

  • Repeats firstEquip animation each time you draw your weapon because it's just cool :) Made by request.
  • Tracks different game events to skip the animation when it should not be played (after interactions, climbing, ladders, enemy takedowns etc.)
  • Works only when there is no active combat.
  • Animation can be interrupted at any time with aiming.
  • Configuration option to set animation probability percent (75% by default).
  • Configuration option to enable/disable firstEquip animation while in stealth (disabled by default).
  • Alternate version which just runs firstEquip animation by pressing the hotkey (F2 by default).

About Hotkey version

  • If you have weapon sheathed then press F2 to draw if with firstEquip animation
  • If you have weapon unsheathed then hotkey press just hides it as usual
  • The hotkey can be changed from in-game settings menu
  • The mod tracks last used quickslot and uses it when hotkey pressed
  • If no quick slot was used yet then hotkey runs firstEquip animation for weapon from first slot

How to install

  • Download the latest redscript release and unpack it into the game folder
  • Unpack the mod archive into the game folder
  • (Optional) Open Cyberpunk 2077\r6\scripts\alwaysFirstEquip.reds with Notepad or any other editor and configure animation probability if you want to change the default value
  • OR
  • Configure hotkey definitions using included guide if you are using the hotkey version

Required redscript version: 0.2.0+

How to uninstall

  • Delete the Cyberpunk 2077\r6\scripts\alwaysFirstEquip.reds file

Credits


My mods



For redscript mod developers

// Added fields
@addField(PlayerPuppet)
let m_skipFirstEquip: Bool

@addField(UI_SystemDef)
public let IsFirstEquipPressed_eq: BlackboardID_Bool

@addField(UI_SystemDef)
public let LastUsedSlot_eq: BlackboardID_Int

@addField(HotkeyItemController)
public let m_playerPuppet_eq: ref<PlayerPuppet>

// Added methods
@addMethod(PlayerPuppet)
public func ShouldRunFirstEquip() -> Bool

@addMethod(PlayerPuppet)
public func HasRangedWeaponEquipped() -> Bool

@addMethod(PlayerPuppet)
public func SetSkipFirstEquip(skip: Bool) -> Void

@addMethod(PlayerPuppet)
public func ShouldSkipFirstEquip() -> Bool

// Replaced methods
@replaceMethod(LocomotionEventsTransition)
public func OnEnter(stateContext: ref<StateContext>, scriptInterface: ref<StateGameScriptInterface>) -> Void 

@replaceMethod(CarriedObjectEvents)
protected func OnEnter(stateContext: ref<StateContext>, scriptInterface: ref<StateGameScriptInterface>) -> Void

@replaceMethod(InteractiveDevice)
protected cb func OnInteractionUsed(evt: ref<InteractionChoiceEvent>) -> Bool

@replaceMethod(gamestateMachineComponent)
protected cb func OnStartTakedownEvent(startTakedownEvent: ref<StartTakedownEvent>) -> Bool

@replaceMethod(EquipmentBaseTransition)
protected final const func HandleWeaponEquip(scriptInterface: ref<StateGameScriptInterface>, stateContext: ref<StateContext>, stateMachineInstanceData: StateMachineInstanceData, item: ItemID) -> Void

@replaceMethod(HotkeyItemController)
protected cb func OnPlayerAttach(playerPuppet: ref<GameObject>) -> Bool 

@addMethod(HotkeyItemController)
protected cb func OnPlayerDetach(playerPuppet: ref<GameObject>) -> Bool

@addMethod(HotkeyItemController)
protected cb func OnAction(action: ListenerAction, consumer: ListenerActionConsumer) -> Bool

@replaceMethod(FirstEquipSystem)
public final const func HasPlayedFirstEquip(weaponID: TweakDBID) -> Bool

@replaceMethod(DefaultTransition)
protected final const func SendEquipmentSystemWeaponManipulationRequest(scriptInterface: ref<StateGameScriptInterface>, requestType: EquipmentManipulationAction, opt equipAnimType: gameEquipAnimationType) -> Void