Ludeon Forums

RimWorld => Mods => Help => Topic started by: Igabod on February 21, 2015, 11:30:52 PM

Title: (SOLVED) modded leafless tree images not loading
Post by: Igabod on February 21, 2015, 11:30:52 PM
I downloaded the 9d hotfix and it did fix the random images loading issue. But leafless tree images still aren't loading correctly.

(http://i.imgur.com/D3kOY2j.png)
Title: Re: [Alpha 9d] modded leafless tree images not loading
Post by: Tynan on February 23, 2015, 02:09:29 AM
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.
Title: Re: [Alpha 9d] modded leafless tree images not loading
Post by: Igabod on February 23, 2015, 02:46:13 AM
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]
Title: Re: [Alpha 9d] modded leafless tree images not loading
Post by: Tynan on February 23, 2015, 03:01:21 AM
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.
Title: Re: [Alpha 9d] modded leafless tree images not loading
Post by: skullywag on February 23, 2015, 03:04:54 AM
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.
Title: Re: [Alpha 9d] modded leafless tree images not loading
Post by: Tynan on February 23, 2015, 03:05:48 AM
I'll just move this to Modding -> Help.
Title: Re: [Alpha 9d] modded leafless tree images not loading
Post by: Igabod on February 23, 2015, 04:27:02 AM
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.