Hi, I'm trying to put electronic locking and torque vectoring differentials on an offroad oriented vehicle and am having trouble getting them to lock up correctly. As far as i can tell some traction control code is required for them to function. Part of the problem being that there is no information as to what the values do and i haven't found a wiki for this stuff. I have a mod for a 4wd where it has functioning electronic locking differentials and i exported an automation vehicle with them and that also works. But both of these seem to be using pretty basic code. It's also possible i am trying to put to much torque through the differentials(up near 1,000nm) so i need more locking force but it doesn't have that line like an LSD normally has. Sorry for the text wall i have no idea how to word this correct. Hopefully somebody can help.
In the old wiki there is still a page about this, I hope it helps: https://wiki.beamng.com/Powertrain.html
You can either program the electronics yourself(without DSE)like this and this (you can borrow my code anyway), or use BeamNG existing eDiff logic like this. For additional information, please inspect the differentials of the FCV and modern ETKs If you are using BeamNG's existing eDiff logic, first you need to have DSE installed on your vehicle. For brake-actuated locking of open diff, you need to have an open diff and "electronicaDiffLock" controller. As shown in this FCV's example Code: "controller": [ ["fileName"], ["drivingDynamics/actuators/electronicDiffLock" {"name":"lockFront", "differentialName":"differential_F"}] ], "powertrain" : [ ["type", "name", "inputName", "inputIndex"], ["torsionReactor", "torsionReactorF", "transfercase", 2], ["differential", "differential_F", "torsionReactorF", 1, {"deformGroups":["differential_F"], "diffType":"open", "uiName":"Front Differential","defaultVirtualInertia":0.25}], ], For electronically-controlled LSD or locking diff, you'll need to have an activeLock differential and an "activeDiffLock" controller As shown in this 800's example Code: "controller": [ ["fileName"], ["drivingDynamics/actuators/activeDiffLock" {"name":"lockRear", "differentialName":"differential_R"}] ], "powertrain" : [ ["type", "name", "inputName", "inputIndex"], ["differential", "differential_R", "driveshaft", 1, {"deformGroups":["differential_R"], "diffType":"activeLock", "uiName":"Rear Differential","defaultVirtualInertia":0.25}], ], "differential_R": { "friction": 3.92, "dynamicFriction": 0.00184, "torqueLossCoef": 0.03, },