#💻・modding-dev

1 messages · Page 396 of 1

keen totem
#

any consumable

wild escarp
#

Screenshot if you need

red flower
#

replace cards = { new_cards } for cards = new_cards

unborn bay
#

hi n

wintry solar
#

yeah, it only works because there's an overarching pool of all consumeables

#

but the auto area determination doesn't catch it

wild escarp
red flower
#

weird

red flower
#

sorry i just got jumpscared and starstruck by a youtuber i like randomly messaging me

stark geode
#

hey does anyone know about pools

#

and how to remove things from them

#

im trying to prevent some vouchers from spawning when a joker is sold without using used _vouchers

tight notch
#

yeah

#

oh nvm

#

i thought you meant in the code

stark geode
#

im pretty sure if i remove the voucher from the pool they cant spawn anymore

elfin stratus
#

is there documentation on creating and adding cards to deck/hand?

wind steppe
#

why can i hear jimbo speaking infinitely and also can't actually see him say anything

para_youlost_old = Game.update_game_over
Game.update_game_over = function(self, dt)
    para_youlost_old(self, dt)
    if G.PROFILES[G.SETTINGS.profile].pineappledeath and G.GAME.round_resets.ante > G.GAME.win_ante then
        local Jimbo = nil
        G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 2.5,
            blocking = false,
            func = (function()
                if G.OVERLAY_MENU and G.OVERLAY_MENU:get_UIE_by_ID('jimbo_spot') then 
                    Jimbo = Card_Character({x = 0, y = 5})
                    local spot = G.OVERLAY_MENU:get_UIE_by_ID('jimbo_spot')
                    spot.config.object:remove()
                    spot.config.object = Jimbo
                    Jimbo.ui_object_updated = true
                    Jimbo:add_speech_bubble('lq_'..math.random(1,10), nil, {quip = true})
                    Jimbo:say_stuff(5)
                    end
                return true
            end)
        }))
    end
end
tight notch
#
SMODS.Joker {
    key = "mattjoker",
    name = "mattjoker",
    atlas = "mattatlas",
    pos = {x = 0, y = 0},
    config = {extra = {Xmultamt = 1, Xmult = 0}},
    loc_txt = {
        name = "some guy",
        text = {
            "This joker gains {X:mult,C:white}X#1#{} Mult",
            "whenever a {C:dark_edition}Holographic{}",
            "card or joker is triggered.",
            "{C:inactive}(Currently {X:mult,C:white}X#2#{}{C:inactive} Mult){}",
        }
    },
    rarity = 4,
    cost = 15,
    pools = {["gcmember"] = true},
    unlocked = true,
    discovered = true,
    loc_vars = function(self, info_queue, center)
        return {vars = {center.ability.extra.Xmultamt, center.ability.extra.Xmult}}
    end,

    calculate = function(self, card, context)
        if context.other_joker and context.other_joker.edition and context.other_joker.edition.holographic == true then
            card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmultamt
            return {
                message = "ENHANCE!"
            }
        end

        if context.joker_main and card.ability.extra.Xmult > 0 then
            return {
                message = "NO SCORING MESSAGE!",
                Xmult_mod = card.ability.extra.Xmult
            }
        end
    end
}```
#

what is wrong with this?

#

whenever a joker scores (holo) it just doesn't increase.

frosty rampart
#

it's context.other_joker.edition.holo, not ...edition.holographic

plain apex
#

can you check if other jokers do not trigger like how you can check if cards dont score?

tight notch
#

tyty

stark geode
elfin stratus
#

i want to do something similar to certificate

#

but i cant understand what is going on in that code

stark geode
elfin stratus
#

the problem is that i cant understand it

#

i know what some things do

#

but others dont

#

probably due to my lack of lua skill

stark geode
#

oh god i forgot how aids this is

stark geode
# elfin stratus the problem is that i cant understand it
local _rank = pseudorandom_element({'J', 'Q', 'K'}, pseudoseed('never_punished'))
            local _suit = pseudorandom_element({'S','H','D','C'}, pseudoseed('never_punished'))
            local _card = create_playing_card({
                front = G.P_CARDS[_suit..'_'.._rank],
                center = G.P_CENTERS.m_glass
            }, G.hand, false,false,nil)
            _card:add_to_deck()
            table.insert(G.playing_cards, _card)
            _card.states.visible = nil
            G.E_MANAGER:add_event(Event({
                func = function()
                    _card:start_materialize()
                    return true
                end
            })) ```
manic rune
#

mmm anything you need to know about?

stark geode
#

this is code to create a face card

manic rune
#

also ho perkeo guy

stark geode
#

hullo

#

i dont really work on that anymore

manic rune
#

o

#

i assumed you still do, looking at ur name lol

elfin stratus
#

i think i get everything except this

}, G.hand, false,false,nil)```
frosty rampart
#

create_playing_card takes 5 arguments. the first one is a table, which contains values of front (the rank and suit of the playing card) and center (the enhancement of the playing card). the second argument is where the playing card goes (G.hand puts it into your hand). i forget what the others do but they're all false and nil so they don't particularly matter in your case lol

#

it's formatted a little weirdly, i probably would've indented the lines with front and center to make it clear that they're part of a table

red flower
#

i hate that function

#

lua should allow named arguments

stark geode
# elfin stratus could you explain a bit how this works please
--picks a random rank from the list
            local _rank = pseudorandom_element({'J', 'Q', 'K'}, pseudoseed('never_punished'))
            --picks a random suit from the list 
            local _suit = pseudorandom_element({'S','H','D','C'}, pseudoseed('never_punished'))
            --creates the card
            local _card = create_playing_card({
                --sets the rank and suit
                front = G.P_CARDS[_suit..'_'.._rank],
                --sets the enhancement (glass)
                center = G.P_CENTERS.m_glass
                --tells the game to put it in hand
            }, G.hand, false,false,nil)
            --adds the card to your deck
            _card:add_to_deck()
            --i dont remeber what this is for but i think its just a table that tracks your deck or smth
            table.insert(G.playing_cards, _card)
            --set the card to be not visible
            _card.states.visible = nil
            G.E_MANAGER:add_event(Event({
                func = function()
                    --plays the animation to reveal the card
                    _card:start_materialize()
                    return true
                end
            })) 
stark geode
#

do you know how pools work

red flower
#

yes i know how they work somewhat, but no i dont know how to remove a voucher from the pool

stark geode
#

beans

stark geode
elfin stratus
#

why did i make balatro my first lua experience

stark geode
elfin stratus
#
  • being shit at writting code in general
stark geode
#

but also im a python enjoyer

elfin stratus
#

i bought balatro on steam just for this

#

i have 20 hours and 0 achievements lol

stark geode
#

lmao

#

same

#

exept i just hit 100hrs

elfin stratus
#

i should leave a bad review saying the game is too hard tro

wind steppe
#

why does this spawn infinite jimbos

para_youlost_old = Game.update_game_over
Game.update_game_over = function(self, dt)
    para_youlost_old(self, dt)
    if G.PROFILES[G.SETTINGS.profile].pineappledeath and G.GAME.round_resets.ante > G.GAME.win_ante then
        local Jimbo = nil
        G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 2.5,
            blocking = false,
            func = (function()
                if G.OVERLAY_MENU and G.OVERLAY_MENU:get_UIE_by_ID('jimbo_spot') then 
                    Jimbo = Card_Character({x = 0, y = 5})
                    local spot = G.OVERLAY_MENU:get_UIE_by_ID('jimbo_spot')
                    spot.config.object:remove()
                    spot.config.object = Jimbo
                    Jimbo.ui_object_updated = true
                    Jimbo:add_speech_bubble('lq_'..math.random(1,10), nil, {quip = true})
                    Jimbo:say_stuff(5)
                    end
                return true
            end)
        }))
    end
end
elfin stratus
wild escarp
#

lol, code just goes wrong in the right way sometimes

wind steppe
elfin stratus
#

how do i set no enhancement?

sturdy compass
#

m_base

elfin stratus
#

thank you

sturdy compass
#

Wait nvm that's a similar method for editions

#

it's c_base actually

wild escarp
wind steppe
upbeat bronze
#

how would i make it where a single mod folder could load multiple deck skins for different suits with different parameters [some changing just KQJ, some changing Ace, some changing all cards, etc]

hasty mist
#

has smods.font been added to the wiki yet?

#

i cant find it

#

i'm having some issues with it

wind steppe
#

steamodded has a font feature?

frosty rampart
hasty mist
pure salmon
#

if only it were documented or something

wind steppe
pure salmon
#

so true

hasty mist
#

the implementation seems to have changed since i first started using it, so everythings all fucked up

pure salmon
#

oh the new art is crazy good woah

wind steppe
hasty mist
wind steppe
elfin stratus
#

now its time for my favorite part of modding, trying random shit until it works™

#

somehow i just realizing i typed eanana instead of banana

pure salmon
#

eanana

wind steppe
#

eanana

wind steppe
sturdy compass
elfin stratus
#

blame tutorial i followed

wind steppe
pure salmon
#

how do i check if a card has a seal

wind steppe
hasty mist
#

im still using a header 😭

pure salmon
#

i asked a question in the channel where you ask questions what do you want from me

wind steppe
wheat pulsar
#

hi one question
in shop_rate 1 is much rate or minimum rate?

wind steppe
#

idk myself

pure salmon
#

oh lol mb

frosty rampart
wind steppe
pure salmon
#

oh good i was gonna use if card:get_seal()

manic rune
#

me when quantum seals

frosty rampart
hasty mist
#

the fuck did i do

pure salmon
#

please no. please don't tell me quantum seals are a thing

wind steppe
manic rune
hasty mist
#

better

#

letters are a tad blurry though hm

elfin stratus
hasty mist
#

good enough, welcome back old norse runes

elfin stratus
#

F S X F R ∣⨯∣

upbeat bronze
stark geode
#

anyone know how to use this

elfin stratus
#

ima dumbass 😭, the json file wasnt being read because it put it on the balatro folder sdanadslgjbdfg

#

hopefully now

#

it works

#

flawlessly

#

do i keep these colors?

pure salmon
#

ouuhhhhh no

elfin stratus
#

how do i give the mod an icon

#

please

red flower
#

make an atlas with the key modicon

elfin stratus
#

thank you

#

what image size

red flower
#

32x32

pure salmon
#

34x34 with a blank one pixel border

formal island
#

does anyone have an example/solution to replacing joker names with smod?

red flower
#

your joker or other jokers?

hasty mist
#

how would i make an edition like this work on a playing card?

formal island
red flower
#

you can just add the vanilla keys to your localization file

#

like this

formal island
#

ohhh

#

thank you

stoic fulcrum
#
    key = "testfiresr",
    blueprint_compat = false,
    loc_txt = {
        name = 'testm',
        text = {"{C:red}+#1#{} hand size,",
            "Earn {C:money}$#3#{} at",
            "end of round.",
            "If {C:red}bruhio{}",
            "is in your deck,",
            "{C:red}+#2#{} hand size,",
            "Earn {C:money}$#9#{} at",
            "end of round."}
    },
    pos = { x = 0, y = 0 },
    rarity = 2,
    atlas = 'mindatest',
    blueprint_compat = false,
    cost = 6,
    config = { extra = { h_size = 1, dollars = 3, h_sizetest = 2, dollarstest = 9, h_sizereset = 1, dollarsreset = 3 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.h_size, card.ability.extra.dollars, card.ability.extra.h_sizetest, card.ability.extra.dollarstest,  card.ability.extra.h_sizereset, card.ability.extra.dollarsreset  } }
    end,
    calculate = function(self, card, context)
        if context.card_added and table.contains(bruhio, context.card.config.center.key) then
            G.hand:change_size(1)
            card.ability.extra.h_size = card.ability.extra.h_sizetest
            card.ability.extra.dollars = card.ability.extra.dollarstest
            if context.selling_card and not context.blueprint and context.card.config.center.key == "j_bruh_bruhio" then
                G.hand:change_size(-1)
                card.ability.extra.h_size = card.ability.extra.h_sizereset
                card.ability.extra.dollars = card.ability.extra.dollarsreset
            end
        end
    end,
    add_to_deck = function(self, card, from_debuff)
        G.hand:change_size(card.ability.extra.h_size)
    end,
    remove_from_deck = function(self, card, from_debuff)
        G.hand:change_size(-card.ability.extra.h_size)
    end,
    calc_dollar_bonus = function(self, card)
        return card.ability.extra.dollars
    end
}```

hopefully someone can figure out the solution to this ![Prayge](https://cdn.discordapp.com/emojis/869136865201119275.webp?size=128 "Prayge") 
currently the "bruhio" buff works only if "bruhio" is bought second, but not if "bruhio" is already owned. when "bruhio" is sold, the conditional to reduce the buffs back to normal doesn't get applied (debuffing itself already works, it just doesn't have a proper conditional)
it's meant to be +1 hand size $3 at the end of round at base, and +2 hand size $9 at the end of round when buffed
golden lake
#

dynamically changing

elfin stratus
wind steppe
#

does anyone know why my hook doesn't work? it crashes if i lose post ante 8 to the pineapple

para_youlost_old = Game.update_game_over
Game.update_game_over = function(self, dt)
    if not G.STATE_COMPLETE then
        para_youlost_old(self, dt)
        if G.PROFILES[G.SETTINGS.profile].pineappledeath and G.GAME.round_resets.ante > G.GAME.win_ante then
            local Jimbo = nil
            G.E_MANAGER:add_event(Event({
                trigger = 'after',
                delay = 2.5,
                blocking = false,
                func = (function()
                    if G.OVERLAY_MENU and G.OVERLAY_MENU:get_UIE_by_ID('jimbo_spot') then 
                        Jimbo = Card_Character({x = 0, y = 5})
                        local spot = G.OVERLAY_MENU:get_UIE_by_ID('jimbo_spot')
                        spot.config.object:remove()
                        spot.config.object = Jimbo
                        Jimbo.ui_object_updated = true
                        Jimbo.para_jimbotalk_old(Jimbo, 'pineapple', nil, {quip = true})
                        Jimbo:say_stuff(5)
                        end
                    return true
                end)
            }))
        end
        G.STATE_COMPLETE = true
        G.PROFILES[G.SETTINGS.profile].pineappledeath = false
    end
end
bold dust
#

what determines the checkered decks two suits? im looking at vs code, but theres nothing that would signify it. if anyone could help explain how it works, let me know

stark geode
#

so let me get this straight, smods has no function for creating playing cards

hasty canopy
#

does someone know why this deck dont work? i am new here, i am trying to make a deck with only negative joker,

stark geode
#

but has one for removing things from pools

elfin stratus
#

can i read the cards i currently have in hand?

red flower
wind steppe
wind steppe
#

thats stupid

red flower
#

it kinda does

#

but it doesnt do the rest of the logic to add them to deck

bold dust
red flower
#

anyway

#

im doing it rn

stark geode
wind steppe
hasty canopy
#
    name = "Negative Deck",
    key = "negative_deck",
    pos = {x = 1, y = 3},
    config = {cry_negative_rate = 100},
    unlocked = true,
    loc_txt = {
        name ="Negative Deck",
        text={
            "All jokers are",
            "{C:attention}Negative{}",
        },
    },
    apply = function(self)
        G.GAME.modifiers.cry_negative_rate = self.config.cry_negative_rate
    end,

    init = function(self)
        SMODS.Edition:take_ownership("negative", {
            get_weight = function(self)
                return self.weight * (G.GAME.modifiers.cry_negative_rate or 1)
            end,
        }, true)
    end,
}
wind steppe
#

its meant to be looked at only

stark geode
#

You are better then i

hasty canopy
bold dust
wind steppe
stark geode
#

i was about to say

hasty canopy
#

i tried to copy to understand how things works

bold dust
wind steppe
wind steppe
wind steppe
hasty canopy
#

but i changed the get_weight of the negative to 100 too and didnt work as well

wind steppe
bold dust
hasty canopy
bold dust
#

alr, let me try

hasty canopy
wind steppe
#

theres probably an edition rate somewhere but im kinda busy trying to fix my joker

hasty canopy
#

okok, thank u for ur time

analog spoke
#

how do u remove the shadow from a joker? Like glass joker does?

red flower
#

card.no_shadow

wind steppe
#

wait actually i know what you should do

#

take ownership of negative and modify the weight based on the deck

analog spoke
# red flower card.no_shadow

I'm still a little confused lol 😭 like, do I just put this up with the atlas stuff as "card.no_shadow = true" or do I need to make a function of some kind? 😭

red flower
#

idk if there's a way to do it in the definition honestly

#

but setting no_shadow to true works so you might need to do it in set_ability

#

but maybe theres a better way

analog spoke
#

I was hoping this'd be more simple lol, I'm too tired for this jfdgknjh lmao, I really gotta deal with this issue my brains been having lately lol nfhdb can't find the energy for nothing as of late lol fdjkgdfn

wind steppe
#
para_jimbotalk_old = Card_Character.add_speech_bubble
Card_Character.add_speech_bubble = function(self, arg1, arg2, arg3)
    if G.PROFILES[G.SETTINGS.profile].pineappledeath then
        para_jimbotalk_old(self, 'pineapple', nil, {quip = true})
    else
        para_jimbotalk_old(self, arg1, arg2, arg3)
    end
end

why doesn't my hook work?

#

if i lose pre-ante 8 it still doesn't show the right jimbo quip

bold dust
#

trying to learn three things with 0 experience

how to change the suits of checkered deck to be diamonds and clubs
how to change the name of checkered deck
how to change the texture of checkered deck back

if anyone can help, wether it be directly telling me or sending me to a source lmk

wind steppe
wild escarp
#

I swear to god
this god damned mod
Is going to be
The death of me

wind steppe
#

that sucks

rustic swallow
#

anyone know why this is happening?

bold dust
wind steppe
#

*fauly

manic rune
#

fauly

#

they dont have talisman though, it sếm

rustic swallow
#

i dont have talisman on though

wind steppe
#

idk how to fix it without uninstalling talisman though

manic rune
#

seems

#

sjsnsn

wind steppe
#

oh

#

okay nvm then

#

ive only ever seen that error with talisman

manic rune
#

when does the crash happen

rustic swallow
manic rune
#

mm

#

how does your config extra look like

wind steppe
rustic swallow
normal crest
manic rune
#

seems like its all numbers tho

#

have u tried making a new joker, in case card.ability.extra.(x) is still a table?

#

wait

#

OHHH

normal crest
#

They're returning a list of one number

manic rune
#

remove {}

#

god damn i overlooked that

rustic swallow
#

yeah that worked

#

thx

wind steppe
#
para_jimbotalk_old = Card_Character.add_speech_bubble
Card_Character.add_speech_bubble = function(self, arg1, arg2, arg3)
    if G.PROFILES[G.SETTINGS.profile].pineappledeath then
        para_jimbotalk_old(self, 'pineapple', nil, {quip = true})
    else
        para_jimbotalk_old(self, arg1, arg2, arg3)
    end
end

why doesn't my hook work? the quip never shows up

manic rune
#

too used to return {} i just overlooked that 🥀

#

im so washed now

wind steppe
#

i think its the condition but idk why the condition is never true

bold dust
wind steppe
#

it gets set to true

bold dust
wind steppe
manic rune
#

also, make sure the func doesn't need to return anything just in case

bold dust
bold dust
#

okay

wind steppe
manic rune
#

keep self in para_jimbotalk_old

wind steppe
#

because there is no self

manic rune
#

huh

#

maybe thats bcz i hook differently

bold dust
#

inserted this:

manic rune
#

i usually use function Card_Character.add_speech_bubble(arg1,arg2,arg3) instead

bold dust
#

SMODS.Back.take_ownership('Checkered Deck', -- object key (class prefix not required)
{ -- table of properties to change from the existing object
cost = 5,
calculate = function(self, card, context)
-- more on this later
end
},
true -- silent | suppresses mod badge
)

wind steppe
# bold dust i hate to ask, but do you know how i might be able to add that properly?
SMODS.Back:take_ownership('wtf is the checkered deck key you find that', -- object key (class prefix not required)
    { -- table of properties to change from the existing object
        apply = function(self, back)
          G.E_MANAGER:add_event(Event({
            func = function()
                for k, v in pairs(G.playing_cards) do
                    if v.base.suit == 'Spades' then
                        v:change_suit('Clubs')
                    end
                    if v.base.suit == 'Hearts' then
                        v:change_suit('Diamonds')
                    end
                end
                return true
            end
          }))
        end
    },
    true -- silent | suppresses mod badge
)
bold dust
#

thank you! so the part right after take ownership is just a name to help organize it right?

wind steppe
#

idk what it is

#

and put that there

bold dust
#

wouldnt it be b_checkered?

wind steppe
#

idk

#

try it and see

bold dust
#

fair

sage crater
#

bump

bold dust
#

or vise versa

wind steppe
red flower
bold dust
wind steppe
bold dust
#

uh yeah

wild escarp
#

I am right on the brink of finishing this joker, but hologram only increments up once, instead of once for each new card added to the deck from this joker.

calculate = function(self, card, context)
    if context.before and context.main_eval then
        local new_cards = {}
        for i = 1, 2 do
            for k, v in ipairs(context.scoring_hand) do
                if v.seal or v.edition or next(SMODS.get_enhancements(v)) then
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            G.playing_card = (G.playing_card and G.playing_card + 1) or 1
                            local copy_card = copy_card(v, nil, nil, G.playing_card)
                            copy_card:add_to_deck()
                            G.deck.config.card_limit = G.deck.config.card_limit + 1
                            table.insert(G.playing_cards, copy_card)
                            G.hand:emplace(copy_card)
                            copy_card.states.visible = nil
                            copy_card:start_materialize()
                            new_cards[#new_cards + 1] = copy_card
                            return true
                        end
                    }))
                end
            end
        end
        SMODS.calculate_context({ playing_card_added = true, cards = { new_cards } })
        return {
            message = localize('k_copied_ex'),
            colour = G.C.CHIPS
        }
    end
    if context.destroy_card and context.cardarea == G.play and 
    (context.destroy_card.seal or context.destroy_card.edition or next(SMODS.get_enhancements(context.destroy_card))) then
        return {
            remove = true
        }
    end
end
wind steppe
wild escarp
#

Already tried that, but then hologram shows text for each increment, instead of just doing text for the final count.

wind steppe
wind steppe
wild escarp
#

Yeah, but I don't like how it looks.

wind steppe
#

you could try taking ownership of hologram?

#

idk what you'd change though

#

considering the for loop's hardcoded: before the loop runs set a variable so that hologram doesn't show text and on the final loop reset that

rapid stag
#

is the steamodded github page imploding for anyone else?

wind steppe
#

wdym by that

red flower
#

you need to do cards = new_cards but you need to create the cards outside the event

wind steppe
#

oh more people are here

#
para_jimbotalk_old = Card_Character.add_speech_bubble
Card_Character.add_speech_bubble = function(self, arg1, arg2, arg3)
    if G.PROFILES[G.SETTINGS.profile].pineappledeath then
        para_jimbotalk_old(self, 'pineapple', nil, {quip = true})
    else
        para_jimbotalk_old(self, arg1, arg2, arg3)
    end
end

why doesn't my hook work? the quip never shows up

red flower
bold dust
#

i reset everything, so nothing is edited as of this moment

wind steppe
#

where is your mod

#

all i see is deck creator with no main.lua in sight

#

or any steamodded mod stuff frankly

wild escarp
bold dust
wind steppe
#

reinstall balatro, steamodded, and lovely

bold dust
#

aye, thank you

red flower
# wild escarp Sorry, I really don't what I'm supposed to do.

try this

calculate = function(self, card, context)
    if context.before and context.main_eval then
        local new_cards = {}
        for i = 1, 2 do
            for k, v in ipairs(context.scoring_hand) do
                if v.seal or v.edition or next(SMODS.get_enhancements(v)) then
                    G.playing_card = (G.playing_card and G.playing_card + 1) or 1
                    local copy_card = copy_card(v, nil, nil, G.playing_card)
                    copy_card:add_to_deck()
                    G.deck.config.card_limit = G.deck.config.card_limit + 1
                    table.insert(G.playing_cards, copy_card)
                    
                    copy_card.states.visible = nil
                    new_cards[#new_cards + 1] = copy_card
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            G.hand:emplace(copy_card)
                          copy_card:start_materialize()
                            return true
                        end
                    }))
                end
            end
        end
        SMODS.calculate_context({ playing_card_added = true, cards = { new_cards } })
        return {
            message = localize('k_copied_ex'),
            colour = G.C.CHIPS
        }
    end
    if context.destroy_card and context.cardarea == G.play and 
    (context.destroy_card.seal or context.destroy_card.edition or next(SMODS.get_enhancements(context.destroy_card))) then
        return {
            remove = true
        }
    end
end
wild escarp
red flower
#

oh yeah forgot about that
im glad it worked

tall jewel
#

tweening api + card movement api + custom button api

#

hehehe

#

not sure how to render a specific card on top of others but

#

(if anyone knows id be thankful c:)

tall jewel
wind steppe
#

why is condition a never true when line b specifically sets it to true

vestal yew
#

for some reason my mod wont load in the second joker, how do i fix that?

wind steppe
vestal yew
#

im trying to make it so if a King is held in hand it gains xMult and gets destroyed

wind steppe
#

zoom out

vestal yew
wind steppe
#

place a second end (indented one less time than the first) after the end for calculate

#

indent after the else in calculate, then deindent and place an end after remove = true

#

and the bracket at the end of the return that returns the debuffed message needs to be indented one more time

#

also remove the very last indent

vestal yew
#

so like that?

wind steppe
vestal yew
wind steppe
#

also remove the end in white

vestal yew
#

do the indents make that much of a difference?

wind steppe
#

yes

#

at least i think so

#

the ends i know matter

#

regardless its good practice to indent properly

vestal yew
#

the joker's still not loading in

wind steppe
vestal yew
#

yeah

wind steppe
#

send me the whole folder

vestal yew
wind steppe
#

do you have talisman

vestal yew
#

yeah why

#

it loads my first joker in fine without talisman

wind steppe
#

remove the number_format bits

#

also you should be returning xmult in joker_main

#

not xmult_mod

vestal yew
wind steppe
vestal yew
#

like i said, it loaded the first one fine with it

wind steppe
#

look idk either but something has to be stopping it and i know you dont need number_format

vestal yew
#

thats not whats stopping it though

stoic fulcrum
#

this is so hacky but it actually works KEKA
finally no more infinite hand size
now i need to figure out how to apply the damn debuff

wind steppe
#

maybe someone else can help you

rapid stag
#

i'm derping out, how can i use string.sub to get the first 6 characters of a string cirDerp

wind steppe
#

why is condition a never true when line b specifically sets it to true

rapid stag
# wind steppe wdym by that

for me, it's just been sitting on this for hours, even after i refresh it or open in a new tab. it's just this and only this

#

does not load

wind steppe
#

huh

#

weird

signal rose
#

working fine for me rn

rapid stag
#

meh, maybe it's client funkiness, i'll see what it's like tomorrow. but every other repo i've looked at has been fine, just steamodded

thorn furnace
#

A bit of a weird request but uh
Is there a way to retrigger specifically seals?
Like if I wanted to retrigger the red seal or the blue seal
Or does it have to be indirect by just recreating the effect

snow vale
#

how can i know how many discards did i make in a round?

daring fern
frigid blaze
#

Can you tell me to paint joker should use 3 x 3 px brush in aseprite?

umbral zodiac
#

sighs extremely loud

snow vale
#

yours is better 😭

umbral zodiac
#

the difference between you and i is the fact that im dedicating way too much of my time to the dumbest idea ive been submitted so far

#

i have a whole list of things to do and the first one i do is "put minesweeper in a joker(????)"

snow vale
umbral zodiac
#

you got this

#

honestly this is not so complicated its just a lot of seperate moving parts

snow vale
#

i had the idea of making an orb of corruption that corrupted the joker to the left, but for that i would have needed to make a new edition, and i wasnt going thru allat just yet...

stoic fulcrum
#

has anyone had an issue where blueprint doesn't work properly with a joker
instead of both blueprint and the joker activating, instead blueprint activates first and the actual joker does nothing

#

i thought the issue was blueprint_compat being in the code but it seems whether i set it to true or i remove the line it doesn't matter

snow vale
#

ts aint working 😔

umbral zodiac
snow vale
#

it doesnt crash

umbral zodiac
#

you are checking the amount of times they have discarded but not the amount of cards right

#

or is that unintentional

snow vale
#

o

#

so um

#

how do i do that..?

umbral zodiac
#

i dont believe there is a variable for it
you might have to just count it yourself

daring fern
snow vale
#

that didnt work

#

or wait

umbral zodiac
#

try adding one to a counter whenever context.discard is truthy and resetting at end of round

snow vale
umbral zodiac
#

oh ok nice

stoic fulcrum
#
    key = "damndudesr",
        loc_txt = {
        name = 'testdrdn',
        text = {"{C:red}x4{} Mult if",
            "played hand contains a",
            "{C:red}King of Hearts{} and",
            "a {C:red}Queen of Hearts.{}",
            "If {C:red}bruhio{}",
            "is in your deck,",
            "{C:red}x8{} Mult instead,"}
    },
    rarity = 2,
    cost = 6,
    pos = { x = 0, y = 0 },
    config = { extra = { Xmult = 4, Xmulttest = 8, Xmultreset = 4 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.Xmult } }
    end,
    calculate = function(self, card, context)
            if next(SMODS.find_card("j_srio_bruhiosr")) and next(SMODS.find_card("j_srio_damndudesr")) and not context.blueprint then
                card.ability.extra.Xmult = card.ability.extra.Xmulttest
            end
            if not next(SMODS.find_card("j_srio_bruhiosr")) and next(SMODS.find_card("j_srio_damndudesr")) and not context.blueprint and card.ability.extra.Xmult == 8 then
                card.ability.extra.Xmult = card.ability.extra.Xmultreset
            end
         if context.individual and context.cardarea == G.play then
              for i = 1, #context.scoring_hand do
                  if context.other_card:get_id() == 12 and context.other_card:is_suit("Hearts") then
                        card.ability.extra.kings = true
                  elseif context.other_card:get_id() == 13 and context.other_card:is_suit("Hearts") then
                        card.ability.extra.queens = true
                  end
              end
         end
            if context.joker_main and card.ability.extra.kings == true and card.ability.extra.queens == true then
              card.ability.extra.kings = false
               card.ability.extra.queens = false
            return {
            Xmult = card.ability.extra.Xmult
          }
    end
  end
}```

this joker works as intended, except that blueprint and brainstorm don't work properly with it
i tried removing blueprint_compat = true and readding it but regardless of whether i do or not it's the same thing
is there something else i need to add or remove for blueprint to work properly?
scarlet imp
#

the conditions all contain "not context.blueprint" that might be messing it up

stoic fulcrum
#

hopefully removing them won't make blueprint do wacky stuff

#

let's try

stoic rapids
#

Hii

scarlet imp
stoic rapids
#

yeah

#

im trying to do a deck skin mod

stoic fulcrum
stoic rapids
#

and i have doubts about where to make the pngs of the cards

#

if someone could recommend me something about that🍞

scarlet imp
stoic rapids
#

thankss

#

im going to see it

scarlet imp
#

also bro's playing Silksong?????

stoic rapids
#

sjkjksksj

scarlet imp
#

get me a copy of that bro

umbral zodiac
#

incredible power

#

wait waAIT WAIT THIS REMINDS ME OF SOMETHING

scarlet imp
#

a god amongst men

umbral zodiac
stoic rapids
#

confidential bro...

stoic rapids
umbral zodiac
#

my mod is a cryptid addon dont complain about balance

#

membership card is worse

stoic rapids
#

thats crazy

scarlet imp
#

comedy gold joker

umbral zodiac
#

when silksong releases (???) im going to significantly buff hornet because it'd be funny

scarlet imp
#

has it really been 2290 days or is that just a goated joke

umbral zodiac
#

slightly more, but it rounds the number down due to significant figures i guess

#

not exactly 2290 but between 2290 and 2299

stoic rapids
#

i bet everything on red that they announce a date in the summer game fest

scarlet imp
#

according to the nintendo direct for the switch 2 it has a 2025 release year

umbral zodiac
#

mmmnm,,, i heavily regret promising tauic versions of every single vanilla joker

scarlet imp
#

but yeah I bet it will have a realease date announced

stoic rapids
umbral zodiac
#

it updates by itself

scarlet imp
umbral zodiac
signal rose
umbral zodiac
#

since it happens to check every time it runs and every time the loc vars update

stoic rapids
#

it looks great

umbral zodiac
scarlet imp
#

I might get it just for the improved >= and the arrows

umbral zodiac
#

i've been using this font for just over 2y

#

genuinely can't imagine not using it at this point

stoic rapids
#

i will try

scarlet imp
stoic rapids
#

i like it

scarlet imp
#

iykyk

umbral zodiac
signal rose
scarlet imp
#

Uhmm actually, its Dead God but 3 times

#

and because I love this game

umbral zodiac
#

i literally have 115 jokers in the tauic set left to make
i should probably update my deadline

scarlet imp
shell timber
#

115??

umbral zodiac
#

im going to deliver on that promise

shell timber
#

ah.

#

good luck!!

umbral zodiac
#

i think im going to get raptured by myself

#

thankjfully some of them were combined like even steven & odd todd, or all of the xmult hand types

signal rose
thorn flame
#

how would i count seconds spent in the ante?

umbral zodiac
#

hook update and count deltatime

scarlet imp
signal rose
#

ah right okay fair enough, im just misremembering it

scarlet imp
umbral zodiac
#

oops wrong ss

thorn flame
#

Is game.update for the ante or

#

Something else

umbral zodiac
#

just set it to 0 at the start of the ante, by any other means

#

update runs every frame

thorn flame
#

I can count just fine i just dont know what the thing is for the start of the ante

#

ill see about it

stoic rapids
#

awesome

umbral zodiac
#

you know im not sure what i did but i'm pretty damn sure there is not 8 mines there

scarlet imp
umbral zodiac
#

i genuinely have a 3 sentence apology at the top of the file

scarlet imp
#

I mean yeah

#

bro reprogrammed minesweeper for a damn joker

#

YO THAT GIVES ME AN INSANE IDEA

#

someone needs to make Doom on a Balatro Joker

scarlet imp
umbral zodiac
#

most of the code isnt even in the joker lol

#

there isn't a single thing in its calculate function

#

i might even keep it that way - mostly its just ability consumables that interact with the data stored on the joker rather than actually being the joker itself

scarlet imp
#

can someone link the patching API documentation

umbral zodiac
#

there cannot physically be 4 mines around the 4 in the top right unless its counting the center spot which it shouldn't be
also there are multiple nonsensical zeros

daring fern
thorn flame
umbral zodiac
#

strange

#

! i might be done with minesweeper in balatro (assuming i add the movement cards and the win/loss conditions)

scarlet imp
#

do I have this patch written correctly? when the card saves me in-game, the message during cashout is just "ERROR"

[[patches]]
[patches.pattern]
target = "en-us.lua"
pattern = '''ph_mr_bones="Saved by Mr. Bones",'''
position = "after"
payload = '''
ph_1up="Saved by 1 Up",
'''
match_indent = true
times = 1
#

is it because the patch is applied to one of the localization files?

daring fern
#

You can just put that in your own localization.

scarlet imp
#

that's where the mr bones message is contained

daring fern
sturdy compass
scarlet imp
#

alright it worked perfectly, thanks

faint yacht
#

Feeling like I'm doing this wrong to make the additional "scoring" more consistent in terms of timing and trying to have them execute before "held in hand" abilities go off...

shut crater
umbral zodiac
#

yea the issue was it was double counting x-1, y+1 relative to each bomb, and not counting x-1, y at all

#

i just forgot to change the y+1 to y

scarlet imp
#

classic Ctrl-C Ctrl-V bug

shut crater
#

So no nested -1 to 1 for loop? 😔

umbral zodiac
#

unfortunately no

#

as much as i am not that bad at it
this is the first time ive used lua for a project before and as such i really dont like using for loops for things that isnt like. looping over a table

#

still adjusting to indexing by one

shut crater
#

Valid, I only joke cause my students literally just did their final project on implementing minesweeper in Python

umbral zodiac
#

oh lmao

umbral zodiac
scarlet imp
shut crater
#

Solid, that would be a fun one too

#

Might use that one for AP CS A

#

For 2d arrays

scarlet imp
#

Connect 4 is far simpler

umbral zodiac
#

ay i just finished ap csa

scarlet imp
#

I think it is anyway

shut crater
#

Checking the win state would be more complex, no?

#

Unless you provide a good amount of detail in your instructions

scarlet imp
#

I still have the assignment, let me look at it

#

entire file (including computer player) is only 327 lines

#

granted the computer is really dumb but still

#
def checkWinner(board, playerNumber): 
    # Gets the player whose piece we need to check for
    piece = getPlayerPiece(playerNumber)

    # Check for any horizontal sequences
    for row in range(0, len(board)):
        for column in range(0, len(board[0]) - 3):
            if (board[row][column] == piece) and (board[row][(column+1)] == piece) and (board[row][(column+2)] == piece) and (board[row][(column+3)] == piece):
                return True

    # Check for any vertical sequences
    for row in range(0,((len(board)) - 3)):
        for column in range(0,(len(board[0]))):
            if (board[row][column] == piece) and (board[(row + 1)][column] == piece) and (board[(row + 2)][column] == piece) and (board[(row + 3)][column] == piece):
                return True

    # Check for any positively sloped sequences
    for row in range(0,((len(board)) - 3)):
        for column in range(0,((len(board[0])) - 3)):
            if (board[row][column] == piece) and (board[(row + 1)][(column - 1)] == piece) and (board[(row + 2)][(column - 2)] == piece) and (board[(row + 3)][(column - 3)] == piece):
                return True

    # Check for any negatively sloped sequences
    for row in range(0,((len(board)) - 3)):
        for column in range(0,((len(board[0])) - 3)):
            if (board[row][column] == piece) and (board[(row + 1)][(column + 1)] == piece) and (board[(row + 2)][(column + 2)] == piece) and (board[(row + 3)][(column + 3)] == piece):
                return True

    return False

win condition function

shut crater
#

Do they have to implement that or is it provided? Cause if they have to implement it then honestly I think minesweeper is easier. Granted, I provide a ui.py file and they just have to write the backend.

faint yacht
scarlet imp
faint yacht
#

I was curious when I was initially prototyping them... just wanting to refine their effect to be more consistent now, as they "currently" score cards as their joker_main effect.

scarlet imp
#

maybe try switching it to something like final_scoring_step. Earlier I was experimenting with a joker that applies the Plasma Deck's balancing effect, and it seems that jokers that use the same context as Plasma:
context.final_scoring_step
apply their effects before the Plasma Deck's effect is applied

#

probably won't work, but just an observation I made while testing

faint yacht
#

Space Cadet's random rescoring of the scoring cards works as intended, more or less, it's just Rover that I need to get working so that it scores the deck before "held in hand" abilities kick in.

scarlet imp
#

does anyone know how to get the UI boxes that pop up next to certain things to appear? like foil, negative, red seal, eternal all add UI elements next to the description of what they're applied to

faint yacht
#

Tooltips, you mean?

scarlet imp
#

yes, thank you

gusty iron
#

would this joker be feasable to make?

Do side-quests.
For every 5 side-quests, make a negative tarot card.
For every 10 side-quests, make a negative planet card
For every 15 side quests, make a negative spectral card
For every 20 side-quests, spawn a negative legendary

solid mesa
gusty iron
#

so at 10, you'd get both the 5 and 10 reward

solid mesa
#

sounds cool, what type of quest you have in mind?

gusty iron
#

im thinking of having 4 different tiers/difficulty

#

and the harder the quest, the more it'll count as

#

so a tier 4 quest could be:

#

"One-shot a blind using a high-card."

solid mesa
#

the hard the quest the bigger the reward

gusty iron
#

yuh

#

ill be taking side-quest ideas btw!!

solid mesa
#

sound cool man, like "play "two pair" three times"

cerulean bane
#

maybe "score (2x? 3x? 5x?) the blind requirement"?

scarlet imp
gusty iron
#

i wont be able to add any variable for now

solid mesa
sturdy compass
#

Ah hell yeah another "side-quest system in their mod" haver

gusty iron
solid mesa
#

your jokers seems more like a "pasive", why dont add it like a deck?

burnt cairn
#

they hate me

gusty iron
sturdy compass
gusty iron
#

i currently only have 2 passive jokers

burnt cairn
#

we love pikuniku in this household

sturdy compass
#

Pikuniku more like Peakuniko

solid mesa
solid mesa
gusty iron
primal terrace
burnt cairn
#

happylandeline !!

sturdy compass
#

That man is shady

#

He is up to no good

#

He does not do as he says DaluxBlobRaisedEyebrow

burnt cairn
#

hey

#

the money is free

solid mesa
sturdy compass
gusty iron
burnt cairn
#

i dont see how thats relevant to the free money

sturdy compass
gusty iron
#

heres my current list of quests

#
local quests = {
    ["Easy"] = {
        "Play a Flush",
        "Play a Pair",
        "Discard exactly 2 cards",
        "Play a hand with all 4 suits"
    },
    ["Medium"] = {
        "Spend $50",
        "Play a Full House",
        "Play a hand with all even-numbered cards",
        "Trigger a Joker effect 3 times in one blind"
    },
    ["Hard"] = {
        "Score 5x blind requirement",
        "Play a Straight Flush",
        "Play a hand with 5 different ranks",
        "Have all of your Joker, and Consumable slots full"
    },
    ["Insane"] = {
        "One-shot a blind using a High Card",
        "Play a Five of a Kind",
        "Play a hand made entirely of face cards",
        "Reroll the shop 10 times in 1 sitting"
    }
}
sturdy compass
#

What are the payoffs?

burnt cairn
#

i disagree with a few of these categorisations

daring fern
burnt cairn
#

playing a hand full of face cards is objectively easier than a straight flush

#

even without the 1 face card cheese

solid mesa
#
"play a hand made entirely with face card”

thats easy ngl

gusty iron
#

wait

#

wtf

#

why is that in insane

#

i swore i put that in easy

burnt cairn
#

and if you gear your build the right way you can oneshot most blinds with a high card

gusty iron
#

ill probably make it a boss blind then

#

or a finisher blind if im feeling evil

burnt cairn
solid mesa
#

the cards may have count to the quest?

scarlet imp
#

I'd argue a five of a kind is significantly easier to play than a straight flush

burnt cairn
#

yeah

#

straight flushes are definitely the hardest hand to play

gusty iron
#

ill probably swap those 2 then

burnt cairn
#

like no amount of deck rigging makes them entirely consistent

scarlet imp
#

exactly

#

flush house kinda has the same problem but less

gusty iron
#

just 5 cards

solid mesa
#

Sorry if I expressed myself badly, do the cards have to score in the hand to be valid for the quest?

gusty iron
#

but always assume scored

gaunt thistle
burnt cairn
gusty iron
#

someone give me another challenge to put in insane

solid mesa
#

why you dont add something like

play a family: 1King, 1Queen, 1Jack
sturdy compass
scarlet imp
burnt cairn
#

sell 3 jokers mid blind nom

scarlet imp
#

wait you have that already mb

solid mesa
gusty iron
stoic fulcrum
#

i want the +Mult value to only increase when a joker in a specific table is in hand, how would i go about adding a check for that specific joker table?
(this is just abstract joker)

burnt cairn
#

cause this would be a good thing

scarlet imp
solid mesa
gaunt thistle
burnt cairn
scarlet imp
burnt cairn
#

wait

scarlet imp
#

so like a Spade flush against the Goad has 5 debuffed cards

burnt cairn
#

yeah no i mixed up debuffed and non scoring mb

solid mesa
#

@gusty iron what about "have 0 cards left in deck"

gusty iron
#

ill put that in medium

solid mesa
sturdy compass
scarlet imp
cinder cliff
#

How would I send two unique messages from one return function? I have this to make my dog joker card woof, but I also want it to say something else

gusty iron
#

okay i think i have a good list

#

now

#

my only issue

#

is keeping track of which challenge is active

solid mesa
gusty iron
#

i can probably do it via variable in the joker

daring fern
burnt cairn
cinder cliff
solid mesa
#

its not that hard, even in vanilla

burnt cairn
#

fair

#

cross mod balancing seems like a fruitless endevour though

daring fern
solid mesa
#

thats the point, why you need balance?

scarlet imp
#

facts

burnt cairn
cinder cliff
solid mesa
#

but taking is seriously, you cant balance between mods

#

its a task with no end

daring fern
burnt cairn
#

is there a context function for when a card appears in the shop

daring fern
# cinder cliff wdym?

{message = "message1", extra = {message = "message2", extra = {message = "message3"}}}?

cinder cliff
daring fern
solid mesa
cinder cliff
uncut cloud
#

alright, im getting tired, its 4 am and i decided around 20 minutes ago as a little venture to go and try to fix the problems my mod has with talisman, but im unable to find any comparations that i havent replaced with to_big here so idk what to do to fix this one

gusty iron
solid mesa
#

what is the soul, the legendary joker?

burnt cairn
#

soul is the spectral card that spawns legendaries yeah

gusty iron
#

is there a context for re-rolling the shop

stoic fulcrum
#

what's the G.hand:change_size equivalent for discards?

faint yacht
#

context.reroll_shop

gusty iron
#

and is there a context for exiting the shop?

faint yacht
#

context.ending_shop

faint yacht
stoic fulcrum
#

also

#

if i had a nickel for every time i found a srb2kart/ring racers modder modding balatro

faint yacht
#

I'm not an active modder of SRB2, Kart or RR anymore, tbh.

#

ease_discard(amount)

#

-# Especially when it comes to just SRB2 itself, I'm pretty much a one-trick pony with Windows.

gusty iron
#

how do i check the name of the hand playing?

faint yacht
#

context.scoring_name

humble pawn
#

Anyone know why my custom joker art is so much dimmer in game than the original image?

scarlet imp
faint yacht
#

Are you intending to point it to a "center" or just have custom text shown?

scarlet imp
#

just custom text

#

I just a patch to inject my own edition into game.lua and referenced it, but got the error

#

that said I think the statement is written wrong here, since even referencing the lucky card one for example doesn't work

daring fern
faint yacht
#

If you want just custom text that's not a "center", do info_queue[#info_queue + 1] = {key = "prefix_key", set = 'Other'}... then point to your custom text stuff in the localization file.

scarlet imp
#

the way it works isn't quite the same as other editions and I don't want it being applied to just anything like Foil or Holographic can be

hard mica
#

Any way of having a gif as a jokers sprite?

daring fern
hard mica
faint yacht
burnt cairn
#

is there a list of all contexts?

stoic fulcrum
#

is it possible to use SMODS.find_card with a table?

daring fern
burnt cairn
faint yacht
vale glen
# burnt cairn is there a list of all contexts?

You can search for SMODS.calculate_context in your lovely/dump folder, then make note of which context are called where, and what parameters are passed into them. Using Lovely patches and calling that function yourself can let you make your own contexts, too.

burnt cairn
#

what im trying to do is make the joker free whenever context.thisjokerappearsintheshop happens, does that context exist

#

or is there a better way of bypassing the apparent price floor

maiden phoenix
#

Hook Card:set_cost()

solid mesa
burnt cairn
#

(the price is set to 0 in the file and its just setting it to 1 anyway)

burnt cairn
maiden phoenix
#

Its because of the set_cost func

solid mesa
scarlet imp
#

just set the cost to 0

solid mesa
burnt cairn
scarlet imp
#

trying to make a joker that randomly selects a scored card to retrigger

if context.repetition and context.cardarea == G.play then
            local _randomcard = context.scoring_hand[math.random(1, #context.scoring_hand)]
            for i = 1, #context.scoring_hand do
                if _randomcard == context.scoring_hand[i] then
                    return {
                        repetitions = 1
                    }
                end
            end
        end

but it retriggers every scored card

vale glen
#

Not sure how retriggers work, but why not use pseudorandom_element for choosing a card?

faint yacht
#
if context.before then
  -- Select one before anything happens.
  card.ability.extra.targetcard = pseudorandom_element(context.scoring_hand, pseudoseed('rngseed'))
end

if context.cardarea == G.play and context.repetition and not context.repetition_only then
  if context.other_card == card.ability.extra.targetcard then
    -- we pass the check for the earlier randomly chosen card, repeat!
  end
end

if context.after then card.ability.extra.targetcard = nil end -- cleanup.
#

-# some stuff may be wrong, have not yet had any breakfast.

vale glen
#

Mmh, that seems cleaner

ashen ermine
#

Hi, new to modding, why is the game crashing on load here and how can I fix it?
main.lua :
require "neuro_socket"

ashen ermine
#

no just the bit that errors

wintry solar
#

Use SMODS.load_file

timid star
#

it's hard to align these, there's some sort of distortion for the positions, i wonder what offsets these position values

timid star
solid mesa
#

thanks

half aspen
#

i want to make a joker that creates a soul card when sold; how can I do this? thanks

faint yacht
#

SMODS.add_card{key = 'c_soul'} if context.selling_self.

burnt cairn
#

im not familiar with hooks nom

daring fern
timid star
#

how would i force this selected card to be always highlighted

burnt cairn
#

thanks 🫡

burnt cairn
faint yacht
#

Outside entirely.

burnt cairn
#

ah nom

thorn furnace
#

How would I go about decreasing the hand size a certain amount for one round

#

🙏

daring fern
thorn furnace
#

okii
which context thingy triggers at the end of the round

daring fern
thorn furnace
#

thank u :3

stoic fulcrum
#

trying to see if there's a better way of implementing this without it stacking infinitely
the super hacky way i did this was to set the value to a variable value, then set that variable value to 0
this works fine if only two jokers are involved (and if i'm not doing discards, trying to do discards works at the cost of your ears), but if i want to implement three or more then i'd have to make hundreds of if statements to call for every possible combination jermaPluto

#

i'm basically trying to replicate abstract joker's effects with specific jokers in hand instead of any joker

daring fern
daring fern
# stoic fulcrum correct

Wouldn't it be card.ability.extra.chips = numberofchipsforeach * (#SMODS.find_card("j_modprefix_key") + #SMODS.find_card("j_modprefix_key2"))?

stoic fulcrum
#

lemme try that SprigNoted

#

you're an actual legend
thanks much Prayge

#

i'll just have to scrap my +discard idea because it's bad and a pain to code, i'll just do something else lmao

agile dew
#

is this card both negative and foil???

#

did i do somethign wrong?

#

and somehow it doesnt increase the joker slot count?

hushed field
agile dew
#

kinda like stardust, always make it show up negative

thorn furnace
#

What's the context thing I would need for a Joker to trigger after the cards have finished dealing

As in like
Before you select your cards but after the cards are finished drawing

#

I know there's context.first_hand_drawn

thorn furnace
#

o it's literally just that? huh

#

thanks

gusty iron
gusty iron
#

that actually gave me a cool idea for a boss-blind pack

#

7 deadly sins

timid star
#

updated the video i replied with that's more up to date

timid star
#

lol

cinder cliff
#

Hey guys, I am making a custom seal, why is this happening?

cinder cliff
#

this is what is at functions/misc_functions line 1891

#
    config = { extra = { xmult = 2} },
    key = 'spoogie_seal',
    atlas = 'SpoogieEnhancers', pos = { x = 2, y = 0 },
    sound = { sound = 'woof_sound', per = 1, vol = 1 },
    discovered = true,
    loc_txt = {
        name = 'Spoogie Seal',
        label = 'Spoogie Seal is le epic'
    },

    calculate = function (self, card, context)
        if context.main_scoring and context.cardarea == G.play then
            return{
                xmult = card.ability.extra.xmult,
            }
        end
    end

}```
#

that's my seal

#

I have a feeling it is the calculate function

daring fern
cinder cliff
cinder cliff
#

it crashes when I hover over it in the collection

#

maybe a loc_txt error

daring fern
cinder cliff
#

oh wait I don't think I included text

cinder cliff
#

How do I calculate the seal bonus?

#

With calculate?

#

Some other mod I am looking at uses calculate_seal

daring fern
cinder cliff
#

Is it different to doing it with a joker?

#

Do I need loc_vars?

daring fern
cinder cliff
#

Ok

#

My thing is crashing, so I am asking

#

There must be something wrong with this

#

(Same result with card = context.other_card gone), idk why I added that

daring fern
cinder cliff
#

ah, didn't know that, and the wiki is not very helpful about it

thorn furnace
#

Question
is there a function that gives the word form of the rank of a card
As in giving like "Jack" instead of "11" for example

thorn furnace
#

o
thanks

thorn furnace
# daring fern You do `G.hand:change_size(number)` at the start of the round then you do `G.han...

This appears to crash
Idk if I'm doing it right

calculate = function(self, card, context)
        if context.first_hand_drawn then
            local eval = function()
                return G.GAME.current_round.discards_used == 0 and not G.RESET_JIGGLES
            end
            juice_card_until(card, eval, true)
        end
        if context.discard and not context.blueprint and G.GAME.current_round.discards_used <= 0 then
            card.ability.extra.destroyed = #context.full_hand
            G.hand.change_size(card.ability.extra.destroyed)
            return {
                remove = true
            }
        end
    end
thorn furnace
#

o that explains it

#

thank u :>

summer furnace
#

I am trying to remove a diamond card played and add 1 to mult
But it crashes
Here is the code: calculate = function(self, card, context) -- Tests if context.joker_main == true. -- joker_main is a SMODS specific thing, and is where the effects of jokers that just give +stuff in the joker area area triggered, like Joker giving +Mult, Cavendish giving XMult, and Bull giving +Chips. if context.joker_main then if context.before and not context.blueprint then return { if context.other_card:is_suit('Diamonds') then mult = card.ability.extra.mult, -- This is a localize function. Localize looks through the localization files, and translates it. It ensures your mod is able to be translated. I've left it out in most cases for clarity reasons, but this one is required, because it has a variable. -- This specifically looks in the localization table for the 'variable' category, specifically under 'v_dictionary' in 'localization/en-us.lua', and searches that table for 'a_mult', which is short for add mult. -- In the localization file, a_mult = '+#1#'. Like with loc_vars, the vars in this message variable replace the #1#. message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } } message = 'Upgraded!', colour = G.C.MULT, card = card, remove_from_deck = function(self, card, from_debuff) -- Adds - instead of +, so they get subtracted when this card is removed. G.GAME.round_resets.discards = G.GAME.round_resets.discards - card.ability.extra.discard_size, G.hand:change_size(-card.ability.extra.hand_size) end end } end end end }
Here is the crash log:

thorn furnace
#

Is : for methods and . for fields I guess

summer furnace
#

wdym?

red flower
daring fern
red flower
#

both work

#

you can call methods from an instance or the base class

thorn furnace
#

it's a little tricky to get used to KHD_TrunksWat

agile dew
#

which is bad cause i have no idea what any of it means

hushed field
#

Which will always spawn it as that edition

summer furnace
agile dew
#

check for them outside

daring fern
summer furnace
#

I got that part of the code from the SMODS example thing i think

summer furnace
vital magnet
#

hi this is my first time modding balatro but after I did the installation this error came up?

agile dew
#

wait nvm it works

summer furnace
#
    key = 'thirtytwo',
    loc_txt = {
        name = '32',
        text = {
            'Destroy Cards with Suit {C:diamonds}Diamond{} and add 1 to {s:mult, C:red}Mult{}'
        }
    },
    config = { extra = { mult = 0, mult_gain = 1 } },
    -- loc_vars gives your loc_text variables to work with, in the format of #n#, n being the variable in order.
    -- #1# is the first variable in vars, #2# the second, #3# the third, and so on.
    -- It's also where you'd add to the info_queue, which is where things like the negative tooltip are.
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.Xmult } }
    end,
    -- Sets rarity. 1 common, 2 uncommon, 3 rare, 4 legendary.
    rarity = 1,
    -- Which atlas key to pull from.
    atlas = 'thirtytwo',
    -- This card's position on the atlas, starting at {x=0,y=0} for the very top left.
    pos = { x = 0, y = 0 },
    -- Cost of card in shop.
    cost = 0,

    -- The functioning part of the joker, looks at context to decide what step of scoring the game is on, and then gives a 'return' value if something activates.
    calculate = function(self, card, context)
        -- Tests if context.joker_main == true.
        -- joker_main is a SMODS specific thing, and is where the effects of jokers that just give +stuff in the joker area area triggered, like Joker giving +Mult, Cavendish giving XMult, and Bull giving +Chips.
        if context.joker_main then
            if context.before and not context.blueprint then
                if context.other_card:is_suit('Diamonds') then
                    return {                
                        mult = card.ability.extra.mult,
                        -- This is a localize function. Localize looks through the localization files, and translates it. It ensures your mod is able to be translated. I've left it out in most cases for clarity reasons, but this one is required, because it has a variable.
                        -- This specifically looks in the localization table for the 'variable' category, specifically under 'v_dictionary' in 'localization/en-us.lua', and searches that table for 'a_mult', which is short for add mult.
                        -- In the localization file, a_mult = '+#1#'. Like with loc_vars, the vars in this message variable replace the #1#.
                        message = 'Upgraded!',
                        colour = G.C.MULT,
                        card = card,
                        remove_from_deck = function(self, card, from_debuff)
                            -- Adds - instead of +, so they get subtracted when this card is removed.
                            G.GAME.round_resets.discards = G.GAME.round_resets.discards - card.ability.extra.discard_size,
                            G.hand:change_size(-card.ability.extra.hand_size)
                        end
                    }
                end    
            end
        end
    end
}```
Sooo, I have this code, what it should do is destroy any played diamond cards and add 1 to mult, but it does nothing. Does anyone have an idea?
daring fern
summer furnace
#

oooh, ok so I removed the context.before and now it crashes heres the log:

daring fern
summer furnace
#

huh

thorn furnace
thorn furnace
#

o
thanks :>

summer furnace
cinder cliff
#

context.other_card:is_suit('Hearts') is what I used

#

gotta put card = context.other_card in return tho

cinder cliff
#

I did modify it

#

so maybe context.other_card isn't needed anymore

timid star
spice wadi
#

this is incredibly cool

stoic fulcrum
#

is there a way to make each repetition a probability check?
i want to make a joker that has a 1 in 4 chance to give x1.5 mult each retrigger (max 10 times, hence the retrigger cap)

#

i just realized i typo'd retrigger cap so ignore that lol

summer furnace
stoic fulcrum
#

nevermind i might've found an extremely hacky and ugly way to do what i want

unborn bay
#

truly

stoic fulcrum
#

it's probably not true 1 in 4 so i likely need to tweak the pseudorandom

cinder cliff
#

How do I add a seal to a card through a consumable?

daring fern
stoic fulcrum
daring fern
north swallow
#

why doesnt smods.sound work?

unborn bay
#

add your mod's prefix to the play_sound call

cinder cliff
north swallow
cinder cliff
#

eg play_sound("ModPrefixHere_SoundName")

north swallow
#

uhuh

#

so i have to do play_sound('xmpl_jokers")?

cinder cliff
#

is your sound file in assets/sounds?

north swallow
north swallow
cinder cliff
north swallow
#

THANKS

#

tysm

#

it works

cinder cliff
#

you're welcome

#

anyways, does anyone know how to add a seal through a custom consumable?

daring fern
cinder cliff
thorn furnace
#

How do you do RNG stuff exactly
Like if I have a "1 in 2 chance to do so and so" thing

summer furnace
summer furnace
daring fern
thorn furnace
maiden phoenix
#

Yes

thorn furnace
#

i don't think I've ever seen a string as a seed before

spice wadi
thorn furnace
#

yea

spice wadi
thorn furnace
#

i mean your explanation seems pretty standard as far as how rng typically goes

daring fern
spice wadi
#

I'm aware of that, it's shown in the example someone else gave

#

But I'm not going to assume their level of knowledge so I was just summarising what it actually means

thorn furnace
#

definitely totally unrelated question (i will stop flooding this channel with questions eventually I promise)
how do you add additional temporary hands
I saw some ease_hands_played() function in the vanillaremade thing with burglar but wasn't sure if that did everything because there was other code

red flower
#

that's for temporary hands yes

thorn furnace
#

Okii

summer furnace
#

Sooo, I am trying to make a joker that needs a specific suit to trigger (in this case diamonds) How can I see what suit is being played?

spice wadi
#

for example jokers like the greedy joker give mult per card

thorn furnace
spice wadi
#

while other jokers check if your hand contains specific suits rather than being per card

thorn furnace
summer furnace
thorn furnace
#

oki

#

One sec lemme fix that im very dumb

#

There we go :3
Thank u

spice wadi
#

anyway can you answer my question so i can understand the effect you wanna make

summer furnace
#

I want to check if the played card is a diamond, if that is the case the card should be destroyed and the joker gains 1 mult

red flower
#

i love miles edgeworth from ace attorney

unborn bay
#

yaoi jumpscare

cinder cliff
#

How do you get the amount of cards selected?

#

(And how to use can_use for consumables)

red flower
#

#G.hand.highlighted

daring fern
cinder cliff
#

You need the #?

summer furnace
# spice wadi https://github.com/nh6574/VanillaRemade/blob/5028b690726a9970f99a1f9db5a9114dcb7...

my game crashes if I use that and play a diamond calculate = function(self, card, context) -- Tests if context.joker_main == true. -- joker_main is a SMODS specific thing, and is where the effects of jokers that just give +stuff in the joker area area triggered, like Joker giving +Mult, Cavendish giving XMult, and Bull giving +Chips. if context.joker_main and not context.blueprint then if context.other_card:is_suit('Diamonds') then return { mult = card.ability.extra.mult, -- This is a localize function. Localize looks through the localization files, and translates it. It ensures your mod is able to be translated. I've left it out in most cases for clarity reasons, but this one is required, because it has a variable. -- This specifically looks in the localization table for the 'variable' category, specifically under 'v_dictionary' in 'localization/en-us.lua', and searches that table for 'a_mult', which is short for add mult. -- In the localization file, a_mult = '+#1#'. Like with loc_vars, the vars in this message variable replace the #1#. message = 'Upgraded!', colour = G.C.MULT, remove_from_deck = function(self, card, from_debuff) -- Adds - instead of +, so they get subtracted when this card is removed. G.GAME.round_resets.discards = G.GAME.round_resets.discards - card.ability.extra.discard_size, G.hand:change_size(-card.ability.extra.hand_size) end } end end

daring fern
cinder cliff
#

k

#

Does use need to return anything?

red flower
#

no

cinder cliff
#

just checking, the thing is whining about commas

red flower
#

this is in the docs btw

cinder cliff
#

I don't know where to look

#

can_use has no explination in the docs as far as I know

#

that I can find

red flower
#

can_use returns a bool
use doesn't return anything

cinder cliff
#

I have seen that bit

red flower
#

i don't think it needs more explanation than that

cinder cliff
#

idk, i just stoobid

#

so in can_use, you just return true or false?

red flower
#

yes

cinder cliff
#

ok

#

How do I use card:set_seal, I can't seem to find it in the wiki

red flower
#

card:set_seal("sealkey")

cinder cliff
#

Where do I put it tho?

#

I put in in use, and it didn't work

#

I did include the prefix

red flower
#

you put it where you want to use it

#

can i see the code

cinder cliff
cinder cliff
summer furnace
daring fern
red flower
# cinder cliff

card is the consumable in that case so you're giving it a seal and then immediately destroying it

cinder cliff
#

I forgot that card refered to the consumable

#

so I would need to set card to the selected cards

#

G.hand.highlighted?

red flower
#

you need to loop through that list yes

cinder cliff
#

alright

#

G.hand.highlighted is enumerable then

stiff quiver
#

hi, im new to modding balatro and wanted to make a joker that triggers if played hand is 3oaK and all played cards are hearts, how would I do that? I've already added the joker itself to the game, im just missing to make it actually work

cinder cliff
#

or whatever the word was

thorn furnace
#

What variable has the current chips/mult
I want to set the current chips/mult post-calculation to 0 and then store it in a variable

red flower
thorn furnace
#

o oki
thanks :>

cinder cliff
#

should start for loop with i=0 or i=1? I haven't touched lua before this

cinder cliff
manic rune
#

"Gives Chips equal to X1.5 of current Chips"

is that a good effect

spice wadi
#

context.individual is for effects on each card

red flower
spice wadi
cinder cliff
#

Just a question, does a # before a list mean the count of the list?

red flower
#

yep coding on mobile is awful

red flower
cinder cliff