Skip to content

[Wiki] Create Wiki Format for Properties #32

@BellCubeDev

Description

@BellCubeDev
  • Short Description
  • Long Description
  • See Also
  • Notes & Caveats
  • Examples
  • If not Auto:
    • Getter Description
    • Setter Description
    • Setter change persists across save?
    • Setter Latent / Non-Delayed?
  • If Readonly:
    • Shared, script-scoped Enum ID

Enum IDs

Bethesda has more than once utilized a pattern where they declare a set of AutoReadOnly properties in a block like this:

; Set of read-only properties to essentually make a fake enum for critical stages
int Property CritStage_None = 0 AutoReadOnly
int Property CritStage_GooStart = 1 AutoReadOnly
int Property CritStage_GooEnd = 2 AutoReadOnly
int Property CritStage_DisintegrateStart = 3 AutoReadOnly
int Property CritStage_DisintegrateEnd = 4 AutoReadOnly
int Property CritStage_FreezeStart = 5 AutoReadOnly
int Property CritStage_FreezeEnd = 6 AutoReadOnly

These properties are all part of a singular "fake enum," and we should have a data structure to account for that. The simplest-for-users format would be to have a script-scoped Enum ID.

The simplest-to-implement solution would've been to include a reference to each property in the enum, but that gets exponentially more problematic the more enum members there are—especially as more are added. That solution leads to exponentially duplicated state and introduces ample opportunity for human error. Instead, a script-scoped ID allows for dynamic addition and removal from an enum by editing just one file.

A good editor UX should make the ID less prone to error, since we can show a modal before users create a brand-new Enum ID but not before they select an existing one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    wiki-githubThe project's automated use of the wiki GitHub gives us

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions