A truly static zone
It is looking like the NPC's in a zone does not spawn until you actually enter the zone correct? Even if you set the zone to shutdowndelay zero and make the zone static instead of dynamic....ie zone butcher
I want to be able to have an NPC that checks static and spawns something even if no one is not in the zone for hours, days even. But if the zone eventually goes idle, I am guessing the NPC's despawn and those scripts no longer run? |
If I remember right, the npcs are spawned, but "asleep". So no movement, quests, etc.
|
Arrggggg....
Okay, well I will make due. I definitely did not know this and since I had the zones so active they never went to sleep. Well I can do what I want with scripting but it will be more complicated. |
Anyone know the area of the source that shuts the zone down when a player leaves? I would only do this for a few zones though.
|
Set those zones as dynamic zones with a short "keep alive" time.
|
Quote:
I need a way to keep the NPC's moving even when there are no characters in the zone, but for less than 5 zones. If I set the zones to something like 30000 instead of the default that would make the zones go to sleep in 30 seconds correct? |
You asked to shut down a zone when a player leaves. The shutdown delay will shut down the zone, not put it to sleep except for however long the delay is. The static zone (or "still alive" zone) is what will go to sleep. I think you are right that it is in milliseconds.
As for the timers still running, I will have to test that. I was pretty sure those were all suspended as well. The spawn timers should be the only things that keep "running" although that isn't exactly how spawn timers work in the same sense. What you are wanting to do has been discussed, tried, and failed several times (most specifically when trying to get the boats to run). |
Quote:
Yes, the timers do run when the zone is empty. I have a timer on a static zone that no one has been in for 10 hours now, and the timer is still incrementing a global ever 10 seconds. So can you elaborate just a small bit on what made it fail? I would rather not hit the same brick wall they did. I have all of my boats running very well except for the Maiden's Voyage and the only issue with it is specific timing issues that I can fix, but it would be a hell of a lot easier if the zones were completely static. |
Interesting to note that timers are still running. The reason we have the zones go into sleep mode is to save on processor/memory. So, it would seem that we aren't completely suspended.
You can read the discussions on this board for a more elaborate discussion on the boats, but it mainly boiled down to the NPCs not moving/scripts not running. |
|
Quote:
|
Quote:
https://github.com/EQEmu/Server/blob...features.h#L41 Code:
#define IDLE_WHEN_EMPTY Or we could really hack at it: https://github.com/EQEmu/Server/blob...ntity.cpp#L489 Code:
if (numclients < 0) |
Quote:
You could do the same by making the zone static, by an entry in the database launcher table. The NPCs still go to sleep when idle, so that does nothing. |
Quote:
Got that. Though, seems "uncomment this" should be "comment this". Or... |
Yes, the 'uncomment this' should be 'comment this'.
|
I wanted to reply after running this a while now, I have had zero issues with fully static zones.
|
Bump, is this something we could turn into a server rule?
|
It kind of really already is, kind of. It would be easy to code it for a real rule though, right now mine is just editing the rules.h file.
I thought for a while I might had been having an issue, it ended up being something else, a broken task causing issues and making a zone run haywire. Overall though I am very satisfied with having some fully static zones, currently running around 10 totally static. Before the next server goes live I will be adding more ram, bumping up to 96gb and adding more in stages as I test them. |
Holy 1.21 jiggabytes!
|
Something like an optional third parameter in the zone command line to set the zone active (always running) or passive (default if omitted - meaning zone idles when empty) would be nice and shouldn't be too hard to implement. I was thinking of doing it on our server.
You wouldn't want this as a rule which would be global for all static zones, you would want to pick only the ones that needed to stay active, right? |
Yes, the zone file would be perfect.
|
Has this been implemented?
Celestial |
Not sure about on the current source, but I have static zones on Legacy of FrostStone.
|
I was in the process of deciding the benefits of static to dynamic. I am limited on memory, but I though most static zones even at idle still allowed timers, such as spawn timers to run. Trying to determine which static zones to setup.
Celestial |
I think this is written in one of my post, but I will elaborate with what I found. I found through experimentation that every NPC in the zone quits moving in a typical zone, set static or not, when the zone goes idle. The timers I remember do still run, but the NPC's stop. So for my setup, this did not work. So my issue with boats were that the boats would quit moving when the last person left the zone, very problematic for my server. That change listed will basically keep the zone running no matter what. Yes, higher CPU usage. In fact Firiona Vie on my server uses a ton of CPU all the time, probably 7% on just that one zone. I think it has to do with the constant pathing in the zone. Other zones are around 1~2%. But all of the static zones use more since they do not go idle.
|
Roger that, thank you for sharing!
Celestial |
All times are GMT -4. The time now is 07:30 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.