In our module, we have the time set at 5 minutes per hour. However when playing the module on our server, the time goes much slower, and sometimes it just stops. I recall playing over an hour yesterday, and the time did not change at all. Our players have noticed this as well. I have checked the toolset, and I could find nothing wrong with the module settings.
Is there anything that could cause the module time to stop? Any help would be appreciated.
Thank you.
Module Clock Not Working Correctly
Débuté par
Sadira of Tyr
, août 02 2012 11:29
#1
Posté 02 août 2012 - 11:29
#2
Posté 02 août 2012 - 11:50
I think you need a persistent clock script for your mod.I use this one that was reccommended to me.
http://nwvault.ign.c....Detail&id=2721
http://nwvault.ign.c....Detail&id=2721
#3
Posté 02 août 2012 - 12:46
Thank you, but the link is not working.
#4
Posté 02 août 2012 - 12:56
Well, I got the link to work. Thank you. 
I'm not sure if this will help, but I will try it in the module.
I'm not sure if this will help, but I will try it in the module.
#5
Posté 02 août 2012 - 01:21
Clock stoppage in a module is due to too much going on, that the module resorts the clock resources as unimportant, taking up that resource to keep up with the demand of the server.
Poorly written scripts that eat lots of resources is normally the problem. Scripts that are left running when no players are present in an area, to NPCs AI being set to LOW so they continue to cross ATs or move about if no players are present in an area. Two small examples, of course that chew up resources.
You can get around it by updating the clock in your module's heartbeat, but this is only a short fix for a more serious problem.
FP!
Poorly written scripts that eat lots of resources is normally the problem. Scripts that are left running when no players are present in an area, to NPCs AI being set to LOW so they continue to cross ATs or move about if no players are present in an area. Two small examples, of course that chew up resources.
You can get around it by updating the clock in your module's heartbeat, but this is only a short fix for a more serious problem.
int iHour = GetTimeHour ();
int iMinute = GetTimeMinute ();
int iSecond = GetTimeSecond ();
int iMillisecond = GetTimeMillisecond();
SetTime(iHour, iMinute, iSecond, iMillisecond);
FP!
#6
Posté 02 août 2012 - 04:59
Thank you for helping.
That could be the heartbeat scripts I put in outdoor areas for vampire sun damage. The scripts must be still running when people leave the areas. That would explain the server crashing more often lately.
I'm not great at scripting, but I usually get what I need with the script generator. I put the scripts in the heartbeat section of each of the outdoor areas. They check for subrace vampire, and give damage if needed. Would these scripts keep running after the area is empty? It is about when I added those scripts, that the clock problems started.
That could be the heartbeat scripts I put in outdoor areas for vampire sun damage. The scripts must be still running when people leave the areas. That would explain the server crashing more often lately.
I'm not great at scripting, but I usually get what I need with the script generator. I put the scripts in the heartbeat section of each of the outdoor areas. They check for subrace vampire, and give damage if needed. Would these scripts keep running after the area is empty? It is about when I added those scripts, that the clock problems started.
#7
Posté 02 août 2012 - 05:02
@Fester Pot
Ok so let me try to get tis straight.
1)Doesnt matter module size as long as scripts are working correctly?
2)The link I posted keeps time persistent and advances?http://nwvault.ign.c....Detail&id=2721
3)Your script only advances but is not persitent?
int iHour = GetTimeHour ();
int iMinute = GetTimeMinute ();
int iSecond = GetTimeSecond ();
int iMillisecond = GetTimeMillisecond();
SetTime(iHour, iMinute, iSecond, iMillisecond);
So I need both scripts?
Ok so let me try to get tis straight.
1)Doesnt matter module size as long as scripts are working correctly?
2)The link I posted keeps time persistent and advances?http://nwvault.ign.c....Detail&id=2721
3)Your script only advances but is not persitent?
int iHour = GetTimeHour ();
int iMinute = GetTimeMinute ();
int iSecond = GetTimeSecond ();
int iMillisecond = GetTimeMillisecond();
SetTime(iHour, iMinute, iSecond, iMillisecond);
So I need both scripts?
Modifié par Knight_Shield, 02 août 2012 - 05:04 .
#8
Posté 02 août 2012 - 06:45
A word of warning about using the SetTime(iHour, iMinute, iSecond, iMillisecond) workaround though - if the unmodified, module-wide version of Time Stop is cast at just the right moment when that function is called, the Time Stop spell will last indefinitely, necessitating a module reboot since no one other than DMs will be able to do anything.
Modifié par Thayan, 02 août 2012 - 06:48 .
#9
Posté 02 août 2012 - 08:54
Thanks guys. 
I've disabled the heartbeat scripts for now, to see if the problem persists. If it continues, then I will add the scripts you posted.
I've disabled the heartbeat scripts for now, to see if the problem persists. If it continues, then I will add the scripts you posted.
#10
Posté 10 août 2012 - 10:15
Fester, I have the same issue - time stopping at midnight. I used your script to fix it. Are you saying that the scripts are running in all areas all the time? How do you fix that?
#11
Posté 11 août 2012 - 12:33
If your server is running on Linux, you can use NWNX Fixes to get rid of this bug.
Modifié par virusman, 11 août 2012 - 12:34 .
#12
Posté 11 août 2012 - 03:11
Lean clean scripting is the cure and best solution. Find the cause and clear that up, you will find your game runs better all around for the effort. Size is not really much of an issue. We run a server with 1337+ Areas, feature rich, with no lag, no clock issues, no crashes and generally no restarts needed (DM's events can sometimes leave artifacts that merit a restart, but still, under general play, we've left it run for months without a restart). Linux server too.
Be well. Game on.
GM_ODA
http://playnwn.com
Be well. Game on.
GM_ODA
http://playnwn.com
#13
Posté 12 août 2012 - 11:37
Well, I've been trying to find the cause, but no luck so far. Is there a way to check which scripts are running?
#14
Posté 13 août 2012 - 12:12
Check your messages.
G
G
#15
Posté 15 août 2012 - 11:48
Thank you ehye_khandee, for helping with my script troubles.
Modifié par Sadira of Tyr, 15 août 2012 - 11:49 .
#16
Posté 16 août 2012 - 01:10
*blushes*
You're very welcome. Sometimes it is fun to debug other peoples stuff (cause you run into issues that may be new) - a good mental exercise. With luck, I'll find the resource drain and we'll get your module running like a race engine again. Be patient with me tho, I'm putting about an hour a day on this and it may take a few days, a few tests and a few tries to get to the goal.
Be well. Game on.
GM_ODA
You're very welcome. Sometimes it is fun to debug other peoples stuff (cause you run into issues that may be new) - a good mental exercise. With luck, I'll find the resource drain and we'll get your module running like a race engine again. Be patient with me tho, I'm putting about an hour a day on this and it may take a few days, a few tests and a few tries to get to the goal.
Be well. Game on.
GM_ODA





Retour en haut







