Reference Jbeams inside other Jbeams

Discussion in 'Ideas and Suggestions' started by wrinkle345, Jul 23, 2016.

  1. wrinkle345

    wrinkle345
    Expand Collapse

    Joined:
    Jul 2, 2015
    Messages:
    546
    Something I, and every other vehicle part modder, would wish for is a way to modify vehicle parts without having to have the entire jbeam for that part. And since updates can change these jbeams, modders have to proofread all of their part mods to see what was changed.

    This is my idea. In jbeam files you should have access to a type of "reference parameter" for when you want to only modify some of a part's jbeam.

    For example, you want to modify the ETK 800's "Wagon Unibody" to have a "Rollcage" Slot. Normally, you'd have to copy over the entire jbeam to simply add one slot, including it's nodes, beams, collision triangles, cameras, etc. All of which can change in any update.

    Instead, you can insert a reference to the original part's jbeam for everything, and just add the slot. That way, when an update comes, your modified part will also be updated.

    Here's an example ETK 800 "Wagon Unibody" jbeam with references to the original and the added "Rollcage" slot.

    Code:
    {
    "etk800_body_wagon_rollcage": {
        "information":{
            "authors":"BeamNG/wrinkle345",
            "name":"Wagon Unibody w/rollcage",
            "value":40000,
        },
        "slotType" : "etk800_body",
        "slots": [
            ["type", "default", "description"]
            ["etk800_rollcage","", "Rollcage"],
            {@"etk800_body_wagon"}
        ],
        "props": [
            ["func"      , "mesh"              , "idRef:", "idX:", "idY:"            , "baseRotation"        , "rotation"                 , "translation"        , "min", "max", "offset", "multiplier"]
            {@"etk800_body_wagon"}
        ],
        "refNodes":[
            ["ref:", "back:", "left:", "up:", "leftCorner:", "rightCorner:"]
            {@"etk800_body_wagon"}
        ],
        "cameraChase":{
            {@"etk800_body_wagon"}
        },
        "cameraExternal":{
            {@"etk800_body_wagon"}
        },
        "camerasInternal":[
            ["type", "x", "y", "z", "fov", "id1:", "id2:", "id3:", "id4:", "id5:", "id6:"],
            {@"etk800_body_wagon"}
        ],
        "flexbodies": [
            ["mesh", "[group]:", "nonFlexMaterials"],
            {@"etk800_body_wagon"}
        ],
        "nodes": [
             ["id", "posX", "posY", "posZ"],
            {@"etk800_body_wagon"}
        ],
        "beams": [
              ["id1:", "id2:"],
            {@"etk800_body_wagon"}
        ],
        "triangles": [
                ["id1:","id2:","id3:"],
            {@"etk800_body_wagon"}
        ],
    }
    Obviously it doesn't have to be that specific line, but hopefully it shows what I mean by it.
     
    • Like Like 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