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
Copy file name to clipboardExpand all lines: docs/dev/Lua API.rst
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -938,7 +938,17 @@ can be omitted.
938
938
939
939
* ``dfhack.getHackPath()``
940
940
941
-
Returns the dfhack directory path, i.e., ``".../df/hack/"``.
941
+
Returns the DFHack installation directory path (the folder where DFHack is installed).
942
+
This may be the ``hack`` folder within the DF installation, but you should not rely on this.
943
+
Specifically, the installation folder is extremely likely to be somewhere else when DFHack is installed from Steam.
944
+
Always use this function to get the DFHack installation directory path instead of hardcoding it.
945
+
946
+
* ``dfhack.getConfigPath()``
947
+
948
+
Returns the DFHack config directory path (the folder where user-specific configuration files are stored).
949
+
This is currently the ``dfhack-config`` folder within the DF installation, but you should not rely on this as it is likely to change in the future.
950
+
Always use this function to get the DFHack config directory path instead of hardcoding it.
951
+
Avoid storing this value in a long-lived variable, as it's possible that in future versions of DFHack, it may be possible for the config directory to be changed at runtime.
0 commit comments