I'm developing a cylinder deactivation system for the 4.4 V8 Wendover based on a custom engine lua file. While trying to figure out how to simulate cutting off half the engine, I stumbled across the "scaleOutputTorque" function. Added a call to that function in my lua, and it partially works. During low-load cruising, half of the engine will shut off. However, stepping hard on the accelerator doesn't reactivate all 8 cylinders as it should. The Wendover is extremely sluggish accelerating, as it is essentially a 2.2-liter inline-4. In addition, cylinder deactivation doesn't cause the horrible exhaust boom that I expected to hear (I coded a muffling reduction in as well) Uploaded the file, can someone take a look?
Sorry for the late solution but instead of using that scaleOutputTorque function, use this instead to scale the torque: Code: -- 100% torque device.outputTorqueState = 1.0 -- 50% torque device.outputTorqueState = 0.5 And in terms of cylinder deactivation, well BeamNG doesn't simulate that yet so yeah that's why you don't get any realistic sound effects. The only thing this code does is scale the output torque.
I understand that, that's exactly what I'm trying to ADD. Proper cylinder deactivation, plus the annoying exhaust boom. I reworked my code, now it works right. I need to figure out how to dynamically reduce the exhaust muffling to introduce a droning exhaust note.