On the DFHack side of things, has there been (or are there any plans to) changes to the persistent storage stuff? Previously I was using that heavily, but I moved to mixing it with writing/reading a basic JSON file when the game was saved/loaded. Wondering if I should keep doing that or if I should go back to using the persistent storage, or if I should use a completely different system?
We implemented a persistence API some time ago (in DFHack 0.44.12-r3), using JSON written to a cosave file in the game folder.
Awesome, sounds like it basically just does what I was doing already, so it's nice that there is an API for it now.
Yes, internally, DF works about the same (for the most part).
Regarding DFHack, persistent storage itself hasn't changed much, but the way plugins and scripts keep state has changed a bit. There is a much stronger push for tools to persist the state that players set while playing. The rallying cry is "initless", since the idea is to allow players to use DFHack tools effectively with zero init file editing (though init files still work if that's how the player wants to do things). As part of this effort, scripts have gained a way to automatically re-enable themselves according to their saved state. Before, a player would have to explicitly run a script (either manually or from an init file) before the script would have a chance to check any saved state. This prevented scripts from automatically reloading their state and continuing where they left off.
Now, scripts have a standard way to load state and set hooks at DF startup like plugins have always enjoyed: https://docs.dfhack.org/en/latest/docs/dev/Lua%20API.html#enabling-and-disabling-scripts
In UI news, the DFHack widget library is getting an overhaul. Two overhauls, actually. The current widget library is getting a lot more mouse support, like dragging, resizing, and being able to scroll the widget under the mouse cursor with the mouse wheel.
We're also working on an entirely new widget API that will allow much more "professional" UIs. This is still in the experimental phase, but it's coming along nicely.
Another big advancement is the DFHack overlay, which allows you to easily inject information and functionality into existing viewscreens. See https://docs.dfhack.org/en/latest/docs/dev/overlay-dev-guide.html
So, fun times ahead for modders : )
Interesting, so it sounds like I should do some real digging into the changes, from a cursory glance it seems a lot of the more esoteric things I was doing are now available through actual hooks and API interfaces. Should greatly simplify a lot of things, and hopefully make what I was doing more consistent.
The widget library overhaul also sounds very nice, so I am definitely just going to scrap all the stuff I was doing that was UI based, and come back to it once the changes move out of the experimental stage (or maybe I'll play with the experimental stage a bit).
Guess it's time to dust off the ol' lua scripting hat