Card Styles
Before doing this guide, please check the getting started guide if you haven't already.
What are card styles?
Card Styles are alternate visuals for cards. You can both replace card frames and the card itself with a different visual.
How can I create a card style?
First, you should create a new .json
file at GameData/CardStyles/NAME/NAME.json
. The file should look like this:
{
"rewardName": "REWARD_NAME",
"items": [
{
"type": "CardFrame",
"unlockType": "Fame",
"styleSetName": "*",
"cardFrameName": "CARDFRAME_FANTASY"
}
]
}
rewardName
is a unique name for the reward the player should get when unlocking this card style. You should use some sort of pattern to ensure other mods don't get mixed in. Maybe something in the form of NAME.ITEM
. For example, coolmod.babyflamingo
.
items
is a list of all the card styles that this reward unlocks. It has a list of items that have the following fields:
Name | Description |
---|---|
type | One of CardFrame , Template , or FullMaterial |
unlockType | One of Fame or Code . If Fame , can be unlocked by spending the player's earned renown. If Code , can only be unlocked through a shop code. |
styleSetName | The set this style applies to. If * , applies to all cards. |
styleTemplateName | The particular name of a card this applies to. For example, CARD_LION_CUB . Optional if the styleSetName is * . |
targetSetName | The set this style should apply on the card. Only valid if the type is Template . |
targetTemplateName | The template this style should apply on the card. Only valid if the type is Template . |
cardFrameName | The card frame to apply to the template. Only valid if the type is CardFrame . |
requiresCharacteristic | Required characteristic for a card. Only Bool and Int characteristics are allowed here. |
tags | Required tags for a card. |
materialPath | The material to apply to the card style. Only valid if the type is FullMaterial . |
items
can have children items on each item, using the children
field.
Notes
When creating a card to replace another card as a style, you should copy the original card and ensure the COLLECTIBLE
characteristic is not true
, or you'll be able to collect that particular card as a normal card. You can then change the attributes you want to change, such as the IMAGE
characteristic or the card frame.
For shop codes, they'll be in the format of setCode|templateName|styleName
.
You don't have to worry about having the same card abilities on style templates, since the card will only be used visually.