Aller au contenu

Photo

RE: How do you disable the automatic HP regain OnPlayerRest?


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
Pstemarie

Pstemarie
  • Members
  • 2 745 messages

Is there any way to disable the automatic healing that occurs when a player rests? I want to setup healing through rest as in PnP - 1 hp/level for a full night's rest (i.e. 8 hours). I have that part scripted but every time the PC rests they are at full HP when the rest ends. How do I stop this? No I don't want a solution that uses NwnX.


  • WhiteTiger aime ceci

#2
meaglyn

meaglyn
  • Members
  • 813 messages

As far as I know there is no way to stop that. Most systems that do what you are trying to do save the HPs at the start of rest and then re-apply damage to get back to the appropriate level at the end. It works but you see "Someone damaged Foobar: magical" or whatever when the rest ends. I'll be changing mine to use NWNX when available to get around that...


  • henesua et WhiteTiger aiment ceci

#3
henesua

henesua
  • Members
  • 3 882 messages

Yup. Magical damage. Would be interesting to see the NWNX solution. What plugin would that be, Meaglyn?


  • WhiteTiger aime ceci

#4
meaglyn

meaglyn
  • Members
  • 813 messages

Nwnx_funcs has this:

/* Set oCreature's current hit points */
int SetCurrentHitPoints (object oCreature, int nHP);

I'll have a wrapper that uses this if nwnx is available and does the other calculation and magical damage thing if not. Then the rest completion code does not have to know anything. Have not done it yet, the list is long...


 



#5
Pstemarie

Pstemarie
  • Members
  • 2 745 messages

Meh, the damage then heal work around is good enough for what I'm doing.