Skip to content
Pieter edited this page Jan 25, 2023 · 5 revisions

Stats Manager

This is the documentation for the stats manager module. It is responsible for gathering and handling statistics for rooms and the global game state.

TL;DR

  • Every room has an pre tick and end tick function to handle gathered stats
  • The stats mid run are updated via globalStatsUpdater
  • Memory.roomStats can be set to 0 (off), 1 (basic), or 2 (detailed) to control the level of stats gathered

Setup

No setup is required for this module. The level of statistics gathered can be controlled by setting Memory.roomStats to one of the following values:

  • 0: Off
  • 1: Basic
  • 2: Detailed

Stats

The following interfaces define the statistics gathered by the module:

ControllerLevel

interface ControllerLevel {
    level: number
    progress: number
    progressTotal: number
}

RoomStats

interface RoomStats {
    gt: number // Game Time
    rc: number // Remote Count
    res: number // Remote Energy Stored
    reih: number // Remote Energy Input Harvest
    reoro: number // Remote Energy Output Repair Other (non-barricade structures)
    reob: number // Remote Energy Output Build
    rrocu: number // Remote Room CPU Usage
    rrvmcu: number // Remote Room Visuals Manager CPU Usage
    rcmcu: number // Remote Construction Manager CPU Usage
    rrolmcu: number // Remote Role Manager CPU Usage
    rrolmpccu: number // Remote Role Manager Per Creep CPU Usage
    retcmcu: number // Remote End Tick Creep Manager CPU Usage
    rprmcu: number // Remote Power Role Manager CPU Usage
    rprmpccu: number // Remote Power Role Manager Per Creep CPU Usage
}

RoomCommuneStats

interface RoomCommuneStats extends RoomStats {
    cl: number // Controller Level
    eih: number // Energy Input Harvest
    eib?: number // Energy Input Bought
    eou: number // Energy Output Upgrade
    eoro: number // Energy Output Repair Other (non-barricade structures)
    eorwr: number // Energy Output Repair Wall or Rampart
    eob: number // Energy Output Build
    eos: number // Energy Output Sold
    eosp: number // Energy Output Spawn
    eop: number // Energy Output Power
    mh: number // Minerals Harvested
    es: number // Energy Stored
    bes: number // Batteries Stored *10
    cc: number // Creep Count
    tcc: number // Total Creep Count
    pcc: number // Power Creep Count
    su: number // Spawn Usage as a decimal
    acrmcu: number // Ally Creep Request Manager CPU Usage
    clrmcu: number // Claim Request Manager CPU Usage
    tmcu: number // Tower Manager CPU Usage
    smcu: number // Spawn Manager CPU Usage
    cormcu: number // Combat Request Manager CPU Usage
    dmcu: number // Defence Manager CPU Usage
    srmcu: number // Spawn Request Manager CPU Usage
    rocu: number // Room CPU Usage
    rvmcu: number // Room Visuals Manager CPU Usage
}

Note that RoomCommuneStats extends RoomStats, meaning it includes all of the statistics defined in `

The International Wiki

Important

Features

Contribution

Design

Clone this wiki locally