1. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice
  2. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.30 Bug Reporting thread
    Solutions and more information may already be available.

(SOLVED) Problem with mod file structure / Miramar textures

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by Velstydez, Sep 5, 2019.

  1. Velstydez

    Velstydez
    Expand Collapse

    Joined:
    Apr 4, 2018
    Messages:
    250
    Hi there,

    I made an electric motor for the Miramar and some other parts. However, the parts only show up if I install them under

    "Documents/BeamNG.drive/vehicles/miramar",

    but not if I install them under

    "Documents/BeamNG.drive/mods/vehicles/miramar" or "Documents/BeamNG.drive/mods/unpacked/vehicles/miramar"

    Anyone know what I could be doing wrong? :(

    I also haven't managed to make the material for the electric motor (which I have UV mapped and the proper textures for it too). I remember doing this a year ago for other parts with no problem with the material editor inside BeamNG, but I can't figure it out now :/ Also I remember I was able to use .png files no problem, but I converted them to .dds just in case.

    I noticed the Miramar doesn't have a materials.cs, but a json file for the materials. Has the system changed? I haven't managed to find any info about it...

    How can I make it work?

    Thanks in advance
     

    Attached Files:

    • Untitled.png
  2. Driv3r1142

    Driv3r1142
    Expand Collapse

    Joined:
    Feb 15, 2015
    Messages:
    1,941
    1; You can use the BeamNG.drive/vehicles directory you're using to develop your mod :) I don't quite know how to help you get the other directories working but they should work too.

    2; Don't use anything other than .dds files for textures, it's easier on the GPU and takes up less space.

    3; Here's a crash course on the new materials system thanks to @Nadeox1;

    https://www.beamng.com/threads/a-thing-that-we-all-need.65352/#post-1069753

    You can still use the old .cs system if you feel more comfortable with it for now, but be prepared to switch in the near future.
     
    • Agree Agree x 1
  3. danielr

    danielr
    Expand Collapse

    Joined:
    Jan 6, 2014
    Messages:
    81
    Your mods from "Documents/BeamNG.drive/mods/unpacked/vehicles/miramar"

    Should be in "Documents/BeamNG.drive/mods/unpacked/yourmodname/vehicles/miramar"
     
    • Agree Agree x 3
    • Informative Informative x 1
  4. Velstydez

    Velstydez
    Expand Collapse

    Joined:
    Apr 4, 2018
    Messages:
    250
    Ahhhhhhhhhh well that would make sense... Thank you very much... i tried a whole lot of things and it was that simple...

    I see... I had tried it though.

    No results yet even just with the diffuse map...

    asdf.png

    afsgadfsg.png

    12412.png

    gfasdgasfh.png

    I have been trying stuff the whole day and I still can't figure it out :(

    Is there something very obvious that I'm missing? Looks like its completely ignoring the file. Something to do with file directory or file name perhaps?
     
    #4 Velstydez, Sep 5, 2019
    Last edited: Sep 5, 2019
  5. Nekkit

    Nekkit
    Expand Collapse

    Joined:
    Jun 30, 2018
    Messages:
    1,296
    Can you send your materials file?
     
  6. Velstydez

    Velstydez
    Expand Collapse

    Joined:
    Apr 4, 2018
    Messages:
    250
    Sure.

    I have this under "Documents/BeamNG.drive/vehicles/miramar"
     

    Attached Files:

  7. Nekkit

    Nekkit
    Expand Collapse

    Joined:
    Jun 30, 2018
    Messages:
    1,296
    So, first of all, ugh its a new format...

    but ive tried to fix it, try this one
     

    Attached Files:

  8. Velstydez

    Velstydez
    Expand Collapse

    Joined:
    Apr 4, 2018
    Messages:
    250
    Still no luck but thanks for trying, appreciate it
     
  9. Nekkit

    Nekkit
    Expand Collapse

    Joined:
    Jun 30, 2018
    Messages:
    1,296
    try making it in .cs, no one have made a proper documentation of .json material format so far
    --- Post updated ---
    singleton Material(mod_engine)
    {
    mapTo = "mod_engine";
    diffuseColor[0] = "1 1 1 0.1";
    specular[0] = "0.25 0.25 0.25 1";
    specularPower[0] = "3";
    doubleSided = "1";
    translucentBlendOp = "None";
    diffuseMap[0] = "vehicles/path/engine.dds";
    diffuseMap[1] = "vehicles/path/engine.dds";
    materialTag0 = "Miscellaneous";
    };

    Example of .cs that will work
     
  10. Velstydez

    Velstydez
    Expand Collapse

    Joined:
    Apr 4, 2018
    Messages:
    250
    Still nothing. I have a feeling that it might not be the content of the file itself what's wrong.

    I have tried overwriting the original files adding it to main_materials, with the textures in the game directory (not mods) and still nothing.
    --- Post updated ---
    UPDATE: got it working by naming the file the same as the original "main.materials.json" and adding the new material at the bottom. But this overwrites the original file, so it's not exactly a solution :( Also now the rest of the car is grey.
     
    #10 Velstydez, Sep 5, 2019
    Last edited: Sep 5, 2019
  11. Nekkit

    Nekkit
    Expand Collapse

    Joined:
    Jun 30, 2018
    Messages:
    1,296
    put the materials file in folder inside your mod folder
     
  12. Velstydez

    Velstydez
    Expand Collapse

    Joined:
    Apr 4, 2018
    Messages:
    250
    Just got back home and tried it. Engine still has texture. Rest of the car is still grey. I placed the file in /Documents/Beam.../vehicles/materials
     
  13. Nekkit

    Nekkit
    Expand Collapse

    Joined:
    Jun 30, 2018
    Messages:
    1,296
    nono, do /vehicles/miramar/materials
     
  14. Velstydez

    Velstydez
    Expand Collapse

    Joined:
    Apr 4, 2018
    Messages:
    250
    actually i just got it working right! but not that way. I noticed at some point a file was created that was not there before, I think somehow due to another mod (I wasn't aware that I had another mod affecting the Miramar, my bad). And the car was grey and not orange because it was only affecting the "miramar" material, as another material was mapped to that slot for some reason.

    Anyways I placed the file in /Documents/Beam../vehicles/miramar/velstyde/main.materials.json" just with the new material in the file, deactivated all mods and now it works! Now I will have to see if it will still work with the other mods... But thank you for helping!
     
  15. Nekkit

    Nekkit
    Expand Collapse

    Joined:
    Jun 30, 2018
    Messages:
    1,296
    No problem man, good job!
     
  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