Skip to content

Initiative

One slot a Combatant occupies in the turn order.

Turn order is modelled as entries rather than a single number on the combatant, because a combatant can act more than once per round — legendary actions, multiple initiative counts, or a system that hands out several turns. Each entry carries its own rolled value and, once Game/sortInitiative() has run, its order within the round.

An entry with no order exists but is not yet in the turn order.

  • SeeAlso: Combatant, Game

View JSON Schema

Property Type Required Description
id string Yes The unique identifier for this initiative entry. A UUID string generated when the entry is created. Embedded objects have no primary key, so this is what Game/initiativeId points at to mark the acting entry.
name string No An optional label for this entry. Distinguishes a combatant’s several entries from one another where the system gives them distinct meanings.
Examples: "Legendary Action"; "Lair Action"
value AnyRealmValue Yes The rolled or assigned initiative value. Held as AnyRealmValue because systems score initiative differently — a number in most, a drawn card or suit in others. .none means the entry has not been rolled yet and it is excluded from sorting.
Examples: .int(17); .string("Ace of Spades") SeeAlso: roll(), Game/rollInitiative(for:)
order integer No This entry’s position in the round, counting from 1. Assigned by Game/sortInitiative(). nil while the entry is not part of the turn order — which is exactly what isActive reports.