How softsoundd/mirrorsedgetweaks works
Purpose and runtime
Mirror’s Edge Tweaks is a Windows desktop utility that modifies a local Mirror’s Edge installation: settings, Unreal Engine packages, executable patches, launch behavior, mods, and game fixes. It targets .NET 10 WPF and uses MVVM; it is not a server or web application. External game-distribution variants are represented by embedded version metadata.
• MirrorsEdgeTweaks/App.xaml
• MirrorsEdgeTweaks/App.xaml.cs
• MirrorsEdgeTweaks/Versions/steam.json
UI composition and application entry
App starts the WPF application and MainWindow hosts the tabbed/settings UI. MainViewModel coordinates the game session, initialization, status, and feature-specific view models. Views are primarily XAML-driven with Material Design styling and custom controls/behaviors.
• MirrorsEdgeTweaks/MainWindow.xaml
• MirrorsEdgeTweaks/ViewModels/MainViewModel.cs
• MirrorsEdgeTweaks/Themes/Generic.xaml
Game discovery, session, and platform boundary
The app establishes a selected game directory, detects executable/version characteristics, and maintains session/status state before enabling changes. Steam-specific discovery/install-script handling is isolated from generic game-path and version logic.
• MirrorsEdgeTweaks/ViewModels/GameSession.cs
• MirrorsEdgeTweaks/Helpers/UserTdGamePathHelper.cs
• MirrorsEdgeTweaks/Services/SteamService.cs
Persistent configuration and filesystem safety
User application preferences are stored separately from game configuration. Game reads/writes pass through file and configuration services, while backup scopes and retention protect modified game files and limit accumulated backups. This is the critical boundary between the tool’s state and the installed game.
• MirrorsEdgeTweaks/Services/SettingsStore.cs
• MirrorsEdgeTweaks/Services/GameDataService.cs
• MirrorsEdgeTweaks/Helpers/BackupOperationScope.cs
Patch orchestration and binary compatibility
TdGamePatcher, executable/engine patchers, and feature patch helpers apply version-aware changes to game binaries and assets. Version catalogs, address tables, PE layout inspection, bytecode/machine-code construction, and pattern matching support patches across retail, DLC, Steam, GOG, EA, and Retold variants.
• MirrorsEdgeTweaks/Services/TdGamePatcher.cs
• MirrorsEdgeTweaks/Services/ExePatcher.cs
• MirrorsEdgeTweaks/Helpers/TdGameVersionCatalog.cs
Unreal package and graphics pipeline
Graphics/UI/FOV and script-related features operate on UE3 package data: locate packages, decompress/read them through UELib/LZO-backed services, splice or generate package/bytecode content, then write patched assets. Dynamic high-resolution UI and subtitle/graphics settings are separate feature layers over this package pipeline.
• MirrorsEdgeTweaks/Services/UePackageLocator.cs
• MirrorsEdgeTweaks/Services/PackageSplicer.cs
• MirrorsEdgeTweaks/Services/GraphicsSettingsService.cs
Downloads, optional assets, and launch integration
Optional components such as tweaks scripts and audio/mod assets are resolved from an asset manifest and remote URLs, downloaded with progress, extracted/decompressed, and installed into the game. Launching and process monitoring provide the operational boundary after modifications are applied.
• assets-manifest.json
• MirrorsEdgeTweaks/Services/DownloadService.cs
• MirrorsEdgeTweaks/Services/GameLauncherService.cs
Main entry points: MainViewModel.cs Main ViewModel · TdGamePatcher.cs TdGame Patcher · GameSession.cs Game Session · GameDataService.cs Game data service
Components 20
Desktop app
- WPF App · Starts the desktop utility.
MirrorsEdgeTweaks/App.xaml.cs - Main Window · Hosts the tabbed settings UI.
MirrorsEdgeTweaks/MainWindow.xaml - Main ViewModel · Coordinates initialization, status, session, and feature view models.
MirrorsEdgeTweaks/ViewModels/MainViewModel.cs - Material theme
MirrorsEdgeTweaks/Themes/Generic.xaml
Game session
- Game Session · Maintains selected installation and detected game status.
MirrorsEdgeTweaks/ViewModels/GameSession.cs - Game path discovery
MirrorsEdgeTweaks/Helpers/UserTdGamePathHelper.cs - Steam integration · Handles Steam discovery and install-script behavior.
MirrorsEdgeTweaks/Services/SteamService.cs
Storage safety
- User settings · Stores tool preferences separately from game files.
MirrorsEdgeTweaks/Services/SettingsStore.cs - Game data service · Provides game configuration and file reads/writes.
MirrorsEdgeTweaks/Services/GameDataService.cs - Backup scope · Protects modified files and manages backup retention.
MirrorsEdgeTweaks/Helpers/BackupOperationScope.cs
Patch pipeline
- TdGame Patcher · Applies version-aware game changes.
MirrorsEdgeTweaks/Services/TdGamePatcher.cs - Executable patcher · Patches executable and engine binary content.
MirrorsEdgeTweaks/Services/ExePatcher.cs - Version catalog · Identifies supported game distribution variants.
MirrorsEdgeTweaks/Helpers/TdGameVersionCatalog.cs - Steam version metadata
MirrorsEdgeTweaks/Versions/steam.json - UE package locator · Finds UE3 assets targeted by graphics and script features.
MirrorsEdgeTweaks/Services/UePackageLocator.cs - Package splicer · Generates or splices package and bytecode content.
MirrorsEdgeTweaks/Services/PackageSplicer.cs - Graphics settings · Applies graphics, UI, subtitle, and FOV package changes.
MirrorsEdgeTweaks/Services/GraphicsSettingsService.cs
Optional assets
- Asset manifest
assets-manifest.json - Download service · Downloads, extracts, and installs optional components.
MirrorsEdgeTweaks/Services/DownloadService.cs - Game launcher · Launches and monitors the modified game.
MirrorsEdgeTweaks/Services/GameLauncherService.cs
Connections 22
- WPF App → Main Window: opens
- Main Window → Main ViewModel: binds to
- Material theme → Main Window: styles
- Main ViewModel → Game Session: coordinates
- Main ViewModel → User settings: loads preferences
- Main ViewModel → TdGame Patcher: applies changes
- Main ViewModel → Graphics settings: configures
- Main ViewModel → Download service: installs optional assets
- Main ViewModel → Game launcher: launches
- Game path discovery → Game Session: selects installation
- Steam integration → Game Session: discovers Steam install
- Version catalog → TdGame Patcher: drives compatibility
- Steam version metadata → Version catalog: defines Steam variant
- TdGame Patcher → Executable patcher: patches binaries
- TdGame Patcher → Game data service: modifies game files
- Graphics settings → UE package locator: locates packages
- UE package locator → Package splicer: supplies packages
- Package splicer → Game data service: writes patched assets
- Game data service → Backup scope: backs up before writes
- Asset manifest → Download service: resolves components
- Download service → Game data service: installs into game
- Game Session → Game launcher: provides game path