Thanks! : ) I love working with this community!
Ok, here's a rough roadmap for blueprint. All this is
open for discussion/suggestions, but the goals I have are:
- Make it easier to generate blueprints from a map
- Capture as much map information as possible in the generated blueprints
- Improve integration with DFHack quickfort
Blueprint usabilityThis essentially comes down to adding an interactive visual interface. I'm thinking: use the cursor to select the boundaries of the blueprint area (complete with flashing blocks indicating the selected area) and then select the "start" position of the blueprint (where the cursor should be when replaying the blueprint). Other on-screen elements could allow other options to be set before the blueprint is generated.
Capture more map stateThere are lots of opportunities for improvement here. Here's a few items that I plan to cover:
- all building types (there are a bunch missing)
- multi-category stockpiles (e.g. stockpiles that have both corpses ('y') and refuse ('r') enabled)
- non-rectangular stockpiles and buildings (like farm plots)
- zones
- stockpile/building/zone names
- room configurations (size, justice settings, door settings, etc.)
- stockpile links (give/take) if within same blueprint
- stockpile top-level settings (i.e. "links only" setting and container counts)
I'd like to be able to exactly reproduce stockpile configuration with regards to which item types are enabled, but it's difficult to do. Perhaps I can integrate with the stockpiles plugin to export the configuration, but I'd need to build functionality into quickfort to be able to automatically import it again. I'll think about this more later, once blueprint is in better shape.
Quickfort integrationQuickfort supports a lot of blueprint metadata that the blueprint plugin doesn't currently provide, like descriptive comments, labels, and blueprint chains. These could be added automatically or customized with blueprint plugin commandline/gui settings.
Finally, I'd like to add a section to the quickfort user guide on how to create blueprints with the blueprint plugin and the bits of syntax you need to know to make finishing touches. A guide for creating blueprints with absolutely minimal effort.
Big questions to answer first- How important is it to keep compatibility with the original Python quickfort? Should I implement a "--legacy_mode" that generates compatible blueprints? For example, DFHack quickfort supports multi-category stockpiles, but Python quickfort does not. That feature would be disabled if --legacy_mode were specified. It would be a lot of work to consider legacy quickfort for every new blueprint feature, though, and a lot of "if" statements would be sprinkled throughout the code that make it harder to maintain. I wouldn't want to do this unless I were sure there is a good size group of people who would benefit from it.
- Should I re-implement blueprint in Lua? (beware: technical ramblings ahead) It's not that I *hate* C++, but it is a *lot* easier to add functionality in Lua than it is in C++. I knew nothing about Lua when I started quickfort, but the language quickly gained my respect for how it enabled simple and compact code. Blueprint is currently written as a C++ plugin, but there's nothing about the functionality that requires it to be a plugin instead of a native Lua script. All new GUI work would be done in Lua anyway over a C++ / Lua bridge layer. The existing logic in blueprint is minimal, so there would not be much to port. Moreover, most of the blueprint code is the database of mappings from map information to keystrokes. Quickfort already has this database, albeit keyed in reverse. I plan to factor out the quickfort database and make it usable by both quickfort and blueprint. I could still use the shared database from C++ over the aforementioned C++ / Lua bridge layer, but it would introduce a plugin -> script dependency, which is architecturally questionable (it's possible, but it would be the first dependency in that direction, and it could lead to confusion/strange bugs later since it's an unexpected dependency chain).