Block 7 — Expansion Loop (2 days)

Goal: Player can upgrade station storage caps, two new raid targets open on the city map, Distractor unit unlocks. The “grow the operation” arc.

Depends on: Block 5 (resources, storage caps), Block 4 (raid resolution, encounters), Block 6 (upkeep pressure).


Deliverables

UStationSubsystem::UpgradeStation (C++)

UFUNCTION(BlueprintCallable)
bool UpgradeStation(EStationType Station);
  1. Look up UStationDataAsset for the station
  2. Get current CapTier from FStationRuntimeState
  3. Check next tier exists in DataAsset’s TArray<FCostData> UpgradeCosts
  4. UResourceSubsystem::CanAffordCost(NextTierCost) — return false if can’t afford
  5. UResourceSubsystem::SpendCost(NextTierCost) — atomic deduct
  6. Increment CapTier on runtime state
  7. New cap = base cap + sum of tier bonuses (each tier adds a fixed amount, e.g., +10)
  8. Return true

Upgrade Desk Station UI (UTNTUpgradeUI)

UMG widget opened from Upgrade Desk station:

  • List of all stations with capped storage:
    • Station name
    • Current cap / max tier
    • Current tier → next tier cap increase
    • Cost to upgrade (currency + scrap)
    • Upgrade button — calls UpgradeStation. Grayed if max tier or can’t afford.
  • Post-MVP: “Build new station” section (scaffolded as disabled buttons)

DataAsset: DA_UpgradeDesk, no storage cap, no relevant stat (player-only exception to Station Operation Model), no UIWidgetClass (uses custom UTNTUpgradeUI).

Upgrade Cost Scaling (on each station’s DataAsset)

TierCostCap Increase
1$20 + 10 scrap+10
2$40 + 20 scrap+10
3$80 + 40 scrap+15

Values stored in TArray<FCostData> on UStationDataAsset. Tunable per station.

2 New Raid Targets + City Map Buildings

Rich Neighbor:

FieldValue
DataAssetDA_RichNeighbor
Loot BiasValuables 0.45, Currency 0.2, Trash 0.15, Food 0.1, Scrap 0.1
DifficultyMedium-Hard
Encounters2–3, higher thresholds (Speed/Stealth sum ~25–30)
Recruit Chance5%
BuildingDA_Building_RichNeighbor — larger box mesh, distinct color. Placed in L_City.

Grocery Store:

FieldValue
DataAssetDA_GroceryStore
Loot BiasFood 0.45, Trash 0.2, Scrap 0.15, Currency 0.1, Valuables 0.1
DifficultyMedium
Encounters1–2, medium thresholds (Stealth/Cunning sum ~18–22)
Recruit Chance10%
BuildingDA_Building_GroceryStore — medium box, distinct color. Placed in L_City.

Both buildings placed in L_City sublevel but lockedATNTBuilding shows padlock icon / grayed material until unlock trigger fires.

Target Unlock Conditions

Hardcoded for this block (formalized via milestone system in Block 9):

  • Rich Neighbor + Grocery Store unlock after 5 total raids completed
  • UCityMapSubsystem::GetUnlockedBuildings checks raid count via URaidSubsystem or a counter on UProgressionSubsystem
  • Building transitions from locked (gray, non-interactive) to unlocked (colored, hoverable, clickable)

Distractor Unit Type

DataAsset: DA_Distractor

StatRange
Speed (primary)15–25
Luck (primary)12–20
Stealth5–12
Strength3–8
Cunning5–12

Special raid behavior: If Distractor is in crew, Aggressive Dog encounter auto-passes (check ERaccoonType::Distractor in crew before stat check). Implemented in URaidSubsystem::ResolveEncounter.

Unlock trigger: recruit 4 total raccoons (hardcoded, formalized Block 9). After unlock, Distractor added to recruitment pool.

Recruitment System

On raid completion, if target has recruit chance > 0:

roll = FMath::FRand()
if roll < target.RecruitChance:
  type = random from unlocked types (Scout, Hauler, Distractor if unlocked)
  newId = URaccoonSubsystem::AddRaccoon(type)
  broadcast recruitment notification

In URaidSubsystem::CompleteRaid, after loot deposit:

  • Check FLootPayload::bRecruitAvailable (set during GenerateLoot)
  • If true: URaccoonSubsystem::AddRaccoon(RecruitType)
  • UI notification: “A stray raccoon followed the crew home! [Name] the [Type] has joined.”

Recruitment Pool

Available types for recruitment depend on progression:

  • Always: Scout, Hauler
  • After “Street Cred” milestone (4 raccoons recruited): Distractor added

URaccoonSubsystem::GetAvailableRecruitTypes() → checks progression state.


Done When

  • Upgrade Desk raises storage caps (resources deducted, cap visibly increases)
  • Rich Neighbor and Grocery Store buildings appear on city map after 5 raids (locked → unlocked transition)
  • Both new targets raidable with distinct loot biases and higher difficulty
  • Distractor type unlocks after recruiting 4 raccoons
  • Distractor auto-passes Aggressive Dog encounters
  • Recruitment from The Dump works (new raccoon joins roster with notification)
  • Recruited raccoon type drawn from unlocked pool
  • Upgrade costs scale per tier as defined on DataAssets

References

Upgrade Desk · Rich Neighbor · Grocery Store · Distractor · Station Operation Model