#💻・modding-dev

1 messages · Page 126 of 1

stiff locust
#

anyone? i don't understand how context.destroying_card tells it which cards to destroy or when

cedar stream
#

how would one check if a card is a specific suit?

stiff locust
cedar stream
#

thanks

stiff locust
#

wait it's

#

if card:is_suit('Hearts') then

#

both might work actually i don't know

stiff locust
#

destroy every extra scored card

wintry solar
#

you have the extra flag, yeah?

stiff locust
#

and count how many are destroyed

stiff locust
#

it's just destroying the cards that I can't get

wintry solar
#

it just needs to return something in the return table and it'll destroy the card

topaz sun
#

Guys, is it possible to make a lovely patch for a steamodded .lua file?

#

I'm trying to add Xchip and Emult from Talisman to SMODS.eval_this()

stiff locust
#

how does it know which card to destroy or when though??

wintry solar
#

so something like lua if context.destroying_card.is_extra then return { message = 'Destroy!' } end

stiff locust
#

but how does it know which card to destroy or when

#

I don't get it

wintry solar
#

context.destroying_card is each card in the scoring hand

#

it iterates over the whole hand

stiff locust
#

oh

#

ii see

violet void
#

how can I remove both edition and enhanchment from a copy of a card I just made?

copy_card has strip_edition for the former but not the latter

stiff locust
stiff locust
violet void
#

?

#

are you asking me

stiff locust
#

no i'm suggesting that

violet void
#

so like card.enhancement = nil?

wintry solar
#

just increment a value in your joker before the return

stiff locust
#

okay

wintry solar
#

oops missed the center 🤦

violet void
#

I was about to say i got an error

#

This is the code

           G.E_MANAGER:add_event(Event({
                func = function()
                    G.playing_card = (G.playing_card and G.playing_card + 1) or 1
                    local _card = copy_card(copycard, nil, nil, G.playing_card, true)
                    assert(SMODS.change_base(_card, nil, cs_utils.get_next_rank_value(_card)))
                    _card:set_ability(G.P_CENTERS.c_base)
                    _card:add_to_deck()
        
                    G.deck.config.card_limit = G.deck.config.card_limit + 1
                    table.insert(G.playing_cards, _card)
                    G.hand:emplace(_card)
                    _card.states.visible = nil
                    _card:start_materialize()
                    return true
                end
            }))```

Should be correct?
livid tapir
#

hey guys how do i make like my own deck skin? is there some sort of guide

thick panther
livid tapir
#

ty!

zealous glen
#

I remember discussing it with other people here and I think lazy DFS would be a reasonable way to do it

#

but it was in the context of arbitrary graphs for modded ranks

zealous glen
#

in the folder

#

to make a texture mod

livid tapir
crisp coral
#

swag

zealous glen
stiff locust
#

card_is_splashed(context.destroying_card) caused a stack overflow crash

#

uhh

#

yeah cause card_is_splashed also iterates over the whole hand so

#

yeah that's a lot of

#

hmm

wintry solar
#

can you show both blocks of code?

stiff locust
#
    function card_is_splashed(card)
        local _,_,_,scoring_hand,_ = G.FUNCS.get_poker_hand_info(G.play.cards)
        for _, scored_card in ipairs(scoring_hand) do
            if scored_card == card then
                return false
            end
        end
        return true
    end
#

i think its just cause card_is_splashed checks the target card against every card, checking that against every card makes too many calculations?

#

i think I can work around it

wintry solar
#

just put card.splashed = true before that return true

#

then you only need to call this function once

carmine burrow
#

average of 13ish rounds for negative ... does this suck?
(uses the usual weights for everything but never starts with negative in the shop because i figured it'd be really boring if that happened)

wintry solar
#

maybe a card.splashed = false before the return false too

valid trench
#

Does anyone know what variable I can check to see if you are currently on the main menu

#

like the scene or stage value or whatevrr

tepid crow
stiff locust
#

i am now getting attempt to index value destroying_card (a nil value) crash when trying to do if context.destroying_card.unscored == true then

wintry solar
#

can you ss the crash?

carmine burrow
stiff locust
#

wwwait i think i figured it out

carmine burrow
stiff locust
#

got it working

#

thanks yall

cerulean rose
#

could i get some help with this?

viscid bough
#

How can i spawn a random joker? like, a random joker that can be anything from common to rare

sick sparrow
#

how to make consumables have infinite uses

#

using hook, btw

viscid bough
carmine burrow
rough furnace
#

SMODS.create_card

carmine burrow
#

outside of calculate you could maybe use #G.play.cards (includes nonscoring cards)

viscid bough
carmine burrow
merry raven
#

Is it possible to make it so that the Blind's sprite changes midgame?

valid trench
#

why is the return function just returning nil

#

card.ability.extra.deck is set correctly, I just want it to return what's in the array

rough furnace
#

how are you checking it?

valid trench
#

checking what

rough furnace
#

that it's nil

valid trench
#

because it doesn't do anything in game

#

I assume if it was something it would either crash or ya know actually work lol

rough furnace
#

I don't think returning like that does anything

#

oh wait does this not explain the return

valid trench
#

It works using if statements just checking each deck but I want to be able to add stuff to this array to make it easier

rough furnace
#

try not returning it in a table

#

also your effect is poorly defined

valid trench
#

I'm just trying to get it to work, the effect is just some basic give mult/chips thing

rough furnace
#

it's a global variable and also its defined after the calculate so it can be empty, and its being redefined every calculate call

valid trench
#

It wasn't in the calculate call but it kept crashing so I moved it out

#

Should I put it in set_ability

rough furnace
#

I mena you probabl just put it in your joekr config

valid trench
#

yeah

#

that makes a lot more sense doesn't it

#

nvm, it doesn't work

#

because it calls other extra variables

thick panther
#

if I have more than 4 suits, how do I prevent the custom suits from spawning cards in a new run (Start with the vanilla 52)?

sick sparrow
#

(sorry for this picture, my internet is wacky)
Mista four hand, is that really "funny"!?

stiff locust
#

where's the perkeo code i can't find it

viscid bough
stiff locust
#

ohh my god i've been looking at the lovely dump version of card.lua this whole time

#

no wonder i can't find shit in here

viscid bough
#

odd, im looking at the dump and its there

stiff locust
#

i couldnt find perkeo either

#

did find canio and chicot, didn't look for trib

viscid bough
#

im using VScode and searching card.lua in the lovely dump. If you press ctrl+f in VScode it lets you search for code. Im not sure what you're using for code editing though

thick panther
#

When did SMODS.DeckSkin get added?? Now I can make skin mods independant of DeckSkinsLite.

viscid bough
#

anyone think this card is too powerful for an uncommon/too powerful in general?

viscid bough
#

think it should be debuffed or change of rarity?

zealous glen
rough furnace
viscid bough
#

i thought that music was on my end

zealous glen
rough furnace
#

the config poping up

viscid bough
rough furnace
#

and how it fits

zealous glen
viscid bough
#

i think its pretty nice

zealous glen
#

new animation?

rough furnace
#

Like it's a tab but it opens a new menu. Does that make sense/is there anything I should change?

rough furnace
zealous glen
#

in intuitive terms

runic pecan
zealous glen
#

I guess it's weird that the old tabs vanish

vagrant cedar
#

Every mod is Cryptid when you have Cryptid installed

#

My current custom mod for me is WONKY

viscid bough
#

2 questions:
how can you copy the ability of a random joker that you have?
how can you copy the ability of a random joker that you do or dont have?

tall wharf
#

I'm currently thinking

#

how do i make the straight algorithm better

rough furnace
merry raven
#

Sorry mate, doesn't work. Didn't add any values to my Enhancements, and no "Charged!" message either when I tried to play a hand without it

calculate = function(self, card, context)
        if context.main_scoring and context.cardarea == G.play then
            local charged = card.ability.extra.stored_chips > 0
            local chips_bonus = 0
            local mult_bonus = 0
            
            for _, handCard in ipairs(G.hand.cards) do
                if handCard ~= card then
                    chips_bonus = chips_bonus + math.floor(handCard:get_id() * 1.2)
                    mult_bonus = mult_bonus + 5
                end
            end
            
            if chips_bonus > 0 and not charged then
                card.ability.extra.stored_chips = chips_bonus
                card.ability.extra.stored_mult = mult_bonus
                return{
                    message = "Charged!",
                    sound = "fm_jolt",
                    colour = G.C.BLUE
                }
            end
        end
...
runic pecan
#

What is the context attribute for "entering shop"?

zealous glen
#

there isn't

stray warren
runic pecan
runic pecan
sick sparrow
#

how to quick-redeem vouchers? If there's over 100 vouchers, it will take ages!

tall wharf
stray warren
tall wharf
#

straight detection algorithm that works with > 5 cards

#

as well as different suits

sick sparrow
runic pecan
stray warren
#

There isn't one. You create that yourself

tall wharf
#

i might have made cryptid lite

#

essentially

stiff locust
#

how do I check the name of the current blind

dry merlin
#

how can i make a joker that doesnt show up in the shop or booster packs or judgment, can i just use like rairity 99 or something?
i want a joker to only show up when another joker creates it

frosty nexus
#

Hey guys, newbie to balatro modding (and most modding in general here). Trying to learn how to make some basic joker mods, but idk the contexts used in calculation or most of the variables used in the game. I tried to check the definition of the base game jokers for an idea but couldn't find where in the code it does the calculation parts for each joker. I could just be dumb and/or blind, but could someone help point me in the right direction for where to learn this all? Whether that be looking through a specific file or a guide or something. I'd appreciate literally any help lol

dry merlin
#

So if you scroll up a bit you can find it

tall wharf
calm needle
#

where's that example mods folder?

tall wharf
dry merlin
#

Like photograph and 8 ball, which all search for specific cards played

tall wharf
#

if that helps

dry merlin
zealous glen
tall wharf
#

sorry

#

straights

#

my bad

zealous glen
#

I don't get it

#

seems too specific

#

I think you could instead have an algorithm for a set of cards

#

then compute it for a subset of the hand that is a specific suit

#

Although that would require more iteration

#

I just don't see it as "better" since I don't see it being used often

twin terrace
#

Question: Is there any restriction on the size of a texture atlas in either dimension?

zealous glen
#

yes

#

well, there is a limit on the product of the dimensions

stiff locust
#

if it's too wide then it'll just squash it until it fits in the standard space

twin terrace
#

I assume the standard space is the same size as the Balatro texture atlas'?

stiff locust
#

except the soul_pos part seems to not have a size limit beyond the size of the atlas(?)

tall wharf
#

here i accidentally put in the wrong name it's not a flush but you get the idea

stiff locust
#

i've been trying to make a card with an unusually large soul_pos for like an hour now and i can't get it to work

#

is there a way to put the soul_pos for a joker on a different atlas to the base of the joker i could really use that right now

zealous glen
rough furnace
#

Cursed idea a calculate_joker rest api

zealous glen
zealous glen
#

I dunno about the multi-suit straights because I don't really understand it

zealous glen
#

but in my mind the algorithm would work like this

#

have a table indexed by rank whose values are tables of cards of that rank

rough furnace
zealous glen
zealous glen
#

in a depth-first way that stops as soon as it finds a Straight

#

you could also memoize the depth just in case you have overlapping calculations

#

then you can show an example by just returning any element of the subtables

rough furnace
tall wharf
frosty nexus
#

anyone know how I could make my joker gain chips when a planet card is used? Is there a context for that? I literally have everything but that bit functioning (i think)

#

Didnt see any example like that on the steammodded example page

rough furnace
tall wharf
#

is it more cursed than calculate_joker REST API

rough furnace
#

Hard to say

rough furnace
#

The joker rest api could be written in js

tall wharf
#

no no actually how about we make balatro ui api using react

rough furnace
#

No

#

I'd maybe be okay with emulating the Dom api and HTML

frosty nexus
# runic pecan What about Constellation code?

I tried looking for it in the game files but didn't see the calculate portion of it? I checked most if not all of the files and only found something in game.lua which doesn't include what I need

tall wharf
#

actually angular

rough furnace
frosty nexus
frosty nexus
#

all i could find was

#

j_constellation= {order = 55, unlocked = true, discovered = false, blueprint_compat = true, perishable_compat = false, eternal_compat = true, rarity = 2, cost = 6, name = 'Constellation', pos = {x = 9, y = 10}, set = 'Joker', config = {extra = 0.1, Xmult = 1}},

tall wharf
#

chat i might have contracted the worst disease known to mankind

#

being a web developer

#

why am i even talking about react

tall wharf
#

i would dig in the game source deeper

frosty nexus
#

again I'm probably blind

tall wharf
#

i would start by finding the joker ability name in the entire source code

frosty nexus
#

but like, I'm pretty sure i control+f'd most of the files

tall wharf
#

then the

#

card ability variables

frosty nexus
#

I'm sure I checked there but maybe it's named differently or something, I'll look again

dry merlin
# frosty nexus ```j_constellation= {order = 55, unlocked = true, discovered = false, bluep...
        elseif context.using_consumeable then
            if self.ability.name == 'Constellation' and not context.blueprint and context.consumeable.ability.set == 'Planet' then
                self.ability.x_mult = self.ability.x_mult + self.ability.extra
                G.E_MANAGER:add_event(Event({
                    func = function() card_eval_status_text(self, 'extra', nil, nil, nil, {message = localize{type='variable',key='a_xmult',vars={self.ability.x_mult}}}); return true
                    end}))
                return
            end
frosty nexus
#

goddangit I was literally just blind

#

I'm sorry for being incompetent y'all 😭

#

I swear I looked but I probably fatfingered when searching lmao

#

well appreciate the help regardless, now I know exactly where to look so I won't have to ask as many stupid questions going forward 😂

zealous glen
#

@tall wharf I wrote some pseudo-code for Straight computation with DFS

zealous glen
tall wharf
#

ah

zealous glen
#

wait

#

wrong file lol

#

I didn't save lol

graceful seal
#

can anybody in here tap into the modding chat and give me a hand? not experienced with this stuff

zealous glen
#

you could break or return inside the DFS depending on where it is called, but if you want to find multiple Straights maybe you don't want to do that

stiff locust
#

chat how do I check the name of the current blind

zealous glen
stiff locust
#

i don't know how to navigate this

#

uhh

#

G.GAME.blind.name

#

maybe

#

IT WORKED

runic pecan
zealous glen
#
local foo_ref = foo
foo = function(args)
  local foo_val = foo(args)
  …
end
#

except buttons are usually in a table so foo is more like G.TABLE.KEY

runic pecan
zealous glen
#

indeed

#

they told you to put it there

#

via a hook

stray warren
#

Yeah, when you create the hook, you loop through each joker and call calculate joker

runic pecan
#

I think I need to read Hooking(programming) on wikipedia first brb

tall wharf
#

in basic terms you insert your code where there already is code to read things from it or change it

#

that's what i understand anyway

stiff locust
#

when you hook at least when hooking a function in balatro

#

you change the name of the original function so that the game calls your version of the function instead

#

which now lets you execute whatever code you want to, where that function would normally be run

#

and then at the end, you run the actual function properly so nothing is disrupted

#

i assume the name comes from like, hooking a fish and letting it go

#

the fish still goes about its life as normal, you just grabbed it for a moment and took a look at it and put it back in the water

dry merlin
#

anyone know how i can make a joker that doesnt show up in the shop or booster packs or judgment, can i just use like rairity 99 or something?
i want a joker to only show up when another joker creates it

nova finch
#

I'm trying to make a joker where there's a 50/50 chance that it'll X mult when either spades or diamonds are scored but this code just does nothing
can anyone help?

elder vapor
#

context.cardare -> context.cardarea

wintry swallow
#

if this is what you want, nice

carmine burrow
#

same as jokers, consumables, etc etc

wintry swallow
#

oh thanks thunk

#

yeah half the logic is like this

#

then no that DOESN'T get changed with loc

#

you have to pull it out of the loc table yourself if you want it localised

carmine burrow
#

seems like to get the localized name you'd use

localize{type = 'name_text', key = blind.key, set = 'Blind'}
tall wharf
#

i might be stupid

gilded narwhal
#

Hey guys is it possible to have unlockable things that aren't normally unlockable like consumables or challenges

wintry swallow
#

you can also just grab it out of the loc table like so: G.localization.descriptions.Blind[blind.id].name

gilded narwhal
#

Or rather how hard is it

wintry swallow
carmine burrow
wintry swallow
#

i'm working on a challenge pack, you can just define a function unlocked(self) --> bool on your challenge object

#

if it's true you're unlocked

gilded narwhal
#

Oh sweet

#

And you define an unlock condition for it or is the same as all the other ones?

wintry swallow
#

you can do whatever you want

#

if the function returns true it's unlocked

carmine burrow
wintry swallow
#

it's unlocked regardless

carmine burrow
#

ah neat

gilded narwhal
#

Okay mb gang that was obvious in hindsight

carmine burrow
wintry swallow
#

here's how i use it in my mod:

  -- eternal_egg_2.lua
    unlocked = function(self)
        return G.PROFILES[G.SETTINGS.profile].challenge_progress.completed['c_nsc_eternal_egg_1']
    end
wintry swallow
#

it just says locked by default

carmine burrow
wintry swallow
#

eternal egg 2 is a harder variant

#

same base idea but with some twists to make it a bit more interesting

#

it'll be part of the "b-sides" which are going to have their own separate selection menu

carmine burrow
#

neat

gilded narwhal
#

Oh I'm also doing b sides but of decks instead

wintry swallow
#

my mod's entire concept is playing around with the game's existing challenge system and taking it places it doesn't normally go

gilded narwhal
#

Mine is pretty much just taking every decks gimmick and pushing it to the extreme by having entire new game mechanics for specific decks

wintry swallow
#

my personal favourite challenge so far is "Escort Mission"
4 joker slots, one of them is taken up by a regular base edition jimbo
but the challenge rules have the stipulation that "Selling or destroying Joker increases all future blinds"

#

(and not by a small amount either, it's an extra 70% to score)

gilded narwhal
#

What's the b-side of the glass challenge

wintry swallow
#

there isn't one, so far i haven't made B-sides of any vanilla challenges because my goal is to have 20 completely original challenges (B-sides not included), bringing the total from vanilla up to 40

gilded narwhal
#

I look forward to it

#

And b-sides are harder versions?

wintry swallow
#

can be harder, can just be different

#

can be fusing mechanics from two challenges together

#

that said now you have given me the idea to remix some challenges from vanilla

gilded narwhal
#

I actually made one for the deck mod as an unlock

#

--Slow Burn--
Start with 5 hands and 4 discards
Even antes permanently remove 1 discard
Odd antes(after 1) permanently remove 1 hand

tall wharf
#

chat

#

how does -2 hand but +1 card selection sound to you

vapid mango
#

ok so fun issue popping up now via SMODS

#

This is how it's supposed to look with the new font for the language pack Rainglish

#

but it's not changing the numbers

#

if you notice on the left for the panel, the numbers are the default

vapid mango
merry raven
#

I'm updating my code to be compatible with the latest Steamodded version, but I'm at an impasse

I have an Enhancement that's supposed to reset any stored values in it once it's played with this:

                card.ability.extra.stored_chips = 0
                card.ability.extra.stored_mult = 0

But now that effect is removed, where am I supposed to put it?

if context.cardarea == G.play and context.main_scoring then
            if card.ability.extra.stored_chips > 0 or card.ability.extra.stored_mult > 0 then
                card_eval_status_text(card, 'extra', nil, nil, nil, {
                    message = "Jolted!",
                    sound = "fm_jolt",
                    colour = G.C.BLUE
                })
                return{
                    chips = card.ability.extra.stored_chips,
                    mult = card.ability.extra.stored_mult
                }
            end
        end

I've been warned that a return function is where the code ends, anything past it will make the game crash

silk compass
#

question, is there a way to rescale text on vanilla ui

cerulean rose
pine thunder
#

trying to make a joker that gives $8 dollars at end of round and then decreases, is there a way to make the reward decrease after youve gotten the money?

storm kraken
#

woo i made a custom bg i am going nowhere places

merry raven
#

Ayyyyy that's sick

#

How did you change the background? What function did you use?

storm kraken
#

ease_background_colour

merry raven
#

Cheers

frosty nexus
#

anyone know what the arguments are for create_playing_card()? I'm trying to make a joker that adds and enhanced 7 to deck when a certain condition is met but I can't really understand how the function is used in the base game

tall wharf
merry raven
#
set_blind = function(self, reset, silent)
        ease_background_colour{new_colour = G.C.BLACK, contrast = 1}
        ease_hands_played(15)
        ease_discard(15)
        G.hand:change_size(5)

Hmmm I want to change the colour of a Finisher Boss Blind, it works at first, but when all the cards have been dealt, the background changes back

wintry solar
merry raven
#

Ah no it's fine I managed to figure it out

#

But I got another issue in the Steamodded thread

wintry solar
#

Can you screenshot? Hard to read on mobile

merry raven
#

In a sec

storm kraken
#

may have accidentally discovered that you can change the colour of almost anything in the game with ease_colour 😭

steep rain
#

Help it keeps saying "unexpected symbol near '='" when it's just a number

#

ITS JUST A NUMBER

merry raven
# wintry solar Can you screenshot? Hard to read on mobile

So I got an Enhancement that's causing my game to instantly exit with no crash logs nor error messages. It's supposed to increase in rank if you play hands without it, but the game crashes when I select a random card
First image is for checking if any hands are played and then incrementing its rank, the second is resetting it back to normal after scoring it

wintry solar
#

Try moving that first block inside the context check

steep rain
tall wharf
merry raven
#

Remove one of the red brackets

tall wharf
#

remove 1 bracket at line 5

steep rain
#

it says the problem is occuring at line 7

tall wharf
#

remove 1 bracket at line 12

#

do what i said

wintry solar
steep rain
#

[SMODS RReferences "main.lua"]:23: Error processing file 'data/jokers/claimh.lua' for mod with ID 'RReferences': [SMODS RReferences "data/jokers/claimh.lua"]:3: '}' expected (to close '{' at line 1) near 'config'

#

it was working before

#

idfk how I broke it

#

I only changed "name" to "key"

wintry brook
#

comma after the key

merry raven
steep rain
#

[SMODS RReferences "main.lua"]:23: Error processing file 'data/jokers/claimh.lua' for mod with ID 'RReferences': [SMODS RReferences "data/jokers/claimh.lua"]:8: unexpected symbol near '='

#

AND ITS JUST A NUMBER

#

NOT A RANDOM SYMBOL

#

GRHHHGH

merry raven
#

Oh right before you go @wintry solar , another thing
A little nitpick, it has some pacing issues

if context.cardarea == G.play and context.main_scoring then
            .... suit resetting code ....
            card_eval_status_text(card, 'extra', nil, nil, nil, {message = "Reset!"})
        end

This is the second part of the Enhancement where it resets back to its original rank. When it gets played, the rank instantly resets visually. Then it displays the "Reset!" message and then scores its chips.

How do I make it so that it scores first, then plays the "Reset!" message and actually reset the rank at the same time?

steep rain
wintry brook
#

do you still have 2 of these

steep rain
tall wharf
steep rain
merry raven
#

You forgot a }

tall wharf
steep rain
#

FINALLY IT WORKS

tall wharf
#

these things are very strict on brackets placement

#

rule of thumb

wintry brook
#

if bracket is red then its missing its pair

tall wharf
#

if you have {, you will need an equal amount of }

wintry solar
#

That should work

tall wharf
#

i would suggest people who want to make custom jokers n stuff to read about basics of computer programming if they don't know anything about programming

#

but alas

#

nothing just just suggesting people to dive head in

merry raven
#

My computer science degree didn't prepare me for Lua

tall wharf
#

i don't even have a degree yet

#

comsci too

#

it's ok everything will become JavaScript

brisk rose
#

I took two seperate introductory programming classes in college and I still feel like a total beginner when I try to code mods

#

Though that might just be because it was over 5 years ago, lol

merry raven
#

No. You are forced to learn C++ and object oriented programming

brisk rose
#

I do think the fact that I can't really remember python or c++ help me have no expectations for Lua

tall wharf
#

right at home

merry raven
#

C++ why don't you use print like the rest of the normal programming languages

storm kraken
#

question: how am i even going to start with adding particles to my booster packs bg 😭

#

the only help i have is this and i dont even know what to do with it

edgy reef
#

You can see how SMODS reimplements vanilla booster particles in the src/game_object.lua file.

storm kraken
#

thank you so much awflhawflawfa

#

holy shit its particle

#

it goes away too yaya

runic pecan
#

Hmmm
Just suddenly got curious about the capital G and which folder its source code is hiding in.

tall wharf
#

game.lua

runic pecan
#

Damn
It's just right there the whole time

tall wharf
#

I've been thinking about adding twenty stickers

storm kraken
#

wtf

tall wharf
#

i have some gameplay idea in mind

frigid jetty
#

i have a joker that is basically Hiker, but adds bonus mult instead of bonus chips. unfortunately, the card UI does not display this.
my current idea to do this is to add the needed UI text to loc_vars so that when the UI updates, generate_card_ui picks this up and succesfully displays the bonus mult. (see image)

so my question is: how would i add the needed loc_vars text to the vanilla playing card ui? i'm looking at using the SMODS.Object:take_ownership() function but i'm unsure which SMODS.Object to use

runic pecan
#

A dumb way I immediately think up is to make a new card object that fits your requirement and replace the old ones like a race of shapeshifting imposters taking over the deck.

frigid jetty
#

oh actually, i could just make it into an enhancement and save myself a ton of headaches 🤣

#

intentional game design

random sleet
#

im assuming aure never added it to smods after i sent it in lol

frosty dock
#

yeah idk why

#

ig I just forgor

random sleet
#

it is funny to come back months later and see people reinventing the wheel so to speak lmao

calm needle
#

Sorry, i have a question

How to change the G.GAME.probabilities.normal to other value (other than 1)? I want to have joker with "3 in 4 chance" or something

frigid jetty
random sleet
#

uhhhh i think i did that with mostly lovely

#

i recall doing some rather ambitious things when smods 1.0 was On The Horizon

storm kraken
random sleet
#

since lovely would finally be mandatory

#

history lesson lmao

frosty dock
#

if you change the value, it will affect all probabilities

frosty dock
# random sleet history lesson lmao

tbh I doubt the code from like April would hold up to what steamodded now is, but doesn't seem like a terrible idea to still add into smods

calm needle
random sleet
#

the localization would be the difference i guess

#

but i know what you mean tho, the custom centers for minor arcana and stuff dont work right anymore and i have no idea why @_@;;;

violet void
#

If I added a new context for a Joker, would SMODS read it?

plain apex
#

this doesn't work how can i get the names of the other jokers instead of just jimbo

            -- Get all Joker names
            local joker_names = {}
            for i = 1, num_jokers do
                table.insert(joker_names, G.jokers.cards[i].name)
            end
            
            -- Randomly select one Joker to say something
            local joker_name = joker_names[math.random(#joker_names)] or "Jimbo"
            SMODS.eval_this(card, {message = (joker_name .. " says hi"), colour = G.C.BLUE})
#

want to make it randomly say something about one of the other jokers (provided you have any)

frigid jetty
random sleet
#

oh my did you manage to find oddityapi somewhere

frigid jetty
#

nope, i just copy pasted this into my mod code, then removed the or SMODS.Oddities[key] in the first if condition , and converted the function Card:generate_UIBox_ability_table() into a hook (based from the tutorial i saw) and prayed that it worked
#💻・modding-dev message

#

this is what i mean

#

imma try and look into it more once i get back to coding this in a few

random sleet
#

did you wayback machine my code

#

because if so, lol lmao etc

#

looks like thats not even smods 1.0

frigid jetty
#

Yup, and i am not ashamed 😅

random sleet
#

good luck

#

idek if thac has had that feature at any point

frigid jetty
random sleet
#

which reminds me aure did you ever add subtitles

#

the implementation i had is broken on new smods and im too dumb now to fix them lmao

frosty dock
#

i forgot about subtitles lmao

random sleet
#

forgor

#

smods should have every feature i make

#

whens suit levels

#

lmao

frosty dock
#

lol

#

i think suit levels are too niche

random sleet
#

i think i should make a mod that exists

frosty dock
#

yes

tall wharf
glass scaffold
#

I yanked the code from a different mod, but I want to make it give +7 mult on trigger. What do I need to change to have it work right?

(Also, that or statement should work, yes?)

dreamy thunder
#

Or im dumb

glass scaffold
#

I changed some code, but now I got a bigger issue.

dreamy thunder
#

What did you change

glass scaffold
#

I tried taking data from an example Gros Michel

dreamy thunder
#

Can you send the full error code?

glass scaffold
#

Cryptid server's helping right now

dreamy thunder
#

Alrighty

runic pecan
#

I think I need some secondary opinion and inputs.

OK so this joker I'm developing
makes every shop item
either become free or price in twice.
The current problem is that
I can't make it effect on initial items and booster packs without a bug that
makes on-shelf items doubled up prices again after
you open a booster pack and come back to the shop.
An alternate solution I'm hesitating to take is
to only calculate the chance
the moment you buy anything in the shop,
and either tax or refund you 100%
of the cost after the purchase.
The reason I'm hesitating is that
this operation, even though effects equivalently,
doesn't exactly match the description I prepared for it.
Should I keep fixing the bug
or just take the second approach?

frosty dock
#

wtf is that formatting

random sleet
#

its majestic on mobile lemme tell ya

frosty dock
#

i think you could put a property in each shop card that keeps track of if you already modified the price

frosty dock
runic pecan
primal robin
crisp coral
#

hook to create_shop_item?

random sleet
frosty dock
#

:todd:

runic pecan
tall wharf
frosty dock
crisp coral
frosty dock
#

nvm that

crisp coral
runic pecan
crisp coral
#

so shrug

frosty dock
#

if you want to change the price multiple times if you have multiple copies of the joker, that would have to be accounted for

frosty dock
runic pecan
crisp coral
#

uhhh

glass scaffold
#

AND IT WASN'T MY MOD

I'M NOT BAD AT CODING

#

AND MY CODE IS WORKING FIRST TRY?????

crisp coral
#

W

runic pecan
glass scaffold
#

Feedback:

What should the rarity of a joker that gives +7 for each scored 7 or Ace be?

violet void
#

+7 mult I assume?

glass scaffold
#

Yes

violet void
#

then yes

maiden phoenix
#

I mean it covers less number than fibbo with less mult too, common sounds better but I wouldnt be surprised if it was uncommon too

violet void
#

true

glass scaffold
#

Fair enough.

#

Hang on, how do I get a variable to show? I need to update my +7 when it's affected by Gemini or other jokers like that

violet void
#

show your code

maiden phoenix
#

Check how loc_vars work

#

And in your localization replace the 7 with #1#

glass scaffold
glass scaffold
violet void
#

also that font is sick, how did you set it

tall wharf
#

(it is not a good font for programming imo)

glass scaffold
violet void
#

I thought it was familiar

glass scaffold
tall wharf
frosty dock
#

me when custom suits

#

SMODS.change_base not mentioned

undone flicker
#

what would I have to use to do a random range (e.g. 3 - 5)

#

I know pseudorandom generates between 0 and 1 but Is there an eqivalent for other ranges?

frosty dock
#

if you give pseudorandom two more arguments min, max it'll generate an integer in that range

undone flicker
#

oh perfect

#

thank you

sick sparrow
#

how to quick-redeem vouchers? If there's over 100 vouchers that are redeeming, it will take ages!

violet void
#

is there a SMODS function to remove any seal from a card

storm kraken
#

i wonder...
could you use an image for the background...

runic pecan
#

Before VS After

merry raven
#

Is there a way to make it so that the blind icon changes midgame?

sick sparrow
violet void
sick sparrow
violet void
#

fair enough

runic pecan
#

I yanked a piece of code from smod example runner.
I know G.C.CHIPS is blue, but I need yellow,
so which one of G.C. is it?

#

Is it g.c.money, g.c.dollar, or something else?

sick sparrow
#

i mean G.C.MONEY

#

i almost blew up the mod

runic pecan
hardy viper
#

how does one keep up with all this

random sleet
#

is it yet advisable to dev against new calc or wait for smods team to smooth it out first

sick sparrow
#

how do i prevent calling card.start_dissolve when the consumable has unbreakable sticker on?

hardy viper
random sleet
#

aight what kind of thing needs updating

hardy viper
#

mainly custom enhancements are broken

#

idk about much else

random sleet
#

honestly its possible my mod is fine tbh i dont do too many weird calculation stuff

hardy viper
#

playtest ig

random sleet
#

im gonnnaaaa im not home yet :)))))))))) freezing on a bus

calm crag
#

What’s this about an update?

hardy viper
#

it might be worth checking out whatever commit updated cryptid to new calc and just see what they had to fix

random sleet
#

so true

sick sparrow
#

how do i prevent calling card.start_dissolve when the consumable has unbreakable sticker on?

hardy viper
calm crag
#

Oh RIP

stiff locust
#

oh is cryptid on new calc now

random sleet
#

my famous content mod [REDACTED] might need some TLC

stiff locust
#

also hi it's me again

random sleet
#

hello splash woman

royal ridge
#

cryptid is still on old calc i believe

stiff locust
#

well that sucks

hardy viper
#

oh

#

that's odd

calm crag
#

I just woke up so apologies if this is a dumb question but. Is there like a guide on how to make a Balatro mod

stiff locust
#

yes there is

calm crag
#

Where

stiff locust
#

i don't remember

#

I also just woke up

#

lol

#

it's somewhere in the forum posts

#

someone made a video tutorial for it

sick sparrow
#

how do i prevent calling card.start_dissolve when the consumable has unbreakable sticker on?

frosty dock
#

check for card.ability.eternal

sick sparrow
stiff locust
#

no that doesnt stop it being destroyed

#

you just have to hard code it

frosty dock
#

i'm saying you should check for it in your code

sick sparrow
#

i'm gonna find the code where it uses the use_consumeable and hook them

#

well the code isn't easy code to hook on

#

it uses local variable called dont_dissolve and not even hooking the code will make the card invicible

stiff locust
#

don't tell me you're thinking an eternal consumable will never be used up

sick sparrow
#

i have to use lovely overrides to put dont_dissolve inbetween code

storm kraken
#

ive been trying to add a custom edition to a card using a consumeable for the past 10 minutes edegabudgetcuts (im also sending the edition code incase theres anything wrong over there)

    can_use = function(self,card)
        if G and G.hand then
            if #G.hand.highlighted ~= 0 and #G.hand.highlighted <= card.ability.extra.cards then
                return true
            end
        end
        return false
    end,
    use = function(self,card,area,copier)
        for i = 1, #G.hand.highlighted do 
            Card:set_edition(ascened, true, true)
            end
    end
}
SMODS.Edition{
key = "ascened",
shader = false,
loc_txt = {
        name = "Ascended",
        label = "Ascended",
        text = { "God's hand will guide you" },
        },
config = {
       chips = 150,
       mult = 15
       },
in_shop = false,
badge_colour = G.C.WHITE
}
sick sparrow
#

oh why is the card not returning to consumable cardarea

[manifest]
version = "1.0.0"
dump_lua = true
priority = -10

[[patches]]
[patches.pattern]
target = "functions/button_callbacks.lua"
pattern = "e.config.ref_table:use_consumeable(area)"
position = "after"
payload = '''--intercepting the code would be fun, this is first time to use lovely overrides
if card.ability.unbreakable then
    dont_dissolve = true
    G.E_MANAGER:add_event(Event({
        trigger = "after",
        delay = 0.2,
        func = function()
            card:add_to_deck()
            G.consumeables:emplace(card)
            return true
        end,
    }))
end'''
match_indent = true
livid tapir
#

is better calc backwards compatible with old-calc
like can i write code for better calc to give support and still use my mod in old-calc

#

wait my mod probably already has better calc code considering im taking things from the new wiki

#

though old example mods so

wintry solar
#

The wiki also isn’t updated to better calc afaik

livid tapir
#

ah ok

#

well i hide back in my old calc dungeon

wintry solar
#

Have you tried your code on new calc?

livid tapir
wintry solar
#

Unless it has enhancements or editions, or plays with score calculation or eval_card, it should just work

livid tapir
wintry solar
#

Then might as well make the switch sooner than later

elder vapor
#

wdym SMODS.eval_this got deprecated days after i switched to it

#

😭

crisp coral
#

go back

wintry solar
#

You can use SMODS.calculate_effect instead

livid tapir
#

id rather just wait until the new version is more adopted

crisp coral
dreamy thunder
#

how do i make consumable add cash after using?

crisp coral
#

oh nvm thats why LMAO

crisp coral
#

for context i was using card = context.other_joker

worthy stirrup
#

Im trying to use the cryptid mod but when selecting a deck, one specific one (unsure of the name) causes a crash

livid tapir
#

give it to me
whats the name of the font 🔫

crisp coral
#

04b03

livid tapir
#

ok then?

crisp coral
#

?

livid tapir
#

weird font name but ig it exists lmao

crisp coral
#

balatro's font is m6x11

#

lmao

livid tapir
weary jungle
worthy stirrup
#

oh yea, im also using Joker Display

dry merlin
#

try turning off all other mods

worthy stirrup
#

okay give me a 1s to try it

dreamy thunder
worthy stirrup
#

that seemed to work but i also just enabled everything under the mod settings

weary jungle
#

you know how to make a consumable right?

dreamy thunder
#

yeah

#

just needed that part

#

thank you

worthy stirrup
#

okay, when i open the "Antimatter Deck" the game crashes, im only using Cryptid and Tailsman

dry merlin
#

im trying to make it so a joker creates another joker, but for some reason it creates that joker and then also fills up a joker slot with an empty space, so it goes from 1/5 jokers to 3/5 jokers while only actually having 2 jokers. ive tried using code from Riff Raff, Judgment, and even Cryptidmod but i cant get it to work right. can anyone help?

                      if context.first_hand_drawn
            and #G.jokers.cards + G.GAME.joker_buffer < G.jokers.config.card_limit
--            and not context.retrigger_joker
            and not context.blueprint
            then    
                         if #G.jokers.cards < G.jokers.config.card_limit then --probably redundant
                            G.E_MANAGER:add_event(Event({
                func = function() 
    --                for i = 1, jokers_to_create do
                        local new_card = SMODS.add_card({
                        set = 'Joker',
                        area = G.jokers,
                        key = 'j_joker'
                        })
                        card:add_to_deck()
                        G.jokers:emplace(card)
                        G.GAME.joker_buffer = 0
--                    end
                    return true
                                end}))   
            end
              end

messy code is messy

frosty dock
#

it does it for you, so it's being done twice

dry merlin
#

that was it, awesome thank you

#

also is it possible to make a joker that doesnt show up in any way except when a joker creates it?

frosty dock
#

in_pool = function() return false end

#

makes it not spawn unless forced to

sick sparrow
# sick sparrow oh why is the card not returning to consumable cardarea ```toml [manifest] versi...

the workaround is this

[manifest]
version = "1.0.0"
dump_lua = true
priority = -10

#intercepting the code would be fun, this is first time to use lovely overrides

[[patches]]
[patches.pattern]
target = "functions/button_callbacks.lua"
pattern = "e.config.ref_table:use_consumeable(area)"
position = "after"
payload = '''if card.ability.unbreakable then
    card2 = copy_card(card, nil, nil, area)
    card2:add_to_deck()
    area:emplace(card2)
    card.ability.unbreakable = nil
end'''
match_indent = true
tepid crow
#

why are you using a priority of -10 btw

nocturne estuary
#

I need some help.
How would I make a joker gain mult depending on the number of chips a card would score when it is destroyed?

nocturne garnet
#

dang

#

didnt know

calm crag
weary jungle
#

what is the list that holds all cards in hand? even if its above handsize?

nocturne garnet
#

whats better calc....

weary jungle
#

everything has a calculate

#

basically

#

probably

#

like one of my consumables uses a calculate

nocturne garnet
#

is that it

weary jungle
#

probably not

#

a lot of stuff has contexts now so thats good

weary jungle
nocturne garnet
#

might not do anything serious to my mod so

weary jungle
#

you have to update things now!!! hahahahaha

nocturne estuary
#

what is the context for a card being destroyed?

weary jungle
#

what do you mean?

#

like every time a card is destroyed like canio

nocturne estuary
weary jungle
#

check canio probably

nocturne estuary
#

or via hanged man, doesn't really matter

primal robin
#

I've seen 2 updates for Balatro today, 100KB and 200KB. What's happening?

teal estuary
#

canio is kinda eh, since its calls a context that just.. doesnt exist

zealous glen
#

caino*

nocturne estuary
teal estuary
#

potato shomato

zealous glen
teal estuary
#

thunk moment

nocturne estuary
teal estuary
#

joeshrug i tried it myself and couldnt find it

nocturne estuary
#

man

teal estuary
#

its defintely doable

#

i just dont know how

nocturne estuary
#

mhm

weary jungle
#

why isnt there a += in lua

#

or there is and im dumb

teal estuary
#

-# what does += do

weary jungle
#

like a = a + b

#

is now a += b

hollow locust
#

shorthand way to add stuff, methinks(?)

weary jungle
#

some other variants are *=, /=, -= and so on

glass scaffold
#

It's giving out the mult, but not the chips. What's the fix?

teal estuary
#

cant use the same return, you'd want SMODS.eval_this

wintry solar
#

Use better calc

#

But that’s not the problem

#

Remove the two inner curly brackets in the config line

glass scaffold
teal estuary
#

better calc made it so you only need one return?

glass scaffold
#

Where do I get BetterCalc

wintry solar
teal estuary
#

oooh fair

#

neat

hollow locust
#

And now to spring the question because i believe it is appropriate (it is not)

-# I want to make a mod. Where do i start? (Is it any help that I've used Love before, specifically Kristal, a deltarune engine)

teal estuary
#

you'd want

#

lemme

glass scaffold
hollow locust
#

I do too, but is there like.. A template or someth?

glass scaffold
#

And I have a .lua file explaining some coding parts

teal estuary
teal estuary
hollow locust
#

OK Thankies

teal estuary
#

theres

#

example jokers in smods

glass scaffold
#

But none that I saw discussed chips

dry merlin
#

walkie talkie?

#

castle?

teal estuary
#

chips is the exact same as mult raisedcateyebrow

#

just.. different name

glass scaffold
#

alright, what .lua file has Walkie Talkie?

#

I'm gonna try using that instead.

dry merlin
glass scaffold
#

Thanks (Line 298)

dry merlin
#

im trying to have a joker create a customly added joker with SMODS.add_card, and the actual creation code works, like with j_egg, but when i input a custom key, i get this error
can anyone help?

#
local new_card = SMODS.add_card({
    set = 'Joker',
    area = G.jokers,
    key = 'j_bird',
    no_edition = true
    })

maybe i need to put somewhere that j_bird is part of the Joker set? im not very knowledgeable

#

or make a new set?

worthy stirrup
#

Whenever i open the "Antimatter Deck" the game crashes, ive switched to the old counting system, im using Cryptid, and Tailsman. Any way i could fix this?

#

I have no idea what is causing it

buoyant umbra
#

Hey guys, I'm trying to make a joker to do stuff per held queen in hand, and while the calculate works in general, it also re-triggers when the blind is won.

My calculate for the joker is:

        calculate = function(self,context)
            if context.individual and context.cardarea ~= G.play and not context.other_card.debuff then
                if context.other_card:get_id() == 12 then
                    return {
                        x_mult = self.ability.extra.x_mult,
                        mult = self.ability.extra.mult,
                        chips = self.ability.extra.chips,
                        card = self
                    }
                end
            end
        end,
wintry solar
#

Using better calc?

teal estuary
#

-# also why use self

stiff locust
#

is there a way I can grab the key of the current blind

#

I did figure out how to grab the name but that'll make it break if you're on another language

dry merlin
#

how does madness do it?

stiff locust
#

it doesn't grab the key of the blind

wintry solar
#

G.GAME.blind.config.blind.key

stiff locust
#

it just goes "and not context.boss_blind" or whatever the boss blind context is

#

I think?

dry merlin
#

zamn

#

thought it might have been that

wintry solar
#

I think that’s the shortest reference

pine thunder
#

currently struggling to make a joker that does something upon clicking "cash out", is that possible?

stiff locust
#

why on cashout instead of end_of_round

pine thunder
#

its a food joker for money

#

so it needs to decrease after you get the money

stiff locust
#

just make it decrease when you exit the shop

pine thunder
#

yea but then its like, you buy it and it immediately loses a dollar

stiff locust
#

increase starting $ by 1 to compensate

pine thunder
#

okay yea like thats functionally the same but it doesnt feel good

sudden dew
#

When patching, is there a way to replace all ocurrences of a specific string in the target file but not replace the entire line the string is on?

pine thunder
#

i was able to add a custom context for after your end of round reward is calculated so it works, but it still looks kinda fucky cause it displays the "-$1" before the results screen

#

id rather have it be upon entering the shop

sudden dew
#

If you're already adding a custom context for that, is there a reason not to just create a custom context for entering the shop?

pine thunder
#

thats what i wanna do im just dumb and cant find where to put it in the code

sudden dew
#

Not dumb, the codebase is a mess and everything is put in a weird place

tepid crow
crisp coral
#

if context.end_of_round and not context.blueprint and context.main_scoring then should normally trigger like if context.end_of_round and not context.blueprint and not context.repetition and not context.individual then, right?

#

if so, then it isn't working right

royal ridge
#

this is where i put it when trying to do that

cerulean rose
#

need mod prefix

nocturne estuary
#

how do I check if only 1 card is in hand?
this doesn't seem to work:

if G.GAME.current_round.hands_played == 0 and #context.full_hand == 1 then
crisp coral
#

it should be j_[mod prefix]_bird

cerulean rose
weary jungle
#

how is this a nil value i dont understand

cerulean rose
#

did you start a new run

weary jungle
#

no

nocturne estuary
weary jungle
#

i used a savestate

thick panther
#

its good practice to start a new run everytime as sometimes things, like Jokers, dont get updated with the new code correctly.

crisp coral
pine thunder
weary jungle
#

uigh

cerulean rose
#

need help with this

dry merlin
nocturne estuary
cerulean rose
#

do you have a context check?

#

could be that it's being calculated outside of playing a hand

nocturne estuary
thick panther
#

is there a way to quickly remove all cards in a deck or do I need to just iterate through it?

pine thunder
#

did someone delete their message about how to make the joker shake with a message during a custom context cause i need that back

cerulean rose
nocturne estuary
# cerulean rose can i see the full `calculate` function?
calculate = function(self,card,context)
        if context.joker_main then
        end

        print(#context.full_hand)
        if G.GAME.current_round.hands_played == 0 and #context.full_hand == 1 then
            print('hi')
            G.E_MANAGER:add_event(Event({
                func = function() 
                    G.playing_card = (G.playing_card and G.playing_card + 1) or 1
                    local _card = copy_card(context.full_hand[1], nil, nil, G.playing_card)
                    _card:set_edition({negative = true}, true)
                    _card:add_to_deck()
                    G.deck.config.card_limit = G.deck.config.card_limit + 1
                    table.insert(G.playing_cards, _card)
                    return true
                end}))
        end
    end
crisp coral
#

that's not a custom context, that will run on every context with context.full_hand

nocturne estuary
#

so how would I check if only 1 card is in the played hand?

crisp coral
#

put in one of the scoring contexts

#

before, joker_main, after

thick panther
#

This seems to only remove half of the deck of cards (26), instead of every card in the deck. why?

for _, card in ipairs(G.playing_cards) do
    card:remove()
end
nocturne estuary
crisp coral
#

no

nocturne estuary
#

nevermind, this also returns nil

#

(do keep in mind this is my first time making a custom joker)

nocturne estuary
crisp coral
crisp coral
cerulean rose
thick panther
nocturne estuary
#

thanks

crisp coral
cerulean rose
#
while #G.playing_cards ~= 0 do
    G.playing_cards[1]:remove()
end
crisp elbow
#

Trying to test a mod post calc, what would I need to to do change this lovely patch to be fixed for bettercalc?

    create_consumable("Spectral", nil, nil, nil)
    ret.effect = true
end```
maiden river
#

does anyone have a joker image that they use during testing?
(like a joker that says "test" or something)
I'm using a blank tarot card lmao

maiden river
#

thanks!

nocturne estuary
#

another weird issue,
this is the code I have, which should create a negative copy of the played card if first hand has only 1 card, and add it to the deck, which it does all correctly:

calculate = function(self,card,context)
        if context.joker_main and G.GAME.current_round.hands_played == 0 and #context.full_hand == 1 then
            G.E_MANAGER:add_event(Event({
                func = function() 
                    G.playing_card = (G.playing_card and G.playing_card + 1) or 1
                    local _card = copy_card(context.full_hand[1], nil, nil, G.playing_card)
                    _card:set_edition({negative = true}, true)
                    _card:add_to_deck()
                    G.deck.config.card_limit = G.deck.config.card_limit + 1
                    table.insert(G.playing_cards, _card)
                    return true
                end}))
        end
    end

However as seen in the screenshot the card stays on screen for some reason?

cerulean rose
#

gonna keep bumping this

thick panther
#

If i wanted to add a modded playing card using SMODS.create_card would the key be something like prefix_<card_key>_<rank>?

hollow patrol
#

hi i'm really new to modding, i was wondering how one could edit how much money a deck gives you by default (similar to the yellow card)?

#

a lot of example code i've found don't seem to have that option

thick panther
hollow patrol
#

thank you! i'll try it out

pine thunder
#

this is how i added a message under my joker when it activates, is there a better way of doing this? it feels kinda hacky but it does work deez nuts is probably a placeholder

    if context.pl_cash_out then
      card.ability.extra.money = card.ability.extra.money - card.ability.extra.money_loss
      card_eval_status_text(context.blueprint_card or card, 'extra', nil, nil, nil, {message = 'deez nuts', colour = G.C.MONEY})
    end
  end```
quaint kettle
#

Would it be possible to change the names of the suits in the entire game? Like if you want to change them to the names in a tarot deck (= wands, swords, cups & disks instead of clubs, spades, hearts, diamonds.) I'd like to maybe change all the playing card textures to tarot cards, but not if I can't easily change the names.

zealous glen
pine thunder
#

i tried to do it steamoddeds way but i was either missing something or steamodded doesnt like custom contexts

#

does anyone know what the 'extra' part means

sudden dew
#

It's just a subtable with the ability table where values related to joker abilities tend to go

zealous glen
sudden dew
#

I think the fields in ability are meant to remain consistent, but you can go buckwild and put whatever new fields you want in extra

zealous glen
#

So you have to do it manually

#

But it’s still with another function I think

zealous glen
wintry solar
#

Custom contexts in better calc are easy to add

sudden dew
#

Oh or do you mean the string 'extra' that you're passing to card_eval_status_text?

zealous glen
sudden dew
#

yeah idk what that is

pine thunder
#

i just copied it from state_events but i prefer to know what my code is actually doing

#

lmao okay well if it works it works

zealous glen
#

But I think it’s the type of popup

wintry solar
#

If you want smods to automatically handle the results, just do SMODS.calculate_context({context table here pls})

pine thunder
#

whats a context table

dry merlin
#

embed fail

cerulean rose
wintry solar
#

Why don’t you ask Jen

thick panther
#

how would you add a playing card using SMODS.create_card? i tried using H_2 as the key, but it crashes with center as a nil value.

maiden river
#

ah

nocturne estuary
#

ah

sonic cedar
#

What would I have in my vs workspace to keep my globals defined?

sonic cedar
#

(ex: localize)

zealous glen
#

I put the Balatro source code there and nothing

wintry solar
#

Balatro source code or lovely dumps should get most of it

zealous glen
# dry merlin exactly

I want an Enhancement with this effect; I need to figure out the specifics but it needs at least a custom shader

zealous glen
dry merlin
dreamy thunder
#

how do i change if a consumable appears in the shop or not? like i want it to appear when i have the right joker in hand

thick panther
#

What would the set in SMODS.create_card be for playing cards?

weak brook
#

working on overhauling the deckskin api myself, got the cards changing depending on the skin working, but this animation that happens when the cards get emplaced is bugging me. dont want them to fly in from the top left for no reason. anyone know how to disable that? I tried just inserting the cards with table.insert but the same thing happened

#

-# also dont worry the default option wont show every card like it does in this gif, i just havent gotten to implementing the list for specifying which cards to only show in the preview

zealous glen
#

I like it tho

zealous glen
#

Random DeckSkin

weak brook
#

i mean its kind of a cool effect but its like wrong, every card that i remember coming in from a side of a screen comes in from the top right iirc

zealous glen
weak brook
#

or how it does the deck stacking

#

true

#

anyway victin if you'd like to help with this i would love some help

zealous glen
# zealous glen Random DeckSkin

There’s only two things missing, a visual feature and an in-game UI to select the set from which textures are pulled from

weak brook
#

especially if you're familiar with how to properly commit to smods

zealous glen
zealous glen
weak brook
#

i put together a google doc outlining all the plans i wanted to add

zealous glen
#

In the Example Mods

hardy viper
weak brook
#

yeah i get that but moreso i was talking about like

#

idk if theres like etiquette for how to code in smods

zealous glen
#

is there

weak brook
#

idk

dreamy thunder
zealous glen
dreamy thunder
#

partially

#

lemme re read it

hardy viper
# weak brook idk if theres like etiquette for how to code in smods

commenting your code helps for reviews but they generally get removed before they're merged, other than that try not to define any globals outside of the smods table unless you have to
if there's any problems with your code they'll be sorted when the code is reviewed

#

i don't think there's any other "etiquette"

thick panther
#

is the key or area or something wrong? It keeps crashing with center as nil. Isnt it prefix_<card_key>_rank for a modded playing card?

for _, rank in ipairs({ '2', '3', '4', '5', '6', '7', '8', '9', 'T', 'J', 'Q', 'K', 'A' }) do
      SMODS.create_card({
      key = 'waterSuit'..water_suit.card_key..'_'..rank,
      area = G.playing_cards
    })
end
weak brook
#

i tried to make the globals very uniquely named so they wouldnt conflict with any future stuff

rough furnace
zealous glen
#

Like the SMODS table

weak brook
#

ah yeah that is a table isnt it, i'll do that

#

anyway lemme tell ya what ive done so far victin

hardy viper
weak brook
#

yeah i still got a lot to learn with some of the coding

#

thanks for the tip

valid trench
#

I'm trying to make a new function inside my joker, does anyone know why it's just not

hardy viper
hardy viper
valid trench
hardy viper
#

that works

#

okay yeah you can't define a function like that

weak brook
hardy viper
#

you're trying to define it inside a table

valid trench
#

ah, yeah that makes sense

#

should I just define it outside the joker

hardy viper
hardy viper
weak brook
# zealous glen Maybe on the weekend. What are you missing?

I just started my fork today but so far i added the 'ranks' posStyle which is a solution for people trying to load in unconventional spritesheet layouts like aces and face cards. It uses the required ranks option as reference for how the spritesheet is ordered and loads the cards accordingly. Made that the default setting for posStyle since imo it comes with the least amount of possible glitches or kinks.
I also made it so that default option gets loaded in the pipeline as well, that will come into play later when i start working on the expanded color schemes options.

Heres the google doc i made to outline all the features/changes i wanna add:
https://docs.google.com/document/d/1-t73xFBSDzXCaG9kqAjgRrBUMtVL7woRX9OEBSZF_KQ/edit?tab=t.0

#

the main thing i'm concened about is the features that have to do with dynamically changing assets, like the colors or the suit icons in full deck. last time i did it it was janky and bad and it's why i wanna make sure im doing the proper smods coding etiquette

crisp elbow
#

what would be the replacement to card:set_ability in Steamodded?

weak brook
#

i also wanna make sure it doesnt conflict with Malverk if possible

crisp elbow
#

if there is one

maiden river
#

when I add a copy of a card to the deck, it has the red card back instead of the right one (blue, in this case)
is there any way to fix this?

rough furnace
#

How are you making that card?

hardy viper
#

im not sure what sets the back sprite

maiden river
# rough furnace How are you making that card?
calculate = function(self, card, context)
        if context.joker_main then
            local hand_size = #context.scoring_hand
            local _card = copy_card(context.scoring_hand[hand_size],
                                    nil, nil, G.playing_card)
            _card:set_edition()
            _card:set_seal()
            _card:add_to_deck()
            G.deck.config.card_limit = G.deck.config.card_limit + 1
            G.deck:emplace(_card)
            table.insert(G.playing_cards, _card)
        end
    end
hardy viper
rough furnace
maiden river
# hardy viper ?

G.playing_cards is the table of the actual cards in the deck
G.playing_card is something else

#

function copy_card(other, new_card, card_scale, playing_card, strip_edition)

violet void
#

why does copilot keep thinking pseudorandom_element returns the index 😕

#

picking X unique cards is pain

dreamy thunder
#

how do i use this?

hardy viper
#

you should get used to that

hollow locust
#

Bug or someth?

I put the Example Seal mod to my Mods folder, and checking in collections, the info box shows nothing?

Nothing was changed to the folder or files, it was literally a drag & drop. Everything I have installed is the latest version.

hardy viper
hollow locust
#

Dang

maiden river
#

that's nuts lmao

hardy viper
#

they worked at one point but they aren't maintained so

hollow locust
#

Maaaaaaan

hardy viper
#

it is what it is

livid tapir
#

if i were to port my mod, how would i get info on better calc
the wiki is for old, and example mods as you say arent maintained so

hollow locust
#

I see

rough furnace
#

so now the real question is does mine do this?

livid tapir
thick panther
#

are there any examples of creating playing cards using SMODS.create_card? I cant find anything for it.

rough furnace
#

I do know dna used to do this but was fixed

#

but idk if somethign in dna was changed or internally

hardy viper
livid tapir
rough furnace
#

no mine works fine

hardy viper
#

the secret set_back function that localthunk is hiding from us

hardy viper
#

im kidding

maiden river
#

well I'll figure it ou

#

*out

rough furnace
#

hmm looking at the save it seems like it was changed from each card storing it's back pos

violet void
#

whats the method to make a shallow copy of a table

table.unpack is crashing for me

rough furnace
#

or i'm blind

violet void
#

😭 I had to define my own contains as well smh Lua

rough furnace
#

table.unpack doesn't exist in 5.1

hardy viper
#

speaking of

rough furnace
hardy viper
#

deepfind got obliterated by some commit recently

rough furnace
#

lol

vagrant cedar
#

I tried stitching two of my Jokers together and I got lost

hardy viper
vagrant cedar
#

Anybody able to help me figure out this Joker right quick?