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-12-2009, 03:18 AM
Deimos
Hill Giant
 
Join Date: Jun 2004
Posts: 135
Default NPC SpawnGroup ID Bug

For dynamic zones (not static), whenever I enter the zone, the NPCs lose their spawngroup IDs... it's really annoying since I work off of those : p. They get them back with a #repop, but eh..

Right now, I'm planning to just track the amount of players in every zone. When it hits 0 and the first player comes back in, I do a repop of the zone so that the NPCs get their proper spawngroup IDs.

Is there any way to fix this? Or should I just keep doing what I'm doing :\.

Yes, static zones work fine. Any dynamic zones, whether they hold their state or not, do not work fine -.-.

Thank you in advance ^_^.
__________________
//The Path of Chaos Server-
//Fate Industries
//Lots of stuff O-o
Reply With Quote
  #2  
Old 01-12-2009, 06:18 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

What do you mean that they lose their spawngroup IDs? I have no problems at all with running Dynamic zones on my server. The only difference I see from running static is that if a zone goes down because no players are in it, NPC corpses or any quest spawned NPCs from when the zone was last up won't be up anymore. Also, loot changes because it is the same as doing a repop of the zone when the zone restarts from a player zoning into it and causing the zone to boot up.

There definitely shouldn't be any reason to have to do a repop to fix anything on dynamic zones. Can you explain your issue in more detail?
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 01-13-2009, 01:16 AM
Deimos
Hill Giant
 
Join Date: Jun 2004
Posts: 135
Default

Try just having a zone as a dynamic zone with hold state equal to true in the database. Try adding a spawn to the db and what not. Do #npcstats and look at the SpawnGroupID, not the NPC ID. After that, leave the zone. When you go back in, do #npcstats on them again. There SpawnGroupID (if they are the only one in the zone) will be at 0. Doing a #repop will set their SpawnGroupID to the proper SpawnGroupID in the db.

However, now it looks like I'm running into more issues because spawning another NPC with an NPC requires the NPC ID and not the SpawnGroup ID. The SpawnGroupID is the only ID you can access in PERL via a var. Also, when spawning a new NPC, in that NPC under the sub EVENT_SPAWN, there is no way for them to retrieve the spawngroup ID or the NPC ID (meaning there is no way to tell what the NPC is). You can retrieve names, but all NPCs on my server have no name (i'm testing out a special design), so I need to be able to either access the NPC ID at all times or the SpawnGroupID at all times (I prefer the NPC ID) because the spawn function and most of the functions that access NPCs require the NPC ID but the only thing u can get via variables with PERL is the SpawnGroupID.

So, right now, there is no way for me to detect what type of NPC an NPC is if it's newly spawned and has no spawn group =/=.

Please add code to retrieve an NPC's ID and not their SpawnGroupID or something ^_^, unless you can tell me another way to do it ;p.
__________________
//The Path of Chaos Server-
//Fate Industries
//Lots of stuff O-o
Reply With Quote
  #4  
Old 01-13-2009, 01:47 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Ahh, so it sounds like your issue is with holdzones, not just dynamic zones in general. I haven't tried messing with hold zones yet, so I don't really know much about it or how well it works.

What perl stuff are you running to get the spawngroup ID? To get the NPC ID, you should be able to run something like this:

$npc->GetNPCTypeID();

But, you may have to get the NPC using another command first. You probably won't be able to run any commands to get the spawnID in the EVENT_SPAWN, because all of that stuff is being built as it spawns, so it won't be able to get it until after the spawning is completed. You should be able to start a timer when it spawns and then get the NPC ID later. But, timers probably can't get NPC too easily to run commands on. Not using NPC names will probably complicate things though :P

What exactly are you trying to do with these spawnIDs and spawngroups?
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #5  
Old 01-13-2009, 01:48 AM
Deimos
Hill Giant
 
Join Date: Jun 2004
Posts: 135
Default

nvm... look at the guide.. GetNPCTypeID() is in the wrong area.. it should be under NPC and it's under Mob. I spent one day trying to figure out what was wrong and that was it : P.

Now I don't have to use spawn group IDs ^^
__________________
//The Path of Chaos Server-
//Fate Industries
//Lots of stuff O-o
Reply With Quote
  #6  
Old 01-13-2009, 01:58 AM
chrsschb's Avatar
chrsschb
Dragon
 
Join Date: Nov 2008
Location: GA
Posts: 905
Default

I had a ton of problems when I was using Hold State. The respawn timers remain regardless of the save state, the only issue is existing corpses disappear and PLAYER corpses remain indefinitely pretty much.
Reply With Quote
  #7  
Old 01-13-2009, 03:41 AM
Deimos
Hill Giant
 
Join Date: Jun 2004
Posts: 135
Default

I guess I'll just use pure static and instance : p
__________________
//The Path of Chaos Server-
//Fate Industries
//Lots of stuff O-o
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 07:49 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3