Page 1 of 1

[1.1.109] blueprint not saved correctly (recursive blueprints+)

Posted: Tue Aug 06, 2024 7:08 pm
by Nexarius
The resource scanner loses all configurations.

Reproduce:
1) Make a blueprint with the resource scanner
2) Put it in the blueprint library
3) select new content for blueprint while its in the blueprint librabry
4) place blueprint

Image

Re: [1.1.109] blueprint not saved correctly (recursive blueprints+)

Posted: Tue Aug 06, 2024 7:13 pm
by Rseding91
Thanks for the report. This is an issue with the mod(s) you're using. Those values aren't part of the base game and so the base game has no concept of them.

Re: [1.1.109] blueprint not saved correctly (recursive blueprints+)

Posted: Tue Aug 06, 2024 7:16 pm
by Nexarius
It works correctly when I select new contents for the blueprint when its NOT in the blueprint library.

How is this a mod fault?

Re: [1.1.109] blueprint not saved correctly (recursive blueprints+)

Posted: Tue Aug 06, 2024 7:19 pm
by Rseding91
Because it's the mod that puts those values on the blueprint. The core game doesn't know they exist and so is doing nothing.

It's like if a pizza delivery driver shows up and gives you your pizza. Then you call the pizza place and complain they didn't also bring you the doughnuts from the doughnut shop. That's not the job of the pizza place - they just deliver pizza. If the driver also on his own wants to bring doughnuts to people - cool - but that's not something the pizza delivery place does - go talk to the driver about your doughnuts.

Re: [1.1.109] blueprint not saved correctly (recursive blueprints+)

Posted: Tue Aug 06, 2024 7:24 pm
by Nexarius
So the "new contents for blueprints event hook whatever" only triggers the mods extra values when its in the inventory and not in the blueprint library?
Why is this even 2 seperate cases?

edit:
https://mods.factorio.com/mod/rec-blue- ... 7ca7a07819

Re: [1.1.109] blueprint not saved correctly (recursive blueprints+)

Posted: Tue Aug 06, 2024 11:17 pm
by FoxLBA
Rseding91 wrote:
Tue Aug 06, 2024 7:13 pm
Thanks for the report. This is an issue with the mod(s) you're using. Those values aren't part of the base game and so the base game has no concept of them.
If I remember correctly, LuaPlayer.blueprint_to_setup returns nothing if the BP is in the BP library. Therefore, the mod does not know where to save additional information.

I can update my "workbench" to the latest version of Factorio and check again.

UPD: That's what I got.
If the BP is empty, then LuaPlayer.blueprint_to_setup returns the desired BP regardless of where it is located (in the inventory or in the library).

If "select new content" is used, then LuaPlayer.blueprint_to_setup returns (see the code below) regardless of where it is located:

Code: Select all

{
  "valid" = true
  "valid_for_read" = false
}
In this case, the mod tries to look at the last BP that the player held in his hand. If this BP is in the inventory, then additional information is stored in it.
And if the BP is in the library, then it's a failure.