SMODS.Stake - Breezebuilder/Steamodded-Wiki GitHub Wiki
SMODS.Stake
API Documentation: Class prefix: stake
- Required parameters:
key
applied_stakes
: An array of keys of stakes that should also be applied when this stake is active. This is evaluated recursively to include all stakes applied by applied stakes, so you usually don't need to specify multiple stakes here.loc_txt
or localization entry (reference)loc_txt
should contain asticker
table that also consists of aname
andtext
. It is used for the tooltip of the stake's win sticker.- When using localization files, the stake description should be placed in
descriptions.Stake[key]
, while the sticker description should be placed indescriptions.Other[key:sub(7)..'_sticker']
, i.e., thestake_
prefix is removed.
[!IMPORTANT] An extra line that lists applied stakes is appended at the end of the description only when
loc_txt
is used. If you are using localization files, you should add this yourself.
- Optional parameters (defaults):
atlas = 'chips', pos = { x = 0, y = 0 }
[(reference)](https://github.com/Steamodded/smods/wiki/SMODS.Atlas#applying-textures-to-cardssticker_atlas, sticker_pos
: The atlas and position to use for this stake's win sticker.unlocked = false, prefix_config, dependencies
(reference)- If
unlocked
is set tofalse
, the stake is unlocked by first winning a run on each of theapplied_stakes
.
- If
colour = [white]
: The colour used for this stake in the stake selection column.above_stake
: The stake's key that this stake should appear directly above in the list. By default, your stake will be placed at the top of the list.
[!NOTE] Key prefixing is applied to
applied_stakes
andabove_stake
by default. If you want your stake above a stake from the base game or other mods, this can be adjusted by usingprefix_config
. (reference)
API methods
modifiers()
- Used for applying changes to the game state when your stake is applied at the start of a run.