Command Line blueprint-storage.dat Export

Enhance Your Overall Game-Play.
Mod-Database, Calculators, Cheatsheets, Multiplayer, Scripts, Libs and Other Useful Stuff.
Post Reply
darklich14
Long Handed Inserter
Long Handed Inserter
Posts: 92
Joined: Sat Feb 24, 2018 3:07 am
Contact:

Command Line blueprint-storage.dat Export

Post by darklich14 »

How can I dump a list of strings from a map and/or my personal blueprint-storage.dat file? It looks like serialized JSON but I'd like to know what metadata or headers, etc precede/delimit the blueprints so I can parse it or maybe there's another option. I have dozens of blueprint-storage.dat files and no way am I loading every old revision of the game and every blueprint-storage.dat file and all interesting maps and manually exporting every string using the in-game interface. This must be automate-able!

User avatar
invisus
Filter Inserter
Filter Inserter
Posts: 282
Joined: Fri Sep 21, 2018 5:33 pm
Contact:

Re: Command Line blueprint-storage.dat Export

Post by invisus »

There was at least some discussion along these lines in a recent FFF topic, (quote below).

There is also a somewhat related topic in Ideas and Suggestions.

It seems that the more likely outcome of such a feature would be to change the storage format of the blueprint library on disk as opposed to creating an export tool/utility. However kovarex suggests below that "just making backups" should be sufficient in his eyes.
kovarex wrote:
Fri Feb 15, 2019 9:21 pm
dee- wrote:
Fri Feb 15, 2019 9:00 pm
Are blueprints and blueprint books automatically synced as individual files/directories from and to the disk?
Then I could init a Git repository there and version control all my blueprints...
:geek:
They are not (just blueprint.dat). What you say makes sense, but I'm not sure what to do with that :) A super-user option to keep blueprints in directory structure instead of a file? Well, i believe, that just making backups of the file is enough for the typical geek.

darklich14
Long Handed Inserter
Long Handed Inserter
Posts: 92
Joined: Sat Feb 24, 2018 3:07 am
Contact:

Re: Command Line blueprint-storage.dat Export

Post by darklich14 »

Thanks to your comment, I found this https://lua-api.factorio.com/latest/Lua ... port_stack

Not sure how to parse available blueprints whether in player's lib or game BPs or whatnot. Will keep digging.

asheiduk
Inserter
Inserter
Posts: 41
Joined: Sat Dec 05, 2020 9:46 am
Contact:

Re: Command Line blueprint-storage.dat Export

Post by asheiduk »

I've written a tool to decode the blueprint-storage.dat format into JSON and from there into the standard import/export string.
If you are using Linux you can give it a try:

https://github.com/asheiduk/factorio-blueprint-decoder

Post Reply

Return to “Tools”