Expand description
Constants, most copied from the game constants.
Last updated on 2020-12-13, e4589666113334bb1f967b9a5540b642141b6dab
Currently missing:
- OBSTACLE_OBJECT_TYPES
- WORLD_WIDTH / WORLD_HEIGHT (deprecated in Screeps)
- POWER_INFO
Re-exports
pub use self::find::Find;pub use self::find::FindConstant;pub use self::look::Look;pub use self::look::LookConstant;pub use self::extra::*;
Modules
- Re-export of all constants related to
StructureControllerbehavior and GCL. - Re-export of all constants related to
Creepbehavior and operations. - Additional constants representing internal game mechanics that aren’t included in the game’s constants
- Constants for use with the
Room::findfunction. - Re-export of all constants related to
Flags. - Constants for use with
Room::look_for_atand related functions. - Re-export of all constants related to the market.
- Re-export of all constants related to
Mineralbehavior andStructureLaboperations. - Re-export of all constants related to
StructureNukerandNuke. - Re-export of all constants related to
StructureObserveroperations. - Re-export of all constants related to
StructurePortalbehavior. - Re-export of all constants related to power.
- Re-export of all constants related to
Resources. - Constants that are unique to object types or mechanics found in Screeps seasonal.
- Re-export of all constants related to
Sourcebehavior. - Re-export of all constants related to
StructureSpawnoperations. - Re-export of all constants related to structures.
- Re-export of all constants related to
Tombstones. - Re-export of all constants related to
StructureToweroperations.
Structs
- Returned values from
ResourceType::commodity_reciperepresenting a commodity that can be produced in factories.
Enums
- Returned values from
ResourceType::boostrepresenting the effect of boosting a creep with the given resource. - Translates
COLOR_*andCOLORS_ALLconstants. - 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_TOKENandINTERSHARD_RESOURCESconstants. - 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_ALLconstants - Translates the
POWER_CLASSconstants, which are classes of power creeps - Translates the
PWR_*constants, which are types of powers used by power creeps - Translates
RESOURCES_ALLconstant, representing all possible in-game (non-intershard) resources. - Translates return code constants.
- Translates
STRUCTURE_*constants. - Translates
TERRAIN_*constants.
Constants
- Hits of damage per effective attack part per
Creep::attackaction. - Construction site progress added per effective work part per
Creep::buildaction. - 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_hitsfunction. - A controller cannot be attacked or upgraded for this number of ticks after one or more creeps successfully uses
Creep::attack_controlleragainst it. - Additional decay of the
StructureController::ticks_to_downgradetimer caused by each claim part used perCreep::attack_controlleraction. - Ticks added to a
StructureController::ticks_to_downgradetimer on each tick that at least one creep successfully usedCreep::upgrade_controller. - Ticks under 50% of
controller_downgrademax that safe mode becomes unavailable. - Maxiumum energy per tick that can be spent on
Creep::upgrade_controllerat 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_controlleraction. - 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::dismantleaction. - The total amount of a resource that must be accumulated in a dropped
Resourcefor one unit of that resource to decay each tick, rounded up. - Ticks to source regen after first
Creep::harvestsince last regen. - Initial hits for extension structures; consider using the
StructureType::initial_hitsfunction. - 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_hitsfunction. - Store capacity of factory structures.
- Initial hits for factory structures; consider using the
StructureType::initial_hitsfunction. - 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::harvestaction. - Amount harvested from a mineral per effective work part per
Creep::harvestaction. - Energy harvested from a source per effective work part per
Creep::harvestaction. - Hits of damage healed per effective heal part per
Creep::healaction. - 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_hitsfunction. - 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_hitsfunction. - Store capacity for minerals in lab structures.
- Amount of compounds consumed and produced per reaction, before power creep effects.
- Energy refunded by unboost per creep body part (none)
- Minerals spent on boosts refunded by unboost 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_hitsfunction. - 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::probabilityinstead). - 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_hitsfunction. - 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_hitsfunction. - 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_DECAYticks later. - Chance of adding an additional
POWER_BANK_CAPACITY_MAXto 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_hitsfunction. - 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::deletethat 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_hitsfunction. - 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_AMOUNThits. - Initial hits for rampart structures when built; consider using the
StructureType::initial_hitsfunction. - Max rampart hits at RCL 2; consider using the
rampart_hits_maxfunction. - Max rampart hits at RCL 3; consider using the
rampart_hits_maxfunction. - Max rampart hits at RCL 4; consider using the
rampart_hits_maxfunction. - Max rampart hits at RCL 5; consider using the
rampart_hits_maxfunction. - Max rampart hits at RCL 6; consider using the
rampart_hits_maxfunction. - Max rampart hits at RCL 7; consider using the
rampart_hits_maxfunction. - Max rampart hits at RCL 8; consider using the
rampart_hits_maxfunction. - Hits of damage per effective ranged attack part per
Creep::ranged_attackaction. - Hits of damage healed per effective heal part per
Creep::ranged_healaction. - Cost in energy for each hit repaired by creeps before boosts.
- Hits repaired per effective work part per
Creep::repairaction. - 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 via
Creep::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_hitsfunction. - 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_hitsfunction. - 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_hitsfunction. - Currently unused in game.
- Currently unused in game (see
market::calc_transaction_costandTERMINAL_SEND_COST_SCALEinstead). - 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_hitsfunction. - Tower actions at a range beyond this distance suffer falloff penalties - see
TOWER_FALLOFF. - Tower damage per
StructureTower::attackbefore range reduction. - Hits healed per
StructureTower::healbefore range reduction. - Hits healed per
StructureTower::repairbefore range reduction. - Control points added per effective work part per
Creep::upgrade_controlleraction. - Initial hits for wall structures when built; consider using the
StructureType::initial_hitsfunction. - Maximum hits for wall structures.
Functions
- Translates the
CONTROLLER_DOWNGRADEconstant, the maximum value ofStructureController::ticks_to_downgradefor each controller level. - Translates the
CONTROLLER_LEVELSconstant. - Translates the
EXTENSION_ENERGY_CAPACITYconstant, 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_AMOUNTconstant; currently unused in game (seeDensity::amountinstead). - Translates the
RAMPART_HITS_MAXconstant, 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.