[51.13] Modules from scripts_modactive are not reactivated when reopening your save
Hello,
My mod have a module in the scripts_modactive directory (here's the code).
As recommended in the modding guide, it adds an entry in dfhack.onStateChange and set it to nil when the map is unloaded.
The problem is that DFHack does not reread the script when you return to the main menu and load another save. Since the state change has been removed and is never restored, the mod is broken.
To fix that, DFHack should rerun modules whenever a world is loaded. An alternative would be to give the equivalent of init.d for mods.
Thank you for your work.
Hi, I came back to this issue since it was reported by a player and I figured out the problem.
This is related to portable mode. If the game is not in this mode but has a local installed_mods, dfhack cannot find the scripts anymore. This happens when you update on Steam and I presume when you play with portable mode enabled then disable it.
Hi, I came back to this issue since it was reported by a player and I figured out the problem.
This is related to portable mode. If the game is not in this mode but has a local installed_mods, dfhack cannot find the scripts anymore. This happens when you update on Steam and I presume when you play with portable mode enabled then disable it.
This makes sense. Our logic for locating game saves is not fully synchronized with DF's logic, and so there can be problems when loading a save from the "alternate" location. I'm still working on rewriting our filesystem logic to deal with portable mode shenanigans better, but that process isn't completed yet