-
Notifications
You must be signed in to change notification settings - Fork 84
SMODS.Sticker
Casimir Eisenach edited this page Dec 24, 2024
·
5 revisions
-
Required parameters:
key
-
Optional parameters (defaults):
atlas = 'stickers'
pos = { x = 0, y = 0 }
-
loc_txt
, default skeleton -
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_exceptions
-
default_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 card -
needs_enable_flag
: If set totrue
, this sticker requiresG.GAME.modifiers['enable_'..self.key]
to betrue
before it can be applied.
-
loc_vars(self, info_queue, card) -> { vars ?= table, key ?= string, set ?= string }
- Returns variables for sticker description. Returning a
key
changes the localization entry (in the givenset
or'Other'
) to use for the description.
- Returns variables for sticker description. Returning a
-
calculate(self, card, context)
- Called with each context before joker calculation. Additional effects should use
SMODS.eval_this
instead of returning something. If a value is returned from this function, joker calculation for this context is skipped. Otherwise, behavior is identical toJoker.calculate
.
- Called with each context before joker calculation. Additional effects should use
-
should_apply(self, card, center, area, bypass_roll) -> bool
- Returns true if the sticker can be applied to the card.
-
bypass_roll
skips the RNG check and only looks for compatibility
-
apply(self, card, val)
- Handles applying and removing the sticker
- Sets
card.ability[self.key]
toval
by default.
-
draw(self, card, layer)
- Draws the sprite and shader of the sticker.
Game Objects
- API Documentation
- SMODS.Achievement
- SMODS.Atlas
- SMODS.Blind
- SMODS.Center
- SMODS.Challenge
- SMODS.DeckSkin
- SMODS.Keybind
- SMODS.Language
- SMODS.ObjectType
- SMODS.PokerHand
- SMODS.Rarity
- SMODS.Seal
- SMODS.Sound
- SMODS.Stake
- SMODS.Sticker
- SMODS.Suit and SMODS.Rank
- SMODS.Tag
Guides
- Your First Mod
- Mod Metadata
- Calculate Functions
- Logging
- Event Manager
- Localization
- Mod functions
- UI Structure
- Utility Functions
Found an issue, or want to add something? Submit a PR to the Wiki repo.