Texture Paths?

Started by Syrchalis, July 21, 2018, 02:10:30 PM

Previous topic - Next topic

Syrchalis

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.
For mod support visit the steam pages of my mods, Github or if necessary, write me a PM on Discord. Usually you will find the best help in #troubleshooting in the RimWorld discord.

PleccyMM

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 have textures which have multiple sides you'll need to rename them from the B18: front, side and back to the new 1.0: north, east and south.
  • If you are using textures with multiple sides make sure to have graphicClass set from Single to Multi
  • If you have an object which uses several different textures, such as ones with _a _b after their name or, as mentioned above, textures with multiple sides, for whatever reason make sure they are all inside a single folder named after the texture itself.

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

Syrchalis

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).
For mod support visit the steam pages of my mods, Github or if necessary, write me a PM on Discord. Usually you will find the best help in #troubleshooting in the RimWorld discord.

Arco Frio

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.