Skip to content

Resource Log

TheGenieOfTheCode edited this page Nov 4, 2026 · 5 revisions

Resource Log

The Resource Log puts a one line entry in chat for every change to a creature's resources, right where it happened, so a fight can be read back afterwards: who took what, who spent what, and where the Malice went.

A round in the chat log in the dark theme. Malice rises from 0 to 6 at the start of combat, Khorisa gains 3 Piety at the start of her turn, then spends 3 on Judgment's Hammer, and the Goblin Underboss loses 11 Stamina to holy damage. The same round in the light theme
A goblin squad's turn in the dark theme. The Director spends 5 Malice on Tiny Stabs, and three heroes lose 2, 1 and 1 Stamina. The same turn in the light theme

What gets logged

  • Stamina and Temporary Stamina, including a squad's shared Stamina pool.
  • Heroic Resources, under the class's own name: Piety, Ferocity, Clarity and so on.
  • Surges.
  • Recoveries.
  • Malice and Hero Tokens.

Only during combat, unless the Director turns on Log Outside of Combat. Spending a Recovery is the exception and is logged either way.

Reading a line

From left to right: the creature's portrait and name, a token for the resource, the change, the damage type for damage, a small token of whoever dealt the damage, and the value before and after.

Hovering the damage dealer's token shows the ability and who used it, for example "Judgment's Hammer, from Khorisa". Damage a creature does to itself has no dealer, and a dealer the players can't see is only shown to the Director.

Names are shown in full and only shortened when they don't fit. A hero is shortened to their first name. A monster drops the word that most monsters in the fight share, so "Goblin Underboss" becomes "Underboss" in a fight full of goblins, never "Goblin".

Damage shows its type's icon. When immunity or weakness changed a hit, the damage that came in is struck through in front of what was actually lost, and hovering the number shows how much each one took off or added. A hit immunity soaked completely shows as a struck number and a 0, marked "Immune". That one only appears when the Director applied the damage: nothing changes on the token, so the only place the hit can be seen is on the client that applied it, and only the Director's records.

When a hit breaks through Temporary Stamina into Stamina, it's one line, with a small shield on the Stamina token, and the split is in the tooltip.

A Recovery line shows the Stamina it healed.

Squad minions share one Stamina pool, so their lines name the minion that was hit. On Draw Steel 1.2, that's the minion whose section the damage was applied from. A hit on several minions of the same type in a squad shows all of their portraits and reads in the plural, "Darts" rather than "Dart".

Where the numbers came from

Some changes are worked out by the system rather than typed in by anybody, and for those, hovering the number shows the sum:

  • Malice at the start of each round: the round number plus the heroes still standing.
  • A hero's Heroic Resource at the start of their turn: the class's roll and its result.
  • A gain made through Draw Steel - Resources UI: the reason it gives, such as the trigger that earned it.

Combat started and Combat ended

Starting a fight changes a lot at once: Malice is set from the heroes' average Victories and then gets the first round's gain, and every hero's Heroic Resource is set to their Victories. Ending one clears Malice and resets the heroes. Instead of a line for each, both become one line, Combat started or Combat ended, and hovering it shows a table of what changed for whom.

Malice clearing at the end is done by the system as the combat is deleted, after it has stopped counting as a combat, so Battle Log still logs the Malice changes it can explain at that point.

A change somebody made by hand has no sum, and if one merges into a line that had one, the sum is dropped rather than left wrong.

Merging

Changes to the same thing by the same person merge into one line when they come back to back, with no message between them, within eight seconds and in the same turn. Taking 5, then 3, then 2 damage in quick succession is one line of 10.

Damage only merges while the dealer stays the same, so two heroes hitting the same goblin get a line each. A change that carries a reason, like a start of turn roll or a Resources UI gain, never merges, so the reason stays readable.

Lines never move once they're drawn.

Hero Token spends never merge. Gifts merge with gifts. A Stamina gain within four seconds of spending a Recovery joins the Recovery's line as its heal.

Healing never merges into damage, or damage into healing, so a heal right after a hit gets its own line. The exception is an undo: when a hit is undone and the Stamina goes back exactly as it was, both lines are removed. That works for the undo button beside the system's apply button on Draw Steel 1.2, for Draw Steel: Target Damage's undo on Draw Steel 1.1 and for undos from Combat Tools, as long as nothing else changed that creature's Stamina in between.

Who sees what

Players only see how much a monster's Stamina changed, not what it was before or after. The Director can turn on Show Monster Stamina to Players to show them the full numbers. Everything else, players see in full.

The chat tabs choose whether you see the lines, for you only: the Logs tab shows only log lines, and the Chat tab hides them.

Hovering a line gives the Director two buttons: hide it from the players, or delete it.

Messages a line replaces

Some chat messages only announce a resource change, which the log already shows. With the Resource Log on, those say the same thing twice.

  • Replace Hero Token Messages hides the system's message when a Hero Token is given or spent. The line shows who spent the token and on what, for example "Barsina · Gain Surges".
  • Hide Resource Gain Rolls hides the roll for a hero's Heroic Resource at the start of their turn, the Gain links for Heroic Resource and Surges, and the gain messages from Draw Steel - Resources UI. Hovering the number shows the roll or the reason.

Both are on by default.

Recurring damage from Draw Steel: Combat Tools is hidden behind the Stamina line it caused, with no setting needed.

A hidden message comes back whenever its line doesn't show: with the line hidden or deleted, or when nothing was logged, outside of combat for example. A line remembers the messages it stands in for, so deleting one of them takes its share off the line, or removes the line if nothing is left.

When Resources UI's own undo button takes a gain back, through Draw Steel: Combat Tools, the resource is refunded and its message is deleted, which removes the line with it.

How it works

Nothing is posted. The Director records each change into a world setting, capped at the last 600 lines, and every client draws the lines into its own chat log, the same way the turn markers are drawn. Turning the module off leaves nothing behind, though it also means the lines aren't in Export Chat Log.

Each line remembers the message it came after and the turn that was going on, so it lands after that turn's marker and folds away with it. A folded turn's count includes its log lines. A round with only log lines in it still counts as having something in it.

Deleting a message moves its lines up to the message before it. Clearing the chat clears the log too.

The tokens and damage type icons come from Draw Steel: CTLib, so other modules can use the same ones.

Some annoying problems I ran into

  • Damage arrives without a type. The system writes a Stamina loss through modifyTokenAttribute, which only knows the new number. So Battle Log wraps the system's takeDamage, notes the type and amount there, and passes them along to the Stamina update in preUpdateActor.
  • Malice is set twice at the start of combat. startCombat sets it to the average Victories before the combat counts as started, and the first round then adds to it. The first write looked like it happened outside combat and wasn't logged, so the line read 1 → 6 instead of 0 → 6. Battle Log now notes when a combat is starting and folds both writes into one line.
  • Clearing an empty chat clears nothing. With only log lines left, Clear Chat Log has no messages to delete, so no deletion hook ever fires. Battle Log wraps the delete itself and clears the log whenever everything is deleted.
  • Lines that moved made the log hard to read. For a while a merge moved the line down below the newest message, so two quick +1s with a Hero Token message between them stayed one line. In practice lines kept jumping while you were reading, so now they only merge back to back and never move.
  • The system's Stamina update doesn't know who dealt the damage. Battle Log takes the dealer from wherever it can find one: the message behind the system's Apply button, the record Draw Steel: Target Damage keeps on its message on Draw Steel 1.1 (filled in just after the damage lands), the damage origin Draw Steel 1.2 passes along with damage applied from a target's section, and a dsbl.source option that other modules pass along with the damage (see below).

For module developers

To credit damage to someone, pass a source in the options of the system's takeDamage:

actor.system.takeDamage(amount, { type, dsbl: { source: { actorUuid, tokenUuid, ability } } });

ability is the name shown before "from". Any of the three can be left out.

To have an undo remove the hit's line along with its own, pass dsblUndo: true in the options of the update that puts the Stamina back:

actor.update({ "system.stamina.value": before }, { dsblUndo: true });

For a squad, pass it on the update to the combatant group's system.staminaValue.

Clone this wiki locally