HUNGRY GHOST / UNREAL TOOLS

Build your next advantage.

Ultimate Deck Building Toolkit documentation

VERSION 0.3.0 / UNREAL ENGINE 5.8 / WINDOWS X64
Actual Unreal Engine capture of the named-deck workshop

Ultimate Deck Building Toolkit

Version 0.3.0. Unreal Engine 5.8, Windows x64.

Card authoring, a native player deck workshop, local named-deck persistence, and a seeded single-player reference encounter. Full C++ source is included.

Install and open

Install the plugin for Unreal Engine 5.8 through Fab, then enable Ultimate Deck Building Toolkit under Edit > Plugins and restart the editor. For manual source installation, copy this complete plugin folder to your C++ project's Plugins/UltimateDeckToolkit folder and build Development Editor with the Unreal C++ workload in Visual Studio 2022. The standalone example also requires C++ compilation.

Read the online guide or open the example download page. The example project requires this plugin to be installed separately.

Try it

Enable Ultimate Deck Building Toolkit, build Development Editor, and open Tools > Deck Workbench (the Deck Building section). The workbench starts with 20 original example cards, seed 42, a five-card opening hand, three energy, and a ten-card hand limit.

Repeated copies have distinct instance IDs. A resolving card cannot be drawn again before it finishes. Failed plays leave gameplay state unchanged and explain the rejection. The trace retains the most recent 512 entries.

Author persistent cards and decks

In the Content Browser, create a Miscellaneous > Data Asset using DeckToolkitCard. Set its name, energy cost, retain/exhaust flags, and ordered effects. Save normally. Create another Data Asset using DeckToolkitDeck, and assign card references to its Cards array; duplicate references represent multiple copies.

Select a deck asset, or several card assets, then choose Load selected deck/cards in the workbench. A selected deck takes precedence over individual cards. If multiple decks are selected, the first by asset path is used. Individual cards sort by asset path; authored decks preserve their array order.

The built-in examples are transient: editing them is a disposable experiment. Persistent assets edited in the workbench use Unreal's normal asset Save workflow. Reset snapshots definitions, so edits never alter effects halfway through a simulation.

Supported reference effects: damage, block, healing, energy, draw, strength, and vulnerable. Each may be unconditional or require the target to have been defeated. A card supports up to 64 effects, with nonnegative integer amounts and costs up to 1,000,000. Strength is an encounter-long bonus on each hit. Vulnerable multiplies damage by 1.5, rounded down, and expires as turns end. Block protects against the enemy attack and clears at player turn start. Effects after a lethal hit still resolve, allowing on-kill rewards.

Runtime API

Construct a DeckToolkitSession object in Blueprint and retain it in a variable. Call Initialize(Cards, Seed, HandLimit), then BeginTurn(DrawCount, TurnEnergy). Play by instance ID, not card definition. Bind OnChanged to update UI; query hand, pile counts, combat states and trace. Use QueueCard/StepEffect for debugging, or PlayCard to resolve immediately. An initialized session is required before turns can start. Initialize can reset a session, including a paused resolution, but invalid input preserves the old state.

The reference session has no tick, asset scan or network traffic. Sessions are local, game-thread objects. Notifications are read-only boundaries: attempts to mutate a session from an OnChanged handler are rejected. The reference model has one player and one enemy, both initially at 60 health; it does not execute arbitrary GAS abilities or reproduce a host game's damage rules. Same ordered input, seed, definitions, and commands reproduce draws within the tested engine version; cross-engine replay is not promised.

DeckToolkitRules.CheckAddCard accepts supplied capacity, copy, collection, progression, and class-policy values. Its structured rejection code lets a game customize the message. OpeningHandProbability(N, K, Draw) calculates the chance of at least one matching card without replacement. Invalid input returns -1; this utility measures draw consistency, not combat balance or an AI win rate.

Player deck workshop

Tools > Deck Workshop Preview opens a disposable example collection. The included standalone game opens the persistent workshop. Select a named deck, search by name/effect/ rarity/cost, filter its class, inspect a card, and add/remove owned copies. Capacity, average energy and the energy curve update as you edit. Use this deck explicitly equips it. Create, rename, delete and Save / Retry controls operate through the supplied model.

Use Tab/arrow keys or D-pad to navigate, Enter/gamepad A to activate, and Escape/gamepad B to close. Native Slate invalidation caching avoids repeatedly measuring unchanged layout.

DeckToolkitUI supplies SDeckToolkitWorkshop and UDeckToolkitWorkshopModel. Retain the model with UPROPERTY/FGCObject in your host and override Refresh/Add/Remove/Create/ RenameDeck/Delete/Equip/Save to connect your game's collection and persistence. The base model is transient. The provided persistent model is optional. Adapters and themes are native C++; a Blueprint-authorable visual adapter is not included.

Optional live event tracing

Open Tools > Live Card Trace, start PIE and enable capture. The inspector shows events only after your game feeds the runtime bridge. Use UDeckToolkitLiveTrace::Find to get the world subsystem, BeginCard to allocate a local play GUID, and Record/RecordValue to append observed stages. Propagate the GUID yourself through delayed effects. This plugin has no automatic GAS hooks or dependency on a specific game.

Capture defaults off (DeckToolkit.Trace 1 enables it). The subsystem has no tick or strong actor references and retains at most 2048 events and 512 play metadata records. The editor inspector polls only while open. Export JSON writes under Saved/DeckToolkit; in standalone use DeckToolkit.ExportTrace. Choose the appropriate world explicitly. Clear or metadata eviction discards subsequent events for those old plays. This is local observed history, not replication, network telemetry or combat replay.

Portable named-deck files and packaged sample

UDeckToolkitPersistentWorkshopModel extends the native model with versioned JSON deck files. Populate the catalog and defaults, call ConfigureFile(Filename, Status), and retain the model in the host. The workshop's Save action then writes through this adapter. It stores deck IDs, names, ordered card IDs (including duplicates) and active selection. Catalog definitions, owned-copy counts, progression and combat state remain host supplied.

Loading validates the entire file before changing memory. Malformed, oversized and future schema files remain untouched and disable saving until a valid file is configured again. Missing definition IDs survive loading and can be removed through the workshop. Saves use a temporary sibling and preserve the previous file in .backup during replacement. Failed installation restores the backup; configuration recovers it if the primary is missing. An unresolved recovery disables writes. This does not guarantee power-loss durability. The format supports at most 128 decks, 512 cards per deck and a 4 MiB encoded file. This adapter is local persistence, not multi-process synchronization or cloud storage.

The separate example project opens a persistent workshop and a playable reference encounter. Edit a named deck, choose Use this deck, close the workshop, then choose Play active deck. The example uses seed 42, 60 health per combatant, three energy and a five-card starting hand. The reference enemy attacks for six. See the online guide's Example section for installation and controls.

The plugin is independent of any host game and includes no licensed game art.

Validation and supported scope

The plugin has passed UE 5.8 BuildPlugin compilation for Windows Editor, Development and Shipping, plus 14 automated checks in a clean project. Checks cover seeded draws, rules, card resolution, persistence and workshop input. The standalone sample has also passed a two-process save/load check.

To run the included automation from Unreal, open Session Frontend > Automation, filter for DeckToolkit, and run the suite. Presentation checks require a graphics device; use an isolated test project because they open workbench/preview windows.

The editor module is excluded from packaged games. Runtime APIs execute when called; the reference session and trace subsystem do not tick. A visible in-game workshop does have UI cost. Capture is opt-in and bounded. No background network service is used.

Workshop adaptation and theming require native C++. The Blueprint-callable APIs cover the reference session and deck rules; this is not a Blueprint-only UI kit. Input has been checked with keyboard and simulated gamepad events. Physical controller acceptance and other platforms have not been verified.

The included encounter supports one player and one enemy with the listed reference effects. Multiplayer, arbitrary card-rule graphs, automatic GAS integration, card instance upgrades, cross-engine replay, automatic balance recommendations and cloud synchronization are outside this version's scope. Inventory, progression, artwork, audio and your production combat implementation are supplied by your game.

Troubleshooting

Example project

Download the UE 5.8 example project

Deck Toolkit example project

For example, from PowerShell (adjust both paths):

& 'C:/Program Files/Epic Games/UE_5.8/Engine/Build/BatchFiles/Build.bat' DeckToolkitValidationEditor Win64 Development '-Project=C:/Examples/DeckToolkitExample/DeckToolkitValidation.uproject' -WaitMutex

Edit a named deck, choose Use this deck, close the workshop and choose Play active deck. The reference encounter uses seed 42, 60 health per combatant, three energy and five drawn cards per turn. Enemy turns attack for six damage.

Normal deck edits save in the application's Saved/DeckToolkit/DemoDecks.json. The editor's Tools > Deck Workshop Preview uses a separate transient model and does not save files. The Tools > Deck Workbench is a separate card-authoring/reference-simulation tool.