[2.0.15] Quality change ignored when placing parametrized blueprint
Posted: Sun Nov 17, 2024 2:52 pm
by RanaPeluda
It has happened to me when copying electromagnetic plants and assigning a parameter to the recipe. When using the blueprint and changing the parameter to another quality, it does not accept it and assigns the quality with which it was copied.
Yeah, there are some weird interactions between quality and parameter system. I've tried to recreate your problem in 2.0.16 and it would appear that instead of just ignoring the quality you select later it simply doesn't show you the quality selector at all. I've tested it a bit more and here's what I found out.
This is what happens in 2.0.16:
So, what's going on here?
1. If you build a machine and select a normal quality recipe, then blueprint it and parametrize the recipe, the default parameter shows the icon without quality and when you click to change it, you can select signal & quality.
2. If you change that signal to a parameter and select a different quality, the parameter quality is properly shown in the "value" field.
3. Using that blueprint and placing it gives you the option to select the parameter value (recipe), but without quality - the quality selected on the parameter is used.
4. Now we get to the weird part. If you blueprint a machine with higher-than-normal quality and parametrize that blueprint, the default recipe parameter value doesn't show the quality, but clicking on it to change it doesn't give you the quality selector - you can select any signal, but it will always show in the "value" as no-quality, and it will actually use that blueprint's starting recipe quality. Placing the blueprint will also not give you the quality selector.
I've downloaded 2.0.19 and it looks to be doing the same thing as 2.0.16, with quality not being shown on the value field and quality selector not letting you choose different quality on parameter if copied recipe had above normal quality.
Re: [2.0.15] Quality and parameters in blueprint
Posted: Mon Nov 18, 2024 6:34 pm
by Nyghtbrynger
That is indeed the case. There is a limit to how parameterising works. I expected for a quality item to be its own separate recipe
Here you can see me try to bypass the issue by creating a new blueprint per quality level.
11-18-2024, 19-27-47.png (1.61 MiB) Viewed 325 times
here there is my blueprints. i need to create one per quality level because a quality item isn't even its own kind of item that would set all parameters to the right recipe or filter.
11-18-2024, 19-29-27.png (586.36 KiB) Viewed 325 times
Yeah, the quality level is set at the blueprint creation be it for assemblers or inserters' filters.
11-18-2024, 19-31-01.png (302.21 KiB) Viewed 325 times
Here is an example of assembler where I input Qual Module III - Legendary quality as a recipe
Re: [2.0.15] Quality and parameters in blueprint
Posted: Tue Nov 19, 2024 7:30 am
by marfenij
RanaPeluda wrote: ↑Sun Nov 17, 2024 2:52 pm
It has happened to me when copying electromagnetic plants and assigning a parameter to the recipe. When using the blueprint and changing the parameter to another quality, it does not accept it and assigns the quality with which it was copied.
I'm also get this weird situation when trying parametrize blueprint with EM. Seems all break when some of item use another quality. I'd change mine blueprint manually and it begun work like an assembly
I've run into this issue in 2.0.20 as well.
One blueprint has parameter 0 set the quality I select in the popup, one other seemingly identical one does not.
I was also messing about with decoding and re-encoding blueprints, so I assumed that's where my issue is. Now i'm not sure.
This blueprint does take the quality in account (Not by own blueprint btw):
Re: [2.0.15] Quality change ignored when placing parametrized blueprint
Posted: Fri Nov 29, 2024 7:47 am
by macdjord
I suspect this is the side-effect of an intended - and honestly quite useful, if poorly documented and explained - behaviour. Namely, the ability to make a blueprint that refers to a given item at multiple quality levels. For instance, I have a blueprint that I use to build a set of 5 storage chests with logistics filters set to different quality levels of the same item.
I'm guessing the way they made that sort of thing possible was by making it so that, any place in a blueprint that the parameterised signal appears with normal quality, it gets replaced by the signal and quality level selected when placing the blueprint, but any place the parameterised signal appears with a higher quality, the signal gets replaced but the quality does not. Which works most of the time, but results in confusing errors if someone does something unexpected:
If you blueprint an existing build that uses a signal of non-normal quality, then parameterize that signal, then place the blueprint and select a different quality level, you will unexpectedly get the original quality level.
If you place a blueprint that uses multiple different quality levels, but select a quality level other than normal when placing it, your selected quality level will replace the original everywhere the original value was normal, but not elsewhere.
The way I see it, there are two use-cases here:
A blueprint that deals with an item at a single quality level, and the user is supposed to select the item and quality level they want when placing it. E.g. a parametrized blueprint that includes an assembler, set to build a certain recipe, along with a requester chest to order the ingredients.
A blueprint that deals with the same item at a multiple quality level, and the user is supposed to select the item, but each appearance of the item should use the pre-selected quality level. E.g. a parametrized blueprint that includes multiple assemblers, set to build the same recipe at different quality levels, and to automatically quality-sort the outputs and recycle the lower-quality versions.
A better solution, thus, would be to explicitly separate these two use cases into different types of parameters:
Item-and-quality parameters allow the user, when building the blueprint, to select a signal and a quality value, and the selected signal and a quality replace the parameter everywhere it appears.
Item-only parameters allow the user, when building the blueprint, to select a signal, but not a quality - that part of the interface is greyed out - and the selected signal replaces the parameter everywhere it appears but takes on the quality level that appeared there in the blueprint.
The user can select which type of parameter it is using a checkbox on the blueprint parameterization screen. The default value can be inferred by looking at whether the signal in question appears at multiple quality levels in the blueprint.
Re: [2.0.15] Quality change ignored when placing parametrized blueprint
Posted: Fri Nov 29, 2024 8:48 am
by jouki
It can be confusing but it's not a bug (perhaps a poor design) but briefly said - in the case of common quality you can parametrise the quality. If you copy an item with higher quality (than common) the quality can't be parametrised and it's "hardcoded" to the quality you set in the machine.