Skip to content
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

DFHack init file locations are changing #181

Closed
myk002 opened this issue Sep 14, 2022 · 8 comments
Closed

DFHack init file locations are changing #181

myk002 opened this issue Sep 14, 2022 · 8 comments

Comments

@myk002
Copy link

myk002 commented Sep 14, 2022

I wanted to give you a heads up that in order to support DFHack's work on usability and in-game configuration, the dfhack init files (dfhack*.init, onLoad*.init, onMapLoad*.init, and the others) will be moving from the DF root directory to dfhack-config/init/.

the dfhack.history file (along with all other history files) will also be moving to dfhack-config/

For the LNP, I think this means the following changes:

  • core/hacks.py will need to be updated with the new init file directory
  • the reference to <df>/dfhack.history in PyLNP.json will need to change to <df>/dfhack-config/dfhack.history

A new build of DFHack that you can use to test with is available from https://buildmaster.lubar.me/api/ci-badges/link?page=build&key=badges&$ApplicationId=3&$BinariesAvailable=true

@myk002
Copy link
Author

myk002 commented Sep 14, 2022

I linked to this issue from all the pack maintainers' threads:

Which changes need to be made in LNP and which should be made by the pack maintainers?

@Pidgeot
Copy link
Owner

Pidgeot commented Sep 14, 2022

What you mentioned would be done here, but it's up to the pack maintainers to bring in the new versions, of course. If they customize PyLNP.json, they have to make sure to carry their things over.

Rather than explicitly reference dfhack-config in those places, though, I think it'd be better to detect whether we need to use the dfhack-config folder - people might be playing older versions and I don't want to break compatibility if it's avoidable. This is easily done, since we can just register another token like the current <df>; I just need to know how I'd know.

Is there some file or folder I can rely on the existence of in builds that will use that folder for these files? I'm afraid I don't use DFHack myself, so I'm not too sure of what a normal folder would look like...

@myk002
Copy link
Author

myk002 commented Sep 14, 2022

if dfhack-config/init exists, then they're using (or at least they have used sometime in the past) a new version of DFHack that reads from that directory. It didn't exist until now.

@myk002
Copy link
Author

myk002 commented Sep 14, 2022

actually, scratch that. dfhack-config/init won't exist until DF has been run at least once with the new DFHack installed. LNP may need to know which file to edit before DF is run for the first time. You should check for hack/init, which only exists in new DFHack versions and will exist even before DF is run for the first time.

@Pidgeot
Copy link
Owner

Pidgeot commented Sep 14, 2022

That works for me. I will try to get to it this weekend, but if you want to contribute a pull request before then, feel free.

@myk002
Copy link
Author

myk002 commented Sep 14, 2022

Thanks! This weekend is fine. DFHack still has tasks we need to complete before we can spin a release. I just wanted to give you (and the pack maintainers) a good amount of lead time.

@Pidgeot
Copy link
Owner

Pidgeot commented Sep 17, 2022

For the record, this isn't in a build yet, but that should happen within a day or two.

@myk002
Copy link
Author

myk002 commented Sep 19, 2022

Thank you very much! I'll work with the pack maintainers to update (if they haven't already).

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

No branches or pull requests

2 participants