FreeSlave / halflife-featureful

Half-Life SDK for making mods upon it
https://discord.gg/A7ZErQAjfa
Other
26 stars 5 forks source link

sound replacement file doesn't replace sounds from sentences.txt? #8

Open mfaizsyahmi opened 4 months ago

mfaizsyahmi commented 4 months ago

I'm swapping some of monster_scientist with female scientists. I was hoping that mapping every female scientist's sound files with a female version in a separate folder in a sound replacement file was enough, but instead all scripted sentences remain as original. I had to resort to duplicating every scientist sentence ids with a female version, and specify sentence prefix as well as sound replacement file.

Just raising this issue for clarification if this is a bug or just replicating the way the equivalent in sohl/sc works.

Also, sound replacement sometimes fail and my female scientists sometimes still scream male pain sounds.

FreeSlave commented 4 months ago

Sound replcacement currently works only with sounds, not sentences. I know that Sven Co-op sound replacement supports replacement of sentences (at least specific sentences with '!' at the beginning), not sure about sentence groups.

Yep, you're supposed to provide both a custom speech prefix and sound replacement file for talking monsters.

Regarding female scientists still screaming male pain sounds - did you use the sound replacement file from the sample mod or write the one by yourself?

mfaizsyahmi commented 4 months ago

^ I listed all the file names of the female scientists (they're a subset of all the regular scientists' voicelines), then duped that list so that if the female scientist has the file, the regular scientist's files maps to it. This is on the assumption that all sounds are translated including those from sentences.txt. Even if that's not the case at least a subset of that list like the pain sounds will be used.

tbf I did made an assumption that the female scientist voice pack didn't omit any sound files that aren't scripted. I have checked them now and confirmed they didn't omit any.

FreeSlave commented 4 months ago

I don't know what voice pack you're referring to. The scientists use the following pain sounds:

"scientist/sci_pain1.wav"
"scientist/sci_pain2.wav"
"scientist/sci_pain3.wav"
"scientist/sci_pain4.wav"
"scientist/sci_pain5.wav"

For scream/fear sentences they use SC_SCREAM, SC_FEAR and SC_PLFEAR sentence groups.

If you provide the custom Speech Prefix, the monster won't use the original sentence groups.

If you defined the sentence groups for the custom speech prefix, could you post it here?

Could you detect what exact sound or sentence is playing in male version?

Also, the model itself might use sounds and sentences in animation events. The original scientist model does it only in scripted animations.