Ludeon Forums

RimWorld => Mods => Help => Topic started by: AntiMatter on April 04, 2015, 06:37:10 AM

Title: Need Help with old mod that has buggy textures but works otherwise.
Post by: AntiMatter on April 04, 2015, 06:37:10 AM
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 :)
Title: Re: Need Help with old mod that has buggy textures but works otherwise.
Post by: 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.
Title: Re: Need Help with old mod that has buggy textures but works otherwise.
Post by: skullywag on April 04, 2015, 07:03:39 AM
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 /\
Title: Re: Need Help with old mod that has buggy textures but works otherwise.
Post by: AntiMatter on April 04, 2015, 07:19:31 AM
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...
Title: Re: Need Help with old mod that has buggy textures but works otherwise.
Post by: skullywag on April 04, 2015, 07:32:24 AM
it does indeed.