View previous topic :: View next topic |
Author |
Message |
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Fri Jun 19, 2009 12:45 Post subject: Development Question |
|
|
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 |
|
|
Fireboar
Joined: 17 Feb 2008 Posts: 323
|
Posted: Fri Jun 19, 2009 17:32 Post subject: |
|
|
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 |
|
|
acaos
Joined: 08 May 2007 Posts: 153
|
Posted: Fri Oct 02, 2009 23:43 Post subject: |
|
|
Fireboar is correct.
Acaos |
|
Back to top |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Sat Oct 03, 2009 6:53 Post subject: |
|
|
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 |
|
|
addicted2rpg
Joined: 01 Aug 2008 Posts: 106
|
Posted: Tue Oct 27, 2009 5:21 Post subject: |
|
|
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"
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 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 |
|
|
Terra_777
Joined: 27 Jun 2008 Posts: 216 Location: Sweden
|
Posted: Fri Jan 22, 2010 19:38 Post subject: |
|
|
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 |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Sat Jan 23, 2010 6:23 Post subject: |
|
|
I'll email you. _________________ 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 |
|
|
Terra_777
Joined: 27 Jun 2008 Posts: 216 Location: Sweden
|
Posted: Sat Jan 23, 2010 12:19 Post subject: |
|
|
Thankyou! _________________ I dun have any signature, I'm happy anyway. |
|
Back to top |
|
|
ArielT
Joined: 26 Jan 2010 Posts: 30
|
Posted: Tue Jan 26, 2010 13:02 Post subject: |
|
|
<.< Can I join this special club too? |
|
Back to top |
|
|
|