Skip to content

1. Basic Concepts

Kristian Williams edited this page Apr 29, 2019 · 13 revisions

Configuration

All configuration is done by entering data into an INI formatted text in the Custom Data of the blocks.

The script looks for a section starting with [SSM Configuration].

1.1 Zones

These are arbitrary block groups of the grid, blocks can be in multiple zones at the same time.

Format

Add a to a block's Custom Data (in the SSM Configuration section):

zones=zone1

If you have multiple zones, use the new-line construction:

zones=
|zone1
|zone2
|zone3

1.1.1 Why not just use normal block groups?

I originally planned to, but since it's currently not possible to hide Block Groups from the UI. It's also cumbersome to add/remove blocks from an existing group, I found the Custom Data attribute to be far more flexible and easier to use.

1.1.2 Why not just Block Name tags?

Because of the proliferation of block tags already in use by scripts, and the verbose nature of both zone-names and functions, I found that the Block Name tag convention too restrictive.

Having already build a system for storing config variables in machine-readable the Custom Data, I felt this was the most flexible approach.

1.2 Functions

These are tags which instruct the Grid on how to treat the block in any given scenario.

By default the script will ignore any blocks which have no assigned function, with the exception of Light Blocks. When a Light Block isn't assigned the warnlight function, it will be turned off when a state changes the attributes of other lights in the zone.

Format

The same as for zones, add a line in the following format, in the Ship Systems Manager section:

functions=function1

Or

functions=
|function1
|function2

1.2.1 Supported Functions

  • AirlockDoor: Applies to Doors.
    • When a decompression state is detected, this door will be closed and disabled.
    • While supported, it is not recommended to use Airtight Hanger Doors for this function, as they take several seconds to close.
      • They do look super cool when they close though.
  • SecurityDoor: Applies to Doors
    • When an intruder or battle stations state is detected, these doors will be closed.
  • Alert: Applies to Sound Blocks, Lights, Text Panels, Text Surface Providers
    • When a state is detected which supports it, sound blocks will play an appropriate sound, lights will change their color and/or blink patterns and text panels will be updated with text.
    • Note regarding Text Surface Providers
      • These are blocks which include one or more text panels, but are not themselves a text panel.
      • This includes Cockpits, Control Consoles and Programmable Blocks.
      • To set the function of these "sub-blocks" you set the value of functions-0 in the blocks Custom Data, just like a normal block.
        • The number 0 is set to the correct index for the screen you're interest in. For blocks with one screen it's always 0.
        • For cockpits the values are:
          • 0: Center
          • 1: Left
          • 2: Right
          • 3: Keyboard
        • For Programmable Blocks the values are:
          • 0: Large Screen
          • 1: Keyboard
  • LowPower: Applies to any Lights, Assemblers and Refineries
    • These blocks will remain active during a low-power state, all others will be temporarily disabled.
  • SelfDestruct: Applies to Warheads
    • These warheads will be armed during a self destruct sequence.

1.3 State Priorities

These are flags assigned to a block to announce to the block styler what condition the current block is in. Each tick, all blocks in a zone are given styles depending on that zones test conditions and then styles are applied in order of priority.

1.3.1 Pre-defined States

  1. Self-Destruct
  • The destruct command has been issued to the Ship State Manager.
  1. Decompression
  • The block is in a zone which contains a functional Air Vent which cannot pressurize the atmosphere, indicating a hull breach.
  1. Intruder Alert
  • The block is in a zone which contains has a sensor or turret which has detected a hostile entity.
  1. Battle Stations
  • The battle command is issued to the Ship State Manager.
  1. Low Power
  • Activated if the average remaining power in all discharging batteries on the current Grid drops below 10%.
  • This state is not tested for if there are no batteries present on the Grid.

1.4 Example

Here is an example setup for a security door and airlock between Zones 1 and 2.

[SSM Configuration]
zones=
|zone-1
|zone-2

functions=
|AirlockDoor
|SecurityDoor