A script for Bizhawk to allow Twitch chat to shuffle the current ROM
Note this has only been tested with Bizhawk 2.9.1.
Install a 2.9.x version of BizHawk.
Download the latest release of this project bizhawk-crowd-shuffler.
Create a folder called bizhawk-crowd-shuffler
where the BizHawk is installed in from step 1 and unzip the release file from step 2 inside of the newly created folder.
Open the bizhawk-crowd-shuffler
folder and copy any roms that you want shuffled into the sessions/default/CurrentROMs
folder
Edit the bizhawk-crowd-shuffler-win.bat
(for Windows) or bizhawk-crowd-shuffler-linux.sh
(for Linux) to fill in the CHANNEL
with your Twitch channel name.
Note: You may have a popup saying "Windows protected your PC". Click more info and click "Run anyway"
Note: You may have a popup about the "Windows Firewall". You will need to allow access for the applications to work.
Note: On Linux, you need to manually run start-bizhawk-listen-to-crowd-shuffler.sh
to start BizHawk.
If you would like the shuffler to be able to respond with the next rom in chat and/or users to use reward redemptions to swap you will need to do aquire an OAuth Token.
Navtivate to https://dev.twitch.tv/console/apps/create
Enter a name for the application (e.g. MyUserNameRomShuffler)
Enter https://twitchapps.com/tokengen/
for the OAuth Redirect URLs field
Click create
Click manage next to your newly created application
Copy the value in the clientID field
Navigate to https://twitchapps.com/tokengen/
Enter your clientID from step 6
Enter the following scopes string in to the scopes field
channel:manage:redemptions channel:read:redemptions user:read:email chat:edit chat:read
Note: Treat the token like a password and do not share that with anyone.
Copy the OAuth token into the bizhawk-crowd-shuffler-win.bat
(for Windows) or bizhawk-crowd-shuffler-win.sh
(for Linux) file in the TWITCH_TOKEN
field
Create redemption named "swap"
The shuffler can be configured by adding a config.json
file (an example is provided)
Configures the swap chat command (e.g !swap) to respond to. Set to
null
to disable (default: ^swap$)
Suppresses the chat messages in twitch chat (default: false)
Configures the list chat command (e.g !list) to respond to (default: ^list$)
Filter out certain files in the current roms folder from being listed and used
Configures the redpemption name to respond to (default: ^swap$)
Ignore any user filter and just uses a random rom
Choose a random rom if there is no match rather than ignore the command
Global chat cooldown (default: 60000)
User chat cooldown (default: 60000)
Text that is used for a random game via redemption (default: ^rng$)
timer options
Note: Set this null to disable the timer
timer minimum
timer maximum
These parameters control when the ROM should be swapped based on different Twitch events:
swapOnChat
: Swap when a chat message triggers the swap command (default: true
)swapOnCheer
: Swap when someone cheers bits (default: false
)swapOnCheerMinimumBits
: Minimum number of bits required to trigger a swap (default: 100
)swapOnSub
: Swap when someone subscribes (default: false
)swapOnResub
: Swap when someone resubscribes (default: false
)swapOnSubGift
: Swap when someone gifts a sub (default: false
)swapOnSubMysteryGift
: Swap when someone gives mystery gift subs (default: false
)swapOnGiftSubContinue
: Swap when someone continues a gifted sub (default: false
)