You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
manually invoking scripts in a scripts_modactive directory is failing #5591
The issue is that you can't explicitly invoke a mod's script from the console or the launcher. Autoload of modules does work. Autoload of modules did not work. (Autoload of scripts_modinstalledappeared to be working for another reason, see below.)
(Modules are scripts with --@module=true, per the docs.)
This applies to scripts in all mods' scripts_modactive subdirectories, but not to scripts in all mods' scripts_modinstalled subdirectories. It also applied to scripts_modactive subdirectories in the installed copy of mods.
Fallback code made it appear that scripts_modinstalled was working, but actually pre-install mods' scripts_modinstalled was being searched.
diagnostic: load a game that has at least one mod that has a scripts_modactive subdirectory:
run this command at the console: :lua @ dfhack.internal.getScriptPaths()
check if there are any lines ending in scripts_modactive, near or at the end of the output.
failing in 52.05
failing in 52.04
working in 51.08
failing in 52.03 failing worse in 52.02-r2 AppData vs portable.txt issue working in 52.01failing in 52.01 (AppData vs portable issue? need to explore further) typo?
failing in 52.02-r2
working in 52.01
Activity
SilasD commentedon Oct 4, 2025
The issue is that you can't explicitly invoke a mod's script from the console or the launcher.
Autoload of modules does work.Autoload of modules did not work. (Autoload ofscripts_modinstalledappeared to be working for another reason, see below.)(Modules are scripts with
--@module=true, per the docs.)This applies to scripts in all mods'
scripts_modactivesubdirectories,but not to scripts in all mods'. It also applied toscripts_modinstalledsubdirectoriesscripts_modactivesubdirectories in the installed copy of mods.Fallback code made it appear that
scripts_modinstalledwas working, but actually pre-install mods'scripts_modinstalledwas being searched.SilasD commentedon Oct 4, 2025
diagnostic: load a game that has at least one mod that has a
scripts_modactivesubdirectory:run this command at the console:
:lua @ dfhack.internal.getScriptPaths()check if there are any lines ending in
scripts_modactive, near or at the end of the output.failing in 52.05
failing in 52.04
working in 51.08
failing in 52.03
failing worse in 52.02-r2AppData vs portable.txt issueworking in 52.01failing in 52.01 (AppData vs portable issue? need to explore further)typo?failing in 52.02-r2
working in 52.01
SilasD commentedon Oct 4, 2025
Testing in 0.52.05-r1
Maybe traced to
script-manager.lualine 156which is comparing a relative path with an absolute path, so is always failing.
e.g. for the
vanilla_textmod:data/vanilla/vanilla_text/is compared withC:/GAMES/DWARF FORTRESS/Z5205/data/installed_mods/(Note: this particular installation of Dwarf Fortress is in
C:\Games\Dwarf Fortress\z5205.)(tested in portable mode, which probably matters.)(Portable mode does not matter. Still relative path compared with absolute path.)script-manager.lua mitigate DFHack#5591 not searching scripts_modactive
Merge pull request DFHack#5592 from SilasD/mitigate-5591