Timeout roulette with multiplayer

Description

A small chat game of Timeout Roulette. It has single-player, duel, and multiplayer modes. The multiplayer version has two modes: normal and knockout, where the game ends when someone “eats the bullet”.

To start the game viewer just need to type !roulette in the chat or use a Twitch Channel Point Reward and viewer will be prompted with the instructions.

Multiplayer versions got two mods: normal and knockout, where game ends when someone “eats the bullet”.

Game supports Twitch and YouTube chats. In case of multistreaming both chat can play in one game, but mind the delay between chats.

Tutorial

Import File

roulette.sb (14.5 KB)

Installation

In Streamer.bot, click the Import button in the top menu. Then, drag the .sb file into the Import String field.

Configuration

Configure commands

  1. Go to the Commands tab.

  2. Right-click on the Roulette group and select Group > Enable All.

  3. Double-click on a Reset command. This command resets the game in case it gets stuck.
    In the Permission section, change who can trigger this command. You should set it to broadcaster only or broadcaster and mods:

  • Set Grant Type: Deny, so only the broadcaster can trigger this command.
  • OR set Grant Type: Allow and move the Moderators group to the Allow list. This way, both the broadcaster and moderators will be able to trigger the command.

Configure game

  1. Go to the Actions tab.
  2. In the Config group, click on the Config_Sound action.
  3. In the sub-actions, provide paths for the game sounds.

If you want to use a Twitch Channel Point Reward to start the game, create a reward and add the corresponding trigger to the Start action.

Inside Config_Game, you can change some game related settings.

You have the following settings
  1. bool singlePlayerMode – Makes the game single-player only; it will not ask for any options.
  2. int numberOfChambers – Controls the number of chambers. The number of players is numberOfChambers - 1.
  3. int timeoutDuration – Sets the timeout duration in minutes.
  4. bool twitchUseBotAccount – Determines if the game should use the bot account on Twitch connected to Streamer.bot.

Inside Config_Text, you can customize the game’s text to your preferred language and style.

Be careful to follow the default text format. It contains special placeholders, numbers in curly braces {N}, which must be preserved. These placeholders are responsible for inserting player names and other variables.

You have the following settings
  • string startMessage – Text displayed at the start of the game.
    • {0} - player
    • {1} - startTimeout variable
    • Should contain available commands (!yes/!no/!duel)
  • string gameTypeMessage – Text displayed to choose the game type.
    • {0} - player
    • {1} - **typeTimeout ** variable
    • Should contain available commands (!normal/!knockout)
  • string gameIsRunningMessage – Text displayed when someone tries to start a game when one is already running.
    • {0} - player
  • string gameIsFullMessage – Text displayed when someone tries to join a game that is already full.
    • {0} - player
  • string startTimeoutMessage – Text displayed when a player fails to answer the start message in time.
    • {0} - player
  • string typeTimeoutMessage – Text displayed when a player fails to answer to choose the game type message in time.
    • {0} - player
  • string joinTimeoutMessage – Text displayed when the join timeout is triggered and no one joined the game.
    • {0} - player
  • string normalGameAnnouncement – Text displayed when a player chooses the normal game type.
    • {0} - player
  • string knockoutGameAnnouncement – Text displayed when a player chooses the knockout game type.
    • {0} - player
  • string duelAnnouncement – Text displayed when a player chooses the duel game.
    • {0} - player
    • {1} - joinTimeout variable
    • Should contain available commands (!join)
  • string duelStartMessage – Text displayed when the duel is starting.
    • {0} - player 1
    • {1} - player 2
  • string multiplayerAnnouncement – Text displayed when a player chooses the multiplayer game.
    • {0} - player
    • {1} - MaxNumberOfPlayers variable
    • {2} - joinTimeout variable
    • Should contain available commands (!join)
  • string alreadyJoinedMessage – Text displayed when a player tries to join a game they have already joined.
    • {0} - player
  • string joinedMessage – Text displayed when a player joins the game.
    • {0} - player
  • string multiplayerStartMessage – Text displayed when multiplayer game starts…
    • {0} - Players.Count variable
    • {0} - String.Join(", ", Players.Keys) variable
  • string multiplayerEndMessage – Text displayed after a multiplayer game finishes and no one died.
  • string handedGunMessage – Text displayed at the start of the first turn of the game.
    • {0} - player
    • {1} - numberOfChambers variable
  • string turnMessage – Text displayed at the start of each turn.
    • {0} - player
  • string hesitationMessage – Text displayed at the start of a turn if the player is hesitant.
    • {0} - player
  • string noHesitationMessage – Text displayed at the start of a turn if the player is not hesitant.
    • {0} - player
  • string shotMessage – Text displayed when a player shoots themselves.
    • {0} - player
  • string missMessage – Text displayed when a player doesn’t shoot themselves.
    • {0} - player
  • string timeoutMessage – Timeout message in Twitch chat.
    • {0} - player
  • string timeoutMessageOther – Timeout message in non-Twitch chat.
    • {0} - player
  • string timeoutReason – Timeout reason for Twitch.

Inside Config_Timeouts you can adjust timeouts.

You have the following settings
  • int startTimeout - The time in seconds the game waits for the player to choose between single-player, multiplayer, or duel. If the timeout is triggered, the game stops and resets.
  • int typeTimeout - The time in seconds the game waits for the player to choose the game type between normal or knockout. If the timeout is triggered, the game starts in normal mode.
  • int joinTimeout - The time in seconds the game waits for other players to join.
    • If the timeout is triggered and no one has joined, the game stops and resets.
    • If the timeout is triggered and at least one player has joined, the game starts.

If game doesn’t work, check Engine action, open Execute code (RouletteEngine) sub-action. Check required references and compile it.

mscorlib.dll
System.dll
System.Runtime.dll

Commands

The game contains following commands:

Command Description
!roulette Starts the game.
!yes Selects the single-player game.
!no Selects the multi-player game.
!duel Selects the duel game.
!join Joins the player to the currently starting multiplayer or duel game.
!normal Selects the normal mode for the game.
!knockout Selects the knockout mode for the game.
!reset Resets the game in case it gets stuck.

Contributors

2 Likes