Skip to main content

Encounter Authoring

Guide

An encounter is one complete battle recipe: player, ordered enemies, reward pool, and rules

Open the Game Card Editor and choose Encounter; this is where separate player, enemy, and deck assets become one battle the runtime can start

Workbench Encounter mode with the encounter list, Inspector, and complete battle preview

Authoring order

  1. In List, select the encounter database, then create a blank encounter or duplicate the closest battle structure
  2. In Inspector, complete Basic and Visual
  3. Assign Player, build Enemy Units in battle order, choose the Reward Deck, then set Battle Rules
  4. In Preview, verify Display, Lineup, and Battle Rules
  5. Verify Used By reports no parent assets; encounters are top-level content launched by a scene or your code

List area

List

Choose the database, then use +, , and duplicate to manage encounters; search filters by name; Difficulty and Tags narrow the list; each row shows the battle image, name, difficulty, and enemy count, making lineup-size mistakes visible before opening the asset

The complete Encounter List frame with database controls, Difficulty and Tag filters, and encounter rows

Inspector area

Basic

FieldWhat to configure
NameThe encounter name shown in the Workbench and your own battle-selection UI; A non-empty value also renames the sub-asset
DescriptionA concise player-facing introduction to the location, objective, or opposition
DifficultyNormal, Elite, Boss, or a custom project value; it classifies the encounter but does not automatically scale the battle
TagsProject labels used for filtering, grouping, progression, or custom selection logic

The complete Encounter Basic frame with Name, Description, Difficulty, and Tags

Visual

Assign Icon as the encounter banner or background image; it appears as a 16:9 thumbnail in the list and Display preview; the demo can also read this data for encounter presentation

The complete Encounter Visual frame with the battle image

Player

Choose exactly one player unit; the card shows portrait, name, Base HP, and Base Energy; double-click the card to replace the unit; use the open button to jump to Player mode, locate to select the asset, and × to clear it

The selected unit brings its Starting Deck and Energy Display configuration into this battle

The complete Encounter Player frame with the selected Squire unit

Enemy Units

Add one or more enemy units; each row is one battle slot, so adding the same enemy twice creates two spawned units; drag rows to change their order; open and locate buttons inspect the referenced enemy; × removes that slot

The list is ordered authored data; keep the order intentional when your scene layout, UI, or custom battle presentation maps slots to positions

The complete Encounter Enemy Units frame with one enemy slot and Add Enemy Unit

Reward Deck

Assign the card pool offered after victory; the card shows deck size and average cost and links back to Deck mode; if the deck is missing or has no valid entries, the encounter offers no card candidates

Within a reward deck, Copies act as selection weight; Card Reward Count in Battle Rules controls how many candidates are requested, but the runtime clamps a stocked reward offer to at least one; clear the Reward Deck when this encounter should give no card reward

The complete Encounter Reward Deck frame with Spoils of Battle

Battle Rules

RuleMeaning
Starting Hand SizeCards drawn at battle start, minimum 0
Draw Per TurnCards drawn at the start of turns after turn one, minimum 0
Max Hand SizeHand cap, minimum 1; turn draw discards overflow while draw effects stop early
Starting EnergyPositive values override the player's per-turn Base Energy; 0 uses the player unit value
Card Reward CountRequested victory candidates; while a stocked Reward Deck is assigned, values below 1 still produce one candidate
Armor DecayResetOnTurnStart clears a unit's armor at its own turn start; Persist keeps it
Hand DiscardDiscardOnTurnEnd discards the player's hand except Retain cards; Persist carries it over
Enemy Intent DisplayHidden, IconOnly, or Full controls how much of the planned enemy action the player sees
Animation GapA presentation pacing value saved in seconds and shown in Preview; the current built-in state machine does not read it or insert waits automatically

Starting Hand Size and Draw Per Turn do not stack on turn one; the opening hand uses only Starting Hand Size; starting Energy is also a refill rule, not a one-time bonus

The complete Encounter Battle Rules frame with all nine editable rules

Preview area

Display

Display combines the 16:9 Icon, Name, Description, and Difficulty into the encounter identity your selection or loading UI can present

The complete Encounter Display frame with battle image and identity

Lineup

Lineup places the chosen player against the ordered enemy slots and shows their HP values; enemy ranges remain visible because the actual starting HP roll happens when the battle begins; use this frame to catch the wrong player, missing slots, duplicate enemies, or a lineup that does not match the encounter name

The complete Encounter Lineup frame with Squire versus Strawman

Battle Rules

The Preview version of Battle Rules compresses all nine values into chips; it is the fastest final comparison across encounters because hand, draw, energy, reward, armor, discard, intent, and timing differences remain visible without opening each field

The complete Encounter Battle Rules preview frame with all rule chips

Used By

Encounters are top-level content launched directly by a scene bootstrap or your own code; they are not normally nested inside another authoring asset, so Used By explains that no parent asset is expected instead of presenting an empty unexplained box

The complete Encounter Used By frame explaining top-level launch content

Starting the encounter

For a scene-driven battle, assign the encounter to Default Encounter on the GCS bootstrap and enable Auto Start On Play; in code, pass the authored GameEncounter to the GCS battle-start API; the encounter supplies content and rules; the scene still supplies its board, views, and bootstrap objects

Validation and final check

A missing Player Unit or empty Enemy Units list is an error; A missing Reward Deck and empty Difficulty are warnings

Before moving on, confirm the list row shows the intended enemy count, Player brings the correct starting deck, enemy slots are in deliberate order, reward behavior matches the design, all nine rule chips are correct, and Lineup represents the battle you meant to build