Ludeon Forums

RimWorld => Mods => Help => Topic started by: Leonapp on March 11, 2017, 06:57:37 AM

Title: Need help with an assembly [SOLVED]
Post by: Leonapp on March 11, 2017, 06:57:37 AM
I have bee trying to create an incident that spawns a pawn in the world. Kinda like ThrumboPass. I have made a Assembly and I have made a xml fir the incident. But I keep getting one error and I dont know why. "Could not find a type named IncidentWorker_Slimequeens". I have the incident xml with the incident and an assembly with no errors...

I am a noob coder when it comes to assemblies. I started working with them yesterday but I have managed to create one without errors in sharp develop. I just dont get why I get the error in Rimworld...

Assembly: http://pastebin.com/00KMCVAM
Xml: http://pastebin.com/mfXVnLip
Error I am getting: http://pastebin.com/bFMTbuaA
Title: Re: Need help with an assembly
Post by: RawCode on March 12, 2017, 11:04:56 AM
you forgot about namespace - "IncidentWorker_Slimequeens" in your case*


*don't make such namespaces bro

Title: Re: Need help with an assembly
Post by: Leonapp on March 12, 2017, 11:07:38 AM
Quote from: RawCode on March 12, 2017, 11:04:56 AM
you forgot about namespace - "IncidentWorker_Slimequeens" in your case*


*don't make such namespaces bro
I didnt have that namespace at first. I simply had L-Slimes. But I have just been testing around to see if anything work... And where did I forgot to put the namespace?
Title: Re: Need help with an assembly
Post by: RawCode on March 12, 2017, 08:45:02 PM
in your XML
Title: Re: Need help with an assembly
Post by: Leonapp on March 13, 2017, 06:41:54 AM
Quote from: RawCode on March 12, 2017, 08:45:02 PM
in your XML
Can you be more specifik? I have checked other xmls and they dont use namespace in theirs. They use incident worker like I did...
Title: Re: Need help with an assembly
Post by: RawCode on March 13, 2017, 06:44:38 AM
they don't have because native (build in) types are loaded in separate manner.
all mod added types must have namespace definition in front of each type definition.
Title: Re: Need help with an assembly
Post by: Leonapp on March 13, 2017, 07:33:22 AM
Okay makes sense. How should I do it? I can check some mods xmls but incase I dont find anything, can you give an example?
Title: Re: Need help with an assembly
Post by: RawCode on March 13, 2017, 08:03:00 AM
namespace.type
Title: Re: Need help with an assembly
Post by: Leonapp on March 13, 2017, 08:39:58 AM
Thank you a lot, it works. To describe more of the solution:
At first I wrote
<workerClass>IncidentWorker_Slimequeens</workerClass>

But what you need is to put the namespace as well before like this
<workerClass>MyNameSpace.IncidentWorker_Slimequeens</workerClass>