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 
 
Howto run 2 instances of NWNX2 / NWNX4
Goto page 1, 2  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
Serryth



Joined: 16 Jun 2006
Posts: 11

PostPosted: Tue Nov 13, 2007 21:03    Post subject: Howto run 2 instances of NWNX2 / NWNX4 Reply with quote

I need to run two separate mods on one server (cheap, I know). I can run two copies of NWN servers, and it seemed that the server will automatically name the ports incrementally, i.e. game 1 running on :5121, and game 2 running on :5122, and so on.

In NWNX.ini, there is the [NWNX] section which specified the port to listen to and name of the mod. How do I tell NWNX to monitor two ports/games? Can this be done?

Right now NWNX2 only do 1 (5121 on my machine), so if 5121 crashed, NWNX will restart the game. What about 5122?

Thanks.
Back to top
View user's profile Send private message
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Wed Nov 14, 2007 6:29    Post subject: Reply with quote

You cannot have one instance of NWNX monitor/hook two servers. However, there is no problem running two copies of NWNX, one associated with each server.

A problem does come up if you're using the Vaultster plugin with multiple separate servervaults, as the latest released version doesn't allow you to configure it to listen and send on separate ports. I modified it to allow this; let me know if you need that functionality.
_________________
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
Serryth



Joined: 16 Jun 2006
Posts: 11

PostPosted: Wed Nov 14, 2007 6:54    Post subject: Reply with quote

But how do you run two NWNX with one NWNX.ini? The first NWNX picks up the 5121 (because it was "defined" in the NNWX.ini), but the second copy of NWNX will also try to listen to 5121 (from the same NWNX.ini and fail)... in fact the NWN Server now starts with xxx.xxx.xxx.xxx:-1.

If you run two copies of NWN Servers with one instance of NWNX, the server will do the 5121, 5122 trick. Two copies of NWN Servers with two instances of NWNX, they do 5121, and -1. (Never seen that one coming!)
Back to top
View user's profile Send private message
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Sun Nov 18, 2007 1:12    Post subject: Reply with quote

You can't do that either. Run them from separate folders containing separate copies of NWN and NWNX.

(You MIGHT be able to do it, but NWN creates several temp files in its folder, so trying it is likely to cause problems. You'd also need to alter the source code of one NWNX copy to look for a different .ini file. Not worth it, IMO.)
_________________
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
Tempest



Joined: 26 Feb 2008
Posts: 32

PostPosted: Thu Mar 20, 2008 18:10    Post subject: Reply with quote

is this really true? I am in the middle of settingmy world up the same way. Please tell me if my thinking is wrong.

I have a quad core machine, running server 2003.

D: drive -> NWN installed with NWNX2, NWNX.ini set to 5121

E: drive -> NWN instance 2 installed with NWNX2, NWNX.ini set to 5122

I was planning on using VAULTSTER to share the vault between both.

Thanks!

"T"
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Disco



Joined: 06 Dec 2006
Posts: 152

PostPosted: Fri Mar 21, 2008 16:02    Post subject: Reply with quote

You don't need Vaultster at all. Check nwn.ini and set your paths in installation 2 to installation 1. You can also throw away a lot of folders in installation 2, creating a minimal version (still a few gigs, though).
Back to top
View user's profile Send private message
Serryth



Joined: 16 Jun 2006
Posts: 11

PostPosted: Fri Mar 21, 2008 23:19    Post subject: Reply with quote

I managed to run two copies of NWN from two different directories (two drives in your case) with little problem. No need for Vaulster.

Although your Quadcore machine may pose a problem... I had problem with my Core Duo for the longest time... the video frame rate will "stutter". I found out that NWN only run in single core. Once I set NWN to run in single core CPU, the game ran fine again.

Check the Bioware forum for a setting called "CPU affinity" in nwnplayer.ini to set it to run single core.
Back to top
View user's profile Send private message
Tempest



Joined: 26 Feb 2008
Posts: 32

PostPosted: Sat Mar 22, 2008 2:23    Post subject: Reply with quote

Thanks guys! Thats great news. I thought that Vaultster might be a waste but wasnt sure. Another silly question here. I went out and bought two full copies of NWN because I thought I needed them, turns out I can only have one loaded at a time on the machine. So I just copied all of the files from the first installation to the second instance folder. I see what you mean about getting rid of some of the added folders for the 2nd instance.

Do I still need to configure both NWN.ini files or does the NWNX.ini files override them?

Thanks... Tempest
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Serryth



Joined: 16 Jun 2006
Posts: 11

PostPosted: Sat Mar 22, 2008 5:45    Post subject: Reply with quote

I recall fiddling with NWNX.ini because NWNX will load the NWN server automatically. No need to tweak nwn.ini, except for the CPU affinity I said (but that's nwnplayer.ini).
Back to top
View user's profile Send private message
Tempest



Joined: 26 Feb 2008
Posts: 32

PostPosted: Sun Mar 23, 2008 3:34    Post subject: Reply with quote

okay thanks! I will make sure I set it up then. I read somewhere that folks were having good success with assigning one core to one instance and one core to the other. Also just want to double check. Is that all I need to do for the 2nd instance? Just point it to the 1st instance directory and no vaultster?

"T"
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Serryth



Joined: 16 Jun 2006
Posts: 11

PostPosted: Sun Mar 23, 2008 4:30    Post subject: Reply with quote

Err.. that not what I said. I installed NWN and NWNX twice into two directories. And run both version of NWNX and use that to "load" the NWN games.

Never did use any instance pointing, or vaulster.
Back to top
View user's profile Send private message
Tempest



Joined: 26 Feb 2008
Posts: 32

PostPosted: Sun Mar 23, 2008 5:32    Post subject: Reply with quote

okay sorry didnt mean you, someone else mentioned that. If I install two seperate NWNX applications, it wont share the same vault then? I need to be able to share the same vault among the two instances....
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Serryth



Joined: 16 Jun 2006
Posts: 11

PostPosted: Mon Mar 24, 2008 17:51    Post subject: Reply with quote

Looks to me you should try Disco's suggestion about pointing instances.
Back to top
View user's profile Send private message
Tempest



Joined: 26 Feb 2008
Posts: 32

PostPosted: Tue Mar 25, 2008 15:01    Post subject: Reply with quote

Well I dont disagree but I am a bit confused and a bit of explanation would help! Disco mentioned NWN.ini, did he really mean NWNX.ini?

"T"
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Disco



Joined: 06 Dec 2006
Posts: 152

PostPosted: Wed Mar 26, 2008 17:15    Post subject: Reply with quote

I got a secondary installation of nwn running on D:/NWN_secondary/. My primary and full installation is D:/NWN/. The root of the secondary installation looks approximately like this:

D:/NWN_secondary/data/
D:/NWN_secondary/database/
D:/NWN_secondary/logs.0/
D:/NWN_secondary/modules/
D:/NWN_secondary/override/
D:/NWN_secondary/temp/
D:/NWN_secondary/nwn.ini
D:/NWN_secondary/nwnplayer.ini
D:/NWN_secondary/NWNX2.exe
D:/NWN_secondary/NWNX.ini
D:/NWN_secondary/nwserver.exe

There's a few more files in the root, but not any other folders. The installation is now 1.08 gig.

OK, my nwnplayer.ini looks like this:

[Game Options]
Difficulty Level=3
Max Memory Usage=512
Heartbeat Logging=0
Log Model Errors=0

[Server Options]
MPEnabled=1
Game Port=5122
Max Players=15
MinCharLevel=1
MaxCharLevel=30
Server Name=My Second Server
PlayerPassword=#########
DMPassword=############
Reload Module When Empty=0
GameSpy Enabled=1
Game Type=3
PVP Setting=1
PauseAndPlay=0
Disable AutoSave=0
Auto Save Interval=0
AllowLocalChars=0
Game Region=0
ServerDownTimer=180
One Party Only=0
Enforce Legal Characters=0
ItemLevelRestrictions=1
Suppress Base Servervault=1
CD Banned Behavior=0
Disallow Shouting=1
ShowDMJoinedMessage=0
BackupSavedChars=1
Saving Throw Automatic Failure On 1=1
Validate Spells=1
Master Server Authentication Required For Player Login=1
Account validation required during Master Server down times=1
Examine CR On Creatures=0
Examine Effects On Creatures=0

My nwn.ini looks like this:

[Alias]
HD0=.\
OVERRIDE=D:\NWN\override
TEMP=.\temp
MODULES=.\modules
LOGS=.\logs
LOCALVAULT=D:\NWN\localvault
DMVAULT=.\dmvault
SERVERVAULT=D:\NWN\servervault
TEMPCLIENT=.\tempclient
SAVES=.\saves
CURRENTGAME=.\currentgame
HAK=.\hak
PATCH=.\patch
NWMFiles=D:\NWN\nwm
AMBIENT=D:\NWN\ambient
MOVIES=D:\NWN\movies
MUSIC=D:\NWN\music
DATABASE=.\database

[Sound Options]

[Display Options]

[Video Options]

[Config]
FirstRun=0
Connection=1


The main part of nwnx.ini looks like this:

[NWNX]
ServerPort = 5122
ModuleName = "MySecondMod"
WatchdogProcess = yes
UpdateIntervalProcess = 7
WatchdogGamespy = no
UpdateIntervalGamespy = 60
GamespyRetries = 5
OldGamespyProtocol = no
RestartDelay = 5
CPUAffinity = 2


I have the feeling that the CPU affinity in nwnplayer.ini is not the server one but the client's. Same goes for the Game Port. These are probably set by nwnx.ini.

Hope this helps.

I must admit I have troubles of getting the name of the server in the secondary nwserver combo via NWNX.
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
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