mirror of
https://github.com/ModOrganizer2/modorganizer-basic_games.git
synced 2026-07-27 14:07:29 -07:00
Merge remote-tracking branch 'origin/master' into qt6
This commit is contained in:
@@ -62,6 +62,7 @@ You can rename `modorganizer-basic_games-xxx` to whatever you want (e.g., `basic
|
||||
| S.T.A.L.K.E.R. Anomaly — [MOD](https://www.stalker-anomaly.com/) | [Qudix](https://github.com/Qudix) | [game_stalkeranomaly.py](games/game_stalkeranomaly.py) | <ul><li>mod data checker</li></ul> |
|
||||
| Stardew Valley — [GOG](https://www.gog.com/game/stardew_valley) / [STEAM](https://store.steampowered.com/app/413150/Stardew_Valley/) | [Syer10](https://github.com/Syer10), [Holt59](https://github.com/holt59/) | [game_stardewvalley.py](games/game_stardewvalley.py) | <ul><li>mod data checker</li></ul> |
|
||||
| STAR WARS™ Empire at War: Gold Pack - [GOG](https://www.gog.com/game/star_wars_empire_at_war_gold_pack) / [STEAM](https://store.steampowered.com/app/32470/) | [erri120](https://github.com/erri120) | <ul><li>Empire at War: [game_starwars-empire-at-war.py](games/game_starwars-empire-at-war.py)</li><li>Force of Corruption: [game_starwars-empire-at-war-foc.py](games/game_starwars-empire-at-war-foc.py)</li></ul> | |
|
||||
| Valheim — [STEAM](https://store.steampowered.com/app/892970/Valheim/) | [Zash](https://github.com/ZashIn) | [game_valheim.py](games/game_valheim.py) | <ul><li>mod data checker</li><li>overwrite config sync</li><li>save game support (no preview)</li></ul>
|
||||
| The Witcher: Enhanced Edition - [GOG](https://www.gog.com/game/the_witcher) / [STEAM](https://store.steampowered.com/app/20900/The_Witcher_Enhanced_Edition_Directors_Cut/) | [erri120](https://github.com/erri120) | [game_witcher1.py](games/game_witcher1.py) | <ul><li>save game parsing (no preview)</li></ul> |
|
||||
| The Witcher 3: Wild Hunt — [GOG](https://www.gog.com/game/the_witcher_3_wild_hunt) / [STEAM](https://store.steampowered.com/app/292030/The_Witcher_3_Wild_Hunt/) | [Holt59](https://github.com/holt59/) | [game_witcher3.py](games/game_witcher3.py) | <ul><li>save game preview</li></ul> |
|
||||
| Zeus and Poseidon — [GOG](https://www.gog.com/game/zeus_poseidon) / [STEAM](https://store.steampowered.com/app/566050/Zeus__Poseidon/) | [Holt59](https://github.com/holt59/) | [game_zeusandpoiseidon.py](games/game_zeusandpoiseidon.py) | <ul><li>mod data checker</li></ul> |
|
||||
|
||||
@@ -42,7 +42,9 @@ class GTASanAndreasDefinitiveEditionGame(BasicGame):
|
||||
|
||||
def init(self, organizer: mobase.IOrganizer) -> bool:
|
||||
super().init(organizer)
|
||||
self._featureMap[mobase.ModDataChecker] = GTASanAndreasDefinitiveEditionModDataChecker()
|
||||
self._featureMap[
|
||||
mobase.ModDataChecker
|
||||
] = GTASanAndreasDefinitiveEditionModDataChecker()
|
||||
return True
|
||||
|
||||
def executables(self):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import os
|
||||
|
||||
from pathlib import Path
|
||||
from PyQt6.QtCore import QDir,QFileInfo
|
||||
from PyQt6.QtCore import QDir, QFileInfo
|
||||
|
||||
import mobase
|
||||
|
||||
@@ -21,6 +21,7 @@ class GTAViceCitysDefinitiveEditionModDataChecker(mobase.ModDataChecker):
|
||||
|
||||
return mobase.ModDataChecker.INVALID
|
||||
|
||||
|
||||
class GTAViceCityDefinitiveEditionGame(BasicGame):
|
||||
|
||||
Name = "Grand Theft Auto: Vice City - Definitive Edition Support Plugin"
|
||||
@@ -41,7 +42,9 @@ class GTAViceCityDefinitiveEditionGame(BasicGame):
|
||||
|
||||
def init(self, organizer: mobase.IOrganizer) -> bool:
|
||||
super().init(organizer)
|
||||
self._featureMap[mobase.ModDataChecker] = GTAViceCitysDefinitiveEditionModDataChecker()
|
||||
self._featureMap[
|
||||
mobase.ModDataChecker
|
||||
] = GTAViceCitysDefinitiveEditionModDataChecker()
|
||||
return True
|
||||
|
||||
def executables(self):
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,122 +1,123 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
import os
|
||||
import mobase
|
||||
|
||||
from PyQt6.QtCore import QDir
|
||||
|
||||
from typing import List
|
||||
from pathlib import Path
|
||||
|
||||
from ..basic_game import BasicGame, BasicGameSaveGame
|
||||
from ..basic_features import BasicGameSaveGameInfo
|
||||
|
||||
|
||||
class VampireModDataChecker(mobase.ModDataChecker):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.validDirNames = [
|
||||
"cfg",
|
||||
"cl_dlls",
|
||||
"dlg",
|
||||
"dlls",
|
||||
"maps",
|
||||
"materials",
|
||||
"media",
|
||||
"models",
|
||||
"particles",
|
||||
"python",
|
||||
"resource",
|
||||
"scripts",
|
||||
"sound",
|
||||
"vdata",
|
||||
]
|
||||
|
||||
def dataLooksValid(
|
||||
self, tree: mobase.IFileTree
|
||||
) -> mobase.ModDataChecker.CheckReturn:
|
||||
for entry in tree:
|
||||
if not entry.isDir():
|
||||
continue
|
||||
if entry.name().casefold() in self.validDirNames:
|
||||
return mobase.ModDataChecker.VALID
|
||||
return mobase.ModDataChecker.INVALID
|
||||
|
||||
|
||||
class VampireSaveGame(BasicGameSaveGame):
|
||||
_filepath: Path
|
||||
|
||||
def __init__(self, filepath: Path):
|
||||
super().__init__(filepath)
|
||||
self._filepath = filepath
|
||||
self.name = None
|
||||
self.elapsedTime = None
|
||||
|
||||
|
||||
class VampireLocalSavegames(mobase.LocalSavegames):
|
||||
def __init__(self, myGameSaveDir):
|
||||
super().__init__()
|
||||
self._savesDir = myGameSaveDir.absolutePath()
|
||||
|
||||
def mappings(self, profile_save_dir):
|
||||
m = mobase.Mapping()
|
||||
m.createTarget = True
|
||||
m.isDirectory = True
|
||||
m.source = profile_save_dir.absolutePath()
|
||||
m.destination = self._savesDir
|
||||
|
||||
return [m]
|
||||
|
||||
def prepareProfile(self, profile):
|
||||
return profile.localSavesEnabled()
|
||||
|
||||
|
||||
class VampireTheMasqueradeBloodlinesGame(BasicGame):
|
||||
Name = "Vampire - The Masquerade: Bloodlines Support Plugin"
|
||||
Author = "John"
|
||||
Version = "1.0.0"
|
||||
Description = "Adds support for Vampires: The Masquerade - Bloodlines, with the only caveat that global save games end up in overwrite."
|
||||
|
||||
GameName = "Vampire - The Masquerade: Bloodlines"
|
||||
GameShortName = "vampirebloodlines"
|
||||
GameNexusName = "vampirebloodlines"
|
||||
GameNexusId = 437
|
||||
GameSteamId = [2600]
|
||||
GameGogId = [1207659240]
|
||||
GameBinary = "vampire.exe"
|
||||
GameDataPath = "vampire"
|
||||
GameDocumentsDirectory = "%GAME_PATH%/vampire/cfg"
|
||||
GameSavesDirectory = "%GAME_PATH%/vampire/SAVE"
|
||||
GameSaveExtension = "sav"
|
||||
|
||||
def init(self, organizer: mobase.IOrganizer) -> bool:
|
||||
super().init(organizer)
|
||||
self._featureMap[mobase.ModDataChecker] = VampireModDataChecker()
|
||||
self._featureMap[mobase.SaveGameInfo] = VampireSaveGame(self.savesDirectory())
|
||||
self._featureMap[mobase.LocalSavegames] = VampireLocalSavegames(
|
||||
self.savesDirectory()
|
||||
)
|
||||
return True
|
||||
|
||||
def initializeProfile(self, path: QDir, settings: int):
|
||||
# Create .cfg files if they don't exist
|
||||
for iniFile in self.iniFiles():
|
||||
iniPath = self.documentsDirectory().absoluteFilePath(iniFile)
|
||||
if not os.path.exists(iniPath):
|
||||
with open(iniPath, "w") as _:
|
||||
pass
|
||||
|
||||
super().initializeProfile(path, settings)
|
||||
|
||||
def version(self):
|
||||
# Don't forget to import mobase!
|
||||
return mobase.VersionInfo(1, 0, 0, mobase.ReleaseType.final)
|
||||
|
||||
def iniFiles(self):
|
||||
return ["autoexec.cfg", "user.cfg"]
|
||||
|
||||
def listSaves(self, folder: QDir) -> List[mobase.ISaveGame]:
|
||||
ext = self._mappings.savegameExtension.get()
|
||||
return [
|
||||
VampireSaveGame(path)
|
||||
for path in Path(folder.absolutePath()).glob(f"*.{ext}")
|
||||
]
|
||||
# -*- encoding: utf-8 -*-
|
||||
import os
|
||||
import mobase
|
||||
|
||||
from PyQt6.QtCore import QDir
|
||||
|
||||
from typing import List
|
||||
from pathlib import Path
|
||||
|
||||
from ..basic_game import BasicGame, BasicGameSaveGame
|
||||
|
||||
|
||||
class VampireModDataChecker(mobase.ModDataChecker):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.validDirNames = [
|
||||
"cfg",
|
||||
"cl_dlls",
|
||||
"dlg",
|
||||
"dlls",
|
||||
"maps",
|
||||
"materials",
|
||||
"media",
|
||||
"models",
|
||||
"particles",
|
||||
"python",
|
||||
"resource",
|
||||
"scripts",
|
||||
"sound",
|
||||
"vdata",
|
||||
]
|
||||
|
||||
def dataLooksValid(
|
||||
self, tree: mobase.IFileTree
|
||||
) -> mobase.ModDataChecker.CheckReturn:
|
||||
for entry in tree:
|
||||
if not entry.isDir():
|
||||
continue
|
||||
if entry.name().casefold() in self.validDirNames:
|
||||
return mobase.ModDataChecker.VALID
|
||||
return mobase.ModDataChecker.INVALID
|
||||
|
||||
|
||||
class VampireSaveGame(BasicGameSaveGame):
|
||||
_filepath: Path
|
||||
|
||||
def __init__(self, filepath: Path):
|
||||
super().__init__(filepath)
|
||||
self._filepath = filepath
|
||||
self.name = None
|
||||
self.elapsedTime = None
|
||||
|
||||
|
||||
class VampireLocalSavegames(mobase.LocalSavegames):
|
||||
def __init__(self, myGameSaveDir):
|
||||
super().__init__()
|
||||
self._savesDir = myGameSaveDir.absolutePath()
|
||||
|
||||
def mappings(self, profile_save_dir):
|
||||
m = mobase.Mapping()
|
||||
m.createTarget = True
|
||||
m.isDirectory = True
|
||||
m.source = profile_save_dir.absolutePath()
|
||||
m.destination = self._savesDir
|
||||
|
||||
return [m]
|
||||
|
||||
def prepareProfile(self, profile):
|
||||
return profile.localSavesEnabled()
|
||||
|
||||
|
||||
class VampireTheMasqueradeBloodlinesGame(BasicGame):
|
||||
Name = "Vampire - The Masquerade: Bloodlines Support Plugin"
|
||||
Author = "John"
|
||||
Version = "1.0.0"
|
||||
Description = "Adds support for Vampires: The Masquerade - Bloodlines"
|
||||
|
||||
GameName = "Vampire - The Masquerade: Bloodlines"
|
||||
GameShortName = "vampirebloodlines"
|
||||
GameNexusName = "vampirebloodlines"
|
||||
GameNexusId = 437
|
||||
GameSteamId = [2600]
|
||||
GameGogId = [1207659240]
|
||||
GameBinary = "vampire.exe"
|
||||
GameDataPath = "vampire"
|
||||
GameDocumentsDirectory = "%GAME_PATH%/vampire/cfg"
|
||||
GameSavesDirectory = "%GAME_PATH%/vampire/SAVE"
|
||||
GameSaveExtension = "sav"
|
||||
|
||||
def init(self, organizer: mobase.IOrganizer) -> bool:
|
||||
super().init(organizer)
|
||||
self._featureMap[mobase.ModDataChecker] = VampireModDataChecker()
|
||||
self._featureMap[mobase.SaveGameInfo] = VampireSaveGame(
|
||||
Path(self.savesDirectory().absolutePath())
|
||||
)
|
||||
self._featureMap[mobase.LocalSavegames] = VampireLocalSavegames(
|
||||
self.savesDirectory()
|
||||
)
|
||||
return True
|
||||
|
||||
def initializeProfile(self, path: QDir, settings: int):
|
||||
# Create .cfg files if they don't exist
|
||||
for iniFile in self.iniFiles():
|
||||
iniPath = self.documentsDirectory().absoluteFilePath(iniFile)
|
||||
if not os.path.exists(iniPath):
|
||||
with open(iniPath, "w") as _:
|
||||
pass
|
||||
|
||||
super().initializeProfile(path, settings)
|
||||
|
||||
def version(self):
|
||||
# Don't forget to import mobase!
|
||||
return mobase.VersionInfo(1, 0, 0, mobase.ReleaseType.final)
|
||||
|
||||
def iniFiles(self):
|
||||
return ["autoexec.cfg", "user.cfg"]
|
||||
|
||||
def listSaves(self, folder: QDir) -> List[mobase.ISaveGame]:
|
||||
ext = self._mappings.savegameExtension.get()
|
||||
return [
|
||||
VampireSaveGame(path)
|
||||
for path in Path(folder.absolutePath()).glob(f"*.{ext}")
|
||||
]
|
||||
Reference in New Issue
Block a user