Add multiple Player effects - #45
Merged
Merged
Conversation
adds HookingHelpers to allow detours in base classes
redundant, also provided by ZMagazineUpdateModifierEffect
There was a problem hiding this comment.
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.hmacros 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.
…fect to the player
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
making use of new hooks in SDK 4.0.2
Checklist