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);- Look up
UStationDataAssetfor the station - Get current
CapTierfromFStationRuntimeState - Check next tier exists in DataAsset’s
TArray<FCostData> UpgradeCosts UResourceSubsystem::CanAffordCost(NextTierCost)— return false if can’t affordUResourceSubsystem::SpendCost(NextTierCost)— atomic deduct- Increment
CapTieron runtime state - New cap = base cap + sum of tier bonuses (each tier adds a fixed amount, e.g., +10)
- 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)
| Tier | Cost | Cap 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:
| Field | Value |
|---|---|
| DataAsset | DA_RichNeighbor |
| Loot Bias | Valuables 0.45, Currency 0.2, Trash 0.15, Food 0.1, Scrap 0.1 |
| Difficulty | Medium-Hard |
| Encounters | 2–3, higher thresholds (Speed/Stealth sum ~25–30) |
| Recruit Chance | 5% |
| Building | DA_Building_RichNeighbor — larger box mesh, distinct color. Placed in L_City. |
Grocery Store:
| Field | Value |
|---|---|
| DataAsset | DA_GroceryStore |
| Loot Bias | Food 0.45, Trash 0.2, Scrap 0.15, Currency 0.1, Valuables 0.1 |
| Difficulty | Medium |
| Encounters | 1–2, medium thresholds (Stealth/Cunning sum ~18–22) |
| Recruit Chance | 10% |
| Building | DA_Building_GroceryStore — medium box, distinct color. Placed in L_City. |
Both buildings placed in L_City sublevel but locked — ATNTBuilding 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::GetUnlockedBuildingschecks raid count viaURaidSubsystemor a counter onUProgressionSubsystem- Building transitions from locked (gray, non-interactive) to unlocked (colored, hoverable, clickable)
Distractor Unit Type
DataAsset: DA_Distractor
| Stat | Range |
|---|---|
| Speed (primary) | 15–25 |
| Luck (primary) | 12–20 |
| Stealth | 5–12 |
| Strength | 3–8 |
| Cunning | 5–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 duringGenerateLoot) - 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