How amir16yp/territorycontrolmod works
TerritoryControlMod is a BepInEx game mod that adds team-unit and territorial-control overlays to the game minimap. On plugin startup it loads configuration and installs Harmony patches; the minimap patch initializes territory state, periodically derives influence from actors and vehicles, and renders unit and territory overlays. TerritoryControl computes control and boundaries, while Core supplies team flag textures. The excerpts show these key links; other game-event and rendering details are not fully sampled.
Main entry points: MinimapUiPatch.cs Minimap patch · TerritoryControl.cs Influence and control · Core.cs Plugin lifecycle · ModConfig.cs Display configuration
Components 12
Plugin startup
- Plugin lifecycle
Core.cs - Team flag textures
Core.cs
Display settings
- Display configuration
ModConfig.cs
Territory calculation
- Influence and control
TerritoryControl.cs - Boundary polygons
TerritoryControl.cs
Minimap overlays
- Minimap patch
MinimapUiPatch.cs - Unit overlay
MinimapUiPatch.cs - Territory overlay
MinimapUiPatch.cs - Combined overlay
MinimapUiPatch.cs
Other components
- Game player
- Game runtime
- RavenM assembly
Connections 19
- Plugin lifecycle → Display configuration: initializes
Core.cs - Plugin lifecycle → Minimap patch: installs patches
Core.cs - Display configuration → RavenM assembly: detects assemblies
ModConfig.cs - Game player → Minimap patch: views minimap
- Minimap patch → Influence and control: initializes
MinimapUiPatch.cs - Minimap patch → Influence and control: adds influence
MinimapUiPatch.cs - Minimap patch → Influence and control: updates control
MinimapUiPatch.cs - Influence and control → Boundary polygons: derives boundaries
TerritoryControl.cs - Minimap patch → Unit overlay: starts updates
MinimapUiPatch.cs - Minimap patch → Territory overlay: starts updates
MinimapUiPatch.cs - Minimap patch → Combined overlay: starts updates
MinimapUiPatch.cs - Territory overlay → Influence and control: reads maps
MinimapUiPatch.cs - Territory overlay → Boundary polygons: renders boundaries
MinimapUiPatch.cs - Combined overlay → Influence and control: reads maps
MinimapUiPatch.cs - Combined overlay → Boundary polygons: renders boundaries
MinimapUiPatch.cs - Minimap patch → Display configuration: checks visibility
MinimapUiPatch.cs - Influence and control → Team flag textures: loads team flags
TerritoryControl.cs - Plugin lifecycle → Game runtime: hooks scenes
Core.cs - Minimap patch → Game runtime: reads actors
MinimapUiPatch.cs