Gameplay Scaffold¶
Purpose¶
This document describes the current C++ gameplay scaffold for Andromeda.
Current goal:
The C++ layer owns gameplay behavior and UI data flow. Blueprints remain the authoring layer for actor composition, widget layout, asset references, and level placement.
Current C++ Areas¶
The scaffold is organized by gameplay responsibility:
Interaction¶
Files:
Interaction/AndromedaInteractableInterface.*Interaction/AndromedaInteractableComponent.*AndromedaCharacter.*Interaction/AndromedaCarryComponent.*
The interaction system answers three questions:
Can the player interact with this?
What prompt should be shown?
What happens when the player interacts?
IAndromedaInteractableInterface is the shared contract for interactable objects. It exposes:
CanInteractGetInteractPromptInteract
These are BlueprintNativeEvent functions, so C++ provides default behavior and Blueprint can override behavior later if there is a clear presentation or content reason.
UAndromedaInteractableComponent is the reusable component implementation. It stores prompt text, an enabled flag, and broadcasts OnInteracted when used.
AAndromedaCharacter traces forward from the first-person camera each frame. If the trace hits an interactable object or component, the character stores it as the focused interactable.
The character owns prompt widget lifecycle:
- creates
UAndromedaInteractPromptWidgetfromInteractPromptWidgetClass - adds it to the viewport
- updates prompt text when focus changes
- clears the prompt when focus is lost or UI suppresses prompts
The character also owns input action dispatch:
- movement
- mouse look
- jump
- interact
UAndromedaCarryComponent owns the current held item. It attaches picked-up salvage to a camera-relative hold point, disables item collision while carried so the player can still aim at stations, places the item onto station placement points without physics simulation, and can drop the held item in front of the player.
The interact input is contextual. If the player is focused on a valid interactable, E uses that target. If the player is carrying an item and no valid interactable is focused, E drops the item.
The Blueprint character should assign input action assets and the prompt widget class. It should not need Event Graph logic for the maintained vertical slice.
Salvage Data¶
Files:
Salvage/AndromedaSalvageTypes.hSalvage/AndromedaSalvageItemData.*Salvage/AndromedaSalvageItem.*
AndromedaSalvageTypes.h defines the core data types:
EAndromedaHazardRatingEAndromedaSalvageProcessingActionEAndromedaSalvageProcessingStateEAndromedaPackageCategoryEAndromedaHandlingSizeFAndromedaScanProfileFAndromedaPackageRequirementFAndromedaProcessingRuleFAndromedaScanResultFAndromedaProcessingResult
UAndromedaSalvageItemData is a UPrimaryDataAsset. It is intended for editor-authored salvage definitions such as DA_DamagedReactorCoil.
It contains:
- item name
- manifest claim
- legal requirement
- scan profile
- package requirement
- processing rules
Processing rules define what happens when the player chooses actions such as Sell or Quarantine.
AAndromedaSalvageItem is the physical salvage actor base. A Blueprint item such as BP_DamagedReactorCoil should inherit from it, assign a mesh, and assign a salvage data asset.
The item can:
- build scan results from its data asset
- cache its scan result after scanning
- track whether it has been scanned
- track whether it has been packaged
- process a selected action
- track whether it is unprocessed, sold, quarantined, dismantled, reported, archived, or disposed
- disable interaction after a successful processing action
- be picked up through the carry component when interacted with
Scanner¶
Files:
Station/AndromedaScanner.*Station/AndromedaItemStation.*Station/AndromedaTaggingBench.*Station/AndromedaWarehouseZone.*Station/AndromedaSalvageSpawnPoint.*
AAndromedaItemStation is the base class for physical stations that can accept one carried salvage item at a placement point.
AAndromedaScanner is the scanner station actor. It has:
- mesh component
- placement point component
- interactable component
- scan result widget class
- placed salvage item reference inherited from
AAndromedaItemStation
The scanner accepts a carried salvage item at its placement point. There is no overlap-based scan volume in the intended flow.
The scanner can:
- build a scan result from that item
- mark the item as scanned and cache the scan result on the item
- return a clear "No salvage detected" fallback when empty
- expose the scanned item's required or recommended package handling
- create and display the scan result widget
- switch input mode to UI-only while scan UI is open
- suppress interaction prompts while UI is open
AAndromedaTaggingBench accepts scanned items and assigns the required package. It is intentionally separate from the scanner so packaging is a physical work step.
AAndromedaWarehouseZone accepts packaged items and applies final processing such as Sell or Quarantine. Credits are awarded only when the packaged item is placed in the appropriate warehouse zone.
AAndromedaSalvageSpawnPoint spawns a configured salvage item class at BeginPlay. It is the first scaffold for cargo hangar arrivals.
The scanner Blueprint should configure mesh, collision, placement point, and ScanResultWidgetClass. It should not need Event Graph logic for the maintained vertical slice.
Blockout note: the scanner, tagging bench, and inspection table should use the shared SM_Blockout_Workbench mesh for now. Their gameplay differences should come from the C++ class, Blueprint defaults, placement point, UI references, and future signage rather than separate blockout geometry.
UI Widgets¶
Files:
UI/AndromedaInteractPromptWidget.*UI/AndromedaScanResultWidget.*UI/AndromedaShiftResultWidget.*
Widget behavior is C++ owned. Widget Blueprints provide layout and named Designer widgets.
UAndromedaInteractPromptWidget owns:
- prompt text storage
- prompt visibility
- prompt text block update
Expected optional Designer bindings:
PromptRootPromptTextBlock
UAndromedaScanResultWidget owns:
- scan result storage
- scan text updates
- package requirement text updates
- close button behavior
Expected optional Designer bindings:
ItemNameTextManifestTextLegalRequirementTextRadiationTextMassTextSerialTextHazardTextPackageRequirementTextNotesTextCloseButton
The scan result widget is informational only. Sell, quarantine, and package assignment are intentionally handled by physical station actors.
UAndromedaShiftResultWidget owns:
- processing result storage
- result text updates
- close button behavior
- restoring game input and interaction prompts
Expected optional Designer bindings:
ResultTitleTextConsequenceTextPayoutTextCloseButton
Maintained vertical-slice widgets should not require Event Graph logic.
Current Content Layer¶
Core Blueprint assets:
Content/Andromeda/Blueprints/Core/BP_PlayerCharacter
Content/Andromeda/Blueprints/Core/BP_PlayerController
Content/Andromeda/Blueprints/Core/BP_SalvageBayGameMode
Gameplay content assets:
Content/Andromeda/Blueprints/Items/BP_DamagedReactorCoil
Content/Andromeda/Blueprints/Station/BP_Scanner
Content/Andromeda/Data/DA_DamagedReactorCoil
Content/Andromeda/Maps/L_SalvageBay_Prototype
UI assets:
Content/Andromeda/Blueprints/UI/WBP_InteractPrompt
Content/Andromeda/Blueprints/UI/WBP_ScanResult
Content/Andromeda/Blueprints/UI/WBP_ShiftResult
Input assets:
Content/Andromeda/Input/IA_Interact
Content/Andromeda/Input/IA_Jump
Content/Andromeda/Input/IA_MouseLook
Content/Andromeda/Input/IA_Move
Content/Andromeda/Input/IMC_Player
Verification¶
The current vertical slice should verify:
- Player can move, look, jump, and interact.
- Prompt appears when aiming at an interactable item or scanner.
- Interacting with the reactor coil prints/logs an inspection debug message.
- Interacting with the scanner opens scan UI and switches to UI input.
- Scanner displays reactor coil data when the item is placed on the scanner placement point.
- Sell and Quarantine each show a processing result.
- Closing the result restores game input and interaction prompts.