Expand description
Constants, most copied from the game constants.
Last updated on 2020-12-13, at commit
e4589666113334bb1f967b9a5540b642141b6dab
.
Currently missing:
- OBSTACLE_OBJECT_TYPES
- WORLD_WIDTH / WORLD_HEIGHT (deprecated in Screeps)
- POWER_INFO
Re-exports§
pub use self::find::FindConstant;
pub use self::look::LookConstant;
pub use self::extra::*;
Modules§
- Re-export of all constants related to
StructureController
behavior and GCL. - Re-export of all constants related to
Creep
behavior and operations. - Additional constants representing internal game mechanics that aren’t included in the game’s constants
- Constants for use with the
Room::find
function. - Re-export of all constants related to
Flag
s. - Constants for use with
Room::look_for_at
and related functions. - Re-export of all constants related to the market.
- Re-export of all constants related to
Mineral
behavior andStructureLab
operations. - Re-export of all constants related to
StructureNuker
andNuke
. - Re-export of all constants related to
StructureObserver
operations. - Re-export of all constants related to
StructurePortal
behavior. - Re-export of all constants related to power.
- Re-export of all constants related to
Resource
s. - Constants that are unique to object types or mechanics found in Screeps seasonal.
- Re-export of all constants related to
Source
behavior. - Re-export of all constants related to
StructureSpawn
operations. - Re-export of all constants related to structures.
- Re-export of all constants related to
Tombstone
s. - Re-export of all constants related to
StructureTower
operations.
Structs§
- Returned values from
ResourceType::commodity_recipe
representing a commodity that can be produced in factories.
Enums§
- Returned values from
ResourceType::boost
representing the effect of boosting a creep with the given resource. - Translates
COLOR_*
andCOLORS_ALL
constants. - Translates the
DENSITY_*
constants. - Translates direction constants.
- Translates effect types on room objects, which can include both
PWR_*
andEFFECT_*
constants. - Translates non-OK return codes.
- Type used for when the game returns a direction to an exit.
- Translates
SUBSCRIPTION_TOKEN
andINTERSHARD_RESOURCES
constants. - Translates all resource types that can be used on the market.
- Translates the
EFFECT_*
constants, which are natural effect types - Translates
ORDER_*
constants. - Translates body part type and
BODYPARTS_ALL
constants - Translates the
POWER_CLASS
constants, which are classes of power creeps - Translates the
PWR_*
constants, which are types of powers used by power creeps - Translates the values of the
RESOURCES_ALL
constant, representing all possible in-game (non-intershard) resources. - Translates
STRUCTURE_*
constants. - Translates
TERRAIN_*
constants.
Constants§
- Hits of damage per effective attack part per
Creep::attack
action. - Construction site progress added per effective work part per
Creep::build
action. - Store capacity provided per effective carry part.
- Build, decay, and hits multiplier for roads built on swamp tiles.
- Build, decay, and hits multiplier for roads built on natural wall tiles (tunnels)
- Store capacity of container structures.
- Hits lost on the container per decay.
- Ticks between hit loss due to decay in unowned rooms.
- Ticks between hit loss due to decay in owned rooms.
- Initial hits for container structures; consider using the
StructureType::initial_hits
function. - A controller cannot be attacked or upgraded for this number of ticks after one or more creeps successfully uses
Creep::attack_controller
against it. - Additional decay of the
StructureController::ticks_to_downgrade
timer caused by each claim part used perCreep::attack_controller
action. - Ticks added to a
StructureController::ticks_to_downgrade
timer on each tick that at least one creep successfully usedCreep::upgrade_controller
. - Ticks under 50% of
controller_downgrade
max that safe mode becomes unavailable. - Maxiumum energy per tick that can be spent on
Creep::upgrade_controller
at room control level 8 without power creep effects or boosts. - Ticks a controller cannot be attacked or upgraded for after a nuke detonation in the room.
- Reservation ticks added per claim part per
Creep::reserve_controller
action. - Maximum ticks of reservation allowed on a controller
- Initial ticks_to_live of a creep with at least one claim part.
- Percentage of TTL-adjusted creep resource costs added to tombstone.
- Initial ticks_to_live of a creep without any claim parts.
- The upper limit of energy per body part considered for return in tombstones
- Ticks taken to spawn each creep body part, before power creep effects.
- Time since last harvest that a deposit will decay.
- Multiplier for deposit cooldown determination.
- Exponential growth rate for deposit cooldown determination.
- Amount in energy returned to the dismantling creep per hit dismantled.
- Hits removed per effective work part per
Creep::dismantle
action. - The total amount of a resource that must be accumulated in a dropped
Resource
for one unit of that resource to decay each tick, rounded up. - Ticks to source regen after first
Creep::harvest
since last regen. - Initial hits for extension structures; consider using the
StructureType::initial_hits
function. - Ticks of cooldown for the extractor timer after tick that at least one creep successfully used
Creep::harvest
. - Initial hits for extractor structures; consider using the
StructureType::initial_hits
function. - Store capacity of factory structures.
- Initial hits for factory structures; consider using the
StructureType::initial_hits
function. - Maximum number of total flags a player is allowed to have on a shard.
- Base growth rate of control points needed per global control level (GCL).
- Maximum GCL for players allowed to spawn in a Novice area.
- Exponential growth rate of control points needed per global control level (GCL).
- Amount harvested from a deposit per effective work part per
Creep::harvest
action. - Amount harvested from a mineral per effective work part per
Creep::harvest
action. - Energy harvested from a source per effective work part per
Creep::harvest
action. - Hits of damage healed per effective heal part per
Creep::heal
action. - Base value for calculating the energy harvest amount that will trigger invader spawns.
- Duration of stronghold ‘deployment’, during which they are invulnerable.
- The reservation points added or removed per tick by invader cores.
- Initial hits for invader cores; consider using the
StructureType::initial_hits
function. - Cost in energy to boost each creep body part.
- Cost in boost minerals to boost each creep body part.
- Store capacity for energy in lab structures.
- Initial hits for lab structures; consider using the
StructureType::initial_hits
function. - Store capacity for minerals in lab structures.
- Amount of compounds consumed and produced per reaction, before power creep effects.
- Energy refunded by
StructureLab::unboost_creep
per creep body part (none). - Minerals spent on boosts refunded by
StructureLab::unboost_creep
per creep body part. - Energy capacity of link structures.
- Ticks of link cooldown after transferring energy per distance to destination.
- Initial hits for link structures; consider using the
StructureType::initial_hits
function. - Percentage of the energy that is lost when transferred by
StructureLink::transfer_energy
. - Percentage of order value in credits charged as a fee for market listings.
- Maximum number of total orders a player is allowed to have on the market.
- Time, in milliseconds, after which a market order will expire (30 days).
- Maximum allowed construction sites at once per player.
- Maximum body parts per creep.
- Percentage chance to randomly determine a new density when currently moderate or high density (a new density is always chosen when low or ultra).
- Currently unused in game (see
Density::probability
instead). - Ticks after depletion for minerals to regenerate.
- Cooldown for nuker structers after firing.
- Energy capacity of the nuker, which is spent to fire a nuke.
- Ghodium capacity of the nuker, which is spent to fire a nuke.
- Initial hits for nuker structures; consider using the
StructureType::initial_hits
function. - Damage in hits done by nukes at the point of impact.
- Damage in hits done by nukes within range 2.
- Tick until impact after firing a nuke.
- Range in rooms of nukers.
- Initial hits for observer structures; consider using the
StructureType::initial_hits
function. - Maximum range in rooms for
StructureObserver::observe_room
. - Cost, paid from
CpuInfo::bucket
, to generate a pixel usingCpuInfo::generate_pixel
- Ticks that a portal that has reached the end of its stable lifetime will remain before decaying.
- Maximum time after a portal decays in a center room that a new portal will appear, in milliseconds.
- Minimum time after a portal decays in a center room that a new portal will appear, in milliseconds.
- The amount of time after spawning, in milliseconds, that random center room portals will become unstable and begin to decay, disappearing
PORTAL_DECAY
ticks later. - Chance of adding an additional
POWER_BANK_CAPACITY_MAX
to the random power amount calculated when spawning a power bank. (source) - Maximum power capacity for power banks, before accounting for
POWER_BANK_CAPACITY_CRIT
. - Maximum power capacity for power banks.
- Ticks for a power bank to decay if not destroyed.
- Initial hits for power bank structures; consider using the
StructureType::initial_hits
function. - Percentage of damage dealt to power banks that is dealt back to attacking creeps.
- Base value for power bank respawn time calculation.
- Time, in milliseconds, after a deletion is started via
AccountPowerCreep::delete
that it can no longer be canceled. - Maximum ticks to live for power creeps
- Maximum level for power creeps.
- Time, in milliseconds, that a power creep must wait to respawn after dying.
- Base growth rate of processed power needed per global power level (GPL).
- Exponential growth rate of processed power needed per global power level (GPL).
- Maximum energy capacity for a power spawn to use in
StructurePowerSpawn::process_power
. - Energy consumed per point of power processed by
StructurePowerSpawn::process_power
. - Initial hits for power spawn structures; consider using the
StructureType::initial_hits
function. - Maximum power capacity for a power spawn to use in
StructurePowerSpawn::process_power
. - Hits lost per decay period for ramparts
- Ticks between rampart decays, losing
RAMPART_DECAY_AMOUNT
hits. - Initial hits for rampart structures when built; consider using the
StructureType::initial_hits
function. - Max rampart hits at RCL 2; consider using the
rampart_hits_max
function. - Max rampart hits at RCL 3; consider using the
rampart_hits_max
function. - Max rampart hits at RCL 4; consider using the
rampart_hits_max
function. - Max rampart hits at RCL 5; consider using the
rampart_hits_max
function. - Max rampart hits at RCL 6; consider using the
rampart_hits_max
function. - Max rampart hits at RCL 7; consider using the
rampart_hits_max
function. - Max rampart hits at RCL 8; consider using the
rampart_hits_max
function. - Hits of damage per effective ranged attack part per
Creep::ranged_attack
action. - Hits of damage healed per effective heal part per
Creep::ranged_heal
action. - Cost in energy for each hit repaired by creeps before boosts.
- Hits repaired per effective work part per
Creep::repair
action. - A collection of all resource types. This is a direct translation of the
RESOURCES_ALL
constant in game using the rustResourceType
enum. - Hits lost upon decay for roads, before swamp/tunnel multipliers
- Ticks between road decay events without traffic
- Maximum hits for road structures, before swamp/tunnel multipliers
- Tick penalty to a road’s decay, per creep body part, when a creep steps on it.
- Tick penalty to a road’s decay when a power creep steps on it.
- Ticks that ruins will last when structures are destroyed.
- Ticks since last safe mode activation before another is allowed.
- Cost in
Ghodium
to add a safe mode activation to a controller viaCreep::generate_safe_mode
- Duration of safe mode once activated, in ticks.
- Text added to signs of unowned rooms when a novice or respawn area is planned for the sector.
- Source energy capacity immediately after regeneration in owned and reserved rooms.
- Source energy capacity immediately after regeneration in source keeper (sector center) rooms.
- Source energy capacity immediately after regeneration in neutral rooms.
- Maximum energy capacity of spawn structures.
- Initial energy for spawn structures when built.
- Initial hits for spawn structures; consider using the
StructureType::initial_hits
function. - Additional TTL bonus, and reduction in energy cost, when renewing a creep compared to spawning.
- Store capacity for storage structures without power creep effects.
- Initial hits for storage structures; consider using the
StructureType::initial_hits
function. - Average ticks until collapse for a stronghold.
- Owner username of system-owned structures and creeps.
- Store capacity of terminal structures.
- Cooldown after a terminal is used before it can be used again.
- Initial hits for terminal structures; consider using the
StructureType::initial_hits
function. - Currently unused in game.
- Currently unused in game (see
market::calc_transaction_cost
andTERMINAL_SEND_COST_SCALE
instead). - Ticks per body part in total creep size that a creep’s tombstone will remain before decaying.
- Ticks that a power creep’s tombstone will remain.
- Energy capacity of tower structures.
- Energy cost of each tower action.
- Maximum percentage reduction in healing, repair, and attack effectiveness for towers due to range.
- Tower actions at a range greater than or equal to this distance suffer the maxium falloff penalties - see
TOWER_FALLOFF
. - Initial hits for tower structures; consider using the
StructureType::initial_hits
function. - Tower actions at a range beyond this distance suffer falloff penalties - see
TOWER_FALLOFF
. - Tower damage per
StructureTower::attack
before range reduction. - Hits healed per
StructureTower::heal
before range reduction. - Hits healed per
StructureTower::repair
before range reduction. - Control points added per effective work part per
Creep::upgrade_controller
action. - Initial hits for wall structures when built; consider using the
StructureType::initial_hits
function. - Maximum hits for wall structures.
Functions§
- Translates the
CONTROLLER_DOWNGRADE
constant, the maximum value ofStructureController::ticks_to_downgrade
for each controller level. - Translates the
CONTROLLER_LEVELS
constant. - Translates the
EXTENSION_ENERGY_CAPACITY
constant, the energy capacity of each source structure at a given room control level. - Ticks per body part that invader cores of each level take to spawn defensive creeps.
- Ticks between creation of invader cores in rooms in the sector for each level of stronghold.
- Translates the
MINERAL_MIN_AMOUNT
constant; currently unused in game (seeDensity::amount
instead). - Translates the
RAMPART_HITS_MAX
constant, the maximum rampart hits for a given room control level. - Structures with special rules for their ruins’ ticks to live, currently only power banks.
- Rampart hits for each level of stronghold.