Roll initiative
roll-initiativeRoll initiative for combatants in a Foundry VTT encounter, targeting all, NPCs, or specific ones, and only those without initiative by default; post results with chosen visibility.
Instructions
Roll initiative with the game system's formula: for all combatants, only non player characters, or the combatants named. By default only those without initiative roll. Rolls are posted to the chat only with toChat; a hidden combatant is never posted publicly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | all (default) or npcs, combatants no player owns | |
| toChat | No | Post the roll to the chat. Default false: nothing is posted | |
| formula | No | Formula instead of the system formula, e.g. "1d20+2" | |
| combatId | No | Id of the combat encounter, as list-combats shows it. Without it the active encounter is used. | |
| rollMode | No | Who sees a posted roll: publicroll everyone, gmroll Gamemasters (default), blindroll Gamemasters only and hidden from the roller, selfroll only the bridge user | |
| onlyMissing | No | Only combatants without initiative (default true) | |
| combatantIds | No | Roll exactly for these combatants; scope and onlyMissing do not apply then |