Skip to content

List of task types

Ben Bartlett edited this page Aug 4, 2018 · 3 revisions
Class name Target type Description Valid until
TaskAttack1 Creep|Structure melee- and ranged-attacks a target target is destroyed or creep has no combat parts
TaskBuild ConstructionSite builds a construction site creep is out of energy or construction is finished
TaskClaim StructureController claims an unowned controller creep has no claim parts or controller is claimed
TaskDismantle Structure dismantles a structure creep has no work parts or target is destroyed
TaskDrop null2 drops energy at a position creep is out of energy
TaskFortify Wall|Rampart fortifies (repairs) a wall or rampart creep is out of energy or maxHits reached
TaskGetBoosted3 StructureLab obtains a boost from a lab with a given mineralType creep has specified number of boosts
TaskGetRenewed3 StructureSpawn travels to a spawn and tells it to renew the creep 90% max ticksTolive reached
TaskGoTo null2 travel to a specified position creep is within 1 range of position and not on an exit tile
TaskGoToRoom null2 travel to a specified room creep is in the room and not on an exit tile
TaskHarvest Source harvests energy from a source creep carry is full or source is depleted
TaskHeal1 Creep heals a creep if in range 1, ranged-heals if in range 3 creep has no heal bodyparts or target health is full
TaskMeleeAttack1 Creep|Structure melee-attacks a creep or structure creep has no attack bodyparts or target is destroyed
TaskPickup Resource picks up a resource creep carry is full or resource amount is 0
TaskRangedAttack1 Creep|Structure ranged-attacks a creep or structure creep has no ranged-attack bodyparts or target is destroyed
TaskRepair Structure repairs a structure creep is out of energy or maxHits reached
TaskReserve StructureController reserves a controller creep has no claim bodyparts or controller is owned or controller is reserved to max ticks
TaskSignController StructureController signs a controller controller signature matches task.data.signature
TaskTransfer Valid structures or Creep transfers resources (default: energy) to a target creep has insufficient resources or target is full
TaskTransferAll Valid structures or Creep transfers all resources to a target creep has no resources or target is full
TaskUpgrade StructureController upgrades a controller creep is out of energy or controller.my is false
TaskWithdraw Valid structures withdraws resources (default: energy) from a target creep carry is full or target has insufficient amount of resource
TaskWithdrawAll Valid structures withdraws all resources from a target creep carry is full or target has no remaining resources

1Tasks are not optimized for executing multiple actions in a single tick, so I would not advise using them to control combat creeps.

2These tasks are initialized with a RoomPosition or an object with a pos property. Instances of these tasks will have task.targetPos but no task.target.

3These tasks require the relevant structure to be able to perform the desired action to terminate. If the structure is unable to do this (for example, a lab is out of energy or a spawn is constantly spawning), these tasks may not sensibly terminate and will block creep execution until explicitly interrupted.

Clone this wiki locally