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 1.09 - Notes/Documents??
Goto page 1, 2  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Development
View previous topic :: View next topic  
Author Message
Lugoun



Joined: 18 May 2007
Posts: 36

PostPosted: Thu Oct 09, 2008 20:00    Post subject: NWNX 1.09 - Notes/Documents?? Reply with quote

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
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Thu Oct 09, 2008 23:55    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger
Lugoun



Joined: 18 May 2007
Posts: 36

PostPosted: Fri Oct 10, 2008 20:34    Post subject: Reply with quote

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
View user's profile Send private message
GilGwath



Joined: 10 Oct 2008
Posts: 6

PostPosted: Sat Oct 11, 2008 22:20    Post subject: Reply with quote

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
View user's profile Send private message
Lugoun



Joined: 18 May 2007
Posts: 36

PostPosted: Sun Oct 12, 2008 0:48    Post subject: Reply with quote

Nope.. freshly downloaded NWNX4 1.09 from downloads page.
_________________
Lugoun
www.hotta-rpg.org
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Fri Oct 17, 2008 22:51    Post subject: Reply with quote

nwnx_sql.erf released with NWNX4 1.09 is outdated. The correct file can be downloaded here:
http://data.virusman.ru/nwn/nwnx4/nwnx_sql.erf-1.09.rar
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Xildjian



Joined: 08 Jan 2005
Posts: 100

PostPosted: Sun Oct 19, 2008 0:26    Post subject: Reply with quote

virusman wrote:
nwnx_sql.erf released with NWNX4 1.09 is outdated. The correct file can be downloaded here:
http://data.virusman.ru/nwn/nwnx4/nwnx_sql.erf-1.09.rar


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
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Tue Oct 21, 2008 0:33    Post subject: Reply with quote

Xildjian wrote:
virusman wrote:
nwnx_sql.erf released with NWNX4 1.09 is outdated. The correct file can be downloaded here:
http://data.virusman.ru/nwn/nwnx4/nwnx_sql.erf-1.09.rar


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
View user's profile Send private message Visit poster's website Yahoo Messenger
Xildjian



Joined: 08 Jan 2005
Posts: 100

PostPosted: Tue Oct 21, 2008 3:13    Post subject: Reply with quote

virusman wrote:
Xildjian wrote:
virusman wrote:
nwnx_sql.erf released with NWNX4 1.09 is outdated. The correct file can be downloaded here:
http://data.virusman.ru/nwn/nwnx4/nwnx_sql.erf-1.09.rar


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! Twisted Evil 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
View user's profile Send private message
Xildjian



Joined: 08 Jan 2005
Posts: 100

PostPosted: Tue Oct 21, 2008 6:03    Post subject: Reply with quote

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
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Tue Oct 28, 2008 1:20    Post subject: Reply with quote

I'm getting the same error.
http://nwn.virusman.ru/trac/nwnx4/ticket/4
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
PNJ



Joined: 30 Jun 2007
Posts: 67

PostPosted: Mon Nov 03, 2008 16:07    Post subject: Reply with quote

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
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Mon Nov 03, 2008 16:21    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger
PNJ



Joined: 30 Jun 2007
Posts: 67

PostPosted: Mon Nov 03, 2008 19:55    Post subject: Reply with quote

Thank you, i will setup my PW and try it out.

Do you think there could be performance gain without madhoock?
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Mon Nov 03, 2008 23:01    Post subject: Reply with quote

PNJ wrote:
Do you think there could be performance gain without madhoock?
No.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Development 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