Unreal ToolsDeck Toolkit / DocsAll tools ↗
DECK TOOLKIT / DOCUMENTATION

Connect the player workshop.

Integrate the native Slate UI with your own catalog, ownership and deck model.

Own and retain the model

SDeckToolkitWorkshop reads a UDeckToolkitWorkshopModel through a weak pointer. Your host must retain the UObject with UPROPERTY, or an appropriate FGCObject in an editor host. A raw pointer or Slate shared pointer alone does not keep a UObject alive.

Populate Catalog, Decks, ActiveDeck, Capacity and PlayerLevel before opening the widget. Call LoadExamples only for a disposable sample: it resets the model's catalog and deck list. A newly created base model does not populate itself.

cpp
// Retain in your host's header:
UPROPERTY()
TObjectPtr<UDeckToolkitWorkshopModel> WorkshopModel;

// In a host method, after including DeckToolkitWorkshop.h:
WorkshopModel = NewObject<UDeckToolkitWorkshopModel>(this);
WorkshopModel->LoadExamples(); // Sample data only.
TSharedRef<SDeckToolkitWorkshop> Workshop =
    SNew(SDeckToolkitWorkshop).Model(WorkshopModel.Get());
// Attach Workshop to your host's viewport or Slate container.
// Retain/remove the Slate content and restore input focus when it closes.

Map your collection

TypeFields / responsibility
FDTWorkshopCardId, Name, Description, Family, Rarity, Cost, Owned, CopyLimit, RequiredLevel. Presentation data supplied by your game.
FDTWorkshopDeckId (FGuid), Name and ordered Cards (string IDs, including duplicates).
Model stateCatalog, Decks, ActiveDeck, Capacity (default 20), PlayerLevel (default 1).

Use stable catalog IDs that survive display-name changes. The sample uses card names as IDs for simplicity; a production catalog should have a deliberate migration strategy. IDs map to your own card definitions and are not automatically converted to Data Asset paths.

Override the adapter boundary

Subclass the model and override Refresh, Add, Remove, Create, RenameDeck, Delete, Equip and Save as needed. Refresh can fetch your host's current collection snapshot. Add should validate your rules and return a user-facing reason on failure. Keep updates on the game thread. Method names and signatures are listed in the API reference.

Base-model modifications are in memory; its Save returns a transient-session message. The persistent subclass supplies local file storage. Calling a model mutation directly from C++ does not automatically call Save; explicitly save when bypassing the widget workflow.

Editing is separate from equipping

Selecting a named deck changes the editing target. Use this deck calls Equip and changes ActiveDeck. SelectDeck changes the widget's editing deck; GetEditingDeck reads it. Deleting the active deck selects the first remaining deck, or leaves no active deck if the list is empty.

Presentation and input

Search matches collection text including name, description, rarity and cost; Family chips filter the visible collection. Capacity, average energy and the cost curve update during editing. The widget has an OnClosed delegate, SelectCard and SetStatus for host coordination.

Integrate focus and input mode in your owning controller. The example source, Source/DeckToolkitValidation/DeckToolkitDemo.cpp, demonstrates viewport hosting and the transition to the encounter. The provided UI is Slate; Blueprint-configurable themes and UMG adapters are not included. Modify the native presentation for your game.

Resolve compositions for combat

  1. Read the model's ActiveDeck ID and find that named deck.
  2. Resolve every string card ID against your current catalog/definition map.
  3. Reject or repair unknown definitions and validate your complete deck rules.
  4. Build an ordered array of card definition pointers, preserving duplicate IDs.
  5. Initialize the reference session, or hand the composition to your production combat system.
© 2026 Hungry Ghost / Unreal Tools.
Independent tools for Unreal Engine. Not affiliated with or endorsed by Epic Games.
Documentation for version 0.3.0 · Updated September 10, 2026