Skip to content
Discord Download

Counters

Keep a number such as deaths or wins, show it in chat and overlays, and react when it changes or reaches a value.

A counter is a number CroStream keeps for you: deaths in a boss fight, wins today, subs toward a goal. It survives restarts. Macros change it, read it and react to it; chat messages, alerts and overlays can show it.

Counters are built in; they need no connection.

Open Counters in the sidebar (under Automate). Each counter is a card showing:

  • its live value, label and description;
  • chips for its lowest and highest value and for automatic resets;
  • a copy chip for {counter.<name>}, to paste into a macro;
  • buttons: − and + (change it by its step), Set…, Reset, Edit and Delete.
Setting What it does
Name The counter’s key, used in {counter.<name>}. Lowercase letters, digits, - and _. It can’t change after you create the counter; to rename it for display, change the label.
Label The name people see, such as Deaths.
Description A note for yourself.
Start value What the counter starts at and what a reset returns it to.
Step How much +, − and the macro steps add or subtract when you give no amount. Default 1.
Lowest value, Highest value Optional limits. A value past a limit is clamped to it.
Reset automatically Never, When the stream goes live, or Daily at local midnight.

Write {counter.<name>} in any text a macro sends: a chat message, an alert, a webhook body. It shows the value at the moment that step runs, so a Change a counter step before it is already counted:

  1. Create a counter named deaths.
  2. Create a macro with two steps: Change a counter (Counters group) with Counter deaths and Change add, then Send chat message with Deaths: {counter.deaths}.
  3. Run it from a trigger, such as a chat command !death.

Note: Your own variables win

If the macro sets a variable with the same name (a Set a value step whose ID is counter, say), that one is used instead.

The Counters group of the palette has five actions:

Action What it does Outputs
Create a counter Makes a counter. If the name exists, it fails or keeps the existing counter, as you choose. {value}
Read a counter Reads it without changing it. {value}, {label}, {start}, {step}, {min}, {max}
Change a counter Add, Subtract, Set or Reset. The amount defaults to the step. {value}, {previous}, {delta}
Delete a counter Removes it and its value. {previous}
List counters Lists every counter. {names}, {count}

Every counter setting accepts {variables}. Full details are in the Actions reference.

These trigger events run a macro when a counter changes:

Event Fires when
Counter changed Any counter, or one you pick, changes. Pick a direction: any, up or down. It doesn’t appear in the activity feed.
Counter reached a value A counter crosses a Value, once each time it crosses (again after it has gone back and returns), or every N counts. Direction: up, down or any.
Counter created A counter is made.
Counter deleted A counter is removed.
Counter reset A counter is reset. Pick the cause: any, manual, macro, stream or daily.

The macro gets {counter}, {label}, {value}, {previous}, {delta}, {how} and {cause}, plus {target} for reached. See the Events reference.

For example, to celebrate 100 deaths: create a trigger with the event Counter reached a value, Counter deaths, Value 100, and have it run a macro that shows an alert and sends 100 deaths. Impressive.

An If step can check the live values Counter value and Counter exists. See Conditions.

Overlays and custom widgets read a counter as the data key counter.<name>; the gallery’s counter and goal widgets use it. A deleted counter’s widget shows nothing. See Overlay data.

The free plan has 1 counter. Subscribers have unlimited counters.

If you’re over the limit, for example after a subscription lapses, your counters keep counting from macros and from the Counters page. Editing their settings and adding counters need a subscription. Deleting is always allowed.

Counters made with the old Change a counter step (in the Tools group) appear on the Counters page by themselves, all of them, even on the free plan.

  • A name that wasn’t a valid key (spaces or capitals) was turned into one: Death Count became death-count. The old name keeps working as an alias, in macros, conditions and overlays.
  • The old Tools step keeps working in existing macros but isn’t offered for new steps. Use the Counters actions instead.