# wotcstrategyoverhaul/covertinfiltration architecture

> Architecture diagram of the GitHub repository wotcstrategyoverhaul/covertinfiltration, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/wotcstrategyoverhaul/covertinfiltration
- Repository: https://github.com/wotcstrategyoverhaul/covertinfiltration

## Overview

##### Main Components
- Build & Scripting Infrastructure:
- .scripts directory contains build scripts (both PowerShell and targets files) along with a submodule for X2ModBuildCommon. This component handles the automation of compiling, cleaning outputs, and preparing the mod for deployment.
- .vscode directory indicates that there is VSCode integration for development.

- Mod Core / Engine Back-end:
- The “CovertInfiltration” directory houses configuration files (in subdirectory “Config”) that define settings (like XComGame.ini, XComEngine.ini) required for the mod’s integration with the game.
- The “Src” folder contains extensive UnrealScript source code with submodules for mod functionality. This includes:
▪ Core game logic classes (e.g., CovertInfiltration/Classes) which implement new UI elements, game state modifications, event listeners (e.g., UIListener_*, XComGameState_*), and gameplay logic.
▪ Additional modules such as ModConfigMenuAPI (providing extension points for mod configuration menus) and LW_Tuple for tuple handling.

- Content / Assets:
- The “Content” folder (and “ContentForCook”) contains maps and other asset files (.umap, .upk) that define physical game layouts and visuals (including mission maps, sketches for cinematics, etc.).
- The “CookedPCConsole” folder suggests the prepared/compiled version of the mod content tailored for certain platforms.

- Localization:
- The “Localization” folder holds several language-specific files (Int and ESN/FRA/RUS files) that ensure the mod is accessible to different regions.

- External Dependencies and Integration Points:
- The project depends on external mods such as X2WOTCCommunityHighlander, SquadSelectAnyTime, and robojumperSquadSelect. These should be depicted as external services or modules that the mod integrates with at runtime.
- The README specifically calls out that these dependencies are needed to run the mod.

##### Relationships and Data Flows
- Build Process:
- Dependency from the build scripts (in .scripts) to both the source code (Src) and asset directories (Content, ContentForCook). Indicate that these scripts prepare the mod for packaging and cooking.

- Mod Game Logic Interaction:

- Configuration and Customization:
- Relationship between the Config files in “CovertInfiltration/Config” and how these are used by both the game state classes and the mod configuration API (found in Src/ModConfigMenuAPI). This indicates run-time configuration adjustments.

- Localization:
- A component for Localization that feeds language-specific content into the mod (e.g., text strings in UI and logging macros).

- External Integrations:

##### Architectural Patterns and Design Principles
- Separation of Concerns:

- Naming Conventions and Code Organization:

- Modularity and Extensibility:

- External Integration:
- The dependencies on external mods highlight an integration-focused architecture where your code interacts with underlying game systems. This can be represented by drawing interface connectors between your mod’s core system and external mod services.

## Diagram (Mermaid)

```mermaid
graph TD
    subgraph "Build & Scripting Infrastructure"
        BS["Build Scripts & Tools"]:::codeModule
        VS["VSCode Integration"]:::codeModule
    end

    subgraph "Mod Core / Engine Back-end"
        CONF["Configuration"]:::configuration
        CORE["Core Game Logic"]:::codeModule
        UI["UI & Event Handlers"]:::codeModule
        TUP["Tuple Handling Module"]:::codeModule
        MODCFG["Mod Configuration API"]:::codeModule
    end

    subgraph "Content / Assets"
        CONTENT["Content & Assets"]:::asset
        COOK["Additional Cookable Assets"]:::asset
        COMPILED["Compiled/Cooked Content"]:::asset
    end

    subgraph "Localization"
        LOC["Localization"]:::localization
    end

    subgraph "External Dependencies"
        EXT1["X2WOTCCommunityHighlander"]:::external
        EXT2["SquadSelectAnyTime"]:::external
        EXT3["robojumperSquadSelect"]:::external
    end

    %% Build Process Arrows
    BS -->|"builds"| CORE
    BS -->|"packages"| CONTENT
    BS -->|"packages"| COOK

    %% Configuration Relationships
    CONF -->|"runtime_configuration_injection"| CORE
    CONF -->|"config_sync"| MODCFG

    %% Mod Game Logic Interaction
    CORE -->|"triggers"| UI
    CORE -->|"external_integration"| EXT1
    UI -->|"integrates_with"| EXT1
    UI -->|"integrates_with"| EXT2
    UI -->|"integrates_with"| EXT3

    %% Localization feeds UI
    LOC -->|"feeds"| UI

    %% Click Events
    click BS "https://github.com/wotcstrategyoverhaul/covertinfiltration/blob/master/.scripts"
    click VS "https://github.com/wotcstrategyoverhaul/covertinfiltration/blob/master/.vscode"
    click CONF "https://github.com/wotcstrategyoverhaul/covertinfiltration/tree/master/CovertInfiltration/Config"
    click CORE "https://github.com/wotcstrategyoverhaul/covertinfiltration/tree/master/CovertInfiltration/Src/CovertInfiltration/Classes"
    click TUP "https://github.com/wotcstrategyoverhaul/covertinfiltration/tree/master/CovertInfiltration/Src/LW_Tuple"
    click MODCFG "https://github.com/wotcstrategyoverhaul/covertinfiltration/tree/master/CovertInfiltration/Src/ModConfigMenuAPI"
    click CONTENT "https://github.com/wotcstrategyoverhaul/covertinfiltration/tree/master/CovertInfiltration/Content"
    click COOK "https://github.com/wotcstrategyoverhaul/covertinfiltration/tree/master/CovertInfiltration/ContentForCook"
    click COMPILED "https://github.com/wotcstrategyoverhaul/covertinfiltration/tree/master/CovertInfiltration/CookedPCConsole"
    click LOC "https://github.com/wotcstrategyoverhaul/covertinfiltration/tree/master/CovertInfiltration/Localization"
    click EXT1 "https://github.com/wotcstrategyoverhaul/covertinfiltration/tree/master/X2WOTCCommunityHighlander"
    click EXT2 "https://github.com/wotcstrategyoverhaul/covertinfiltration/tree/master/SquadSelectAnyTime"
    click EXT3 "https://github.com/wotcstrategyoverhaul/covertinfiltration/tree/master/robojumperSquadSelect"

    %% Styles
    classDef codeModule fill:#BBDEFB,stroke:#0D47A1,stroke-width:2px;
    classDef configuration fill:#FFF59D,stroke:#F9A825,stroke-width:2px;
    classDef asset fill:#C8E6C9,stroke:#1B5E20,stroke-width:2px;
    classDef external fill:#FFCC80,stroke:#E65100,stroke-width:2px;
    classDef localization fill:#E1BEE7,stroke:#6A1B9A,stroke-width:2px;
```
