Production & Tech Nodes¶
SIM Functions from USeinProductionBPFL. These query production availability and tech state — essential for building production panels and tech tree UI.
Functions¶
SeinGetProductionAvailability¶
The primary function for building production panels. Returns one entry per producible item on the building, with full availability state:
| Field | Type | Description |
|---|---|---|
ActorClass |
TSubclassOf<ASeinActor> |
The producible archetype |
bPrerequisitesMet |
bool |
Player has required tech tags |
bCanAfford |
bool |
Player has enough resources |
bQueueFull |
bool |
Building's production queue is at capacity |
bAlreadyResearched |
bool |
Research item already completed |
Use this to drive button states in production panels:
For each FSeinProductionAvailability:
if AlreadyResearched → Hide or gray out
elif not PrerequisitesMet → Disabled state, show "Requires: ..."
elif not CanAfford → Unaffordable state, red cost text
elif QueueFull → Disabled state
else → Available state
SeinCanPlayerProduce¶
Quick boolean check — can this player produce this unit/research? Checks prerequisites and affordability. Use for simple enable/disable without the full availability breakdown.
SeinPlayerHasTechTag¶
Returns true if the player has unlocked the given tech tag. Tech tags are granted when research completes.
SeinGetPlayerTechTags¶
Returns all unlocked tech tags for a player. Use for tech tree visualization or prerequisite display.
Production System Overview¶
How Production Works¶
- Player clicks a production button on a building
QueueProductioncommand enters the command buffer- Sim validates: prerequisites met? Can afford? Queue not full?
- If valid: deducts resources, adds to building's queue
- Each tick: front item's build timer counts down
- On completion:
- Unit: Entity spawned at rally point,
EntitySpawnedvisual event - Research: Tech tag granted to player, archetype modifiers applied,
TechResearchedvisual event
Cancellation and Refunds¶
CancelProductioncommand removes the last queued item- Resources are fully refunded on cancellation
- Only the last item can be cancelled (LIFO)
Rally Points¶
SetRallyPointcommand sets where produced units spawn/move to- Stored on
FSeinProductionComponent - Visual rally point marker is render-side only
Tech Tree¶
There is no explicit tech tree asset. The tech tree is emergent from the prerequisite chains:
Building A produces Research X
→ Research X grants TechTag "Tech.Weapons.Tier1"
→ Building B requires "Tech.Weapons.Tier1" to produce Unit Y
To visualize the tech tree in UI, walk the archetype definitions and build a dependency graph from PrerequisiteTags → GrantedTechTag relationships.
UI Integration¶
For production panel buttons, use the UI Toolkit's action slot builder:
This packages production items into the same FSeinActionSlotData format used by abilities, with State reflecting availability (prerequisites, affordability, queue state). See UI Toolkit Nodes.