# slackaduts/deimos-wizard101 architecture

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

- Interactive diagram: https://gitdiagram.com/slackaduts/deimos-wizard101
- Repository: https://github.com/slackaduts/deimos-wizard101

## Overview

##### Project type and purpose
- This is a desktop automation tool (written in Python) for the Wizard101 game (“Deimos”).
- It provides a GUI front end, hooks into multiple game clients, listens for hotkeys, and drives actions like auto-combat, teleporting, questing, etc.
- It also includes a small updater component (DeimosUpdater.exe/py) and uses an INI config file, a version file, and localization (locale folder).

##### File structure
Top level:
- Deimos.exe / Deimos.py – main application entry
- DeimosUpdater.exe / DeimosUpdater.py – standalone updater
- Deimos-config.ini – runtime configuration
- LatestVersion.txt – version check
- README.txt, LICENSE, requirements.txt
- .github/workflows/build.yml – CI build pipeline
- locale/ – translation templates
- src/ – all core Python modules

src/ directory (core engine modules):
- deimosgui.py – GUI layout, menu, bot/fly-through creators
- command_parser.py, tokenizer.py – parse user commands/hotkeys
- gui_inputs.py – map hotkeys to engine calls
- combat_*.py, effect_simulation.py, combat_utils.py – combat subsystem
- teleport_math.py, paths.py, camera_utils.py, collision*.py – movement & positioning
- questing.py, sigil.py, sprinty_client.py – higher-level game features
- drop_logger.py, utils.py – logging & shared helpers

##### README for additional insights
- Describes runtime behavior: positioning of wizard clients, config of hotkeys, kill/relaunch mechanism.
- Mentions a Discord wiki for advanced scripting.

##### Final advice
Level 1: high-level (GUI, Engine, Clients, Updater)
Level 2: expand Engine into its major subsystems
- Clarity: component names must match code filenames for easy cross-reference

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Presentation Layer
    subgraph "Presentation Layer"
        GUI["GUI Layer\ndeimosgui.py"]:::presentation
    end

    %% Core Engine
    subgraph "Core Engine" 
        direction TB
        IM["Input & Hotkey Manager\ngui_inputs.py"]:::core
        CP["Command Parser\ncommand_parser.py, tokenizer.py"]:::core

        subgraph "Movement & Positioning" 
            TM["teleport_math.py"]:::core
            PS["paths.py"]:::core
            CU["camera_utils.py"]:::core
            CL["collision.py, collision_math.py"]:::core
        end

        subgraph "Combat Subsystem"
            CN["combat_new.py"]:::core
            CU2["combat_utils.py"]:::core
            CM["combat_math.py"]:::core
            CC["combat_cache.py"]:::core
            CO["combat_objects.py"]:::core
            ES["effect_simulation.py"]:::core
            CC2["config_combat.py"]:::core
            AP["auto_pet.py"]:::core
        end

        subgraph "Questing & Sigil"
            Q["questing.py"]:::core
            S["sigil.py"]:::core
        end

        subgraph "Logging & Utilities"
            DL["drop_logger.py"]:::support
            U["utils.py"]:::support
            SV["stat_viewer.py"]:::support
        end
    end

    %% Main Application Entry
    MA["Main Application\nDeimos.py / Deimos.exe"]:::presentation

    %% External Game Clients
    GC["Wizard101 Game Clients"]:::external

    %% Support Components
    subgraph "Support Components"
        CS["Config Store\nDeimos-config.ini"]:::support
        LV["Version File\nLatestVersion.txt"]:::support
        LF["Localization\nlocale/base.pot"]:::support
        UPD["Updater\nDeimosUpdater.py / DeimosUpdater.exe"]:::support
        CI["CI Pipeline\n.github/workflows/build.yml"]:::support
        GH["GitHub Update Source"]:::external
    end

    %% Flows
    User([User]):::external -->|uses| GUI
    GUI -->|registers hotkeys| IM
    IM -->|Hotkey Event| CP
    CP -->|dispatch commands| TM
    CP -->|dispatch commands| CN
    CP -->|dispatch commands| Q
    TM -->|Memory Read/Write| GC
    CN -->|Input Simulation| GC
    Q -->|Memory Read| GC
    DL -->|logs events| DL
    CN -->|logs events| DL
    Q -->|logs events| DL
    GUI -->|load/save config| CS
    UPD -->|reads version| LV
    UPD -->|checks updates| GH
    UPD -->|updates app| MA
    MA -->|starts GUI| GUI

    %% Click Events
    click GUI "https://github.com/slackaduts/deimos-wizard101/blob/master/src/deimosgui.py"
    click IM "https://github.com/slackaduts/deimos-wizard101/blob/master/src/gui_inputs.py"
    click CP "https://github.com/slackaduts/deimos-wizard101/blob/master/src/command_parser.py"
    click CP "https://github.com/slackaduts/deimos-wizard101/blob/master/src/tokenizer.py"
    click TM "https://github.com/slackaduts/deimos-wizard101/blob/master/src/teleport_math.py"
    click PS "https://github.com/slackaduts/deimos-wizard101/blob/master/src/paths.py"
    click CU "https://github.com/slackaduts/deimos-wizard101/blob/master/src/camera_utils.py"
    click CL "https://github.com/slackaduts/deimos-wizard101/blob/master/src/collision.py"
    click CL "https://github.com/slackaduts/deimos-wizard101/blob/master/src/collision_math.py"
    click CN "https://github.com/slackaduts/deimos-wizard101/blob/master/src/combat_new.py"
    click CU2 "https://github.com/slackaduts/deimos-wizard101/blob/master/src/combat_utils.py"
    click CM "https://github.com/slackaduts/deimos-wizard101/blob/master/src/combat_math.py"
    click CC "https://github.com/slackaduts/deimos-wizard101/blob/master/src/combat_cache.py"
    click CO "https://github.com/slackaduts/deimos-wizard101/blob/master/src/combat_objects.py"
    click ES "https://github.com/slackaduts/deimos-wizard101/blob/master/src/effect_simulation.py"
    click CC2 "https://github.com/slackaduts/deimos-wizard101/blob/master/src/config_combat.py"
    click AP "https://github.com/slackaduts/deimos-wizard101/blob/master/src/auto_pet.py"
    click Q "https://github.com/slackaduts/deimos-wizard101/blob/master/src/questing.py"
    click S "https://github.com/slackaduts/deimos-wizard101/blob/master/src/sigil.py"
    click DL "https://github.com/slackaduts/deimos-wizard101/blob/master/src/drop_logger.py"
    click U "https://github.com/slackaduts/deimos-wizard101/blob/master/src/utils.py"
    click SV "https://github.com/slackaduts/deimos-wizard101/blob/master/src/stat_viewer.py"
    click GC "https://github.com/slackaduts/deimos-wizard101/blob/master/src/sprinty_client.py"
    click GC "https://github.com/slackaduts/deimos-wizard101/blob/master/src/dance_game_hook.py"
    click GC "https://github.com/slackaduts/deimos-wizard101/blob/master/src/discsdk.py"
    click MA "https://github.com/slackaduts/deimos-wizard101/blob/master/Deimos.py"
    click MA "https://github.com/slackaduts/deimos-wizard101/blob/master/Deimos.exe"
    click UPD "https://github.com/slackaduts/deimos-wizard101/blob/master/DeimosUpdater.py"
    click UPD "https://github.com/slackaduts/deimos-wizard101/blob/master/DeimosUpdater.exe"
    click CS "https://github.com/slackaduts/deimos-wizard101/blob/master/Deimos-config.ini"
    click LV "https://github.com/slackaduts/deimos-wizard101/blob/master/LatestVersion.txt"
    click LF "https://github.com/slackaduts/deimos-wizard101/blob/master/locale/base.pot"
    click CI "https://github.com/slackaduts/deimos-wizard101/blob/master/.github/workflows/build.yml"

    %% Styles
    classDef presentation fill:#D0E6FF,stroke:#004C99,stroke-width:1px
    classDef core fill:#DFF2BF,stroke:#4F8A10,stroke-width:1px
    classDef support fill:#F0F0F0,stroke:#888888,stroke-width:1px
    classDef external fill:#FFE0B2,stroke:#FF8C00,stroke-width:1px
```
