0 of 0

File information

Last updated

Original upload

Created by

Dyvalas

Uploaded by

Dyvalas

Virus scan

Safe to use

About this mod

Tool to automatically sort Mods menus according to submenus provided by "Community Patch - Menu Strings".
(It is a bash script, the native scripting language on Linux, but it can be used also under Windows)

Requirements
Permissions and credits
About
This utility script automates the process of sorting custom mod menus inside submenus provided by the Community Patch - Menu Strings mod. It is assumed that you are familiar with what that mod does and how it works. You don't even need this utility if you do not use that mod.

Manually editing the XML files can be confusing and prone to error, especially for mods that have many different submenus, so this script helps in placing mods in the correct place.

This is a Linux bash script, it should be possible to run it even on Windows through the Windows Subsystem for Linux (WSL). I do not use Windows, so I cannot directly give you direct instructions about how to enable this feature (a tutorial can be found here: https://adamtheautomator.com/windows-subsystem-for-linux/). This tool assumes that you have a very basic understanding of how to use a Command Prompt to run commands.


Setup
- Important: Backup the folder [main game folder]/bin/config/r4game/user_config_matrix/pc. If you read and follow these instructions to the letter all will work nicely, but I am not responsible for what you do in your computer. Better safe than sorry, you have been warned.
- make sure that you have not manually edited the xml files in this folder, if you have done so, please manually restore an original copy of the files that you edited: this script must be run on the original files.
- Put mod-menu-sorter.sh and mod-menu-sorter.ini in the main game root folder.
- Community Patch - Menu Strings mod should be installed, so make sure that it is
- If you have not done so, backup the folder [main game folder]/bin/config/r4game/user_config_matrix/pc.


Usage
Open a terminal (can also be called console, Command Prompt, Powershell), and by using WSL navigate to the main game root folder, then run the script by giving one of the following commands:

- bash mod-menu-sorter.sh sort: places every mod in a submenu according to the configuration located in mod-menu-sorter.ini
- bash mod-menu-sorter.sh restore: restores every mod in its original menu

That's it!


How it works
The mod-menu-sorter.ini file already contains a default configuration for some popular mods, located in the [mods] section.

Every line in this section has two values, in example:

modSortEverything.xml=user_interface

The first value is the filename of the mod's custom menu that will be placed in a submenu. Every mod that provides a custom menu will have a different filename.

The second value is the ID of the submenu where the mod's menu will be placed.

The available ID as provided by Community Patch - Menu Strings are the following

- alchemy_and_equipment
- camera
- characters
- combat
- gameplay
- quests_and_adventures
- user_interface
- visuals_and_graphics
- miscellaneous


Customization
You can edit mod-menu-sorter.ini to place mods in the submenus of your liking, based on your preferences and you current mod list.

If you want to make edits to the ini file, it is paramount that you run the restore command before running the sort again! Seriously, it is extremely important that you run it, or it is very likely that you will break your menu configuration.

So, if you need to edit the ini file, the correct sequence is the following:

1) Edit mod-menu-sorter.ini
2) Run bash mod-menu-sorter.sh restore to revert the xml files to their original state. This step is mandatory!
3) Run bash mod-menu-sorter.sh sort