Jump to content

sleeping heals companions


Shamino248

Recommended Posts

Hello!

 

I want to play without the automatic healing for the companions after battle, but want them to heal (just as the player does) when the party is sleeping, using the commands

IsPCSleeping

and

GetPCSleepHours (for minimum time to sleep for recover)

 

What I tried so far didn't work, so does anyone knows how the correct entry for their script should look like? This would be very much appreciated! :)

Link to comment
Share on other sites

This is how I did it. Added this to the NPC's script.

 

BEGIN MenuMode 1012

 if IsPCSleeping
  set iPCSlept to 1
 else
  set iPCSlept to 0
 endif

 if (iPCSlept)
  if (GetPCSleepHours > 0)
   if (getdistance Player < 1000)
    resethealth
   endif
  endif
 endif

END

Link to comment
Share on other sites

This is how I did it. Added this to the NPC's script.

 

BEGIN MenuMode 1012

 if IsPCSleeping
  set iPCSlept to 1
 else
  set iPCSlept to 0
 endif

 if (iPCSlept)
  if (GetPCSleepHours > 0)
   if (getdistance Player < 1000)
    resethealth
   endif
  endif
 endif

END

 

Nice Rickerhk, OK if I use that for some of my companion mods (I'll credit you).

 

I wonder if there are any arguments (or would that be switches or ??) that resethealth takes or an alternate script command that restores partial health? I didn't see any on the fose page or construction set wiki. I think it would be cool to use GetHealthPercentage of your npc, then have each hour add a set percentage of heath. While that would complicate the script it would mean you (& thus the npc) would have to sleep for longer periods if the npc is greviously wounded. Mimicking the way it works for the player.

 

I'd also like to find such a command so I can use stim packs in my inventory on npc's. But maybe the companion wheel will have insight on how to do that. Kinda lame that easy pete's been crippled for months. Plus sometimes you just see a critter you'd like to help out.

Edited by devinpatterson
Link to comment
Share on other sites

Wow, that's great, can't thank you enough!

I also like your solution with the distance, because I initially wanted to use the GetPlayerTeammate, but for the 38 for example it makes much more sense when all companions there will be healed, even without being in your party!

So thanks again, you really helped me a lot!! Kudos!

 

 

I agree, partial healing for every hour of sleep would be a good innovation!

For now I would use a minimum of 4-6 hours to make up for this I guess.

 

 

Oh and what do you think about healing from doctors? That everytime you pay for healing, your companions will be healed as well, so you could bring them to a doctor too?

In this case doctors should also check the health of your teammates, because at the moment they don't, so if only your teammates are injured and you are at 100%, the healing-option won't appear!

Edited by Shamino248
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...