Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- use vanilla sounds for all races
- local Races = {["Argonian"] = true, ["Breton"] = true, ["Dark Elf"] = true, ["High Elf"] = true, ["Imperial"] = true, ["Khajiit"] = true, ["Nord"] = true, ["Orc"] = true, ["Redguard"] = true, ["Wood Elf"] = true}
- if (Races[e.reference.object.race.id]) then
- local genderPath = e.reference.object.female and "f" or "m"
- local racePath = ({
- ["Argonian"] = "a",
- ["Breton"] = "b",
- ["Dark Elf"] = "d",
- ["High Elf"] = "h",
- ["Imperial"] = "i",
- ["Khajiit"] = "k",
- ["Nord"] = "n",
- ["Orc"] = "o",
- ["Redguard"] = "r",
- ["Wood Elf"] = "w",
- })[e.reference.object.race.id]
- local range = ({
- ["Argonian"] = ({
- ["f"] = 16,
- ["m"] = 16,
- }),
- ["Breton"] = ({
- ["f"] = 15,
- ["m"] = 15,
- }),
- ["Dark Elf"] = ({
- ["f"] = 14,
- ["m"] = 14,
- }),
- ["High Elf"] = ({
- ["f"] = 15,
- ["m"] = 15,
- }),
- ["Imperial"] = ({
- ["f"] = 15,
- ["m"] = 10,
- }),
- ["Khajiit"] = ({
- ["f"] = 16,
- ["m"] = 16,
- }),
- ["Nord"] = ({
- ["f"] = 15,
- ["m"] = 14,
- }),
- ["Orc"] = ({
- ["f"] = 21,
- ["m"] = 15,
- }),
- ["Redguard"] = ({
- ["f"] = 14,
- ["m"] = 15,
- }),
- ["Wood Elf"] = ({
- ["f"] = 15,
- ["m"] = 15,
- }),
- })[e.reference.object.race.id][genderPath]
- local randomInRange = math.random(1, range)
- local rangePath = ((randomInRange < 10) and "00" or "0") .. randomInRange
- soundPath = "vo\\" .. racePath .. "\\" .. genderPath .. "\\Hit_" .. racePath .. genderPath .. rangePath .. ".mp3"
- -- i.e. vo\k\f\Hit_KF016.mp3 for Khajiit female
- tes3.playSound({ reference = e.reference, soundPath = soundPath })
- return
- end
- -- now unused
- -----------------------------------------------------------------
- -- use Gothic sounds for all races except Argonian, Khajiit, Orc
- --if e.reference.object.female then
- -- soundPath = ({
- -- "vo\\death\\SVM_16_DEAD_RU.mp3",
- -- "vo\\death\\SVM_17_DEAD_RU.mp3",
- -- "vo\\death\\SVM_17_DEAD_EN.mp3",
- -- "vo\\death\\SVM_17_DEAD_PL.mp3",
- -- })[math.random(1, 4)]
- --else
- -- soundPath = ({
- -- "vo\\death\\SVM_13_DEAD_RU.mp3",
- -- "vo\\death\\SVM_3_DEAD_DE.mp3",
- -- })[math.random(1, 2)]
- --end
- -----------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment