|  |  | 
 
  |  |  |  |  
  |  |  |  |  
  |  |  |  |  
  |  |  |  |  
  |  | 
	
		
   
   
      | Support::Windows Servers Support forum for Windows EQEMu users. |  
	
	
		
	
	
	| 
			
			 
			
				01-08-2014, 05:45 PM
			
			
			
		 |  
	| 
		
			
			| Administrator |  | 
					Join Date: May 2013 Location: United States 
						Posts: 1,604
					      |  |  
	| 
				 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. |  
	
		
	
	
	| 
			
			 
			
				01-08-2014, 09:22 PM
			
			
			
		 |  
	| 
		
			
			| Administrator |  | 
					Join Date: May 2013 Location: United States 
						Posts: 1,604
					      |  |  
	| 
 |  
	
		
	
	
	| 
			
			 
			
				01-08-2014, 10:19 PM
			
			
			
		 |  
	| 
		
			
			| Demi-God |  | 
					Join Date: Aug 2010 
						Posts: 1,742
					      |  |  
	| 
 They wearing any gear? |  
	
		
	
	
	| 
			
			 
			
				01-08-2014, 10:21 PM
			
			
			
		 |  
	| 
		
			
			| Administrator |  | 
					Join Date: May 2013 Location: United States 
						Posts: 1,604
					      |  |  
	| 
 No sir, the two screenshots I posted with their stats show 0 items. |  
	
		
	
	
	| 
			
			 
			
				01-09-2014, 12:17 AM
			
			
			
		 |  
	| 
		
			|  | Developer |  | 
					Join Date: Apr 2012 Location: North Carolina 
						Posts: 2,815
					      |  |  
	| 
 What client are you using? 
				__________________Uleat of Bertoxxulous
 
 Compilin' Dirty
 |  
	
		
	
	
	| 
			
			 
			
				01-09-2014, 12:18 AM
			
			
			
		 |  
	| 
		
			
			| Administrator |  | 
					Join Date: May 2013 Location: United States 
						Posts: 1,604
					      |  |  
	| 
 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. |  
	
		
	
	
	| 
			
			 
			
				01-09-2014, 12:26 AM
			
			
			
		 |  
	| 
		
			|  | Developer |  | 
					Join Date: Apr 2012 Location: North Carolina 
						Posts: 2,815
					      |  |  
	| 
 Roger that, just wanna make sure that I can mimic your conditions  
				__________________Uleat of Bertoxxulous
 
 Compilin' Dirty
 |  
	
		
	
	
 
  |  |  |  |  
	| 
			
			 
			
				01-10-2014, 01:20 PM
			
			
			
		 |  
	| 
		
			
			| Administrator |  | 
					Join Date: May 2013 Location: United States 
						Posts: 1,604
					      |  |  
	| 
				  
 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
			
			
			
			
				  |  
 
  |  |  |  |  
	
		
	
	
	| 
			
			 
			
				01-10-2014, 02:48 PM
			
			
			
		 |  
	| 
		
			|  | Developer |  | 
					Join Date: Apr 2012 Location: North Carolina 
						Posts: 2,815
					      |  |  
	| 
 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
 |  
	
		
	
	
 
  |  |  |  |  
	| 
			
			 
			
				01-11-2014, 05:51 AM
			
			
			
		 |  
	| 
		
			
			| Administrator |  | 
					Join Date: May 2013 Location: United States 
						Posts: 1,604
					      |  |  
	| 
				  
 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.
 
	I have fixed my issue, thanks for the help everyone.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
			
			
			
			
				  |  
 
  |  |  |  |  
	
		
	
	
	| 
			
			 
			
				01-11-2014, 11:50 AM
			
			
			
		 |  
	| 
		
			|  | Developer |  | 
					Join Date: Apr 2012 Location: North Carolina 
						Posts: 2,815
					      |  |  
	| 
 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
 |  
	
		
	
	
	| 
			
			 
			
				01-11-2014, 06:35 PM
			
			
			
		 |  
	| 
		
			
			| Administrator |  | 
					Join Date: May 2013 Location: United States 
						Posts: 1,604
					      |  |  
	| 
 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. |  
	
		
	
	
	
	
	| 
	|  Posting Rules |  
	| 
		
		You may not post new threads You may not post replies You may not post attachments You may not edit your posts 
 HTML code is Off 
 |  |  |  All times are GMT -4. The time now is 06:24 AM.
 
 |  |  
    |  |  |  |  
    |  |  |  |  
     |  |  |  |  
 |  |