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 
 
Interested to know more of NWNX

 
Post new topic   Reply to topic    nwnx.org Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
the.gray.fox



Joined: 11 Dec 2009
Posts: 21

PostPosted: Fri Dec 11, 2009 2:42    Post subject: Interested to know more of NWNX Reply with quote

Hello -- I am new and interested in NWNX for NWN.

In past I have made some scripts for a small group of people.
Often I found myself to fight with the limited functionality exposed by nwscript.
For now I have succeeded to do what I was set to do.
But I know some limitations are invincible -- and no amount of foxyness can get results.

I wonder to what degree can nwnx help in this regard.
I see this tool exists for Windows and Linux. I am interested in the Windows platform.

Is it possible to intercept (in any way) an event such as the combining of stackable items?
Is it possible to query or modify the expiration time of spell effects and item properties?
Is it possible to move static objects after they spawned?
Is it possible to spawn sound objects?
Is it possible to recharge spells without resting or using ForceRest() ?

I have many more questions.
I am unsure if they fit with nwnx -- so I stop before I flood.

Thank you for the attention.

-fox
Back to top
View user's profile Send private message
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Fri Dec 11, 2009 2:56    Post subject: Re: Interested to know more of NWNX Reply with quote

the.gray.fox wrote:
Is it possible to intercept (in any way) an event such as the combining of stackable items?

Yes, and NWNX already does this (though its behavior after intercepting is not easy to customize).

To the rest, I'm not sure offhand. I think the answer to most of them is "yes, with caveats" (ranging from "PCs would have to leave and re-enter the area to see the changes" to "only on Linux right now").

One notable caveat in general is that NWNX only works with the dedicated server, not with the client, so it can't be used in single-player mode or with the client's built-in server.
_________________
Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/

<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.

<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for?
Back to top
View user's profile Send private message Visit poster's website
the.gray.fox



Joined: 11 Dec 2009
Posts: 21

PostPosted: Sat Dec 12, 2009 16:19    Post subject: Reply with quote

Thanks for the quick response, Zebranky.
I am so slow instead.

I have one more question -- technical.
Why are some plugin Linux only?
I know the two platforms can be very different (their API certainly are) -- and is often a pain to port code from one to the other, even for experts.
But my knowledge on the subject stops here.

The puzzling thing to me is: nwnx is a process invader, granting to plugins the privilege to run within that process.
(I am aware I am making it more simple than it actually is)

It hooks the nwn process successfully on both platforms.
Done that, is it not a matter of knowing where to read / where to write?

If it is known on Linux, why it is not on Windows?
Maybe it is a naive question.

Can you give an answer a profane can understand?
I am confident with C++ and Windows programming, but I would not know where to begin to write a nwnx program.

Thank you again.
Back to top
View user's profile Send private message
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Sat Dec 12, 2009 17:43    Post subject: Reply with quote

There is no technical reason for the difference, it's just a matter of developer time and effort. The hooks often need to be written differently for the two OSes, which can be challenging on both. It is a little easier on Linux for technical reasons (mainly the way the 'this' pointer is passed to functions), so many hooks require more code on Windows.
_________________
Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/

<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.

<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for?
Back to top
View user's profile Send private message Visit poster's website
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Sat Dec 12, 2009 18:42    Post subject: Reply with quote

Also, the Windows compiler sometimes optimizes the code using inlining. This is the reason why the development of NWNX Events for Windows stopped on early stages: the conversation hooks require a lot more effort on Windows due to inlining.
Finally, the Linux symbols have been there since 1.69 beta 6 (and even earlier - with 1.29), while Windows symbols have become available last summer.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Belsirk



Joined: 04 Sep 2009
Posts: 16

PostPosted: Sun Dec 13, 2009 19:35    Post subject: Reply with quote

ouch... so if someone want to explore and create custom plugins must think seriously on use Linux and have the server (and nwnx) running on Linux ?
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Sun Dec 13, 2009 19:58    Post subject: Reply with quote

No, except for inlining and 'this' pointer, it's almost the same. So you can choose any platform.
Linux is my primary platform just because my server runs on Linux.


Last edited by virusman on Sun Dec 13, 2009 23:58; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Sun Dec 13, 2009 21:39    Post subject: Reply with quote

And Windows was mine (when I ran a server) for the same reason. Also because I can barely use gdb. Smile
_________________
Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/

<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.

<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for?
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> General Discussion All times are GMT + 2 Hours
Page 1 of 1

 
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