Module extra

Source
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 Resource if the construction site is destroyed by ConstructionSite::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::bucket per shard
CPU_SET_SHARD_LIMITS_COOLDOWN
Time (in milliseconds) that the cpu::set_shard_limits function 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_max gained for each Part in a given creep’s Creep::body
CREEP_NAME_MAX_LENGTH
Maximum length (in UTF-16 units) of the string input to StuctureSpawn::spawn_creep for the name of a Creep
CREEP_RANGED_ACTION_RANGE
The range of all ranged actions of Creep objects
CREEP_SAY_MAX_LENGTH
Maximum length (in UTF-16 units) of string input to Creep::say and PowerCreep::say
FLAG_NAME_MAX_LENGTH
Maximum length (in UTF-16 units) of names of Flag objects
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::username of 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 StructureLab strucures for StructureLab::run_reaction or StructureLab::reverse_reaction
MAP_VISUAL_SIZE_LIMIT
The maximum size (in UTF-16 units) of the serialized MapVisual data
MARKET_MAX_DEALS_PER_TICK
The maximum number of times that you can use game::market::deal in 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::Move per 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 PowerCreep per level
POWER_CREEP_HITS_PER_LEVEL
Maximum hits of a PowerCreep per level
POWER_CREEP_NAME_MAX_LENGTH
Maximum length (in UTF-16 units) of names input to PowerCreep::create or AccountPowerCreep::rename
RANGED_MASS_ATTACK_POWER_RANGE_1
Hits of damage per effective ranged attack part per Creep::ranged_mass_attack action at range 1
RANGED_MASS_ATTACK_POWER_RANGE_2
Hits of damage per effective ranged attack part per Creep::ranged_mass_attack action at range 2
RANGED_MASS_ATTACK_POWER_RANGE_3
Hits of damage per effective ranged attack part per Creep::ranged_mass_attack action at range 3
ROOM_AREA
The number of total tiles in each Room in the game
ROOM_SIZE
The maximum height/width of a Room in 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 RoomVisual data 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 a ConstructionSite
TERMINAL_SEND_COST_SCALE
Exponential scaling rate for StructureTerminal energy costs