Osmodium / W40KRogueTraderSpeechMod

MIT License
2 stars 3 forks source link

Owlcat have changed the colour code for the Narrator voice lines in patch 1.2.0, so FormatGenderSpecificVoices is currently failing. #5

Closed LeapSoftware closed 5 months ago

LeapSoftware commented 5 months ago

I added a bug on the nexusmods page but i thought id also mention here for completeness (and so i can add more info)

The below method in WindowsSpeech.cs (and maybe apple i guess) needs to change the narrator colour from 544709 to the new 3c2d0a which was changed in the 1.2.0 patch.

private string FormatGenderSpecificVoices(string text)
{
    text = text.Replace("<i><color=#544709>", $"</voice>{CombinedNarratorVoiceStart}");
    text = text.Replace("</color></i>", $"</voice>{CombinedDialogVoiceStart}");

    if (text.StartsWith("</voice>"))
        text = text.Remove(0, 8);
    else
        text = CombinedDialogVoiceStart + text;

    if (text.EndsWith(CombinedDialogVoiceStart!))
        text = text.Remove(text.Length - CombinedDialogVoiceStart.Length, CombinedDialogVoiceStart.Length);

    if (!text.EndsWith("</voice>"))
        text += "</voice>";
    return text;
}
Osmodium commented 5 months ago

Fixed in 0.9.7