- Required parameters:
keyloc_txtor localization entry (reference)loc_txtshould contain alabelstring used for the card's badge text
- Optional parameters (defaults):
atlas = 'stickers', pos = { x = 0, y = 0 }(reference)config = {}, prefix_config, dependencies, badge_colour, text_colour(reference)configvalues will be saved tocard.ability[sticker_key]
badge_colour: Colour of this sticker's badge.hide_badge: If set totrue, no badge is shown for this sticker.default_compat: Default compatibility with cards. Iftrue, all cards can have this sticker unless otherwise specified.compat_exceptions: Array of keys of centers that have non-default compatibility with this sticker.default_compat = true: sticker cannot be applied to centers incompat_exceptionsdefault_compat = false: sticker can only be applied to centers incompat_exceptions
sets, list of pools that this sticker is allowed to be applied on, format:
{ Joker = true }rate = 0.3: Chance of the sticker applying on an eligible cardneeds_enable_flag: If set totrue, this sticker requiresG.GAME.modifiers['enable_'..self.key]to betruebefore it can be applied.always_scores: Iftrue, editioned card always counts in scoring.never_scores: Iftrue, editioned card never counts in scoring (supersedesalways_scores).
calculate(self, card, context)(reference)loc_vars(reference)- Due to some constraints, the functionality of
loc_varson stickers is limited. Out of all possible return values, onlyvars,keyandsetare supported.
- Due to some constraints, the functionality of
should_apply(self, card, center, area, bypass_roll) -> bool- Returns true if the sticker can be applied to the card.
bypass_rollskips the RNG check and only looks for compatibility- If this function is redefined it will ignore all optional parameter flags listed above. You can call and store the return of
SMODS.Sticker.should_apply(self, card, center, area, bypass_roll)in this function to retain the default functionality.
apply(self, card, val)- Handles applying and removing the sticker
- By default, sets
card.ability[self.key]toconfigif it exists andvalis truthy or tovalotherwise. - It is recommended to not redefine this function. If you still need to, you can call
SMODS.Sticker.apply(self, card, val)in this function to retain the default functionality.
draw(self, card, layer)- Draws the sprite and shader of the sticker.
-
Card:add_sticker(sticker, bypass_check)Use this function to add a sticker to a cardsticker,keyof sticker as a stringbypass_check, boolean
-
Card:remove_sticker(sticker)Use this function to remove a sticker from a cardsticker,keyof sticker as a string