# tathxo/dsap architecture

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

- Interactive diagram: https://gitdiagram.com/tathxo/dsap
- Repository: https://github.com/tathxo/dsap

## Overview

This repository combines an Archipelago world implementation, which defines Dark Souls Remastered’s randomized items, checks, options, and logic, with a desktop client that connects Archipelago to a running game. The main player workflow is to generate a randomized world, connect the client to the server and game, then exchange items and location checks while applying game changes. The client excerpts show connection setup and memory/parameter editing; the available excerpts do not establish every runtime dispatch between the world and client subsystems.

Main entry points: [`source/DSAP/App.axaml.cs`](https://github.com/tathxo/dsap/blob/main/source/DSAP/App.axaml.cs) (Client application), [`apworld/dsr/__init__.py`](https://github.com/tathxo/dsap/blob/main/apworld/dsr/__init__.py) (World integration), [`apworld/dsr/PoolGeneration.py`](https://github.com/tathxo/dsap/blob/main/apworld/dsr/PoolGeneration.py) (Item pool), [`apworld/dsr/Rules.py`](https://github.com/tathxo/dsap/blob/main/apworld/dsr/Rules.py) (Access rules)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_world["World generation"]
  node_world_entry["World integration<br/>[__init__.py]"]
  node_options["World options<br/>[Options.py]"]
  node_regions["Region groups<br/>[Groups.py]"]
  node_pool["Item pool<br/>[PoolGeneration.py]"]
  node_logic["Access rules<br/>[Rules.py]"]
  node_skip_logic["Skip logic<br/>[Skips.py]"]
end

subgraph group_client["Desktop client"]
  node_desktop_app["Client application<br/>[App.axaml.cs]"]
  node_game_client["Process connector<br/>[DarkSoulsClient.cs]"]
  node_options_model["Slot options"]
  node_control_settings["Client controls"]
end

subgraph group_game["Game integration"]
  node_item_injection["Item lot edits<br/>[ItemLotHelper.cs]"]
  node_param_edits["Game parameter edits<br/>[ParamHelper.cs]"]
  node_event_state["Event locks<br/>[EmkController.cs]"]
end

subgraph group_data["Domain data"]
  node_items["Item definitions<br/>[Items.py]"]
  node_locations["Location definitions<br/>[Locations.py]"]
end

node_player(("Player"))
node_ap_server{{"Archipelago server"}}
node_dsr_game{{"Dark Souls game"}}

node_player -->|"configures"| node_world_entry
node_world_entry -->|"uses options"| node_options
node_world_entry -->|"builds pool"| node_pool
node_world_entry -->|"sets rules"| node_logic
node_world_entry -->|"sets skips"| node_skip_logic
node_world_entry -->|"uses groups"| node_regions
node_pool -->|"selects items"| node_items
node_pool -->|"fills checks"| node_locations
node_logic -->|"gates access"| node_locations
node_desktop_app -->|"connects process"| node_game_client
node_desktop_app -->|"connects and logs in"| node_ap_server
node_ap_server -->|"sends items"| node_desktop_app
node_desktop_app -->|"reports checks"| node_ap_server
node_desktop_app -->|"loads slot data"| node_options_model
node_desktop_app -->|"updates item lots"| node_item_injection
node_desktop_app -->|"updates parameters"| node_param_edits
node_desktop_app -->|"reads and writes memory"| node_dsr_game
node_item_injection -->|"writes item lots"| node_dsr_game
node_param_edits -->|"writes parameters"| node_dsr_game
node_control_settings -->|"changes settings"| node_desktop_app

click node_world_entry "https://github.com/tathxo/dsap/blob/main/apworld/dsr/__init__.py"
click node_options "https://github.com/tathxo/dsap/blob/main/apworld/dsr/Options.py"
click node_items "https://github.com/tathxo/dsap/blob/main/apworld/dsr/Items.py"
click node_locations "https://github.com/tathxo/dsap/blob/main/apworld/dsr/Locations.py"
click node_regions "https://github.com/tathxo/dsap/blob/main/apworld/dsr/Groups.py"
click node_pool "https://github.com/tathxo/dsap/blob/main/apworld/dsr/PoolGeneration.py"
click node_logic "https://github.com/tathxo/dsap/blob/main/apworld/dsr/Rules.py"
click node_skip_logic "https://github.com/tathxo/dsap/blob/main/apworld/dsr/Skips.py"
click node_desktop_app "https://github.com/tathxo/dsap/blob/main/source/DSAP/App.axaml.cs"
click node_game_client "https://github.com/tathxo/dsap/blob/main/source/DSAP/DarkSoulsClient.cs"
click node_options_model "https://github.com/tathxo/dsap/blob/main/source/DSAP/Models/DarkSoulsOptions.cs"
click node_item_injection "https://github.com/tathxo/dsap/blob/main/source/DSAP/Helpers/ItemLotHelper.cs"
click node_param_edits "https://github.com/tathxo/dsap/blob/main/source/DSAP/Helpers/ParamHelper.cs"
click node_event_state "https://github.com/tathxo/dsap/blob/main/source/DSAP/Models/EmkController.cs"
click node_control_settings "https://github.com/tathxo/dsap/blob/main/source/DSAP/ViewModels/DsrControlsWindowModel.cs"

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_world_entry,node_options,node_regions,node_pool,node_logic,node_skip_logic toneBlue
class node_desktop_app,node_game_client,node_options_model,node_control_settings toneAmber
class node_item_injection,node_param_edits,node_event_state,node_ap_server toneMint
class node_items,node_locations toneRose
class node_player,node_dsr_game toneIndigo
```

## Components

### World generation

- [World integration](https://github.com/tathxo/dsap/blob/main/apworld/dsr/__init__.py): `apworld/dsr/__init__.py`
- [World options](https://github.com/tathxo/dsap/blob/main/apworld/dsr/Options.py): `apworld/dsr/Options.py`
- [Region groups](https://github.com/tathxo/dsap/blob/main/apworld/dsr/Groups.py): `apworld/dsr/Groups.py`
- [Item pool](https://github.com/tathxo/dsap/blob/main/apworld/dsr/PoolGeneration.py): `apworld/dsr/PoolGeneration.py`
- [Access rules](https://github.com/tathxo/dsap/blob/main/apworld/dsr/Rules.py): `apworld/dsr/Rules.py`
- [Skip logic](https://github.com/tathxo/dsap/blob/main/apworld/dsr/Skips.py): `apworld/dsr/Skips.py`

### Desktop client

- [Client application](https://github.com/tathxo/dsap/blob/main/source/DSAP/App.axaml.cs): `source/DSAP/App.axaml.cs`
- [Process connector](https://github.com/tathxo/dsap/blob/main/source/DSAP/DarkSoulsClient.cs): `source/DSAP/DarkSoulsClient.cs`
- [Slot options](https://github.com/tathxo/dsap/blob/main/source/DSAP/Models/DarkSoulsOptions.cs): `source/DSAP/Models/DarkSoulsOptions.cs`
- [Client controls](https://github.com/tathxo/dsap/blob/main/source/DSAP/ViewModels/DsrControlsWindowModel.cs): `source/DSAP/ViewModels/DsrControlsWindowModel.cs`

### Game integration

- [Item lot edits](https://github.com/tathxo/dsap/blob/main/source/DSAP/Helpers/ItemLotHelper.cs): `source/DSAP/Helpers/ItemLotHelper.cs`
- [Game parameter edits](https://github.com/tathxo/dsap/blob/main/source/DSAP/Helpers/ParamHelper.cs): `source/DSAP/Helpers/ParamHelper.cs`
- [Event locks](https://github.com/tathxo/dsap/blob/main/source/DSAP/Models/EmkController.cs): `source/DSAP/Models/EmkController.cs`

### Domain data

- [Item definitions](https://github.com/tathxo/dsap/blob/main/apworld/dsr/Items.py): `apworld/dsr/Items.py`
- [Location definitions](https://github.com/tathxo/dsap/blob/main/apworld/dsr/Locations.py): `apworld/dsr/Locations.py`

### Other components

- **Player**
- **Archipelago server**
- **Dark Souls game**

## Connections

- Player → World integration: configures
- World integration → World options: uses options
- World integration → Item pool: builds pool
- World integration → Access rules: sets rules
- World integration → Skip logic: sets skips
- World integration → Region groups: uses groups
- Item pool → Item definitions: selects items
- Item pool → Location definitions: fills checks
- Access rules → Location definitions: gates access
- Client application → Process connector: connects process
- Client application → Archipelago server: connects and logs in
- Archipelago server → Client application: sends items
- Client application → Archipelago server: reports checks
- Client application → Slot options: loads slot data
- Client application → Item lot edits: updates item lots
- Client application → Game parameter edits: updates parameters
- Client application → Dark Souls game: reads and writes memory
- Item lot edits → Dark Souls game: writes item lots
- Game parameter edits → Dark Souls game: writes parameters
- Client controls → Client application: changes settings
