Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 01-08-2014, 05:45 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,603
Default 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.



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.
Reply With Quote
  #2  
Old 01-08-2014, 09:22 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,603
Default

Look at this, sorry for double posting, when I put their health at -8109 it sets their maximum to 31.


Reply With Quote
  #3  
Old 01-08-2014, 10:19 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

They wearing any gear?
Reply With Quote
  #4  
Old 01-08-2014, 10:21 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,603
Default

No sir, the two screenshots I posted with their stats show 0 items.
Reply With Quote
  #5  
Old 01-09-2014, 12:17 AM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

What client are you using?
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #6  
Old 01-09-2014, 12:18 AM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,603
Default

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.
Reply With Quote
  #7  
Old 01-09-2014, 12:26 AM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

Roger that, just wanna make sure that I can mimic your conditions
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #8  
Old 01-10-2014, 01:20 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,603
Default

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
Reply With Quote
  #9  
Old 01-10-2014, 02:48 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

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?
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #10  
Old 01-11-2014, 05:51 AM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,603
Default

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.


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.
Reply With Quote
  #11  
Old 01-11-2014, 11:50 AM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

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

I would have never thought to go there.
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #12  
Old 01-11-2014, 06:35 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,603
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:51 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3