Building Your Game
A game is a set of assets, all created from Assets > Create > TCG Kit. The quickest start is Tools > TCG Kit > New Game…, which makes all of them for you.
Stable ids
Section titled “Stable ids”Every definition asset has an Id. It starts as the asset’s name and then stays fixed, so renaming an asset later does not break saved decks, network messages or ability graphs. Do not change an id once players have saved data that uses it.
Game Definition
Section titled “Game Definition”The root asset. Its sections:
| Section | Fields |
|---|---|
| Players | Player Count, Starting Hand Size, Shuffle Decks, Randomize First Player, Player Stats (such as Life 20), Resources |
| Zones | Zones, Deck Zone (where decks start and cards are drawn from), Hand Zone |
| Turns | Turn Structure, Combat Rules |
| Rules | Rule Graphs (graphs that belong to the game, not a card), Code Rules (rules written in C#) |
| Decks | Enforce Deck Rules, Min/Max Deck Size, Max Copies Per Card, Extra Deck Rules |
| Cards | Cards (the card database), Extra Keywords |
A Zone is a place cards can be: deck, hand, board, graveyard, exile. Every player gets their own copy of each zone.
- Visibility: Everyone, Owner (a hand) or Nobody (a deck). This decides what is sent to each player; hidden cards never leave the host.
- Max Size: 0 for no limit. A full zone refuses new cards.
Stats and resources
Section titled “Stats and resources”A Stat is a whole number on a card or a player: Attack, Health, Life, Armour. Nothing in the kit is hard-coded as “health”; all stats work the same way.
- Default Value is used by cards whose type has the stat but which do not set it.
- Has Minimum / Minimum clamps the value, for example so Attack never goes below 0.
A Resource is a player stat that pays for cards, such as Mana.
- Start Value, Gain Per Turn and Cap set how it grows.
- Refill On Turn Start on: the maximum grows each turn and the resource refills to it, as in
most digital card games. The maximum is the player stat
<id>.max. - Refill On Turn Start off: unspent amounts carry over.
Turns and phases
Section titled “Turns and phases”A Turn Structure lists the phases of a turn in order. For each phase:
- Allow Playing Cards and Allow Attacking choose which actions are possible.
- Other Allowed Actions lists the action kinds of your own command types.
- Auto Advance ends the phase by itself once everything it triggered has finished. At least one phase must wait for the player.
The End Turn button ends the current phase, which in the last phase ends the turn.
Combat
Section titled “Combat”Combat > Direct Attack is the built-in combat: the attacker chooses a target, which is either an opposing player or a card on an opposing board. Cards damage each other at the same time. Set the board zone and the attack, health and player health stats. Options:
- Max Attacks Per Turn and Summoning Sickness.
- Taunt keyword (optional): while a player has a card with it on the board, it must be attacked first.
- Haste keyword (optional): such cards may attack on the turn they are played.
Combat only deals damage. Removing dead cards and ending the game are rules; see Abilities and Rules. For a different combat system, see Extending the Kit.
Card types and cards
Section titled “Card types and cards”A Card Type (Creature, Spell, Equipment) lists the stats its cards have, the Play Zone they go to when played (a spell can go straight to the graveyard), and optionally its own Card Prefab.
A Card has a display name, rules text, art, type, rarity, costs, stats, keywords and abilities. Turn off Collectible for cards that only appear during play, such as tokens; they cannot go in decks or packs.
A Card Database lists a game’s cards. With Auto Collect on, it fills itself with every card asset in its folder and subfolders.
A Keyword (Taunt, Flying) is a named tag. It can carry an ability graph, which a card has for as long as it has the keyword, including keywords gained during play.
Decks and deck rules
Section titled “Decks and deck rules”A Deck asset is a ready-made deck: a starter deck or a computer opponent’s deck.
With Enforce Deck Rules on, every deck joining a match must have between the minimum and maximum number of cards and no more than Max Copies Per Card of one card. A Rarity can lower that limit, for example one copy of each Legendary. Add your own restrictions with Extra Deck Rules. The host refuses illegal decks with a reason the player can read.
Checking your work
Section titled “Checking your work”Tools > TCG Kit > Validator compiles every game and lists anything wrong. If a game does
not compile, starting a match throws a RulesCompileException listing every problem at once.