dizietemblesssma Posted May 21, 2023 Share Posted May 21, 2023 Is there a way to check the 'warmth' of a player? There seems to be no condition function for this, it's not a stat or an actorvalue, there is a papyrus function getwarmthrating() for actor but I don't want to have a script continously looping until the warmth rating drops below some value for the script to do something. Is there another way for a script to react to warmth rating? diziet Link to comment Share on other sites More sharing options...
IsharaMeradin Posted May 21, 2023 Share Posted May 21, 2023 Given that that particular feature was added with the addition of Survival Mode, there won't be a native way to react to warmth rating changes. If you do not want to use an update cycle to check every so often, use other events. Examples could be: OnSit for using furniture, OnGetUp for stopping the use of furniture, OnActorAction (from SKSE) for when weapons / spells are sheathed or drawn, OnLocationChange, OnCellLoad and possibly others. Link to comment Share on other sites More sharing options...
dizietemblesssma Posted May 23, 2023 Author Share Posted May 23, 2023 Hmm, I was afraid I wasn't missing something, seems I was right:)Thanks for the reply, this leads me to check my assumptions; how much effect can an repeatedly looping scripted check have on performance? Is there a recommended delay time, say 2s verus 30s? Not having any experience of survival mode I don't know how quickly an actors warmth rating can change, do you kow of any in depth detailing of survival and warmth that I can read that might touch on this? diziet Link to comment Share on other sites More sharing options...
IsharaMeradin Posted May 23, 2023 Share Posted May 23, 2023 Sorry, I do not use survival type mods. Thus I cannot direct you to any documentation that might be forthcoming with the information that you seek. I can tell you that as long as you use the single update registrations (and re-register as needed) that should the script running the update be removed mid-game, there will be a single error report in the papyrus log when the timer stored in the save file runs out. After that, there should be (knock on wood) no remnants of the update cycle left behind to cause an issue. And as far as timing, the bare minimum to wait between updates would be enough time to ensure that the intended code can complete its processing. And what works for one setup might not work for another due to different active mods. I wouldn't go any quicker than 0.25 seconds. And that I tend to only use for updates that are only meant to run one-time code, i.e. closing an MCM menu and doing things based on choices. Link to comment Share on other sites More sharing options...
dizietemblesssma Posted May 23, 2023 Author Share Posted May 23, 2023 Fair enough, thanks for the advice about single update registration and timing. diziet Link to comment Share on other sites More sharing options...
Recommended Posts