automated search memory

You can find tutorials and ask questions about memory editing here. You may also post any game-specific information you find (ie. cheat tables or addresses).
Post Reply
Message
Author
User avatar
lisa
Posts: 8330
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

automated search memory

#1 Post by lisa » Sat Jul 30, 2011 10:25 pm

I am trying to work out a way to auto search the ascii of the memory(for RoM)

Basically I want to find any occurances of model/fx/skill/***********.ros and copy it to a file so i can then add it to a table. The *** changes in size which may or may not make it harder.

Example would be these

Code: Select all

model/fx/skill/nature/_particle/fx_cyilnder_winds.ros

model/fx/skill/ice/act_cone01_c_hand.ros
Reason I want it automated is there are over 1200 occurances lol
I started doing it manually and got to 200 and then I was over it.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
lisa
Posts: 8330
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: automated search memory

#2 Post by lisa » Sun Jul 31, 2011 12:18 am

Had a little after thought of how I can work around this.

Do a search for the first part model/fx/ and then mask it for say 30 characters, then save that to a file.
Then I can use the replace that we discussed in another thread using
.ros(.*)model with
.ros model
so it will end up with the info
model/***.ros model/***.ros model/***.ros model/***.ros
and then I can go from there.

So far I only have the thought from using findPatternInProcess and so I would have to use the hex? so would need to convert the hex to ascii afterwards, not sure how to do that as a batch.
Would be easier if I could use findPatternInProcess with the ascii.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
lisa
Posts: 8330
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: automated search memory

#3 Post by lisa » Sun Jul 31, 2011 12:32 am

lol nvm I got it worked out now. the string.char converts it to ascii =)

Code: Select all

string.char(0x6D, 0x6F, 0x64, 0x65, 0x6C, 0x2F, 0x66, 0x78, 0x2F)
that is model/fx/

So it is actually looking for the ascii with that function.
I should be able to manage it from here
thanks for listening =)
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
lisa
Posts: 8330
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: automated search memory

#4 Post by lisa » Sun Jul 31, 2011 1:15 am

nope spoke to soon, seems I missunderstand the searching.

Back to drawing board lol

Ok latest theory, search for the model/fx/skill/ and then do a search for .ros

Then use the address for the m... and the .ros to return everything in the middle, somehow lol
Some sort of print for whats in between the 2 addresses including last address.
If I could do that though I could go back to original thought of searching for model/fx/skill and then printing from that address and for another 30 odd bytes after.

I have it searching and finding atm with this

Code: Select all

pattern = string.char(0x6D, 0x6F, 0x64, 0x65, 0x6C, 0x2F, 0x66, 0x78) --  model/fx
startloc = 0x5AF0714 -- where it starts to have the occurances of model/fx
mask = "xxxxxxxx" -- 8 spots for model/fx

found = findPatternInProcess(getProc(), pattern, mask, startloc)
then this to write to a file

Code: Select all

file:write(found.."\n")
which writes 95356692
So it deffinately needs work.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
Administrator
Site Admin
Posts: 4853
Joined: Sat Jan 05, 2008 4:21 pm

Re: automated search memory

#5 Post by Administrator » Sun Jul 31, 2011 5:55 am

I do suppose finding the 'model/fx/skill/' part with findPatternInProcess() would be the easiest way to start. Once you find that, you can just use a for loop to scan forward, byte for byte, and look for a NULL terminator (0x0). Once found, you know the bounds of your string; from the found pattern start address to the NULL terminator. That's how I would do it, anyways.

User avatar
lisa
Posts: 8330
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: automated search memory

#6 Post by lisa » Sun Jul 31, 2011 6:28 am

Sounds like a plan, I'll have a better look into it when I get home tonight. This memory stuff is still not easy for me lol
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
lisa
Posts: 8330
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: automated search memory

#7 Post by lisa » Sun Jul 31, 2011 9:57 pm

After a few hours of bashing my head against the wall on this, rock made a suguestion which was very very easy to do lol

1 day I might come back to this just so I can learn how to do it, for now though I have done what I wanted in another way =)
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest