# Timeout roulette with multiplayer

**URL:** <https://extensions.streamer.bot/t/timeout-roulette-with-multiplayer/154>\
**Category:** Approved\
**Tags:** chat, twitch\
**Created:** [July 3, 2023, 12:51am UTC](https://extensions.streamer.bot/t/timeout-roulette-with-multiplayer/154 "2023-07-03T00:51:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![theshining0ne](https://extensions.streamer.bot/user_avatar/extensions.streamer.bot/theshining0ne/32/2899_2.png) [@theshining0ne](https://extensions.streamer.bot/u/theshining0ne)\
**Post date:** [July 3, 2023, 12:51am UTC](https://extensions.streamer.bot/t/timeout-roulette-with-multiplayer/154/1 "2023-07-03T00:51:50Z")

</div>

## 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

[![](https://extensions.streamer.bot/uploads/default/original/1X/7ec491910010e4f86406532da9e7fcc91f6a8886.jpeg "Your chat will love this minigame") ](https://www.youtube.com/watch?v=SP0VkEmmbpQ)

## Import File

[roulette.sb](https://extensions.streamer.bot/uploads/short-url/5DiSBm5rwUQp0JlTcSFWurbRZEX.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.

 ![roulette_wiki](https://extensions.streamer.bot/uploads/default/original/2X/a/a814029dd42c1e6ef4f1775a64447cffbbce0e87.png)

## 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.  
 ![roulette_commands_permissions](https://extensions.streamer.bot/uploads/default/original/2X/e/e38f8fdcb0e7e23db556709aed7da0e6c792631f.png)

### 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.  
 ![roulette_config_sounds](https://extensions.streamer.bot/uploads/default/original/2X/0/0d634b28a788362f1927e0f02892e0888d55ee6e.png)

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.

```auto
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

- [ShiningOne](https://www.twitch.tv/shiningone)
