diff --git a/ModManager.py b/ModManager.py index 6b4cedc..7c57fe3 100644 --- a/ModManager.py +++ b/ModManager.py @@ -71,6 +71,9 @@ class ModManager: if not os.path.isdir(manager_folder): self.__logger.debug(f"Creating folder: {manager_folder}") os.mkdir(manager_folder) + else: + self.__window.on_action_set_game_folder() + self.create_manager_folder() def is_folder_valid_game_folder(self, dir_path: str) -> bool: req_files = ["Lethal Company.exe", "doorstop_config.ini"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..50d4fbe --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ +# LC Mod Manager + +A very simplistic mod manager for games using BepInEx (like Lethal Company). + +![example screenshot of the mod manager with some mods available and a subset of them installed](example_image.png) + +This is basically a glorified zip-file manager and extractor. +The Manager stores mods you give it inside its own folder within the game directory (so that everything is close together). + +## Requirements +It expects these mods to contain a `manifest.json` and `icon.png` like many do that originate from common mod sharing websites. +It requires the `manifest.json` to read the mod name, and its version for display. + +The manager also expects [BepInEx](https://thunderstore.io/package/bbepis/BepInExPack/) to be already installed correctly. + +The mod manager needs to be told where the game is though (Settings > Set game path). Just point it to the game folder as given by steam. + +## Usage +You just add new mods (Mods > Add new mod) by selecting the downloaded zip-archive of them and they get automatically copied to the mod storage folder of the manager. +Now you can just tick them among the available mods and the mod manager extracts all files for you. +Uninstalling is just as easy! Just untick the mod again and it'll hunt down every file it knows through the zip-archive. + +It somewhat handles mods you haven't given to the mod manger yet by showing them as installed and "Untracked" with the option to delete them. +Note: the manager only deletes the dll-file it found of the mod. It doesn't know what other files might be part of that mod. diff --git a/example_image.png b/example_image.png new file mode 100644 index 0000000..119307c Binary files /dev/null and b/example_image.png differ diff --git a/window/main_window.py b/window/main_window.py index 98f5341..408c552 100644 --- a/window/main_window.py +++ b/window/main_window.py @@ -163,7 +163,10 @@ class MainWindow(QtWidgets.QMainWindow): def on_available_mod_item_changed(self, item: QStandardItem): self.__logger.debug(f"Available Mod list item \"{item.text()}\" changed to {item.checkState()}") mod_name = item.data(Qt.ItemDataRole.UserRole) - self.parent.install_mod(mod_name) + if item.checkState() == Qt.CheckState.Checked: + self.parent.install_mod(mod_name) + elif item.checkState() == Qt.CheckState.Unchecked: + self.parent.uninstall_mod(mod_name) def on_installed_mod_item_changed(self, item: QStandardItem): self.__logger.debug(f"Installed Mod list item \"{item.text()}\" changed to {item.checkState()}") diff --git a/window/mod_manager_window_export.py b/window/mod_manager_window_export.py index 02d1857..0bd6dd4 100644 --- a/window/mod_manager_window_export.py +++ b/window/mod_manager_window_export.py @@ -121,7 +121,7 @@ class Ui_MainWindow(object): self.DeleteModFilesButton.setText(_translate("MainWindow", "Delete Mod files")) self.TODOButton.setText(_translate("MainWindow", "TODO")) self.menuSettings.setTitle(_translate("MainWindow", "Settings")) - self.menuAdd.setTitle(_translate("MainWindow", "Add")) + self.menuAdd.setTitle(_translate("MainWindow", "Mods")) self.actionSet_game_folder.setText(_translate("MainWindow", "Set game folder")) self.actionrefresh_detected_mods.setText(_translate("MainWindow", "Refresh Mods")) self.actionAdd_new_Mod.setText(_translate("MainWindow", "Add new Mod")) diff --git a/window/pyqt_files/mod_manager_window.ui b/window/pyqt_files/mod_manager_window.ui index 55dfd4a..9203fe5 100644 --- a/window/pyqt_files/mod_manager_window.ui +++ b/window/pyqt_files/mod_manager_window.ui @@ -147,7 +147,7 @@ - Add + Mods