Push the Button, Send the Raccoons

There’s a difference between designing a raid system and clicking a button and watching three raccoons leave the hideout. This week I crossed that line.

The city builds itself, kinda. Splines gen the roads, bake NavMesh onto the roads only, and let a PCG graph handle the rest. Buildings, the hideout exit, raid targets, even the AI patrol pawns all spawn off the spline network. Move a road, everything resettles. That’s the kind of pipeline that keeps the door open every time you change your mind about the layout, which I do constantly.

There’s a real Resource ledger now — Trash, Currency, Scrap, with save/load and a delegate that fires when anything moves. The Raid subsystem sits on top of it: pick a target, assign idle crew, hit dispatch.

One war story worth sharing. PIE was hanging for fifteen, twenty seconds with weird recursive-flush warnings spamming the log on first launch. Turned out, when the raccoon subsystem was scanning the Asset Registry on init to find every raccoon-type Blueprint, it wasn’t filtering properly and was scanning EVERYTHING, which dragged in DatasmithContent BPs, which dragged in their meshes, which dragged in those dependencies, and so on. Replaced the AssetReg approach with a DeveloperSettings type-asset map — fill in soft class refs in Project Settings, the subsystem only loads what’s asked for, ez. Cold start is fine again. Lesson: if your “tiny init” is poking the AssetRegistry, it isn’t tiny.

Also snuck in a resource bar HUD, a DPI fix for ultrawide (designing at 4K from here on), save/load testing in the PlayerController, and a cleaner ownership model for view-swapping between the hideout and the overhead city map.

Next up: Block 04 — actual dispatch and raid encounters and the active-raid HUD that shows what your crew is doing while they’re out.


Changelog

  • C++ scaffolding: 8 TNT* enums, 10 structs, 5 UPrimaryDataAsset types, 8 UGameInstanceSubsystem stubs, UTNTStatBlockLibrary
  • TNTResourceSubsystem: Add/Spend/CanAfford over Trash/Currency/Scrap, FTNTCostData bundle, OnResourceChanged, save/load
  • TNTRaidSubsystem.DispatchRaid: validates idle crew, spends DispatchCostTrash, flips crew to Raiding, computes travel time from NavMesh path / avg crew Speed × SpeedScale
  • TNTCityMapSubsystem: caches BP_Building / BP_HideoutExit by tag, exposes GetUnlockedBuildings
  • UTNTRaccoonSettings (UDeveloperSettings) replaces AssetRegistry scan; fixes 15-20s cold-PIE stall caused by Datasmith BP recursive flush
  • BP_CityMapSubsystem.SetOverheadCamera: blends to lazy-resolved CityCamera, OnOverheadCameraChanged delegate drives BP_PlayerController IMC + pawn snapshot swap
  • Spline-based roads in L_City, road-only NavMesh
  • PCG graph spawns BP_Building, BP_HideoutExit, raccoon AI pawns, and AI targets along road splines
  • Resource UI bar + debug “press 2 to grant resources”
  • View-state ownership: BP_PlayerController owns active view; Main widget subscribes
  • Save/load test hook in BP_PlayerController
  • Ultrawide fix: widget DPI curve, design baseline now 4K
  • Block 03 spec tightened to dispatch-only; active-raid HUD + Backup Assignment moved to Block 04
  • Block 02 doc synced with shipped UTNTRaccoonSettings approach
  • NavigationSystem module dep added; DispatchCostTrash field on RaidTargetDataAsset