-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
Description
Description
Mods with identical script names cause errors. This affects both C# and surprisingly GDScript mods too. This needs to be confirmed that this is happening on GDScript mods again.
Steps to Reproduce
- Duplicate the
res://Mods/Example Moddirectory tores://Mods/Example Mod 2. - Modify the
idin themod.jsonof the new mod fromexample_modtoexample_mod_2. - Run the game.
Expected Behavior
Both mods should load and execute without errors, printing unique messages.
Actual Behavior
C# Mods
-
First Kind of Error:
An item with the same key has already been added. Key: res://valkyrienyanko/example_mod/Mod.cs- Points to: ModLoader.cs#L74
-
Second Kind of Error:
Assembly with same name is already loaded- Points to: ModLoader.cs#L73
GDScript Mods
- Console Output:
Loading C:/Users/VALK-DESKTOP/Documents/_Godot Projects/Template/GodotProject/Mods/Example Mod/mod.pck for example_mod Loading C:/Users/VALK-DESKTOP/Documents/_Godot Projects/Template/GodotProject/Mods/example_mod_2/mod.pck for example_mod_2 Hello from Mod 1 Hello from Mod 1- Expected:
Hello from Mod 1andHello from Mod 2 - Actual:
Hello from Mod 1printed twice
- Expected:
Observations
- C# scripts with the same name in different mods cause errors.
- GDScript mods with the same script names also have unexpected behavior. (needs to be looked into again)
Additional Notes
- Changing DLL names did not resolve the issue.
- Test files provided:
Relevant Issues
Conclusion
- C# modding inside the Godot engine looks like a dead end.
- C# modding how rimworld did it might be an option. (There's https://github.com/Carnagion/Modot but as of writing this it's still on Godot 3.x)
- GDScript modding in the Godot engine might be an option. (The issue described above needs to be confirmed again)
- Lua modding might be an option.
- C++ modding?
What about security concerns? How can we limit modders to only modding the game and not my System32.dll?