Skip to content

Mod loader#453

Draft
qwertyquerty wants to merge 59 commits into
mainfrom
mods
Draft

Mod loader#453
qwertyquerty wants to merge 59 commits into
mainfrom
mods

Conversation

@qwertyquerty
Copy link
Copy Markdown
Collaborator

No description provided.

@encounter encounter added the Enhancement New feature or request label Apr 20, 2026
Comment thread include/dusk/mod_api.h
Copy link
Copy Markdown
Member

@PJB3005 PJB3005 left a comment

Choose a reason for hiding this comment

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

Didn't review the hooking code or any of the build stuff yet

Comment thread cmake/dusk_imgui_ctx.cpp Outdated
Comment thread include/dusk/mod_api.h Outdated
Comment thread src/dusk/imgui/ImGuiMenuTools.cpp
Comment thread src/dusk/gx_helper.cpp Outdated
Comment thread src/dusk/hook_system.cpp Outdated
Comment thread src/dusk/mod_loader.cpp Outdated
Comment thread src/dusk/mod_loader.cpp Outdated
Comment thread src/dusk/mod_loader.cpp Outdated
Comment thread src/dusk/modding/mod_loader.cpp Outdated
Comment thread src/dusk/mod_loader.cpp Outdated
@PJB3005 PJB3005 marked this pull request as draft May 14, 2026 18:44
PJB3005 and others added 28 commits May 15, 2026 21:01
Probably necessary if we're gonna be replacing game files etc
Mods can now replace DVD files with contents of their "overlay" folder

(I'll update the docs later when I do a full pass and make non-code mods
more of a first-class citizen)

Fixes #1306
Each mod must have a unique ID
Allows us to re-enable PCH on RmlUI. We'll likely need to rethink how this works anyways IMO.
…registered CVars.

Now we store the raw JSON value in memory for unregistered CVars.

Intended to be used for mod CVars, as we obviously can't statically define all of those.

CVar names are now stored as an std::string, so the lifetime is easy to manage when dynamically registered.

CVars cannot be moved/copied anymore. We had some code that was accidentally relying on this, and I fixed that.
We now register a CVar for mod enablement for each mod.

Also made LoadedMod stored in unique_ptr because we keep pointers to them already, and I'm entirely uncomfortable with keeping pointers to the vector directly.
This was for the code mods toggle before I moved the checking logic to CMake.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request Mod Support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants