Jump to content

Recommended Posts

I have put together a very very rough mod installer, which installs mods (given a mod directory with .tp2 files) based on a previous saved weidu.log. This is very much a work in progress, but I would appreciate any input or thoughts. The intent with this mod is to optimize the install experience if you have a long log file then it can take a considerable amount of time to install mods. This tool should help that.

Here is an example:

mod_installer --log-file /home/x/projects/bg_mods/current_bg1_weidu.log --game-directory /home/casefold/bg1--weidu-binary /home/x/projects/bg_mods/tools/weidu/weidu --mod-directories /home/x/projects/bg_mods/mods (you can browse my layout here)

Here above I am using my bg1 weidu log, I have given my game directory as /home/casefold/bg1, my weidu-binary from my tools folder and some mod directories to search.

The tool traverses folder structure (4 levels deep) until it finds a .tp2 file, which it attempts to match to an entry in the weidu.log file. From there it executes weidu with the following:

weidu {mod_name}/{mod_tp_file} --quick-log --yes --ask-only {component} --use-lang {game_lang} --language {mod_lang}

This is executed from rust as a separate process, if errors are detected the process exits, if prompts are detected user input is asked for, otherwise the mod is auto installed. Re or Already installed mods are skipped.

https://user-images.githubusercontent.com/52840419/273416999-98127744-850e-43a1-a9be-adc078b2a829.webm

Source is found here:

https://github.com/dark0dave/mod_installer

mirrors:

https://gitlab.com/dark0dave/mod_installer
https://git.sr.ht:~dark0dave/mod_installer

Shout out to @morpheus562 for being helpful as always.

Edited by dark0dave
Link to comment

@dark0dave

I've tried this, because none of the other tools I'm aware of, has the option to take an existing weidu.log into consideration and skip already installed mods/components.
So, I've tried the option '--skip-installed', because I want to add some mods/components to the end of an existing install.
Unfortunately with this option set, I always get a fault from the first existing mod component, in my case:
...

thread 'main' panicked at src\mod_component.rs:30:32:
Could not find tp2 file, from: ~TOBEX/TOBEX.TP2~ #0 #100 // TobEx - Core: v28
...

I'm on Windows 10.
My batch file to launch mod_installer:

Spoiler

@ECHO OFF
SET GAME_PATH=D:\GOG Games\Baldur's Gate BGT Test
SET RUST_BACKTRACE=1
REM SET RUST_BACKTRACE=full
REM SET RUST_LOG=DEBUG
SET RUST_LOG=TRACE
REM SET SKIP_INSTALLED=false
SET SKIP_INSTALLED=true
SET DEPTH=3
SET LOG_FILE=%GAME_PATH%\weidu_7.log
SET GAME_DIRECTORY=%GAME_PATH%
SET WEIDU_BINARY=%GAME_PATH%\weidu.exe
SET MOD_DIRECTORIES=D:\03_Games\IE\Tools\PI\Downloads
mod_installer
PAUSE

This is my current weidu.log (the install was created using mod_installer):

Spoiler
// 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]
~TOBEX/TOBEX.TP2~ #0 #100 // TobEx - Core: v28
~TOBEX/TOBEX.TP2~ #0 #101 // Apply Concentration Check On Damage [WIP]: v28
~TOBEX/TOBEX.TP2~ #0 #102 // Awaken On Damage: v28
~TOBEX/TOBEX.TP2~ #0 #103 // Blindness As Spell Description: v28
~TOBEX/TOBEX.TP2~ #0 #105 // No Spell Interruption On Zero Damage: v28
~TOBEX/TOBEX.TP2~ #0 #106 // Use Caster Level On Mirror Image [C]: v28
~TOBEX/TOBEX.TP2~ #0 #107 // Allow All Races to Dual Class: v28
~TOBEX/TOBEX.TP2~ #0 #108 // Allow Equipping Armor in Combat: v28
~TOBEX/TOBEX.TP2~ #0 #109 // Disable Experience Boost: v28
~TOBEX/TOBEX.TP2~ #0 #110 // Disable Force Inventory Pause: v28
~TOBEX/TOBEX.TP2~ #0 #111 // Disable Silence On Charm: v28
~TOBEX/TOBEX.TP2~ #0 #112 // Level One Proficiency Restrictions: v28
~TOBEX/TOBEX.TP2~ #0 #113 // Remain Hidden On Pickpocket Success [C]: v28
~TOBEX/TOBEX.TP2~ #0 #114 // Rest Spawns Advance Time: v28
~TOBEX/TOBEX.TP2~ #0 #115 // Dialogue Greeting Subtitles: v28
~TOBEX/TOBEX.TP2~ #0 #116 // Enable Animation Attack Sounds: v28
~TOBEX/TOBEX.TP2~ #0 #117 // Universal Four Inventory Weapon Slots: v28
~TOBEX/TOBEX.TP2~ #0 #118 // Subtitles For Standard Soundsets: v28
~TOBEX/TOBEX.TP2~ #0 #119 // Remove all race-class restrictions: v28
~TOBEX/TOBEX.TP2~ #0 #120 // Drop Inventory on Disintegrate: v28
~TOBEX/TOBEX.TP2~ #0 #121 // Drop Inventory on Frozen Death: v28
~TOBEX/TOBEX.TP2~ #0 #122 // Drop Inventory on Stone Death: v28
~TOBEX/TOBEX.TP2~ #0 #123 // Enable Auto-Pause On All Screens: v28
~TOBEX/TOBEX.TP2~ #0 #124 // Make All Attack Animations Genuine Attacks: v28
~TOBEX_AFTERLIFE/TOBEX_AFTERLIFE.TP2~ #0 #200 // TobEx AfterLife: v29.13
~TP/SETUP-TP.TP2~ #0 #0 // MKs BG2 Textpatch Revised: v3.4
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #3 #0 // BG2 Fixpack - Fehlerbehebungen: v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #3 #3 // BG2 Fixpack - BETA-Fehlerbehebungen (schaut bitte in die Readme!): v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #3 #100 // Gruppe bekommt Erfahrung, wenn sie Keldorn zu Maria schickt: v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #3 #101 // Verbesserte Zauberanimationen: v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #3 #103 // Dolche mit Nah- und Fernkampf korrigieren: v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #3 #104 // Ghreyfains Korrekturen der Heiligen Symbole: v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #3 #106 // Riesen erhalten Abzuege beim Angriff auf Halblinge, Zwerge und Gnome: v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #3 #107 // Mehrklassen-Beschraenkung fuer Bogenschuetzen und Pirscher entfernen: v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #3 #108 // Zweiten Attributsbonus fuer den boesen Weg bei den Hoellenpruefungen entfernen: v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #3 #109 // Korrigiertes Verhalten beschworener Daemonen: v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #3 #110 // Zusaetzliche Skripte korrigieren: v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #3 #111 // Berichtigte Bardenlieder: v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #3 #112 // Magierkiller verursachen "Magie fehlwirken" im Fernkampf: v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #3 #113 // Zusaetzliche Gesinnungen korrigieren: v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #3 #114 // Handlungsfreiheit schuetzt gegen Betaeubung: v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #3 #115 // Klauen der Gestaltwandler koennen nicht gebannt werden: v13
// Recently Uninstalled: ~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #3 #116 // Zusatzpunkte auf Diebesfaehigkeiten von Barden und Waldlaeufern entfernen: v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #3 #116 // Zusatzpunkte auf Diebesfaehigkeiten von Barden und Waldlaeufern entfernen: v13

 

Mod_installer seems to can not install BGT, probably because at some point this mod expects the input of the path to the BG1 install.
So, I want to install it manually and than continue with the rest from this log file:

Spoiler

// 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]
~TOBEX\TOBEX.TP2~ #0 #100 // TobEx - Core: v28
~TOBEX\TOBEX.TP2~ #0 #101 // Apply Concentration Check On Damage [WIP]: v28
~TOBEX\TOBEX.TP2~ #0 #102 // Awaken On Damage: v28
~TOBEX\TOBEX.TP2~ #0 #103 // Blindness As Spell Description: v28
//~TOBEX\TOBEX.TP2~ #0 #104 // Disable Stoneskin Grey Colour [C]: v28
~TOBEX\TOBEX.TP2~ #0 #105 // No Spell Interruption On Zero Damage: v28
~TOBEX\TOBEX.TP2~ #0 #106 // Use Caster Level On Mirror Image [C]: v28
//? Nutzung prüfen
~TOBEX\TOBEX.TP2~ #0 #107 // Allow All Races to Dual Class: v28
~TOBEX\TOBEX.TP2~ #0 #108 // Allow Equipping Armor in Combat: v28
~TOBEX\TOBEX.TP2~ #0 #109 // Disable Experience Boost: v28
//? Nutzung prüfen
~TOBEX\TOBEX.TP2~ #0 #110 // Disable Force Inventory Pause: v28
~TOBEX\TOBEX.TP2~ #0 #111 // Disable Silence On Charm: v28
~TOBEX\TOBEX.TP2~ #0 #112 // Level One Proficiency Restrictions: v28
~TOBEX\TOBEX.TP2~ #0 #113 // Remain Hidden On Pickpocket Success [C]: v28
~TOBEX\TOBEX.TP2~ #0 #114 // Rest Spawns Advance Time: v28
~TOBEX\TOBEX.TP2~ #0 #115 // Dialogue Greeting Subtitles: v28
~TOBEX\TOBEX.TP2~ #0 #116 // Enable Animation Attack Sounds: v28
~TOBEX\TOBEX.TP2~ #0 #117 // Universal Four Inventory Weapon Slots: v28
~TOBEX\TOBEX.TP2~ #0 #118 // Subtitles For Standard Soundsets: v28
//? Nutzung prüfen
~TOBEX\TOBEX.TP2~ #0 #119 // Remove all race-class restrictions: v28
~TOBEX\TOBEX.TP2~ #0 #120 // Drop Inventory on Disintegrate: v28
~TOBEX\TOBEX.TP2~ #0 #121 // Drop Inventory on Frozen Death: v28
~TOBEX\TOBEX.TP2~ #0 #122 // Drop Inventory on Stone Death: v28
~TOBEX\TOBEX.TP2~ #0 #123 // Enable Auto-Pause On All Screens: v28
~TOBEX\TOBEX.TP2~ #0 #124 // Make All Attack Animations Genuine Attacks: v28
// active Developement
~TOBEX_AFTERLIFE\TOBEX_AFTERLIFE.TP2~ #0 #200 // TobEx AfterLife: v29.13
~TP\SETUP-TP.TP2~ #0 #0 // MKs BG2 Textpatch Revised: v3.4
~BG2FIXPACK\SETUP-BG2FIXPACK.TP2~ #3 #0 // BG2 Fixpack - Fehlerbehebungen: v13
~BG2FIXPACK\SETUP-BG2FIXPACK.TP2~ #3 #3 // BG2 Fixpack - BETA-Fehlerbehebungen (schaut bitte in die Readme!): v13
~BG2FIXPACK\SETUP-BG2FIXPACK.TP2~ #3 #100 // Gruppe bekommt Erfahrung, wenn sie Keldorn zu Maria schickt: v13
~BG2FIXPACK\SETUP-BG2FIXPACK.TP2~ #3 #101 // Verbesserte Zauberanimationen: v13
~BG2FIXPACK\SETUP-BG2FIXPACK.TP2~ #3 #103 // Dolche mit Nah- und Fernkampf korrigieren: v13
~BG2FIXPACK\SETUP-BG2FIXPACK.TP2~ #3 #104 // Ghreyfains Korrekturen der Heiligen Symbole: v13
~BG2FIXPACK\SETUP-BG2FIXPACK.TP2~ #3 #106 // Riesen erhalten Abzuege beim Angriff auf Halblinge, Zwerge und Gnome: v13
~BG2FIXPACK\SETUP-BG2FIXPACK.TP2~ #3 #107 // Mehrklassen-Beschraenkung fuer Bogenschuetzen und Pirscher entfernen: v13
~BG2FIXPACK\SETUP-BG2FIXPACK.TP2~ #3 #108 // Zweiten Attributsbonus fuer den boesen Weg bei den Hoellenpruefungen entfernen: v13
~BG2FIXPACK\SETUP-BG2FIXPACK.TP2~ #3 #109 // Korrigiertes Verhalten beschworener Daemonen: v13
~BG2FIXPACK\SETUP-BG2FIXPACK.TP2~ #3 #110 // Zusaetzliche Skripte korrigieren: v13
~BG2FIXPACK\SETUP-BG2FIXPACK.TP2~ #3 #111 // Berichtigte Bardenlieder: v13
~BG2FIXPACK\SETUP-BG2FIXPACK.TP2~ #3 #112 // Magierkiller verursachen "Magie fehlwirken" im Fernkampf: v13
~BG2FIXPACK\SETUP-BG2FIXPACK.TP2~ #3 #113 // Zusaetzliche Gesinnungen korrigieren: v13
~BG2FIXPACK\SETUP-BG2FIXPACK.TP2~ #3 #114 // Handlungsfreiheit schuetzt gegen Betaeubung: v13
~BG2FIXPACK\SETUP-BG2FIXPACK.TP2~ #3 #115 // Klauen der Gestaltwandler koennen nicht gebannt werden: v13
~BG2FIXPACK\SETUP-BG2FIXPACK.TP2~ #3 #116 // Zusatzpunkte auf Diebesfaehigkeiten von Barden und Waldlaeufern entfernen: v13
~BGT\BGT.TP2~ #4 #0 // Baldur's Gate Trilogie - Hauptteil: v1.23.1
~BGT\BGT.TP2~ #4 #3 // Baldur's Gate Trilogie - Musik -> Gesamte Baldurs Gate/Schatten von Amn/Thron des Bhaal Musik (WARNUNG: BGMain.exe wird gepatched): v1.23.1
~TP\SETUP-TP.TP2~ #0 #1 // Namenanpassungen (wenn Ihr BGT installieren wollt, installiert diese Komponente danach): v3.4

Any help on whether and how this can be achieved would be greatly appreciated.

Link to comment
Posted (edited)

Hi @MikeX,

Sorry it took me so long to respond. This error:

thread 'main' panicked at src\mod_component.rs:30:32:
Could not find tp2 file, from: ~TOBEX/TOBEX.TP2~ #0 #100 // TobEx - Core: v28

Is caused by:

~TOBEX\TOBEX.TP2~ #0 #100 // TobEx - Core: v28 <- this is formatted for linux

~TOBEX/TOBEX.TP2~ #0 #100 // TobEx - Core: v28 <- this is formatted for windows

Notice the / to \ difference.

I have fixed this.


For installing ~BGT\BGT.TP2, I'll add a handler for that case, it looks like its structured differently to the mods.

Thank you for the issue on github as well.

I have been busy (its a bad excuse I know). But I'll try to fix this.

Edited by dark0dave
Link to comment
Posted (edited)

@MikeXI have a new release which fixes your issue. Should be fine to proceed whatever formatting you chose for mods. Ie, windows can now parse linux format and linux can now parse windows.

I also now have a fix for BGT and EET

 

This release should fix both of your issues:

https://github.com/dark0dave/mod_installer/releases/tag/v5.1.0

Edited by dark0dave
Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...