(SOLVED) Vehicle default color selector

Discussion in 'Content Creation' started by Vilespring, Oct 6, 2015.

  1. Vilespring

    Vilespring
    Expand Collapse

    Joined:
    Mar 6, 2015
    Messages:
    73
    I feel like this is the most correct section for this, and I have searched this for a hour, so here I go.

    I downloaded a bit while back a 6x6 Gravil D-15 and a 4x4 pigeon. These vehicles work rather well, but there's just one slightly annoying thing. When I spawn the vehicles in, the color cannot be selected from the factory color list, and it starts off as chrome. After I spawn it I can tweak the colors to what I want, but I want to get the color selector like default vehicles do.

    How would I do this?

    db22b56de12464441cde96bd59417185.png
    EDIT: added picture for further explanation.
     
    #1 Vilespring, Oct 6, 2015
    Last edited: Oct 8, 2015
  2. Calais

    Calais
    Expand Collapse

    Joined:
    Jan 12, 2014
    Messages:
    418
    Re: Vehicle default color selector

    Old mods that don't support the new vehicle selector. Wait for the mod authors to update them (which they probably wont)
     
  3. mumboking

    mumboking
    Expand Collapse

    Joined:
    Jun 11, 2015
    Messages:
    1,401
    Re: Vehicle default color selector

    I think you have to add something like this in the info.json
    Code:
        "default_color":"Sea Blue",
        "colors":{
            "Pearl White": "1 1 1 1.2",
            "Charcoal": "0.25 0.25 0.25 1.1",
            "Silver": "0.65 0.65 0.65 1.1",
            "Cream": "1 0.9 0.8 1.4",
            "Light Brown": "0.6 0.45 0.35 1.3",
            "Jet Black": "0 0 0 1.2",
            "Fire Red": "1 0 0 1.1",
            "Flame Orange": "1 0.3 0 1.2",
            "Burgundy": "0.5 0 0 1.2",
            "Forest Green": "0.1 0.4 0.2 1.2",
            "Seafoam Green": "0.24 0.48 0.48 1.2",
            "Olive Green": "0.27 0.35 0.23 1.2",
            "Aquamarine": "0.15 0.35 0.6 1.2",
            "Sea Blue": "0.2 0.3 0.6 1.2",
            "Bermuda Blue": "0.06 0.145 0.17 1.1",
            "Navy Blue": "0.0 0.05 0.25 1.1",
            "Chrome": "0.5 0.5 0.5 0.0"
        }
     
  4. ned228

    ned228
    Expand Collapse

    Joined:
    Jul 18, 2014
    Messages:
    269
    Re: Vehicle default color selector

    Or add an info.json file in the mod folder if there is not one already.
     
  5. Vilespring

    Vilespring
    Expand Collapse

    Joined:
    Mar 6, 2015
    Messages:
    73
    Re: Vehicle default color selector

    Alright. I have added the info.jason and the color selector is present and it works. Sorta.
    The pigeon works fine, but the Gravil 6x6 all I can get is different variations of... red.

    How do i fix this problem?

    EDIT: Also, pigeon can't be white. When I try to it's just lime green...
     
    #5 Vilespring, Oct 6, 2015
    Last edited: Oct 6, 2015
  6. Vilespring

    Vilespring
    Expand Collapse

    Joined:
    Mar 6, 2015
    Messages:
    73
    Okay, I'm posting for the sake of helping other people. When I was messing around with the 4 wheeled pigeon with the stock pigeon, I noticed when I reset the stock one, the color of the 4 wheeled one got fixed, and when I reset the 4 wheeled one, the color messed up again and the normal pigeon got its color messed up too.

    I made the connection that they are probably using a material under the same name, and each one had a slight discrepancy in the file. I went digging in both's material.cs, and behold, I was right!
    Here's the stock pigeon:
    Code:
    {
        mapTo = "pigeon";
        diffuseMap[2] = "vehicles/pigeon/pigeon_c.dds";
        specularMap[2] = "vehicles/pigeon/pigeon_s.dds";
        normalMap[2] = "vehicles/pigeon/pigeon_n.dds";
        diffuseMap[1] = "vehicles/pigeon/pigeon_d.dds";
        specularMap[1] = "vehicles/pigeon/pigeon_s.dds";
        normalMap[1] = "vehicles/pigeon/pigeon_n.dds";
        diffuseMap[0] = "vehicles/common/null.dds";
        specularMap[0] = "vehicles/common/null.dds";
        normalMap[0] = "vehicles/pigeon/pigeon_n.dds";
        specularPower[0] = "128";
        pixelSpecular[0] = "1";
        specularPower[1] = "32";
        pixelSpecular[1] = "1";
        specularPower[2] = "128";
        pixelSpecular[2] = "1";
        diffuseColor[0] = "1 1 1 1";
        diffuseColor[1] = "1 1 1 1";
        diffuseColor[2] = "1 1 1 1";
        useAnisotropic[0] = "1";
        useAnisotropic[1] = "1";
        useAnisotropic[2] = "1";
        castShadows = "1";
        translucent = "1";
        translucentBlendOp = "None";
        alphaTest = "0";
        alphaRef = "0";
        dynamicCubemap = true; //cubemap = "BNG_Sky_02_cubemap";
        instanceDiffuse[2] = true;
        materialTag0 = "beamng"; materialTag1 = "vehicle";
    };
    Now, here's the 4 wheeled pigeon's material
    Code:
    {
       mapTo = "pigeon";
       diffuseMap[2] = "vehicles/pigeonpickup/pigeonpickup_c.dds";
       specularMap[2] = "vehicles/pigeonpickup/pigeonpickup_s.dds";
       normalMap[2] = "vehicles/pigeonpickup/pigeonpickup_n.dds";
       diffuseMap[1] = "vehicles/pigeonpickup/pigeonpickup_d.dds";
       specularMap[1] = "vehicles/pigeonpickup/pigeonpickup_s.dds";
       normalMap[1] = "vehicles/pigeonpickup/pigeonpickup_n.dds";
       diffuseMap[0] = "vehicles/common/null.dds";
       specularMap[0] = "vehicles/common/null.dds";
       normalMap[0] = "vehicles/pigeonpickup/pigeonpickup_n.dds";
       specularPower[0] = "16";
       pixelSpecular[0] = "1";
       specularPower[1] = "16";
       pixelSpecular[1] = "1";
       diffuseColor[0] = "1 1 1 1";
       diffuseColor[1] = "1 1 1 1";
       diffuseColor[2] = "0.3 0.5 0.3 1.3";
       useAnisotropic[0] = "1";
       useAnisotropic[1] = "1";
       useAnisotropic[2] = "1";
       castShadows = "1";
       translucent = "1";
       translucentBlendOp = "None";
       alphaTest = "1";
       alphaRef = "0";
       cubemap = "BNG_Sky_02_cubemap";
       beamngDiffuseColorSlot = 2;
       materialTag0 = "beamng"; materialTag1 = "vehicle";
    };
    I immediately noticed the difference in the diffuseColor[2], and when I set it to 1 1 1 1, the color worked. Did the same changes to the Gavril 6x6 and it worked too.
    Only thing I noticed that seems to have no effect is this, it's in the stock pigeon but not the 4wd and I can't notice a difference.
    Code:
        specularPower[2] = "128";
        pixelSpecular[2] = "1";
    Does anyone know what that does?
     
  7. torsion

    torsion
    Expand Collapse

    Joined:
    May 31, 2015
    Messages:
    1,600
    I suspect that specularPower may no longer work / no longer be necessary. Take a look at the v0.4.3.1 patchenotes:
     
  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