# angels-d/troveauto architecture

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

- Interactive diagram: https://gitdiagram.com/angels-d/troveauto
- Repository: https://github.com/angels-d/troveauto

## Overview

a. Core Automation Script:
- Central Auto-Hotkey file (TroveAuto.ahk) as the primary process that initiates the automated tasks.
b. Library Modules:
c. Supporting Tools:
- In another section, list the tools directory which houses several utilities:
- Batch installer scripts (ModInstaller.bat)
- Additional AutoHotkey scripts (StrCrypto.ahk)
- Cheat Engine tables/scripts (Trove Src.CT, Trove TP.CT)
- Demo C++ code (demo.cpp)
- These tools assist or extend the core automation process.
d. Auxiliary Data Resources:
- A block for the “钓鱼资料” folder which holds reference materials (Excel and PDF files) for fishing information. Although not directly part of the runtime automation, they provide support as documentation/training material for understanding and fine-tuning the auto-fishing functionality.

##### Architectural Patterns & Principles
- Clearly differentiate between the automation logic and the helper libraries. Think of the design in layers:
- Presentation/Action layer: The primary script handling user automation.
- Service/Module layer: Libraries that abstract lower-level memory access and game interactions.
- Utility/External Integration layer: Tools and cheat engine scripts that interface with in-game processes.

##### Incorporate Specific Project Technologies and Practices
- That the core script is developed in AutoHotkey and that the libraries are in C++ header files, suggesting mixed-language integration.
- Cheat engine components (CT files) as crucial for mapping out memory offsets and game state detection.
- That the project uses external resources (videos, forum posts, and documented offsets) to inform its runtime behavior.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Presentation/Action Layer
    subgraph "Presentation/Action Layer"
        A["Auto-Hotkey Core Script: TroveAuto.ahk"]
    end

    %% Service/Module Layer
    subgraph "Service/Module Layer"
        L1["Game.hpp"]
        L2["Memory.hpp"]
        L3["Module.hpp"]
        L4["WindowInput.hpp"]
    end

    %% Utility/External Integration Layer
    subgraph "Utility/External Integration Layer"
        T1["ModInstaller.bat"]
        T2["StrCrypto.ahk"]
        T3["Trove Src.CT"]
        T4["Trove TP.CT"]
        T5["demo.cpp"]
    end

    %% Support Documentation
    subgraph "Support Documentation"
        D1["钓鱼资料 (全鱼资料翻译.xlsx, 全鱼钓取地点.pdf)"]
    end

    %% Connections between layers
    A -->|"calls"| L1
    A -->|"calls"| L2
    A -->|"calls"| L3
    A -->|"calls"| L4

    A -->|"triggers"| T1
    A -->|"utilizes"| T2
    A -->|"integrates"| T3
    A -->|"integrates"| T4

    %% Feedback/Data flow from libraries to tools and external integration
    L2 -->|"memoryScan"| T3
    L2 -->|"memoryScan"| T4
    L2 -->|"demoUsage"| T5

    %% Core script reference to support documentation
    A -->|"fishingRef"| D1

    %% Styles
    classDef core fill:#ffedb3,stroke:#333,stroke-width:2px;
    classDef lib fill:#cce5ff,stroke:#333,stroke-width:2px;
    classDef util fill:#d4edda,stroke:#333,stroke-width:2px;
    classDef doc fill:#f8d7da,stroke:#333,stroke-width:2px;

    class A core;
    class L1,L2,L3,L4 lib;
    class T1,T2,T3,T4,T5 util;
    class D1 doc;

    %% Click Events
    click A "https://github.com/angels-d/troveauto/blob/main/TroveAuto.ahk"
    click L1 "https://github.com/angels-d/troveauto/blob/main/libs/Game.hpp"
    click L2 "https://github.com/angels-d/troveauto/blob/main/libs/Memory.hpp"
    click L3 "https://github.com/angels-d/troveauto/blob/main/libs/Module.hpp"
    click L4 "https://github.com/angels-d/troveauto/blob/main/libs/WindowInput.hpp"
    click T1 "https://github.com/angels-d/troveauto/blob/main/tools/ModInstaller.bat"
    click T2 "https://github.com/angels-d/troveauto/blob/main/tools/StrCrypto.ahk"
    click T3 "https://github.com/angels-d/troveauto/blob/main/tools/Trove Src.CT"
    click T4 "https://github.com/angels-d/troveauto/blob/main/tools/Trove TP.CT"
    click T5 "https://github.com/angels-d/troveauto/blob/main/tools/demo.cpp"
    click D1 "https://github.com/angels-d/troveauto/tree/main/钓鱼资料"
```
