Ok, I got this working and I wanted to post a walk through for folks that might be running into problems getting day/night to work correctly through the database. If working it is far less intensive (from what I've been told) on server resources than using Angelox's (awesome!) perl script.
For the majority of this, I'm going to assume you ran the SQL from the Wiki for creating events.
^First, lets start with the Spawn_Event Table.
^According to the dev posts regarding Pyzjn an EQ night is 10 hours long if I remember reading correctly. A couple things to remember, the zone must be INACTIVE before you can make changes to the spawn_events table. So #zoneshutdown zoneshortname. This will ensure that the table is static.
^First step, the period value. The period value determines how often the events will trigger. Each event needs to trigger 1 time in a 24 hour EQ day. 1 night spawn, 1 night despawn, 1 day spawn, 1 day despawn. Set the period to 1440.
^Next, set the "min" or minute value to 1 for spawns, and 0 for despawns. This will ensure that your mobs go away and respawn 3 seconds later, more closely mimic'ing the change on live.
^Next for the "hour" value, set your DAY SPAWN to 7 and your NIGHT DESPAWN to 7. This will have your day mobs pop in at 701am (When combined with the "min" value and your night mobs to depop at 700am. For your NIGHT SPAWN set that value to 21, and your DAY DESPAWN to 21. This will set your day mobs to go away at 2100p and your night mobs to come in at 2101p.
^Next, ensure your ACTION field is 0 or "set" if using the PEQ editor.
^Next, ensure your DAY/NIGHT SPAWN "Argument" fields are set to 1, and your DAY/NIGHT SPAWN "argument" fields are set to 0.
Now, you are done with the spawn event table.
^Move onto your spawn2 table: Mobs you want to be up all the time, set their "Condition" value to 0. Depending on how you have your SPAWN_EVENTS set depends on the value that goes into condition. Generally either a 1 or a 2. In this case: Night mobs will be a 2 and day mobs will be a 1 in the "Condition" field. Set the "Condition" field on all the mobs you want up during the day to a 1 and the night to a 2. Regardless of day/night status, the "Cond_value" field should be set to 1.
^Next, ensure that all the mobs in question have a 1 in their "enabled" field.
And that should have you started on the right path. This probably should get moved out of quests, I've no freakin idea why I posted it here in the first place. Chalk it up to ring rust please and CD if you could move it to the right forum that would be cool. To test things you can #time ## ## and check your spawn shifts, keep in mind, you'll have to do a #time 23 59 after you spawn your night mobs to transition to the next day to respawn your day mobs....simply changing the time back to an earlier value WON'T trigger the change. #time 6 55, #time 20 55 are the 2 that I use, only a 15 second wait for the shift. After running #time 20 55, run #time 23 59 then you can run #6 55. To "reboot" the zone you'll need to restart your server, or to run it as a dynamic for testing just #zone inside. There cannot be active characters in the zone when editing the database.
Keep in mind, you can use this to control Fables and only have them spawn for a few days each month or a specified day of the week. This requires tweaking that I'm not experienced with as of yet, but will work. It can also be used for GM events like Bloody Kithicor, the Plague'd Karanas, etc.
Zones that I'm certain need day night compatibility are Lake Rathetear (gnolls/undead), Lesser Faydark(Rancorous Ghasts), Kithicor(self explanatory), West Commons(werewolves), West Karana(werewolves), & South Karana(Undead Cyclops).
I'll be glad to help if you decide to tinker with this, just post =).
|