RimWorld

RimWorld

270 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.
106 Comments
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.
Baccalon Aug 15 @ 5:18am 
Just what I was looking for, I had to reassign beds like 10 times just today :warmth_ats: You're a lifesaver
1trickPwnyta  [author] Aug 11 @ 3:18pm 
@Vinni Pukh Actually I have a theory as to what happened with the throne. It may have gotten out of sync with the pawn's ownership data due to it having been erased when the mod was broken. Seems like you fixed it, but if anyone else has this issue, a quick fix would be to use God mode to destroy the throne and recreate it. It shouldn't happen again since it's just an issue with the update from the old version to the current one.
JohnnyOffice Aug 11 @ 2:30pm 
You are a Prince among modders! Excellent bug fix turnaround :steamhappy:
Vinni Pukh Aug 11 @ 1:51pm 
The issue was the (vampire) pawn was assigned to the throne, the 'unassign' button did nothing, and he could not be removed from the throne either. Yet it said that he had no throneroom, he was not meditating on the throne, and the game was basically just not respecting that it was his throne at all lol. But I wasn't getting any errors popping up in the log like I was when pawns were trying to use their beds and failing.

Shuffling the load order around with some aggressive saving and reloading I *think* everything is working as it should now though. I built him a new throne and he's successfully claimed it , at least. I'm enjoying this colony a lot so I'm very grateful for all the help preserving it, thank you very much!
1trickPwnyta  [author] Aug 11 @ 10:30am 
@Vinni Pukh Thrones are definitely involved with this mod. What is the bug you're getting with the throne?
Vinni Pukh Aug 11 @ 8:47am 
The fixes have definitely improved things, my pawns can sleep in their beds again! No one has gotten ejected from a death casket yet! All is well!

However I'm still having issues with my throne, and I would normally think that there's nothing involved with this mod but... the unassign all gizmo that shows up on the beds also shows up on my bugged throne? And I'm wondering if that's somehow related? Is it possible that throne assignment somehow got wrapped up in all the caching stuff too?
Hotshot53 Aug 11 @ 7:06am 
Has anyone tried to use this mod in conjunction with Bunk Beds (https://steamcommunity.com/sharedfiles/filedetails/?id=2961752749) and with the One Bed to Sleep With All mods? (https://steamcommunity.com/sharedfiles/filedetails/?id=3244294636) I'm worried it would introduce conflicts but I'd love to have them all running if anyone's ever tried it.
JustofArc Aug 11 @ 6:24am 
Can confirm, 1.2.4 has resolved the issue. Thanks a bunch!
1trickPwnyta  [author] Aug 11 @ 5:16am 
Okay, I think I found the root problem, and I believe the previous update should have fixed it, or at least prevented it from occurring in the future anyway. However, it did not address the broken save file issue.

I've just released a new version (1.2.4 - please verify this is the version you have now) that should fix any broken save files and add extra protection against it happening again. Thanks for your help and patience with this, everyone!

Technical explanation: The new bed caching mechanic added to increase performance had an issue where the cache wasn't cleared upon loading a new save file under certain conditions. This would cause an exception to occur while loading the data for a pawn's ownership node, specifically when deathrest caskets were involved, which would cause the pawn to have a null Pawn_Ownership tracker. This would cause a lot of NREs, producing many, if not all, of the recently reported issues.