La_Syl Studio
Widgets guide

Rock Paper Scissors

Viewer vs viewer rock paper scissors duels on your Twitch stream, hands whispered to your bot, played VS style on your overlay with a leaderboard and achievements.

Lets your viewers settle it with a duel. A viewer redeems your channel point reward and names another one; the second viewer accepts in chat, either of them picks the mode (sudden death, 3 points or 5 points), then each round both players whisper their hand to your bot account. Your overlay shows the game as a VS card: both players, the round, the score, the hands clashing, the winner. Between games, it shows the leaderboard. Chat follows the whole game, scores and achievements are kept in Streamer.Bot.

Rock Paper Scissors is a game of the Games group: it needs Rock Paper Scissors Permanent Access, or Stream Games Access for every game → Rock Paper Scissors Permanent Access.

Platforms: Twitch only (channel point rewards and whispers to your bot).

Action pack: Stream UI - Backend keeps the game, the scores and the achievements' groups in Streamer.Bot, Stream UI - Broadcast sends the controls to the overlay. Its commands, refunds and triggers come from its own action, Stream UI - Rock Paper Scissors, imported from the widget page → How to set it up.

How it works

  • A challenge. The Start game triggers start a game, by default a Twitch reward redemption: whoever redeems it challenges the viewer they type in the reward's text (with or without @). The game is refused, with a chat message and the points refunded, when a game is already being played, when no viewer is named (or the challenger names themselves), or when that viewer isn't in chat right now (Streamer.Bot's active viewers). Your bot can't be challenged; you can.
  • Accept or decline. The challenged viewer types the accept or decline command within Time to accept. Declined, or no answer: the game is cancelled and the points refunded.
  • The mode. Either player types the mode command followed by one of the three modes: sudden death (first to 1 point), 3 points or 5 points. No mode within Time to pick a mode: cancelled and refunded.
  • The rounds. Each round, both players whisper rock, paper or scissors to your bot account, in English, French (pierre, feuille, ciseaux), Spanish (piedra, papel, tijeras) or German (Stein, Papier, Schere). A hand is locked once sent; a whisper from anyone else is ignored. When both are in, the hands clash on the overlay and chat says who won the round. A tie scores nobody. The first to the mode's points wins the game.
  • Too slow. A player who hasn't answered within Time to answer a round is told to hurry; still nothing after the same time again, and they lose the game. If neither player answered, both lose.
  • Rage quit. A player who types the quit command loses the game.
  • Guided on screen. Players don't always read chat, so the overlay shows each step: the challenge (both players, how to accept or decline, the time left), the mode (how to pick each one, the time left), a start animation once it is picked (both players on their sides, the mode between them, then Fight!), then the VS screen with a line telling the players to whisper their hand to your bot, never in stream chat. Round 1's answer time starts after the animation.
  • The end. Once the last hands have clashed, a crown falls onto the winner's picture and a tear runs down the loser's (both players' when neither answered), under the winner's banner.
  • Scores. Every game played counts for both players: a game, and a win or a loss. They are Twitch user variables, jankenGames and jankenVictories (losses are games minus wins), the Janken game's names, so the scores counted there carry over.
  • Achievements. Each achievement is reached when a player's games, wins or losses reach its number: it adds them to its Streamer.Bot user group, posts its chat message and, if you want, fires the shared New Achievement Unlocked trigger.
  • Commands only when they mean something. The game switches its own Streamer.Bot commands on and off as it goes: accept and decline while a viewer is challenged, the mode command while the mode is picked, the hands and quitting while the game is played. The achievements and leaderboard commands always answer.
  • Played by the overlay that runs the actions. It hears the triggers, commands and whispers, posts in chat, refunds or completes the redemption, and saves the game in the temp global variable streamUi.rps; the other overlays show it. Keep its browser source loaded, or nobody can play. → Which overlay runs the actions
  • Shown or hidden. Hide takes the game off every overlay, Show brings it back. Display only: the game goes on.

The page

Without an access in this browser, the page shows Rock Paper Scissors Permanent Access and Stream Games Access instead of the editor: buy one there, or enter your key. With one, the page works like the other widgets': Settings, Style and Controls, the Settings column on the left (Game settings, Commands, Chat messages, Overlay settings, Achievements, Sound effects and Streamer.bot actions), and the Widget preview at the window's right edge, whose test buttons (Start a game, Accept, Pick a mode, Play a round, End the game, Stop game) play a game of their own in the preview only.

How to set it up

Get an access

Buy Rock Paper Scissors Permanent Access, or Stream Games Access for every game, on the widget page or on the Access tab, then enter your key there.

Import the Rock Paper Scissors action

On the Settings tab, open Streamer.bot actions, click Copy import string and paste it in Streamer.Bot's Import window. It adds the Stream UI - Rock Paper Scissors action and the game's commands, switched off: the game switches each one on only while it means something. Among them, Janken Player Choice is the hands, with Twitch Bot Whisper as its only source, so players whisper to your bot; its lines (rock, paper and scissors in English, French, Spanish and German) are fixed: don't change them. Restart Streamer.Bot so the triggers appear in Custom › Stream UI › Rock Paper Scissors.

Connect your bot account

The players whisper to the bot account connected in Streamer.Bot (Accounts › Twitch › Bot). Without one, they whisper to your broadcaster account. The game posts in chat through Streamer.Bot's WebSocket, which needs its password: turn Authentication on in Streamer.Bot and enter the password on the Streamer.Bot tab.

Create the reward

Create your channel point reward in Streamer.Bot (Platforms › Twitch › Channel Point Rewards), with User input required ticked: Twitch only lets the app that created a reward refund its redemptions. Then on the Controls tab, pick Start game and edit its trigger's condition: replace YOUR REWARD NAME with your reward's name.

Check the commands

The imported commands are the defaults of Commands (!acceptJanken, !refuseJanken, !jankenMode, !rageQuit, !jankenAchievements, !jankenLeaderboard), plus !resetJanken, the Stop game trigger, for your moderators and you. Rename one in Streamer.Bot and type the same text on the page; who may use a command is set in Streamer.Bot. The page warns while one is missing.

Switch it on and update your browser source

Switch Add to overlay on, then copy the overlay URL again into your browser source → Layout and browser source.

Settings

Game settings

FieldDefaultDetail
Time to accept30 sFor the challenged viewer to accept or decline.
Time to pick a mode30 sFor either player to pick the mode.
Time to answer a round30 sFor each round's hands; twice (a reminder, then the game is lost).
Hands shown for5 sHow long a round's hands stay on the overlay before the next round.
Result shown for10 sHow long the winner stays on the overlay after the game.
Refund cancelled gamesonA game cancelled before it is played (refused, no answer, no mode, stopped) refunds the challenger's points.
Sudden death, 3 points, 5 pointssudden death, 3 points, 5 pointsWhat players type after the mode command (1, 3 and 5 points to win), case aside.
Rock, Paper, Scissorsrock, paper, scissorsHow chat and the messages name the hands. What players whisper doesn't change.

Commands

FieldDefault
Accept command!acceptJanken
Decline command!refuseJanken
Mode command!jankenMode
Quit command!rageQuit
Achievements command!jankenAchievements
Leaderboard command!jankenLeaderboard

Each must be a Streamer.Bot command with that text. The hands are the fixed Janken Player Choice command.

Chat messages

Every message is posted in your Twitch chat, as your bot while Send as bot is on. Empty: not posted. Each lists its variables under it; {user} is the challenger, {opponent} the challenged viewer.

MessageDefault
No opponent named@{user}, type the name of the viewer you want to challenge. Your points are refunded.
Opponent not in chat@{user}, {opponent} isn't in chat right now. Your points are refunded.
Game already running@{user}, a game is already being played. Your points are refunded.
Challenge@{opponent}, {user} challenges you to Rock Paper Scissors! Type {accept} to play or {refuse} to decline ({seconds} s).
Challenge declined{opponent} declined the challenge. @{user}, your points are refunded.
No answer to the challenge{opponent} didn't answer in time. @{user}, your points are refunded.
Pick the modeChallenge accepted! @{user} @{opponent}, pick the mode: type {modeCommand} followed by {modes} ({seconds} s).
No mode pickedNo mode picked in time: the game is cancelled. @{user}, your points are refunded.
Mode picked{mode}: first to {target} wins!
Round startRound {round}! @{user} @{opponent}, whisper {choices} to {bot}.
Hand locked{player} has made their choice.
Hurry up@{player}, hurry up! Answer within {seconds} seconds or your opponent wins.
Round won{winner}'s {winnerChoice} beats {loser}'s {loserChoice}! {user} {userPoints} - {opponentPoints} {opponent}
TieBoth picked {choice}: it's a tie! {user} {userPoints} - {opponentPoints} {opponent}
Game won{winner} wins the game {winnerPoints} - {loserPoints} against {loser}! GG
No answer: game lost{loser} didn't answer in time: {winner} wins the game!
No answer from either playerNeither player answered in time: both lose this game.
Rage quit{loser} rage quit: {winner} wins the game!
Game stoppedThe Rock Paper Scissors game was stopped.
Leaderboard🏆 Most games: {mostGames} | Most wins: {mostWins} | Best win ratio: {bestRatio}
Viewer's achievements@{user}, your achievements: {achievements} ({games} games, {wins} wins).
No achievement yet@{user}, no achievement yet ({games} games, {wins} wins). Keep playing!

Overlay settings

FieldDefaultDetail
Show instructionsonEach step's instruction line, under the players.
Show countdownonEach timed step's time left, in seconds and as a bar: the challenge, the mode, a round's hands.
Challenge title{user} challenges {opponent} to a rock paper scissors game!The title while the challenged viewer is asked.
Challenge instructionsType {accept} to accept or {refuse} to dismiss.Under the players.
Mode titleChoose your mode!The title while the mode is picked.
Mode instructionsType {modeCommand} {suddenDeath} for one round, {modeCommand} {threePoints} for first to 3, or {modeCommand} {fivePoints} for first to 5.Under the players; {suddenDeath}, {threePoints} and {fivePoints} are the modes' words.
Start animation text, Fight text{mode}, Fight!The start animation once the mode is picked: both players come in from their sides, the mode zooms in between them, then the fight text slams down.
Round instructionsSend "{rock}", "{paper}" or "{scissors}" to {bot} via whisper. Do not send it to the stream chat!Under the players while a round waits for their hands; {rock}, {paper}, {scissors} are the hands' names, {bot} the account to whisper to.
VS textVSBetween the players.
Round textRound {round}Over the players while a game is played.
Points to win textFirst to {target}Under it, once the mode is picked.
Choosing textChoosing…Under a player who hasn't whispered yet.
Ready textReady!Under a player whose hand is locked.
Round winner text, Draw text{winner} wins!, Draw!Under a round's hands once they clashed: its winner, or a tie (the last round has the winner's banner instead).
Winner text{winner} wins!The banner once the game is won.
No winner textNo winnerThe banner when both players stopped answering.
Show leaderboard between gamesonBetween games, the leaderboard's boards in turn.
Players per board5Players on each board, 1 to 10.
Games before the win ratio counts5A player's win ratio counts once they played this many games.
Time per board8 sHow long each board shows.
Most games title, Most wins title, Best win ratio titleMost games, Most wins, Best win ratioEach board's title.

Achievements

The Achievement list column holds the achievements; pick one to edit it. By default, the Janken game's eight: 10, 25, 50 and 100 games played, and 10, 25, 50 and 100 wins, with its groups' names (Achievement - Janken 10 Games…).

FieldDetail
CountedGames played, Wins or Losses.
Number to reachReached once the stat gets there, once per player.
Streamer.bot user groupThe player is added to it (created if missing). Empty: none.
Chat messagePosted in your chat when unlocked: {user}, {achievement}, {count}.
Fire the New Achievement Unlocked triggerAlso fires the shared New Achievement Unlocked trigger (Custom › Stream UI).

Sound effects

Each is optional: a switch, then Sound settings to pick it (a file or a random file of a folder, played by Streamer.Bot, or a link the browser source plays). The overlay that runs the actions plays them.

FieldWhen
Background musicFrom the challenge accepted to the game's end. A link loops and fades out at the end; a file or folder plays once (pick a long track) and stops at the end, with every sound Streamer.Bot is playing then.
Draw soundA round ends in a tie.
Round won soundA player wins a round.
Game over soundThe game is over (won, a player too slow, a rage quit).

The preview's test buttons play the links, never a file.

Streamer.bot actions

The Stream UI - Rock Paper Scissors action's import string, with its Copy import string button. A warning says so while the connected Streamer.Bot lacks the action, or one of the game's commands.

Triggers

In Streamer.Bot's Custom › Stream UI › Rock Paper Scissors, fired by the overlay that runs the actions. Each gets game, user, userId, opponent, opponentId, mode, target, round, userPoints and opponentPoints.

TriggerWhenMore arguments
Rock Paper Scissors Game Start (rps_game_start)The challenged viewer accepted—
Rock Paper Scissors Round End (rps_round_end)A round was playedroundWinner (empty on a tie)
Rock Paper Scissors Game End (rps_game_end)A game endedresult (won, forfeit, bothForfeit, quit), winner, winnerId
Rock Paper Scissors Cancelled (rps_cancelled)A game was cancelled before it was playedreason

Like every custom trigger, they also carry Streamer.Bot's own __source (CustomCodeEvent), triggerName and triggerCategory (Custom).

Style

Each element follows the overlay style until you change one of its fields; the boxes and the hands have looks of their own. See Appearance.

ElementDetail
ContainerThe widget's box, clear by default.
BackgroundThe card behind the game or the leaderboard (the overlay's Widgets background).
Step title, InstructionsThe challenge's and mode's title (the overlay's Titles style, wrapping), each step's instructions (the Text style).
Start animation textThe start animation's words: the Titles style, 64 px.
Countdown, Countdown barThe time left: its seconds (the Numbers style, 20 px) and its bar (the Progress bars style).
Backgrounds › Round badgeThe round's badge over the players: clear by default.
Backgrounds › Player cardEach player's card, clear by default. The round's winner lifts and glows, the loser shakes and dims.
Backgrounds › Winner bannerThe winner's banner, over the middle of the card.
Backgrounds › Leaderboard, Leaderboard rowThe leaderboard and each of its lines. Only with Show leaderboard between games on.
Backgrounds › First place row, Second place row, Third place rowThe leaderboard's top three: a gold, silver and bronze border, the name and the value in that colour, the text 30 %, 15 % and 5 % bigger.
MedalThe podium's medal, in place of the rank: 28 px, in its row's border colour.
Text › Round text, Points to win, Username, Score, Player status, VS text, Winner textThe game's texts. The score pops in big at each point.
Text › Leaderboard title, Rank, Leaderboard username, Leaderboard valueThe leaderboard's texts.
Profile pictureThe players' profile pictures (the overlay's Profile pictures style).
HandEach round's hands, flying in from their player's side: 96 px, white, a violet glow.
Round resultWho won the round, or a draw, under the hands (the overlay's Titles style).
Winner's crownThe winner's crown, falling onto their picture once the game is won: 44 px, gold, a gold glow.
Loser's tearThe loser's tear, running down their picture: 30 px, light blue, a light blue glow.
Show / hide transitionHow the game appears and leaves.

Default position

Position Middle centre, 640 px wide at 1080p, size 100 %.

Streamer.Bot events it listens to

EventWhat it triggers
The Start game triggers (Twitch.RewardRedemption by default)A challenge
The Stop game and Show / Hide triggersStops the game; shows or hides it
Command.TriggeredThe game's commands and the whispered hands
Misc.GlobalVariableUpdated, Misc.GlobalVariableCreatedThe game saved by the overlay that runs the actions, shown by the others
General.CustomThe Stop game button

Controls

On the Controls tab, the Controls column holds Show, Hide, Start game (the reward by default) and Stop game (the !resetJanken command by default). The main area, and the controls window, show who plays and the score, with a Stop game button: it cancels the game without counting it (the points are refunded while it hadn't started).

Your own triggers do the rest. A Command Triggered row on Start game lets viewers challenge with a command, like the Janken game's !janken @viewer: the first word after the command is the opponent, and there are no points to refund. A Command Triggered row on Stop game, like !resetJanken, lets your moderators stop a game (who may use the command is set in Streamer.Bot).

Rock Paper Scissors Permanent Access

Rock Paper Scissors works only with Rock Paper Scissors Permanent Access (€19.99 once, before VAT) or Stream Games Access, the subscription that opens every game. Without either, the widget has a lock beside its name, its page shows the accesses instead of its settings, and no overlay or controls window carries it. Each also removes the ads from the website → The Access tab. The overlay URL carries the key and the browser source checks it by itself: copy the URL again after entering it.

From the Janken game

The Janken game you imported in Streamer.Bot is now this widget. Its scores (jankenGames, jankenVictories), its default commands and its achievements' groups carry over. Remove its old actions from Streamer.Bot: the import brings the game's commands again, under their old names, and the game switches them on and off itself. Two things it counted are no longer kept: abandoned games, and how often each player chose rock, paper or scissors (%command%Count), so achievements on hands are not offered.