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 
 
"NWNX2 Script hooks added" with patch 1.05
Goto page 1, 2  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Development
View previous topic :: View next topic  
Author Message
Larnak



Joined: 25 Sep 2006
Posts: 7
Location: Southern California

PostPosted: Thu Feb 22, 2007 22:48    Post subject: "NWNX2 Script hooks added" with patch 1.05 Reply with quote

Anyone know what this means to us?
http://nwn2forums.bioware.com/forums/viewtopic.html?topic=550131&forum=109
_________________
Adventures in the Shining South PW
Back to top
View user's profile Send private message Visit poster's website
Senalaya



Joined: 29 Dec 2004
Posts: 82
Location: Germany

PostPosted: Fri Feb 23, 2007 8:15    Post subject: Reply with quote

Chrismas and Eastern have fallen on the same day! Hell froze over!

That's actually very good news. Papillon had asked Obsidian to assist NWNX with clean hookpoints, etc.
Back to top
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Fri Feb 23, 2007 11:14    Post subject: Reply with quote

I've been discussing with OE since late 2005 about how they could improve multiplayer and persistent world support by supporting NWNX. After throwing some thoughts around (and most of them away), we came up with a simple method: We add some special script functions for NWNX that do exactly nothing when called on a server or single player client without NWNX installed. But if it is installed, it hooks those special functions and does it's thing. With this change, the SetLocalString function that I have been using in the past no longer needs to be hooked, which should improve NWNX's performance and versatility.

If the approach turns out to work well, more functions might follow.

One of the nice side effects of the new functions is that I can do away with the column buffer which provides space for NWNX to copy it's answer to NWN into. Also, it will be possible to read native types like integer or float directly, without converting to and from strings on the way.
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
TroveLord



Joined: 22 Nov 2006
Posts: 136
Location: Italy

PostPosted: Fri Feb 23, 2007 14:18    Post subject: Reply with quote

Does this mean we can get rid of the madCHook library?
Back to top
View user's profile Send private message
Grinning Fool



Joined: 12 Feb 2005
Posts: 264

PostPosted: Fri Feb 23, 2007 17:30    Post subject: Reply with quote

I have to wonder, if they're willing to go to this length to assist -- why wouldn't they have just supported a more direct interface? i.e., the server itself can load plugin DLLs, and make those functions available through a scripting interface.
_________________
Khalidine, a NWN2 persistent world

Looking for volunteers.
Back to top
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Fri Feb 23, 2007 18:07    Post subject: Reply with quote

That's a good question. This was among my suggestions, but the idea did not make it. I guess it's because they would actively support loading DLLs by doing so, and this a totally different thing to just adding some bogus functions that more or less do nothing until NWNX has been installed by the enduser. I guess it all boils down to support requirements and zots.

But, let's not forget they offered to help, and they did. That's the main point.

Oh and no, hooking is still necessary, though madcodehook might not be my first choice for the next version.
_________________
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: Fri Feb 23, 2007 23:48    Post subject: Reply with quote

Happy dance...

I hesitant to speculate on what this involves, but I gather it's something like Obsidian creating a SQLExecute(string s) scripting function - which does nothing unless you have NWNX4 running. To enable NWNX4 to use it Obsidian are 'exporting' the function calls in a type library (or something similar)

@Papillon,
Could you perhaps elaborate on what these initial functions will/could be?

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



Joined: 09 Aug 2006
Posts: 65

PostPosted: Mon Feb 26, 2007 20:52    Post subject: Reply with quote

Grinning Fool wrote:
I have to wonder, if they're willing to go to this length to assist -- why wouldn't they have just supported a more direct interface? i.e., the server itself can load plugin DLLs, and make those functions available through a scripting interface.


I begged for it too, back before beta even. They said it would have "Security" issues -_-
Back to top
View user's profile Send private message
Demetrious



Joined: 09 Dec 2006
Posts: 6

PostPosted: Wed Mar 21, 2007 14:14    Post subject: Reply with quote

Is anyone here running 1.05 beta?

I had code using NWNx and the Chat Plugin all up and operational in 1.04 but it didn't seem to transfer to 1.05 beta.

Is this expected with the OEI changes?
Back to top
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Mon Mar 26, 2007 18:58    Post subject: Reply with quote

No, this should not happen. In fact, it works for me. Do you get any log files ? If so, please post their contents into a separate thread.
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Demetrious



Joined: 09 Dec 2006
Posts: 6

PostPosted: Sat Mar 31, 2007 3:38    Post subject: Reply with quote

I'm pretty darn ignorant within NWNx - trying this for the community with really no personal interest. I can send you the module that functions in 1.04 but does not work in 1.05beta.
Back to top
View user's profile Send private message
sweetcornminer



Joined: 28 Nov 2006
Posts: 4

PostPosted: Mon Apr 02, 2007 8:43    Post subject: Reply with quote

I was just wondering if anyone knew what the 1.05 functions actually did?

For example:

void NWNXSetString( string sPlugin, string sFunction, string sParam1, int nParam2, string sValue );

What are all those parameters?

Its a bit of a mystery.
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Mon Apr 02, 2007 13:17    Post subject: Reply with quote

Hm, interesting.
Is there a "Get" function?
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
sweetcornminer



Joined: 28 Nov 2006
Posts: 4

PostPosted: Mon Apr 02, 2007 21:31    Post subject: Reply with quote

yup. Tell you what, I will list all of them:

float NWNXGetFloat( string sPlugin, string sFunction, string sParam1, int nParam2 );

int NWNXGetInt( string sPlugin, string sFunction, string sParam1, int nParam2 );

string NWNXGetString( string sPlugin, string sFunction, string sParam1, int nParam2 );

void NWNXSetFloat( string sPlugin, string sFunction, string sParam1, int nParam2, float fValue );

void NWNXSetInt( string sPlugin, string sFunction, string sParam1, int nParam2, int nValue );

void NWNXSetString( string sPlugin, string sFunction, string sParam1, int nParam2, string sValue );
Back to top
View user's profile Send private message
sweetcornminer



Joined: 28 Nov 2006
Posts: 4

PostPosted: Mon Apr 02, 2007 21:32    Post subject: Reply with quote

Theres no documentation in the toolset
(that I can find), perhaps when the final 1.05 comes out we might get some.
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 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