I was curious experiments a reversed automatic. I tried put automatic gearbox connect to engine first then torque converter connect to gearbox. Lastly driveshaft connect to torque converter. Like this But I test it in BeamNG game. I got lua error. With this car's suspension is gone and engine not work. I tested normal order of powertrain like normal automatic and it's work without anyone error. Any help to fix the error? I would appreciate it.
The powertrain code will intentionally crash itself and throw an error if one of these conditions are broken. 1. Only one engine per tree 2. Engines cannot accept any power input 3. Engines can only be connected to an approved device(clutch, torque convertor, etc.) 4. Transmissions can only accept power inputs from approved devices for their type(Torque Convertor for automatics, Clutch for manuals and sequentials, etc.)
Damn. I wish that was allow. Actually I tried powertrain order: engine, torque converter (as dummy, very high stall), gearbox, torque converter, then connect to shaft to wheel. was two torque converter allow? Also is torque converter must connect to automatic gearbox?
IIRC the torque converter can output to anything but it must accept an input from an engine. There are two ways I know to circumvent some of these rules but both have their complications 1. Rewrite the objects in Lua to not have same restrictions(complicated to implement) 2. Have two dummy wheels connected connected together with beams(physics oddities) With these workarounds I have managed to make a hybrid-electric vehicle as well as have a vehicle with two manual transmissions connected in series to one engine
Thank for relay. I guess overwriting lua for torque converter is only way because of rule to torque converter must connect to engine. Would nice if tell where lua file that have restricted torque converter because I'm search right now.
The Lua files for all the powertrain components is at BeamNG.drive/lua/vehicle/powertrain. Though doing this is often way more difficult than just disabling the restriction. This is because most of the time the restriction is in place because the component needs to use certain variables from the other connected component in order to function. Therefore in this case you'll have to either substitute all the variables the torque convertor uses from the engine or rewrite the code such that it doesn't need those variables. This took me months to figure out how to do right for the twin manual transmission setup I made..
I wish i show some image and code to understand clear but now's night, so I just write out. Good news, I copied entirely torque converter powertrain code and renamed to unrestricted torque converter. I edited to be not required to have connect to main engine. Turn out there was ONE reason required connect to engine was just collect engine's max rpm and peak torque output that only main engine have that data so that can calculator to absolute max torque that torque converter can receive for stability reason. So I can just rewrite to reasonable valve. Now lua crash stop and engine running work in game! Bad news, even engine can rev up ingame but that car not move at all. I set powertrain order: main engine, vanilla torque converter, automatic gearbox, unrestricted torque converter (I made), shaft, then connect to rest unit wheel. once I put gear and push throttle open, engine make blue line though powertrain which device torque. But unrestricted torque converter stop it. I read unrestricted torque converter (almost identical code to vanilla torque converter) to sort get it. Then I add message code inside unrestricted torque converter to see valve while running ingame to find any odd. I found very odd. Unrestricted torque converter do receive torque from automatic gearbox but unrestricted torque converter not use that valve, it use input rpm from parent instead to create output torque. But that rpm input from unrestricted torque converter always zero while fully engine load.