View previous topic :: View next topic |
Author |
Message |
Lazarus Magni
Joined: 15 Jun 2011 Posts: 30
|
Posted: Tue Jun 28, 2011 2:39 Post subject: Is there any way to get the nwnx server to restart in game? |
|
|
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 |
|
|
Skywing
Joined: 03 Jan 2008 Posts: 321
|
Posted: Tue Jun 28, 2011 9:14 Post subject: |
|
|
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 |
|
|
Lazarus Magni
Joined: 15 Jun 2011 Posts: 30
|
Posted: Wed Jun 29, 2011 1:03 Post subject: |
|
|
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 |
|
|
Lokey
Joined: 02 Jan 2005 Posts: 158
|
Posted: Wed Jun 29, 2011 1:38 Post subject: |
|
|
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
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 |
|
|
Paul R
Joined: 17 Apr 2009 Posts: 42
|
Posted: Wed Jun 29, 2011 13:21 Post subject: Re: Is there any way to get the nwnx server to restart in ga |
|
|
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 |
|
|
PlasmaJohn
Joined: 04 Mar 2005 Posts: 70 Location: The Garage
|
Posted: Wed Jun 29, 2011 19:54 Post subject: |
|
|
Calling exit() worked under both Linux and Windows. Not sure why people went and made it all complicated. |
|
Back to top |
|
|
Lazarus Magni
Joined: 15 Jun 2011 Posts: 30
|
Posted: Fri Jul 01, 2011 23:14 Post subject: |
|
|
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 |
|
|
Lazarus Magni
Joined: 15 Jun 2011 Posts: 30
|
|
Back to top |
|
|
Lokey
Joined: 02 Jan 2005 Posts: 158
|
Posted: Tue Jul 12, 2011 1:41 Post subject: |
|
|
Seems that it has the problems I listed, since they say it's possible to lose data. _________________ Neversummer PW NWNx powered mayhem |
|
Back to top |
|
|
Lazarus Magni
Joined: 15 Jun 2011 Posts: 30
|
Posted: Tue Jul 12, 2011 3:46 Post subject: |
|
|
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 |
|
|
Lokey
Joined: 02 Jan 2005 Posts: 158
|
Posted: Tue Jul 12, 2011 5:03 Post subject: |
|
|
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 |
|
Back to top |
|
|
|