Skip to content

SeinARTS Production Library

Class · USeinProductionBPFL : UBlueprintFunctionLibrary

#include "Lib/SeinProductionBPFL.h"

deterministic: safe in simulation code

Nodes for production queues: check whether an item can be queued, enqueue and cancel items, set rally points, change queue limits per producer or player, and read or set Production Data.

Check whether another item can be queued. Used includes queued and completed purchases in the effective scope. Producer overrides take precedence over player overrides and class defaults.

static bool SeinCanEnqueueProduction(const UObject* WorldContextObject, FSeinEntityHandle Producer, TSubclassOf<AActor> ProducibleClass, ESeinProductionQueueResult& Result, FSeinProductionQueueSettings& Settings, int64& Used);

Override this producible’s policy for one producer. Existing entries and completed history remain. Returns false for an invalid amount or unauthorized call.

static bool SeinSetProductionUnitQueuePolicy(const UObject* WorldContextObject, FSeinEntityHandle Producer, TSubclassOf<AActor> ProducibleClass, FSeinProductionQueueSettings Settings);

Clear this producer’s override for the item, restoring the player override or authored defaults. Does not clear history.

static bool SeinClearProductionUnitQueuePolicy(const UObject* WorldContextObject, FSeinEntityHandle Producer, TSubclassOf<AActor> ProducibleClass);

Override this producible’s policy for a player. Producer overrides take precedence. Existing entries and completed history remain.

static bool SeinSetPlayerQueuePolicy(const UObject* WorldContextObject, FSeinPlayerID Player, TSubclassOf<AActor> ProducibleClass, FSeinProductionQueueSettings Settings);

Clear this player’s override for the item, restoring authored defaults where no producer override exists. Does not clear history.

static bool SeinClearPlayerQueuePolicy(const UObject* WorldContextObject, FSeinPlayerID Player, TSubclassOf<AActor> ProducibleClass);

Read Production Data for an entity. Returns false and logs a warning on invalid handle or missing component; OutData is untouched on failure.

static bool SeinGetProductionData(const UObject* WorldContextObject, FSeinEntityHandle EntityHandle, FSeinProductionPayload& OutData);

Batch read Production Data. Invalid/missing entities are skipped (warning logged).

static TArray<FSeinProductionPayload> SeinGetProductionDataMany(const UObject* WorldContextObject, const TArray<FSeinEntityHandle>& EntityHandles);

Overwrite the entity’s whole Production Data. False when the entity has none. Prefer Enqueue Production, Cancel Production and the rally nodes, which keep the queue and its refunds consistent.

static bool SeinSetProductionData(const UObject* WorldContextObject, FSeinEntityHandle EntityHandle, const FSeinProductionPayload& NewData);

Set the progress of the item at the front of the entity’s production queue. False when the entity has no production queue.

static bool SeinSetCurrentBuildProgress(const UObject* WorldContextObject, FSeinEntityHandle EntityHandle, FFixedPoint NewProgress);

Append a queue entry on Ability’s owner for Producible Class, reading build time, refund policy and research effect from the class’s Producible Data. The activation’s deducted cost becomes the entry’s refundable at-enqueue principal; a Production Queue ability also transfers its deferred bucket. No-op (refunding the activation) when the owner has no production queue, the queue is full or the class has no Producible Data.

static void SeinEnqueueProduction(USeinAbility* Ability, TSubclassOf<AActor> ProducibleClass);

Cancel one item in Ability’s owner’s production queue and refund its original payer under its refund policy. Queue Index is zero-based: 0 cancels the front item and resets progress; later indices remove waiting items. False without changes for an invalid index, an owner without a queue, or a call outside a simulation callback.

Defaults: QueueIndex = 0.

static bool SeinCancelProduction(USeinAbility* Ability, int32 QueueIndex = 0);

Rally Ability’s owner’s produced units to a transform. No-op without a production queue.

static void SeinSetRallyPoint(USeinAbility* Ability, const FFixedTransform& Transform);

Rally Ability’s owner’s produced units to an entity’s transform at dispatch time.

static void SeinSetRallyEntity(USeinAbility* Ability, FSeinEntityHandle RallyEntity);

Clear Ability’s owner’s rally target; produced units stay beside the producer.

static void SeinClearRallyPoint(USeinAbility* Ability);