RimWorld

RimWorld

Sleep Meditation Focus
37 Comments
Kimo'  [author] Aug 1 @ 5:45am 
We can't do anything without a full log. But this was fixed with the last update. Please properly update your mod by unsubbing and ressubing.
Alex Priner Aug 1 @ 12:42am 
This comment is awaiting analysis by our automated content check system. It will be temporarily hidden until we verify that it does not contain harmful content (e.g. links to websites that attempt to steal information).
Alex Priner Aug 1 @ 12:42am 
Hello, same here, performances are awful. Here is some part of the log: "150
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Message (string)
VPESleepMeditation.Toils_LayDownPatch:Postfix (Verse.Pawn,RimWorld.Building_Bed,bool)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:RimWorld.Toils_LayDown.ApplyBedRelatedEffects_Patch1 (Verse.Pawn,RimWorld.Building_Bed,bool,bool,int)
RimWorld.Toils_LayDown/<>c__DisplayClass6_0:<LayDown>b__1 ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.AI.JobDriver.DriverTick_Patch2 (Verse.AI.JobDriver)
Verse.AI.Pawn_JobTracker:JobTrackerTick ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Pawn.Tick_Patch3 (Verse.Pawn)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Thing.DoTick_Patch1 (Verse.Thing)
Verse.TickList:Tick ()"
(part1)
Kimo'  [author] Jul 30 @ 11:11am 
Update:
-Improved performances
Kimo'  [author] Jul 30 @ 8:44am 
@Smiley Face Killer does this happen with only this mod and it's dependency? If so, please send a full log
Smiley Face Killer Jul 30 @ 4:24am 
This is one of several of the logged entries, but again, this is getting constantly plastered into the log. Which is probably why the TPS is getting destroyed by it
https://pastebin.com/FBeJQu6k
Smiley Face Killer Jul 30 @ 4:22am 
I didn't have this issue until today, so I think it's from yesterdays update. But I asked chat what these white logs were being spammed in the console

"running a Harmony patch on Toils_LayDown and logging a message to the console every single tick a pawn lies down" It's telling me I need to go into the files and delete/comment out the line like "Log.Message("15");"

Not a coder and I'm not just going to take ai's words as gospel here. Just wanted to see if you have any ideas on what it is. Because the console is just getting absolutely slammed with these logged messages
Kimo'  [author] Jul 29 @ 6:52pm 
@othtim Could not reproduce. Tps stayed the same at night during testing with a bunch of animals
othtim Jul 29 @ 5:27pm 
Just adding this mod incredibly reduces my TPS. Does this somehow fire on animals? Whenever animals go to sleep my TPS just tanks with this mod enabled.
Kimo'  [author] Jul 29 @ 10:07am 
Can you see if this happens with only this mod and it's dependency loaded? And if it happens then, please send a log
bagelhe Jul 29 @ 9:39am 
i got something going on with this mod

The error originates from VPESleepMeditation, which is part of a mod or patch related to Vanilla Psycasts Expanded (VPE). The method it's patching is Toils_LayDown.ApplyBedRelatedEffects, and it's causing an issue during pawn job ticking—most likely when a pawn is trying to lay down in bed or meditate while sleeping.

checked with chat gpt
Kimo'  [author] Jul 29 @ 7:24am 
Update:
-Fixed a bug where pawn sleeping on screen would regain less focus than they should
-Fixed the about file
PKPenguin Jul 25 @ 10:49pm 
Vanilla deathrest does count for this mod though which I actually prefer
Kimo'  [author] Jul 19 @ 4:50am 
@Ozymandias No it does not, there are already linkable that restore focus during deathrest included in VRE sanguophage
Ozymandias Jul 16 @ 3:08pm 
does deathresting count as sleep for this mod? from uh VRE sanophauges (or however you spell it)
Kimo'  [author] Jul 6 @ 4:57pm 
Update:
-Fixed sleep focus unlocked by everyone with psy powers, regardless of they fullfilled the conditions for it.
-Restored missing patches for vanilla traits.
Kimo'  [author] Jul 5 @ 10:15am 
@Ayana Can you please provide a log so we can take a look at it?
Ayana Jul 5 @ 9:04am 
I just added this midgame and suddenly all pawns, even those spawned after it was added, have the sleep meditation focus type.
Kimo'  [author] Jul 3 @ 1:50pm 
-Updated to 1.6
-Reduced the frequency of calls for sleeping, which should improve performance

Let me know if you find any issues.
Kimo'  [author] Jun 11 @ 2:06pm 
We will take a look at performance when we'll update the mod to 1.6.
Evono Jun 11 @ 6:29am 
@kimo could you look at the performance cost of this mod ? on a modlist of 470+ this is the 3rd heaviest mod right at LTO / Colored mood bar with 25+ pawns visible. https://i.imgur.com/p4FZXuF.png
Mauno May 12 @ 12:23pm 
Oh lol, for some reason I assumed this would be about watching sleeping people to meditate.
Kimo'  [author] Apr 17 @ 4:48pm 
@Inglix Should be fixed!
Kimo'  [author] Apr 16 @ 8:33pm 
I'll consider it, but I have very limited experiences with these type of patches
Inglix Apr 16 @ 8:15pm 
Do you think you could modify your patch which adds the Natural meditation type to the Ecologist trait from Vanilla Traits Expanded to be conditional? The exact same change is also done by Too Many Mods - Compats and Rebalances, and that creates an error on game startup because the allowedMeditationFocusTypes field is added to the same TraitDef twice.
Kimo'  [author] Apr 16 @ 6:02pm 
@Inglix Glad you like it!
Inglix Apr 5 @ 7:29pm 
Nice! This is exactly how I wished the original Sleep Meditation mod worked.
Feint Apr 3 @ 6:06am 
Works perfectly, thanks!
Kimo'  [author] Apr 2 @ 5:46pm 
Update:
-Fixed errors when a pawn without an ideo tried to sleep.
Eragon001  [author] Apr 2 @ 5:43pm 
@Feint should be fixed in the next update!
Kimo'  [author] Apr 2 @ 1:07pm 
@Feint can you please provide a log so we can take a look at this?
Feint Apr 2 @ 12:38pm 
Great mod. Unfortunaly it breaks Rimworld babies for me.

Exception in JobDriver tick for pawn Baby driver=JobDriver_LayDown (toilIndex=2) driver.job=(LayDown (Job_5161790) A = Thing_Bed454993)
System.NullReferenceException: Object reference not set to an instance of an object

Not sure if this is a conflict on my end, but once I added this mod the babies were unable to stay on their crib/bed.
Kimo'  [author] Mar 30 @ 10:31am 
Update:
-Fixed pawns getting the focus multiple times
-Fixed genes giving the focus when they shouldn't
-Fixed errors appearing if don't have Biotech loaded
Eragon001  [author] Mar 29 @ 3:17pm 
@Vulkandrache if you find any performance issues with our mod, I'd be happy to look into it. But currently ,the mod should be pretty performant all things considered
Philadelphus Mar 29 @ 2:30pm 
Interesting idea! I like sleep meditation, but it certainly is quite powerful; this sounds like an interesting balancing method, to have to actually purchase it.
Kimo'  [author] Mar 29 @ 11:50am 
According to testing, the performance are roughly the same as any pawn meditating using a VPE focus when a pawn with the sleep meditation focus sleep. But if only some pawn in your colonies are psycasters/have the sleep meditation focus unlocked, then performance should definitely be better than the original Sleep meditation mod.
Vulkandrache Mar 29 @ 11:42am 
Do you have any info on how the performance might be?
For a relatively small mod the old version wasnt the best
with pawn number 20+