Helfima / helmod

Factorio Mod
149 stars 64 forks source link

Limitation warning messages not being displayed correctly #447

Closed jurgyy closed 1 year ago

jurgyy commented 1 year ago

Crafting Speed in the mod's interface caps at 12 and using the mod Space Exploration, you can easily reach a crafting speed higher than that. For instance a Space Manufactory has a base speed of 10 and has six module slots. So two T1 speed modules (20% each) already breaks the calculator. Strangely enough the interface also reports the warning "Limitation speed because the value cannot be reduced more than 80%" leaving me to believe some overflow is happening under the hood.

I have validated it in practice and more speed modules does actually increase the speed at which items are crafted. The side bar when hovering over the Space Manufactory also correctly states a crafting speed higher than 12.

Reproduction:

  1. Install Space Exploration
  2. Select any recipe that can be crafted in a Space Manufactory, which is most.
  3. Add two Speed Modules of any tier.

Anyway, here are some screenshots:
Helmod:
image

In game: image

KiwiHawk commented 1 year ago

There is a bug here with Helmod but it is comparatively minor. The Limitation warning that it's giving you isn't correct. The numbers that it shows are correct though. There is a base game limitation where each recipe can complete a maximum of once per tick (aka 60 times per second). You will see a higher speed value in Helmod for recipes with a longer craft time.

The speed shown by the side bar in game doesn't take this cap into account. However if you look at the production graph, you will see that Helmod's numbers are correct.

Here's an example with the limitation message fixed: image

image

image