-
Notifications
You must be signed in to change notification settings - Fork 41
[WIP] Quick Start
DISCLAIMER: This document is a work in progress. It is being written by Jeb with input from bonzaiferroni. The intention of this guide is to provide all the needed information to download, build, and implement the bonzAI bot on official and private Screeps servers. In-depth instructions for each step may be omitted, so please refer to Google for more help. If you need assistance or have feedback, you can also direct message Jeb on Slack.
The first steps to using bonzAI on the official or private Screeps servers is to download and build the code. To do this you'll need git, Node.js, npm, and several dependencies installed. You can then build bonzAI on your computer or server by following these steps.
- Download and install git for Windows, Mac OS X, and Linux here.
- Download and install Node.js and npm for Windows, Mac OS X, and Linux here.
- Open a command-line interpreter (e.g. command prompt, terminal).
-
cd
to where you want to download bonzAI (e.g. /home/user/screeps). -
git clone https://github.com/bonzaiferroni/bonzAI.git
to download bonzAI. -
cd
to where you downloaded bonzAI (e.g. /home/user/screeps/bonzAI). -
npm install
to download the required dependencies. -
cp config.sample.json config.json
to create a new config.json file. - Open a text editor (e.g. notepad, vim) and edit the new config.json file.
-
gulp build
to build and upload bonzAI to the official server. -
gulp copyLocal
to build and store bonzAI on your local computer.
bonzAI was originally developed as KCLUB, a collaborative project by and for members of thunderkittens. At one point KCLUB became bonzAI and was released publicly, intended to be used as a fully automated bot for use on private servers. It is still used by some members of thunderkittens, has been featured in botarena, and is being used by more players on the official server. The next section will show you the basics of using bonzAI.
WARNING: bonzAI is a very powerful, fully automated bot. bonzaiferroni has requested it not be used this way on the official server. Failure to adhere to this will not only go against the wishes of the developer, but will in turn cause your creeps to wreak havoc on some unprepared neighbors in the game. This will lead to you being targeted by other players and alliances, and will likely result in your being wiped over and over again. Take heed and run the following command in the console to prevent this from happening:
Memory.playerConfig.manual == true
bonzAI will handle most of the needs of your rooms. All you need to do is place a control_opName
or layout_opName
flag, where opName
is a unique name for that operation.
Placing a layout_opName
flag will allow bonzAI to automatically find a layout best suited to the room automatically, then replacing that flag with a control_opName
flag and continue working.
Placing a control_opName
flag will allow you to manually find a layout of your choosing. You choose a layout by typing opName.setLayout(X, Y, Z, "type")
at the console.
There are three types of layouts: quad, flex, and custom. You can see a quad layout in the example below. A flex layout allows structures to be moved to fit in tight spaces. A custom layout is just like it sounds, allowing you to manually place all structures.
X and Y are the coordinates for the center of the layout, and Z is the rotation for the layout. The below example is a quad layout with a rotation of 0.
A rotation of 2 would place the nuke at the top instead, so a rotation of 1 would have the nuke on the left, and a rotation of 3 would have the nuke on the right.
At some point you will need more energy than your new room can give. You can start a miningOp in a nearby room by placing a mining_opName
flag in an adjacent room.
It is recommended that mining_opName
have a number appended to opName
, allowing multiple miningOps per controlOp (e.g. mining_test1
, mining_test2
).
When your room gets to RCL7 or higher, you can start mining source keeper rooms. You can do this in the same way by using keeper_opName
instead.
You will need to start a miningOp or keeperOp as soon as possible, though be careful not to start one too soon or have too many at once, else your spawns won't keep up with supply and demand.
Claiming a new room is as simple as creating a new control_opName
or layout_opName
in the room you want to claim. bonzAI should automatically find the nearest owned room to spawn from.
Once a layout is chosen, either automatically using a layoutOp flag or manually using a controlOp flag, bonzAI will place the needed structures including the first spawn.
If you want to control which room is used to spawn the claimers and such, you could create a opName_spawn
flag in that room using the opName
of the new room.