How theliantech/calradiaforge works
1. This repository snapshot contains documentation and release/process files only; the actual application code is not present in the tree. The architecture description below is therefore based on the README’s explicit design notes and runtime behavior.
2. CalradiaForge is a standalone WPF desktop launcher for Mount & Blade II: Bannerlord. Its primary purpose is to manage local game mods, persist modpacks, and launch the game with the selected loadout. The application is portable rather than installer-based, so its data lives alongside the executable.
3. The top-level system boundary is split into a WPF UI layer and a core logic layer. The UI handles navigation, styling, and user interaction across pages such as Mods, Modpacks, Settings, and FAQ. The core layer owns file-system access, mod detection, archive extraction, modpack persistence, launch orchestration, and logging.
4. Startup is gated by a first-run EULA flow. Before the main window opens, the app checks persisted configuration, shows a modal EULA window if needed, and either records acceptance or exits. This is an important early boundary because it controls whether the rest of the app is allowed to initialize.
5. Configuration is file-based and local. The app stores JSON config and related data in dedicated folders next to the executable: Config, Logs, Modpacks, Data, and Languages. The README describes a repository-style AppConfig for persistence and a bindable AppConfigSettings facade for UI access, separating storage concerns from view binding.
6. Mod management is centered on the game’s Modules directory. CalradiaForge scans installed modules, classifies them into active/inactive lists, validates basic mod structure such as SubModule.xml, and reacts to folder changes. The UI then manipulates this detected model by toggling active state, searching, and drag-reordering for load order.
7. Mod installation is a multi-stage pipeline owned by the service layer. Archives in .zip, .rar, or .7z are validated, extracted to a temp location, scanned to find the actual mod root, copied into the Bannerlord Modules folder, and then DLL-unblocked to remove Windows zone markings. The installer also supports version comparison, cancellation, and progress reporting.
8. Modpacks are a distinct persistence model layered on top of installed mods. A modpack captures the selected mods, their order, active/inactive state, and related metadata, then stores that definition in the Modpacks directory. The app can save, edit, restore last-used modpacks, and import external presets, including conversion from Novus Launcher formats.
9. Game launching is platform-aware but constrained to the supported platforms. Steam and GOG/Standalone are fully supported; Steam can be auto-started if needed. The launcher builds the final game invocation from the current modpack and can include BLSE-related launch behavior when applicable.
10. Logging and diagnostics are local and file-based. A singleton logger writes to the Logs folder with level gating and retention cleanup. This matters architecturally because the app is intended to be troubleshootable without network services or cloud synchronization.
11. The UI also includes a toast/notification subsystem for long-running operations. The README describes an application-wide toast overlay rendered in the main window and fed by a service that tracks visible toasts, severity, auto-dismiss behavior, and progress updates. This is the main feedback channel for install and launch workflows.
12. The services are instantiated centrally at application startup and then exposed to pages. The README emphasizes explicit dependency passing rather than global state inside helpers, so the key architectural boundary is service-owned behavior with UI-triggered actions. Long-running tasks such as mod installation remain owned by services even if the user navigates away from the current page.
13. Operationally, the app is Windows-only and depends on .NET 10 Desktop as a framework-dependent x64 runtime. It is designed for local desktop execution, local disk access, and direct interaction with an installed Bannerlord copy rather than any remote backend or web API.
14. For an architecture diagram, the main boxes should be: WPF UI shell; startup/EULA gate; configuration and data storage; mod discovery/installation pipeline; modpack persistence/import/export; game launch orchestration; logging/toast feedback; and the external Bannerlord installation plus the selected platform client when Steam is used.
Components 19
WPF UI
Shell, pages, and in-app feedback
- Main Window · Hosts navigation and application-wide overlays
- Navigation · Switches between main pages
- Mods · Shows detected modules and load order controls
- Modpacks · Manages saved and imported modpack presets
- Settings · Binds app configuration for user editing
- FAQ · Provides help and usage guidance
- Toast Overlay · Application-wide notifications and progress updates
Startup Gate
First-run consent and app bootstrap
- Startup Gate · Checks persisted state before the main window opens
- EULA Prompt · Blocks launch until first-run acceptance is recorded
Core Services
Domain services for mods, packs, launch, and diagnostics
- App Config · Bindable configuration facade used by the UI
- Mod Scanner · Detects Bannerlord modules and validates basic structure
- Installer Pipeline · Validates, extracts, copies, and unblocks mod archives
- Modpack Manager · Saves, edits, restores, and imports modpack definitions
- Format Import · Converts external preset formats into local modpacks
- Launch Orchestrator · Builds and executes the final game invocation
- Logger · Writes rotated local logs with level gating
Local Data
Portable filesystem state and external game/client dependencies
- Config Store · Reads and writes local configuration and related state
- Bannerlord · Installed game copy with Modules directory and executable
- Steam/GOG · Client used for supported platform launch behavior
Connections 26
- Startup Gate → EULA Prompt: first run · Shows consent dialog when acceptance is missing
- EULA Prompt → Config Store: persist accept · Stores EULA acceptance locally
- Startup Gate → Main Window: open app · Allows the main window to initialize after gating
- Main Window → Navigation: host · Provides navigation and shared overlays
- Navigation → Mods: shows · Routes to module management
- Navigation → Modpacks: shows · Routes to modpack management
- Navigation → Settings: shows · Routes to settings and configuration
- Navigation → FAQ: shows · Routes to help content
- Main Window → Toast Overlay: overlay · Renders global toast notifications
- Settings → App Config: binds · Edits persisted settings through a view-friendly facade
- App Config → Config Store: reads/writes · Loads and saves local configuration state
- Mods → Mod Scanner: uses · Displays detected modules and refresh state
- Mods → Installer Pipeline: installs · Triggers archive-based mod installation
- Mod Scanner → Bannerlord: scans · Reads the game Modules directory
- Installer Pipeline → Bannerlord: copies to · Extracts and installs into the game Modules folder
- Modpacks → Modpack Manager: uses · Saves, restores, and edits modpack definitions
- Modpack Manager → Config Store: persists · Stores modpack data in local folders
- Modpack Manager → Format Import: imports · Transforms external preset formats into local modpacks
- Format Import → Modpack Manager: produces · Feeds converted presets back into the manager
- Launch Orchestrator → Bannerlord: launches · Builds the final invocation from the installed game
- Launch Orchestrator → Steam/GOG: uses · Starts or coordinates Steam when required
- Launch Orchestrator → Modpack Manager: reads loadout · Uses current modpack state to build launch arguments
- Installer Pipeline → Toast Overlay: progress · Reports install status and cancellation feedback
- Launch Orchestrator → Toast Overlay: status · Reports launch progress and outcomes
- Logger → Config Store: logs to disk · Writes diagnostics into the local Logs folder
- Main Window → Logger: diagnostics · Shares startup and runtime errors locally