I have recently started work on the Waggon und Maschinenbau railbus. Still very rough at the moment, but as I couldn't find one for the East Anglian route I'm working on, I decided to make one.
I am working on the engine blueprint and trying to work out how to get the RPM to match the gear ratio instead of the throttle setting. I see that it is configured that way on the class 105 but I cannot see how it was done. Any pointers would be much appreciated.
Decompile class 105 simulation blueprint (the one where all simulations are - diesel unit, gearbox, etc) via serz.exe and then just open decompiled .xml in any text editor, for example Notepad++. You´ll see then how it is done, although I think the scripting will be involved a little.
I have already cribbed the engine simulations blueprint and have successfully created the basic model with gears, but the part That I am missing is the lua script that does the speed,gear &RPM translations. The default operation seems to use throttle positioning to calculate RPM, it should be a combination of speed, gear ratio and throttle. This is where I am currently stuck.
Of course, that´s what I was talking about - scripting is involved... If original class 105 does have a script in .out format, you´re out of the game unless you write it on your own.
Yes the original script is compiled as .out, and I have not found a way to reverse engineer it, so it looks like I'll have to try and write my own. Well at least try....
Got to check my files first as I can't remember whether the gearing setup is in the script or the sim blueprint, but I put a class 101/111 style gear system into my model of Ffestiniog diesel Vale of Ffestiniog. If you are really really stuck you can try messaging me here or on my site and I might be able to offer some advice.
Hello dolanbaker! See if this is the part you need, I took it from BR Class 105. In function Initialise() PHP: gTime = 0 gEngTime = 0 gEngVel = 0 PHP: ACCELRATE = 0.25 MAXTE = 0.5 In function Update(inteval) PHP: gTime = Call("*:GetSimulationTime", 0) RPM = Call("GetControlValue", "RPM", 0) gEngAdd = RPM / 1500 if gEngAdd < 0 then gEngAdd = 0 end if gTime > gEngTime then Call("AddTime", "engine", gEngAdd) gEngVel = gEngVel + gEngAdd if gEngVel > 1 then Call("AddTime", "engine", -1) gEngVel = 0 end gEngTime = gTime + 0.02 end PHP: TractiveEffort = Call("GetTractiveEffort") TractiveEffort = math.abs(TractiveEffort) Accel = Call("GetAcceleration") Speed = Call("GetSpeed") if Speed < 0 then Accel = Accel * -1 end if Accel > ACCELRATE then TractiveEffort = MAXTE else if math.abs(Speed) > 1 then if Accel > -0.1 then TractiveEffort = MAXTE / 2 end else TractiveEffort = MAXTE / 11 end end Beyond that, I don't see anything else associated that you need.