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 
 
Development Question

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development
View previous topic :: View next topic  
Author Message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Fri Jun 19, 2009 12:45    Post subject: Development Question Reply with quote

This question would probably be best answered by acaos, since he made a plugin that did what I am trying to do already, for linux. But if anyone else knows the answer, feel free to chip in.

Question: How did you go about finding the location of the Feats in active memory for players in the nwn server process.

I have just managed to bootcamp my macbook to a 32bit XP, so I have my development environment back again, so I would like to have a go at trying to get some sort of inMemory editting plugin working for Win32 servers.


I was just wondering what values you searched for, in order to find the location of the feats.

Eg - Were the feat values, following some sort of pattern, eg - Hex'd values of what was in the feat.2da file?


Any advice, or information about how you went about doing this, would be really appreciated.
Back to top
View user's profile Send private message
Fireboar



Joined: 17 Feb 2008
Posts: 323

PostPosted: Fri Jun 19, 2009 17:32    Post subject: Reply with quote

I believe what he did was use a command like (gdb) info functions to list each method and their addresses, then find one that looks like it is triggered by the feat, hook it and see what happens.
Back to top
View user's profile Send private message
acaos



Joined: 08 May 2007
Posts: 153

PostPosted: Fri Oct 02, 2009 23:43    Post subject: Reply with quote

Fireboar is correct.

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



Joined: 04 Jun 2006
Posts: 415

PostPosted: Sat Oct 03, 2009 6:53    Post subject: Reply with quote

As far as win32, symbols (specifically .map files) have been known to float amongst the devs, so it works quite similarly. Before I had those, I generally found a function whose name looked relevant in Linux, then tried to find a similar-looking function in win32 (hardcoded string references are a big help there).
_________________
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
addicted2rpg



Joined: 01 Aug 2008
Posts: 106

PostPosted: Tue Oct 27, 2009 5:21    Post subject: Reply with quote

gdb... I was wicked with that thing in my operating systems class back in the "glory days" of university. I honestly can't even remember a single command from it now; it has been *so* long I have done any debugging on a nix platform. 15 years maybe? edit: I think I remember "bp" Razz


Hehehe, anyway this is a windows question right? Ummmmmmmm I dunno! But! I remember I looking for something else and saw them awhile back and thought "oh cool it looks like its loading the 2DAs....."...

As far as the heap is concerned, I found it some offset from pGameObject where SetLocalString is being called on a the module object via GetModule(). I dumped about 100,000 bytes to file from that location and start noticing 2da content popping up.... or was it 500,000 bytes?.... I forget...


Now if you want the instruction image, i.e., the asm command that passes the address to where the 2da files will be loading to (for finding it more easily in the heap), you're on your own buddy Smile It can definitely can be done though. I see pointers to shit all the time it's just I am not very deft at isolating which one will be loading something like the 2das. I do think a text search in IDA though may be helpful though.
Back to top
View user's profile Send private message
Terra_777



Joined: 27 Jun 2008
Posts: 216
Location: Sweden

PostPosted: Fri Jan 22, 2010 19:38    Post subject: Reply with quote

Zebranky wrote:
As far as win32, symbols (specifically .map files) have been known to float amongst the devs, so it works quite similarly. Before I had those, I generally found a function whose name looked relevant in Linux, then tried to find a similar-looking function in win32 (hardcoded string references are a big help there).


How do I get and use these win32 symbols? I've been tracking around blindly in Olly using breakpoints and whatnot looking for ToggleMode and criticalhit to add to nwnx_events.
_________________
I dun have any signature, I'm happy anyway.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Sat Jan 23, 2010 6:23    Post subject: Reply with quote

I'll email you. 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
Terra_777



Joined: 27 Jun 2008
Posts: 216
Location: Sweden

PostPosted: Sat Jan 23, 2010 12:19    Post subject: Reply with quote

Thankyou! Very Happy
_________________
I dun have any signature, I'm happy anyway.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
ArielT



Joined: 26 Jan 2010
Posts: 30

PostPosted: Tue Jan 26, 2010 13:02    Post subject: Reply with quote

<.< Can I join this special club too?
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows 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