1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

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

When does a mod override vanilla assets?

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by Davoda1, Jul 21, 2023.

  1. Davoda1

    Davoda1
    Expand Collapse

    Joined:
    Jun 18, 2023
    Messages:
    19
    When does something effect the game content?
    Let's say I have a mod that is based on the etk800; and it has files in it from the etk800 that wasn't renamed. In the mod's zip the directory goes as "modfile.zip\vehicles\carmod\*fileshere*", would this do anything to the vehicles\etk800 or the game only looks for files under "whateverfile\vehicles\etk800"?

    Thanks for any answers!
     
  2. Car_Killer

    Car_Killer
    Expand Collapse
    QA / Mod Support
    BeamNG Team

    Joined:
    Sep 24, 2013
    Messages:
    1,664
    You can overwrite files by using the same file names in the root of the vehicle folder. That's the easiest case to fix.
    Another way to overwrite things is using the same material names/mapping/persistentIDs in your custom material file or using the same jbeam block names. For example in your custom etk800_engineMOD.jbeam you will keep the original oil pan block with the same name. It will overwrite jbeam from the original file even if the file itself is different.

    You can put your files in subfolders, then you don't need to worry about filenames, but jbeam block names/materials issue still applies here and you need to remember to remove not changed parts of jbeam like my oil pan example or if you edit it you need to change its name by adding some suffix for example.

    As for file structure, you need to put your files in the respective vehicle directory, for example, \vehicles\etk800\ or \vehicles\etk800\my_mod\, otherwise it won't load correctly.
     
  3. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,492
    A mod overrides vanilla content when at least one of the following criteria is met:
    • It has a folder with the same name as one of the vehicle folder, and one of the files has the same name and sub-path location as a file in the original vehicle folder, then it will override it
    • It has a folder with the same name as one of the vehicle folder, which contains a Jbeam file that has a part with the same name as one that exists in the vehicle, it overrides the part then
    • It has a material with the same name or mapTo as a material that exists in a vehicle in game, it overrides that material then
    • It has a .dae, .cdae or cached.dts file containing a model of a vehicle part with the same name as one that exists on any vehicle, then the one that is spawned first will override all other ones
     
  4. Davoda1

    Davoda1
    Expand Collapse

    Joined:
    Jun 18, 2023
    Messages:
    19
    So if I don't what something to be overwritten the "persistentId" has to be different because it doesn't care where the *.json is coming from originally it will load anyway and if the names are the same rule allies? Well, sadly mods that exist outside of the beam forum all have this in them. I guess nothing I can do about it. But is there any 'easy' way to see that is the material name or ID that loads on a part? To see the mod(s) that are made incorrectly/badly that causes the problem? It's not possible to check 700+ mods 1 by 1 and the built in checker has no export option; like export to txt or similar to be able to read it in a dedicated program.
     
  5. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,492
    Usually you can change 1 character in the persistentId and there will be a very high chance it won't override anything. And the full results of the checker are in the log file in your userfolder.
     
  6. Car_Killer

    Car_Killer
    Expand Collapse
    QA / Mod Support
    BeamNG Team

    Joined:
    Sep 24, 2013
    Messages:
    1,664
    The best approach is completely removing persistentID line from material and then resaving it with the game, it will generate and save a new proper PID.
     
    • Like Like x 1
  7. Davoda1

    Davoda1
    Expand Collapse

    Joined:
    Jun 18, 2023
    Messages:
    19
    Thanks tho I don't think I'll be able to fix the issues while keeping the mods.
    It was very informative just I'd hope that people would use this information when making mods.
    --- Post updated ---
    Well, [...] I menaged to fix my issues and it's all working thx to you :D
     
  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