[TIP] "Resource Clash" and how YOU can avoid it!

Hey there! My name is Wetter42, and I’ve just come across an interesting discovery; Something I’m sure many of you already know by now, but it happened when I realized that you can have multiple vehicles within a single vehicles.meta in your resource; While this is seemingly awesome, it does pose one HUGE problem:

Resource Clash.

Now you may be asking yourself WHAT resource clash is:

This is basically when more than one Resource / Call to a resource / Reference to a resource is found across resources;

In my specific example, there were MANY, MANY resources that the texture was too large and needed to be split; After splitting, or modifying the vehicles.meta, the changes still weren’t being reflected on the server.

After looking into another resource (by total chance, might I mention), I saw the SOURCE of the resource clash living in many resources. Once I stopped the ‘bloodflow’, I was not only able to fix the textures and handlings, but WHOLE resources that previously weren’t loading suddenly started working again!

How can I avoid resource clash?

I recommending Segregating each resource by folder rather than trying to combine them; This makes troubleshooting things easier, and if you want to fix / upgrade a resource, you can just pull the folder / directory rather than having to find everything in one big resource;

If you ABSOLUTELY MUST combine resources, make sure you perform at least 2 months of rigorous stress testing to make sure your mods are stable before combining them into one!

Help, I have resource clash in my server - how do I stop the bloodflow to get things working again?
So how I was able to keep the server running was to comment the “bad child” resources by adding a # infront of them in either your server.cfg OR your resources.cfg (depending on what you’re using)

Example:
server.cfg
start badrsrc
(change to)
#start badrsrc (You can even add text here as a note to indicate why you’ve stopped this resource from loading - Just be sure to remove this once you fix and want to start the resource back up)

resources.cfg
ensure badresource
(change to)
#ensure badresource (you can add notes here as well, just remove when fixed and ready to load back!)

How can I LOCATE potential resource clash on my server?

This can be simple, or difficult depending on how well you can search, and how well you can find small details, but a general rule of thumb is that:

  • vehicles.meta should be around 5-7kb ONLY! If there are alternative vehicle models in the mod, you may see the size go to something like 12kb-16kb;
  • Search for references to OTHER resources across all of your resources (for example: if you search your ferarri resource for names like mustang, this could be an indicator of potential resource clash depending on if it’s being called)

What will be fixed by removing resource clash?

On our test server, I’ve seen WHOLE resources get held up due to this. Sometimes textures are affected, and sometimes handlings are affected as well; Sometimes vehicles.meta can be affected causing strange behavior in the mod as well!

Hopefully this helps! I know this is a pretty specific topic, however, I’ve burned two hours to find this, and hope I can help fellow server and content creators avoid this in the future!

Cheers! :smiley:

4 Likes

This was hard to follow.

When you mention resource clash, I’m assuming you mean resources that have the same information and are overwriting each other?

Hmm…not exactly, but very close! The vehicles.meta file can legally contain the information for OTHER vehicles in itself. In some cases you may find that separate resources share the same info as those aforementioned vehicles.meta

For Example if you have a police mod, but for whatever reason, the vehicles.meta has the resources for the lazer, (and you already have a separate resource for lazer containing it’s own vehicles.meta), it could effect how the server is able to handle that resource!

As mentioned, it’s very specific, but it’s one of those things that will KILL your time troubleshooting if you have it, and don’t know where to look!

Does this clarify?

1 Like