Skip to content
SimonPrins edited this page Oct 12, 2015 · 1 revision

Build Orders

The BuildOrders can be found in the Builds folder. These classes describe a build order for the bot. Apart from describing what buildings the bot should build, this also manages some things that can be different per build. For instance it can determine how many workers will mine gas per refinery, or when a scouting worker will be sent out.

The base BuildOrder class

All BuildOrders are implementations of the abstract BuildOrder class. This class defines two methods: The onFrame method and the overrideStructureOrder Method. The onFrame method will be called once every frame. This is where the main logic should go that defines what structures are to be built and when. The overrideStructureOrder is designed to give more control over what units are built from unit producing structures such as Factories. All unit producing structures (and upgrade researching structures etc.) have a default behaviour that is defined in the ProductionStructures class. Often this behaviour is inappropriate for a build. For instance, a Factory will try to build a Machine Shop add-on and then build tanks. Perhaps you do not want tanks, but only vultures, or a mixture of different units. In this case you can override the default behaviour as you like.

Clone this wiki locally