Immersive Vehicles (Formerly Transport Simulator)

Immersive Vehicles (Formerly Transport Simulator)

4M Downloads

Request: Configurable shift RPM for automatics

fsendventd opened this issue ยท 4 comments

commented

The majority of automatic transmissions out there don't shift at the engine redline (unless they're in a mode where they're specifically told to do so). Is it possible in MTS to allow people to set a shift RPM in the engine JSON instead of letting the mod do it?

commented

It's possible for sure. The only issue is that you'd have to be careful when you set your RPMs to avoid a feedback loop. If you set your up RPM to be 2500 or so, and then your down RPM to be 1500, then it's quite possible for you to get "stuck" between two gears and shift up and down constantly as the system tries to keep you between those two values.

That being said, it does make code simpler, though it wouldn't take into account the throttle position like real vehicles do.

commented

Simple code is good. And I could probably get it to account for the throttle position if you threw a decompiled code chunk at me.

commented

Relevant code for shifting up/down decisions:

//Do automatic transmission functions if needed.
if(state.running && pack.engine.isAutomatic){
if(currentGear > 0){
if(RPM > getSafeRPMFromMax(this.pack.engine.maxRPM)*0.5F*(1.0F + car.throttle/100F)){
shiftUp(false);
}else if(RPM < getSafeRPMFromMax(this.pack.engine.maxRPM)*0.25*(1.0F + car.throttle/100F) && currentGear > 1){
shiftDown(false);
}
}
}

commented

Closing due to lack of community support and difficulty of coding.