GETTING STARTED · BEGINNER LESSON 8 OF 12

Why Multiple Screeps Creeps Need Simple Roles

Learn why Harvester, Upgrader, and Builder are player-defined responsibilities, how roles differ from body parts, and why a Creep name does not create behavior.

Verification statusChinese source: Read in full · Official documentation: Checked · Role terminology: Player-defined

VERIFICATION

Evidence and test status

Chinese source
Read in full
Official documentation
Checked
Role terminology
Player-defined
API and action methods
Checked
JavaScript syntax
Checked
State impact
Read-only example
Screeps Console
Pending — no live output is claimed
Live role behavior
Pending — behavior is implemented in later lessons
Last verified
July 27, 2026
Publication status
Ready

What you will understand in this lesson

This lesson has one goal: separate three ideas that beginners often mix together.

IdeaQuestion it answers
Body partsWhat abilities does this Creep have?
RoleWhat job do you want this Creep to focus on?
Current actionWhat command does your code submit this tick?

Harvester, Upgrader, and Builder are useful player-defined responsibilities. They are not official regular-Creep classes, and the game does not automatically run a job because a Creep has a certain name.

Lesson boundary: this article explains task separation. It does not add creep.memory.role, automatic population targets, replacement timing, or role modules.

Body ability, player-defined role, and current action

Use this rule:

Body parts decide what a Creep can do. A role describes what it should mainly do. Your code decides what it attempts on the current tick.

LayerExampleWhat it does not guarantee
Body[WORK, CARRY, MOVE]It does not choose a Source, structure, Controller, or Construction Site.
RoleUpgraderIt does not call upgradeController() by itself.
Actioncreep.upgradeController(controller)It does not guarantee success; the return code still matters.

Review WORK, CARRY, and MOVE when the ability layer is still unclear.

Move from Worker1 to role-specific teaching names

The previous lesson used Worker1 to prove that spawnCreep() could create one Creep. From this lesson onward, the beginner path uses three names:

Harvester1  - harvest and deliver Energy
Upgrader1   - upgrade the Room Controller
Builder1    - build Construction Sites

If your existing Creep is still named Worker1, you can temporarily use that name wherever the next code examples expect Harvester1. The important lesson is the responsibility, not the spelling of the label.

Three simple roles for the beginner room

Teaching namePrimary responsibilityMain action methods
Harvester1Collect Energy and deliver it to a Spawn or Extension.harvest() and transfer()
Upgrader1Collect Energy and spend it on the owned Room Controller.harvest() and upgradeController()
Builder1Collect Energy and spend it on a Construction Site.harvest() and build()

An Upgrader does not transfer Energy into a Controller. It spends carried Energy by calling upgradeController(). A Builder likewise spends carried Energy through build().

A later production design may separate mining from hauling or assign several Creeps to one role. Those optimizations are outside this lesson.

The same body can support different jobs

All three beginner roles can start with the same learning body:

[WORK, CARRY, MOVE]

That body provides the abilities to work, carry resources, and move. The body does not select the destination.

  • Harvester1 moves toward a Source or an Energy structure.
  • Upgrader1 moves toward a Source or the Room Controller.
  • Builder1 moves toward a Source or a Construction Site.

The target-selection and action code create the behavioral difference.

Inspect the three teaching roles without changing game state

State impact: read-only. This Console snippet checks which fixed-name Creeps currently exist. It does not move, spawn, or modify Memory.

const beginnerRoles = {
  Harvester1: 'harvest and deliver Energy',
  Upgrader1: 'upgrade the Room Controller',
  Builder1: 'build Construction Sites'
};

const roleView = Object.keys(beginnerRoles).map(function (name) {
  const creep = Game.creeps[name];

  return {
    name: name,
    expectedJob: beginnerRoles[name],
    exists: Boolean(creep),
    roomName: creep ? creep.room.name : null,
    spawning: creep ? creep.spawning : null,
    bodyParts: creep ? creep.body.map(function (part) {
      return part.type;
    }) : []
  };
});

console.log(JSON.stringify(roleView, null, 2));

Game.creeps uses Creep names as keys, so a fixed name is convenient for a small teaching example. The output still describes only what exists; it does not prove that the expected behavior code is running.

Understand the limits of fixed-name roles

  • One exact name identifies only one Creep.
  • A missing named Creep leaves that teaching job without a worker.
  • The name does not count several Creeps that share one responsibility.
  • The responsibility is not stored as structured role data.
  • The approach does not automatically replace old Creeps or balance room staffing.

These are intentional teaching limits. The official documentation shows that persistent information can be stored through Creep Memory, and later architecture can use a field such as creep.memory.role. That belongs after the fixed-name concept is understood.

Use the Memory basics guide when you are ready to replace names with structured role data.

A role name does not run behavior

A Creep named Harvester1 can stand still forever. Its name is only a key and a teaching label.

Behavior appears only when the repeatedly executed game script:

  1. finds the Creep;
  2. selects a relevant target;
  3. calls an action method;
  4. reads the return code;
  5. responds again on later ticks.

The next three lessons turn the labels into real loops one responsibility at a time.

Completion check

You have completed this lesson when you can explain all of the following:

  • WORK, CARRY, and MOVE provide abilities, not jobs;
  • Harvester, Upgrader, and Builder are player-defined responsibilities;
  • two Creeps with the same body can perform different jobs;
  • a name such as Upgrader1 does not call upgradeController() automatically;
  • fixed names are a beginner simplification, not a scalable staffing system.

Turn Upgrader1 into the first role-specific loop

The next lesson creates the first complete responsibility-specific behavior:

Make Upgrader1 harvest Energy and upgrade the Room Controller →

Return to the English beginner roadmap to review all twelve lessons in order.

Official sources

SOURCE AND SCOPE

Review the source, evidence, or next system

This English guide is rewritten for a focused search intent while preserving the technical scope and verification boundaries of its Chinese source. Live-room evidence is claimed only when the verification record says it exists.