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 
 
NWNX .ini file? and '-restartdelay' parameter?

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development
View previous topic :: View next topic  
Author Message
Senalaya



Joined: 29 Dec 2004
Posts: 82
Location: Germany

PostPosted: Tue Jan 04, 2005 0:04    Post subject: NWNX .ini file? and '-restartdelay' parameter? Reply with quote

Papillon,

would it bother you too much, if I'd ask you for using an .ini file for the
-port, -module, -processwatchdog, -processinterval, -gamespywatchdog, -gamespyinterval, -gamespyretries and -oldgamespyprotocol parameters?

And what would be great, is a '-restartdelay' parameter. I noticed on my server, that the nwserver.exe process is restarted too fast. The memory isn't cleaned up then and it results most times in a 2nd crash shortly after. Before I switched to NWNX2, I used a utility called 'ServerDoc' for the restarts and it had such an option. A delay of 5sec worked sufficient.
Back to top
View user's profile Send private message
Senalaya



Joined: 29 Dec 2004
Posts: 82
Location: Germany

PostPosted: Tue Jan 04, 2005 18:21    Post subject: Reply with quote

On a 2nd thought, what about having one shared .ini file for NWNX and the modules?

Code:
[NWNX]
port = 5121
module = "Whatever Module"

[WATCHDOG]
restartdelay = 5
processwatchdog = 1
processinterval = 5
gamespywatchdog = 1
gamespyinterval = 20
gamespyretries = 5
oldversion = 0

[DATABASE]
interface = odbc
dsn = nwn

or

[DATABASE]
interface = mysql
server = localhost
user = nwn
password = nwnpass
database = nwn
...


Last edited by Senalaya on Tue Jan 04, 2005 18:45; edited 1 time in total
Back to top
View user's profile Send private message
Blayde Windwalker



Joined: 02 Jan 2005
Posts: 18

PostPosted: Tue Jan 04, 2005 18:44    Post subject: Great Idea Reply with quote

I agree whole heartedly with Senlaya on this. Having to keep a command line string is too cumbersome and there is not enuf space to pass all the parameters.

This certainly would be an improvement.
Back to top
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Fri Jan 07, 2005 23:48    Post subject: Reply with quote

INI files are definitely on my list.

I'm not sure whether to use one or multiple files, though.

One file:
Pros: cleaner, everything in one place
Cons: harder to maintain for the end user

Multiple files:
Pros: example files can be easily distributed and copied by the end user
Cons: Clutters up the nwn folder

What are your thoughts ?
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Makzimia De Graf



Joined: 31 Dec 2004
Posts: 55
Location: San Diego CA.

PostPosted: Fri Jan 07, 2005 23:52    Post subject: Reply with quote

For ease of use, I would suggest maybe one INI per server, if that was even really necessary. Considering the low number of options, relatively speaking, I can't see the sense in multiple files.
_________________
Makzimia De Graf

DM/Creator Island of Fredian
fredian.game-host.org:5123
Forums at http://castille.us/fredian/Forums
Back to top
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Sat Jan 08, 2005 0:15    Post subject: Reply with quote

I can not pass commandline parameters from NWNX.EXE to the plugins, so those would not know which ini file to use. So it is either one or multiple ini files per NWN directory.
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Senalaya



Joined: 29 Dec 2004
Posts: 82
Location: Germany

PostPosted: Sat Jan 08, 2005 1:20    Post subject: Reply with quote

As I suggested here and in the reply in the general section, I'd go for 1 .ini file per NWNX instance.

It's the cleanest solution. You could pass the name of the .ini file as commandline parameter ('-config nwnxtest.ini') if you intend to run multiple NWNX instances off the same directory. Since you can't do that with the modules, a single file would be better.

The only real downside I could see, is that the code in the modules for inserting the proper categories and fields into the common .ini file on the 1st start, would be a bit more complicated.
Back to top
View user's profile Send private message
JeroenB



Joined: 31 Dec 2004
Posts: 228
Location: Netherlands

PostPosted: Sat Jan 08, 2005 10:29    Post subject: Reply with quote

Senalaya wrote:
As I suggested here and in the reply in the general section, I'd go for 1 .ini file per NWNX instance.

This would be compatible with the linux version, which has this implemented.

Senalaya wrote:
It's the cleanest solution. You could pass the name of the .ini file as commandline parameter ('-config nwnxtest.ini') if you intend to run multiple NWNX instances off the same directory. Since you can't do that with the modules, a single file would be better.

The only real downside I could see, is that the code in the modules for inserting the proper categories and fields into the common .ini file on the 1st start, would be a bit more complicated.

There is more -> modules don't exists anymore it is plugin! Laughing
Besides that you must know that if we want to do this all plugins currently available (including the ones not written by us) have to be rewritten, or atleast recompiled. This can be a lot of work.
Though it is a nice idea, and we are currently discussing about it.
Back to top
View user's profile Send private message Visit poster's website
Liberty Valance



Joined: 06 Jan 2005
Posts: 21
Location: A Persistent World West2

PostPosted: Sat Jan 08, 2005 11:12    Post subject: Reply with quote

i vote for the single-ini-file method! Very Happy
_________________
A Persistent World West2 | APWW2 Forums
Wirehead Studios
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Senalaya



Joined: 29 Dec 2004
Posts: 82
Location: Germany

PostPosted: Sat Jan 15, 2005 22:09    Post subject: Re: NWNX .ini file? and '-restartdelay' parameter? Reply with quote

Senalaya wrote:
Papillon,

would it bother you too much, if I'd ask you for using an .ini file for the
-port, -module, -processwatchdog, -processinterval, -gamespywatchdog, -gamespyinterval, -gamespyretries and -oldgamespyprotocol parameters?

And what would be great, is a '-restartdelay' parameter. I noticed on my server, that the nwserver.exe process is restarted too fast. The memory isn't cleaned up then and it results most times in a 2nd crash shortly after. Before I switched to NWNX2, I used a utility called 'ServerDoc' for the restarts and it had such an option. A delay of 5sec worked sufficient.


Thanks for the implementation of both, Papillon!
Back to top
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Sat Jan 15, 2005 22:38    Post subject: Reply with quote

Be my guest Smile
_________________
Papillon
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 -> Windows development 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