EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Windows Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=587)
-   -   NPC Scaling? (https://www.eqemulator.org/forums/showthread.php?t=37714)

Kingly_Krab 01-08-2014 05:45 PM

NPC Scaling?
 
So my NPC is scaling weirdly, 31 health in the database, 8171 in the game, it spawns at 0% health and just stands there, slowly regenerating.
http://i.imgur.com/QMqOGVu.png
http://i.imgur.com/GxCdz1q.png
http://i.imgur.com/pxvT2OD.png
Does anyone else experience this? Is it due to a setting in npc_types, or should I look for an outside source?

EDIT: I just noticed that all mobs spawn with an extra 8140 health, even with #spawn Test_Mob 1 1 3 100000 it spawns with 108140.

Kingly_Krab 01-08-2014 09:22 PM

Look at this, sorry for double posting, when I put their health at -8109 it sets their maximum to 31.
http://i.imgur.com/oGTDsA0.png
http://i.imgur.com/GsqGqpl.png
http://i.imgur.com/vX6G9cW.png

lerxst2112 01-08-2014 10:19 PM

They wearing any gear?

Kingly_Krab 01-08-2014 10:21 PM

No sir, the two screenshots I posted with their stats show 0 items.

Uleat 01-09-2014 12:17 AM

What client are you using?

Kingly_Krab 01-09-2014 12:18 AM

I'm running Underfoot/House of Thule, I don't believe it's client-related as #npcstats shows the NPC with an extra 8,140 health.

Uleat 01-09-2014 12:26 AM

Roger that, just wanna make sure that I can mimic your conditions :)

Kingly_Krab 01-10-2014 01:20 PM

I followed some of Uleat's advice and added debug messages in the code, this is the code I used.
Code:

SetEmoteID(d->emoteid);
InitializeBuffSlots();
LogFile->write(EQEMuLog::Error, "Mob: %s", name); // mob name
LogFile->write(EQEMuLog::Error, "[pre-calc hp] cur: %i, max: %i", cur_hp, max_hp); // pre-calc hp values
CalcBonuses();
LogFile->write(EQEMuLog::Error, "[post-calc hp] cur: %i, max: %i", cur_hp, max_hp); // post-calc hp values

It output this, showing that the calculations are acting up and adding 8140 health to my NPCs, pets included:
Code:

[01.10. - 07:03:41] Mob: Zaoco_Liaoc000
[01.10. - 07:03:41] [pre-calc hp] cur: 31, max: 31
[01.10. - 07:03:41] [post-calc hp] cur: 31, max: 8171
[01.10. - 07:03:41] Mob: Oaok_Thuj000
[01.10. - 07:03:41] [pre-calc hp] cur: 31, max: 31
[01.10. - 07:03:41] [post-calc hp] cur: 31, max: 8171
[01.10. - 07:03:41] Mob: Lut_Zzix000
[01.10. - 07:03:41] [pre-calc hp] cur: 31, max: 31
[01.10. - 07:03:41] [post-calc hp] cur: 31, max: 8171
[01.10. - 07:03:41] Mob: Hozs_Lozo000
[01.10. - 07:03:41] [pre-calc hp] cur: 31, max: 31
[01.10. - 07:03:41] [post-calc hp] cur: 31, max: 8171
[01.10. - 07:03:41] Mob: Giak_Lozo000
[01.10. - 07:03:41] [pre-calc hp] cur: 31, max: 31
[01.10. - 07:03:41] [post-calc hp] cur: 31, max: 8171
[01.10. - 07:03:41] Mob: Tavo_Cepa000
[01.10. - 07:03:41] [pre-calc hp] cur: 31, max: 31
[01.10. - 07:03:41] [post-calc hp] cur: 31, max: 8171
[01.10. - 07:03:41] Mob: Grogg_Hoack000
[01.10. - 07:03:41] [pre-calc hp] cur: 31, max: 31
[01.10. - 07:03:41] [post-calc hp] cur: 31, max: 8171
[01.10. - 07:03:41] Mob: Melia_Finson000
[01.10. - 07:03:41] [pre-calc hp] cur: 31, max: 31
[01.10. - 07:03:41] [post-calc hp] cur: 31, max: 8171
[01.10. - 07:03:41] Mob: Jovai_Tokin000
[01.10. - 07:03:41] [pre-calc hp] cur: 31, max: 31
[01.10. - 07:03:41] [post-calc hp] cur: 31, max: 8171
[01.10. - 07:03:41] Mob: Sir_Coac_Dixon000
[01.10. - 07:03:41] [pre-calc hp] cur: 31, max: 31
[01.10. - 07:03:41] [post-calc hp] cur: 31, max: 8171
[01.10. - 07:03:41] Mob: Shadowed_Guard000
[01.10. - 07:03:41] [pre-calc hp] cur: -8109, max: -8109
[01.10. - 07:03:41] [post-calc hp] cur: -8109, max: 31
[01.10. - 07:03:41] Mob: Shadowed_Guard001
[01.10. - 07:03:41] [pre-calc hp] cur: -8109, max: -8109
[01.10. - 07:03:41] [post-calc hp] cur: -8109, max: 31
[01.10. - 07:03:42] Mob: Jasn000
[01.10. - 07:03:42] [pre-calc hp] cur: 30, max: 30
[01.10. - 07:03:42] [post-calc hp] cur: 30, max: 8170


Uleat 01-10-2014 02:48 PM

Ok...

Clients, bots and mercs use their own virtual CalcBonuses() methods and do not call Mob::CalcBonuses.

This basically leaves NPC's. (Even though they have their own virtual, they still call the parent class method..twice, on entry and exit.)

You should be able verify this on any pet, player or otherwise.


EDIT: At what point are you applying your scalar modifiers?

Kingly_Krab 01-11-2014 05:51 AM

Okay, so it's not only scaling health. Also, my other database works just fine, no extra stats or health, it's rather weird...

Here's a picture of extra health and stats, the query for this NPC is below.
http://img89.imageshack.us/img89/418/y2ps.png

Code:

INSERT INTO npc_types VALUES
(1025,'Zaoco_Liaoc','Powersource Progression',70,3,1,1,31,0,0,3,0,0,0,0,0,0,0,0,0,0,0,1,2,-1,'24^35,1',0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,28,28,1.25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,75,75,75,75,80,75,75,0,0,1,0,1,0,0,0,0,0,100,0,0,0,0,0,100,100);

I wrote more debugging code and here is the output. The Calculations inside MaxHP are called twice, so the information is before and after, they're getting extra health from items some how.
Code:

[01.11. - 06:06:13] Mob: Grogg_Hoack000
[01.11. - 06:06:13] [pre-calc hp] cur: 31, max: 31
[01.11. - 06:06:13] [Base Health]: 31
[01.11. - 06:06:13] [Before Calculations]: Max HP: 31, Item Bonuses: 0, Spell Bonuses: 0
[01.11. - 06:06:13] [After Calculations]: Max HP: 31, AA Bonuses (MaxHP): 0, Spell Bonuses (MaxHP): 0, Item Bonuses (MaxHP): 0
[01.11. - 06:06:13] [Base Health]: 31
[01.11. - 06:06:13] [Before Calculations]: Max HP: 8171, Item Bonuses: 8140, Spell Bonuses: 0
[01.11. - 06:06:13] [After Calculations]: Max HP: 8171, AA Bonuses (MaxHP): 0, Spell Bonuses (MaxHP): 0, Item Bonuses (MaxHP): 0
[01.11. - 06:06:13] [post-calc hp] cur: 31, max: 8171

I believe I discovered the issue, I have an item at id 0, so it's going on the NPCs and players in every empty slot they have.
Code:

0        0        Kreljnok's Sword of Eternal Power        20        70        0        20        15        0        0        30        25        20        0        4        1        8        1        0        1        0        1        30        0        0        0        0        0        0        0        0        0        0        0        0        0        0        0        500        500                0        1        4278190080        0        0        0        0        30        46        0        0        29        0        0        25        5        0        0        0        320        0        0        0        0        0        0        0        0                -1        30        1        0        0        370        2        1521        IT10749        0        0        0        0        0        6                0        1        0        0        0        0        -1        0        0        1        0        30        0        65535        0        0        0        70        1        6        2        -1        0        24576        6264        0        0        0        0        0        0        20        0        1        0        0        0        0        300        6        0        0        0        0        0        2012-12-27 10:35:28        Epic 2.0        0        0        0        0        1        0        0                0        -1        0        0        0        0        6280        2        0        0        0        0        0        0        0        -1        0        0        0        0                2012-06-20 19:37:58                13THFLOOR        0                1        0        0        0        0        0        0        0        0        -1        0        0        00000000000000000000        0                0        0        0        0        0                -1        0        0        0        0        0                0        0        0        0        0        0                -1        0        0        0        0        0                -1        0        0        0                                                0        0        0        0        0        0        0        0        0        0        0        0        0        0        0        0        0        0        2004-12-07 09:35:20        0        70        0        0        0        -1        0        0        0        0        0        0        0        0                -1        0        0        0        0        0        0        142        0        1        0        1036831949        1075838976        0        -1        0        -256        255        0        0        -2147483648        63        0        0        0        1
I have fixed my issue, thanks for the help everyone.

Uleat 01-11-2014 11:50 AM

So, the loot ID 0 was pushing the extra hp..that's weird.

I would have never thought to go there.

Kingly_Krab 01-11-2014 06:35 PM

I wouldn't have either until I saw the NULL being replaced with a weapon, then I saw item id 0, then I removed it and everything was fine.


All times are GMT -4. The time now is 02:14 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.