Modules and includes
| Module | Purpose | Public headers |
|---|---|---|
| DeckToolkitRuntime / Runtime | Assets, session, rules, examples and live tracing | DeckToolkitCard.h, DeckToolkitExamples.h, DeckToolkitSession.h, DeckToolkitRules.h, DeckToolkitLiveTrace.h |
| DeckToolkitUI / Runtime | Native Slate workshop and optional persistence | DeckToolkitWorkshop.h, DeckToolkitPersistentWorkshop.h |
| DeckToolkitEditor / Editor | Workbench, preview and trace inspector | Editor implementation; omit from runtime dependencies |
Add modules to your host's Build.cs according to where their types are used. Public headers that expose toolkit types need public dependencies; implementation-only use can use private dependencies. For a native workshop host, the following is a typical implementation dependency list:
PrivateDependencyModuleNames.AddRange(new string[] {
"DeckToolkitRuntime", "DeckToolkitUI", "Slate", "SlateCore"
});The plugin uses standard Unreal modules including Core, CoreUObject, Engine, Slate, InputCore and Json. It has no additional marketplace plugin, GAS or external-service dependency. All three modules currently allow Win64 only.
Assets and examples
| Type / method | Access and purpose |
|---|---|
| UDeckToolkitCard | Blueprint asset type; CardName, Description, EnergyCost, bRetain, bExhaust, Effects. |
| ValidateDefinition(FText&) const | Native validation; returns bool and failure text. |
| UDeckToolkitDeck::Cards | Blueprint-visible authored array of card references. |
| UDeckToolkitExamples::CreateExampleCards(UObject*) | Returns TArray<UDeckToolkitCard*>; original transient definitions. |
UDeckToolkitSession
| Function | Result / Blueprint access |
|---|---|
| Initialize(const TArray<UDeckToolkitCard*>&, int32 Seed, int32 HandLimit, FText&) | bool; callable. Atomic reset and snapshot. |
| BeginTurn(int32 DrawCount, int32 TurnEnergy) | bool; callable. |
| EndTurn(int32 EnemyDamage = 0) | bool; callable. Does not begin another turn. |
| CanPlayCard(int32 InstanceId, FText&) const | bool; pure. |
| QueueCard(int32 InstanceId, FText&) | bool; callable. Reserve copy and spend energy. |
| StepEffect() / PlayCard(int32 InstanceId, FText&) | bool; callable. Advance pending resolution / resolve a play. |
| GetHand() | TArray<FDTCardInstance>; pure. |
| GetDrawCount / GetDiscardCount / GetExhaustCount / GetEnergy | int32; pure, no arguments. |
| IsResolving / IsTurnActive / IsFinished | bool; pure, no arguments. |
| GetPlayer / GetEnemy | FDTCombatState; pure, no arguments. |
| GetTrace() | TArray<FDTTraceEntry>; pure. |
| OnChanged | Blueprint-assignable multicast delegate; handlers must not mutate the session. |
UDeckToolkitRules
CheckAddCard(const FDTDeckAddContext&) returns FDTDeckRuleResult. OpeningHandProbability(int32 DeckSize, int32 MatchingCards, int32 DrawCount) returns double. Both are static Blueprint-pure functions. Result.IsAllowed() is a native helper; Blueprint callers compare Failure with None.
Native workshop API
| UDeckToolkitWorkshopModel method | Signature / result |
|---|---|
| Refresh | virtual void Refresh() |
| Add | virtual bool Add(FGuid Deck, const FString& Card, FText& Reason) |
| Remove | virtual bool Remove(FGuid Deck, const FString& Card) |
| Create | virtual FGuid Create(const FString& Name) |
| RenameDeck | virtual void RenameDeck(FGuid Deck, const FString& Name) |
| Delete / Equip | virtual void Delete(FGuid Deck) / Equip(FGuid Deck) |
| Save | virtual bool Save(FText& Status) |
| CanAdd | bool CanAdd(FGuid Deck, const FString& Card, FText& Reason) const; non-virtual |
| LoadExamples | void LoadExamples(); replaces catalog and decks |
UDeckToolkitPersistentWorkshopModel adds bool ConfigureFile(const FString& Filename, FText& Status), overrides Save and provides const FString& GetSavePath() const. These methods are native, not Blueprint-callable.
SDeckToolkitWorkshop takes Model and OnClosed Slate arguments. Public helpers: FGuid GetEditingDeck() const, void SelectDeck(FGuid), void SelectCard(const FString&), and void SetStatus(const FText&).
UDeckToolkitLiveTrace
| Method | Access / result |
|---|---|
| Find(const UObject* WorldContext) | Native static; subsystem pointer or null. |
| IsCaptureEnabled / SetCaptureEnabled(bool) | Native static capture controls. |
| BeginCard(const UObject* Card, const FString& Name, const AActor* Source, const AActor* Target) | Native; FGuid. |
| Record(FGuid, FName Stage, const FString& Detail, const AActor* Target = nullptr) | Native; void. |
| RecordValue(FGuid, FName Stage, double Before, double After, const FString& Detail, const AActor* Target = nullptr) | Native; void. |
| GetEvents() const / Clear() | Blueprint-pure event array / Blueprint-callable void. |
| GetRevision() const / ExportJson(const FString&) const | Native int64 / bool. |
Value types
FDTCardEffect: Type, Amount, Condition. FDTCardInstance: InstanceId, Definition. FDTCombatState: Health, MaxHealth, Block, Strength, VulnerableTurns. FDTTraceEntry: Sequence, CardInstanceId, Stage, Detail, Before, After. See live event fields and workshop presentation types for the remaining records.