Quote:
Originally Posted by Squiffy
When I #npcspawn create and add, I end up with a mess of duplicate entries in my spawn DB, half the time they don't respawn, it's impossible to ever update any of their data (location, etc)
I even went in and manually deleted all the duplicates, rebooted, tested the spawns were working, then tried to update x,y,z coords in EQAdmin, only to have it reset to the old values the minute I hit commit.
Really don't think #npcspawn create/add works very well :\
|
I'm not sure about the EQAdmin program, since I'm doing everything under linux, but I can attest to the fact that the npcspawn commands are buggy at best. This isnt suprising given Edgar's response to use of the #npcspawn delete command here:
http://www.eqemulator.net/forums/viewtopic.php?t=11149
That said, I've been looking into the code, and it seems that most of the documentation of how to use the npcspawn command in prior posts on this board is wrong.
I see alot of people using #spawn, followed by #npcspawn create, and #npcspawn add. Basically the #npcspawn create does 4 things:
1) Adds the newly #spawned mob to the npc_types table
2) Inserts a new spawngroupid/name into the spawngroup table
3) Inserts a new spawn event into the spawn2 table
4) Inserts the corresponding spawngroupid/npcid into the spawnentry table.
The #npcspawn add command does only 3 things: Precisely #s 2, 3, and 4 as listed above. That is, it adds all the spawn info without adding the mob as a new npc_type.
With this in mind, one would think that it would be sufficient to use #spawn followed by #npcspawn create to add a new mob to the DB, or use #dbspawn followed by #npcspawn add to simply make a new spawn of a previously existing npc_type.
The fact is, that the latter seems to work just fine (#dbspawn followed my #npcspawn add) while the former doesnt work completely. When #npcspawn create adds a new record to the spawnentry table, it messes up the npc_type ID, and hence never actually creates a good spawn record. But it does add the npc_type just fine. When you follow this up with #npcspawn add, the npc_type has already been created, so the add command just adds new, good spawn info. So you end up with duplicate spawn info, one working and one non-working.
Of course I only started playing with the EQEmu code, and setting up my server last sunday. More experienced folks here may have better insight on this.
Matt