Page 1 of 1

[2.0.68] CustomTooltipField doesn't show up on Recipes

Posted: Fri Sep 26, 2025 12:21 am
by PennyJim
As the title states, we cannot do custom tooltips on recipes when we can still do localized descriptions (the old method of custom tooltips)

Since it's on the Prototype I would've expected it to work on at least the major four (Items, Entities, Recipes, and Technologies).
I can concede it maybe not showing up on Technologies, but Recipes seems like an oversight.

Sample code snippet:

Code: Select all

local custom_tooltips = {
	{
		name = "TEST TOOLTIP",
		value = "SHOULD SHOW UP"
	}
}
data.raw["item"]["iron-plate"].custom_tooltip_fields = custom_tooltips
data.raw["recipe"]["basic-oil-processing"].custom_tooltip_fields = custom_tooltips
data.raw["technology"]["oil-processing"].custom_tooltip_fields = custom_tooltips

local custom_description = "TEST DESCRIPTION: SHOULD SHOW UP"

data.raw["item"]["iron-plate"].localised_description = custom_description
data.raw["recipe"]["basic-oil-processing"].localised_description = custom_description
data.raw["technology"]["oil-processing"].localised_description = custom_description
Results:
Screenshot from 2025-09-25 18-08-31.png
Screenshot from 2025-09-25 18-08-31.png (61.74 KiB) Viewed 276 times
Screenshot from 2025-09-25 18-08-04.png
Screenshot from 2025-09-25 18-08-04.png (108.99 KiB) Viewed 276 times
09-25-2025, 18-20-10.png
09-25-2025, 18-20-10.png (46.51 KiB) Viewed 276 times

Re: [2.0.68] CustomTooltipField doesn't show up on Recipes

Posted: Fri Sep 26, 2025 8:14 am
by boskid
Ok, i did some small tweaks and made it work for 2.0.69. Recipe tooltip uses completly different tooltip creation code due to everything being manually placed and coordinated (like some lines showing different content if you have not enough items to craft a recipe), so at best what i can do is to put the custom tooltip near the bottom. As for the factoriopedia, it looks like there was a condition that skipped showing recipe prototype custom fields when recipe has no description - for this i added an extra check that will bypass valid description check when custom tooltip fields are present.

09-26-2025, 10-10-35.png
09-26-2025, 10-10-35.png (81.71 KiB) Viewed 194 times
09-26-2025, 10-10-52.png
09-26-2025, 10-10-52.png (21.41 KiB) Viewed 194 times