Hi, this is one of those that straddles the bug/annoyance dividing line.
Recipes with just one item result in the results table produce very confusing tooltips when probabilities are involved.
This is what I consider correct behaviour, when there are 2 or more results - the recipe is labelled correctly, the products and their average chance of being produced are all shown, the ingredient is shown, the localised description is shown:
This is what you get when there's only one result:
Three issues:
1. This recipe actually produces between 0 and 5 stone. It's not "2.5 x furnace disassembly", it's only 1x the recipe, but it produces on average 2.5 stone.
2. But the stone isn't actually shown anywhere. The "Products:" display is missing. You have no idea what item the recipe is likely to produce.
3. The recipe description is missing.
[0.16.34] Single-result probability recipe tooltips
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: [0.16.34] Single-result probability recipe tooltips
I think this is happening because of an assumption that if a recipe only has one result, then the icon, description etc. will be of that item. For example, transport belts - it's a recipe to craft transport belts so the icon is a transport belt and the tooltip header says "2 x Transport belt" etc. Makes total sense. The recipe doesn't even define its own icon or description, it all just defaults to the product.
But it breaks when the recipe has an explicitly specified name, icon, description etc.
Example mod attached, compare the transport belt disassembly recipe (two results, correct) to the wooden chest disassembly (one result, confusing).
But it breaks when the recipe has an explicitly specified name, icon, description etc.
Example mod attached, compare the transport belt disassembly recipe (two results, correct) to the wooden chest disassembly (one result, confusing).
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: [0.16.34] Single-result probability recipe tooltips
The numbers are also a bit weird. I have a recipe that only produces one item, but it's shown as 100 ingame:
Code: Select all
products = { --also why is it products and not results in the api :P
amount_max = 1,
amount_min = 1,
name = "er-waypoints:waypoint",
probability = 100,
type = "item"
}
Re: [0.16.34] Single-result probability recipe tooltips
Thanks for the report however I have no idea what you're actually asking to have fixed.
If you have only a single product the game won't show "products" because it's assumed the name shows what it produces. If you override the name to not show the products then it's not going to show the products. You can use the "always_show_made_in" to force it to always show what it makes.
The probability system will show the average result for anything that produces between a range - that part is working correctly.
If you have only a single product the game won't show "products" because it's assumed the name shows what it produces. If you override the name to not show the products then it's not going to show the products. You can use the "always_show_made_in" to force it to always show what it makes.
The probability system will show the average result for anything that produces between a range - that part is working correctly.
If you want to get ahold of me I'm almost always on Discord.
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: [0.16.34] Single-result probability recipe tooltips
And it's that assumption that's causing the issue, because it's invalid in these use cases. This isn't a generic "make item X" recipe. It's a situation-specific lossy way of getting something and it comes with a risk. It needs to be differentiated from "make a brick" or "build a machine". There are plenty of precedents for this in the vanilla game - e.g. Kovarex process, oil processing - it's just that none of them have a single result.Rseding91 wrote:If you have only a single product the game won't show "products" because it's assumed the name shows what it produces. If you override the name to not show the products then it's not going to show the products. You can use the "always_show_made_in" to force it to always show what it makes.
The probability system will show the average result for anything that produces between a range - that part is working correctly.
I'm not "overriding the name". I'm giving the recipe a name. All recipes have names, it's just that they default to the result name in most cases where there is only one result. The fact that 2+ result recipes are already treated completely differently indicates that there is some ambiguity here. Even if I renamed the recipe "Turn a furnace back into stone", it still wouldn't show the stone and it would still say "2.5 x Turn a furnace back into stone". If I just called the recipe "Stone" and gave it the icon for stone then it would be much less clear what this recipe does and it would not look any different from any other way of making stone, which is why I gave it a specific name, icon and description in the first place. The basic issue is that for one result and only one result, things I specify in the recipe are being ignored. If I didn't want them then I wouldn't have specified them.
always_show_made_in doesn't work for this purpose, it's actually enabled in the screenshots above. It shows the machines it can be made in at the bottom, and that's it.
To clarify what I'm asking to have fixed:
1. If recipes only have one result and also have a specific localised name specified, then the tooltip should not prefix the name with the number of results (averaged or otherwise). If you want the number of results shown in a localised string, a mechanism to have it inserted into the localised name already exists.
2. If recipes only have one result and also have a specific icon or icons specified, then the tooltip should not hide the Products: line.
3. If recipes only have one result and also have a specific localised description specified, then the tooltip should not ignore the description entirely.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: [0.16.34] Single-result probability recipe tooltips
For my example it clearly does not. A 100% chance to produce exactly 1 item does not produce 100 items on average.Rseding91 wrote:The probability system will show the average result for anything that produces between a range - that part is working correctly.
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: [0.16.34] Single-result probability recipe tooltips
0.16.35:
Perfect. Thank you very much Rseding.
Perfect. Thank you very much Rseding.