"DFHack and Dwarf Fortress must be installed in the same Steam library"
[p]I'm sure some of you have seen this message over the past few weeks and not understood why you're getting it.[/p][p]Recently, Steam changed the way the Steam client installs applications. Specifically, Steam changed their installer so that two apps can no longer install into the same location. On the whole this was probably a good choice by Steam, since it definitely prevents one Steam app from maliciously overwriting another Steam app. However, DFHack has always relied on the ability to do this as its installation method, this is because of the way a DF extension module (which is what DFHack is) connects to DF. (And, yes, we have and have always had Bay12's explicit permission to do this.) As a result of Steam's decision here, DFHack no longer seamlessly links up with DF, which leads to the above message and makes DFHack not work, which obviously makes us all sad.[/p][p]Some people have also asked why DFHack is not a DF mod, and so I'm going to take a moment to address this. [/p][p]DFHack is not a DF mod because DF's modding system only allows the mod to provide graphics assets and text files to be parsed as DF "raws". DFHack is neither a graphics asset nor a text file to be parsed as raws, and so it cannot function as a DF mod. DF mods simply cannot do what DFHack does.[/p][p]Instead, DFHack operates as a DF extension module, which works by dropping a specifically named file in a specific location in the DF installation that DF detects during its startup and connects to if that file meets certain specified criteria. There is, at present, no way for a workshop mod to drop a file in this location, and so no workshop mod can be, by itself, a DF extension module. [/p][p]In the past Steam allowed DFHack to install in the same folder as DF, and so we could just passively use Steam's installer to drop the required file in the right location. Steam has changed their installer so this is no longer possible, so we will now instead have to use some sort of active method to put the the required file in the right location. This is actually the easy part, which is why I haven't done it yet.[/p][p]We could simply have rewritten our launcher to to find DF and copy all of DFHack into DF, creating the same situation that we had when Steam just let us install DFHack in the same location as DF, but this approach makes updating much harder (we'd have to detect when an update occurred, remove all of the old version, and install all of the new version, which is a pain) so we're not doing that; instead, we will only be copying two small files that will hopefully change very infrequently, and, being small, will be easy to copy even if they do change. On Windows, this will be completely transparent to the user; however, on Linux, players will have to manually launch DFHack once after installing DFHack for the first time. The discrepancy here is because Steam does not provide for custom install scripting in the Linux version of its client, and so on Windows we can automatically run the post-update script to find and copy into DF's folder, but on Linux the user will have to "do something" to run the post-update script, so what we're going to be doing is having the DFHack launcher check at startup if the post-update script has been run, and if it hasn't run it itself. This is the part I haven't written yet, because it's frankly easy and I wanted to save the easy part for last.[/p][p]The harder part is that DFHack has long operated on the assumption that it will live in the same folder as DF, an assumption we can no longer make. Thus, we have had to go through all of DFHack's code and rewrite every place where the code assumed that DFHack was installed in DF's folder, so as to make DFHack work no matter where DFHack is installed. At this point, I think the programming aspect of this is complete, but we still need to test to verify that it works correctly under what we hope are a sufficiently wide range of scenarios to cover the majority of player use cases.[/p][p]While this testing continues, I'm going to now go to work on the "easy" part, updating the launcher, and once both of these are done, we'll publish a PTB on Steam in our "testing" branch, hopefully in the next week or three.[/p][p]We do apologize for all the trouble this has created for players. If Steam gave us any advance notice of this change, we didn't see it, and so it pretty much caught us unawares. And as DFHack is and always has been a 100% volunteer project, we obviously have limited resources to develop, test, and implement changes, especially in a hurry. [/p][p]For the DFHack Team,[/p][p]rome of oxtrot[/p]