Solved My troubles with doing custom adds for taxis

Discussion in 'Mod Support' started by MisterKenneth, Sep 6, 2016.

  1. MisterKenneth

    MisterKenneth
    Expand Collapse

    Joined:
    Mar 26, 2016
    Messages:
    1,747
    I got in the mood to do custom adds for the taxi, so I went to establish the material.cs file after doing a texture. However, I ended up encountering issues like this.
    adcarrier material trouble.PNG
    Does anyone know what's doing this? What can I do to prevent the material.cs file I set up from screwing up the program?

    I know it's the material.cs file that I worked on, because after I changed its file type, everything went back to normal.
     
  2. mumboking

    mumboking
    Expand Collapse

    Joined:
    Jun 11, 2015
    Messages:
    1,400
    Make sure your materials.cs only contains your new materials and that it's in a location that doesn't already have a materials.cs file.
     
  3. MisterKenneth

    MisterKenneth
    Expand Collapse

    Joined:
    Mar 26, 2016
    Messages:
    1,747
    It does only contain the materials I made.

    However, I set its destination as BeamNG.Drive/vehicles/common. Is this what's doing it? Is it overriding the original material.cs file in the Steam files?
     
  4. mumboking

    mumboking
    Expand Collapse

    Joined:
    Jun 11, 2015
    Messages:
    1,400
    Yes. Try creating a uniquely named subfolder for it.
     
  5. MisterKenneth

    MisterKenneth
    Expand Collapse

    Joined:
    Mar 26, 2016
    Messages:
    1,747
    I rerouted the destination as BeamNG.Drive/vehicles/common/adcarrier.
    --- Post updated ---
    I found out it required a jbeam like all the rest, so I did a jbeam. But when I went to load it in, it broke the program, saying that adcarrier_ad_n.dds is missing, but I found it in the Steam files.

    I can't figure this stuff out.
     
    #5 MisterKenneth, Sep 6, 2016
    Last edited: Sep 6, 2016
  6. synsol

    synsol
    Expand Collapse
    QA Lead
    BeamNG Team

    Joined:
    Aug 4, 2013
    Messages:
    1,473
    To be really sure to never overwrite or conflict with an other mod , i suggest you to give a more unique name to this folder, exemple : " MisterKenneth_Adcarrier " , (BeamNG.Drive/vehicles/common/MisterKenneth_Adcarrier) on this folder you should have three files :
    • your image file in dds format (here i've named it "adcarrier_MisterKenneth_Ads.dds")
    • your materials.cs file :

    Code:
    singleton Material("adcarrier_ad.skin_taxi_ad.MisterKenneth_Ads")
    {
        mapTo = "adcarrier_ad.skin_taxi_ad.MisterKenneth_Ads";
        diffuseMap[1] = "vehicles/common/MisterKenneth_Adcarrier/adcarrier_MisterKenneth_Ads.dds";
        specularMap[1] = "vehicles/common/adcarrier_ad_s.dds";
        normalMap[1] = "vehicles/common/adcarrier_ad_n.dds";
        diffuseMap[0] = "vehicles/common/null.dds";
        specularMap[0] = "vehicles/common/null.dds";
        normalMap[0] = "vehicles/common/adcarrier_ad_n.dds";
        specularPower[0] = "128";
        pixelSpecular[0] = "1";
        specularPower[1] = "32";
        pixelSpecular[1] = "1";
        diffuseColor[0] = "1 1 1 1";
        diffuseColor[1] = "1 1 1 1";
        useAnisotropic[0] = "1";
        useAnisotropic[1] = "1";
        castShadows = "1";
        translucent = "1";
        translucentBlendOp = "None";
        alphaTest = "0";
        alphaRef = "0";
        dynamicCubemap = true;
        materialTag0 = "beamng"; materialTag1 = "vehicle";
    };


    • a new jbeam file, exemple: " MisterKenneth_taxi_ads.jbeam "

    Code:
    {
    "taxi_ad_MisterKenneth_Ads": {
        "information":{
            "authors":"MisterKenneth",
            "name":"MisterKenneth_Ads",
            "value":10,
        },
        "slotType" : "skin_taxi_ad",
        "globalSkin" : "MisterKenneth_Ads",
      },
        }
    
    I've made a sample mod linked here :
    7a2b0bc63cd43f22773f31d01977f7f2.png
     

    Attached Files:

    #6 synsol, Sep 6, 2016
    Last edited: Sep 6, 2016
  7. MisterKenneth

    MisterKenneth
    Expand Collapse

    Joined:
    Mar 26, 2016
    Messages:
    1,747
    I found out it required a jbeam like all the rest, so I did a jbeam. But when I went to load it in, it broke the program, saying that adcarrier_ad_n.dds is missing, but I found it in the Steam files.

    I can't figure this stuff out.
    I appreciate the assistance, Synsol.

    I feel like an idiot now, because I put the jbeam for the advertisement in the wrong place. Instead of the fullsize folder, I kept it in the common folder. But, how did it end up being an available option for the Grand Marshal if I didn't put it in its directory?
     
  8. synsol

    synsol
    Expand Collapse
    QA Lead
    BeamNG Team

    Joined:
    Aug 4, 2013
    Messages:
    1,473
    The Jbeam file must be on Grand Marshal (fullsize) directory, this way it became an option on roof accessory / addcarrier , you can check the file i've linked on my post :)
     
  9. MisterKenneth

    MisterKenneth
    Expand Collapse

    Joined:
    Mar 26, 2016
    Messages:
    1,747
    I saw that. But here's something else I noticed.

    With your material.cs sample, you included a lot of vehicles/common stuff. I didn't include that. Did that break my game?
     
  10. synsol

    synsol
    Expand Collapse
    QA Lead
    BeamNG Team

    Joined:
    Aug 4, 2013
    Messages:
    1,473
    It's because you have to help the game to found these file ;)
     
  11. MisterKenneth

    MisterKenneth
    Expand Collapse

    Joined:
    Mar 26, 2016
    Messages:
    1,747
    You got a point there.

    Now, will it be okay if I keep your sample and use it for future references in case I get stuck again?
     
  12. mumboking

    mumboking
    Expand Collapse

    Joined:
    Jun 11, 2015
    Messages:
    1,400
    jbeams in the common folder are available to all cars. If the slotType matches a slot on a vehicle, it shows as an option.
     
  13. synsol

    synsol
    Expand Collapse
    QA Lead
    BeamNG Team

    Joined:
    Aug 4, 2013
    Messages:
    1,473
    No problem !

    Sure you are right , this also permit to offer this ads for other future mods taxi for example ;)
     
  14. synsol

    synsol
    Expand Collapse
    QA Lead
    BeamNG Team

    Joined:
    Aug 4, 2013
    Messages:
    1,473
    My support post is edited , also the sample file , thank for the suggestion ;)
     
  15. MisterKenneth

    MisterKenneth
    Expand Collapse

    Joined:
    Mar 26, 2016
    Messages:
    1,747
    I finally figured it out. So, thank you Synsol and mumboking for your assistance.
     
  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