# 3x3code/narratormod architecture

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

- Interactive diagram: https://gitdiagram.com/3x3code/narratormod
- Repository: https://github.com/3x3code/narratormod

## Overview

Narrator Mod is an Among Us mod that turns gameplay and menu activity into narrated audio with optional subtitles. The main workflow is game hooks raising domain events, narration conditions mapping those events to registered narrator entries, and the narration registry queuing audio for playback while subtitles are displayed. The repository also provides narrator and subtitle extension points, lobby settings and a credits screen. Relationships for unsampled hooks and condition types are included only where the source index or README supports them.

Main entry points: [`NarratorMod/API/NarratorRegistry.cs`](https://github.com/3x3code/narratormod/blob/master/NarratorMod/API/NarratorRegistry.cs) (Narrator registry), [`NarratorMod/NarratorModPlugin.cs`](https://github.com/3x3code/narratormod/blob/master/NarratorMod/NarratorModPlugin.cs) (Plugin startup), [`NarratorMod/Conditions`](https://github.com/3x3code/narratormod/tree/master/NarratorMod/Conditions) (Narration conditions), [`NarratorMod/Components/Settings/SettingsManager.cs`](https://github.com/3x3code/narratormod/blob/master/NarratorMod/Components/Settings/SettingsManager.cs) (Settings manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_events["Gameplay events"]
  node_hooks["Game hooks"]
  node_eventbus["Narration events<br/>[NarrationEvents.cs]"]
  node_eventkeys["Event keys"]
  node_conditions["Narration conditions"]
  node_conditionmanager["Condition manager"]
end

subgraph group_narration["Narration runtime"]
  node_registry["Narrator registry"]
  node_entry["Narration entry"]
  node_database[("Entry database")]
  node_playback["Audio queue"]
end

subgraph group_presentation["Player options"]
  node_settings["Settings manager<br/>[SettingsManager.cs]"]
  node_options["Setting options<br/>[SettingsOption.cs]"]
  node_subtitlemanager["Subtitle manager<br/>[SubtitleManager.cs]"]
  node_radio["Radio console<br/>[RadioConsole.cs]"]
end

subgraph group_extensions["Extension API"]
  node_narratorbase["Base narrator<br/>[BaseNarrator.cs]"]
  node_jackler["Jackler narrator<br/>[JacklerNarrator.cs]"]
  node_subtitleregistry["Subtitle registry"]
  node_subtitleinterface["Subtitle API<br/>[ISubtitle.cs]"]
end

subgraph group_extras["Other features"]
  node_credits["Credits screen"]
  node_plugin["Plugin startup"]
end

node_player(("Among Us player"))

node_player -->|"triggers"| node_hooks
node_hooks -->|"raises events"| node_eventbus
node_hooks -->|"uses event keys"| node_eventkeys
node_conditions -->|"subscribes"| node_eventbus
node_conditions -->|"matches events"| node_eventkeys
node_conditionmanager -->|"registers"| node_conditions
node_plugin -->|"initializes"| node_conditionmanager
node_plugin -->|"registers narrator"| node_registry
node_plugin -->|"registers subtitles"| node_subtitleregistry
node_conditions -->|"triggers narration"| node_registry
node_registry -->|"gets entries"| node_database
node_narratorbase -->|"adds entries"| node_database
node_narratorbase -->|"creates entries"| node_entry
node_jackler -->|"extends"| node_narratorbase
node_registry -->|"enqueues clip"| node_playback
node_playback -->|"starts subtitles"| node_subtitlemanager
node_playback -->|"selects style"| node_subtitleregistry
node_subtitlemanager -->|"runs transitions"| node_subtitleinterface
node_settings -->|"changes narrator"| node_registry
node_settings -->|"changes style"| node_subtitleregistry
node_settings -->|"updates values"| node_options
node_radio -->|"uses narrator"| node_registry
node_radio -->|"uses settings"| node_settings
node_plugin -.->|"registers credits"| node_credits

click node_hooks "https://github.com/3x3code/narratormod/tree/master/NarratorMod/Events/Patches"
click node_eventbus "https://github.com/3x3code/narratormod/blob/master/NarratorMod/Events/NarrationEvents.cs"
click node_eventkeys "https://github.com/3x3code/narratormod/tree/master/NarratorMod/Events/Enums"
click node_conditions "https://github.com/3x3code/narratormod/tree/master/NarratorMod/Conditions"
click node_conditionmanager "https://github.com/3x3code/narratormod/blob/master/NarratorMod/Conditions/ConditionManager.cs"
click node_registry "https://github.com/3x3code/narratormod/blob/master/NarratorMod/API/NarratorRegistry.cs"
click node_entry "https://github.com/3x3code/narratormod/blob/master/NarratorMod/API/NarrationEntryNormal.cs"
click node_database "https://github.com/3x3code/narratormod/blob/master/NarratorMod/API/NarrationEntryDatabase.cs"
click node_narratorbase "https://github.com/3x3code/narratormod/blob/master/NarratorMod/Extensions/BaseNarrator.cs"
click node_jackler "https://github.com/3x3code/narratormod/blob/master/NarratorMod/Narrators/JacklerNarrator.cs"
click node_playback "https://github.com/3x3code/narratormod/blob/master/NarratorMod/API/NarrationManager.cs"
click node_settings "https://github.com/3x3code/narratormod/blob/master/NarratorMod/Components/Settings/SettingsManager.cs"
click node_options "https://github.com/3x3code/narratormod/blob/master/NarratorMod/Components/Settings/SettingsOption.cs"
click node_subtitlemanager "https://github.com/3x3code/narratormod/blob/master/NarratorMod/Components/Subtitles/SubtitleManager.cs"
click node_subtitleregistry "https://github.com/3x3code/narratormod/blob/master/NarratorMod/Components/Subtitles/SubtitleRegistry.cs"
click node_subtitleinterface "https://github.com/3x3code/narratormod/blob/master/NarratorMod/Extensions/ISubtitle.cs"
click node_radio "https://github.com/3x3code/narratormod/blob/master/NarratorMod/Components/RadioConsole.cs"
click node_credits "https://github.com/3x3code/narratormod/blob/master/NarratorMod/Credits/CreditsScreenManager.cs"
click node_plugin "https://github.com/3x3code/narratormod/blob/master/NarratorMod/NarratorModPlugin.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_hooks,node_eventbus,node_eventkeys,node_conditions,node_conditionmanager toneBlue
class node_registry,node_entry,node_database,node_playback toneAmber
class node_settings,node_options,node_subtitlemanager,node_radio toneMint
class node_narratorbase,node_jackler,node_subtitleregistry,node_subtitleinterface toneRose
class node_credits,node_plugin,node_player toneIndigo
```

## Components

### Gameplay events

- [Game hooks](https://github.com/3x3code/narratormod/tree/master/NarratorMod/Events/Patches): `NarratorMod/Events/Patches`
- [Narration events](https://github.com/3x3code/narratormod/blob/master/NarratorMod/Events/NarrationEvents.cs): `NarratorMod/Events/NarrationEvents.cs`
- [Event keys](https://github.com/3x3code/narratormod/tree/master/NarratorMod/Events/Enums): `NarratorMod/Events/Enums`
- [Narration conditions](https://github.com/3x3code/narratormod/tree/master/NarratorMod/Conditions): `NarratorMod/Conditions`
- [Condition manager](https://github.com/3x3code/narratormod/blob/master/NarratorMod/Conditions/ConditionManager.cs): `NarratorMod/Conditions/ConditionManager.cs`

### Narration runtime

- [Narrator registry](https://github.com/3x3code/narratormod/blob/master/NarratorMod/API/NarratorRegistry.cs): `NarratorMod/API/NarratorRegistry.cs`
- [Narration entry](https://github.com/3x3code/narratormod/blob/master/NarratorMod/API/NarrationEntryNormal.cs): `NarratorMod/API/NarrationEntryNormal.cs`
- [Entry database](https://github.com/3x3code/narratormod/blob/master/NarratorMod/API/NarrationEntryDatabase.cs): `NarratorMod/API/NarrationEntryDatabase.cs`
- [Audio queue](https://github.com/3x3code/narratormod/blob/master/NarratorMod/API/NarrationManager.cs): `NarratorMod/API/NarrationManager.cs`

### Player options

- [Settings manager](https://github.com/3x3code/narratormod/blob/master/NarratorMod/Components/Settings/SettingsManager.cs): `NarratorMod/Components/Settings/SettingsManager.cs`
- [Setting options](https://github.com/3x3code/narratormod/blob/master/NarratorMod/Components/Settings/SettingsOption.cs): `NarratorMod/Components/Settings/SettingsOption.cs`
- [Subtitle manager](https://github.com/3x3code/narratormod/blob/master/NarratorMod/Components/Subtitles/SubtitleManager.cs): `NarratorMod/Components/Subtitles/SubtitleManager.cs`
- [Radio console](https://github.com/3x3code/narratormod/blob/master/NarratorMod/Components/RadioConsole.cs): `NarratorMod/Components/RadioConsole.cs`

### Extension API

- [Base narrator](https://github.com/3x3code/narratormod/blob/master/NarratorMod/Extensions/BaseNarrator.cs): `NarratorMod/Extensions/BaseNarrator.cs`
- [Jackler narrator](https://github.com/3x3code/narratormod/blob/master/NarratorMod/Narrators/JacklerNarrator.cs): `NarratorMod/Narrators/JacklerNarrator.cs`
- [Subtitle registry](https://github.com/3x3code/narratormod/blob/master/NarratorMod/Components/Subtitles/SubtitleRegistry.cs): `NarratorMod/Components/Subtitles/SubtitleRegistry.cs`
- [Subtitle API](https://github.com/3x3code/narratormod/blob/master/NarratorMod/Extensions/ISubtitle.cs): `NarratorMod/Extensions/ISubtitle.cs`

### Other features

- [Credits screen](https://github.com/3x3code/narratormod/blob/master/NarratorMod/Credits/CreditsScreenManager.cs): `NarratorMod/Credits/CreditsScreenManager.cs`
- [Plugin startup](https://github.com/3x3code/narratormod/blob/master/NarratorMod/NarratorModPlugin.cs): `NarratorMod/NarratorModPlugin.cs`

### Other components

- **Among Us player**

## Connections

- Among Us player → Game hooks: triggers (evidence: `NarratorMod/Events/Patches/PlayerControlPatches.cs`)
- Game hooks → Narration events: raises events (evidence: `NarratorMod/Events/Patches/PlayerControlPatches.cs`)
- Game hooks → Event keys: uses event keys (evidence: `NarratorMod/Events/Patches/MeetingPatches.cs`)
- Narration conditions → Narration events: subscribes (evidence: `NarratorMod/Conditions/MeetingConditions.cs`)
- Narration conditions → Event keys: matches events (evidence: `NarratorMod/Conditions/TaskConditions.cs`)
- Condition manager → Narration conditions: registers (evidence: `NarratorMod/Conditions/ConditionManager.cs`)
- Plugin startup → Condition manager: initializes (evidence: `NarratorMod/NarratorModPlugin.cs`)
- Plugin startup → Narrator registry: registers narrator (evidence: `NarratorMod/NarratorModPlugin.cs`)
- Plugin startup → Subtitle registry: registers subtitles (evidence: `NarratorMod/NarratorModPlugin.cs`)
- Narration conditions → Narrator registry: triggers narration (evidence: `NarratorMod/Conditions/TaskConditions.cs`)
- Narrator registry → Entry database: gets entries (evidence: `NarratorMod/Extensions/BaseNarrator.cs`)
- Base narrator → Entry database: adds entries (evidence: `NarratorMod/Extensions/BaseNarrator.cs`)
- Base narrator → Narration entry: creates entries (evidence: `NarratorMod/Extensions/BaseNarrator.cs`)
- Jackler narrator → Base narrator: extends (evidence: `NarratorMod/Narrators/JacklerNarrator.cs`)
- Narrator registry → Audio queue: enqueues clip (evidence: `NarratorMod/API/NarratorRegistry.cs`)
- Audio queue → Subtitle manager: starts subtitles (evidence: `NarratorMod/API/NarrationManager.cs`)
- Audio queue → Subtitle registry: selects style (evidence: `NarratorMod/API/NarrationManager.cs`)
- Subtitle manager → Subtitle API: runs transitions (evidence: `NarratorMod/Components/Subtitles/SubtitleManager.cs`)
- Settings manager → Narrator registry: changes narrator (evidence: `NarratorMod/Components/Settings/SettingsManager.cs`)
- Settings manager → Subtitle registry: changes style (evidence: `NarratorMod/Components/Settings/SettingsManager.cs`)
- Settings manager → Setting options: updates values (evidence: `NarratorMod/Components/Settings/SettingsManager.cs`)
- Radio console → Narrator registry: uses narrator (evidence: `NarratorMod/Components/RadioConsole.cs`)
- Radio console → Settings manager: uses settings (evidence: `NarratorMod/Components/RadioConsole.cs`)
- Plugin startup → Credits screen: registers credits
