Mod not loading content

Started by LunarAura, February 13, 2021, 11:47:41 AM

Previous topic - Next topic

LunarAura

Hi there! Newbie modder here. I've followed the file structure outlined in the modding tutorials, and tried to test a new plant, but my xml files aren't being detected by Rimworld. Here's the error message:
Mod RimDesserts did not load any content. Following load folders were used:
  - C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\RimDesserts
Verse.Log:Error(String, Boolean)
Verse.<>c:<LoadModContent>b__13_1()
Verse.LongEventHandler:ExecuteToExecuteWhenFinished()
Verse.LongEventHandler:UpdateCurrentAsynchronousEvent()
Verse.LongEventHandler:LongEventsUpdate(Boolean&)
Verse.Root:Verse.Root.Update_Patch1(Root)
Verse.Root_Entry:Update()

Any help would be appreciated :)

Canute

Hi,
at first you should look at
\Mods\RimDesserts
what do you see.
When you don't see the folder About,Defs,....  then you made the wrong file structure.

LunarAura

I made my about and defs folder exactly as shown in the modding tutorial on the Rimworld wiki. It still doesn't load properly. I've attached a screenshot of my file structure, am I missing a folder?

Canute

File structure looks ok so far.
Maybe you should zip the mod and attach it to your answer. So someone can take a look on it.

LunarAura


battlemage64

#5
I think you made a mistake with Plants_Cultivated_Farm.xml. Not certain if that's what's causing the error, but it might help?
You forgot to put a <ThingDef> tag in there. This:
<?xml version="1.0" encoding="utf-8"?>
<Defs ParentName="PlantBase">
<defName>Plant_Modded_Test</defName>
<label>Sugarcane Plant</label>
<description>A sugarcane plant</description>
<statBases>
  <MaxHitPoints>65</MaxHitPoints>
  <Nutrition>0.18</Nutrition>
</statBases>
<graphicData>
  <texPath>Things/Plant/RicePlant</texPath>
  <graphicClass>Graphic_Random</graphicClass>
</graphicData>
<selectable>true</selectable>
<pathCost>14</pathCost>
<ingestible />
<plant>
  <dieIfLeafless>true</dieIfLeafless>
  <maxMeshCount>4</maxMeshCount>
  <harvestTag>Standard</harvestTag>
  <harvestedThingDef>RawModdedPlantTest</harvestedThingDef>
  <harvestYield>6</harvestYield>
  <sowTags>
<li>Ground</li>
<li>Hydroponic</li>
  </sowTags>
  <topWindExposure>0.1</topWindExposure>
  <growDays>.1</growDays>
  <visualSizeRange>0.3~0.8</visualSizeRange>
  <wildOrder>2</wildOrder>
</plant>
  </Defs>


should be this:
<?xml version="1.0" encoding="utf-8"?>
<Defs>
<ThingDef  ParentName="PlantBase">
<defName>Plant_Modded_Test</defName>
<label>Sugarcane Plant</label>
<description>A sugarcane plant</description>
<statBases>
  <MaxHitPoints>65</MaxHitPoints>
  <Nutrition>0.18</Nutrition>
</statBases>
<graphicData>
  <texPath>Things/Plant/RicePlant</texPath>
  <graphicClass>Graphic_Random</graphicClass>
</graphicData>
<selectable>true</selectable>
<pathCost>14</pathCost>
<ingestible />
<plant>
  <dieIfLeafless>true</dieIfLeafless>
  <maxMeshCount>4</maxMeshCount>
  <harvestTag>Standard</harvestTag>
  <harvestedThingDef>RawModdedPlantTest</harvestedThingDef>
  <harvestYield>6</harvestYield>
  <sowTags>
<li>Ground</li>
<li>Hydroponic</li>
  </sowTags>
  <topWindExposure>0.1</topWindExposure>
  <growDays>.1</growDays>
  <visualSizeRange>0.3~0.8</visualSizeRange>
  <wildOrder>2</wildOrder>
</plant>
</ThingDef>
  </Defs>


If that doesn't help, you could try:
1) add a LoadFolders.xml (because the only time I've ever gotten that specific error was when I needed to fix my LoadFolder.xml)
2) add placeholder textures (the XML code you wrote references texture files that aren't in your mod yet, maybe the fact that they're not there is causing the error?)

Hope one of those helps! I'm also new to modding though so I could be wrong.
I love to mod and boy am I bad at it

battlemage64

Update: I tried playing with your mod, exactly as it was when I downloaded it, and... it worked for me... the XML loaded fine and I even spawned it in in-game. IDEK why you're getting the error but if anything is different between the .zip you sent and the files you're using, consider using the .zip version I guess...
I love to mod and boy am I bad at it