Experimental Adjustable Thermostat Radiator

Discussion in 'Content Creation' started by default0.0player, Nov 23, 2019.

Tags:
  1. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    660
    Create folders in your user folder so it looks like this
    C:\Users\yourusername\Documents\BeamNG.drive\lua\vehicle\powertrain\
    and move the
    \Steam\steamapps\common\BeamNG.drive\lua\vehicle\powertrain\combustionEngineThermals.lua
    to the above folder to avoid overwrite official content
    Open the lua file via notepad (notepad++ is recommended) and scroll to line 517
    Code:
    local radiatorActive = min((hasCoolantRadiator and M.coolantTemperature > thermostatTemperature and not parentEngine.isDisabled) and M.coolantTemperature - thermostatTemperature or 0, 1)
    change it to
    Code:
    local radiatorActive = min((hasCoolantRadiator and M.coolantTemperature > thermostatTemperature and not parentEngine.isDisabled) and (M.coolantTemperature - thermostatTemperature)/thermostatRange or 0, 1)
    Scroll to line 1167 and add the following text between line 1167 and line 1168
    Code:
      thermostatRange = jbeamData.thermostatRange or 1
    Save it.

    Then mod your vehicle, in this example the ETKI.
    Create the vehicle folder in your user folder C:\Users\yourusername\Documents\BeamNG.drive\vehicles\etki\
    Copy the radiator jbeam flie, in this example, the \Steam\steamapps\common\BeamNG.drive\content\vehicles\etki.zip\vehicles\etki\etki_radiator.jbeam
    into the C:\Users\yourusername\Documents\BeamNG.drive\vehicles\etki\ AND RENAME IT
    open the jbeam file and rename the "etki_radiator" and "name":"Radiator",
    Add the "thermostatRange" below the "thermostatTemperature"
    Code:
    {
    "etki_radiator_thermod": {
        "information":{
            "authors":"BeamNG",
            "name":"Radiator(thermostat mod)",
            "value":130,
        }
        "slotType" : "etki_radiator",
        "flexbodies": [
             ["mesh", "[group]:", "nonFlexMaterials"],
             ["etki_radtube", ["etki_engine","etki_radiator"]],
             ["etki_radiator", ["etki_radiator"]],
        ],
        "mainEngine":{
            "radiatorArea":0.34,
            "radiatorEffectiveness":7500,
            "coolantVolume":8,
            "radiatorFanType":"electric",
            "radiatorFanTemperature":100,
            "radiatorFanMaxAirSpeed":2,
            "thermostatTemperature":80,
            "thermostatRange":20,
            },
        "nodes": [
             ["id", "posX", "posY", "posZ"],
             //radiator
             {"frictionCoef":0.5},
             {"nodeMaterial":"|NM_METAL"},
             {"selfCollision":false},
             {"collision":true}
             {"group":"etki_radiator"},
             {"nodeWeight":2.7},
             {"engineGroup":"radiator"}
             {"chemEnergy":200,"burnRate":0.4"flashPoint":250,"specHeat":0.8,"smokePoint":150,"selfIgnitionCoef":false},
             ["rad1", 0.0, -1.8, 0.7],
             {"chemEnergy":false,"burnRate":false,"flashPoint":false,"specHeat":false,"smokePoint":false,"selfIgnitionCoef":false},
             ["rad2", 0.0, -1.8, 0.3],
             {"engineGroup":""}
             {"group":""},
        ],
        "beams": [
              ["id1:", "id2:"],
              {"beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
              {"beamSpring":1000000,"beamDamp":150},
              {"beamDeform":7500,"beamStrength":"FLT_MAX"},
              {"deformGroup":"radiator_damage","deformationTriggerRatio":0.05}
              //radiator
              {"deformLimitExpansion":""},
              ["rad2", "rad1"],
              ["rad1", "f15"],
              ["rad1", "f15r"],
              ["rad1", "f13rr"],
              ["rad1", "f11rr"],
              ["rad1", "f15l"],
              ["rad1", "f13ll"],
              ["rad1", "f11ll"],
              ["rad2", "f11"],
              ["rad2", "f11ll"],
              ["rad2", "f11rr"],
              ["rad2", "f13ll"],
              ["rad2", "f13rr"],
              //to engine
              {"beamSpring":14000,"beamDamp":300},
              {"beamDeform":1450,"beamStrength":3600},
              {"optional":true}
              //duplicate beams for better flexbody breaking
              ["rad1","e4r"],
              ["rad1","e4l"],
              ["rad1","e4r"],
              ["rad1","e4l"],
              //tube
              ["rad2","e4l"],
              {"optional":false}
              {"deformGroup":""}
              {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
        ],
    }
    "etki_radiator_race_thermod": {
        "information":{
            "authors":"BeamNG",
            "name":"High Performance Radiator(thermostat mod)",
            "value":270,
        }
        "slotType" : "etki_radiator",
        "flexbodies": [
             ["mesh", "[group]:", "nonFlexMaterials"],
             ["etki_radtube", ["etki_engine","etki_radiator"]],
             ["etki_radiator", ["etki_radiator"]],
        ],
        "mainEngine":{
            "radiatorArea":0.34,
            "radiatorEffectiveness":13000,
            "coolantVolume":9,
            "radiatorFanType":"electric",
            "radiatorFanTemperature":100,
            "radiatorFanMaxAirSpeed":3,
            "thermostatTemperature":80,
            "thermostatRange":20,
            },
        "nodes": [
             ["id", "posX", "posY", "posZ"],
             //radiator
             {"frictionCoef":0.5},
             {"nodeMaterial":"|NM_METAL"},
             {"selfCollision":false},
             {"collision":true}
             {"group":"etki_radiator"},
             {"nodeWeight":2.7},
             {"engineGroup":"radiator"}
             {"chemEnergy":200,"burnRate":0.4"flashPoint":250,"specHeat":0.8,"smokePoint":150,"selfIgnitionCoef":false},
             ["rad1", 0.0, -1.8, 0.7],
             {"chemEnergy":false,"burnRate":false,"flashPoint":false,"specHeat":false,"smokePoint":false,"selfIgnitionCoef":false},
             ["rad2", 0.0, -1.8, 0.3],
             {"engineGroup":""}
             {"group":""},
        ],
        "beams": [
              ["id1:", "id2:"],
              {"beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
              {"beamSpring":1000000,"beamDamp":150},
              {"beamDeform":7500,"beamStrength":"FLT_MAX"},
              {"deformGroup":"radiator_damage","deformationTriggerRatio":0.05}
              //radiator
              {"deformLimitExpansion":""},
              ["rad2", "rad1"],
              ["rad1", "f15"],
              ["rad1", "f15r"],
              ["rad1", "f13rr"],
              ["rad1", "f11rr"],
              ["rad1", "f15l"],
              ["rad1", "f13ll"],
              ["rad1", "f11ll"],
              ["rad2", "f11"],
              ["rad2", "f11ll"],
              ["rad2", "f11rr"],
              ["rad2", "f13ll"],
              ["rad2", "f13rr"],
              //to engine
              {"beamSpring":14000,"beamDamp":300},
              {"beamDeform":1450,"beamStrength":3600},
              {"optional":true}
              //duplicate beams for better flexbody breaking
              ["rad1","e4r"],
              ["rad1","e4l"],
              ["rad1","e4r"],
              ["rad1","e4l"],
              //tube
              ["rad2","e4l"],
              {"optional":false}
              {"deformGroup":""}
              {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
        ],
    }
    }

    Then select the mod radiator
    BeamNGdrive-017129059-RELEASE-x642019_11_2312_00_11.png

    And it works as shown

    BeamNGdrive-017129059-RELEASE-x642019_11_2312_06_22.png BeamNGdrive-017129059-RELEASE-x642019_11_2312_04_07.png
     

    Attached Files:

    • Like Like x 1
    • Informative Informative x 1
  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