dark0dave / mod_installer

Infinity Engine Mod Installer, auto install mods from your backed up weidu log file
https://dark0dave.github.io/mod_installer/rust_docs
GNU General Public License v3.0
11 stars 0 forks source link
baldurs-gate baldurs-gate-ii baldursgate bg2ee bgee bgeemodding eet infinity-engine modding-tools qol rust weidu

Infinity Engine Mod Installer

  /\/\   ___   __| | (_)_ __  ___| |_ __ _| | | ___ _ __
 /    \ / _ \ / _` | | | '_ \/ __| __/ _` | | |/ _ \ '__|
/ /\/\ \ (_) | (_| | | | | | \__ \ || (_| | | |  __/ |
\/    \/\___/ \__,_| |_|_| |_|___/\__\__,_|_|_|\___|_|

The Infinity Engine Mod Installer is a tool designed to automate the installation of mods for Infinity Engine games such as Baldur's Gate, Icewind Dale, and Planescape: Torment. It uses a file called "weidu.log" to determine which mods to install and how to install them.

Installation

mod_installer can be installed via crates.io:

cargo install mod_installer

or you can grab it from the latest releases page on github, here.

Usage

To use the Infinity Engine Mod Installer, you need to run it from the command line. Here's the basic structure of the command:

mod_installer(.exe) [OPTIONS]
  --log-file <LOG_FILE>
  --game-directory <GAME_DIRECTORY>
  --weidu-binary <WEIDU_BINARY>
  --mod-directories <MOD_DIRECTORIES>

Let's break down what each part means:

FAQ

The Infinity Engine Mod Installer looks at a "weidu.log" file that you provide. This file contains information about mods you want to install. The tool then goes through this list and installs each mod automatically. This saves you time and effort, as you don't have to manually install each mod one by one.

Weidu Log

The Weidu log file contains a list of installed mods and is typically found in your game directory if you have previously installed mods. Here's an example of what a Weidu log might look like:

// 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]
~TEST_MOD_NAME_1/TEST.TP2~ #0 #0 // test mod one

If you're new to modding Infinity Engine games, we recommend installing mods manually first to familiarize yourself with the process. This will help you understand how mods work and how they interact with your game.

Getting Started with Weidu Logs

If you're looking for an example weidu.log to get started:

Check online forums and modding communities. Experienced players and modders often share their mod lists and corresponding Weidu logs. Look for "mod packs" or "recommended mod lists" for your specific game. These often come with pre-configured Weidu logs. Start with a small number of popular mods and gradually build up your log as you become more comfortable with the modding process. Some mod managers for Infinity Engine games can generate Weidu logs based on your selected mods.

Remember, the Weidu log is a powerful tool, but it's important to understand what you're installing. Always back up your game files before installing mods, and be aware that some mods may conflict with others.

Demo

We have a short video that shows how the tool works:

What options can I use?

Don't panic you can use the help command to find all the options listed below:

Here's a detailed explanation of all the options you can use:

Configuring the Parser

See the example_config.toml for defaults parser uses. Here we provide a brief breakdown of what each configuration does:

Name Category Description Example
in_progress_words A list of words Checks if weidu is currently running ["installing", "creating",]
useful_status_words A list of words Provides feedback on the weidu process ["copied", "copying",]
choice_words A list of words Words which check if weidu wants user input ["choice", "choose",]
choice_phrase A list of phrases Phrases which check if weidu wants user input ["do you want", "would you like",]
completed_with_warnings A single phrase Standard phrase wiedu uses if it finishes with warning "installed with warnings"
failed_with_error A single phrase Standard phrase wiedu uses if it finishes with an error "not installed due to errors"
finished A single phrase Standard phrase wiedu uses if it finishes successfully "successfully installed"
eet_finished A single phrase A special exemption for EET for EET Core install "process ended"

Note: All words/phrases are compared in lowercase ascii.

If you wish to changes the above; or you are using a different game language (apologies for not translating all of this); have found a exemption; or just want to change the way the parser works you'll need to create your own mod_installer.toml.

We use the rust crate confy to load configuration. Confy uses the rust crate directories to find the the expected path for your operating system. The directories crate uses:

In order to save you some time reading all the above we will put the expected locations below:

Logging

You can show more install information by setting the RUST_LOG environment variable. Here are some of the levels you can use:

For some additional information:

RUST_LOG=INFO mod_installer [OPTIONS]

For detailed information about each step:

RUST_LOG=DEBUG mod_installer [OPTIONS]

For absolutely everything, including WeiDU logs:

RUST_LOG=TRACE mod_installer [OPTIONS]

For more information on logging visit the rust crate log.