Mount & Blade II: Bannerlord

File information

Last updated

Original upload

Created by

Bloc

Uploaded by

bloctheworkerbloc

Virus scan

Safe to use

Tags for this mod

About this mod

A voice acting framework is being used to complete the voice acting in Bannerlord with Elevenlabs. Voices are assigned to characters based on their culture and then the system generates clips in real time. It uses a smart system to save the generated clips to play them for the same character combinations.

Permissions and credits
Changelogs


Video

About

Have you ever gotten tired of hearing the same initial line over and over again in Bannerlord with almost zero voice variety? Do you hate the fact that only the first line is voiced in Bannerlord? Worry not, with this mod you can give voice to every character. By every character, I mean every single character, including townsfolk, villagers, barmaids and even guard soldiers. It uses a smart system to save the generated clips and replay if the same voice and text combination is required. With that, you don't require spending your credits on generating the same voice clip.

Voice generation is almost instant in most of the scenarios, and it might take a few seconds for longer text (as can be seen in the video) but after generating it once, that clip can be used again and again if requested. 

I think this mod increases the immersiveness of the game greatly. Frankly speaking, I never cared about the background stories of the companions in this game until I start listening them explaining it with their own voice. 


How does it work?
In a nutshell, under the hood, it reads the text that will be shown to you in dialogues, checks previously recorded voice clips by trying to pair unique text IDs with voice IDs, if it cannot find any matches, it makes a request to elevenlabs with their best optimization for latency feature and plays the voice clip while also continuing to save it to your system for later usage.

Simple Steps to Get Started:
1. Create an account in Elevenlabs
Go to the link and create your account. Don't worry, elevenlabs gives you 10000 characters per month for FREE. But if you realize that you are using it more than that, you can upgrade to Starter or Creator tiers. The link is an affiliate link - I would appreciate it if you can sign up with this link if this is your first time. 
Once you create your account get your API Key
- Click your account
- Click Profile + API key
- Click view API key
- Copy the Key


2. Edit your XML file.
Open VoiceActing/VoiceConfiguration.xml with your favourite text editor. 
Replace the API key with your API key in here:


Save.
You are done! Now you can start using the mod. Nothing else is required.

Advanced Features
Adding a voice to a specific lord
If you want to add a voice to a specific lord, you need to get two things, voice id that you will assign, and id of the lord. If lord is a fixed lord, like Derthert, you can find the id on lords.xml located in Sandbox/ModuleData/lords.xml and voice ID can be found in Elevenlabs portal.

Expanding Voice Types in Cultures
You can simply copy whichever voice id you want to use and expand the VoiceConfiguration.xml file.

Adding New Culture
You have to know the id of the culture. Once you have that you can add more voice recordings to it. If you don't, system will use default voices. As long as id in xml is unique, system can always put that voice_id to the pool when it needs to generate a voice for the character.

Sharing your creations (Might be important for some Mod Creators)
Assume that you uploaded your own voice or any voice you have right to do so and generated almost all the voices. You can actually share that with the players easily. Just .zip/.rar your Generated folder and share that as a mod with players. If it's for specific lord, also tell people the voice id they need to use. For example, if your voice is generated like {yourvoiceid}_{textuniqueid}.mp3 then they can assign this {yourvoiceid} to any lord they want (or to a culture) and this mod will play that voice instead of making any network request. This is really helpful if you have a specific theme of mod, let's say Game of Thrones, and you want people to hear a specific voice for specific lord or lady.


FAQ:
- Would it work for game version A.B.C?
I don't know. Try it yourself and let us know.
- Would it work with XYZ mod?
99% likely that it would work with any mod in the nexusmods. This mod does not add any new lines or change anything and collects information from Bannerlord dialogue text processor directly. So if you are asking whether this works for your favorite Game of Thrones mod or not, answer is it most likely will work just fine.
- I get "Cannot load VoiceActing.dll" error.
It means you need to unblock your .dll files. Google (Unblocking .dll files on Windows or Unblock .dll files for Bannerlord) or use Novus launcher that can unblock them for you.
- Do I have to pay for elevenlabs?
Yes you have to, assuming that you spent your 10000 free Credit already.
- I cannot hear the voice when I talk to teen or child?
Yes that's expected. It only works with adult voices. Any character that is 18+ in the game will have this feature. 

Future Plans
If the mod gets enough popularity, I'm planning to add the following:
- Autoscan all loaded modules and merge their lord voice'ids to main list so that other mods can provide their own VoiceConfiguration files
- Making AI to pronounce things like "gold/denars" and other things.
- Adding option for protagonist to have a voice.