Root Builder

for Mod Organizer 2

Introduction

Root Builder is a plugin for Mod Organizer 2, allowing users to manage files in the base game directory through Mod Organizer.

Some of the things you can do with Root Builder:

  • Install script extenders (SKSE, OBSE, FOSE, etc) through Mod Organizer.
  • Install ENB and different presets for it through Mod Organizer.
  • Manage different versions of the same game as mods within Mod Organizer.
  • Keep your game folder untouched and as clean as the day it was installed.
  • Keep all your mods in Mod Organizer, saving your setup if you need to reinstall or switch computer.
Installation

To install Root Builder, you will first need to download it, either from the Nexus or from the Github releases page for Root Builder. Make sure to download the latest version.

Nexus Github

Once you've downloaded the Root Builder zip file, you will need to extract the rootbuilder folder from it and place it in the Mod Organizer plugins folder. If Mod Organizer is installed to C:\Mod Organizer\ then the plugins folder is located at C:\Mod Organizer\plugins\

If you have done this correctly, inside C:\Mod Organizer\plugins\rootbuilder\ you should find two folders, shared and rootbuilder as well as a file called __init__.py

Root Builder is now installed and will start the next time you run Mod Organizer.

Alternatively, you can use my Mod Organizer Setup Tool to install a fresh copy of Mod Organizer with Root Builder already installed.

Usage

To install mods to the base game folder, they will need to be arranged in a way that Root Builder understands. To do this, Root Builder uses a special folder called root that can be added to a mod within Mod Organizer. Any files placed in a mod's root folder will be present in the base game folder when Mod Organizer runs an application.

As an example, this is how SKSE is packaged when you download it, it contains three files that need to go into the base game folder; skse64_1_6_342.dll, skse64_steam_loader.dll and skse_loader.exe. It also contains a Scripts folder that Mod Organizer can manage normally.

SKSE before being arranged to work with Root Builder.

To install SKSE in Mod Organizer for Root Builder, skse64_1_6_342.dll, skse64_steam_loader.dll and skse_loader.exe need to be moved into a root folder that sits alongside the Scripts folder. Finally, the Data folder can be set as the data directory.

Please note, you cannot put a folder named data inside the root folder. Anything that goes in the data folder needs to be alongside the root folder. If Root Builder detects that you have a data folder inside the root folder, the mod will be ignored entirely.

SKSE after being arranged to work with Root Builder.

For mods that only include files for the base game folder, Mod Organizer may warn you that the mod does not look valid and may also indicate that it doesn't contain valid files once installed. Both of these can be safely ignored.

Once installed in Mod Organizer, it should be checked to enable it just like any other mod. Then you can add skse_loader.exe to Mod Organizer's executables list. Since skse_loader.exe won't be located in the game folder, you should add it from the mod folder instead. Root Builder will detect this when you launch it and will redirect it to run from the game folder instead.

  • If Mod Organizer is portable and installed at C:\Mod Organizer\ you would add C:\Mod Organizer\mods\SKSE\Root\skse_loader.exe to the executables list.
  • If Mod Organizer is not portable, by default, you would add %LOCALAPPDATA%\ModOrganizer\INSTANCE_NAME\mods\SKSE\Root\skse_loader.exe to the executables list.
Tools

Root Builder comes with some new items in the tools menu; the main Root Builder tool and three quick-use tools for manually running a Build, Sync or Clear. Using default settings, all of these tools are entirely optional to use.

Root Builder in Mod Organizer's tools menu.
Build

Running a Build does the following using default settings:

  • Generates a list of all files in mod root folders.
  • (First Run) Generates hashes for all files in the base game folder (minus any exclusions or the Data folder) and saves them.
  • (First Run) Takes a backup of all files in the base game folder (minus any exclusions or the Data folder).
  • Copies files from mod root folders into the base game folder and records which files have been copied.
Sync

Running a Sync does the following using default settings:

  • Checks every file in the base game folder (minus any exclusions or the Data folder).
  • Compares the file with hashes from the list of files copied during the last build and the base game hashes.
  • Files that came from mod root folders that have changed are copied back to Mod Organizer.
  • Files that came from the base game that have changed are copied to Mod Organizer's overwrite folder.
  • Files that did not comes from mods or the base game are copied to Mod Organizer's overwrite folder.
Clear

Running a Clear does the following using default settings:

  • Runs a Sync.
  • Checks every file in the base game folder (minus any exclusions or the Data folder).
  • Compares the file with hashes from the list of files copied during the last build and the base game hashes.
  • Files that came from mods are deleted.
  • Files that came from the base game that have changed are deleted and restored from the backup.
  • Files that did not come from mods or the base game are deleted.

Please ensure you always run a Clear after you are finished with any previous manual Build. Root Builder can encounter issues if the base game recieves an update before Root Builder runs a Clear.

Menu

The Root Builder main menu contains options for enabling and disabling all settings, as well as buttons to run Build, Sync and Clear as well as deleting and recreating both the backup and hash cache.

Root Builder menu.
Settings
Setting Default
enabled true
Determines whether Root Builder is enabled.
usvfsmode false

Enables USVFS mode. Using this mode, files will not be copied to the game folder, instead, Root Builder will use Mod Organizer's virtual file system as it does with regular mods. This does not work correctly with files that must be present on launch, such as exe and dll files. Manual Build, Sync and Clear no longer function as this mode only works with autobuild. Does not support redirect.

Requires:

  • autobuild = true
linkmode false

Enables Link mode. Using this mode, files will not be copied to the game folder, instead, Root Builder will create links for any files with the extensions in the linkextensions setting. This improves the compatibility of USVFS mode, allowing it to support most exe and dll files. Manual Build, Sync and Clear do function with this mode, however, they only generate and clear linked files and autobuild is still required.

Requires:

  • autobuild = true
  • usvfsmode = true
backup true

When enabled, Root Builder will take a backup of all base game files and folders (excluding the Data directory) during the next Build. This backup will be used when restoring any game files that may have changed during a Clear.

When disabled, Root Builder will only take a backup for files that will be overwritten by mods during a Build. This backup will be deleted during the next Clear.

cache true

When enabled, Root Builder will store the hashes of all base game files (excluding the Data directory) during the next Build. These hashes will be used when checking for files that may have changed during a Sync or Clear.

When disabled, Root Builder will store the hashes of all base game files (excluding the Data directory) during every Build. These hashes will be used when checking for files that may have changed during a Sync or Clear. Hashes will be deleted during a Clear.

autobuild true

When enabled, Root Builder will perform a Build immediately when you launch an application through Root Builder. A Clear will then be run as soon as that application closes.

redirect true

When enabled, Root Builder will check if an application being run is inside a mod's root folder, if it is, it will be redirected to run from the game folder instead.

exclusions Morrowind.ini, Saves

Any files or folders listed here will be ignored by Root Builder in the base game folder. Any mods containing any of these in root folders will be ignored by Root Builder.

linkextensions exe, dll

Any files in a mod's root folder with these extensions will have links created for them during a build.

Requires:

  • usvfsmode = true
  • linkmode = true
installer false

When enabled, Root Builder will attempt to detect when root mods are being installed through Mod Organizer and repackage them for you. Highly experimental.

priority 150

The priority to run the Root Builder installer (if enabled).

Requires:

  • installer = true
Uninstallation

To remove Root Builder from Mod Organizer, two folders need to be deleted from Mod Organizer's plugins folder, rootbuilder and data\rootbuilder. Once deleted, Root Builder will no longer be installed the next time Mod Organizer starts.

If Mod Organizer is installed to C:\Mod Organizer\ then these folders are located at C:\Mod Organizer\plugins\rootbuilder\ and C:\Mod Organizer\plugins\data\rootbuilder\