/tg/ Station 13 - Modules - TypesVar Details - Proc Details

trading_card_game

Vars

cached_cardsList of all cards by series, with cards cached by rarity to make those lookups faster
card_directoryBase directory for all related string files
card_filesList of card files to load
card_packsWhat cardpack types to load
keyword_filesList of keyword files These allow you to add on hovor logic to parts of a card's text, displaying extra info
keywordsList of loaded keywords matched with their hovor text

Procs

check_card_datumsChecks the global card list for cards that don't override all the default values of the card datum
check_card_distributionUsed to test open a large amount of cardpacks
check_cardpacksChecks the passed type list for missing raritys, or raritys out of bounds
clearCardsEmpty the rarity cache so we can safely add new cards
get_guarenteed_rarity_tableSee above
get_rarity_tableBecause old me wanted to keep memory costs down, each cardpack type shares a rarity list We do the spooky stuff in here to ensure we don't have too many lists lying around
loadAllCardFilesLoads all the card files
loadCardFileGets the keyword this string wants to use We offset the start by two indexes to account for Loads the contents of a json file into our global card list
loadKeywordFileLoads the contents of a json file into our global card list
printAllCardsPrints all the cards names
reloadAllCardFilesReloads all card files
resolve_keywordsTakes a string as input. Searches it for keywords in the pattern {$keyword}, and replaces them with their expanded form, generated above
styleKeywordsStyles our keywords, converting them from just the raw text to the output we want

Var Details

cached_cards

List of all cards by series, with cards cached by rarity to make those lookups faster

card_directory

Base directory for all related string files

card_files

List of card files to load

card_packs

What cardpack types to load

keyword_files

List of keyword files These allow you to add on hovor logic to parts of a card's text, displaying extra info

keywords

List of loaded keywords matched with their hovor text

Proc Details

check_card_datums

Checks the global card list for cards that don't override all the default values of the card datum

check_card_distribution

Used to test open a large amount of cardpacks

check_cardpacks

Checks the passed type list for missing raritys, or raritys out of bounds

clearCards

Empty the rarity cache so we can safely add new cards

get_guarenteed_rarity_table

See above

get_rarity_table

Because old me wanted to keep memory costs down, each cardpack type shares a rarity list We do the spooky stuff in here to ensure we don't have too many lists lying around

loadAllCardFiles

Loads all the card files

loadCardFile

Gets the keyword this string wants to use We offset the start by two indexes to account for Loads the contents of a json file into our global card list

loadKeywordFile

Loads the contents of a json file into our global card list

printAllCards

Prints all the cards names

reloadAllCardFiles

Reloads all card files

resolve_keywords

Takes a string as input. Searches it for keywords in the pattern {$keyword}, and replaces them with their expanded form, generated above

styleKeywords

Styles our keywords, converting them from just the raw text to the output we want