# aldrin-john-olaer-manalansan/dota-2-mod-master architecture

> Architecture diagram of the GitHub repository aldrin-john-olaer-manalansan/dota-2-mod-master, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aldrin-john-olaer-manalansan/dota-2-mod-master
- Repository: https://github.com/aldrin-john-olaer-manalansan/dota-2-mod-master

## Overview

##### Project type and purpose
- This is a desktop “All-in-One” modding tool for Dota 2, written as an AutoHotkey script (AJOM's DOTA2 MOD Master.ahk) and packaged into x86/x64/ANSI executables.
- It extracts, merges and rebuilds Dota 2 VPK archives, patches gameinfo.gi, edits items_game.txt and portraits.txt, and optionally auto-updates itself or downloads databases.

##### File structure
- Top-level:
- Executables: “(x64) AJOM’s…exe”, “(x86)…exe”, “(x86-ANSI)…exe”
- Source: AJOM’s DOTA2 MOD Master.ahk
- Configuration: README.md, Version.ini
- Plugins directory containing subfolders for each external tool:
– AutoHotkey binaries
– CRCManipulator CLI
– Decompiler.exe
– HLLib (HLExtract.exe for both x86/x64)
– Unzip.exe
– VPKCreator.exe
– Sound assets (.wav)
- Pattern: single-page GUI → orchestrates calls to external binaries → file-system operations on Steam’s Dota 2 folder → output VPK / patched files

##### Key insights from README
- Uses HLLib to extract original pak01_dir.vpk
- Manipulates items_game.txt, portraits.txt, cosmetic files (vmdl_c, vmat_c, vpcf_c, vsndevts_c, etc.)
- Merges external mod files via “External Files” system
- Generates new pak01_dir.vpk using Shutnik’s VPKCreator method
- Bypasses VAC CRC32 via custom filesize normalizer + CRCManipulator
- Optional internet connections: auto-update and database download

##### Detailed capture of essential elements
- Don’t just show “Extractor”—list HLExtract + parameters
- “CRC Bypass” as a distinct module linking CRCManipulator → gameinfo.gi
- “Sound” module hooking into Core Script for notifications
- Split “Merge Engine” from “VPK Assembly” to illustrate the separate concerns

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "User Interaction"
        UI["1. User Interface (AHK GUI)"]:::frontend
    end

    UI -->|"invoke GUI event"| Core["2. Core Script / Controller"]:::frontend

    Core -->|"load/save settings"| Settings["3. Settings Manager\n(Version.ini)"]:::fs
    Core -->|"scan steam folder"| Scanner["4. File System Scanner"]:::fs
    Scanner -->|"reads activelist.txt"| SteamFS["Steam Folder & activelist.txt"]:::fs

    Core -->|"extract assets"| Extractor["5. Extraction Engine\n(HLExtract.exe)"]:::plugin
    Extractor -->|"pak01_dir.vpk → extracted files"| Assets["Extracted Assets"]:::fs

    Core -->|"decompile resources"| Decompiler["6. Decompiler Module"]:::plugin
    Core -->|"unzip archives"| Unzip["7. Unzip Module"]:::plugin

    Core -->|"patch data files"| Patch["11. Patch Engine\n(gameinfo.gi, items_game.txt,\nportraits.txt)"]:::fs
    Patch -->|"writes modifications"| ModifiedFiles["Modified Files"]:::fs

    Core -->|"merge external mods"| Merge["10. Merge Engine\n(External Files)"]:::fs
    Merge -->|"combined mod files"| MergeResult["Merged Mod Files"]:::fs

    Core -->|"assemble VPK"| VPK["8. VPK Assembly Module\n(vpk.exe)"]:::plugin
    VPK -->|"new pak01_dir.vpk"| NewVPK["New pak01_dir.vpk"]:::fs

    Core -->|"bypass CRC"| CRC["9. CRC Bypass Module\n(crcmanip-cli.exe)"]:::plugin
    CRC -->|"patched CRC"| PatchedGI["Patched gameinfo.gi"]:::fs

    Core -->|"write output"| Output["15. Output Writer\n(Generated MOD Folder)"]:::fs
    Output -->|"deploy to game dir"| Deployment["%dota2dir%/game/Aldrin_Mods"]:::fs

    Core -->|"play notification"| Notify["12. Notification Engine\n(.wav sounds)"]:::plugin

    Core -->|"check updates"| Update["13. Update Manager\n(GitHub)"]:::network
    Update -->|"pull releases"| GitHub["GitHub Releases"]:::network

    %% Click Events
    click UI "https://github.com/aldrin-john-olaer-manalansan/dota-2-mod-master/blob/master/AJOM Innovations/AJOM's DOTA2 MOD Master/Open Source Code/AJOM's DOTA2 MOD Master.ahk"
    click Core "https://github.com/aldrin-john-olaer-manalansan/dota-2-mod-master/blob/master/AJOM Innovations/AJOM's DOTA2 MOD Master/Open Source Code/AJOM's DOTA2 MOD Master.ahk"
    click Settings "https://github.com/aldrin-john-olaer-manalansan/dota-2-mod-master/blob/master/AJOM Innovations/Version.ini"
    click Scanner "https://github.com/aldrin-john-olaer-manalansan/dota-2-mod-master/blob/master/AJOM Innovations/AJOM's DOTA2 MOD Master/Open Source Code/AJOM's DOTA2 MOD Master.ahk"
    click Extractor "https://github.com/aldrin-john-olaer-manalansan/dota-2-mod-master/blob/master/AJOM Innovations/AJOM's DOTA2 MOD Master/Plugins/HLLib/bin/x64/HLExtract.exe"
    click Decompiler "https://github.com/aldrin-john-olaer-manalansan/dota-2-mod-master/blob/master/AJOM Innovations/AJOM's DOTA2 MOD Master/Plugins/Decompiler/Decompiler.exe"
    click Unzip "https://github.com/aldrin-john-olaer-manalansan/dota-2-mod-master/blob/master/AJOM Innovations/AJOM's DOTA2 MOD Master/Plugins/Unzip/unzip.exe"
    click VPK "https://github.com/aldrin-john-olaer-manalansan/dota-2-mod-master/blob/master/AJOM Innovations/AJOM's DOTA2 MOD Master/Plugins/VPKCreator/vpk.exe"
    click CRC "https://github.com/aldrin-john-olaer-manalansan/dota-2-mod-master/blob/master/AJOM Innovations/AJOM's DOTA2 MOD Master/Plugins/CRCManipulator/crcmanip-cli.exe"
    click Notify "https://github.com/aldrin-john-olaer-manalansan/dota-2-mod-master/blob/master/AJOM Innovations/AJOM's DOTA2 MOD Master/Plugins/Sound/OperationFinished.wav"
    click Update "https://github.com/aldrin-john-olaer-manalansan/dota-2-mod-master/blob/master/AJOM Innovations/AJOM's DOTA2 MOD Master/Open Source Code/AJOM's DOTA2 MOD Master.ahk"

    %% Styles
    classDef frontend fill:#bbdefb,stroke:#1e88e5,color:#0d47a1;
    classDef plugin fill:#c8e6c9,stroke:#43a047,color:#1b5e20;
    classDef fs fill:#ffe0b2,stroke:#fb8c00,color:#e65100;
    classDef network fill:#e1bee7,stroke:#8e24aa,color:#4a148c;
```
