CCG Kit was born with extensibility in mind. Central to this idea is the CCG Kit editor, which allows for easy manipulation of the game configuration files that store the fundamental properties of a game and its cards. We are going to walk you through the available options in the CCG Kit editor using the accompanying demo game's configuration as a reference. To open the editor, select the Window/CCG Kit Editor menu option:
You can open an existing game configuration by clicking on the Open button (your selection will be remembered in future sessions for convenience). The accompanying demo game's configuration is located in the CCGKit/Demo/Resources folder.
Game configuration tab
The game configuration tab allows you to modify the following general settings of your game:
- Turn duration: The duration of a turn in seconds.
- Minimum deck size: The minimum number of cards a deck must have.
- Maximum deck size: The maximum number of cards a deck must have.
- Game start actions: The actions that happen automatically when the game starts.
- Turn start actions: The actions that happen automatically when a turn starts.
- Turn end actions: The actions that happen automatically when a turn ends.
- End game conditions: The conditions that cause the game to end.
The game/turn actions and end game conditions are a convenient way to script automatic behavior for your game without the need of programming. For example, the accompanying demo game uses the following actions:
- Game start: The player decks are shuffled and 5 cards are drawn from them to form their hands.
- Turn start: The mana stat is set to the turn number and 1 card is drawn from the deck into the hand of the active player.
And the following end game conditions:
- If a player reaches 0 life, he automatically loses the game.
- If a player reaches 0 cards on his deck, he automatically loses the game.
Game zones tab
The game zones tab allows you to define the game zones available in your game and their settings:
- Name: The name of the game zone.
- Owner: The owner of the game zone (possible values are Player for personal zones and Shared for shared zones).
- Type: The type of the game zone (possible values are Static for static zones and Dynamic for dynamic zones). A static zone is a zone that contains cards whose attributes never change (e.g., cards in a deck will usually never change so we can just store their unique identifiers internally). A dynamic zone is a zone that contains cards whose attributes can change (e.g., cards on the board will usually change as the game progresses so we need to store their complete, most up-to-date state internally).
- Owner visibility: The visibility of the game zone for its owner player (possible values are Visible for visible zones and Hidden for hidden zones).
- Opponent visibility: The visibility of the game zone for the opponent player (possible values are Visible for visible zones and Hidden for hidden zones).
- Has maximum size/Maximum size: The maximum number of cards this game zone can contain (if any).
The player tab allows you to define the stats that players in your game will have:
- Name: The name of the player stat.
- Base value: The initial value of the player stat.
- Minimum value: The minimum value of the player stat.
- Maximum value: The maximum value of the player stat.
Card types tab
The card types tab allows you to define the stats, properties and destroy conditions that cards in your game will have.
Stats are a fundamental concept in CCG Kit. They represent integer values that can change over the course of a game and are used in both players and cards. For example, a player could have life and mana stats and a creature card could have cost, attack and defense stats. Stats are transmitted over the network, which means you should only use them to represent values that can actually change over the course of a game in order to save bandwidth.
Stats have the following properties:
- Base value: The initial value of the stat.
- Original value: A copy of the initial value of the stat (useful as the base value may change over time).
- Minimum value: The minimum value of the stat.
- Maximum value: The maximum value of the stat.
- Modifiers: The modifiers that affect the current value (+3, -1, etc.). They can be permanent or temporary (i.e., have a duration of X turns). A modifier will never change the effective value of the stat in a way that makes it lower than its minimum value or higher than its maximum value. A modifier with a duration of 0 means it is permanent.
- Effective value: The current value of the stat with all its modifiers applied. Game code will mostly use this to retrieve the actual value of a stat at a given moment in time.
Stats are implemented by the Stat class.
You can think of keywords as enum-like stats. They are particularly useful if you need cards to have a field with a specific subset of possible values (like a static ability, which could take values such as "taunt" or "hexproof"). Just like stats, keywords are transmitted over the network.
Keywords are implemented by the Keyword class.
Properties are card values that are constant. Because they never change, they are never transmitted over the network (which helps saving bandwidth). Common examples of properties in a CCG are the card's name, its picture, its collector number, etc.