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 
 
Is there any way to get the nwnx server to restart in game?

 
Post new topic   Reply to topic    nwnx.org Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
Lazarus Magni



Joined: 15 Jun 2011
Posts: 30

PostPosted: Tue Jun 28, 2011 2:39    Post subject: Is there any way to get the nwnx server to restart in game? Reply with quote

I have the reset plugin which is working great, however sometimes I want to restart the server more frequently to test an update I uploaded, but unfortunately I dont have access to the nwnx.exe on the server which means every time I want to do this I have to bother my server host. Does anyone have any ideas on how I might be able to do this (without allowing players in general to be able to)?
Back to top
View user's profile Send private message
Skywing



Joined: 03 Jan 2008
Posts: 321

PostPosted: Tue Jun 28, 2011 9:14    Post subject: Reply with quote

If you try writing a script to boot all PCs and then call EndGame(), does that exit the server (and then cause it to get restarted by the NWNX watchdog)?
Back to top
View user's profile Send private message
Lazarus Magni



Joined: 15 Jun 2011
Posts: 30

PostPosted: Wed Jun 29, 2011 1:03    Post subject: Reply with quote

That's a good question, I have no idea. Sadly that is way beyond my capabilites to do, and test. (I am not a scripter unfortunately.)
Back to top
View user's profile Send private message
Lokey



Joined: 02 Jan 2005
Posts: 158

PostPosted: Wed Jun 29, 2011 1:38    Post subject: Reply with quote

80% sure it doesn't Skywing. Leaves the server up with no module loaded iirc... Ok fine. I'll test it. Calling EndGame(""); on module load didn't close the server, log did not generate the still alive . every heartbeat, but that might be a setting I turned off too.

On linux there's the reset plugin (simple kill process), on windows there's an old plugin that forces a crash generally available. There's explanations around about how to do better in specific environments. There's no general able to cleanly kill the server plugin in windows I know of, been bugging Zebranky on difficulty of doing that Smile

There's still things that can be done, but nothing at the drop in and go level I know of. Certainly nothing that requires no scripting, no environment set-up, etc...
Back to top
View user's profile Send private message
Paul R



Joined: 17 Apr 2009
Posts: 42

PostPosted: Wed Jun 29, 2011 13:21    Post subject: Re: Is there any way to get the nwnx server to restart in ga Reply with quote

Lazarus Magni wrote:
however sometimes I want to restart the server more frequently to test an update I uploaded


How much of a restart are you needing to do? You can reload the module after making changes to it using the below script, this can be attached to a DM only item or conversation.

Code:
StartNewModule(GetName(GetModule()));


This type of restart does not reload the actual processes (on Linux at least) so would not load newly updated dll's or release any shared memory. I don't use the Windows version so I don't know if there are any other considerations needed for that environment.
_________________
oops
Back to top
View user's profile Send private message
PlasmaJohn



Joined: 04 Mar 2005
Posts: 70
Location: The Garage

PostPosted: Wed Jun 29, 2011 19:54    Post subject: Reply with quote

Calling exit() worked under both Linux and Windows. Not sure why people went and made it all complicated.
Back to top
View user's profile Send private message
Lazarus Magni



Joined: 15 Jun 2011
Posts: 30

PostPosted: Fri Jul 01, 2011 23:14    Post subject: Reply with quote

Thanks for the replies everyone, sorry about the delay getting back.

Paul, As far as what type of restart, idealy something that would make nwnx take a fresh read of the module, haks, ini's. and releasing the memory cache. DLLs, I am not to worrited about needing to force fresh reads from as I won't be messing with them much more except for perhaps resman, or updates, and those will be far less frequent than the module updates.

Plasma, so you said that worked, could you elaborate on how you did that please?

Thanks guys, Laz
Back to top
View user's profile Send private message
Lazarus Magni



Joined: 15 Jun 2011
Posts: 30

PostPosted: Mon Jul 11, 2011 22:12    Post subject: Reply with quote

I just thought I would share this for anyone else interested in it.
http://www.ad-sl.com/guides/neverwinter-nights/manual-restarts-with-nwnx/manual-server-restart.php
This works when used by a DM, not sure if it will for players. Thank you ad-sl.com!
Back to top
View user's profile Send private message
Lokey



Joined: 02 Jan 2005
Posts: 158

PostPosted: Tue Jul 12, 2011 1:41    Post subject: Reply with quote

Seems that it has the problems I listed, since they say it's possible to lose data.
_________________
Neversummer PW NWNx powered mayhem Wink
Back to top
View user's profile Send private message
Lazarus Magni



Joined: 15 Jun 2011
Posts: 30

PostPosted: Tue Jul 12, 2011 3:46    Post subject: Reply with quote

Hmm, iduno, I have not noticed anything yet. I kinda assumed that refered to perhaps if a character had not saved (or been autosaved.)
Back to top
View user's profile Send private message
Lokey



Joined: 02 Jan 2005
Posts: 158

PostPosted: Tue Jul 12, 2011 5:03    Post subject: Reply with quote

You tell if it closes cleanly by being logged in when it happens and getting a server is shutting down notification instead of timing out.
_________________
Neversummer PW NWNx powered mayhem Wink
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> General Discussion 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