(SOLVED) modded leafless tree images not loading

Started by Igabod, February 21, 2015, 11:30:52 PM

Previous topic - Next topic

Igabod

I downloaded the 9d hotfix and it did fix the random images loading issue. But leafless tree images still aren't loading correctly.


Tynan

Are you sure they were originally configured properly?

Remember that the leafless and original graphics need to use the same graphic type.

If the original is a graphic_Collection, you'd address the folder holding all the images.

If it's a Graphic_Single, as appears to be the case here, you'd address the actual image itself. Is that the case? Do all these plants use Graphic_Single? Because none of the original plants do, but the way you've addressed these leafless graphics is the Graphic_Single way.

It would be great if you could post the mod that causes this.
Tynan Sylvester - @TynanSylvester - Tynan's Blog

Igabod

I copied the vanilla trees for the leafless graphics. The mod is attached to this post. The code for the first tree on the error list is listed below.


  <ThingDef ParentName="TreeBase">
    <defName>PlantTreeCherryBlossom</defName>
    <label>cherry blossom tree</label>
    <description>Cherry blossom trees are not just a good source of building materials, they are also one of the most beautiful trees to have in your lawn.</description>
    <graphicPath>Things/Plant/TreeCherryBlossom</graphicPath>
    <graphicClass>Graphic_Random</graphicClass>
    <selectable>true</selectable>
    <statBases>
      <Beauty>25</Beauty>
    </statBases>
    <plant>
      <leaflessGraphicPath>Things/Plant/Tree_Leafless/TreeCherryBlossom_Leafless</leaflessGraphicPath>
      <growthPer20kTicks>0.03</growthPer20kTicks>
      <harvestWork>1200</harvestWork>
      <harvestDestroys>true</harvestDestroys>
      <harvestedThingDef>WoodLog</harvestedThingDef>
      <harvestYieldRange>
        <min>15</min>
        <max>50</max>
      </harvestYieldRange>
      <harvestTag>Wood</harvestTag>
      <harvestMinGrowth>0.50</harvestMinGrowth>
      <sowTags>
        <li>Ground</li>
      </sowTags>
      <sowWork>1200</sowWork>
      <blockAdjacentSow>true</blockAdjacentSow>
      <wildClusterSizeRange>
        <min>5</min>
        <max>15</max>
      </wildClusterSizeRange>
      <wildClusterRadius>15</wildClusterRadius>
      <visualSizeRange>
        <min>0.75</min>
        <max>2.25</max>
      </visualSizeRange>
  </plant>
  </ThingDef>


Tree_Leafless is the folder name where I have all the leafless tree graphics. The "TreeCherryBlossom_Leafless" is the file name minus the .png.

[attachment deleted due to age]

Tynan

Yes, this is misconfigured. You need to put each leafless PNG in its own folder. The folders should have the names currently used for the PNG.

Graphic_Random should always be pointed at folders, never PNGs.
Tynan Sylvester - @TynanSylvester - Tynan's Blog

skullywag

So the cherry blossom above is looking for a folder called "TreeCherryBlossom" and will load all images inside it? Youll need need 2 folders Iggy 1 with the leafed trees and 1 without.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

Tynan

Tynan Sylvester - @TynanSylvester - Tynan's Blog

Igabod

That did indeed fix it. It worked the way I had it on Alpha 8 and the change wasn't visible so I just assumed it was a bug related to the other image loading bug. Sorry to waste your time.