# wot-public-mods/branded-tanks architecture

> Architecture diagram of the GitHub repository wot-public-mods/branded-tanks, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/wot-public-mods/branded-tanks
- Repository: https://github.com/wot-public-mods/branded-tanks

## Overview

Branded Tank Styles is a World of Tanks mod for choosing and applying team-specific camouflage, logos, and advertisements in the hangar and in-game. The main workflow is: a player or operator opens the appropriate UI, selects presets, the processor records settings and builds customization outfits, and the vehicle controller applies them according to team or own-tank rules. Runtime hooks connect those outfits to vehicle appearance and register customization items. The README documents the two-team styling capabilities; sampled source supports the UI, outfit, persistence, and hook relationships shown here. Asset/configuration links reflect the tree; their full runtime loading flow was not sampled.

Main entry points: [`python/gui/branding/controllers/vehicle.py`](https://github.com/wot-public-mods/branded-tanks/blob/master/python/gui/branding/controllers/vehicle.py) (Vehicle controller), [`python/gui/branding/data.py`](https://github.com/wot-public-mods/branded-tanks/blob/master/python/gui/branding/data.py) (Config and cache), [`python/gui/branding/views/playerView.py`](https://github.com/wot-public-mods/branded-tanks/blob/master/python/gui/branding/views/playerView.py) (Player view), [`python/gui/branding/views/operatorView.py`](https://github.com/wot-public-mods/branded-tanks/blob/master/python/gui/branding/views/operatorView.py) (Operator view)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_event_ui["UI events<br/>[events.py]"]
  node_ui_loader["View registration<br/>[__init__.py]"]
  node_player_view["Player view<br/>[playerView.py]"]
  node_operator_view["Operator view<br/>[operatorView.py]"]
  node_localization["Localization<br/>[lang.py]"]
end

subgraph group_customization["Style customization"]
  node_data_holder["Config and cache<br/>[data.py]"]
  node_settings_file[("Saved settings<br/>[_constants.py]")]
  node_processor["Outfit processor<br/>[processor.py]"]
end

subgraph group_runtime["Game runtime"]
  node_mod_entry["Mod entry<br/>[mod_branding.py]"]
  node_vehicle_controller["Vehicle controller<br/>[vehicle.py]"]
  node_hooks["Appearance hooks<br/>[hooks.py]"]
  node_game_vehicle["Vehicle appearance"]
  node_game_customization["Customization registry"]
end

subgraph group_resources["Mod resources"]
  node_language_files["Language files<br/>[text]"]
  node_mod_config["Preset configuration<br/>[config.json]"]
  node_style_assets["Team style assets"]
end

node_player(("Player"))
node_operator(("Operator"))
node_mods_list["Mods List mod"]

node_mod_entry -->|"imports lifecycle"| node_event_ui
node_mod_entry -->|"loads hooks"| node_hooks
node_player -.->|"opens mod UI"| node_mods_list
node_mods_list -.->|"invokes UI callback"| node_event_ui
node_operator -->|"opens UI"| node_event_ui
node_event_ui -->|"dispatches show"| node_ui_loader
node_ui_loader -->|"loads player view"| node_player_view
node_ui_loader -->|"loads operator view"| node_operator_view
node_player_view -->|"reads presets"| node_data_holder
node_operator_view -->|"reads presets"| node_data_holder
node_player_view -->|"submits settings"| node_processor
node_operator_view -->|"submits settings"| node_processor
node_player_view -->|"previews preset"| node_vehicle_controller
node_operator_view -->|"previews preset"| node_vehicle_controller
node_processor -->|"updates cache"| node_data_holder
node_data_holder -->|"loads config"| node_mod_config
node_data_holder -->|"loads and saves"| node_settings_file
node_localization -->|"reads strings"| node_language_files
node_player_view -->|"requests labels"| node_localization
node_operator_view -->|"requests labels"| node_localization
node_vehicle_controller -->|"builds outfit"| node_processor
node_vehicle_controller -->|"reads team settings"| node_data_holder
node_vehicle_controller -->|"updates customization"| node_game_vehicle
node_hooks -->|"selects outfit"| node_vehicle_controller
node_hooks -->|"overrides appearance"| node_game_vehicle
node_hooks -->|"registers style items"| node_game_customization
node_style_assets -->|"supplies style files"| node_game_customization

click node_mod_entry "https://github.com/wot-public-mods/branded-tanks/blob/master/python/gui/mods/mod_branding.py"
click node_event_ui "https://github.com/wot-public-mods/branded-tanks/blob/master/python/gui/branding/events.py"
click node_ui_loader "https://github.com/wot-public-mods/branded-tanks/blob/master/python/gui/branding/views/__init__.py"
click node_player_view "https://github.com/wot-public-mods/branded-tanks/blob/master/python/gui/branding/views/playerView.py"
click node_operator_view "https://github.com/wot-public-mods/branded-tanks/blob/master/python/gui/branding/views/operatorView.py"
click node_data_holder "https://github.com/wot-public-mods/branded-tanks/blob/master/python/gui/branding/data.py"
click node_settings_file "https://github.com/wot-public-mods/branded-tanks/blob/master/python/gui/branding/_constants.py"
click node_processor "https://github.com/wot-public-mods/branded-tanks/blob/master/python/gui/branding/controllers/processor.py"
click node_vehicle_controller "https://github.com/wot-public-mods/branded-tanks/blob/master/python/gui/branding/controllers/vehicle.py"
click node_hooks "https://github.com/wot-public-mods/branded-tanks/blob/master/python/gui/branding/hooks.py"
click node_localization "https://github.com/wot-public-mods/branded-tanks/blob/master/python/gui/branding/lang.py"
click node_language_files "https://github.com/wot-public-mods/branded-tanks/tree/master/resources/in/mods/net.wargaming.branding/text"
click node_mod_config "https://github.com/wot-public-mods/branded-tanks/blob/master/resources/in/mods/net.wargaming.branding/config.json"
click node_style_assets "https://github.com/wot-public-mods/branded-tanks/tree/master/resources/in/mods/net.wargaming.branding"

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_event_ui,node_ui_loader,node_player_view,node_operator_view,node_localization toneBlue
class node_data_holder,node_settings_file,node_processor toneAmber
class node_mod_entry,node_vehicle_controller,node_hooks,node_game_vehicle,node_game_customization toneMint
class node_language_files,node_mod_config,node_style_assets toneRose
class node_player,node_operator,node_mods_list toneIndigo
```

## Components

### User interface

- [UI events](https://github.com/wot-public-mods/branded-tanks/blob/master/python/gui/branding/events.py): `python/gui/branding/events.py`
- [View registration](https://github.com/wot-public-mods/branded-tanks/blob/master/python/gui/branding/views/__init__.py): `python/gui/branding/views/__init__.py`
- [Player view](https://github.com/wot-public-mods/branded-tanks/blob/master/python/gui/branding/views/playerView.py): `python/gui/branding/views/playerView.py`
- [Operator view](https://github.com/wot-public-mods/branded-tanks/blob/master/python/gui/branding/views/operatorView.py): `python/gui/branding/views/operatorView.py`
- [Localization](https://github.com/wot-public-mods/branded-tanks/blob/master/python/gui/branding/lang.py): `python/gui/branding/lang.py`

### Style customization

- [Config and cache](https://github.com/wot-public-mods/branded-tanks/blob/master/python/gui/branding/data.py): `python/gui/branding/data.py`
- [Saved settings](https://github.com/wot-public-mods/branded-tanks/blob/master/python/gui/branding/_constants.py): `python/gui/branding/_constants.py`
- [Outfit processor](https://github.com/wot-public-mods/branded-tanks/blob/master/python/gui/branding/controllers/processor.py): `python/gui/branding/controllers/processor.py`

### Game runtime

- [Mod entry](https://github.com/wot-public-mods/branded-tanks/blob/master/python/gui/mods/mod_branding.py): `python/gui/mods/mod_branding.py`
- [Vehicle controller](https://github.com/wot-public-mods/branded-tanks/blob/master/python/gui/branding/controllers/vehicle.py): `python/gui/branding/controllers/vehicle.py`
- [Appearance hooks](https://github.com/wot-public-mods/branded-tanks/blob/master/python/gui/branding/hooks.py): `python/gui/branding/hooks.py`
- **Vehicle appearance**
- **Customization registry**

### Mod resources

- [Language files](https://github.com/wot-public-mods/branded-tanks/tree/master/resources/in/mods/net.wargaming.branding/text): `resources/in/mods/net.wargaming.branding/text`
- [Preset configuration](https://github.com/wot-public-mods/branded-tanks/blob/master/resources/in/mods/net.wargaming.branding/config.json): `resources/in/mods/net.wargaming.branding/config.json`
- [Team style assets](https://github.com/wot-public-mods/branded-tanks/tree/master/resources/in/mods/net.wargaming.branding): `resources/in/mods/net.wargaming.branding`

### Other components

- **Player**
- **Operator**
- **Mods List mod**

## Connections

- Mod entry → UI events: imports lifecycle
- Mod entry → Appearance hooks: loads hooks
- Player → Mods List mod: opens mod UI
- Mods List mod → UI events: invokes UI callback
- Operator → UI events: opens UI
- UI events → View registration: dispatches show
- View registration → Player view: loads player view
- View registration → Operator view: loads operator view
- Player view → Config and cache: reads presets
- Operator view → Config and cache: reads presets
- Player view → Outfit processor: submits settings
- Operator view → Outfit processor: submits settings
- Player view → Vehicle controller: previews preset
- Operator view → Vehicle controller: previews preset
- Outfit processor → Config and cache: updates cache
- Config and cache → Preset configuration: loads config
- Config and cache → Saved settings: loads and saves
- Localization → Language files: reads strings
- Player view → Localization: requests labels
- Operator view → Localization: requests labels
- Vehicle controller → Outfit processor: builds outfit
- Vehicle controller → Config and cache: reads team settings
- Vehicle controller → Vehicle appearance: updates customization
- Appearance hooks → Vehicle controller: selects outfit
- Appearance hooks → Vehicle appearance: overrides appearance
- Appearance hooks → Customization registry: registers style items
- Team style assets → Customization registry: supplies style files
