Skip to content

Make ability definitions easier to write

Status: code complete; the owner's manual gameplay check remains.

Goal

Make ability definitions easy to read without exposing their internal IDs during normal editing. Preserve existing IDs, values and upgrade codes.

Work

  • [x] Give definition values clear names. Omitted cooldown and stamina cost default to zero; an omitted upgrade code means no code.
  • [x] Move the IDs to a generated record and keep the 119 existing IDs. Classes with multiple definitions use stable variant labels.
  • [x] Add Tools > Tiny Chaos > Register Ability IDs to create IDs for new definitions. It keeps existing IDs and rejects duplicate or inconsistent records.
  • [x] Compare all 119 IDs, names, defaults and upgrade-code matches with the captured pre-change baseline in Unity. A simulated new ID, duplicate detection and the no-change registration path passed.
  • [x] Check seven character, 95 upgrade, 13 prerequisite and player-prefab ability links in Unity.
  • [x] Build a Linux IL2CPP player. Unity reported success, and the generated player code includes the new registry and all 117 ability classes.
  • [ ] Have the owner check ability lookup and behavior in a running player. The build and Editor checks do not prove gameplay, Windows/Steam or every reflection path.

How to add an ability

Write a definition such as [AbilityDefinition(name: "Frenzy", cooldown: 30f)]. When a new definition has compiled, use Tools > Tiny Chaos > Register Ability IDs. Do not edit the generated ID record by hand. Keep existing script .meta files when moving or renaming scripts. For classes with multiple definitions, keep their variant labels stable; changing one without updating the registered identity is rejected.

upgradeCode is the clearer name for the earlier reporting code. Its existing values and purpose are unchanged. Some abilities have timing or stamina rules outside the definition, so an omitted value does not prove they have no other cost or timing.

The owner prefers to test further ability behavior manually. These checks cover identity and connections, not a new round of ability gameplay testing.