Command Line blueprint-storage.dat Export

Enhance your gameplay with these tools. This category is also the right place for tools useful for modders.
Mod databases, calculators, cheatsheets, multiplayer, scripts, libs and other useful stuff that is not strictly in-game mods.
darklich14
Long Handed Inserter
Long Handed Inserter
Posts: 94
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: 284
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: 94
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
Long Handed Inserter
Long Handed Inserter
Posts: 73
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
User avatar
Hares
Filter Inserter
Filter Inserter
Posts: 339
Joined: Sat Oct 22, 2022 8:05 pm
Contact:

Re: Command Line blueprint-storage.dat Export

Post by Hares »

asheiduk wrote: ↑Mon Dec 21, 2020 10:22 pm 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
Unfortunately, this tool didn't work for me. Any existing alternatives?
asheiduk
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Sat Dec 05, 2020 9:46 am
Contact:

Re: Command Line blueprint-storage.dat Export

Post by asheiduk »

Hares wrote: ↑Sat Nov 25, 2023 1:05 pm
asheiduk wrote: ↑Mon Dec 21, 2020 10:22 pm 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
Unfortunately, this tool didn't work for me. Any existing alternatives?
You can file a bug/issue in GitHub if you can provide a concise example.
User avatar
Hares
Filter Inserter
Filter Inserter
Posts: 339
Joined: Sat Oct 22, 2022 8:05 pm
Contact:

Re: Command Line blueprint-storage.dat Export

Post by Hares »

asheiduk wrote: ↑Tue Jan 02, 2024 8:44 am
Hares wrote: ↑Sat Nov 25, 2023 1:05 pm
asheiduk wrote: ↑Mon Dec 21, 2020 10:22 pm 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
Unfortunately, this tool didn't work for me. Any existing alternatives?
You can file a bug/issue in GitHub if you can provide a concise example.
Already )
Post Reply

Return to β€œTools”