Page 1 of 1

Add export_record() or similar method to LuaRecord

Posted: Thu Jun 19, 2025 6:44 am
by PhaSelEza
Hello Factorio team,

I am developing a mod with the goal of exporting a player's blueprint library to
files, which would allow for easy backups and version control using tools like
Git.

I've found that this is not currently possible due to a limitation in the Lua
API. While a LuaItemStack for a blueprint item can be easily exported to a
string using export_stack(), there is no equivalent function for the LuaRecord
objects that represent blueprints in the library (accessed via
player.blueprints).

Could you please consider adding a function to LuaRecord, similar to
LuaItemStack::export_stack()? A method like LuaRecord::export_record() that
returns the blueprint string would be a perfect solution.

Thank you for your amazing work on the game and for considering this feature
request.

Re: Add export_record() or similar method to LuaRecord

Posted: Sat Sep 06, 2025 7:18 am
by Bilka
Okay, added LuaRecord::export_record() for 2.0.67.

Re: Add export_record() or similar method to LuaRecord

Posted: Sun Sep 07, 2025 3:22 am
by PhaSelEza
Thank you for considering adding this function. I'm really looking forward to the release.