Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"

- name: Set environmental variables
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.12
python-version: 3.13
- uses: abatilo/actions-poetry@v2
- name: Install
run: |
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Download the archive for your MO2 version and extract it directly into your MO2

- Mod Organizer **2.3.2**: [Download](https://github.com/ModOrganizer2/modorganizer-basic_games/releases/download/v0.0.3/basic_games-0.0.3.zip)
and extract in your `plugins/` folder (see below).
- Mod Organizer **2.4**: Basic games is included in Mod Organizer 2.4.
- Mod Organizer **2.4 and later**: Basic games is included in Mod Organizer 2.4 and later.
- If you want to use new game plugins that have not been included in the
release, [download the latest archive](https://github.com/ModOrganizer2/modorganizer-basic_games/archive/master.zip) and extract the files
in the existing `basic_games` folder, overwriting existing files.
Expand Down Expand Up @@ -217,15 +217,15 @@ Game IDs can be found here:

We recommend using a dedicated Python environment to write a new basic game plugins.

1. Install the required version of Python --- Currently Python 3.11 (MO2 2.5).
1. Install the required version of Python --- Currently Python 3.13 (MO2 2.5).
2. Remove the repository at `${MO2_INSTALL}/plugins/basic_games`.
3. Clone this repository at the location of the old plugin (
`${MO2_INSTALL}/plugins/basic_games`).
4. Place yourself inside the cloned folder and:

```bash
# create a virtual environment (recommended)
py -3.11 -m venv .\venv
py -3.13 -m venv .\venv
.\venv\scripts\Activate.ps1

# "install" poetry and the development package
Expand Down
2 changes: 1 addition & 1 deletion games/baldursgate3/bg3_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def retrieve_mod_metadata_in_new_thread(mod: mobase.IModInterface):
if progress.wasCanceled():
qWarning("processing canceled by user")
return False
threadpool.start(QRunnable.create(retrieve_mod_metadata_in_new_thread(mod)))
threadpool.start(QRunnable.create(retrieve_mod_metadata_in_new_thread(mod))) # type: ignore[reportUnknownMemberType]
count = 0
num_active_mods = len(active_mods)
total_intervals_to_wait = (num_active_mods * 2) + 20
Expand Down
12 changes: 4 additions & 8 deletions games/game_cyberpunk2077.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,15 +534,13 @@ def _onFinishedRun(self, path: str, exit_code: int) -> None:
crash_message = QMessageBox(
QMessageBox.Icon.Critical,
"Cyberpunk Crashed",
textwrap.dedent(
f"""
textwrap.dedent(f"""
Cyberpunk crashed. Tips:
- disable mods (create backup of modlist or use new profile)
- clear overwrite or delete at least overwrite/r6/cache (to keep mod settings)
- check log files of CET/redscript/RED4ext (in overwrite)
- read [FAQ & Troubleshooting]({self.GameSupportURL}#faq--troubleshooting)
"""
),
"""),
QMessageBox.StandardButton.Ok,
self._parentWidget,
)
Expand Down Expand Up @@ -696,8 +694,7 @@ def _get_rootbuilder_conversion_dialog(
message_box = QMessageBox(
QMessageBox.Icon.Question,
"RootBuilder obsolete",
textwrap.dedent(
"""
textwrap.dedent("""
Mod Organizer now supports Cyberpunk Engine Tweaks (CET) and
RED4ext native via forced load libraries, making RootBuilder
unnecessary.
Expand All @@ -706,8 +703,7 @@ def _get_rootbuilder_conversion_dialog(
<br/>This usually only affects CET, RED4ext and overwrite.

You can disable RootBuilder afterwards.
"""
),
"""),
QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No,
parent_widget,
)
Expand Down
2 changes: 1 addition & 1 deletion games/game_masterduel.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def userDataDir(self) -> str:
dir = self.gameDirectory()
dir.cd("LocalData")

subdirs = dir.entryList(filters=QDir.Filter.Dirs | QDir.Filter.NoDotAndDotDot)
subdirs = dir.entryList(filters=QDir.Filter.Dirs | QDir.Filter.NoDotAndDotDot) # type: ignore[reportUnknownMemberType]
dir.cd(subdirs[0])

self._userDataDirCached = dir.absolutePath()
Expand Down
2 changes: 1 addition & 1 deletion games/game_oblivion_remaster.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ def startGuidedFix(self, key: int) -> None:
pass
except FileNotFoundError:
pass
for entry in self.ue4ssDirectory().entryInfoList(
for entry in self.ue4ssDirectory().entryInfoList( # type: ignore[reportUnknownMemberType]
QDir.Filter.Dirs | QDir.Filter.NoDotAndDotDot
):
entry_dir = QDir(entry.absoluteFilePath())
Expand Down
2 changes: 1 addition & 1 deletion games/oblivion_remaster/paks/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ def dropEvent(self, e: QDropEvent | None):
def dataChanged(
self, topLeft: QModelIndex, bottomRight: QModelIndex, roles: Iterable[int] = ()
):
super().dataChanged(topLeft, bottomRight, roles)
super().dataChanged(topLeft, bottomRight, roles) # type: ignore[reportUnknownMemberType]
self.repaint()
4 changes: 2 additions & 2 deletions games/oblivion_remaster/paks/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,13 @@ def _parse_pak_files(self):
if isinstance(game, OblivionRemasteredGame):
pak_mods = QFileInfo(game.paksDirectory().absoluteFilePath("~mods"))
if pak_mods.exists() and pak_mods.isDir():
for entry in QDir(pak_mods.absoluteFilePath()).entryInfoList(
for entry in QDir(pak_mods.absoluteFilePath()).entryInfoList( # type: ignore
QDir.Filter.Dirs | QDir.Filter.Files | QDir.Filter.NoDotAndDotDot
):
if entry.isDir():
if "magicloader" in entry.completeBaseName().casefold():
continue
for sub_entry in QDir(entry.absoluteFilePath()).entryInfoList(
for sub_entry in QDir(entry.absoluteFilePath()).entryInfoList( # type: ignore
QDir.Filter.Files
):
if (
Expand Down
4 changes: 2 additions & 2 deletions games/oblivion_remaster/ue4ss/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

class UE4SSListModel(QStringListModel):
def __init__(self, parent: QWidget | None, organizer: mobase.IOrganizer):
super().__init__(parent)
super().__init__(parent) # type: ignore[reportUnknownMemberType]
self._checked_items: set[str] = set()
self._organizer = organizer
self._init_mod_states()
Expand Down Expand Up @@ -96,7 +96,7 @@ def setData(
return True

def setStringList(self, strings: Iterable[str | None]):
super().setStringList(strings)
super().setStringList(strings) # type: ignore[reportUnknownMemberType]
self._set_mod_states()

def data(self, index: QModelIndex, role: int = Qt.ItemDataRole.DisplayRole) -> Any:
Expand Down
2 changes: 1 addition & 1 deletion games/oblivion_remaster/ue4ss/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ def dropEvent(self, e: QDropEvent | None):
def dataChanged(
self, topLeft: QModelIndex, bottomRight: QModelIndex, roles: Iterable[int] = ()
):
super().dataChanged(topLeft, bottomRight, roles)
super().dataChanged(topLeft, bottomRight, roles) # type: ignore[reportUnknownMemberType]
self.repaint()
2 changes: 1 addition & 1 deletion games/oblivion_remaster/ue4ss/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def _parse_mod_files(self):
game = self._organizer.managedGame()
if isinstance(game, OblivionRemasteredGame):
if game.ue4ssDirectory().exists():
for dir_info in game.ue4ssDirectory().entryInfoList(
for dir_info in game.ue4ssDirectory().entryInfoList( # type: ignore
QDir.Filter.Dirs | QDir.Filter.NoDotAndDotDot
):
if QFileInfo(
Expand Down
6 changes: 3 additions & 3 deletions games/stalkeranomaly/XRIO.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def read(self, size: int = -1) -> bytes:
size = len(self._buffer)
if len(self._buffer) <= self._pos:
return b""
(buffer, pos) = self._read(size)
buffer, pos = self._read(size)
self._pos = pos
return buffer

Expand All @@ -35,7 +35,7 @@ def peek(self, size: int = -1) -> bytes:
size = len(self._buffer)
if len(self._buffer) <= self._pos:
return b""
(buffer, _pos) = self._read(size)
buffer, _pos = self._read(size)
return buffer

def seek(self, pos: int, whence: int = io.SEEK_SET) -> int:
Expand Down Expand Up @@ -98,7 +98,7 @@ def str(self) -> str:
return ""

def fvec3(self) -> IVec3:
(f1, f2, f3) = struct.unpack("<fff", self.read(12))
f1, f2, f3 = struct.unpack("<fff", self.read(12))
return IVec3(f1, f2, f3)


Expand Down
15 changes: 4 additions & 11 deletions games/stalkeranomaly/XRSave.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import struct
from datetime import datetime
from pathlib import Path
from typing import BinaryIO, Optional, cast
from typing import BinaryIO, Optional

import lzokay # pyright: ignore[reportMissingTypeStubs]
import lzokay

from .XRIO import XRReader, XRStream
from .XRObject import XRCreatureActor, XRFlag
Expand Down Expand Up @@ -104,18 +104,11 @@ def readFile(self, file: BinaryIO) -> Optional[XRStream]:
if size < 8:
return None

(start, version, source) = struct.unpack("@iii", file.read(12))
start, version, source = struct.unpack("@iii", file.read(12))
if (start == -1) and (version >= 6):
file.seek(12)
data = file.read(size - 12)
return XRStream(
cast(
bytes,
lzokay.decompress( # pyright: ignore[reportUnknownMemberType]
data, source
),
)
)
return XRStream(lzokay.decompress(data, source))

return None

Expand Down
Loading
Loading