Pickup rpm gauge for diesel mod

Discussion in 'Content Creation' started by MasterFluffy, Jul 6, 2017.

  1. MasterFluffy

    MasterFluffy
    Expand Collapse

    Joined:
    Jan 27, 2017
    Messages:
    91
    So I'm making a diesel mod for the D-series pickup.

    I have new RPM gauges, I updated these two files pickup_gauges_d.dds & pickup_gauges_g.dds. I can replace current gauges and I see they are working. Now where I need help..... I want to keep the normal gauges there for the normal i6 and v8. but for my lower rpm diesel I'll rename the gauges and hoping I can call only these gauges when I'm using diesel engine? Maybe I need to edit or create a lua file?
     
  2. KJP12

    KJP12
    Expand Collapse

    Joined:
    Jul 26, 2016
    Messages:
    669
    You are going to have to make a new interior as the gauges are bound to that. Unless there is another way I'm not seeing, that is what you have to do.
     
  3. MasterFluffy

    MasterFluffy
    Expand Collapse

    Joined:
    Jan 27, 2017
    Messages:
    91
    mmm.... ok so I think thats all done in the materials.cs file



    I copied the singleton Material(pickup_interior) to make 2nd interior for diesel....

    singleton Material(pickup_interior)
    {
    mapTo = "pickup_interior_diesel";
    reflectivityMap[1] = "vehicles/common/pickup/pickup_interior_s_diesel.dds";
    diffuseMap[1] = "vehicles/common/pickup/pickup_interior_d_diesel.dds";
    specularMap[1] = "vehicles/common/pickup/pickup_interior_s_diesel.dds";
    normalMap[1] = "vehicles/common/pickup/pickup_interior_n_diesel.dds";
    reflectivityMap[0] = "vehicles/common/pickup/pickup_interior_s_diesel.dds";
    diffuseMap[0] = "vehicles/common/pickup/pickup_interior_d_diesel.dds";
    specularMap[0] = "vehicles/common/pickup/pickup_interior_s_diesel.dds";
    normalMap[0] = "vehicles/common/pickup/pickup_interior_n_diesel.dds";
    diffuseColor[1] = "0.4 0.4 0.4 1";
    specularPower[1] = "32";
    useAnisotropic[1] = "1";
    diffuseColor[0] = "1 1 1 1";
    specularPower[0] = "32";
    useAnisotropic[0] = "1";
    castShadows = "1";
    translucent = "0";
    translucentBlendOp = "None";
    alphaTest = "0";
    alphaRef = "0";
    cubemap = "global_cubemap_metalblurred";
    materialTag0 = "beamng"; materialTag1 = "vehicle";
    };

    Also copied and created these gauges...

    singleton Material(pickup_gauges)
    {
    mapTo = "pickup_gauges_diesel";
    diffuseMap[0] = "pickup_gauges_d_diesel.dds";
    specularMap[0] = "pickup_gauges_s_diesel.dds";
    specularPower[0] = "32";
    pixelSpecular[0] = "1";
    useAnisotropic[0] = "1";
    materialTag0 = "beamng"; materialTag1 = "vehicle";
    diffuseColor[0] = "1 1 1 1";
    };

    singleton Material(pickup_gauges_on)
    {
    mapTo = "pickup_gauges_on_diesel";
    diffuseMap[1] = "pickup_gauges_g_diesel.dds";
    specularMap[1] = "pickup_gauges_s_diesel.dds";
    diffuseMap[0] = "pickup_gauges_d_diesel.dds";
    specularMap[0] = "pickup_gauges_s_diesel.dds";
    specularPower[0] = "32";
    pixelSpecular[0] = "1";
    emissive[1] = "1";
    useAnisotropic[0] = "1";
    useAnisotropic[1] = "1";
    materialTag0 = "beamng"; materialTag1 = "vehicle";
    diffuseColor[0] = "1 1 1 1";
    diffuseColor[1] = "3 1 0 0.7";
    };

    But I still have only one interior and just replaced the other gauges....


    Any advise? Thanks in advance.
     
  4. KJP12

    KJP12
    Expand Collapse

    Joined:
    Jul 26, 2016
    Messages:
    669
    Ok, make sure that the materials.cs is in its own folder, as overwriting the original can cause problems when the game updates. I think you are going to need to go into the DAE with Blender to duplicate the interior and change the materials of the new interior. Just remove everything else and export to a new file. And, you will need to add an entire new interior jbeam. Just copy the already existing one and toss it into the folder with the materials.cs. Then you will need to change the name to 'Interior for Diesel Engine' or similar and it is recommended to add your name with an under score at the beginning of 'pickup_interior' to it to lessen the chance of mod clashing and should add '_diesel' at the end of it (without quotes.)
     
  5. MasterFluffy

    MasterFluffy
    Expand Collapse

    Joined:
    Jan 27, 2017
    Messages:
    91
    Thanks for all the help by the way

    Now I think I'm close but still not right.... While in game on vehicle part selector... I see my new dash (Diesel Interior) but the new dash has no gauges or needles...

    I exported the new .DAE file (pickup_interior_diesel.dae) so this dae includes dash(renamed) as well as the gauges and the needles. though not sure if I need those others....
    put in new folder(pickup_diesel)... in my modded vehicle zip. In there I have my materials.cs file.

    This is whats in the materials.cs file....

    singleton Material(pickup_interior_diesel)
    {
    mapTo = "pickup_interior_diesel";
    reflectivityMap[1] = "vehicles/common/pickup/pickup_interior_s_diesel.dds";
    diffuseMap[1] = "vehicles/common/pickup/pickup_interior_d_diesel.dds";
    specularMap[1] = "vehicles/common/pickup/pickup_interior_s_diesel.dds";
    normalMap[1] = "vehicles/common/pickup/pickup_interior_n_diesel.dds";
    reflectivityMap[0] = "vehicles/common/pickup/pickup_interior_s_diesel.dds";
    diffuseMap[0] = "vehicles/common/pickup/pickup_interior_d_diesel.dds";
    specularMap[0] = "vehicles/common/pickup/pickup_interior_s_diesel.dds";
    normalMap[0] = "vehicles/common/pickup/pickup_interior_n_diesel.dds";
    diffuseColor[1] = "0.4 0.4 0.4 1";
    specularPower[1] = "32";
    useAnisotropic[1] = "1";
    diffuseColor[0] = "1 1 1 1";
    specularPower[0] = "32";
    useAnisotropic[0] = "1";
    castShadows = "1";
    translucent = "0";
    translucentBlendOp = "None";
    alphaTest = "0";
    alphaRef = "0";
    cubemap = "global_cubemap_metalblurred";
    materialTag0 = "beamng"; materialTag1 = "vehicle";
    };
    singleton Material(pickup_gauges)
    {
    mapTo = "pickup_gauges";
    diffuseMap[0] = "pickup_gauges_d_diesel.dds";
    specularMap[0] = "pickup_gauges_s_diesel.dds";
    specularPower[0] = "32";
    pixelSpecular[0] = "1";
    useAnisotropic[0] = "1";
    materialTag0 = "beamng"; materialTag1 = "vehicle";
    diffuseColor[0] = "1 1 1 1";
    };
    singleton Material(pickup_gauges_on)
    {
    mapTo = "pickup_gauges_on";
    diffuseMap[1] = "pickup_gauges_g_diesel.dds";
    specularMap[1] = "pickup_gauges_s_diesel.dds";
    diffuseMap[0] = "pickup_gauges_d_diesel.dds";
    specularMap[0] = "pickup_gauges_s_diesel.dds";
    specularPower[0] = "32";
    pixelSpecular[0] = "1";
    emissive[1] = "1";
    useAnisotropic[0] = "1";
    useAnisotropic[1] = "1";
    materialTag0 = "beamng"; materialTag1 = "vehicle";
    diffuseColor[0] = "1 1 1 1";
    diffuseColor[1] = "3 1 0 0.7";
    };

    Then I made my jbeam file. (pickup_interior_diesel.jbeam)

    {
    "pickup_interior_diesel": {
    "information":{
    "name":"Interior Diesel",
    "value":0,
    },
    "slotType" : "pickup_interior",
    "slots": [
    ["type", "default","description"],
    ["pickup_interior","pickup_interior_diesel","pickup_interior_diesel",{"coreSlot":true}],
    ],
    },
    }
     
  6. KJP12

    KJP12
    Expand Collapse

    Joined:
    Jul 26, 2016
    Messages:
    669
    I think the old needles would have worked just fine. Is the section of the jbeam you posted the actual jbeam? If so, you may have some issues later on. Did you copied the entire interior jbeam or is that the jbeam itself?
     
  7. MasterFluffy

    MasterFluffy
    Expand Collapse

    Joined:
    Jan 27, 2017
    Messages:
    91
    So... I made that jbeam from scratch. I couldn't find original pickup_interior till just now. Its inside pickup_body.

    I'll get back soon if success or not.
    --- Post updated ---
    So yeah that was important... so yeah my new dash and the gauges are showing...

    One other issue. Both old and new dashs are showing only new gauges.... so looking into it. maybe just a change in materials.cs???
     
  8. KJP12

    KJP12
    Expand Collapse

    Joined:
    Jul 26, 2016
    Messages:
    669
    You didn't renamed the gauges and the interior. You need to rename the interior and gauges to new names.
     
  9. MasterFluffy

    MasterFluffy
    Expand Collapse

    Joined:
    Jan 27, 2017
    Messages:
    91
    mmm. So still problems...
    Now I have both dashes but both show old gauges.... I was sure I replaced all the right places :(

    materials.cs looks like this below-----------------------------------

    singleton Material(pickup_interior_diesel)
    {
    mapTo = "pickup_interior_diesel";
    reflectivityMap[1] = "vehicles/common/pickup/pickup_interior_s_diesel.dds";
    diffuseMap[1] = "vehicles/common/pickup/pickup_interior_d_diesel.dds";
    specularMap[1] = "vehicles/common/pickup/pickup_interior_s_diesel.dds";
    normalMap[1] = "vehicles/common/pickup/pickup_interior_n_diesel.dds";
    reflectivityMap[0] = "vehicles/common/pickup/pickup_interior_s_diesel.dds";
    diffuseMap[0] = "vehicles/common/pickup/pickup_interior_d_diesel.dds";
    specularMap[0] = "vehicles/common/pickup/pickup_interior_s_diesel.dds";
    normalMap[0] = "vehicles/common/pickup/pickup_interior_n_diesel.dds";
    diffuseColor[1] = "0.4 0.4 0.4 1";
    specularPower[1] = "32";
    useAnisotropic[1] = "1";
    diffuseColor[0] = "1 1 1 1";
    specularPower[0] = "32";
    useAnisotropic[0] = "1";
    castShadows = "1";
    translucent = "0";
    translucentBlendOp = "None";
    alphaTest = "0";
    alphaRef = "0";
    cubemap = "global_cubemap_metalblurred";
    materialTag0 = "beamng"; materialTag1 = "vehicle";
    };

    singleton Material(pickup_gauges_diesel)
    {
    mapTo = "pickup_gauges_diesel";
    diffuseMap[0] = "pickup_gauges_d_diesel.dds";
    specularMap[0] = "pickup_gauges_s_diesel.dds";
    specularPower[0] = "32";
    pixelSpecular[0] = "1";
    useAnisotropic[0] = "1";
    materialTag0 = "beamng"; materialTag1 = "vehicle";
    diffuseColor[0] = "1 1 1 1";
    };

    singleton Material(pickup_gauges_on_diesel)
    {
    mapTo = "pickup_gauges_on_diesel";
    diffuseMap[1] = "pickup_gauges_g_diesel.dds";
    specularMap[1] = "pickup_gauges_s_diesel.dds";
    diffuseMap[0] = "pickup_gauges_d_diesel.dds";
    specularMap[0] = "pickup_gauges_s_diesel.dds";
    specularPower[0] = "32";
    pixelSpecular[0] = "1";
    emissive[1] = "1";
    useAnisotropic[0] = "1";
    useAnisotropic[1] = "1";
    materialTag0 = "beamng"; materialTag1 = "vehicle";
    diffuseColor[0] = "1 1 1 1";
    diffuseColor[1] = "3 1 0 0.7";
    };

    And my pickup_interior_diesel.jbeam looks like this below---------------------------

    {
    "pickup_interior_diesel": {
    "information":{
    "authors":"BeamNG",
    "name":"Interior Diesel",
    "value":600,
    }
    "slotType" : "pickup_interior",
    "props": [
    ["func", "mesh", "idRef:","idX:","idY:", "baseRotation", "rotation", "translation", "min", "max", "offset", "multiplier"]
    //speedometer
    ["wheelspeed", "pickup_needle_speedo", "f6l","f6","f3l", {"x":-80 "y":0, "z":180}, {"x":0, "y":0, "z":-4.15}, {"x":0, "y":0, "z":0}, 0, 52, -26.1, 1],
    //tachometer
    ["rpm", "pickup_needle_tacho", "f6l","f6","f3l", {"x":-80 "y":0, "z":180}, {"x":0, "y":0, "z":-0.0305}, {"x":0, "y":0, "z":0}, 0, 6000, -3950, 1],
    //fuel gauge
    ["fuel", "pickup_needle_fuel", "f6l","f6","f3l", {"x":-80 "y":0, "z":180}, {"x":0, "y":0, "z":-70}, {"x":0, "y":0, "z":0}, 0, 1, -1, 1],
    //oil temp
    ["oiltemp", "pickup_needle_oil", "f6l", "f6","f3l", {"x":-80 "y":0, "z":180}, {"x":0, "y":0, "z":1.5}, {"x":0, "y":0, "z":0}, 60, 120, 90, 1],
    //water temp
    ["watertemp", "pickup_needle_water", "f6l","f6","f3l", {"x":-80 "y":0, "z":180}, {"x":0, "y":0, "z":1.5}, {"x":0, "y":0, "z":0}, 60, 120, 90, 1],

    //pedals
    ["brake", "pickup_brakepedal", "fr8","fr8l","fr11", {"x":90, "y":0, "z":0}, {"x":-25, "y":0, "z":0}, {"x":0.0, "y":0, "z":0}, 0, 1, 0, 1],
    ["throttle", "pickup_gaspedal", "fr8","fr8l","fr11", {"x":90, "y":0, "z":0}, {"x":-25, "y":0, "z":0}, {"x":0.0, "y":0, "z":0}, 0, 1, 0, 1],
    ["parkingbrake", "pickup_parkingbrake", "fr8","fr8l","fr11", {"x":90, "y":0, "z":0}, {"x":-25, "y":0, "z":0}, {"x":0.0, "y":0, "z":0}, 0, 1, 0, 1],
    //turn signal stalk
    ["turnsignal", "pickup_signalstalk" , "f6l","f6","f3l", {"x":-65 "y":0, "z":180}, {"x":0, "y":0, "z":-15}, {"x":0, "y":0, "z":0}, -1, 1, 0, 1],
    ],
    "glowMap":{
    "pickup_gauges_diesel":{"simpleFunction":{"lowhighbeam":0.6}, "off":"pickup_gauges_diesel", "on":"pickup_gauges_on_diesel"},
    //gauge lights
    "signal_L":{"simpleFunction":"signal_L", "off":"invis", "on":"decals_gauges"},
    "signal_R":{"simpleFunction":"signal_R", "off":"invis", "on":"decals_gauges"},
    "checkengine":{"simpleFunction":"checkengine", "off":"invis", "on":"decals_gauges"},
    "hazard":{"simpleFunction":"hazard", "off":"invis", "on":"decals_gauges"},
    "battery":{"simpleFunction":"battery", "off":"invis", "on":"decals_gauges"},
    "highbeam":{"simpleFunction":"highbeam", "off":"invis", "on":"decals_gauges"},
    "parkingbrake":{"simpleFunction":"parkingbrake", "off":"invis", "on":"decals_gauges"},
    "lowfuel":{"simpleFunction":"lowfuel", "off":"invis", "on":"decals_gauges"},
    "lowpressure":{"simpleFunction":"lowpressure", "off":"invis", "on":"invis"},
    "abs":{"simpleFunction":"abs", "off":"invis", "on":"decals_gauges"},
    }
    "flexbodies": [
    ["mesh", "[group]:", "nonFlexMaterials"],
    //interior
    ["pickup_dash", ["pickup_firewall"]],
    ["pickup_gauges", ["pickup_firewall"]],
    ["pickup_decals_gauges", ["pickup_firewall"]],
    ["pickup_bench", ["pickup_cab", "pickup_framecab"]],
    ],
    }
    }
     
  10. KJP12

    KJP12
    Expand Collapse

    Joined:
    Jul 26, 2016
    Messages:
    669
    How about your interior jbeam? Sometimes the problems lie in the jbeam.
     
  11. MasterFluffy

    MasterFluffy
    Expand Collapse

    Joined:
    Jan 27, 2017
    Messages:
    91
    I included that in my last post... no worries... here it is again.

    And my pickup_interior_diesel.jbeam looks like this below---------------------------

    {
    "pickup_interior_diesel": {
    "information":{
    "authors":"BeamNG",
    "name":"Interior Diesel",
    "value":600,
    }
    "slotType" : "pickup_interior",
    "props": [
    ["func", "mesh", "idRef:","idX:","idY:", "baseRotation", "rotation", "translation", "min", "max", "offset", "multiplier"]
    //speedometer
    ["wheelspeed", "pickup_needle_speedo", "f6l","f6","f3l", {"x":-80 "y":0, "z":180}, {"x":0, "y":0, "z":-4.15}, {"x":0, "y":0, "z":0}, 0, 52, -26.1, 1],
    //tachometer
    ["rpm", "pickup_needle_tacho", "f6l","f6","f3l", {"x":-80 "y":0, "z":180}, {"x":0, "y":0, "z":-0.0305}, {"x":0, "y":0, "z":0}, 0, 6000, -3950, 1],
    //fuel gauge
    ["fuel", "pickup_needle_fuel", "f6l","f6","f3l", {"x":-80 "y":0, "z":180}, {"x":0, "y":0, "z":-70}, {"x":0, "y":0, "z":0}, 0, 1, -1, 1],
    //oil temp
    ["oiltemp", "pickup_needle_oil", "f6l", "f6","f3l", {"x":-80 "y":0, "z":180}, {"x":0, "y":0, "z":1.5}, {"x":0, "y":0, "z":0}, 60, 120, 90, 1],
    //water temp
    ["watertemp", "pickup_needle_water", "f6l","f6","f3l", {"x":-80 "y":0, "z":180}, {"x":0, "y":0, "z":1.5}, {"x":0, "y":0, "z":0}, 60, 120, 90, 1],

    //pedals
    ["brake", "pickup_brakepedal", "fr8","fr8l","fr11", {"x":90, "y":0, "z":0}, {"x":-25, "y":0, "z":0}, {"x":0.0, "y":0, "z":0}, 0, 1, 0, 1],
    ["throttle", "pickup_gaspedal", "fr8","fr8l","fr11", {"x":90, "y":0, "z":0}, {"x":-25, "y":0, "z":0}, {"x":0.0, "y":0, "z":0}, 0, 1, 0, 1],
    ["parkingbrake", "pickup_parkingbrake", "fr8","fr8l","fr11", {"x":90, "y":0, "z":0}, {"x":-25, "y":0, "z":0}, {"x":0.0, "y":0, "z":0}, 0, 1, 0, 1],
    //turn signal stalk
    ["turnsignal", "pickup_signalstalk" , "f6l","f6","f3l", {"x":-65 "y":0, "z":180}, {"x":0, "y":0, "z":-15}, {"x":0, "y":0, "z":0}, -1, 1, 0, 1],
    ],
    "glowMap":{
    "pickup_gauges_diesel":{"simpleFunction":{"lowhighbeam":0.6}, "off":"pickup_gauges_diesel", "on":"pickup_gauges_on_diesel"},
    //gauge lights
    "signal_L":{"simpleFunction":"signal_L", "off":"invis", "on":"decals_gauges"},
    "signal_R":{"simpleFunction":"signal_R", "off":"invis", "on":"decals_gauges"},
    "checkengine":{"simpleFunction":"checkengine", "off":"invis", "on":"decals_gauges"},
    "hazard":{"simpleFunction":"hazard", "off":"invis", "on":"decals_gauges"},
    "battery":{"simpleFunction":"battery", "off":"invis", "on":"decals_gauges"},
    "highbeam":{"simpleFunction":"highbeam", "off":"invis", "on":"decals_gauges"},
    "parkingbrake":{"simpleFunction":"parkingbrake", "off":"invis", "on":"decals_gauges"},
    "lowfuel":{"simpleFunction":"lowfuel", "off":"invis", "on":"decals_gauges"},
    "lowpressure":{"simpleFunction":"lowpressure", "off":"invis", "on":"invis"},
    "abs":{"simpleFunction":"abs", "off":"invis", "on":"decals_gauges"},
    }
    "flexbodies": [
    ["mesh", "[group]:", "nonFlexMaterials"],
    //interior
    ["pickup_dash", ["pickup_firewall"]],
    ["pickup_gauges", ["pickup_firewall"]],
    ["pickup_decals_gauges", ["pickup_firewall"]],
    ["pickup_bench", ["pickup_cab", "pickup_framecab"]],
    ],
    }
    }
     
  12. KJP12

    KJP12
    Expand Collapse

    Joined:
    Jul 26, 2016
    Messages:
    669
    Looks like you didn't update the flexbodies. That explains the issue. Rename 'pickup_decals_gauges' to your new gauge decal names.
     
  13. MasterFluffy

    MasterFluffy
    Expand Collapse

    Joined:
    Jan 27, 2017
    Messages:
    91
    Mmm so I re-naming it pickup_decals_gauges_diesel but no change seen....

    Then I thought maybe these I should rename as well...

    "flexbodies": [
    ["mesh", "[group]:", "nonFlexMaterials"],
    //interior
    ["pickup_dash", ["pickup_firewall"]],
    ["pickup_gauges", ["pickup_firewall"]],

    renamed to pickup_dash_diesel & pickup_gauges_diesel

    After that my new dash doesn't show gauges anymore....

    Not sure if that a good thing and that one other place is wrong.... or what
     
  14. KJP12

    KJP12
    Expand Collapse

    Joined:
    Jul 26, 2016
    Messages:
    669
    Look in the console (by pressing tilde [~] key), then copy & paste the error, if there is any. Could be possible you need to rename the gauges in the dae file.
     
  15. MasterFluffy

    MasterFluffy
    Expand Collapse

    Joined:
    Jan 27, 2017
    Messages:
    91
  16. KJP12

    KJP12
    Expand Collapse

    Joined:
    Jul 26, 2016
    Messages:
    669
    Definitely a mesh issue. What are the names in the dae file?
     
  17. MasterFluffy

    MasterFluffy
    Expand Collapse

    Joined:
    Jan 27, 2017
    Messages:
    91
    Not sure if you can see that... Here is the error
    TorqueFlexMesh::preFina;ozeShape|Failed to get render mesh pickup_gauges_diesel
    TorqueFlexMesh::preFina;ozeShape|Failed to get render mesh pickup_decalsgauges_diesel
     
  18. KJP12

    KJP12
    Expand Collapse

    Joined:
    Jul 26, 2016
    Messages:
    669
    Na, I saw it just fine. The problem could be in the dae file itself. What are the names of the meshes in the file? That could be the issue.
     
  19. MasterFluffy

    MasterFluffy
    Expand Collapse

    Joined:
    Jan 27, 2017
    Messages:
    91
    So in my DAE file
    pick_dash was already renamed to pick_dash_diesel from yesterday
    I did see pickup_decals_gauge so I renamed it pickup_decals_gauge_diesel

    Now in game I switch to new dash and it shows only old gauges... no errors...
     
  20. KJP12

    KJP12
    Expand Collapse

    Joined:
    Jul 26, 2016
    Messages:
    669
    Now you just need to re-texture them. In the pickup.zip in the game folder, there should be a file named pickup_gauges.dds or similar. Just edit them to fit the new gauges.
     
  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