Class prefix: stake
- Required parameters:
keyapplied_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_txtor localization entry (reference)loc_txtshould contain astickertable that also consists of anameandtext. 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)sticker_atlas, sticker_pos: The atlas and position to use for this stake's win sticker.unlocked = false, prefix_config, dependencies(reference)- If
unlockedis 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.hide_from_run_info: (added in 1531zeebee) Iftruehides the stake from the Run Info screen during a run.
Note
Key prefixing is applied to applied_stakes and above_stake by default. If you want your stake above a stake from the base game or other mods, this can be adjusted by using prefix_config. (reference)
calculate(self, context)(reference)loc_vars(reference)- Due to how the stake description box works, the functionality of
loc_varson stakes is limited.info_queueandcardwill not be used. Out of all possible return values, onlyvars,keyandsetare supported.
- Due to how the stake description box works, the functionality of
modifiers()- Used for applying changes to the game state when your stake is applied at the start of a run.
calc_dollar_bonus(self) -> number, table- (Added in 1531zeebee)
- For awarding money at the end of the round (e.g. Delayed Gratification, Cloud Nine)
- Optionally, you can return a table as the second value to modify the text in the round evaluation screen with any of the following arguments:
text: Replaces the default name text.key,set: Allows changing the key and/or set of the name in the localization (ignored iftextis set)text_colour,scale: Allows changing the colour and scale of the text respectively