#💻・modding-dev

1 messages · Page 561 of 1

frosty rampart
#

you can write code in a separate remove_from_deck function (i.e. not the calculate function), which runs when the joker is removed in any way. you'd need to have a check specifically for what's destroying it, which i don't remember how to do that off the top of my head

vocal helm
#

Follow up to this; it seems like the joker reduces the cost of the shop items when the joker itself is triggered, not when the calculate effect per-card is triggered
How would I change it so that the calculate effect drops the price?

-- jokers
for index, shop_card in ipairs(G.shop_jokers.cards) do
    if shop_card.cost > 0 then
        G.E_MANAGER:add_event(Event({
            trigger = "after",
            func = function()
                SMODS.calculate_effect({
                    trigger = "after",
                    message = "Reduced!", 
                    colour = G.C.MONEY,
                    func = function()
                        shop_card.cost = math.max(0, shop_card.cost - card.ability.extra.price_reduction)
                        return true
                    end}, 
                shop_card)
                return true
            end
        }))
    end
end

vocal helm
#

just call the calculate_event?

simple locust
#

Whattttttttttt

#

Bmm but inside balatro

vocal helm
# daring fern Remove the event.
calculate = function(self, card, context)
        if context.selling_card and G.STATE == G.STATES.SHOP then
            -- return
            return {
                trigger = "immediate",
                message = "hoI!",
                colour =  G.C.GREEN,
                message_card = card,
                func = function()
                    G.GAME.current_round.reroll_cost = math.max(0, G.GAME.current_round.reroll_cost - 1)
                    -- jokers
                    for index, shop_card in ipairs(G.shop_jokers.cards) do
                        if shop_card.cost > 0 then
                            local new_cost = math.max(0, shop_card.cost - card.ability.extra.price_reduction)
                            local msg = "$"..new_cost
                            if new_cost <= 0 then
                                msg = "Free!"
                            end
                            SMODS.calculate_effect({
                                trigger = "after",
                                message = msg,
                                colour = G.C.MONEY,
                                func = function()
                                    shop_card.cost = new_cost
                                    return true
                                end
                                }, 
                            shop_card)
                        end
                    end
                    return true
                end
            }
        
        end
    
    end
#

still has the price reduce before the card gets triggered

frigid cargo
#

im tryna make a joker that activates on a set of number once.
so like imagine a low straight A-5, i want it to activate 1.5xmult to gain 0.25xmult on the 2s 3s 4s & 5s once, so if i was to play a flush five or something it would add a different xmult for the same ranks.
how would i do this? Would i make a list or what?

#

actually i think i mightve figured it out somehow

#

nope nvm

high verge
#
                            n = G.UIT.R,
                            config = { align = 'cm',},
                            nodes = {
                                create_option_cycle({
                                    scale = 1, 
                                    w = 4,
                                    label = "UI Options", 
                                    opt_callback = 'callback_func',
                                    options = {"Custom Suits", "Face Only", "Vanilla"},
                                    value = 1,
                                    ref_table = helluva_config,
                                    ref_value = 'hellvacustomsuitui',
                                }),    
                            },
                        },
G.FUNCS.callback_func = function(args)
  args = args or {}
  if args.cycle_config and args.cycle_config.ref_table and args.cycle_config.ref_value then
    args.cycle_config.ref_table[args.cycle_config.ref_value] = args.to_key
  end
end```
I have this code and it *functions* but whenever the menu is opened it shows the value back on the first option again. How can I make it update so that it shows the correct current option when you open the config menu?
frigid cargo
high verge
#

You have a functional option cycle that doesn't reset itself?

frigid cargo
#

yes

high verge
#

I'd love to see it ^^

frigid cargo
#
function G.FUNCS.btct_tarotM_rateChange(args) -- Tarot
    Batrocities.config.tarotM_rateChange = args.cycle_config.current_option
    Batrocities.config.selected = args.to_val
    G.E_MANAGER:add_event(Event({
        func = function()
            if Batrocities.config.tarotM_rateChange == 1 then
                G.GAME.tarot_rate = 4 * 1
                return true
            elseif Batrocities.config.tarotM_rateChange == 2 then
                G.GAME.tarot_rate = 4 * 2.4
                return true
            elseif Batrocities.config.tarotM_rateChange == 3 then
                G.GAME.tarot_rate = 4 * 4.7335
                return true
            elseif Batrocities.config.tarotM_rateChange == 4 then
                G.GAME.tarot_rate = 4 * 8
                return true
            elseif Batrocities.config.tarotM_rateChange == 5 then
                G.GAME.tarot_rate = 4 * 12.2
                return true
            elseif Batrocities.config.tarotM_rateChange == 6 then
                G.GAME.tarot_rate = 4 * 17.333
                return true
            else
                G.GAME.tarot_rate = G.GAME.tarot_rate
                return true
            end
        end
    }))
end

ignore the huge elseif statement

#

thats the function for the cycle

high verge
#

I think I have a rough idea of what's going on

#

How does the matching node look?

#

Wait maybe I don't understand this xD

frigid cargo
high verge
#

I mean how it looks above in the nodes that set up the ui

frigid cargo
#

ah

#
-- Config Tab
SMODS.current_mod.config_tab = function()
    return {
        n = G.UIT.ROOT, 
        config = {
            align = "cm",
            minh = 6,
            minw = 10,
            padding = 0.2,
            r = 0.1,
            colour = G.C.BLACK
        },
        nodes = {
            {
                n = G.UIT.R,
                config = { align = "cm", },
                nodes = {
                    {
                        n=G.UIT.O, 
                        config={
                            object = DynaText({
                                string = localize("btct_string_A"), 
                                colours = {G.C.WHITE}, 
                                shadow = true, 
                                scale = 0.4
                            })
                        }
                    },
                }
            },
            create_option_cycle({ -- tarot cycle here
                label = localize("btct_string_B"), 
                scale = 0.8,
                w = 6,
                ref_table = Batrocities.config, 
                ref_value = "tarotM_rateChange",
                options = { 1, 2, 3, 4, 5, 6 },
                current_option = Batrocities.config.tarotM_rateChange,
                opt_callback = "btct_tarotM_rateChange",
            }),
            create_option_cycle({
                label = localize("btct_string_C"), 
                scale = 0.8,
                w = 6,
                ref_table = Batrocities.config, 
                ref_value = "planetM_rateChange",
                options = { 1, 2, 3, 4, 5, 6 },
                current_option = Batrocities.config.planetM_rateChange,
                opt_callback = "btct_planetM_rateChange",
            }),
            create_toggle({
                label = localize("btct_string_D"), 
                ref_table = Batrocities.config, 
                ref_value = "disable_malfunctionFlash",
            })
        }
    }
end

heres the entire config menu

high verge
#

Let's see if I can reverse engineer this

#

Thank you

frigid cargo
#

real

#

np hope i could help more but cant sorry

high verge
#

Nah this is already plenty xD

frigid cargo
high verge
#

I figured it out

#

current_option = morenatsu_config.morenatsustyle,

#

Just needed this option

frigid cargo
#

ah

#

good job

high verge
#

Repost your issue

shut monolith
#

I'm trying to make a custom blind, but the ignore_showdown_check doesn't seem to do anything?

frigid cargo
vocal helm
#

HAHAHAHAHAHHAHAA

high verge
vocal helm
#

thanks! I stole it directly from the Binding of Isaac /lh

urban wasp
#

why is this stake not applying diamond stake

SMODS.Stake {
    key = "violet",
    name = "Violet Stake",
    applied_stakes = { "cry_diamond" },
    atlas = "crp_stake",
    pos = { x = 1, y = 0 },
    shiny = true,
    colour = HEX("8a71e1"),
    above_stake = "cry_diamond",
    modifiers = function()
        G.GAME.starting_params.ante_scaling = 2
    end,
    crp_credits = {
        idea = { "Unknown" },
        art = { "Grahkon" },
        code = { "wilfredlam0418" }
    }
}
vocal helm
robust marsh
#

Thank you! But it isn't my sprite, Ruby made it

high verge
#

Can we localize the json display name of the mod?

true jasper
#

Most complex joker I've ever made is done (I'm bad at coding)
Numbers will be tweaked when balance testing happens

urban wasp
#

coolio

terse merlin
#

so uh looks like Lucky Cat but 41% stronger on average

#

something something expected value

urban wasp
#

i mean pretty much

#

i feel like this could be adjusted for something else like glass cards ngl

true jasper
#

I'm proud of myself and it's for one of my mod

urban wasp
#

obv glass joker has that niche but yea

urban wasp
terse merlin
#

well ive never coded a joker myself

true jasper
terse merlin
#

just pointing out how the effect is very similiar to an existing one

urban wasp
#

in that case the decrease should definitely go up

#

to something like x0.1 or even x0.15 imo

true jasper
#

I'll probably make it x0.1

urban wasp
#

yea

#

i am currently finishing this stuff up

terse merlin
#

x0.1 will make it 18% weaker than normal lucky cat i think?

urban wasp
true jasper
urban wasp
#

yeah i stopped cryptposting dev for a little while since people started sending me like death threats and stuff but i've learned to deal with it and i'm getting back into it

terse merlin
#

a perfect balance seems to be around losing x0.085 on a non-trigger

#

soo tweak that as you will

urban wasp
#

too oddly specific imo some changing around is probably good

mystic river
#

given that it's swingy, having a higher expected value than the non-swingy counterpart might be a way to make it worth taking

true jasper
mystic river
#

i mean lucky cat is already kinda swingy but this is even more so

terse merlin
#

alr

urban wasp
#

i would say x0.075 is good then

#

balatro cuts off decimals at like 0.01 i think though

#

might be wrong

terse merlin
#

it WILL be stronger as long as you keep it below x0.085

true jasper
terse merlin
#

and i guess all6 makes it have higher potential than regular cat

#

more uhhh volatile

urban wasp
#

yeah given all this x0.075 is best bet in my opinion

#

in other news, local balatro modding dev (me) bumps this certain message because they are going insane

stiff locust
#

guys i think i made a bomb

urban wasp
#

zip bomb joker when

true jasper
stiff locust
#

ok so

true jasper
stiff locust
#

I made two jokers that turn into each other

#

on a cycle

#

but they both have each other in their info queues

#

so as soon as you hover over the joker, your game crashes

#

hard crashes, no log

true jasper
#

😭

stiff locust
#

this is funny as fuck and I am 100% making a landmine

#

which does this intentionally

#

later

true jasper
#

just make separate info queues for only when hovered so that doesn't happen

stiff locust
#

yeah i'm gonna do that

urban wasp
#

in fact i literally did this today

#

😭

true jasper
robust marsh
#

How do I make a custom card area appear only on specific decks? I'm trying to use G.GAME.selected_back and G.GAME.selected_back.effect.center.key but to no avail EVILCAT

stiff locust
#

ii think you're missing the e_ before crp on the label key

#

i've never really done editions but i'd assume that's the issue

urban wasp
#

i'm going insane like i've been trying to fix this ALL day

#

unironically it is 12:50 am i've been coding almost non-stop since about 2:00 pm

true jasper
urban wasp
#

true but only sometimes

stiff locust
#

the coding is the easy part for me

#

dont even get me started on art

urban wasp
#

well true

true jasper
urban wasp
#

i'm best at writing/suggesting i'm pretty good at coding absolutely and utterly abhorrent at art

feral tree
#

What's the hex codes for the low and high contrast colors of the playing cards

stiff locust
#

my art is like

okay

urban wasp
stiff locust
#

I can shade cylinders and spheres

true jasper
stiff locust
#

what if you just

#

make normal art and then scale it down

true jasper
stiff locust
#

then make it not look like ass

urban wasp
true jasper
#

playing on low contrast is scary ngl

urban wasp
#

i play on mobile a lot and i use high contrast on there

#

then on computer i have a deck skin

true jasper
urban wasp
true jasper
stiff locust
#

i can use love.timer.sleep in balatro right

true jasper
#

I have 2 solo mods I'm working on, 1 being coded, other in concepting still. The one being coded still needs a lot more ideas

true jasper
stiff locust
#

okay

#

i need to eradicate a card

#

I don't want the card to stay on the screen and I want to make sure that it is destroyed no matter what happens

#

how do I do this

urban wasp
stiff locust
#

no but there's stuff like the stacked effect that makes it immune to destruction x times

urban wasp
#

😭

stiff locust
#

I don't wanna have to manually stop every single destruction prevention

true jasper
stiff locust
#

that depends a lot on how the effect is coded

#

reverie's destruction checks can see even if you use card:remove()

#

i'm going to cover as many bases as I can

true jasper
#

Unrelated, how does one add the separate text boxes in the description of something

stiff locust
#

^

true jasper
stiff locust
#

this code crashes if you have no modded stickers

#

at least I think that's the cause

#

SMODS.stickers is nil for me

#

easy fix but thought id tell you

mystic river
#

hm
i. don't think I've ever had that be the case

stiff locust
#

i will install a mod that adds a sticker and double check

#

(what mods have those that aren't too big)

mystic river
#

I'm also kinda surprised that vanilla stickers aren't in there?

#

i thought they were, i vaguely recall testing this

stiff locust
#

¯_(ツ)_/¯

mystic river
#

now i guess i have to test it again

urban wasp
#

hey guys i'm asking again, how would i be able to set an edition's shader as a vanilla one, since this crashes

SMODS.Edition {
    key = "really_negative",
    weight = 0.3,
    shader = "negative",
    in_shop = true,
    extra_cost = 5,
    get_weight = function(self)
        return G.GAME.edition_rate * self.weight
    end,
    config = { card_limit = 3 },
    loc_vars = function(self, info_queue, center)
        return { vars = { self.config.card_limit } }
    end,
    crp_credits = {
        idea = { "PurplePickle" },
        code = { "wilfredlam0418" }
    }
}
mystic river
#

prefix config is involved, i assume

urban wasp
#

yeah some others were talking abt that earlier when i asked

mystic river
#

wait no i think that's a different thing. maybe? uh. it's something to check

urban wasp
#

not sure how i would implement that though

daring fern
urban wasp
#

so literally just

SMODS.Edition {
    key = "really_negative",
    weight = 0.3,
    shader = "negative",
    prefix_config = { shader = false },
    in_shop = true,
    extra_cost = 5,
    get_weight = function(self)
        return G.GAME.edition_rate * self.weight
    end,
    config = { card_limit = 3 },
    loc_vars = function(self, info_queue, center)
        return { vars = { self.config.card_limit } }
    end,
    crp_credits = {
        idea = { "PurplePickle" },
        code = { "wilfredlam0418" }
    }
}
urban wasp
#

oh my god it worked

#

okay how do i add the negative shine on top of it kinda forgot to mention that

daring fern
urban wasp
#

oh... i'm not entirely sure how to do that

#

smods wiki to the rescue

#

yeah i have no clue how to use drawstep

#

it'll be fine

#

probably

#

how do i make it so that a voucher's effect replaces another's

stiff locust
#

and if it has been redeemed, don't do the effect

#

that's assuming you made both vouchers

lament agate
#

how do you alter held in hand enhancement card

#

like i.e Gold card now gives $5 instead of $3

daring fern
lament agate
daring fern
lament agate
daring fern
high verge
#

Where is Wee Joker on the texture sheet?

daring fern
high verge
#

Ah it just wasn't showing because I forgot to define the key.

manic rune
#

is there a way to have this not be affected by retrigger_joker?

#

right now i have to add this everywhere thats using context.bsr_stats which is annoying

wintry solar
#

Patch the line that calls retriggers

#

It should be in eval card iirc

manic rune
#

yeah that seemed to do it, thanks

#

oh yeah, another question, what do i do here to have the card retriggering? right now it seems to retrigger everything

stiff locust
#

(i know what happened but not how to fix it)

manic rune
#

why is it jimbo

stiff locust
#

i need to turn x joker into y joker and it seems to be working on everything other than the sprite

#

i tested it turning jimbo into splash

manic rune
#

thats odd, set_ability should also change the sprite too

stiff locust
#

and

#

everything, actually

#

it's not changing the effect i'm losing it

#

I need to turn X card into Y card But Like Actually

manic rune
stiff locust
#

I was hoping that replacing the center with the center of the new card would do it

#

it only changed the descriptions

manic rune
#

oh, no

#

you want to do card:set_ability(G.P_CENTERS["j_splash"])

#

i forgot if it accepts just the key too, but using a center works

red flower
#

it accepts just the key yes

stiff locust
#

oh

#

that's way easier than i thought it would be

#

today is one of those "write a function for something that is already easily possible" days

hidden mirage
#

how to get definitions and autocomplete?

manic rune
daring fern
#

card would be the card that it's calculating the retriggers of.

manic rune
#

o

#

ic, thanks

candid sleet
#

i can't seem to figure out why this spectral card crashes trying to apply my custom seal to a card, the setup seems the same as vanilla remade for those spectral cards?

#

is there something wrong with my seal maybe?

red flower
#

it should be modprefix_Pink

candid sleet
#

ohh ok

#

my prefix is PORO and i tried m_PORO_Pink like you do with enhancements but i guess seals are different

slim ferry
#

seals are a different object they dont use m_

#

they just dont have anything

candid sleet
#

Gotcha ok thanks

queen meadow
#

is there none

red flower
#

I don't think so

queen meadow
#

damn... 💔

#

i gotta do checks for when card with purple seal is discarded, card with blue seal on hand in end of round, and when card with red or gold seal is played

naive musk
#

sup guys
is there a tutorial on coding stuff for balatro mods?, really can’t rely on joker forge for long

slim ferry
#

check out the second pinned message in modding-chat

manic rune
robust marsh
#

ello, I wanted to ask if there's a way to just create custom tooltips that aren't connected to jokers/cards with this specific purpose?

manic rune
slim ferry
manic rune
slim ferry
#

or that

robust marsh
#

alrighty

manic rune
#

i have, no clue what to do now

#

i tried printing out eval and im like 95% sure im adding repetitions in the right place

#

-# im not even gonna bother questioning why its not retriggering 10 times, i just want it to work...

red flower
#

no idea

manic rune
#

im cooked

stiff locust
#

i need a joker to set its sell cost to -2

#

card.sell_cost doesnt appear to be working

#

where would I do this

manic rune
stiff locust
#

ughhh

manic rune
#

wait i mean

#

Card:set_cost()

hidden mirage
#

sorry for the beginner question but how do you make the mult effect/message show up after the chips one
if context.joker_main then return { chips = card.ability.extra.chips, mult = card.ability.extra.mult } end

stiff locust
#

i'm just gonna make the joker subtract 5 dollars when sold

#

i cannot deal with another patch or hook today

manic rune
slim ferry
#

yeah

#

extra always goes after the other effects

#

afaik

hidden mirage
#

sure

#

what if i wanted another thing out of order?

stiff locust
#

what is wrong with this code

#

why is it not running

#

it's not inside another context and there is nothng to get in its way

manic rune
#

erm

#

no clue

manic rune
#

you can put extra in extra too btw

hidden mirage
slim ferry
#

extraception

manic rune
#

truly

#

im so confused about the retriggers

#

help

hidden mirage
#

is there a list of the colours with {C:}

stiff locust
#

yeah but you only really need
red, blue, attention, inactive, edition, dark_edition, money and green

hidden mirage
#

okay thankyou

stiff locust
#

there are also suit colors but i forgot where to find them

manic rune
#

scroll down to the bottom and you should see the color list and where its defined

hidden mirage
#

return {
message = "-#3# Chips",
colour = G.C.CHIPS
}

how to use text styling on messages? or at least referencing a value

daring fern
# manic rune

No, it's not retriggering the right joker, the right joker is retriggering it because you're checking that for every joker and consumable and voucher because it's in a for loop.

manic rune
#

🤔 but card.ability.excess_action_value of the right joker should be 0 though

#

so it shouldnt retrigger itself

daring fern
manic rune
#

.

#

wait

#

hmm

daring fern
manic rune
#

if a joker have card.ability.excess_action_value then it will retrigger itself once per 100 of that

daring fern
manic rune
#

wtf is that

#

3:

#

lemme check

daring fern
slim ferry
# hidden mirage return { message = "-#3# Chips", colour ...

if this is for scoring effects, those already do messages automatically
otherwise, you can use the localize function to use a message from the game (if you dont have a variable, just localize(<text key>), otherwise localize { type = 'variable', key = <text key>, vars = { <variables to use> } }

hidden mirage
slim ferry
#

then it should be automatic

manic rune
#

why do i only see seals using that lmao

slim ferry
#

well if you mean as in scoring that and not scaling down like ice cream or smth

hidden mirage
#

i mean like an icecream
if context.after then
if card.ability.extra.chips > 0 then
card.ability.extra.chips = card.ability.extra.chips - card.ability.extra.chips_loss
return {
message = "-10 Chips",
colour = G.C.CHIPS
}
end
end

#

i want the -10 to be -#3#

slim ferry
#

message = localize { type = "variable", key = "a_chips_minus", vars = { whatever the variable is } }

hidden mirage
#

sorry i didnt really know how to interpret your message before ill work on that

daring fern
manic rune
#

huh

#

i see

#

why is retriggers 0??

#

oh wait

#

this doesnt work for jokers though, does it

#

3:

daring fern
manic rune
#

man

#

what am i supposed to do now...

#

maybe i can add this

#

. oh, that works

gilded goblet
#

this seems to have fixed it (hopefully)

should_apply = function(self, card, center, area, bypass_roll)
  if (area == G.shop_jokers) or (area == G.pack_cards) then
    return SMODS.Sticker.should_apply(self, card, center, area, bypass_roll)
    and G.GAME.modifiers.enable_marked_in_shops
  end
end
hidden mirage
#

how to make context_end_of_round only happen at end of ante?

red flower
#

you can use context.beat_boss

#

in addition

hidden mirage
#
loc_vars = function(self, info_queue, card)
        return {
            vars = {
                card.ability.extra.mult,
                card.ability.half_of_mult
            }
        }
    end,
    calculate = function(self, card, context)
        if context.end_of_round then
            if card.ability.extra.mult > 0 then
                card.ability.extra.half_of_mult = math.ceil(card.ability.extra.mult / 2)
                card.ability.extra.mult = card.ability.extra.mult - card.ability.half_of_mult
                return {
                    message = localize { type = "variable", key = "a_mult_minus", vars = {card.ability.extra.half_of_mult}},
                    colour = G.C.MULT
                }
            end
        end
        if context.joker_main then
            return{
                mult = card.ability.extra.mult
            }
        end
    end

why is it saying half_of_mult is nil (i set it to 20 but i dont see why it should matter)

slim ferry
#

shouldnt it be card.ability.extra.half_of_mult?

hidden mirage
hidden mirage
#

how do i handle oops all sixes?

stiff locust
hidden mirage
#
SMODS.Challenge {
    key = "test",
    loc_txt = { name = "Test Deck" },
    jokers = {
        {id = "blueprint"}
    }
}

why this no work

rotund sable
#

does it:
a) crash
b) doesn't show up

#

c) it works but you didn't load the file/ restart balatro

hidden mirage
rotund sable
hidden mirage
daring fern
rotund sable
#

damn you're fast

hidden mirage
cursive gazelle
#

somethingcom always helping people

#

what a nice guy

red flower
#

does anyone know where the game decides you won a round after getting the required score

keen atlas
#

somewhere in end_round

red flower
#

but isnt end_round for ending the round

#

i want to know what calls that

keen atlas
red flower
#

yeah but it checks after being called

#

i dont need that, just when it is called in the first place

#

it checks because its also called when you run out of cards for example

keen atlas
#

i have no idea then

daring fern
#

red flower
#

my problem is that it seems to be called as part of the state machine which makes it a bit harder to pinpoint but i think it is the screenshot i sent earlier

hidden mirage
#
if context.individual and context.cardarea == G.play then
  SMODS.destroy_cards(context.card, nil, nil, true)
end

whats the right way to remove scored cards with a joker?

red flower
#

context.destroy_card

hidden mirage
#

i see thankyou

hidden mirage
red flower
#

add a flag to the card

pale holly
#

info_queue[#1116390750314307698_queue+1] = G.P_CENTERS.m_wheel_of_fortune

trying to make the info queue for the wheel of fortune but it won't work, is there something i typed wrong ?

red flower
#

c_wheel_of_fortune

pale holly
#

Ah alright, thanks

candid sleet
#

how would i fix this error text where it should also say Pink Seal

rotund sable
#

i love pressing alt+f4 instead of alt+f5

rotund sable
#

it's in the doc 🫣

candid sleet
#

oh thanks i forgot to check this for some reason

#

i was just tryna go off vanilla remade 😭

slim ferry
#

the SMODS.Back docs say that you need to use events in apply if you want to change the starting deck, but couldnt i just... not? its not like you can see the cards when you're modifying them so the timing doesnt really matter

wind steppe
slim ferry
#

i see

wind steppe
#

without i think it applies before your deck is reset

slim ferry
#

what arguments does set_seal take again? for some reason vscode decided to just stop showing them and just says its unknown

wind steppe
#

i dont know what the other two arguments do

slim ferry
#

the second argument is apparently called silent

#

so im going to assume it mutes the sound

wind steppe
#

i think that makes it not juice up

wintry solar
#

They are silent and immediate iirc

urban wasp
#

how do i check if a voucher is owned

slim ferry
#

G.GAME.used_vouchers.<key>

gloomy hamlet
#

guys please help me, in my code hand_chips = 0work only with context.joker_main,i need to do it before played cards add score, but if i use context.before, then hand_chips = 0 dont work.

slim ferry
#

do it in context.intial_scoring_step

wintry solar
#

Also don’t do that

#

It won’t actually work anywhere

slim ferry
#

oh yeah modify_scoring_hand exists

#

doesnt it

#

just use that and return chips = 0

#

i think

red flower
#

modify_hand

#

similar name

wintry solar
#

Assuming you effect is to set chips to 0, use initial scoring step like Eris suggested but you’ll need to do hand_chips = mod_chips(0)

steady smelt
#

this is a dumb question

how can i just replace a vanilla texture ala resource pack but in a mod without doing any take ownership stuff

frosty rampart
#

use malverk

steady smelt
#

this is cool and i didn't know about it but also not what i asked

#

also it doesn't support what i'm trying to replace anyways

frosty rampart
#

as far as i'm aware "make a texture pack for malverk" is your only option if you don't want to take ownership of the vanilla atlases-

hm

steady smelt
#

i mean

#

phrasing was bad

mystic river
steady smelt
#

i probably could take ownership of the atlas

#

just don't wanna take ownership of a bunch of objects and manually change their atlases

#

did not process that that was an option though

frosty rampart
#

ah yea
yea i think taking ownership of the atlas is probably a reasonable route

steady smelt
#

guess i gotta figure out how that works then

mystic river
#

alternately you could take ownership of the item and change its atlas+pos to your own atlas

#

which option is better depends on what exactly you're doing

steady smelt
#

trying to get rid of the stupid gradient on high contrast cards bc it's inconsistent with other stuff in my mod

mystic river
#

ah yeah, if you're changing several items, the atlas is probably easier

steady smelt
#

so atlas ownership def easier

#

way more used to modding other games where you can just drop a texture in the vanilla texture's filepath with the same name and it overwrites it

wintry solar
#

Card colours are done by deck skins, you can just create one of those

#

I’m of the opinion that blanket replacing vanilla textures with no option to stop that from happening is a bad choice

slim ferry
#

is there any case where create_card is called before G.GAME is initialized?

#

i assume not but just to be sure

wintry solar
#

Maybe the splash screen?

gilded goblet
#

i hate doing that

rotund sable
#

My favorite part is being clueless and waiting for Balatro to open

vocal helm
#

How can I check in a joker is a pseudorandom effect fails, and what are some of the main contexts for it to happen? (i.e. Wheel of Fortune failing, Glass Cards breaking, Lucky Cards not triggering, etc.)

vocal helm
#

thanks! :D

wheat jewel
#

trying to make a joker give money if the volume level is at a randomly generated value but it never does so, is there a better way to check?

steady smelt
#

a deckskin wouldn't make sense for this anyways

red river
#

is there a way to access the last hand played prior an arbitrary moment in a run?

#

by "last hand" i mean the cards that have been played in that hand

frail parcel
steady smelt
#

your path is missing an S

#

or your texture has an extra S, your pick

frail parcel
#

i see

ocean sinew
steady smelt
# wheat jewel bump

try printing the music volume and card level so you can see what they are, i assume music volume can be a decimal or something or is on a range from 0 to 1

#

unless it is a context issue, idk enough about those

#

also math.random(1, 100) is redundant, math.random(100) defaults to random integer from 1 to 100

rotund sable
#

Balatro modders best friend.
The print function

steady smelt
#

if you don't have stupid dumbly named print functions built into your mod what are you even doing

rotund sable
#

i have a function that freezes balatro for a given amount of time

steady smelt
#

i have this and if i remove it the game crashes on launch

rotund sable
#

why...

steady smelt
#

three

wheat jewel
ocean sinew
steady smelt
#

i'm not sure i realised you could type things into a command line in-game

#

or that there even was one

frosty rampart
#

debugplus

steady smelt
#

yeah i have that

rotund sable
#

/

steady smelt
#

im just dense

frosty rampart
#

hold tab for the awesome debugplus cheat sheet

steady smelt
#

yesyes

#

i also can't read

wheat jewel
#

ingame nothing is printed

marble stratus
rotund sable
marble stratus
#

i relly wan ths deck

#

to wokr

frigid niche
red flower
#

they are editing yahimod for whatever reason

rotund sable
#

i hate ui i hate ui i hate ui

#

i think i had enough coding for today

marble stratus
marble stratus
vocal helm
#

Is there any way I could play an animation after cards are scored but before they're discarded? I'm trying to do a Strength or Midas Mask style effect but it happens while the cards are flying away

red cradle
#

how can i make the animation of changing score requirement like that? (Bunco, Hedge Trimmer) I looked through the entire mod code, but I still didn't understand what was responsible for it.

cursive gazelle
vocal helm
vocal helm
# vocal helm Is there any way I could play an animation after cards are scored but before the...
calculate = function(self, card, context)
        if context.after then
            local do_message = false
            for _, playing_card in ipairs(G.play.cards) do
                if SMODS.has_enhancement(playing_card, 'm_stone') and SMODS.pseudorandom_probability(card, 'j8mod_metamorphic', 1, card.ability.extra.odds) then
                    G.E_MANAGER:add_event(Event({
                        trigger = 'after',
                        delay = 0.1,
                        func = function()
                            play_sound('tarot1')
                            playing_card:flip()
                            return true
                        end
                    }))
                    G.E_MANAGER:add_event(Event({
                        trigger = 'after',
                        delay = 0.1,
                        func = function()
                            playing_card:set_ability('m_glass', nil, true)
                            return true
                        end
                    }))
                    G.E_MANAGER:add_event(Event({
                        trigger = 'after',
                        delay = 0.1,
                        func = function()
                            play_sound('tarot2')
                            playing_card:flip()
                            return true
                        end
                    }))
                    do_message = true
                    return true
                end
            end
            if do_message then
                return {
                    message = localize('k_upgrade'),
                    colour = G.C.TEXT_INACTIVE,
                    message_card = card
                }
            end
        end
    end

(current code for reference, also I don't think that message triggers

red flower
#

have you tried without nil, true in set_ability

red cradle
gilded goblet
#

last sticker question before im done with stickers

can i move my sticker up dynamically (i.e. via code)? i want other cards to have my sticker at the bottom but have cards like these move the sticker up

#

bluh

clear ocean
#

is there a reason why when you click on stakes when starting on your modded stake it gives this error, is there something i miss

#

i wonder if there is a way to make like a G.C.SILVER

red flower
#

you need to remove the prefix from the applied stakes or it tries to get it from your mod

red flower
clear ocean
#

in like the main.file or it has to be a lovely patch

red flower
#

anywhere

clear ocean
#

are you supposed to have that in the main file?

red flower
vocal helm
loud summit
#

hey so what kind of crash completely bypasses the crash screen and closes the game outright

clear ocean
clear ocean
red flower
loud summit
#

no im trying to figure out why a mod is crashing and theres no crash screen

vocal helm
red flower
#

stack overflow

loud summit
#

ive seen stack overflow trigger the crash screen...

red flower
#

yeah but not always

loud summit
#

ok does TOGApack have any known crashes

clear ocean
#

to get the colour is it like C:G.C.SILVER?

loud summit
#

like at start of roun

red flower
#

ah wait i understand now

clear ocean
#
  1. is there a way to define something like c:silver
  2. is it like g.c.farceur_silver for getting a mod prefix
red flower
clear ocean
#

do you need to use loc_colour() every time you use it?

red flower
#

no just once when you define it

marble stratus
#

im beggimg pls halpe

red flower
#

sorry i dont think anyone here will be familiar with yahimod's codebase

clear ocean
#
G.C.SILVER = HEX("bec7d4")
loc_colour()
G.ARGS.LOC_COLOURS.fSilver = HEX('bec7d4')
#

yahia probably summoned a demon for yahimod

red flower
#

you can do G.ARGS.LOC_COLOURS.fSilver = G.C.SILVER

clear ocean
#

actually fire thanks

clear ocean
#

should i go for a darker gray

red cradle
winter flower
#

im trying to get it so that the randomized quote gets changed at a set range
and now all my variables are messed up

frosty rampart
# marble stratus aew maen

this is only tangentially related but i'd recommend making your own content in a separate mod that just has yahimod as a dependency

marble stratus
#

a h

#

idk how do that but ill find out#

winter flower
frosty rampart
near heart
#

how can i make a joker that is forced to the right side like with pinned?

cursive gazelle
near heart
#

pinned is left side

cursive gazelle
#

Ah

#

Make a sticker like pinned

#

Tho i think it’s an smods function

#

Not sure

#

Yup

#

It’s handled in cardarea.lua

#

You may wanna take a look at it

sonic cedar
#

how can you get the most played hand of the run OUTSIDE of context?

#

like this one used here (ingame left, code right)

#

like can i just recreate the loop and use it?

red cradle
sonic cedar
#

???

red cradle
sonic cedar
#

ahhh thats why

#

thank you

cursive gazelle
#

Hai toma

sonic cedar
#

hi s

cursive gazelle
#

Sorry he was faster

sonic cedar
# red cradle

the blurb linked to the collection crash bit so i was confused lmao

cursive gazelle
#

:D

red flower
gilded goblet
cursive gazelle
red cradle
sonic cedar
#

move the sticker down Trol

red flower
sonic cedar
vocal helm
# red flower have you tried without nil, true in set_ability
calculate = function(self, card, context)
        -- i think we have to do this for stone cards
        if context.modify_scoring_hand and not context.blueprint then
            if SMODS.has_enhancement(context.other_card, 'm_stone') then
                return {
                    add_to_hand = true
                }
            end
        end
        -- change stuff after scoring
        if context.post_joker then
            local stones = 0
            for _, playing_card in ipairs(context.scoring_hand) do
                if SMODS.has_enhancement(playing_card, 'm_stone') and 
                SMODS.pseudorandom_probability(card, 'j8mod_metamorphic', 1, card.ability.extra.odds) then
                    stones = stones + 1
                    G.E_MANAGER:add_event(Event({
                        trigger = 'after',
                        func = function()
                            playing_card:set_ability('m_glass')
                            return true
                        end
                    }))
                    return true
                end
            end
            if stones > 0 then
                return {
                    message = localize('k_upgrade'),
                    colour = G.C.TEXT_INACTIVE,
                    message_card = card
                }
            end
        end
    end

sorry for the ping; rewrote things a bit and while it seems to work for the very first stone card played, it doesn't seem like it affects any other ones
tried looking at splash to see if the other stones were just not counted but I don't think that helped either

sonic cedar
#

granted i hate ui so i have no idea but

red cradle
#

I'm afraid of people who write all the code in one huge file

sonic cedar
#

bunco gaming

red cradle
sonic cedar
red flower
#

also you dont need this for stone cards they always score lol

vocal helm
#

thanks :D

red cradle
#

thats the main problem

modern kindle
#

one huge file is awesome though

gilded goblet
#

overall then im done with stickers

sonic cedar
red cradle
sonic cedar
#

ohhhh

#

i got nothing then sorry

red flower
#

i mean i dont have anything else to say other than the previous answer of "use an ease event"

modern kindle
#

I dont really see how its ugly, its just a number change

red cradle
#

so

#

its boring

#

idk

clear ocean
#

you would like it to something like decrease by one or do a little juice

red cradle
clear ocean
#

you could do a small for loop where it's decrease by one by the number

clear ocean
#

it's a gimp moment lol

#

yeah that's better

red cradle
robust marsh
#

how would i go about removing the consumable card area for a specific deck

red cradle
clear ocean
#

probably a simple wait method

red flower
red cradle
red flower
red cradle
clear ocean
#

here are some ideas for stakes to split the sticker stakes:

  1. have the final boss ante at 10
  2. shop prices increase
  3. re-rolls increase or limited amount of re-rolls
  4. smaller selection in booster packs
  5. vouchers only appear every even ante
red cradle
red flower
#

ref_table = G.GAME.blind, ref_value = "chip_text"

red cradle
clear ocean
wintry solar
#

yeah the stake applied page is broken

clear ocean
#

aw man

#

maybe could do a scrollable list or make a second table like one for vanilla and modded stakes

wintry solar
#

it just needs to be fixed, it's on my list to do at some point

clear ocean
#

👍

red cradle
wintry solar
#

put func = (function(t) return math.floor(t) end) this in

sonic cedar
#

can i unlock check at the end of a run?

frosty dock
#

am i going insane or is there an issue with quantum enhancements when they're applied based on chance

wintry solar
#

wdym

frosty dock
#

i just tested this scenario for #945

#

and I've verified the chance itself goes through

#

but the quantum lucky cards never trigger

#

unless the chance for them to be lucky is guaranteed

sonic cedar
wintry solar
#

hmmm

#

I don't remember how often they're updated

#

I get 22 calls of check enhancement when I play one

frosty dock
#

the math ain't mathing there

#

on the bright side, the infinite getter loop fix works flawlessly

wintry solar
#

I just tried 3/4 to count as bonus and it worked fine

#

it also didnt loop infinitely

#

and I'm not on that PR

frosty dock
#

it's about combinations of getter contexts that call into each other

#

like above "Double probabilities on lucky cards" and "X in Y chance for playing cards to count as Lucky cards"

#

this inflooped for me on main

wintry solar
#

oh true I don't have the double prob bit

#

the X in Y works for me though

frosty dock
#

but the lucky triggers don't happen when prob mod isn't there either

wintry solar
#

there's definitely some jank going on though, it changes depending on the order I select the cards

#

can we delete all quantum things pls

frosty dock
wintry solar
#

the caching is definitely borked

frosty dock
#

at least the infloop fix has nothing to do with it so I'm still fine merging it

frosty dock
wintry solar
#

when does the cache get cleared?

frosty dock
#

I'm not gonna act like I remember anything about the quantum enhancements implementation

wintry solar
#

oh it gets cleared every frame lol

frosty dock
#

it should get cleared at least at the start of every update loop

versed swan
# wintry solar can we delete all quantum things pls

A bit off-topic but i really wanna express this thought: My biggest gripe with most of these features is that documentation for pre-existing features isn't even done; I've heard this from someone else: we shouldn't be introducing these new features when documentation for most existing features isn't even complete

I'd find these new features less problematic if we actually documented them, then at least we might have a bit of a better grasp on them and potentially improve implementations

wintry solar
#

There aren't that many old features that don't have some form of docs afaik

#

And writing docs for stuff isn't fun

frosty dock
#

afaik docs are mostly incomplete for newer features, like more recent calc contexts

spice wadi
#

I think the benefits of new features outweighs the problem of missing docs

#

Id rather have a useful feature and have to do some digging than not have it at all

wintry solar
#

there are a load of contexts missing because I haven't had the motivation to finish my rewrite of them

#

but if you are slightly familiar with how contexts work, they're easy enough to find in the code

spice wadi
versed swan
#

I've been hesitant to assist with documentation because I was grossly unfamiliar with SMODS code, but after several times that required me to look into such, I could - and should - help out at this point

red flower
versed swan
#

I've been working on documentation discipline for a while now - via mods and the modded wiki - so I really gotta put it to good use

wintry solar
#

I think it's mostly the blind calc ones that aren't there (and a handful of others) but those can all be done with the blind methods anyway

red flower
#

the blind calc ones are very useful (thank you aure)

versed swan
wintry solar
#

but if you want to help out with documenting stuff, feel free. I've always said that I don't have the time to be reviewing wiki PRs, but if people can comment on them and the consensus is they are good, I'm happy to merge them when notified

#

on the other hand, I'm also commited to writing up detailed stuff in the release notes for any new features that are added, that can be lifted directly to the wiki at some point when there's an idea of where it should sit (I do realise that this isn't ideal for linking to though)

clear ocean
#

jade or jadeite?

#
white - silver
red - ruby
green - jadeite

black - quartz
blue - jasper
purple - amethyst
orange - carnelian
gold - lapis
``` this is the gemstones i have come up with
long sun
#

jade, i say

#

oh, question

#

wait no nevermind ^u^;

gilded goblet
#

jaded stake /hj

gaunt phoenix
#

Does someone have an idea of why it's crashing ? couldn't fully figure out how juice_card_until works :/

gilded goblet
#

err i mean

#

stickers

#

:3c

clear ocean
#

both

long sun
#

okay wait new question

high verge
long sun
#

i'm a bit lost as to how i'd implement my Joker

#

so, my Joker has a MORE menu

#

(or, at least, i'd like it to have one)

#

when MORE is selected, it should open a menu with a text field

slim ferry
#

ui 😨

long sun
#

the ui's not the hard part here :3

gilded goblet
long sun
#

so

slim ferry
#

steal cryptid's code card text field

long sun
#

i have a variable called G.GAME.phanta_death_note_cards

slim ferry
#

🧠

long sun
slim ferry
#

oh okay

long sun
gaunt phoenix
long sun
#

when the MORE button is pressed, it should call the run_deathnote_menu function

#

first question: how can i pass in the card that the MORE was pressed on as an argument to this function?

#

wait i may already have this sorted

#

if ref_table is the same as e then i've solved that problem

#

okay i may actually have just coded everything myself ;u;

#

untested

#

okay wait actually, question

#

what exactly is ref_table?

#

wait no nevermind

#

rare case of localthunk documenting his code smhile

#

awesome sauce

lament agate
#

what functions should i hook to mess with the shop's content again

clear ocean
#

what do you think

frosty dock
#

???

lament agate
#

???

clear ocean
#

not sure if carnelian (the one below lapis) is too close to jasper

#

what do you think

#

plan to have half stickers and half adding some difficultly but not fully sure yet what would make it balanced

gilded goblet
#

i wish you luck in your stake/sticker journey

sonic cedar
clear ocean
#
silver :
ruby > no sell value

jadeite : 
quartz > no edition / only base edition 

jasper : 
amethyst > cannot be duplicated (ankh/invisible) or reappear (showman)

carnelian :
lapis > cannot be copied by another Joker (blueprint/brainstorm)
``` got the stickers down i think
gilded goblet
clear ocean
#

🙏

gilded goblet
#

do not wanna have people go through that 😭

clear ocean
#

feel free to suggest and any would be good, where in the placement:

  1. big blind gives no reward money
  2. limited about of rerolls
  3. rerolls cost extra
  4. items cost more
  5. one less booster selection
  6. mega and/or jumbo booster packs don't show
  7. vouchers only show each even OR odd ante
  8. final boss blind is increased to nine or ten
  9. interest per x is increased / interest max is lowered
frosty rampart
#

does context.post_trigger not work in a seal's calculate
literally this is all i have and it's not printing anything
(to reiterate, this is a seal, not a joker)

#

and yes i know it's an optional feature, i should have it enabled already

red flower
#

i think it only works on jokers but i could be wrong

frosty rampart
#

dang

sonic cedar
azure laurel
#

dumb question, whats the key for the tarot card the justice?

cursive gazelle
#

Set=“Tarot”

azure laurel
#

c in capital letters?

cursive gazelle
#

No

#

Lowercase

azure laurel
#

okay thanks

real night
#

how do you check when a playing card is retriggered

long sun
#

have i made my UI correctly? the text box is blank until i click on it, the prompt text doesn't appear, and the UI box shifts upwards when the textbox is selected

long sun
red flower
#

idk anything about text input sorry

long sun
#

👍

high verge
#

I'm so sad

#

I think there might be a frame limit after all

#

It looped early

long sun
#

mm, try looking at what Phanta does, it's worked well for me

sonic cedar
high verge
#

Wait no I'm a moron and put in the wrong frame count

long sun
#

oh lol :3

cursive gazelle
#

Miku jumpscare

high verge
#

Okay I just need to figure out getting in audio to play when the card is visible and pick a better joker ability and this is done

cursive gazelle
#

Just do it when it’s added to deck

high verge
#

Implying I know how to code this is bastardized from Aura

cursive gazelle
#

Ha

#

Just call the smods function when add_to_deck

#

Idk what it’s called SMODS.Sound of SMODS.Music

#

Idk

red flower
#

something like

SMODS.Sound {
    key = "music_badapple",
    path = "badapple.ogg",
    sync = false,
    pitch = 1,
    select_music_track = function()
        return next(SMODS.find_card("j_modprefix_key")) and math.huge or false
    end,
}
cursive gazelle
#

Does smods.find check every card area

long sun
#

perfect, i did something simiilar :D

cursive gazelle
#

Including the collection

red flower
#

no

#

just jokers

cursive gazelle
#

Just G.jokers

long sun
#

ya

red flower
#

checking any time it is on screen is a bit harder

cursive gazelle
#

Yeah

red flower
#

its probably not that hard but i cant think of a way rn its too late

cursive gazelle
#

Can’t you call it when the animation starts

#

You’re in Argentina wdym too late

#

It’s 1 Am for me

red flower
#

9 pm is late

long sun
high verge
#

Welp

cursive gazelle
#

Sorry unc

high verge
#

Aura crashes Malverk settings from opening

#

So this might not work after all

cursive gazelle
#

Why are you making animations with aura

high verge
#

Because I don't know how to otherwise xDD

cursive gazelle
#

I think bepis made an example

high verge
#

If you can send that to me that'd be great. I am late for a vr concert!

cursive gazelle
#

I think using aura is a bad choice because, that’s +1 dependency

high verge
#

Aura isn't a dependency it's another mod that adds animations to cards that I adapted to play on the bad apple card instead

cursive gazelle
#

Also you can ask them he’s pretty active but he also lives in asia so it’s too late for him now

clear ocean
#

i think eight would be bad since with the two stakes scaling it might make most runs hard

#

maybe the booster selection or the vouchers one what do you guys think

gilded goblet
#

these all sound like pain

clear ocean
gilded goblet
#

ante 1 = $5
ante 2 = $6
so on and so forth

clear ocean
#

both are static just a global increase by one

gilded goblet
#

oh lol

#

im stupid

#

that sounds cool

clear ocean
#

yeah its okay

#

are jasper and carnelian good?

gilded goblet
#

i cant even beat gold stake normally these would absolutely destroy me

clear ocean
#

same...

gilded goblet
clear ocean
#

i don't mind making a challange for others though 😅

clear ocean
cursive gazelle
clear ocean
#

interest cap but there's the vouchers woops

#

will need to come up with something else

cursive gazelle
#

No it’s fine

#

Red deck gives +1discard and blue stake take it from you

#

Lol

#

Also nice ideas i really like them

clear ocean
#

isnt blue stake getting a rework?

cursive gazelle
clear ocean
#

is DARK_EDITION for all editions

cursive gazelle
#

Honestly idk why’s it taking so long , are the ideas not planned yet ?

gilded goblet
cursive gazelle
#

Or is local thunk just on a vacation

gilded goblet
#

hes cookin

clear ocean
#

i mean even if its the latter localthunk deserves it but its more so that

#

it has to go through qa and making sure that localisation and cross platform support works

cursive gazelle
#

I think he said there’s going to be 1 new joker

gilded goblet
#

localthunk self insert??1!??

#

can you imagine

clear ocean
#

the fool joker

cursive gazelle
#

He’s not that type of person lol

clear ocean
#

he ain't

cursive gazelle
#

I think his self insert would be the fool since he used it as his pfp for a while

clear ocean
#

i mean i don't know him but that doesn't sound like something he would do from interviews and such

cursive gazelle
#

Tho

#

Some arcana cards are missing

#

If you noticed

#

Maybe

clear ocean
#

maybe...

cursive gazelle
#

And it’s a big maybe

#

Anyways
Great stake ideas

#

I’m definitely stealing some and reverting the effect

clear ocean
#

welcome to computer science finders keepers 😈

gilded goblet
#

LMFAO

#

its all fun and games until you come up with an idea but its already been done

gilded goblet
#

been there done that

cursive gazelle
#

I think

#

Idk what it does

#

I’ve done something similar with my mod but using no calculate function

clear ocean
#

like i mean i may or may not even finish it lol

#

which sounds better: can't reappear or be duplicated OR can't reappear or duplicate

real night
#

also wouldn't that just be for triggers

cursive gazelle
#

I have no idea

gilded goblet
clear ocean
gilded goblet
#

love me a {C:attention}???{} Jokers

clear ocean
#

haven't came up with a name yet sorry

abstract sphinx
#

is there a way to see a value in another joker? i.e. reading the amount of mult that jolly joker will add. for my usecase i dont want to just read "oh jolly joker! that means 8 mult" because with mods that change other jokers' values i want it to see that and be "oh a joker with 12 mult!" if it's been changed

clear ocean
cursive gazelle
#

It’s jank

#

But should work

lament agate
#

how do you check if a card is debuffed

cursive gazelle
#

ability.debuff ?

lament agate
#

ability.debuff?

clear ocean
#

could have cards with the rerolls and booster packs and vouchers in the other

cursive gazelle
lament agate
#

if ability.debuff?

cursive gazelle
#

Card.debuff i think

#

Context.other_card

long sun
#

problem

lament agate
#

context.other_card and card.debuff?

cursive gazelle
#

I think context.individual ignores debuffed cards so try using a for loop

long sun
#

i can patch in the ability to type apostrophes, but patching in the ability to type zeroes crashes the game

cursive gazelle
long sun
#

hook, in button_callbacks, is nil

#

every other digit is fine

#

why does zero crash the game?

cursive gazelle
#

🤷‍♀️

cursive gazelle
#

Stare at if for long enough

#

It ticks after the 3rd hour

clear ocean
clear ocean
real night
#

PLEASE I NEED TO KNOW HOW TO DO SOMETGING WHEN A CARD IS RETRIGGERED

#

😭

cursive gazelle
#

Use jokerforge

#

🔥

real night
clear ocean
#

actually jokerforge might have a function for that it wouldn't hurt to check

primal robin
real night
#

let me see if it does

cursive gazelle
#

Look at you

#

After all what you said about jf

clear ocean
#

or i can just come up with another stake idea

real night
abstract sphinx
#

actually i don't believe jokerforge has anything for that last i checked

abstract sphinx
#

i might very well be blind tho

cursive gazelle
#

I think i have something like that

#

Wait

#

This function increases values

#

You can make it return values in a table instead

abstract sphinx
#

ooo

cursive gazelle
clear ocean
#

how about 1 interest 5 increased to $10 or maybe $8?

real night
#

not even gonna get the first joker of suggestion box done 😔

cursive gazelle
#

Just work on something else

clear ocean
clear ocean
cursive gazelle
#

That makes it 5x harder for each 1$

#

Not really just 5 more dollars

#

Lol

clear ocean
#

what is another idea that can work then

real night
#

okay let me do something easier

#

how do you check if the played hand contains like a specific amount of stone cards

real night
#

oh yeahhh

clear ocean
#

maybe -1 hand size or -1 joker slot?

#

not sure if the latter two are good names

cursive gazelle
#

Why’s this in vouchers

#

Oh nvm

clear ocean
#

sorry my mouse was hovering over vouchers when i took the screenshot 😅

#

not sure tailcoat and napkin are good names

cursive gazelle
#

Yeahhh…

#

Napkin jokers

#

Lol

clear ocean
#

ill keep them blank until i have a good name

#

are plain is a good name too

clear ocean
gilded goblet
#

painted deck would go crazy

clear ocean
#

wait what is that joker chip doing there

gilded goblet
#

lil easter egg (i dont actually know why, mightve been unused)

urban wasp
gilded goblet
#

it looks kinda tough ngl

cursive gazelle
vocal helm
clear ocean
#

honestly its been fun to mess around and oh yeah since i don't plan to go all in feel free to take my ideas for your own mod

long sun
#

OH MY GODDDDD IT ACTUALLY WORKSSSS

hidden mirage
#

how to make ajoker destroy scored cards as they score? context.destroy_cards seems to be after scoring

cursive gazelle
long sun
#

it's great how it works with anything in P_CENTERS except for the things that i specified shouldn't work

#

(like Boosters, Vouchers, etc.)

primal robin
#

Good one 🥔

daring scroll
#

Just researching and learning the modding process. If I wanted my mod to tweak another mod (for instance, the abilities of another mod's Jokers), that would be done with a Lovely patch, right?

cursive gazelle
#

Take ownership

#

Lovely patches change the vanilla code

high verge
#

Okay so I'm trying to get the bepis animation setup but I'm getting an error on the joker attempt to call global 'AddRunningAnimation' [a nil value]

high verge
#

How would one define it

cursive gazelle
#

Idk how your code looks like

high verge
#
    key = "badapple",
    config = {
        extra = {
            victim = 1,
            scale = 1,
            rotation = 1,
            odds = 6572,
            constant = 0,
            respect = 0,
            no = 0,
            var1 = 0
        }
    },
    pos = {
        x = 0,
        y = 0
    },
    AddRunningAnimation({'j_badappleanimated_badapple',0.1,99,21,'loop',0,0,card}),
    display_size = {
        w = 71 * 1, 
        h = 95 * 1
    },
    cost = 2,
    rarity = 1,
    blueprint_compat = true,
    eternal_compat = true,
    perishable_compat = true,
    unlocked = true,
    discovered = true,
    atlas = 'badapple',
actual joker code yada yada}``` The Joker
#

The animate object code is the raw one from Bepis since I don't think you're supposed to touch that

#
-- SMODS.load_file("Aura.lua")()
assert(SMODS.load_file("BepisFever.lua"))() -- Testing


-- Jokers
local NFS = require("nativefs")
to_big = to_big or function(a) return a end
lenient_bignum = lenient_bignum or function(a) return a end

local function load_jokers_folder()
    local mod_path = SMODS.current_mod.path
    local jokers_path = mod_path .. "/jokers"
    local files = NFS.getDirectoryItemsInfo(jokers_path)
    for i = 1, #files do
        local file_name = files[i].name
        if file_name:sub(-4) == ".lua" then
            assert(SMODS.load_file("jokers/" .. file_name))()
        end
    end
end

load_jokers_folder()``` This is in the main lua
cursive gazelle
#

Yeah the function you’re calling doesn’t exist

#

And is not a joker parameter

high verge
cursive gazelle
#

You can’t just add it like that

high verge
#

Her'es the bepis code

cursive gazelle
#

(I’m on phone ) 😭

high verge
#

🫓

#

Unless I'm reading it wrong they said to put it there in the Joker definition and to just load the animation lua before the jokers

long sun
#

how do you instantly lose a run?

high verge
high verge
#

It's been great for testing quips

long sun
#

cheers :D

vocal helm