-
Notifications
You must be signed in to change notification settings - Fork 80
SMODS.Back
Casimir Eisenach edited this page Jan 23, 2025
·
3 revisions
Class prefix: b
-
Required parameters:
-
key
, -
loc_txt
or 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)
-
-
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_effect
functionality, which can be used as normal from this function by checking forcontext.context == 'eval'
orcontext.context == 'final_scoring_step
respectively. - Defining a
trigger_effect
function 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.
-
in_pool(self, args) -> bool, { allow_duplicates = bool }
- Define custom logic for when a card is allowed to spawn. A card can spawn if
in_pool
returns true and all other checks are met. -
allow_duplicates
allows this card to spawn when one already exists, even without Showman. - When called from
generate_card_ui
, the_append
key is passed asargs.source
.
- Define custom logic for when a card is allowed to spawn. A card can spawn if
-
check_for_unlock(self, args) -> bool
- Configure unlock conditions. Refer to the function
check_for_unlock
in Balatro's code for more information.
- Configure unlock conditions. Refer to the function
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
- Joker Calculation
- 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.