# pmdcollab/pmdc architecture

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

- Interactive diagram: https://gitdiagram.com/pmdcollab/pmdc
- Repository: https://github.com/pmdcollab/pmdc

## Overview

PMDC is a RogueEssence game extension providing monster data, dungeon combat and AI, procedural floor generation, and developer-facing data editors. The principal workflow spans spawn configuration, floor generation and monster spawning, then tactical decision-making and battle effects during dungeon play. The README only documents running the game and server; it does not describe gameplay features, so major branches here are based on the supplied source index and excerpts. Links are limited to relationships evidenced in those materials; unsampled subsystems are represented without speculative call chains.

Main entry points: [`PMDC/LevelGen/Spawning/MobSpawn/MobSpawnExtra.cs`](https://github.com/pmdcollab/pmdc/blob/master/PMDC/LevelGen/Spawning/MobSpawn/MobSpawnExtra.cs) (Spawn configuration), [`PMDC/Dev/DevHelper.cs`](https://github.com/pmdcollab/pmdc/blob/master/PMDC/Dev/DevHelper.cs) (Developer utilities), [`PMDC/Program.cs`](https://github.com/pmdcollab/pmdc/blob/master/PMDC/Program.cs) (Game runtime), [`PMDC/Dungeon/AI/AIPlan.cs`](https://github.com/pmdcollab/pmdc/blob/master/PMDC/Dungeon/AI/AIPlan.cs) (Tactical AI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_g_data["Monster data"]
  node_monster_forms["Monster forms<br/>[MonsterFormData.cs]"]
  node_monster_features["Monster features"]
  node_evolution["Evolution rules<br/>[PromoteBranch.cs]"]
  node_rarity["Spawn rarity<br/>[RarityData.cs]"]
end

subgraph group_g_gen["Dungeon generation"]
  node_spawn_config["Spawn configuration<br/>[MobSpawnExtra.cs]"]
  node_mob_checks["Spawn checks<br/>[MobSpawnCheck.cs]"]
  node_floor_generation["Floor generation"]
  node_room_generation["Room generation"]
  node_floor_features["Floor features"]
  node_zone_steps["Zone configuration"]
  node_spawners["Team spawners"]
end

subgraph group_g_play["Dungeon gameplay"]
  node_game["Game runtime<br/>[Program.cs]"]
  node_ai["Tactical AI<br/>[AIPlan.cs]"]
  node_ai_plans["Behavior plans"]
  node_battle_events["Battle effects<br/>[BattleEvent.cs]"]
  node_status_events["Status effects"]
  node_context_state["Battle context<br/>[ContextState.cs]"]
  node_character_events["Character events<br/>[SingleCharEvent.cs]"]
  node_status_state["Status state<br/>[StatusState.cs]"]
end

subgraph group_g_dev["Developer tools"]
  node_dev_helper["Developer utilities<br/>[DevHelper.cs]"]
  node_spawn_editor["Spawn editor model"]
  node_spawn_view["Spawn editor view"]
  node_strategy_guide["Strategy guide<br/>[StrategyGuide.cs]"]
  node_editors["Data editors"]
end

node_player(("Game player"))

node_player -->|"starts"| node_game
node_game -->|"runs indexing"| node_dev_helper
node_dev_helper -->|"reads"| node_evolution
node_dev_helper -->|"scans"| node_spawn_config
node_dev_helper -->|"scans"| node_zone_steps
node_spawn_config -->|"uses form data"| node_monster_forms
node_spawn_config -->|"uses rarity"| node_rarity
node_spawn_config -->|"uses features"| node_monster_features
node_spawn_config -->|"uses branches"| node_evolution
node_spawn_config -->|"configures events"| node_battle_events
node_spawn_config -.->|"checks eligibility"| node_mob_checks
node_floor_generation -.->|"uses room steps"| node_room_generation
node_floor_generation -.->|"configures tiles"| node_floor_features
node_zone_steps -.->|"configures floors"| node_floor_generation
node_spawners -.->|"uses spawn rules"| node_spawn_config
node_game -.->|"runs dungeon AI"| node_ai
node_ai -.->|"uses plans"| node_ai_plans
node_ai -->|"references effects"| node_battle_events
node_ai -->|"references status events"| node_status_events
node_battle_events -->|"specializes"| node_status_events
node_battle_events -->|"uses context"| node_context_state
node_status_events -->|"reads status"| node_status_state
node_status_events -->|"applies to characters"| node_character_events
node_spawn_view -->|"edits model"| node_spawn_editor
node_spawn_editor -->|"loads forms"| node_monster_forms
node_spawn_editor -->|"edits spawn data"| node_spawn_config
node_game -->|"registers editors"| node_editors
node_strategy_guide -->|"uses utilities"| node_dev_helper
node_strategy_guide -->|"reads forms"| node_monster_forms

click node_game "https://github.com/pmdcollab/pmdc/blob/master/PMDC/Program.cs"
click node_monster_forms "https://github.com/pmdcollab/pmdc/blob/master/PMDC/Data/MonsterFormData.cs"
click node_monster_features "https://github.com/pmdcollab/pmdc/blob/master/PMDC/Data/MonsterFeatureData.cs"
click node_evolution "https://github.com/pmdcollab/pmdc/blob/master/PMDC/Data/PromoteBranch.cs"
click node_rarity "https://github.com/pmdcollab/pmdc/blob/master/PMDC/Data/RarityData.cs"
click node_spawn_config "https://github.com/pmdcollab/pmdc/blob/master/PMDC/LevelGen/Spawning/MobSpawn/MobSpawnExtra.cs"
click node_mob_checks "https://github.com/pmdcollab/pmdc/blob/master/PMDC/LevelGen/Spawning/MobSpawn/MobSpawnCheck.cs"
click node_floor_generation "https://github.com/pmdcollab/pmdc/tree/master/PMDC/LevelGen/Floors/GenSteps"
click node_room_generation "https://github.com/pmdcollab/pmdc/tree/master/PMDC/LevelGen/Floors/GenSteps/Rooms"
click node_floor_features "https://github.com/pmdcollab/pmdc/tree/master/PMDC/LevelGen/Floors/GenSteps"
click node_zone_steps "https://github.com/pmdcollab/pmdc/tree/master/PMDC/LevelGen/Zones/ZoneSteps"
click node_spawners "https://github.com/pmdcollab/pmdc/tree/master/PMDC/LevelGen/Spawning"
click node_ai "https://github.com/pmdcollab/pmdc/blob/master/PMDC/Dungeon/AI/AIPlan.cs"
click node_ai_plans "https://github.com/pmdcollab/pmdc/tree/master/PMDC/Dungeon/AI"
click node_battle_events "https://github.com/pmdcollab/pmdc/blob/master/PMDC/Dungeon/GameEffects/BattleEvent/BattleEvent.cs"
click node_status_events "https://github.com/pmdcollab/pmdc/blob/master/PMDC/Dungeon/GameEffects/BattleEvent/StatusBattleEvent.cs"
click node_context_state "https://github.com/pmdcollab/pmdc/blob/master/PMDC/Dungeon/GameEffects/ContextState.cs"
click node_character_events "https://github.com/pmdcollab/pmdc/blob/master/PMDC/Dungeon/GameEffects/SingleCharEvent.cs"
click node_status_state "https://github.com/pmdcollab/pmdc/blob/master/PMDC/Dungeon/GameEffects/StatusState.cs"
click node_dev_helper "https://github.com/pmdcollab/pmdc/blob/master/PMDC/Dev/DevHelper.cs"
click node_spawn_editor "https://github.com/pmdcollab/pmdc/blob/master/PMDC/Dev/ViewModels/TeamMemberSpawn/TeamMemberSpawnModel.cs"
click node_spawn_view "https://github.com/pmdcollab/pmdc/blob/master/PMDC/Dev/Views/UserControls/TeamMemberSpawnView.axaml.cs"
click node_strategy_guide "https://github.com/pmdcollab/pmdc/blob/master/PMDC/Dev/StrategyGuide.cs"
click node_editors "https://github.com/pmdcollab/pmdc/tree/master/PMDC/Dev/Editors"

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_monster_forms,node_monster_features,node_evolution,node_rarity toneBlue
class node_spawn_config,node_mob_checks,node_floor_generation,node_room_generation,node_floor_features,node_zone_steps,node_spawners toneAmber
class node_game,node_ai,node_ai_plans,node_battle_events,node_status_events,node_context_state,node_character_events,node_status_state toneMint
class node_dev_helper,node_spawn_editor,node_spawn_view,node_strategy_guide,node_editors toneRose
class node_player toneIndigo
```

## Components

### Monster data

- [Monster forms](https://github.com/pmdcollab/pmdc/blob/master/PMDC/Data/MonsterFormData.cs): `PMDC/Data/MonsterFormData.cs`
- [Monster features](https://github.com/pmdcollab/pmdc/blob/master/PMDC/Data/MonsterFeatureData.cs): `PMDC/Data/MonsterFeatureData.cs`
- [Evolution rules](https://github.com/pmdcollab/pmdc/blob/master/PMDC/Data/PromoteBranch.cs): `PMDC/Data/PromoteBranch.cs`
- [Spawn rarity](https://github.com/pmdcollab/pmdc/blob/master/PMDC/Data/RarityData.cs): `PMDC/Data/RarityData.cs`

### Dungeon generation

- [Spawn configuration](https://github.com/pmdcollab/pmdc/blob/master/PMDC/LevelGen/Spawning/MobSpawn/MobSpawnExtra.cs): `PMDC/LevelGen/Spawning/MobSpawn/MobSpawnExtra.cs`
- [Spawn checks](https://github.com/pmdcollab/pmdc/blob/master/PMDC/LevelGen/Spawning/MobSpawn/MobSpawnCheck.cs): `PMDC/LevelGen/Spawning/MobSpawn/MobSpawnCheck.cs`
- [Floor generation](https://github.com/pmdcollab/pmdc/tree/master/PMDC/LevelGen/Floors/GenSteps): `PMDC/LevelGen/Floors/GenSteps`
- [Room generation](https://github.com/pmdcollab/pmdc/tree/master/PMDC/LevelGen/Floors/GenSteps/Rooms): `PMDC/LevelGen/Floors/GenSteps/Rooms`
- [Floor features](https://github.com/pmdcollab/pmdc/tree/master/PMDC/LevelGen/Floors/GenSteps): `PMDC/LevelGen/Floors/GenSteps`
- [Zone configuration](https://github.com/pmdcollab/pmdc/tree/master/PMDC/LevelGen/Zones/ZoneSteps): `PMDC/LevelGen/Zones/ZoneSteps`
- [Team spawners](https://github.com/pmdcollab/pmdc/tree/master/PMDC/LevelGen/Spawning): `PMDC/LevelGen/Spawning`

### Dungeon gameplay

- [Game runtime](https://github.com/pmdcollab/pmdc/blob/master/PMDC/Program.cs): `PMDC/Program.cs`
- [Tactical AI](https://github.com/pmdcollab/pmdc/blob/master/PMDC/Dungeon/AI/AIPlan.cs): `PMDC/Dungeon/AI/AIPlan.cs`
- [Behavior plans](https://github.com/pmdcollab/pmdc/tree/master/PMDC/Dungeon/AI): `PMDC/Dungeon/AI`
- [Battle effects](https://github.com/pmdcollab/pmdc/blob/master/PMDC/Dungeon/GameEffects/BattleEvent/BattleEvent.cs): `PMDC/Dungeon/GameEffects/BattleEvent/BattleEvent.cs`
- [Status effects](https://github.com/pmdcollab/pmdc/blob/master/PMDC/Dungeon/GameEffects/BattleEvent/StatusBattleEvent.cs): `PMDC/Dungeon/GameEffects/BattleEvent/StatusBattleEvent.cs`
- [Battle context](https://github.com/pmdcollab/pmdc/blob/master/PMDC/Dungeon/GameEffects/ContextState.cs): `PMDC/Dungeon/GameEffects/ContextState.cs`
- [Character events](https://github.com/pmdcollab/pmdc/blob/master/PMDC/Dungeon/GameEffects/SingleCharEvent.cs): `PMDC/Dungeon/GameEffects/SingleCharEvent.cs`
- [Status state](https://github.com/pmdcollab/pmdc/blob/master/PMDC/Dungeon/GameEffects/StatusState.cs): `PMDC/Dungeon/GameEffects/StatusState.cs`

### Developer tools

- [Developer utilities](https://github.com/pmdcollab/pmdc/blob/master/PMDC/Dev/DevHelper.cs): `PMDC/Dev/DevHelper.cs`
- [Spawn editor model](https://github.com/pmdcollab/pmdc/blob/master/PMDC/Dev/ViewModels/TeamMemberSpawn/TeamMemberSpawnModel.cs): `PMDC/Dev/ViewModels/TeamMemberSpawn/TeamMemberSpawnModel.cs`
- [Spawn editor view](https://github.com/pmdcollab/pmdc/blob/master/PMDC/Dev/Views/UserControls/TeamMemberSpawnView.axaml.cs): `PMDC/Dev/Views/UserControls/TeamMemberSpawnView.axaml.cs`
- [Strategy guide](https://github.com/pmdcollab/pmdc/blob/master/PMDC/Dev/StrategyGuide.cs): `PMDC/Dev/StrategyGuide.cs`
- [Data editors](https://github.com/pmdcollab/pmdc/tree/master/PMDC/Dev/Editors): `PMDC/Dev/Editors`

### Other components

- **Game player**

## Connections

- Game player → Game runtime: starts (evidence: `PMDC/Program.cs`)
- Game runtime → Developer utilities: runs indexing (evidence: `PMDC/Program.cs`)
- Developer utilities → Evolution rules: reads (evidence: `PMDC/Dev/DevHelper.cs`)
- Developer utilities → Spawn configuration: scans (evidence: `PMDC/Dev/DevHelper.cs`)
- Developer utilities → Zone configuration: scans (evidence: `PMDC/Dev/DevHelper.cs`)
- Spawn configuration → Monster forms: uses form data (evidence: `PMDC/LevelGen/Spawning/MobSpawn/MobSpawnExtra.cs`)
- Spawn configuration → Spawn rarity: uses rarity (evidence: `PMDC/LevelGen/Spawning/MobSpawn/MobSpawnExtra.cs`)
- Spawn configuration → Monster features: uses features (evidence: `PMDC/LevelGen/Spawning/MobSpawn/MobSpawnExtra.cs`)
- Spawn configuration → Evolution rules: uses branches (evidence: `PMDC/LevelGen/Spawning/MobSpawn/MobSpawnExtra.cs`)
- Spawn configuration → Battle effects: configures events (evidence: `PMDC/LevelGen/Spawning/MobSpawn/MobSpawnExtra.cs`)
- Spawn configuration → Spawn checks: checks eligibility
- Floor generation → Room generation: uses room steps
- Floor generation → Floor features: configures tiles
- Zone configuration → Floor generation: configures floors
- Team spawners → Spawn configuration: uses spawn rules (evidence: `PMDC/LevelGen/Spawning/MultiTeamSpawner/BossBandContextSpawner.cs`)
- Game runtime → Tactical AI: runs dungeon AI
- Tactical AI → Behavior plans: uses plans
- Tactical AI → Battle effects: references effects (evidence: `PMDC/Dungeon/AI/AIPlan.cs`)
- Tactical AI → Status effects: references status events (evidence: `PMDC/Dungeon/AI/AIPlan.cs`)
- Battle effects → Status effects: specializes (evidence: `PMDC/Dungeon/GameEffects/BattleEvent/BattleEvent.cs`)
- Battle effects → Battle context: uses context (evidence: `PMDC/Dungeon/GameEffects/BattleEvent/BattleEvent.cs`)
- Status effects → Status state: reads status (evidence: `PMDC/Dungeon/GameEffects/BattleEvent/StatusBattleEvent.cs`)
- Status effects → Character events: applies to characters (evidence: `PMDC/Dungeon/GameEffects/BattleEvent/StatusBattleEvent.cs`)
- Spawn editor view → Spawn editor model: edits model (evidence: `PMDC/Dev/Views/UserControls/TeamMemberSpawnView.axaml.cs`)
- Spawn editor model → Monster forms: loads forms (evidence: `PMDC/Dev/ViewModels/TeamMemberSpawn/TeamMemberSpawnModel.cs`)
- Spawn editor model → Spawn configuration: edits spawn data (evidence: `PMDC/Dev/ViewModels/TeamMemberSpawn/TeamMemberSpawnModel.cs`)
- Game runtime → Data editors: registers editors (evidence: `PMDC/Program.cs`)
- Strategy guide → Developer utilities: uses utilities (evidence: `PMDC/Dev/StrategyGuide.cs`)
- Strategy guide → Monster forms: reads forms (evidence: `PMDC/Dev/StrategyGuide.cs`)
