YesNoOk
avatar

CPS Ripping Tutorial (Read 3235 times)

Started by Messatsu, January 31, 2007, 09:38:25 AM
Share this topic:
CPS Ripping Tutorial
#1  January 31, 2007, 09:38:25 AM
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
READ FIRST: This might be an advanced tutorial.  I'm not novice-thinking enough on this to realize what is and isn't difficult.  I pretended people here know how to use Artmoney.  Post here for clarifications.  I might add pictures later if I can use the board's upload feature here.

Get game + emulator (Street Fighter Alpha 3 and Kawaks here).  Obtain Artmoney and make Artmoney file for SFA3 (we need X and Y positions for both players and animation scroller for P1 along with the clock to freeze it).  The clock is in a single address and goes from 99 down to 0.  It visually matches the value stored that we want to look for, so use 'exact value' on initial and subsequent searches.

One way of thinking of Artmoney in an abstraction is that say we have a thousand mostly unique people, we might have clones here.  Let's say I'm looking for Ryu among all of these people.  My first search I'll ask for males.  My search is now cut in half as all females are out of the pictures.  If I incorrectly used females, I won't be able to find Ryu because he won't be in the subset of people we search and ask questions for next.  Next I say people with a gi and so on and so forth until we get Ryu or a small enough sample of people that we can pick him out.  If I ever use incorrect characteristics or the value isn't what I'm expecting it to be, Ryu or the value I want to isolate is going to get lost among the current set of people.  I don't know if that helps, but that's an example I thought of.

The idea behind using Artmoney effectively to find addresses is to pause the game, search that moment of time.  This will give you a set of addresses.  We'll unpause until we are certain the value we are looking for has changed.  For instance, if the clock is 99, we will search 99.  If it changes to 98, then we can search for 98 or that the value decremented the last time we searched.  If you know the value hasn't changed, there is a filter for that too.

Your initial search will be in the range defined by Address Range.  This is usually preset to be big enough for any game, so we'll usually need to narrow it down once we find usable memory addresses, but we'll leave the default for now to make sure we aren't needlessly omitting data.  Each subsequent filtration will make data set smaller or the same size.  So eventually, with correct parameters, we can find anything we need. 

Unlike the clock value, which is displayed, we may not know how things are stored for a game, so a "good" search path may still wind us up with nothing.  When looking for the X Position of a player, moving left may indicate a decrease in that value, but it might go the other way.  In some games, there are parts of the screen that are subdivided so that if we cross that invisible boundary, we'll end up with bad results even though we may have had a path that would've given the address we are looking for.

You should be able to get the clock after a few filter iterations (use filter button).  If not, don't read the rest of this tutorial.  It'll be an absolute waste of time until you can find the clock as it is the easiest to get for any game that has one.  In SFA3, the X Position of the players can be between something like 280 and 1000, so you can do a ranged search for those values to narrow the set of data.  It decreases as movements are to the left and increases to the right, so you can use unknown value and which direction it is increasing.  In SFA3, the Y Position of the players can be upwards 40.  If a player moves upwards, it increase.  Downward movement decrease the Y position.  The ground is always 40 in that game.

Now the harder part is getting an animation address.  Due to the nature of the stance animation, we won't use it for searching.  Instead, you can use a normal attack because we know from the start of the animation that each value will increment by 20 until it finishes.  However, don't ever think to use something that looks like the return to stance frame(s), we don't know which animation that is a part of.  So when faced with those, skip making a filtration on them or just say value changed.  The ducking animation is the one we always can count on.  Usually it is only one frame and we can use value unchanged on subsequent filtrations.

I'm assuming the Artmoney file is complete with all the addresses needed here.  Choose characters and disable layers except layer 4.  Put P2 in one of the corners at X Position = 1000 and put him in the ground Y Position = -200.  Freeze these values.  Also freeze P1 at 808, 40 (may need adjusting for a different character).  Freeze the clock.

Use Shot Factory in Kawaks and disable all sprites except the player being ripped, but we should use the tiles to the right of the player's current sprites as those are being used for now by P2, who is off-screen, but the tiles shift based on usage or something so the tiles visually selected aren't static.  We can leave the life bar tiles to the left of the player because those can be easily cleaned later by pcxclean during the conversion.  Use the save state feature of your emulator.  In case of crashing, this saves a lot of time... unless faced with a program crash.

So now we want to configure artmoney in such a way that we don't need their window on-screen anymore.  Right-click on the Animation address and assign the hotkeys for incrementing a value.  For SFZ3, you'd want values of 20 and 4.  I chose , and . because they are close to the keys we need.  It also helps in writing at the same time as using artmoney because the keys aren't in the way except finishing a sentence.  This'll be explained later.  Freeze the animation address at the lowest value of one of the frames of the player's stance.  While we don't need artmoney on-screen (but still need the program), it can be minimized, but the value of the Animation may need manual changes should we run into a crashing value.

In CPS games, animations scroll by odd values.  Frames within an animation are 20 apart and every animation is seperated by 24 from the last animation's last frame.  Back to our key setup.  Ctrl + P does captures.  Shift + Space does frame skip, though we can sometimes use enter to unfreeze Kawaks if the animation is stable.  ./> gives us the next frame.  When we recognize the end of an animation ,/< will go to the next one.  The state restore key, F7, comes in really handy here.  Sometimes if we let an improper value linger too long, the game will crash.  If this ever happens, you can either go to the last correct value you remembered or press ,/< and F7 until you don't crash as all legal values are some multiple of four, you could only possibly skip over one valid frame, so you can backtrack by 20 here and check for a crash.

An animation end is either marked by the character disappearing or the same frame appearing over again.  Don't be mistaken by attacks as those have two or three frames to mark collisions off.  One last thing to note is that some animations will self-scroll on the same value, but 20 from that value the second frame doesn't show but an entirely new one does.  You'll have to frame skip to get these.  After you get the hang of the setup, ripping a character should only take less than an hour now.

Animget could have been used instead of the built-in screenshot editor, but we'd have to use a normal sized screen or one without any graphical filtrations but bigger.  This method is the fastest, but is worse for when something goes wrong.  You can get many duplicates or animget is going to capture you crashing and you mousing over to fix the crashing many times.


Many people risk their lives everyday by having Mugen.
Last Edit: January 31, 2007, 09:21:41 PM by Messatsu
Re: CPS Ripping Tutorial
#2  January 31, 2007, 01:58:18 PM
  • *****
    • Peru
Pics would help a lot, and I think you could elaborate more on how to obtain the Artmoney table since It's the most difficult part, so newbies won't be asking "Where can I get that Artmoney files?"
Re: CPS Ripping Tutorial
#3  January 31, 2007, 02:44:41 PM
  • ******
    • www.justnopoint.com/
Well for pictures on this you can basically look here. The topic explains step by step how to make anartmoney table and gives links to some.
Messatsu basically gave a review + added a few details of my super long tutorial. He's assuming one is already fairly aware of using artmoney.

All the addresses to SFA3 that Mess mentioned are here.
http://www.justnopoint.com/Tables/

EDIT: BTW I didn't know about ,/< & ./>
Those would have helped me alot a couple years back :P
Spoiler, click to toggle visibilty
Nice tutorial.
Last Edit: January 31, 2007, 03:40:35 PM by The Dreamslayer
Re: CPS Ripping Tutorial
#4  January 31, 2007, 08:05:30 PM
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
This is hopefully a multi-part tutorial where the eventual thing produced is a complete character... or at least a skeleton. :sugoi:  I'll elaborate on how I got the stuff in artmoney in an edit.


Many people risk their lives everyday by having Mugen.
Re: CPS Ripping Tutorial
#5  June 25, 2007, 11:46:58 PM
  • ****
  • A frame here, a pixel there.
Just an addition/note: From my work in SSF2T, it seems that SF2's animation values are different (I've heard that SF2 is coded quite differently from the rest of the CPS2 games). Within an animation, frame values seem to be 24 apart (rather than 20), and individual animations have spaces of 28 between them (rather than 24).
Re: CPS Ripping Tutorial
#6  June 25, 2007, 11:49:33 PM
  • ******
    • network.mugenguild.com/pots/
It's the same with Pocket Fighter, so maybe with other games as well.
Use anything you want from my works.  If you need to contact me use email, not private messages.
Re: CPS Ripping Tutorial
#7  August 03, 2007, 03:49:05 AM
  • **
  • He got his ass pwned
thnx dude