Page 1 of 1

Limit percent by short integer max

Posted: Mon Mar 16, 2020 1:38 am
by Helfima
I want to know if it is a limitation when percent of crafting speed modifier exced 32767 because the value stored in a short integer

in Pyanodons AlienLife we can put 27 modules with speed bonus of 1500% that do 40500% but the factory limited at +32767%
cap_percent.png
cap_percent.png (320.18 KiB) Viewed 1343 times

Re: Limit percent by short integer max

Posted: Mon Mar 16, 2020 9:38 am
by Deadlock989
Search is your friend. viewtopic.php?p=361025#p361025

Re: Limit percent by short integer max

Posted: Mon Mar 16, 2020 10:50 am
by Helfima
I searched!
it's not a problem with productivity there are 0% of productivity
it's not a problem with 1 cycle per tick

information on recipe:
energy recipe=80
crafting speed=0.02
crafting speed modified=0.02*405=8.13
crafting speed limit per tick=80x60=4800

coincidence short interger max=32 767 and this cap 32 767%!

Re: Limit percent by short integer max

Posted: Mon Mar 16, 2020 10:54 am
by Deadlock989
It's not a problem, period. The engine was never intended to have recipes that only make sense when their speed is boosted by 40000% or more. The designers most likely capped those values at a 16 bit signed int because anything beyond that is foolishness and anything below that is better for performance.