Page 1 of 1

Inconsistent heading lines for research effects

Posted: Tue Jan 28, 2020 12:12 pm
by Pi-C
Bio Industries contains these recipes for biomass conversion:

Code: Select all

			---- Biomass to Light-oil
	  {
		type = "recipe",
		name = "bi_recipe_biomass_conversion_1",
		[…]
		results=
		{
			{type="item", name="bi-cellulose", amount=2},
			{type="fluid", name="light-oil", amount=80},
		},  
		[…]
	  },

		---- Biomass to PG
	  {
		type = "recipe",
		name = "bi_recipe_biomass_conversion_2",
		[…]
		results=
		{
			{type="fluid", name="petroleum-gas", amount=20}
		},   
		[…]
	  },
These are the localized names:

Code: Select all

[recipe-name]
[…]
bi_recipe_biomass_conversion_1=Bio fuel conversion 1: Cellulose, Light-oil
bi_recipe_biomass_conversion_2=Bio fuel conversion 2: Petroleum gas
[…]
These recipes are unlocked by researching Advanced Biotechnology. If I select that in the research tree, I'll see this under "Effects":
bm-conversion-1.png
bm-conversion-1.png (251.5 KiB) Viewed 1664 times
bm-conversion-2.png
bm-conversion-2.png (251.82 KiB) Viewed 1664 times
The heading is different ("Bio fuel conversion 1: Cellulose, Light-oil" vs. "20 x Petroleum (Recipe)") because the first recipe has multiple products while the second has only one. That's inconsistent! Things are even worse because there actually are 4 different recipes for biomass conversion that get unlocked: recipes 1 and 4 have multiple products, so their effect is labeled "Bio fuel conversion x: …"; recipes 2 and 3 have only one product, so the label just contains the number and name of the respective product.

The inconsisting label is confusing. In fact, I filed a bug against Bio Industries because I couldn't find the technology that would unlock "Bio fuel conversion 2" before realizing that it was Factorio's doing.

Would you consider using the localized recipe name as label even for recipes that result in only one product?

Re: Inconsistent heading lines for research effects

Posted: Tue Jan 28, 2020 12:25 pm
by eradicator
Pi-C wrote: Tue Jan 28, 2020 12:12 pm Would you consider using the localized recipe name as label even for recipes that result in only one product?
Due to the behavior you describe it is unnessecary in most cases for single-output recipies to even have a localized name. Thus enforcing it would mean 90%+ of mods would have to retranslate most of their recipes.
(You can still enforce the named tooltip style by changing the prototypes. As far as i know by including main_product="" (empty string)).

Re: Inconsistent heading lines for research effects

Posted: Tue Jan 28, 2020 12:34 pm
by Pi-C
eradicator wrote: Tue Jan 28, 2020 12:25 pm
Pi-C wrote: Tue Jan 28, 2020 12:12 pm Would you consider using the localized recipe name as label even for recipes that result in only one product?
Due to the behavior you describe it is unnessecary in most cases for single-output recipies to even have a localized name. Thus enforcing it would mean 90%+ of mods would have to retranslate most of their recipes.
Ooops, that would be bad.
(You can still enforce the named tooltip style by changing the prototypes. As far as i know by including main_product="" (empty string)).
OK, I'll do that! :-)

Re: Inconsistent heading lines for research effects

Posted: Tue Jan 28, 2020 3:25 pm
by Honktown
eradicator wrote: Tue Jan 28, 2020 12:25 pm
(You can still enforce the named tooltip style by changing the prototypes. As far as i know by including main_product="" (empty string)).
Does it put the colon and nothing after!?!? THIS IS IMPORTANT

Re: Inconsistent heading lines for research effects

Posted: Tue Jan 28, 2020 4:43 pm
by Klonan
If you want the recipe to use the localised name, and not the name of the only product, then set `main_product = ""` in the recipe prototype

Re: Inconsistent heading lines for research effects

Posted: Tue Jan 28, 2020 4:56 pm
by Pi-C
Thanks, already done that and it works beautifully! :-)