logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Time Module and the Game Clock

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Scripts and Modules
View previous topic :: View next topic  
Author Message
Moonunit921



Joined: 10 Sep 2005
Posts: 11
Location: The Yawning Portal Tavern, Waterdeep

PostPosted: Sun Jun 11, 2006 17:09    Post subject: Time Module and the Game Clock Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Acrodania



Joined: 02 Jan 2005
Posts: 208

PostPosted: Sun Jun 11, 2006 18:42    Post subject: Reply with quote

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
View user's profile Send private message
Moonunit921



Joined: 10 Sep 2005
Posts: 11
Location: The Yawning Portal Tavern, Waterdeep

PostPosted: Tue Jun 13, 2006 2:35    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
FunkySwerve



Joined: 02 Jun 2005
Posts: 377

PostPosted: Tue Jun 13, 2006 9:00    Post subject: Reply with quote

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
View user's profile Send private message
Moonunit921



Joined: 10 Sep 2005
Posts: 11
Location: The Yawning Portal Tavern, Waterdeep

PostPosted: Tue Jun 13, 2006 11:53    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
dougnoel



Joined: 21 Mar 2005
Posts: 27
Location: VA

PostPosted: Tue Jun 13, 2006 15:32    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Moonunit921



Joined: 10 Sep 2005
Posts: 11
Location: The Yawning Portal Tavern, Waterdeep

PostPosted: Tue Jun 13, 2006 21:38    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Acrodania



Joined: 02 Jan 2005
Posts: 208

PostPosted: Tue Jun 13, 2006 22:16    Post subject: Reply with quote

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 Rolling Eyes ), 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
View user's profile Send private message
Moonunit921



Joined: 10 Sep 2005
Posts: 11
Location: The Yawning Portal Tavern, Waterdeep

PostPosted: Wed Jun 14, 2006 3:59    Post subject: Reply with quote

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 Razz

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
View user's profile Send private message Visit poster's website MSN Messenger
odenien



Joined: 26 Sep 2005
Posts: 37

PostPosted: Wed Jun 14, 2006 14:16    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
Moonunit921



Joined: 10 Sep 2005
Posts: 11
Location: The Yawning Portal Tavern, Waterdeep

PostPosted: Wed Jun 14, 2006 21:06    Post subject: Reply with quote

Nope, Windows XP, German version (which is really wierd when viewing the desktop through a client, and I don't speak German Razz)
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Scripts and Modules All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group