# drmario901/modinjectortest architecture

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

- Interactive diagram: https://gitdiagram.com/drmario901/modinjectortest
- Repository: https://github.com/drmario901/modinjectortest

## Overview

##### Project type and purpose
- This is a small, experimental, Python-based “mod injector” client for the Wii U game Call of Duty: Black Ops II.
- It acts as a runtime memory editor by speaking the TCPGecko protocol to a custom TCPGecko server running on the console.

##### File structure
- Top-level files only:
- README.md – describes purpose, usage, high-level features.
- common.py – shared helper functions (pointer parsing, config reading, data formatting).
- tcpgecko.py – implements the low-level TCPGecko network protocol (open/close connection, read/write memory).
- modmenuinjector.py – main entrypoint and UI logic (menu system, user input handling, uses common.py + tcpgecko.py).
- No separate “frontend” vs “backend” directories, but logical layers exist in code modules.
- No build/deploy scripts—pure Python CLI.

##### README for additional insights
- The injector supports toggling menus, editing account data, calling cards, cheat toggles, dump/restore stats.
- Requires Python 2.7 and a running TCPGecko.
- Interaction flow: user → injector script → TCPGecko server on Wii U → game memory.

##### Final recommendations
- Keep it simple yet complete: capture all four core layers (UI, business logic, protocol, external).

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Layers and components
    User["User (Console)"]:::ui
    subgraph "Injector (Python CLI)"
        UI["modmenuinjector.py"]:::ui
        Helpers["common.py"]:::internal
        Protocol["tcpgecko.py"]:::internal
    end
    Server["TCPGecko Server (Wii U)"]:::external
    GameMem(("Black Ops II Game Memory")):::external

    %% Data flows
    User -->|"runs script / inputs commands"| UI
    UI -->|"calls helper functions"| Helpers
    UI -->|"invokes network/protocol methods"| Protocol
    Helpers -->|"invokes network/protocol methods"| Protocol
    Protocol -->|"TCPGecko Read/Write Commands"| Server
    Server -->|"applies patches / reads memory"| GameMem
    Server -->|"responses"| Protocol
    Protocol -->|"returns data/results"| UI

    %% Click events
    click UI "https://github.com/drmario901/modinjectortest/blob/main/modmenuinjector.py"
    click Helpers "https://github.com/drmario901/modinjectortest/blob/main/common.py"
    click Protocol "https://github.com/drmario901/modinjectortest/blob/main/tcpgecko.py"

    %% Styles
    classDef ui fill:#ccffcc,stroke:#333,stroke-width:1px
    classDef internal fill:#cce5ff,stroke:#333,stroke-width:1px
    classDef external fill:#ffddcc,stroke:#333,stroke-width:1px
```
