Ludeon Forums

Ludeon Forums

  • August 17, 2022, 04:10:03 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Connect xml to dll  (Read 338 times)

Worthy0ne

  • Muffalo
  • *
  • Posts: 3
  • Refugee
    • View Profile
Connect xml to dll
« on: April 30, 2022, 10:29:56 PM »

I am trying to make my own hediff Giver. Unfortunately, I get an error during the startup of the game saying that my custom class for the giver could not be found.

Could not find type named ModTest.Class1 from node <li Class="ModTest.Class1"></li>

I can't figure out where my problem is. I have my dll file in the "Assemblies" file. My "Assemblies" file is in the "1.3" file. My xml file is in the "Defs" file. This seems like something simple but I can't figure it out. Does anyone know where I am going wrong with my code?

Hediff Giver:
Code: [Select]
<?xml version="1.0" encoding="utf-8" ?>
<Defs>

  <HediffGiverSetDef>
    <defName>Lapelli</defName>
    <hediffGivers>
  <li Class="ModTest.Class1">

  </li>
    </hediffGivers>
  </HediffGiverSetDef>


</Defs>


c# code:
Code: [Select]
using RimWorld;
using Verse;

namespace ModTest
{
public class Class1 : HediffGiver
{
        // nothing here yet
}
}

« Last Edit: May 08, 2022, 11:54:07 PM by Worthy0ne »
Logged

RawCode

  • Super Tester
  • Planetologist
  • ***
  • Posts: 1987
  • Refugee
    • View Profile
Re: Connect xml to dll
« Reply #1 on: May 10, 2022, 12:32:23 PM »

add trace output to make sure that your dll is actually loaded
Logged