Page 1 of 1

[2.0.65] Script blueprinting destroys components in assembling machine

Posted: Mon Aug 25, 2025 9:39 pm
by FoxLBA
The following steps change the recipe in the assembling machine by applying the blueprint via script.

1)Load save file (I checked without mods):
script_blueprinting.zip
(829.26 KiB) Downloaded 22 times
2)Run script in console:

Code: Select all

/c game.blueprints[1].build_blueprint{surface=game.surfaces[1],force=game.forces["player"],position={0,0}}
The recipe has changed. The gears and circuits are missing in the assembling machine.

Expected behavior: Unneeded components are moved to the trash slots, just like when using a blueprint through a map.

Re: [2.0.65] Script blueprinting destroys components in assembling machine

Posted: Tue Aug 26, 2025 7:09 pm
by Rseding91
Thanks for the report however this isn't a bug. The transfer-to-trash only happens when a player does the action as it's based on the distance from the player to the entity when copying settings.

Re: [2.0.65] Script blueprinting destroys components in assembling machine

Posted: Wed Aug 27, 2025 4:04 pm
by FoxLBA
By "trash slots" I meant additional output slots:
assembler.png
assembler.png (48.17 KiB) Viewed 264 times
I expect that the items will not be lost when changing the recipe from using the script+blueprint.

The transfer-to-trash only happens when a player does the action as it's based on the distance from the player to the entity when copying settings.
In my opinion, the distance has nothing to do with it...


Here is another save with a similar setup (the difference is that there is a character next to the assembling machine):
script_blueprinting2.zip
(981.88 KiB) Downloaded 21 times
(Load the save before each test!)
Test 1: Take a blueprint from the map blueprint library in your hand and use it on an assembling machine.
Result: items that do not fit are moved to the character's inventory.

Test 2: Take a blueprint from the map blueprint library in your hand and use it on an assembling machine via the map view.
Result: items that do not fit are moved to the additional output slots in assembling machine (screenshot above).

Test 3: Run the script (from the first message) that uses a blueprint from the map blueprint library.
Result: items that do not fit are lost.