Skip to main content

InitiativeSystem

Represents the time when the initiative should be set. Can either be per combat (once at the start) and per round (at the start of every round of combat the initiative changes). Represents an initiative system for the combat system. This allows you to configure how the app tracks combat

JSON Format

{
"type": "InitiativeSystem",
"when_to_set": ...,
"has_turns": ...,
"roll_formula": ...,
"initiative_modifier": ...,
"initiative_tie_breakers": ...,
"initiative_degrade_per_pass": ...,
"min_initiative_to_act": ...
}

Fields

FieldTypeRequiredDescription
when_to_setInitiativeSetTimeThe time when initiative should be set.
has_turnsboolIf the initiative system should track turns within a round or not.
roll_formulaStatFormulaComponentOptional. Defaults to null. A StatFormulaComponent computing to a string that represents the formula for the dice roll used to calculate initiative. This is a proper DiceRoll formula, as defined in the RollStatFormulaComponent. Omitting it will just assume 0 for all combatants. The value of this roll gets added to the initiative_modifier value.
@type string
initiative_modifierStatFormulaComponentA StatFormulaComponent computing to an integer that should be added to the roll_formula result for each combatant to calculate their initiative.
@type integer
initiative_tie_breakersList<StatFormulaComponent>A list of StatFormulaComponent computing to integers that will act as tie breakers whenever 2 combatants are tied for initiative. These formulas should access the $combatant stat to calculate the tie-breaking value for the combatant in question. For example, if dexterity_score is the only tie breaker, you'd probably provide: json { "type": "stat", "stat": "$combatant.dexterity_score" } Be careful: if dexterity_score is not a valid stat for all combatants, the above example wouldn't work. If that is the case you would need to check what the combatant type is by accessing the $combatant.combatant_type stat (which is set by the app automatically for your convenience), and act accordingly.
@type integer | decimal
initiative_degrade_per_passdoubleOptional. For systems that allow for multiple passes of initiative in a single round. This number will be subtracted from each combatant's initiative number at the end of an initiative phase, and the combatants whose initiative is still >= than the min_initiative_to_act will get an additional turn this round. This feature will be turned off if the value is omitted.
min_initiative_to_actdoubleOptional. Needs to be provided when initiative_degrade_per_pass is provided. See the documentation for that type for more details.