Mini Countdown Dice

Mini Countdown Dice is a lightweight, system-agnostic Foundry VTT module for tracking shared values with floating d4, d6, d8, d10, d12, and d20 counters.

API

const api = game.modules.get("mini-countdown-dice").api;
api.showLabel(dieId);;API
api.add();Adds a d20. Alias: api.addDie()
api.add(6);Adds a specific die size.
api.setSides(dieId, 10);Changes an existing counter to a d10.
api.setColor(dieId, "#b6293b");Sets the colour for a specific die.
api.useDefaultColor(dieId);Resets a specific die to the default color.
api.getDice();Returns a copy of the current counters.
api.removeDie(dieId);Removes a die (includes confirmation).
api.show(dieId);Shows a die. Omit the ID to show every die.
api.hide(dieId);Hides a die. Omit the ID to hide every die.
api.toggle(dieId);Toggles visibility for a specific die (or all if omitted).
api.clearDice();Clears all dice. No toolbar button is shown for this helper.
api.setLabel(dieId, "Villain");Sets the label for a specific die.
api.showLabel(dieId);Shows a die label.
api.hideLabel(dieId);Hides a die label.