Create a card asset
- In the Content Browser, create Miscellaneous > Data Asset with class
DeckToolkitCard. - Set a non-empty CardName, Description and EnergyCost.
- Add entries to Effects in the order they should resolve.
- Choose retain/exhaust flags and save the asset normally.
| Field | Meaning |
|---|---|
CardName | Display name. Required and not whitespace-only. |
Description | Author-supplied display text; it does not generate gameplay rules. |
EnergyCost | Integer from 0 to 1,000,000. |
bRetain | Keep this copy in hand at turn end if it has not been played. |
bExhaust | After resolving, move this copy to the exhaust pile instead of discard. |
Effects | Ordered array of up to 64 FDTCardEffect entries. An empty array is valid. |
Reference effect types
| Type | Target and behavior |
|---|---|
| Damage | Damage the enemy. Add player Strength, apply enemy Vulnerable, absorb with Block, then reduce Health. |
| Block | Add player block; cleared when the next player turn begins. |
| Heal | Restore player health, capped by MaxHealth. |
| GainEnergy | Increase current energy. |
| Draw | Draw player cards until the requested amount, hand limit or available cards are exhausted. |
| Strength | Add an encounter-long player damage bonus to each hit. |
| Vulnerable | Add enemy vulnerable turns. Damage is multiplied by 1.5 and rounded down. |
Amounts are nonnegative integers up to 1,000,000. Additive reference values are bounded. Vulnerable ages on EndTurn. These are fixed reference semantics, not a configurable target system.
Ordered effects and conditions
EDTCardCondition::Always always resolves. TargetDefeated resolves only when the reference enemy is already at zero health. The condition is evaluated when that effect executes. Effects after a lethal hit still run, allowing on-kill rewards.
For a card that deals damage and draws only on a kill, add Damage first, then Draw with TargetDefeated. Reversing the order changes the result. Damage itself expands into separate strength, vulnerable, block and health trace entries.
Create an authored deck
Create a Data Asset of class DeckToolkitDeck and assign card asset references to Cards. Duplicate references represent separate playable copies. Authored order is preserved on loading; Initialize then performs the seeded shuffle. A session assigns each copy its own InstanceId.
A deck asset is distinct from a player's named-deck JSON entry: the asset references card objects; the workshop composition stores your catalog's string IDs. Your host resolves those IDs to definitions before starting combat.
Validate before simulation
ValidateDefinition(FText& OutReason) checks names, costs, effect counts, enum values and amounts. Editor asset validation calls the same checks. Initialize validates every referenced card before replacing session state. A missing or invalid card rejects the complete reset.
Built-in examples
UDeckToolkitExamples::CreateExampleCards(Outer) returns 20 original transient definitions. They are useful for experimentation and tests; editing them does not create saved assets. Create your own Data Assets to preserve authoring changes.