MAXHP for npcs

Archive of the older Feature Request Forum Posts

Moderator: POL Developer

Locked
User avatar
OldnGrey
POL Expert
Posts: 657
Joined: Sat Feb 04, 2006 6:26 pm

MAXHP for npcs

Post by OldnGrey »

Is there any way we can change the maxhp for an npc? I don't mean editing and reloading the npcdesc file. I am looking for a way to set a maxhp_mod on an npc the same way as an item.
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

Post by Austin »

Already exists.
1. Look at your vitals.cfg
-This will tell you where your vital hook is and what function it uses.
2. Look at the function that returns something for the hit point vital.
This is what sets the hitpoints.
It probably points to the strength attribute?
You can change it to look for something else, a cprop maybe for an npc?
Use RecalcVitals() im uo.em to update the vitals and their regen rates.
It causes the hook to be re-run on the mobile.
User avatar
OldnGrey
POL Expert
Posts: 657
Joined: Sat Feb 04, 2006 6:26 pm

Post by OldnGrey »

The cprop idea works just fine.
Thanks Austin.

Pol still ain't the best thing to figure out stuff.
The POL Object Class Reference really lead me astray here.
Locked