Skip to content

Commit

Permalink
Adding json maanagement
Browse files Browse the repository at this point in the history
  • Loading branch information
HobbitDur committed Aug 22, 2024
1 parent e6f233f commit 25c22bd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
16 changes: 16 additions & 0 deletions ModSetup/setup.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"modder_name": "Hobbitdur",
"mod_info": "HobbitInstaller",
"mod_type": "Setup",
"default_selected": "false",
"ffnx_param": {},
"lang": [
"en",
Expand All @@ -29,6 +30,7 @@
"modder_name": "Hobbitdur",
"mod_info": "To reset gameplay mod",
"mod_type": "Gameplay",
"default_selected": "false",
"ffnx_param": {},
"lang": [
"fr"
Expand All @@ -46,6 +48,7 @@
"modder_name": "Hobbitdur",
"mod_info": "To reset gameplay mod",
"mod_type": "Gameplay",
"default_selected": "false",
"ffnx_param": {},
"lang": [
"en"
Expand All @@ -63,6 +66,7 @@
"modder_name": "Hobbitdur",
"mod_info": "To reset gameplay mod",
"mod_type": "Gameplay",
"default_selected": "false",
"ffnx_param": {},
"lang": [
"de"
Expand All @@ -80,6 +84,7 @@
"modder_name": "TrueOdin, myst6re, Cosmos, vertex2995",
"mod_info": "Low level tools to interface with the game",
"mod_type": "Wrapper",
"default_selected": "true",
"ffnx_param": {},
"lang": [
"en",
Expand All @@ -99,6 +104,7 @@
"modder_name": "TrueOdin",
"mod_info": "To avoid having many click on launcher, just directly launch the game",
"mod_type": "EaseOfLife",
"default_selected": "true",
"ffnx_param": {},
"lang": [
"en",
Expand All @@ -118,6 +124,7 @@
"modder_name": "myst6re",
"mod_info": "Better music",
"mod_type": "Music",
"default_selected": "false",
"ffnx_param": {
"use_external_music": "true",
"external_music_path": "\"psf\"",
Expand All @@ -142,6 +149,7 @@
"modder_name": "None",
"mod_info": "None",
"mod_type": "Music",
"default_selected": "false",
"ffnx_param": {
"use_external_music": "true",
"external_music_path": "\"music\"",
Expand All @@ -166,6 +174,7 @@
"modder_name": "MikeDoesAudio",
"mod_info": "Original SoundTrack ReFined by a professional mixer",
"mod_type": "Music",
"default_selected": "true",
"ffnx_param": {
"use_external_music": "true",
"external_music_path": "\"music\"",
Expand All @@ -184,6 +193,7 @@
"link": "https://nas-ludo.fr/drive/d/s/ydCVP829Bye9WUz2ncI4dQInltWN6IFz/webapi/entry.cgi/SYNO.SynologyDrive.Files/FFNxBattlefields.rar?api=SYNO.SynologyDrive.Files&method=download&version=2&files=%5B%22id%3A820784500098245147%22%5D&force_download=true&json_error=true&download_type=%22download%22&c2_offload=%22allow%22&_dc=1724337524125&sharing_token=%22tDH.P.phuQzM7_to9OQonrewdb5GPyQ2fZaTG8k5dLGc8S9.LMCVycV_o75iixvU74WQMzGC50YDBZ8J3pohCAJVxboUT4npnzFhUYcS67_sgyGM.c0K5MZSef1fXYvJb6FbUt08_nPNRFx2PDWCYDuix8wH4CArMWwcqGsrS1tAowjxXLu8wabyppWmQ7ZohhDke2e5OPHWDA5EE05rDtinoWWgBtazho96LRDjrNslLN_S2FrweiS4%22&SynoToken=bXXAHAd1hrf7w",
"git_tag": "none",
"mod_type": "Graphical",
"default_selected": "false",
"rank": "80",
"compatibility": [
"ffnx"
Expand All @@ -209,6 +219,7 @@
"modder_name": "MCINDUS & Digixu",
"mod_info": "Improve monster quality",
"mod_type": "Graphical",
"default_selected": "false",
"ffnx_param": {},
"lang": [
"en",
Expand All @@ -228,6 +239,7 @@
"modder_name": "MCINDUS & Digixu",
"mod_info": "Improve triple triad",
"mod_type": "Graphical",
"default_selected": "false",
"ffnx_param": {},
"lang": [
"en",
Expand All @@ -247,6 +259,7 @@
"modder_name": "callisto",
"mod_info": "Hard mod",
"mod_type": "Gameplay",
"default_selected": "false",
"ffnx_param": {},
"lang": [
"en"
Expand All @@ -264,6 +277,7 @@
"modder_name": "Hobbitdur",
"mod_info": "Hard mod that balance the game. WIP do not install if not a tester",
"mod_type": "Gameplay",
"default_selected": "false",
"ffnx_param": {},
"lang": [
"fr"
Expand All @@ -281,6 +295,7 @@
"modder_name": "Antoine211 ",
"mod_info": "Mod that keep all that is in the game but change everything to rediscover the game !",
"mod_type": "Gameplay",
"default_selected": "false",
"ffnx_param": {},
"lang": [
"fr"
Expand All @@ -298,6 +313,7 @@
"modder_name": "mexico ",
"mod_info": "Hard mod",
"mod_type": "Gameplay",
"default_selected": "false",
"ffnx_param": {},
"lang": [
"fr"
Expand Down
8 changes: 4 additions & 4 deletions hobbitgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class WindowInstaller(QWidget):
FF8_RELOAD_NAME = "FFVIII-Reloaded-FR-ONLY"
RAGNAROK_NAME = "Ragnarok-EN-ONLY"
LIST_SPECIAL_MOD = [FF8_RELOAD_NAME, RAGNAROK_NAME]
MOD_CHECK_DEFAULT = ['FFNx', 'FF78Launcher', 'Tsunamods-OST-RF']
VERSION_LIST = ["FF8 Steam 2013", "FF8 Remastered"]
LANG_LIST = ["en", "fr", "de"]
MOD_TYPE_LIST = ["All", "Wrapper", "Graphical", "Music", "Gameplay", "EaseOfLife"]
Expand Down Expand Up @@ -108,6 +107,8 @@ def __setup_main(self):
# Button Update link data
self.update_data_button = QPushButton(parent=self, text="Updating mod list")
self.update_data_button.clicked.connect(self.update_data_click)
self.update_data_button.setToolTip("Update mod list, version available and link")

self.update_data_over = QMessageBox(parent=self)
self.update_data_over.setWindowTitle("Updating data over!")
self.update_data_over.setText("Updating data over!")
Expand Down Expand Up @@ -195,14 +196,13 @@ def __reset_mod_loaded(self):
if self.language.currentText() in mod_info["lang"]:
if (self.ff8_version.currentText() == self.VERSION_LIST[0] and "ffnx" in mod_info[
"compatibility"]) \
or (self.ff8_version.currentText() == self.VERSION_LIST[1] and "demaster" in mod_info[
"compatibility"]):
or (self.ff8_version.currentText() == self.VERSION_LIST[1] and "demaster" in mod_info["compatibility"]):
if self.mod_type.currentText() == "All" or (
self.mod_type.currentText() == mod_info["mod_type"]):
self.mod_checkbox[mod_name] = QCheckBox(parent=self, text=mod_name)
self.mod_checkbox[mod_name].setToolTip(
"Author: {}\nDescription: {}".format(mod_info["modder_name"], mod_info["mod_info"]))
if mod_name in self.MOD_CHECK_DEFAULT:
if mod_info["default_selected"] == "true":
self.mod_checkbox[mod_name].setChecked(True)
if mod_name == self.FF8_RELOAD_NAME:
self.mod_checkbox[mod_name].toggled.connect(self.activate_ff8reload)
Expand Down

0 comments on commit 25c22bd

Please sign in to comment.