Page 1 of 1
Offline Resting
Posted: Thu Jun 18, 2009 8:15 am
by NickD
I suspect there is a bug with offline resting. I was of the understanding that characters only restore as much as they would for each day over the time they are offline. It appears to me that as long as a character is offline for a single IG day, they are back at full strength when they log in.
If you point me at the the scripts in the sourceforge repository that handle this, I suspect I will be able to provide code to fix it.
Re: Offline Resting
Posted: Thu Jun 18, 2009 1:40 pm
by Ithildur
A single RL day is nearly 9 days as far as the game engine is concerned with regards to the offline resting script, I'm pretty sure, under the current fast time compression ratio.
Re: Offline Resting
Posted: Wed Jun 24, 2009 2:35 pm
by Keryn
Its working as it should and how it was designed to be working.
An IG day is assumed to be enough for your PC to have rested during that IG day, thats why you get your PC rested when you log in. Also it is a way to favor casual gamers with few time to play.
Re: Offline Resting
Posted: Wed Jun 24, 2009 6:10 pm
by AcadiusLost
I have seen occasional reports of full-healing from serious HP loss after the equivalent of only a day or three of offline game-time; haven't experienced it myself, but my PC rarely logs out with more than a point or two of damage, so I wouldn't have noticed.
The code is handled by the ACR resting include:
http://alfa-bmf.svn.sourceforge.net/vie ... iew=markup
The functions to pick over would be _ProcessOffCameraRest() at 1139-1175, and _healFromRest() from 881-1010. My instinct would be that the "pre-resting" HP level isn't being initialized properly (due to PCs coming in fully healed before the ACR adjusts them back to their persistent HP levels). Thanks for having a look over it, if you don't spot anything obvious I'll set up a damage lever in my testmod and take a shot at working it out while I tinker with 1.23 stuff.
Re: Offline Resting
Posted: Thu Jun 25, 2009 12:16 pm
by NickD
I think I'd need a better understanding of how everything fits together (and the ability to run a module in debug mode with breakpoints would be nice...

). The code itself looks OK from a cursory look, so I'm going to need to delve a bit deeper.
My best guess at this point is that the ACR_RestOnClientEnter method is called some time during the On Client Enter Script. This, if the number of days offline is 1 or more, increases the character's HPs by their level and their abilities by 1 per offline day (up to their maximum values). It then saves the character.
I am also assuming that the On PC Loaded Script is called
after the On Client Enter Script. And that ACR_PCOnPCLoaded is called some time during the On PC Loaded Script. This script gets the saved character and sets their status to how they were when they logged out.
However (if I'm right), if a character first logs in at full strength, ACR_RestOnClientEnter will added (level * offline days) HPs to their HPs (currently maximum) and trim it down to their maximum... i.e., do nothing. And then save that value, so ACR_PCOnPCLoaded will then pick up those maximum values and thus always restore HPs and ability scores to maximum if the character has been offline for 1 or more IG days.
Which is all pretty much the same as your guess.