View previous topic :: View next topic |
Author |
Message |
Lugoun
Joined: 18 May 2007 Posts: 36
|
Posted: Thu Oct 09, 2008 20:00 Post subject: NWNX 1.09 - Notes/Documents?? |
|
|
I can see the new features of 1.09, but I havent been able to find any release notes or documentation or explanation about the features and no readme's in the download.
Can someone point me in the right direction for more information and details about the update??
Detours instead of macodehook hooking method
MySQL: SCORCO (store and retrieve campaign object) functions
MySQL: Automatic reconnect
Graceful shutdown feature
Thanks, _________________ Lugoun
www.hotta-rpg.org |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Thu Oct 09, 2008 23:55 Post subject: |
|
|
NWNX4 Changelog:
Quote: | - Detours instead of macodehook hooking method. Improves stability and compability of NWNX on certain systems (64 bit, Linux using Wine). Also gets rid of virus alerts thrown by certain anti virus programs (which unjustly classify madcodehook as a virus...)
- MySQL: SCORCO (store and retrieve campaign object) functions support. Finally you can store objects to the database, like items, placeables, ...
- MySQL: Automatic reconnect after "server has gone away" connection loss. If you run NWNX and MySQL as a service, the order in which services are started does not matter any more. NWNX will silently try to connect to MySQL if no connection is open. Also helpful in situations where MySQL disconnects NWNX after prolonged periods of inactivity.
- Graceful shutdown feature allows to specify a message all players receive before the server is taken down. Have a look at nwnx.ini for the new settings. |
You can also get more information by reading these forums. I've copied some posts covering the introduced features.
Detours instead of macodehook hooking method
http://www.nwnx.org/phpBB2/viewtopic.php?p=8435#8435
Quote: | Sorry if my question as been replyed somewhere else, but what is the difference between using MadHook and Detours ? and does Detours need to be installed like madhook to work? |
Quote: | MadCHook isn't available for free anymore.
There were several issues when virus scanners mistakenly considered MadCHook a malicious software.
MadCHook requires its DLL to be present in the same folder as the main application.
MadCHook is not compatible with 64-bit systems
MadCHook doesn't work on Wine.
Detours library solves all these issues.
And no, Detours is embedded in the plugin DLL. |
MySQL: SCORCO (store and retrieve campaign object) functions
http://www.nwnx.org/phpBB2/viewtopic.php?p=9408#9408
Quote: | To store an object in MySQL, you need a table with BLOB field.
Saving an object:
Code: | SQLSCORCOExec("INSERT INTO table_name (name, data) VALUES('something', %s)");
SQLStoreObject(oObject); //%s from the query is replaced with the object's GFF data when you call StoreObject |
Retrieving an object:
Code: | SQLSCORCOExec("SELECT data FROM table_name WHERE name='something'");
object oObject = SQLRetrieveObject(lLocation); |
|
MySQL: Automatic reconnect
http://www.nwnx.org/phpBB2/viewtopic.php?p=7879#7879
Quote: | Added reconnection support to xp_mysql (with automatic retry of a failed query if the query was not even sent to the server at all due to a disconnected socket). This makes mysql support viable (or at least moreso than it was) for non-trivial use, as you no longer have to shut down the entire module if the database connection is lost. |
Graceful shutdown feature
http://www.nwnx.org/phpBB2/viewtopic.php?p=8546#8546
Quote: | - Added graceful shutdown support. The server will attempt to do a graceful shutdown when stopping the service or stopping the server via the GUI. There is a config parameter "gracefulShutdownTimeout" that describes the count in milliseconds of how long to wait for a graceful shutdown to complete before hard killing the server process. The default is 10000 (10 seconds). A graceful shutdown will log players cleanly out of the server (i.e. likely without crashing them), and will save all character bics properly.
- Added an optional broadcast message sent before the server shuts down for graceful shutdown (set via the "gracefulShutdownMessage" config parameter). Depending on timing, you may see the "Server has gone down" message box and be booted before it is displayed to clients. The default is to not try and send any message. |
|
|
Back to top |
|
|
Lugoun
Joined: 18 May 2007 Posts: 36
|
Posted: Fri Oct 10, 2008 20:34 Post subject: |
|
|
Thanks virusman.
I am mostly a scripter making use of the nwnx_sql functions, but I find myself also managing the NWNX, MySQL and tables etc., and making persistence work across multiple servers, but my knowledge in that arena is very basic.
I have a few questions-
The new NWNX4_Hook.dll, do I treat it jus like I handled MadCHook and place a copy of the .dll in the NWN install folder too? The reason I ask is because of this comment:
Quote: | MadCHook requires its DLL to be present in the same folder as the main application. |
I don't want to cause any problems by not having the .dll in the right place(s).
I am also confused by the SCO/RCO function, and the post linked seems to cover items more easily understood by advanced users.
From the forum thread, I do not understand the comment: "To store an object in MySQL, you need a table with BLOB field." I do not have the referenced function (SQLSCORCOExec) in nwnx_sql.erf. I only know what a BLOB field is because I just looked it up, and I don't think that pwobjdata is set up that way.
I do have Set & GetPersistentObject in nwnx_sql, and if those functions will do what I need and get it done using the pwobjdata data table that would be great. The Get & SetPersistentObject are using the nwn RetrieveCampaignObject type functions, but I am not sure how.... I am guessing the secret lies someplace in this: "SetLocalString(GetModule(), "NWNX!SQL!SETSCORCOSQL", sSQL);" but I don't understand whats going on in there. Any insight would be appreciated.
Are the objects stored using SetPersistentObject actually in the MySQL table or in the nwn db? And will the objects be available across multiple servers? I never actually used the RetrieveCampaignObject function before, is it known if this handles things like stacksize, charges, appearance and other properties of stored items which are different from the original template blueprint?
Thank you. _________________ Lugoun
www.hotta-rpg.org |
|
Back to top |
|
|
GilGwath
Joined: 10 Oct 2008 Posts: 6
|
Posted: Sat Oct 11, 2008 22:20 Post subject: |
|
|
Lugoun wrote: | I do have Set & GetPersistentObject in nwnx_sql, and if those functions will do what I need and get it done using the pwobjdata data table that would be great. The Get & SetPersistentObject are using the nwn RetrieveCampaignObject type functions, but I am not sure how.... I am guessing the secret lies someplace in this: "SetLocalString(GetModule(), "NWNX!SQL!SETSCORCOSQL", sSQL);" but I don't understand whats going on in there. Any insight would be appreciated. |
Looks like you have got an older version of nwnx_sql.erf |
|
Back to top |
|
|
Lugoun
Joined: 18 May 2007 Posts: 36
|
Posted: Sun Oct 12, 2008 0:48 Post subject: |
|
|
Nope.. freshly downloaded NWNX4 1.09 from downloads page. _________________ Lugoun
www.hotta-rpg.org |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
|
Back to top |
|
|
Xildjian
Joined: 08 Jan 2005 Posts: 100
|
Posted: Sun Oct 19, 2008 0:26 Post subject: |
|
|
Any chance the demo mod included with 1.09 could be updated to show an example of the object storage in the database? The current demo mod still has the functionality commented out as not implemented with nwnx4 at this time.
Thanks! _________________ Member Shadow of Iniquity development team |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Tue Oct 21, 2008 0:33 Post subject: |
|
|
Xildjian wrote: |
Any chance the demo mod included with 1.09 could be updated to show an example of the object storage in the database? The current demo mod still has the functionality commented out as not implemented with nwnx4 at this time.
Thanks! | I asked GrinningFool to update it, but he is too busy - I wouldn't expect the update anytime soon.
Any help with the module would be appreciated. |
|
Back to top |
|
|
Xildjian
Joined: 08 Jan 2005 Posts: 100
|
Posted: Tue Oct 21, 2008 3:13 Post subject: |
|
|
virusman wrote: | Xildjian wrote: |
Any chance the demo mod included with 1.09 could be updated to show an example of the object storage in the database? The current demo mod still has the functionality commented out as not implemented with nwnx4 at this time.
Thanks! | I asked GrinningFool to update it, but he is too busy - I wouldn't expect the update anytime soon.
Any help with the module would be appreciated. |
Well tell him to stop working on the auto update thing for the game and get to work on this ASAP! j/k
I can take a whack at this, but saving objects to the database is new to me so I was hoping to have a reference. But I think everything I need has been posted in response to others questions.
I'm going to assume the demo mod nwnx_sql.erf is also out-dated as well? _________________ Member Shadow of Iniquity development team |
|
Back to top |
|
|
Xildjian
Joined: 08 Jan 2005 Posts: 100
|
Posted: Tue Oct 21, 2008 6:03 Post subject: |
|
|
I can't open the area in the nwnx_demo_mysql.mod. The toolset is giving a bunch of errors. Any ideas why?
I can load the mod, just can't open the area. _________________ Member Shadow of Iniquity development team |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
|
Back to top |
|
|
PNJ
Joined: 30 Jun 2007 Posts: 67
|
Posted: Mon Nov 03, 2008 16:07 Post subject: |
|
|
Questions : does nwnx 1.08 plugin work on 1.09 ? does old 1.08 plugin workin with local vars also work with 1.09 ? |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Mon Nov 03, 2008 16:21 Post subject: |
|
|
PNJ wrote: | Questions : does nwnx 1.08 plugin work on 1.09 ? does old 1.08 plugin workin with local vars also work with 1.09 ? | Yes. 1.08 plugins will work on 1.09. There were no changes in the plugin interface.
It has been changed from SetLocalString to NWNXGet/Set* in 1.08. There is a special build that is compatible with pre-1.08 plugins using SetLocalString (like NWNX Leto). 1.10 release will be also backwards compatible with pre-1.08 plugins. |
|
Back to top |
|
|
PNJ
Joined: 30 Jun 2007 Posts: 67
|
Posted: Mon Nov 03, 2008 19:55 Post subject: |
|
|
Thank you, i will setup my PW and try it out.
Do you think there could be performance gain without madhoock? |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Mon Nov 03, 2008 23:01 Post subject: |
|
|
PNJ wrote: | Do you think there could be performance gain without madhoock? | No. |
|
Back to top |
|
|
|