Using ChatGPT to Easily Write Build Orders for Your SC2 Bot

image

I wanted to share a quick and efficient way to format your StarCraft II build orders for your bots using ChatGPT. If you’re pulling build orders from Spawning Tool or pro players’ videos, this can save you a lot of time. This guide is tailored for the Ares Framework, but you can tweak it for any build runner’s syntax.

The Prompt:

You are tasked with converting a StarCraft II build order into a YAML format compatible with the Ares build runner. The build order can be for any of the three races: Protoss, Terran, or Zerg. Follow these guidelines and formatting instructions:

  1. YAML Structure:

    • The YAML file must include sections for UseData, BuildSelection, BuildChoices, and Builds.
    • Each section must be properly indented to maintain YAML syntax.
  2. Build Order Syntax:

    • Each step in the build order must include the supply count followed by the action.
    • Unit, building, and upgrade commands must be written in uppercase without any prefixes (e.g., UnitTypeId. or UpgradeId.).
    • Use multipliers to indicate successive actions (e.g., 12 WORKER x3).
    • Specify targets using @ followed by the target (e.g., 15 PYLON @ RAMP x10).
  3. Constant Worker Production:

    • Specify ConstantWorkerProductionTill followed by the desired supply count where worker production should continue till. If not specified, default to 0.
  4. Auto Supply:

    • Enable AutoSupply by setting AutoSupplyAtSupply to the supply count when the first supply building (Overlord, Pylon, or Supply Depot) is built. If no supply building is specified, set AutoSupplyAtSupply to 0.
  5. Chrono Boosts and Other Shortcuts:

    • Specify chrono boosts with the command CHRONO @ followed by the target (e.g., CHRONO @ GATEWAY).
    • Supported shortcuts include:
      • ADDONSWAP
      • CHRONO
      • CORE
      • GAS
      • GATE
      • EXPAND
      • ORBITAL
      • SUPPLY
      • WORKER (for Probe/Drone/SCV)
  6. Scouting:

    • Use WORKER @ ENEMY_SPAWN to indicate when a worker should go scout.
  7. Targets:

    • Commands may include targets, where the last word should contain the target command. Supported targets include:
      • ENEMY_FOURTH
      • ENEMY_NAT
      • ENEMY_NAT_HG_SPOT
      • ENEMY_RAMP
      • ENEMY_SPAWN
      • ENEMY_THIRD
      • FOURTH
      • MAP_CENTER
      • NAT
      • RAMP
      • SPAWN
      • THIRD
  8. Removing Invalid Commands:

    • Exclude annotations like specific resource counts, non-valid commands (e.g., “push,” “warp in”), and combined commands with +.

Example Build Order and Desired Output

Build Order Example (Protoss):

14 pylon
16 gate
Probe goes to scout after placing this
3x stalkers
16/17 gas
20 Nexus
20 Core
21 2nd gas
22 pylon
Core finishes → Stalker + Warpgate + chrono both
@150 minerals, 100 gas → Robo
Observer
Immortal
33 - 2 gates + pylon
Warp in 3 more stalkers once these transform into warpgates
@15 workers on natural take 3rd/4th gas
50-55 - 2nd Robo + Robo Bay
2xcolossus
Immortal production + extended thermal lance
70 - 2 bases should be full, cut probes (44 total probes)
Twilight Council + Forge
Charge
+1
5 gates + Templar archives
Production finished → Warp in zealots from now on
Make a prism and move out as it pops
Warp in archons on the front then push

Desired YAML Output:

# Save the game opening and result to disk?
# Setting to `True` allows Ares to select a new opening after defeat
UseData: True
# How should we choose a build? Cycle is the only option for now
BuildSelection: Cycle
# For each Race / Opponent ID choose a build selection
BuildChoices:
    Protoss:
        BotName: ProtossRace
        Cycle:
            - Starting_Build
    Terran:
        BotName: TerranRace
        Cycle:
            - Starting_Build
    Zerg:
        BotName: ZergRace
        Cycle:
            - Starting_Build
    Random:
        BotName: RandomRace
        Cycle:
            - Starting_Build

Builds:
    Starting_Build:
        ConstantWorkerProductionTill: 70
        AutoSupplyAtSupply: 14
        OpeningBuildOrder:
            - 14 PYLON
            - 16 GATE
            - 16 WORKER @ ENEMY_SPAWN
            - 16 GAS
            - 20 EXPAND
            - 20 CORE
            - 21 GAS
            - 22 PYLON
            - 23 STALKER x3
            - 23 CHRONO @ GATEWAY x2
            - 26 ROBOTICSFACILITY
            - 26 OBSERVER
            - 30 IMMORTAL
            - 33 GATE x2
            - 33 PYLON
            - 36 STALKER
            - 38 STALKER
            - 40 STALKER
            - 42 GAS
            - 50 ROBOTICSFACILITY
            - 50 ROBOTICSBAY
            - 50 COLOSSUS x2
            - 50 IMMORTAL
            - 50 EXTENDEDTHERMALLANCE
            - 70 TWILIGHTCOUNCIL
            - 70 FORGE
            - 70 CHARGE
            - 70 GROUNDWEAPONSLEVEL1
            - 70 GATE x5
            - 70 TEMPLARARCHIVE
            - 70 ZEALOT
            - 70 WARPPRISM
            - 70 HIGHTEMPLAR x2

Feel free to tweak this prompt to match your build runner’s syntax. Let me know if you have any questions or need further help!