[FIXED] MAXHP not working?

Here we stuff all the bugs we've managed to squash/squish/squelch.
Locked
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

MAXHP not working?

Post by Xuri »

I added HP=2000 and MAXHP=3000 to the [alligator] DFN section, but when I added the alligator ingame, it still only had as much HP as it had STR.

Either I'm a bit confused on how exactly it should be set up, or it's not working :P
-= Ho Eyo He Hum =-
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

Xuri wrote:MAXHP=3000
Try HPMAX=3000 instead ;).
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Ahh, that worked :)
So what's with the HP tag? Unused?
-= Ho Eyo He Hum =-
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

Xuri wrote:So what's with the HP tag? Unused?
That sets the HP the char will have directly after it is spawned. Without it the char spawns with 1 hitpoint and only gains the full ammount due normal HP regeneration.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Hm. I have HPMAX=3000, but no matter what I set HP to, the alligator seems to spawn with a little more than 200 HP.
-= Ho Eyo He Hum =-
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

Xuri wrote:Hm. I have HPMAX=3000, but no matter what I set HP to, the alligator seems to spawn with a little more than 200 HP.
Place the HP tag after the HPMAX tag, as UOX3 will limit the HP to the current maximum HP.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Oh, HP has to be set AFTER HPMAX or it won't be read, it seems. And UOX3 possibly adds on the HP gotten from the STR value as well, because with
STR=76 100
HPMAX=3000
HP=1000
my alligators spawn with around 1100 hitpoints and start gaining health from there. :P

EDIT: And if HPMAX/HP is set before STR, the NPC immediately gains max hp when spawned =)
-= Ho Eyo He Hum =-
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

Xuri wrote:Oh, HP has to be set AFTER HPMAX or it won't be read, it seems. And UOX3 possibly adds on the HP gotten from the STR value as well, because with
STR=76 100
HPMAX=3000
HP=1000
my alligators spawn with around 1100 hitpoints and start gaining health from there. :P

EDIT: And if HPMAX/HP is set before STR, the NPC immediately gains max hp when spawned =)
Well the HP and STR tags are unchanged by me. So I have to check the sources myself to see what they do ;).
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Right =) Btw, would be nice if HPMAX (and HP) supported a minimum & maximum value like STR/DEX/INT do.
-= Ho Eyo He Hum =-
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

Xuri wrote:Btw, would be nice if HPMAX (and HP) supported a minimum & maximum value like STR/DEX/INT do.
I'll have a look at it, shouldn't be hard to do.
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

Xuri wrote:Btw, would be nice if HPMAX (and HP) supported a minimum & maximum value like STR/DEX/INT do.
This is now on CVS.
Locked