Need Help with old mod that has buggy textures but works otherwise.

Started by AntiMatter, April 04, 2015, 06:37:10 AM

Previous topic - Next topic

AntiMatter

Hi guys,

i was just wondering what has changed in Alpha 9 to make a certain mod which i got help with to work in alpha 8 give a pink X box in alpha 9. oh the actual mod still works. i get steel/iron for nothing (yes i cheat) but i was curious because this style of coding is still confusing.

i checked the code and i honestly can not find what's wrong due to my lack of understanding of the code also the Wiki has nothing on modding PLANTS!!!

here's the code please spot the problem ^-^

<?xml version="1.0" encoding="utf-8" ?>
<Plants>


   <ThingDef Name="PlantBase" Abstract="True">
    <eType>Plant</eType>
    <category>Plant</category>
    <thingClass>Plant</thingClass>
    <altitudeLayer>LowPlant</altitudeLayer>
    <useStandardHealth>True</useStandardHealth>
    <statBases>
      <Flammability>0.8</Flammability>
    </statBases>
    <tickerType>Rare</tickerType>
    <selectable>False</selectable>
    <neverMultiSelect>True</neverMultiSelect>
    <drawerType>MapMeshOnly</drawerType>
    <shaderType>CutoutPlant</shaderType>
    <plant>
      <harvestDestroys>true</harvestDestroys>
      <soundHarvesting>Harvest_Standard</soundHarvesting>
      <soundHarvestFinish>Harvest_Standard_Finish</soundHarvestFinish>
      <sowWork>150</sowWork>
      <fertilityMin>0.5</fertilityMin>
      <fertilityFactorGrowthRate>1.0</fertilityFactorGrowthRate>
      <topWindExposure>0.1</topWindExposure>
      <growthPer20kTicks>0.48</growthPer20kTicks>
      <growMinGlow>Overlit</growMinGlow>
      <visualSizeRange>
        <min>0.3</min>
        <max>1.00</max>
      </visualSizeRange>
    </plant>
  </ThingDef>
   
   
   <!--=========================== Crops ==============================-->


  <ThingDef ParentName="PlantBase">
    <defName>SteelWeed</defName>
    <label>Steel Weed</label>
    <statBases>
      <MaxHealth>85</MaxHealth>
      <Beauty>12</Beauty>
    </statBases>
    <description>A strange alien plant that grows a metallic core at it's base.  It has nutrional value, but the plant's core can be harvested as a source of metal.</description>
    <graphicPath>Plant/IronWeed</graphicPath>
    <graphicClass>Graphic_Random</graphicClass>
    <selectable>true</selectable>
    <pathCost>10</pathCost>
    <food>
      <quality>Plant</quality>
      <nutrition>10</nutrition>
    </food>
    <plant>
      <dieIfLeafless>true</dieIfLeafless>
      <shootsSeeds>false</shootsSeeds>
      <harvestTag>Standard</harvestTag>
      <harvestedThingDef>Steel</harvestedThingDef>
      <harvestDestroys>true</harvestDestroys>
      <harvestYieldRange>
        <min>10</min>
        <max>20.0</max>
      </harvestYieldRange>
      <sowTags>
        <li>Ground</li>
        <li>Hydroponic</li>
      </sowTags>
      <topWindExposure>0.1</topWindExposure>
      <growthPer20kTicks>0.48</growthPer20kTicks>
      <lifeSpan>200000</lifeSpan>
      <fertilityFactorGrowthRate>0.4</fertilityFactorGrowthRate>
      <visualSizeRange>
        <min>0.3</min>
        <max>1.05</max>
      </visualSizeRange>
    </plant>
  </ThingDef>
   
</Plants>


i'd also like it if someone updated the wiki to include plant modding tutorials so i don't have to bug people about this mod and i can fix it myself :)
sometimes, all you need is to get out and push.
-Jeb kerman

Latta

change <graphicClass> to Graphic_Single. You need multiple textures in order to use Graphic_Random, as its name suggests.

skullywag

Just guessing but put the Images in a folder of the same name as the plant, graphic_random points to a folder not an image folder.

edit - or do that /\
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

AntiMatter

Quote from: Latta on April 04, 2015, 07:03:25 AM
change <graphicClass> to Graphic_Single. You need multiple textures in order to use Graphic_Random, as its name suggests.

ah... hmmm... but it's a growing plant.... so does that mean rimworld just scales the image from it's original image to simulate animation of the plant growing? that's smart and also saves space...
sometimes, all you need is to get out and push.
-Jeb kerman

skullywag

Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?