Page 1 of 1

[0.17.79] Recipe prototype icon and locale inheritance behaves differently

Posted: Tue Dec 03, 2019 8:05 pm
by theRustyKnife
When a recipe doesn't have icons or locale specified, but has a main product, it uses it's icons/locale. However, when a recipe is defined such that the main product is different for normal and expensive versions, the main product for the recipe overall is ambiguous. Locale just falls back (correctly, in my opinion) to recipe-name.xxx. Icons however are taken from the main product for the normal version, which is somewhat arbitrary.

What makes me think this is a bug, is that if the expensive version doesn't have a main product, you get an error saying icon is not specified, which is just weird.

Here's an example recipe that gets the default locale (recipe-name.test-recipe in this case), but the icon from the normal version (the iron stick icon):

Code: Select all

{
	type = 'recipe',
	name = 'test-recipe',
	enabled = true,
	subgroup = data.raw['item']['constant-combinator'].subgroup,
	
	normal = {
		ingredients = {},
		result = 'iron-stick',
	},
	
	expensive = {
		ingredients = {},
		result = 'iron-plate',
	},
},

Re: [0.17.79] Recipe prototype icon and locale inheritance behaves differently

Posted: Mon Dec 09, 2019 10:08 am
by Klonan
I will move this to modding interface requests

Re: [0.17.79] Recipe prototype icon and locale inheritance behaves differently

Posted: Wed Feb 26, 2020 4:27 pm
by Rseding91
If you define a recipe with different products where there is no main product for each version of normal and expensive, then the game requires you define what icon to use for the recipe in general.

If every version (normal and expensive) have a main product, the main product icon is used. No part of that defaults to the normal recipes icon.

Re: [0.17.79] Recipe prototype icon and locale inheritance behaves differently

Posted: Wed Feb 26, 2020 5:09 pm
by Bilka
To make Rseding's reply a bit more clear: It already works the way you asked for, the expensive recipe shows the iron plate and the normal recipe shows the stick.