Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Yakuza series support #100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions games/game_yakuza0.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
from __future__ import annotations

import os

import mobase
from PyQt5.QtCore import QFileInfo

from ..basic_game import BasicGame
from .yakuza.yakuza_series import YakuzaGameModDataChecker, yakuza_check_rmm, yakuza_import_mods


class Yakuza0Game(BasicGame):

__yakuza_exe_dir = 'media'

Name = "Yakuza 0 Support Plugin"
Author = "SutandoTsukai181"
Version = "1.0.0"

GameName = "Yakuza 0"
GameShortName = "yakuza0"
GameSteamId = [638970]
GameBinary = os.path.join(__yakuza_exe_dir, "Yakuza0.exe")
GameDataPath = os.path.join(__yakuza_exe_dir, 'mods', '_externalMods')

def init(self, organizer: mobase.IOrganizer):
super().init(organizer)
self._featureMap[mobase.ModDataChecker] = YakuzaGameModDataChecker(self.__valid_paths)
self._organizer.onUserInterfaceInitialized(lambda win: yakuza_check_rmm(self, win))
self._organizer.onUserInterfaceInitialized(lambda win: yakuza_import_mods(self, win))
return True

def executables(self) -> list[mobase.ExecutableInfo]:
return super().executables() + [mobase.ExecutableInfo(
"Ryu Mod Manager",
QFileInfo(self.gameDirectory().absoluteFilePath(
os.path.join(self.__yakuza_exe_dir, 'RyuModManager.exe')))
).withArgument('--cli')]

def settings(self) -> list[mobase.PluginSetting]:
return super().settings() + [mobase.PluginSetting(
'import_mods_prompt',
'Check for mods to import from RMM mods folder on launch',
True
)]

__valid_paths = {
'2dpar',
'auth_w64_e',
'battlepar',
'bootpar',
'chara',
'chara_arc',
'chara_common',
'cloth',
'drama_scanner',
'effect',
'fighter',
'flood',
'flood.par',
'fontpar',
'hact',
'hact.par',
'light_anim',
'loading',
'minigame',
'motion_w64',
'movie_w64',
'reactorpar',
'scenario',
'shader',
'sound',
'soundcpk',
'soundpar',
'stage',
'staypar',
}
93 changes: 93 additions & 0 deletions games/game_yakuza3remastered.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
from __future__ import annotations

import os

import mobase
from PyQt5.QtCore import QFileInfo

from ..basic_game import BasicGame
from .yakuza.yakuza_series import YakuzaGameModDataChecker, yakuza_check_rmm, yakuza_import_mods


class Yakuza3RemasteredGame(BasicGame):

__yakuza_exe_dir = ''

Name = "Yakuza 3 Remastered Support Plugin"
Author = "SutandoTsukai181"
Version = "1.0.0"

GameName = "Yakuza 3 Remastered"
GameShortName = "yakuza3remastered"
GameSteamId = [1088710]
GameBinary = os.path.join(__yakuza_exe_dir, "Yakuza3.exe")
GameDataPath = os.path.join(__yakuza_exe_dir, 'mods', '_externalMods')

def init(self, organizer: mobase.IOrganizer):
super().init(organizer)
self._featureMap[mobase.ModDataChecker] = YakuzaGameModDataChecker(self.__valid_paths)
self._organizer.onUserInterfaceInitialized(lambda win: yakuza_check_rmm(self, win))
self._organizer.onUserInterfaceInitialized(lambda win: yakuza_import_mods(self, win))
return True

def executables(self) -> list[mobase.ExecutableInfo]:
return super().executables() + [mobase.ExecutableInfo(
"Ryu Mod Manager",
QFileInfo(self.gameDirectory().absoluteFilePath(
os.path.join(self.__yakuza_exe_dir, 'RyuModManager.exe')))
).withArgument('--cli')]

def settings(self) -> list[mobase.PluginSetting]:
return super().settings() + [mobase.PluginSetting(
'import_mods_prompt',
'Check for mods to import from RMM mods folder on launch',
True
)]

__valid_paths = {
'2d',
'auth',
'battle',
'bootpar',
'chara',
'chara_arc',
'chara_common',
'db.ogre3',
'effect',
'effect.par',
'enemy_dispose',
'font_hd',
'font_hd.par',
'fontpar',
'hact',
'light_anim',
'map_en',
'map_ja',
'map_ko',
'map_zh',
'minigame',
'motion',
'mvuen',
'mvusm',
'patch',
'pausepar',
'pre_btl_cam',
'puid.ogre3',
'reactive_obj',
'savedata',
'savedata.par',
'scenario_en',
'scenario_ja',
'scenario_ko',
'scenario_zh',
'shader',
'snda2',
'staffrollpar',
'stage',
'tougijyo',
'tougijyo.par',
'wdr_par_en',
'wdr_par_ja',
'wdr_par_ko',
'wdr_par_zh',
}
94 changes: 94 additions & 0 deletions games/game_yakuza4remastered.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
from __future__ import annotations

import os

import mobase
from PyQt5.QtCore import QFileInfo

from ..basic_game import BasicGame
from .yakuza.yakuza_series import YakuzaGameModDataChecker, yakuza_check_rmm, yakuza_import_mods


class Yakuza4RemasteredGame(BasicGame):

__yakuza_exe_dir = ''

Name = "Yakuza 4 Remastered Support Plugin"
Author = "SutandoTsukai181"
Version = "1.0.0"

GameName = "Yakuza 4 Remastered"
GameShortName = "yakuza4remastered"
GameSteamId = [1105500]
GameBinary = os.path.join(__yakuza_exe_dir, "Yakuza4.exe")
GameDataPath = os.path.join(__yakuza_exe_dir, 'mods', '_externalMods')

def init(self, organizer: mobase.IOrganizer):
super().init(organizer)
self._featureMap[mobase.ModDataChecker] = YakuzaGameModDataChecker(self.__valid_paths)
self._organizer.onUserInterfaceInitialized(lambda win: yakuza_check_rmm(self, win))
self._organizer.onUserInterfaceInitialized(lambda win: yakuza_import_mods(self, win))
return True

def executables(self) -> list[mobase.ExecutableInfo]:
return super().executables() + [mobase.ExecutableInfo(
"Ryu Mod Manager",
QFileInfo(self.gameDirectory().absoluteFilePath(
os.path.join(self.__yakuza_exe_dir, 'RyuModManager.exe')))
).withArgument('--cli')]

def settings(self) -> list[mobase.PluginSetting]:
return super().settings() + [mobase.PluginSetting(
'import_mods_prompt',
'Check for mods to import from RMM mods folder on launch',
True
)]

__valid_paths = {
'2d',
'auth',
'battle',
'bootpar',
'chara',
'chara_arc',
'chara_common',
'chasepar',
'db.soul',
'effect',
'effect.par',
'enemy_dispose',
'font_hd',
'font_hd.par',
'fontpar',
'hact',
'ikusei',
'light_anim',
'map_en',
'map_ja',
'map_ko',
'map_zh',
'minigame',
'motion',
'mvuen',
'mvusm',
'pausepar',
'pre_btl_cam',
'puid.soul',
'reactive_obj',
'savedata',
'savedata.par',
'scenario_en',
'scenario_ja',
'scenario_ko',
'scenario_zh',
'shader',
'snda2',
'staffrollpar',
'stage',
'tougijyo',
'tougijyo.par',
'wdr_par_en',
'wdr_par_ja',
'wdr_par_ko',
'wdr_par_zh',
}
90 changes: 90 additions & 0 deletions games/game_yakuza5remastered.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
from __future__ import annotations

import os

import mobase
from PyQt5.QtCore import QFileInfo

from ..basic_game import BasicGame
from .yakuza.yakuza_series import YakuzaGameModDataChecker, yakuza_check_rmm, yakuza_import_mods


class Yakuza5RemasteredGame(BasicGame):

__yakuza_exe_dir = 'main'

Name = "Yakuza 5 Remastered Support Plugin"
Author = "SutandoTsukai181"
Version = "1.0.0"

GameName = "Yakuza 5 Remastered"
GameShortName = "yakuza5remastered"
GameSteamId = [1105510]
GameBinary = os.path.join(__yakuza_exe_dir, "Yakuza5.exe")
GameDataPath = os.path.join(__yakuza_exe_dir, 'mods', '_externalMods')

def init(self, organizer: mobase.IOrganizer):
super().init(organizer)
self._featureMap[mobase.ModDataChecker] = YakuzaGameModDataChecker(self.__valid_paths)
self._organizer.onUserInterfaceInitialized(lambda win: yakuza_check_rmm(self, win))
self._organizer.onUserInterfaceInitialized(lambda win: yakuza_import_mods(self, win))
return True

def executables(self) -> list[mobase.ExecutableInfo]:
return super().executables() + [mobase.ExecutableInfo(
"Ryu Mod Manager",
QFileInfo(self.gameDirectory().absoluteFilePath(
os.path.join(self.__yakuza_exe_dir, 'RyuModManager.exe')))
).withArgument('--cli')]

def settings(self) -> list[mobase.PluginSetting]:
return super().settings() + [mobase.PluginSetting(
'import_mods_prompt',
'Check for mods to import from RMM mods folder on launch',
True
)]

__valid_paths = {
'2dpar',
'auth',
'auth_telop',
'battlepar',
'bootpar',
'chara',
'chara.par',
'chara_arc',
'chara_common',
'db.devil',
'effect',
'effect.par',
'fighter',
'fontpar',
'hact',
'light_anim',
'm2ftg',
'map_par_hd',
'minigame_en',
'minigame_ja',
'minigame_ko',
'minigame_zh',
'module',
'motion',
'mvstm',
'pausepar',
'puid.devil',
'reactorpar',
'scenario',
'scenario_en',
'scenario_ja',
'scenario_ko',
'scenario_zh',
'shader',
'soundpar',
'stage',
'staypar',
'strmen',
'wdr_par_en',
'wdr_par_ja',
'wdr_par_ko',
'wdr_par_zh',
}
Loading