VehiclePrototype expand on properties that use $either

Post Reply
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

VehiclePrototype expand on properties that use $either

Post by Deadlock989 »

https://wiki.factorio.com/Prototype/Veh ... king_force
https://wiki.factorio.com/Prototype/Veh ... tion_force

What is the difference (if any) between these two alternative ways of specifying braking power and friction? I can see in vanilla that locomotives and spider vehicles use the *_force version instead of the *_power version. Are there any actual in-game consequences of using one over the other? Documentation just says "Two different ways to set X". Different how? What are the units of the *_force version?
Image

Honktown
Smart Inserter
Smart Inserter
Posts: 1026
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: Documentation Improvement Requests

Post by Honktown »

Deadlock989 wrote:
Sun Jan 01, 2023 1:22 pm
What are the units of the *_force version?
It's likely not to matter:
See: https://wiki.factorio.com/Types/Energy
Also: core/lualib/util.lua, line 552: function util.parse_energy(energy)
If the game sees joules, it uses those, else, divide watts by 60 (a lot of values in the prototype explorer are joules/tick, not J/s or W)

I don't claim authority on it, but as stated in Types/Energy, anything that takes W or J can take the related value, it just converts it. e.g. https://wiki.factorio.com/Prototype/Rob ... ing_energy was originally described with energy, but in data, the game uses power. I changed the description to power to fit the value that already existed (what a user would most likely see as the "right" value to use)
I have mods! I guess!
Link

Bilka
Factorio Staff
Factorio Staff
Posts: 3159
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: VehiclePrototype expand on properties that use $either

Post by Bilka »

There is no difference. The docs were already updated to say this during the migration to the new website.
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”