This tutorial is to explain how to pipe music into your TTRPG sessions using Discord and Hydra Bot. It leverages some Autohotkey scripts I wrote and some curated Spotify playlists.
Step 1 - Download Autohotkey
This will only work on Windows as Autohotkey is a Windows application.
Download and install Autohotkey from here: https://www.autohotkey.com/
You can read the documentation if you want, it’s not really necessary as the Autohotkey scripts I wrote are self-contained, you just need the program installed on your computer.
Step 2 - Set up a Discord Server
Pretty simple, most of you can skip this step, but here are some screenshots to show you how:
Step 3 - Add Hydra Bot to Discord Server
Head to https://hydra.bot/ and invite Hydra to your server.
Select the server you want to add it to and click “Continue”
Hydra will now have joined your server
Type .setup
to initiate the setup, the bot will create a channel to request music in. You can rename this channel by right clicking on it and going to “Edit Channel.”
Step 4 - Download the Autohotkey Scripts
Download the Autohotkey scripts I created here: https://maderschramm.itch.io/discord-ttrpg-music-scripts
They’re all simple files that look like this:
Sample Autohotkey File
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
Sleep, 2000
Send, .clear {Enter}
Send, .play https://open.spotify.com/playlist/7cgECSzxFYwjHugNdbur1O -s {Enter}
Send, .skip {Enter}
The scripts are very simple, they simply idle for 2 seconds to give you time to click on the Discord window, then send the .clear
command to Hydra to clear the current queue, load a new playlist and shuffle it, then skip to the next song.
An example for how you would use it in-game would be that your PCs are traveling down the road, so you would run the Atmosphere - Road.ahk
script. Simply move to the song request channel on your Discord server, double-click the Atmosphere - Road.ahk
script, and then click on the message area of the Discord window.
After traveling for some time, your players get into an encounter, so you then double-click the Combat - Standard.ahk
script and click on the Discord message area. During the combat, one of the retainers died, so you then double-click the Mood - Somber.ahk
script and click on the message area. The party then returns to the nearest city, so you then double-click the Atmosphere - Town.ahk
script and click on the Discord message area.
You can edit the scripts to run any spotify playlists you want. I set up these scripts around some I found on reddit here.
The Campaign - Theme.ahk
script is a little different than the others. It contains the following commands:
Campaign - Theme.ahk
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
Sleep, 2000
Send, .clear {Enter}
Send, .play https://www.youtube.com/watch?v=V2liozIXhJA {Enter}
Send, .loop {Enter}
It idles for 2 seconds like the other scripts, clears the queue (just in case), then plays only a single song (whatever theme you want for your campaign, mine is the remix of the Morrowind theme), and then loops the queue. You should run this script first and only first as it doesn’t skip songs automatically and looping the queue more than once will toggle between loop queue, loop a single song, and disabled.
For that script, change the https://www.youtube.com/watch?v=V2liozIXhJA song to whatever song you want for your campaign’s theme, and remember to play it before any others if you’d like to utilize a campaign theme. I run it while my players discuss what happened during the previous session.
Hopefully this was helpful for you and allows you to easily incorporate some mood music into your TTRPG sessions running on Discord.