It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
Hi folks!,

I'm trying to install a few WeiDU mods on BG:EE on Linux and running into grief.

Firstly, while the latest version of WeiDU (237, freshly downloaded) is supposed to find dialog.tlk automatically, I have to link it into the game/ folder from lang/en_US/dialog.tlk for WeiDU to proceed.

However, this doesn't help much, because when I run setup-bgqe (the first mod I'm trying to install), I get:

ERROR: could not match a directory in ./dialog.tlk
ERROR: problem parsing TP file [bgqe/setup-bgqe.tp2]: Not_found
FATAL ERROR: Not_found

Anyone got a clue what I'm doing wrong?

Thanks!
~Celti
Post edited December 12, 2014 by Celti
No posts in this topic were marked as the solution yet. If you can help, add your reply
Okay, I've resolved my issue after some judicious googling.

The problem is that WeiDU on Linux expects everything to be lower-cased, while BG:EE doesn't like it if you lowercase everything.

The solution is to use the second script from this post: askubuntu.com/questions/535999/lowercase-to-all-files-in-a-directory-expecting-to-undo-it-at-some-point/536012 #536012 to recursively lowercase all files, install your mods, then run the generated restore scripts to uppercase the files.

Hope this helps anyone else having issues!
avatar
Celti: Okay, I've resolved my issue after some judicious googling.

The problem is that WeiDU on Linux expects everything to be lower-cased, while BG:EE doesn't like it if you lowercase everything.

The solution is to use the second script from this post: askubuntu.com/questions/535999/lowercase-to-all-files-in-a-directory-expecting-to-undo-it-at-some-point/536012 #536012 to recursively lowercase all files, install your mods, then run the generated restore scripts to uppercase the files.

Hope this helps anyone else having issues!
thx, useful.

i found this solution a bit buggy, so i have made my own

#!/bin/bash

IFS=$'\n'
WORKING_PATH=$(pwd $1)

RESTORE_FILENAME="$WORKING_PATH/restore_case.sh"

echo "#!/bin/bash" > "$RESTORE_FILENAME"
chmod a+x "$RESTORE_FILENAME"


for FILEPATH in $(find . -type f)
do
FILENAME="${FILEPATH##*/}"
LOWER_FILE="${FILEPATH::-${#FILENAME}}${FILENAME,,}"

if [ "$LOWER_FILE" != "$FILEPATH" ]; then
echo moving "$FILEPATH" to "$LOWER_FILE"
echo mv \""$LOWER_FILE"\" \""$FILEPATH"\" >> "$RESTORE_FILENAME"_files
mv "$FILEPATH" "$LOWER_FILE"
fi
done

touch "$RESTORE_FILENAME"_dirs

for DIRPATH in $(find . -type d -printf "%d%p\n"|sort -nr)
do
DIRPATH=${DIRPATH:1}
DIRNAME="${DIRPATH##*/}"
LOWER_DIRPATH="${DIRPATH::-${#DIRNAME}}${DIRNAME,,}"
if [ "$LOWER_DIRPATH" != "$DIRPATH" ]; then
echo moving "$DIRPATH" to "$LOWER_DIRPATH"
echo -e "mv \""$LOWER_DIRPATH"\" \""$DIRPATH"\"\n$(cat "$RESTORE_FILENAME"_dirs)" > "$RESTORE_FILENAME"_dirs
mv "$DIRPATH" "$LOWER_DIRPATH"
fi
done

cat "$RESTORE_FILENAME"_dirs "$RESTORE_FILENAME"_files >> "$RESTORE_FILENAME"
rm "$RESTORE_FILENAME"_dirs "$RESTORE_FILENAME"_files

echo rm '$0' >> "$RESTORE_FILENAME"
Post edited June 27, 2017 by sss123next
Well met!

2019 seems a good year to update this post.

BG:EE (v2.5)
Linux (LUbuntu 18.04)
HDD is ext4
shell is bash
WeiDU (version 24600: "Land of Confusion")

This method doesn't rename files, instead creates links to files.
Doesn't make backups. Backup first, just in case.


Simply:


(1) Go to game directory

cd 'GOG Games/Baldurs Gate Enhanced Edition/game'


(2) Change the case of the directory where your default dialog.tlk resides. in my case i use English language, so i change "en_US". There are several directories in lang for different languages.

ln -s lang/en_US lang/en_us


(3) On to the data directory. this creates links. the original file can have any-case in the filename, but all the links will have lowercase characters.

cd data
for file in *; do ln -s "$file" `echo "$file" | tr '[:upper:]' '[:lower:]'`; done

The for loop might spew out errors since IIRC one file has a filename already all lowercase, thus the ln command will fail.

To find all the links created:

find . -type l

You can extend that command to delete all the links if needed:

find . -type l -exec rm {} \;

(copy everything until the semicolon)


(4) Run weinstall


I assume this will also work with BG2:EE and IWD:EE. I own both, and will test soon.

I've tested this with cdtweaks and stratagems. Of course BG:EE still runs (started a new adventure and just got out of Candlekeep). weidu.log follows:
-----
xxx@xxxxx:~/GOG Games/Baldurs Gate Enhanced Edition/game$ cat weidu.log
// Log of Currently Installed WeiDU Mods
// The top of the file is the 'oldest' mod
// ~TP2_File~ #language_number #component_number // [Subcomponent Name -> ] Component Name [ : Version]
~CDTWEAKS/SETUP-CDTWEAKS.TP2~ #0 #100 // Commoners Use Drab Colors: v9
~CDTWEAKS/SETUP-CDTWEAKS.TP2~ #0 #2090 // Change Experience Point Cap -> Remove Experience Cap: v9
~CDTWEAKS/SETUP-CDTWEAKS.TP2~ #0 #2140 // Expanded Dual-Class Options: v9
~CDTWEAKS/SETUP-CDTWEAKS.TP2~ #0 #2151 // Wear Multiple Protection Items -> No Restrictions: v9
~CDTWEAKS/SETUP-CDTWEAKS.TP2~ #0 #2220 // Change Magically Created Weapons to Zero Weight: v9
~CDTWEAKS/SETUP-CDTWEAKS.TP2~ #0 #2350 // Alter Multiclass Restrictions -> Allow humans to multiclass: v9
~CDTWEAKS/SETUP-CDTWEAKS.TP2~ #0 #2440 // Everyone Gets Bonus APR from Specialization: v9
~CDTWEAKS/SETUP-CDTWEAKS.TP2~ #0 #2520 // Allow Mages to Use Bucklers and Thieves to Use Small Shields (Angel): v9
~CDTWEAKS/SETUP-CDTWEAKS.TP2~ #0 #2530 // Lightning Bolts Don't Bounce (Angel): v9
~CDTWEAKS/SETUP-CDTWEAKS.TP2~ #0 #2999 // Max HP at Level One: v9
~CDTWEAKS/SETUP-CDTWEAKS.TP2~ #0 #3000 // Higher HP on Level Up -> Maximum: v9
~CDTWEAKS/SETUP-CDTWEAKS.TP2~ #0 #3012 // Maximum HP for NPCs (the bigg) -> For Party-Joinable NPCs Only: v9
~CDTWEAKS/SETUP-CDTWEAKS.TP2~ #0 #3060 // Remove "You Must Gather Your Party..." Sound (Weimer): v9
~CDTWEAKS/SETUP-CDTWEAKS.TP2~ #0 #3080 // Increase Ammo Stack Size -> Unlimited Ammo Stacking: v9
~CDTWEAKS/SETUP-CDTWEAKS.TP2~ #0 #3100 // Increase Potion Stacking -> Unlimited Potion Stacking: v9
~CDTWEAKS/SETUP-CDTWEAKS.TP2~ #0 #3280 // Give Every Class/Kit Four Weapon Slots: v9
~CDTWEAKS/SETUP-CDTWEAKS.TP2~ #0 #3290 // Personalize automatic save names -> Use scheme: 000000000-Protagonist-Save-Name: v9
~CDTWEAKS/SETUP-CDTWEAKS.TP2~ #0 #3330 // Make party members less likely to die irreversibly: v9
~CDTWEAKS/SETUP-CDTWEAKS.TP2~ #0 #3340 // Increase party movement speed outside combat -> By 50 percent: v9
~STRATAGEMS/SETUP-STRATAGEMS.TP2~ #0 #3010 // Replace +1 arrows and other projectiles with nonmagical "fine" ones: v32.7
~STRATAGEMS/SETUP-STRATAGEMS.TP2~ #0 #5000 // Ease-of-use party AI: v32.7
-----

It works for me but still use at your own risk!
May want to try ZFS instead, I recently found it has case insensitive option.
avatar
GreyHairTheStrong: Well met!

2019 seems a good year to update this post.

BG:EE (v2.5)
Linux (LUbuntu 18.04)
HDD is ext4
shell is bash
WeiDU (version 24600: "Land of Confusion")

This method doesn't rename files, instead creates links to files.

==CUT==

It works for me but still use at your own risk!
I just did this with my own script to create the links, including making a symlink from game/lang/en_US to en_us. However, the WeiDU script now does not find it's own internal translations and I keep getting errors like:

ERROR: No translation provided for @24121

Couldn't open the readme: file not found.

Would you like to display the components from [UNDEFINED STRING: @24121]?

It seems like SCS has an internal link from the language "en_US" to its own language "english", and changing to "en_us" breaks that link.

[edit] The solution was to put the stratagems folder under the game folder; the paths to the translation files are semi-hardcoded and ignore the path given on the command line [/edit]

If anyone has beaten this problem I would appreciate some help.

Thanks

[I attach my script to create the lower-case links, its a bit more user-friendly than the one above, but needs to be saved as a script (not a one-liner). It needs to be run in the data, override and scripts folders:]

!/bin/bash

for i in *; do
d=${i%}
dl=${d,,}
[[ $d = $dl ]] && continue
if [[ -e $dl ]]; then
if [[ ! -L $dl ]]; then
echo " ERROR: $dl is not a link"
elif [[ $(readlink -- "$dl") != $d ]]; then
echo " ERROR $dl exists and doesn't point to $d"
fi
else
ln -sv -- "$d" "$dl"
fi
done
Post edited January 13, 2020 by mcbleyerveld