Skip to content

Commit

Permalink
Adding Ost-rf project
Browse files Browse the repository at this point in the history
  • Loading branch information
HobbitDur committed Aug 19, 2024
1 parent 911b3f7 commit 9bcac6b
Show file tree
Hide file tree
Showing 15 changed files with 84 additions and 27 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,6 @@ ModelManifest.xml
# FAKE - F# Make
.fake/

**/.idea

**/OutputFiles/
**/__pycache__/
**/decompressed_battle/
Expand Down
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/HobbitInstaller.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ModSetup/direct_link.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ DefaultFilesDE>https://nas-ludo.fr/drive/d/s/ynTJrtTP6kxshUHGLmx57py2KhnPyOxu/we
FF8Curiosite-FR-ONLY>https://nas-ludo.fr/drive/d/s/ynUFKFt12wmDvkNcuo74A09C1zyFKJ6h/webapi/entry.cgi/SYNO.SynologyDrive.Files/FF8Curiosite.zip?api=SYNO.SynologyDrive.Files&method=download&version=2&files=%5B%22id%3A823030376948606771%22%5D&force_download=true&json_error=true&download_type=%22download%22&c2_offload=%22allow%22&_dc=1720980344546&sharing_token=%22CT80CwKdRM0NRwnxEPqcvO659z8CzRBzuoa6mpi126BOKijaLfDzKiygx583e2Rofx7Fsn3Qu7tgzZ422qKE3FrFx2_LN_oBmCrnWAYFSYIIQpOC_qkF_XsL7PG8JbkfOCNZ3RmKWk80plhDGWrGPQhNQP.LAzr.PGMc_EnZtd.M2PUjQNnJsTgV_K_Si1777k6nzHVc_BpbLZ8MgFIu1K5Yndn9oByuA3betCH9scNGXGjJL4SNjvry%22
FFNxSeedRebornEN>https://nas-ludo.fr/drive/d/s/ydCWtJYEm8b2FLHff04Yh0IRfIo9hzcG/webapi/entry.cgi/SYNO.SynologyDrive.Files/FFNxSeedReborn.rar?api=SYNO.SynologyDrive.Files&method=download&version=2&files=%5B%22id%3A820784584552653345%22%5D&force_download=true&json_error=true&download_type=%22download%22&c2_offload=%22allow%22&_dc=1717841479034&sharing_token=%22xaKZATRrr8BgKqKngFkU6zhEpGo_WJr.y10RfuPkLU9cQfp9qV1ISy36Ba78fiS9NAL9PHTZaiBzTEEwbR3Z27hiEn.yp0UlYOZY6zQ48Pgo9nTNsNEOAEVfswcCe3i1EPPD2j2KbYQkTidzmYVcDVuTfBhVZYrFvgIgGIQUMvVLNvj3mTYBcfbiGN7hkhVRrxPpwGryhwTCwZ4BbNks2CBygrkCaNiWI.M75y4tSVzU5XcDfXP1RIMF%22
AIUpscaledFMVs>https://drive.usercontent.google.com/download?id=1oeBjk_xIjNEPrOUka1rRxGP37bKeiQtP&export=download&authuser=0&confirm=t&uuid=39f5f7e3-aec1-4395-ab89-74fb86273b6e&at=APZUnTUVLm1bz91bwMmoIYW1OU48%3A1717857332942
FFNx-OST-RF>https://download.tsunamods.com/?id=12
FFNx-OST-RF>https://download.tsunamods.com/?id=12
2 changes: 1 addition & 1 deletion ModSetup/mod_available.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ FFNxTripod
Ragnarok-EN-ONLY
HobbitGameplayMod-ALPHA-FR-ONLY
FF8Curiosite-FR-ONLY
FFVIII-Reloaded-FR-ONLY
FFVIII-Reloaded-FR-ONLY
2 changes: 1 addition & 1 deletion ModSetup/mod_file_name.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ FFNxTripod.rar
Ragnarok Mod v1.2.3 for Steam 2013 (06-05-2023).rar
HobbitGameplayMod.zip
FF8Curiosite.zip
FFVIII Reloaded v.2.12.7z
FFVIII Reloaded v.2.12.7z
2 changes: 1 addition & 1 deletion create_exe.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.venv/Scripts/pyinstaller.exe -n HobbitInstaller -F --specpath release/build --distpath release --workpath release/build --paths .venv/Lib/site-packages --hidden-import patool main.py;
venv/Scripts/pyinstaller.exe -n HobbitInstaller -F --specpath release/build --distpath release --workpath release/build --paths .venv/Lib/site-packages --hidden-import patool main.py;
mkdir -p release/HobbitInstaller-0.x.x;
cp -R Resources release/HobbitInstaller-0.x.x/;
cp -R ModSetup release/HobbitInstaller-0.x.x/;
Expand Down
23 changes: 11 additions & 12 deletions ffnxmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,21 @@ def write_ffnx_setup_file(self, ff8_path):
file.write(line + '\n')

def change_ffnx_music_option(self):
for i, line in enumerate(self.ffnx_setup):
for param, value in self.MUSIC_FFNX_PARAM_CHANGE.items():
if param in line and '=' in line:
line_split = line.split('=')
self.ffnx_setup[i] = line_split[0] + "=" + value + "#Value changed by HobbitInstaller"

self.__change_music_option(self.MUSIC_FFNX_PARAM_CHANGE.items())
def change_rosewine_music_option(self):
for i, line in enumerate(self.ffnx_setup):
for param, value in self.MUSIC_ROSE_WINE_PARAM_CHANGE.items():
if param in line and '=' in line:
line_split = line.split('=')
self.ffnx_setup[i] = line_split[0] + "=" + value + "#Value changed by HobbitInstaller"

self.__change_music_option(self.MUSIC_ROSE_WINE_PARAM_CHANGE.items())
def change_ost_rf_music_option(self):
self.__change_music_option(self.MUSIC_OST_RF_PARAM_CHANGE.items())

def __change_music_option(self, music_items):
print(music_items)
for i, line in enumerate(self.ffnx_setup):
for param, value in self.MUSIC_OST_RF_PARAM_CHANGE.items():
for param, value in music_items:
if param in line and '=' in line:
print(line)
print(param)
print(value)
line_split = line.split('=')
self.ffnx_setup[i] = line_split[0] + "=" + value + "#Value changed by HobbitInstaller"

1 change: 0 additions & 1 deletion hobbitgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from PyQt6.QtGui import QIcon
from PyQt6.QtWidgets import QApplication, QWidget, QPushButton, QVBoxLayout, QCheckBox, QMessageBox, QProgressDialog, QMainWindow, QProgressBar, QRadioButton, \
QLabel, QFrame, QStyle, QSizePolicy, QButtonGroup
from PyQt6.uic.properties import QtCore

from modmanager import ModManager

Expand Down
20 changes: 12 additions & 8 deletions modmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ def __read_setup_files(self):
self.buffer_tag_mod.clear()
self.buffer_direct_link_mod.clear()
with (open(self.GIT_MOD_FILE, "r") as f):
self.buffer_git_list_mod = f.read().split('\n')
self.buffer_git_list_mod = [x for x in f.read().split('\n') if x]
with (open(self.GIT_TAG_FILE, "r") as f):
self.buffer_tag_mod = f.read().split('\n')
self.buffer_tag_mod = [x for x in f.read().split('\n') if x]
with (open(self.DIRECT_LINK_FILE, "r") as f):
self.buffer_direct_link_mod = f.read().split('\n')
self.buffer_direct_link_mod = [x for x in f.read().split('\n') if x]
if len(self.buffer_git_list_mod) != len(self.buffer_tag_mod):
raise ValueError("The file {} and file {} doesn't have the same number of line !".format(self.GIT_MOD_FILE,
self.GIT_TAG_FILE))
Expand Down Expand Up @@ -213,9 +213,6 @@ def install_mod(self, mod_name: str, keep_download_mod=False, special_status={},
zip_ref.extractall(archive)
list_dir = os.listdir(archive)
try:
print(os.listdir(archive))
print(dd_file_name)
print(os.listdir(archive).index(dd_file_name.split('.')[0]))
index_folder = os.listdir(archive).index(dd_file_name.split('.')[0])

except ValueError:
Expand Down Expand Up @@ -268,13 +265,20 @@ def install_mod(self, mod_name: str, keep_download_mod=False, special_status={},
shutil.rmtree(self.FOLDER_DOWNLOAD)

if mod_name in self.LIST_MOD_TO_BE_SETUP:
print("Updating FFNx.toml file for mod {}".format(mod_name))
if not os.path.join(self.ff8_path, "FFNx.toml"):
with open(os.path.join(self.ff8_path, "FFNx.toml"), "w") as file:
pass
self.ffnx_manager.read_ffnx_setup_file(ff8_path=self.ff8_path)
if mod_name == "FFNx-FFNxFF8Music":
self.ffnx_manager.change_ffnx_music_option()
if mod_name == "FFNx-RoseAndWine":
elif mod_name == "FFNx-RoseAndWine":
self.ffnx_manager.change_rosewine_music_option()
elif mod_name == "FFNx-OST-RF":
self.ffnx_manager.change_ost_rf_music_option()

self.ffnx_manager.write_ffnx_setup_file(self.ff8_path)
self.ffnx_manager.write_ffnx_setup_file(self.ff8_path)

def update_data(self):
self.install_mod(self.UPDATE_DATA_NAME)
self.__init_mod_data()

0 comments on commit 9bcac6b

Please sign in to comment.