Expand description
Screeps object wrappers.
Objects types that inherit RoomObject
represent game objects with are
valid to be used only during the current tick; reading or writing a ‘stale’
game object from a past tick will result in undefined behavior.
Re-exports§
Modules§
- event
- Object wrappers representing data retrieved from room event logs.
- input
- Object wrappers for simple javascript objects with known properties sent to game functions.
- output
- Object wrappers for simple javascript objects with known properties returned by game functions.
- visual
- Object wrappers allowing drawing of shapes in rooms or on the map in the game world.
Structs§
- Construction
Site - A
ConstructionSite
which is an object representing a structure under construction. - Cost
Matrix - A reference to a matrix of pathing costs for a room, stored in JavaScript memory.
- Creep
- A
Creep
unit in the game world. - Deposit
- A
Deposit
, which can be harvested for resources used in commodities. - Flag
- A
Flag
, which can be placed by the player or created automatically and are only visible to their owners. You can’t create more thanFLAGS_LIMIT
. - Mineral
- A
Mineral
, which can be harvested for resources with an extractor. - Nuke
- A
Nuke
in flight, which will deal damage in an area and kill all creeps in the room when it lands. - Owned
Structure - Parent class for all
Structure
objects types which are (or can be) owned by a specific player. - Power
Creep - A
PowerCreep
unit in the game world. - Reactor
seasonal-season-5
- An object representing a
Reactor
, which processThorium
to gain season score. - Resource
- A
Resource
is an object representing resources that have been dropped and can be picked up. - Room
- A reference to a
Room
object, a 50x50 chunk of the Screeps game world. - Room
Object - Parent class for all objects in rooms in the game world.
- Room
Position - An object representing a position in a room, stored in JavaScript memory.
- Room
Terrain - A matrix representing the terrain of a room, held in the JavaScript heap.
- Ruin
- A
Ruin
, which represents a destroyed structure and can have resources withdrawn from it. - Score
Collector seasonal-season-1
- An object representing a
ScoreCollector
, which can haveResourceType::Score
transferred to it in order to score points on the leaderboard. - Score
Container seasonal-season-1
- An object representing a
ScoreContainer
, which appears randomly around the map and containsResourceType::Score
which can be collected. - Source
- A
Source
, which can be harvested for energy. - Spawning
- Object with info on what a
StructureSpawn
orStructureInvaderCore
is currently spawning. - Store
- An object that represents the cargo within an entity in the game world.
- Structure
- Parent class for all objects that represent a structure in the game world.
- Structure
Container - An object representing a
StructureContainer
, which can store resources and does not block creep movement, but requires regular repair due to decay. - Structure
Controller - An object representing a
StructureController
. - Structure
Extension - An object representing a
StructureExtension
, which can store energy to be used by spawns in the room to spawn creeps. - Structure
Extractor - An object representing a
StructureExtractor
, which can be placed on top of aMineral
to extract resources. - Structure
Factory - An object representing a
StructureFactory
, which can compress and decompress resources and produce commodities for sale. - Structure
Invader Core - An object representing a
StructureInvaderCore
, which is at the center of NPC strongholds, as well as reserving neutral rooms. - Structure
Keeper Lair - An object representing a
StructureKeeperLair
, which regularly spawns creeps to defend nearby resources. - Structure
Lab - An object representing a
StructureLab
, which can be used to create mineral compounds. - Structure
Link - An object representing a
StructureLink
, which can hold energy and transfer it to other links within the room. - Structure
Nuker - An object representing a
StructureNuker
, which consumes energy and ghodium to fireNuke
s. - Structure
Observer - An object representing a
StructureObserver
, which can grant vision to remote rooms. - Structure
Portal - An object representing a
StructurePortal
, which allows movement between remote locations or other shards. - Structure
Power Bank - An object representing a
StructurePowerBank
, which can be destroyed for power resources. - Structure
Power Spawn - An object representing a
StructurePowerSpawn
, which can process power to contribute to your GPL as well as renewing power creeps. - Structure
Rampart - An object representing a
StructureRampart
, which is selectively walkable and protects creeps and structures at the same position. - Structure
Road - An object representing a
StructureRoad
, which allows creeps to move onto this position for half of the fatigue of moving onto a plains tile, as well as through terrain walls. - Structure
Spawn - An object representing a
StructureSpawn
, which creates your creeps. - Structure
Storage - An object representing a
StructureStorage
, which can store large amounts of resources. - Structure
Terminal - An object representing a
StructureTerminal
, which can send resources to distant rooms and participate in the market. - Structure
Tower - An object representing a
StructureTower
, which can heal, repair, or attack anywhere in the room. - Structure
Wall - An object representing a
StructureWall
, which blocks movement of all creeps. - Symbol
Container seasonal-season-2
- An object representing a
SymbolContainer
, which appears randomly around the map and contains symbol resources which can be collected. - Symbol
Decoder seasonal-season-2
- An object representing a
SymbolDecoder
, which can be used to decode matching symbol resources to score points on the leaderboard. - Tombstone
- A
Tombstone
, which represents a dead creep and can have resources withdrawn from it.