Spawngroups not working

Old bugs stored here for reference.
Locked
User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Spawngroups not working

Post by John Adams » Sat Feb 28, 2009 6:16 pm

A while ago, this used to work (at least I think it did), where you can put 2 spawns, 50/50 chance one or the other will spawn, in a single spawngroup and /repop, and see 2 different NPCs or whatever pop in that location. Recently, in the last few mos anyway, only the first spawn_id in the group is getting popped in the zone, no matter how many others are in your config.

Take the Queen's Colony guards for example. There are probably 2-4 different NPC models in any of the 5 positions, but we usually only see one set - ever. Seems like something simple got twisted a while back, but I am not sure if this is a big effort. It would allow us to test PH's if we could get this back though.

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Re: Spawngroups not working

Post by LethalEncounter » Sat Feb 28, 2009 6:24 pm

Hmm, you sure? You are saying that only the first spawn in a spawn group is ever showing up? I'll take a look at it.

User avatar
Scatman
Retired
Posts: 1688
Joined: Wed Apr 16, 2008 5:44 am
EQ2Emu Server: Scatman's Word
Characters: Scatman
Location: New Jersey

Re: Spawngroups not working

Post by Scatman » Sat Feb 28, 2009 6:54 pm

I can confirm this. It's been like this for a while actually.

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Re: Spawngroups not working

Post by LethalEncounter » Sat Feb 28, 2009 7:20 pm

Hmm, something is wrong with your foreign keys:

DB Query Error #1452: Cannot add or update a child row: a foreign key constraint fails (`eq2_test/zonespawns`, CONSTRAIN
T `FK_zonespawns_zones` FOREIGN KEY (`zone_id`) REFERENCES `zones` (`id`) ON UPDATE CASCADE)
[Error] Error in SaveSpawnEntry query 'insert into zonespawns (zone_id, spawngroup_id, x, y, z, heading, location_id) va
lues(253, 105069, -19.580994, -5.166525, 212.363007, 324.000000, 924281492)': #1452: Cannot add or update a child row: a
foreign key constraint fails (`eq2_test/zonespawns`, CONSTRAINT `FK_zonespawns_zones` FOREIGN KEY (`zone_id`) REFERENCE
S `zones` (`id`) ON UPDATE CASCADE)

I get this when I /spawn create a spawn and then try to /spawn add new Testing

Its saying that zone_id 253 doesn't exist? wtf?

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Spawngroups not working

Post by John Adams » Sat Feb 28, 2009 7:24 pm

Yup, 100% certain. I have 2 NPCs in a spawngroup. 340054 and 340055. As you can see by this grid, one is set to spawn 1% of the time, the other at 99%.
placeholders.jpg
The only one that ever shows up in game is 34054. This is the Tess eq2live DB if you want to have a look. I am also committing the latest Tess DB and Scripts to SVN in a few minutes if you want to source it.
You do not have the required permissions to view the files attached to this post.

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Re: Spawngroups not working

Post by LethalEncounter » Sat Feb 28, 2009 7:41 pm

You see my post? I had to create the disable the foreign key checks just to insert anything into the zonespawns table.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Spawngroups not working

Post by John Adams » Sat Feb 28, 2009 7:52 pm

No I missed that, sorry. Well then, the FKs seem to be working fine! lol... and I have used /spawn create and /spawn add before (had FKs on Tess 6+ mos now) but I'll check into it. I haven't changed them any... and of course zone id 253 has to exist.

Please check real quick that all your spawn/zone related tables are in fact InnoDB. If you are sourcing Tess DB, those are only the tables we're changing, not the entire DB. Not sure if that's just some odd message because it cannot figure something out - cuz we know it should work fine.

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Re: Spawngroups not working

Post by LethalEncounter » Sat Feb 28, 2009 7:56 pm

Yup, that was it :P The zones table was still MyISAM. Thanks :)

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Re: Spawngroups not working

Post by LethalEncounter » Sat Feb 28, 2009 9:19 pm

OK, I found the cause and I'm sharing the blame with you :P Remember how you were bugging me a while back because the counts you were getting when a zone was loading seemed to be way off? Well it turns out they weren't way off at all. The counts were for spawnentries, so when I added the group by to the sql query it limited the query to 1 spawn per spawn group. Hopefully processing all of the spawn entries won't increase the zone bootup time by that much. If it does I'll have to consider ways to reduce it, because it is already higher than I would like.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Spawngroups not working

Post by John Adams » Sat Feb 28, 2009 9:25 pm

Oopsie.

I'll take 1/4 blame, since you should have known better than to listen to me in the first place.

HAHA!
:oops:

Thanks for looking into it!

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Re: Spawngroups not working

Post by LethalEncounter » Sat Feb 28, 2009 9:31 pm

lol, np :P

Locked

Who is online

Users browsing this forum: No registered users and 0 guests