PC Players: Enhancing Training Mode using macro programs

2

Comments

  • ShabroutShabrout Joined: Posts: 1,201 ✭✭✭
    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.
  • C2QC2Q Joined: Posts: 1,162
    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.
    AE 2012: Akuma (main), Evil Ryu, Guy, Yun, Yang, Ryu.
  • ShabroutShabrout Joined: Posts: 1,201 ✭✭✭
    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 ?

    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.
  • ShabroutShabrout Joined: Posts: 1,201 ✭✭✭
    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
    
  • ShabroutShabrout Joined: Posts: 1,201 ✭✭✭
    And about the sweep punish :

    2joy8::
    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.
  • LouieBHLouieBH Delta Red Joined: Posts: 572
    .kjgvbkhgck h this is amazing im going to buy a pc asap brb will follow the thread
  • ShabroutShabrout Joined: Posts: 1,201 ✭✭✭
    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.
  • C2QC2Q Joined: Posts: 1,162
    And about the sweep punish :

    2joy8::
    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.

    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.
    AE 2012: Akuma (main), Evil Ryu, Guy, Yun, Yang, Ryu.
  • ShabroutShabrout Joined: Posts: 1,201 ✭✭✭
    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.
  • ilitiritilitirit Joined: Posts: 5,203 ✭✭✭✭✭
    You don't need two keyboards. You can specify 2 different button configs on the same keyboard.
  • ShabroutShabrout Joined: Posts: 1,201 ✭✭✭
    Yes but not all keyboards can handle several keys at the same time.
  • ilitiritilitirit Joined: Posts: 5,203 ✭✭✭✭✭
    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.
  • ShabroutShabrout Joined: Posts: 1,201 ✭✭✭
    that makes sense yeap. Well I don't know why this cause a problem though.
  • ShabroutShabrout Joined: Posts: 1,201 ✭✭✭
    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)
    }
    
    All updated scripts available in the website : http://bit.ly/ssfivtool
  • imagiineimagiine Joined: Posts: 29
    I see there are 12 scripts to download from your website. Is this correct or am I missing something?
  • ShabroutShabrout Joined: Posts: 1,201 ✭✭✭
    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.
  • imagiineimagiine Joined: Posts: 29
    He thanks for your quick response :)

    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

    Thanks!
  • ShabroutShabrout Joined: Posts: 1,201 ✭✭✭
    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 ?
  • imagiineimagiine Joined: Posts: 29
    Ok so I tried a few more things.

    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?
  • ShabroutShabrout Joined: Posts: 1,201 ✭✭✭
    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 ?
  • imagiineimagiine Joined: Posts: 29
    Ok when I get home, I will give that one a try.

    Anything specific needed to set for this one?

    Thanks so far
  • ShabroutShabrout Joined: Posts: 1,201 ✭✭✭
    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).
  • BlueberryBlueberry Joined: Posts: 585 ✭✭
    Aw jeez, this thread just made me buy AE PC. Well played!
  • imagiineimagiine Joined: Posts: 29
    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?
  • imagiineimagiine Joined: Posts: 29
    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 :)
  • ShabroutShabrout Joined: Posts: 1,201 ✭✭✭
    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 :)
  • ShabroutShabrout Joined: Posts: 1,201 ✭✭✭
    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 :)
  • ilitiritilitirit Joined: Posts: 5,203 ✭✭✭✭✭
    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.
  • imagiineimagiine Joined: Posts: 29
    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 :)

    Works
  • imagiineimagiine Joined: Posts: 29
    It seems all works fine, autohotkey is putting out the keystrokes. I can start and stop the script with the arcade stick.

    But 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 :(
  • ShabroutShabrout Joined: Posts: 1,201 ✭✭✭
    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 :)
  • ShabroutShabrout Joined: Posts: 1,201 ✭✭✭
    there is an update on Bison corner pressure training :
    ; 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
    return
     
    

    copy 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.
  • imagiineimagiine Joined: Posts: 29
    Every time I hit the LB button on the stick, autohotkey produces the up command (key: F in my case) no spam, unless I spam it.

    As soon as I got ingame, only the keyboard F works to jump, and not the autohotkey F

    Strange right? any idea?
  • imagiineimagiine Joined: Posts: 29
    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.

    I will let you know.

    And thanks for the help
  • ShabroutShabrout Joined: Posts: 1,201 ✭✭✭
    Maybe we will have other people feedback on using this tool ? with or without trouble.
  • ilitiritilitirit Joined: Posts: 5,203 ✭✭✭✭✭
    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.
  • imagiineimagiine Joined: Posts: 29
    Ok it works now!

    Update 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 :)
  • imagiineimagiine Joined: Posts: 29
    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:
  • ShabroutShabrout Joined: Posts: 1,201 ✭✭✭
    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.
  • imagiineimagiine Joined: Posts: 29
    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:
  • imagiineimagiine Joined: Posts: 29
    And the previous frames to MS was:

    ONE_FRAME_IN_MS = 16.67
  • ShabroutShabrout Joined: Posts: 1,201 ✭✭✭
    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
  • imagiineimagiine Joined: Posts: 29
    Lets say I want her to do a walk forward for a little longer, every time the random number is (< 5) and then have her do:
    Spoiler:

    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:
    Spoiler:
  • imagiineimagiine Joined: Posts: 29
    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.
  • ShabroutShabrout Joined: Posts: 1,201 ✭✭✭
    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.
  • ShabroutShabrout Joined: Posts: 1,201 ✭✭✭
    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.
  • imagiineimagiine Joined: Posts: 29
    Ok il do that first then.

    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)

    Thanks again
  • imagiineimagiine Joined: Posts: 29
    Is it possible to maby assign specific numbers as a trigger?

    So 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 :)
  • ShabroutShabrout Joined: Posts: 1,201 ✭✭✭
    That's exactly what regular If else loop do.

    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.
  • imagiineimagiine Joined: Posts: 29
    That's exactly what regular If else loop do.

    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.
2
Sign In or Register to comment.