# ohbob/ultima-online---stealth-scripts architecture

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

- Interactive diagram: https://gitdiagram.com/ohbob/ultima-online---stealth-scripts
- Repository: https://github.com/ohbob/ultima-online---stealth-scripts

## Overview

##### Project’s Main Domains and Components
- Automation/Stealth Engine: This is the core functionality that interacts with the game (presumably Ultima Online). Look for files like “stealthScript.py”, “stealth_gate.py”, “slave.py”, “Discordance/discordance.py”, “Mining_demise_0_4.py”, and similar modules. These scripts likely provide discrete automation routines (e.g., taming, mining, and general stealth operations).
- Hotkeys and Input Handlers: There are multiple “hotkeys” scripts and a full directory called hotkeysV4 including auto-function modules. These handle user interactions, mapping specific key combinations to automation functions.
- Messenger/Integration Modules: Components under “messengers” (Discord.py and Telegram.py) indicate that the system has integrations for notifications or remote command triggering via external services.
- UI and GUI: Several directories and files support a graphical interface, such as the “gui” folder, “sampire” (which has damage counter, functions, UI and configuration), and “Tamer_helper_v1” (which includes UI and configuration files). These provide the interactive layer for the user.
- Web Interface: There is an entire “dev/stealth-web” directory which includes a SvelteKit client with both client and server build directories, configuration files, and a Python backend component in “py_stealth”. This part likely supplies a web dashboard or API for controlling or monitoring automation.
- Helper Utilities and Miscellaneous Scripts: Other standalone scripts (e.g., “create_food.py”, “obkast-middle-earth.py”, “trial.py”) and supporting modules in “helpers” provide extra utilities that round out the functionality.

##### Relationships and Interactions
- At the very core, the Automation/Stealth Engine performs game-specific operations. It is triggered via multiple input channels: direct script execution, hotkey events, GUI commands, or even remote commands from messaging integrations.
- Hotkeys and UI components act as front-end controllers and trigger the automation routines.
- Helper utilities can be seen as support libraries that each of the main modules can call upon for configuration and additional functionality (for example, UI configuration scripts and common functions).

##### Architectural Patterns and Design Principles
- Separate the concerns: input (hotkeys/GUI), core automation/business logic (stealth scripts), integration (messengers), and external interfaces (web backend and front-end).

##### Final Elements
- Detail—while the architecture is a collection of many specialized scripts, try to capture the essence of each category rather than listing every individual file.

- The core “stealth/automation” layer sits at the center.
- Input methods (hotkeys, GUI, web inputs, messaging) attach as interfaces to the core.
- The web interface is split into the modern client (SvelteKit) and a Python backend that also integrates with the automation routines.
- Shared helper utilities and configuration modules support each component.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Input Interfaces
    subgraph "Input Interfaces"
        H["Hotkeys Manager"]:::hotkeys
        G["GUI/Local Interface"]:::gui
        M["Messenger Integrations"]:::messenger
    end

    %% Web Interface Components
    subgraph "Web Interface"
        W1["Web Client (SvelteKit)"]:::webclient
        W2["Python Backend API (py_stealth)"]:::backend
    end

    %% Core Automation Layer
    C["Automation/Stealth Engine"]:::core

    %% Shared Helper Utilities
    HU["Helper Utilities"]:::helper

    %% Data Flow
    H -->|"triggers"| C
    G -->|"triggers"| C
    M -->|"triggers"| C
    W1 -->|"HTTP/WS"| W2
    W2 -->|"calls"| C

    %% Helper Utilities support all components
    HU -.-> H
    HU -.-> G
    HU -.-> M
    HU -.-> W2
    HU -.-> C

    %% Click Events for Automation/Stealth Engine Files
    click C "https://github.com/ohbob/ultima-online---stealth-scripts/blob/master/stealth_gate.py"
    click C "https://github.com/ohbob/ultima-online---stealth-scripts/blob/master/slave.py"
    click C "https://github.com/ohbob/ultima-online---stealth-scripts/blob/master/Mining_demise_0_4.py"
    click C "https://github.com/ohbob/ultima-online---stealth-scripts/blob/master/Discordance/discordance.py"
    click C "https://github.com/ohbob/ultima-online---stealth-scripts/blob/master/Lumb_dev1.py"
    click C "https://github.com/ohbob/ultima-online---stealth-scripts/blob/master/Mining_dev1.py"
    click C "https://github.com/ohbob/ultima-online---stealth-scripts/blob/master/obkast-middle-earth.py"
    click C "https://github.com/ohbob/ultima-online---stealth-scripts/blob/master/trial.py"

    %% Click Events for Hotkeys and Input Handlers
    click H "https://github.com/ohbob/ultima-online---stealth-scripts/blob/master/hotkeys.py"
    click H "https://github.com/ohbob/ultima-online---stealth-scripts/blob/master/hotkeys_demise_v1.py"
    click H "https://github.com/ohbob/ultima-online---stealth-scripts/blob/master/hotkeys_demise_v2.py"
    click H "https://github.com/ohbob/ultima-online---stealth-scripts/tree/master/hotkeysV4"

    %% Click Events for Messenger Integrations
    click M "https://github.com/ohbob/ultima-online---stealth-scripts/tree/master/messengers"

    %% Click Events for UI and GUI
    click G "https://github.com/ohbob/ultima-online---stealth-scripts/blob/master/gui/example/test_ui.py"
    click G "https://github.com/ohbob/ultima-online---stealth-scripts/blob/master/gui/example/ui_config.py"
    click G "https://github.com/ohbob/ultima-online---stealth-scripts/blob/master/sampire/damage_counter.py"
    click G "https://github.com/ohbob/ultima-online---stealth-scripts/blob/master/sampire/ui.py"
    click G "https://github.com/ohbob/ultima-online---stealth-scripts/blob/master/sampire/ui_config.py"
    click G "https://github.com/ohbob/ultima-online---stealth-scripts/blob/master/Tamer_helper_v1/ui.py"
    click G "https://github.com/ohbob/ultima-online---stealth-scripts/blob/master/Tamer_helper_v1/ui_config.py"
    click G "https://github.com/ohbob/ultima-online---stealth-scripts/blob/master/test_gui.py"
    click G "https://github.com/ohbob/ultima-online---stealth-scripts/blob/master/helpers/gui.py"

    %% Click Events for Web Interface
    click W1 "https://github.com/ohbob/ultima-online---stealth-scripts/tree/master/dev/stealth-web/client2"
    click W2 "https://github.com/ohbob/ultima-online---stealth-scripts/tree/master/dev/stealth-web/py_stealth"

    %% Click Events for Helper Utilities and Miscellaneous Scripts
    click HU "https://github.com/ohbob/ultima-online---stealth-scripts/tree/master/helpers"
    click HU "https://github.com/ohbob/ultima-online---stealth-scripts/blob/master/create_food.py"
    click HU "https://github.com/ohbob/ultima-online---stealth-scripts/blob/master/shoutout.py"
    click HU "https://github.com/ohbob/ultima-online---stealth-scripts/blob/master/textingump.py"

    %% Styles
    classDef core fill:#f8c471,stroke:#d35400,stroke-width:2px;
    classDef hotkeys fill:#82e0aa,stroke:#1e8449,stroke-width:2px;
    classDef messenger fill:#85c1e9,stroke:#2471a3,stroke-width:2px;
    classDef gui fill:#f5b7b1,stroke:#c0392b,stroke-width:2px;
    classDef webclient fill:#d7bde2,stroke:#8e44ad,stroke-width:2px;
    classDef backend fill:#d5f5e3,stroke:#27ae60,stroke-width:2px;
    classDef helper fill:#f9e79f,stroke:#b7950b,stroke-width:2px;
```
