[SCRIPT] Loading sounds from lang folder? - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: [SCRIPT] Loading sounds from lang folder? (/thread-52987.html) |
Loading sounds from lang folder? - IlDucci - 10-24-2016 Hi. I'm trying to do a language mod in TDD, and I found out that there's some voices that are not in the lang folder, but in the sounds folder. (Daniel's breathing/jumps/scare voices, some monster dialogue...) I've tried to make a "sounds" subfolder inside lang\esp(My custom folder)\, but the sounds are still being read from the main sounds subfolder. Is there a way to make the game load those sounds without having to make a custom story mod? Thank you for your time. RE: Loading sounds from lang folder? - Mudbill - 10-24-2016 The way file loading works in Amnesia is that it checks the "resources.cfg" file for each entry present. It looks through all those folders (and subfolders if AddSubDirs="True") listed in order until it finds a file with the specified filename (regardless of the file path). If you have a file named mysound.ogg within the lang folder and another file named mysound.ogg within the sounds folder, it will find and use the first one it can locate, based on the resources file. If the resources list "/lang" first, it will find the first file. If it lists "/sounds" above the lang folder, it will find the second file instead. Once it finds a file, it stops searching for it, basically ignoring any duplicates. Your solution is probably to edit the resources.cfg file. Anyway, are you trying to do a language mod, as in a custom voiceover in another language? Are you trying to override the player's "breathing/jump/scare" sounds as well? Ideally (of course) your mod shouldn't overwrite any present files, but rather load them differently. I haven't looked at how the voiceovers are done, so I'll have to investigate to give a more accurate answer. RE: Loading sounds from lang folder? - IlDucci - 10-24-2016 (10-24-2016, 11:31 AM)Mudbill Wrote: The way file loading works in Amnesia is that it checks the "resources.cfg" file for each entry present. It looks through all those folders (and subfolders if AddSubDirs="True") listed in order until it finds a file with the specified filename (regardless of the file path). Yeah, we're doing a full Castilian Spanish voiceover (It's 99% complete) and I'd hoped to put things in the lang\esp folder, avoiding the overwrite of the sounds folder. (I'm the technical guy, the voice director is somebody else) I'll try the resources thing. EDIT: The lang folder is actually absent from the resources.cfg file. RE: Loading sounds from lang folder? - Mudbill - 10-24-2016 Okay then I think the next step is to find out how the original game plays the voice files for the other languages. Try to look at the script for the main_hall map or perhaps check the .flash flashback files. Look for how it references the files. That info would be useful. I'd do it myself but I'm not at home atm. RE: Loading sounds from lang folder? - IlDucci - 10-24-2016 (10-24-2016, 12:48 PM)Mudbill Wrote: Okay then I think the next step is to find out how the original game plays the voice files for the other languages. Try to look at the script for the main_hall map or perhaps check the .flash flashback files. Look for how it references the files. That info would be useful.I've done some extra research, and it's not good: If I put the player and react effects inside the lang\esp folder, they won't play (As the ones in the sound folder seems to have priority). I have to delete the ones in the sounds folder to force them being read from lang\esp. I've searched a bit some of the original sounds that are not flashbacks nor diary events (For example, 22_start_daniel): They are removed from the sounds folder, yet there is a .snt file. I guess that's how Frictional did it: Any file that was to be voiceovered was removed from sounds and taken into lang. RE: Loading sounds from lang folder? - Mudbill - 10-24-2016 Well, since the lang folder contains nothing but .ogg files (from the audio aspect), you're not gonna be able to change the output just by adding more. I think we need to inspect exactly what changes when the user set the language to Russian, as that's the only language that also changes the voices. There has to be a "path" of sorts, that is changed somewhere. Edit: I found this in "russian.lang" in /config/lang_main. PHP Code: <RESOURCES> So to add your paths to "esp" AKA Spanish, you'll need to open the spanish.lang file and edit the resources tag. Change only the "lang/eng" to "lang/esp" and you're good. This won't override player sound effects, but it'll change voices. RE: Loading sounds from lang folder? - IlDucci - 10-24-2016 Already done. All that was left was those effects. You were right. The only way to do that is editing the resources.cfg file. Guess I'll have to include a copy with the installer/Steam Workshop files. Thanks for the help. |