

The other vital role for the base is the basecourier, which handles everything else.

Extra upgraders are ordered when needed, when both the container in the base and by the controller is full. As it does not have a storage yet, it uses a container until RCL 4. This room has gotten to RCL 3, where it has taken over and produces it’s own units. The basehauler will also provide energy to other structures like towers, nuker and power spawn when that is needed. Each room has a special creep called basehauler that is responsible for this, placed between the three spawns (at RCL 8) when it is idle. To keep the base running, refilling extensions is a vital part. Each order contains the needed information for spawning the creep, and a priority telling the spawn-manager how urgent the order is.
Screeps room code#
The spawns themselves do not check for what creeps are needed, other modules of the code places orders that the spawns then process. Running a baseĮach own room maintains it’s own queue for spawning creeps. It periodically checks for new targets for the road network, and maintains a list of roads that needs repairing.

It will plan the roads according to the finished base structure, so for the first few RCL-levels the road might seem longer than it needs to be. The roadnetwork is built up from the middle of the base core, and will build out to all sources in the owned room and outposts (reserved rooms and source keeper-rooms). This allows for efficient refilling even in tricky rooms. It tries to make the wings as large as possible, then fills out with single extensions that do not block the movement. Here is a base in a tricky room, where the normal butterfly-layout do not work. If it still can’t place all extensions, it will place them individually around the base and at the same time make sure it doesn’t block access. The extensions in a room is primarily built above the base core, next to the spawns, but if the room does not allow for that it will build corridors with extensions along the sides. The position of the base is calculated so that it has optimal space, but also optimal distance to the mineral, controller and sources in the room. It will also periodically check if any buildings are missing, and rebuild these. This means it will finish building 3 spawns and 60 extensions, before building additional labs or nuker. It will build structures according to roomlevel, but prioritizes spawns and extensions when building new structures after upgrading the RCL. It also shows the protector inside the core of the base, who makes sure the ramparts around the core and on the important buildings are being repaired, when energy reserves allows it. This is the primary design for a KasamiBot base, with two wings above the core for efficient refilling. For the first room after spawning it will decide on the best position for the spawn and move it after it has built a storage and is confident it has enough builders and energy to successfully rebuild the spawn.
Screeps room free#
This allows it to expand to most rooms, and plan the layout of the room according to the free space. The bot uses a flexible layout, but with a core of 7x7 where it places the most of the structures except extensions.
Screeps room manual#
Home - Features - Patchnotes - Manual control KasamiBot Autonomous Screeps AI Download.
