Skip to content

Instantly share code, notes, and snippets.

@phobos2077
Last active March 25, 2025 10:21
Show Gist options
  • Save phobos2077/c7f1488ee98626cbbfc370ba8a5ba0a5 to your computer and use it in GitHub Desktop.
Save phobos2077/c7f1488ee98626cbbfc370ba8a5ba0a5 to your computer and use it in GitHub Desktop.
MO2 Fallout 2 plugin
# -*- encoding: utf-8 -*-
from pathlib import Path
from typing import List
from PyQt5.QtCore import QDir
import mobase
from ..basic_features import BasicGameSaveGameInfo
from ..basic_features.basic_save_game_info import BasicGameSaveGame
from ..basic_game import BasicGame
class Fallout2SaveGame(BasicGameSaveGame):
def allFiles(self):
return [self._filename]
class Fallout2Game(BasicGame):
Name = "Fallout 2 Support Plugin"
Author = "phobos2077"
Version = "1.0.0a"
GameName = "Fallout 2"
GameShortName = "fallout2"
GameNexusName = "fallout2"
GameSteamId = [38410]
GameGogId = "fallout_2"
GameBinary = "fallout2.exe"
GameDataPath = ""
# GameDocumentsDirectory = "%GAME_PATH%/"
# GameSavesDirectory = "%GAME_PATH%/data/SAVEGAME"
def init(self, organizer: mobase.IOrganizer):
super().init(organizer)
self._featureMap[mobase.SaveGameInfo] = BasicGameSaveGameInfo(
lambda s: s.replace(".sav", ".png")
)
return True
def iniFiles(self):
return ["fallout2.cfg"]
# def listSaves(self, folder: QDir) -> List[mobase.ISaveGame]:
# ext = self._mappings.savegameExtension.get()
# return [
# Witcher3SaveGame(path)
# for path in Path(folder.absolutePath()).glob(f"*.{ext}")
# ]
@stooshorama
Copy link

always gets a error and wont work because PyQt5 is not detected (i installed it and even moved its folder to the libs folder of the plugins folder), now it cant find Qtcore despite it being inside of PyQt5

@stooshorama
Copy link

what should i add/ remove to the plugin file to remedy this (i dont know python)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment