voult2 / betterpawncontrol Goto Github PK
View Code? Open in Web Editor NEWA RimWorld mod that allows bulk assignment of animals to zones and colonists to outfits (or drugs) in one single action
License: MIT License
A RimWorld mod that allows bulk assignment of animals to zones and colonists to outfits (or drugs) in one single action
License: MIT License
I'm getting an exception here... which is quite annoying because I can't close the Assign window, which means I can't save or anything to get of the situation by restarting.
Root level exception in OnGUI(): System.NullReferenceException: Object reference not set to an instance of an object
[Ref 598B62A9]
at BetterPawnControl.AssignManager.SaveCurrentState (System.Collections.Generic.List`1[T] pawns) [0x00198] in <d63137978eb745fc9419e58a486554c6>:0
at BetterPawnControl.Patches.Window_PreClose.Postfix (Verse.Window __instance) [0x00038] in <d63137978eb745fc9419e58a486554c6>:0
at Verse.Window.PreClose () [0x00000] in <3d931901449c4087b86953a6d5c84d50>:0
- POSTFIX VouLT.BetterPawnControl: Void BetterPawnControl.Patches.Window_PreClose:Postfix(Window __instance)
at Verse.WindowStack.TryRemove (Verse.Window window, System.Boolean doCloseSound) [0x00051] in <3d931901449c4087b86953a6d5c84d50>:0
at RimWorld.MainTabsRoot.ToggleTab (RimWorld.MainButtonDef newTab, System.Boolean playSound) [0x00056] in <3d931901449c4087b86953a6d5c84d50>:0
at RimWorld.MainTabsRoot.SetCurrentTab (RimWorld.MainButtonDef tab, System.Boolean playSound) [0x0000a] in <3d931901449c4087b86953a6d5c84d50>:0
at RimWorld.MainTabsRoot.EscapeCurrentTab (System.Boolean playSound) [0x00000] in <3d931901449c4087b86953a6d5c84d50>:0
at RimWorld.MainButtonWorker_ToggleWorld.Activate () [0x00054] in <3d931901449c4087b86953a6d5c84d50>:0
at RimWorld.MainButtonWorker.InterfaceTryActivate () [0x0008d] in <3d931901449c4087b86953a6d5c84d50>:0
at RimWorld.MainButtonWorker.DoButton (UnityEngine.Rect rect) [0x000ee] in <3d931901449c4087b86953a6d5c84d50>:0
at RimWorld.MainButtonsRoot.DoButtons () [0x00119] in <3d931901449c4087b86953a6d5c84d50>:0
at RimWorld.MainButtonsRoot.MainButtonsOnGUI () [0x0000e] in <3d931901449c4087b86953a6d5c84d50>:0
at RimWorld.UIRoot_Play.UIRootOnGUI () [0x00037] in <3d931901449c4087b86953a6d5c84d50>:0
at Verse.Root.OnGUI () [0x00046] in <3d931901449c4087b86953a6d5c84d50>:0
- POSTFIX UnlimitedHugs.HugsLib: Void HugsLib.Patches.Root_OnGUI_Patch:OnGUIHookUnfiltered()
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 39)
Exception filling window for RimWorld.MainTabWindow_Assign: System.ArgumentNullException: Value cannot be null.
Parameter name: key
at System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) [0x00008] in <eae584ce26bc40229c1b1aa476bfa589>:0
at System.Collections.Generic.Dictionary`2[TKey,TValue].ContainsKey (TKey key) [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0
at PawnRules.Data.Registry.GetPresets[T] (PawnRules.Data.IPresetableType type) [0x00034] in <540b0d568e2a430aa643fc806cb0b4ff>:0
at PawnRules.Patch.RimWorld_PawnColumnWorker_FoodRestriction_DoAssignFoodRestrictionButtons.GenerateMenu (Verse.Pawn pawn) [0x00065] in <540b0d568e2a430aa643fc806cb0b4ff>:0
at Verse.Widgets.Dropdown[Target,Payload] (UnityEngine.Rect rect, Target target, UnityEngine.Color iconColor, System.Func`2[T,TResult] getPayload, System.Func`2[T,TResult] menuGenerator, System.String buttonLabel, UnityEngine.Texture2D buttonIcon, System.String dragLabel, UnityEngine.Texture2D dragIcon, System.Action dropdownOpened, System.Boolean paintable) [0x00126] in <83587a48aa8e49a28a1bdcd03d79e528>:0
at Verse.Widgets.Dropdown[Target,Payload] (UnityEngine.Rect rect, Target target, System.Func`2[T,TResult] getPayload, System.Func`2[T,TResult] menuGenerator, System.String buttonLabel, UnityEngine.Texture2D buttonIcon, System.String dragLabel, UnityEngine.Texture2D dragIcon, System.Action dropdownOpened, System.Boolean paintable) [0x00007] in <83587a48aa8e49a28a1bdcd03d79e528>:0
at PawnRules.Patch.RimWorld_PawnColumnWorker_FoodRestriction_DoAssignFoodRestrictionButtons.Prefix (UnityEngine.Rect rect, Verse.Pawn pawn) [0x0008e] in <540b0d568e2a430aa643fc806cb0b4ff>:0
at (wrapper dynamic-method) RimWorld.PawnColumnWorker_FoodRestriction.RimWorld.PawnColumnWorker_FoodRestriction.DoAssignFoodRestrictionButtons_Patch1(RimWorld.PawnColumnWorker_FoodRestriction,UnityEngine.Rect,Verse.Pawn)
at RimWorld.PawnColumnWorker_FoodRestriction.DoCell (UnityEngine.Rect rect, Verse.Pawn pawn, RimWorld.PawnTable table) [0x00009] in <83587a48aa8e49a28a1bdcd03d79e528>:0
at (wrapper dynamic-method) RimWorld.PawnTable.RimWorld.PawnTable.PawnTableOnGUI_Patch3(RimWorld.PawnTable,UnityEngine.Vector2)
at RimWorld.MainTabWindow_PawnTable.DoWindowContents (UnityEngine.Rect rect) [0x00020] in <83587a48aa8e49a28a1bdcd03d79e528>:0
at (wrapper dynamic-method) Verse.Window.Verse.Window.InnerWindowOnGUI_Patch0(Verse.Window,int)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch0 (string)
(wrapper dynamic-method) Verse.Window:Verse.Window.InnerWindowOnGUI_Patch0 (Verse.Window,int)
UnityEngine.GUI:CallWindowDelegate (UnityEngine.GUI/WindowFunction,int,int,UnityEngine.GUISkin,int,single,single,UnityEngine.GUIStyle)
RimWorld 1.3.3080
Harmony Lib v2.1.1.0
Subscribed to BPC via Steam
HugsLib full log: https://gist.github.com/2ea14f7f19b6e7917ceff6fc4b1752fb
Reddit thread by a fellow player: https://www.reddit.com/r/RimWorld/comments/p0xh38/slave_outfits_keep_resetting/
PS: I vastly appreciate both the mod's features and the clarity, eg. of its description.
The littluna race mod where the pawns can summon a creature appears to be completely broken when using BPC, when I turned only BPC on and Littluna it will give an exception error and the pawn will continue to wander around. Without BPC it works fine. Tested with my main modlist bar BPC and summoning works
Error while generating pawn. Rethrowing. Exception: System.DivideByZeroException: Attempted to divide by zero.
at HAR_LL_M_CompAAA.CompTick () [0x00010] in <9326fc1e329445b28e73f0e380174f92>:0
at Verse.ThingWithComps.Tick () [0x00024] in <67a96f30fb0c46d8add7af7c8e89dc45>:0
at Verse.Pawn.Tick () [0x00024] in <67a96f30fb0c46d8add7af7c8e89dc45>:0
at BetterPawnControl.Faction_Notify_PawnJoined.Postfix (Verse.Pawn p) [0x00003] in <8127354e70fa4ce59dda8b4cd6dd3890>:0
at (wrapper dynamic-method) RimWorld.Faction.RimWorld.Faction.Notify_PawnJoined_Patch1(RimWorld.Faction,Verse.Pawn)
at (wrapper dynamic-method) Verse.PawnGenerator.Verse.PawnGenerator.TryGenerateNewPawnInternal_Patch0(Verse.PawnGenerationRequest&,string&,bool,bool)
at Verse.PawnGenerator.GenerateNewPawnInternal (Verse.PawnGenerationRequest& request) [0x00094] in <67a96f30fb0c46d8add7af7c8e89dc45>:0
at Verse.PawnGenerator.GenerateOrRedressPawnInternal (Verse.PawnGenerationRequest request) [0x00183] in <67a96f30fb0c46d8add7af7c8e89dc45>:0
at (wrapper dynamic-method) Verse.PawnGenerator.Verse.PawnGenerator.GeneratePawn_Patch1(Verse.PawnGenerationRequest)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
(wrapper dynamic-method) Verse.PawnGenerator:Verse.PawnGenerator.GeneratePawn_Patch1 (Verse.PawnGenerationRequest)
Verse.PawnGenerator:GeneratePawn (Verse.PawnKindDef,RimWorld.Faction)
CompSummonSlave.CSS_CompSummonSLave:PreSummonSlaves (System.Collections.Generic.List1<CompSummonSlave.SummonData>&,int,System.Collections.Generic.List
1<Verse.PawnKindDef>,Verse.ThingDef)
CompSummonSlave.CSS_CompSummonSLave:b__13_1 ()
Verse.Command_Action:ProcessInput (UnityEngine.Event)
Verse.GizmoGridDrawer:DrawGizmoGrid (System.Collections.Generic.IEnumerable1<Verse.Gizmo>,single,Verse.Gizmo&,System.Func
2<Verse.Gizmo, bool>,System.Func2<Verse.Gizmo, bool>,System.Func
2<Verse.Gizmo, bool>)
RimWorld.InspectGizmoGrid:DrawInspectGizmoGridFor (System.Collections.Generic.IEnumerable`1,Verse.Gizmo&)
RimWorld.MainTabWindow_Inspect:DrawInspectGizmos ()
RimWorld.InspectPaneUtility:ExtraOnGUI (RimWorld.IInspectPane)
RimWorld.MainTabWindow_Inspect:ExtraOnGUI ()
Verse.WindowStack:WindowStackOnGUI ()
RimWorld.UIRoot_Play:UIRootOnGUI ()
(wrapper dynamic-method) Verse.Root:Verse.Root.OnGUI_Patch1 (Verse.Root)
I'm not sure what happened, but my animal tab no longer displays (even though it used to work), and I get this error in my log:
Root level exception in OnGUI(): System.NullReferenceException: Object reference not set to an instance of an object
at BetterPawnControl.AnimalManager+<>c__DisplayClass6_0.<UpdateState>b__0 (BetterPawnControl.AnimalLink x) [0x00000] in <7db7a9c0c7c842c8bbd28e7598605eba>:0
at System.Collections.Generic.List`1[T].FindAll (System.Predicate`1[T] match) [0x00013] in <567df3e0919241ba98db88bec4c6696f>:0
at BetterPawnControl.AnimalManager.UpdateState (System.Collections.Generic.List`1[T] links, System.Collections.Generic.List`1[T] pawns, BetterPawnControl.Policy policy) [0x0001f] in <7db7a9c0c7c842c8bbd28e7598605eba>:0
at BetterPawnControl.MainTabWindow_Animals_Policies.PreOpen () [0x00020] in <7db7a9c0c7c842c8bbd28e7598605eba>:0
at Verse.WindowStack.Add (Verse.Window window) [0x0001f] in <b9022531d79047b2b6baad3f7d519f01>:0
at (wrapper dynamic-method) RimWorld.MainTabsRoot.DMD<DMD<ToggleTab_Patch1>?66738048::ToggleTab_Patch1>(RimWorld.MainTabsRoot,RimWorld.MainButtonDef,bool)
at RimWorld.MainButtonWorker_ToggleTab.Activate () [0x00005] in <b9022531d79047b2b6baad3f7d519f01>:0
at RimWorld.MainButtonWorker.InterfaceTryActivate () [0x0004d] in <b9022531d79047b2b6baad3f7d519f01>:0
at (wrapper dynamic-method) RimWorld.MainButtonWorker.DMD<DMD<DoButton_Patch0>?-1308741760::DoButton_Patch0>(RimWorld.MainButtonWorker,UnityEngine.Rect)
at RimWorld.MainButtonsRoot.DoButtons () [0x0010c] in <b9022531d79047b2b6baad3f7d519f01>:0
at (wrapper dynamic-method) RimWorld.MainButtonsRoot.DMD<DMD<MainButtonsOnGUI_Patch1>?98404992::MainButtonsOnGUI_Patch1>(RimWorld.MainButtonsRoot)
at RimWorld.UIRoot_Play.UIRootOnGUI () [0x00037] in <b9022531d79047b2b6baad3f7d519f01>:0
at (wrapper dynamic-method) Verse.Root.DMD<DMD<OnGUI_Patch1>?-1867099264::OnGUI_Patch1>(Verse.Root)
Verse.Log:Error(String, Boolean)
Verse.Root:DMD<DMD<OnGUI_Patch1>?-1867099264::OnGUI_Patch1>(Root)
I love this mod but it seems to appear that this mod's Animals tab for the active restrict policy doesn't appear when the mod Numbers is on and not even when Number's Animals tab is being used. I also opened an issue in Tallidown's Numbers mod since Mehni doesn't seem to be updating this mod for the moment.
BetterPawnControl/Source/Managers/AssignManager.cs
Lines 483 to 496 in 71aad7a
L488 should AssignManager.links.RemoveAll(x => x.zone == policy.id);
?
Some other mods have "Work Tab" in their name. This leads to an error message on startup. Instead of using Contains(), a better check would be appreciated to make sure that the real Work Tab mod is installed.
TL;DR you don't need to update AssemblyVersion in AssemblyInfo.cs, only AssemblyFileVersion
Since my mod Gear Up And Go references the BetterPawnControl dll, it's bound to the AssemblyVersion, so every update of AssemblyVersion means compatibility is broken.
This took a while to figure out why but I'm just listing what I found now:
"Two assemblies that differ by version number are considered by the runtime to be completely different assemblies" - https://docs.microsoft.com/en-us/dotnet/framework/app-domains/assembly-versioning
"If this number changes, other assemblies have to update their references to your assembly" "AssemblyFileVersion: Used for deployment. You can increase this number for every deployment" https://stackoverflow.com/questions/64602/what-are-differences-between-assemblyversion-assemblyfileversion-and-assemblyin
After instal the 1.9.5v the work tab dont open.
The copy of BPC 2.1.2 on Github Releases (https://github.com/voult2/BetterPawnControl/releases) has missing files Textures/UI/Buttons/EmergencyOn.png and Textures/UI/Buttons/EmergencyOff.png, resulting in the following errors as shown in DevMode:
This causes the Emergency mode in the mod to not work properly.
Strangely, the Github release contains a file Emergency.png, which was likely what the EmergencyOn and EmergencyOff buttons were derived from. A quick diff between the latest 2.1.2 Github release and the latest Steam release downloaded today shows that there are differences in the "Languages/ChineseSimplified/Keyed/BetterPawnControl.xml" file, along with the Emergency textures mentioned earlier. There are no errors in the Steam version since the Emergency textures exist.
Could you take a look? I understand that Github releases are a low priority compared to Steam ones, but there are GOG/Ludeon users like me who prefer to not use a Steam downloader service and like I get the mods straight from the source. Thanks!
Is it possible to get an alpha15 version?
can this abnormal display issue be fixed no errors in logs just display does not fit properly
logs if helps
https://gist.github.com/HugsLibRecordKeeper/591afe4a67a164d68997d722703b2d14
mainly outfits are affected, since schedule page removes those pawns entirely, while they're gone.
fluffy-mods/WorkTab have issue with detailed settings on WorkTab (it just erases. only basic settings are saved, not detailed)
was trying to change settings in BetterPawnControl-master\Source\Core
public bool disableBPCOnWorkTab = true;
public bool disableBPCWorkTabInnerPriorities = true;
but it didn help
dont know how to disable BPC just for WorkTab
EDIT issue was with unoficial worktab 1.5 update another unoficial version works fine
1.1.2647 has added and changed features relating to royalty and psycasting. Please add support for meditation to BPC.
I have a pawn that due to his role is disabled from hunting, every time I open any of the tabs either animal or the work tab I get this error. Seems that BPC does not work well with work types that are disabled for any reason?
Tried to change priority on disabled worktype Hunting for pawn O'Donnell
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch2 (string)
RimWorld.Pawn_WorkSettings:SetPriority (Verse.WorkTypeDef,int)
BetterPawnControl.WorkManager:LoadPawnPriorities (Verse.Pawn,BetterPawnControl.WorkLink)
BetterPawnControl.WorkManager:LoadState (System.Collections.Generic.List1<BetterPawnControl.WorkLink>,System.Collections.Generic.List
1<Verse.Pawn>,BetterPawnControl.Policy)
BetterPawnControl.MainTabWindow_PawnTable_OnPostOpen:Postfix ()
(wrapper dynamic-method) RimWorld.MainTabWindow_PawnTable:RimWorld.MainTabWindow_PawnTable.PostOpen_Patch1 (RimWorld.MainTabWindow_PawnTable)
(wrapper dynamic-method) Verse.WindowStack:Verse.WindowStack.Add_Patch1 (Verse.WindowStack,Verse.Window)
(wrapper dynamic-method) RimWorld.MainTabsRoot:RimWorld.MainTabsRoot.ToggleTab_Patch2 (RimWorld.MainTabsRoot,RimWorld.MainButtonDef,bool)
RimWorld.MainButtonWorker_ToggleTab:Activate ()
RimWorld.MainButtonWorker:InterfaceTryActivate ()
(wrapper dynamic-method) RimWorld.MainButtonWorker:RimWorld.MainButtonWorker.DoButton_Patch0 (RimWorld.MainButtonWorker,UnityEngine.Rect)
RimWorld.MainButtonsRoot:DoButtons ()
(wrapper dynamic-method) RimWorld.MainButtonsRoot:RimWorld.MainButtonsRoot.MainButtonsOnGUI_Patch1 (RimWorld.MainButtonsRoot)
(wrapper dynamic-method) RimWorld.UIRoot_Play:RimWorld.UIRoot_Play.UIRootOnGUI_Patch2 (RimWorld.UIRoot_Play)
(wrapper dynamic-method) Verse.Root:Verse.Root.OnGUI_Patch1 (Verse.Root)
I have an issue with my job priorities changing automatically, and its not generating any errors of any kind, after removing different mods that could be the culprit I have discovered it is BPC. The example is my grow job would completely be turned off a few minutes or so after I turn it on, and the cycle would repeat multiple times. I am not using Fluffys Worktab mod if that makes a different. After removing BPC and letting the game run with the grow job turned on, it never turned back off. Even though I do not use that worktab mod, I turned on the mod option for BPC not to interact with it, but it did not make a difference either.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.