(Solved) Systematic error to spawn raid with hidden custom faction

Started by Hiztaar, November 04, 2017, 06:19:00 AM

Previous topic - Next topic

Hiztaar

Hi everybody,

Here is my problem. I have made my Alien Xenomorphs mod. So I have my aliens race, pawns and faction. The faction is Hidden and obviously not humanlike. They are ennemies and should normaly spawn to attack. But here is the issue, everytime I try to spawn them, I get this error :

Exception filling window for Verse.Dialog_DebugOptionListLister: System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorld.IncidentWorker_Raid.TryExecuteWorker (RimWorld.IncidentParms parms) [0x002c1] in C:\Dev\RimWorld\Assets\Scripts\RimWorld\Game\Storyteller\Incidents\Workers\PawnsArrive\IncidentWorker_Raid.cs:185
  at RimWorld.IncidentWorker_RaidEnemy.TryExecuteWorker (RimWorld.IncidentParms parms) [0x00003] in C:\Dev\RimWorld\Assets\Scripts\RimWorld\Game\Storyteller\Incidents\Workers\PawnsArrive\IncidentWorker_RaidEnemy.cs:24
  at RimWorld.IncidentWorker.TryExecute (RimWorld.IncidentParms parms) [0x00003] in C:\Dev\RimWorld\Assets\Scripts\RimWorld\Defs\DefTypes\IncidentDef.cs:283
  at Verse.Dialog_DebugActionsMenu.DoRaid (RimWorld.IncidentParms parms) [0x0002e] in C:\Dev\RimWorld\Assets\Scripts\Verse\UI\DevTools\Dialogs\Dialog_DebugActionsMenu.cs:2239
  at Verse.Dialog_DebugActionsMenu+<DoListingItems_MapActions>c__AnonStorey9+<DoListingItems_MapActions>c__AnonStorey5+<DoListingItems_MapActions>c__AnonStorey7+<DoListingItems_MapActions>c__AnonStorey8.<>m__0 () [0x0002d] in C:\Dev\RimWorld\Assets\Scripts\Verse\UI\DevTools\Dialogs\Dialog_DebugActionsMenu.cs:235
  at Verse.Dialog_DebugOptionLister.DebugAction (System.String label, System.Action action) [0x00045] in C:\Dev\RimWorld\Assets\Scripts\Verse\UI\DevTools\Dialogs\Dialog_DebugOptionListLister.cs:23
  at Verse.Dialog_DebugOptionListLister.DoListingItems () [0x00037] in C:\Dev\RimWorld\Assets\Scripts\Verse\UI\DevTools\Dialogs\Dialog_DebugOptionLister.cs:45
  at Verse.Dialog_OptionLister.DoWindowContents (Rect inRect) [0x000ee] in C:\Dev\RimWorld\Assets\Scripts\Verse\UI\Windows\Dialog\DialogsVarious\Dialog_OptionLister.cs:60
  at Verse.Window+<WindowOnGUI>c__AnonStorey0.<>m__0 (Int32 x) [0x0021c] in C:\Dev\RimWorld\Assets\Scripts\Verse\UI\Windows\Window.cs:195
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
Verse.Log:Error(String) (at C:\Dev\RimWorld\Assets\Scripts\Verse\Utility\Debug\Log\Log.cs:46)
Verse.<WindowOnGUI>c__AnonStorey0:<>m__0(Int32) (at C:\Dev\RimWorld\Assets\Scripts\Verse\UI\Windows\Window.cs:199)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, Int32, GUISkin, Int32, Single, Single, GUIStyle) (at C:\buildslave\unity\build\Runtime\IMGUI\Managed\GUI.cs:1817)


Of course they don't spawn alone and the manual spawn from dev console bring me that.

Do someone knows how to fix that ?

Thanks
"What do you mean, "*They* cut the power ?"

[B18] United States Colonial Marines (Aliens) - All mods

Albion

I'm not exactly sure but it looks like the storyteller is having issues creating the raid alert. Do you have labels and plural labels for your faction and pawnKindDefs?
Compare them to the original defs and check if you have a value for all the different tags they use.

Hiztaar

I don't see any difference in the mandatory tags. I removed those useless for a permanent enemy faction.

I can show you the files if you want, you will see.
"What do you mean, "*They* cut the power ?"

[B18] United States Colonial Marines (Aliens) - All mods

Albion

Just as an fyi for everybody else who may or may not be reading this:
Hiztaar did send me his files and looking through them I finally realized that his custom race was missing a <intelligence> tag.
Adding this resolved the error and the raids now happen as intended.

Hiztaar

"What do you mean, "*They* cut the power ?"

[B18] United States Colonial Marines (Aliens) - All mods

SickBoyWi

Sorry to dig up an old thread, but you guys just saved my life. I've been debugging this issue for hours, trying to figure it out, and having no luck whatsoever.

I have a new faction, and new race. When raids spawn, I'd get the below errors. There's no indication of what the heck the issue is in that error. Thanks a million, and I will post the full error stack here once again in case anyone else is searching and searching. Thanks a million Albion for adding that followup post!
Exception filling window for Verse.Dialog_DebugOptionListLister: System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorld.IncidentWorker_Raid.TryExecuteWorker (RimWorld.IncidentParms parms) [0x00000] in <filename unknown>:0
  at RimWorld.IncidentWorker_RaidEnemy.TryExecuteWorker (RimWorld.IncidentParms parms) [0x00000] in <filename unknown>:0
  at RimWorld.IncidentWorker.TryExecute (RimWorld.IncidentParms parms) [0x00000] in <filename unknown>:0
  at Verse.Dialog_DebugActionsMenu.DoRaid (RimWorld.IncidentParms parms) [0x00000] in <filename unknown>:0
  at Verse.Dialog_DebugActionsMenu+<DoListingItems_MapActions>c__AnonStorey8+<DoListingItems_MapActions>c__AnonStoreyA+<DoListingItems_MapActions>c__AnonStoreyB+<DoListingItems_MapActions>c__AnonStoreyC.<>m__0 () [0x00000] in <filename unknown>:0
  at Verse.Dialog_DebugOptionLister.DebugAction (System.String label, System.Action action) [0x00000] in <filename unknown>:0
  at Verse.Dialog_DebugOptionListLister.DoListingItems () [0x00000] in <filename unknown>:0
  at Verse.Dialog_OptionLister.DoWindowContents (Rect inRect) [0x00000] in <filename unknown>:0
  at Verse.Window+<WindowOnGUI>c__AnonStorey0.<>m__0 (Int32 x) [0x00000] in <filename unknown>:0
Verse.Log:Error(String, Boolean)
Verse.<WindowOnGUI>c__AnonStorey0:<>m__0(Int32)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, Int32, GUISkin, Int32, Single, Single, GUIStyle)

Mouse position stack is not empty. There were more calls to BeginScrollView than EndScrollView. Fixing.
Verse.Log:Error(String, Boolean)
Verse.Widgets:EnsureMousePositionStackEmpty()
Verse.Root:Update_Patch1(Object)
Verse.Root_Play:Update()

Albion

And this is why one should always post the solution of a problem.
Future modders with the same issue will always appreciate it  ;)
Glad we were able to help you.