Most of the information here is for Warzone 3.1 and above.
Base construction
- Aubergine
Â
What is a base?
This article will discuss the basics of building a base. Your base consists of one or more of each of the following buildings:
- Factories (tank, cyborg and VTOL)
- HQ (even though AIs don't technically need one)
- Research Labs
These buildings are the essential components required to make a base that's capable of creating the stuff you'll need to win a war.
There are obviously many other buildings – such as those needed for power, repairs and defence – but they will be discussed elsewhere in this guide.
Construction Scenarios
When the game starts, your AI will have either no buildings or some buildings depending on the baseType setting and what the map developer pre-placed on their map for the player slot that your AI is controlling. This means that your AI needs to be able to build a base from scratch, but it must also be able to deal with some buildings being already present.
If base structures are destroyed, your AI will need to decide whether to rebuild them or not, and in what order.
And, before you can build anything, you will need to make sure you have at least one construction droid. Most games start with at least 2 construction trucks, but sometimes you might find only a factory and no trucks. For example, if there's been a battle it's possible all your trucks have been destroyed.
The most effective way I've seen so far to deal with these scenarios is to define and use a build order...
Build Orders
The sequence of initial construction orders has a massive effect on the early stages of the game. Over the years a number of construction sequences, or build orders ("builds") as they are more commonly known, have been determined that give a player specific advantages in either the military, technology or economic aspects of the game.
Each of the key buildings is assigned a letter, for example:
- F = Tank Factory
- R = Research Laboratory
- C = Command Centre (HQ)
Then build order sequences can be defined using the letters like so:
- FRCFR = Build a factory, then a research lab, then the HQ, then a factory and another lab.
- RFFRC = Build a research lab, then two factories, then another lab and the HQ.
- RFFCR = Build a research lab, then two factories, then the HQ and another lab.
Some build orders are good for launching early attacks, others are good for tech or economic rushes, and so on. The map (location and number of oil resources, distance to enemies, presence of scavengers, etc) and alliance/team scenarios influence the effectiveness of any given build order.
Some good resources for learning about build orders are:
- Warzone Bunker wiki– lists several build orders and explains when, how and why to use them
- NullBot AI– implements several build orders as part of the generic AIs personality definitions (see the header.js.inc file)
- Warzone2100.zxq.net – various info on build orders, etc.
It's important to note that most documented build orders assume the human player will decide when to build things like power generators and oil derricks, etc., and as such those structures often aren't mentioned by the build order. In an AI script, you have to clearly define when such structures are needed, when to build trucks and so on.
to be continued...
Â