beacon_power_usage_multiplier must be greater than 0.01

ltab
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Jun 11, 2020 6:57 pm
Contact:

beacon_power_usage_multiplier must be greater than 0.01

Post by ltab »

This may be a documentation issue moreso than game bug, depending on which is right.

The modding API states the beacon_power_usage_multiplier QualityPrototype property must be >= 0.01, however, starting the game with a quality that has beacon_power_usage_multiplier == 0.01 results in an error stating "beacon_power_usage_multiplier must be >= 0.01 but 0.01 was given". Setting it to > 0.01 works fine. If not a bug then the docs should be changed to indicate > instead of >=.

Note that this may also be an issue with other quality properties that all share the "Must be >= 0.01" note, but I have not tested those.

EDIT: I noticed that this was moved to documentation improvements; the in-game error message will still need to be adjusted if >0.01 is the proper intended behaviour.
Last edited by ltab on Sat Jun 27, 2026 11:15 pm, edited 1 time in total.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4932
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: beacon_power_usage_multiplier must be greater than 0.01

Post by boskid »

Floating point errors, beacon_power_usage_multiplier is loaded as `float` but the limit is checked against a `0.01` value that is a double. Those limits are there for mods to stay away of 0 because those usually cause problems due to code assuming a non zero value meaning all qualities will have it non zero. In general i do not care much if those checks are > 0.01 or >= 0.01, just stay away of the limits with a margin of your choice.

In one of the future versions i may or may not increase those limits to be 0.02, so to future proof your code, please stay above the new suggested value.
Bilka
Factorio Staff
Factorio Staff
Posts: 3919
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: beacon_power_usage_multiplier must be greater than 0.01

Post by Bilka »

The documentation is based on the code with does a >= check. As boskid explained, that may run into floating point issues. I'd rather not alter the documentation based on floating point issues, also based on boskid's reasoning that you're not really meant to set this to 0.01 either. Since you now got this explanation and the documentation also matches the code, I will move this to resolved.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Post Reply

Return to “Resolved Requests”