RimWorld

RimWorld

Misc. Robots
leion247 21 Oct, 2022 @ 10:36am
Worktype error being thrown
Error: Tried to change priority on disabled worktype Cleaning for pawn CleaningBot 1
Press the info button for the bots in question and shows they have no work types. Something appears to not being working concerning <robotWorkTypes>, but I don't know for certain.

Full error:
Tried to change priority on disabled worktype Cleaning for pawn CleaningBot 1 UnityEngine.StackTraceUtility:ExtractStackTrace () Verse.Log:Error (string) RimWorld.Pawn_WorkSettings:SetPriority (Verse.WorkTypeDef,int) AIRobot.X2_AIRobot_Pawn_WorkSettings:SetPriority (Verse.WorkTypeDef,int) AIRobot.X2_AIRobot_Pawn_WorkSettings:EnableAndInitialize () AIRobot.X2_AIRobot_Pawn_WorkSettings:.ctor (Verse.Pawn) System.Reflection.MonoCMethod:InternalInvoke (object,object[]) System.Reflection.MonoCMethod:DoInvoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) System.Reflection.MonoCMethod:Invoke (System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) System.RuntimeType:CreateInstanceImpl (System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[],System.Threading.StackCrawlMark&) System.Activator:CreateInstance (System.Type,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[]) System.Activator:CreateInstance (System.Type,object[]) Verse.ScribeExtractor:SaveableFromNode<RimWorld.Pawn_WorkSettings> (System.Xml.XmlNode,object[]) Verse.Scribe_Deep:Look<RimWorld.Pawn_WorkSettings> (RimWorld.Pawn_WorkSettings&,bool,string,object[]) Verse.Scribe_Deep:Look<RimWorld.Pawn_WorkSettings> (RimWorld.Pawn_WorkSettings&,string,object[]) Verse.Pawn:ExposeData () AIRobot.X2_AIRobot:ExposeData () Verse.ScribeExtractor:SaveableFromNode<Verse.Thing> (System.Xml.XmlNode,object[]) Verse.Scribe_Collections:Look<Verse.Thing> (System.Collections.Generic.List`1<Verse.Thing>&,bool,string,Verse.LookMode,object[]) Verse.Scribe_Collections:Look<Verse.Thing> (System.Collections.Generic.List`1<Verse.Thing>&,string,Verse.LookMode,object[]) Verse.Map:ExposeData () Verse.ScribeExtractor:SaveableFromNode<Verse.Map> (System.Xml.XmlNode,object[]) Verse.Scribe_Collections:Look<Verse.Map> (System.Collections.Generic.List`1<Verse.Map>&,bool,string,Verse.LookMode,object[]) Verse.Scribe_Collections:Look<Verse.Map> (System.Collections.Generic.List`1<Verse.Map>&,string,Verse.LookMode,object[]) Verse.Game:LoadGame () Verse.SavedGameLoaderNow:LoadGameFromSaveFileNow (string) Verse.Root_Play/<>c:<Start>b__1_1 () Verse.LongEventHandler:RunEventFromAnotherThread (System.Action) Verse.LongEventHandler/<>c:<UpdateCurrentAsynchronousEvent>b__27_0 () System.Threading.ThreadHelper:ThreadStart_Context (object) System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object) System.Threading.ThreadHelper:ThreadStart ()
< >
Showing 1-7 of 7 comments
leion247 21 Oct, 2022 @ 1:27pm 
Also facing other errors appearing related to my own mod for stats like Mining speed, yield, construction speed and success chance saying they are disabled.

Besides that too, there is also one were my construction bots refuse to construct anything requiring a minimum skill to do so despite having level 20 skill. Weirdly crafting bots are able to craft things with minimum skill requirements while other bots can't do their jobs that do. Since this only appears in 1.4 and their ai is handled by this mod, I assume something needs to be looked at on this end.

Example:
Attempted to calculate value for disabled stat MiningSpeed; this is meant as a consistency check, either set the stat to neverDisabled or ensure this pawn cannot accidentally use this stat (thing=Mining Bot 1) UnityEngine.StackTraceUtility:ExtractStackTrace () Verse.Log:Error (string) Verse.Log:ErrorOnce (string,int) RimWorld.StatWorker:GetValueUnfinalized (RimWorld.StatRequest,bool) (wrapper dynamic-method) RimWorld.StatWorker:RimWorld.StatWorker.GetValue_Patch0 (RimWorld.StatWorker,RimWorld.StatRequest,bool) RimWorld.StatWorker:GetValue (Verse.Thing,bool,int) RimWorld.StatExtension:GetStatValue (Verse.Thing,RimWorld.StatDef,bool,int) RimWorld.JobDriver_Mine:ResetTicksToPickHit () RimWorld.JobDriver_Mine/<>c__DisplayClass9_0:<MakeNewToils>b__0 () (wrapper dynamic-method) Verse.AI.JobDriver:Verse.AI.JobDriver.DriverTick_Patch0 (Verse.AI.JobDriver) (wrapper dynamic-method) Verse.AI.Pawn_JobTracker:Verse.AI.Pawn_JobTracker.JobTrackerTick_Patch0 (Verse.AI.Pawn_JobTracker) (wrapper dynamic-method) Verse.Pawn:Verse.Pawn.Tick_Patch1 (Verse.Pawn) AIRobot.X2_AIRobot:Tick () Verse.TickList:Tick () (wrapper dynamic-method) Verse.TickManager:Verse.TickManager.DoSingleTick_Patch1 (Verse.TickManager) Verse.TickManager:TickManagerUpdate () (wrapper dynamic-method) Verse.Game:Verse.Game.UpdatePlay_Patch1 (Verse.Game) Verse.Root_Play:Update ()
Last edited by leion247; 21 Oct, 2022 @ 1:31pm
Haplo_X1  [developer] 21 Oct, 2022 @ 2:41pm 
I've found the issue:
Under <race> you need to enter the worktypes a second time:
<mechEnabledWorkTypes>
<li>Hauling</li>
</mechEnabledWorkTypes>
leion247 21 Oct, 2022 @ 3:10pm 
Doesn't quite work out it seems. Just got a new error after attempting that, and the issue still persists.

Removed Error
Last edited by leion247; 21 Oct, 2022 @ 3:15pm
leion247 21 Oct, 2022 @ 3:16pm 
No wait, forgot to put the race part like you mentioned. Testing now.

Update: That works. Fixed the problem with the original error and the minimum skill problem. Thanks for the help.
Last edited by leion247; 21 Oct, 2022 @ 3:22pm
XpanderTN 25 Oct, 2022 @ 12:23pm 
Where in the mod files can this be added?
Haplo_X1  [developer] 26 Oct, 2022 @ 12:17pm 
.\724602224\1.4\Defs\ThingDefs\AIRobot_Races.xml
Vorpal Fluuf 3 Jan, 2023 @ 1:07pm 
I did this and it didn't seem to help any. I dunno if I did it right. D:
< >
Showing 1-7 of 7 comments
Per page: 1530 50