Skip to content

Add the "Stability" damage metric behavior #710

@alexanderson1993

Description

@alexanderson1993

There's a new damage behavior called "Stability", which is the chance that a command sent to that system will trigger an unexpected error and have to be retried by the crew. See https://thoriumsim.com/blog/fixin-to-fix.

Essentially, the player clicks a button, the computer rolls some dice. If the dice value is lower than the corresponding system's (in)stability value, the action fails and the player is given a notification that their action failed and they need to try it again.

This will need to be added to every existing system API, including warp engines, impulse engines, thrusters, phasers, torpedos, and sensors. Ideally, a generic function should be created which can be placed at the top of the API handlers:

function checkSystemStability(ship:Entity, systemType: systemTypes): boolean {
  // Checks the stability, rolls the dice using `ship.ecs.rng.next()`, returns false or maybe even throws an error if the system stability check fails
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureHelp WantedItems that are good for folks that are new to the project.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions