Skip to content
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

[ModAPI - v5 and v5u] Using a mod that replaces entire game logic doesnt unload properly when disabled. #270

Open
LittlePlanetCD opened this issue Jun 30, 2024 · 2 comments
Labels
bug Something isn't working modAPI

Comments

@LittlePlanetCD
Copy link
Contributor

LittlePlanetCD commented Jun 30, 2024

If a mod replaces the entire game logic using DisableGameLogic and a provided Game dll file with it, ModAPI will fail to unload the mod Game code if the mod is disabled, and not load the original game code from where RSDKv5(u) is located. It can result in the engine crashing in some instances, or somehow loading with the mod code in an unstable manner.

This does not affect GameAPI mods, only full Game logic replacements.

@LittlePlanetCD LittlePlanetCD added bug Something isn't working modAPI labels Jun 30, 2024
@thesupersonic16
Copy link
Member

Can you provide the exact steps you took to produce the issue? I am not really seeing any issues with loading and unloading games as mods with and without an embedded game.

When the modloader fails to unload, does the engine still continue to load scenes with no game logic? and does the mod DLL unload from the process? This can be checked using Visual Studio's Modules window.

@LittlePlanetCD
Copy link
Contributor Author

Can you provide the exact steps you took to produce the issue? I am not really seeing any issues with loading and unloading games as mods with and without an embedded game.

The basic steps to reproduce a part of this issue are basically this:
Have a mod that makes a lot of changes as a Game.dll replacement (Sonic Mania Addendum, as an example)
Load mod, close engine, load engine and the mod on startup
disable mod once sega screen appears, if the game somehow loads it'll be in a bugged state of using the mod code instead of the normal Mania / OG game logic. if it doesnt somehow work, the engine most likely crashes.

here's an image example, where I loaded a Game.dll replacement that had removed some code to not render certain Mania UI elements, and its still active even after disabling the mod.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working modAPI
Projects
None yet
Development

No branches or pull requests

3 participants
@LittlePlanetCD @thesupersonic16 and others