Inconsistent heading lines for research effects

Bugs that are actually features.
Pi-C
Smart Inserter
Smart Inserter
Posts: 1742
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Inconsistent heading lines for research effects

Post 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 1658 times
bm-conversion-2.png
bm-conversion-2.png (251.82 KiB) Viewed 1658 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?
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Inconsistent heading lines for research effects

Post 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)).
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Pi-C
Smart Inserter
Smart Inserter
Posts: 1742
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Inconsistent heading lines for research effects

Post 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! :-)
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Honktown
Smart Inserter
Smart Inserter
Posts: 1045
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: Inconsistent heading lines for research effects

Post 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
I have mods! I guess!
Link
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5304
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Inconsistent heading lines for research effects

Post 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
Pi-C
Smart Inserter
Smart Inserter
Posts: 1742
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Inconsistent heading lines for research effects

Post by Pi-C »

Thanks, already done that and it works beautifully! :-)
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Post Reply

Return to “Not a bug”