Hi,
I wanted to use your mod in Factorio 2.1, so I extracted it and simply updated the version number. It works great!
While playing with quality electric trains, I felt that the acceleration and top speed were a bit too restrictive for my taste. I looked for settings to tweak the train physics but couldn't find any, so I experimented by adding a few configurable multipliers myself.
For example:
-- Factor
-- 1.0 = original physics
-- <1.0 = weaker physics restrictions (faster trains)
-- >1.0 = stronger physics restrictions (slower trains)
-- Must be > 0
local PHYSICS_EFFECT_SPEED = 0.33
local PHYSICS_EFFECT_ACCELERATION = 1.5
local PHYSICS_EFFECT_BRAKE = 0.8
Applied here:
return engine_power / math.max(speed, 0.1) / PHYSICS_EFFECT_SPEED
return force / mass / PHYSICS_EFFECT_ACCELERATION
return MAX_BRAKE_DECELERATION / PHYSICS_EFFECT_BRAKE
With all values set to 1.0, the mod behaves exactly as it does now, so this wouldn't change the default gameplay. Players who prefer a different balance could simply adjust the settings to their liking.
I thought this might make a nice addition as startup or map settings. It may not be perfectly realistic, but it would give players a simple way to customize the train physics without having to edit the mod files.
Thanks again for making the mod!
EDIT:
While experimenting I also noticed that SLOW_START_THRESHOLD and SLOW_START_POWER nearly disappeared with my changes to the acceleration.
I ended up adding another multiplier:
local SLOW_START_TRACTION = 0.25
And added it here:
if speed < SLOW_START_THRESHOLD then
local ratio = speed / SLOW_START_THRESHOLD
ratio = math.pow(ratio, SLOW_START_POWER)
ratio = ratio * SLOW_START_TRACTION -- added
force = force * math.max(ratio, 0.01)
end
This is just me experimenting with the values. You probably have a better idea of how to achieve higher cruising speeds over medium distances while keeping the physics balanced, since you know the code much better than I do. Thanks again for your work on the mod!