RimWorld

RimWorld

Voice Acted Colonists
Gremlin 13 Dec, 2024 @ 5:05pm
VoicePack Tutorials
This is a guide for modders who already have some basic mod-making knowledge.

If you need a point of reference, the base mods files are located here:
C:\Program Files (x86)\Steam\steamapps\workshop\content\294100\3306119571

In fact feel free to just copy paste and rename what you need (Just remember to alter the "About" information in that regard for when you upload the mod to steam) in which case the guide below is for what you need to alter.

If you have more questions you can leave a message in the workshop comments or join our Discord[discord.gg] for a direct chat or gain access to other resources such as the artwork used in the workshop image.

---

1️⃣ Step 1: Make a basic mod folder structure, as always, a Defs folder, About folder, Sounds folder.
2️⃣ Step 2: Add your sound files inside the Sounds folder. While the folder structure inside the Sounds folder isn't strict or fixed, you should organize it.
The recommended (but not mandatory) structure is:
.../Sounds/"your mod name here"/"gender here"/"type here"/"sound file named with type + number"

This might ease organization and finding files. But you can use whatever structure you find easier for you!
✅ Examples:
.../Sounds/TestMod/Male/Attack/Attack1.ogg
.../Sounds/TestMod/Male/Attack/Attack2.ogg
.../Sounds/TestMod/Female/Select/Select1.ogg

3️⃣ Step 3: Make the SoundDefs corresponding to your sounds. You must have <context>MapOnly</context> in your SoundDef.
Plus, in order to play multiple randomized sounds for each type, you should have several audio grains. Use AudioGrain_Clip.
*This step can majorly be skipped using Xylemmmm's script further below

✅ Example 1: This is a direct method but less optimized for large quantities of clips
<SoundDef>
<defName>VAC_Barney_Death</defName>
<context>MapOnly</context>
<maxSimultaneous>1</maxSimultaneous>
<subSounds>
<li>
<grains>
<li Class="AudioGrain_Clip">
<clipPath>VAC/Half_Life_2/Male/Barney/Death/Death</clipPath>
</li>
<li Class="AudioGrain_Clip">
<clipPath>VAC/Half_Life_2/Male/Barney/Death/Death2</clipPath>
</li>
</grains>
<volumeRange>42</volumeRange>
<distRange>20~50</distRange>
</li>
</subSounds>
</SoundDef>
✅ Example 2: This pulls from a folder rather then searching for a specific file
<SoundDef>
<defName>VAC_Barney_Hitting</defName>
<context>MapOnly</context>
<maxSimultaneous>1</maxSimultaneous>
<subSounds>
<li>
<grains>
<li Class="AudioGrain_Folder">
<clipFolderPath>VAC/Half_Life_2/Male/Barney/Hitting</clipFolderPath>
</li>
</grains>
<volumeRange>42</volumeRange>
<distRange>20~50</distRange>
</li>
</subSounds>
</SoundDef>
4️⃣ Step 4: Finally, make a VoicePackDef, this part is by far the easiest. It is easier to explain with an example:
*This step can majorly be skipped using Xylemmmm's script further below

<Defs>
<VAC.VoicePackDef>
<defName>VoicePack_Barney</defName>
<label>Barney</label>
<description>description</description>
<category/>
<gender>Male</gender>
<selectList>
<li>VAC_Barney_Select</li>
</selectList>
<attackList>
<li>VAC_Barney_Attack</li>
</attackList>
<movingList>
<li>VAC_Barney_Move</li>
</movingList>
<deathList>
<li>VAC_Barney_Death</li>
</deathList>
<downList>
<li>VAC_Barney_Downed</li>
</downList>
<downPawnList>
<li>VAC_Barney_DowningPawn</li>
</downPawnList>
<hitList>
<li>VAC_Barney_Hitting</li>
</hitList>
<painList>
<li>VAC_Barney_Pain</li>
</painList>
</VAC.VoicePackDef>
</Defs>

Breakthrough:
<defName> and label are your usual Def nodes. The first must be unique and the second will be shown in the mod settings.
<description> can be shown when the mouse hovers over the label.
<category> this one is OPTIONAL. It can be used with the mod settings' filters for better sorting, in case you need it.
<gender> MUST be either "Male", "Female", or "Any".

Then we have selectList, attackList, movingList, deathList, downList, downPawnList hitList, painList.
▶️ These are "action types". Sounds will be played when: selecting a pawn, commanding a pawn to attack, commanding a pawn to move, a pawn dying, and a pawn getting downed, a pawn downing another pawn, a pawn landing a ranged/melee hit on another pawn, a pawn receiving damage, respectively.

These are lists that contain SoundDefs. You can have as many SoundDefs as you want here, but if you followed Step 3, all your sounds are already contained in a single SoundDef. Although, with this way, you can easily PatchOperationAdd more SoundDefs to other mods, if you wanted to.

---

Pull lists currently on the the list:

☑️ Attack# - plays an audio clip when a drafted pawn is ordered to attack.
☑️ Death# - plays an audio clip when a colonist dies
☑️ Downed# - plays an audio clip when a colonist is Downed
☑️ Move# - plays an audio clip when a drafted colonist is ordered to move.
☑️ Select# - plays an audio clip when a colonist is selected.
☑️ DowningPawn# - plays an audio clip when a colonist downs another pawn.
☑️ Hitting# - plays an audio clip when a colonist lands a hit on another pawn
☑️ Pain# - plays an audio clip when a colonist is hurt


There is no number limit on the clips you can add to each list. Its only a matter of file size which does increase the load time when launching Rimworld. This is only for launch and does not bog down Rimworld once the files are loaded.

Xylemmmm (VERY appreciated 🥰 ) has created a Powershell Script that can automatically generate the Def files necessary for your voice-pack and so far has not proven to have any issues as well as other scripts to automate tasks. you can find them at https://github.com/Xylemm/VAC-Scripts which includes tutorials on how to use them, or in our resource section alongside other useful links/tools/assets

You also have permission to re-use/edit the Steam Workshop image (Artwork by me) located in ⁠resources of our discord for your voice-packs as long as you credit me as the artist. Commissions for a custom alteration (IE redrawn into a character from the voice-pack) are not completely off the table but not fully organize atm either.

After your Voice-Pack is released to the steam workshop, feel free to add a link to it in the base mods Discussion Thread or ping me in discord to add it to the VAC voice-pack collection~
Last edited by Gremlin; 13 Dec, 2024 @ 6:30pm
< >
Showing 1-1 of 1 comments
Gremlin 13 Dec, 2024 @ 5:59pm 
Audio Compiling and using Audacity

https://www.audacityteam.org/ - A very helpful free audio editing tool.

**One thing of note regarding the "Radio Click" feature and voice-packs: According to Alexis, coding "Play X, wait until finish, Play X" is a pain in the butt for Rimworld. Voice-Acted-Colonists Radio Click Feature currently works by combining the audio clip and the radio clip together and generates a new clip on the spot based on pitch then normalizes it. This can lead to some volume differences in certain circumstances between different voice-packs.**

**Turning off the Radio clicks or using Radio Clicks Legacy (Which just plays all the audio at once) does fix the issue but the more consistent the voice-packs across the board are the less noticeable the difference is and I've really only noted 2-3 of the available voice-packs to be noticeably louder/quieter with the Radio Click feature on**

**The guide below is how I've been compiling the audio used in my voice-packs such as Half life 2, Dirty Bomb and Apex Legends. most of this is not required but recommended for consistency. Our Discord[discord.gg] has the same tutorial but images are provided as well there which some are also helpful for the tutorial above for visualization**

1️⃣ Step 1: It's HIGHLY recommended your files be .ogg as this format is VERY compressed yet retains practically all its quality (Xylemmmm's script only works with .ogg files as well.) You can set the quality to 0 for max compression with a hard to barely noticeable quality dip if you have an original to compare it to. I'd recommend 1-2 at the lowest.

For people new to Audacity, you "Export Audio" to convert it to an .ogg Saving the Project does not give you an audible file.

2️⃣ Step 2: If you want to compress in bulk, go into the tools Macro manager and create a simple macro as "EXPORT TO OGG" > "END" and click either "Project" or "Files at the bottom of the manager. This will use whatever the "Export Audio" settings are currently at. To do this in bulk, click the files button at the bottom of the manager and navigate to the folder containing the files you wish to compress/convert. It will send the files to Documents>Audacity without changing preferences and it only can do the contents of a single folder at a time.

3️⃣ Step 3: I would also recommend using the "Normalize" Effect to reduce the audio/spikes to non-ear piercing levels. This also will make all your clips even from multiple sources at various volumes consistent. This is what I've been doing and considered to have a balanced playback volume while wearing high-quality earbuds:

You first have to "Select All" before applying effects which you can do with "CTRL+A" then click the "Effects" tab at the top of the application and under "Volume and Compression" is the "Normalize" effect. you want the audio to peak at around -6 volume (the Green to Red meter in the top right) by adjusting the Peak Amplitude. This is not a hard rule as some voices will sound too quite without allowing the occasional high peak in the audio. This will require trial and error based on hearing as some voices will become too quite or too loud compared to other voices while using the same settings across the board. I found between -3 to -8 to be the best range with -4.5 being the average with male voices needing to typically be on the lower negative with females on the higher.

This can also be added to a Macro, just remember to add "Select All" before "Normalize" in the macro. Example: Select All > Normalize> Export as OGG > - END -
Last edited by Gremlin; 17 Dec, 2024 @ 1:07am
< >
Showing 1-1 of 1 comments
Per page: 1530 50