Skip to content

Commit

Permalink
Add Sims 4 detection to controller.game
Browse files Browse the repository at this point in the history
Make the game controller detect Sims 4. Set game_selection.directory
(and therefore game.directory) to (inside of the appropriate pfx)
Documents/Electronic Arts/The Sims 4/Mods instead of the _actual_ game
directory. This is because Sims titles expect mods to be installed in
that directory instead of the actual game directory. The game will just
load them from there.

The generic controller.mod has no explicit test coverage associated with
it, so I'm not considering Sims 4 to be supported yet; it's merely
detected.

Manually tested with wicked whims from the nexus, seemed to load up
okay.
  • Loading branch information
cyberrumor committed Dec 14, 2024
1 parent d797752 commit 3e28b40
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions ammo/controller/game.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
"Starfield",
]

SIMS_TITLES = [
"The Sims 4",
]


@dataclass(frozen=True, kw_only=True)
class GameSelection:
Expand Down Expand Up @@ -90,6 +94,11 @@ class SteamGame:
id=22330,
)

Sims4 = SteamGame(
name="The Sims 4",
id=1222670,
)

Skyrim = SteamGame(
name="Skyrim",
id=72850,
Expand Down Expand Up @@ -124,6 +133,7 @@ def __init__(self, args):
Fallout4,
FalloutNewVegas,
Oblivion,
Sims4,
Skyrim,
SkyrimSpecialEdition,
Starfield,
Expand Down Expand Up @@ -196,6 +206,16 @@ def __init__(self, args):
directory=library / f"common/{game.name}",
)

if game.name in SIMS_TITLES:
# Sims games have a special directory for mod installation.
# Make ammo install mods into that directory instead of the
# game directory.
game_selection = GameSelection(
name=game.name,
directory=pfx
/ f"drive_c/users/steamuser/Documents/Electronic Arts/{game.name}/Mods",
)

if game.name in BETHESDA_TITLES:
game_selection = BethesdaGameSelection(
name=game.name,
Expand Down

0 comments on commit 3e28b40

Please sign in to comment.