La_Syl Studio
Widgets guide

Chat Activity Rewards

Runs your own Streamer.Bot actions and posts chat messages when chat reaches the message counts you set, for the whole chat and for each viewer.

Rewards a lively chat. When the whole chat reaches 100 messages, or a viewer reaches their 500th, Stream UI runs your own Streamer.Bot action — a sound, a scene change, a giveaway entry, anything you build — and can post a chat message.

It has no visuals: nothing on screen, no position, no style and no preview.

Platforms: Twitch, YouTube, Kick

Action pack: Stream UI - Backend while this widget does the counting, and for the pause → Pause and resume. Not needed to count when the counts come from the Scoreboard or the Viewer Cards. → Who needs what

Already counting messages with a Scoreboard stat, or a Viewer Cards score? Switch on Counted by the Scoreboard (whole chat) or Counted by the Viewer Cards (each viewer) and the rewards follow its count.

How it works

  • Two counts. Whole chat counts every message on every platform switched on. Each viewer counts each viewer's own messages. Each has its own switch and its own rewards.
  • Once per crossing. A reward fires when its count goes from below its number to at or above it. Its action gets the chatter who reached it (see Action arguments).
  • A reload fires nothing again. What is already counted when the browser source loads is the starting point.
  • Runs in the overlay that runs the actions, while the widget is on — it has no URL of its own. → Which overlay runs the actions
  • Left out: ignored users and your own broadcaster and bot accounts are never counted or rewarded.

Who counts

Counted hereCounted by the Scoreboard / the Viewer Cards
Whole chatThe global variable streamUi.chatRewards.countOn each platform switched on, the temp global of the first Scoreboard stat whose triggers count that platform's chat messages, ss.<platform>.<name>.currentScore, added up
Each viewerEach viewer's user variable chatMessagesOn each platform, the viewer variable of the first Viewer Cards score whose triggers count its chat messages (the first column, Today by default)

The widget finds those stats in the Scoreboard's and the Viewer Cards' own settings: a platform with none counts nothing.

Counted here, the counts are temporary — cleared when Streamer.Bot restarts — unless Count all time is on. They are written to Streamer.Bot in batches, about once a second.

The page

The widget's page works like a small app, with no preview (nothing to show):

  • Settings and Controls, the tabs over the editor, switch what it shows. On the Controls tab, Pause and Resume and their triggers → Pause and resume.
  • The column on the left lists its two counts, Whole chat and Each viewer, each with its on/off switch on its row (whole chat: on, each viewer: off by default). They follow the widget's own switch, beside the page's title: switching the widget off switches both off, switching it on switches both on, and switching one count back on switches the widget back on. With both counts off, the widget is off.
  • Whole chat and Each viewer each open a column of their own: Variable settings, that count's settings, and Rewards, which opens the Reward list. There you add, reorder, duplicate or delete rewards; the picked one is edited in the main area.

How to set it up

Build your action in Streamer.Bot

Create the action the reward runs. No trigger is needed: Stream UI calls it by name.

Switch the widget on

It is in the Chat group and on by default, but its default reward has no action, so nothing happens until you pick one. The Add to overlay switch beside its page's title turns it on or off.

Add rewards

In Whole chat or Each viewer › Rewards, pick a reward in the Reward list (or Add reward), set its Messages and pick its Streamer.bot action. Test runs the action now, with a demo Twitch chatter.

Update your browser source

Copy the URL of the overlay that runs the actions again into its browser source → Layout and browser source.

Settings

Whole chat and Each viewer

The two have the same rows.

Variable settings:

SettingDefaultDetail
Counted by the Scoreboard (whole chat), Counted by the Viewer Cards (each viewer)offFollows that widget's chat-message count instead of counting here → Who counts.
Count all timeoffKeeps this widget's count across Streamer.Bot restarts. Hidden while the count comes from another widget.

Rewards — its Reward list, one reward at 100 messages by default. Add reward adds one; each row reads like 100 messages → My action + chat message.

Each reward, in two parts: Reward settings (Messages and Streamer.bot action, side by side) and Chat message.

FieldDetail
MessagesThe count that fires it, from 1.
Streamer.bot actionThe action to run, picked from your Streamer.Bot. Test runs it now.
Chat messageSend a chat message, then Send as bot and the message. Whole chat: Post to picks the platforms. Each viewer: it is posted in the chat the viewer wrote in. Placeholder: GG {user}, {messageCount} messages!

Action arguments

The widget sends no event of its own: when a reward fires, Stream UI runs its action by name, the way Run Action does, with these arguments. Use them as %variables% in the action's sub-actions, e.g. a chat message Thanks %user% for %messageCount% messages!. In a reward's own chat message, write them in braces: {user}, {messageCount}…

ArgumentExampleDetail
userPixelPandaThe chatter's display name.
userLoginpixelpandaTheir login.
userId123456789Their ID on the platform.
platformtwitchtwitch, youtube or kick.
messageHello chat!Their last message.
messageCount100The count that reached the reward.
threshold100The reward's number of messages.
scopechatchat (whole chat) or viewer (each viewer).

The chatter is whoever reached the reward:

  • Whole chat, counted here — the viewer whose message reached it.
  • Whole chat, counted by the Scoreboard — the last viewer who wrote on the platform whose count rose, else the last viewer who wrote anywhere.
  • Each viewer — that viewer. Counted by the Viewer Cards, message is their last message since the browser source loaded, empty if they have not written since.

The chatter's arguments are empty when nobody has written since the browser source loaded. messageCount can be above threshold when a count jumps past it (the other widget adding several at once). Test sends a demo Twitch chatter: a random name, userId demo, message Hello chat!, and messageCount equal to threshold.

Pause and resume

While paused, no reward runs and no chat message is posted. Messages are not counted here; counts kept by the Scoreboard or the Viewer Cards go on, and resuming never runs the rewards they passed meanwhile.

On the widget page's Controls tab:

  • Controls, the column on the left, lists Pause and Resume, each with the names of its triggers. Pick one to see its triggers in Trigger list, beside it.
  • Trigger list: the Streamer.Bot triggers that do it. Add trigger adds one, conditions included → Triggers and conditions.
    • Pause — default: Twitch Stream Offline.
    • Resume — default: Twitch Stream Online.
  • The main area shows Chat Activity Rewards: Running or Paused, with the buttons Resume and Pause, also in the controls window.

The state is kept in Streamer.Bot, in the persisted global streamUi.off.chatrewards (1: paused; 0 or none: running), so it lasts until you resume, even if the browser source reloads. Your own actions can pause or resume the widget too, with a Global (Set) sub-action on that variable. The buttons and triggers need Stream UI - Backend.

Streamer.Bot events it listens to

EventWhat it triggers
Your Pause / Resume triggersPauses or resumes the widget
Twitch.ChatMessage, YouTube.Message, Kick.ChatMessageA chat message — counted, and remembered as the last chatter
Misc.GlobalVariableUpdated, Misc.GlobalVariableCreatedThe widget paused or resumed elsewhere (the page, the controls window, your actions); the Scoreboard's whole-chat count changed, with Counted by the Scoreboard
Misc.UserGlobalVariableUpdatedA viewer's Viewer Cards count changed. Only with Counted by the Viewer Cards

Only the platforms switched on in the Connection page are listened to.