Zerg Autobatching Idea

This is a discussion on Zerg Autobatching Idea within the Starcraft 2 Hacks, bots and tools board part of the Starcraft 2 forum category; Here is a simple and very imperfectly written script that displays the idea of "autobatching". This script functions based on ...

Page 1 of 5 123 ... LastLast
Results 1 to 10 of 42
  1. #1
    Darious4's Avatar
    Darious4 is offline Hacker
    Array
    Join Date
    Dec 2016
    Location
    San Francisco, CA
    Posts
    179
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    2
    Reputation
    136

    Zerg Autobatching Idea

    Here is a simple and very imperfectly written script that displays the idea of "autobatching". This script functions based on a hold system, so to when trigger key is toggled the key is being rapidly produced to maximize speed efficiency. This is used to support extremely fast worker+zergling que for mass production at a single given moment in-game. I utilized "global variables" so you can change hotkeys based on your StarCraft II settings with ease. The script below is set to my in-game settings which is the "grid" setup. This speed included gives a you a major advantage economically due to the mass production of drones, if you want to halt autobatching production press the trigger key to pause/resume. Zerg economic management is more difficult to keep track of then other races and also far more different, and having fully saturated bases, increases production and army value. With this script you are able to saturate bases at higher speeds than that is humanly possible.

    It has APM spikes of over 3000+ so don't be surprised when you have people commenting on your 1000+ average APM, it's ridiculous.

    Triggers::
    1.) ` = "Drone Production"
    2.)F2 = "Zergling Production"

    3.)F3 = "Roach Production"
    4.)F4 = "Hydra Production"
    5.)End = "Terminate Script"
    5.)Home = "Pause/Resume Script"


    Code:
    #IfWinActive, StarCraft II
    #NoEnv
    SendMode Input
    #SingleInstance Force
    SetTitleMatchMode 2
    #WinActivateForce
    SetControlDelay 1
    SetWinDelay 0
    SetKeyDelay -1
    SetMouseDelay -1
    SetBatchLines -1
    
    
    global Zerg_Auto_Worker_Toggle := false
    
    
    ;Hotkey variables
    global SC2_Hotkey_Hatchery := 1
    global SC2_Hotkey_Select_Larva := "q"
    global SC2_Hotkey_Build_Drone := "q"
    global SC2_Hotkey_Build_Overlord ="w"
    global SC2_Hotkey_Build_Zergling:= "e"
    global SC2_Hotkey_Build_Roach := "r"
    global SC2_Hotkey_Build_Hydra := "a"
    global SC2_Hotkey_TempUnitGroup := 9
    global SC2_Hotkey_Drone_Autobatching := `
    global SC2_Hotkey_Zergling_Autobatching := F2
    global SC2_Hotkey_Roach_Autobatching := F3
    global SC2_Hotkey_Hydra_Autobatching := F4
    global SC2_Unit_Composition1 := SC2_Unit_Composition1
     
    return
    
    
    
    
    
      $`::
    sleep, -1
    
    SendInput %SC2_Hotkey_Hatchery%
    SendInput %SC2_Hotkey_Select_Larva%
    sleep, -1
    {
    sleep, -1
    SendInput, %SC2_Hotkey_Build_drone%
    sleep -1
    SendInput %SC2_Hotkey_Hatchery%
    SendInput %SC2_Hotkey_Select_Larva%
    }
    
    Return
    
    
    
        
    
    
    
    
      
    $F2::
      SendInput %SC2_Hotkey_Hatchery%
    SendInput %SC2_Hotkey_Select_Larva%
    sleep, -1
    
    {
    SendInput, %SC2_Hotkey_Zergling_Autobatching%
    sleep, -1
    SendInput, %SC2_Hotkey_Build_Zergling%
    sleep, -1
    SendInput %SC2_Hotkey_Hatchery%
    SendInput %SC2_Hotkey_Select_Larva%
    }
    return
        
    
    
    
    
    
    
    
    
      $F3::
      
      
    
      SendInput %SC2_Hotkey_Hatchery%
    SendInput %SC2_Hotkey_Select_Larva%
    sleep, -1
    
    
    {
    SendInput, %SC2_Hotkey_Roach_Autobatching%
    sleep, -1
    SendInput, %SC2_Hotkey_Build_Roach%
    sleep, -1
    SendInput %SC2_Hotkey_Hatchery%
    SendInput %SC2_Hotkey_Select_Larva%
    }
    return
        
    
    
    
    
    
    
    
    
    
    
    
    return
     $F4::
      
      
    
    SendInput %SC2_Hotkey_Hatchery%
    SendInput %SC2_Hotkey_Select_Larva%
    sleep, -1
    
    
    {
    SendInput, %SC2_Hotkey_Hydra_Autobatching%
    sleep, -1
    SendInput, %SC2_Hotkey_Build_Hydra%
    sleep, -1
    SendInput %SC2_Hotkey_Hatchery%
    SendInput %SC2_Hotkey_Select_Larva%
    
    }
    return
        
    
    
    
    
    
    
    return
    
    
    Home::Pause
    End::ExitApp
    Also to those who are unaware this is written in AHK. https://autohotkey.com/download/
    Thanks to Vertumnus for several ideas

    Last edited by Darious4; 07-02-2017 at 05:48 AM. Reason: All Functions fully automated for mentioned units.

  2. The Following 3 Users Say Thank You to Darious4 For This Useful Post:


  3. #2
    lightdreamer is offline Member
    Array
    Join Date
    Apr 2017
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    1
    Reputation
    3
    TempUnitGroup? Which hotkey is that for?

  4. #3
    Darious4's Avatar
    Darious4 is offline Hacker
    Array
    Join Date
    Dec 2016
    Location
    San Francisco, CA
    Posts
    179
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    2
    Reputation
    136
    "Temporary Unit Group" is used for a hotkey to refer back to your hatchery hotkey. You can set the TempUnitGroup to anything but, in this case it is important to constantly return to your hatcheries for more production. In a solid economic macro game, you could achieve a three fully saturate bases in under 5 minutes easily with this "autobatching" technique that pumps out drones extremely quickly. I have more to add to the script than just fast drone and zergling batching but, roaches, hydras, and mutalisks that make up high numbers in a zerg army that could be pumped out very quickly with a fast double click of a hotkey you can have 25+ roaches in production plus more. If you use the script excessively you can end up with too many drones or army than you can handle.
    Last edited by Darious4; 06-17-2017 at 11:15 PM.

  5. #4
    liij is offline Wannabe Member
    Array
    Join Date
    Nov 2014
    Posts
    8
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    4
    Reputation
    1
    Deleted, because there is no maphack available..
    Last edited by liij; 06-18-2017 at 05:20 PM.

  6. #5
    Darious4's Avatar
    Darious4 is offline Hacker
    Array
    Join Date
    Dec 2016
    Location
    San Francisco, CA
    Posts
    179
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    2
    Reputation
    136
    Deleted, because there is no maphack available..
    Well that isn't a good excuse because that script ( didn't get to execute it do to being on vacation) was absolutely astounding. It was well architected and well-thought out, and the tremendous amount of effort and work put into it. Please, @liij, repost that god-like script! It was incredible to look at and could help a lot of members of the community and including myself.

  7. #6
    lightdreamer is offline Member
    Array
    Join Date
    Apr 2017
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    1
    Reputation
    3
    Tried the script and it works perfectly on grid but when I try to adapt it to my core lite hotkey layout, it acts weird. It will try to select both the pneumatized carapace upgrade and the lair upgrade instead of select larva (using the hotkey "p" and "e" respectfully since if I disable them, they don't get selected anymore and neither do the larva hotkey), even though I already changed the hotkey to "Space". And if I have an overlord in my "a" or "s" control group, it will get selected instead.

    Code:
    #NoEnvSendMode Input
    #SingleInstance Force
    SetTitleMatchMode 2
    #WinActivateForce
    SetControlDelay 1
    SetWinDelay 0
    SetKeyDelay -1
    SetMouseDelay -1
    SetBatchLines -1
    
    
    global Zerg_Auto_Worker_Toggle := false
    
    
    
    
    
    
    
    
    
    
    ;Hotkey variables
    
    
    
    
    global SC2_Hotkey_Hatchery := 2
    global SC2_Hotkey_Select_Larva := "Space"
    global SC2_Hotkey_Build_Drone := "Space"
    global SC2_Hotkey_Build_Zergling:= "d"
    global SC2_Hotkey_TempUnitGroup := 2
    global SC2_Hotkey_Drone_Autobatching := F2
    global SC2_Hotkey_Zergling_Autobatching := F3
    
    
    
    
    return
    
    
    
    
    
    
      $F2::
      
      
    
    
       SetBatchLines -1 
       SetKeyDelay -1
      
       
       {
       SendInput %SC2_Hotkey_Hatchery%
      
       SendInput %SC2_Hotkey_Select_Larva%
       
    }
    
    
    
    
    
    
    
    
    
    
    RepeatKey := !RepeatKey
    
    
    If RepeatKey
     SetTimer, SendTheKey, 10 ; The "10" here is the number of milliseconds between repeats.
    Else
     SetTimer, SendTheKey, Off
    
    
    Return
    
    
    
    
    SendTheKey:
    
    
    
    
    SendInput  %SC2_Hotkey_Drone_Autobatching%
    
    
    
    
       SendInput %SC2_Hotkey_Hatchery%
      
       SendInput %SC2_Hotkey_Select_Larva%
       
       SendInput %SC2_Hotkey_Build_Drone%
    
    
    Return
    SendInput  %SC2_Hotkey_Drone_Autobatching%
    
    
    SendInput  %SC2_Hotkey_TempUnitGroup%
    return
    
    
      $F3::
      
      
    
    
       SetBatchLines -1 
       SetKeyDelay -1
      
       Loop, 10
       {
       SendInput %SC2_Hotkey_Hatchery%
      
       SendInput %SC2_Hotkey_Select_Larva%
       
       SendInput %SC2_Hotkey_Build_Zergling%
    }
    
    
    
    
    
    
    
    
    RepeatKey := !RepeatKey
    If RepeatKey
     SetTimer, SendTheKey, 10 ; The "10" here is the number of milliseconds between repeats.
    Else
     SetTimer, SendTheKey, Off
    
    
    Return
    
    
    
    
    
    
    
    
       SendInput %SC2_Hotkey_Zergling_Autobatching%
       SendInput %SC2_Hotkey_Hatchery%
      
       SendInput %SC2_Hotkey_Select_Larva%
       
       
       
    
    
    Return
    SendInput  %SC2_Hotkey_Zergling_Autobatching%
    
    
    SendInput  %SC2_Hotkey_TempUnitGroup%
    return
    Nevermind, I know the problem. It types "space" as in s-p-a-c-e instead of actually pressing the button. Those double quotes I suspect. Checked the output on notepad and it types 2spaced2spaced....

    Edit : I gave up using space as the hotkey. For some reason, the script doesn't want to read it properly.

    Now I stumbled upon the problem of the script skipping the build zergling hotkey after a couple of loops, so it just spams the hatch hotkey onto select larva hotkey then back to hatch hotkey again. Same problem exists in the grid version.

    Also, I think it'll be better if the script doesn't need to be toggled off, so you just have a burst of production after a single hotkey and then it stops.

  8. The Following User Says Thank You to lightdreamer For This Useful Post:


  9. #7
    Darious4's Avatar
    Darious4 is offline Hacker
    Array
    Join Date
    Dec 2016
    Location
    San Francisco, CA
    Posts
    179
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    2
    Reputation
    136
    Nevermind, I know the problem. It types "space" as in s-p-a-c-e instead of actually pressing the button. Those double quotes I suspect. Checked the output on notepad and it types 2spaced2spaced....

    Edit : I gave up using space as the hotkey. For some reason, the script doesn't want to read it properly.

    Now I stumbled upon the problem of the script skipping the build zergling hotkey after a couple of loops, so it just spams the hatch hotkey onto select larva hotkey then back to hatch hotkey again. Same problem exists in the grid version.

    Also, I think it'll be better if the script doesn't need to be toggled off, so you just have a burst of production after a single hotkey and then it stops.
    I literally thought of the idea and tackled this script in less than 3 minutes lmao. It's far from perfect so if you could implement your ideas into the script that would be most helpful. Thanks for your ideas, and I am working on a less rough script than this one especially the issue you mentioned with it creating workers on loop after you create a batch of zerglings. And when making variables do not use "" for identifying full words, it will actually spell out the letters lol.

    Also another thing to note is that...
    "SetTimer, SendTheKey, 10"

    See the value 10, by changing this value it alters how many keys are being sent with 1 being the lowest possible value for time in between repeats (1 millisecond). This has a tremendous impact on actions per minute (APM). 1-10 value in repeats equates to 2000+ APM absurdity. So be mindful of that value even if it vastly dictates speed in batching units and workers. Hey and I also added 2 more units to "autobatching" functionality (hydras, roaches). I change worker key to (~) key for easier access, for me personally. The continuation of more units being added could be set among F1-F12 and so on.
    Last edited by Darious4; 06-19-2017 at 10:00 PM.

  10. The Following User Says Thank You to Darious4 For This Useful Post:


  11. #8
    lightdreamer is offline Member
    Array
    Join Date
    Apr 2017
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    1
    Reputation
    3
    Hmm, now your new script doesn't work...

  12. #9
    Darious4's Avatar
    Darious4 is offline Hacker
    Array
    Join Date
    Dec 2016
    Location
    San Francisco, CA
    Posts
    179
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    2
    Reputation
    136
    Fixed it.

  13. The Following User Says Thank You to Darious4 For This Useful Post:


  14. #10
    6g0dz is offline Newbie
    Array
    Join Date
    Jun 2017
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    1
    Reputation
    1
    When I try Auto Zerglings and Auto Roach it will prduce drones... I changed my keys in the script, there<s only TempUnit Group that I dont know what that is, I put it to 2.. on standard layout. So, is it delay or something? I mean I'm on a high end pc.. You seem to handle AHK pretty well if you could update that script

    Thanks for the share!!!

  15. The Following User Says Thank You to 6g0dz For This Useful Post:


Page 1 of 5 123 ... LastLast

Similar Threads

  1. How to beat Zerg as Terran
    By Austia in forum Starcraft 2 Guides
    Replies: 3
    Last Post: 03-01-2013, 04:02 PM
  2. Looking for a Zerg coach.
    By asprogmr in forum Starcraft 2 Guides
    Replies: 15
    Last Post: 12-04-2012, 12:58 AM
  3. LF Zerg Coach
    By brimblood in forum Starcraft 2 Guides
    Replies: 2
    Last Post: 07-12-2011, 01:34 AM
  4. Zerg Unit Bug
    By Evilenigma in forum Starcraft 2 Hacks, bots and tools
    Replies: 7
    Last Post: 05-15-2011, 01:18 AM
  5. --ZERG-- Best Strategies
    By overboostaltima in forum Starcraft 2 Guides
    Replies: 18
    Last Post: 05-10-2011, 04:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •