How to add voice acting to BetonQuest

Voice Acting in your quest conversation brings your adventures to a whole new level. Here we will go over how to make it happen in 2 different ways.

Examples

Option 1: Use the plugin OpenAudioMC

This way you’re not limited to the resource pack max size (100mb). OpenAudioMC (referred to as ‘OAM’ from here on) is a plugin that allows your players to connect to a browser client that plays sounds and music depending on what happens in-game.

In this guide we’re going to assume you’ve already installed the plugin and configured it correctly.

OAM Step 1: Upload your mp3’s to a reliable host.

I highly recommend https://jukehost.co.uk/ where you can upload and get links straight to the mp3 and the plugin can play them just using a link.

OAM Step 2: Create the events you need for your voice acting in the BetonQuest package.
stopvo: command openaudiomc stop %player%
vo1: command openaudiomc play %player% https://URL
vo2: command openaudiomc play %player% https://URL
vo3: command openaudiomc play %player% https://URL

We create 1 event for every voice line and 1 stop event to stop the current sound if the player clicks through a conversation faster then the voice actor speaks.

OAM Step 3: Add events to your conversation.
    dialog_1_1:
        text: |
            
            Hello %player.display%, how are you doing?
            &o&7This NPC is voiceacted, turn on your custom sounds with /audio
        pointer: dialog_1_1_1
        conditions: '!started,!finished'
        events: 'stopvo,vo1'
    dialog_1_2:
        text: |
            
            I'm ok, the lumberyard isn't doing so well however, any chance you'd want to help?
        pointer: dialog_1_1_2,dialog_1_1_3
        conditions: '!started,!finished'
        events: 'stopvo,vo2'

As you can see we first stop any sounds playing for the player by defining ‘stopvo’ event and then start the next voice with ‘vo2’ and so on.

Enjoy!

Option 2: Use sounds within a resource pack

This is a reliable way to get all players to hear sounds, however you are limited to 100mb within a resource pack and if you start adding sounds you’ll reach it much faster then models and textures.

Pack Step 1: Upload .ogg files to the pack

I highly recommend making a good folder catalogue structure so you don’t get confused when you add number quest number 100.

Example url within the resource pack for quests sounds:

/assets/minecraft/sounds/quests/quest1/sound1.ogg

This would give you an entire folder of sound files for a specific quests.

Pack Step 2: Create a sounds.json for your quests

It’s always nice to not touch the default sounds.json (located at /assets/minecraft/sounds.json) because it might mess with other resource pack assets you install. Example where I would place it:

/assets/myquests/sounds.json

Now we need to link our .ogg files in that file, do it like this:

{
"quest1_sound1":{"sounds": ["quests/quest1/sound1"]},
"quest1_sound2":{"sounds": ["quests/quest1/sound2"]}
}

This works very much like how we add CustomModelData models to a resource pack, as you can see the first one has a comma at the end of it and this should be true for all entries except the last one. Example:

{
"quest1_sound1":{"sounds": ["quests/quest1/sound1"]},
"quest1_sound2":{"sounds": ["quests/quest1/sound2"]},
"quest1_sound3":{"sounds": ["quests/quest1/sound3"]},
"quest2_sound1":{"sounds": ["quests/quest2/sound1"]},
"quest2_sound2":{"sounds": ["quests/quest2/sound2"]}
}
  • You can rename quest1_sound1 to whatever you want.
  • quests/quest1/sound1 is the url of the .ogg sound file within /assets/minecraft/sounds/…
Pack Step 3: Create the events you need for your voice acting in the BetonQuest package.
stopvo: command minecraft:stopsound %player% voice
vo1: command minecraft:playsound quest1_sound1 voice %player%
vo2: command minecraft:playsound quest1_sound2 voice %player%

Here we simply use the default Minecraft commands to play custom sound in the voice section of the players audio settings.

You can also use the BetonQuest notify events to play custom sounds.

Pack Step 4: Add events to your conversation.
    dialog_1_1:
        text: |
            
            Hello %player.display%, how are you doing?
            &o&7This NPC is voiceacted, turn on your custom sounds with /audio
        pointer: dialog_1_1_1
        conditions: '!started,!finished'
        events: 'stopvo,vo1'
    dialog_1_2:
        text: |
            
            I'm ok, the lumberyard isn't doing so well however, any chance you'd want to help?
        pointer: dialog_1_1_2,dialog_1_1_3
        conditions: '!started,!finished'
        events: 'stopvo,vo2'

Just like in the OAM example we first stop any sounds playing for the player by defining ‘stopvo’ event and then start the next voice with ‘vo2’ and so on.

Hope you enjoyed this tutorial, check out the official BetonQuest docs or some pre-made quests from the MC Models crew.