1. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice

More Fuel Types

Discussion in 'General Discussion' started by Capkirk, Mar 2, 2019.

  1. Capkirk

    Capkirk
    Expand Collapse

    Joined:
    Nov 19, 2017
    Messages:
    671
    While looking at the fuelTank.lua files to update the wiki, I have figured out how to create custom fuel types in BeamNG. It is actually fairly simple, and only requires adding a couple lines in the Jbeam. You can look how in the wiki entry here, or look at some examples I made.
    Compressed Natural Gas (@ 250 bar)
    Code:
    "mainTank": {
            "energyType":"cng",
            "fuelCapacity": 40,
            "startingFuelCapacity": "$fuel",
            "fuelLiquidDensity": 0.197,
            "energyDensity": 53600000,
            "fuel": {"[engineGroup]:":["fuel"]},
            "breakTriggerBeam": "fuelTank",
        }
    Liquefied Natural Gas (@ −160 °C)
    Code:
    "mainTank": {
            "energyType":"lng",
            "fuelLiquidDensity": 0.487,
            "energyDensity": 53600000,
            "fuelCapacity": 40,
            "startingFuelCapacity": "$fuel",
            "fuel": {"[engineGroup]:":["fuel"]},
            "breakTriggerBeam": "fuelTank",
        }
    Liquefied Petroleum Gas
    Code:
    "mainTank": {
            "energyType":"lng",
            "fuelLiquidDensity": 0.54,
            "energyDensity": 49600000,
            "fuelCapacity": 40,
            "startingFuelCapacity": "$fuel",
            "fuel": {"[engineGroup]:":["fuel"]},
            "breakTriggerBeam": "fuelTank",
        }
    Nitromethane
    Code:
    "mainTank": {
            "energyType":"nitromethane",
            "fuelLiquidDensity": 1.14,
            "energyDensity": 119930000,
            "fuelCapacity": 40,
            "startingFuelCapacity": "$fuel",
            "fuel": {"[engineGroup]:":["fuel"]},
            "breakTriggerBeam": "fuelTank",
        }
    E85
    Code:
    "mainTank": {
            "energyType":"e85",
            "fuelLiquidDensity": 0.78,
            "energyDensity": 33100000,
            "fuelCapacity": 40,
            "startingFuelCapacity": "$fuel",
            "fuel": {"[engineGroup]:":["fuel"]},
            "breakTriggerBeam": "fuelTank",
        }
    Compressed Hydrogen (@ 690 bar)
    Code:
    "mainTank": {
            "energyType":"hydrogen",
            "fuelLiquidDensity": 0.099,
            "energyDensity": 11300000,
            "fuelCapacity": 40,
            "startingFuelCapacity": "$fuel",
            "fuel": {"[engineGroup]:":["fuel"]},
            "breakTriggerBeam": "fuelTank",
        }
    Compressed Anti-Hydrogen (@690 bar)
    Code:
    "mainTank": {
            "energyType":"antimatter",
            "fuelLiquidDensity": 0.099,
            "energyDensity": 89875517874000000,
            "fuelCapacity": 40,
            "startingFuelCapacity": "$fuel",
            "fuel": {"[engineGroup]:":["fuel"]},
            "breakTriggerBeam": "fuelTank",
        }
    Once you define this in the fuel tank for the car, you only need to change the fuel type of your engine, and it'll work. Your fuel tank will be appropriately heavier or lighter, and your range will change depending on the density of your fuel.
     
    • Like Like x 3
    • Informative Informative x 1
  2. CaptainZoll

    CaptainZoll
    Expand Collapse

    Joined:
    Nov 10, 2016
    Messages:
    2,303
    hmm, I wonder if this is how they're going to implement batteries for the ESBR4.
     
  3. Capkirk

    Capkirk
    Expand Collapse

    Joined:
    Nov 19, 2017
    Messages:
    671
    Actually, electric batteries and motors are already fully implemented in BeamNG, and work fine right now.
     
    • Agree Agree x 2
    • Informative Informative x 1
  4. FLyInG 2 YoUr SoUL

    FLyInG 2 YoUr SoUL
    Expand Collapse

    Joined:
    May 31, 2016
    Messages:
    4,838
    Can confirm. This is more or less how I implemented methanol for my mod in the end... :)

    Works like a charm, although in my case it required massive adjustments to the burnEfficiency parameter - fuel consumption quadrupled in the process due to lower fuel density...!!! :eek:
     
    • Informative Informative x 3
    • Like Like x 1
  5. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    1,443
    Why those electric vehicles use torqueconverter in their transmission? Why couldn't they just use a clutch that always engaged(turn off clutch assist) and a sequential transmission
     
  6. NGAP NSO Shotgun Chuck

    NGAP NSO Shotgun Chuck
    Expand Collapse

    Joined:
    Mar 6, 2015
    Messages:
    1,247
    As far as I know, that's not excessively inaccurate. Hot Rod Magazine did a test and, if I remember correctly, found that methanol nearly doubles an engine's horsepower output but also flushes fuel economy down the toilet - though I don't remember how much by.
     
  7. FLyInG 2 YoUr SoUL

    FLyInG 2 YoUr SoUL
    Expand Collapse

    Joined:
    May 31, 2016
    Messages:
    4,838
    Yes indeed.

    burnEfficiency for my engine used to be unusually low, right to simulate that while still burning petrol.

    Coupled with proper methanol simulation, though, that produced like 0.2 mpg figures... ;)
     
    • Like Like x 2
  8. NGAP NSO Shotgun Chuck

    NGAP NSO Shotgun Chuck
    Expand Collapse

    Joined:
    Mar 6, 2015
    Messages:
    1,247
    Ah. Well then.
     
  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