Skip to content

Support numeric variables for lenience #2634

@blkerby

Description

@blkerby

Currently we have an assortment of helpers to express spike suit leniency, based on the damage source per attempt: e.g., spikes, thorns, and Samus Eater. Randomizers (and other tools) have to override these individually. This grows more complicated with slopespark, since each attempt takes an enemy hit, and it would be messy to have to define helper for each type of enemy.

A way to solve this is to extend the schema to be able to reference a numeric variable in spikeHits, enemyDamage, and similar logical requirements. In other words, where we are currently limited to expressing a constant, e.g.

{"spikeHits": 2}

We would like to be able to reference a leniency-dependent variable, e.g.

{"spikeHits": "n_spikeSuitLenience"}

Some proposed details:

  • Use the prefix "n_" (for "numeric"), since it is a new type of entity in the schema.
  • We'll have a new file "numerics.json" (similar to helpers.json) to declare the numeric variables and assign default values for them.
  • We'll want to define some simple arithmetic operators, for example addition and multiplication. Then we could define "n_spikeSuitAttempts" as {"add": ["n_spikeSuitLenience", 1]}. Likewise we may want to be able to mulitiply heat frames by a lenience value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions