Club Penguin Wiki:$cp Library/Card

The $cp card library includes a series of functions for generating and updating player card images within the wiki. The set of functions is accessible via.

data
The  object includes a series of data storage properties, which are used for the logic in the functions of the feature. Some of these properties are made after loading JSON content from Club Penguin's file.
 * backItems- the backItems property is an array of clothing item IDs which are Back Items, or in other words, consist of two images- one that is used as the ordinary item image, and another which goes behind the penguin
 * blank- a fully-transparent image, used whenever there is an attempt to load an image that doesn't exist. It currently uses the value of Wikia's global variable,
 * clothingTypes- an object containing the name of clothing types, sorted by their clothing type id (e.g. 5 = body)
 * dimensions- default dimension values when generating a new player card
 * def- the default player card dimensions, if none are specified. The default is 88
 * min- the minimum size of a player card. The default is 10
 * items- a list of all items, stored in an object by their IDs
 * itemsOrder- the order on which items are stacked, starting at the background at the back, and ending at the pin in the front
 * puffle- an object of puffle-related features
 * puffle_filenames- an object for puffles, where the keys are the puffle IDs (not to be confused with the item ID that certain puffles have in addition), and the value is the prefix of a file name, and if no prefix is available, is set to a null string. Note that this feature cannot be loaded via Club Penguin's file, as no JSONP version is found, and therefore must be updated manually
 * puffleitems- an object for puffle items, where the keys are IDs of puffle items, and the values is their item type

fn
The  object includes functions for creating and updating player cards.