Page 1 of 1

Support for blueprint parameters

Posted: Thu Nov 06, 2025 1:23 pm
by mrvn
TL;DR
Support blueprint parameters in LuaRecord, LuaSurface and Events.
What?
LuaRecord.build_blueprint and LuaRecord.create_blueprint lack a parameters option.
LuaRecord lacks get_blueprint_parameters and set_blueprint_parameters.
LuaRecord lacks get_blueprint_name and set_blueprint_name.
LuaSurface.create_entities_from_blueprint_string lacks a parameter option.

There seem to be no event for a blueprint being placed and the entities themself have no access to the parameters used to create them. In short: How is a mod supposed to read what parameters choices the user made to place a blueprint?
Why?
PersistantBlueprints is a mod that has a laboratory surface for testing and planning where the player is isolated from the rest of the game and in god mode. Constructs build there can then be transferred as blueprints to the real game with the additional feature that the blueprint includes a special PersistantBlueprint entity to remember where and how the blueprint was placed. Changes to the template in the lab are then also made (again via blueprint) to the placements of the blueprint in the real game. The placed blueprint thus become persistant. Changes made at the source are reflected in the placed instances.

While finally updating this for 2.0 I want to also support blueprint parameters. My lab has many builds that are identical except for the recipe and/or train station programming. Instead of reinventing the wheel and implement my own parameters I would rather like to utilize the blueprint parameters already in the game.