Skip to content

Blueprint Reference

Reference for Blueprint assets under Content/CityBuilderTemplate/. Property names, enums, and class defaults were read from the template project (v1.7) via Unreal MCP.

flowchart TB
  GI["BP_CBT_GameInstance<br/>CityBuilderSaveGameObject · owns BP_CBT_SaveGame<br/>CreateSaveGameObject() · GetIsLoadGame()"]
  PC["BP_CBT_PlayerController<br/>GridActor · BuildingSelectWidget<br/>Internal_SaveGame() · CreateRoad()"]
  Singleton["BP_CBT_Singleton<br/>CurrentCurrency · CurrentPremiumCash · CurrentXP · OnLevelUp<br/>UpdateCurrency()"]
  BaseBuilding["BP_CBT_BaseBuilding<br/>BuildingCost_Currency · ConstructionTime · BuildingState<br/>Internal_StartConstruction()"]
  BaseResidential["BP_CBT_BaseResidential<br/>InhabitantAddDelay · InhabitantMaxLimit · TimerHandle_AddInhabitant<br/>→ House · Apartment"]
  BaseCommercial["BP_CBT_BaseCommercial<br/>RevenuePerWorker · ProfitDelay · WorkerMaxLimit · bAutoCollectIncome<br/>→ Shop · OfficeBuilding"]
  Road["BP_Road<br/>PreviewRoad · CreateRoad()"]
  RoadTile["BP_RoadTile<br/>RoadType · AddRoadToSave()"]

  PC -->|spawns| BaseBuilding
  PC -->|previews| Road
  BaseBuilding --> BaseResidential
  BaseBuilding --> BaseCommercial
  Road -->|spawns tiles| RoadTile
  Singleton -->|events| BaseBuilding

Drives BP_CBT_GameState and simulation buttons on WBP_PlayerHUD.

ValueEffect
NoneUninitialized / default
PausedSimulation timers and day/night progression stop
NormalSpeedDefault simulation rate
DoubleSpeedAccelerated simulation

Stored on BP_CBT_GameState → Simulation State. Access via GetSimulationState / UpdateSimulationState (BFL_CBT_GlobalFunctions). WBP_PlayerHUD simulation buttons call SetSimulationSpeed.

Lifecycle for every BP_CBT_BaseBuilding child.

ValueMeaning
NoneUninitialized
PreviewingGhost building following cursor — not yet placed
ConstructingPlaced; ConstructionTime timer running
ConstructionFinishedBuild complete; ready for inhabitants or workers
OccupiedResidential or commercial building at operating capacity
AbandonedNo new inhabitants or workers allowed
GettingDestroyedBulldoze in progress — state locked

Update through UpdateBuildingState / GetBuildingState on the building or controller.

ValueUsed by
ResidentialBP_CBT_BaseResidential, WBP_BuildingFrame residential tab
CommercialBP_CBT_BaseCommercial, commercial tab
ValueUsed by
StraightSM_RoadTile_Straight — default segment
FourwaySM_RoadTile_Fourway — intersection via Internal_UpdateToFourwayIfRequired

Meshes: Meshes/Roads/Straight/, Meshes/Roads/Intersection/.

Returned when the player confirms placement (Internal_StartConstruction).

ValueMeaning
SuccessConstruction started; currency consumed
NotEnoughMoneyInsufficient BuildingCost_Currency or BuildingCost_PremiumCash
NotNearRoadNo qualifying BP_RoadTile adjacent
InvalidStateBuilding not in a valid EBuildingState for placement
InPreviewBuilding still in Previewing state
ValueUsed by
PointLightPoint-style window lights
RectangleLightRect area lights on building meshes

Configured per entry in Ambient Light Configs on BP_CBT_BaseBuilding.

FieldTypePurpose
Building transform / classRespawn saved buildings
BuildingStateEBuildingStateRestore operating state
ConstructionRemainingTimeFloatResume in-progress builds

ST_BaseResidentialSave / ST_BaseCommercialSave

Section titled “ST_BaseResidentialSave / ST_BaseCommercialSave”

Extend base save data with population, worker, and income timer fields for each building instance.

FieldPurpose
RoadTypeERoadType mesh variant
TransformTile location on grid

Saved ambient vehicle state for BP_Vehicle respawn on load.

Row data for WBP_BuildingSelect icons, costs, and unlock level.

Payload for WBP_LevelUpNotification (title, description from ST_CityBuilderTemplate).

FieldPurpose
Particle Effect / Sound EffectOptional VFX/SFX
Ambient Light TypeEAmbientLightType material variant

Static library used across actors and widgets.

FunctionDescription
GetCityBuilderGameInstanceTyped BP_CBT_GameInstance accessor
GetCityBuilderPlayerControllerTyped controller accessor
GetCityBuilderSaveGameActive BP_CBT_SaveGame object
GetSingletonBP_CBT_Singleton in the level
GetGridSizeReads BP_CBT_Grid → Current Grid Size (falls back to Default Grid Size)
GridSnap_FloatSnaps world coordinate to grid
GetWorldLocationAtMousePointDeproject cursor for placement
AddCurrency / ConsumeCurrencyEconomy helpers
AddPremiumCash / ConsumePremiumCashPremium currency
GetCurrentCurrency / GetCurrentPremiumCashRead singleton wallet
GetSimulationState / UpdateSimulationStatePause and speed
GetSimulationSpeed / SetSimulationSpeedNumeric sim multiplier
GetTimeAsTextFormats timespan for UI
Property / functionPurpose
CityBuilderSaveGameObjectLive save object
CreateSaveGameObjectInstantiates BP_CBT_SaveGame on new game
GetIsLoadGametrue when continuing from Load Game
GetSaveGameObjectReturns save for controllers and widgets
OpenLevelTravels between MainMenu and DemoMap
PropertyDefaultPurpose
Starting Currency100000Wallet on new game
Starting Premium Cash10Premium currency on new game
Current Level1Player city level
Max Player Level50Level cap
Grid Size200Placement snap size (world units)
GridActorReference to level BP_CBT_Grid
BuildingSelectWidgetWBP_BuildingSelect instance
Residential Buildings / Commercial BuildingsArrays of spawnable building classes
Road Spline Update Time0.1 sPreview road refresh interval
bWantsToPlaceRoadRoad mode active
bIsPreparingToBulldoze / bIsWantsToBulldozeBulldoze mode
FunctionDescription
GetSelectedBuildingClass for next placement
GetPreviewBuildingActive preview actor
HasEnoughCurrencyToConstructValidates wallet before build
CreateRoadFinalizes spline into BP_RoadTile chain
Internal_PreviewRoad / ClearPreviewRoadRoad ghost mesh
Internal_BulldozeRemoves target building or road
Internal_SaveGame / Internal_LoadGameSerialize/deserialize city
GetSaveGameSlotNameAndIndexSlot CityBuilderSaveGame + user index
AddLeveledUpElements / ClearLeveledUpElementsLevel-up UI queue
Internal_GetExperienceForLevelXP threshold curve
PropertyDefaultPurpose
Camera Rotation Speed100Q / E orbit speed
Min Zoom500Closest camera distance
Max Zoom4500Farthest camera distance
Zoom Increment600Per scroll-wheel step
Zoom Interp Speed5Smooth zoom blend
Camera Pitch CurveMisc/CameraPitchCurvePitch vs zoom

Building rotate actions: BuildingRotateLeft / BuildingRotateRight. Delegates OnSaveGame fire when the controller persists state.

PropertyPurpose
CurrentCurrency / CurrentPremiumCashPlayer wallets
CurrentResidents / TotalResidentsResidential population
CurrentWorkers / TotalJobsCommercial employment
EventBroadcast when
OnCurrencyUpdated / OnPremiumCashUpdatedWallet changes
OnXpChangedXP bar should refresh
OnLevelUpCity level increases — unlock buildings
OnPopulationChangedResidential count changes
OnWorkerChanged / OnAllJobsFilledCommercial staffing updates
OnDayStarted / OnNightStartedBP_CBT_TimeOfDay phase change
OnSaveGameSerialize singleton stats
FunctionDescription
UpdateCurrency / AddCurrencyModify wallet
AddPopulation / RemovePopulationResidential simulation
AddLeveledUpElements / GetLeveledUpElementsLevel-up notification queue
PropertyDefaultPurpose
Sun Speed10Sun rotation speed at normal simulation
Night Threshold0Sun rotation at/above which IsNight is true
bEnable Day Night CycletrueMaster toggle for day/night delegates
bRotate Sun Based On Player ViewfalseSync sun yaw to camera
SunDirectional light refScene sun actor
Sun Color CurveMisc/SunCurveColorColor over sun angle
FunctionDescription
IsNightGates vehicle visibility and building lights
Internal_BroadcastDayNightEventFires singleton day/night delegates
Internal_CheckIsNightPeriodic night test

Listens to OnSimulationStateChanged from BP_CBT_GameState. Simulation speed multipliers come from BFL_CBT_GlobalFunctions → SetSimulationSpeed, not from this actor.

PropertyDefaultPurpose
Default Pawn ClassBP_CBT_PlayerPawnTop-down camera pawn
Player Controller ClassBP_CBT_PlayerControllerPlacement and economy authority

Referenced in Config/DefaultEngine.ini as the project game mode.

PropertyDefaultPurpose
Simulation StateNormalSpeedESimulationState — pause / normal / double speed

Updated by WBP_PlayerHUD simulation buttons via SetSimulationSpeed / UpdateSimulationState.

PropertyPurpose
BuildingName / BuildingDescription / BuildingIconUI + tooltips
BuildingCost_Currency / BuildingCost_PremiumCashPlacement cost
ConstructionTimeSeconds until ConstructionFinished
UnlockLevelMinimum city level (per child building)
XPXP awarded when construction completes
BuildingMeshes / BuildingMeshesRandomSeedMesh variants
bUseSeedToRandomizeBuildingsDeterministic visual variety
bSpawnAmbientLightsWindow lights (ST_AmbientLight)
GridActorSnap reference
FunctionDescription
Internal_StartConstructionBegins timer, consumes currency
Internal_CheckNearRoadValidates bIsNearRoad
UpdateBuildingStateEBuildingState transitions
BulldozePrepareStart destruction
OnBuildingSaveWrites ST_BaseBuildingSave
HasEnoughCurrencyToConstructPre-check before place
PropertyPurpose
Inhabitant Add DelaySeconds between adding inhabitants after construction
Inhabitant Max LimitCap on residents for this building
TimerHandle_AddInhabitantTimer driving inhabitant growth
AddBaseResidentialSaveValuesPersist residential state
PropertyPurpose
Worker Add DelaySeconds between hiring workers after construction
Worker Max LimitCap on workers for this building
Profit DelaySeconds between income generation ticks
Revenue Per WorkerCurrency earned per worker per tick
Generated IncomeRuntime payout (computed from workers × revenue)
Currency Collect XPXP on manual collect when bGetXpWhenCollectingCurrency
bAutoCollectIncomeAuto-collect vs WBP_CollectCurrency button
CurrencyWidgetButtonWorld-space collect widget class
FunctionDescription
CollectIncomeAdds Generated Income to singleton
ClassCurrencyPremiumBuild (s)UnlockXPExtra defaults
BP_CBT_House1005170Inhabitants 4, delay 2 s, mesh SM_House
BP_CBT_Apartment1010151128Inhabitants 12, delay 2.2 s, mesh SM_Apartment
BP_CBT_Shop51252135Workers 10, hire delay 1.5 s, revenue/worker 268, profit delay 60 s
BP_CBT_OfficeBuilding1024101200Workers 10, hire delay 2.3 s, revenue/worker 1240, profit delay 120 s

Localized names live in ST_CityBuilderTemplate; icons under Textures/UI/T_UI_*.

PropertyDefaultPurpose
Default Grid Size100Base cell size for visual grid
Grid Divisions4Subdivisions per cell
Current Grid SizeruntimeActive snap size (may differ from default)

BFL_CBT_GlobalFunctions → GetGridSize reads from the level grid actor. BP_CBT_PlayerController → Grid Size (200) is the placement snap used during building/road placement.

FunctionDescription
CreateRoadSpawns tile actors along spline
PreviewRoad / ClearPreviewRoadGhost mesh while dragging
SetSplinePointsMouse-driven road path
PropertyPurpose
RoadTypeERoadType mesh selection
RoadMeshComponentInstanced static mesh
FunctionDescription
AddRoadToSaveAppends ST_RoadSave
Internal_UpdateRoadTypeNeighbour-aware mesh swap
Internal_AddLampToStraightRoadStreet lamp prop
BulldozePrepareRoad removal

Ambient traffic on roads.

FunctionDescription
Internal_TraceForRoadTileFinds next tile along spline
Internal_OnDayStarted / Internal_OnNightStartedShow/hide with day cycle
Internal_PlayTimelineMovement along road
Array / fieldContents
BaseBuildingSaveArrayAll buildings
BaseCommercialSaveArray / BaseResidentialSaveArrayTyped extensions
RoadSaveArrayST_RoadSave tiles
VehiclesST_Vehicle
CurrentCurrency, CurrentXP, CurrentLevel, CurrentMaxXPProgression
FunctionDescription
AddBaseBuildingSaveValuesSerialize building instance
AddRoadToSave / AddVehicleWorld object persistence
ClearSavedValuesNew game reset
WidgetRole
WBP_MainMenuPlay, load, exit — uses DoesSaveGameExist
WBP_PlayerHUDCurrency, XP, level, population, simulation buttons, save/load
WBP_BuildingFrameCategory tabs and bulldoze entry
WBP_BuildingSelectBuilding picker grid
WBP_RoadFrameRoad tool activation
WBP_BulldozeBulldoze mode UI
WBP_ConstructionTimerWorld-space construction countdown
WBP_CollectCurrencyCommercial income button
WBP_LevelUpFrame / WBP_LevelUpNotificationLevel-up modal

Blueprint macro library for shared traces, save slot helpers, and math used by buildings and roads. Exposes GetSaveGameSlotNameAndIndex consumed by HUD and main menu widgets.