Categories
RPGs

Stream Deck XL Setup For Roll20

The Stream Deck XL, as you might infer from its name, is a useful tool for streamers, but it has also proven to be a powerful and easily programmable macro pad for games and productivity applications.

In this post, I’ll show how I’ve set up my Stream Deck XL for augmenting the RPGs I run using Roll20.

Overview

Let’s start with a map of the whole layout:

Some of these buttons are esoteric to my specific situation (the games I run, for example) but most of them should be broadly applicable to anyone who runs games in Roll20. We’ll break this down into 7 sections and go over each section in detail. Each section will also be accompanied by a video demonstrating the use of the buttons. Let’s go!

Note: This guide assumes you have “Advanced Keyboard Shortcuts” enabled in Roll20. If not, many of these will not work.

Section 1: Layer Controls

Each color-coordinated column consists of two buttons: A “switch to layer” button and a “send selection to layer” button (indicated with an arrow). Here’s the promised video showing how to use these:

The commands are:

CommandObjectMapGMLighting
Switch
Layer
Hotkey: OHotkey: MHotkey: KHotkey: ,
(comma)
Move
Selected
Text: loText: lmText: lkText: l,

Section 2: OBS

Note: This section is only relevant if you’re using OBS to stream or record your games.

I use two different scenes (game layout and full-screen face cam), and I have quick-switch buttons for both, as well as a recording button. These are from the OBS Studio plugin.

Usage video:

Section 3: Web Shortcuts

These are simple shortcuts for quickly reaching frequently-used sites. For me, this means Roll20 itself and Token Stamp 2 (for quickly creating tokens for improv NPCs/monsters) as well as direct links to the games I run. You might want Kobold Fight Club, donjon, or some other resource.

Section 4: Voice Chat

If you play RPGs online, you almost certainly use voice chat. My setup includes a quick launch icon for Discord, mute/deafen buttons, as well as a direct microphone mute which also mutes me for the recording.

From left to right:

  1. Audio Devices: Toggle Mute
  2. Custom: Toggle Discord Mute – https://github.com/fredemmott/StreamDeck-Discord
  3. Custom: Toggle Discord Deafen (see above)
  4. System: Open – Discord

Section 5: Dice Roller

This is a folder. It expands into the following:

This is where things get complex. Rolling dice in Roll20, from a Stream Deck, anywhere in the UI, is a bit of a tall order. I accomplished this using the SuperMacro plugin from BarRaider.

The way these work is the d100 and d20 rolls happen at the tap of the button, while the d4-d12 rolls open a roll query to ask how many dice, and the number keys can be used to select 1-10 without having to move your hands to the keyboard.

The macro definitions are as follows:

d100{{escape}}cc{{ctrl}{a}}/r d100{{enter}}{{escape}}
d20{{escape}}cc{{ctrl}{a}}/r d20{{enter}}{{escape}}
d20 Advantage{{escape}}cc{{ctrl}{a}}/r 2d20kh1{{enter}}{{escape}}
d20 Disadvantage{{escape}}cc{{ctrl}{a}}/r 2d20kl1{{enter}}{{escape}}
d4-d12{{escape}}cc{{ctrl}{a}}/r ?{#}d4{{enter}}
Note: Replace d4 above with d6, d8, d10, etc.
Numbers1{{enter}}{{escape}}
Note: Replace 1 above with 2, 3, 4, etc.

Note: The above macros work for Windows and most Linux distros. If you are on MacOS, replace {ctrl} with {cmd}.

Here’s what that {{escape}}cc{{ctrl}{a}} preamble is doing:

{{escape}}  If we're in a text box, unfocus it.
c           Switch to the chat tab.
c           Focus the chat box.
{{ctrl}{a}} Select any text in the box so the macro
            will replace it when it types /r.

Here it is in action:

Section 6: Music Player

Note: This section requires a Roll20 Pro account, as it makes use of the Roll20 Audio Master API script.

This is another folder. This is what’s inside:

All of these buttons are SuperMacro macros. No doubt you’ll want a totally different set of audio tracks, so I’ll give you the general idea of what’s going on here rather than get lost in specifics.

The only unique macro here is Stop All, which is defined as follows:

{{esc}}{{shift}{n}}p

Each of the remaining buttons contains a macro like the following:

{{escape}}cc{{ctrl}{a}}#m01{{enter}}{{escape}}

If you read through the commands for the dice roller, that should look familiar. It’s doing the same trick to focus the chat box and replace its contents, but instead of running a /r command it’s calling a macro, here #m01. You need to define a matching macro in Roll20 which calls Roll20 AM to make the necessary changes, for example:

Play!roll20AM --audio,play,nomenu|Audio Track Name
Fade Out!roll20AM --audio,fade,out,nomenu|Rain - Heavy
Stop!roll20AM --audio,stop|Wind

You could put the entire command into the SuperMacro instead of defining a macro in Roll20, but this approach lets you edit the macro in Roll20 and make it as complex as you like while keeping the SuperMacro definition unchanged and as short as possible.

Section 7: Miscellaneous

These are a few miscellaneous commands that didn’t fit into one of the other sections. Here’s what they do:

Turn TrackerArt LibraryJournalJournal SearchJukebox
Opens the turn trackerOpens the art libraryOpens the journalSearches the journalOpens the jukebox
Hotkey: YHotkey: IHotkey: JHotkey: /Hotkey: N

Conclusion

That’s it! Personally I find this Stream Deck XL setup to be a super useful tool for running RPGs. It really cuts down on flailing around for controls and it’s easier on the memory than keyboard shortcuts. I hope it helps you with your games as well!