Unsolved How do create and show in-game vehicle parts

Discussion in 'Mod Support' started by Leandro., Apr 16, 2021.

  1. Leandro.

    Leandro.
    Expand Collapse
    Banned

    Joined:
    Dec 19, 2018
    Messages:
    92
    I am new in vehicle modding. How do i set up a vehicle part to appear in-game?

    My objective is to create a set of mudflaps for the trailers, by reeskining them into new parts.

    I set up a Winrar file with the files. But they don't appear since i don't have knowledge of how the configs and parameters work. Is there a link for creating parts for vehicles?
     
  2. drewr1122

    drewr1122
    Expand Collapse

    Joined:
    Mar 27, 2021
    Messages:
    164
    Should be something on the wiki. In general tutorials are hard to find since a lot of the stuff is outdated.
     
  3. S.Ali.M

    S.Ali.M
    Expand Collapse

    Joined:
    Jan 12, 2021
    Messages:
    1,079
    For example, the DaddelZeit's stupidity tall exhaust for the bus is just a .dae file and a .jbeam file.
    The .jbeam:
    Code:
    {
    
    "citybus_exhaust_tall": {
        "information":{
            "authors":"BeamNG",
            "name":"Stupidly Tall Single Exhaust",
            "value":1500,
        },
        "slotType" : "citybus_exhaust",
        "flexbodies": [
             ["mesh", "[group]:", "nonFlexMaterials"],
             ["citybus_exhaust_tall", ["citybus_exhaust"]],
        ],
        //"mainEngine":{
        //    "torqueModExhaust":[
        //        ["rpm", "torque"],
        //        [0,        0],
        //        [1000, -4   ],
        //        [2000, -9.2 ],
        //        [3000, -13.6],
        //        [4000, -17.2],
        //        [5000, -25.2],
        //        [6000, -32.0],
        //        [7000, -44.0],
        //        [8000, -55.0],
        //    ],
        //},
        "nodes": [
             ["id", "posX", "posY", "posZ"],
             {"selfCollision":true},
             {"collision":true},
             //--Exhaust-
             {"frictionCoef":0.5},
             {"nodeMaterial":"|NM_METAL"},
             {"nodeWeight":2.0},
             {"group":"citybus_exhaust"},
             ["ex1",1.07, 6.065, 9.94, {"afterFireAudioCoef":0,"afterFireVisualCoef":0, "exhaustAudioMufflingCoef": 0.1, "exhaustAudioGainChange":-4}],
             {"selfCollision":false},
             {"collision":false},
             ["ex2",1.15, 6.0, 9.73],
             ["ex3",0.99, 6.0, 7.73],
             ["ex4",1.15, 5.8, 5.73],
             ["ex5",0.99, 5.8, 3.73],
             ["ex6",1.07, 5.97, 2.0],
             {"group":""},
             ["ex7",1.07, 5.75, 9.88],
             //rigidifier
             {"selfCollision":false},
             {"collision":false},
        ],
    
        "beams": [
              ["id1:", "id2:"],
              //--EXHAUST--
              {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1, "beamShortBound":1},
              {"deformLimitExpansion":1.1},
              {"beamSpring":1501000,"beamDamp":250},
              {"beamDeform":10000,"beamStrength":"FLT_MAX"},
              ["ex1", "ex5"],
              ["ex1", "ex3"],
              ["ex1", "ex2"],
              ["ex1", "ex4"],
              ["ex2", "ex3"],
              ["ex1", "ex7", {"isExhaust":true}],
              ["ex7", "ex5"],
              ["ex7", "ex4"],
              ["ex7", "ex3"],
              ["ex7", "ex2"],
              ["ex7", "ex6", {"isExhaust":true}],
              ["ex1", "ex6"],
    
              ["ex3", "ex5"],
              ["ex5", "ex4"],
              ["ex4", "ex2"],
              ["ex2", "ex5"],
              ["ex3", "ex4"],
              ["ex4", "tt17ll"],
              ["ex2", "tt17ll"],
              ["ex4", "tt18ll"],
              ["ex5", "tt17ll"],
              ["ex3", "tt18ll"],
              ["ex3", "tt18l"],
              ["ex4", "st17ll"],
              ["ex5", "st17ll"],
              ["ex3", "st17ll"],
              ["ex2", "st17ll"],
              ["ex2", "sp18l"],
    
              ["ex5", "ex6"],
              ["ex4", "ex6"],
              ["ex3", "ex6"],
              ["ex2", "ex6"],
              ["ex6", "sp18ll"],
              ["ex6", "sp17ll"],
    
              //support beams
              {"beamPrecompression":0.95, "beamType":"|SUPPORT", "beamLongBound":15},
              {"beamDeform":50000,"beamStrength":250000},
              {"optional":true},
              {"optional":false},
              ["ex1", "sp18ll"],
              ["ex1", "sp18l"],
              ["ex2", "tt16l"],
              ["ex2", "tt16ll"],
              ["ex3", "tt16l"],
              ["ex3", "tt16ll"],
              ["ex7", "tt16l"],
              ["ex7", "tt16ll"],
              ["ex1", "tt18r"],
              ["ex1", "tt18rr"],
              ["ex7", "tt18rr"],
              ["ex7", "tt18r"],
              ["ex7", "tt17rr"],
              ["ex7", "tt17r"],
              ["ex1", "tt17rr"],
              ["ex1", "tt17r"],
              ["ex7", "tt17ll"],
              ["ex7", "tt17l"],
              {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1, "beamShortBound":1},
        ],
        "triangles": [
              ["id1:","id2:","id3:"],
              {"triangleType":"NONCOLLIDABLE"},
              ["ex1", "ex2", "ex3"],
              {"triangleType":"NORMALTYPE"},
        ],
    },
    }
    
    To show a part in the parts selector, the "slotType" do it. Only thing you should know, is the slot name in game. The other things change depending on the type of mod.
     
  4. Leandro.

    Leandro.
    Expand Collapse
    Banned

    Joined:
    Dec 19, 2018
    Messages:
    92
    Ok, i see in this jbeam file that there are slot parameters such as "slotType - citybus_exhaust". Is there a documentation for these parts?
     
  5. S.Ali.M

    S.Ali.M
    Expand Collapse

    Joined:
    Jan 12, 2021
    Messages:
    1,079
    As I searched, no. But you can look at the other mods that how they work. You can learn anything with read the other mods .jbeam files.
    For example in all of my mods, especially in the first one I used other mods to learn how to do.
    --- Post updated ---
    Btw, when I'm awake you're asleep because you're from south America and I'm from Asia. lol
     
  6. Leandro.

    Leandro.
    Expand Collapse
    Banned

    Joined:
    Dec 19, 2018
    Messages:
    92
    isnt modded files encrypted in some way? i remember seeing an unpacked folder on the mods section. Is mods already made "packed" or that it is just a map thing?
     
  7. S.Ali.M

    S.Ali.M
    Expand Collapse

    Joined:
    Jan 12, 2021
    Messages:
    1,079
    Unpacked folder is for WIP mods. For example when you edit a unpacked skin, it shows up in the game at that moment without resetting the game.(I think it just happens to skins) Also editing the unpacked files is easier because when you edit a file in .zip mods, the winrar should extract it for opening them, then compress for saving it, so if you extract a mod or your own WIP mod in unpacked folder, you can edit that easier. (Your mod will run in the game like normal mods)
     
    • Agree Agree x 1
  8. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,058
    Unpacking a mod and working on the unpacked version is way easier. The best way is to start from an unpacked mod and only pack it when you want to release it I think.
     
    • Agree Agree x 1
  9. Leandro.

    Leandro.
    Expand Collapse
    Banned

    Joined:
    Dec 19, 2018
    Messages:
    92
    Ok. I still don't understand packed and unpacked mods, or the unpacked folder in general. So let me see if i got it from my experience.


    The unpacked folder consists of separated main folders. Which are the mods, which has the content inside them. Usually used for developing and testing the files.
    They are different from the mods folder because they update live.


    Packing an unpacked mod is basically making a winrar file. And pasting it over the mods folder.

    Is this right?
     
  10. P_enta

    P_enta
    Expand Collapse

    Joined:
    Jan 11, 2020
    Messages:
    3,029
    have fun figuring all this out, theres essentially 0 documentation and everything is extremely confusing + people explain like you know what you're doing
     
  11. Leandro.

    Leandro.
    Expand Collapse
    Banned

    Joined:
    Dec 19, 2018
    Messages:
    92
    Isn't that what you would expect from modding? I personally find myself in this situation in basically any game i want to mod, i consider this a normal thing.
     
    • Agree Agree x 1
  12. S.Ali.M

    S.Ali.M
    Expand Collapse

    Joined:
    Jan 12, 2021
    Messages:
    1,079
    It's right. But I think you meant pasting a mod under the mods folder not over that.
     
  13. Leandro.

    Leandro.
    Expand Collapse
    Banned

    Joined:
    Dec 19, 2018
    Messages:
    92
    yep. I use the example of "put something over there" for anything. I don't know how to speak computer-logical lol.


    Well, back on the main subject. I got another question about parts.

    The Jbeam sets the nodes for the mesh/3d model, among other things. But how do i set up the mesh? I looked up at the t-series truck horn trumpet and i noticed the mesh of the trumpet isn't located in the mod i looked. And the Jbeam itself has specific horns only for the T-Series, including a "truck type" horn somewhere. That means i could create more specific options like this?
     
  14. S.Ali.M

    S.Ali.M
    Expand Collapse

    Joined:
    Jan 12, 2021
    Messages:
    1,079
    Um... sorry idk. I didn't made a vehicle part mod or vehicle mod at all, I just figured out something by experience. Sorry!
     
  15. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,058
    You should look at another mod that does have a DAE file somewhere in it, then you can figure out how it works. And yeah you can basically create any options you want if you get to know how the slots system works and how specific lines in Jbeam affect the vehicle.
     
  16. Leandro.

    Leandro.
    Expand Collapse
    Banned

    Joined:
    Dec 19, 2018
    Messages:
    92
    Slot system? Mind telling me more about it?
     
  17. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,058
    There used to be some info about it on the old documentation system which appears to have been deleted, and I can't remember it all now, you should probably wait until it's all documented in the new documentation system and check there. Maybe someone else can explain it meanwhile, a lot of people here are way better at explaining than me.
     
  18. TC203

    TC203
    Expand Collapse

    Joined:
    Sep 9, 2020
    Messages:
    133
    Code:
    {
    "object": {
        "information":{
            "authors":"TC203",
            "name":"Object",
            "value":1600,
        },
        "slotType" : "name_of_slot_object_goes_in",
        "slots": [
            ["type", "default", "description"],
            ["engine","engine2", "Body"],
        ],
    This is a typical slots section from a jbeam (the top part above slotType is the start of a jbeam and is not part of the slots section). The "slotType" is the name of the slot your thing goes into. For example, "pigeon_engine". On the lines below that, there is a "slots" jbeam section. This is not needed if your object doesn't need any slots for other objects. The "type" column is the name of your slot, the "default" column is the name of the default object that goes in that slot and the "description" column is a very brief description of what goes in that slot, which will be displayed next to the slot in the parts selector.
     
  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