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:

  1. OnPlayerInteract() detects StationType == RaidBoard
  2. UCityMapSubsystem::SetOverheadCamera(true)SetViewTargetWithBlend(CityCamera), switch input from IMC_Hideout to IMC_CityMap. Instant — L_City is Always Loaded.
  3. Player pans/zooms over city, hovers buildings
  4. Escape → SetOverheadCamera(false) — blend back to pawn, input → IMC_Hideout

UCityMapSubsystem (C++)

FunctionSignaturePurpose
GetBuildingDataUBuildingDataAsset* (ATNTBuilding*)Resolve building actor → data asset for tooltip
GetUnlockedBuildingsTArray<ATNTBuilding*> ()Filter by progression state. MVP: Average Home + The Dump always unlocked.
SetOverheadCameravoid (bool bEnable)Calls PlayerController->SetViewTargetWithBlend to ATNTCityCamera or back to pawn. Switches input context accordingly.
GetActiveRaidDisplayDataTArray<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):

MemberTypePurpose
CityCameraATNTCityCamera*Cached reference to overhead camera actor in L_City. Resolved in Initialize()
CachedBuildingsTArray<ATNTBuilding*>All building actors in L_City. Populated in Initialize()

Building Hover & Selection

ATNTBuilding actors in L_City:

  • UBoxComponent for mouse hover detection (line trace from ATNTCityCamera through cursor)
  • On hover → apply highlight material, spawn UTNTBuildingTooltip widget
  • On click → open UTNTCrewAssignmentUI overlay

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++)

FunctionSignaturePurpose
AddResourcevoid (EResourceType, int32)Increment counter + broadcast OnResourceChanged
SpendResourcebool (EResourceType, int32)Return false if insufficient. Decrement + broadcast.
CanAffordbool (EResourceType, int32)Pure check, no mutation
CanAffordCostbool (FCostData)Multi-resource check
SpendCostbool (FCostData)Atomic multi-resource deduct (all or nothing)
GetAmountint32 (EResourceType)Current counter value

Internal state (extends Block 1 stub — Ledger declared there):

MemberTypePurpose
OnResourceChangedFOnResourceChanged (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):

MemberTypePurpose
OnEncounterPendingFOnEncounterPending (DYNAMIC_MULTICAST_DELEGATE)BlueprintAssignable. Fired when encounter backup window opens. Backup UI binds to this
OnRaidDispatchedFOnRaidDispatched (DYNAMIC_MULTICAST_DELEGATE)BlueprintAssignable. Fired after successful dispatch. City map monitoring binds to this

Steps:

  1. Validate all crew raccoons are Idle via URaccoonSubsystem
  2. Validate trash cost via UResourceSubsystem::CanAfford
  3. Deduct trash via SpendResource
  4. Flag all crew raccoons as ERaccoonStatus::Raiding via SetStatus
  5. Create FActiveRaid with target, crew IDs, duration (placeholder — resolution in Block 4)
  6. Add to TArray<FActiveRaid>
  7. Return RaidId
  8. (AI pawn spawning wired in Block 4)

Raid Target DataAssets

AssetLoot BiasDifficultyEncounters
DA_AverageHomeFood 0.3, Valuables 0.25, Trash 0.25, Currency 0.1, Scrap 0.1Easy1–2
DA_TheDumpTrash 0.5, Scrap 0.2, Food 0.15, Currency 0.05, Valuables 0.1Easy0–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
  • OnResourceChanged fires 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

References

Raid Board · Average Home · The Dump · Raids MOC