screeps-clockwork
    Preparing search index...

    Function initialize

    • The initialize function initializes the WASM module and applies global setup options. Call it in your main loop before using any other screeps-clockwork functions. Depending on available CPU, it may not load the WASM module completely in the first tick, but it will pick back up where it left off if the script times out.

      It is safe to call this function repeatedly, but setup options such as portals and portal cache sizing are applied only once, after WASM initialization has completed. Use setPortals when you intentionally need to reconfigure portals later.

      Parameters

      • options: boolean | ClockworkInitializeOptions = false

        Pass true or { verbose: true } to log WASM loading; provide portals and cache sizing to apply them once after WASM initialization.

      Returns void