Skip to content

Mods not working

snowcatsnowcat Member Posts: 14
edited November 2017 in General Modding
G'Day,
I have a number of mods for Baldur's Gate II Enhanced Edition running on Wine in OpenSUSE 42.3.

They come in *.zip, *.rar and *.7z form and extract to a folder labeled MODNAME and an exe file in the form Setup-MODNAME.exe.

They all have the same generic install instructions:-

4.3 Installation:
I. Extract the 'AnimalCompanions_v1.5.7z' file into your main folder and make sure that both, the
'Setup-AnimalCompanions.exe' and the 'AnimalCompanions' folder, are indeed in your main folder.
II. Run (double click on) "Setup-AnimalCompanions.exe".
III. Choose whether you want druid characters to get animal companions too, or not.

And they all result in generating the same generic debug file in the form SETUP-MODNAME.DEBUG :-

WeiDU v 23900 Log

Setup-BGTNeJ.exe
[.\chitin.key] loaded, 875808 bytes
[.\chitin.key] 187 BIFFs, 62160 resources
[./goglog.ini] loaded, 97 bytes
[./unins000.ini] loaded, 41 bytes
[.\weidu.conf] loaded, 17 bytes
[.\lang\en_us\dialog.tlk] loaded, 11741380 bytes
[.\lang\en_us\dialog.tlk] 103974 string entries

Using .\lang\en_us\dialog.tlk

The SETUP-BGTNEJ.TP2 mod has 9 distinct optional components.
To save time, you can choose what to do with them at a high level rather
than being asked about each one.

What should be done with all components that are NOT YET installed?
[I]nstall them, [S]kip them, [A]sk about each one? ERROR: problem parsing TP file [SETUP-BGTNEJ.TP2]: End_of_file

FATAL ERROR: End_of_file

WeiDU Timings
load TLK 0.000
parsing .log files 0.000
stuff not covered elsewhere 0.020
loading files 0.020
Parsing TP2 files 0.020
unmarshal KEY 0.040
unmarshal TLK 0.080
TOTAL 0.180


When I install the mods that come in just a single .exe file I have no problems just the .zip and .rar mods.
I'd greatly appreciate any help.
TYVM :)
Post edited by snowcat on

Comments

  • ArunsunArunsun Member Posts: 1,592
    Mmh your best bet will probably be to use Big World Setup, particularly on installs with many mods.
    Concerning your extraction path, you need to have the .exe and the folder directly in your game folder (where there are the chitin.key and the baldur.exe files, among others). Are you sure that's correct in your case?
    If it is, do you have this issue with every mods that use a setup-modname.exe + a modname folder? Or just this one? Because this error comes from the TP2 file, which basically is the WeiDu instructions on how to process the data in the mod folder, so I would find it strange if it happened to every mod.
  • The user and all related content has been deleted.
  • snowcatsnowcat Member Posts: 14
    I've mega-checked the location and it is all correct.
    I think I've tried nearly all of them and each and every one behaves exactly the same.
  • The user and all related content has been deleted.
    Arunsun
  • snowcatsnowcat Member Posts: 14
    I tried that but, no go.
    I would prefer to run the linux version but, no matter how available I make libjson, the installation program doesn't find it.
  • snowcatsnowcat Member Posts: 14
    I've also tried with an install to the original default - BGII-SOA - in case there was a mix-up there, but no luck.
  • inethineth Member Posts: 707
    snowcat said:

    they all result in generating the same generic debug file in the form SETUP-MODNAME.DEBUG :-
    [...]
    When I install the mods that come in just a single .exe file I have no problems just the .zip and .rar mods.

    Weird. I've used Wine to install mods in the past, and didn't experience that issue. These days I use the native Linux version of WeiDU though.
    snowcat said:

    I would prefer to run the linux version but, no matter how available I make libjson, the installation program doesn't find it.

    The Linux version of BG2:EE, at least the one shipped by GOG.com, uses a 32bit executable.
    So you need to install the 32bit (i386 architecture) version of libjson for it. Different Linux distros have different mechanisms for installing 32bit versions of software libraries on 64bit system - e.g. on Ubuntu it would be:
    sudo apt install libjson0:i386
    I don't know how OpenSUSE does it.

    Once you get the game itself running, here's a decent guide for installing mods on the Enhanced Editions of these games on Linux: http://gibberlings3.net/forums/index.php?showtopic=28516
    snowcat said:

    Setup-BGTNeJ.exe

    That's "Never Ending Journey", right?
    I'm pretty sure that mod is not compatible with the Enhanced Edition of the game.
    Arunsun said:

    Mmh your best bet will probably be to use Big World Setup

    BWS is Windows-only.
  • ArunsunArunsun Member Posts: 1,592
    ineth said:



    Arunsun said:

    Mmh your best bet will probably be to use Big World Setup

    BWS is Windows-only.
    Yeah I reread myself and realised I sounded stupid :smiley:
  • snowcatsnowcat Member Posts: 14
    edited November 2017
    Some good news - I still can't get linux->wine->windows->mod working but I have got the linux version working.
    Problem is the mods all fail with:
    snowy@rocky:~/GOG Games/Baldurs Gate Enhanced Edition> weinstall widescreen
    weidu --log "setup-widescreen.debug" "widescreen/widescreen.tp2"
    [weidu] WeiDU version 24200

    Choose your language:
    0 [English]
    1 [Francais (Isaya & Lothringen)]
    2 [Spanish (ghildrean & Ancalagon el Negro)]
    3 [Russian by Prowler & Njkzy (arcanecoast.ru)]
    4 [Italiano]
    5 [Portoguese by Felipe]
    0
    Using Language [English]
    ERROR: could not match a directory in ./dialog.tlk
    ERROR: problem parsing TP file [widescreen/widescreen.tp2]: Not_found

    FATAL ERROR: Not_found

    Press ENTER to exit.

    I've copied all required files - chitin, dialog, tp2 etc - into the top directory, and the game directory with no luck.
  • The user and all related content has been deleted.
  • snowcatsnowcat Member Posts: 14
    No, you are quite right, the linux file structure is exactly the same - I was just throwing some old school "just try it, you can always rebuild" :s

    Having said that, I may have solve the win version - if it works I'll post the link and maybe someone will sticky it.
    Then I can play while I work on solving my linux version problem ;l)
  • inethineth Member Posts: 707
    edited November 2017

    snowcat said:

    I've copied all required files - chitin, dialog, tp2 etc - into the top directory, and the game directory with no luck.

    What? Is this something you are supposed to do in Linux?
    Nope :)

    @snowcat:
    • Leave chitin.key, dialog.tlk and other game files where they are.
    • Extract mods into the folder that contains chitin.key. For the GOG.com version, that is by default:
      ~/GOG Games/Baldurs Gate 2 Enhanced Edition/game/
    • Run weinstall MODNAME in that same folder.
    ...plus the added before/after steps for working around the problem of standard Linux filesystems being case sensitive. (See the guide linked above.)

    Oh, and the Widescreen Mod is not compatible with the Enhanced Edition (nor is it needed, because the EE automatically uses your desktop resolution).
  • snowcatsnowcat Member Posts: 14
    I did try this way, but I always get this error:

    snowy@rocky:~/GOG Games/Baldurs Gate Enhanced Edition/game> weinstall cdtweaks
    weidu --log "setup-cdtweaks.debug" "cdtweaks/setup-cdtweaks.tp2"
    [weidu] WeiDU version 24200

    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")
    snowy@rocky:~/GOG Games/Baldurs Gate Enhanced Edition/game>

    If I link the dialog.tlk to the game directory it will go select language but, of course then I have an extra item in the path and get the error.
  • inethineth Member Posts: 707
    edited November 2017
    snowcat said:

    I did try this way, but I always get this error:

    snowy@rocky:~/GOG Games/Baldurs Gate Enhanced Edition/game> weinstall cdtweaks
    weidu --log "setup-cdtweaks.debug" "cdtweaks/setup-cdtweaks.tp2"
    [weidu] WeiDU version 24200

    ERROR: Unable to find DIALOG.TLK [...]

    That's because the file is located at lang/en_US/dialog.tlk (note the uppercase country code), and WeiDU looks for files using their lowercase paths on Linux. If the path was called lang/en_us/dialog.tlk, then WeiDU would find it.

    But don't think that by adding a lowercase lang/en_us symlink you'll solve the problem. Because the problem doesn't just affect that folder, it affects all non-lowercase paths of game files and mod files that WeiDU need to access during mod installation. And you won't always get an error message - in some cases you might end up with conflicting files (same name, different case) in your override folder, and just generally a borked installation.

    This is what I was referring to, with:
    ineth said:

    ...plus the added before/after steps for working around the problem of standard Linux filesystems being case sensitive. (See the guide linked above.)

    There are two main approaches to working around this problem:
    • Option A: Use a case-insensitive filesystem.
      If your PC happens to have an NTFS partition, then simply install the game there, and things should work out fine. (NTFS is Microsoft Window's native filesystem, but Linux supports it just fine.)

      Otherwise, you can use a virtual partition. The guide I linked above, explains how to create a virtual NTFS disk that is stored as a single binary file in your Linux filesystem, and can be mounted on demand. (You'd then install the whole game inside of this virtual partition.)
    • Option B: Lowercase all game & mod files (and afterwards manually fix paths on the EE).
      This was the historically recommended solution, and works great when you have the win32 version of the game installed with Wine. Just recursively lowercase all paths in the game directory after extracting (but before installing) each mod, and WeiDU can find everything just fine. WeiDU even comes with a tolower executable to do this.

      Since Wine doesn't care about case, the lowercasing doesn't affect the win32 version of the game at all, and things work out fine.

      However, with the native Linux version of the game, this approach to solving the problem has gotten much more complicated - because now the game itself does care about the case of its data files, and unlike WeiDU it doesn't want them all in lowercase - it needs the language folders to use the official spelling of the corresponding locale ID (e.g. en_US), and it needs all its BIF files (in the data/ subfolder) to use the exact case with which the chitin.key index file refers to them.

      To make matters worse, some mods (such as Tweaks Anthology) update chitin.key and as a side-effect cause it to refer to all BIF files using their uppercase names, rather than their original mixed case names.

      With sufficient patience and know-how, one can still use this lowercasing method to make WeiDU work, and then after installing all mods manually fix all the game data paths to match what the game needs them to be. I've done it last year with my IWD:EE installation. But TBH, it's simply more work than using option A (using a case-insentitive filesystem) now.
  • snowcatsnowcat Member Posts: 14
    Sorry for taking so long to get back - took some trial and error to re-organize, re-partition etc. to set a true user NTFS partition.
    The results were the same.
    Could you repost the virtual drive solution please, I can't find it?
  • inethineth Member Posts: 707
    edited December 2017
    snowcat said:

    Could you repost the virtual drive solution please, I can't find it?

    Here's the guide: http://gibberlings3.net/forums/index.php?showtopic=28516

    But TBH I've been using a different method myself on my recent BG2:EE install, using ciopfs (the "case insensitive on purpose file system") instead of NTFS, which has the advantage of not requiring a partition file to be created - it uses an existing game directory tree as its storage. The downside is that all files in this existing directory need to be lowercase'd first (so in a way this is a combination of options A and B ), but this only has to be done once and no files need to be un-lowercase'd later.
    Here are the steps I took:

    [spoiler]
    1. Install the game in your normal Linux filesystem.
    2. Go to the game/ folder and lowercase all files and folders inside it:
      cd "/home/$USER/GOG Games/Baldurs Gate 2 Enhanced Edition/game"

      find -depth -mindepth 1 -exec sh -c 't="$(dirname "$0")/$(basename "$0" | tr "[:upper:]" "[:lower:]")"; [ "$t" = "$0" ] || mv -iv "$0" "$t"' {} \;
    3. Go to its parent folder, and create a new game_mounted/ folder beside the existing game/ folder, to be used as a mount point for the virtual case-insensitive filesystem:
      cd ..

      mkdir game_mounted
    4. While still in the parent folder, mount the virtual case-insensitive filesystem on this mount point:
      ciopfs -o sync_read game game_mounted
    5. Now enter the game_mounted/ folder, and start the game from inside it (to ensure everything worked):
      cd game_mounted

      ./baldursgateii
    6. From now on, treat game_mounted/ as your game folder. Extract mods into it, run weinstall in it, run the game from it.

      Don't touch the original game/ folder anymore. (But also don't delete it, because the actual files are still stored there - game_mounted/ is just a case-insensitive "view" on it.)
    The ciopfs virtual filesystem is automatically unmouted when you log off, so if you've restarted your computer since the last time you played the game you'll have to repeat step 4.
    [/spoiler]
    Post edited by ineth on
  • snowcatsnowcat Member Posts: 14
    I have ciopfs all set up but, when I run ./baldursgate, I get the error:

    ./baldursgate: error while loading shared libraries: libjson.so.0: cannot open shared object file: No such file or directory

    I have all json libraries installed, but cannot solve the problem.

    I am using Opensuse 42.3 64bit.
    Any ideas on a solution?
  • inethineth Member Posts: 707
    edited December 2017
    @snowcat

    Maybe openSUSE installs that library file under a different name? If you can find out where the 32bit "libjson" library file is installed, creating a symlink to it called libjson.so.0 (right next to it) might work.

    Otherwise, you can try using the version of that library file that my Linux distro installs, which works fine for me. I've uploaded it here: https://yadi.sk/d/gY4rNsUb3QFS7h
    (Together with three other library files that the also game needs, in case openSUSE doesn't have compatible ones for those either.)

    Either install the library file(s) in question into the correct system library directory (which is different for different Linux distros), or use the LD_LIBRARY_PATH environment variable to tell the game where they are.
    E.g. if you just place them into the game folder next to the baldursgateii executable, then start the game like this:
    LD_LIBRARY_PATH=. ./baldursgateii
  • snowcatsnowcat Member Posts: 14
    edited December 2017
    My sincere thanks ineth, I have it up and running thanks to your expertise and patience.
    I used ciopfs and your libjson.so.0.
    The only thing I had to change was to remove the two references to lattr in the makefile.
    The link was dead and the only version I could find was on Git, which wasn't binary form, only jit. Also totally unnecessary when used in this form.

    P.S. How do I mark this as solved?
  • snowcatsnowcat Member Posts: 14
    Is there a site dedicated to linux mods?
  • snowcatsnowcat Member Posts: 14
    /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: cannot find -lattr

    Does anyone know how to fix this problem?

    I have attr-2.4.47 installed.

    Initially, thanks to ineth I had no problems with ciopfs but, after a system rebuild I keep running into this problem.

    I suspect I've missed a devel file, but I can't remember which one - if any.

    I'm running opensuse 15

    Any help appreciated.
Sign In or Register to comment.