-
Notifications
You must be signed in to change notification settings - Fork 176
SMODS.Back
N edited this page Apr 1, 2026
·
7 revisions
Class prefix: b
-
Required parameters:
-
key, -
loc_txtor localization entry (reference)
-
-
Optional parameters (defaults):
-
atlas = 'centers', pos = { x = 0, y = 0 }(reference) -
config = {}, unlocked = true, discovered = false, no_collection, prefix_config, dependencies, display_size, pixel_size(reference)-
configvalues will be saved underG.GAME.selected_back.effect.config
-
-
initial_deck: (Added in 1501a) Allows for easier customisation of your starting deck.-
ranks,suits: A list of ranks and suits to include/exclude. -
exclude = false: Iftrue,ranks/suitswill be trated as blacklists instead of whitelists.
-
-
-
calculate(self, back, context)(reference)- This method is called from
Back:trigger_effect()and incorporated into the standard calculation pipeline. This does not apply to vanillatrigger_effectfunctionality, which can be used as normal from this function by checking forcontext.context == 'eval'orcontext.context == 'final_scoring_steprespectively. - Defining a
trigger_effectfunction on your deck is deprecated.
- This method is called from
-
loc_vars, locked_loc_vars, generate_ui(reference) -
apply(self, back)- Apply modifiers at the start of a run. If you want to modify the starting deck, you must use events to do so.
-
calc_dollar_bonus(self, back) -> 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
-
-
check_for_unlock(self, args) -> bool- Configure unlock conditions. Refer to the function
check_for_unlockin Balatro's code for more information.
- Configure unlock conditions. Refer to the function
Game Objects
- API Documentation
- SMODS.Achievement
- SMODS.Atlas
- SMODS.Attribute
- SMODS.Blind
- SMODS.CanvasSprite
- SMODS.Center
- SMODS.Challenge
- SMODS.DeckSkin
- SMODS.DrawStep
- SMODS.DynaTextEffect
- SMODS.Font
- SMODS.Gradient
- SMODS.https
- SMODS.JimboQuip
- SMODS.Keybind
- SMODS.Language
- SMODS.ObjectType and SMODS.ConsumableType
- SMODS.PokerHand
- SMODS.Rank and SMODS.Suit
- SMODS.Rarity
- SMODS.Scoring_Parameter and SMODS.Scoring_Calculation
- SMODS.Seal
- SMODS.Shader and SMODS.ScreenShader
- SMODS.Sound
- SMODS.Stake
- SMODS.Sticker
- SMODS.Tag
Guides
- Your First Mod
- Mod Metadata
- The Mod Object
- Calculate Functions
- Perma-bonuses
- Object Weights
- Logging
- Event Manager
- Localization
- Text Styling
- UI Structure
- Utility Functions
- All About
G - Internal Documentation
Release Notes
Found an issue, or want to add something? Submit a PR to the Wiki repo.