Blueprint library architecture
Posted: Mon Oct 19, 2020 9:00 pm
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.
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.