[11.3.3200] when texture names start with the same string rmworld gets confused

Started by Multistream, December 11, 2021, 05:52:13 AM

Previous topic - Next topic

Multistream

[11.3.3200RI]
I have two folders with textures:
TMaterials\common\bar\smooth which contains smooth_a.png; smooth_b.png; smooth_c.png;
TMaterials\common\bar\smoothstony, which contains smoothstony_a.png; smoothstony_b.png; smoothstony_c.png.

I have a single xml, where graphics is defined in as such: <ThingDef ParentName="ResourceBase">
        <defName>carnap_palladium</defName>
        <graphicData>
            <texPath>TMaterials/common/bar/smooth</texPath>
            <graphicClass>Graphic_StackCount</graphicClass>
            <color>(253,253,255)</color>
        </graphicData>


When I load the game, it shows this error: Could not load UnityEngine.Texture2D at TMaterials/common/bar/smooth/smoothstony_a in any active mod or in base resources.


Notice how its trying to look for "smoothstony" in "smooth" folder. Somehow it mixed up "smooth" and "smoothstony".

That "smoothstony" is never ever mentioned in any xmls in the mod, it is just an unused folder next to "smooth" (it could be used by another item, the bug would still be there).

People on discord have also reported the same issue with Copper and CopperWire; Kevlar and KevlarInserts.

I attached a mod that contains a single item xml and two texture folders as I described. To reproduce the bug, enable that mod and start the game - the error message will appear in the log. Tested when this mod is the only mod enabled.

Pheanox

Thanks for the bug report.  I've had a dev look this over and we are getting a bug report in to work on a resolution.  Thanks for bringing this to our attention!