Page 1 of 1

Spawngroups not working

Posted: Sat Feb 28, 2009 6:16 pm
by John Adams
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.

Re: Spawngroups not working

Posted: Sat Feb 28, 2009 6:24 pm
by LethalEncounter
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.

Re: Spawngroups not working

Posted: Sat Feb 28, 2009 6:54 pm
by Scatman
I can confirm this. It's been like this for a while actually.

Re: Spawngroups not working

Posted: Sat Feb 28, 2009 7:20 pm
by LethalEncounter
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?

Re: Spawngroups not working

Posted: Sat Feb 28, 2009 7:24 pm
by John Adams
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.

Re: Spawngroups not working

Posted: Sat Feb 28, 2009 7:41 pm
by LethalEncounter
You see my post? I had to create the disable the foreign key checks just to insert anything into the zonespawns table.

Re: Spawngroups not working

Posted: Sat Feb 28, 2009 7:52 pm
by John Adams
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.

Re: Spawngroups not working

Posted: Sat Feb 28, 2009 7:56 pm
by LethalEncounter
Yup, that was it :P The zones table was still MyISAM. Thanks :)

Re: Spawngroups not working

Posted: Sat Feb 28, 2009 9:19 pm
by LethalEncounter
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.

Re: Spawngroups not working

Posted: Sat Feb 28, 2009 9:25 pm
by John Adams
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!

Re: Spawngroups not working

Posted: Sat Feb 28, 2009 9:31 pm
by LethalEncounter
lol, np :P