RimWorld

RimWorld

One bed to sleep with all - Polycule Edition
301 Comments
Maeyanie  [author] 28 Sep @ 5:38am 
@Geojak: Steam can be bad about doing updates sometimes, it may have just not correctly updated you. If you do run into it again in the future, please let me know.
Geojak 28 Sep @ 5:21am 
error didnt occur anymore on the same safe point it spammed before. weird
Maeyanie  [author] 26 Sep @ 10:35pm 
@Geojak: Hm, that should work fine...

I posted a new version which should help isolate where the problem is happening without spamming everyone's logs and slowing things down.
Now, if an exception happens, it'll give red text with a step 1, 2, 3, or 4 depending where the problem happened. That should at least tell me where to look.
Geojak 26 Sep @ 1:28pm 
maybe relevant to this, in this colony almosst every male is marreid to amlost every female and vice versa. i have 4 double beds set to polyamory, where my 4 male colonsist sleep as masters. then for my 5 female conolist they each have a hopsital bed assgined as their regular bed (not set to medical) when they dont get a spot in the double bed. you changed somerhing about medical beds or hosptial beds?
Geojak 26 Sep @ 1:24pm 
got this error spawm today, seems to be intopruced by your recent change
Geojak 26 Sep @ 1:23pm 
Exception in Verse.AI.ThinkNode_PrioritySorter TryIssueJobPackage:
at OneBedToSleepWithAll.Patch.RestUtility__FindBedFor.Postfix
at RimWorld.RestUtility.FindBedFor
- POSTFIX densevoid.hui.personalworkcat: Void OneBedToSleepWithAll.Patch.RestUtility__FindBedFor:Postfix(B
at RimWorld.RestUtility.FindBedFor (Verse.Pawn p) [
at RimWorld.JobGiver_GetRest.TryGiveJob (Verse.Pawn pawn)
at Verse.AI.ThinkNode_JobGiver.TryIssueJobPackage (Verse.Pawn pawn, Verse.AI.JobIssueParams jobParams) [0x00000] in <24d25868955f4df08b02c73b55f389fe>:0
at Verse.AI.ThinkNode_PrioritySorter.TryIssueJobPackage (Verse.Pawn pawn, Verse.AI.JobIssueParams jobParams) [0x000f2] in <24d25868955f4df08b02c73b55f389fe>:0
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch2 (string)
Verse.AI.ThinkNode_PrioritySorter:TryIssueJobPackage
Maeyanie  [author] 24 Sep @ 6:40am 
Okay, since people are saying it looks good, I've pushed a non-debug version. There's no other changes besides that, so hopefully nothing will have broken.
冰镇糖桂花 24 Sep @ 5:47am 
same problem:steamsad:the white text keep repeating for hundreds of times which made my game quite laggy:isaac:
Sushido 24 Sep @ 5:37am 
Everything is all good now, except for white text stated from other comments of course, i tried to replicate the error when i rmb a pawn that is downed, but there's no error shown, so yeah everything is good, thank you for patching it.
狼雨歌 24 Sep @ 3:23am 
Thank you for your answer . It would be better if you can reduce the frequency . Or allow me to disable it in the settings .
Maeyanie  [author] 23 Sep @ 10:15pm 
@狼雨歌: So long as there aren't any other problems, the white text spam is fine and expected. If everything seems okay I'll push a new version later which removes it, but for now I just want to make sure nobody's getting NREs or serious TPS drops.
狼雨歌 23 Sep @ 9:50pm 
Now, the white text message keeps refreshing repeatedly , about 6 times per second . The content is :
"CheckIsHavePartnersPolygamyBedOccupied : No occupied partner bed found for [NAME] . "
" Postfix RestUtility .FindBedFor : No available bed found for [NAME] , returning Bed406052 . "
I've noticed that the [NAME] displayed is always a prisoner or a wild animal ; I can provide a log file if needed .
Maeyanie  [author] 23 Sep @ 8:04pm 
This one does have some extra debugging added, so your log may have extra white text related to this mod. I'm hoping that if it does break for other people, that will help me figure out in what way, and can be safely ignored otherwise. It shouldn't be enough to fill hard drives... hopefully.
Maeyanie  [author] 23 Sep @ 8:01pm 
Alright, I did some testing and debugging, and uploaded a new version. For me, it's working, I'm not getting any errors or slowdowns, but I'll keep an eye on this page and revert it again if it's messing up for other people.
Balthazad 23 Sep @ 10:35am 
thank you very much, the dryads are counting sheeple again x)
Maeyanie  [author] 23 Sep @ 10:16am 
If anyone still gets the slowdowns, do an unsubscribe-resubscribe to force an update. Steam should be giving out the Sep 10 version again.
Maeyanie  [author] 23 Sep @ 10:13am 
Ok, I don't have time to do another round of debugging today, so I reverted it to the version before all this started. I'll have to look into it deeper tomorrow and figure out what's going on.
Orvyla⁴² 23 Sep @ 10:06am 
as far as i understand, developer did some updates and now this mod consumes 4ms and 8000 calls every frame for some reason :dealerrizz:
Balthazad 23 Sep @ 10:03am 
goddammn why does this happen when i ONCE play a colony that actually makes use of it and not just has it "for the case of cases"
Balthazad 23 Sep @ 9:54am 
https://gist.github.com/HugsLibRecordKeeper/351e7b051d6aa04c25b1141114a40a2d

https://gist.github.com/HugsLibRecordKeeper/f80be8872f87dd1c521757165ce8182d

oy! this is throwing reds out of a sudden! my savegame seems broken, my armmy of 56 dryads doesn't sleep anymore!

pls reverse whatever you did, tonight i have (had?) plans to play lots of rimworld..................
Nine 23 Sep @ 7:31am 
alright thanks i'll test it later
Maeyanie  [author] 23 Sep @ 7:28am 
@Mesez: Whups, you're right, I did mess that up. New version uploaded to fix it.

Hopefully this will fix the issues for everyone else... if you're having bad TPS, try unsubscribing and resubscribing to force an update, and if that doesn't fix it let me know.
dalao 23 Sep @ 7:23am 
The update ruined my TPS
Mesez 23 Sep @ 7:16am 
The crash happens in RestUtility.FindBedFor → POSTFIX of OneBedToSleepWithAll
OneBedToSleepWithAll.Patch.RestUtility__FindBedFor.Postfix(...) is throwing a NullReferenceException because it assumes __result (the bed) is never null. But FindBedFor can legitimately return null (no valid bed), and your patch chain makes that more likely.
Nine 23 Sep @ 6:10am 
the new update nuked my TPS
Sushido 23 Sep @ 4:52am 
after clicking the debug log on the mod options, this is what i found: Possible conflicts:
Method: virtual System.String RimWorld.Building_Bed::GetInspectString()
Sushido 23 Sep @ 4:33am 
Verse.Pawn:TickInterval (int)
Verse.Thing:DoTick ()
Verse.TickList:Tick ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.TickManager.DoSingleTick_Patch1 (Verse.TickManager)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.TickManager.TickManagerUpdate_Patch1 (Verse.TickManager)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Game.UpdatePlay_Patch1 (Verse.Game)
Verse.Root_Play:Update ()
Sushido 23 Sep @ 4:33am 
Exception in Verse.AI.ThinkNode_PrioritySorter TryIssueJobPackage: System.NullReferenceException: Object reference not set to an instance of an object
[Ref 97863908] Duplicate stacktrace, see ref for original
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.AI.ThinkNode_PrioritySorter:TryIssueJobPackage (Verse.Pawn,Verse.AI.JobIssueParams)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage (Verse.Pawn,Verse.AI.JobIssueParams)
Verse.AI.ThinkNode_Tagger:TryIssueJobPackage (Verse.Pawn,Verse.AI.JobIssueParams)
Verse.AI.ThinkNode_Subtree:TryIssueJobPackage (Verse.Pawn,Verse.AI.JobIssueParams)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage (Verse.Pawn,Verse.AI.JobIssueParams)
Verse.AI.Pawn_JobTracker:DetermineNextJob (Verse.ThinkTreeDef&,bool)
Verse.AI.Pawn_JobTracker:TryFindAndStartJob ()
Verse.AI.Pawn_JobTracker:EndCurrentJob (Verse.AI.JobCondition,bool,bool)
Verse.AI.Pawn_JobTracker:JobTrackerTickInterval (int)
Sushido 23 Sep @ 4:33am 
Hello author, so i have a error popping up on hugslib that might related to this mod, im not sure how i can share the whole logs error for you to review, but il post short error logs of it.
Maeyanie  [author] 22 Sep @ 9:21pm 
@Certified Sub: I mean, I don't blame them, hospital beds aren't great.

I've pushed a new version which should hopefully help with that. Now, if the vanilla function says to go to a bed marked "Medical" in the code, this mod won't touch the choice.
Certified Sub 22 Sep @ 6:52pm 
To second what somebody else said, I'm having issues with pawns going to normal beds rather than staying in hospital beds. It's not gamebreaking because I can just force them to go to the hospital beds, but it is mildly annoying that I have to keep checking on them to make sure they're staying in the hospital.
Maeyanie  [author] 21 Sep @ 3:13am 
@Poindexter1985: Good to know, thanks for testing that. :steamthumbsup:
Poindexter1985 21 Sep @ 3:09am 
So, I would say that the mods aren't game-breaking to have active together, but there's no reason to do so. The polyamory bed features seem to be rendered inoperable by MultiFloors, regardless of what levels the colonists and their beds are on.
Poindexter1985 21 Sep @ 3:08am 
@Maeyanie, my initial test report:

Test setup:
- Four colonists
- All bisexual lovers of all other colonists
- 4 double beds in a 2nd floor barracks
- MultiFloors "Living" level set to 2nd floor for all pawns
- Each double bed set to polyamory mode with a single assigned pawn
- Put all colonists on the ground floor
- Set all pawn schedules to sleep all day
- Forced sleep need to almost empty to force sleeping

The information on each bed showed a single Master, "partners count: 3" and a "Current partner." The colonists all went upstairs to bed after finishing their current job, but all went to separate beds.

I added a colonist, set her Living level to the 2nd floor without a bed, and made her a lover with everyone. When she got sleepy on the 1st floor, MultiFloor threw an error about changing levels to rest, and she kept working. If I sent her to the 2nd floor manually, no error appeared, but she slept on the floor instead of with a lover.
Geojak 21 Sep @ 12:33am 
Thanks for explaining the warning. As far as I can tell, the mod reassigned immdielty, atleast I never saw any double beds with partners unassigned despite the warning
Maeyanie  [author] 20 Sep @ 10:56pm 
Moodlets should be unchanged from vanilla.
Maeyanie  [author] 20 Sep @ 10:52pm 
@Poindexter1985: The test I would do would be pretty much that, yeah. Have 4 people, all lovers, ideology supports loving without marriage.

From there, for each test case, I'd make 4 double beds, and assign each person as a master to one. It shouldn't matter if they're in individual bedrooms or in a barracks.

The things to check would be, do the beds show a guest in addition to the owner? If not, things are very broken. If so, will they join someone else in bed? Or at the very least, will they find their way to their own bed, and not just stand around until they collapse on the floor? That would be the worst level of broken.
Poindexter1985 20 Sep @ 9:31pm 
@Maeyanie, I may be able to do some testing, but could you suggest a test case to try? I've never used this mod before, and in the past I've never allowed polyamorous ideos specifically because I wanted to avoid dealing with vanilla's inflexible bed assignments. So I'm not sure what use case would confidently demonstrate, "Poly beds are working as intended" versus "the pawns are definitely not following poly bed behaviours."

If I make 4 pawns, force them all to be lovers of each other, and give each of them their own bedroom with a double bed assigned to only 1 pawn, what behaviour should I see when they go to bed? What moodlets should they have?
Maeyanie  [author] 20 Sep @ 5:55pm 
@not funny, laughed: Based on the original report by Cody, it was permanent and required going into dev mode to reset the body each time.
not funny, laughed 20 Sep @ 4:13pm 
how incompatible with big and small is it? does the size get messed up permanently or just while in bed?
Maeyanie  [author] 20 Sep @ 3:19pm 
@Geojak: I've seen those in logs before that change... it seems harmless, so I haven't dug deeper into it, but it's basically caused by RimWorld being designed for people to only have 1 bed at a time. When the game loads it seems to do a check to make sure that 1:1 ratio is preserved, but with this mod that's no longer the case, so it gives that warning as it unassigns guest slots.

I'm not actually sure if this mod assigns them again immediately or it'll take until the next changeover happens, but either way it shouldn't be a significant problem.
Geojak 20 Sep @ 2:05pm 
i keep getting these yellow warnings everytime i load my safe in the log since you fixed those erros 2 weeks ago. i have been ignoring them, but i was wondering whats up. do you know whats going on?

DoubleBed2184376 had pawns assigned that don't have it as an assigned bed. Removing.
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Warning (string)
RimWorld.CompAssignableToPawn_Bed:PostPostExposeData ()
RimWorld.CompAssignableToPawn_Bed:PostExposeData ()
st.rusik 20 Sep @ 12:34pm 
Hi, I haven't installed this mod yet, but in the old version, when I was playing on 1.5, I had a small problem where guest pawns preferred to go to bed with their partner rather than to a medical bed in case of illness or injury. Check it out, maybe something similar is present in this version (I haven't been following the mod updates)
Maeyanie  [author] 19 Sep @ 10:24pm 
@Poindexter1985: I haven't tried it myself, my guess (and it's purely a guess) is that it'd work with colonists on the same level as the beds, but when they're on a different level they may not be able to find a bed. It might also be load-order dependent what exactly happens.

It's fairly safe to add and remove this mid-game, so feel free to experiment and let us know. It probably won't make everything explode, but I'd make a hard save first just in case.
Poindexter1985 19 Sep @ 7:10pm 
How incompatible is this with MultiFloors? I saw that the comment that reported the incompatibility in April mentioned it working fine with beds on the ground floor. What's the critical factor - is it the location of the beds, or the location of the pawns?

In other words, would it work okay-ish if all of the bedrooms are on the same level? Or would it still fail to work if, say, all of the beds are on the 2nd floor, and the pawn is on the ground level when they decide to go to bed and check for possible bed locations?
Geojak 11 Sep @ 2:11am 
thanks alot for updating again!!
Maeyanie  [author] 10 Sep @ 12:42pm 
@Geojak: Well, the good news is, apparently that fix did work, since that's a different place. Fixed in there too, hopefully that means it's patched for good now. :steamthumbsup:
Geojak 10 Sep @ 6:56am 
a litte more playing. unfortuently i still get this error
Lucero threw exception in WorkGiver DoctorRescue: System.NullReferenceException: Object reference not set to an instance of an object
at RimWorld.SpouseRelationUtility.GetLoveRelations
at OneBedToSleepWithAll.PolygamyModeUtility.CheckIsHavePartnersPolygamyBed
at OneBedToSleepWithAll.Patch.RestUtility__FindBedFor.Postfix
at RimWorld.RestUtility.FindBedFor (
- POSTFIX densevoid.hui.personalworkcat: Void OneBedToSleepWithAll.Patch.RestUtility__FindBedFor:Postfix(
at RimWorld.WorkGiver_TakeToBed.FindBed (Verse.Pawn pawn, Verse.Pawn patient)
Geojak 9 Sep @ 1:45am 
maybe the unset of the relations was cuased by odysesy grav ship launch map change
Geojak 9 Sep @ 1:44am 
thank you, i will give it a try. if you dont here from me, consider it fixed :) otherwise ill post again