Page 1 of 1

blueprint string in scripts

Posted: Sun Apr 30, 2017 10:08 am
by mophydeen
I'd like an easy api way to use blueprint strings in scripts.

eg. add a blueprint book to the "game blueprints"-frame in script.

Code: Select all

game.blueprints.add("somestring")

Re: blueprint string in scripts

Posted: Mon May 01, 2017 12:01 am
by Killkrog
I second that.
Also please give us an option to read from the library.

Re: blueprint string in scripts

Posted: Fri May 19, 2017 10:59 pm
by mophydeen
bump

Re: blueprint string in scripts

Posted: Tue Jul 31, 2018 9:52 am
by mophydeen
bump

Re: blueprint string in scripts

Posted: Tue Jul 31, 2018 10:32 am
by mrvn
Might be related to this feature request:

In factorissimo it would be great if a factory building included in a blueprint would include a blueprint for everything inside the factory building. On placement it should then also place a blueprint inside the factory building to create the contents.

Re: blueprint string in scripts

Posted: Sat Sep 29, 2018 7:29 pm
by Bilka
What exactly is the request here? Do you want to access the blueprint library, or do you want to convert blueprints from/to strings?

Re: blueprint string in scripts

Posted: Mon Oct 08, 2018 10:40 am
by mrvn
Bilka wrote: Sat Sep 29, 2018 7:29 pm What exactly is the request here? Do you want to access the blueprint library, or do you want to convert blueprints from/to strings?
Convert from/to strings.

Re: blueprint string in scripts

Posted: Mon Oct 08, 2018 11:21 am
by Bilka
mrvn wrote: Mon Oct 08, 2018 10:40 am
Bilka wrote: Sat Sep 29, 2018 7:29 pm What exactly is the request here? Do you want to access the blueprint library, or do you want to convert blueprints from/to strings?
Convert from/to strings.
This is already possible through https://lua-api.factorio.com/latest/Lua ... port_stack and https://lua-api.factorio.com/latest/Lua ... port_stack.

Re: blueprint string in scripts

Posted: Mon Oct 08, 2018 2:58 pm
by eradicator
Regrettably that requires a stack, so it's impractical to use when all you want is the list of entities/settings. I think 0.17 was going to have a decoding operation blueprint_string → blueprint_table?
Along that line it would be kinda neat to have the option to build a blueprint without a stack...or: How realistic would it be to allow lua scripts to create stacks that don't exist in the world, just to be manipulated via script for things like this?

Re: blueprint string in scripts

Posted: Fri Nov 02, 2018 11:18 am
by Killkrog
Bilka wrote: Sat Sep 29, 2018 7:29 pm What exactly is the request here? Do you want to access the blueprint library, or do you want to convert blueprints from/to strings?
I'd love to be able to access the blueprint library via API, as I already described in detail here. Noone ever bothered to answer though...