I recognize that blueprint strings are short so they will be easier to copy, paste, post online, etc.
I would love to have a way to "expand" a blueprint string to something like a JSON blob or lua object declaration, and then to paste that format back into the game.
The use case for this is to make the blueprint string itself directly editable, and more importantly to allow the strings to exist in source control. I want to expand a blueprint book to a github repository, and accept pull requests against it.
Alternate verbose blueprint string format
Moderator: ickputzdirwech
Re: Alternate verbose blueprint string format
https://github.com/DaveMcW/blueprint-st ... string.luaThis library helps you convert blueprints to text strings, and text strings to blueprints
Re: Alternate verbose blueprint string format
That's an internal library for turning an *actual* lua table into a blueprintstring. It doesn't help with the question of serializing a table or making the game accept serialized tables.darkfrei wrote:https://github.com/DaveMcW/blueprint-st ... string.luaThis library helps you convert blueprints to text strings, and text strings to blueprints
Re: Alternate verbose blueprint string format
This is not translatable, cause a blueprint is a kind of "program", which calls lua functions to place entities.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: Alternate verbose blueprint string format
No, it's not. A blueprint exchange string is just a gzip'd json blob describing the objects.ssilk wrote:This is not translatable, cause a blueprint is a kind of "program", which calls lua functions to place entities.
Here is the actual contents of a small blueprint, decoded:
Code: Select all
{
"blueprint":{
"icons":[
{
"signal":{
"type":"item",
"name":"express-splitter"
},
"index":1
}
],
"entities":[
{
"entity_number":1,
"name":"express-underground-belt",
"position":{
"x":-2,
"y":-2
},
"direction":4,
"type":"input"
},
{
"entity_number":2,
"name":"express-transport-belt",
"position":{
"x":-1,
"y":-2
},
"direction":4
},
{
"entity_number":3,
"name":"express-splitter",
"position":{
"x":-1.5,
"y":-3
},
"direction":4
},
{
"entity_number":4,
"name":"express-underground-belt",
"position":{
"x":1,
"y":-2
},
"direction":4,
"type":"input"
},
"item":"blueprint",
"version":64424902656
}
}
Re: Alternate verbose blueprint string format
Oh, looks, like I'm not up to date. Thanks for this hint, I cannot know everything.
Well, if that format is that simple, I don't see any need to change it. That de/compression is kind of standard in any programming language.
Well, if that format is that simple, I don't see any need to change it. That de/compression is kind of standard in any programming language.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: Alternate verbose blueprint string format
It doesn't matter how simple it is. If I give someone that blueprint string above, they need some third party tool to convert it. I want them to be able to just paste it into the game.ssilk wrote:Well, if that format is that simple, I don't see any need to change it. That de/compression is kind of standard in any programming language.