Better filesystem storage of Blueprints

Post your ideas and suggestions how to improve the game.
Post Reply
knifeymcknifeface
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Jul 30, 2020 6:53 pm
Contact:

Better filesystem storage of Blueprints

Post by knifeymcknifeface »

TL;DR
With the new updates to blueprints, it would be great to store blueprints in a json format somewhere on disk. This would allow sharing and version control of blueprints via git/github or third party applications vs having to copy and paste JSON strings.

What ?
Right now, my understanding is that blueprints are stored in blueprint-storage.dat. I haven't taken a look at the file format, but it looks like a custom data format.

It would be great for to either

a) Store these blueprints on disk in a json format instead of the blueprint-storage.dat format
or
b) Allow users to define a directory where json files can be synced (imported/exported) with their blueprints

There are a number of things that would want to include in addition to the core functionality:

1) Ability to have blueprint books based off directory
2) Having the game recognize file changes and automatically import changes to those blueprints
3) Sorting the content in some sane way (probably based off grid positions) so that version control can be effective
4) Having the json broken out by lines (so its easier to manage in version control)
5) Have this work on a server
Why ?
For multiplayer/collaborative projects it would be awesome to use something like GitHub or GitLab to manage large blueprint libraries. It would also be awesome to be able to have third party apps interact with the blueprints and keep them up to date as the game runs.

I personally would see myself using it with a dedicated server, hooked up to a GitHub repo and using it to have a master blueprint library. If the server could pick up file changes while it runs, then I could just push new blueprints into the directory and it would just "work".

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 11176
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Better filesystem storage of Blueprints

Post by ssilk »

I like the idea of having a second blueprint format. But it would be a mess. :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

knifeymcknifeface
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Jul 30, 2020 6:53 pm
Contact:

Re: Better filesystem storage of Blueprints

Post by knifeymcknifeface »

Yea, TBH it might be best to just to have a single format (JSON), but broken out on the filesystem under a blueprints folder.

User avatar
jamiechi1
Long Handed Inserter
Long Handed Inserter
Posts: 93
Joined: Wed Jan 03, 2018 10:12 pm

Re: Better filesystem storage of Blueprints

Post by jamiechi1 »

I like the idea of having this information in some type of easy to read format, but I would prefer XML.

SoShootMe
Burner Inserter
Burner Inserter
Posts: 5
Joined: Mon Aug 03, 2020 4:16 pm
Contact:

Re: Better filesystem storage of Blueprints

Post by SoShootMe »

knifeymcknifeface wrote:
Thu Jul 30, 2020 10:51 pm
1) Ability to have blueprint books based off directory
2) Having the game recognize file changes and automatically import changes to those blueprints
3) Sorting the content in some sane way (probably based off grid positions) so that version control can be effective
4) Having the json broken out by lines (so its easier to manage in version control)
5) Have this work on a server
From #3 and #4 are you thinking of version control of parts of a blueprint? From what I've seen of the JSON, I think diffs aren't always useful as a change could update "unchanged" positions everywhere and merging changes within blueprints would often break them.

#1, #3 and #4 can theoretically be implemented now with some scripts but the required manual import/export is limiting.

With the new hierarchical blueprint books, books represented by directories and blueprints by files is a natural fit, and being able to version control that (eg by making the top-level directory a git repository) is an obvious use case to me.

An "External blueprints" tab (in addition to "My blueprints" and "Game blueprints") which is essentially a list of directory paths might be the easiest way to support this.
jamiechi1 wrote:
Sun Aug 09, 2020 5:29 am
I like the idea of having this information in some type of easy to read format, but I would prefer XML.
JSON is used for the existing blueprint import/export in Factorio, so I can't imagine XML being considered.

Post Reply

Return to “Ideas and Suggestions”

Who is online

Users browsing this forum: SirSmuggler