Ludeon Forums

RimWorld => Mods => Help => Topic started by: Syrchalis on July 21, 2018, 02:10:30 PM

Title: Texture Paths?
Post by: Syrchalis on July 21, 2018, 02:10:30 PM
Alright so the latest update completely destroyed half of my mods, mostly due to their texture paths not working anymore. I've been trying to fix them, but so far I had no success whatsoever. My self-created mods with wonky texture paths are working fine however and I really don't get what the difference is.

Usually I just put in the texture path like this:
    <graphicData>
      <texPath>CoffeePlant</texPath>
<graphicClass>Graphic_Single</graphicClass>
    </graphicData>

And the file is directly inside the Textures folder. But even some files which are in deeper folders work fine, yet in other mods they don't. No matter what I tried they don't work and I don't get it.
Title: Re: Texture Paths?
Post by: PleccyMM on July 22, 2018, 08:37:01 AM
This could be happening for a couple of reasons depending on the texture. For starters you should probably use more than one folder for storing and referencing textures. It is always worth having a Things folder inside your textures folder as this is the norm for RimWorld and possibly could cause problems; if you look at how Silver references it's textures for example: <texPath>Things/Item/Resource/Silver</texPath> you'll see that it goes through several different folders before it arrives at its own - I'm not saying that you need as many folders as silver but it'll be worth at least getting a Things folder.

Now if we look at some more specific examples for why certain textures may not be working then we encounter a couple of possibilities:

If you try all of this and a problem still persists could you please give slightly more detail towards which textures are breaking and what the error log says. - PleccyMM
Title: Re: Texture Paths?
Post by: Syrchalis on July 22, 2018, 10:24:10 AM
Most of the errors were actually caused by other mods not working and them somehow messing up the textures of the other mods.

Still it doesn't mean I don't generally have trouble with texture paths. What I think I figured out is that the texture path is usually the folder, but in case of Graphic_Single it seems to be the file itself. So Graphic_Random (usually plants) and Graphic_Multi use folders like
/Things/Folder(s)/FolderContainingPNGs
while for Graphic_Single it's
/Things/Folder(s)/FolderContainingPNG/File(without extension).
Title: Re: Texture Paths?
Post by: Arco Frio on December 24, 2021, 06:25:59 AM
Quote from: Syrchalis on July 22, 2018, 10:24:10 AM
Most of the errors were actually caused by other mods not working and them somehow messing up the textures of the other mods.

Still it doesn't mean I don't generally have trouble with texture paths. What I think I figured out is that the texture path is usually the folder, but in case of Graphic_Single it seems to be the file itself. So Graphic_Random (usually plants) and Graphic_Multi use folders like
/Things/Folder(s)/FolderContainingPNGs
while for Graphic_Single it's
/Things/Folder(s)/FolderContainingPNG/File(without extension).

I'm sorry for necroing, but I've been searching all around for an answer to a question. Since you said "folder(s)", does tha mean it's possible to have a def with multiple texture paths? If so, how can I achieve that? I'm trying to create a Graphic_Random type def that gets random textures from different specific folders.