WeiDUorg / weidu

WeiDU is a program used to develop, distribute and install modifications for games based on the Infinity Engine.
http://www.weidu.org
GNU General Public License v2.0
90 stars 20 forks source link

Can't find dialog.tlk in GOG.com edition #195

Open arp242 opened 3 years ago

arp242 commented 3 years ago

I get this error on both BG1 and 2:

$ cd ~/GOG\ Games/Baldurs\ Gate\ II\ Enhanced\ Edition/game

$ ~/WeiDU-Linux/weidu --list-biffs
[/home/martin/WeiDU-Linux/weidu] WeiDU version 24700
[./chitin.key] 82 BIFFs, 37341 resources

ERROR: Unable to find DIALOG.TLK in:
        ./^dialog/.tlk$

Please run this program in your Infinity Engine game directory.

FATAL ERROR: Failure("Unable to find DIALOG.TLK")

These files do exist, but in a different location:

$ find . -name '*.tlk'
./lang/de_DE/dialogf.tlk
./lang/de_DE/dialog.tlk
./lang/fr_FR/dialogf.tlk
./lang/fr_FR/dialog.tlk
./lang/en_US/dialog.tlk
./lang/ru_RU/dialogf.tlk
./lang/ru_RU/dialog.tlk
./lang/pl_PL/dialogf.tlk
./lang/pl_PL/dialog.tlk
./lang/ko_KR/dialog.tlk
./lang/it_IT/dialogf.tlk
./lang/it_IT/dialog.tlk
./lang/es_ES/dialogf.tlk
./lang/es_ES/dialog.tlk
./lang/zh_CN/dialog.tlk

I tried using --tlkin, but that doesn't seem to work(?)

$ ~/WeiDU-Linux/weidu --tlkin lang/en_US/dialog.tlk --list-biffs
[/home/martin/WeiDU-Linux/weidu] WeiDU version 24700
[./chitin.key] 191 BIFFs, 62570 resources

ERROR: Unable to find DIALOG.TLK in:
        lang/en_US/dialog.tlk

Please run this program in your Infinity Engine game directory.

FATAL ERROR: Failure("Unable to find DIALOG.TLK")

So let's link it:

$ ln -s lang/en_US/dialog.tlk .

And now it works:

$ ~/WeiDU-Linux/weidu --list-biffs
[/home/martin/WeiDU-Linux/weidu] WeiDU version 24700
[./chitin.key] 191 BIFFs, 62570 resources
[DATA/DEFAULT.BIF]        2850260 bytes,   1 locations
[DATA/ITEMS.BIF]           801984 bytes,   1 locations
[DATA/OBJANIM.BIF]       28634788 bytes,   1 locations
[..]
arp242 commented 3 years ago

I just discovered there's --use-lang for this (would be useful to mention that in the error maybe), but that doesn't work by default either:

ERROR: None of the dialog paths were a match against en_us

I need to do a ln -s en_US en_us first and then it works.

FredrikLindgren commented 3 years ago

Yeah, I should probably add something about --use-lang to the error message. The matching is case-sensitive.

dark0dave commented 2 years ago

Maybe this should be not case senstive at all, or at the very least attempt to navigate the lang folder? I don't know. I too had to make a link. This is not great behavior.

dark0dave commented 2 years ago

If I first link:

cd lang && ln -s en_US en_us

with config:

$ cat weidu.conf
lang_dir = en_US

This works!

However, once that link is removed weidu once again:

 WeiDU version 24700
[./chitin.key] 191 BIFFs, 62570 resources

ERROR: Unable to find DIALOG.TLK in:
    ./^dialog/.tlk$

Please run this program in your Infinity Engine game directory.

FATAL ERROR: Failure("Unable to find DIALOG.TLK")
SomeTroglodyte commented 1 year ago

Just ran into the same on a fresh gog bg2ee install, but I had the bad idea to run tolower (which is still included in releases!) - which circumvented this issue but of course broke the game to the point of requiring a reinstall, and mods still wouldn't install as they couldn't find their own 'English' files.

It seems the virtual case-insensitive file system kludge is still the only feasible recourse, even though it is 2022.