diff --git a/GeneralMods/Vocalization/Vocalization/Framework/CharacterVoiceCue.cs b/GeneralMods/Vocalization/Vocalization/Framework/CharacterVoiceCue.cs index 38ccacff..73f77a2c 100644 --- a/GeneralMods/Vocalization/Vocalization/Framework/CharacterVoiceCue.cs +++ b/GeneralMods/Vocalization/Vocalization/Framework/CharacterVoiceCue.cs @@ -195,9 +195,13 @@ namespace Vocalization.Framework string[] files = Directory.GetFiles(dir); foreach(var file in files) { - string eventFileName = Path.GetFileNameWithoutExtension(file)+".xnb"; - if (eventFileNames.Contains(eventFileName)) continue; - else eventFileNames.Add(eventFileName); + string eventFileName = Path.GetFileNameWithoutExtension(file); + + string actualName = eventFileName.Split('.').ElementAt(0)+".xnb"; + + //Gte first position of . and split it. The 0 element will be teh actual filename. + if (eventFileNames.Contains(actualName)) continue; + else eventFileNames.Add(actualName); } } } diff --git a/GeneralMods/Vocalization/Vocalization/Vocalization.cs b/GeneralMods/Vocalization/Vocalization/Vocalization.cs index 755d359e..8b9236f8 100644 --- a/GeneralMods/Vocalization/Vocalization/Vocalization.cs +++ b/GeneralMods/Vocalization/Vocalization/Vocalization.cs @@ -1743,18 +1743,19 @@ namespace Vocalization foreach (KeyValuePair pair in DialogueDict) { string key = pair.Key; - if (key != cue.name) continue; string rawDialogue = pair.Value; List speakingLines = getEventSpeakerLines(rawDialogue, cue.name); //Sanitize Event info here! - - List cleanDialogues = new List(); - cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue, cue); - foreach (var str in cleanDialogues) + foreach (var line in speakingLines) { - cue.addDialogue(str, new VoiceAudioOptions()); //Make a new dialogue line based off of the text, but have the .wav value as empty. + List cleanDialogues = new List(); + cleanDialogues = sanitizeDialogueFromDictionaries(line, cue); + foreach (var str in cleanDialogues) + { + cue.addDialogue(str, new VoiceAudioOptions()); //Make a new dialogue line based off of the text, but have the .wav value as empty. + } } } } @@ -1987,10 +1988,12 @@ namespace Vocalization List speakingData = new List(); foreach(var dia in dialogueSplit) { - if (!dia.Contains("speak") && !dia.Contains("textAboveHead") && !dia.Contains(speakerName)) continue; + //ModMonitor.Log(dia); + if (!dia.Contains("speak") && !dia.Contains("textAboveHead")) continue; string[] actualDialogue = dia.Split(new string[] { "\"" }, StringSplitOptions.None); - - ModMonitor.Log(actualDialogue[1]); + //Check to make sure this is the speaker's line. + if (!actualDialogue[0].Contains(speakerName)) continue; + //ModMonitor.Log(actualDialogue[1],LogLevel.Alert); //Get the actual dialogue line from this npc. speakingData.Add(actualDialogue[1]); }