Outdated Unlimited Nitrous Bottle for All 0.28 Vehicles - (tutorial on how to make your own N2O mod)

Discussion in 'Mods and Skins' started by 23Terrabytes, Apr 10, 2023.

  1. 23Terrabytes

    23Terrabytes
    Expand Collapse

    Joined:
    Aug 1, 2022
    Messages:
    195
    Unlimited Nitrous Bottle for All 0.28 Vehicles

    This mod adds an unlimited nitrous oxide bottle option in the parts selection menu for all vanilla 0.28 BeamNG vehicles that currently have a nitrous oxide system. Its not technically unlimited, but it may as well be. The unlimited bottle has a 99999999999.99 capacity. (the default values are 4.54 for 10lb and 9.07 for 20lb bottles) Simply go to the parts selection menu and select "Unlimited Nitrous Oxide Bottle"


    Screenshot2023-04-10234827.png

    This mod has NOT been updated and uses files from 0.28 It may still work on newer versions, but use at your own risk. I might update one day, but for now check out my last post in this thread for a tutorial on how to make your own unlimited nitrous bottle mod for any game version and any vehicle that already has a nitrous oxide system.
     

    Attached Files:

    #1 23Terrabytes, Apr 10, 2023
    Last edited: Apr 21, 2024
    • Like Like x 2
  2. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,417
    Why not just add separate infinite bottles instead...
     
  3. 23Terrabytes

    23Terrabytes
    Expand Collapse

    Joined:
    Aug 1, 2022
    Messages:
    195
    My focus is a map Im working on. Someone wanted to have unlimited nitrous so I just batched out replacing the capacity in every N20 file really quick. I dont really mess with parts of vehicles, so I didnt really care to figure that out right away.

    EDIT; I didnt realize how easy it was, so I added it. At first I didnt really care, I just wanted a quick and simple N20 cheat mode for 0.28 The first version literally took seconds to find and replace capacity in files. I didnt realize the bottle "part" was just a single block of code in the n20 file.
     
    #3 23Terrabytes, Apr 10, 2023
    Last edited: Apr 11, 2023
  4. ghost_cauli

    ghost_cauli
    Expand Collapse

    Joined:
    Jul 14, 2022
    Messages:
    1,210
    It would take like two more minutes to make them separate.
     
    • Agree Agree x 1
  5. 23Terrabytes

    23Terrabytes
    Expand Collapse

    Joined:
    Aug 1, 2022
    Messages:
    195
    It wasnt two minutes, but was pretty easy.
     
    #5 23Terrabytes, Apr 10, 2023
    Last edited: Apr 11, 2023
  6. 23Terrabytes

    23Terrabytes
    Expand Collapse

    Joined:
    Aug 1, 2022
    Messages:
    195
    Updated to add Unlimited N20 Bottle in the parts selector instead of replacing the default capacities.
     
    • Like Like x 2
  7. Jocacar123

    Jocacar123
    Expand Collapse

    Joined:
    Apr 17, 2024
    Messages:
    3
    Can you you do V0.32 please
     
  8. 23Terrabytes

    23Terrabytes
    Expand Collapse

    Joined:
    Aug 1, 2022
    Messages:
    195
    I have had very little free time lately and have been trying to release a map as well as update my career mode mods. So as of right now this mod is not really on the table, (as you can tell since its a 0.28 mod and we are on 0.32) Although if I can get my map out soon, I can consider remaking this mod. I can give you a very quick tutorial on making it yourself if you want to give it a try.

    Find this file:
    C:\Steam\steamapps\common\BeamNG.drive\content\vehicles\rockbouncer.zip
    rockbouncer.zip\vehicles\rockbouncer\rockbouncer_n2o.jbeam

    Copy it to:
    (use launcher to open your user data folder)
    ..\0.32\mods\unpacked\YOURMODNAME\vehicles\rockbouncer\rockbouncer_n2o.jbeam

    Rename to: rockbouncer_n2o_YOURMODNAME.jbeam

    "YOURMODNAME" can be anything


    Open the file and find the 10lb bottle section (or 20lb - whichever you want to use as a base) and delete everything else except for that section and a single { bracket at the top and a single } bracket at the bottom. So now your file should look exactly like this:

    Code:
    {
    "n2o_bottle_10lb": {
        "information":{
            "authors":"BeamNG",
            "name":"10lb Nitrous Oxide Bottle",
            "value":200,
        },
        "slotType" : "n2o_bottle",
        "props": [
            ["func",     "mesh",        "idRef:", "idX:", "idY:", "baseRotation",            "rotation",            "translation",         "min", "max", "offset", "multiplier"],
            {"optional":true},
            ["null", "n2o_bottle_10lb", "stb1l","stb1r","stb2l",        {"x":-90, "y":-90, "z":-21}, {"x":0, "y":0, "z":0}, {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.159,"y":0.282, "z":0.043}}],
            {"optional":false},
        ],
        "powertrain": [
            ["type", "name", "inputName", "inputIndex"],
        ],
        "energyStorage": [
            ["type", "name"],
            ["n2oTank", "mainBottle"],
        ],
        "mainBottle": {
            "capacity": 4.54,
            "startingCapacity": 4.54,
        },
        "mainEngine": {
            "energyStorage": ["mainTank","fueltank_R", "fueltank_L", "mainBottle"],
        },
        "n2o": {
            "purgeValves:": ["f6r","f1r"],
        },
        "nodes": [
             ["id", "posX", "posY", "posZ"],
             //--N2O Bottle--
             {"nodeMaterial":"|NM_METAL"},
             {"frictionCoef":0.5},
             {"collision":true},
             {"selfCollision":false},
             {"group":"n2o_bottle"},
             {"nodeWeight":11},
             {"engineGroup":"n2o_bottle"},
             ["n2o", 0.0, -0.3, 0.88],
             {"engineGroup":""},
             {"group":""},
             {"collision":true},
        ],
        "beams": [
              ["id1:", "id2:"],
              {"beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
              {"beamSpring":1501000,"beamDamp":150},
              {"beamDeform":15000,"beamStrength":"FLT_MAX"},
              {"deformLimitExpansion":""},
              ["n2o", "stb1l"],
              ["n2o", "stb2l"],
              ["n2o", "stb1r"],
              ["n2o", "stb2r"],
              {"beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
              {"deformLimitExpansion":1.1},
        ],
    }
    }


    At the very top rename your part so it wont overwrite the original:

    Code:
    "n2o_bottle_10lb": {
        "information":{
            "authors":"BeamNG",
            "name":"10lb Nitrous Oxide Bottle",
            "value":200,
        },
        "slotType" : "n2o_bottle",
    to:
    Code:
    "n2o_bottle_YOURMODNAME": {
        "information":{
            "authors":"BeamNG",
            "name":"YOURMODNAME Nitrous Oxide Bottle",
            "value":200,
        },
        "slotType" : "n2o_bottle",


    then change the capacity:

    Code:
        "mainBottle": {
            "capacity": 4.54,
            "startingCapacity": 4.54,
        },
    to:
    Code:
        "mainBottle": {
            "capacity": 999999,
            "startingCapacity": 999999,
        },
    Save the file and youre done. You can either leave it as is or zip it up and place it into your mods folder like normal. Or while playing the game go into the mod manager and click the button to "pack mod". Now you have a zipped up mod and you can upload to the repo or the forums. Good luck.
     
    #8 23Terrabytes, Apr 21, 2024
    Last edited: Apr 21, 2024
  9. Jocacar123

    Jocacar123
    Expand Collapse

    Joined:
    Apr 17, 2024
    Messages:
    3
    I tried, but since I honestly have no programming experience and this was my first time, it didn't work at al
     
  10. Jocacar123

    Jocacar123
    Expand Collapse

    Joined:
    Apr 17, 2024
    Messages:
    3
    Can you make this mod in the near future
     
  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