Yep pretty much. look at the script in the Akuma forum.
One of those 3 keys is a STOP the loop key. so if the loop stop it's normal :) you only need after launching the script and the game, enter in training room or any VS session, set the opponent to use the good keyboard keys and then :
1) set the side (left or right arrow)
2) start the setup
I think you may want to use 2 keyboards because if you inputs keys at the same time the opponent do, it will not works as intended.
Ok I saw your post on the Akuma forums. So I set the first button to the sweep of the dummy and the other 2 to random buttons to start and stop.
Ok so the dummy works now, he throws fireballs and stuff. But he doesn't punish my whiffed sweep. He also doesn't do cr.mk xx fireball and I'm not sure if the jump ins should just be empty jumps (he never does an attack with the jump ins).
Great training though.
hmmm this last script was more intended to play the fireball war at mid range, not really to footsies him. Just bait a jump in and ultra punish it.
I'll check it again to see if I didn't forget something. The jump in should be a jump HK, then a neutral jump, a backdash and a jump back. And no there's no cr.mk xx fireball in this session. Not a footsie training :)
there's a mix of fireball, ex fireball, focus saving, jump in HK. that's all.
Shoudl I make a footsies version ? with footsies + jump in HK mix up ?
can be modified. Well at least the Wait(X) because if you don't see a jump HK, it's because the kick is too late.
That's why it's better to use P2 and let the script run P1 to see his inputs on screen and see what is wrong / mistimed in the script.
this should be a bit better in terms of timings, I felt like there wasn't enough fireball and too much jumps / saving.
But it's still the same number for the jump HK, only you could find the good number at the end, with your computer speed.
#include common.ahk
MIN_WALK_FRAMES := 5
MAX_WALK_FRAMES := 20
Fireball_War()
{
Global
Random, Guess, 0, 10
if(Guess > 3)
{
QC_X(forward, HP)
}
else
{
QC_X(forward, "EXP")
}
Wait(50)
}
do_the_setup()
{
Global
Run := "go"
While(Run = "go")
{
Random, Guess, 0, 30
ToolTip, value : %Guess%
; Walk forward a random amount of time
Random howLong, MIN_WALK_FRAMES, MAX_WALK_FRAMES
; Walk(forward, howLong)
; Walk(backward, 5)
; Randomly throw fireballs
if (Guess > 15) {
Fireball_War()
}
else if(Guess > 10)
{
Jump(forward)
Wait(15)
push(HK)
Wait(4)
release(HK)
push(backward)
push(UP)
Wait(50)
release(UP)
release(backward)
}
else if (Guess > 6)
{
push(DOWN)
push(MP)
Wait(4)
release(DOWN)
release(MP)
Wait(15)
}
else
{
Saving(backward, 40)
}
; Walk backward roughly the same distance, but modify
; the time because Ryu's backward speed is slower
; than his forward speed
howLong += 20
;Walk(backward, howLong)
}
}
; Set Ruy's punish if we whiff a sweep. This is a stick HK, modify to your HK button if you're not using a stick
2joy8::
Wait(12)
Sweep()
return
; controls for Cancel and side selection
2joy5:: ; the L1 button for a stick
do_the_setup()
return
2joy9:: ; the Select button for a stick
Run := "stop"
return
LEFT:: ; keyboard left arrow
forward := LEFT
backward := RIGHT
return
RIGHT:: ; keyboard right arrow
forward := RIGHT
backward := LEFT
return
If you did it well, replacing the 2joy8 with your own sweep key, every time you input a HK (standing or crouching) the opponent try to sweep it. But of course if he's doing something, any normals, at the same moment, he can't sweep you back. You see ? Just like in the real world. ^^
Again play as Player 2 and let the script run player 1 with inputs on to see what's going on. Playing in windowed mode at lower screen dimension make it easier to edit the script and reload it several time while checking in game the result.
I thought it could be a good idea to make something up for the sake of it.
Website : bit.ly/ssfivtool
If you see a better way to write any information, feel free to submit your text, my english is weak.
If you did it well, replacing the 2joy8 with your own sweep key, every time you input a HK (standing or crouching) the opponent try to sweep it. But of course if he's doing something, any normals, at the same moment, he can't sweep you back. You see ? Just like in the real world. ^^
Again play as Player 2 and let the script run player 1 with inputs on to see what's going on. Playing in windowed mode at lower screen dimension make it easier to edit the script and reload it several time while checking in game the result.
This might be a keyboard only thing but when I set that as my own sweep button, if I sweep nothing happens and the dummy sweeps instead. It basically disables my hk button entirely.
You have only 1 keyboard ? that might be the limitation in your case. You should get a spare keyboard usb to avoid this.
But if the dummy sweep, that mean the command is sent. And I don't see why your char would drop the sweep himself if the dummy have different sweep key. That's weird.
Yes but not all keyboards can handle several keys at the same time.
With macro tools this isn't a problem though. The program isn't literally pressing the button. Ghosting and blocking occurs because of how the keys wired on the PCB.
the last version of my "common.ahk" file
I improved the stop function, and created a release_all() function very hand to go back to neutral in some complicated functions. But I didn't had time to modify all the common function with it. They still work the same though, no worry.
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetKeyDelay 12 ; Not sure about usefullness
SendMode Input ; Not sure about usefullness
; Edit this variable if the setup scripts are wrong in terms of timings. Adding or removing a second can fix it.
ONE_FRAME_IN_MS = 16.67
; Edit these variables to match your keyboard mapping in game
LEFT := "q"
RIGHT := "d"
UP := "z"
DOWN := "s"
LP := "i"
MP := "o"
HP := "p"
LK := "k"
MK := "l"
HK := "m"
; Don't touch the below functions
release_all()
{
Global
release(backward)
release(forward)
release(UP)
release(DOWN)
release(LP)
release(MP)
release(HP)
release(LK)
release(MK)
release(HK)
}
Stop_it(Run)
{
Global
if(Run = "stop")
{
release_all()
exit
}
}
Switch_side() ; instantly switch the value of LEFT and RIGHT so the dummy do the moves on the right side. Usefull when your setup involve a cross up.
{
Global
if(forward = RIGHT)
{
forward := LEFT
backward := RIGHT
}
else
{
forward := RIGHT
backward := LEFT
}
}
Wait(frames)
{
Global
Letimer := frames * ONE_FRAME_IN_MS
Sleep, %Letimer%
}
push(button)
{
Global
Send {%button% down}
}
release(button)
{
Global
Send {%button% up}
}
Walk(direction, howLong)
{
Global
push(direction)
Wait(howLong)
release(direction)
Wait(2)
}
Footsy_Walk()
{
Global
MIN_WALK_FRAMES := 8
MAX_WALK_FRAMES := 18
Random howLong, MIN_WALK_FRAMES, MAX_WALK_FRAMES
Walk(forward, howLong)
howlong := howlong + 4 ; always more frames for walk backward as it's slower
Walk(backward, howlong)
}
Dash(direction)
{
Global
push(direction)
Wait(2)
release(direction)
Wait(2)
push(direction)
Wait(2)
release(direction)
Wait(6)
}
FADC(direction)
{
Global
push(MP)
push(MK)
push(direction)
Wait(3)
release(direction)
Wait(2)
push(direction)
Wait(3)
release(direction)
release(MP)
release(MK)
}
Saving(direction, howlong)
{
Global
push(MP)
push(MK)
Wait(howlong)
push(direction)
Wait(4)
release(direction)
Wait(4)
push(direction)
Wait(3)
release(direction)
release(MP)
release(MK)
Wait(20)
}
QC_X(direction, hit) ; hit = "LP", "MP", "HK", etc. for ex , use "EXP" or "EXK"
{
Global
push(DOWN)
Wait(2)
push(direction)
Wait(2)
release(DOWN)
Wait(2)
if(hit = "EXP")
{
push(LP)
push(MP)
}
else if(hit = "EXK")
{
push(LK)
push(MK)
}
else
{
push(hit)
}
Wait(2)
release(direction)
if(hit = "EXP")
{
release(LP)
release(MP)
}
else if(hit = "EXK")
{
release(LK)
release(MK)
}
else
{
release(hit)
}
Wait(6)
}
The_360(punch)
{
Global
push(forward)
Wait(1)
push(DOWN)
Wait(1)
release(forward)
Wait(1)
push(backward)
Wait(1)
release(DOWN)
Wait(1)
push(UP)
Wait(1)
release(backward)
Wait(1)
push(forward)
Wait(1)
release(UP)
Wait(1)
if(punch = "EXP")
{
push(MP)
push(HP)
Wait(2)
release(MP)
release(HP)
release(forward)
}
else if(punch = "EXK")
{
push(MKP)
push(HK)
Wait(2)
release(MK)
release(HK)
release(forward)
}
else
{
push(punch)
Wait(2)
release(punch)
release(forward)
}
}
The_720(punch)
{
Global
push(forward)
Wait(2)
push(DOWN)
Wait(2)
release(forward)
Wait(2)
push(backward)
Wait(2)
release(DOWN)
Wait(2)
push(UP)
Wait(2)
release(backward)
Wait(2)
push(forward)
Wait(2)
release(UP)
Wait(2)
push(DOWN)
Wait(2)
release(forward)
Wait(2)
push(backward)
Wait(2)
release(DOWN)
Wait(2)
push(UP)
Wait(2)
release(backward)
Wait(2)
push(forward)
Wait(2)
release(UP)
Wait(2)
if(punch = "EXP")
{
push(MP)
push(HP)
Wait(2)
release(MP)
release(HP)
release(forward)
}
else if(punch = "EXK")
{
push(MKP)
push(HK)
Wait(2)
release(MK)
release(HK)
release(forward)
}
else
{
push(punch)
Wait(2)
release(punch)
release(forward)
}
}
Jump(direction)
{
Global
if(direction = "neutral")
{
push(UP)
Wait(2)
release(UP)
Wait(2)
}
else
{
push(direction)
push(UP)
Wait(6)
release(direction)
release(UP)
Wait(2)
}
}
Throw(direction)
{
Global
push(direction)
push(LK)
push(LP)
Wait(5)
release(direction)
release(LK)
release(LP)
Wait(2)
}
Cr_MK()
{
Global
push(backward)
push(DOWN)
push(MK)
Wait(2)
release(MK)
release(backward)
release(DOWN)
}
Charge(position, direction, punch) ; position : standing/crouching, direction forward/UP punch or kick (EXP or EXK for ex)
{
Global
push(backward)
if(position = "crouching")
push(DOWN)
Wait(58)
if(direction <> "UP")
{
release(backward)
}
if(position = "crouching")
release(DOWN)
if(direction = "forward")
{
push(forward)
}
else if(direction = "UP")
{
push(UP)
}
Wait(2)
if(punch = "EXP")
{
push(LP)
push(MP)
}
else if(punch = "EXK")
{
push(LK)
push(MK)
}
else
{
push(punch)
}
Wait(2)
if(punch = "EXP")
{
release(LP)
release(MP)
}
else if(punch = "EXK")
{
release(LK)
release(MK)
}
else
{
release(punch)
}
if(direction <> "UP")
{
release(forward)
}
else
{
release(UP)
}
release(backward)
Wait(2)
}
Sweep() ; this sweep is plinked by default
{
Global
push(backward)
push(DOWN)
Wait(2)
push(HK)
Wait(1)
push(MK)
Wait(2)
release(MK)
release(HK)
release(backward)
release(DOWN)
}
Cr_MK_xx_Fireball(direction, punch)
{
Global
push(DOWN)
push(MK)
Wait(2)
push(direction)
Wait(2)
release(DOWN)
release(MK)
Wait(2)
push(punch)
release(direction)
Wait(4)
release(punch)
Wait(2)
}
SRK(direction, punch) ; works for any shoryu motion with punches or kicks : "EXP" to do an ex with punches, "EXK" for ex kicks, "LP", "MP", "HK", etc, for normals.
{
Global
push(direction)
Wait(4)
release(direction)
push(DOWN)
Wait(2)
push(direction)
Wait(2)
if(punch = "EXP")
{
push(LP)
push(MP)
}
else if(punch = "EXK")
{
push(LK)
push(MK)
}
else
{
push(punch)
}
release(direction)
release(DOWN)
Wait(2)
if(punch = "EXP")
{
release(LP)
release(MP)
}
else if(punch = "EXK")
{
release(LK)
release(MK)
}
else
{
release(punch)
}
Wait(2)
}
Teleport(direction, punch) ; punch = "punch" or "kick" to do the specified teleport.
{
Global
push(direction)
Wait(4)
release(direction)
push(DOWN)
Wait(2)
push(direction)
Wait(2)
if(punch = "kick")
{
push(LK)
push(MK)
push(HK)
}
else
{
push(LP)
push(MP)
push(HP)
}
release(direction)
release(DOWN)
Wait(2)
if(punch = "kick")
{
release(LK)
release(MK)
release(HK)
}
else
{
release(LP)
release(MP)
release(HP)
}
Wait(2)
}
ULTRA_2X_QC_PPP(direction) ; clean double quarter circle ultra, don't use it for kara ultra like those involving super jump cancels.
{
Global
push(DOWN)
Wait(2)
push(direction)
Wait(2)
release(DOWN)
Wait(2)
release(direction)
Wait(2)
push(DOWN)
Wait(2)
push(direction)
Wait(2)
release(DOWN)
Wait(2)
release(direction)
push(LP)
push(MP)
push(HP)
Wait(4)
release(LP)
release(MP)
release(HP)
Wait(6)
}
HC_forward(punch) ; "EXP" for ex punch, "EXK" for ex kick, "LP", "MP", "HK", etc for normals
{
Global
push(backward)
push(DOWN)
Wait(2)
release(backward)
Wait(2)
push(forward)
Wait(2)
release(DOWN)
Wait(2)
release(forward)
if(punch = "EXP")
{
push(LP)
push(MP)
}
else if(punch = "EXK")
{
push(LK)
push(MK)
}
else
{
push(punch)
}
Wait(2)
if(punch = "EXP")
{
release(LP)
release(MP)
}
else if(punch = "EXK")
{
release(LK)
release(MK)
}
else
{
release(punch)
}
Wait(2)
}
HC_backward(punch) ; "EXP" for ex punch, "EXK" for ex kick, "LP", "MP", "HK", etc for normal
{
Global
push(forward)
push(DOWN)
Wait(2)
release(forward)
Wait(2)
push(backward)
Wait(2)
release(DOWN)
Wait(2)
release(backward)
if(punch = "EXP")
{
push(LP)
push(MP)
}
else if(punch = "EXK")
{
push(LK)
push(MK)
}
else
{
push(punch)
}
Wait(2)
if(punch = "EXP")
{
release(LP)
release(MP)
}
Wait(2)
if(punch = "EXK")
{
release(LK)
release(MK)
}
else
{
release(punch)
}
Wait(2)
}
yes 12 scripts I wrote. But the point is to write yours at the end. Because you know, timing can change between 2 pc running the script, and then may need some update.
I have spend yesterday about 3 hours to try and get it to work, but without success.
I tried windowed mode, and fullscreen both doesnt seem to work.
Autohotkey script is running, cause when I open a notepad, it is typing by it self. It just doesnt seem to work ingame.
Im pretty sure it has to do with my key configuration in-game, at least that seems to be the most logical problem.
Just to make sure:
I installed autohotkey, put both the common and the actual script in my documents folder, started the script, started the game.
I use a fightstick to control my own character, and have autohotkey "use" the keyboard, I have set up both player 1 and player 2 key configs, like you have them in the script, but still no success.
Any idea what could be wrong?
This really seems like something awesome, and I hope you can tell me what could be wrong. I have local people here to play againsnt, but they are not really into practicing footsies for half an hour a day or more :P
All looks right in your description, if on notepad you see the right key combo that mean your setup installation and files location is right.
You can lauch the script after you enter training room though, no need to run it before.
You can self handle the second player with your keyboard ? (without the script running of course) to check if the keyboard works in game.
On most of my script there's a stick button allocated to the "start" on the training (and another button to end it, aka to end loops). Be sure you use it, but if you have the keyboard taping things in notepad that mean the training started though... stilll weird.
And finaly you set up the dummy to "human" control in training options ?
I figured out that it had to be set to 1_Joy insteadof 2_Joy. So I can now start and stop the script with the arcade stick.
The dummy is set to "human".
The strange thing is, while everything works, including the script.... it doesnt want to work. But when I press the buttons that I assigned in the "common.ahk" file my self (manualy) it works...
Maby the problem can be Im using a laptop?
So player 1 is set to arcade stick (me)
Player 2 is set to keyboard (autohotkey) I tried both keyboard config "1" and "2" but without success.
What I can try is to launch a different game maby, see if it works there, tho I see no reason why it would work there and not in SSF4.
Im at work now, but Il try a bit more after Im done here.
I really hope I get it to work, the scripting it self doesnt look to hard to learn, but it will be if I can even get it running :(
Any other idea?
P.S. I only tried "the RYU Standard footsie sweep training" with the "common" file that are in your downloads. But that shouldnt be a problem since autohotkey is outputting the keystrokes.
If I skip the part where you have to select sides for player "2" (by pressing left or right) the keystrokes should still move the character in-game right?
yes selecting orientation only help script to jump on you instead of away from you :) and to perform QCF instead of QCB.
Can you try the "Stick test " script to see if at least this test respond correctly ?
I just reinstalled autohotkey from scratch, new file downloaded in the official site. Installed it for 64 bit mode as prompted by the installer.
Next I downloaded my scripts common, ryu and the test stick one.
Extracted the ahk files in a single new folder on my desktop.
Re pluged my usb stick to be sure windows see it (after a restart it often forget my stick is here...).
Now I launched the stick test, it told me my stick was the n°1.
Then I edited my Ryu script with notepad to change 2joy9 entries by 1joy9, you get the picture :)
Lanched SSFIV (not windowed, not needed at all as far as you can hit the "windows" key to go back to desktop anytime), checked the command option to be sure the keyboards commands are the same in my script (should be by default).
Jumping on training room, put the dummy on human, test if dummy react to keyboard buttons.
Now I go back to desktop and launch the script (Ryu stuff).
Back in game, hit the select L1 button (4th punch unassigned button) on my stick, and Ryu stared to cr.mk loop but not moving forwad or backward at all. Then I pushed on the keyboard the left arrow and Ryu started to actualy play footsies :) (yeah now he knows where is the forward and backward).
Finaly hit the select button on your stick again and Ryu stop.
That's exactly what I just did, it should work the same no matter what kind of PC you use, even Apple, all you need is windows :) (even 32 bits of course, but then choose 32 bit when installing the software).
Ok well it seems like I have done all that, but somewhere still is something wrong.
Maby the problem is launching the script before starting SF. Then again, I also tried to stop the script while SF was running and restarted it, without luck :(
Il test some more when I get back home. It better works today.. :P Yesterday I spend so much time trying to make it work....
"Back in game, hit the L1 button (4th punch unassigned button) on my stick" What do you mean by this exactly? This is the start button for the script to start right? its the "PPP" button on my stick right now. It also makes my own (player 1) do a fierce kick, but this doesnt matter right? Or should I unbind that one from my stick?
Aw jeez, this thread just made me buy AE PC. Well played!
Same, but its not working for me (yet) but it really looks awesome. That it doesnt work, is probably my own fault anyway, probably some simple setting somewhere :P Im kinda bad with these kind of things, tho scripting is ok for me.
Maby try and get some new life in this thread, and see if there are people out there who could perhaps share more scripts. Tho I will do my best to make them my self as well, as soon as I get this working :)
yeah it dont matter is the button you use to start the loop is used or not, see the way I make the dummy punish your sweep by reacting to this button you press. (it will trigger even if you do a stand HK though... nothing is perfect with this tool :) )
You should maybe slipt this in several checks.
First check if autohotkey works as intended.
all you need is an ahk file with :
#include common.ahk
test()
{
Global
push(UP)
sleep, 40
release(UP)
}
1joy5::
test()
return
in the same folder with common.ahk of course. And supposed your stick is n°1 (check with the Stick test script before).
Now on a notepad window (even the script itself why not) put the cursor somewhere and try to activate the script with the L1 button on your stick (you launched the script already of course, you have the autohotkay green icone on your task bar).
If you see a "z" appear everytime you hit L1, all's good. If not, recheck all the parameters here. Your stick is what number ? the L1 button on it is really the button 5 ? if not find what number this is. You can update the script with another button there "1joy5" with 1joy1, play with this maybe you have a weird stick :)
It's really a pain in the ass to script at some point. you just can't resume some combos step by step with logical chain of action to write in order. Plink, 2in1, cancels, charge and buffering are hard to translate in separate lines. And because you have almost a total control of what the bot do, even too much control, means a lot of work for simple task. Think you have to tell him to push but also to RELEASE a button press before you can do something else with this button, same for directions. and for diagonals that the same x2...
Next is the timer issue. You can't just expect the processor to be perfect when you tell him "I say 1 frame = 16,7 ms" that's one thing.
But you HAVE to put those "wait" between button press or the game will never catch your release and still think the button is held down.
Once you got the hang of it it's a lot better but you'll spend 60% on a script only with those "wait" timer setting going back and forth to the game to test every single change :)
First try to get the CPU to output one move, like a jab. 9/10 it's because of input delay settings etc. The value seems to differ from configuration to configuration, but once you get a timing that works for your system everything else is a breeze.
yeah it dont matter is the button you use to start the loop is used or not, see the way I make the dummy punish your sweep by reacting to this button you press. (it will trigger even if you do a stand HK though... nothing is perfect with this tool :) )
You should maybe slipt this in several checks.
First check if autohotkey works as intended.
all you need is an ahk file with :
in the same folder with common.ahk of course. And supposed your stick is n°1 (check with the Stick test script before).
Now on a notepad window (even the script itself why not) put the cursor somewhere and try to activate the script with the L1 button on your stick (you launched the script already of course, you have the autohotkay green icone on your task bar).
If you see a "z" appear everytime you hit L1, all's good. If not, recheck all the parameters here. Your stick is what number ? the L1 button on it is really the button 5 ? if not find what number this is. You can update the script with another button there "1joy5" with 1joy1, play with this maybe you have a weird stick :)
Wait a minit you're saying that the software is mashing "z" (or whatever key you test) fine out of game (on notepad) but once back in training room, the char controlled by keyboard (the same keyboard hm ?) don't mash neutral jump ? (and of course "z" is neutral jump on your command option for this keyboard in game hm ? meaning if YOU mash "z" yourself, the gyu DO jump).
Now that's weird indeed.
By the way, I use to set the Player 1 as my dummy so I can see the input the script try to execute. Just a tip for later :)
Ok it seems they blocked DirectInput keystrokes before patch 2012. I have problems with my laptop to download. I installed the game from a friend, who was so lucky to buy it for 5 euros :P
Ima buy it today as well on steam, since my laptop is having problems with internet. So that seems to be the problem.
Aah I think I remember now, the first time the game was released many controllers just wouldn't work without the update patch. Even certain wireless keyboards. You needed to install xinput as a workaround. That could be the problem.
Since everything works now, I want to start learning to write my own scripts, some input would be nice :)
Especialy the random command ("Guess" command) is something I need to figure out.
The idea for this script is to have cammy do:
Footsie walk
Randomly poke with cr.HK (Either whiff punish, or since her cr.HK is -8 on block, punish with combo of choice, or simply sweep her.
Jump-in with MK, to Anti Air her.
And a low chance of her doing random spiral arrow (lets say 50% less then the jump-in MK)
Other things I could add:
Even a smaller chance to do random Cannon Spike (say a 5% chance overal)
1, 2 or 3 x jab (and random 1 jab, throw. 2 jabs throw)
Make it so that when ever I do a fireball she has a small chance to do EX Spiral Arrow, to get spacing better. (Fireball being a trigger kinda, but only a small chance lets say 10% of every fireball I throw)
I could ask you to make me scrips, but Id rather make em my self :)
But a little help to get started would be great.
I have so many good ideas for this, but scripting is kinda hard for now :P
Some things:
Spoiler:
#include common.ahk Loads the common.ahk files (should always be included)
do_the_setup()
{
Global
Run := "go"
While(Run = "go")
{
Random, Guess, 0, 60 (Can you explain please how this works, I have seen 0, 30 as well)
Footsy_Walk() (refers to common.ahk footsie walk script, If I include this, it makes sure the character is doing the footsie walk)
if (Guess > 30) { ; Randomly do cr.mk xx fireball (in order for it to do this less or more frequent, how can I change this?)
push(backward)
Wait(4)
release(backward) ; slight walk back to avoid SRK motion
Cr_MK_xx_Fireball(forward, HP)
Wait(14)
}
else if (Guess < 10) { ; Or randomly do jump in hk (same thing here for less or more frequent)
push(backward)
Wait(6)
release(backward) ; to avoid SRK instead of fireball
Jump(forward)
Wait(20)
push(HK)
Wait(18)
release(HK)
Jump(backward)
}
else
{
; Do nothing
}
}
}
; 2 because my stick is recognisez as the N°2 (no idea why...), joy for Joystick, 8 for button 8 (=HK)
;This syntax listen to the key, here HK on my stick, and do something, here a Sweep for the player that use the keyboard
; So everytime I inout HK the dymmy react with sweep after a 8 frames wait.
2joy8::
Wait(8)
Sweep()
return
; controls for Cancel and side selection
; This launch the setup, L1 button on the stick if you use the keyboard (separate keys that the dummy of course), change every 2joyX to your own keyboard keys
2joy5::
do_the_setup()
return
; This is teh Select button on the stick, and it stop the setup after the dummy finished his actual moves
2joy9::
Run := "stop"
return
; this is how I tell the dummy where I'm at, at his Left or Right so he knwo how to go "forward" and "backward", keep it like that it's teh same if you use the keyboard and don't use the arrow keys for your moves or the dummy's moves.
LEFT::
forward := LEFT
backward := RIGHT
return
RIGHT::
forward := RIGHT
backward := LEFT
return
Lets say I want to make this for cammy. The idea would be to punish Spiral Arrow's that I block. Practicing combos is one thing, actually pulling them of for a punish is another thing.
So lets say I want Cammy to do random Spiral Arrow's
I guess I would 1st have to include Spiral Arrow in the common.ahk file.
}
SpiralArrow(direction, Kick)
{
Global
push(DOWN)
Wait(2)
push(direction)
Wait(2)
push(MK)
Wait(2)
release(DOWN)
release(MK)
release(direction)
Wait(2)
_____________________________________
; Against Cammy
; Foosty Walk
; Spiral Arrow
; jump In MK, jump back
; Mission : Try to stay close for pressure, avoid sweep damage, punish random Spiral Arrow's and anti air her.
#include common.ahk
do_the_setup()
{
Global
Run := "go"
While(Run = "go")
{
Random, Guess, 0, 60
Footsy_Walk()
if (Guess > 30) { ; Randomly do cr.HK
push(backward)
Wait(4)
release(backward) ; slight walk back to avoid SRK motion
Cr_HK
Wait(14)
}
else if (Guess < 10) { ; Or randomly do jump in mk
push(backward)
Wait(6)
release(backward) ; to avoid SRK instead of fireball
Jump(forward)
Wait(20)
push(MK)
Wait(18)
release(MK)
Jump(backward)
} else
{
; Do nothing
}
}
}
Now where and how can I fit in the random Spiral Arrow?
My guess would be to put it at the marked (else)
So something like:
Wait(18)
release(MK)
Jump(backward) } else if (Guess < 10) { ;SpiralArrow(direction, Kick) (What should I set the Guess < 10 to? I want here to do this move not as frequent as the Jump Foward MK, so can I just set it to something like (Guess < 2) for example? { Global push(DOWN) Wait(2) push(direction) Wait(2) push(MK) Wait(2) release(DOWN) release(MK) release(direction) Wait(2)
Random is a command that define a new variable "_var_" with a random number between the range you decide.
The syntax is Random _var_ , min , max
There's a lot of information about scripting on the documentation on the autohotkey website.
Like loop, random, and general information about how to deal with variables etc.
There's no way to trigger anything with more than one button. In other way you can't ask the app to recognise a combination of several buttons.
You're training is quite the same as the Ruy 3 mid range mix up script I made. You can use this as a template.
There's old scripts that weren't made with the current version of the common.ahk file, so some may look like they could be upgraded, or may be off in timing but you know what to do then. I'll rewrite em all in some days because that's defo not serious to let it like that. Also I should stick with an universal frame number and go back to 16.68ms (iirc ??). Now I know I can set wait command using fractional numbers.
Ok i have been trying to make a simple cammy script. (based on the basics of the ryu footsie one)
; Against Cammy
; Foosty Walk
; cr.HK to punish with punish combo.
; jump In MK, jump back
; Mission : Try to stay close for pressure, avoid damage and anti air her.
; Randomly HP Spiral arrow, punish with punish combo.
; Randomly MK Cannon spike, BIG punish time.
Please tell me if this would work. I have not updated the common.ahk file (do I need to for this file to work?)
I hope it works!
Im not to lazy to learn how to make em my self, but all the help is appreciated :)
Spoiler:
; Against Cammy
; Foosty Walk
; cr.HK to punish with punish combo.
; jump In MK, jump back
; Mission : Try to stay close for pressure, avoid damage and anti air her.
; Randomly HP Spiral arrow, punish with punish combo.
; Randomly MK Cannon spike, BIG punish time.
#include common.ahk
do_the_setup()
{
Global
Run := "go"
While(Run = "go")
{
Random, Guess, 0, 60
Footsy_Walk()
if (Guess > 34) { ; Randomly do cr.hk
push(DOWN)
wait(2)
push(HK)
Wait(14)
release(DOWN)
release(HK)
}
else if (Guess < 8) { ; Or randomly do jump in mk
push(backward)
Wait(6)
release(backward) ; to avoid SRK instead of fireball
Jump(forward)
Wait(20)
push(MK)
Wait(18)
release(MK)
Jump(backward)
}
else if (guess < 5) { ; Spiral Arrow
{
Global
push(DOWN)
Wait(2)
push(direction)
Wait(2)
push(MK)
Wait(2)
release(DOWN)
release(MK)
release(direction)
}
else if (guess > 56) { ; Cannon Spike
Global
push(direction)
Wait(4)
release(direction)
push(DOWN)
Wait(2)
push(direction)
Wait(2)
push (MK)
wait (2)
release (DOWN)
release (MK)
release (direction)
}
}
}
; controls for Cancel and side selection
1joy5:: ; the L1 button for a stick
do_the_setup()
return
1joy9:: ; the Select button for a stick
Run := "stop"
return
LEFT:: ; keyboard left arrow
forward := LEFT
backward := RIGHT
return
RIGHT:: ; keyboard right arrow
forward := RIGHT
backward := LEFT
return
what's that ?? Cr_HK(forward, HK)
Use Sweep() included in common file instead. I wonder why you put the direction in your custom cr.HK shortcut.
This part isn't needed as you do a jump instead of a fireball in the native script (where walk forward plus fireball would do a SRK by mistake) :
push(backward)
Wait(6)
release(backward) ; to avoid SRK instead of fireball
And Global is a key that allow the use of external vars in a function. You could then include a Global at the beginning of every function you create but not in every If Else you type :)
This is a function:
function()
{
Global
...
...
}
And you need a bit more organization in the If Else sequences. The app will only check one time it a condition is true or false, then jump to the END of the entire IF loop avoiding any other ElseIF that are maybe true but redundant. If you start with If X > 35 and later add a Else If X > 89 you're doing it wrong and the app will never test the last condition because the first respond to the question just fine. If X is > 89 it's off course > 35 right ?
same for X < Y
You need to think of your hierarchy here. Exclusive -> general conditions.
if X < 10
do this
else if X < 20
do this
else if X < 30
do this
else
do that
what's that ?? Cr_HK(forward, HK)
Use Sweep() included in common file instead. I wonder why you put the direction in your custom cr.HK shortcut.
This part isn't needed as you do a jump instead of a fireball in the native script (where walk forward plus fireball would do a SRK by mistake) :
And Global is a key that allow the use of external vars in a function. You could then include a Global at the beginning of every function you create but not in every If Else you type :)
This is a function:
Ah ye fail :P he.. im still learning! day one
Ok so ye I should just use "sweep" and remove the direction ofcourse.
If you would have the time, and the will ofcourse could you perhaps change it so it would work, and perhaps add the Tick throw setup that I posted?
And when should I use "if" and "else if" hmmmm I will try and find this info my self, but if you could correct my script that would be great.
the Walk function already have a timing variable, if you add a wait (55) after it she'll sit here for 55 frames AFTER she walked forward 55 frames...
And you are doing your own function for Spiral arrow where it's just a QCF and there's already this QC_X function that do whatever fireball move you want. Forward or backward motion with kicks punch and even ex moves.
Anyway I suggest you to put this on the side for a moment and try to write separate script for each mixup you need, then when all is going smooth, you can make a single file for em all with the random loop. But that's only when you got all the parts ready.
yeah you need some read of programming language like php for example. If else loop are easy to learn and universal almost in many language. And just like in real talk, you will start with a "If" and only If you have another condition use a "Else If" :)
If you only have 2 conditions an "Else" alone is enough, if you have more conditions you chain em with "Else If" and finish by the single "Else".
It's really explained everywhere on the web. Just google "else if" :)
I can understand you're excited to use this new tool but you gotta work a bit for that :)
I'm too busy atm to do it for you, even for me it would take quite some time to make it smooth, like 2 hours at least. Split the task in separate scripts, easier task. Walk slowly. You need to understand the way to script moves before you start programming random behaviour that need programming knowledge.
Ye im pretty excited about all of this :) I always hoped for a better training mode, maby something they should add in the newly announced update to SSF4 AE (can be Ono troll tho)
if (Guess < 6) { spiral }
else if (Guess < 10) { spike }
else if (Guess < 30) { Sweep }
else { footsy }
This do exactly what you want. No need to ask for "between" when you script the right way :)
You have to understand that once 1 condition is right, the loop end and restart from the top with another random number to check.
If Guess is 4, the first condition is right, the other condition will never be checked. If Guess is 15, the first 2 conditions are wrong, the third will be right and end the loop, etc.
It's all about how you order your conditions to avoid overlapping the same "right" state. Just like I said before.
if (Guess < 6) { spiral }
else if (Guess < 10) { spike }
else if (Guess < 30) { Sweep }
else { footsy }
This do exactly what you want. No need to ask for "between" when you script the right way :)
You have to understand that once 1 condition is right, the loop end and restart from the top with another random number to check.
If Guess is 4, the first condition is right, the other condition will never be checked. If Guess is 15, the first 2 conditions are wrong, the third will be right and end the loop, etc.
It's all about how you order your conditions to avoid overlapping the same "right" state. Just like I said before.
Ye the order is clear now :)
Yesterday I tried some script I made for cammy, pretty much spiral, spike, sweep and footsies.
Ofcourse I got an error message when I started the script, but it was easy to locate the problem.
I took another look, went inside the common.ahk file and copy pasted the commands from there (QC_X etc)
Then I saw I made some mistakes with { and }, took care of that as well. And suprise suprise, it worked perfectly :D
her HK timing was a bit of compared to Ryu, so I changed 20 to 25 and the timing was much better. Ones you understand it a bit, its easy to make scripts, but it just takes a bit of time for me :P And I guess this isnt the hardest script to write as well.
Anyway im happy it works :) and cant wait to start making all kinds of training scripts :)
By adjusting some numbers, and the moves I can already make this "punish script" for all the characters, maby add a few other things later.
Comments
One of those 3 keys is a STOP the loop key. so if the loop stop it's normal :) you only need after launching the script and the game, enter in training room or any VS session, set the opponent to use the good keyboard keys and then :
1) set the side (left or right arrow)
2) start the setup
I think you may want to use 2 keyboards because if you inputs keys at the same time the opponent do, it will not works as intended.
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeOk so the dummy works now, he throws fireballs and stuff. But he doesn't punish my whiffed sweep. He also doesn't do cr.mk xx fireball and I'm not sure if the jump ins should just be empty jumps (he never does an attack with the jump ins).
Great training though.
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeI'll check it again to see if I didn't forget something. The jump in should be a jump HK, then a neutral jump, a backdash and a jump back. And no there's no cr.mk xx fireball in this session. Not a footsie training :)
there's a mix of fireball, ex fireball, focus saving, jump in HK. that's all.
Shoudl I make a footsies version ? with footsies + jump in HK mix up ?
this part of the script
Jump(forward) Wait(15) <----- this push(HK) Wait(4) release(HK) Wait(4) push(UP) Wait(30) release(UP) Wait(30) Dash(backward) Wait(14) Jump(backward) Wait(20)can be modified. Well at least the Wait(X) because if you don't see a jump HK, it's because the kick is too late.That's why it's better to use P2 and let the script run P1 to see his inputs on screen and see what is wrong / mistimed in the script.
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeBut it's still the same number for the jump HK, only you could find the good number at the end, with your computer speed.
#include common.ahk MIN_WALK_FRAMES := 5 MAX_WALK_FRAMES := 20 Fireball_War() { Global Random, Guess, 0, 10 if(Guess > 3) { QC_X(forward, HP) } else { QC_X(forward, "EXP") } Wait(50) } do_the_setup() { Global Run := "go" While(Run = "go") { Random, Guess, 0, 30 ToolTip, value : %Guess% ; Walk forward a random amount of time Random howLong, MIN_WALK_FRAMES, MAX_WALK_FRAMES ; Walk(forward, howLong) ; Walk(backward, 5) ; Randomly throw fireballs if (Guess > 15) { Fireball_War() } else if(Guess > 10) { Jump(forward) Wait(15) push(HK) Wait(4) release(HK) push(backward) push(UP) Wait(50) release(UP) release(backward) } else if (Guess > 6) { push(DOWN) push(MP) Wait(4) release(DOWN) release(MP) Wait(15) } else { Saving(backward, 40) } ; Walk backward roughly the same distance, but modify ; the time because Ryu's backward speed is slower ; than his forward speed howLong += 20 ;Walk(backward, howLong) } } ; Set Ruy's punish if we whiff a sweep. This is a stick HK, modify to your HK button if you're not using a stick 2joy8:: Wait(12) Sweep() return ; controls for Cancel and side selection 2joy5:: ; the L1 button for a stick do_the_setup() return 2joy9:: ; the Select button for a stick Run := "stop" return LEFT:: ; keyboard left arrow forward := LEFT backward := RIGHT return RIGHT:: ; keyboard right arrow forward := RIGHT backward := LEFT return- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like2joy8::
Wait(12)
Sweep()
return
If you did it well, replacing the 2joy8 with your own sweep key, every time you input a HK (standing or crouching) the opponent try to sweep it. But of course if he's doing something, any normals, at the same moment, he can't sweep you back. You see ? Just like in the real world. ^^
Again play as Player 2 and let the script run player 1 with inputs on to see what's going on. Playing in windowed mode at lower screen dimension make it easier to edit the script and reload it several time while checking in game the result.
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeWebsite : bit.ly/ssfivtool
If you see a better way to write any information, feel free to submit your text, my english is weak.
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeThis might be a keyboard only thing but when I set that as my own sweep button, if I sweep nothing happens and the dummy sweeps instead. It basically disables my hk button entirely.
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeBut if the dummy sweep, that mean the command is sent. And I don't see why your char would drop the sweep himself if the dummy have different sweep key. That's weird.
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeI improved the stop function, and created a release_all() function very hand to go back to neutral in some complicated functions. But I didn't had time to modify all the common function with it. They still work the same though, no worry.
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. SetKeyDelay 12 ; Not sure about usefullness SendMode Input ; Not sure about usefullness ; Edit this variable if the setup scripts are wrong in terms of timings. Adding or removing a second can fix it. ONE_FRAME_IN_MS = 16.67 ; Edit these variables to match your keyboard mapping in game LEFT := "q" RIGHT := "d" UP := "z" DOWN := "s" LP := "i" MP := "o" HP := "p" LK := "k" MK := "l" HK := "m" ; Don't touch the below functions release_all() { Global release(backward) release(forward) release(UP) release(DOWN) release(LP) release(MP) release(HP) release(LK) release(MK) release(HK) } Stop_it(Run) { Global if(Run = "stop") { release_all() exit } } Switch_side() ; instantly switch the value of LEFT and RIGHT so the dummy do the moves on the right side. Usefull when your setup involve a cross up. { Global if(forward = RIGHT) { forward := LEFT backward := RIGHT } else { forward := RIGHT backward := LEFT } } Wait(frames) { Global Letimer := frames * ONE_FRAME_IN_MS Sleep, %Letimer% } push(button) { Global Send {%button% down} } release(button) { Global Send {%button% up} } Walk(direction, howLong) { Global push(direction) Wait(howLong) release(direction) Wait(2) } Footsy_Walk() { Global MIN_WALK_FRAMES := 8 MAX_WALK_FRAMES := 18 Random howLong, MIN_WALK_FRAMES, MAX_WALK_FRAMES Walk(forward, howLong) howlong := howlong + 4 ; always more frames for walk backward as it's slower Walk(backward, howlong) } Dash(direction) { Global push(direction) Wait(2) release(direction) Wait(2) push(direction) Wait(2) release(direction) Wait(6) } FADC(direction) { Global push(MP) push(MK) push(direction) Wait(3) release(direction) Wait(2) push(direction) Wait(3) release(direction) release(MP) release(MK) } Saving(direction, howlong) { Global push(MP) push(MK) Wait(howlong) push(direction) Wait(4) release(direction) Wait(4) push(direction) Wait(3) release(direction) release(MP) release(MK) Wait(20) } QC_X(direction, hit) ; hit = "LP", "MP", "HK", etc. for ex , use "EXP" or "EXK" { Global push(DOWN) Wait(2) push(direction) Wait(2) release(DOWN) Wait(2) if(hit = "EXP") { push(LP) push(MP) } else if(hit = "EXK") { push(LK) push(MK) } else { push(hit) } Wait(2) release(direction) if(hit = "EXP") { release(LP) release(MP) } else if(hit = "EXK") { release(LK) release(MK) } else { release(hit) } Wait(6) } The_360(punch) { Global push(forward) Wait(1) push(DOWN) Wait(1) release(forward) Wait(1) push(backward) Wait(1) release(DOWN) Wait(1) push(UP) Wait(1) release(backward) Wait(1) push(forward) Wait(1) release(UP) Wait(1) if(punch = "EXP") { push(MP) push(HP) Wait(2) release(MP) release(HP) release(forward) } else if(punch = "EXK") { push(MKP) push(HK) Wait(2) release(MK) release(HK) release(forward) } else { push(punch) Wait(2) release(punch) release(forward) } } The_720(punch) { Global push(forward) Wait(2) push(DOWN) Wait(2) release(forward) Wait(2) push(backward) Wait(2) release(DOWN) Wait(2) push(UP) Wait(2) release(backward) Wait(2) push(forward) Wait(2) release(UP) Wait(2) push(DOWN) Wait(2) release(forward) Wait(2) push(backward) Wait(2) release(DOWN) Wait(2) push(UP) Wait(2) release(backward) Wait(2) push(forward) Wait(2) release(UP) Wait(2) if(punch = "EXP") { push(MP) push(HP) Wait(2) release(MP) release(HP) release(forward) } else if(punch = "EXK") { push(MKP) push(HK) Wait(2) release(MK) release(HK) release(forward) } else { push(punch) Wait(2) release(punch) release(forward) } } Jump(direction) { Global if(direction = "neutral") { push(UP) Wait(2) release(UP) Wait(2) } else { push(direction) push(UP) Wait(6) release(direction) release(UP) Wait(2) } } Throw(direction) { Global push(direction) push(LK) push(LP) Wait(5) release(direction) release(LK) release(LP) Wait(2) } Cr_MK() { Global push(backward) push(DOWN) push(MK) Wait(2) release(MK) release(backward) release(DOWN) } Charge(position, direction, punch) ; position : standing/crouching, direction forward/UP punch or kick (EXP or EXK for ex) { Global push(backward) if(position = "crouching") push(DOWN) Wait(58) if(direction <> "UP") { release(backward) } if(position = "crouching") release(DOWN) if(direction = "forward") { push(forward) } else if(direction = "UP") { push(UP) } Wait(2) if(punch = "EXP") { push(LP) push(MP) } else if(punch = "EXK") { push(LK) push(MK) } else { push(punch) } Wait(2) if(punch = "EXP") { release(LP) release(MP) } else if(punch = "EXK") { release(LK) release(MK) } else { release(punch) } if(direction <> "UP") { release(forward) } else { release(UP) } release(backward) Wait(2) } Sweep() ; this sweep is plinked by default { Global push(backward) push(DOWN) Wait(2) push(HK) Wait(1) push(MK) Wait(2) release(MK) release(HK) release(backward) release(DOWN) } Cr_MK_xx_Fireball(direction, punch) { Global push(DOWN) push(MK) Wait(2) push(direction) Wait(2) release(DOWN) release(MK) Wait(2) push(punch) release(direction) Wait(4) release(punch) Wait(2) } SRK(direction, punch) ; works for any shoryu motion with punches or kicks : "EXP" to do an ex with punches, "EXK" for ex kicks, "LP", "MP", "HK", etc, for normals. { Global push(direction) Wait(4) release(direction) push(DOWN) Wait(2) push(direction) Wait(2) if(punch = "EXP") { push(LP) push(MP) } else if(punch = "EXK") { push(LK) push(MK) } else { push(punch) } release(direction) release(DOWN) Wait(2) if(punch = "EXP") { release(LP) release(MP) } else if(punch = "EXK") { release(LK) release(MK) } else { release(punch) } Wait(2) } Teleport(direction, punch) ; punch = "punch" or "kick" to do the specified teleport. { Global push(direction) Wait(4) release(direction) push(DOWN) Wait(2) push(direction) Wait(2) if(punch = "kick") { push(LK) push(MK) push(HK) } else { push(LP) push(MP) push(HP) } release(direction) release(DOWN) Wait(2) if(punch = "kick") { release(LK) release(MK) release(HK) } else { release(LP) release(MP) release(HP) } Wait(2) } ULTRA_2X_QC_PPP(direction) ; clean double quarter circle ultra, don't use it for kara ultra like those involving super jump cancels. { Global push(DOWN) Wait(2) push(direction) Wait(2) release(DOWN) Wait(2) release(direction) Wait(2) push(DOWN) Wait(2) push(direction) Wait(2) release(DOWN) Wait(2) release(direction) push(LP) push(MP) push(HP) Wait(4) release(LP) release(MP) release(HP) Wait(6) } HC_forward(punch) ; "EXP" for ex punch, "EXK" for ex kick, "LP", "MP", "HK", etc for normals { Global push(backward) push(DOWN) Wait(2) release(backward) Wait(2) push(forward) Wait(2) release(DOWN) Wait(2) release(forward) if(punch = "EXP") { push(LP) push(MP) } else if(punch = "EXK") { push(LK) push(MK) } else { push(punch) } Wait(2) if(punch = "EXP") { release(LP) release(MP) } else if(punch = "EXK") { release(LK) release(MK) } else { release(punch) } Wait(2) } HC_backward(punch) ; "EXP" for ex punch, "EXK" for ex kick, "LP", "MP", "HK", etc for normal { Global push(forward) push(DOWN) Wait(2) release(forward) Wait(2) push(backward) Wait(2) release(DOWN) Wait(2) release(backward) if(punch = "EXP") { push(LP) push(MP) } else if(punch = "EXK") { push(LK) push(MK) } else { push(punch) } Wait(2) if(punch = "EXP") { release(LP) release(MP) } Wait(2) if(punch = "EXK") { release(LK) release(MK) } else { release(punch) } Wait(2) }All updated scripts available in the website : http://bit.ly/ssfivtool- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeI have spend yesterday about 3 hours to try and get it to work, but without success.
I tried windowed mode, and fullscreen both doesnt seem to work.
Autohotkey script is running, cause when I open a notepad, it is typing by it self. It just doesnt seem to work ingame.
Im pretty sure it has to do with my key configuration in-game, at least that seems to be the most logical problem.
Just to make sure:
I installed autohotkey, put both the common and the actual script in my documents folder, started the script, started the game.
I use a fightstick to control my own character, and have autohotkey "use" the keyboard, I have set up both player 1 and player 2 key configs, like you have them in the script, but still no success.
Any idea what could be wrong?
This really seems like something awesome, and I hope you can tell me what could be wrong. I have local people here to play againsnt, but they are not really into practicing footsies for half an hour a day or more :P
Thanks!
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeYou can lauch the script after you enter training room though, no need to run it before.
You can self handle the second player with your keyboard ? (without the script running of course) to check if the keyboard works in game.
On most of my script there's a stick button allocated to the "start" on the training (and another button to end it, aka to end loops). Be sure you use it, but if you have the keyboard taping things in notepad that mean the training started though... stilll weird.
And finaly you set up the dummy to "human" control in training options ?
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeI figured out that it had to be set to 1_Joy insteadof 2_Joy. So I can now start and stop the script with the arcade stick.
The dummy is set to "human".
The strange thing is, while everything works, including the script.... it doesnt want to work. But when I press the buttons that I assigned in the "common.ahk" file my self (manualy) it works...
Maby the problem can be Im using a laptop?
So player 1 is set to arcade stick (me)
Player 2 is set to keyboard (autohotkey) I tried both keyboard config "1" and "2" but without success.
What I can try is to launch a different game maby, see if it works there, tho I see no reason why it would work there and not in SSF4.
Im at work now, but Il try a bit more after Im done here.
I really hope I get it to work, the scripting it self doesnt look to hard to learn, but it will be if I can even get it running :(
Any other idea?
P.S. I only tried "the RYU Standard footsie sweep training" with the "common" file that are in your downloads. But that shouldnt be a problem since autohotkey is outputting the keystrokes.
If I skip the part where you have to select sides for player "2" (by pressing left or right) the keystrokes should still move the character in-game right?
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeCan you try the "Stick test " script to see if at least this test respond correctly ?
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeAnything specific needed to set for this one?
Thanks so far
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeNext I downloaded my scripts common, ryu and the test stick one.
Extracted the ahk files in a single new folder on my desktop.
Re pluged my usb stick to be sure windows see it (after a restart it often forget my stick is here...).
Now I launched the stick test, it told me my stick was the n°1.
Then I edited my Ryu script with notepad to change 2joy9 entries by 1joy9, you get the picture :)
Lanched SSFIV (not windowed, not needed at all as far as you can hit the "windows" key to go back to desktop anytime), checked the command option to be sure the keyboards commands are the same in my script (should be by default).
Jumping on training room, put the dummy on human, test if dummy react to keyboard buttons.
Now I go back to desktop and launch the script (Ryu stuff).
Back in game, hit the
selectL1 button (4th punch unassigned button) on my stick, and Ryu stared to cr.mk loop but not moving forwad or backward at all. Then I pushed on the keyboard the left arrow and Ryu started to actualy play footsies :) (yeah now he knows where is the forward and backward).Finaly hit the select button on your stick again and Ryu stop.
That's exactly what I just did, it should work the same no matter what kind of PC you use, even Apple, all you need is windows :) (even 32 bits of course, but then choose 32 bit when installing the software).
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeMaby the problem is launching the script before starting SF. Then again, I also tried to stop the script while SF was running and restarted it, without luck :(
Il test some more when I get back home. It better works today.. :P Yesterday I spend so much time trying to make it work....
"Back in game, hit the L1 button (4th punch unassigned button) on my stick" What do you mean by this exactly? This is the start button for the script to start right? its the "PPP" button on my stick right now. It also makes my own (player 1) do a fierce kick, but this doesnt matter right? Or should I unbind that one from my stick?
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeSame, but its not working for me (yet) but it really looks awesome. That it doesnt work, is probably my own fault anyway, probably some simple setting somewhere :P Im kinda bad with these kind of things, tho scripting is ok for me.
Maby try and get some new life in this thread, and see if there are people out there who could perhaps share more scripts. Tho I will do my best to make them my self as well, as soon as I get this working :)
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeYou should maybe slipt this in several checks.
First check if autohotkey works as intended.
all you need is an ahk file with :
in the same folder with common.ahk of course. And supposed your stick is n°1 (check with the Stick test script before).
Now on a notepad window (even the script itself why not) put the cursor somewhere and try to activate the script with the L1 button on your stick (you launched the script already of course, you have the autohotkay green icone on your task bar).
If you see a "z" appear everytime you hit L1, all's good. If not, recheck all the parameters here. Your stick is what number ? the L1 button on it is really the button 5 ? if not find what number this is. You can update the script with another button there "1joy5" with 1joy1, play with this maybe you have a weird stick :)
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeNext is the timer issue. You can't just expect the processor to be perfect when you tell him "I say 1 frame = 16,7 ms" that's one thing.
But you HAVE to put those "wait" between button press or the game will never catch your release and still think the button is held down.
Once you got the hang of it it's a lot better but you'll spend 60% on a script only with those "wait" timer setting going back and forth to the game to test every single change :)
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeWorks
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeBut ingame it just doesnt work. Now when I try to manually input the commands that the script is putting out, it works (typing my self)..
WHAAT IS WRONG :(
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeNow that's weird indeed.
By the way, I use to set the Player 1 as my dummy so I can see the input the script try to execute. Just a tip for later :)
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like; Against Dictator ; He'll pressure you with LK xx LK xx LK Scissor and a mix of st.HK / MK and grab ; Mission : Guard and find the best counter. #include common.ahk Scissor_pressure() { Global release_all() wait(2) dash(forward) push(DOWN) push(backward) wait(15) push(LK) Wait(2) release(LK) Wait(20.6) push(LK) Wait(2) release(LK) Wait(20.8) push(LK) Wait(2) release(LK) release(backward) push(forward) wait(2) push(LK) release(forward) wait(2) release(LK) push(backward) Wait(74) push(LK) Wait(2) release(LK) release(backward) push(forward) wait(2) push(LK) release(forward) wait(2) release(LK) push(backward) Wait(74) } Random, , 123456 do_the_setup() { Global Run := "" Loop { Random, Guess, 0, 30 if(Guess > 16) { Scissor_pressure() } else if(Guess > 5) { release(DOWN) wait(4) push(MK) wait(2) release(MK) wait(37) release_all() push(forward) push(LK) wait(2) release_all() push(backward) push(DOWN) wait(74) } else { release(DOWN) wait(4) push(HK) wait(10) release_all() walk(forward,38) push(HK) wait(2) release(HK) wait(28) dash(forward) wait(20) grab() wait(2) grab() wait(2) grab() wait(2) push(DOWN) push(backward) wait(60) } Stop_it(Run) } } 1joy8:: Wait(8) Sweep() return 1joy5:: do_the_setup() return 1joy9:: Run := "stop" return LEFT:: forward := LEFT backward := RIGHT return RIGHT:: forward := RIGHT backward := LEFT returncopy paste this, override the whole previous file. And update "common.ahk" with this :
ONE_FRAME_IN_MS = 15
I have better timing control with this number over the exact one.
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeAs soon as I got ingame, only the keyboard F works to jump, and not the autohotkey F
Strange right? any idea?
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeIma buy it today as well on steam, since my laptop is having problems with internet. So that seems to be the problem.
I will let you know.
And thanks for the help
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeUpdate 2012 was the problem, without it, it doesnt work :)
Now I just need to figure out the side selection and its all good.
If any of you have more scripts id love to have some more! Im gonna start making them as well, but il need to learn first how to do it.
So ye, thanks for this awesome training way :) And feel free to drop any scripts you dont mind to share :)
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeEspecialy the random command ("Guess" command) is something I need to figure out.
The idea for this script is to have cammy do:
Footsie walk
Randomly poke with cr.HK (Either whiff punish, or since her cr.HK is -8 on block, punish with combo of choice, or simply sweep her.
Jump-in with MK, to Anti Air her.
And a low chance of her doing random spiral arrow (lets say 50% less then the jump-in MK)
Other things I could add:
Even a smaller chance to do random Cannon Spike (say a 5% chance overal)
1, 2 or 3 x jab (and random 1 jab, throw. 2 jabs throw)
Make it so that when ever I do a fireball she has a small chance to do EX Spiral Arrow, to get spacing better. (Fireball being a trigger kinda, but only a small chance lets say 10% of every fireball I throw)
I could ask you to make me scrips, but Id rather make em my self :)
But a little help to get started would be great.
I have so many good ideas for this, but scripting is kinda hard for now :P
Some things:
#include common.ahk Loads the common.ahk files (should always be included)
do_the_setup()
{
Global
Run := "go"
While(Run = "go")
{
Random, Guess, 0, 60 (Can you explain please how this works, I have seen 0, 30 as well)
Footsy_Walk() (refers to common.ahk footsie walk script, If I include this, it makes sure the character is doing the footsie walk)
if (Guess > 30) { ; Randomly do cr.mk xx fireball (in order for it to do this less or more frequent, how can I change this?)
push(backward)
Wait(4)
release(backward) ; slight walk back to avoid SRK motion
Cr_MK_xx_Fireball(forward, HP)
Wait(14)
}
else if (Guess < 10) { ; Or randomly do jump in hk (same thing here for less or more frequent)
push(backward)
Wait(6)
release(backward) ; to avoid SRK instead of fireball
Jump(forward)
Wait(20)
push(HK)
Wait(18)
release(HK)
Jump(backward)
}
else
{
; Do nothing
}
}
}
; 2 because my stick is recognisez as the N°2 (no idea why...), joy for Joystick, 8 for button 8 (=HK)
;This syntax listen to the key, here HK on my stick, and do something, here a Sweep for the player that use the keyboard
; So everytime I inout HK the dymmy react with sweep after a 8 frames wait.
2joy8::
Wait(8)
Sweep()
return
; controls for Cancel and side selection
; This launch the setup, L1 button on the stick if you use the keyboard (separate keys that the dummy of course), change every 2joyX to your own keyboard keys
2joy5::
do_the_setup()
return
; This is teh Select button on the stick, and it stop the setup after the dummy finished his actual moves
2joy9::
Run := "stop"
return
; this is how I tell the dummy where I'm at, at his Left or Right so he knwo how to go "forward" and "backward", keep it like that it's teh same if you use the keyboard and don't use the arrow keys for your moves or the dummy's moves.
LEFT::
forward := LEFT
backward := RIGHT
return
RIGHT::
forward := RIGHT
backward := LEFT
return
Lets say I want to make this for cammy. The idea would be to punish Spiral Arrow's that I block. Practicing combos is one thing, actually pulling them of for a punish is another thing.
So lets say I want Cammy to do random Spiral Arrow's
I guess I would 1st have to include Spiral Arrow in the common.ahk file.
}
SpiralArrow(direction, Kick)
{
Global
push(DOWN)
Wait(2)
push(direction)
Wait(2)
push(MK)
Wait(2)
release(DOWN)
release(MK)
release(direction)
Wait(2)
_____________________________________
; Against Cammy
; Foosty Walk
; Spiral Arrow
; jump In MK, jump back
; Mission : Try to stay close for pressure, avoid sweep damage, punish random Spiral Arrow's and anti air her.
#include common.ahk
do_the_setup()
{
Global
Run := "go"
While(Run = "go")
{
Random, Guess, 0, 60
Footsy_Walk()
if (Guess > 30) { ; Randomly do cr.HK
push(backward)
Wait(4)
release(backward) ; slight walk back to avoid SRK motion
Cr_HK
Wait(14)
}
else if (Guess < 10) { ; Or randomly do jump in mk
push(backward)
Wait(6)
release(backward) ; to avoid SRK instead of fireball
Jump(forward)
Wait(20)
push(MK)
Wait(18)
release(MK)
Jump(backward)
}
else
{
; Do nothing
}
}
}
Now where and how can I fit in the random Spiral Arrow?
My guess would be to put it at the marked (else)
So something like:
Wait(18)
release(MK)
Jump(backward)
}
else if (Guess < 10) { ;SpiralArrow(direction, Kick) (What should I set the Guess < 10 to? I want here to do this move not as frequent as the Jump Foward MK, so can I just set it to something like (Guess < 2) for example?
{
Global
push(DOWN)
Wait(2)
push(direction)
Wait(2)
push(MK)
Wait(2)
release(DOWN)
release(MK)
release(direction)
Wait(2)
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeThe syntax is Random _var_ , min , max
There's a lot of information about scripting on the documentation on the autohotkey website.
Like loop, random, and general information about how to deal with variables etc.
There's no way to trigger anything with more than one button. In other way you can't ask the app to recognise a combination of several buttons.
You're training is quite the same as the Ruy 3 mid range mix up script I made. You can use this as a template.
There's old scripts that weren't made with the current version of the common.ahk file, so some may look like they could be upgraded, or may be off in timing but you know what to do then. I'll rewrite em all in some days because that's defo not serious to let it like that. Also I should stick with an universal frame number and go back to 16.68ms (iirc ??). Now I know I can set wait command using fractional numbers.
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like; Against Cammy
; Foosty Walk
; cr.HK to punish with punish combo.
; jump In MK, jump back
; Mission : Try to stay close for pressure, avoid damage and anti air her.
; Randomly HP Spiral arrow, punish with punish combo.
; Randomly MK Cannon spike, BIG punish time.
Please tell me if this would work. I have not updated the common.ahk file (do I need to for this file to work?)
I hope it works!
Im not to lazy to learn how to make em my self, but all the help is appreciated :)
; Against Cammy
; Foosty Walk
; cr.HK to punish with punish combo.
; jump In MK, jump back
; Mission : Try to stay close for pressure, avoid damage and anti air her.
; Randomly HP Spiral arrow, punish with punish combo.
; Randomly MK Cannon spike, BIG punish time.
#include common.ahk
do_the_setup()
{
Global
Run := "go"
While(Run = "go")
{
Random, Guess, 0, 60
Footsy_Walk()
if (Guess > 34) { ; Randomly do cr.hk
push(DOWN)
wait(2)
push(HK)
Wait(14)
release(DOWN)
release(HK)
}
else if (Guess < 8) { ; Or randomly do jump in mk
push(backward)
Wait(6)
release(backward) ; to avoid SRK instead of fireball
Jump(forward)
Wait(20)
push(MK)
Wait(18)
release(MK)
Jump(backward)
}
else if (guess < 5) { ; Spiral Arrow
{
Global
push(DOWN)
Wait(2)
push(direction)
Wait(2)
push(MK)
Wait(2)
release(DOWN)
release(MK)
release(direction)
}
else if (guess > 56) { ; Cannon Spike
Global
push(direction)
Wait(4)
release(direction)
push(DOWN)
Wait(2)
push(direction)
Wait(2)
push (MK)
wait (2)
release (DOWN)
release (MK)
release (direction)
}
}
}
; controls for Cancel and side selection
1joy5:: ; the L1 button for a stick
do_the_setup()
return
1joy9:: ; the Select button for a stick
Run := "stop"
return
LEFT:: ; keyboard left arrow
forward := LEFT
backward := RIGHT
return
RIGHT:: ; keyboard right arrow
forward := RIGHT
backward := LEFT
return
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeONE_FRAME_IN_MS = 16.67
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeUse Sweep() included in common file instead. I wonder why you put the direction in your custom cr.HK shortcut.
This part isn't needed as you do a jump instead of a fireball in the native script (where walk forward plus fireball would do a SRK by mistake) :
And Global is a key that allow the use of external vars in a function. You could then include a Global at the beginning of every function you create but not in every If Else you type :)
This is a function:
And you need a bit more organization in the If Else sequences. The app will only check one time it a condition is true or false, then jump to the END of the entire IF loop avoiding any other ElseIF that are maybe true but redundant. If you start with If X > 35 and later add a Else If X > 89 you're doing it wrong and the app will never test the last condition because the first respond to the question just fine. If X is > 89 it's off course > 35 right ?
same for X < Y
You need to think of your hierarchy here. Exclusive -> general conditions.
if X < 10
do this
else if X < 20
do this
else if X < 30
do this
else
do that
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeJabs_Thick_Throw(approach)
{
Global
Walk(forward, 55)
Wait(55)
push(DOWN)
push(backward)
Wait(2)
push(LP)
Wait(2)
release(LP)
Wait(14)
release(backward)
release(DOWN)
Wait(2)
Walk(forward, 10)
Throw(forward)
Somewhere I guess I should be able to add a timing command, I guess where the bold letters are should be the spot, one of the two?
Or I guess I could add this to the common.ahk file:
MIN_WALK_FRAMES := 8
MAX_WALK_FRAMES := 18
TICKTHROW_WALK_FRAMES := 55
So it would be:
else if (guess < 5) { ;Jabs_Thick_Throw(approach)
{
Global
Walk(forward, TICKTHROW_WALK_FRAMES)
push(DOWN)
push(backward)
Wait(2)
push(LP)
Wait(2)
release(LP)
Wait(14)
release(backward)
release(DOWN)
Wait(2)
Walk(forward, 10)
Throw(forward)
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeAh ye fail :P he.. im still learning! day one
Ok so ye I should just use "sweep" and remove the direction ofcourse.
If you would have the time, and the will ofcourse could you perhaps change it so it would work, and perhaps add the Tick throw setup that I posted?
And when should I use "if" and "else if" hmmmm I will try and find this info my self, but if you could correct my script that would be great.
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeAnd you are doing your own function for Spiral arrow where it's just a QCF and there's already this QC_X function that do whatever fireball move you want. Forward or backward motion with kicks punch and even ex moves.
Anyway I suggest you to put this on the side for a moment and try to write separate script for each mixup you need, then when all is going smooth, you can make a single file for em all with the random loop. But that's only when you got all the parts ready.
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeIf you only have 2 conditions an "Else" alone is enough, if you have more conditions you chain em with "Else If" and finish by the single "Else".
It's really explained everywhere on the web. Just google "else if" :)
I can understand you're excited to use this new tool but you gotta work a bit for that :)
I'm too busy atm to do it for you, even for me it would take quite some time to make it smooth, like 2 hours at least. Split the task in separate scripts, easier task. Walk slowly. You need to understand the way to script moves before you start programming random behaviour that need programming knowledge.
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeYe im pretty excited about all of this :) I always hoped for a better training mode, maby something they should add in the newly announced update to SSF4 AE (can be Ono troll tho)
Thanks again
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeSo instead of:
if (Guess > 6 { ;Spiral Arrow
Make it:
if (Guess = 1,2,3,4,5) { ; Spiral Arrow
if (Guess = 6,7,8,9,10) { ; Cannon Spike
if (Guess = 11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,29 { ; Sweep
Leaving open 30 to 60 for footsie walk
Or something like this:
if(myNumber.isBetween(1,5))
Is , a valid command for it?
I hope you know what I mean :)
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Likeif (Guess < 6) { spiral }
else if (Guess < 10) { spike }
else if (Guess < 30) { Sweep }
else { footsy }
This do exactly what you want. No need to ask for "between" when you script the right way :)
You have to understand that once 1 condition is right, the loop end and restart from the top with another random number to check.
If Guess is 4, the first condition is right, the other condition will never be checked. If Guess is 15, the first 2 conditions are wrong, the third will be right and end the loop, etc.
It's all about how you order your conditions to avoid overlapping the same "right" state. Just like I said before.
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree LikeYe the order is clear now :)
Yesterday I tried some script I made for cammy, pretty much spiral, spike, sweep and footsies.
Ofcourse I got an error message when I started the script, but it was easy to locate the problem.
I took another look, went inside the common.ahk file and copy pasted the commands from there (QC_X etc)
Then I saw I made some mistakes with { and }, took care of that as well. And suprise suprise, it worked perfectly :D
her HK timing was a bit of compared to Ryu, so I changed 20 to 25 and the timing was much better. Ones you understand it a bit, its easy to make scripts, but it just takes a bit of time for me :P And I guess this isnt the hardest script to write as well.
Anyway im happy it works :) and cant wait to start making all kinds of training scripts :)
By adjusting some numbers, and the moves I can already make this "punish script" for all the characters, maby add a few other things later.
- Spam
- Abuse
- Troll
0 • Off Topic Disagree Agree Like