Page 1 of 1

Blueprint library architecture

Posted: Mon Oct 19, 2020 9:00 pm
by raiguard
During a lengthy discussion on the mod-making channel of the Factorio Discord, several problems with the current blueprint library implementation were brought up. While the BP library works great for users (I've thoroughly enjoyed using it while playing and think it is a huge step forward from the old one), it is absolutely not a good thing for modders. Now there is an entirely new category of blueprint object that mods have no access to, and while a few capabilities for it are being added in 1.1, it's still a strangely disjointed and disconnected system.

The epiphany that we came to is that the BP library works almost exactly like a standard blueprint book, with just a few surface-level differences. In fact, it would be quite possible to create a mod to have a custom BP library implementation that uses a blueprint book in a script inventory as the "library". Then the BP book's string could be synced to an invisible per-player setting, and if the "separate mod settings per save" option is disabled, the "library" can cross save files. A separate blueprint book could be stored in a shared inventory to emulate the game blueprints tab. The only thing that this solution doesn't allow for is blueprints on the quickbar.

My proposal is that the game switches to using a similar system. Do away with the blueprint "records" and bring everything back under one umbrella. Use a customized blueprint book in an invisible inventory as the "library" and use a similar system to mod settings in order to sync it across save files. This way, the implementation can be simplified, mods can have full access to read and write the library, and we would still get all of the new features that came with the new library (updating contents, upgrade/decon planners, etc.).

At least, theoretically.

Thank you for reading!

Edit: not sure if this should be here in Ideas and Suggestions, or in Modding Interface Requests.

Re: Blueprint library architecture

Posted: Mon Oct 19, 2020 9:32 pm
by raiguard
Are very least, the main problem is that if the player is holding an object in the library, mods can't read from or write to that object. This post was a very long-winded way of saying that. The entire problem (for me, anyway) could be solved if the thing that the player is holding was always an item, instead of having two different versions of the same thing.

Re: Blueprint library architecture

Posted: Wed Apr 03, 2024 10:36 pm
by VADemon
Hyper mega super bump! I don't understand why there is /delete-blueprint-library <player> but no way to know which player imported a huge library of crap. That'd be one way to grief multiplayer servers, huge imports to bloat map size, and there's no way to clear stale blueprints or do anything with the per-player (imported)/game Blueprint library via API.