View previous topic :: View next topic |
Author |
Message |
Funny
Joined: 09 Jan 2010 Posts: 1
|
Posted: Sun Jan 17, 2010 17:56 Post subject: NWNX.NET for Windows and Linux |
|
|
Hi@all,
i have made a .NET binding for NWNX with support for Linux and Windows. You can use the same assembly for both operating systems.
The linux version needs mono.
The windows version needs the .net framework sdk (i don't know why. i am not very good in c++).
Native nwnx plugins should still work.
HowTo:
- Replace the NWNX *.so/*.dll files with the original.
- Copy NWNXDotNetEngine.dll in the nwn directory.
Create an new assembly (a nwnxnet plugin). Add a reference to NWNXDotNetEngine.dll.
To add a new command, just create a class named "MyTestCommand". with parent type NWNXCommand and implement the abstract method [i]string Execute(string Parameter);[/b]. The Parameters are the content of sVar (see bellow). The class name equals sCommand (see bellow). Now you can make something in the Execute method and return a string result.
Call the command via:
string sCommand = "MyTestCommand";
string sVar ="MyVars";
SetLocalString(GetModule(), "NWNX!DOTNET!" + sCommand, sVar);
And get the result via:
GetLocalString(GetModule(), "NWNX!DOTNET!" + sCommand);
Complie this assembly and put it in the nwn directory. Now start nwnx...
This is a alpha version and there may some bugs. But i used this a it works on windows and linux as well.
Download: http://rapidshare.com/files/336759130/NWNXDotNetMono.rar
If is the someone can make the code nicer... You wellcome! |
|
Back to top |
|
|
jonesg
Joined: 11 Feb 2011 Posts: 1
|
Posted: Fri Feb 11, 2011 21:19 Post subject: |
|
|
I just (after spending the better half of a day looking for something similar) stumpled on this. I really apreciate what you have done here.
Will have a look through the code and may return with suggestions and/or questions.
But again thanks for looking into doing something like this!
--Jonesg |
|
Back to top |
|
|
Hialmar
Joined: 15 Jun 2005 Posts: 32
|
Posted: Thu Mar 10, 2011 12:15 Post subject: |
|
|
Thanks for this indeed.
That could be a good solution for my projects as well.
I'll try to port it to NWNX4. _________________ Hialmar, A Land Far Away Infrastructure Administrator |
|
Back to top |
|
|
|