Page 1 of 1

Request: show item burnt result in tooltip

Posted: Tue Feb 04, 2020 2:10 am
by Deadlock989
It's currently possible for items with a fuel value to define a "burnt result", e.g. used up uranium fuel cells, ash, flat batteries.

Now that the greatly improved tooltips separate out the item and recipe info instead of trying to mush them together, it would be useful if the item tooltip could show the burnt result of fuel items, if there is one.

Use case: educating the player about modded recipe chains where the only way of obtaining one of the ingredients is via a burnt result. The only reference source for recipes and production chains in Factorio is the crafting menu and recipe tooltips. Because "burners" don't use recipes, there is no recipe to show. This means that if a burnt result is the only way of obtaining the item, and that item is an ingredient in a bona fide recipe, the player is forced to guess at how to obtain it or the modder has to take extra measures. Even mods like FNEI can't help the player because again, it's not a recipe that produces the item.

There is one example of this in vanilla: the nuclear fuel reprocessing recipe. It doesn't require a mighty intellect to work out that "used up uranium fuel cells" are a product of a reactor "burning" the original fuel cells, but it doesn't actually tell you this anywhere within the game. In mods, it might be anything fantastical.

To be clear, I'm not asking for a property - I think it should just be the default.

Yes, we can fake it with item descriptions. Yes, players can "discover" the burnt result if they stumble around burning things. But I think it would help.

Re: Request: show item burnt result in tooltip

Posted: Tue Feb 04, 2020 1:50 pm
by Deadlock989
This is a mock-up with a "fake tooltip" localised item description.

Problems:

- It appears above and separate from all the other fuel info.
- The locale has to specify the right font formatting, if that ever changes again in the base game, I have to change the entire locale to match.
- I just overwrote any existing localised description the item might have had. You can append it if the item prototype specifies a custom one but if the prototype says nil for the description but there's a default one in the locale then there's no way of detecting that.

Re: Request: show item burnt result in tooltip

Posted: Tue Feb 04, 2020 2:00 pm
by Bilka
What would your ideal tooltip look and locale be?

Re: Request: show item burnt result in tooltip

Posted: Tue Feb 04, 2020 2:05 pm
by Deadlock989
"Spent product" works for me personally - the code always refers to things like this as a "result" but that jargon doesn't appear in the game, it's always "product". "Spent" is more generic in English than "burnt" or "burned" - it covers both chemical and electrical, e.g. coal, wood, batteries, nuclear fuel, quantum-energised fairy-powder crystals (I am especially interested in the latter at the moment). If it literally said "Burned result:" that would be OK for coal and wood but slightly weird for nuclear fuel and very weird for batteries. I guess it may be a translation issue in other locales.

It would appear within in the same section dividers as the fuel value info, ideally last.

Re: Request: show item burnt result in tooltip

Posted: Tue Feb 04, 2020 2:14 pm
by Deadlock989
Quick & dirty mock-up:

Re: Request: show item burnt result in tooltip

Posted: Tue Feb 04, 2020 4:17 pm
by Bilka
Okay, added to the next version.

Image

Re: Request: show item burnt result in tooltip

Posted: Tue Feb 04, 2020 5:36 pm
by Deadlock989
That's great, thanks. It was always tolerable with batteries and uranium cells, but I have a use case planned where there was literally no way of telling where a particular ingredient came from. I can push ahead with that now (time permitting).

Re: Request: show item burnt result in tooltip

Posted: Tue Feb 04, 2020 8:46 pm
by AmatorPhasma
Great, already implemented :D

I would have supported this suggestion, because I use burnt results a lot in my mods.
Deadlock989 wrote:
Tue Feb 04, 2020 2:10 am
Yes, we can fake it with item descriptions...
That's what I have done in my mods, but this native support is better and prevents overwriting of localized descriptions.

Re: Request: show item burnt result in tooltip

Posted: Tue Feb 04, 2020 9:41 pm
by darkfrei
AmatorPhasma wrote:
Tue Feb 04, 2020 8:46 pm
Great, already implemented :D

I would have supported this suggestion, because I use burnt results a lot in my mods.
How you remove burnt results from it's inventory?

Re: Request: show item burnt result in tooltip

Posted: Tue Feb 04, 2020 11:28 pm
by AmatorPhasma
darkfrei wrote:
Tue Feb 04, 2020 9:41 pm
AmatorPhasma wrote:
Tue Feb 04, 2020 8:46 pm
Great, already implemented :D

I would have supported this suggestion, because I use burnt results a lot in my mods.
How you remove burnt results from it's inventory?
With a lua script

Re: Request: show item burnt result in tooltip

Posted: Wed Feb 05, 2020 11:58 am
by Deadlock989
Inserters work fine without scripting as long as the machine with a burnt result slot doesn't also have a recipe output slot - i.e. generators and vehicles. Ironically, all of my burnt items aren't "burnt" - they are all non-chemical, closer to the only burnt result fuel in vanilla, the uranium fuel cell.