-
Notifications
You must be signed in to change notification settings - Fork 39
Add TitaniumBullets mod(shoot through walls) #241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
- Add TitaniumBullets plugin sources under Mods/\n- Wire mod into top-level CMake MODS list\n- Document mod in root README
Add TitaniumBullets mod
|
this will allow us to shoot through walls ? |
|
Merge it |
Yes it would, it is adapted from a mod that used Simple Mod Framework. |
OrfeasZ
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, thanks for this!
Judging from the description of the PR and the code, I'm guessing a big chunk of this was written by an LLM. While this is something I'd ask regardless, it's even more important if that's the case: please carefully and thoroughly test its behavior, especially around possible edge cases like map reloads and switches, cross-map loading, online / offline mode switching, etc.
Another thing to note is that in case ApplyRepositoryPatch fails to patch for whatever reason (e.g. because the guids change after an update), it will keep trying to re-patch on every frame. I'm not sure if this is intended behavior, and could hurt performance.
…ch-01 fix: refine TitaniumBullets mod
I have made the modifications, also I have tested the mod, there hasnt been any kind of interference or crashes on any of the features i have combined it with, unless I missed something, and if that is the case perhaps if you have time you could run a field test yourself. @OrfeasZ |
There was a problem hiding this comment.
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 adds a new TitaniumBullets mod that enables bullet wall-penetration by patching the in-memory pro.repo repository at runtime. It ports the functionality of the Simple Mod Framework (SMF) TitaniumBullets mod to a native ZHMModSDK plugin to avoid conflicts and crashes when used with other mods.
Key changes:
- Implements runtime repository patching to swap
AmmoConfigentries to a penetration config - Provides toggle functionality with automatic restoration of original values when disabled
- Includes a debug UI for troubleshooting and manual patch control
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
Mods/TitaniumBullets/Src/TitaniumBullets.h |
Header file defining the plugin class with state management and scene clear detour |
Mods/TitaniumBullets/Src/TitaniumBullets.cpp |
Implementation of repository patching logic with fast-path and fallback approaches, UI integration, and scene lifecycle management |
Mods/TitaniumBullets/CMakeLists.txt |
Build configuration for the new mod |
Mods/TitaniumBullets/README.md |
Documentation explaining usage and implementation details |
CMakeLists.txt |
Adds TitaniumBullets to the list of compiled mods |
README.md |
Updates main README with TitaniumBullets entry in the mods table |
ZHMModSDK/Src/ModSDK.cpp |
Minor whitespace formatting fix (removes trailing space) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@OrfeasZ I might add, that I experienced some crashes, but I dont think they are mod related, since i didnt experience them until I added a new NVMe ssd and it seems to overhead so i turned on the link state power management to maximum power saving in order not to experience overhead crashes until my cooler arrives or find a more permanent solution. The crashes usually happened if i alt tabbed while in loading screen(i created this mod for myself since im still doing the freelancer challanges, 2500 members killed and 500 leaders killed, and 100 campaigns completed, so i finish everything in seconds, and even with this, im 3 days into it and im not even at half of it, and it usually takes 1-1.5 mins(along with loading screens) to clear each stage). Yes most part was written by Codex, but it was curated, as per your advise, though i didnt experience any kind of speed latency or hard load due to inefficient searches, i switched to faster data structures, so yeah when you have time please do review it. (Started contribuiting, since for so long i only leeched, and never shared what i did, perhaps it might not be perfect, but if it was me in the past struggling with this repetitive challange and would have had no idea how make it easier, id have really appreciated somebody that shared their mod). |
Add TitaniumBullets(shoot through walls), plugin sources under Mods.
It is adapted from a mod that used Simple Mod Framework because through Simple Mod Framework it would cause crashes if used with other mods.
Summary
Adds a new sample mod/plugin, TitaniumBullets, implemented as a native ZHMModSDK plugin (no Simple Mod Framework dependency). It enables bullet wall-penetration by patching
AmmoConfigentries inside the in-memorypro.reporepository at runtime, and exposes a menu toggle + optional debug UI.Motivation
The original TitaniumBullets mod is commonly shipped via Simple Mod Framework (SMF). In my setup, SMF-based repository patches can be unstable / conflict when combined with other tools or mods. This PR ports the same behavior to ZHMModSDK’s runtime patching approach so it can be used alongside other ZHMModSDK plugins.
Implementation details
[assembly:/repository/pro.repo].pc_repoviaGlobals::ResourceManagerand waits forRESOURCE_STATUS_VALID.AmmoConfigto the penetration config ID:87ae0524-2f22-4fe0-82e1-84a050b43cf0.AmmoConfigvalues and restores them when the mod is disabled (safe to toggle).ZEntitySceneContext_ClearScene) to reset internal state so the patch can re-apply cleanly after mission/scene changes.Testing
Reference