Problem with main.materials.json (modding)

Discussion in 'Content Creation' started by Pigeon5643, Jul 25, 2023.

  1. Pigeon5643

    Pigeon5643
    Expand Collapse

    Joined:
    Jan 29, 2022
    Messages:
    10
    Hello

    I'm trying my hand at modding and have been able to successfully add alternate parts to vanilla vehicles. So far, I have been using the default material names in my dae file. In this case, the material name is 'citybus'.

    I now want to make edits to some of the base textures (note, not skins) of the vehicle, for example adding a new panel line in the normal map. I figured I would need to make a duplicate of the main.materials.json that references my new textures.

    I have therefore made a copy of the main.materials.json and placed it in my mod folder. I've edited the new json to give the citybus material a new name. I have also given the material in blender the same name.
    upload_2023-7-25_18-55-59.png

    upload_2023-7-25_18-56-26.png

    However, I am getting missing materials on my added parts and the console states that it is unable to find material.
    upload_2023-7-25_18-57-14.png

    I've tried various names in the 'mapTo' section.

    Any help greatly appreciated
     

    Attached Files:

    • upload_2023-7-25_18-55-49.png
    • upload_2023-7-25_18-56-21.png
  2. Lordlichi2006

    Lordlichi2006
    Expand Collapse

    Joined:
    Apr 4, 2021
    Messages:
    1,298
    Can you post the entire code?
     
  3. Pigeon5643

    Pigeon5643
    Expand Collapse

    Joined:
    Jan 29, 2022
    Messages:
    10
    Here
    The only bit I'm interested in at the moment is the citybus_late material, the rest is exactly as per the default one
     

    Attached Files:

  4. SSRG

    SSRG
    Expand Collapse

    Joined:
    Jun 17, 2023
    Messages:
    4,333
    The „mapTo” is missing a ", at the end.
    I know this hasn’t been answered in like a month, but hope this helps!
     
  5. Pigeon5643

    Pigeon5643
    Expand Collapse

    Joined:
    Jan 29, 2022
    Messages:
    10
    Thanks for the reply, what a stupid mistake! I did manage to fix it in the end, can't remember if that was the only problem.
     
    • Like Like x 1
  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