Page 1 of 1
Add blueprint via mod?
Posted: Sat Apr 07, 2018 7:04 pm
by deer_buster
I "think" it can be done, but is there any way to provide a specific blueprint to the player via a mod?
Re: Add blueprint via mod?
Posted: Sat Apr 07, 2018 8:03 pm
by DaveMcW
Code: Select all
/c log(serpent.dump(game.player.cursor_stack.get_blueprint_entities()))
This dumps the blueprint source code to your log file. Then you can paste the source code into your mod.
Code: Select all
blueprint.set_blueprint_entities({{entity_number=...)
Re: Add blueprint via mod?
Posted: Sun Apr 08, 2018 2:06 am
by deer_buster
that will be a huge mess. Can I do something with like a .dat file?
Re: Add blueprint via mod?
Posted: Sun Apr 08, 2018 2:49 am
by Nexela
http://lua-api.factorio.com/latest/LuaItemStack.html
import_stack and export_stack
As well as manually building blueprints with set_/get_blueprint_entities()