Unsolved Help with custom lua for automatic transmissions (Overdrive Toggle)

Discussion in 'Mod Support' started by FakeCarGuy, Jan 8, 2021.

  1. FakeCarGuy

    FakeCarGuy
    Expand Collapse

    Joined:
    Jan 23, 2020
    Messages:
    17
    Hey!

    I was messing around with the lua file in the Torque Converter Lockup Switch mod (https://www.beamng.com/resources/torque-converter-clutch-lockup-switch-tcc.3150/) and I think I could make an overdrive feature. You would toggle it with a key bind like the Torque Converter Lockup Switch mod. With overdrive off, the highest gear the transmission could shift to would be 3rd gear which in the 48RE is 1:1 and with overdrive on, the transmission would shifting normally through every gear. I don't think it would be very hard I just don't have the knowledge do so yet. In my Cummins mod I have the transmissions pretty much setup for this overdrive feature if it works because 3rd gear unlocked and 3rd gear locked are two different gears for a more realistic lockup in my opinion.


    Thank you!

    Here is an example of what I was thinking (It doesn't work obviously).

    Capture.png
     
    #1 FakeCarGuy, Jan 8, 2021
    Last edited: Jan 8, 2021
  2. 8coibaf

    8coibaf
    Expand Collapse

    Joined:
    Dec 29, 2018
    Messages:
    8
    Can it be possible to adjust the switch point of the gearbox in the passage 3->4 gear?

    You may set the switch point to rpms over the revlimiter so it never changes and if you activate the over drive the switch points is at very low rpms so it immediately switches to the highest gear.

    Probably not the most realistic solution but it might work if you can change dynamically the switch point
     
  3. FakeCarGuy

    FakeCarGuy
    Expand Collapse

    Joined:
    Jan 23, 2020
    Messages:
    17
    That is a good idea! I am not sure if that is possible but I will look.
     
  4. NOCARGO

    NOCARGO
    Expand Collapse

    Joined:
    Apr 1, 2019
    Messages:
    1,503
    This lua file is incomplete (for example, you are not setting locked to 'true' anywhere). And is electrics.values.lockupClutchRatio an existing value ? Though it all doesn't matter because no separate lua file is going to be 'powerful' enough to divert the original shift logic lua. You will need to make a dedicated shift logic lua file to make the vehicle shift different from vanilla behavior.
     
  5. FakeCarGuy

    FakeCarGuy
    Expand Collapse

    Joined:
    Jan 23, 2020
    Messages:
    17
    Okay, is there a way I can set up a key bind to toggle just between the "maxGearIndex = 5" and "maxGearIndex = 3"? I am not sure if the electrics.values.lockupClutchRatio is an existing value because it was from the Lock up Switch mod. But if so I don't need it anyway. And how would I make a dedicated shift logic lua file? So basically all I want to do is make a keybind that will toggle between shifting only to 3rd gear and one that will shift to Overdrive (4th gear).

    Thanks!
     
  6. NOCARGO

    NOCARGO
    Expand Collapse

    Joined:
    Apr 1, 2019
    Messages:
    1,503
    I'm very rl busy these days, but as soon as I got a few minutes I'll have a look at it.

    This is a rather advanced modding job. You will need your own gearbox lua first and then assign new shift logic lua to it. To start this procedure you basically make copies of the existing ones and rename them. Once they work you can go and change stuff.
     
  7. FakeCarGuy

    FakeCarGuy
    Expand Collapse

    Joined:
    Jan 23, 2020
    Messages:
    17
    Oh ok I think I have a better understanding now. I will go mess around with it and see what I can figure out.
    Thanks for your help!
     
  8. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    1,729
    There is a mod Nissan Terrano that has overdrive function. May be you can understand how it works
     
  9. FakeCarGuy

    FakeCarGuy
    Expand Collapse

    Joined:
    Jan 23, 2020
    Messages:
    17
    Thanks for the info! I'll check it out
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice