[0.16.43] LuaEntityPrototype braking_force not correct

This subforum contains all the issues which we already resolved.
Post Reply
beiju
Inserter
Inserter
Posts: 42
Joined: Thu Feb 02, 2017 3:52 pm
Contact:

[0.16.43] LuaEntityPrototype braking_force not correct

Post by beiju »

Based on the documentation here, I expected the braking_force property of a LuaEntityPrototype on a car entity to be related in some way to the braking_power property in the prototype definition. Instead it seems to always return the value 0.002, no matter what changes I make to braking_power in the game files. I know the changes are taking effect because the car/tank brakes faster or slower according to how I change the prototype.

If I've misunderstood the documentation, please consider this to be a request for more specific documentation and a for way to read the braking_power of a car entity.

Steps to reproduce: Get in a car or tank and run the following snippet in the console. Modify the braking_power for the car and/or tank in base/prototypes/entity/entities.lua (or alter it the proper way, with a mod) and restart Factorio. Run the snippet again and notice that the value doesn't change.

Code: Select all

/c game.player.print(game.player.vehicle.prototype.braking_force)

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.16.43] LuaEntityPrototype braking_force not correct

Post by Klonan »

Thanks for the report,

It was returning the friction force, not the braking force

It is resolved for the next release

Post Reply

Return to “Resolved Problems and Bugs”