Mugen DEV Forum


  Reply to this topicStart new topicStart Poll

> Using Kawaks cheat engine to extract useful data
SMI
Posted: Sep 24 2002, 12:40 PM
Report PostQuote Post


Member
**

Group: Members
Posts: 62
Member No.: 111
Joined: 14-September 02



Well, maybe the admins will get mad on me for doing this, but I belive the information I'll be reposting here is worth of it.

Okay guys, I'm here to share some info I got from playing with the Kawaks "search cheat" utilities.
For doing this, you'll need some patience (to tell the truth, lots of patience), a good text editor that seek for changes in already open documents (that kind of feature will save lots of time. I use Ultra Edit 32 for that), a calculator that converts from hexadecimal to decimal notation (windows one do great) and some paper and a pen (to make the calculous).

Now, on the stuff (I'll be considering that you already know how the cheat search engine works).
I do suggest doing this work in the versus mode, with infinite time and energy cheats enabled.
How to do:
- Start a new cheat search (num lock);
- Pause the game and start a jump with the frame advance;
- Keep advancing frames until the char get out of the land;
- Use the "value increased since last sweep" option (shift + *) or "value changed since last sweep" (numpad *);
- Keep doing that until the char get near the highest point of the jump (the time when velocity will be zero) and then keep advancing frames until he starts falling. This will assure that you'll not miss the memory address where the char position y is located. Then continue searching (now the pos y shall be decreasing).
-Repeat the last two steps until you find the pos y memory location.

After getting the pos y, we can start to get the y velocities and the y acceleration to the char moves.
Now we will use the "Dump matches to file" option. It'll generate an archive named cheatcandidates.txt in Kawaks directory.
I'll do an example with Ryu from SSF2 and then give you some useful formulas.
I got the following info from kawaks:
Match 1: Address ff859e contains 28
1 matches
This is the equivalent value of pos y = 0 in SSF2.
Now, We'll find the jump neutral velocity for Ryu.
We jump with him and keep stepping frames until the first frame he get out of the land. Use the "Dump matches to file" option once again to get his pos y (if the editor you're using to see the file does not auto-reload changed files, you'll have to reload the file).
In the example I got that:
Match 1: Address ff859e contains 2f
1 matches
We'll assume that the vel y is the diference between the actual pos y and the value we had for pos y = 0 (in this case, 2f-28) . Remember that the data is in hexadecimal notation.
After converting it we'll have:
vel y = 47-40
vel y = 7 (do not forget to invert the value to negative to use in mugen).
Now we have the starting velocity. We'll get the accel next.
To get the accel, we'll need the time of the movement. To do that, keep advancing frames and counting the ticks until we get to the apice of the jump (where the vel y = 0). Remember to keep dumping the values to find whereas the vel y = 0 (actula frame pos y - last frame pos y = 0). Usually, this state lasts 3 ticks, so write down the info about the ticks and keep advancing until the pos y value changes (you'll find yourself using the tick time value for the second frame where vel y = 0).
Now, we use one of the magical formulas:

a = (v0-v)/t

where:
a : accel
v0 : starting velocity
v : current velocity (usually zero)
t : time.

Using the info I got from SSF2 Ryu, we'll have:
a = 7/25
a = 0.28 (a very slow deaccel)

I hope this info helps you in making better CPS2 chars.
As you can see, this method does not only aply to CPS2 games.

Now, some useful formulas from Edgar Roman's game physics tutorial:

The REAL Equations

This section explains the real equations. If you wish to do some more complex kinematics, this section will give you everything you need to resolve the equations. If not, then the above text is plenty for a lot of applications. For more explanations, consult a basic physics book.

We define three key variables with respect to an object: displacement, velocity, and acceleration.

Force is related to acceleration in the following way: (Incidentally, Newton's second law of motion)

F = M * a
In English: Force equals mass times acceleration.

So in our spaceship example, the hand of god can cause a small interceptor with little mass to accelerate faster than a huge dreadnought with much mass.

The relationship between displacement, velocity, and acceleration are:

s = s0 + v0*t + 0.5*a*t^2
The current displacement is equal to the initial displacement, plus the velocity times time, plus one-half times acceleration times time squared.

v = v0 + a*t
The current velocity equals the initial velocity plus acceleration times time.

v^2 - v0^2 = 2*a*s
The current velocity squared minus the initial velocity equals two times acceleration time displacement.

With these 4 magic equations, almost all physics motion problems can be resolved.

These equations are all based on constant acceleration (which fits in fine with most computer applications)

This is just to show how to get some more useful data using the Kawaks cheat engine.
Now think on how you can apply this.

Consider that you can also get values such as damage, hitpause or other data that you might consider useful using this method.

See ya, my friends.
SMI.


--------------------
[murray voice]
I'm a powerful demonic force!
I'm the harbinger of your doom!
And the forces of darkness will applaud me as I stride through the gates of hell carrying your head on a pike!
[/murray voice]
Mini ProfilePMEmail PosterUsers Website
Top
XGargoyle
Posted: Sep 24 2002, 03:07 PM
Report PostQuote Post


Super Saiyajin Ninja
*****

Group: Admin
Posts: 824
Member No.: 6
Joined: 13-September 02



I don't see any problem reposting that explanation here. I sincerely doubt that people would check now old EzBoard in order to read those codes (Even people didn't check it when dev was hosted at ezboard)


--------------------
user posted image
XGargoyle: Hoarding mugen creations since 1979
http://xgargoyle.mgbr.net
Mini ProfilePMUsers Website
Top
UltraROX
Posted: Sep 24 2002, 08:05 PM
Report PostQuote Post


"Custom Title"
*****

Group: Members
Posts: 662
Member No.: 38
Joined: 14-September 02



Actually, I did. Just to see how to do for CPS2, that can be useful for many characters. Anyway I don't really care since Neo-Geo debug bios is more efficient (with some maths).
Mini ProfilePMUsers WebsiteMSN
Top
Orochi Herman
Posted: Sep 29 2002, 03:10 PM
Report PostQuote Post


Sakura Kasugano's Hubby.
*****

Group: Admin
Posts: 619
Member No.: 2
Joined: 1-September 02



I need help in getting ones from lb2 because following SMI's example, I zeroed in instead on an address that controlled the sword trail flashing, instead of his Y vel. XD


--------------------
user posted image
ROTBRC - Like a quiet volcano...
Mini ProfilePMUsers WebsiteICQYahooMSN
Top

Topic Options Reply to this topicStart new topicStart Poll

 


- M.U.G.E.N Development Forum - Contact an admin - ELECBYTE - Shin Mugen -