The German setup of BGT needs an update regarding the extraction and provision of audio resources from BG1. This overhaul is necessary because currently, the BGT setup does not adequately handle the known issue of missing sound files in the German version of BG1. Previous findings about this infamous problem are largely outdated by my research! Consequently, this overhaul is about adjusting the way BGT handles the missing sounds issue, given my new findings. I have re-examined the whole problem, both in general and with respect to BGT. I will first explain the issue and its relevance for BGT, then I will come to the overhaul itself.
The underlying issue is the following: In a full install of the German version of BG1, a couple of German sound files are missing if TotSC and the patch v5512 have been installed. Before installing TotSC and the patch, the sounds in question are present in the game, either located within their appropriate BIFs or - in the odd case of MONTR19.wav - placed in the Override folder. Starting from this pre-TotSC/pre-patch state, if you now install TotSC, all German sounds in question that used to be in the BIFs are dropped into Override, and the files inside the BIFs are replaced with the corresponding English versions (!) of those sounds. Plus MONTR19.wav is simply deleted from Override, thereby leaving the English version of it (inside another BIF) as the only available version of that particular sound in the German game. When the patch v5512 is installed on top of this, things get even worse: All the proper German files that were previously dropped into the Override folder are now removed even from there (same as with MONTR19.wav), thus leaving behind the final setup of German BG1+TotSC+v5512. This final setup now lacks these German sounds entirely and only has the English counterparts available in the BIFs. The reason for any of this bizarre behavior is unknown to me. Contrary to what the BWP instructions are suggesting, this issue is exclusive to the German version of BG1 only. More details about how my findings differ from the traditional take on the problem can be found in this post in the BWP forum.
In order to understand what this issue implies for BGT, we need to look at the specific sounds that are affected. Through my investigation, I've come up with the following table. It lists all the German audio resources that are missing in a full install of BG1+TotSC+v5512. It also details the findings from the previous paragraph: You can read the table from left to right to track what happens to each file as TotSC and the patch are installed. Please also note that two of the listed missing sounds - ERROR01.wav and ERROR10.wav - are not relevant for BGT because these two sounds are present and working in BG2, as I have noted accordingly in the table. I've only included them for the sake of completeness.
So, what happens during the BGT setup with respect to these sounds? Let's look at the relevant code from setup-bgt.tp2, that is, the segment entitled "Sounds: Import from BG1". I'm only showing the code related to the missing sounds, and the German-specific part from further down that section.
[...] AT_NOW ~%quote%%WEIDU_EXECUTABLE%%quote% --noautoupdate --no-auto-tp2 --logapp --log bgt/bash.debug --game "%bg1_dir%" --out bgtwav --biff-get-rest [...] error.*wav~ [...] AT_NOW ~%quote%%WEIDU_EXECUTABLE%%quote% --noautoupdate --no-auto-tp2 --logapp --log bgt/bash.debug --game "%bg1_dir%" --out bgtwav --biff-get-rest intro01f.wav intro02f.wav [...]~ [...] AT_NOW ~%quote%%WEIDU_EXECUTABLE%%quote% --noautoupdate --no-auto-tp2 --logapp --log bgt/bash.debug --game "%bg1_dir%" --out bgtwav --biff-get-rest [...] montr.*wav [...]~ [...] AT_NOW ~%quote%%WEIDU_EXECUTABLE%%quote% --noautoupdate --no-auto-tp2 --logapp --log bgt/bash.debug --game "%bg1_dir%" --out bgtwav --biff-get-rest [...] tscna.*wav [...]~ [...] ACTION_IF ("%WEIDU_OS%" STRING_COMPARE_CASE ~win32~ = 0) BEGIN AT_NOW ~bgt\install\win32\delwav.bat %debug%~ EXACT END ELSE BEGIN AT_NOW ~sh bgt/install/unix/delwav.sh~ END [...] ACTION_IF ( ~%LANGUAGE%~ STRING_COMPARE_CASE ~german~ ) = 0 THEN BEGIN AT_NOW ~%quote%%WEIDU_EXECUTABLE%%quote% --noautoupdate --no-auto-tp2 --logapp --log bgt/bash.debug --game "%bg1_dir%" --out bgtwav --biff-get-rest guarr.*wav chant.*wav oghma03.wav oghma04.wav~ AT_NOW ~%quote%%WEIDU_EXECUTABLE%%quote% --noautoupdate --no-auto-tp2 --logapp --log bgt/bash.debug --game "%bg1_dir%" --out bgtwav --biff-get-rest intro01.wav intro02.wav~ AT_NOW ~%quote%%WEIDU_EXECUTABLE%%quote% --noautoupdate --no-auto-tp2 --logapp --log bgt/bash.debug --game "%bg1_dir%" --out bgtwav --biff-get-rest gnome.*wav gnomf.*wav wench.*wav~ LAM bash_log COPY + ~bgt/language/german/montr19.wav~ ~bgtwav/montr19.wav~ ~bgt/language/german/tscna02.wav~ ~bgtwav/tscna02.wav~ ACTION_BASH_FOR ~%bg1_dir%/override~ EVALUATE_REGEXP ~^\(tscna0.*\|error.*\)\.wav$~ BEGIN //this should work COPY + ~%BASH_FOR_FILESPEC%~ ~bgtwav~ END END
As you can see, the setup initially extracts all sounds in question from the BIFs (and deletes redundant files, including ERROR01.wav and ERROR10.wav). This means that at this point, the extracted sounds are the English ones. The ACTION_BASH_FOR command in the German-specific segment then tries to remedy this. However, the command only works if the missing TSCNA and ERROR sounds were placed in the BG1 Override folder beforehand, i.e. if the given BG1 install was additionally modified. If that is not the case, then the ACTION_BASH_FOR command doesn't copy anything, because the missing German sounds are not present in the Override folder. Only the direct copying of MONTR19.wav and TSCNA02.wav from the German subfolder of BGT actually works out. Plus the command extracting INTRO01.wav and INTRO02.wav also does remedy the absence of INTRO01F.wav and INTRO02F.wav, though only as part of the foreign language compatibility workaround in collaboration with further adjustments at other places in the setup. But all remaining BG1 sounds from the table above would be in English.
So much for the issue at hand and its effect on BGT. Needless to say the setup's current attempt to resolve the problem using the ACTION_BASH_FOR command is inadequate. I understand it does work in conjunction with BWP, because BWP simply makes the player prep the BG1 install accordingly, but not every player uses BWP, so that's not a universal solution. (Plus, BWP's overall approach to the issue is majorly flawed and should be deprecated, see my posting again for details). On the other hand, if you leave BWP aside, the BGT setup currently requires every German player to individually place all missing sounds in the BG1 Override directory before installing BGT. This is quite a leap of faith, since BGT cannot expect all German users to even know about those missing sounds, let alone to understand how to prep their BG1 install. Instead, the BGT setup must resolve this problem on its own, without depending on user action or on BWP. Consequentially, the actual, universal solution to the whole issue is the following: Since the missing German files cannot be extracted from the default BG1 install, they must be provided by BGT itself, as it is already done with MONTR19 and TSCNA02 at the moment. This also makes the entire workaround for INTRO01F and INTRO02F obsolete. All 21 files that are marked as "missing" in my table above need to be delivered with BGT. MONTR19 and TSCNA02 already are, and I have gathered the 19 remaining files by grabbing them from a pre-TotSC/pre-patch install.
Before I get to the implementation of this solution, let me just quickly throw in another issue that will be resolved as well. It is about Ike's German soundset. In BG1, there are six audio files pertaining to Ike. Of those six files, BGT only imports one (IKEEE_04.wav), because the five other sounds are present in BG2, located in the Override folder. However, in the German version of BG2, these five sounds are broken/mute (same as with guarr.*wav etc.). Therefore, the BGT setup must additionally extract these five German sounds from BG1 and put them into BG2 Override to replace the mute ones. I'm guessing they should then be moved from Override to BGTWAV as well, given that all sounds extracted from BG1 are regularly biffed into BGTWAV.bif.
Finally, here's the complete overhaul as described. It fully remedies the issue of the missing German BG1 sounds, it cuts the now-superfluous workaround for the German version of INTRO01F and INTRO02F, and it restores Ike's full German soundset. The overhaul consists of steps 1 to 4.
1. Provision of the missing German BG1 sounds
As I said, I have gathered the missing sounds using a pre-TotSC/pre-patch install of BG1. The 19 files from this attachment BG1Snds.rar 2.67MB 221 downloads are to be placed into bgt\language\german. Together with the already present montr19.wav and tscna02.wav, there should now be a total of 21 wave files located in the directory - exactly the "missing" ones. If the directory seems too cluttered with all the wave files, they can go into a new subfolder (see note on step 2b).
2. Adjustment of setup-bgt.tp2
The code needs to be changed to install all the provided audio files and extract Ike's sounds from BG1. Furthermore, since the proper German versions of INTRO01F.wav and INTRO02F.wav are being provided now, the language compatibility workaround for the German strings #15879 and #15880 is no longer needed. Going from top to bottom, there are two sections to be adjusted:
a) Section "Foreign language compatibility":
The language ~german~ is now included when regularly importing the BG1 strings #15879 (uses INTRO01F) and #15880 (uses INTRO02F). Only the special string setting for #8918 remains as a language fix for German. Please replace the entire section with the following code.
///////////////////////////////// // Foreign language compatibility ///////////////////////////////// ACTION_IF (( ~%LANGUAGE%~ STRING_COMPARE_CASE ~castilian~ ) = 0) OR (( ~%LANGUAGE%~ STRING_COMPARE_CASE ~czech~ ) = 0) OR (( ~%LANGUAGE%~ STRING_COMPARE_CASE ~english~ ) = 0) OR (( ~%LANGUAGE%~ STRING_COMPARE_CASE ~german~ ) = 0) OR (( ~%LANGUAGE%~ STRING_COMPARE_CASE ~international~ ) = 0) OR (( ~%LANGUAGE%~ STRING_COMPARE_CASE ~italian~ ) = 0) OR (( ~%LANGUAGE%~ STRING_COMPARE_CASE ~korean~ ) = 0) OR (( ~%LANGUAGE%~ STRING_COMPARE_CASE ~polish~ ) = 0) OR (( ~%LANGUAGE%~ STRING_COMPARE_CASE ~russian~ ) = 0) OR (( ~%LANGUAGE%~ STRING_COMPARE_CASE ~schinese~ ) = 0) OR (( ~%LANGUAGE%~ STRING_COMPARE_CASE ~tchinese~ ) = 0) THEN BEGIN STRING_SET ~15879~ @15879 STRING_SET ~15880~ @15880 END ACTION_IF ( ~%LANGUAGE%~ STRING_COMPARE_CASE ~french~ ) = 0 THEN BEGIN STRING_SET ~10898~ @10898 //Warder STRING_SET ~11026~ @11026 //Warder STRING_SET ~15879~ @300000 STRING_SET ~15880~ @300001 END ACTION_IF ( ~%LANGUAGE%~ STRING_COMPARE_CASE ~german~ ) = 0 THEN BEGIN STRING_SET ~8918~ @300029 END
b) Section "Sounds: Import from BG1":
Only the German-specific part of the sound import section is changed. See original code further up this post for comparison. The command extracting intro01.wav and intro02.wav is no longer needed and therefore removed. All the provided wave files are now copied from bgt\language\german to the BGTWAV folder. Finally, Ike's five mute sounds in Override are first backed up (using placeholder.txt), then his working German sounds are extracted from BG1 to Override, thereby replacing the mute ones, and subsequently are moved to BGTWAV. Please replace the German-specific part of the section with the following code.
ACTION_IF ( ~%LANGUAGE%~ STRING_COMPARE_CASE ~german~ ) = 0 THEN BEGIN AT_NOW ~%quote%%WEIDU_EXECUTABLE%%quote% --noautoupdate --no-auto-tp2 --logapp --log bgt/bash.debug --game "%bg1_dir%" --out bgtwav --biff-get-rest guarr.*wav chant.*wav oghma03.wav oghma04.wav~ AT_NOW ~%quote%%WEIDU_EXECUTABLE%%quote% --noautoupdate --no-auto-tp2 --logapp --log bgt/bash.debug --game "%bg1_dir%" --out bgtwav --biff-get-rest gnome.*wav gnomf.*wav wench.*wav~ LAM bash_log ACTION_BASH_FOR ~bgt/language/german~ ~^.*\.wav$~ BEGIN COPY + ~%BASH_FOR_FILESPEC%~ ~bgtwav/%BASH_FOR_FILE%~ END ACTION_BASH_FOR ~override~ ~ikeee_0[12356]\.wav~ BEGIN //to create backups COPY ~bgt/placeholder.txt~ ~%BASH_FOR_FILESPEC%~ END AT_NOW ~%quote%%WEIDU_EXECUTABLE%%quote% --noautoupdate --no-auto-tp2 --logapp --log bgt/bash.debug --game "%bg1_dir%" --out override --biff-get-rest ikeee_01.wav ikeee_02.wav ikeee_03.wav ikeee_05.wav ikeee_06.wav~ LAM bash_log MOVE + (~override~ ~ikeee_0[12356]\.wav~) ~bgtwav~ END
Note: If the 21 wave files have been put into a subfolder, then ~bgt/language/german~ must be substituted by ~bgt/language/german/subfolder~ accordingly.
Note2: If someone can provide a more elegant way for handling Ike's sounds, please go ahead.
3. Adjustment of the German setup.tra
I updated the file to complete the removal of the superfluous workaround for INTRO01F and INTRO02F. Since #15879 and #15880 are being imported from BG1 now (step 2a), the strings @300000 and @300001 are no longer needed. I also used this opportunity to update and revise many other strings and comments. Please replace the old setup.tra at bgt\language\german with the new file from this attachment: setup.tra 22.1K 344 downloads
4. Update of the Developer's Documentation
I have found only one paragraph that would need an update due to the overhaul. In section 1d, the last bullet point should now say: "Foreign language compatibility strings: one German string and four French strings do not correspond..."
----- End of submission -----
That's it. Though I have tested the entire overhaul locally and it works flawlessly for my install, I wouldn't mind some double-checking. I'd be glad to see this get implemented.
Edited by -Hurricane-, 18 March 2012 - 04:15 PM.