# patricklumowa/bandits-companion-patch architecture

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

- Interactive diagram: https://gitdiagram.com/patricklumowa/bandits-companion-patch
- Repository: https://github.com/patricklumowa/bandits-companion-patch

## Overview

Bandits Companion Patch is a Project Zomboid Build 42 mod extending the Bandits mod with custom companion and equipment behavior. The tree shows companion programs and actions, party and equipment logic, and client/server modules; however, no source excerpts were provided, so their call relationships and the precise player-to-result workflow cannot be verified. The README documents the dependency and the duplicate root/42.16 script layouts; nodes use the root paths as representative implementations.

Main entry points: [`README.md`](https://github.com/patricklumowa/bandits-companion-patch/blob/main/README.md) (Companion patch)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ai["Companion behavior"]
  node_programs["Zombie programs"]
  node_actions["Zombie actions"]
end

subgraph group_companion["Companion systems"]
  node_party["Party management<br/>[BanditParty.lua]"]
  node_equipment["Equipment manager"]
  node_shared["Shared behavior<br/>[Bandit.lua]"]
end

subgraph group_integration["Game integration"]
  node_client["Client controls<br/>[BanditPlayer.lua]"]
  node_ui["Party and equipment UI"]
  node_server["Server commands"]
  node_spawner["Server spawner"]
end

node_player(("Player"))
node_pz["Project Zomboid"]
node_bandits["Bandits mod"]
node_patch["Companion patch<br/>[README.md]"]

node_player -->|"enables"| node_patch
node_pz -->|"runs with"| node_patch
node_bandits -->|"extended by"| node_patch

click node_patch "https://github.com/patricklumowa/bandits-companion-patch/blob/main/README.md"
click node_programs "https://github.com/patricklumowa/bandits-companion-patch/tree/main/media/lua/shared/ZombiePrograms"
click node_actions "https://github.com/patricklumowa/bandits-companion-patch/tree/main/media/lua/shared/ZombieActions"
click node_party "https://github.com/patricklumowa/bandits-companion-patch/blob/main/media/lua/shared/BanditParty.lua"
click node_equipment "https://github.com/patricklumowa/bandits-companion-patch/blob/main/media/lua/shared/BanditEquipmentManager.lua"
click node_shared "https://github.com/patricklumowa/bandits-companion-patch/blob/main/media/lua/shared/Bandit.lua"
click node_client "https://github.com/patricklumowa/bandits-companion-patch/blob/main/media/lua/client/BanditPlayer.lua"
click node_ui "https://github.com/patricklumowa/bandits-companion-patch/tree/main/media/lua/client/ISUI"
click node_server "https://github.com/patricklumowa/bandits-companion-patch/blob/main/media/lua/server/BanditServerCommands.lua"
click node_spawner "https://github.com/patricklumowa/bandits-companion-patch/blob/main/media/lua/server/BanditServerSpawner.lua"

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_programs,node_actions toneBlue
class node_party,node_equipment,node_shared toneAmber
class node_client,node_ui,node_server,node_spawner toneMint
class node_player,node_pz,node_bandits toneIndigo
class node_patch toneTeal
```

## Components

### Companion behavior

- [Zombie programs](https://github.com/patricklumowa/bandits-companion-patch/tree/main/media/lua/shared/ZombiePrograms): `media/lua/shared/ZombiePrograms`
- [Zombie actions](https://github.com/patricklumowa/bandits-companion-patch/tree/main/media/lua/shared/ZombieActions): `media/lua/shared/ZombieActions`

### Companion systems

- [Party management](https://github.com/patricklumowa/bandits-companion-patch/blob/main/media/lua/shared/BanditParty.lua): `media/lua/shared/BanditParty.lua`
- [Equipment manager](https://github.com/patricklumowa/bandits-companion-patch/blob/main/media/lua/shared/BanditEquipmentManager.lua): `media/lua/shared/BanditEquipmentManager.lua`
- [Shared behavior](https://github.com/patricklumowa/bandits-companion-patch/blob/main/media/lua/shared/Bandit.lua): `media/lua/shared/Bandit.lua`

### Game integration

- [Client controls](https://github.com/patricklumowa/bandits-companion-patch/blob/main/media/lua/client/BanditPlayer.lua): `media/lua/client/BanditPlayer.lua`
- [Party and equipment UI](https://github.com/patricklumowa/bandits-companion-patch/tree/main/media/lua/client/ISUI): `media/lua/client/ISUI`
- [Server commands](https://github.com/patricklumowa/bandits-companion-patch/blob/main/media/lua/server/BanditServerCommands.lua): `media/lua/server/BanditServerCommands.lua`
- [Server spawner](https://github.com/patricklumowa/bandits-companion-patch/blob/main/media/lua/server/BanditServerSpawner.lua): `media/lua/server/BanditServerSpawner.lua`

### Other components

- **Player**
- **Project Zomboid**
- **Bandits mod**
- [Companion patch](https://github.com/patricklumowa/bandits-companion-patch/blob/main/README.md): `README.md`

## Connections

- Player → Companion patch: enables (evidence: `README.md`)
- Project Zomboid → Companion patch: runs with (evidence: `README.md`)
- Bandits mod → Companion patch: extended by (evidence: `README.md`)
