Expand description
Additional constants representing internal game mechanics that aren’t included in the game’s constants
Constants§
- CONSTRUCTION_
SITE_ DROP_ RATIO - Percentage of energy spent on construction that is left in a
Resourceif the construction site is destroyed byConstructionSite::remove, or from being stepped on by a hostile creep - CONTROLLER_
DOWNGRADE_ PROGRESS_ RATIO - Percentage of progress toward next level controllers retain when downgraded
- CONTROLLER_
SIGN_ MAX_ LENGTH - Maximum length (in UTF-16 units) of input to
Creep::sign_controller - CPU_
BUCKET_ MAX - Maximum amount of CPU that can be accumulated in
game::cpu::bucketper shard - CPU_
SET_ SHARD_ LIMITS_ COOLDOWN - Time (in milliseconds) that the
cpu::set_shard_limitsfunction needs to cool down between calls - CPU_
TICK_ LIMIT_ MAX - Maximum value of
cpu::tick_limit, the amount of CPU time (in milliseconds) available this tick, including available time from the bucket (game::cpu::bucket) - CREEP_
HITS_ PER_ PART Creep::hits_maxgained for eachPartin a given creep’sCreep::body- CREEP_
NAME_ MAX_ LENGTH - Maximum length (in UTF-16 units) of the string input to
StuctureSpawn::spawn_creepfor the name of aCreep - CREEP_
RANGED_ ACTION_ RANGE - The range of all ranged actions of
Creepobjects - CREEP_
SAY_ MAX_ LENGTH - Maximum length (in UTF-16 units) of string input to
Creep::sayandPowerCreep::say - FLAG_
NAME_ MAX_ LENGTH - Maximum length (in UTF-16 units) of names of
Flagobjects - INTENT_
CPU_ COST - The cost of a single ‘intent’ in CPU time, charged for all successful changes to game state.
- INTER_
SHARD_ MEMORY_ SIZE_ LIMIT - Maximum size (in UTF-16 units) of data input to
inter_shard_memory::set_local - INVADER_
USERNAME - The
Owner::usernameof hostile non-player structures and creeps which create strongholds and spawn to attack rooms due to energy harvesting activity - LAB_
REACTION_ RANGE - Maximum range between interacting
StructureLabstrucures forStructureLab::run_reactionorStructureLab::reverse_reaction - MAP_
VISUAL_ SIZE_ LIMIT - The maximum size (in UTF-16 units) of the serialized
MapVisualdata - MARKET_
MAX_ DEALS_ PER_ TICK - The maximum number of times that you can use
game::market::dealin a tick - MEMORY_
SEGMENT_ ACTIVE_ LIMIT - Maximum active memory segments to be readable next tick allowed in
raw_memory::set_active_segments - MEMORY_
SEGMENT_ SIZE_ LIMIT - Maximum size (in UTF-16 units) of the string contents allowed in
raw_memory::segments - MEMORY_
SIZE_ LIMIT - Maximum size (in UTF-16 units) of the string contents allowed in serialized
memory or
raw_memory::set - MOVE_
COST_ PLAIN - Fatigue points added for each body part that generates fatigue when stepping
onto a tile with
Terrain::Plain - MOVE_
COST_ ROAD - Fatigue points added for each body part that generates fatigue when stepping
onto a tile with a
StructureRoad - MOVE_
COST_ SWAMP - Fatigue points added for each body part that generates fatigue when stepping
onto a tile with
Terrain::Swamp - MOVE_
POWER - Fatigue points removed per effective
Part::Moveper tick - NOTIFY_
MAX_ LENGTH - Maximum length (in UTF-16 units) of message content sent to
game::notify. - POWER_
CREEP_ CARRY_ CAPACITY_ PER_ LEVEL - Maximum carry capacity of a
PowerCreepper level - POWER_
CREEP_ HITS_ PER_ LEVEL - Maximum hits of a
PowerCreepper level - POWER_
CREEP_ NAME_ MAX_ LENGTH - Maximum length (in UTF-16 units) of names input to
PowerCreep::createorAccountPowerCreep::rename - RANGED_
MASS_ ATTACK_ POWER_ RANGE_ 1 - Hits of damage per effective ranged attack part per
Creep::ranged_mass_attackaction at range 1 - RANGED_
MASS_ ATTACK_ POWER_ RANGE_ 2 - Hits of damage per effective ranged attack part per
Creep::ranged_mass_attackaction at range 2 - RANGED_
MASS_ ATTACK_ POWER_ RANGE_ 3 - Hits of damage per effective ranged attack part per
Creep::ranged_mass_attackaction at range 3 - ROOM_
AREA - The number of total tiles in each
Roomin the game - ROOM_
SIZE - The maximum height/width of a
Roomin the game - ROOM_
USIZE - ‘ROOM_SIZE’ cast into a
usize, for indexing convenience. - ROOM_
VISUAL_ PER_ ROOM_ SIZE_ LIMIT - The maximum size (500 KiB) of the serialized
RoomVisualdata for each room - SOURCE_
KEEPER_ USERNAME - Owner username of hostile non-player structures and creeps which occupy sector center rooms.
- SPAWN_
NAME_ MAX_ LENGTH - Maximum length (in UTF-16 units) of the name of a
StructureSpawn, set via the optional name parameter when creating aConstructionSite - TERMINAL_
SEND_ COST_ SCALE - Exponential scaling rate for
StructureTerminalenergy costs