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

Added Stalker 2 HoC Basic Support #167

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
33 changes: 33 additions & 0 deletions games/game_stalker2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import os
import mobase

from PyQt6.QtCore import QDir
from ..basic_game import BasicGame

class Stalker2Game(BasicGame):

# Open to contribution, take this plugin and expand on it as you please. Consider sharing on the MO2 GitHub if a more advanced version is made.
Name = "S.T.A.L.K.E.R. 2 Heart of Chornobyl Support Plugin"
Author = "MO2"
Version = "0.1.0"

GameName = "S.T.A.L.K.E.R. 2 Heart of Chornobyl"
GameShortName = "stalker2heartofchornobyl"
GameNexusName = "stalker2heartofchornobyl"
GameBinary = "Stalker2.exe"
GameDataPath = "Stalker2\Content\Paks\~mods"
GameDocumentsDirectory = "%USERPROFILE%\AppData\Local\Stalker2\Saved"
GameSaveExtension = "sav"
GameSteamId = 1643320

def savesDirectory(self):
return QDir(self.documentsDirectory().absoluteFilePath("STEAM\SaveGames\Data"))

# Snippet taken from the Kingdom Come Deliverance plugin
def initializeProfile(self, directory: QDir, settings: mobase.ProfileSetting):
# Create the mods directory if it doesn't exist
modsPath = self.dataDirectory().absolutePath()
if not os.path.exists(modsPath):
os.mkdir(modsPath)

super().initializeProfile(directory, settings)
Loading