View previous topic :: View next topic |
Author |
Message |
Moonunit921
Joined: 10 Sep 2005 Posts: 11 Location: The Yawning Portal Tavern, Waterdeep
|
Posted: Sun Jun 11, 2006 17:09 Post subject: Time Module and the Game Clock |
|
|
I'm having a problem with the game clock not advancing, or advancing at a staggered rate. I'd like to use the time module to advance the game clock if possible - can this be done, and if so, how? Any suggestions? |
|
Back to top |
|
|
Acrodania
Joined: 02 Jan 2005 Posts: 208
|
Posted: Sun Jun 11, 2006 18:42 Post subject: |
|
|
There are a couple of threads on the NWN forums on fixing this issue. Basically what the game engine is telling you is that you are overloading the heartbeat system....
Do a search on the forums, it will be more effective than using a plugin (timin-wise) and you already have enough load on your script engine if this is happening. The fix is simple to implement and is only a few lines of code that equal no script load hardly at all.
Luck!! |
|
Back to top |
|
|
Moonunit921
Joined: 10 Sep 2005 Posts: 11 Location: The Yawning Portal Tavern, Waterdeep
|
Posted: Tue Jun 13, 2006 2:35 Post subject: |
|
|
Heh, we've already gone through the Bioforums, and tried that fix. We figure it's something with the host (it's not the mod for sure) and thought that forcing the game clock to advance might be a solution. |
|
Back to top |
|
|
FunkySwerve
Joined: 02 Jun 2005 Posts: 377
|
Posted: Tue Jun 13, 2006 9:00 Post subject: |
|
|
It's not the host, it's severe module overload. The only real long-term solution is to clean up your mod scripts. It's not fun, or easy, but you will definitely learn from it. Forcing the update just places more load on an already overloaded mod.
Funky |
|
Back to top |
|
|
Moonunit921
Joined: 10 Sep 2005 Posts: 11 Location: The Yawning Portal Tavern, Waterdeep
|
Posted: Tue Jun 13, 2006 11:53 Post subject: |
|
|
What had me thinking it wasn't the mod is that it works fine on two other servers. Maybe the machine in question can't handle the overhead, thus causing the clock to be low-priority-skipped? |
|
Back to top |
|
|
dougnoel
Joined: 21 Mar 2005 Posts: 27 Location: VA
|
Posted: Tue Jun 13, 2006 15:32 Post subject: |
|
|
Moonunit921 wrote: | What had me thinking it wasn't the mod is that it works fine on two other servers. Maybe the machine in question can't handle the overhead, thus causing the clock to be low-priority-skipped? |
That could be the case. What are the specs of the three machines?
Still, hearbeat scripts are an exponential problem. the more players (and NPCs) on the server, the worse it will get. On avlis, heartbeat scripts kill our server. we don't have any. Instead, we create a function for whatever effect we want to invoke and then call it with a delay command. Then that function checks to see if it needs to be run again and calls itself again with another delay. |
|
Back to top |
|
|
Moonunit921
Joined: 10 Sep 2005 Posts: 11 Location: The Yawning Portal Tavern, Waterdeep
|
Posted: Tue Jun 13, 2006 21:38 Post subject: |
|
|
PRC 2.2c - HB scripts built in. Changing to 3.0d too, and it only gets worse I'm told. I have a pseudoHB saveloc using NWNX, NESS planned for impelentation, and that's it. Other than that, there's no HB in the mod.
Two systems are close - 1.8GHz P4 512mb RAM. The other is my development machine which is a 2.4Ghz Athlon w/1.25 Gb RAM. It's the two similar systems that's stumping me. Could be the amount of players on, I guess. |
|
Back to top |
|
|
Acrodania
Joined: 02 Jan 2005 Posts: 208
|
Posted: Tue Jun 13, 2006 22:16 Post subject: |
|
|
Moonunit921 wrote: | PRC 2.2c - HB scripts built in. Changing to 3.0d too, and it only gets worse I'm told. I have a pseudoHB saveloc using NWNX, NESS planned for impelentation, and that's it. Other than that, there's no HB in the mod.
Two systems are close - 1.8GHz P4 512mb RAM. The other is my development machine which is a 2.4Ghz Athlon w/1.25 Gb RAM. It's the two similar systems that's stumping me. Could be the amount of players on, I guess. |
Our main systems are close, 1.8 P4 512 Ram under Win2K. Running Cage Haks (bloated haks ), Sigil Tilesets, RTC Tilesets, PrC 3.0d, several heartbeat-related systems in addition. Module is pretty heavy and strain the server with 12 people on. The fixes on Bioware's boards corrected the issue for me. Thankfully we will be stripping some of it out and redoing the module for the next round of DM'd game....
What are your system resources like running empty? Are you using the Profiler to watch your script useage? |
|
Back to top |
|
|
Moonunit921
Joined: 10 Sep 2005 Posts: 11 Location: The Yawning Portal Tavern, Waterdeep
|
Posted: Wed Jun 14, 2006 3:59 Post subject: |
|
|
System resources, CPU 1-2% tops (empty), spikes up to about 20% every couple of minutes for a sec or two. Profiler gets ruthlessly torn apart by FluffyAmoeba on a regular basis to track down any lag culprits. There are some things I can do to reduce overhead, like static creatures removed and stuff, and I'm hoping that NESS will fix that.
Drifting slightly OT
I have the line
SetTime(GetTimeHour(), GetTimeMinute(), GetTimeSecond(), GetTimeMillisecond());
in the heartbeat script to force the game clock to work, but it still doesn't go on the host system. And I checked, all that's on the HB right now is PRC stuff - forest gnome hiding in forests check, daylight adaption check, and crafting progress check. Standard stuff. |
|
Back to top |
|
|
odenien
Joined: 26 Sep 2005 Posts: 37
|
Posted: Wed Jun 14, 2006 14:16 Post subject: |
|
|
Is the host machine a linux machine? There is a major problem keeping up with the clock on that platform. We use locals on the mod in the heartbeat script to store the time, with a check to verify it has not started malfunctioning. |
|
Back to top |
|
|
Moonunit921
Joined: 10 Sep 2005 Posts: 11 Location: The Yawning Portal Tavern, Waterdeep
|
Posted: Wed Jun 14, 2006 21:06 Post subject: |
|
|
Nope, Windows XP, German version (which is really wierd when viewing the desktop through a client, and I don't speak German ) |
|
Back to top |
|
|
|