Problem with Powertrain - clutchRatio

Discussion in 'Content Creation' started by Tango91, Jan 30, 2017.

  1. Tango91

    Tango91
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    68
    Howdy.
    I'm in the process of replacing the legacy drivetrain code on one of my mods in progress with the new very cool powertrain stuff.

    For now I've just got a combustionEngine and a frictionClutch:

    Code:
        "powertrain": [
            ["type",                "name",                    "inputName",    "inputIndex"]      
            ["combustionEngine",    "huskyEngine",            "dummy",        0]
            ["frictionClutch",        "huskyClutch",            "huskyEngine",    1]
        ]
    Which i have placed in the engine jbeam where the old parameter section went:

    Code:
    "huskyEngine": {
            "torque":[
                ["rpm",    "torque"]
                [0, 0],
                [500, 90],
                [1000, 130],
                [2000, 190],
                [2500, 160],
                [3000, 120],
                [4000, 45],
                [4250, 35],
            ],
           
            "idleRPM":750,
            "maxRPM":4250,
            "revLimiterRPMDrop":100,
            "inertia":0.15,
            "friction":20,
            "dynamicFriction":0.0238
            "burnEfficiency":0.25 //0.34
            "torqueReactionNodes:":["eng_LFB","eng_RFB","eng_LRB"]
            //"energyStorage": "mainTank",
            //"requiredEnergyType":"diesel",
            //"breakTriggerBeam":"engine",
           
        }
       
        "huskyClutch":    {},
    unfortunately this results in the game throwing a wobbly and giving me a 'Fatal vehicle exception'

    I can't really make heads or tails of the console output other than the game is trying to perform arithmetic on something called 'clutchRatio' which it can't find.

    I've searched and haven't been able to find anything relating to this either on the forum or on the googles.

    Please see the attached image for the console output.

    If you've got any suggestions I'd love to hear them, I've been reading and re-reading the wiki examples and pulling my hair out.

    Thanks :)

    Edit: For whatever reason, this error does not occur with a torque converter
     

    Attached Files:

    • clutchRatio.png
    #1 Tango91, Jan 30, 2017
    Last edited: Jan 31, 2017
  2. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    Do you have also mainEngine? I'm bit on unknown waters here, but I think at some place I did read that there has to be one mainEngine which cannot be left out, rest of the engines can have other names I guess, but I haven't messed out with those too much, I have always had just mainEngine.
     
    • Informative Informative x 1
  3. Tango91

    Tango91
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    68
    Tried changing the name and it actually worked! Thanks! :)
     
  4. Diamondback

    Diamondback
    Expand Collapse
    Vehicle Systems Lead
    BeamNG Team

    Joined:
    Apr 8, 2014
    Messages:
    1,957
    Yea, when using the default vehicleController, you need to name it "mainEngine". If anyone can come up with valid arguments why that's not a good idea, we can make it configurable ;)
     
  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