Skip to content

Getting Started

City Builder Template is a Blueprint game project. Add it from FAB, open DemoMap in the editor, press Play, and walk through placement, roads, and the simulation HUD before editing Blueprints.

  1. Add City Builder Template from FAB and create/open the project.
  2. The editor opens DemoMap (Content/CityBuilderTemplate/Maps/DemoMap).
  3. Press Play (PIE) — or run packaged build starting at MainMenu.

Config/DefaultEngine.ini sets:

SettingValue
Editor startup mapDemoMap
Game default mapMainMenu
Game modeBP_CBT_GameMode
Game instanceBP_CBT_GameInstance

From MainMenu, click Play Game to open DemoMap. Use Load Game when a save exists in slot CityBuilderSaveGame.

SettingDefaultBlueprint
Starting currency100000BP_CBT_PlayerController → Starting Currency
Starting premium cash10BP_CBT_PlayerController → Starting Premium Cash
City level1 (max 50)BP_CBT_PlayerController
Camera zoom5004500 (step 600)BP_CBT_PlayerPawn
Grid snap (placement)200 world unitsBP_CBT_PlayerController → Grid Size
Visual grid cell100 (4 divisions)BP_CBT_Grid → Default Grid Size / Grid Divisions
flowchart TD
  Launch[Play MainMenu or DemoMap] --> HUD[WBP_PlayerHUD]
  HUD --> Roads[Place roads via BP_Road]
  Roads --> Build[Select building type]
  Build --> Preview[Preview on grid]
  Preview -->|Primary click| Construct[Start Construction]
  Construct --> Operate[Population / income / XP]
  Operate --> Sim[Pause / normal / double speed]
  Sim --> Save[Save or Load slot]
UI elementBehaviour
Building frameWBP_BuildingFrame — residential vs commercial tabs
Building selectWBP_BuildingSelect — pick House, Apartment, Shop, or Office
Road frameWBP_RoadFrame — enter road placement mode
BulldozeWBP_Bulldoze — remove buildings or roads
Currency / XP barsBound to BP_CBT_Singleton events
Simulation controlsPause, normal speed, double speed on WBP_PlayerHUD
Save / LoadSaveGameBtn / LoadGameBtn → slot CityBuilderSaveGame

Controls (DefaultInput.ini + BP_CBT_PlayerPawn)

Section titled “Controls (DefaultInput.ini + BP_CBT_PlayerPawn)”
InputAction
W / S / A / DMove camera (MoveForward / MoveRight)
Q / ERotate camera (CameraRotate)
Mouse wheel up / downZoom (CameraZoomIn / CameraZoomOut)
Left mousePrimary click — place building or road point
Right mouseSecondary click — cancel / context actions on controller
Z / CRotate building preview left / right
DeleteBulldoze targeted building or road
Escape / BackspacePause (PauseGame)
Content/CityBuilderTemplate/
├── Blueprints/
│ ├── BP_CBT_GameInstance, BP_CBT_GameMode, BP_CBT_GameState
│ ├── BP_CBT_PlayerController, BP_CBT_PlayerPawn, BP_CBT_Singleton
│ ├── BP_CBT_TimeOfDay, BP_CBT_SaveGame, BP_CBT_ObjectMacros
│ ├── BFL_CBT_GlobalFunctions
│ ├── Buildings/ Enums/ Structs/ Widgets/ Roads/ Environment/ Misc/
├── Maps/ DemoMap, MainMenu
├── Meshes/ Materials/ Textures/ Misc/
└── 1_BP_CBT_Tut_* … 5_BP_CBT_Tut_* (in-editor tutorials)

Central gameplay authority — placement, economy checks, save/load.

Function / propertyPurpose
GetSelectedBuilding / GetPreviewBuildingActive build type and ghost preview
HasEnoughCurrencyToConstruct / HasEnoughPremiumCashToConstructPre-place validation
CreateRoad / Internal_PreviewRoadRoad spline and tile spawning
Internal_BulldozeDestruction flow
Internal_SaveGame / Internal_LoadGamePersist city state
Grid Size / GridActorPlacement snap and level grid reference

Global city stats and UI events.

Property / eventPurpose
CurrentCurrency / CurrentPremiumCash / CurrentXPEconomy and progression
CurrentResidents / CurrentWorkersPopulation and employment
OnCurrencyUpdated / OnPremiumCashUpdated / OnXpChangedHUD refresh
OnLevelUp / OnPopulationChanged / OnWorkerChangedWBP_LevelUpNotification, population bar
OnDayStarted / OnNightStartedDay/night reactions
AddPopulation / RemovePopulationResidential simulation

Parent for all placeable structures.

PropertyPurpose
BuildingCost_Currency / BuildingCost_PremiumCashPlacement price
ConstructionTimeBuild timer duration
BuildingState (EBuildingState)Preview → construction → operating
bIsNearRoadRequires adjacent BP_RoadTile
UnlockLevelMinimum city level (per child building)
PropertyDefaultPurpose
Default Grid Size100Base cell size for the visual grid
Grid Divisions4Subdivisions per cell
Current Grid SizeruntimeActive snap size read by GetGridSize

Placement snapping during building and road placement uses BP_CBT_PlayerController → Grid Size (200), not the grid actor default alone.

BP_CBT_SaveGame stores arrays of ST_BaseBuildingSave, ST_BaseCommercialSave, ST_BaseResidentialSave, ST_RoadSave, and ST_Vehicle, plus currency, XP, and level fields. Slot name comes from GetSaveGameSlotNameAndIndex (default CityBuilderSaveGame).

DefaultEngine.ini defines custom object channels used for placement traces:

ChannelNameUsed for
ECC_GameTraceChannel1GenericBuildingBuilding overlap / placement
ECC_GameTraceChannel2GenericRoadRoad tile overlap

Profiles GenericBuilding and GenericRoad are referenced by building and road meshes.