Page 1 of 1

LuaItemPrototype::get_module_effects(quality?)

Posted: Thu Jun 19, 2025 8:28 pm
by SWeini
There is LuaItemPrototype::module_effects, but it is very difficult to properly calculate the effects of a module with given quality due to integer math and rounding going on. This problem got more serious with the addition of QualityPrototype::default_modifier. It's very difficult to reproduce the rounding behavior in Lua.

I'd like to see a method LuaItemPrototype::get_module_effects(quality?) that returns module_effects multiplied by the quality multiplier, with proper rounding.