simple df mod initiative

· by Alli Grant · Read in about 3 min · (529 Words)
dwarf fortress modding

Dwarf Fortress is, hands down, one of my favorite games of all time. For all of its various faults about its interface, difficulty, and learning curve I still wind up spending a substantial part of each year playing the game to enjoy what has been added since my last attempt–usually resulting in a hilarious loss of a fortress or two, such as my most recent learning experience that goblins can now climb walls.

That was Fun.

As much as I enjoy playing DF without mods, though, there’s a few small quality of life things that I find myself re-writing and adding into the game every single time I pick it up after a fort or two. Most of them are to increase the viability of doing otherwise impossible embark sites, such as on a glacier, and I’m sure they don’t appeal to everyone. With that said, Dwarf Fortress modding is both wonderful and a horrid disaster. Dwarf Fortress’s game data is primarily stored in its raws folder, which is a homebrew data format based on some filename redundancy and, from what I can tell, tragedy. You just write your changes into those raws and the game will see them on the next world you generate. Most changes can be completely additive, though to enable your additive changes requires putting things into one or two centralized entity definition files.

Fortunately, a few projects such as the Lazy Newb Pack (PyLNP) have sprung up to make the installation of mods easier than hacking them together. They still suffer from the fact that the raws format is very loose, but more importantly, they suffer from the fact that no one seems to be writing or sharing smaller mods. Every modder seems to be of the belief that it’s best to throw as much as you can into one, since merging mods is difficult, which… only serves to make this more difficult. This led me to a few things, starting with my small mods.

Rock Bins and Expanded Glass Works are the first of several mods that I’m writing with the intent that you could enable them on basically any copy of Dwarf Fortress, as long as you still have Dwarf as an entity. I’m sure this is going to hideously backfire at some point, when I try to do a small mod that needs something from another one of my small mods, but Dwarf Fortress does some very minor deduplication of recipes as it is. I’m also planning to expand which soil types can be used for sand and clay, potentially add in «hempcrete» as a building material, and potentially add a small series of training workshops for various hard to train skills.

I’ve also been brainstorming ideas for writing a conversion between raws and JSON. JSON patching is trivial compared to «hope that you can find the line before/after that matches» making up the best you can typically do in raw mergers. Alternatively, I might just go down the path of trying to look at the objects and intelligently merge them (mod adds permitted_reaction? It goes with the others), but really, that’s practically an intermediate step to JSON conversion and back.