Skip to content

Add multiple Player effects - #45

Merged
shadow578 merged 9 commits into
mainfrom
add/new-player-effects
Jul 11, 2026
Merged

Add multiple Player effects#45
shadow578 merged 9 commits into
mainfrom
add/new-player-effects

Conversation

@shadow578

@shadow578 shadow578 commented Jun 4, 2026

Copy link
Copy Markdown
Owner

making use of new hooks in SDK 4.0.2

  • ZRecoilModifierEffect
    • "No Recoil" - weapons have no recoil
    • "Extreme Recoil" - weapon recoil is multiplied 5x
  • ZMagazineUpdateModifierEffect
    • "Unlimited Ammo" (previously via ZPlayerCrippleBoxEffectBase; new one applies to loaded mag, not "in-pocket" mags) - unlimited ammo
    • "Oops, no Bullets" - reloading does nothing, no bullets to shoot
    • "Security Budget Cuts" - guards have empty mags
    • "Single Shot" - player + actor have only a single bullet before reloading
  • ZWeaponPrecisionOverrideEffect
    • "Super Precision" - precision factor of 0, basically allows sniping with ICA19
    • "Bad Aim" - just the opposite of super precision, miss shots right in front of you

Checklist

  • I consent to automatic PR review by GitHub Copilot.
  • I added attributon (if applicable)
  • I updated documentation (if applicable)

@shadow578
shadow578 marked this pull request as ready for review July 11, 2026 10:16
@shadow578
shadow578 requested a review from Copilot July 11, 2026 10:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces several new player weapon-related chaos effects (recoil, magazine/bullet behavior, precision override, rapid fire) leveraging newer SDK 4.0.2 hooks, and adds shared hooking helpers to support multiple effect instances behind a single SDK detour.

Changes:

  • Added HookingHelpers.h macros to enable “base-class detour” patterns with per-instance dispatch.
  • Added new weapon effects: rapid fire, precision override (super precision / bad aim), recoil modifier (no recoil / extreme recoil), and magazine update modifier (unlimited/empty/single-shot mags).
  • Added a composite “overpowered” effect combining multiple weapon buffs; removed the old unlimited-ammo cripple-box effect.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/Helpers/HookingHelpers.h Adds macros to support multi-instance base-class detours.
src/Effects/Player/ZWeaponRapidFireEffect.h Declares rapid-fire effect and its shared detour plumbing.
src/Effects/Player/ZWeaponRapidFireEffect.cpp Implements rapid-fire behavior via ZHM5ItemWeapon_IsFiring hook.
src/Effects/Player/ZWeaponPrecisionOverrideEffect.h Declares precision override effect with parametrized variants.
src/Effects/Player/ZWeaponPrecisionOverrideEffect.cpp Implements precision factor override around FireProjectiles hook and registers variants.
src/Effects/Player/ZRecoilModifierEffect.h Declares recoil modifier effect with parametrized variants and duration option.
src/Effects/Player/ZRecoilModifierEffect.cpp Implements recoil multiplier behavior via recoil controller hook and registers variants.
src/Effects/Player/ZPlayerOverpoweredEffect.h Adds a composite effect combining four weapon-related effects.
src/Effects/Player/ZPlayerOverpoweredEffect.cpp Registers the composite effect.
src/Effects/Player/ZMagazineUpdateModifierEffect.h Declares magazine update modifier effect with apply-target and kind enums.
src/Effects/Player/ZMagazineUpdateModifierEffect.cpp Implements bullets-in-magazine modification and registers variants.
src/Effects/Player/PlayerCrippleBoxEffects.h Removes the prior ZUnlimitedAmmoEffect declaration.
src/Effects/Player/PlayerCrippleBoxEffects.cpp Removes the prior ZUnlimitedAmmoEffect implementation/registration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Helpers/HookingHelpers.h
Comment thread src/Effects/Player/ZMagazineUpdateModifierEffect.cpp
Comment thread src/Effects/Player/ZMagazineUpdateModifierEffect.cpp
Comment thread src/Effects/Player/ZPlayerOverpoweredEffect.h
@shadow578
shadow578 merged commit 7ffa2f9 into main Jul 11, 2026
1 check passed
@shadow578
shadow578 deleted the add/new-player-effects branch July 11, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants