This technique can be applied to many different fighting games on PC, including emulated ones (as long as they’re compatible with AutoIt) but since the script I created was for SSFIV I figured I’d just post it in this forum.
One of the problems with the training mode dummy is that it can only store 10 seconds of input, and because there’s no scripting capability in the game, you’re limited to one setup per recording. This is fine for testing canned stuff, but things get trickier if you want to test maybe something like a defensive technique that covers multiple mixup options.
We can simulate this behaviour with a tool like AutoIt.
AutoIt is a freeware program used for automating input (usually from keyboard or mouse). It’s already widely known and used in the TA combo vid scene.
The idea is to set the dummy to human keyboard control, and run an AutoIt script containing the commands to execute the setup or behaviour you want to playback. The beauty of AutoIt is that it’s completely scriptable, and you can create scripts that simulate unpredictable behaviour by using the Random function.
Here’s a simple script that simulate Ryu walking back and forth a random distance within a defined range and then randomly doing cr.mk. You can playback this script to test your spacing and whiff-punishment against this move.
Install AutoIt and paste the following code into a file called “Ryu test.au3”. Start SSFIV (in a Window) and go to training mode. Set player 2 keys accordingly (you can modify the script so the keys match your own settings). Then set a Ryu dummy to human control and select the keyboard for Player 2 (both players can use the keyboard). Right click on the au3 file and select “Run Script”. Switch back to SSFIV and the Ryu dummy will start walking back and forth, doing cr.mk randomly. Try to space yourself out of range of the move and whiff punish it whenever possible.
; This script assumes that the dummy will always be facing left
; Constant values
Const $ONE_FRAME_IN_MS = 16.67
Const $MAX_WALK_FRAMES = 20
Const $MIN_WALK_FRAMES = 5
; Change these to match your own key configuration
Const $LEFT = "c"
Const $RIGHT = "b"
Const $UP = "f"
Const $DOWN = "v"
Const $MK = "w"
; The "meat" of the script - it will loop forever
While(true)
; Walk left a random amount of time
$howLong = Random($MIN_WALK_FRAMES, $MAX_WALK_FRAMES, 1) * $ONE_FRAME_IN_MS
WalkLeft($howLong)
; Randomly do cr.mk
If Mod(Round($howLong), 5) = 0 Then
CrouchMediumKick()
EndIf
; Walk backward roughly the same distance, but modify
; the time because Ryu's backward speed is slower
; than his forward speed
$howLong += $ONE_FRAME_IN_MS * 6
WalkRight($howLong)
; Randomly do cr.mk
If Mod(Round($howLong), 4) = 0 Then
CrouchMediumKick()
EndIf
WEnd
Func WalkLeft($howLong)
Send ("{" & $LEFT & " down}")
Sleep($howLong)
Send ("{" & $LEFT & " up}")
EndFunc
Func WalkRight($howLong)
Send ("{" & $RIGHT & " down}")
Sleep($howLong)
Send ("{" & $RIGHT & " up}")
EndFunc
Func CrouchMediumKick()
Send ("{" & $LEFT & " down}")
Send ("{" & $DOWN & " down}")
Sleep($ONE_FRAME_IN_MS)
Send ("{" & $MK & " down}")
Sleep($ONE_FRAME_IN_MS)
Send ("{" & $MK & " up}")
Send ("{" & $LEFT & " up}")
Send ("{" & $DOWN & " up}")
EndFunc
This is just a basic example, but it’s fairly trivial to modify the code to do other stuff, like random fireballs, or whiffing stand short etc. Once you get used to the idea of scripting you can create more complex scripts, like 50/50 mixups, or tick throw/frame traps etc.
If you come up with something cool post it here.