Mother DocsMother Docs
Buy me a Coffee
Steam Workshop
Discord
  • Mother OS (Ingame Script)
Buy me a Coffee
Steam Workshop
Discord
  • Mother OS (Ingame Script)
  • Mother OS (Ingame Script)
    • Getting Started

      • Upgrade Guide
      • Installation
      • Command Line Interface (CLI)
      • Configuration
      • Modules
    • Core Modules

      • Activity Monitor
      • Almanac
      • Block Catalogue
      • Local Storage
      • Intergrid Message Service
    • Extension Modules

      • Air Vent Module
      • Battery Module
      • Terminal Block Module
      • Cockpit Module
      • Connector Module
      • Display Module
      • Docking Module
      • Door Module
      • Flight Control Module
      • Flight Planning Module
      • Gas Tank Module
      • Gyroscope Module
      • Hinge Module
      • Landing Gear Module
      • Light Module
      • Map Module
      • Piston Module
      • Programmable Block Module
      • Rotor Module
      • Screen Module
      • Sensor Module
      • Sorter Module
      • Sound Block Module
      • Thruster Module
      • Timer Block Module
    • Command Cheatsheet
    • Compatibility
    • Examples
  • Mother Core (Script Framework)
    • Getting Started

      • Upgrade Guide
      • Installation
      • Architecture Overview
      • Managing Script Size & Complexity
    • Building A Module
    • Console (CLI)
    • Core Modules
      • Activity Monitor
      • Almanac
      • Block Catalogue
      • Clock
      • Command Bus
      • Configuration
      • Event Bus
      • Intergrid Message Service
      • Local Storage
      • Terminal
    • Utilities

      • Color Helper
      • Security
      • Serializer
  • Powered By Mother

Almanac

  • The Unique Identifier
  • Records
    • Record Types
    • Creating a Record
    • Removing a Record
    • Storing Records across Recompiles

The Almanac manages a list of records that represent entities in the game world. These records can be used to track the location of entities, communicate with them, and display them on map displays.

The Unique Identifier

Since each instance of Mother is unique to its Programmable Block, we use the programmable block's EntityId as the unique identifier.

// via Mother (recommended)
long myId = Mother.Id;

// or via the Program instance
long myId = Program.Me.EntityId;

Records

DockingModule.cs
// Get a record by a name/nickname
AlmanacRecord record = Almanac.GetRecord("Mothership"); 

// Get a record by ID (the EntityId of the programmable block)
AlmanacRecord record = Almanac.GetRecord(12345678901234567890);

Info

Mother passes the current grids name with every request and this is used as the default nickname of the record.

Record Types

The almanac currently supports the following Entity types:

TypeDescription
gridRepresents a grid in the game world, such as a ship or station.
waypointRepresents a GPS waypoint in the game world.
localRepresents another instance of Mother running on the same grid.

Creating a Record

DockingModule.cs
// Create record
TopSecretBase record = new AlmanacRecord(
    "TopSecretBase",                            // name
    "grid",                                     // entity type
    new Vector3D(1234.23, 5678.72, 24155.22),   // position
    0                                           // speed (optional)
);

// Add to the almanac
Mother.GetModule<Almanac>().AddRecord(record);

When records are added to the Almanac, they will automatically appear on map displays and be accessible for remote communication. Mother adds and updates records frequently via communications.

Removing a Record

To remove a record, you can simply access the Records list and remove the record you want to delete.

DockingModule.cs
// Get the record
AlmanacRecord record = Almanac.GetRecord("Mothership");

// Remove the record from the almanac
Almanac.Records.Remove(record);

Storing Records across Recompiles

When a programmable block recompiles, scripts are reloaded and all state is lost by default. To prevent this, the Almanac stores records in Local Storage to make it accessible after recompile or a reboot.

Last Updated: 8/8/25, 10:08 PM
Contributors: Luke Morrison, lukejamesmorrison
Prev
Activity Monitor
Next
Block Catalogue