How To Add A Part To A Vehicle

Discussion in 'Ideas and Suggestions' started by PedroC1999, Aug 11, 2014.

  1. PedroC1999

    PedroC1999
    Expand Collapse

    Joined:
    Aug 9, 2014
    Messages:
    15
    I have 'made' an engine for the pickup, not a visual one, but a configuration fil (.cs) One I wish to be a selectable part in the Part Picker for the vehicle, I have scavenged your Wiki and I do not find anything on adding it in, anyone help?
     
  2. KennyWah

    KennyWah
    Expand Collapse

    Joined:
    Jan 16, 2013
    Messages:
    2,659
    You need a .jbeam file

    Jbeam isn't just the physics skeleton it's a full-proof engine and transmission creation system too.

    well almost fool proof =S Has some occasional problems that all coding has like 1 character wrong = not gonna work

    I can only recommend you create "pickup_engine_mod.jbeam" and put this in it

    Code:
    {
    "pickup_engine_v8_mod": {
        "information":{
            "authors":"gabester",
            "name":"Gavril D-Series My V8 Engine",
        }
        "slotType" : "pickup_engine",
        "scalebeamSpring":0.84,
        "scalebeamDamp":1.3,
        "scalebeamDeform":1.5,
        "scalebeamStrength":1.78,
        "flexbodies": [
             ["mesh", "[group]:", "nonFlexMaterials"],
             ["pickup_engine_v8", ["pickup_engine"]],
             ["pickup_header_v8", ["pickup_engine","pickup_framecab"]],
             ["pickup_radtube_v8", ["pickup_engine","pickup_framefront", "pickup_cab", "pickup_frontmeat"]],
        ],
        "slots": [
            ["type", "default","description"]
            ["pickup_exhaust_v8","pickup_exhaust_v8","Gavril D-Series V8 Exhaust"],
            ["pickup_transmission","pickup_transmission_4A","Gavril D-Series Transmission"],
        ],
        "enginetorque":[
            ["rpm", "torque"]
            [0, 0],
            [500, 155],
            [1000, 265],
            [2000, 360],
            [3000, 395],
            [4000, 405],
            [5000, 372],
            [6000, 314],
        ],
        "engine":{    
            "idleRPM":850,
            "shiftDownRPM":3000,
            "shiftUpRPM":5000,
            "maxRPM":6000,
            "inertia":0.16,
            "friction":24,
            "brakingCoefRPS":0.15
            "burnEfficiency":0.45
            "throttleSensitivity":1.1
            "torqueReactionNodes:":["e1l","e2l","e4r"]
            },
        "nodes": [
             ["id", "posX", "posY", "posZ"],
             {"selfCollision":false}
             {"collision":true}
             //--4.5L V8 Engine-
             {"frictionCoef":0.7},
             {"nodeMaterial":"|NM_METAL"},
             {"nodeWeight":26},
             {"group":"pickup_engine"},
             ["e1r", -0.13, -1.14, 0.43],
             ["e1l", 0.13, -1.14, 0.43],
             ["e2r", -0.13, -1.68, 0.43],
             ["e2l", 0.13, -1.68, 0.43],
             {"engineGroup":"pickup_engine_intake"}
             ["e3r", -0.32, -1.14, 0.85],
             ["e3l", 0.32, -1.14, 0.85],
             ["e4r", -0.32, -1.68, 0.85],
             ["e4l", 0.32, -1.68, 0.85],
             {"engineGroup":""}
             {"group":""},
        ],
        
        "beams": [
              ["id1:", "id2:"],
              {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
              //--ENGINE CUBE--
              {"beamSpring":15001000,"beamDamp":300},
              {"beamDeform":95000,"beamStrength":"FLT_MAX"},
              ["e1r","e1l"],
              ["e1r","e2r"],
              ["e1r","e2l"],
              ["e1r","e3r"],
              ["e1r","e3l"],
              ["e1r","e4r"],
              ["e1r","e4l"],
              ["e1l","e2r"],
              ["e1l","e2l"],
              ["e1l","e3r"],
              ["e1l","e3l"],
              ["e1l","e4r"],
              ["e1l","e4l"],
              ["e2r","e2l"],
              ["e2r","e3r"],
              ["e2r","e3l"],
              ["e2r","e4r"],
              ["e2r","e4l"],
              ["e2l","e3r"],
              ["e2l","e3l"],
              ["e2l","e4r"],
              ["e2l","e4l"],
              ["e3r","e3l"],
              ["e3r","e4r"],
              ["e3r","e4l"],
              ["e3l","e4r"],
              ["e3l","e4l"],
              ["e4r","e4l"],
              {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
        ],
        "triangles": [
                ["id1:","id2:","id3:"],
                //engine
        ],
    }
    }
    now take this and edit the rpm, burnefficiency, idlerpm, torque, shiftrpms and such

    this code has already been modified to add a new engine just put it inside a file called "pickup_engine_mod" and your good to start editing this engine.

    if going for realism try to keep your torque edits about 150max up or down from where they are now maybe you can go up by 200 and down by only 75 unless you want to make a 100 000 000hp ugliness mod, but fill yer boots.
     
    #2 KennyWah, Aug 11, 2014
    Last edited: Aug 11, 2014
  3. PedroC1999

    PedroC1999
    Expand Collapse

    Joined:
    Aug 9, 2014
    Messages:
    15
    Hello Mate,

    Ive done the JBEAM bit and everything, here it is...

    It is basically an upped power version of the Regular pickup, with an added SupereCharger option that adds 40nM of Torque and delays the throttle response abit, Could you check if its all renamed correct? The file name is 'pickup_engine_5l'
     

    Attached Files:

  4. KennyWah

    KennyWah
    Expand Collapse

    Joined:
    Jan 16, 2013
    Messages:
    2,659
    can you possibly use the # symbol to display code rather than php?
     
  5. PedroC1999

    PedroC1999
    Expand Collapse

    Joined:
    Aug 9, 2014
    Messages:
    15
    Sorry, ive attached it instead.

    Im used to using Huddler as my forum format
     
  6. KennyWah

    KennyWah
    Expand Collapse

    Joined:
    Jan 16, 2013
    Messages:
    2,659
    See where it says "Gavril D Series V8 Engine"
    you need to change this line to fit a name that is different or the game will struggle to add it.

    Code:
    {
    [COLOR=#ff0000]"pickup_engine_v8": {[/COLOR]
        "information":{
            "authors":"gabester",
    [COLOR=#008000]        "name":"Gavril D-Series 5.0L V8 Engine",[/COLOR]
        }
    try something like this

    Code:
    {
    [COLOR=#008000]"pickup_engine_v8_mod": {[/COLOR]
        "information":{
            "authors":"gabester",
    [COLOR=#008000]        "name":"Gavril D-Series 5.0L V8 Engine",[/COLOR]
        }
    I see you attempted to rename but the top one is kinda like how jbeam finds it and the lower name is how the game sees it.
    both need unique names

    - - - Updated - - -

    For code display use the hashtag/number symbol one as seen here

    - - - Updated - - -

    Please reply with how it's working

    also please go into your slots line of code and remove "v8 engine tuning"
    Code:
    ],    "slots": [
            ["type", "default","description"]
            ["pickup_exhaust_v8","pickup_exhaust_v8","Gavril D-Series V8 Exhaust"],
            ["pickup_transmission","pickup_transmission_4A","Gavril D-Series Transmission"],
    [COLOR=#ff0000]        ["pickup_enginetuning_v8","", "Gavril D-Series Engine Tuning"],
    [/COLOR]
     

    Attached Files:

    • 12a8374b01.png
    • 14868b61ff.png
  7. PedroC1999

    PedroC1999
    Expand Collapse

    Joined:
    Aug 9, 2014
    Messages:
    15
    Thanks I will try now, makes sense.

    - - - Updated - - -

    It works fine now thanks! You are legendary! Do you know what file has the Pickup Transmition info? Can't seam to find an obvious named one
     
  8. KennyWah

    KennyWah
    Expand Collapse

    Joined:
    Jan 16, 2013
    Messages:
    2,659
    Look inside the pickup_engine_i6 and look deep

    make a file called "pickup_t_mod"

    Code:
    {
    "pickup_transmission_5M_custom": {
        "information":{
            "authors":"gabester",
            "name":"Gavril D-Series Aftermarket Manual Transmission",
        }
        "engine":{
            "transmissionType":"manual",
            // -1, 0 (neutral), 1, etc
            "gears":[-3.25, 0, 3.25, 2.37, 1.56, 1.0, 0.75]
            "clutchDuration":0.35
            "clutchTorque":1000
            //temporary until manual is coded
            "viscousCoupling":12
            "lockingTorqueLimit":500
            },
        "slotType" : "pickup_transmission",
        "scalebeamSpring":0.84,
        "scalebeamDamp":1.3,
        "scalebeamDeform":1.5,
        "scalebeamStrength":1.78,
        "flexbodies": [
             ["mesh", "[group]:", "nonFlexMaterials"],
             ["pickup_transmission", ["pickup_engine","pickup_transmission"]],
             //cover up the auto shifter numbering
             ["pickup_gauges_cover_M", ["pickup_firewall"]],
        ],    
        "props": [
            ["func"        , "mesh"                , "idRef:", "idX:", "idY:", "baseRotation"      , "rotation"                 , "translation"        , "min", "max", "offset", "multiplier"]
            //shifter
            ["gear_M"      , "pickup_shifter_M"    , "fr8", "fr8l", "fr11", {"x":75, "y":0, "z":0} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 1, 0, 1],
            //pedal
            ["clutch"       , "pickup_clutchpedal"   , "fr8", "fr8l", "fr1l", {"x":-90, "y":0, "z":0}, {"x":-25, "y":0, "z":0}    , {"x":0.0, "y":0, "z":0}, 0, 1, 0, 1],
        ],
        "nodes": [
             ["id", "posX", "posY", "posZ"],
             {"selfCollision":false}
             {"collision":true}
             //--5 Speed Manual-
             {"frictionCoef":0.7},
             {"nodeMaterial":"|NM_METAL"},
             {"nodeWeight":35},
             {"group":"pickup_transmission"},
             ["tra1", 0.0, -0.59, 0.48], 
             {"group":""},
             
        ],
        "beams": [
              ["id1:", "id2:"],
              {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
              //--TRANSMISSION CONE--
              {"beamSpring":15001000,"beamDamp":300},
              {"beamDeform":95000,"beamStrength":"FLT_MAX"},
              ["tra1","e1r"],
              ["tra1","e3r"],
              ["tra1","e1l"],
              ["tra1","e3l"],
              {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
        ],
    
        "triangles": [
                ["id1:","id2:","id3:"],
                
                
        ],
    }
    }
     
  9. vmlinuz

    vmlinuz
    Expand Collapse

    Joined:
    Mar 2, 2014
    Messages:
    2,409
    You have no badge. Bro do you even beamng?
     
  10. PedroC1999

    PedroC1999
    Expand Collapse

    Joined:
    Aug 9, 2014
    Messages:
    15
    Yup, but lost access to my email accounts due to someone Spam Hacking me, all that before I could link the game with it. Im stuck on 0.3.3.0
     
  11. crashman50

    crashman50
    Expand Collapse

    Joined:
    Jun 1, 2014
    Messages:
    26
    where do i find the code?
     
  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