Texture error...

Started by Bombadil, February 14, 2016, 07:03:06 AM

Previous topic - Next topic

Bombadil

Hi everyone. This is my first attempt at a mod ever. Rimworld is such a great game it has inspired me!

I'm trying to start off by making a small mod that adds a bee. I've made some textures but I can't get them to load - I just get pink squares and this error:

Initializing new game with mods Core and ATW-Bees

(Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56)

Failed to find any texture while constructing Multi(initPath=Things/Pawn/Animal/Bee, color=RGBA(1.000, 1.000, 1.000, 1.000), colorTwo=RGBA(1.000, 1.000, 1.000, 1.000))

(Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56)

Failed to find any texture while constructing Multi(initPath=Things/Pawn/Animal/Bee, color=RGBA(0.340, 0.320, 0.300, 1.000), colorTwo=RGBA(0.340, 0.320, 0.300, 1.000))

(Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56)


I've searched for ages on the forums but couldn't find a solution or even a simple example to follow - I have tried looking at some other mods for examples but they seem to do a lot more and it is confusing (I have no coding skills). I tried some stuff with graphic_single but had no luck. My error is perhaps a naming convention error or something simple - I am out of ideas...

My PawnKinds_Animal_Insect.xml:
<?xml version="1.0" encoding="utf-8" ?>
<Defs>

  <PawnKindDef Name="AnimalBase" Abstract="True">
  </PawnKindDef>

  <PawnKindDef ParentName="AnimalBase">
    <defName>Bee</defName>
    <label>bee</label>
    <race>Bee</race>
    <combatPower>30</combatPower>
    <wildSpawn_EcoSystemWeight>0.25</wildSpawn_EcoSystemWeight>
    <wildSpawn_spawnWild>true</wildSpawn_spawnWild>
    <lifeStages>
      <li>
        <bodyGraphicData>
          <texPath>Things/Pawn/Animal/Bee</texPath>
          <drawSize>1</drawSize>
        </bodyGraphicData>
        <dessicatedBodyGraphicData>
          <texPath>Things/Pawn/Animal/CritterDessicatedSmall</texPath>
          <drawSize>1</drawSize>
        </dessicatedBodyGraphicData>
      </li>
      <li>
        <bodyGraphicData>
          <texPath>Things/Pawn/Animal/Bee</texPath>
          <drawSize>1.25</drawSize>
        </bodyGraphicData>
        <dessicatedBodyGraphicData>
          <texPath>Things/Pawn/Animal/CritterDessicatedSmall</texPath>
          <drawSize>1.25</drawSize>
        </dessicatedBodyGraphicData>
      </li>
      <li>
        <bodyGraphicData>
          <texPath>Things/Pawn/Animal/Bee</texPath>
          <drawSize>1.5</drawSize>
        </bodyGraphicData>
        <dessicatedBodyGraphicData>
          <texPath>Things/Pawn/Animal/CritterDessicatedSmall</texPath>
          <drawSize>1.5</drawSize>
        </dessicatedBodyGraphicData>
      </li>
    </lifeStages>
  </PawnKindDef>
 
</Defs>



My Races_Animal_Insect.xml:
<?xml version="1.0" encoding="utf-8" ?>
<Defs>

  <ThingDef Name="BasePawn" Abstract="True">
    <thingClass>Pawn</thingClass>
    <category>Pawn</category>
    <selectable>true</selectable>
    <tickerType>Normal</tickerType>
    <altitudeLayer>Pawn</altitudeLayer>
    <useHitPoints>false</useHitPoints>
    <hasTooltip>true</hasTooltip>
    <soundImpactDefault>BulletImpactFlesh</soundImpactDefault>
    <inspectorTabs>
      <li>ITab_Pawn_Health</li>
      <li>ITab_Pawn_Needs</li>
      <li>ITab_Pawn_Character</li>
      <li>ITab_Pawn_Training</li>
      <li>ITab_Pawn_Gear</li>
      <li>ITab_Pawn_Guest</li>
      <li>ITab_Pawn_Prisoner</li>
    </inspectorTabs>
    <comps>
      <li>
        <compClass>CompAttachBase</compClass>
      </li>
    </comps>
    <drawGUIOverlay>true</drawGUIOverlay>
  </ThingDef>
 
  <ThingDef ParentName="BasePawn" Name="BaseAnimal" Abstract="True">
    <statBases>
      <Flammability>1.0</Flammability>
      <LeatherAmount>20</LeatherAmount>
    </statBases>
    <race>
      <thinkTree>Animal</thinkTree>
      <minFoodPreferability>Plant</minFoodPreferability>
      <isFlesh>true</isFlesh>
      <hasGenders>true</hasGenders>
      <nameGenerator>NamerAnimalGeneric</nameGenerator>
      <manhunterOnDamageChance>0.0125</manhunterOnDamageChance>
      <nameOnNuzzleChance>0.5</nameOnNuzzleChance>
      <hediffGiverSets>
        <li>OrganicStandard</li>
      </hediffGiverSets>
    </race>
  </ThingDef>

  <!-- ====================================================== -->


  <ThingDef ParentName="BaseAnimal">
    <defName>Bee</defName>
    <label>bee</label>
    <description>A large, hiveless bee.</description>
    <statBases>
      <MoveSpeed>3.7</MoveSpeed>
      <ArmorRating_Blunt>0.1</ArmorRating_Blunt>
      <ArmorRating_Sharp>0.4</ArmorRating_Sharp>
      <ComfyTemperatureMin>0</ComfyTemperatureMin>
      <MarketValue>100</MarketValue>
      <LeatherAmount>0</LeatherAmount>
    </statBases>
    <verbs>
      <li>
        <verbClass>Verb_MeleeAttack</verbClass>
        <defaultCooldownTicks>100</defaultCooldownTicks>
        <meleeDamageBaseAmount>7</meleeDamageBaseAmount>
        <meleeDamageDef>Bite</meleeDamageDef>
        <linkedBodyPartsGroup>Mouth</linkedBodyPartsGroup>
      </li>
    </verbs>
    <race>
      <body>BeetleLike</body>
      <baseBodySize>0.2</baseBodySize>
      <baseHungerRate>0.20</baseHungerRate>
      <baseHealthScale>0.4</baseHealthScale>
      <meatLabel>scarab meat</meatLabel>
      <diet>Omnivorous</diet>
      <wildness>0.95</wildness>
      <manhunterOnTameFailChance>0.01</manhunterOnTameFailChance>
      <manhunterOnDamageChance>1</manhunterOnDamageChance>
      <nuzzlePower>0.4</nuzzlePower>
      <nuzzleChancePerHour>0</nuzzleChancePerHour>
      <lifeExpectancy>10</lifeExpectancy>
      <lifeStageAges>
        <li>
          <def>EusocialInsectLarva</def>
          <minAge>0</minAge>
        </li>
        <li>
          <def>EusocialInsectJuvenile</def>
          <minAge>0.03</minAge>
        </li>
        <li>
          <def>EusocialInsectAdult</def>
          <minAge>0.4</minAge>
          <soundWounded>Pawn_Megascarab_Wounded</soundWounded>
          <soundDeath>Pawn_Megascarab_Death</soundDeath>
          <soundCall>Pawn_Megascarab_Call</soundCall>
          <soundAngry>Pawn_Megascarab_Angry</soundAngry>
        </li>
      </lifeStageAges>
      <soundMeleeHitPawn>Pawn_Melee_SmallScratch_HitPawn</soundMeleeHitPawn>
      <soundMeleeHitBuilding>Pawn_Melee_SmallScratch_HitBuilding</soundMeleeHitBuilding>
      <soundMeleeMiss>Pawn_Melee_SmallScratch_Miss</soundMeleeMiss>
    </race>
  </ThingDef>

</Defs>


I have attached my files also.

If anyone could offer some advice I would greatly appreciate it!

Bombadil

[attachment deleted by admin - too old]

Shinzy

oh it's just the lower/upper case letter in "Bee"
texture paths all look for "Bee" and the texture itself is just "bee" so there =P
also your sideview needs to be flipped around unless you intended them to fly true skyrim dragon way

Bombadil

Thanks for that Shinzy, with changing the path to lowercase the textures are loading perfectly now! And I flipped the side view too.
I literally spent hours trying to figure it out. Coding can be brutal for beginners! Or I'm just a bit thick...

Shinzy

Quote from: Bombadil on February 14, 2016, 02:48:16 PMOr I'm just a bit thick...

Yes =P
I most definately didn't wrestle with texture paths for several hours over the span of two days when I tried to make my first mod thingie.
You're just thick

Fluffy (l2032)

Stuff like this happens to all of us :P

I once spent multiple hours figuring out why my mod was failing only to discover there was a stray 's' somewhere random in the xml. I probably tried to Ctrl-s save without ctrl, but that cost me two days' worth of frustrated tweaking and reloading the game...

isistoy

And that's why 2 pairs of eyes are often worth more than just 2+2, and sometimes less... :D
<Stay on the scene like a State machine>