diff options
| -rwxr-xr-x | ModSlots/ModSlots.py | 13 | ||||
| -rwxr-xr-x[-rw-r--r--] | ModSlots/cmd.sh (renamed from ModSlots/cmd.txt) | 2 | ||||
| -rw-r--r-- | ModSlots/slots.example.txt | 2 | ||||
| -rwxr-xr-x | Scripts/copy_libs.sh | 14 | ||||
| -rwxr-xr-x | Scripts/zip_from_gamedir.sh | 2 |
5 files changed, 25 insertions, 8 deletions
diff --git a/ModSlots/ModSlots.py b/ModSlots/ModSlots.py index 6460f4c..48b5ca5 100755 --- a/ModSlots/ModSlots.py +++ b/ModSlots/ModSlots.py @@ -79,13 +79,14 @@ def Error(msg): print(msg + '\n' + '^'*len(msg)) Warning_Index = 1 -def Warn(msg): +def Warn(msg, inline=True): global Error_Messages global Warning_Index msg = f'W(#{Warning_Index}): {msg}' Error_Messages.append(msg) Warning_Index += 1 - print(msg + '\n' + '^'*len(msg)) + if inline: + print(msg + '\n' + '^'*len(msg)) class ArchiveType(Enum): ZIP = 0 @@ -286,7 +287,7 @@ class Mod(): os.remove(target) elif os.path.isfile(target) or os.path.isdir(target): if not copy: - Warn(f'Not replacing/removing non-symlink file: {target}') + Warn(f'Not replacing non-symlink file: {target}', False) continue file = os.path.join(output, self.raw_map[key]) if copy: @@ -303,7 +304,7 @@ class Mod(): if os.path.islink(target): os.remove(target) elif os.path.isfile(target) or os.path.isdir(target): - Warn(f'Not deleting non-symlink file: {target}') + Warn(f'Not deleting non-symlink file: {target}', False) def is_armor_override(line): sp = line.split('/') @@ -446,10 +447,12 @@ if Mode == 'write': l.write(hex(struct.unpack('!Q', struct.pack('!d', Seed))[0])[2:] + '\n') for mod in Mods: mod.write(old_list, l) + if len(old_list) > 0: + print('------------Removed------------') for old in old_list: old_target = os.path.join(Game_Directory, old) if os.path.islink(old_target): - print(f'Removing old link: {old_target}') + print(f'{old_target}') os.remove(old_target) if Mode == 'verify': diff --git a/ModSlots/cmd.txt b/ModSlots/cmd.sh index b8dce44..494c3e3 100644..100755 --- a/ModSlots/cmd.txt +++ b/ModSlots/cmd.sh @@ -1 +1,3 @@ +#! /usr/bin/env sh +source venv/bin/activate ./ModSlots.py Write slots.example.txt /mnt/hdd/mods/mhw /mnt/ssd/SteamLibrary/steamapps/common/Monster\ Hunter\ World diff --git a/ModSlots/slots.example.txt b/ModSlots/slots.example.txt index 06de84d..93ae4b1 100644 --- a/ModSlots/slots.example.txt +++ b/ModSlots/slots.example.txt @@ -177,11 +177,9 @@ sBamboo Shoot.zip +Sailor Swimsuit.zip +Desert Costume.zip +2nd Design Contest Swimsuit.zip -+DOA6 Bunny Girl Costumes.zip +DOA5LR Kasumi_s Battlesuit.zip +Rabbit Joker.zip +Princess Warrior.zip -+Pub Lass Bunny Girl Costume.zip +Pistachio.zip +DOA5LR Momiji Kimono.zip +Stellar Scorpion.zip diff --git a/Scripts/copy_libs.sh b/Scripts/copy_libs.sh new file mode 100755 index 0000000..e5f97d3 --- /dev/null +++ b/Scripts/copy_libs.sh @@ -0,0 +1,14 @@ +#! /usr/bin/env sh + +: ${1?"Usage: $0 <path_to_repos>"} + +BASE_PATH="$1" +GAME_PATH="/mnt/ssd/SteamLibrary/steamapps/common/Monster Hunter World/" + +rsync -av "$BASE_PATH/SharpPluginLoader-fork/x64/Release/mhw-cs-plugin-loader.dll" "$GAME_PATH/ucrtbase.dll" +rsync -av "$BASE_PATH/SharpPluginLoader-fork/SharpPluginLoader.Core/bin/Release/net8.0/SharpPluginLoader.Core.dll" "$GAME_PATH/nativePC/plugins/CSharp/Loader/" +rsync -av "$BASE_PATH/SharpPluginLoader-fork/SharpPluginLoader.Bootstrapper/bin/Release/net8.0/SharpPluginLoader.Bootstrapper.dll" "$GAME_PATH/nativePC/plugins/CSharp/Loader/" +rsync -av "$BASE_PATH/SharpPluginLoader-fork/Assets/Default.bin" "$GAME_PATH/nativePC/plugins/CSharp/Loader/" + +rsync -av "$BASE_PATH/NewCamera/bin/Release/net8.0/NewCamera.dll" "$GAME_PATH/nativePC/plugins/CSharp/" +rsync -av "$BASE_PATH/WorldTuningTool/bin/Release/net8.0/WorldTuningTool.dll" "$GAME_PATH/nativePC/plugins/CSharp/" diff --git a/Scripts/zip_from_gamedir.sh b/Scripts/zip_from_gamedir.sh index 1eb943a..cf7402b 100755 --- a/Scripts/zip_from_gamedir.sh +++ b/Scripts/zip_from_gamedir.sh @@ -1,6 +1,6 @@ #! /usr/bin/env sh -7z a -tzip "NewCamera_$1_incl_spl_linux.zip" \ +7z a -tzip "NewCamera+WorldTuningTool_$1_incl_spl_linux.zip" \ ucrtbase.dll \ nativePC/plugins/CSharp/Loader/Default.bin \ nativePC/plugins/CSharp/Loader/SharpPluginLoader.Bootstrapper.dll \ |