Référence : Application - Intégration Jeu Sims 4
src.application.game.game_service
GameService: Facade providing Sims 4 user directories, Mods path, Resource.cfg verification, and game launching. Re-exports GameDetector and GameLauncher to maintain backwards compatibility.
GameDetector
Detects Sims 4 installation paths, Mods directory, and delegates executable detection.
clear_cache()
classmethod
Clears in-memory cached paths.
detect_game_executable(custom_exe=None)
classmethod
Locates TS4_x64.exe or TS4_DX9_x64.exe.
detect_mods_dir(custom_path=None)
classmethod
Detects and returns the 'Mods' folder path.
detect_sims4_user_dir(custom_path=None)
classmethod
Detects the 'The Sims 4' / 'Les Sims 4' user directory containing Mods/ and saves.
get_game_exe_path(custom_exe=None)
classmethod
Alias retournant le chemin de l'exécutable Sims 4.
get_windows_documents_dirs()
staticmethod
Returns candidate paths for the user's Documents folder.
is_game_running()
classmethod
Vérifie si le jeu Sims 4 est en cours d'exécution.
launch_game(exe_path=None)
classmethod
Launches the Sims 4 game process.
start_background_detection_refresh()
classmethod
Launches an asynchronous daemon thread to verify paths in the background.
GameLauncher
Detects game executable and handles process launching.
clear_cache()
classmethod
Exécute l'opération clear cache.
Returns:
| Type | Description |
|---|---|
None
|
Résultat de l'opération clear_cache. |
detect_game_executable(custom_exe=None)
classmethod
Locates TS4_x64.exe or TS4_DX9_x64.exe.
is_game_running()
classmethod
Vérifie si un processus The Sims 4 est actuellement en cours d'exécution via API native ultra-rapide.
launch_game(exe_path=None)
classmethod
Launches the Sims 4 game process.
open_system_uri(uri)
classmethod
Opens a custom URI scheme across Windows, Linux, and macOS safely.
is_sims4_folder(name)
Checks if a directory name corresponds to Sims 4 regardless of locale or special spaces.
launch_game(exe_path=None)
Launches the Sims 4 game process.
normalize_folder_name(name)
Normalizes whitespace (including non-breaking spaces \xa0) and removes special symbols.
src.application.game.game_detector
GameDetector: Detects Sims 4 user documents directory, Mods directory, and handles Resource.cfg and background path updates.
GameDetector
Detects Sims 4 installation paths, Mods directory, and delegates executable detection.
clear_cache()
classmethod
Clears in-memory cached paths.
detect_game_executable(custom_exe=None)
classmethod
Locates TS4_x64.exe or TS4_DX9_x64.exe.
detect_mods_dir(custom_path=None)
classmethod
Detects and returns the 'Mods' folder path.
detect_sims4_user_dir(custom_path=None)
classmethod
Detects the 'The Sims 4' / 'Les Sims 4' user directory containing Mods/ and saves.
get_game_exe_path(custom_exe=None)
classmethod
Alias retournant le chemin de l'exécutable Sims 4.
get_windows_documents_dirs()
staticmethod
Returns candidate paths for the user's Documents folder.
is_game_running()
classmethod
Vérifie si le jeu Sims 4 est en cours d'exécution.
launch_game(exe_path=None)
classmethod
Launches the Sims 4 game process.
start_background_detection_refresh()
classmethod
Launches an asynchronous daemon thread to verify paths in the background.
is_sims4_folder(name)
Checks if a directory name corresponds to Sims 4 regardless of locale or special spaces.
normalize_folder_name(name)
Normalizes whitespace (including non-breaking spaces \xa0) and removes special symbols.
src.application.game.game_launcher
GameLauncher: Locates Sims 4 game executable via common paths, EA app, Origin, Steam, and Windows registry, and handles process execution.
GameLauncher
Detects game executable and handles process launching.
clear_cache()
classmethod
Exécute l'opération clear cache.
Returns:
| Type | Description |
|---|---|
None
|
Résultat de l'opération clear_cache. |
detect_game_executable(custom_exe=None)
classmethod
Locates TS4_x64.exe or TS4_DX9_x64.exe.
is_game_running()
classmethod
Vérifie si un processus The Sims 4 est actuellement en cours d'exécution via API native ultra-rapide.
launch_game(exe_path=None)
classmethod
Launches the Sims 4 game process.
open_system_uri(uri)
classmethod
Opens a custom URI scheme across Windows, Linux, and macOS safely.