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 
 
Reset Server
Goto page 1, 2  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows technical support
View previous topic :: View next topic  
Author Message
Syred



Joined: 10 Oct 2009
Posts: 3

PostPosted: Sat Oct 10, 2009 18:28    Post subject: Reset Server Reply with quote

Hello im pretty new to NWNX2 I have been looking everywhere for some way to reset my server without using a module reloader. I was wanting a shout message that displays how long till the server resets to the player's. Is there anything that NWNX2 can do?

Thank in advance Smile
Back to top
View user's profile Send private message
Terra_777



Joined: 27 Jun 2008
Posts: 216
Location: Sweden

PostPosted: Sat Oct 10, 2009 19:07    Post subject: Reply with quote

My plugin got a terminate process function: http://nwvault.ign.com/View.php?view=Other.Detail&id=139934&id=1428

A script that saves and then restarts the server would look something like this:

Code:
#include "nwnx_sysdata"
void main( ){

    object  oPC     = GetFirstPC( );
    float   fDelay  = 5.0;

    while( GetIsObjectValid( oPC ) ){

        SendMessageToPC( oPC, "<cū  >Server is reseting!" );

        if( !GetIsDM( oPC ) && !GetIsDMPossessed( oPC ) )
            ExportSingleCharacter( oPC );

        DelayCommand( fDelay, BootPC( oPC ) );

        fDelay  += 1.0;
        oPC     = GetNextPC( );
    }

    if( NWNX_GetSystemDataAlive( ) )
        //NWNX is responding so kill the process since nwnx will restart it!
        DelayCommand( fDelay ,NWNX_TerminateProcess( "nwserver" ) );
    else
        //Need to change the module name to the correct one here
        DelayCommand( fDelay ,StartNewModule( "my_module_name" ) );
}

_________________
I dun have any signature, I'm happy anyway.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Syred



Joined: 10 Oct 2009
Posts: 3

PostPosted: Sat Oct 10, 2009 19:24    Post subject: Reply with quote

Thank you, Where would I place that script?

Any way to make it a shout message to the server?

Is there a possibility of it shouting an hour, half hour and 15mins before reset?

I checked out your Nwvault submission but I dont really understand how you use it, sorry to sound so stupid im pretty new to this whole thing. Thanks
Back to top
View user's profile Send private message
Syred



Joined: 10 Oct 2009
Posts: 3

PostPosted: Sun Oct 11, 2009 12:13    Post subject: Reply with quote

Sorry Terra just ment is there any way you could walk me through how I go about doing what you have said?

Thanks again
Back to top
View user's profile Send private message
Fireboar



Joined: 17 Feb 2008
Posts: 323

PostPosted: Sun Oct 11, 2009 13:04    Post subject: Reply with quote

To shout a message in nwscript, simply use:

Code:
AssignCommand(GetModule(), SpeakString("Some message", TALKVOLUME_SHOUT));


Then you can place the terminate process script in a function called by DelayCommand.
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Sun Oct 11, 2009 14:19    Post subject: Re: Reset Server Reply with quote

Syred wrote:
Hello im pretty new to NWNX2 I have been looking everywhere for some way to reset my server without using a module reloader. I was wanting a shout message that displays how long till the server resets to the player's. Is there anything that NWNX2 can do?

Thank in advance Smile
It should be rather "Is there anything that NWNX2 can't do?"

Problem is that all this stuff is at least for experinced scripters, which seems you are not. To make a script request there is quite rare, mostly you got hint how to make it, but not whole script.
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
maddogfargo



Joined: 03 Nov 2009
Posts: 49

PostPosted: Tue Nov 03, 2009 19:37    Post subject: Reply with quote

Terra_777 wrote:
My plugin got a terminate process function: http://nwvault.ign.com/View.php?view=Other.Detail&id=139934&id=1428

A script that saves and then restarts the server would look something like this:

Code:
#include "nwnx_sysdata"
void main( ){

    object  oPC     = GetFirstPC( );
    float   fDelay  = 5.0;

    while( GetIsObjectValid( oPC ) ){

        SendMessageToPC( oPC, "<cū  >Server is reseting!" );

        if( !GetIsDM( oPC ) && !GetIsDMPossessed( oPC ) )
            ExportSingleCharacter( oPC );

        DelayCommand( fDelay, BootPC( oPC ) );

        fDelay  += 1.0;
        oPC     = GetNextPC( );
    }

    if( NWNX_GetSystemDataAlive( ) )
        //NWNX is responding so kill the process since nwnx will restart it!
        DelayCommand( fDelay ,NWNX_TerminateProcess( "nwserver" ) );
    else
        //Need to change the module name to the correct one here
        DelayCommand( fDelay ,StartNewModule( "my_module_name" ) );
}


Thanks for the link Terra. Cool

I have a question though. Does anyone know if there are plans for 64bit support? The reset plugin I'm currently using does nothing under 64bit windows. Wondering if anyone has this planned? I could try it myself. It's been a while, but I catch on fast.

It would be better/faster for someone with more knowledge than I to do it. But...if no one else will then I guess I'm going to be doing a lot of reading over the next few weeks... Laughing
_________________
* illegible scribble *
Back to top
View user's profile Send private message
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Tue Nov 03, 2009 20:01    Post subject: Reply with quote

Sorry, no plans for it at the moment. I use 32-bit VMs when necessary.
_________________
Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/

<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.

<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for?
Back to top
View user's profile Send private message Visit poster's website
maddogfargo



Joined: 03 Nov 2009
Posts: 49

PostPosted: Tue Nov 03, 2009 23:13    Post subject: Reply with quote

Zebranky wrote:
Sorry, no plans for it at the moment. I use 32-bit VMs when necessary.


Could you describe your VM host/guest setup?

I have already tried running VMs with XenServer Host / WinXP Pro SP3 Guest but NWN crashes like a concrete airplane. I can't get the OC, HotU or Rhun to run more than a few hours. However, the EXACT same setups run perfectly on native 32bit WinXP Pro SP3 machine.

Tried with dual and single vCPUs with no difference in stability.

For reasons I'm sure you already know being able to run this on a VM would be an ideal solution. But so far guest stability has been a major issue. If I could get the stability issue resolved then virtualization is the way I'd want to go, making the 32bit -vs- 64bit plugins a moot point.

What VM setup worked for you?
_________________
* illegible scribble *


Last edited by maddogfargo on Wed Nov 04, 2009 4:19; edited 1 time in total
Back to top
View user's profile Send private message
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Wed Nov 04, 2009 0:09    Post subject: Reply with quote

Interesting. I use VMWare with XP and Ubuntu guests on a 64-bit XP host. I've been meaning to try VirtualBox, but if it ain't broke...
_________________
Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/

<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.

<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for?
Back to top
View user's profile Send private message Visit poster's website
Fireboar



Joined: 17 Feb 2008
Posts: 323

PostPosted: Wed Nov 04, 2009 1:01    Post subject: Reply with quote

Zebranky wrote:
Interesting. I use VMWare with XP and Ubuntu guests on a 64-bit XP host. I've been meaning to try VirtualBox, but if it ain't broke...


... fix it 'till it is!
Back to top
View user's profile Send private message
maddogfargo



Joined: 03 Nov 2009
Posts: 49

PostPosted: Wed Nov 04, 2009 4:16    Post subject: Reply with quote

Fireboar wrote:
Zebranky wrote:
Interesting. I use VMWare with XP and Ubuntu guests on a 64-bit XP host. I've been meaning to try VirtualBox, but if it ain't broke...


... fix it 'till it is!


LMAO @ 'fix it til it is'! Laughing

And I didn't expect that you'd be using an XP64 host. I never thought of that...guess I'm stuck in 'XenServer' mode. But I suppose I can give it a try.

I need to be able to run multiple VM's at the same time. I'm guessing you're using VMware Player??? Could you tell me what specific version you're using, and whether it supports AMD-V. I need to be able to run at least 2 concurrent VM's on the same physical box, but I would really like to have the option to run 4.

Oh and I 'think' I found out why NWN was crashing. I started up plain vanilla NWServer to host the OC, HotU and a custom gear shop to test. So far, no crashing. So it may be something about NWNx or one of the plugins I'm using that doesn't like the virtualized environment.

We'll see...

PS - I hear Fireboar is the go-to person for getting NWNx working on Linux... Wink
_________________
* illegible scribble *
Back to top
View user's profile Send private message
maddogfargo



Joined: 03 Nov 2009
Posts: 49

PostPosted: Wed Nov 04, 2009 5:59    Post subject: Reply with quote

Bummer...after a few hours entire VM crashed. So back to square 1.

Looking forward to hearing some specifics about which VMware you are using. If it works for you I'd like to try duplicating your setup to see if it will work for me. If the server exe, NWNx and plugins work then I'm there.
_________________
* illegible scribble *
Back to top
View user's profile Send private message
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Wed Nov 04, 2009 18:15    Post subject: Reply with quote

VMWare Workstation 6.5.1, which apparently does support AMD-V, though I just leave it on "Automatic" (which I'd assume uses VT-x in my case). I have been known to run four VMs at once (though the host starts hating at that point -- there's no faster way to fill up 8 GB RAM).
_________________
Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/

<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.

<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for?
Back to top
View user's profile Send private message Visit poster's website
maddogfargo



Joined: 03 Nov 2009
Posts: 49

PostPosted: Thu Nov 05, 2009 1:03    Post subject: Reply with quote

YUP! Laughing

Oh and I 'think' I figured out the stability issue. After the host crashed, HARD, which 'never' happened in testing, I started to question the upgrades I did going from test -> production host. (CPU, RAM and Disk)

When doing diagnostics Memtest would NOT run on it past 5%...so I started wondering about the RAM.

When going from test server to production I upgraded the RAM from 4GB of OCZ DDR2 1066 to 8GB of Corsair DDR2 1066.

Even after setting everything per the manufacturer's specs, it appears the RAM will NOT run stably at 1066. 1-2 hours TOPS. When I drop it down to 800 the crashes seem to have stopped. Currently have 7 NWN servers with NWNx running on 2 VM's at 50% CPU usage. Stable for a few hours now, which was not the case earlier.

I will be leaving it on overnight to test. If it is still stable in the morning I will be contacting NewEgg for an RMA and swapping this kit out for an 8GB OCZ kit, since I know they have been solid in this machine before.

Keep yer fingers crossed for me.
_________________
* illegible scribble *
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows technical support All times are GMT + 2 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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