nasgektw Posted May 23, 2024 Posted May 23, 2024 (edited) I'll post here a walkthrough of my findings if you want to create a voice pack but the base mod has not been made to be voiced. For example, a lot of mods are referencing all the dialog lines into a single voice type regardless of actor gender or race. If you are lucky the mod author has implemented conditions to differenciate gender and race but what if you want to add even more shades ? This walkthrough handles the case where the mod author forces a voice type in a quest Alias. tldr; Here is the trick (Optionnal) Add a custom voice type (Optionnal) Add the fully voiced actors in a FormList Remove the forced voice type from the quest alias For each quest alias add a script to override the ForceRefTo function to set the voice and the Clear function to unset it (Optionnal) If the alias is not set with ForceRefTo, you can use the OnPlayerDialogueTarget instead but because the OnPlayerDialogueTarget event trigger during the greeting phase, you'll have to copy all your greetings fuz files to every relevant voice types (eg: Male for male, female for female) ... Profit ! In details With FOEdit, temporarily add the ESM flag to the ESP you want to patch. Save, then open the esp with Creation Kit (don't set it as "Active" since you want to create a new esp) It should have the status "Master File". If you don't want to use the vanilla voices, create your new voice type by right clicking in "Character" > "VoiceType" in the Object Window. If it does not have one already, assign a voice type to the actor you want to make a custom voice for. If you have fully voiced NPC, create a FormList and drag and drop your fully voiced Actors in it. Now, open the quest you want ("Character" > "Quest") and go to the "Quest Aliases" tab. Edit the aliases used in the scenes and remove that ugly forced voice type Create a papyrus script looking like that : Spoiler ScriptName AFV:AFV_VoiceAlias Extends ReferenceAlias Group VoiceTypeGroup VoiceType Property AFV_Voice Auto VoiceType Property AFV_VoiceF Auto EndGroup Group FullyVoicedNPCGroup FormList Property AFV_FLST_Voiced_Actors Auto EndGroup Function ForceRefTo(ObjectReference akNewRef) ; Use ForceRefTo override if the alias is set by script Self.Clear() Parent.ForceRefTo(akNewRef) Actor ActorReference = Self.GetActorReference() If ActorReference If AFV_FLST_Voiced_Actors.HasForm(ActorReference) ActorReference.SetOverrideVoiceType(None) ElseIf ActorReference.GetLeveledActorBase().GetSex() == 1 ; Use GetLeveledActorBase instead of GetActorBase to get the good gender for generated NPC (eg: settlers) ActorReference.SetOverrideVoiceType(AFV_VoiceF) Else ActorReference.SetOverrideVoiceType(AFV_Voice) Endif Endif EndFunction Event OnPlayerDialogueTarget() ; Use OnPlayerDialogueTarget event if the alias is set by event (you'll have to copy the greetings) Actor ActorReference = Self.GetActorReference() If ActorReference If AFV_FLST_Voiced_Actors.HasForm(ActorReference) ActorReference.SetOverrideVoiceType(None) ElseIf ActorReference.GetLeveledActorBase().GetSex() == 1 ActorReference.SetOverrideVoiceType(AFV_VoiceF) Else ActorReference.SetOverrideVoiceType(AFV_Voice) Endif Endif EndEvent Function Clear() Actor ActorReference = Self.GetActorReference() If ActorReference ActorReference.SetOverrideVoiceType(None) EndIf Parent.Clear() EndFunction And assign it to your alias (Don't forget to set the voice types and form list as properties) Save your patch as esp. (You can also compact the ID and make it an ESL) If you used the OnPlayerDialogueTarget method, copy every greetings (dialogs in the "start phase") in every NPC. The "copy-greetings.py" script in the modders resources of my AAF Voices mod can help you for that (May need debug) To save space, pack your mod with 7zip "Ultra" compression if you are doing ! Revert the base esp to its original state (without the "ESM" flag) and you are good to go! Old (other?) way of doing it : Spoiler tldr; Here is the trick (Optionnal) Add a custom voice type If it does not have one already, add a voice type to each actor you want custom voice for Remove the forced voice type from the quest alias Add a begin script fragment in the scene to override the actor voice type depending on the conditions you want Add an end script fragment in the scene to remove that override Because the begin fragment trigger after the greeting phase, copy all your greetings fuz files to every relevant voice types (eg: Male for male, female for female) ... Profit ! Issues and things I didn't check If the mod author update a scene (eg: Alias conditions) you'll have to update your patch (It's done quickly with FOEdit and copy/pasting) I don't know how it would react if the scene runs a script that remove the actor from the alias... will the actor keep the default voice ? In details With FOEdit, temporarily add the ESM flag to the ESP you want to patch. Save, then open the esp with Creation Kit (don't set it as "Active" since you want to create a new esp) It should have the status "Master File". If you don't want to use the vanilla voices, create your new voice type by right clicking in "Character" > "VoiceType" in the Object Window. If it does not have one already, assign a voice type to the actor you want to make a custom voice for. Now, open the quest you want ("Character" > "Quest") and go to the "Quest Aliases" tab. Edit the aliases used in the scenes and remove that ugly forced voice type For each scene on the scene tab, click on "Edit Data" to get the scene data. Add a script fragment on begin and on end. Add following properties : The ReferenceAlias of your Actor in the Scene (NagAlias or QuestAlias in my examples) The VoiceTypes you want (DefaultVoice, FemaleVoice or MaleVoice in my examples) Optionnal : Every Actor you want a custom voice for Now, you are good to go : Add a begin fragment to apply the default voice for every NPC except for the ones you want custom voices. if QuestAlias.GetActorReference().GetActorBase().GetSex() == 1 QuestAlias.GetActorReference().SetOverrideVoiceType(FemaleVoice) else QuestAlias.GetActorReference().SetOverrideVoiceType(MaleVoice) endif Add an end fragment to remove the override or the Actors will keep the default voice even after they are not targetted with the alias anymore. QuestAlias.GetActorReference().SetOverrideVoiceType(None) Save your patch as esp. Revert the base esp to its original state (without the "ESM" flag) and you are ready to go! Feel free to give me your feedbacks, I haven't used that trick in my voice mod yet so I don't know if it fully works but it's fine on my test world to investigate a way to add voices to mods... I'll give update as soon as I'll have used it on a real mod. Edited August 5, 2024 by nasgektw Better method
nasgektw Posted May 25, 2024 Author Posted May 25, 2024 Here are my feedbacks after using this method to support both female and male NPC in AAF Magno CUM Gaudio : It globally works great especially if the scene has an empty greeting phase (So you don't have to add your own line and move everything in a new dialog) Don't forget to copy/paste the least restrictive conditions from the dialogs you moved into you new greeting line Don't forget to copy/paste the start data into your new line (force greet radius, forced alias, etc.) It appears some line in a topic does not appear in the creation kit GUI... I tried to move only the one appearing hopping the links will be kept... wait and see... You need the fragments of the lines you move in order to remove the "start" infos because CK is recompiling everything even if not needed... Please mod authors don't add useless conditions on voice types in your dialogs if you already force it in your alias... It's a pain to remove all of those... Yes, remove all the conditions on voice type in the lines if you force voice type in the dialog alias, you can do it, they are redundant anyway. You can get around mods that keep un unpackaged wav and lip files by overriding the original voice type name with yours so you can distribute only your fuz files. 1
nasgektw Posted June 6, 2024 Author Posted June 6, 2024 A little update after I came accross difficulties voicing TSEX and TSEX Hardship Alpha : Original tutorial was breaking complexe scenes with different starting phases There is a slightly different process depending on if you have a starting phase defined or not in the topic you move Original tutorial was hard to follow regarding setting the relevant start conditions for scene with a lot of different starting conditions The easiest workaround I found I simply copy the old lines and tick/untick the "Requires Player Activation" box if set. That process also fixes some issues regarding "Say Once" checkbox and timer reset conditions. ... But it introduce a pain in the ass regarding the removal of the script fragments... Creation Kit is not user friendly regarding fragment removal... I had to save, close and reload the ESP... The dummy text value appear sometimes in the subtitles With subtitle priority set to "low" it tends to appear less 1
nasgektw Posted June 10, 2024 Author Posted June 10, 2024 A big update after I understood why Akor duplicated some lines for every voice type in the game for Boston Devious Helper. The need to shift the greeting phase to phase 1 was because the begin scene fragment triggers after the greeting phase. All we have to do to handle that is to simply add a voice type to every new actor in the mod and duplicate the greeting fuz to all the relevant voice types in the game (I'm currently referencing and sorting them). Since there is not THAT many voice type nor THAT many greetings, the only downside of this method is a few additionnal megabytes. Doing like this is much more simple, fixes the delay induced by the previous method and does not make the original mod unstable. 1
nasgektw Posted August 5, 2024 Author Posted August 5, 2024 After voicing Boston Devious Helper I figured out a new and easier way of doing it by overriding ForceRefTo (or OnPlayerDialogueTarget) and Clear function from ReferenceAlias script. It's really straight forward for simple mods relying exclusively on ForceRefTo but require to understand how the mod work for bigger ones with NPC assigned to multiple aliases at the same time. 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