Possible spawn_conditions bug
This is gonna get windy, so bear with me.
Following FNW's old Tutorial for creating spawn_events (found here), I set out on the arduous journey of trying to make day/night shifts spawn *anywhere*. I tried the suggested additions from the tutorial, watched the spawns in East Waste for Korrigain, and even checked the data from Cavedude's database that had some Kithicor shifts in it. None of them yield the expected result. Here's an analysis of over 6 hours of testing... Created 2 new NPCs - DayTest, NightTest. Went into game, #zone load2 so I could test privately, and spawned my 2 new NPCs in their own locations, and added them to the spawn tables. I verified that #repop did in fact re-spawn my 2 new NPCs. Added 2 spawn_conditions using the template from the tutorial, changing the zone to "load2", but leaving the other data alone. Code:
insert into spawn_conditions (zone,id,value,onchange,name) VALUES('load2', 1, 0, 2, 'Test Day Shifts'); Code:
INSERT INTO spawn_events (id,zone,cond_id,name,period,next_minute,next_hour ,next_day,next_month,next_year,enabled,action,argument) While in game, I also ran #mlog setcat SPAWNS on so I could see what's going on. I then started the load2 zone static so it was always running. Watching the log, I saw my day-shift NPC spawn properly. YAY! I thought we were in business. But after 720 EQ minutes, he despawned, and all hell broke loose in my perfect world. This is where the 6 hours comes in, because I was sure I had something setup wrong. What I was seeing was the despawn of NPC-Day went ok, but the spawning of NPC-Night was prohibited by condition 2 (see log below). What happened next was the "next_hour" setting for the disable day and enable night shifts both switched to the same hour as the enable day, disable night. In other words, all 4 events are firing at the same moment (again, see failed log). Logs - Successful spawn of night-shift during zone startup (expected, and happy): Code:
[10.29. - 17:41:27] [SPAWNS__MAIN] Spawn2 378216: Spawn reset, repop in 1200000 ms First despawn (20 mins later), repopped and took out the night-shift as expected as well: Code:
[10.29. - 18:03:17] [SPAWNS__CONDITIONS] Event 1: Executing. Setting condition 1 to 1. 3 things to note: The Opcode error (might not have a thing to do with it): Code:
[10.29. - 18:14:32] Unable to convert EQ opcode 0x6a5f to an Application opcode. Code:
[10.29. - 18:23:18] [SPAWNS__MAIN] Spawn2 378216: Timer has triggered |
(con't)
And finally, the remainder of the log looks something like this: Code:
[10.29. - 18:38:18] Unable to convert EQ opcode 0x6a5f to an Application opcode. Thanks in advance, J |
sorry for reviving an old thread, but just to clarify for anyone else, I believe the problem you're having is that a period of 720 is used. Thats 12 hours. So, basically, your first event would work. However, it would change the next hour for the "day spawn" event to occur in the database occur at the same time as the "night spawn" event. So ultimately, your events are occuring as they should, but since ALL 4 events would then occur at 18:00, they're ultimately cancelling each other out.
Based on that, I believe the simple fix is to just change period for each event to 24 hours or 1440. |
bumping an old one again...anyone got this working yet?
|
I must have missed this in my time of absence. Thanks for the bump, Sakrateri. That theory makes perfect sense. And you're right, the 720 would bump the "next spawn time" into the next cycle. Seems clear to me now. I'll have to try it. I want my night/day shifts working, dammit!
|
All times are GMT -4. The time now is 11:45 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.