-
Notifications
You must be signed in to change notification settings - Fork 41
Metadata
Metadata is descriptive data about an object. For SCED we place metadata in cards to let the mod know more about the card than simply “This is a card with a picture.”
Card metadata is stored in the GM Notes field for each individual card. In TTS, this field is only visible to (and can be edited by) the Black player. This data is then used to enable scripting features within the mod such as the ArkhamDB loader and deck builder containers, token spawning, and more.
TTS tags are placed on each card as additional identifiers besides the type in the GMNotes. Tags are useful to simplify a lot of scripts that check the type of a card and are mandatory to support some specific features like specialized snap points. The tags used are:
- PlayerCard / ScenarioCard
- Asset / Investigator / Minicard / Location
Every card should have one of PlayerCard or ScenarioCard, while Asset, Investigator, Minicard and Location are added to the cards of the appropriate type. So for example, Miskatonic Quad would have the ScenarioCard and Location tags, while Drawn to the Flame would have only the PlayerCard tag.
These are stored in the tags field of the TTS object JSON definition, as an array.
Metadata is stored as a JSON string in the GM Notes field, and must follow a strict style and structure to work properly. If something in a card’s metadata is incorrect it could cause features to fail or errors within the mod.
A brief word on JSON: JSON is a simple, human readable text format. There are a number of JSON primers available on the internet, and it’s good to understand it before trying to write/modify the metadata. The structure is fairly straightforward though, so you can probably get by with using an existent card as a template. Be sure to test it though!
Card metadata is a single JSON object, which starts with { and ends with }.
Individual fields (each described below) are listed in a "name" : value set. Commas must separate each field. All fields are technically optional, but omitting fields may cause the card to be missed by certain functions. For example, class is not required, but if it’s not present the Build/Upgrade Deck tokens will miss that card. Fields are generally omitted if they are not relevant or the data is empty, such as cost on a treachery or traits on a card with no traits. Boolean fields which are rarely true (such as permanent or weakness) are also skipped if the value is false.
The ID field holds the unique ID for cards in TTS. No two cards should have the same ID. For most cards this is the ArkhamDB code field. For example, Roland Banks is “01001”.
Some cards, mostly investigators, have a suffix attached to distinguish different versions. These possible suffixes are:
-
-promo: The promotional release version of the investigator card, such as from novellas. -
-m: The minicard for the investigator -
-promo-m: The minicard for the promotional investigator card -
-p: Full parallel (front and back) for the investigator -
-pf: Parallel front and normal back version of the investigator -
-pb: Parallel back and normal front version of the investigator
These are alternate IDs which the card should match to. It is exclusively used to handle cases where ArkhamDB has multiple entries for the same card, such as Deduction (from the Core and Harvey Walters packs) or Marie Lambeau (promotional book release and Innsmouth). You should not have to worry about this field.
The card type. Possible values:
- Investigator
- Minicard
- Asset
- Event
- Skill
- UpgradeSheet
- Enemy
- Treachery
- Location
- ScenarioReference
- Act
- Agenda
The slots this card takes up (omitted if none). Possible values include:
- Hand
- Hand x2
- Arcane
- Arcane x2
- Ally
- Body
- Accessory
- Tarot
- Multi-slot special case: If a card has multiple slots (other than the 'x2' options), they should be listed as a single string separated by a | character. Example: “Ally|Arcane” or “Hand x2|Arcane”
The card’s class name. If a card has no class (such as an investigator signature card) this should be omitted. Minicards will also have no class. Possible values:
- Guardian
- Seeker
- Rogue
- Mystic
- Survivor
- Neutral
- Mythos
- Multiclass special case: If a card has multiple classes, they should be listed as a single string separated by a | character. Example: “Guardian|Rogue” or “Seeker|Survivor|Mystic”
A single string listing the card’s traits separated by period and space (“. “). This should be identical to the trait line on the card, e.g. “Item. Weapon. Melee.”
This card starts the game in its owner’s hand. Only present if true.
This card starts the game in play. Only present if true.
Cost of the card.
The level of the card, 0-5. If a card has no level (such as an encounter card or investigator signature card) this should be omitted.
Whether this card is a Permanent. Value should be true or false (note that this is not a string, so it should not have quotes) and will only be present if the value is true.
If a card has specialist restrictions, they should be listed here as a single string separated by a | character. Example: “Drifter|Performer”
Whether this card is a Weakness. Value should be true or false (note that this is not a string, so it should not have quotes) and will only be present if the value is true.
If this card is a Basic Weakness, how many copies are in the standard weakness pool. e.g. Amnesia is 2, each of the variants of Unspeakable Oath are 1, etc.
If this card is a Hidden treachery. Only present if the value is true.
This field contains a list of cards which are bonded to this card, and the count which will be included when a deck is loaded. These are currently only used by the ArkhamDB Importer and due to complexity they are omitted here. If you are interested in exploring this data structure, reviewing Ms. Doyle along with Hope, Zeal, and Augur is a good place to do so.
This field contains instructions for tokens which should be spawned when a card is placed in the appropriate play area. It is a list of structures with the following fields. Note that count and countPerInvestigator can exist in the same entry.
-
token: The type of token which should be spawned. Possible values:resourcecluedoomhorrordamageuniversalActionAbility
-
type: A descriptive name for the type of use being spawned, such as "Ammo", "Secret", etc. This should be the singular form of the type, capitalized, e.g. "Charge" not "Charges" or "charge". For tokens without specific names, use a capitalized version of the token such as “Doom”, "Clue", etc. This field must be exact, as code may rely on it for certain operations. -
count: How many of the tokens should be spawned -
countPerInvestigator: How many tokens should be spawned per investigator in the game -
replenish: How many of the tokens should be replenished during the owner's upkeep, always up to the maximum uses.
For most cards these fields hold the number of skill icons on the card. For an investigator card, they hold the base stats. If the card has no icons of a particular type, these fields are omitted.
Indicates whether the card can gain skill icons under some circumstances. Will only be present for Skill cards. Omitted unless the value is true.
Indicates whether a card’s icons subtract from the skill value instead of adding to it. Will only be present for Skill cards. Omitted unless the value is true.
This field contains data about the effect of the 'Elder Sign' token. It should only be used on cards of type 'Investigator'.
The contained data is description and modifier of the token effect.
For effects with variable modifier (for example "+1 for each clue on your location) the modifier field can be omitted.
Example:
{
"elderSignEffect": {
"description": "+1. If you succeed, heal 1 horror.",
"modifier": 1
}
}These fields describe the health / sanity of an investigator as number.
If a card other than a Location has a Victory X value, including Victory 0, it is placed here. This field will be omitted if the card has no Victory value. See locationBack and locationFront for details on location victory values.
doomThresholdPerInvestigator: Number
clueThreshold: Number
clueThresholdPerInvestigator: Number
For Acts and Agendas (only) holds the appropriate advancement thresholds. These fields may be combined, for example an Agenda where the doom is increased by 1 per investigator, both fields would be set.
For customizable cards such as Runic Axe, holds detail on the available upgrades. There is a great deal of other integration required to customizable cards, so detail here is skipped for simplicity.
The campaign cycle this card was released in. This is used for official content, and for player cards only. It is omitted for all other cases.
This field should only be used for investigator cards. It controls what kind of action / ability token(s) are spawned for the investigator when placing them on the playermat. The value will be used as symbol, the background will always be the class color of the investigator (see “class” field). Possible values (as of mod version 3.9.1):
- Activate
- Engage
- Evade
- Explore
- Fight
- FreeTrigger
- Investigate
- Move
- None (-> if no token should be spawned)
- Parley
- PlayItem
- Reaction
- Resource
- Scan
- Spell
- Tome
- Guardian
- Mystic
- Neutral
- Rogue
- Seeker
- Survivor
- Multiple abilities / actions special case: If an investigator is supposed to get multiple action / ability tokens, they should be listed as a single string separated by a | character. Example: “Reaction|FreeTrigger”
Since the tokens support two symbols each, you can define both with a separation via /.
Example (Tony Morgan):
{
"extraToken": "Fight/Engage",
}This field contains the deck ID for ArkhamDB / arkham.build that should be spawned as "starter deck" by the PlayerCard Panel.
This field should only be used for investigator cards. It contains a table of "cardId" to "count" of signature cards.
Example (Tony Morgan):
{
"signatures": [
{
"06010": 1,
"06011": 2,
"06012": 1
}
],
}Location-specific information. locationFront and locationBack share the same structure:
- victory: Number
- Victory value for one side of the location
- icons: String
- The location icons for this location. See the Location Icons section below for more detail. Will be omitted if the location does not have an icon, as for some hidden locations.
- connections: String
- Connections for this location. See the Location Icons section below for more detail. Will be omitted if the location does not have any connections.
- uses: Array of Structures
- Generally used for clue spawning, but can include any token type.
icons and connections define icon information for locations. icons holds the location's identifying icons (upper left), and connections the locations which this one connects to (bottom of the card). Each can have multiple values, including the printed icons and extra values from traits to support "connected to each X" card effects. These are collectively all "icons" even if it's not a printed icon.
The specific names used for each icon are not relevant, but they must match for SCED code to make sense of them. If you are working on a custom scenario and want to use "sq" instead of Square that's fine, so long as every other location also uses "sq". Official content will always use the icons from the list below:
| Square | |
| Triangle | |
| Hourglass | |
| Plus | |
| Diamond | |
| Circle | |
| Crescent | |
| Tee | |
| Spade | |
| SlantedEquals | |
| Star | |
| Heart | |
| Tilde | |
| Apostrophe | |
| Clover |
- ArkhamWoods
- ExhibitHall
- DivergingPath
- AlteredPath
- GroundFloor
- SecondFloor
- ThirdFloor
- Basement
- EnchantedWoods
- Cave
- RitualSite
These type of cards hold special metadata with information about the modifiers and effects (= description) of the symbol chaos tokens. The name of the card is used to display the title splash screen. They feature additional metadata fields which are only used here:
-
-
tokens: Table
-
-
-
front: Table -
back: Table
-
-
-
Skull: Table -
Cultist: Table -
Tablet: Table -
Elder Thing: Table
-
-
-
description: String -
modifier: Number
-
Undefined modifiers ("-X") should be set to "-999".
To temporarily disable automatic connection drawing from the PlayArea, add this to the metadata of the scenario reference card:
{
"disableConnections": true,
}This section lists the uses for each field, either already in SCED or planned for upcoming features.
-
id: Deck Importer, Player Card Panel, unique card handling -
alternate_ids: Deck Importer, Player Card Panel -
type: Player Card Panel -
slot: Search-A-Card -
class: Player Card Panel, playermat investigator triggers -
traits: Deck Importer -
cost: Search-A-Card -
level: Player Card Panel -
startsInHand: Deck Importer -
startsInPlay: Deck Importer -
permanent: Deck Importer -
specialist: Search-A-Card -
weakness: Deck Importer, playermat discard handling -
basicWeaknessCount: Random weakness generator -
classRestriction: Deck Importer -
modeRestriction: Deck Importer -
hidden: Encounter card draw handling, playermat discard from hand -
willpowerIcons/etc: playermat investigator triggers -
dynamicIcons: No current uses -
negativeIcons: No current uses -
bonded: Deck Importer -
uses: Token spawning for all cards -
victory: Victory Display -
doomThreshold: Doom Counter broadcasting -
customizations: customizable cards -
cycle: AllCardsBag Index -
extraToken: Playermat token spawning -
signatures: Player Card Panel -
locationFront/locationBack: Automatic location connections, Victory Display, clue spawning
{
"id": "01001",
"alternate_ids": [
"98004",
"01501"
],
"type": "Investigator",
"class": "Guardian",
"traits": "Agency. Detective.",
"willpowerIcons": 3,
"intellectIcons": 3,
"combatIcons": 4,
"agilityIcons": 2,
"cycle": "Core"
}{
"id": "01001-m",
"alternate_ids": [
"98004-m",
"01501-m"
],
"type": "Minicard"
}{
"id": "01097",
"alternate_ids": [
"01597"
],
"type": "Treachery",
"class": "Neutral",
"traits": "Madness.",
"weakness": true,
"basicWeaknessCount": 2,
"cycle": "Core"
}{
"id": "02154",
"type": "Asset",
"slot": "Arcane",
"class": "Mystic",
"cost": 3,
"level": 3,
"traits": "Spell.",
"willpowerIcons": 1,
"combatIcons": 1,
"uses": [
{
"count": 4,
"type": "Charge",
"token": "resource"
}
],
"cycle": "The Dunwich Legacy"
}{
"id": "05115",
"type": "Asset",
"slot": "Hand x2",
"class": "Guardian|Rogue",
"cost": 6,
"level": 0,
"traits": "Item. Weapon. Firearm. Illicit.",
"combatIcons": 1,
"uses": [
{
"count": 5,
"type": "Ammo",
"token": "resource"
}
],
"cycle": "The Circle Undone"
}{
"id": "03271",
"type": "Asset",
"slot": "Ally",
"class": "Mystic",
"cost": 0,
"level": 3,
"traits": "Ally. Sorcerer.",
"willpowerIcons": 1,
"combatIcons": 1,
"uses": [
{
"count": 1,
"type": "Doom",
"token": "doom"
},
{
"count": 2,
"type": "Horror",
"token": "horror"
}
],
"cycle": "The Path to Carcosa"
}{
"id": "01134",
"type": "Location",
"traits": "Arkham.",
"cycle": "Core",
"locationFront": {
"icons": "Tee",
"connections": "Diamond|Triangle"
},
"locationBack": {
"victory": 1,
"icons": "Tee",
"connections": "Diamond|Triangle",
"uses": [
{
"countPerInvestigator": 2,
"type": "Clue",
"token": "clue"
}
]
}
}{
"id": "01154",
"type": "Location",
"traits": "Woods.",
"cycle": "Core",
"locationFront": {
"icons": "Square|ArkhamWoods",
"connections": "Tilde"
},
"locationBack": {
"icons": "SlantedEquals|ArkhamWoods",
"connections": "Tilde|Tee|Crescent",
"uses": [
{
"countPerInvestigator": 1,
"type": "Clue",
"token": "clue"
}
]
}
}{
"id":"03120",
"type":"ScenarioReference",
"class":"Mythos",
"tokens":{
"front":{
"Skull":{
"description":"-X. X is the highest number of doom on an enemy in play.",
"modifier":-999
},
"Cultist":{
"description":"-2. If you fail, place 1 doom on the nearest enemy.",
"modifier":-2
},
"Tablet":{
"description":"-2. If you fail, discard a random card from your hand.",
"modifier":-2
},
"Elder Thing":{
"description":"-2. If you fail and there is an enemy at your location, take 1 horror.",
"modifier":-2
}
},
"back":{
"Skull":{
"description":"-X. X is the total number of doom on all enemies in play.",
"modifier":-999
},
"Cultist":{
"description":"-4. Place 1 doom on the nearest enemy.",
"modifier":-4
},
"Tablet":{
"description":"-4. Discard a random card from your hand.",
"modifier":-4
},
"Elder Thing":{
"description":"-4. If there is an enemy at your location, take 1 horror.",
"modifier":-4
}
}
}
}