Page 1 of 1

Weight is being modified without code to do so

Posted: Mon Oct 06, 2025 5:27 am
by dakotazinn
In the mod Productivity Fix (https://mods.factorio.com/mod/productiv ... 9e094cc937), beacons and the recycler are modified to allow productivity modules.
Somehow, this has an unintended side-effect of also modifying the weight of certain entities.
Specifically: Inserters, Long Handed Inserters, Fast Inserters, Burner Inserters.

There is no code that exists in the mod that modifies weight values.

Re: Weight is being modified without code to do so

Posted: Mon Oct 06, 2025 8:10 am
by boskid
https://lua-api.factorio.com/2.0.69/aux ... eight.html
https://lua-api.factorio.com/2.0.69/auxiliary/item-weight.html wrote:Following this, if a recipe doesn't support productivity, its simple result is determined as rocket_lift_weight / stack_size (see rocket_lift_weight and stack_size). If this simple result is larger than or equal to the intermediate result, it becomes the item's weight.

Otherwise, the game determines the amount of stacks that would result from the intermediate result as rocket_lift_weight / intermediate_result / stack_size. If this amount is less than or equal to 1, the intermediate result becomes the item's weight. Else, the item's weight is set to rocket_lift_weight / floor(stack_amount) / stack_size.