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 
 
Clean solution for relocating NWN2 temp and log files
Goto page Previous  1, 2
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Development
View previous topic :: View next topic  
Author Message
Gryphyn



Joined: 20 Jan 2005
Posts: 431

PostPosted: Sat Nov 25, 2006 6:36    Post subject: Reply with quote

Papillon wrote:
Ok, now I understand what you mean.

This is a functionality that would be perfect in a new plugin! It would have a simple ini file with those values, and just return them upon request.

It should be very easy to write something like this.


Or if not found, revert to the NWN.INI values
We already know where this file is,
and that way you have pre-defined defaults

I'm also suggesting it gets into the Main NWNX4 (even if just as a base/partial class) this way it is already availabe to the plugins, after all the information only needs to be collected the once. If a plugin has 'a special' let them ignore or override the the property.
Having a 'get NWN_INI_ALIASES" plugin seems a bit silly.
Yes, it could be done as a plugin, but then you have a load-sequence issue for other plugins that would use it.

Cheers
Gryphyn
Back to top
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Sat Nov 25, 2006 12:05    Post subject: Reply with quote

Well, if you need the directories in nwscript (as you said in your previous post), a plugin would be the way to go.

If a plugin needs the directories (i.e. in c++), it should not be too hard to write a few lines of code to get the values from its ini file, or from the nwn.ini one.

I have to think about it. It may be a bit too special to put this into the main DLL.
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Gryphyn



Joined: 20 Jan 2005
Posts: 431

PostPosted: Sat Nov 25, 2006 22:30    Post subject: Reply with quote

Papillon wrote:
Well, if you need the directories in nwscript (as you said in your previous post), a plugin would be the way to go.

If a plugin needs the directories (i.e. in c++), it should not be too hard to write a few lines of code to get the values from its ini file, or from the nwn.ini one.

I have to think about it. It may be a bit too special to put this into the main DLL.


It you're going for a small footprint, maybe a little specialized. I'm assuming you have the code already available in the main exe - you have (or will have) a NWNX4.INI for configuration - a few extra lines in there.

But that's beside the point - Your call if it goes in or not.

Cheers
Gryphyn
Back to top
View user's profile Send private message
chris421



Joined: 07 Apr 2005
Posts: 53

PostPosted: Thu Dec 28, 2006 4:35    Post subject: Reply with quote

Thanks for the INI option to redirect the Temp and Logs.

Is there any work-around to prevent NWN2 Server, when run as a non-interactive NWNX4 service, from building all its nonsense under "C:\Documents and Settings\Default User\My Documents\Neverwinter Nights 2"?

Not the best place for the INI file, the Servervault or the Server Description if you plan on hosting multiple servers.

You think OE will tweak something for the community when they release their stripped down NWN2 dedicated server in Jan?
Back to top
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Sun Dec 31, 2006 0:55    Post subject: Reply with quote

Not that I know, currently.

Well, there seems to be something different when run as a service, e.g. someone reported that WriteTimestampedLogEntry outputs nothing. I'll have to look into this.
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Grinning Fool



Joined: 12 Feb 2005
Posts: 264

PostPosted: Mon Jan 01, 2007 13:33    Post subject: Reply with quote

chris421 wrote:
Thanks for the INI option to redirect the Temp and Logs.

Is there any work-around to prevent NWN2 Server, when run as a non-interactive NWNX4 service, from building all its nonsense under "C:\Documents and Settings\Default User\My Documents\Neverwinter Nights 2"?

I'd suggest creating a specific username for the server to run under. This way, you can also use that to run the NWNX4 service, and all files will go into the expected place.
_________________
Khalidine, a NWN2 persistent world

Looking for volunteers.
Back to top
View user's profile Send private message
chris421



Joined: 07 Apr 2005
Posts: 53

PostPosted: Mon Jan 01, 2007 19:12    Post subject: Reply with quote

Yeah I'm happy now. Took a similar approach.

Created a local service account with admin rights and tweaked its registry so that its "Personal" shellfolder a.k.a. "My Documents" ended up being the root of my G: drive, which merged the NWN2 directory structure exactly where I wanted it.

Ended up reverting the service account to LocalSystem, making the same "Personal" reg tweaks to .Default and SystemProfile users because for some reason, running as the user account, NWN2 Server would spam my Security log (with successes) every time it ran. It would repeatedly take ownership of 800+ files.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Development All times are GMT + 2 Hours
Goto page Previous  1, 2
Page 2 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