Creating a card
Before following this guide, please read the getting started guide if you haven't yet.
Preparing the mod
After setting coolmod up, we're going to create a new follower card. The process is more or less the same regardless of the card type.
What you should do at first is copy one of the existing cards for a type you want to use, and modify it with your own data.
For now, we're going to edit the GameData/Sets/STD/CARD_LION_CUB.json
file. Copy it to GameData/Sets/AOF/CARD_LIONEST_CUB.json
and edit the file:
You should edit the name
field to CARD_LIONEST_CUB
:
...
"name": "CARD_LION_CUB",
...
Card Frame
You can set the cardFrame
to another card frame when one is available. You should also edit the setCode
field to AOF
to make sure it's connected to the card set properly (in this case, the Adventurers of Fairtravel set).
...
"setCode": "AOF",
...
Target Count
We can change the targetCount
field to set a required minimum targets for a card. The way the target selection works is based on the card's card abilities that handle the Play
mechanic (more on this soon).
Collector Number
You can also set the collectorNumber
field to a collector number for your card. This can include numbers and letters.
Score Bonus
The scoreBonus
field is used so the CPU knows that a card is more or less valuable. It gives a bonus to the card's calculated score.
Characteristics
The characteristics
field should always keep the same fields, but you can change its values. You can look into what each characteristic does in the reference.
Abilities
The abilities
field is where you can set abilities for a card. Cards can have multiple abilities and use one of the many abilities from the card ability reference.
To add an ability, you must set a name
, abilityName
, description
, and parameters
. abilityName
comes from the card abilities reference's name in parenthesis. For the parameters, there are several data types (dt
) and values:
dt 0
(bv
): a bool value (true
orfalse
)dt 1
(iv
): an integer value (a number that doesn't have decimals, such as123
)dt 2
(fv
): a float value (a number that can have decimals, such as123.456
)dt 3
(sv
): a string value (text in quotes)dt 4
(cv
): a card value (a card ID as a number, usually not used in ability parameters)dt 5
(ctyv
): a card type value (a string for a card type)dt 6
(ctev
): a card template value (a string in the form of"SETCODE|NAME"
, such asAOF|CARD_LION_CUB
)dt 7
(pv
): a player value (a player ID as a number, usually not used in ability parameters)
Score Calculator Name
The scoreCalculatorName
parameter lets you override the CPU score calculator for a card unless you want to use the default one.
Tags
The tags
parameter is a list of tags for a card, to identify followers and other types.
Reminders
The reminders
parameter is a list of reminders that a card should display, which are fetched from the translations.
Finishing up
After setting up your card and building/installing your mod, you can browse it on your collection screen (if collectible) under the Show Unowned
button.