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 
 
Detoured NWNX 1.09

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Development
View previous topic :: View next topic  
Author Message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Sat Mar 15, 2008 0:33    Post subject: Detoured NWNX 1.09 Reply with quote

Madcodehook, which helps NWNX into the server process, is no longer available for free, and has accumulated numerous other issues over the last few months. Therefore, I have implemented an alternative hooking mehod over the last few days.

Here is a first version of NWNX that uses Detours. It is similar to mckillroy's version on the vault, with even more changes under the hood (e.g. no DDE for interprocess communication any more). Thanks go to him for implementing NWNX with detours and sharing the code. Thanks go also to Skywing, whose code gave me some ideas how to get rid of DDE.

You can download the first preview release of 1.09 here:

NWNX 1.09 preview 1

I am interested to hear how it works for you, especially on Vista, 64 bit systems, and in Wine on Linux.

Btw, the updated MySQL plugin with reconnect functionality is included as well.
_________________
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: Sat Mar 15, 2008 11:48    Post subject: Re: Detoured NWNX 1.09 Reply with quote

Papillon wrote:
the updated MySQL plugin with reconnect functionality is included as well.

Does it include virusman object storage functions?
Back to top
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Sun Mar 16, 2008 9:32    Post subject: Re: Detoured NWNX 1.09 Reply with quote

TroveLord wrote:

Does it include virusman object storage functions?

No, I haven't looked into that yet.
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Grinning Fool



Joined: 12 Feb 2005
Posts: 264

PostPosted: Tue Mar 18, 2008 18:15    Post subject: Reply with quote

I'll grab this update during this week. Glad to hear about getting rid of DDE - I've been noticing sometimes a failure to connect because the server is too busy loading before it can handle the DDE message.
_________________
Khalidine, a NWN2 persistent world

Looking for volunteers.
Back to top
View user's profile Send private message
Grinning Fool



Joined: 12 Feb 2005
Posts: 264

PostPosted: Sat Mar 22, 2008 6:03    Post subject: Reply with quote

The good news: it seems to be working well on Windows. The bad news is that tihs version, too, is not able to 'see' the server after it launches under WINE.
_________________
Khalidine, a NWN2 persistent world

Looking for volunteers.
Back to top
View user's profile Send private message
Saulus



Joined: 24 Mar 2008
Posts: 7

PostPosted: Mon Mar 24, 2008 21:15    Post subject: Reply with quote

Working beautifully on Sundren under Windows Server 2003 R2 Enterprise x64 with the new 1.12 patch.

Really hope we can get virusman's object functions and leto working with this soon, it kind of sucks not having them, but at least things are running under x64!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Tue Mar 25, 2008 6:54    Post subject: Reply with quote

I'll be able to make my plugins compatible as soon as I get the sources.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Saulus



Joined: 24 Mar 2008
Posts: 7

PostPosted: Tue Mar 25, 2008 21:38    Post subject: Reply with quote

Any chance the source will be released soon Papillon?
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
mckillroy



Joined: 16 May 2005
Posts: 40

PostPosted: Mon Mar 31, 2008 14:30    Post subject: Reply with quote

Thanks a lot. I'll check it out ASAP, but I'm in a moving process in the moment. I'll report once checking is done.
_________________
/McKillroy
a.k.a Yorlik
Back to top
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Sat Apr 12, 2008 10:57    Post subject: Reply with quote

I have just updated the subversion repository with the new detours hooking code. Happy hacking !
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Caos81



Joined: 13 Apr 2008
Posts: 9

PostPosted: Sun Apr 13, 2008 13:04    Post subject: Reply with quote

It seems like the nwnx has some kind of issue when the NwN2 installation path contains chars like "(" or ")".

I've a server running on a WinXP Pro x64 machine. NwN2 installation path:

C:\Program Files (x86)\Atari\Neverwinter Nights 2

No way to make it run. The NWNX4 gui loads and gets closed immediately.

Moving the NwN2 installation folder somewhere else (es. C:\Neverwinter Nights 2) seems to be the solution atm.

Thanks Smile
Back to top
View user's profile Send private message
mckillroy



Joined: 16 May 2005
Posts: 40

PostPosted: Thu Jun 05, 2008 23:27    Post subject: Reply with quote

Just a quick feedback:

After importing in the latest MS Studio and recompiling from SVN today
I could start the server and log into the module on wine for Solaris 1.0-rc4 (self compiled) and Solaris Express Community edition build 90

BUT: I get an error message:
10:16:40 PM: ! Error: Server did not initialize properly (timeout).
and the time module (the only module I tried) didn't load.
I don't know what it was - still checking.
UPDATE: I raised the grace time to 240000 milliseconds and still got a timeout
- something is definitely wrong here (from a wine perspective)

Seems Shared Memory is buggy on wine .. I'll dig a bit...

I had to get rid of some left madchook linker dependencies in the project first since they gave me errors. Then the compile went smooth.

Restarting the server from NWNX was possible.


Cheers
_________________
/McKillroy
a.k.a Yorlik


Last edited by mckillroy on Mon Jun 16, 2008 23:34; edited 3 times in total
Back to top
View user's profile Send private message
mammalmaster



Joined: 15 Jun 2008
Posts: 1

PostPosted: Sun Jun 15, 2008 14:48    Post subject: Quick Flash Reply with quote

I just get a quick flash of the NWNX4 screen then it shuts down.

What are the file paths suppose to look like?
Back to top
View user's profile Send private message
mckillroy



Joined: 16 May 2005
Posts: 40

PostPosted: Tue Jun 17, 2008 7:32    Post subject: Reply with quote

It seems the hook does not get loaded, at least thats what the "guide" in
the demo module tells. Seems the hook failure is haunting me on Solaris
again.

Finally I removed the detours hooking in controller.cpp and used a standard
"CreateProcess" method to start the server from controller.cpp instead.
I used a PE editor to edit the Header of the nwn2server.exe to have the
nwn2server require the NWNX4_hook.dll and imported the dummy
function. After this I could start the server with nwnx4 (I could start it
before as well) and play the demo module with the time plugin and
-module (which I couldn't before.

I'm quite sure now its the hooking method which is still not working.
I don't know whats wrong here - even my old code which used to work on
Solaris 10 /wine 0.9.49 does not work on my new Solaris (SXCE, b90, Wine 1.04) install.

Maybe its something with wine ... I really have no plan.
The good news is that with this workaround it is possible to use NWNX4
on wine/Solaris, which should do on wine/Linux as well.
I'll do further testing.

I have one suggestion:
Could we please have the choice to use dll injection or PE editing to get
NWNX4_hook.dll loaded into the server executable ?
And a nwnx.ini file entry reflecting which method is used ? E.g.:
"dll_method=exehack | dllinject"
and a second ini entry with the the nwn2server executable name like
"executable=nwn2server_x.exe"
- so we could rename the PE-edited executable and not mess up our
PE-edited servers with the original ones, since an edited nwn2server will
require the hook to work at all.

This would allow us to use either a dll-injection mechanism or a
PE-edited server executable - at least as long as we don't have a really
reliable dll injection method for wine.

Cheers
McK.
_________________
/McKillroy
a.k.a Yorlik
Back to top
View user's profile Send private message
Elrahc



Joined: 30 Jan 2007
Posts: 10

PostPosted: Wed Jul 02, 2008 2:37    Post subject: Reply with quote

Seems to work just fine so far on the Windows XP 64-bit computer. Thank you! =)


~Elrahc
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
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