(B19) No raids, spawning one through dev mode throws an error [Solved]

Started by darktoes, September 10, 2018, 05:06:10 AM

Previous topic - Next topic

darktoes

Since updating to B19, and of course updating my existing mods and picking up some new ones, I haven't been able to get a single standard raid to spawn. Trying to spawn one through dev mode threw the following error:

Exception filling window for Verse.FloatMenu: System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorld.RaidStrategyWorker.SelectionWeight (Verse.Map map, Single basePoints) [0x00000] in <filename unknown>:0
  at RimWorld.IncidentWorker_RaidEnemy+<ResolveRaidStrategy>c__AnonStorey1.<>m__1 (RimWorld.RaidStrategyDef d) [0x00000] in <filename unknown>:0
  at Verse.GenCollection.TryRandomElementByWeight[RaidStrategyDef] (IEnumerable`1 source, System.Func`2 weightSelector, RimWorld.RaidStrategyDef& result) [0x00000] in <filename unknown>:0
  at RimWorld.IncidentWorker_RaidEnemy.ResolveRaidStrategy (RimWorld.IncidentParms parms, RimWorld.PawnGroupKindDef groupKind) [0x00000] in <filename unknown>:0
  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+<DoListingItems_MapActions>c__AnonStorey7.<>m__0 () [0x00000] in <filename unknown>:0
  at Verse.FloatMenuOption.Chosen (Boolean colonistOrdering, Verse.FloatMenu floatMenu) [0x00000] in <filename unknown>:0
  at Verse.FloatMenuOption.DoGUI (Rect rect, Boolean colonistOrdering, Verse.FloatMenu floatMenu) [0x00000] in <filename unknown>:0
  at Verse.FloatMenu.DoWindowContents (Rect rect) [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)


(It throws the same error regardless of whether I have my full mod list on or am playing purely vanilla.)

Looking through my mods trying to work out what was wrong, I realised that it was throwing a set of errors like the one below every time Rimworld started, even if i disabled every mod in my list.

XML error: <pointsFactor>0.9</pointsFactor> doesn't correspond to any field in type RaidStrategyDef. Context: <RaidStrategyDef><defName>ImmediateAttack</defName><workerClass>RaidStrategyWorker_ImmediateAttack</workerClass><letterLabelEnemy>Raid</letterLabelEnemy><arrivalTextEnemy>They are attacking immediately.</arrivalTextEnemy><letterLabelFriendly>Friendlies</letterLabelFriendly><arrivalTextFriendly>They are moving in to help you immediately.</arrivalTextFriendly><pointsFactor>0.9</pointsFactor><selectionChance>0.75</selectionChance><arriveModes><li>EdgeDrop</li><li>EdgeWalkIn</li><li>CenterDrop</li></arriveModes></RaidStrategyDef>
Verse.Log:Error(String, Boolean)
Verse.DirectXmlToObject:ObjectFromXml(XmlNode, Boolean)
System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
System.Reflection.MethodBase:Invoke(Object, Object[])
Verse.DirectXmlLoader:DefFromNode(XmlNode, LoadableXmlAsset)
Verse.LoadedModManager:ParseAndProcessXML(XmlDocument, Dictionary`2)
Verse.LoadedModManager:LoadAllActiveMods()
Verse.PlayDataLoader:DoPlayLoad()
Verse.PlayDataLoader:LoadAllPlayData(Boolean)
Verse.Root:<Start>m__1()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.LongEventHandler:<UpdateCurrentAsynchronousEvent>m__1()


I tried uninstalling and reinstalling the game through Steam and it didn't fix it, so now I have to wonder if there's a way for me to fix it manually. If anyone has an idea for what I can do to fix it, or if you need more information, let me know.
I have quite a few mods but turning them all off didn't do anything to fix it, so maybe I have a corrupted file hidden somewhere?

Thanks in advance.

Canute

Hi,
could you please read the sticky "How to report a bug"
https://ludeon.com/forums/index.php?topic=513.0

I am 100% sure this is a mod issue.
So reinstalling Rimworld won't help much.

Be sure all your mod's are for B19, be careful with 1.0 mod's and don't use B18 ones.

Try to use the Dev tools, spawn a raid, it that won't work and you are geting the error msg. Say hurray !! :-)
Now try it again with a new colony, if you got Hugslib installed you got the Quickstart option to create a standard map pretty easy and fast.
Try to spawn a raid at these new test colony, if the raid don't spawn, say again hurray ! :-)
Now you just need to disable some mod and repeat the procedure, until you can identify the mod who cause trouble.
Then report the issue to that mod topic.

If you know how to search your files for a string (on windows explorer just enter the string at the search field) then search for these XML error "<pointsFactor>0.9</pointsFactor>" to check in in what mod it appear.
Maybe this speed up to find the bad mod.

Tynan

Not necessarily a mod issue. Looks like old data files being used in the new version which indicates Steam is mixing version files.

You'll want to manually delete the RimWorld folder from Steam, as well as all the RimWorld config data.

RimWorld config data: Open options menu -> Open save data folder -> Close game -> Delete all config files

RimWorld folder: Steam/steamapps/common/RimWorld

Then re-download.

Not a bug so I'll move to support.

Tynan Sylvester - @TynanSylvester - Tynan's Blog

darktoes

Like I said, I tried using dev mode to spawn a raid and it threw the first error.

I'll try deleting those files and see if I can sort it out when I have some free time, I'll post here when I know whether it helped. Seems like a pretty nasty oops on Steam's end if it's getting files mixed up.

Thanks for your help.

P.S Sorry if that was the wrong section, I was sent to the bugs forum by a Reddit bot and didn't put much thought into it.

darktoes

I deleted everything but my saves and scenarios then reinstalled. Worked perfectly, no more (serious, non-mod related) errors.

I'll mark this as solved.