Cant load custom texture

Started by Lordzias, November 13, 2019, 12:36:23 PM

Previous topic - Next topic

Lordzias

Hello, I've been trying  my hand at modding a custom item into my game. I went along the modding tutorial from the wiki when it comes to creating the directory etc.

My problem started when I tried to add some custome textures to an item I created :

<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<ThingDef ParentName="ApparelMakeableBase">
    <defName>MyMod_Panties</defName>
    <label>Panties</label>
    <description>Simple panties.</description>
    <graphicData>
      <texPath>Apparel/Display/Panties1</texPath>
      <graphicClass>Graphic_Single</graphicClass>
    </graphicData>
    <costStuffCount>40</costStuffCount>
    <stuffCategories>
      <li>Fabric</li>
      <li>Leathery</li>
    </stuffCategories>
    <thingCategories>
      <li>Apparel</li>
    </thingCategories>
    <statBases>
<MaxHitPoints>100</MaxHitPoints>
<WorkToMake>1600</WorkToMake>
      <Mass>0.25</Mass>
      <StuffEffectMultiplierArmor>0.2</StuffEffectMultiplierArmor>
      <StuffEffectMultiplierInsulation_Cold>0.22</StuffEffectMultiplierInsulation_Cold>
      <StuffEffectMultiplierInsulation_Heat>0.10</StuffEffectMultiplierInsulation_Heat>
      <EquipDelay>1.5</EquipDelay>
    </statBases>
    <apparel>
      <bodyPartGroups>
        <li>Torso</li>
        <li>Shoulders</li>       
      </bodyPartGroups>
      <wornGraphicPath>Pants</wornGraphicPath>
      <layers>
        <li>OnSkin</li>
      </layers>
      <tags>
        <li>IndustrialBasic</li>
      </tags>
      <defaultOutfitTags>
        <li>Worker</li>
        <li>Soldier</li>
      </defaultOutfitTags>
    </apparel>
    <colorGenerator Class="ColorGenerator_StandardApparel" />
  </ThingDef>
</Defs>


I copied the definition of an item from the core folder, changed the name, etc. The item shows correctly in appropriate category in Prepare Carfully menu but after selecting it I get an error:

Failed to find any texture while constructing Multi(initPath=Pants_Thin, color=RGBA(0.682, 0.859, 0.894, 1.000), colorTwo=RGBA(1.000, 1.000, 1.000, 1.000)). Filenames have changed; if you are converting an old mod, recommend renaming textures from *_back to *_north, *_side to *_east, and *_front to *_south.
Verse.Log:Error(String, Boolean)
Verse.Graphic_Multi:Init(GraphicRequest)
Verse.GraphicDatabase:GetInner(GraphicRequest)
Verse.GraphicDatabase:Get(String, Shader, Vector2, Color, Color)
GraphicApparelDetour.ApparelGraphicRecordGetter:TryGetGraphicApparel(Apparel, BodyTypeDef, ApparelGraphicRecord&)
Verse.PawnGraphicSet:ResolveApparelGraphics()
RimWorld.Pawn_ApparelTracker:<ApparelChanged>m__1()
Verse.LongEventHandler:ExecuteToExecuteWhenFinished()
Verse.LongEventHandler:ExecuteWhenFinished(Action)
RimWorld.Pawn_ApparelTracker:ApparelChanged()
RimWorld.Pawn_ApparelTracker:Notify_ApparelAdded_Patch1(Object, Apparel)
Verse.ThingOwner:NotifyAdded(Thing)
Verse.ThingOwner`1:TryAdd(Thing, Boolean)
RimWorld.Pawn_ApparelTracker:Wear_Patch0(Object, Apparel, Boolean)
EdB.PrepareCarefully.CustomPawn:AddApparelToPawn(Pawn, PawnLayer)
EdB.PrepareCarefully.CustomPawn:CopyApparelToPawn(Pawn)
EdB.PrepareCarefully.CustomPawn:ResetApparel()
EdB.PrepareCarefully.CustomPawn:SetSelectedApparel(PawnLayer, ThingDef)
EdB.PrepareCarefully.<>c__DisplayClass55_0:<ShowApparelDialog>b__2(ThingDef)
EdB.PrepareCarefully.Dialog_Options`1:DoWindowContents(Rect)
Verse.<WindowOnGUI>c__AnonStorey0:<>m__0(Int32)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, Int32, GUISkin, Int32, Single, Single, GUIStyle)


The structure of my texture folder:


And its contents (note: I took the textures from Apparello 2 for the sake of learning):


Any ideas whats wrong?

LWM

So you've got a folder in Apparel called "Display" that has Panties1.png in it?