EagleFour Posted February 8, 2022 Share Posted February 8, 2022 Hello, I have a mod that lets random NPCs come up to me and give me quests. Normally the mod only has text no voices. But i have now added xASynth voices. The problem is, very different random human NPCs come up to me and speak to me, but only the one voice I added is used.I would like that randomly other voices, also added by me, are played. Is it possible to have dialogs select from a pool of random voices? And how can I change the voice type in CK for the dialogs?I already made a new Voice Type and created a new folder with other voices, but I can't select the Voice Type. I know how to select the voice type for a specific NPC. Link to comment Share on other sites More sharing options...
LarannKiar Posted February 8, 2022 Share Posted February 8, 2022 (edited) To force an NPC to use a custom Voice Type: Open your dialogue Quest >> Quest Aliases tab >> select the Reference Alias (of the quest giver NPC) >> click "Forced" next to "Voice Type(s)", then choose your Voice Type from the dropdown menu. You can also add Voice Type Conditions to dialogue lines: Right click on a Topic Info >> Add a new Condition >> choose the condition "GetIsVoiceType", then choose your Voice Type. Run on: "Subject". Comprasion: "== " Value: "1". This Condition can accept Form Lists too: if the Subject's Voice Type is in the Form List, it returns 1. Edited February 8, 2022 by LarannKiar Link to comment Share on other sites More sharing options...
EagleFour Posted February 9, 2022 Author Share Posted February 9, 2022 Ok, thank you very much. That has worked well so far. I finally understood about the voice types and how can change.What I still don't quite understand is the thing with the form lists.I have created a form list with two voice types for testing.But how do I get the Quest Alias to randomly select one of the two.What do I have to enter in 'forced Voice Types'? There is only one voice type.And which condition do I enter where?I have the 'Match Conditions' section in the Quest Alias window. Do I enter the condition there?I want the voice type to be the same during the whole dialog, but randomly selected from NPC to NPC.Or do I enter the condition under Topic Info, but if I understand correctly the npc would use a different voice type for each dialog line ? But I don't want that. Link to comment Share on other sites More sharing options...
EagleFour Posted February 9, 2022 Author Share Posted February 9, 2022 (edited) Ok, I have now found out that I can specify the formlist in the Alias tab of VoiceType export.Now both VoicType folders are displayed under Topic Info -> Response Text -> Double Click. In the right window the voice files are both displayed, when I double click they are also played, but in the game the NPC remains mute. See Screenshot.There is probably still a check mark missing somewhere. https://abload.de/img/20220209-134328-0017kkpl.jpg Edited February 9, 2022 by EagleFour Link to comment Share on other sites More sharing options...
EagleFour Posted February 9, 2022 Author Share Posted February 9, 2022 I'm making slow progress.I have now found out that I have to set 'GetIsVoiceType' in the tab 'Alias' at Condition. Now I have the voice in the game, but unfortunately only the first one. How can I set it to use random entries from the FormList ? Link to comment Share on other sites More sharing options...
EagleFour Posted February 11, 2022 Author Share Posted February 11, 2022 Finally, I got it working now. I have programmed a small script and attached it to the aliases. You have to create a FormList with the desired VoiceTypes. From this list one entry will be used at random. Important to mention, in the aliases tab of the quest 'Forced Voice Type' must be set to 'None', otherwise the voice types of the script are not applied.For all, who maybe want to do something similar, here is the script. ;/ ----------------------------------------------------------------------------------------- - Script for random selection of voice types from a FormList with different voice types - ----------------------------------------------------------------------------------------- /; Scriptname Script_to_Add_Random_VoiceType:AddVoiceType extends ReferenceAlias ;-- Properties -------------------------------------- ReferenceAlias Property QuestAlias Auto FormList Property FormListOfVoicesTypes Auto ;-- Variables -------------------------------------- Actor Approacher Event OnAliasInit() Approacher = QuestAlias.GetActorRef() Int iIndex = FormListOfVoicesTypes.GetSize() Int iVoiceChoiceTypeRandom = Utility.RandomInt(0,iIndex-1) VoiceType vtVoiceChoice = FormListOfVoicesTypes.GetAt(iVoiceChoiceTypeRandom) as VoiceType Approacher.SetOverrideVoiceType(vtVoiceChoice) Debug.Notification("Choosen Voice Type is: "+ Approacher.GetVoiceType()) ; This line is only for control, if it works, it can be deleted. EndEvent This script can of course be modified for all cases where you want to select random entries from form lists. Link to comment Share on other sites More sharing options...
Recommended Posts