View previous topic :: View next topic |
Author |
Message |
the.gray.fox
Joined: 11 Dec 2009 Posts: 21
|
Posted: Fri Dec 11, 2009 2:42 Post subject: Interested to know more of NWNX |
|
|
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 |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Fri Dec 11, 2009 2:56 Post subject: Re: Interested to know more of NWNX |
|
|
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 |
|
|
the.gray.fox
Joined: 11 Dec 2009 Posts: 21
|
Posted: Sat Dec 12, 2009 16:19 Post subject: |
|
|
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 |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Sat Dec 12, 2009 17:43 Post subject: |
|
|
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 |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Sat Dec 12, 2009 18:42 Post subject: |
|
|
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 |
|
|
Belsirk
Joined: 04 Sep 2009 Posts: 16
|
Posted: Sun Dec 13, 2009 19:35 Post subject: |
|
|
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 |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Sun Dec 13, 2009 19:58 Post subject: |
|
|
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 |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Sun Dec 13, 2009 21:39 Post subject: |
|
|
And Windows was mine (when I ran a server) for the same reason. Also because I can barely use gdb. _________________ 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 |
|
|
|