How to access the curently configured blueprint

Place to get help with not working mods / modding interface.
Natha
Filter Inserter
Filter Inserter
Posts: 276
Joined: Sun Mar 15, 2015 1:48 pm
Contact:

How to access the curently configured blueprint

Post by Natha »

How to access the ItemStack or Record holding the blueprint configured in on_player_configured_blueprint?
It's not blueprint_to_setup or cursor_stack
Osmo
Fast Inserter
Fast Inserter
Posts: 108
Joined: Wed Oct 23, 2024 12:08 pm
Contact:

Re: How to access the curently configured blueprint

Post by Osmo »

It can be in the cursor_stack, but doesn't have to. It could be in the cursor, but also in inventory, or in another entity.
What i'm think of for the solution is in the on_gui_opened event, if the opened gui is of type blueprint, save the blueprint that you can get from player.opened, and if the player configures the blueprint, that would be the one. I'm not aware of any way apart from scripts to modify blueprints without opening the gui.
Natha
Filter Inserter
Filter Inserter
Posts: 276
Joined: Sun Mar 15, 2015 1:48 pm
Contact:

Re: How to access the curently configured blueprint

Post by Natha »

Osmo wrote: Thu Jul 31, 2025 4:02 pm It can be in the cursor_stack, but doesn't have to. It could be in the cursor, but also in inventory, or in another entity.
What i'm think of for the solution is in the on_gui_opened event, if the opened gui is of type blueprint, save the blueprint that you can get from player.opened, and if the player configures the blueprint, that would be the one. I'm not aware of any way apart from scripts to modify blueprints without opening the gui.
I hoped this would help, but player.opened is not available anymore during the on_player_configured_blueprint event.
Osmo
Fast Inserter
Fast Inserter
Posts: 108
Joined: Wed Oct 23, 2024 12:08 pm
Contact:

Re: How to access the curently configured blueprint

Post by Osmo »

Natha wrote: Fri Aug 01, 2025 5:34 pm player.opened is not available anymore during the on_player_configured_blueprint event.
Because by that point the GUI is closed. In the previous message i said save it in on_gui_opened event, and by that i meant write it to storage, and then read it from storage in the on_player_configured_blueprint event
Post Reply

Return to “Modding help”