[2.0.73] durability_description_value gets different parameters as item vs Factoriopedia
Posted: Fri Feb 06, 2026 3:28 am
I'm working on a mod currently, and I want to give science packs of different qualities various effectiveness:
This works fine, and in Factoriopedia I see the % value I expect:
Note that I have temporarily added all 3 parameters provided to this locale string for clarity:
Based on: https://lua-api.factorio.com/latest/pro ... tion_value
When viewing the pack item however, the values are different:
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%.
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
Code: Select all
science-pack-remaining-amount-value=__1__ | __2__ | __3__%
When viewing the pack item however, the values are different:
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%.