Skip to content

Conversation

@SilasD
Copy link
Contributor

@SilasD SilasD commented Oct 5, 2025

This is an attempt to mitigate issue #5591 .

The scripts_modactive and scripts_modinstalled directories of installed DFHack-enabled mods were not being searched for either auto-executing modules or manually invoked scripts.

This issue was traced to a relative path being compared with an absolute path. PR #5514 changed mod-detection path processing to use absolute paths, but the list of active mods was still being retrieved from DF's list of active mods, which contains relative paths.

This was fixed by prepending the base directory (normally a subdirectory of AppData, but in Portable Mode, DF's own directory) to these paths.

This patch has been tested in both AppData Mode and Portable Mode.

IMPORTANT! This patch has only been tested with DF Classic Windows.
It has not been tested with the Steam or Itch.io versions.
It has not been tested with any Linux versions.

It needs to be tested for all of these cases before being merged.

Testing: the DFHack Example scripts mod was used as a sample case. It was manually downloaded, as I don't have the Steam version of DF.

@ab9rf ab9rf changed the title Mitigate #5591 Fix #5591 Oct 6, 2025
@SilasD SilasD requested a review from ab9rf October 6, 2025 01:31
@ab9rf ab9rf marked this pull request as ready for review October 6, 2025 02:11
@ab9rf ab9rf merged commit c44e111 into DFHack:develop Oct 6, 2025
25 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants