RigsOfRods / rigs-of-rods

Main development repository for Rigs of Rods soft-body physics simulator
https://www.rigsofrods.org
GNU General Public License v3.0
990 stars 175 forks source link

Texture conflicts between mods #3148

Closed CuriousMike56 closed 2 months ago

CuriousMike56 commented 2 months ago

This issue ticket provides additional details to the Texture with the same name interferes between mods (even if they are in separate ZIPs) problem reported in #3122.

To assist with testing, I've created two test mods: MaterialConflictTestRed.zip MaterialConflictTestBlue.zip

They are simple cubes, with the center being submeshed (texcoords), left a prop, and right a flexbody. Also features a custom N flare material with the same color. The submeshed cube material name is CM_TestCubeSubmesh, defined in a .material file. The flare material (CM_TestCubeFlare) is also defined in this file. Prop and flexbody cube material name is CM_TestCube, defined in the managedmaterials section. Both versions share the same material and texture names.

In 2022.12, both versions can be spawned without conflict: screenshot_2024-04-05_18-48-36_1

Now with the introduction of the tuning menu, spawning either version will conflict with the other:

screenshot_2024-04-05_18-49-19_1 screenshot_2024-04-05_18-50-37_1

Submesh, prop, and flexbody cube textures all conflict. Only the flare uses the correct texture.

ohlidalp commented 2 months ago

Thank you for the test mods, I feel way more confident than if I tried to reproduce all by myself.

The offending commit is 74ed1083cb9e53e38096ec96b6a7b1f0b237ce01.

ohlidalp commented 2 months ago

I accidentally pushed the fix directly without making a PR. But it's pretty straightforward and only tackles the one thing, so I'm confident it doesn't break anything.