From cb2208f9bf12e0370c81979a1a72391ae251b52f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lilian=20J=C3=B3nsd=C3=B3ttir?= Date: Sun, 5 Sep 2021 13:30:54 -0700 Subject: [PATCH] ordinator voices --- .../celediel/MoreAttentiveGuards/common.lua | 13 ++++++++- .../MoreAttentiveGuards/dialogue/voice.lua | 29 +++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/MWSE/mods/celediel/MoreAttentiveGuards/common.lua b/MWSE/mods/celediel/MoreAttentiveGuards/common.lua index 918d243..cb6ee4f 100644 --- a/MWSE/mods/celediel/MoreAttentiveGuards/common.lua +++ b/MWSE/mods/celediel/MoreAttentiveGuards/common.lua @@ -58,6 +58,8 @@ this.playGuardText = function(npc, str, target) return output end +local ordinator = "ordinator" + -- Plays a random sound of specified type and returns the path of the sound file that was played this.playGuardVoice = function(mobile, type) local distanceCap = 2500 -- sounds further away than this are too quiet to be heard @@ -66,9 +68,18 @@ this.playGuardVoice = function(mobile, type) local race = ref.baseObject.race.id:lower() local directory, soundPath, sound + -- ordinators have special voices, so here's some hacky shit to incorporate them + if not ref.baseObject.female and (ref.id:lower():match(ordinator) or ref.object.class.id:lower():match(ordinator)) then + race = ordinator + end + -- make sure the race/sex/type combo exists in the voice data if this.dialogues.voice[race] and this.dialogues.voice[race][sex] and this.dialogues.voice[race][sex][type] then - directory = string.format("vo\\%s\\%s\\", this.dialogues.voice[race].dir, sex) + if race == ordinator then + directory = string.format("vo\\%s\\", this.dialogues.voice[race].dir) + else + directory = string.format("vo\\%s\\%s\\", this.dialogues.voice[race].dir, sex) + end sound = table.choice(this.dialogues.voice[race][sex][type]) -- sound will be nil if the race/sex/type combo is an empty table if sound then soundPath = directory .. sound.file end diff --git a/MWSE/mods/celediel/MoreAttentiveGuards/dialogue/voice.lua b/MWSE/mods/celediel/MoreAttentiveGuards/dialogue/voice.lua index 57fd038..8ae28bf 100644 --- a/MWSE/mods/celediel/MoreAttentiveGuards/dialogue/voice.lua +++ b/MWSE/mods/celediel/MoreAttentiveGuards/dialogue/voice.lua @@ -594,6 +594,35 @@ local voices = { } }, dir = "w" + }, + ordinator = { + m = { + ["sneaking"] = { + { file = "Hlo_ORM008.mp3", subtitle = "Watch yourself. We'll have no trouble here." }, + { file = "Hlo_ORM004.mp3", subtitle = "If you're here for trouble, you'll get more than you bargained for." }, + { file = "Hlo_ORM003.mp3", subtitle = "We're watching you. Scum." } + }, + ["stop_sneaking"] = { + { file = "Hlo_ORM001.mp3", subtitle = "Grrrr." }, + { file = "Hlo_ORM009.mp3", subtitle = "Go on about your business." }, + { file = "Hlo_ORM007.mp3", subtitle = "Keep moving." }, + { file = "Hlo_ORM011.mp3", subtitle = "Move along." }, + }, + ["stop_following"] = { + { file = "Hlo_ORM011.mp3", subtitle = "Move along." }, + { file = "Hlo_ORM009.mp3", subtitle = "Go on about your business." }, + { file = "Hlo_ORM007.mp3", subtitle = "Keep moving." }, + { file = "Hlo_ORM002.mp3", subtitle = "Go. Now." } + }, + ["join_combat"] = { + { file = "Atk_ORM002.mp3", subtitle = "Fool!" }, + { file = "Atk_ORM003.mp3", subtitle = "You have sealed your fate!" }, + { file = "Atk_ORM004.mp3", subtitle = "You cannot escape the righteous!" }, + { file = "Atk_ORM005.mp3", subtitle = "You will pay with your blood!" }, + { file = "Atk_ORM001.mp3", subtitle = "May our Lords be merciful!" } + } + }, + dir = "ord" } }