So basically now, you have a working 1/10 reduction scripted gearbox which works without spazz?
Oh you, I'll do anything to get that ;)
I mean, I'll just post the code here, since it's not that complicated. I'm not going to post the exact code I used for that truck, since it was about twice as long, controlled the steering and brakes as well, and was much more poorly written. There's still some slip so it's not a constant 1/10, but it works well enough for a transmission.
Code:
@name E2 Transmission
@inputs [Engine OutputShaft]:entity ShiftUp ShiftDown
@outputs Gear RPM Ratio Force
@persist Ratios:table Force Modifier RelativeForce
@trigger ShiftUp ShiftDown
if(changed(ShiftUp)&ShiftUp&Gear<Ratios:count()){Gear++, soundPlay(0,0,"/engines/trans/default_shift.wav")}
if(changed(ShiftDown)&ShiftDown&Gear>-1){Gear--, soundPlay(0,0,"/engines/trans/default_shift.wav")}
runOnTick(1)
Ratios=table(0.1,0.5,1.25,2)
RelativeForce=50
RPM=abs(OutputShaft:angVel():yaw()/360*60)
Force=(OutputShaft:angVel():yaw())-(sign(Gear)*Ratio*Engine:angVel():yaw())
Ratio=Ratios[abs(Gear),number]
Modifier=sign(Gear)*RelativeForce/Ratio
Engine:applyTorque(vec(0,0,Force*Modifier*Ratio))
OutputShaft:applyTorque(vec(0,0,-sign(Gear)*Force*Modifier))
Of course, all you have to do is increase the weight on the engine crankshaft and the output shaft connected to the drive wheels. That will let you increase the RelativeForce, which will ultimately give you less slip and better response. Just note that both of the props that end up getting linked and wired into the expression should rotate on their respective local Z axis, or you'll have to change around lines 15, 19, and 20 and maybe line 14 to properly detect the correct axis of rotation.
It's pretty simple once you get to understand it.