-
Notifications
You must be signed in to change notification settings - Fork 83
SMODS.Challenge
Casimir Eisenach edited this page Jan 22, 2025
·
2 revisions
-
Required parameters:
key
-
loc_txt
or localization entry (reference)- The only supported field is
name
. In localization files, it is set by referring tomisc.challenge_names[key]
.
- The only supported field is
-
Optional parameters (defaults):
-
rules
: Custom rules and modifiers for the challenge.-
rules.custom
: Expects a list of tables with anid
and optionally avalue
field (defaults totrue
). SetsG.GAME.modifiers[id] = value
. Text for each rule should be stored inG.localization.misc.v_text['ch_c_'..id]
,value
is passed as a variable. The following custom rule keys are defined by the base game:-
all_eternal
,chips_dollar_cap
,daily
,debuff_played_cards
,discard_cost
,flipped_cards
,inflation
,minus_hand_size_per_X_dollar
,no_extra_hand_money
,no_interest
,no_reward
,no_reward_specific
,no_shop_jokers
,none
,set_eternal_ante
,set_joker_slots_ante
,set_seed
.
-
-
rules.modifiers
: Expects a list of tables with anid
and avalue
field. Sets each corresponding base modifier to the given value. The following modifiers are supported:-
dollars
,discards
,hands
,reroll_cost
,joker_slots
,consumable_slots
,hand_size
.
-
-
-
jokers
: Expects a list of tables that represent jokers added at the start of the run. Each table can have the following fields:-
id
(required): The key of the joker to create. -
edition
: The edition of the joker, if any, given without thee_
prefix. -
eternal
: If the joker is eternal. -
pinned
: If the joker is pinned.
-
-
consumeables
: Behaves likejokers
, but for consumables.- Supports all fields of
jokers
exceptpinned
.
- Supports all fields of
-
vouchers
: Behaves likejokers
, but for vouchers redeemed at the start of the run.- Supports the same fields as
consumeables
, butedition
andeternal
have no functional effect beyond displaying in the preview UI.
- Supports the same fields as
-
restrictions
: Contains information about objects that are banned in this challenge.-
restrictions.banned_cards
: Expects a list of tables with keys to ban in theirid
fields.- This can be used to ban jokers, consumables, vouchers and booster packs.
- If a table has an
ids
field containing a list of center keys, onlyid
is shown as banned in the challenge UI, but all of theids
are banned.
-
restrictions.banned_tags
: Expects a list of tables with valid tag keys in theirid
fields. -
restrictions.banned_other
: Expects a list of tables with valid keys in theirid
field and atype
string with the value'blind'
.- Despite the name, the UI for this only supports using this to ban blinds.
- Functionally, all three options achieve the same task of adding specified keys to
G.GAME.banned_keys
.
-
-
deck
: Defines the challenge's deck.-
deck.type = 'Challenge Deck'
: The deck type for this challenge. It is not recommended to change this value. -
deck.cards
: Defines the cards present in the deck using a list of control tables. Control tables have the following structure:-
s
: Suit of the card, given by itscard_key
. -
r
: Rank of the card, given by itscard_key
. -
e
: Enhancement of the card, given by its key. -
d
: Edition of the card, given by its key without thee_
prefix. -
g
: Seal of the card, given by its key. (The key for this option is based on Gold Seals being the only available seals in the demo version.)
-
-
deck.yes_ranks
,deck.yes_suits
: Can be used only if nocards
table is specified. Expects a key-indexed table of ranks/suits by theircard_key
and acts as a whitelist, i.e., it includes only cards of those ranks/suits in the starting deck. -
deck.no_ranks
,deck.no_suits
: Same asyes_ranks
andyes_suits
, but acts as a blacklist, i.e., the specified ranks/suits are excluded. -
deck.enhancement
: Can be used only if nocards
table is specified. Given an enhancement by its key, apply it to all cards in the starting deck. -
deck.edition
: Can be used only if nocards
table is specified. Given an edition by its key without thee_
prefix, apply it to all cards in the starting deck. -
deck.seal
: Can be used only if nocards
table is specified. Given a seal by its key, apply it to all cards in the starting deck.
-
-
-
unlocked(self) -> bool
- Defines when the challenge should be unlocked (or not).
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.