NWNX2 Executable Released to the Public!
Moderator: Event DM
-
- World Advisor, Co-founder
- Posts: 15149
- Joined: Fri Sep 14, 2001 9:48 pm
- Timezone: GMT-5
- Contact:
NWNX2 Executable Released to the Public!
We are happy to announce the second incarnation of APS/NWNX, the real-time Open Database Connectivity (ODBC) interface for Neverwinter Nights.
Unlike previous systems, which utilize either tokens to hold information or creatively read the log file and re-compile it into the module, the Avlis Persistence System (APS) and the underlying NWN Extender 2 (NWNX2) read and write information from a database on the fly and make information stored in the database available in real-time. Supports all Windows operating systems.
Version 2.0 of NWNX offers many improvements over the original version: Faster, more reliable, unlimited result sets, GUI, Win9x support, NWNX log file, server log file rotation. Other benefits include:
* No performance hit if no queries are made. This time for real.
* NWNX2 augments the internal SetLocalString() function instead of interrupting it. That means NWNX2 is running inside of the server and not as a seperate process and thus significantly improves performance.
* Unlimited size for resultsets. A single row still has a limit of 1K (can be changed to a higher limit) but you can grab an unlimited amount of rows (previous limit: 4k for the whole thing).
* Should run with Win9x (hey... this one comes for free, so why not)
* Logs all activity to a file and may show additional info in a seperate (graphical) window.
* APS hasn't changed. (Almost) no conversion of existing code will be necessary.
* Foundation for lots of other stuff. Already made sure that ODBC is just a subsystem of NWNX2.
Unlike previous systems, which utilize either tokens to hold information or creatively read the log file and re-compile it into the module, the Avlis Persistence System (APS) and the underlying NWN Extender 2 (NWNX2) read and write information from a database on the fly and make information stored in the database available in real-time. Supports all Windows operating systems.
Version 2.0 of NWNX offers many improvements over the original version: Faster, more reliable, unlimited result sets, GUI, Win9x support, NWNX log file, server log file rotation. Other benefits include:
* No performance hit if no queries are made. This time for real.
* NWNX2 augments the internal SetLocalString() function instead of interrupting it. That means NWNX2 is running inside of the server and not as a seperate process and thus significantly improves performance.
* Unlimited size for resultsets. A single row still has a limit of 1K (can be changed to a higher limit) but you can grab an unlimited amount of rows (previous limit: 4k for the whole thing).
* Should run with Win9x (hey... this one comes for free, so why not)
* Logs all activity to a file and may show additional info in a seperate (graphical) window.
* APS hasn't changed. (Almost) no conversion of existing code will be necessary.
* Foundation for lots of other stuff. Already made sure that ODBC is just a subsystem of NWNX2.
-
- World Advisor, Co-founder
- Posts: 15149
- Joined: Fri Sep 14, 2001 9:48 pm
- Timezone: GMT-5
- Contact:
Some FAQ's:
Q. When will the LINUX port be done?
A. When a non-Avlis Team person steps up to the plate and makes one. There is no specific date, time, or intention yet.
Q. When will the source code for NWNX2 be released?
A. There is no specific date. Papillon intends to release the source code for NWNX2 when it is ready under a similar liscense as NWNX1.
Q. When will the LINUX port be done?
A. When a non-Avlis Team person steps up to the plate and makes one. There is no specific date, time, or intention yet.
Q. When will the source code for NWNX2 be released?
A. There is no specific date. Papillon intends to release the source code for NWNX2 when it is ready under a similar liscense as NWNX1.
- Jeff
- Knight of Useless Drivel
- Posts: 66
- Joined: Thu Oct 31, 2002 4:21 am
- Location: http://www.legendofvalinor.com
- Contact:
Anyone have any idea why all of the sudden my module beings to crash when i switched to nwnx2, (was using nwnx1.23). my mod have allways hung for a few min after the initial load. like if the mod load time was 5 min it would hag 2 more min (why i dunno) but it seems that it wont run under nwnx2
Arcanius
Head Dm : Krynnhaven
Head Dm : Krynnhaven
In the original version around line #129 of the aps_include file it had a handy spot for a file called aps_ready. For ease of use I would love to put this back in to NWNX2. I have tried and failed on my own so now I turn to you. Here's the code from the old include file for reference.
Thanks in advance.
Start Code -------
void SQLInit()
{
object oModule = GetModule();
SetLocalInt(oModule, "NWNX!READY", FALSE);
// Placeholders for ODBC persistance
string sRequest = "NWNX!REQUEST!";
string sResponse = "NWNX!RESPONSE!";
int i;
for (i = 0; i < 8; i++) // reserve 8*128 bytes for requests
sRequest += "................................................................................................................................";
for (i = 0; i < 32; i++) // reserve 32*128 bytes for responses
sResponse += "................................................................................................................................";
SetLocalString(oModule, "NWNX1!", sRequest);
SetLocalString(oModule, "NWNX2!", sResponse);
WriteTimestampedLogEntry("APS initialized. Waiting for NWNX to become ready.");
ExecuteScript("aps_ready", oModule);
}
Thanks in advance.
Start Code -------
void SQLInit()
{
object oModule = GetModule();
SetLocalInt(oModule, "NWNX!READY", FALSE);
// Placeholders for ODBC persistance
string sRequest = "NWNX!REQUEST!";
string sResponse = "NWNX!RESPONSE!";
int i;
for (i = 0; i < 8; i++) // reserve 8*128 bytes for requests
sRequest += "................................................................................................................................";
for (i = 0; i < 32; i++) // reserve 32*128 bytes for responses
sResponse += "................................................................................................................................";
SetLocalString(oModule, "NWNX1!", sRequest);
SetLocalString(oModule, "NWNX2!", sResponse);
WriteTimestampedLogEntry("APS initialized. Waiting for NWNX to become ready.");
ExecuteScript("aps_ready", oModule);
}
aps_ready is obsolete. The script was basically a loop that waited for NWNX to become ready and is not needed anymore (because NWNX2 is ready right from the start). If you want to run some custom initialization code or database queries after the module has been loaded, make a new script and call it right after SQLInit().slabar wrote:In the original version around line #129 of the aps_include file it had a handy spot for a file called aps_ready. For ease of use I would love to put this back in to NWNX2. I have tried and failed on my own so now I turn to you. Here's the code from the old include file for reference.
- Themicles
- CoPaP Ambassador
- Posts: 2673
- Joined: Wed Jan 29, 2003 10:45 pm
- Location: Wolverine Lake, MI
- Contact:
What OS are you running?
Are you hearing a lot of hard drive
noise?
I know that when my server crashes,
Dr Watson grabs hold of it, and I've
had it take nearly an hour before it
was done before...
Sometimes it eats so much CPU power
trying to debug it, that I can't even get
anything to work on the computer, and
can't even get task manager up to try
and kill it. And in this case, you must
kill Dr Watson, not the server, or the
server wont close.
-Themicles
Are you hearing a lot of hard drive
noise?
I know that when my server crashes,
Dr Watson grabs hold of it, and I've
had it take nearly an hour before it
was done before...
Sometimes it eats so much CPU power
trying to debug it, that I can't even get
anything to work on the computer, and
can't even get task manager up to try
and kill it. And in this case, you must
kill Dr Watson, not the server, or the
server wont close.
-Themicles
Papillon,papillon wrote:aps_ready is obsolete. The script was basically a loop that waited for NWNX to become ready and is not needed anymore (because NWNX2 is ready right from the start). If you want to run some custom initialization code or database queries after the module has been loaded, make a new script and call it right after SQLInit().
That's great news thanks. After the original version I didn't realize we could use the aps_onload to execute our load scripts.
BTW Love the new version. Keep up the great work.
I too am having problems with the NWNX2 application.
When the NWN Server eventually crashes (within 2-7 hours of starting up), it simply hangs, NWNX2 does not restart the server application automatically. If the Ok button in the error window that pops up when the NWN Server crashes, NWNX2 is able to then restart the NWN Server. But, as long as that Error Window is displayed, NWNX2 still thinks the server is running.
System Specifications:
P4 2.4ghz processor
512mb Memory
Windows 98 SE (OS is up to date on all patches)
NWN running on Patch 1.28
Not running any other Applications, just the OS and NWN are installed on the server.
When the NWN Server eventually crashes (within 2-7 hours of starting up), it simply hangs, NWNX2 does not restart the server application automatically. If the Ok button in the error window that pops up when the NWN Server crashes, NWNX2 is able to then restart the NWN Server. But, as long as that Error Window is displayed, NWNX2 still thinks the server is running.
System Specifications:
P4 2.4ghz processor
512mb Memory
Windows 98 SE (OS is up to date on all patches)
NWN running on Patch 1.28
Not running any other Applications, just the OS and NWN are installed on the server.
I know that with NWNMan (which is available on nwvault.ign.com) , that watchog app ignores the Error Window that pops up, closes the child process then starts it back up again.
Under Windows 98. unlike under Windows XP, I don't think there's a way to "turn off" the error message window that pops up when an application crashes.
BTW: Excellent work on this application. I've only had it installed for a few days and it's working marvelously!
Under Windows 98. unlike under Windows XP, I don't think there's a way to "turn off" the error message window that pops up when an application crashes.
BTW: Excellent work on this application. I've only had it installed for a few days and it's working marvelously!
The Link to NWman is: http://www.hlstats.org/nwman/
Generally, it run the NWN server as a child process and watches that process. If it sees that the NWN Server has stopped/crashed, it starts up another NWN Server. If I were to modify the configuration so that NWman started up NWNX2 (and then NWNX2 started up the NWN Server), I think NWman would be monitoring the NWNX2 process, not the NWN Server process. I'll give it a try and see if this is true.
Generally, it run the NWN server as a child process and watches that process. If it sees that the NWN Server has stopped/crashed, it starts up another NWN Server. If I were to modify the configuration so that NWman started up NWNX2 (and then NWNX2 started up the NWN Server), I think NWman would be monitoring the NWNX2 process, not the NWN Server process. I'll give it a try and see if this is true.
-
- Whiney Peasant
- Posts: 15
- Joined: Wed Jan 29, 2003 10:42 am
-
- Whiney Peasant
- Posts: 15
- Joined: Wed Jan 29, 2003 10:42 am
Don't know exactly for Win9x, I'm using XP.Papillon wrote:DrWatson on Win 9x ??
You're right, I were probably one of the guys who were the most loudly begging for the code... so I understand you feel a bit disappointed to have absolutely no feed back about what pple are doing with it, if anything at all. Not very fair, and probably won't encourage you to keep giving your source code again for the current release.Papillon wrote:Btw, FastFrench, as you where one of the guys craving for the source code... when will you release your tool to the public ?
So here are some explanations:
- I'm both coding on a module with few other builders (Le bouchon Lyonnais ATS, a french one) and hosting it on my own server (running XP pro). But all the other builders of this mod dedicate themself to another server, which is a Linux one (which run the very same module). So they convince me to first replace all token stuff with copyobject mecanisms (now 2 small items in inventory hold 64 base-63 ints) before considering adapt the module - and only for my server - with APS/NWNX. I know I could do much more things with NWNX than I can with copyobject (perm. chest/ATS vendors..., and also Correctly store permanent data onclientleave - wich is definitively not possible with inventory-based solutions).
- Also, I compiled your code with no problem, but got some conflicts between your part and mine when I added my code (library were different, something to do with single/multi thread and MFC use or not - despite I avoided to use them as u do)... well, nothing really impossible to solve, simply it were not as EZ as it could have been.
- As I've seen that NWNX2 were about to come out, I prefered to give up doing this to finish the 'copyobject' adaptation (now it's all done). And I kept checking the old thread where NWNX1 can be download, that just said ('til this morning) NWNX2 were about to be released...
- And also, it seems that for most guys around, the tools allready available to keep NWServer running are doing a good enough job. So I wondered if enough people need more sophisticated tools as I do, to justify cleaning/comment the code, make it more configurable, document it... sure you know what I mean here Papillon

Well, many promises but few acts from me...

All I can do on a very short term if it can help, it's to send you my code so you can check if you find some improvment that you want to apply on NWNX2. It's not very clean or commented, but very reliable... well, at least in my case
