# gurge44/endlesshostroles architecture

> Architecture diagram of the GitHub repository gurge44/endlesshostroles, 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/gurge44/endlesshostroles
- Repository: https://github.com/gurge44/endlesshostroles

## Overview

Endless Host Roles is a host-only Among Us mod. The host configures a lobby, starts a selected custom mode, and players experience role- and mode-specific gameplay; the mod also provides extensive settings, guessing, compatibility support, and a separate Custom Team Assigner app. The graph highlights documented capabilities and source-index references; unsampled runtime wiring is not inferred, so some subsystem links are intentionally omitted.

Main entry points: [`Main.cs`](https://github.com/gurge44/endlesshostroles/blob/main/Main.cs) (Mod lifecycle), [`Roles/RoleBase.cs`](https://github.com/gurge44/endlesshostroles/blob/main/Roles/RoleBase.cs) (Role framework), [`Gamemodes`](https://github.com/gurge44/endlesshostroles/tree/main/Gamemodes) (Custom game modes), [`Modules/OptionItem/OptionItem.cs`](https://github.com/gurge44/endlesshostroles/blob/main/Modules/OptionItem/OptionItem.cs) (Option system)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Mod runtime"]
  node_main["Mod lifecycle<br/>[Main.cs]"]
  node_patches["Game hooks"]
  node_compat["Mod compatibility"]
end

subgraph group_gameplay["Gameplay systems"]
  node_modes["Custom game modes"]
  node_roles["Role framework<br/>[RoleBase.cs]"]
  node_addons["Roles and add-ons"]
  node_guessing["Role guessing<br/>[GuessManager.cs]"]
  node_teams["Team definitions<br/>[Team.cs]"]
end

subgraph group_config["Settings and language"]
  node_options["Option system<br/>[OptionItem.cs]"]
  node_translations["Translations<br/>[Translator.cs]"]
end

subgraph group_tools["Team authoring"]
  node_assigner["Team Assigner app<br/>[App.xaml.cs]"]
end

node_host(("Lobby host"))

node_host -->|"runs mod"| node_main
node_host -->|"authors teams"| node_assigner
node_main -->|"registers modes"| node_modes
node_main -->|"references roles"| node_roles
node_main -->|"initializes compatibility"| node_compat
node_modes -->|"defines settings"| node_options
node_roles -->|"creates options"| node_options
node_roles -->|"gets strings"| node_translations
node_options -->|"translates labels"| node_translations
node_assigner -.->|"edits teams"| node_teams
node_modes -->|"references teams"| node_teams
node_guessing -->|"gets strings"| node_translations
node_patches -->|"uses runtime state"| node_main
node_addons -->|"extends framework"| node_roles

click node_main "https://github.com/gurge44/endlesshostroles/blob/main/Main.cs"
click node_patches "https://github.com/gurge44/endlesshostroles/tree/main/Patches"
click node_compat "https://github.com/gurge44/endlesshostroles/tree/main/Modules/ModCompatibility"
click node_modes "https://github.com/gurge44/endlesshostroles/tree/main/Gamemodes"
click node_roles "https://github.com/gurge44/endlesshostroles/blob/main/Roles/RoleBase.cs"
click node_addons "https://github.com/gurge44/endlesshostroles/tree/main/Roles/Standard"
click node_guessing "https://github.com/gurge44/endlesshostroles/blob/main/Modules/GuessManager.cs"
click node_options "https://github.com/gurge44/endlesshostroles/blob/main/Modules/OptionItem/OptionItem.cs"
click node_translations "https://github.com/gurge44/endlesshostroles/blob/main/Modules/Translator.cs"
click node_teams "https://github.com/gurge44/endlesshostroles/blob/main/CTA/CustomTeamAssigner/Team.cs"
click node_assigner "https://github.com/gurge44/endlesshostroles/blob/main/CTA/CustomTeamAssigner/App.xaml.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_main,node_patches,node_compat toneBlue
class node_modes,node_roles,node_addons,node_guessing,node_teams toneAmber
class node_options,node_translations toneMint
class node_assigner toneRose
class node_host toneIndigo
```

## Components

### Mod runtime

- [Mod lifecycle](https://github.com/gurge44/endlesshostroles/blob/main/Main.cs): `Main.cs`
- [Game hooks](https://github.com/gurge44/endlesshostroles/tree/main/Patches): `Patches`
- [Mod compatibility](https://github.com/gurge44/endlesshostroles/tree/main/Modules/ModCompatibility): `Modules/ModCompatibility`

### Gameplay systems

- [Custom game modes](https://github.com/gurge44/endlesshostroles/tree/main/Gamemodes): `Gamemodes`
- [Role framework](https://github.com/gurge44/endlesshostroles/blob/main/Roles/RoleBase.cs): `Roles/RoleBase.cs`
- [Roles and add-ons](https://github.com/gurge44/endlesshostroles/tree/main/Roles/Standard): `Roles/Standard`
- [Role guessing](https://github.com/gurge44/endlesshostroles/blob/main/Modules/GuessManager.cs): `Modules/GuessManager.cs`
- [Team definitions](https://github.com/gurge44/endlesshostroles/blob/main/CTA/CustomTeamAssigner/Team.cs): `CTA/CustomTeamAssigner/Team.cs`

### Settings and language

- [Option system](https://github.com/gurge44/endlesshostroles/blob/main/Modules/OptionItem/OptionItem.cs): `Modules/OptionItem/OptionItem.cs`
- [Translations](https://github.com/gurge44/endlesshostroles/blob/main/Modules/Translator.cs): `Modules/Translator.cs`

### Team authoring

- [Team Assigner app](https://github.com/gurge44/endlesshostroles/blob/main/CTA/CustomTeamAssigner/App.xaml.cs): `CTA/CustomTeamAssigner/App.xaml.cs`

### Other components

- **Lobby host**

## Connections

- Lobby host → Mod lifecycle: runs mod (evidence: `README.md`)
- Lobby host → Team Assigner app: authors teams (evidence: `README.md`)
- Mod lifecycle → Custom game modes: registers modes (evidence: `Main.cs`)
- Mod lifecycle → Role framework: references roles (evidence: `Main.cs`)
- Mod lifecycle → Mod compatibility: initializes compatibility (evidence: `Main.cs`)
- Custom game modes → Option system: defines settings (evidence: `Gamemodes/BedWars.cs`)
- Role framework → Option system: creates options (evidence: `Roles/RoleBase.cs`)
- Role framework → Translations: gets strings (evidence: `Roles/RoleBase.cs`)
- Option system → Translations: translates labels (evidence: `Modules/OptionItem/OptionItem.cs`)
- Team Assigner app → Team definitions: edits teams
- Custom game modes → Team definitions: references teams (evidence: `Gamemodes/BedWars.cs`)
- Role guessing → Translations: gets strings (evidence: `Modules/GuessManager.cs`)
- Game hooks → Mod lifecycle: uses runtime state (evidence: `Patches/EndGameManagerPatch.cs`)
- Roles and add-ons → Role framework: extends framework (evidence: `Roles/Standard/Crewmate/Investigate/TaskManager.cs`)
