# zeldaret/botw architecture

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

- Interactive diagram: https://gitdiagram.com/zeldaret/botw
- Repository: https://github.com/zeldaret/botw

## Overview

This is an experimental decompilation of Breath of the Wild v1.5.0, intended to document and investigate game internals—not to build a playable game. The available evidence shows game state and actor logic as prominent runtime domains, alongside world simulation, cooking, DLC behavior, and physics. The graph groups those responsibilities and shows only relationships supported by the README or sampled/indexed source references. Many systems appear in the tree without inspected implementation, so their internal calls and any end-to-end gameplay sequence remain unspecified.

Main entry points: [`src/Game/Actor/aiQueryFactories.cpp`](https://github.com/zeldaret/botw/blob/master/src/Game/Actor/aiQueryFactories.cpp) (AI query registry), [`src/Game/Actor/Damage/actDamageManagerBase.cpp`](https://github.com/zeldaret/botw/blob/master/src/Game/Actor/Damage/actDamageManagerBase.cpp) (Damage handling), [`src/KingSystem/GameData/gdtManager.cpp`](https://github.com/zeldaret/botw/blob/master/src/KingSystem/GameData/gdtManager.cpp) (Game data), [`src/Game/Actor`](https://github.com/zeldaret/botw/tree/master/src/Game/Actor) (Actor runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_actors["Actors and behavior"]
  node_actor_runtime["Actor runtime"]
  node_ai_behaviors["AI behaviors"]
  node_ai_queries["AI query registry"]
  node_damage["Damage handling"]
  node_action["Actor actions"]
end

subgraph group_state["Game state and content"]
  node_game_data["Game data<br/>[gdtManager.cpp]"]
  node_aoc["DLC management<br/>[aocManager.cpp]"]
  node_hard_mode["Hard mode"]
  node_quests["Quest management<br/>[qstManager.cpp]"]
  node_cooking["Cooking<br/>[cookManager.cpp]"]
  node_events["Event management"]
end

subgraph group_world["World systems"]
  node_world["World simulation<br/>[worldManager.cpp]"]
  node_gsys["Graphics system objects"]
end

subgraph group_physics["Physics"]
  node_ragdoll["Ragdoll control"]
  node_character_physics["Character physics parameters"]
end

node_player(("Player"))

node_damage -->|"checks and modifies"| node_hard_mode
node_game_data -->|"checks DLC state"| node_aoc
node_ai_queries -.->|"registers query types"| node_ai_behaviors
node_player -.->|"interacts with"| node_actor_runtime

click node_actor_runtime "https://github.com/zeldaret/botw/tree/master/src/Game/Actor"
click node_ai_behaviors "https://github.com/zeldaret/botw/tree/master/src/Game/Actor/AI"
click node_ai_queries "https://github.com/zeldaret/botw/blob/master/src/Game/Actor/aiQueryFactories.cpp"
click node_damage "https://github.com/zeldaret/botw/blob/master/src/Game/Actor/Damage/actDamageManagerBase.cpp"
click node_action "https://github.com/zeldaret/botw/tree/master/src/Game/Actor/Action"
click node_game_data "https://github.com/zeldaret/botw/blob/master/src/KingSystem/GameData/gdtManager.cpp"
click node_aoc "https://github.com/zeldaret/botw/blob/master/src/KingSystem/AOC/aocManager.cpp"
click node_hard_mode "https://github.com/zeldaret/botw/blob/master/src/Game/AOC/aocHardModeManager.cpp"
click node_quests "https://github.com/zeldaret/botw/blob/master/src/KingSystem/Quest/qstManager.cpp"
click node_cooking "https://github.com/zeldaret/botw/blob/master/src/Game/Cooking/cookManager.cpp"
click node_events "https://github.com/zeldaret/botw/tree/master/src/KingSystem/Event"
click node_world "https://github.com/zeldaret/botw/blob/master/src/KingSystem/World/worldManager.cpp"
click node_gsys "https://github.com/zeldaret/botw/tree/master/lib/gsys/include/gsys"
click node_ragdoll "https://github.com/zeldaret/botw/blob/master/src/KingSystem/Physics/Ragdoll/physRagdollController.cpp"
click node_character_physics "https://github.com/zeldaret/botw/blob/master/src/KingSystem/Physics/System/physCharacterControllerParam.cpp"

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_actor_runtime,node_ai_behaviors,node_ai_queries,node_damage,node_action toneBlue
class node_game_data,node_aoc,node_hard_mode,node_quests,node_cooking,node_events toneAmber
class node_world,node_gsys toneMint
class node_ragdoll,node_character_physics toneRose
class node_player toneIndigo
```

## Components

### Actors and behavior

- [Actor runtime](https://github.com/zeldaret/botw/tree/master/src/Game/Actor): `src/Game/Actor`
- [AI behaviors](https://github.com/zeldaret/botw/tree/master/src/Game/Actor/AI): `src/Game/Actor/AI`
- [AI query registry](https://github.com/zeldaret/botw/blob/master/src/Game/Actor/aiQueryFactories.cpp): `src/Game/Actor/aiQueryFactories.cpp`
- [Damage handling](https://github.com/zeldaret/botw/blob/master/src/Game/Actor/Damage/actDamageManagerBase.cpp): `src/Game/Actor/Damage/actDamageManagerBase.cpp`
- [Actor actions](https://github.com/zeldaret/botw/tree/master/src/Game/Actor/Action): `src/Game/Actor/Action`

### Game state and content

- [Game data](https://github.com/zeldaret/botw/blob/master/src/KingSystem/GameData/gdtManager.cpp): `src/KingSystem/GameData/gdtManager.cpp`
- [DLC management](https://github.com/zeldaret/botw/blob/master/src/KingSystem/AOC/aocManager.cpp): `src/KingSystem/AOC/aocManager.cpp`
- [Hard mode](https://github.com/zeldaret/botw/blob/master/src/Game/AOC/aocHardModeManager.cpp): `src/Game/AOC/aocHardModeManager.cpp`
- [Quest management](https://github.com/zeldaret/botw/blob/master/src/KingSystem/Quest/qstManager.cpp): `src/KingSystem/Quest/qstManager.cpp`
- [Cooking](https://github.com/zeldaret/botw/blob/master/src/Game/Cooking/cookManager.cpp): `src/Game/Cooking/cookManager.cpp`
- [Event management](https://github.com/zeldaret/botw/tree/master/src/KingSystem/Event): `src/KingSystem/Event`

### World systems

- [World simulation](https://github.com/zeldaret/botw/blob/master/src/KingSystem/World/worldManager.cpp): `src/KingSystem/World/worldManager.cpp`
- [Graphics system objects](https://github.com/zeldaret/botw/tree/master/lib/gsys/include/gsys): `lib/gsys/include/gsys`

### Physics

- [Ragdoll control](https://github.com/zeldaret/botw/blob/master/src/KingSystem/Physics/Ragdoll/physRagdollController.cpp): `src/KingSystem/Physics/Ragdoll/physRagdollController.cpp`
- [Character physics parameters](https://github.com/zeldaret/botw/blob/master/src/KingSystem/Physics/System/physCharacterControllerParam.cpp): `src/KingSystem/Physics/System/physCharacterControllerParam.cpp`

### Other components

- **Player**

## Connections

- Damage handling → Hard mode: checks and modifies (evidence: `src/Game/Actor/Damage/actDamageManagerBase.cpp`)
- Game data → DLC management: checks DLC state (evidence: `src/KingSystem/GameData/gdtManager.cpp`)
- AI query registry → AI behaviors: registers query types
- Player → Actor runtime: interacts with
