-
Notifications
You must be signed in to change notification settings - Fork 126
SMODS.DrawStep
Casimir Eisenach edited this page Mar 1, 2025
·
1 revision
This class offers a standardized way of drawing sprites and shaders on cards instead of having to rely on patching Card:draw()
.
-
Required parameters:
key
-
order
: Sets an order for this step. All draw steps are executed in order from lowest to highest. Refer tosrc/card_draw.lua
in Steamodded's source code for the order values of base draw steps. -
func(card, layer)
: Handles the drawing logic of thisDrawStep
.-
card
is the card being drawn. -
layer
is one of'card'
,'shadow'
,'both'
.
-
-
Optional parameters (defaults):
-
layers = { both = true, card = true }
: Determines which values of thelayer
argument thisDrawStep
should be executed for. Unless you are defining custom types of layers and callingCard:draw()
with them, you should only ever need to change this to{ both = true, shadow = true }
when you are drawing a shadow. -
conditions = {}
: Defines additonal conditions for when this draw step should or shouldn't run. This table accepts the following keys:-
vortex = <bool>
: Checks for avortex
property of the drawn card. This is true only for splash cards on the game's splash screen. -
facing
: Checks for the facing direction of the card. Valid values are'front'
and'back'
.
-
-
prefix_config, dependencies
(reference)
-
Game Objects
- API Documentation
- SMODS.Achievement
- SMODS.Atlas
- SMODS.Blind
- SMODS.Center
- SMODS.Challenge
- SMODS.DeckSkin
- SMODS.DrawStep
- SMODS.Gradient
- SMODS.https
- SMODS.Keybind
- SMODS.Language
- SMODS.ObjectType
- SMODS.PokerHand
- SMODS.Rank and SMODS.Suit
- SMODS.Rarity
- SMODS.Seal
- SMODS.Sound
- SMODS.Stake
- SMODS.Sticker
- SMODS.Tag
Guides
- Your First Mod
- Mod Metadata
- Calculate Functions
- Perma-bonuses
- Logging
- Event Manager
- Localization
- Text Styling
- Mod functions
- UI Structure
- Utility Functions
Found an issue, or want to add something? Submit a PR to the Wiki repo.