Texture Path Issue

Started by DaemonDeathAngel, December 21, 2016, 02:51:36 PM

Previous topic - Next topic

DaemonDeathAngel

I continually run into the same issue when attempting to create anything, such as buildings, furniture, or items.

The error is as follows:
Failed to find any texture while constructing Multi(initPath=/Things/Neolithic/Beds/BedHide, color=RGBA(0.500, 0.500, 1.000, 0.350), colorTwo=RGBA(1.000, 1.000, 1.000, 1.000))
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
Verse.Log:Error(String) (at C:\Dev\RimWorld\Assets\Scripts\Verse\Utility\Debug\Log\Log.cs:46)
Verse.Graphic_Multi:Init(GraphicRequest) (at C:\Dev\RimWorld\Assets\Scripts\Verse\Thing\Graphic\Graphic_Multi.cs:60)
Verse.GraphicDatabase:GetInner(GraphicRequest) (at C:\Dev\RimWorld\Assets\Scripts\Verse\Thing\Graphic\GraphicDatabase.cs:151)
Verse.GraphicDatabase:Get(Type, String, Shader, Vector2, Color, Color, GraphicData) (at C:\Dev\RimWorld\Assets\Scripts\Verse\Thing\Graphic\GraphicDatabase.cs:126)
Verse.GraphicData:Init() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Defs\DefTypes\DefParts\GraphicData.cs:131)
Verse.GraphicData:get_Graphic() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Defs\DefTypes\DefParts\GraphicData.cs:86)
Verse.ThingDef:<PostLoad>m__715() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Defs\DefTypes\ThingDef.cs:519)
Verse.LongEventHandler:ExecuteToExecuteWhenFinished() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\LongEventHandler.cs:341)
Verse.LongEventHandler:UpdateCurrentAsynchronousEvent() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\LongEventHandler.cs:263)
Verse.LongEventHandler:LongEventsUpdate() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\LongEventHandler.cs:179)
Verse.Root:Update() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\Root\Root.cs:93)
Verse.Root_Entry:Update() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\Root\Root_Entry.cs:23)


This is my path to the image file:
\Mods\Rimworld Revamped\Textures\Things\Neolithic\Beds
The image is within the "Beds" Folder

Now the following is what I am attempting to use to set up a new piece of furniture, A.K.A HideBed:
  <ThingDef ParentName="BuildingBase">
    <defName>HideBed</defName>
    <label>Hide Bed</label>
<Description>A relatively warm bed made out of a mixture of Rocks, Leather, and other animal products.</Description>
    <ThingClass>Building_Bed</ThingClass>
<graphicData>
  <texPath>Things/Neolithic/Beds/BedHide</texPath>
  <graphicClass>Graphic_Multi</graphicClass>
      <shaderType>CutoutComplex</shaderType>
      <drawSize>(3,4)</drawSize>
    </graphicData>
    <AltitudeLayer>FloorEmplacement</AltitudeLayer>
    <statBases>
      <WorkToBuild>0</WorkToBuild>
      <Comfort>0.4</Comfort>
    </statBases>
<scatterableOnMapGen>false</scatterableOnMapGen>
    <useHitPoints>False</useHitPoints>
    <Size>(1,2)</Size>
    <stuffCategories>
      <li>Metallic</li>
      <li>Woody</li>
      <li>Stony</li>
  <li>Leathery</li>
    </stuffCategories>
    <costStuffCount>35</costStuffCount>
    <DesignationCategory>Furniture</DesignationCategory>
    <Passability>Standable</Passability>
    <DrawGUIOverlay>True</DrawGUIOverlay>
    <building>
      <Bed_ShowSleeperBody>True</Bed_ShowSleeperBody>
      <sowTag>SupportPlantsOnly</sowTag>
      <canPlaceOverImpassablePlant>false</canPlaceOverImpassablePlant>
    </building>
<comps>
<li Class="CompProperties_RoomIdentifier">
<roomStat>Impressiveness</roomStat>
</li>
</comps>
  </ThingDef>


I have tried copying exactly from the core game, and still continue receiving the error, can anyone help me with this issue?

sulusdacor

if you are using "Graphic_Multi" your folder needs to have the following graphic with names (with how your xml is set up):
BedHide_front.png
BedHide_side.png
BedHide_back.png
(if you just want/have one graphic like BedHide.png, use Graphic_Single)

since you are using the shadetype "CutoutComplex" you need the following names textures too:
BedHide_frontm.png
BedHide_sidem.png
BedHide_backm.png
(for  Graphic_Single you would have BedHide_m.png)

check if you have these 6 textures in the folder. the xml is sometimes/always (not 100%sure here) case sensitiv so make sure you dont have any errors there. check your main xml file structure where you embed thingdef section.

your xml seems okay. at least i don't see an error at the moment.

DaemonDeathAngel

I figured that out through trial and error shortly before reading your response, I appreciate you trying to help though, that is something I will need to remember for the future, as I am planning to make a lot of items. Its mainly going to be XML work until I get home from vacation and can look into learning C#

koni

Hello,
Does anybody know, how the paths should be at random graphics, like in the case of art?

Telefonmast

Quote from: koni on December 27, 2016, 06:06:15 AM
Hello,
Does anybody know, how the paths should be at random graphics, like in the case of art?

[Type]/[ObjectToUseTextureOn]

In "<graphicData>" add "<graphicClass>Graphic_Random</graphicClass>"

Example:

<graphicData>
<texPath>Plant/Tiberium/Red</texPath>
<graphicClass>Graphic_Random</graphicClass>
</graphicData>

Telefonmast - Ready to give you good phone connection!
- My mod project

koni

Quote from: Telefonmast on December 27, 2016, 07:20:03 AM
Quote from: koni on December 27, 2016, 06:06:15 AM
Hello,
Does anybody know, how the paths should be at random graphics, like in the case of art?

[Type]/[ObjectToUseTextureOn]

In "<graphicData>" add "<graphicClass>Graphic_Random</graphicClass>"

Example:

<graphicData>
<texPath>Plant/Tiberium/Red</texPath>
<graphicClass>Graphic_Random</graphicClass>
</graphicData>


Thank you, but my proplem was, the textures didn't load. I mean how to name the folders and graphics?

mrofa

With graphic randome the graphic path is pointing the directory.
So assuming you want to have tiberium and randome colors
<texPath>Plant/Tiberium
In tiberium directry you will need to have graphic named same as directory with letters or numbers
TiberiumA, TiberiumB
Tiberium1, Tiberium2
All i do is clutter all around.

koni

#7
Quote from: mrofa on December 27, 2016, 12:26:38 PM
With graphic randome the graphic path is pointing the directory.
So assuming you want to have tiberium and randome colors
<texPath>Plant/Tiberium
In tiberium directry you will need to have graphic named same as directory with letters or numbers
TiberiumA, TiberiumB
Tiberium1, Tiberium2

Aah, thank you very much! Now it works.