ElectricEnergyInterface LUA double values

Place to get help with not working mods / modding interface.
Pandemoneus
Fast Inserter
Fast Inserter
Posts: 127
Joined: Fri May 08, 2015 2:25 pm
Contact:

ElectricEnergyInterface LUA double values

Post by Pandemoneus »

Hey, I discovered the ElectricEnergyInterface entity type and corresponding entity attributes that I can set. Taking the output flow limit as example, it seems like that a value of 1.0 is not 1W. It rather seems like that a value of roughly 0.01674 is 1W. Can a dev give some insight on what the correct value is? Or could I request for the API to accept strings like "1W" as in the entity prototype definitions?
My RSO+Bob's+Angel's modpack: Farlands (outdated)
Mods (current): Resource Labels
Mods (old): Biter Spires
Yoyobuae
Filter Inserter
Filter Inserter
Posts: 511
Joined: Fri Nov 04, 2016 11:04 pm
Contact:

Re: ElectricEnergyInterface LUA double values

Post by Yoyobuae »

From LUA API the values for power are actually in Joule per tick. There's 60 ticks in a second so a value of 1 equals 60 W. If you want to set exactly 1W then use 1.0/60.0 as value.
Pandemoneus
Fast Inserter
Fast Inserter
Posts: 127
Joined: Fri May 08, 2015 2:25 pm
Contact:

Re: ElectricEnergyInterface LUA double values

Post by Pandemoneus »

Yoyobuae wrote:From LUA API the values for power are actually in Joule per tick. There's 60 ticks in a second so a value of 1 equals 60 W. If you want to set exactly 1W then use 1.0/60.0 as value.
Thanks a lot!
My RSO+Bob's+Angel's modpack: Farlands (outdated)
Mods (current): Resource Labels
Mods (old): Biter Spires
Post Reply

Return to “Modding help”