Block 3 — Raid Board & Dispatch (2 days)
Goal: Player walks to the Raid Board, enters the overhead city map, hovers buildings to see target info, selects a target, assigns raccoons, and dispatches. Raid doesn’t resolve yet — crews leave and are flagged “raiding.”
Depends on: Block 1 (stations, city map, data model), Block 2 (roster, Scout/Hauler types).
Deliverables
Raid Board → City Map Flow
Interacting with the Raid Board station (EStationType::RaidBoard) does NOT open a UMG panel. Instead:
OnPlayerInteract()detectsStationType == RaidBoardUCityMapSubsystem::SetOverheadCamera(true)—SetViewTargetWithBlend(CityCamera), switch input fromIMC_HideouttoIMC_CityMap. Instant —L_Cityis Always Loaded.- Player pans/zooms over city, hovers buildings
- Escape →
SetOverheadCamera(false)— blend back to pawn, input →IMC_Hideout
UCityMapSubsystem (C++)
| Function | Signature | Purpose |
|---|---|---|
GetBuildingData | UBuildingDataAsset* (ATNTBuilding*) | Resolve building actor → data asset for tooltip |
GetUnlockedBuildings | TArray<ATNTBuilding*> () | Filter by progression state. MVP: Average Home + The Dump always unlocked. |
SetOverheadCamera | void (bool bEnable) | Calls PlayerController->SetViewTargetWithBlend to ATNTCityCamera or back to pawn. Switches input context accordingly. |
GetActiveRaidDisplayData | TArray<FRaidMapDisplayData> () | Returns position, phase, and encounter status for each active raid’s pawn group. Used by city map HUD overlay. |
Internal state (extends Block 1 stubs — BuildingUnlockStates declared there):
| Member | Type | Purpose |
|---|---|---|
CityCamera | ATNTCityCamera* | Cached reference to overhead camera actor in L_City. Resolved in Initialize() |
CachedBuildings | TArray<ATNTBuilding*> | All building actors in L_City. Populated in Initialize() |
Building Hover & Selection
ATNTBuilding actors in L_City:
UBoxComponentfor mouse hover detection (line trace fromATNTCityCamerathrough cursor)- On hover → apply highlight material, spawn
UTNTBuildingTooltipwidget - On click → open
UTNTCrewAssignmentUIoverlay
Building Tooltip (UTNTBuildingTooltip)
Floating UMG widget near cursor showing:
- Target name
- Loot bias summary (text: “Food + Small Valuables”)
- Difficulty rating
- Encounter count — or ”???” if no Scout in current idle roster (Scout pre-raid intel)
- Locked/unlocked status
Crew Assignment UI (UTNTCrewAssignmentUI)
UMG overlay on top of city view:
- Selected target info header
- List of idle raccoons (from
URaccoonSubsystem::GetRaccoonsByStatus(Idle)) - Click/drag raccoons to assign to crew slots. Minimum 1 to dispatch.
- Per-slot: name, type, key stats
- Trash cost display (e.g., 50 trash)
- Dispatch button — calls
URaidSubsystem::DispatchRaid - Close button — returns to city map hover mode
Scout Pre-Raid Intel
If any raccoon of type Scout is assigned to crew → building tooltip shows encounter info (names + count). No Scout on crew → encounter info shows ”???“. Resolved by checking ERaccoonType::Scout in the assigned crew array.
UResourceSubsystem — Full Implementation (C++)
| Function | Signature | Purpose |
|---|---|---|
AddResource | void (EResourceType, int32) | Increment counter + broadcast OnResourceChanged |
SpendResource | bool (EResourceType, int32) | Return false if insufficient. Decrement + broadcast. |
CanAfford | bool (EResourceType, int32) | Pure check, no mutation |
CanAffordCost | bool (FCostData) | Multi-resource check |
SpendCost | bool (FCostData) | Atomic multi-resource deduct (all or nothing) |
GetAmount | int32 (EResourceType) | Current counter value |
Internal state (extends Block 1 stub — Ledger declared there):
| Member | Type | Purpose |
|---|---|---|
OnResourceChanged | FOnResourceChanged (DYNAMIC_MULTICAST_DELEGATE_TwoParams) | BlueprintAssignable. Broadcast on any resource mutation. Params: EResourceType, int32 NewAmount |
URaidSubsystem::DispatchRaid (C++ — partial, no resolution)
FGuid DispatchRaid(URaidTargetDataAsset* Target, TArray<FGuid> Crew)
Internal state (extends Block 1 stub — ActiveRaids declared there):
| Member | Type | Purpose |
|---|---|---|
OnEncounterPending | FOnEncounterPending (DYNAMIC_MULTICAST_DELEGATE) | BlueprintAssignable. Fired when encounter backup window opens. Backup UI binds to this |
OnRaidDispatched | FOnRaidDispatched (DYNAMIC_MULTICAST_DELEGATE) | BlueprintAssignable. Fired after successful dispatch. City map monitoring binds to this |
Steps:
- Validate all crew raccoons are Idle via
URaccoonSubsystem - Validate trash cost via
UResourceSubsystem::CanAfford - Deduct trash via
SpendResource - Flag all crew raccoons as
ERaccoonStatus::RaidingviaSetStatus - Create
FActiveRaidwith target, crew IDs, duration (placeholder — resolution in Block 4) - Add to
TArray<FActiveRaid> - Return RaidId
- (AI pawn spawning wired in Block 4)
Raid Target DataAssets
| Asset | Loot Bias | Difficulty | Encounters |
|---|---|---|---|
DA_AverageHome | Food 0.3, Valuables 0.25, Trash 0.25, Currency 0.1, Scrap 0.1 | Easy | 1–2 |
DA_TheDump | Trash 0.5, Scrap 0.2, Food 0.15, Currency 0.05, Valuables 0.1 | Easy | 0–1 |
Each asset also stores recruit chance (The Dump: ~20%, Average Home: 0%).
Building DataAssets
DA_Building_AverageHome and DA_Building_TheDump — each links to its URaidTargetDataAsset, specifies display name and visual type enum for the building mesh.
Encounter DataAssets (stubs)
DA_AggressiveDog and DA_TriggeredAlarm — authored with stat check type and threshold values, but resolution logic not wired until Block 4.
Station DataAsset for Raid Board
DA_RaidBoard specifying EStationType::RaidBoard, relevant stat (Cunning), no storage cap, no upgrade tiers. UIWidgetClass left null — Raid Board uses city map flow instead of a widget.
Crew Assignment — Travel Time Display
Each raccoon in the crew assignment UI shows estimated travel time to the selected target:
EstimatedTravelTime = NavMeshDistance(HideoutExit, Target) / (CrewAvgSpeed * SpeedScale)
Recalculated live as raccoons are added/removed from the crew. Displayed as “~Xm” (game minutes = real seconds).
Backup Assignment UI (UTNTBackupAssignmentUI)
UMG overlay triggered by URaidSubsystem::OnEncounterPending delegate. Only accessible when player is at the Raid Board station. No HUD shortcut — player must physically walk to the board.
- Header: raid target name, encounter type, countdown timer (backup window remaining)
- List of idle raccoons (from
URaccoonSubsystem::GetRaccoonsByStatus(Idle)) - Per-raccoon: name, type, key stats, estimated travel time to target (
NavMeshDistance / raccoon.Speed * SpeedScale) - Warning indicator if estimated travel time exceeds remaining backup window (raccoon won’t arrive in time)
- “Send Backup” button → calls
URaidSubsystem::DispatchBackup - “Resolve Now” button → immediately resolves encounter with current on-site crew
- Closes automatically when backup window expires
City Map Monitoring
When the player opens the Raid Board during active raids, the city map shows:
- Crew pawn groups moving along streets (one group per active raid)
- Status icon per group: traveling (arrow), looting (bag), encounter pending (alert triangle), returning (home arrow)
- Encounter alert marker over buildings with pending encounters — pulsing red
- Clicking an encounter marker opens the backup assignment UI (if encounter pending)
Dispatch Cost
Flat trash fee per raid stored on URaidTargetDataAsset (default ~50 trash, tunable). Can’t dispatch if CanAfford returns false. UI grays out dispatch button.
Done When
- Player walks to Raid Board, presses E, switches to overhead camera over city map
- Pan/zoom works on city map
- Hovering buildings shows tooltip with target info
- Scout on crew reveals encounter info; no Scout shows ”???”
- Clicking building opens crew assignment overlay
- Player assigns raccoons and dispatches (trash deducted, raccoons flagged “raiding”)
- Can’t dispatch with 0 raccoons or insufficient trash
- Escape returns to hideout from city map
-
OnResourceChangedfires on trash deduction - Crew assignment UI shows estimated travel time per crew composition
- City map displays active raid crews with status icons
- Encounter alert markers visible on city map for pending encounters
- Backup assignment UI opens when clicking encounter marker at Raid Board
- Backup UI shows estimated travel time per idle raccoon and warns if they can’t arrive in time