View previous topic :: View next topic |
Author |
Message |
A
Joined: 19 Jun 2008 Posts: 8
|
Posted: Fri Jun 20, 2008 20:59 Post subject: Getting started |
|
|
I want try create my own NWNX plugin. What tools I need?
I will develop on Windows platform now, because wide support on internet forums, MSDN and Microsoft customer services.
My experiece with C/C++ is zero so I would appreciate some user-friendly dev environment.
I tried open-source solution Dev-C++ but failed compile NWNX sources.
I heard some plugins are made in Visual Studio 2005 but also read about need of Visual Studio 2006+ to compile NWNX source. I'm confused now.
I downloading MS Visual Studio 2008 now. I try out trial program and eventually buy it.
Some questions:
Can VS 2008 compile NWNX sources?
Do I still need download SDK mentioned somewhere on these forums? I guess not. |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Fri Jun 20, 2008 21:09 Post subject: |
|
|
I use VS 6 for NWNX2, VS2005 for NWNX4. I haven't tried to compile NWNX2 with VS2005/2008, but I think there may be some incompatibility issues. |
|
Back to top |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Sun Jun 22, 2008 2:30 Post subject: |
|
|
You won't be able to compile NWNX in Dev-C++ because it will be missing the MFC libraries. To my knowledge, only MSVC++ provides them. I also recommend Visual Studio 6 for NWNX2. _________________ 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 |
|
|
A
Joined: 19 Jun 2008 Posts: 8
|
Posted: Sun Jun 22, 2008 10:10 Post subject: |
|
|
Thank you for help
I got Visual Studio now and wow.. Lot of things to learn. I made some "Hello worlds" and simple math programs hehe.
Finally I compiled my first NWNX plugin. For now, it only put message to log file when called
Well, now I gotta find out how shut down NWServer, wish me luck.
A |
|
Back to top |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Fri Jan 23, 2009 2:45 Post subject: |
|
|
So I started my first plugin an I encountered to few problems:
How to rename my plugin from "demoplugin" to "files" ? I was able to rename output dll but then it didn't worked
How do I pass more then one parameters into one call? Do I have to do such a string list or there is another way?
Is there way to extend Parameters length when I input "readme.txt" and I expect that output will be longer?
And finally, when I catch that variable "READFILE" is set, can I somehow change value of another variable? _________________ Community Patch / NWNX Patch / NWNX Files / NWNX Connect |
|
Back to top |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Fri Jan 23, 2009 15:49 Post subject: |
|
|
ShaDoOoW wrote: | How to rename my plugin from "demoplugin" to "files" ? I was able to rename output dll but then it didn't worked |
Check the options under Project -> Settings. Not sure exactly what you're running into, but odds are it's something in there. If you still have trouble, I'll take a look at your project file if you want.
ShaDoOoW wrote: | How do I pass more then one parameters into one call? Do I have to do such a string list or there is another way? |
If you mean in the NWNX!PLUGINNAME!PARAMS call from NWScript, there is only one parameters string. You have to put your own delimiter in that string and parse it (using strtok() or similar).
ShaDoOoW wrote: | Is there way to extend Parameters length when I input "readme.txt" and I expect that output will be longer? |
I believe the NWNX core reserves space for a certain length of return data. I'm not sure of the length offhand, but my personal approach would be "try it and see if it works; if it doesn't, fix it".
ShaDoOoW wrote: | And finally, when I catch that variable "READFILE" is set, can I somehow change value of another variable? |
It is theoretically possible, but not easy. You're much better off just overwriting the data that was sent to NWNX. _________________ 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 |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Tue Jan 27, 2009 3:11 Post subject: |
|
|
Thx for your answers.
Zebranky wrote: | Check the options under Project -> Settings. Not sure exactly what you're running into, but odds are it's something in there. If you still have trouble, I'll take a look at your project file if you want. | LOL, problem was, that when I renamed it to nwnx_files, I forgot to remade nwn script to call NWNX!FILES .
Zebranky wrote: | ShaDoOoW wrote: | And finally, when I catch that variable "READFILE" is set, can I somehow change value of another variable? |
It is theoretically possible, but not easy. You're much better off just overwriting the data that was sent to NWNX. | I think this would be very easy if you use global variable and two setlocalstring calls into plugin. _________________ Community Patch / NWNX Patch / NWNX Files / NWNX Connect |
|
Back to top |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Tue Jan 27, 2009 11:50 Post subject: |
|
|
ShaDoOoW wrote: | I think this would be very easy if you use global variable and two setlocalstring calls into plugin. |
Hmm, that's a good point, though having to make a second call to get the output isn't as elegant as I'd like. I'd try to do it in one call first. _________________ 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 |
|
|
|