Screeps Wiki
Advertisement

Room Controller - a structure the level of which changes actions possible in the room. That is, the level of a room's Controller changes which structures you can build in the room and the number of those structures. For example, higher levels unlock Containers, Towers, more Extensions, and eventually multiple Spawns. To build structures other than Road you have to be the owner of the room controller. 

Not all rooms have Controllers, but if they do have one they only have one. You start the game by owning the controller in your starting room. 

Controllers cannot be damaged or destroyed. Controllers, however, have a downgrade timer that ticks down every cycle. When the downgrade timer reaches 0, the Controller will lose a level. Attacking a Controller will quicken the pace at which the controller downgrades, while Upgrading a Controller will increase the timer. When an owned Controller downgrades past level 0, the Controller becomes Neutral.

Upgrading[]

To increase a Controller's level, you need to pump energy into the controller. Higher levels require ever more energy. Any energy pumped into any controller counts towards your GCL, even if the controller is already at maximum level. To upgrade a Controller:

  1. Create a creep with one or more WORK parts, one or more CARRY parts, and MOVE parts as necessary to travel to the controller.
  2. Pick up energy via the harvest or withdraw API functions.
  3. Move adjacent to the controller.
  4. When the creep has energy available, call the upgradeController API function with the controller as the target parameter.

Claiming[]

In an unclaimed, neutral room, you can only build roads. In hostile rooms, you can only build roads? Once you've claimed ownership of a room (via its Controller), you can start building Containers and later Spawns, Extensions, and so on. To claim a neutral room controller you have to:

  1. Make sure your GCL is higher then the numer of room controllers you currently control.
  2. Create a creep with one or more CLAIM parts. Other than a MOVE part to get them into position, no other part is necessary to claim a room.
  3. Move the creep to a position adjacent to the room controller.
  4. Issue API function "creep_with_claim.claimController(controller)" where creep_with_claim is your creep with CLAIM part and controller is the controller that you want to claim.

Note that your GCL increases by the amount of energy pumped into a controller, and it takes 1 million points to get to GCL 2 (that is, to be able to claim a second room). This will happen somewhere between RC4 and RC5 in your first room.

Either claiming or reserving a room will restore its sources to their normal 3000 available energy, instead of the reduced 1500 available in neutral rooms.

Reserving[]

If you lack sufficient GCL to claim a room, you can instead reserve the room. Reserved rooms are represented on the world map by a smaller version of the player's badge.

To reserve a room controller:

  1. Create a creep with one or more CLAIM parts.
  2. Move the creep until it is within range (1 square) of the Controller.
  3. Issue API function "creep.reserveController(controller)".

Each call to reserveController will add 1 unit to the revervation pool on the controller, which will burn 1 unit each tick. Hence, unless you have multiple CLAIM parts or multiple creeps feeding reserve into a controller, your reservation will expire when the first creep's lifetime has terminated. Reserved controllers can store up to 5000 reservation points.



API[]

Properties[]

  • level - Current level from 0 to 8
  • progress - The current progress of upgrading the controller to the next level.
  • progressTotal - The progress needed to reach the next level
  • reservation - An object with the controller reservation info if present
  • ticksToDowngrade - The amount of game ticks when this controller will lose one level. The timer can be reset using Creep.upgradeController

Methods[]

  • activateSafeMode()
    • This will activate safe mode in the room which blocks attack, rangedAttack, rangedMassAttack, dismantle, heal, rangedHeal, attackController and withdraw methods of all hostile creeps in the room. Only one room can be in safe mode at the same time. It lasts for 20000 ticks and can only be activated every 50000 ticks. It can only be activated a certain number of times. Each controller that gives one activation when they are leveled.
    • Return Values
      • OK (0) - The operation has been scheduled successfully.
      • ERR_NOT_OWNER (-1) - You are not the owner of this controller.
      • ERR_BUSY (-4) - There is another room in safe mode already.
      • ERR_NOT_ENOUGH_RESOURCES (-6) - There is no safe mode activations available.
      • ERR_TIRED (-11) - The previous safe mode is still cooling down.
  • unclaim()
    • Makes your claimed controller neutral
    • Return Values
      • OK (0) - The operation has been scheduled successfully.
      • ERR_NOT_OWNER (-1) - You are not the owner of this controller.
Advertisement