[2.0.73] durability_description_value gets different parameters as item vs Factoriopedia

Things that we don't consider worth fixing at this moment.
User avatar
Nauviax
Inserter
Inserter
Posts: 33
Joined: Sun Jan 28, 2018 9:30 am
Contact:

[2.0.73] durability_description_value gets different parameters as item vs Factoriopedia

Post by Nauviax »

I'm working on a mod currently, and I want to give science packs of different qualities various effectiveness:

Code: Select all

-- Reduce effectiveness of quality packs/tools, rare is base
local tool_effectiveness = { 0.5, 0.8, 1.0, 1.1, nil, 1.2 }
for _, q_level in pairs(data.raw.quality) do
	q_level.tool_durability_multiplier = tool_effectiveness[q_level.level + 1]
end
This works fine, and in Factoriopedia I see the % value I expect:
02-06-2026, 16-27-44.png
02-06-2026, 16-27-44.png (51.24 KiB) Viewed 190 times
Note that I have temporarily added all 3 parameters provided to this locale string for clarity:

Code: Select all

science-pack-remaining-amount-value=__1__ | __2__ | __3__%
Based on: https://lua-api.factorio.com/latest/pro ... tion_value

When viewing the pack item however, the values are different:
02-06-2026, 16-30-06.png
02-06-2026, 16-30-06.png (44.05 KiB) Viewed 189 times
I expected to see 0.5 | 1 | 50% here, and not 100% like it currently shows. (Uncommon will show 0.8 | 0.5 | 160% instead of 0.8 | 1 | 80%)

The actual pack is consumed in labs as expected by my changes to quality; the durability of a common pack with this change is still 50% and not the tooltip-stated 100%.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16541
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.73] durability_description_value gets different parameters as item vs Factoriopedia

Post by Rseding91 »

Thanks for the report. This is in direct conflict with another reported issue: 123076

Specifically we want the normal quality science pack to show as the base 100% and everything else to show as a "percentage more/less than normal".
If you want to get ahold of me I'm almost always on Discord.
User avatar
Nauviax
Inserter
Inserter
Posts: 33
Joined: Sun Jan 28, 2018 9:30 am
Contact:

Re: [2.0.73] durability_description_value gets different parameters as item vs Factoriopedia

Post by Nauviax »

Wouldn’t that just mean the Factoriopedia one is bugged then? The two fields are getting different values passed in.

Though alternatively, what are the chances of getting a fourth parameter passed in to this locale string for the first parameter as a percentage? (Similar to how the third is the second one as a percentage.) I’m currently using the first parameter as a workaround, though it would look nicer as a percentage with less dp.

I’ll make a feature request post later if you think this is more likely to be considered. Unless there’s some other workaround to display this common rarity pack as 50% instead of 0.5?
Post Reply

Return to “Won't fix.”