New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autogems UI save issue #1671
Comments
|
Does the |
|
no. I have dwarffortress install at |
|
ok. I am on linux arch OS and I used In the same folder there are symlinks to all needed files: # ls -l ~/.dwarffortress
dfhack -> /opt/dwarffortress/dfhack
dfhack-run -> /opt/dwarffortress/dfhack-run
hack -> /opt/dwarffortress/hack
libs -> /opt/dwarffortress/libs
raw -> /opt/dwarffortress/raw
stonesense -> /opt/dwarffortress/stonesense
# ... and morebut I just fixed the problem by creating a symlink: I am not sure if other linux users have same problem, or it just specific issues with arch package manager installation. |
|
Interesting. Just to make sure there aren't any other symlinks in play, does To my knowledge, DF always looks for saves in the data/save folder relative to itself (on Linux, relative to the libs folder). I am genuinely not sure how this could work without the symlink you created. Lots of things in DFHack calculate the save path in the same way, so I would try reporting this to the Arch package maintainer - I suspect the symlink you made (or a similar one for the top-level |
|
I guess the maintainer goal was to be possible to play dwarffortress by few users with my game installation, but with separated worlds.
Since now I had no problems with raw game, dfhack and soundsense. |
|
On second thought, it's possible that 56e43a0 broke it (this change was first in 0.47.04-r2, which could make sense). Basically, getHackPath() and functions it depends on, like getSavePath(), used to return the current working directory, but now return the directory containing @Ziusudra it looks like you're a maintainer of the Arch package, right? I'm not sure what the best way to fix this is, but I'd be happy to make any necessary core changes. |
|
Yes, I'm a co-maintainer. This also causes Yeah, so, the DF package makes DF multiuser by having the common game files in system folders and the user specific files in ~/.dwarffortress/ along with links to the system files. (That is an official package maintained by someone else.) The dfhack packages attempt to work with that. The only things I can think of is an option that the launcher script could invoke to tell dfhack to use the |
|
Just to clarify: the DF package works by setting the working directory to ~/.dwarffortress on startup, which causes DF to look there for all of its folders, and the non-writable folders are symlinks to corresponding folders in /opt? Does the DFHack package install any actual files in I think the best thing to do here is to look for user-writable locations ( Sorry about the number of questions - I think I have a good idea of how to do this if my assumptions are correct. There are a relatively small number of places in DFHack that deal with user-writable folders currently, but none of them are quite the same (Core.cpp alone has 3 different ways of finding a save folder!) so there is some risk here. |
This allows restoring the working directory to its original value, which may not actually be the DF root. See DFHack#1671, DFHack/scripts#152
Mostly, the
The DFHack package does much the same and it does copy some files rather than just linking. Its scripts are here. The PKGBUILD is the script that builds the package and the
So, all of DF's and DFHack's folders do exist in
Not a problem, glad to do what I can to help. |
Got it, so I should do the opposite: check in the working directory first, then in the DF root. The working directory essentially never changes on other platforms, so that should be fine.
It's not possible to load a save if the data/save folder doesn't exist, so we hopefully won't run into any issues there. The only possible one I can think of is that during world generation, the name of the region folder is determined by DF and stored in its usual place in memory, but not created until the world is saved. This is already an edge case that isn't addressed cleanly - the only change on Arch is that Glad to see that the package already handles |
|
I've changed my mind somewhat - I now think that the most straightforward approach would be to imitate the previous behavior and define the DF path as the initial working directory. It should effectively behave the same way as before 0.47.04-r2, and would hopefully fix all package-related issues like this one. The issue with exportlegends that led to 56e43a0 was that |
|
This should be fixed as of #1672 (so it'll be in r4). You can also grab an unstable build from https://dfhack.org/builds if you want to test it out, although installing it over a package manager-provided DFHack installation could be risky. |
|
I uninstalled dfhack, made a test package using It was able to successfully do I was also able to go into a fortress and change the autogems options without any error. Anyone too impatient to wait for the release can do a manual DF+DFHack install : https://dwarffortresswiki.org/index.php/DF2014:Installation#Manual_or_multiple_installations |
|
Awesome, thanks for checking! |
Hi.
Thanks for you work on DFHack, amazing tool.
I still learning new plugins and today I tried to use autogems. So, I trying to define autogems rules in the UI: o -> W -> G
I make some changes and use "Esc" to save.
In the moment the plugin seems to have a crash. Game works correctly, but I get following error in the DFHack console.
The changes in gems are not saved after all.
I am playing on Linux.
Version:
DFHack version 0.47.04-r2 (release) on x86_64The text was updated successfully, but these errors were encountered: