#💻・modding-dev

1 messages · Page 378 of 1

red flower
#

so I would wait or use that instead

cyan lagoon
#

i saw somewhere a line related to that, so may be i can just patch that

heady siren
#

How would I go about creating a card that's one of my own consumeables? I'm trying to do it based on Judgement / Emperor logic, but it doesn't wanna work, it just throws an error instead

hard needle
#

what is G.STAGE?

heady siren
#

Class letter first?

red flower
#

yes

heady siren
#

Yeah, I'm kinda dumb

hard mica
#

any how i can make this joker idea ? it basically gives + mult the wider your hand is so lets say:

1 played card = +1 mult

2 played cards = +2 mult for each card

3 played cards = +3 mult for each card

4 played cards = +4 for each card

5 played cards = +5 for each card

heady siren
red flower
heady siren
hard mica
#

damn

daring fern
hard mica
#

wait i forgot to add smth lemme retryt rq

hard mica
pure salmon
#

oh you want +(hand size) mult per card

#

in that case you want the square of the hand size

red flower
hard mica
red flower
#

no you weren't

hard mica
#

etc etc

red flower
#

well you didn't say each played card
anyway my thing also does that

#

you need to use it in context.individual

pure salmon
#

return { mult = #context.full_hand ^ 2} if you want the +mult to trigger on the joker

red flower
#

or that

pure salmon
#

anyways how do i get the key of a joker

#

i can't find it in the smods docs anywhere

daring fern
sleek siren
#

Is there a way I can have a special effect when a custom rank is played, not by any voucher or joker, but just naturally?

hard mica
cyan warren
#

pretty new to modding,is there a way to get the current game speed?

#

tried going on the source but speedfactor doesnt work

red flower
hard mica
#

found

#

how to do it

#

just looked at lusty joker

zealous glen
#

@minor magnet

zealous glen
cyan warren
#

like when you retrigger too much and the game starts speeding up

zealous glen
cyan warren
#

bc it is returning nil for me

zealous glen
cyan warren
#

update on joker

#

and trying to set a variable as that number

zealous glen
cyan warren
#

wdym

#

like the order im accessing?

ivory coral
#

im not familiar with it but wouldnt G.GAME.SPEEDFACTOR only change during the animation and not calculation

zealous glen
#

At which moment are you accessing it

zealous glen
cyan warren
#

heres the screenshot i think its easier

zealous glen
primal robin
zealous glen
#

First, you rarely should need to use update

#

This is not one of those situations

cyan warren
#

yea im gonna use a timer after a finish the code

#

its just to test if it gets the time right

zealous glen
#

You only need to access speedfactor when you actually use it

#

So, once during calculation, and once when generating the description

#

Second, as I said before, SPEEDFACTOR is only used at specific moments

#

So outside of those specific moments, it's possible it doesn't exist

red flower
#

yeah i think the problem is that calculations are before animations

zealous glen
#

That too

primal robin
#

Calculations always before animations

ivory coral
#

its already done by then

#

maybe you could theoretically calculate what the speedfactor would be at that point as a substitute? but i wouldnt even know where to begin there

cyan warren
#

gonna try doing that then

#

ty

placid star
#

would it be better to use draw = ffunc or update = func for jokers that change sprites?

placid star
pure salmon
#

hmm, i think this error is happening at SMODS.add_card(). to clarify, if i wanted to add a card with key "purple_rain", and my mod prefix is "gb", it should generate the card if i provide the key "gb_purple_rain", right?

daring fern
pure salmon
#

oh, that explains it then

#

thank you

neat leaf
#

Is there a template mod I can start from? The example mod I've been using has far more things than expected and takes some effort to rename the variables and whatnot.

hot granite
#

I absolutely hate how blinds are currently handled lmao what a pain

shut crater
#

but idk that there's necessarily a "template"

hot granite
#

just had some frustrations trying to get my blinds to be recognized

#

it's all good now, as you can see by the image above

sleek cliff
#

I'm changing how the Barbara joker works to be when Big Bling is started, would I have to put something like blind.big for it to sense a big blind being started?

digital niche
#

calculate = function(self, card, context)
        if context.destroy_card and context.cardarea == G.play and context.destroy_card == card and pseudorandom("stain") < G.GAME.probabilities.normal / card.ability.extra.odds then
            return { 
                remove = true 
            }
#

this isnt working for some reason

shut crater
digital niche
shut crater
#

yeah I actually don't see an issue with that code

#

does it crash or just do nothing?

digital niche
shut crater
#

if you remove the random check does it work?

digital niche
#

if i use like the rigged thing from cryptid to test it works, but otherwise just never

hot granite
#

I already said above, just had a lot of fun learning how it works

zealous glen
zealous glen
digital niche
hot granite
#

Eh, I think it was more like a skill issue on my part, being unfamiliar with lua

zealous glen
cursive sentinel
#

is there some sort of coroutine in lua?

wintry solar
#

it's not a boolean

digital niche
#

nothing that uses pseudorandom from my mod is working

wintry solar
#

what does the config of your joker look like?

zealous glen
digital niche
#
 config = {
        extra = {
            x_mult = 2.5, 
            odds = 5
        }
    },
    loc_vars = function(self, info_queue, card)
        return {
            vars = {
                card.ability.extra.odds, 
                card.ability.extra.x_mult, 
                (G.GAME.probabilities.normal or 1)
            }
        }
    end,
wintry solar
#

of your enhancement then

#

try wrapping the calculation part

cursive sentinel
#

bump, not ultra important but would like to know if i misunderstood something

digital niche
pure salmon
#

this currently isn't appearing in spectral or arcana packs, am i misreading the SMODS.Consumable docs?

digital niche
#

"hidden = true"

zealous glen
pure salmon
digital niche
#

if its hidden it doesnt show in collection im afraid

pure salmon
digital niche
#

try setting hidden to false

pure salmon
digital niche
cursive sentinel
#

set:edition happens turbo fast

zealous glen
#

But knowing whether the effect succeeds or not doesn't need to wait

wintry solar
zealous glen
#

Maybe the loop structure works better in terms of timing

digital niche
#

ooh, gotcha, okok, 1 sec!

cursive sentinel
#

so, taking off the 1st event and trying again?

digital niche
sleek siren
#

Is there a way I can make text appear in the corner of the screen for a short amount of time?

pure salmon
# pure salmon

does anyone have experience with soul-like cards? i can't think of a mod off the top of my head that would use these

cursive sentinel
cursive sentinel
#

and putting the card_eval in a event is ew

sleek siren
zealous glen
#

what do you want exactly

sleek siren
#

I want there to be a minecraft chat message in the bottom left that says "Null joined the game", and then disappears after

zealous glen
#

Sounds doable

wooden nexus
#

Gonna ask again since it got bumped away

red flower
#

first instinct is to modify the max_highlighted in the ability of each tarot/spectral when it's obtained and also when the joker is added/removed

#

take_ownership will work as well but it's more work

digital niche
#

how do i make something not show up in shop/packs?

red flower
digital niche
red flower
#

no, it's a specific string depending on the type of pack

#

ar1 is tarots in arcana, buf is buffoon

#

ar2 is spectrals in arcana

#

i dont know the rest

sleek siren
#

How do I add a flag into a save? I'm attempting to have a joker only appear once a card dies, sort of like gros michel, but it can still appear in shop later

digital niche
red flower
#

card:open i think?

digital niche
#

tyty!

wraith kiln
#

can anyone help me on this?

#

i think the code is fine i just dont know how to get the suit of the playing card

red flower
#

playing_card.base.suit

#

but also insert doesn't do what you want here

#

you want to do foundsuit[playing_card.base.suit] = true

wraith kiln
red flower
#

also you can't do #foundsuits

#

because it's not an integer indexed table

wraith kiln
#

also does anyone know if its possible to get like

#

the autofill tips

#

idrk how to call them

#

im just not sure i setup the thing correctly

red flower
#

you can add SMODS to your workspace and it has a bunch of them

#

i think you also need to enable indexing? idk

wraith kiln
#

sry idrk all that much about vcs

red flower
#

no, go to file > add folder to workspace

#

i think you need to have a folder open for that

wraith kiln
spice wadi
#

whats the easiest way to see if the score has been reached while in a calculate function? i have a joker that retriggers itself until the required score is reached, and im guessing i might need to "predict"/calculate the current score myself but how do i get the required score

red flower
wraith kiln
#

oh that works thanksomuch

red flower
#

that's the hand score

spice wadi
red flower
#

they're globals so just that

#

G.GAME.chips is the current scored chips (i think)
G.GAME.blind.chips is the requirement

spice wadi
#

until((hand_chips * mult) >= (G.GAME.blind.chips * G.GAME.blind.mult))
would this be right or is G.GAME.blind.chips the entire score requirement?

wraith kiln
#

for some reason this dosen't do anything which i'm guessing is because the table is empty

red flower
#

chips is the entire requirement, there's no mult requirement

spice wadi
#

interesting

#

that seems a little stupid 💀

red flower
wraith kiln
#

missed this message

spice wadi
#

chips being used interchangeably to mean chips as in blue score but also the entire score requirement depending on context

wraith kiln
#

how can i check the size of a table then

red flower
#

i mean you need points to beat a point requirement

red flower
sleek siren
#

Sorry for the repost, but my message got bumped a but,

is there a way I can make a joker that appears when a card is destroyed, like Cavendish, but, the destroyed card can still be picked up in the shop?

wraith kiln
spice wadi
sleek siren
#

Oh! How so?

zealous glen
sleek siren
#

Yay! ^^ Where can I find it?

sleek siren
#

Thanks! ^^

red flower
sleek siren
#

Okie dokie, thank you!

wraith kiln
spice wadi
#

should be my last question, what should i change here to circumvent the problem that returning the mult prevents it from looping?

if context.joker_main then
            print("final step")
            repeat
                if to_big(G.GAME.dollars) - 1 >= to_big(G.GAME.bankrupt_at) then
                    print("mmm money")
                    G.GAME.dollar_buffer = (G.GAME.dollar_buffer or 0) -card.ability.extra.dollars
                    return {
                        xmult = card.ability.extra.xmult,
                        dollars = -card.ability.extra.dollars,
                        func = function() -- This is for timing purposes, it runs after the dollar manipulation
                            G.E_MANAGER:add_event(Event({
                                func = function()
                                    G.GAME.dollar_buffer = 0
                                    return true
                                end
                            }))
                        end
                    }
                end
            until((hand_chips * mult) >= G.GAME.blind.chips)
        end
#

im guessing its about the context im using but im not sure which would be better

#

or how else to trigger the mult effect

red flower
#

calculate the xmult and dollars separately and return once after the loop

#

or if you want it to be multiple animations then append a bunch of extra tables

spice wadi
#

didnt know that was possible, how roughly does that look

#

nevermind

#

missed it on the wiki

sleek siren
#

It works!!!! Thank you!

digital niche
#

is there any documentation on unlock things?

rugged helm
#

is there a not-annoyingly-coded blind .lua file that i coudl reference anywhere?

heavy orchid
#

hey guys! I wanted to change the name of a voucher on balatro, how could I do that? I wanna make some other things too but I need some help in how start doing it!

quick kraken
#

How does one make a custom joker set like Cryptid's M jokers?

#

I need a set to give to create_card() because otherwise I would have to completely re-implement the rarity system and duplicate tracking

frosty dock
digital niche
#

im trying to make the card be destroyed on use, would this work?


 calculate = function(self,card,context)
        if context.cardarea == G.play and context.main_scoring then
            return {
                x_mult = card.ability.extra.x_mult
            }
        end
        if context.destroy_card and context.cardarea == G.play and context.main_scoring then
            return { 
                remove = true 
            }
        end
end
}
frosty dock
#

no, main_scoring is a different context

quick kraken
frosty dock
#

remove that and you should be good

spice wadi
digital niche
quick kraken
#

What does it mean that there's such few parameters?

#

How does one make a joker part of that type?

frosty dock
#

the page needs some work, but it's no different than how it works for consumable types. i.e., you create the ObjectType and either provide the keys you want in the object type as cards or use pools on the objects being created (I should check if that's documented elsewhere?)

#

then use the key as the set being passed to create_card

quick kraken
#

I think I might get it

frosty dock
nova eagle
#

what funciton would i call to create a spectral pack?

quick kraken
#

Can I streamline this with a set or do I have to implement the same in_pool for every joker of this set?

frosty dock
quick kraken
nova eagle
#

or is this completely wrong?

frosty dock
frosty dock
quick kraken
#

Seems like I'm still better off copy-pasting the same in_pool then

frosty dock
frosty dock
#

you can just define it once as a variable and then put that reference into each object

quick kraken
#

Yeah that makes more sense

#

but at the same time it's also just one line so eh

frosty dock
#

what if you want to change it in the future

nova eagle
#

something tells me thats not the right way to create an etherial tag

frosty dock
#

(it's just a simple find and replace so no big deal, but not defining the same function in multiple places prevents inconsistencies emerging)

frosty dock
#

that also just isn't how lua works at all

nova eagle
#

oh, i didnt see that

quick kraken
#

SInce again, the logic is all implemented within one line

frosty dock
#

more of a general code style thing than potential for a problem with this function in particular

#

up to you

nova eagle
#

cool that fixed it, thanks

frosty dock
#

np

spice wadi
#
local return_table = {
                xmult = card.ability.extra.xmult,
                dollars = -card.ability.extra.dollars,
                
            }

            for i = 1, triggers do
                return_table.extra = return_table
            end
            print("made table with extras")

            return_table.func = function()
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            G.GAME.dollar_buffer = 0
                            return true
                        end
                }))
            end
            print("added func")

            G.GAME.dollar_buffer = (G.GAME.dollar_buffer or 0) - (triggers * card.ability.extra.dollars)
            print("buffer")

            return return_table```

is this the correct way of using extra tables to stack the same effect repeatedly?
if so, why does it cause stack overflow when i return the table, and if this is a bad method should i instead try to retrigger the joker or smth?
quick kraken
#

Thanks for the suggestion anyways

#

And thanks for the help with object type

frosty dock
spice wadi
#

sounds about right 😭

frosty dock
#

you've basically referenced the table within itself

#

so when steamodded looks for extra tables, it will keep recursively finding the same table because it keeps referring back to itself

spice wadi
#

ah, i thought it was more just leaving the data

#

what do i need to change then

nova eagle
#

how do i set it so that my joker only triggers if the points scored are exactly whats required for the blind? right now it seems like its only more, or less

#

G.GAME.blind.chips = 1

returns an error

#

and </> is too broad

spice wadi
#

should be == right?

nova eagle
#

ohhh

frosty dock
# spice wadi what do i need to change then

something along the lines of this

local ret = {
  xmult = card.ability.extra.xmult,
  dollars = -card.ability.extra.dollars
}
local head = ret
local copy = copy_table(ret)
for i=1, triggers-1 do
    ret.extra = copy_table(copy)
    ret = ret.extra
end
-- do dollar buffer stuff here if you need to
return head
#

couple things going on here, note that extra returns work like linked lists. if you need more tables, you need to attach them at the end of the list (to the most deeply nested table). also using a fresh copy for each layer so no self-reference can happen

#

and ret already contains one trigger, so if you want triggers amount of triggers, you need to do one less than that for the loop

spice wadi
#

i was gonna do the last part but forgot

#

out of interest why does it need to be copied so many times?

#

the table i mean

frosty dock
#

the first copy is just so i have a free dupe that's not gonna change if i mess with the return table

#

then i copy that copy again each time i attach it to the return table as not to have the original copy modified when i continue adding tables to that copy

hard flume
#

Hey!

frosty dock
#

oh one more thing, it's safer to use SMODS.shallow_copy instead of copy_table for this in case you ever have cards in your return table. cards really don't like being deep copied

spice wadi
#

thank you for explaining this to me

hard flume
#

I'm having trouble with getting a playing card to move from one area to another. What method would I use to get the specific playing card I attached a button to to move to another card area?

spice wadi
#

incredibly helpful

#

oh actually id like to ask

frosty dock
#

i know it sounds confusing

spice wadi
#

you return head but ret is the one thats changed?

frosty dock
#

could use some better naming there haha

spice wadi
#

is that intentional because wouldnt head be the original table or am i wrong

frosty dock
#

head points to the start of the list

#

ret however points to the end of the list

#

in linked list language, it's the tail

#

basically there's two different references i need to have

#

one has to contain the topmost layer of return tables, containing all of the extra tables within. this top layer is the head, and its reference doesn't change

wooden nexus
#

What's going on here?

frosty dock
#

one has to point to the bottom layer, the one that currently doesn't have any extra tables attached. i need this one because it's the only table in the whole list that can have another extra table attached to it

#

but it holds no reference to the outer layers, which is what i need the head for

spice wadi
#

i think im understanding this

frosty dock
spice wadi
#

so despite not making any changes to head, it still gets them because youre changing ret or smth like that?

#

apologies if i got it wrong

#

my brain is a little fries

wooden nexus
#

been trying for a bit to no avail

frosty dock
#

i was gonna go to sleep after this, it's getting late

spice wadi
#

yeah same

wooden nexus
#

RIP

spice wadi
#

i didnt even notice i put fries instead of fried

hard flume
wooden nexus
#

Never getting this joker completed at this rate

frosty dock
#

at that point you have two references to the same memory

#

when you set ret.extra, that change is happening to both ret and head because they are the same

#

in then changing ret to ret.extra, ret is now the same as head.extra

#

do that again, now you have ret and head.extra.extra being the same

spice wadi
#

i think i just about get this

#

very interesting tbh

#

it works btw, thank you so much

#

and for taking the time to explain it all

heavy orchid
#

how can I spawn a voucher with debug plus?

frosty dock
spice wadi
#

for future reference, does this sharing-memory thing apply when you set any variable to be another one? sorry if i didnt explain that right

#

i just wanna make sure in other areas where ive tried to copy a variable, i dont mess with the original

spice wadi
frosty dock
frosty dock
frosty dock
#

though functions are immutable I think, so it only really matters for tables

sleek siren
#

How does saving work in Balatro? Where is all of the data that is being saved per run get stored to?

frosty dock
#

it gets compressed and saved to a profile-specific save.jkr file

spice wadi
frosty dock
tepid crow
#

what else but massive table

frosty dock
#

lua consists of nothing else

sleek siren
#

Where can I find the table to add my own things?

frosty dock
#

G.GAME

sleek siren
#

And out of curiosity, how do I decompress it?

#

Ohhh!!! Cool! Thank you ^^

heavy orchid
#

What I do after I extract balatro and edit the files I wanted? I dont know how to apply into the game

frosty dock
#

generally you shouldn't just edit files, just make it a mod

heavy orchid
#

Its because I wanted to rename a voucher

#

But I dont know how I apply it

frosty dock
#

See this wiki page for how to do that with steamodded

GitHub

A Balatro Modding Framework. Contribute to Steamodded/smods development by creating an account on GitHub.

heavy orchid
#

Okay! I will take a look! (Sorry btw Im kinda dumb on this type of thing)

sleek siren
#

Also, is there a way I could have an effect happen when a certain rank is played?

Not as a joker, but as the rank itself?

frosty dock
sleek siren
#

Oh cool! ^^ ok!

frosty dock
placid star
#

doesnt almanac do that?

frosty dock
#

i didn't say it's not possible

#

steamodded just doesn't support it

sleek siren
#

Oh, alrighty ^^

Is there a way I can implement a "secret" joker of sorts, that acts behind the scenes but doesn't show up? So it's just always there?

nova eagle
#

how do i debuff a joker after a certain ante?

placid star
frosty dock
sleek siren
#

Ooooooo ok! ^^ Thanks!

sleek siren
#

Is there a way to make sure the voucher doesn't show up in the collected vouchers page?

quick kraken
#

Is apply() the tag equivalent of calculate()?

#

I need a tag to store last blind's reward money and tags seem to be not cooperative

frosty dock
#

tags are one of the few things left that don't have support for calculate yet. so apply is all you get smh

quick kraken
#

Can I do that through apply?

frosty dock
#

it only supports what vanilla tags need

quick kraken
#

Or do I have to do someting convoluted?

frosty dock
#

you probably do, or wait for tags to get support for calculate

quick kraken
#

I'm also not sure about what tag:yep does

#

Or how apply works

frosty dock
frosty dock
sleek siren
#

ahhhhhh, that's fair

Thank you! ^^

quick kraken
#

makes cents

sleek siren
#

have a goodnight ^^

nova eagle
#

can someone help me figure out why this is only giving me regular mult instead of xmult?

placid star
#

return Xmult = instead

nova eagle
#

oh, i didnt catch that

#

thanks

sleek siren
#

Is there a way I can modify values of a SMODS.Rank mid game sort of like how you can with jokers?

rugged helm
#

how could i make a blind have a chance to destroy a played card?

placid star
red flower
#

you can use calculate with context.destroy_card

glad osprey
#

how do i make my music sync

#

what i have here doesnt sync

brazen tusk
#

what contexts would be used for obtaining a joker (specifically itself)

primal robin
#

Should I keybinds system I'm using for Handy mod transfer into separate mod with convenient API at some point?

red flower
brazen tusk
#

ah alr ty

#

wait like

brazen tusk
#

idk if thats still the same

red flower
#

add_to_deck runs when the joker is obtained

brazen tusk
#

ah ok cool

gentle rain
#

whats the variable for the amount of chips you currently have? G.GAME.hand_chips returns a nil value

glad osprey
#

G.GAME.chips iirc

#

for round total right?

gentle rain
#

i meant as in like, the blue chips next to your mult btw

#

no

glad osprey
#

ah

#

just chips then i think

#

no wait

#

hand_chips

gentle rain
#

i think i tried hand_chips before but ill try again

#

mightve done G.GAME.hand_chips

#

ah, seems like chips still dont wanna be altered during context.before

#

what file are contexts stored in again

#

as in where contexts are defined

#

and how does one do lovely patches

#

^ experiencing the horros

wheat jewel
#

How does one allow for a specific sound effect to play when a joker triggers

wheat jewel
#

Should i use the filepath for the sound effect when using that function

glad osprey
#

no

#

SMODS.Sound

wheat jewel
#

Ok

#

Not sure if i use the key as a parameter

glad osprey
#

read the docs

gentle rain
glad osprey
#

thats the love2d wiki'

gentle rain
#

oh

#

lol

#

ok i found on the lovely page where theyre docummented

rugged helm
#

how would i destroy a random card from the played hand

last sentinel
#

Is there a built-in toggle for "if the player has the upgraded version of this voucher, do not calculate" or should that just be done manually by searching for the upgraded voucher

#

e.g. Voucher A gives $5 every round, Voucher A2 gives $10 every round and is only available if A is already purchased(with requires:). Since the player would have both voucher A and A2 would it award $15 total?

gentle rain
#

more examples of varying contradiction

last sentinel
#

Fascinating

tight notch
#

does anyone see any bracket related errors the game crashes on launch saying it excepted to close a bracket but i dont see an error

gentle rain
gentle rain
gentle rain
#

cause thats a bit outdated

manic rune
#

missing a ,

tight notch
#

aah ok

#

I wasn't using the make a joker video i was using the api docs, small knowledge of lua, and using other mods as a ref

shut crater
#

it will highlight syntax errors like that

gentle rain
#

like this

tight notch
#

the game is now telling me that a comma is excpected after a hashtag

gentle rain
#

can you post a screenshot of the crash

tight notch
#

trying to screenshot doesnt work

#

it just unfocuses the window when i press either screenshot key

gentle rain
hexed heath
#

is there a way to tell when a card is added to a cardarea?

gentle rain
hexed heath
#

a specific card type

hexed heath
#

i've tried adding a add_to_deck but the card doesnt seem to have a .area in it

gentle rain
hexed heath
#

a specific consumable

gentle rain
#

what consumable >.>

tight notch
#

ah nvm

glad osprey
vale glen
foggy carbon
#

What are the names of the per-suit high contrast settings (or is this a mod thing)?

#

not the global setting

unreal cosmos
#

fourth time asking. can someone please explain to me why boss blind screen looks like this

gilded narwhal
#

hey gang how do I make a joker that retriggers itself a bunch of times

shut crater
unreal cosmos
#

i have 87 mods installed

#

is there a fast way to comb through mods?

gilded narwhal
#

Disable a random half of them, see if anything changes

#

If it doesn't then do it again

#

And repeat until you've found the section its in

unreal cosmos
gilded narwhal
#

ctrl z

#

oh wait did you like disable them or delete the files

unreal cosmos
red flower
#

remove the .lovelyignore in the folder

unreal cosmos
red flower
#

in the mods folder that you disabled

unreal cosmos
rugged helm
unreal cosmos
#

;(

lofty sand
#

is there any way I can hook specific game events, like perkeo's ability?

rugged helm
red flower
#

calculate

rugged helm
#

what are the args for blind:calculate

red flower
#

same ones as a joker's

rugged helm
#

oh it just . iterates an effect over every played card?

#

cool

shut crater
lofty sand
red flower
#

you can't really

#

you should patch for that

lofty sand
#

not familliar with patching, how would I go about that

red flower
#

but also what is the X to your XY problem, what do you want to do

#

maybe there's an easier way than whatever you're thinking

lofty sand
#

it works fine for literally any other joker, there's like 8 of them that work like this lmao

#

it's really annoying

red flower
#

yeah you would need a patch or take_ownership for that

#

but also all vanilla jokers return at least nil, true as far as i know, is there no way to check for that?

lofty sand
#

yeah that's what I tried to do at first, however those jokers return nil like eighty times when their abilities are copied for some reason

#

hold on, i might have a clip. it's really funny

red flower
#

i mean yeah every calculate call returns nil

#

you need to check for the , true part

#

but if you ask me for my opinion I wouldn't even bother to patch the jokers, just make a table of which jokers have problems and do it manually

#

not like the solution would be very mod-friendly anyway

hollow locust
#

Hey, N
Could I get some help on my poker hand, again?
-# please

lofty sand
red flower
#

you have 10 minutes before i try to go to sleep again

lofty sand
#

sure, just a sec

hollow locust
#

I make the Flush Five with the cards, it shows Flush Five and not the other thing

red flower
#

flush five is probably higher

hollow locust
#

In value, or?

red flower
#

yeah

lofty sand
rugged helm
hollow locust
#

Nope, i changed the chips & Mult values. Still returns flush five

red flower
#

shouldn't it be adj.config.center.key == "j_certificate" for example?

red flower
hollow locust
#

Hm.

red flower
hollow locust
#

One sec.

lofty sand
hollow locust
lofty sand
#

I guess I should check by printing the jokers key

#

let me try that real quick

red flower
#

i wouldn't modify dollars directly either

#

use ease_dollars(-card.sell_cost)

lofty sand
#

what's the difference? I thought they did pretty much the same thing

red flower
#

it does a couple more things to update the text

#

also you would be setting the dollars to 0 even if you're in the negatives

lofty sand
#

should it be doing that based on my code? cause it doesn't

red flower
#

well i think it doesn't reach that part of the code at all so it makes sense

#

oh another thing, if left_joker is nil I don't think ipairs will go through both

#

i might be wrong tho

lofty sand
#

I did have that issue at one point, I don't remember what I did to fix it

#

I don't think it's an issue anymore?

red flower
#

ok, again I'm looking at the part of the code you say isn't working

foggy carbon
lofty sand
foggy carbon
#

that's what I meant to forward

red flower
#

why

foggy carbon
#

I made some jokers use update to change their sprites dependent on the high contrast setting, but update updates every frame so that feels wasteful

wheat jewel
#

how do i get my mod to recognize the json prefix in order to play a sound from the assets’ sound folder

#

Read up on the smods api documentation but i’m feeling a bit lost atm

red flower
analog spoke
#

how would I make a joker which made a certain rarity be more common while held? Such as "Uncommon jokers are x3 as common"

#

not sure wording on this idea, lol, but, how would I make it?

rugged helm
#

wait

analog spoke
#

OOO, OR WHAT ABOUT BOTH? HAVE IT BE MULTIPLITIVE?

red flower
vale glen
red flower
analog spoke
#

sorry, lol, should have been clearer on that, lol

red flower
#

key:lower() _mod

#

it's in the docs

analog spoke
#

ahh, sorry 😭 the docs are wrong so often I've kinda stopped checking some times, adbfsjhsf

rapid stag
#

chat, i forget. cirDerp if i HAVE to start from a joker's self, how do i get to config.extra? cirDerp

#

or is it ability

red flower
#

self.config.extra

#

why do you need to start from self tho

rapid stag
#

because i'm working on implementing something that starts from Card:calculate_seal(context) and looks for a function in self

#

it's very funky cirSlain

crisp coral
#

self there refers to the Card object

rugged helm
#

this is dissolving and TRYING to display the message but the message only displays where the card was a little bit after it gets dissolved

red flower
rapid stag
#

that's what i was wondering about, yeah. since self here is the joker

red flower
#

oh wait

#

remove the start_dissolve

glad osprey
vale glen
red flower
#

don't use start_dissolve to destroy a playing card in scoring

#

that's the answer

vale glen
#

Ah

rugged helm
#

it's also showing ERROR! instead of Burned! but that's a diff issue

red flower
#

i said context.destroy_card

#

not individual

#

and it's not going to say burned if you don't have a k_burned_ex in your localization file

rugged helm
red flower
#

it seems to be inside descriptions

analog spoke
rugged helm
analog spoke
#

ahh thank you

red flower
#

what's your smods version

rugged helm
#

1.0.0

red flower
#

more specific

rugged helm
#

OH

#

theres a version.lua

#

1.0.0~BETA-0406a-STEAMODDED

red flower
#

yeah or on the main screen

#

can you try updating

wheat jewel
#

i'm trying to have a specific sound play for failing a probability but it keeps crashing when i try to play it even if i have everything set up for the sound to play for the joker i'm making

#

if anyone has any tips let me know

gentle rain
#

bleurgh whys it keep saying its incompatible when im defining it as compatible in the code (doing blueprint = true)

#

hell im even hard coding in blueprint interactions

rugged helm
#

updated, trying it now

gentle rain
wheat jewel
gentle rain
rugged helm
#

WOOO it works

glad osprey
#

saturday...

gentle rain
glad osprey
red flower
#

oh i just wanted to see the blueprint thing but squidguset already answered by the time i typed it

gentle rain
#

well i think i know the issue neways

brazen tusk
#

pov you were just about to ask if theres anything other than soul_pos you need to get soul sprites working and i read soul_post on my screen 💀

analog spoke
# red flower rarity

ok, so, how do I translate this into actually usable code? what do the .. represent?

vale glen
#

String concatenation

wheat jewel
red flower
analog spoke
#

hmm ok, so, that'd be... let me try this

red flower
wheat jewel
#

Probably

analog spoke
wheat jewel
red flower
red flower
wheat jewel
#

i might have to put it in the assets folder hold up

#

just realized it

#

ty

analog spoke
red flower
#

yes

#

the better way would be
G.GAME[...] = not from_debuff and (G.GAME[...] or 1) * 2 or G.GAME[...] in add
G.GAME[...] = not from_debuff and G.GAME[...]/ 2 or G.GAME[...] in remove

analog spoke
#

mmmmmh, I see, thank you

red flower
#

wait give me a sec

#

there

vale glen
#

Ah heck, forgot to think about debuffed cards for Axy's code

rapid stag
#

what does [...] do

red flower
vale glen
#

It's just shorthand, replace it with your own values in actual code

analog spoke
rapid stag
#

i see cirDerp

red flower
vale glen
#

Ouh

analog spoke
#

fair lol, I just took a midday nap not too long ago, woke up at 8 pm lmao

red flower
#

in this case you want to change it when it's debuffed

#

but anyway the code you sent is ok

brazen tusk
#

would you be able to change an atlas position in an if statement and if so what function would it be done in?

burnt warren
#

surley you could switch the frames with one of those

sleek siren
#

Is there a way I can make a custom consumable appear more often?

gentle rain
#

is there any way to add a message to this function? as in, the card creating this event has a little message below itself when it triggers

vale glen
gentle rain
#

nightmare nightmare nightmare nightmare

#

unrelated does vs code have a find and replace tool

burnt warren
sleek cliff
#

so, im trying to have it only sense if the Big Blind is started, so how would I set it up, cause I know theres setting_blind.boss but that would only be boss

#

ive tried boss.big but it crashed

vale glen
#

What happens with setting_blind.big?

sleek cliff
vale glen
#

You're doing if context.setting_blind and context.setting_blind.big, yes?

#

Not sure how that context is like

#

Should read the docs prolly

sleek cliff
#

i'll try that

#

i've looked at what I got and all I can find is setting_blind.boss

vale glen
#

Prolly need to change some value in G.GAME

#

Would get out of bed to check the code, but lazy...

sleek cliff
#

Real

sturdy compass
#

context.setting_blind is a boolean, why are you trying to index it?

red flower
sleek siren
#

Is there a way to set a rarity to a consumable?

sleek cliff
red flower
#

to the if condition yes

sleek cliff
#

Oki

burnt warren
#

ive been trying to figure out ui but i have no clue where to start

#

i peeped around the documentation and some other mods code but nothing really makes sense to me

sturdy compass
#

UI is not fun at all lmao

#

Best of luck with it

lucid owl
#

trying to add a crossmod deck skin with paperback's stars, why the hell is my deckskin's loc_txt being set as the base? (for reference pic #2 should say "PEPPERED")

#

i may just go ask them but wanted to see if you guys knew

sleek cliff
#

oki, now Barbara finally works

burnt warren
oblique pond
#

how would i check what the key of a sold card is?

misty yacht
#

hiii where can i start on getting decompiled balatro?

oblique pond
#

currently trying to do it like this but it does not work

misty yacht
#

im just trying to see how balatro makes the deck based on seed

oblique pond
misty yacht
#

how do i run it though?

oblique pond
#

idk

misty yacht
#

._.

oblique pond
#

i just use that to look at code for how vanilla does things

scarlet storm
oblique pond
#

but yeah

scarlet storm
#

probably

green dust
#

Hi, I'm trying to change the rank of cards in a deck. What value do the numbered cards like one have? It doesn't seem to work whether I have it as "1" or "One" but if I put "Ace" it successfully updates the cards?

native zinc
#

14

scarlet storm
#

it goes 2-14

green dust
#

💀

#

How did I forget

oblique pond
#

the UnStable experience hits hard

green dust
#

For two or the other numbers would it be Two or 2?

green dust
#

Thanks!

vale glen
#

Ah, right. Speaking of card changing effects, Axy wanted to change just the displayed sprite of a played card into a blank one, but not change it's functionality like rank or bonus or the like. Not sure which field should be changed in a card to do that. Guessing it would be restored in a remove_from_deck function as well, but not certain yet.

misty yacht
#

does this line make the erratic deck?

-- game.lua line 2342
if self.GAME.starting_params.erratic_suits_and_ranks then _, k = pseudorandom_element(G.P_CARDS, pseudoseed('erratic')) end
scarlet storm
#

btw how would I make it so when I sell a joker, it creates a new joker that isnt already in hand

I wanna make it so that when I sell a joker, it creates a new joker that the player doesn't already have

scarlet storm
turbid maple
#

Is there no way to cancel a specific event or do I need to resort to either fiddling with timers on my own or patch the event queue

#

only thing like that seems to be clearing an entire queue which sounds like a nuclear option

shut crater
#

but also I do not have an intimate knowledge of the event system so that might simply not work

turbid maple
#

mm

#

I was trying to use trigger = "after" with a delay set

#

and have the event be cancellable within said delay

shut crater
#

yeah that sounds very difficult

#

godspeed soldier

turbid maple
#

i'm just gonna patch the event queue

#

sounds a lot simpler

shut crater
#

reasonable

lucid owl
#

trying to add a crossmod deck skin, why the hell is my deckskin's loc_txt being set as the base? (for reference pic #2 should say "PEPPERED")

#

ignore the jank of the deckskin palettes code

tired kestrel
lucid owl
#

it's pretty simple

daring fern
sleek cliff
#

now its time for the difficult multi layered one

frosty rampart
lucid owl
#

i still have no clue why it's setting that as the base deck text, and giving a placeholder for the one i want it to be on

frosty rampart
#

i wonder if maybe it's a priority issue

lucid owl
frosty rampart
#

yea, so try setting your mod's priority to 1

sleek cliff
#

im just trying to discover this joker, but the code keeps making it crash??

#

nvm????

lucid owl
compact girder
#

Hey! I'm working on a balatro mod but I cant seem to get it to trigger at all, what am I doing wrong?

SMODS.Joker{
key = 'jokerkaite',
loc_txt = {
name = 'Kaite',
text = {
'Gains {C:red}+2 {C:black}Mult every time {C:gold}High Card {C:black}is played.',
'{C:green}1 in 4 {C:black}chance to upgrade {C:gold}High Card {C:black}when played.',
'{C:inactive}(Currently {C:red}+#1# {C:inactive}Mult)'
}
},
atlas = 'Jokers3',
pos = {x = 0, y = 0},
config = {
extra = {
base_mult = 0,
growth = 2,
}
},
rarity = 3,
cost = 8,
loc_vars = function(self, info_queue, center)
return {vars = {center.ability.extra.base_mult}}
end,
calculate = function(self, card, context)
local message = 'A'
local color = G.C.BLUE
if context.hand and context.hand.hand_type == 'High Card' then
card.ability.extra.base_mult = card.ability.extra.base_mult + card.ability.extra.growth
local message = '+2'
local color = G.C.RED

    if math.random() < 0.25 then
      ---UPGRADE HIGH CARD
            local message = 'Upgraded!'
        local color = G.C.PURPLE
      end
    end
  end

  if context.joker_main then
    return {
      mult = card.ability.extra.base_mult
    }
  end
end

}

daring fern
#

You can’t just do local message =

turbid maple
#

okay got my dumb idea working

crisp coral
#

this is EVIL

#

i alt tab like 50 times during every run

vale glen
#

Imagining this with a misprint deck

compact girder
turbid maple
#

I am exclusively adding stupid evil ideas to this mod

#

big fan of this one

lucid owl
vale glen
#

Play cards in time to the music, or they get debuffed

daring fern
scarlet storm
turbid maple
#

its peak cinema

scarlet storm
#

I need to make more jokers .....

compact girder
#

what would I put instead

scarlet storm
#

ive been stuck on 2
one i just can't execute and the other i can't balance properly

sturdy compass
unborn bay
scarlet storm
sleek cliff
turbid maple
#

skill issue im afraid

unborn bay
#

i actually fucking hate how sharex or any fucking screen grab app does that btw

#

i have no idea why

#

im on borderless

turbid maple
#

sorry im a poser i actually never watched dr who i just wanted this effect and didn't want to call it scp-173

sleek cliff
#

lucky for you i have a slideshow :)

compact girder
frosty rampart
unborn bay
#

this what you were looking for

bleak crane
#

quick question, how do i make a joker self destruct after however many rounds?

sleek cliff
compact girder
manic rune
#

what are you trying to do

compact girder
manic rune
#

i see

#

if context.before and context.main_eval and context.scoring_name == 'High Card' then should work

compact girder
#

Ill try that

manic rune
sleek cliff
#

oh fun

manic rune
#

what do u want to do here?

sleek cliff
manic rune
#

doesnt seem like it needs context.end_of_round

oblique pond
#

is this how to properly check if a sold consumable is a certain consumable?

manic rune
#

use this instead

manic rune
oblique pond
#

thank you

compact girder
#

How can I make a message pop up before the return function

manic rune
#

SMODS.calculate_effect({message = "..."}, card) --card refers to which card the message will pop up on/below

#

-# use it outside return btw

#

somethingcom you are poking literally all of my messages sob

sleek cliff
manic rune
#

context.other_card only exists for some contexts

sleek cliff
#

ah

manic rune
#

you can check here to see if the context has it or not

sleek cliff
manic rune
#

show code

#

:3

sleek cliff
#

this is the problem line
if not context.repetition and context.game_over == false and not context.blueprint and context.other_context.ability.extra.is_dalek then

manic rune
#

change
if not context.repetition and context.game_over == false and not context.blueprint and context.other_context.ability.extra.is_dalek then

to
if context.post_trigger and context.other_card.ability.extra and context.other_card.ability.extra.is_dalek then

sleek cliff
#

Yaaaay no more crash

analog spoke
#

I wish more people played my mod, feels barren sometimes in my thread 😔 who shall I ever ask balancing questions too, lmao, hehehe nhfhsdjhb sorry this is all nonsense aint it? I'm so tired, I shouldn't be up rn, it's almost 3am bnjhbfjhsd

gaunt thistle
#

share thread

manic rune
#

^

sleek cliff
#

Just gotta let the Katarina explode and have it create planets

analog spoke
gaunt thistle
#

I'm not afraid of talisman

#

cool, thanks, I'll check it out later

sleek cliff
#

IT CRASHED WHEN I REROLLED WITH FLASHCARD WHAT

manic rune
#

whats the crash log

#

i think i already know whats wrong, but just gotta be sure

sleek cliff
manic rune
#

i

#

damn.

daring fern
# sleek cliff

card.ability.extra doesn't always exist and its not always a table.

sleek cliff
manic rune
#

yeah i forgot it can be a number or just anything instead

#

if context.post_trigger and context.other_card.ability.extra and type(context.other_card.ability.extra) == "table" and context.other_card.ability.extra.is_dalek then

#

change the thing i said to that

sleek cliff
#

There were go, much better

#

Took 5 antes to be destroyed but it gets destroyed by the Dalek!!

#

Ok, now how the hell do I make this woman make Planets when she explodes

daring fern
sleek cliff
#

Which section should I put that, and 2 of them (if they have room)

#

GYAHAHA IT WORKS

#

I still need to figure out how to create 2 instead of just one

daring fern
sleek cliff
#

Oh cool

#

Love how simple yet complex this shit is

bleak crane
#

how would i made it so a joker makes a card act like any suit? kinda like smear joker

daring fern
#

Why when one buys a booster pack with negative cost, no money is gained or lost?

wheat jewel
#

i keep getting an error when trying to play specific music when having a specific joker

daring fern
#

Your key can't have spaces.

wheat jewel
#

oh ok

#

trying that now

manic rune
#

priority stuff, idk

wheat jewel
#

really?

daring fern
manic rune
#

does returning true automatically consider the music track as having the highest priority

wheat jewel
#

i removed the space but i'm still getting an assertion error

sleek cliff
#

14 working jokers >:)

manic rune
#

🤔

#

how does the game determine which music track to run, then?

daring fern
wheat jewel
#

I commented it out for now and everything is working fine i just need to figure out what is causing an assertion error

#

Do i have to have the prefix infront of the key?

#

for the joker

#

like j_prefix_jokername?

vast night
#

Why dosen't it print anything when i buy any card
calculate = function(self, card, context)
if context.buying_card then
print(card.cost)
return {

        }
    end
end
daring fern
#

Yes?

wheat jewel
#

mainly looking at the find card function

daring fern
#

Where are you using the key?

wheat jewel
#

that's the key for the joker i'm working on

daring fern
wheat jewel
#

ok will try that now

slow brook
#

If I want to make a one-time power up consumable that has a unique effect for every joker, would that be hard to make or could I maybe write a function for every joker, like WhenPoweredUp(), and the consumable would only call that function and done (I have 0 modding experience so I don’t even know if I can make my own function for a Joker)

daring fern
#

That would take way too long.

#

It would probably be better to make a custom context though.

bleak crane
#

is this correct or should it be 4 of a kind?

daring fern
bleak crane
#

right

#

alright

#

how would i check the suit of a scored card?

last sentinel
#

If i had a voucher that awarded money at the end of round (similar to Golden joker or Investment tag) would it just be a return = {dollars = N} in context.end_of_round?

daring fern
wheat jewel
#

the commented out method is causing an assertion error, tried to do a jimball thing with playing the dk rap when getting a specific joker but i'm getting nonstop crashes

#

might be doing something wrong but i tried to look at the jimball code but couldn't find the portion that plays the music

daring fern
wheat jewel
daring fern
#

Also your returning a table I think because next() returns a table.

bleak crane
#

why does this not work,?

daring fern
wheat jewel
daring fern
#

Also it's xmult not Xmult

last sentinel
#

that code will only run if the Joker is Hearts and also Diamonds and also Spades and also Clubs, of which it cant be any

#

might be wrong but pretty sure "card" there the Joker?

bleak crane
#

bwa

#

how do i check if theres every suit in the played hand

last sentinel
#

context.scoring_hand[i] will give you the i'th card that is scored

wheat jewel
#

Was mainly referencing this when searching for jimball stuff to reference

last sentinel
#

as in
context.scoring_hand[1] = 1st scored card,
context.scoring_hand[2] = 2nd scored card... etc

bleak crane
#

ah ok

#

so like this?

last sentinel
#

check each of the cards scored and check to see if there's one of each suit, keeping in mind what Somethingcom said that a wild card will return true for all of those suit checks

bleak crane
#

wait would this not look for these suits in this exact order?

if context.scoring_hand[1]:is_suit("Hearts") and context.scoring_hand[2]:is_suit("Diamonds") and context.scoring_hand[3]:is_suit("Spades") and context.scoring_hand[4]:is_suit("Clubs") then
last sentinel
wintry solar
#

It would

wintry solar
bleak crane
# wintry solar It would

how would i check to make sure each suit is in the played hand without looking for a specific order

last sentinel
wintry solar
#

Can you send it

bleak crane
last sentinel
# bleak crane how would i check to make sure each suit is in the played hand without looking f...

use a for loop that runs from i = 1 to i = #context.scoring_hand(the size of the scoring hand), and replace the 1,2,3,4 in your previous code with i.

That would then check the first card for which suits it is, and then the second card, etc. You'll need some internal logic/variables to make sure each suit exists, that way one wild card wouldnt just pass through the whole thing, if you would want that to be prevented/

bleak crane
#

i have no idea what that mmeans

#

qwq

wheat jewel
#

tryna figure out how to make a joker play music similar to jimball but i'm getting assertion errors rn

last sentinel
wheat jewel
#

referenced some code from others in this channel but i'm kinda stuck atm

wheat jewel
#

had that earlier and changed it to find.joker cuz i thought it would change smthn but it didn't unfortunately

wintry solar
daring fern
last sentinel
wintry solar
#

Oh

#

Throw a and context.main_eval in

bleak crane
#

alright new question
how do i make it so when my joker is sold, it creates a different joker (that isnt held in hand)

#

i wanna make it so when the left card is sold, it creates the right card

daring fern
scarlet storm
#

alright n now how do I make a joker destroy itself after scoring

daring fern
scarlet storm
#

yayy :3

wheat jewel
#

don't know why the errors happen even if i use the mod prefix and the right key when using find_card

last sentinel
# wintry solar Oh

ah okay, it's awarding the money now. it just tosses it onto the current money instead of in the summary a-la Golden/Investment Tag, but sounds like that would require me patching calc_dollar_bonus into Voucher context yeah?

scarlet storm
#

wait and how do I make it not show up in shops

daring fern
wheat jewel
scarlet storm
bleak crane
daring fern
daring fern
scarlet storm
#

ough

scarlet storm
daring fern
bleak crane
scarlet storm
#

I assume by mod prefix you mean this

bleak crane
scarlet storm
#

and the jokers key is saviour2

flat pier
#

I'm trying to make a joker that keeps track of the number of type played, like fortune teller, but struggling to figure out where to keep track of that, and how to increase it when that card type is scored

daring fern
bleak crane
daring fern
bleak crane
#

ok the selling function works now

#

new issue

#

the new card instantly dissolves without scoring

wheat jewel
#

does anyone have an example of how jimball plays music when selected

glass scaffold
wheat jewel
#

Thank you so much

daring fern
bleak crane
daring fern
scarlet storm
#

sorry for asking so many questions hh

glass scaffold
glass scaffold
daring fern
wheat jewel
# glass scaffold Hope this helps.

i have a question, do we have to set the "j_" portion of a joker name somewhere because it think that's what is causing assertion errors for me rn

#

this is what i had before

glass scaffold
daring fern
bleak crane
# daring fern Yes.

I only have a few more questions then i'll stop bothering u ><

  1. how do I make a card shake like DNA when its ready to activate,
  2. how do I play the sfx that plasma deck plays when it does the "balanced" thing
daring fern
bleak crane
#

tysm

#

for the juice card, where do i put that?

bleak crane
wheat jewel
#

might be missing something

bleak crane