Kvellen Posted August 10, 2019 Posted August 10, 2019 (edited) Here's a very rough guide on how to add a new voice to Pillars of Eternity 2, without replacing an existing one. From the code side of things it's not too complicated, you'll just need 2 blocks of code. The main complication lies in creating the audio files and naming them correctly so that the game will know what to do with them. Go to the PillarsOfEternityII_Data directory, you can find this by default: Steam: C:\Program Files (x86)\Steam\steamapps\common\Pillars of Eternity II Deadfire\PillarsOfEternityII_Data\ GOG: C:\Program Files (x86)\GOG Games\Pillars of Eternity II Deadfire\PillarsOfEternityII_Data\ Inside the override folder (if this doesn't exist, create it) create a new folder, give it the name of your mod (E.g. Something like “Custom Voice”, “Zealous Voice”, something along those lines but it's really up to you). Inside this folder right-click and create a new notepad file. Give it the name of your mod and put .gamedatabundle (no .txt) at the end. Open it with Notepad (or your choice of code editor) and paste the following template: { "GameDataObjects": [{ "$type": "Game.GameData.SpeakerGameData, Assembly-CSharp", "DebugName": "DEBUG_NAME_1", "ID": "GUID_1", "Components": [{ "$type": "Game.GameData.SpeakerComponent, Assembly-CSharp", "Gender": "GENDER", "ChatterFile": "936c726d-d219-4771-80bb-83dd61c16cce", "ExternalChatterVOID": "00000000-0000-0000-0000-000000000000", "ChatterPrefix": "FILE_PREFIX", "WwiseChatterEventOverride": "", "WwiseChatterVoiceOverride": "" } ] }, { "$type": "Game.GameData.PlayerVoiceGameData, Assembly-CSharp", "DebugName": "DEBUG_NAME_2", "ID": "GUID_2", "Components": [{ "$type": "Game.GameData.PlayerVoiceComponent, Assembly-CSharp", "DisplayName": 465, "SpeakerReferenceID": "GUID_1", "Conditionals": { "Operator": 0, "Components": [] } } ] } ] } Change the following: DEBUG_NAME_1: change to something distinctive to your mod. This way if something isn't working, you can easily search for errors in the output.log. e.g. “DebugName”: “SPK_Player_Custom_F” GUID_1: Generate a GUID and paste it over GUID_1 (inside the quotes). e.g. "ID" : GENDER: Put Male or Female inside the quotes depending on which gender you want the voice to be available for. e.g. “Gender”: “Female” FILE_PREFIX: Change to something short, something easy to retype and remember. You will use this later as the name of the folder for your audio and as a prefix on all your audiofiles. Don't use spaces in the name. Use_underscores_ instead_to_separate_words. e.g. “ChatterPrefix”: “player_custom_f” DEBUG_NAME_2: same idea as DEBUG_NAME_1 but make sure they aren’t exactly the same. e.g. “DebugName”: “Voice_Custom_Female” GUID_2: Generate another different GUID and paste it over GUID_2 (inside the quotes). e.g. For “SpeakerReferenceID” paste the first GUID you generated over GUID_1 again. e.g. "SpeakerReferenceID": Finally: Make sure everything you've replaced still has quotes around it. Make sure there are no spaces inside of the “quotes”. Save your file. Your finished code should look something like this: Spoiler Setting up your Audio files: Now go to: PillarsOfEternityII_Data\StreamingAssets\Audio\Windows\Voices\English(US)\ and create a new folder there naming it the same as what you have put in place of FILE_PREFIX. This is where all your audio files will go once they are converted to .wem and have the correct names. The naming of audio files goes like this: ch_FILE_PREFIX_USE_NODE.wem E.g. ch_player_custom_f_confirm_0025.wem , ch_player_custom_f_battlecry_0028.wem There are 121 audio files that'll make up this voice. I've attached a .txt file that contains all the file names. For your convenience use Find & Replace (crtl+h) to change all the lines with FILE_PREFIX to that of your ChatterPrefix. I would strongly suggest that you create a work files type folder for your project outside of the game's directory. And that you build your voice in stages, so as to avoid burning yourself out. The voice should still work if there are less than 121 files, but there will be silence for actions where there is no corresponding audio file or if there is additional line. E.g. if there is only one audio clip for when you clicking on the character there will be gaps in-between the character repeating that line. You can test the voice at any time by going into character creation, creating an adventurer at an Inn, or by opening the customization menu on an existing character. When loading it is worth clicking on your character a few times till they say something before going into the customization menu as voices don't always immediately load. Finishing touches: Create a mod manifest as described by BMac. The versions that support this mod should be: "Min" : "1.2.0.0017", "Max" : "5.0.0.0040" Currently your voice slot has the name “Test” when you look at it in game. Adding a piece of custom text to serve as your voice's name is a little finicky as it requires adding an entry to the gui.stringtable file. You can find some information on to do this in a few places. Once you have done this open up the .gamedatabundle file you made and replace 465 with the numbers that point to your text entry. Custom Voice Lines.txt Edited August 10, 2019 by Kvellen 5
Boeroer Posted August 11, 2019 Posted August 11, 2019 Very nice! Thank you for this comprehensive guide. Deadfire Community Patch: Nexus Mods
Grape_You_In_The_Mouth Posted August 31, 2019 Posted August 31, 2019 Would you be able to make a Wwise project file or tutorial that would allow us to make a custom soundtrack, replacing the original? I have a bunch of classical music that I'd prefer to play as each scene changes rather than just have a dumb playlist going. Spending at least 10 hours learning Wwise doesn't seem worth it to me, because then it's probably another 10 hours to make sure my changes work---but maybe this would be easy for you to explain? It would be awesomely appreciated. It's also cool that you figured out how to do this. I think it could have a big long-term impact and people will do fun things with it like they did in BG2.
Kvellen Posted September 15, 2019 Author Posted September 15, 2019 Sorry took me so long to reply. On 8/31/2019 at 12:46 PM, Grape_You_In_The_Mouth said: Would you be able to make a Wwise project file or tutorial that would allow us to make a custom soundtrack, replacing the original? I have a bunch of classical music that I'd prefer to play as each scene changes rather than just have a dumb playlist going. Spending at least 10 hours learning Wwise doesn't seem worth it to me, because then it's probably another 10 hours to make sure my changes work---but maybe this would be easy for you to explain? It would be awesomely appreciated. It's also cool that you figured out how to do this. I think it could have a big long-term impact and people will do fun things with it like they did in BG2. Sadly Wwise is as much a mystery to me. Anything more advanced than converting a few audio files in Wwise is outside my knowledge. and it's a similar answer with replace/adding music I'm afraid. My only guess (and I have no evidence to support this) is that all music tracks might be stored in a .bnk somewhere and are then called by the audio.gamedatabundle for certain events? Sorry that I couldn't be of any help.
Grape_You_In_The_Mouth Posted September 15, 2019 Posted September 15, 2019 Yep there's a music text file and I tried to replace one of the songs referenced in that text file, and the music stopped working. There are multiple types of references though so maybe I replaced the wrong file. I think with maybe 20 hours of tinkering around it could be learned pretty easily but the conversion and copying take quite a long time. So the actual testing of ideas is time consuming.
Kvellen Posted May 7, 2021 Author Posted May 7, 2021 (edited) Some information that has been useful for making custom voice set mods: The Obsidian Documentation about ChatterEventType, contains a list of all the events that a can trigger a voice line. Which is very useful for getting an idea of what the context might be for a line, such as the difference between "Attack" & "Attack_Issued". Though keep in mind that this list contains a number of events (such as "CipherMindWhisper2", "EnemySpottedInStealth", "Kill") that are not included in any of the main character voice sets. It would be possible to add them if anyone were inclined by making a custom .chatterbundle based of one of the existing entry. I have only minimally tested this, so I don't really know what events are actually possible to add. When converting files into .wem format, Wwise places a random string of characters in the file name. Whatever the reason behind this, it gets in the way of the game recognising the audiofiles. There is a comment by @Finchyy that contains instructions (Step 12) for making a script that'll remove the unnecessary characters from the audio files. The "Idle" event isn't functioning in my experience. From what I understand an Idle line should play from a random character after 300 seconds (5 minutes) of inactivity. From my testing by waiting upwards of 30 minutes (and also shortening the "IdleTimeThreshold": in audio.gamedatabundle). Neither the Watcher, or any companions in the party played an Idle lines. If anyone has any idea how this might be fixed, or experience to the contrary let me know! If anyone has any question on custom voices sets let me know! Edited May 7, 2021 by Kvellen
Kvellen Posted August 21, 2021 Author Posted August 21, 2021 File name and Transcript of each line said during the Soul Fragment conversation. For those who might want to add it to their custom voice using the Custom Soul Voice mod. !This includes Spoilers for Deadfire's 3rd act, as well as highlighting some Pillars of Eternity 1 Decisions! Spoiler Filename Transcript Extra Info 10_si_eothas_saves_you_0004.wem “We are together again. Are you ready to be together again?” 1st line 10_si_eothas_saves_you_0009.wem “Are you certain? Since we've parted, you've become someone else. And I have become myself.” 2nd line if “Yes” is selected After 1st line. 10_si_eothas_saves_you_0010.wem “When we join, we won't be ourselves anymore.” 3rd line 10_si_eothas_saves_you_0011.wem “Since we've parted, you've become someone else. I have become myself.” 2nd line if “why wouldn't I be?” is selected after 1st line. 10_si_eothas_saves_you_0013.wem “Are you still the same watcher who fed a wretch to Skaen's blood pool? [Narration] Darkness roils within the soul as it awaits your response. “I am.” 4th line if a Companion was sacrificed to Skaen in PoE1. 10_si_eothas_saves_you_0014.wem “Are you still the same watcher who devoured the souls at Heritage Hill?” [Narration] Darkness roils within the soul as it awaits your response. “I am.” 4th line if during Undying Heritage the Watcher absorbs the souls in PoE1. 10_si_eothas_saves_you_0015.wem “Are you still the same watcher who consigned the lost souls of the Dyrwood to oblivion?” [Narration] Darkness roils within the soul as it awaits your response. “I am.” 4th line if souls given toRymrgand at the end of PoE1. 10_si_eothas_saves_you_0016.wem “Are you still the same watcher who gave the lost souls of the Dyrwood to Woedica?” [Narration] Darkness roils within the soul as it awaits your response. “I am.” 4th line if souls given toWoedica at the end of PoE1. 10_si_eothas_saves_you_0017.wem “Are you still the same watcher who gave the lost souls of the Dyrwood to the strongest of that land?” [Narration] The soul observes you, waiting. “I am.” 4th line if souls given toGalawain at the end of PoE1. 10_si_eothas_saves_you_0018.wem “Are you still the same watcher who returned the lost souls of the Dyrwood to the Wheel?” [Narration] The soul observes you, waiting. “I am.” 4th line if souls given toBerath at the end of PoE1. 10_si_eothas_saves_you_0019.wem “Are you still the same watcher who returned the lost souls of the Dyrwood to their intended bodies?” [Narration] A light shines within the soul as it observes you, waiting. “I am.” 4th line if souls given toHylea at end of PoE1. 10_si_eothas_saves_you_0020.wem “Are you still the same watcher who cast the lost souls of the Dyrwood to the far reaches of the Beyond?” [Narration] The soul quivers and flickers erratically as it observes you, waiting. “I am.” 4th line if souls given toWael at end of PoE1. 10_si_eothas_saves_you_0037.wem “Good. Then this should be easy.” 5th line if “Yes” is selected after 4th line. 10_si_eothas_saves_you_0038.wem “This may be painful, then. But I suppose it will be so for both of us.” 5th line if “No” is selected after 4th line. 10_si_eothas_saves_you_0041.wem “Some of us is lost to him. Fragments and the empty spaces between them. They will always be a part of him. But we are still us. And it's time for us to go. Together.” 6th line 10_si_eothas_saves_you_0046.wem “It's not up to you.” if “No you stay” is selected after 6th line. 10_si_eothas_saves_you_0051.wem “Eothas is going to Ukaizo?” 7th line 10_si_eothas_saves_you_0053.wem “He's going to stop the Wheel?” 8th line 10_si_eothas_saves_you_0055.wem “Eothas is going to Ukaizo...” 9th line 10_si_eothas_saves_you_0057.wem “Eothas is going to Ukaizo. He's going to stop the Wheel.” 10th line and final line. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now