RimWorld

RimWorld

272 ratings
Sensible Bed Ownership
3
2
2
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.5, 1.6
File Size
Posted
Updated
483.411 KB
Sep 10, 2024 @ 10:00am
Aug 11 @ 4:54am
9 Change Notes ( view )

Subscribe to download
Sensible Bed Ownership

Description
Support for version 1.6 is confirmed, but more testing is needed. Please report any bugs in the comments. Thank you!

Makes the bed ownership/assignment mechanic sensible. Specifically:
  • Everyone can have a bed assigned per map, so beds don't get unassigned while caravaning.
  • Adds the ability to select a colonist or animal and right-click on a bed to assign. Multiple selected pawns can be assigned to a double bed at once.
  • Adds a search bar to the bed assignment dialog.
  • When assigning a second member to a double bed, brings the first member's love partners to the top of the list.
  • Adds an unassignment gizmo when you click on a bed.
  • Also applies these features to other colonist-assigned buildings, such as thrones and deathrest caskets.
  • Allows pawns to find a chair to sleep in instead of resorting to the ground when no bed is available because chairs still provide comfort when sleeping (can be turned off in settings).



Updates
08/11/2025: Fix broken save files from previous bug, add additional safeguard to prevent broken saves
08/10/2025: Fix potential bug that causes errors when bed cache isn't properly cleared between loading saved games
08/08/2025: Improve performance and fix some minor UI bugs
06/12/2025: Fix error when right-clicking out of bounds with a pawn selected in certain situations
06/11/2025: Updated to 1.6, allow multiple selected pawns to be right-click assigned at once
04/18/2025: Fix bed assignment dialog incompatibility with Steam Deck
04/09/2025: Add chair-sleeping feature, prevent double bed reservations by the same pawn, use "main bed" for bed calculations instead of just whatever bed is on the current map (for lovers sharing beds or royalty bedroom requirements)
10/02/2024: Immediately unassign babies from cribs when they become children

Credits

Additionally, this mod was inspired by and includes many of the same features of the following mods:
If any of the above creators prefer I remove this mod for any reason, please feel free to contact me and I will promptly remove it.
115 Comments
IX 20 hours ago 
Hi, I uploaded the log file earlier, but after repeating my tests several times, I wasn’t able to reproduce the bug again.
It seems that some specific conditions might be required for the error to occur.
https://gist.github.com/HugsLibRecordKeeper/fe7084ef2ad5df16d4dfe91b57eca1c9
1trickPwnyta  [author] Aug 20 @ 1:27pm 
I fixed the gravship issues with beds in a new update that is NOT published yet. I'll need a bit more time to make sure there aren't any new issues. You can try out the new update here: https://github.com/1trickPwnyta/SensibleBedOwnership/releases/tag/v1.2.5
1trickPwnyta  [author] Aug 20 @ 1:22pm 
@IX I'm not getting the same error in my game. Are you able to provide the full log file?
1trickPwnyta  [author] Aug 20 @ 6:39am 
@IX Thanks for reporting! I'll look into that.
IX Aug 20 @ 3:38am 
Exception while recalculating SharedBed thought state for pawn 斯泰尔: System.NullReferenceException: Object reference not set to an instance of an object
[Ref 569775F5] Duplicate stacktrace, see ref for original
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch1 (string)
RimWorld.SituationalThoughtHandler:TryCreateThought (RimWorld.ThoughtDef)
RimWorld.SituationalThoughtHandler:UpdateAllMoodThoughts ()
RimWorld.SituationalThoughtHandler:SituationalThoughtInterval ()
RimWorld.ThoughtHandler:ThoughtInterval ()
RimWorld.Need_Mood:NeedInterval ()
RimWorld.Pawn_NeedsTracker:NeedsTrackerTickInterval (int)
Verse.Pawn:TickInterval (int)
Verse.Thing:DoTick ()
Verse.TickList:Tick ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.TickManager.DoSingleTick_Patch1 (Verse.TickManager)
Verse.TickManager:TickManagerUpdate ()
Verse.Game:UpdatePlay ()
Verse.Root_Play:Update ()
IX Aug 20 @ 3:36am 
Hi, I think I found a bug with the mod.

When pawns are out on temporary map without any bed, the game throws a related to the "SharedBed" thought calculation. It seems the mod is still trying to check bed ownership even though no bed exists on that map.NullReferenceException

Interestingly, this does not happen in the home base — if there are no beds there, pawns just sleep on the ground and no error appears. The issue seems specific to pawns on temporary maps without beds.

As a workaround, I assigned a sleeping spot to the pawn on the temporary map, and the error disappeared.

Thanks a lot for your work on this mod!
girlkisser Aug 18 @ 5:15pm 
Glad to hear it! Best of luck!
1trickPwnyta  [author] Aug 18 @ 5:07pm 
@girlkisser I'm planning a fix for this issue but it's taking a while for me to get to it, sadly. Hopefully soon!
girlkisser Aug 18 @ 4:51pm 
Hello, this mod seems to have odd behavior with gravships. When I send out some colonists in a gravship, they correctly have a bed both on the gravship and at the colony, and once the gravship is back home two beds are assigned to each colonist. Which is odd, but selecting the gravship beds and clicking "unassign all" is significantly easier than manually reassigning each bed, so I let it go.

Problem is, one of my colonists decided to randomly reclaim ownership of one of the gravship beds and go to sleep in it? They already had a colony bed prior. And when this happened, their colony bed was unassigned...

Would it be possible to have ownership on beds on gravship structure be wiped when the gravship lands on a tile that already has a bed assigned to the colonist? That's how I expected it to work, but instead it's... this?
SourceShard Aug 16 @ 2:33am 
@Hotshot53
I am going to risk the bisket and toss this in with One Be to test it out. However I cannot test Bunk Beds as I use Prison Commons.