[SOLVED] Texture Error Even Though The Path is Right

Started by Gerrymon, February 22, 2018, 08:57:45 AM

Previous topic - Next topic

Gerrymon

Hello, I am an artist and this is my very first mod, and I also pretty new to modding. I can read xml file a bit but have no knowledge in C#.

This mod only add a simple apparel to the game, a dress. I borrowed the texture from Maid Project (I am sorry if thats not allowed.. I will change it later if I can manage to make the mod working). The problem now is the game cannot fine the texture.

This is the xml file. I use other simple apparel mod and the original xml file for reference (tribal wear to be exact).
<?xml version="1.0" encoding="utf-8"?>

<Defs>
 
  <ThingDef ParentName="ApparelMakeableBase">
    <defName>Apparel_BasicMaidDress</defName>
    <description>A simple maid dress.</description>
    <label>basic maid dress</label>
    <graphicData>
      <texPath>Things/Apparel/BasicMaid/BasicMaid</texPath>
      <graphicClass>Graphic_Single</graphicClass>
    </graphicData>
<techLevel>Neolithic</techLevel>
<costStuffCount>35</costStuffCount>
<stuffCategories>
<li>Fabric</li>
</stuffCategories>
<tradeability>Sellable</tradeability>
<statBases>
<MaxHitPoints>100</MaxHitPoints>
<WorkToMake>4200</WorkToMake>
<Mass>0.4</Mass>
<Insulation_Cold>-10</Insulation_Cold>
</statBases>
<thingCategories>
<li>Apparel</li>
</thingCategories>
<apparel>
<bodyPartGroups>
<li>Torso</li>
<li>Legs</li>
</bodyPartGroups>
<wornGraphicPath>Things/Apparel/BasicMaid/BasicMaid</wornGraphicPath>
<layers>
<li>OnSkin</li>
<li>Middle</li>
</layers>
<tags>
<li>Tribal</li>
</tags>
</apparel>
<recipeMaker>
<recipeUsers>
<li>ElectricTailoringBench</li>
<li>HandTailoringBench</li>
<li>CraftingSpot</li>
</recipeUsers>
</recipeMaker>
  </ThingDef>



</Defs>


The error: Could not load UnityEngine.Texture2D at Things/Apparel/BasicMaid/BasicMaid in any active mod or in base resources.
Also said something about missing color code or something.

From what I see from my references and youtube, this kind of mod doesn't need to be compiled using C#... is it?
Any help is appreciated. Thank you.

[link deleted]

Harry_Dicks

#1
Correct this can be done in xml. My friend all I can tell you, is that you should download a couple of other mods that add in apparel, and you just need to reference them and see what you are missing and/or doing wrong.

Here are some simple mods that should be great references:
FashionRIMsta
Apparello
Ushanka

If you still need help by the time you read this, you can join my Discord, from my signature, and I can help you further.

Further help with coloring in textures that might be some other resources for you:
https://github.com/seraphile/rimshare/wiki/Colouring-in-Images

GREAT step-by-step tutorial on making mods made ESPECIALLY for RimWorld:
https://spdskatr.github.io/RWModdingResources/

Gerrymon

Damn I found the problem. I am really stupid. The folder for textures turned out not named "Texture", but "Textures". That's why the game can't find my textures. Thank's for the links tho! That's really handy. Much appreciated!

Harry_Dicks

No problem. If you need any help in the future with the xml you can always find me at the link in my signature :)