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 1 and Hello from Mod 2
Actual: Hello from Mod 1 printed twice
Observations
C# scripts with the same name in different mods cause errors.
GDScript mods with the same script names also exhibit unexpected behavior.
Proposed Solutions
Switch to GDScript for Mods:
If GDScript does not have the same naming conflict issues, consider using GDScript for modding.
Refactor C# Mod Loading:
Modify the mod loading logic to search for the first DLL file in the mod folder and load it. This might resolve DLL naming conflicts.
The current mod loading mechanism needs to be revised to handle duplicate script names across different mods effectively. Switching to GDScript or refactoring the C# mod loading process are potential solutions to address this issue.
Description
When creating duplicate mods with identical script names, errors occur during runtime. This issue affects both C# and GDScript mods.
Steps to Reproduce
res://Mods/Example Mod
directory tores://Mods/Example Mod 2
.id
in themod.json
of the new mod fromexample_mod
toexample_mod_2
.Expected Behavior
Both mods should load and execute without errors, printing unique greetings.
Actual Behavior
C# Mods
First Kind of Error:
Second Kind of Error:
GDScript Mods
Hello from Mod 1
andHello from Mod 2
Hello from Mod 1
printed twiceObservations
Proposed Solutions
Switch to GDScript for Mods:
Refactor C# Mod Loading:
Additional Notes
Conclusion
The current mod loading mechanism needs to be revised to handle duplicate script names across different mods effectively. Switching to GDScript or refactoring the C# mod loading process are potential solutions to address this issue.