# syfoud/simulated_scepter architecture

> Architecture diagram of the GitHub repository syfoud/simulated_scepter, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/syfoud/simulated_scepter
- Repository: https://github.com/syfoud/simulated_scepter

## Overview

Simulated Scepter is a desktop automation assistant for Honkai: Star Rail’s Simulated Universe modes. The principal workflow is: the player starts a mode in the GUI, automation interprets the game’s visible UI and map, then issues keyboard and mouse actions to advance gameplay. The repository also documents separate currency-war collection, combat and targeting enhancements, map analysis, and video recording. The graph combines README-described capabilities with sampled source and source-index references; some unsampled implementation links are therefore omitted.

Main entry points: [`new_gui.py`](https://github.com/syfoud/simulated_scepter/blob/master/new_gui.py) (Desktop GUI), [`simul.py`](https://github.com/syfoud/simulated_scepter/blob/master/simul.py) (Universe Runner), [`diver.py`](https://github.com/syfoud/simulated_scepter/blob/master/diver.py) (Diver Automation), [`currency.py`](https://github.com/syfoud/simulated_scepter/blob/master/currency.py) (Currency War)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_gui["Desktop GUI<br/>[new_gui.py]"]
  node_logger["UI Logging<br/>[log.py]"]
end

subgraph group_game["Universe Automation"]
  node_universe["Universe Runner<br/>[simul.py]"]
  node_diver["Diver Automation<br/>[diver.py]"]
  node_route["Route Utilities<br/>[route.py]"]
  node_ironblood["Iron Blood<br/>[iron_blood.py]"]
  node_combat["Targeting Support"]
end

subgraph group_vision["Vision and Navigation"]
  node_mapanalysis["Map Analysis<br/>[analysis_map.py]"]
  node_minimap["Minimap Processing<br/>[minimap_util.py]"]
  node_images["Image Matching<br/>[image_tool.py]"]
  node_ocr["OCR Interface<br/>[public_ocr.py]"]
  node_onnx["ONNX OCR<br/>[onnx_paddleocr.py]"]
end

subgraph group_features["Special Modes"]
  node_currency["Currency War<br/>[currency.py]"]
  node_currencyocr["Currency OCR<br/>[ocr.py]"]
  node_investment["Investment State"]
  node_finger["Finger Snap<br/>[finger_snap.py]"]
  node_treasure["Divine Treasure"]
  node_countdown["Countdown Evaluator"]
end

subgraph group_platform["Interaction and Support"]
  node_recorder["Video Recorder<br/>[window_recorder.py]"]
  node_input["Keyboard Mouse Manager"]
  node_window["Game Window<br/>[game_window.py]"]
end

node_player(("Player"))
node_gameui["Game UI"]

node_player -->|"starts mode"| node_gui
node_gui -->|"starts automation"| node_universe
node_gui -->|"starts automation"| node_diver
node_gui -->|"starts collection"| node_currency
node_gui -->|"starts mode"| node_ironblood
node_gui -->|"starts mode"| node_finger
node_gui -->|"starts mode"| node_treasure
node_universe -->|"uses analysis"| node_mapanalysis
node_universe -->|"uses minimap"| node_minimap
node_universe -->|"matches images"| node_images
node_universe -->|"controls recording"| node_recorder
node_diver -->|"matches images"| node_images
node_diver -.->|"issues controls"| node_input
node_currency -->|"uses OCR"| node_currencyocr
node_currency -.->|"uses state"| node_investment
node_currencyocr -->|"runs inference"| node_onnx
node_ocr -.->|"uses inference"| node_onnx
node_treasure -->|"uses window"| node_window
node_treasure -->|"uses OCR"| node_onnx
node_combat -->|"switches character"| node_input
node_combat -->|"reads skill points"| node_ocr
node_gui -.->|"displays logs"| node_logger
node_universe -.->|"reads visible UI"| node_gameui
node_input -.->|"simulates controls"| node_gameui

click node_gui "https://github.com/syfoud/simulated_scepter/blob/master/new_gui.py"
click node_logger "https://github.com/syfoud/simulated_scepter/blob/master/tool/log.py"
click node_universe "https://github.com/syfoud/simulated_scepter/blob/master/simul.py"
click node_diver "https://github.com/syfoud/simulated_scepter/blob/master/diver.py"
click node_route "https://github.com/syfoud/simulated_scepter/blob/master/route.py"
click node_ironblood "https://github.com/syfoud/simulated_scepter/blob/master/iron_blood.py"
click node_combat "https://github.com/syfoud/simulated_scepter/blob/master/tool/silver_wolf_manager.py"
click node_mapanalysis "https://github.com/syfoud/simulated_scepter/blob/master/tool/utils/analysis_map.py"
click node_minimap "https://github.com/syfoud/simulated_scepter/blob/master/tool/utils/minimap_util.py"
click node_images "https://github.com/syfoud/simulated_scepter/blob/master/tool/utils/image_tool.py"
click node_ocr "https://github.com/syfoud/simulated_scepter/blob/master/tool/public_ocr.py"
click node_onnx "https://github.com/syfoud/simulated_scepter/blob/master/tool/onnxocr/onnx_paddleocr.py"
click node_currency "https://github.com/syfoud/simulated_scepter/blob/master/currency.py"
click node_currencyocr "https://github.com/syfoud/simulated_scepter/blob/master/tool/currency/ocr.py"
click node_investment "https://github.com/syfoud/simulated_scepter/blob/master/tool/currency/investment_state.py"
click node_finger "https://github.com/syfoud/simulated_scepter/blob/master/finger_snap.py"
click node_treasure "https://github.com/syfoud/simulated_scepter/blob/master/divine_treasure_entry.py"
click node_countdown "https://github.com/syfoud/simulated_scepter/blob/master/tool/countdown_evaluator.py"
click node_recorder "https://github.com/syfoud/simulated_scepter/blob/master/tool/window_recorder.py"
click node_input "https://github.com/syfoud/simulated_scepter/blob/master/tool/key_mouse_manager.py"
click node_window "https://github.com/syfoud/simulated_scepter/blob/master/tool/utils/game_window.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_gui,node_logger,node_gameui toneBlue
class node_universe,node_diver,node_route,node_ironblood,node_combat toneAmber
class node_mapanalysis,node_minimap,node_images,node_ocr,node_onnx toneMint
class node_currency,node_currencyocr,node_investment,node_finger,node_treasure,node_countdown toneRose
class node_recorder,node_input,node_window,node_player toneIndigo
```

## Components

### Application

- [Desktop GUI](https://github.com/syfoud/simulated_scepter/blob/master/new_gui.py): `new_gui.py`
- [UI Logging](https://github.com/syfoud/simulated_scepter/blob/master/tool/log.py): `tool/log.py`

### Universe Automation

- [Universe Runner](https://github.com/syfoud/simulated_scepter/blob/master/simul.py): `simul.py`
- [Diver Automation](https://github.com/syfoud/simulated_scepter/blob/master/diver.py): `diver.py`
- [Route Utilities](https://github.com/syfoud/simulated_scepter/blob/master/route.py): `route.py`
- [Iron Blood](https://github.com/syfoud/simulated_scepter/blob/master/iron_blood.py): `iron_blood.py`
- [Targeting Support](https://github.com/syfoud/simulated_scepter/blob/master/tool/silver_wolf_manager.py): `tool/silver_wolf_manager.py`

### Vision and Navigation

- [Map Analysis](https://github.com/syfoud/simulated_scepter/blob/master/tool/utils/analysis_map.py): `tool/utils/analysis_map.py`
- [Minimap Processing](https://github.com/syfoud/simulated_scepter/blob/master/tool/utils/minimap_util.py): `tool/utils/minimap_util.py`
- [Image Matching](https://github.com/syfoud/simulated_scepter/blob/master/tool/utils/image_tool.py): `tool/utils/image_tool.py`
- [OCR Interface](https://github.com/syfoud/simulated_scepter/blob/master/tool/public_ocr.py): `tool/public_ocr.py`
- [ONNX OCR](https://github.com/syfoud/simulated_scepter/blob/master/tool/onnxocr/onnx_paddleocr.py): `tool/onnxocr/onnx_paddleocr.py`

### Special Modes

- [Currency War](https://github.com/syfoud/simulated_scepter/blob/master/currency.py): `currency.py`
- [Currency OCR](https://github.com/syfoud/simulated_scepter/blob/master/tool/currency/ocr.py): `tool/currency/ocr.py`
- [Investment State](https://github.com/syfoud/simulated_scepter/blob/master/tool/currency/investment_state.py): `tool/currency/investment_state.py`
- [Finger Snap](https://github.com/syfoud/simulated_scepter/blob/master/finger_snap.py): `finger_snap.py`
- [Divine Treasure](https://github.com/syfoud/simulated_scepter/blob/master/divine_treasure_entry.py): `divine_treasure_entry.py`
- [Countdown Evaluator](https://github.com/syfoud/simulated_scepter/blob/master/tool/countdown_evaluator.py): `tool/countdown_evaluator.py`

### Interaction and Support

- [Video Recorder](https://github.com/syfoud/simulated_scepter/blob/master/tool/window_recorder.py): `tool/window_recorder.py`
- [Keyboard Mouse Manager](https://github.com/syfoud/simulated_scepter/blob/master/tool/key_mouse_manager.py): `tool/key_mouse_manager.py`
- [Game Window](https://github.com/syfoud/simulated_scepter/blob/master/tool/utils/game_window.py): `tool/utils/game_window.py`

### Other components

- **Player**
- **Game UI**

## Connections

- Player → Desktop GUI: starts mode (evidence: `README.md`)
- Desktop GUI → Universe Runner: starts automation (evidence: `new_gui.py`)
- Desktop GUI → Diver Automation: starts automation (evidence: `new_gui.py`)
- Desktop GUI → Currency War: starts collection (evidence: `new_gui.py`)
- Desktop GUI → Iron Blood: starts mode (evidence: `new_gui.py`)
- Desktop GUI → Finger Snap: starts mode (evidence: `new_gui.py`)
- Desktop GUI → Divine Treasure: starts mode (evidence: `new_gui.py`)
- Universe Runner → Map Analysis: uses analysis (evidence: `simul.py`)
- Universe Runner → Minimap Processing: uses minimap (evidence: `simul.py`)
- Universe Runner → Image Matching: matches images (evidence: `simul.py`)
- Universe Runner → Video Recorder: controls recording (evidence: `simul.py`)
- Diver Automation → Image Matching: matches images (evidence: `diver.py`)
- Diver Automation → Keyboard Mouse Manager: issues controls
- Currency War → Currency OCR: uses OCR (evidence: `tool/currency/ocr.py`)
- Currency War → Investment State: uses state
- Currency OCR → ONNX OCR: runs inference (evidence: `tool/currency/ocr.py`)
- OCR Interface → ONNX OCR: uses inference
- Divine Treasure → Game Window: uses window (evidence: `divine_treasure_entry.py`)
- Divine Treasure → ONNX OCR: uses OCR (evidence: `divine_treasure_entry.py`)
- Targeting Support → Keyboard Mouse Manager: switches character (evidence: `tool/silver_wolf_manager.py`)
- Targeting Support → OCR Interface: reads skill points (evidence: `tool/silver_wolf_manager.py`)
- Desktop GUI → UI Logging: displays logs (evidence: `new_gui.py`)
- Universe Runner → Game UI: reads visible UI
- Keyboard Mouse Manager → Game UI: simulates controls
