Tracker: Godot 4.x support with class_names
I'm building a game for a tutorial series I am developing with Godot 4.0 and I am interested in adding godot mod loader to it. However, I found that it was not available for Godot 4.0. Is anyone planning on porting it? Thanks,
there are plans for it already, but since no game release on steam that is currently interested in modding uses godot 4, it isn't a priority
I've created a branch for it, you can follow development: https://github.com/GodotModding/godot-mod-loader/tree/4.x
I've created a branch for it, you can follow development: https://github.com/GodotModding/godot-mod-loader/tree/4.x
Thank you!
Looking forward the port!
base version is in, now it just needs extensive testing to see if everything is working as expected
I'm also interested in using this great plugin for my game in G4
I will also use this for a game I am developing with Godot 4.
So far the only Godot Modding plugin that supports Godot 4 that i could find (outside of the branch that was created: https://github.com/GodotModding/godot-mod-loader/tree/4.x) is this: https://github.com/KoBeWi/Godot-Universal-Mod-Manager
Yep. But gumm will have the exact same problem, since it also uses take_over_path to mod scripts - just like we do
Update about the 4.x Loader
- The 4.x branch is now on par with the main branch (v6.2.0).
- We currently have one massive blocker, there is a bug that prevents extending a named class after it has been taken over with
take_over_path. - We reported this bug and opened a PR with a possible fix:
- https://github.com/godotengine/godot/issues/83542
- https://github.com/godotengine/godot/pull/84148
- There is hope that it will be fixed with version 4.3.
What does this mean for the current 4.x branch?
- For most games, the ease of use of the 3.5 loader is gone.
- The game dev or modder interested in using the current 4.x loader version has to ensure that a named class is only extended once.
- This can be achieved by creating an "API Mod" that all other mods use.
- Some experiments to make this process easier are here:
- https://github.com/GodotModding/godot-mod-loader/pull/347
- https://github.com/GodotModding/godot-mod-tool/pull/105
- (I dropped the development on this to focus on finding the issue in the engine, but let me know if anything seems interesting)
- So just free-form modding with 4.x will currently most likely end up crashing your game with more than 1 mod installed.
Anything else?
- Yes, https://github.com/GodotModding/godot-mod-loader/issues/345
-
"Parser Error: Class "ClassName" hides a global script class."I think the only reason why this works in Godot 3.x is that there is no check for that there. So we have to scrap the script saving in 4.x or come up with a solution to save them without triggering this parse error.
renamed since the mod loader (4.x branch) can be used as normal as long as no class_names are used - as proven by Windowkill
The current 4.x branch has mod hooks implemented, and class_names are now supported 🎉
The 4.x branch and mod hooks are still in active development, so things might change. Documentation is currently being worked on. For now, the comments in ModLoaderMod explain the basics.
Scripts with class_name still can't be extended using take_over_path / script extensions. As a workaround, we introduced Mod Hooks in #408. More details can be found on the Wiki.
Closed by #408