midi-qol
There are two integration paths. The pre-resolve path interrupts the midi workflow mid-flight and offers a Spend dialog before the outcome lands. The post-hoc path adds Raise Attack and Raise Save buttons to chat cards from finished workflows, so a player can still spend after the fact.
Compatibility
Section titled “Compatibility”Requires midi-qol active in the world. Both paths use standard midi-qol workflow hooks and degrade gracefully if midi-qol isn’t running.
Pre-resolve Spend
Section titled “Pre-resolve Spend”Two hook points on the live midi-qol workflow.
Attack pathway. After midi finishes the attack roll but before damage is dealt, Tenacity checks whether the attack already hits every target naturally (a natural 20, or a total that beats every target’s AC). If so, nothing happens. If at least one target is missed and the AC is unknown or unmet, the player gets the Spend Tenacity on Attack dialog. Confirming sends the new total back to midi, which continues the workflow as if the bumped value was the original roll. Damage is dealt to anyone the new total hits, target hit-state updates, and the chat card shows the raised total.
Save pathway. After midi resolves saves, any target that failed gets a Spend Tenacity on Save prompt. The owning player (or the GM if no player owns the actor) sees the dialog with the target’s name, the roll total, and the DC if disclosure allows. Confirming pushes the new total back into midi’s failed-save set. If the bumped total now meets the DC, midi marks the save as a success and adjusts damage accordingly.
Either dialog can be canceled; the workflow then continues with the original roll.
Timeout
Section titled “Timeout”Pre-resolve dialogs run on a timer controlled by the Midi Spend Timeout setting (default 10 seconds). A header bar drains over the duration, and there’s a pause control for players who need more time.
When the timer expires, the dialog closes, “Tenacity spend timed out.” appears, and midi continues with the original roll. A timeout behaves the same as canceling. Set the timeout to 0 to disable it; the dialog then waits forever.
Per-target prompts
Section titled “Per-target prompts”Saves with multiple targets produce one dialog per failed save, presented sequentially. Each prompt names the specific target and is owned by that target’s actor (or the GM if no player owns it). Canceling one prompt doesn’t cancel the others, but a player can dismiss each one in turn to bow out of the remaining saves.
A player who owns multiple failed-save targets sees the dialogs back to back. Refusing on one target doesn’t consume that target’s Tenacity.
Bump propagation
Section titled “Bump propagation”When Spend succeeds during pre-resolve, the bumped total isn’t just cosmetic. It replaces the workflow value midi uses for downstream decisions:
- Attack bumps update
workflow.attackTotaland append a flavored Tenacity term to the attack roll. Newly-hit targets take damage as part of the normal workflow. - Save bumps update the saving throw and, if the new total meets the DC, call
workflow.updateSaveFailSetsso midi treats the target as having passed. Damage is reduced or canceled according to the activity’s on-save behavior.
The chat card is patched in place: the displayed total, the save row, and any Save This Roll card all reflect the bumped value. A summary pill appears on the card noting the raise.
Post-hoc Raise Attack/Save
Section titled “Post-hoc Raise Attack/Save”If a workflow has already finished and Post-Hoc Spend is enabled, Raise Attack and Raise Save buttons are injected directly onto the midi chat card.
- Raise Attack appears on cards where the attack missed at least one target and the workflow has not already been bumped. Spending opens a Post-Hoc Attack Raise dialog listing every missed target with its AC and the gap to flip. Confirming spends Tenacity, raises the attack total, and dispatches damage to any target the new total now hits.
- Raise Save appears on cards with one or more failed saves. One button per failed save the user owns. Spending opens a Post-Hoc Save Raise dialog for that target. Confirming raises the save and, if it meets the DC, restores HP according to the damage-undo mode.
Both buttons honor the Post-Hoc Window setting. The default of 0 means no expiration. Any positive value sets the number of seconds after the chat card’s timestamp during which the buttons remain available. Once a card has been flipped post-hoc, the corresponding button disappears so the same card can’t be raised twice.
Damage undo modes
Section titled “Damage undo modes”When a post-hoc save flip turns a failure into a success, damage has usually already been applied. The Post-Hoc Damage Undo setting decides what happens to that HP:
- Auto. HP is restored silently. The target’s HP and temp HP are written back up to their pre-damage values, capped at max HP.
- Confirm. A “Restore HP” dialog is shown to whoever triggered the post-hoc save spend — the target actor’s owner if a player owns it, or the GM if no player does. The dialog shows the exact values. Choosing Keep Damage leaves the target as-is even though the save flipped.
- Off. No HP is restored. The save still flips for record-keeping and the chat card shows the new total, but damage stays applied.
The restored amount reflects the activity’s on-save behavior: a half-on-save spell restores the half that was taken; a none-on-save effect restores the full damage; a full-on-save effect restores nothing because no save reduction applies.
Limitations
Section titled “Limitations”- Multi-target cleave on post-hoc attacks. When a post-hoc attack raise flips an attack into multiple new hits at once, damage application uses midi’s
applyTokenDamagedirectly. Edge cases involving conditional damage or per-target modifiers may not perfectly replicate what the original workflow would have produced. - Workflow garbage collection. midi-qol drops workflow objects from memory after a while (and always on page reload). Post-hoc buttons rely on flag data stored on the chat card rather than the live workflow, but features that need workflow internals (damage undo precision, save roll lookup) degrade if the workflow is gone. A “Workflow data unavailable” notification appears if Tenacity can’t reconstruct enough state to finish a post-hoc flip.
See also
Section titled “See also”- Settings for Midi Spend Timeout, Post-Hoc Spend, Post-Hoc Window, and Post-Hoc Damage Undo.
- Spending Tenacity for the general Spend dialog and how it works outside midi.
- Refunds and failed raises for what happens when a post-hoc raise does not flip the outcome.