Unsolved Independent front electric engine

Discussion in 'Mod Support' started by Nicloas, Jul 25, 2020.

  1. Nicloas

    Nicloas
    Expand Collapse

    Joined:
    Jul 25, 2020
    Messages:
    22
    I am building a hybrid car with combustion engine at rear and electric at front, and it does work, but with one problem, every time the combustion engine shifts gears it disconnects front engine as well. And creates power gaps as you can see on the screen. Is there a way to make the front electric engine independent? I tried to put it's own gearbox, controller ect. but nothing worked

    upload_2020-7-25_16-28-43.png

    "front_eletric_motor_low": {
    "information":{
    "authors":"BeamNG",
    "name":"Front Eletric Motor Low",
    "value":1700,
    },
    "slotType" : "front_eletric_motor",
    "slots": [
    ["type", "default", "description"],
    ],
    "powertrain": [
    ["type", "name", "inputName", "inputIndex"],
    ["electricMotor", "secondaryEngine", "dummy", 1],
    ["torqueConverter", "electricTorqueConverter", "secondaryEngine", 1],
    //["cvtGearbox", "electricGearbox", "electricTorqueConverter", 1],
    //["shaft", "HybridMotor", "electricGearbox", 1, {"canDisconnect":true}],
    //["differential", "differential_R", "HybridMotor", 1 {"diffType":"open", "gearRatio": 10, "friction":0.5}],
    //["differential", "differential_F", "HybridMotor", 1 {"diffType":"open", "gearRatio": 10, "friction":0.5}],
    ["differential", "e_differential_F", "electricTorqueConverter", 1 {"diffType":"open", "gearRatio": 10, "friction":0.5}],
    ["shaft", "wheelaxleFL", "e_differential_F", 1, {"connectedWheel":"FL", "friction":0}],
    ["shaft", "wheelaxleFR", "e_differential_F", 2, {"connectedWheel":"FR", "friction":0}],
    ],
    "flexbodies": [
    ["mesh", "[group]:", "nonFlexMaterials"],
    ["sunburst_diff", ["sunburst_body","sunburst_lowermounts_a_R","sunburst_lowermounts_b_R","sunburst_lowermounts_c_R","sunburst_uppermounts_R","sunburst_shocktop_R"]],
    ["sunburst_halfshaft_R", ["sunburst_hub_R","sunburst_upperarm_R","sunburst_lowermounts_a_R","sunburst_lowermounts_b_R"]],
    ["sunburst_hybrid", ["sunburst_engine","sunburst_transmission"]],
    ],

    "secondaryEngine":{
    "torque":[
    ["rpm", "torque"],
    [0,356.03],
    [500,356.03],
    [1500,237.36],
    [2000,213.62],
    [3000,178.02],
    [4000,133.51],
    [5000,106.81],
    [6000,89.01],
    [7000,76.29],
    [8000,66.76],
    [9000,59.34],
    [10000,53.40],
    [11000,48.55],
    [12000,44.50],
    [13000,41.08],
    [14000,38.15],
    ],

    "idleRPM":0,
    "maxRPM":14000,
    "inertia":0.01,
    "friction":1,
    "dynamicFriction":0.004,
    "electricalEfficiency":0.94,
    "energyStorage": "mainBattery",
    //"electricsThrottleFactorName": "throttleFactorFront",

    //cooling and oil system
    "thermalsEnabled":false,
    },
    "electricTorqueConverter": {
    "converterDiameter": 0.22,
    "converterStiffness":10,
    "couplingAVRatio":0.9,
    "stallTorqueRatio":1.8,
    "lockupClutchTorque":400,
    },
    "electricGearbox": {
    "minGearRatio":1,
    "maxGearRatio":1,
    "parkLockTorque":2000,
    "oneWayViscousCoef":0,
    "friction": 1,
    },
    "vehicleController": {
    "automaticModes":"PRNDS",
    "highShiftUpRPM":14000,
    },
    "nodes": [
    ["id", "posX", "posY", "posZ"],

    ],
    "beams": [
    ["id1:", "id2:"],

    ],
    },
     
  2. Phym

    Phym
    Expand Collapse

    Joined:
    Jan 1, 2020
    Messages:
    1,395
    so this is automation? I don't think there's an easy way to do this. you could try ripping the front electric motor from the esbr I guess.
     
  3. Nicloas

    Nicloas
    Expand Collapse

    Joined:
    Jul 25, 2020
    Messages:
    22
    I already have electric motor in the car and it runs, that is not a problem, problem is it connect to combustion engine gearbox for some (unknown reason to me)
     
  4. Phym

    Phym
    Expand Collapse

    Joined:
    Jan 1, 2020
    Messages:
    1,395
    I see, try putting the gearbox data with the engine data(I am 99% sure this won’t do anything though:/).
     
  5. Nicloas

    Nicloas
    Expand Collapse

    Joined:
    Jul 25, 2020
    Messages:
    22
    Not sure how you mean it, I have a code for electric motor in my post, so please tell me what exactly I should put in the code
     
  6. Phym

    Phym
    Expand Collapse

    Joined:
    Jan 1, 2020
    Messages:
    1,395
    Copy the gearbox data, put it in the engine data notepad file.
     
  7. Nicloas

    Nicloas
    Expand Collapse

    Joined:
    Jul 25, 2020
    Messages:
    22
    I tried it but no difference
     
  8. Phym

    Phym
    Expand Collapse

    Joined:
    Jan 1, 2020
    Messages:
    1,395
    Told you(jk). I’m sorry but I have no idea what to do.
     
  9. bluehawk360

    bluehawk360
    Expand Collapse

    Joined:
    Sep 28, 2014
    Messages:
    201
    It looks like under the electric gearbox, you have the max gear ratios set to 1. This means that when you shift up, it will disengage due to the lack of a second/third/fourth etc. gears

    I'm not 100% sure if this will work though. I have only dabbled in modding so far.
     
  10. Nicloas

    Nicloas
    Expand Collapse

    Joined:
    Jul 25, 2020
    Messages:
    22
    That has nothing to do with it since it is an electric gearbox and that one is commented so not used
    //["cvtGearbox", "electricGearbox", "electricTorqueConverter", 1],
    As I said I was trying different combinaion thus I set it to 1 (from defaul value) and used it in the powertrain but it had no impact so I removed it
     
  11. Diamondback

    Diamondback
    Expand Collapse
    Vehicle Systems Lead
    BeamNG Team

    Joined:
    Apr 8, 2014
    Messages:
    1,957
    Why is there a torque converter after the electric motor?
    Also, hybrids are not supported by vanilla controllers, you'll have to write your own custom one.
     
  12. Nicloas

    Nicloas
    Expand Collapse

    Joined:
    Jul 25, 2020
    Messages:
    22
    I put a torque converter simple because it seemed to be better working with it, ... could you please hint me which file I should look into, because it seems that both electric and combustion engine are disengaged at the same time during a gear shift, I was trying to find something about it but there is basically nothing for electric engines (nor hybrids) at wiki.beamng
     
  13. Diamondback

    Diamondback
    Expand Collapse
    Vehicle Systems Lead
    BeamNG Team

    Joined:
    Apr 8, 2014
    Messages:
    1,957
    As I said, without custom lua coding you can't make this work since hybrids are not supported out of the box.
    There is also no documentation about this, maybe take a look at the existing hybrid mods to get an idea on how to get started.
     
  14. Nicloas

    Nicloas
    Expand Collapse

    Joined:
    Jul 25, 2020
    Messages:
    22
    I was looking into some hybrid mods, but they also had this issue that their electric motor was somehow connected to combustion engine control, ... well I guess I will have to wait till it gets more vanilla and more sources became available
     
  15. Diamondback

    Diamondback
    Expand Collapse
    Vehicle Systems Lead
    BeamNG Team

    Joined:
    Apr 8, 2014
    Messages:
    1,957
    There's at least one good one that went the extra mile to make it work properly.
     
  16. jakelooker

    jakelooker
    Expand Collapse

    Joined:
    Aug 31, 2013
    Messages:
    151
  17. Nicloas

    Nicloas
    Expand Collapse

    Joined:
    Jul 25, 2020
    Messages:
    22
    Yep I was looking into Arcanox mods, but they are quite complex and also with only a brief documentation, ... I hoped that people who already played with electric engines would game me some specific advise what to do, since they most likely faces same problem as I am right now
     
  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