#💻・modding-dev

1 messages · Page 311 of 1

cursive sentinel
#

(also now that i have a decent amount of jokers, id like to check if the debuff works well, what is the shortcut to debuff jokers?)

#

with debug mod

zealous glen
#

I don’t think there is one

#

I don’t know how to respond to this

daring fern
iron haven
#

Test your code by playing Balatro after saving in a section to check for errors.

rapid stag
#

but

but how do i get the current game speed. i want to change an event delay to make timing consistent across game speeds

cursive sentinel
daring fern
zealous glen
#

As long as you don’t change the Timer they use

runic pecan
#

Is "retrigger discarded card" a thing or am I imagining things up?

cursive sentinel
cursive sentinel
#

thank you !

cursive sentinel
#

if a joker still is active even though debuffed, is there a context i can add to double check it IS debuffed?

hushed field
cursive sentinel
#

its for a previous joker that only triggers when it detects that player has earned a certain amount of dollars within a blind

#

it still is triggered and does the dollar counting despite being debuffed

hushed field
#

hmm, interesting. I assume it paysout with the payout function (I forgot what it's called), right?

#

Might be a gap in the code, because base balatro doesn't allow for a joker to be debuffed outside of a blind, I don't think

cursive sentinel
#

well my dollar checking is a bit primitive, i can paste the code here

cursive sentinel
#

so if not context.card.debuff?

red flower
#

context is for information that a context gives you. so it depends on what you want to check and where

#

when I say card I refer to a generic card, the exact location of which depends on what you're trying to do

cursive sentinel
#

but how do i force a card's effect to deactivate when debuffed?

red flower
#

If it's not deactivating then just check for not card.debuff

#

If that doesn't work I'm going to need more info because I haven't been reading the convo

hushed field
#

can you show the code? I'm curious to see why it doesn't debuff.

cursive sentinel
#
if context.setting_blind then
                card.ability.extra.moneytrack = (G.GAME.dollars + (G.GAME.dollar_buffer or 0))
                card.ability.extra.moneyearned = 0
                card.ability.extra.spe = 0
            end

            if G.GAME.blind.in_blind and card.ability.extra.moneytrack ~= (G.GAME.dollars + (G.GAME.dollar_buffer or 0)) then
                if card.ability.extra.moneytrack < (G.GAME.dollars + (G.GAME.dollar_buffer or 0)) then
                    card.ability.extra.moneyearned = card.ability.extra.moneyearned +
                                                         ((G.GAME.dollars + (G.GAME.dollar_buffer or 0)) -
                                                             card.ability.extra.moneytrack)
                    card.ability.extra.moneytrack = (G.GAME.dollars + (G.GAME.dollar_buffer or 0))
                end

                if card.ability.extra.moneytrack > (G.GAME.dollars + (G.GAME.dollar_buffer or 0)) then
                    card.ability.extra.moneytrack = (G.GAME.dollars + (G.GAME.dollar_buffer or 0))
                end

                if card.ability.extra.moneyearned >= card.ability.extra.moneycap then
                    card.ability.extra.spe = card.ability.extra.spe or 0
                    card.ability.extra.spe = card.ability.extra.spe + 1
                    if card.ability.extra.spe == 1 then
                        local eval = function(card)
                            return (card.ability.extra.moneyearned >= card.ability.extra.moneycap)
                        end
                        juice_card_until(card, eval, true)
                        return {
                            message = 'PD',
                            colour = G.C.MONEY,
                            card = card
                        }
                    end
                end
            end
#
if context.end_of_round and context.game_over == false and context.main_eval then
                card.ability.extra.moneyearned = 0
            end```
red flower
#

all of that shouldn't work on debuff

cursive sentinel
#

it does work on debuff

#

i have the return message, the jiggle

#

but

#

the effect after of xmult doesnt apply

#
if context.joker_main then
            if card.ability.extra.moneyearned >= card.ability.extra.moneycap then
                return {
                    xmult = card.ability.extra.xmult
                }
            end
        end```
#

this comes rigth after the brick

#

it's weird asf

red flower
#

hmm there's probably some contexts like other_joker that run on debuff or something, doing things in calculate outside of a context is wacky

cursive sentinel
#

i don't think i have things outside of context here?

red flower
#

just add a not card.debuff to your ifs

cursive sentinel
#

alright

rapid stag
#

what should i do if i want to update an achievement description during runtime cirDerp

red flower
cursive sentinel
#

ive doubled check, i have nothing outside

wintry solar
#

theres definitely things outside context

cursive sentinel
#

did i paste it wrong?

wintry solar
#

if G.GAME.blind.in_blind and card.ability.extra.moneytrack ~= (G.GAME.dollars + (G.GAME.dollar_buffer or 0)) then this line for example

cursive sentinel
hushed field
#

almost everything is outside of context in that code, no?

cursive sentinel
#

should i add a context ?

wintry solar
#

yes you don't want thjis to run every single time a calculate is called

cursive sentinel
#

if if G.card_area = Jokers?

#

or smth like that?

wintry solar
#

what does the effect do?

red flower
#

i disagree i think they want this to be a constantly updating function, no?

hushed field
#

Does smods have a native 'money earned' context?

cursive sentinel
#

it's meant to detect the amount of dollars earned within a blind

wintry solar
#

then it should be in an update function, not a calculate

zealous glen
red flower
#

i agree with that

cursive sentinel
#

what's an update function?

#

i'm really newbie

#

its like c#?

hushed field
#

If it's about earning money, I'd potentially set up a custom context call that's hooked onto ease_dollars 🤔 unless that's not consistently used in the vanilla code?

red flower
#

giving u reddit gold

cursive sentinel
#

how do you set up a custom context?

#

i dont think ive seen it in calculate function doc

#

or im a bad reader

hushed field
#
function ease_dollars(mod, x)
    base_ease_dollars(mod, x)

    for i = 1, #G.jokers.cards do 
        local effects = G.jokers.cards[i]:calculate_joker({kino_ease_dollars = mod})
    end
    
end``` I've got this in my code, though that's an old implementation from before I knew SMODS.calculate_context() exists, which should save you the step of iterating over all the jokers
zealous glen
red flower
#

are u calling eldlich reddit thats mean

zealous glen
hushed field
cursive sentinel
#

so i'd put it outside of the smods.joker part?

zealous glen
hushed field
#

let me rewrite it to be a proper context, because that'd need to happen anyway, so there's an actual example of SMODS.calculate_context() to show off

hushed field
# zealous glen Why not use the function that runs all calculation

because this is just a snippet of old code that I wrote before I knew about that function's existence, haha. But after sending it to show that you can just pass anything as an argument to a calculate function, I realized the janky implementation is probably more confusing than helpful, haha

cursive sentinel
#

thank you very much for taking the time to explain, yall are very cool

gusty peak
hushed field
daring fern
#

Rise.

cursive sentinel
hushed field
# daring fern Rise.

do base cards not have an empty calculate function to hook into? The other option is a dummy voucher

zealous glen
#

Invisible Joker

hushed field
cursive sentinel
#

incredible

zealous glen
#

The video is irrelevant but look above the Joker CardArea

cursive sentinel
#

and i put it outside of the smods.jokers, without anything surrounding it?

red flower
#

each mod should have its own calculate function tbh

zealous glen
zealous glen
#

I think there should be something like a GameRule object

hushed field
zealous glen
#

That users can create a CardArea to add to

red flower
zealous glen
#

From our discussion, I think a per-mod calculate function isn’t as useful

#

Because you can’t control the timing

#

And you can’t split it into chunks

zealous glen
#

So an object made for that purpose inheriting from Card would be better

red flower
zealous glen
red flower
#

eh i can live with that

zealous glen
#

Because you need to collect different parts together manually

#

Instead of the pipeline handling it for you

red flower
#

makes sense

zealous glen
red flower
#

no

#

i think the only objects ive created that inherit from something is the uiboxes in jokerdisplay

cursive sentinel
hushed field
cursive sentinel
#

is there a way to not take money loss into account? like only positive ease_dollars?

#

like if ease_dollars >= 0

scarlet thorn
hushed field
reef belfry
#

i am the bearer of my own misery

cursive sentinel
#

before the calculate?

hushed field
crisp coral
#

i still don't understand, can you screenshot that message again

cursive sentinel
#

oh so it'd work, nice

scarlet thorn
crisp coral
#

thank you n

scarlet thorn
# red flower

That makes sense, but I can't think of anything I would add that wouldn't be attached to cards or a deck

zealous glen
#

Stakes

#

Zodiacs

#

Tags

red flower
#

I use it for my mods banishing mechanic

zealous glen
#

Things that debuff themselves

hushed field
#

biomes, weather condition, day night mechanics

red flower
#

every vanilla balatro mod wants to add a day and night cycle

hushed field
#

it's all the rage rn

crisp coral
#

blind skills

pearl jacinth
#

why is it trying to index t

#

what does t even mean

scarlet thorn
#

Day for 3 blinds, night for 2. Every 10 rerols in the shop progresses time by 1 blind

crisp coral
#

local t = func(), func returns nil, t crashes

pearl jacinth
#

what is t used for

red flower
#

read the code and find out

hushed field
#

my current notes for day night cycles is based on blinds played, with weather being determined by rerolls and hands played, depending on the biome, of course

crisp coral
#

local variable name

#

read the code

scarlet thorn
#

You'd have to tell us. If you have mods, the line number changes from base smods

#

Plus different versions also changes it

pearl jacinth
#

it's probably from my own mod

scarlet thorn
#

It's in an smods Lua file

#

Go to mods/lovely/dump/smods/_/src and open utils lua

red flower
#

i love patching into smods, it's very funny seeing people on mac have the weirdest things happen to them

pearl jacinth
#

it crashes every time i open a booster pack from my own mod

manic rune
#

i present to you

#

the chicken

red flower
#

chicken

#

that's very cool btw i really like it

manic rune
#

aw thanks :3

#

decided to go a tad bit unserious for this one, since sushang and guinaifen r goofy

scarlet thorn
scarlet thorn
unborn bay
#

same with the reroll butan

pearl jacinth
#

i'll post a snippet of the code for booster packs

#

mod code

zealous glen
unborn bay
hushed field
#

I wish I was better at debugging, because following these stack traces can be quite a struggle

unborn bay
hushed field
#

solved it, just took me fucking too long to figure out. forgot to pass a config in my UIBox declaration. Was more so venting 😛

scarlet thorn
unborn bay
#

looks like a crash in SMODS.create_card

hushed field
unborn bay
#

t is a shorthand for tabl- yeah

manic rune
#

why does this lowkey remind me of

#

that bomb bird in angry birds 😭

scarlet thorn
crisp coral
#

t is shorthand for this fucking function that i hate

scarlet thorn
manic rune
#

you predicted it

#

how

scarlet thorn
#

The non negative one looks like the chick who drops an egg

scarlet thorn
red flower
#

chat does anyone want to write all the wiki pages for all 329 jokers in my mod

hushed field
#

i feel like your jokers are so archetype bound that individual pages might not be necessary, haha

unborn bay
#

i feel like i wanna make a wiki page for my mod but i don't think it has enough content to warrant one yet

red flower
#

you should

#

i have seen the github get traction from there so it's cool

scarlet thorn
#

I got a Google sheet lol

hushed field
red flower
unborn bay
#

262 views from google dot com

manic rune
#

how

#

how in the loving fuck

#

do i draw this on a 71x95 canvas??

#

😭

unborn bay
#

you don't

#

or excessively downsize

manic rune
#

there we go

crisp coral
#

oh stars, give this bepis a blessing

red flower
manic rune
#

its honestly not about the size at this point - its "where tf do i begin"

#

😭

unborn bay
hushed field
# red flower

oh, sick, is that a git addon you've set up? this isn't base functionality, right?

red flower
#

it is

manic rune
#

like, AT LEAST the chinese fan gave me a clear view on where to begin, the fan itself then the details

this looks straight out of art hell

unborn bay
# unborn bay

one funny thing to add to this is to make everything booster packs

#

voucher booster packs

unborn bay
#

....i actually wonder if voucher booster packs have already been done

hushed field
#

yeah basically all Kino's traffic is from the wiki, haha

crisp coral
# unborn bay

oh right i need to add an re-extraction mechanic to my boosters

unborn bay
#

please don't completely override generate_ui i am patching smods to add the butan 🙏

crisp coral
#

the what

manic rune
#

butan

red flower
#

butan

unborn bay
#

böton

crisp coral
#

butan

manic rune
#

is there a trick to draw these easily

limber blaze
#

most of my mods traffic is apparantly from an empty wiki page that i didnt even make wtf lol

manic rune
#

or do i have to manually draw them??

tall apex
unborn bay
#

perfect.

crisp coral
#

alternate between a lighter and a darker white ig

tall apex
#

Fuck it I’ll make that

unborn bay
#

im adding a booster pack card area

#

card area dedicated to booster packs

red flower
#

i actually need to add a booster pack booster pack to my mod eventually

crisp coral
#

also yes a voucher pack has already been made by betmma

limber blaze
#

not the same thing but i did this:

red flower
#

i might just add a second shop screen instead

#

when the mod reaches 1k jokers

unborn bay
#

ui code !!!!!

manic rune
#

buy actual yugioh packs

#

gacha

#

❤️

unborn bay
#

gacha ,,,,,

tall apex
manic rune
#

you should definitely add ghost rare and such N'

limber blaze
manic rune
#

does absolutely nothing but look cool + rare

tall apex
unborn bay
#

i should probably look into seeing if card areas can easily have columns like the collection menu has

red flower
tall apex
limber blaze
#

pretty sure the collection is just multiple card areas layered

manic rune
limber blaze
#

since you cant move cards up and down

unborn bay
#

💔 i have to do it manually 🥀

limber blaze
#

but i think its possible cause aikoyori was making solitaire in balatro

#

i just dont think its natively supported

shell timber
#

i have 17 views from... a russian steam guide with an unofficial translation? neat

limber blaze
#

i should really expand my mods wiki page but im lazy

unborn bay
#

im trying to make the stupid 9 blues 1 gold joke with a booster pack

limber blaze
manic rune
#

where do yall check that

crisp coral
#

i havent checked my insights for a while

shell timber
#

github page > insights > traffic

red flower
crisp coral
#

DEEPSEEK????????????????????????

red flower
#

lmao

shell timber
#

?????

manic rune
#

whats duckduckgo anyways

crisp coral
#

theres no fucking way someone asked like "where do i download balatro lobotomy mod" on deepseek

red flower
#

cooler google

crisp coral
manic rune
#

oh ic

hushed field
#

do the numbers from the mod manager's downloads get added in these too?

crisp coral
#

no

manic rune
#

😭

red flower
manic rune
shell timber
manic rune
#

we just dont know

unborn bay
#

using chatgpt like google 🥀

#

I've seen people actually do that it's crazy

manic rune
#

...damn.

hushed field
#

also, seems like a few days ago basically everyone's mod got forked by the same user

shell timber
#

yeah i saw that too

#

it's for a modpack i think

crisp coral
#

i dont believe people actually do that 😭

shell timber
manic rune
#

my mod didnt get a fork lol

crisp coral
#

is it? all they've done is fork and run the image optimizer thing

shell timber
manic rune
#

-# likely because its unfinished ❤️

tall apex
#

fork..,,

unborn bay
#

spoon ,,,,,

crisp coral
#

...interesting?

#

it seems like just another all in one modpack

#

give me allthemods or give me death

unborn bay
#

will this reach 3000 jokers

manic rune
#

does it even run

#

i would be surprised if it does

crisp coral
#

kino and pokermon are there

shell timber
#

they disabled pokermon

crisp coral
#

no joyous tho

crisp coral
unborn bay
#

joyous ,,,,

red flower
#

sadautumn

unborn bay
#

I've been busy with my mod that i never got the chance to properly give joyous a shot

red flower
#

i think it's in the most stable state yet rn

manic rune
#

im guessing they dont want mods that completely overwhelm other mods?

unborn bay
#

i have 2 names that i know about yu gi oh and it's fucking related to the women on the cards and nothing more

#

💔

red flower
#

i love women

crisp coral
#

dark magician girl

hushed field
#

I feel like both Kino and Pokermon are pretty good at overwhelming other mods, but who knows, haha

manic rune
#

silent magician

hushed field
#

Hmm, Glue for Modpacks also has the wiki as its main traffic source, but I don't think it's on there at all

unborn bay
#

nonexistent wiki page

manic rune
#

silent magician is more beautiful than dark magician girl, change my mind

crisp coral
#

lobcorp might become another "overwhelm other mods" mod </3

#

also what the fuck i looked at the abnos list and i'm actually halfway done

red flower
#

congrats

hushed field
#

Hmm, either drawstep or my use of dynatext is a major assault on fps

crisp coral
#

make sure to not call dynatext every frame

#

(drawstep is called every frame)

hushed field
#

ahhhhh

manic rune
#

extra deck, graveyard and such

hushed field
#

Well, no need for dynatext then

crisp coral
#

if a mod has an option to turn off all vanilla jokers it's kinda a red flag

manic rune
#

and their jokers dont really go well with jokers from other mods/vanilla jokers, or maybe thats just what im seeing

crisp coral
#

(for overwhelming mods)

manic rune
#

true

crisp coral
#

my "turn off all vanilla jokers" is locked behind a challenge (all of my jokers are anti synergetic with each other)

manic rune
#

lcorp's jokers are still useful with vanilla jokers, so i think its why its still included in huge modpacks

#

hell - they dont even go well with each other most of the time 🥀

manic rune
crisp coral
#

mosb wins on the spot

manic rune
#

imagine beating apoc bird in the challenge

#

.

#

actually i might try that

hushed field
#

I'm fine with people adding Kino to modpacks, but honestly, I think it's a better experience to either play it without other content mods, or to just play those mods without Kino, because I add way too much garbage, haha

crisp coral
#

yeahhh same

#

adding cryptid just kinda negates all the bullshit i put in my mod

#

(semicolon being able to skip noon ordeals is cool and intended though)

manic rune
#

has anyone beat ahab fair and square yet, myst

unborn bay
#

hmm

manic rune
#

(unseeded, only lcorp as a content mod)

crisp coral
#

idk

#

probably not

red flower
crisp coral
#

localthunk bossfight

unborn bay
#

i should've added joyousspring to my android mod list before i decided to head off for vaca

#

damnit

manic rune
#

holy shit

holy shit localthunk in limbus company

unborn bay
#

localthunk in limbus ,,,,,

manic rune
#

AHEM

#

anyways, what were we talking about again

unborn bay
#

we should add limbus company in balatro

hushed field
#

now, why does flipping cards act strangely? Can I just modify the flip on the enhancement? 🤔

manic rune
#

imagine don quixote boss fight in balatro though

unborn bay
#

(i have never played any project moon game)

crisp coral
#

you should (unless you value your sanity

red flower
#

we should add hello charlotte to balatro

unborn bay
#

my sanity is already strained playing blue archive i don't wanna go completely insane

manic rune
#

man, i miss void

manic rune
#

-# the game, not the mod

unborn bay
#

my scrumptious lack of money:

manic rune
#

its a pretty chill game about managing abnos ❤️

#

ack

red flower
#

i should play it someday

manic rune
#

definitely

cursive sentinel
#

question, how do you reset discard count after having sold a joker that adds discard? I made the mistake of putting it on selling_self...

hushed field
manic rune
#

dawg i lost to ice

#

🥀

#

fell off

#

smt please dont rub salt over my wound like that 😭

reef belfry
#

👆 react this man

cursive sentinel
red flower
#

yes

cursive sentinel
#

in calculate?

manic rune
#

nop

red flower
#

no

#

read the documentation

manic rune
cursive sentinel
#

thanksss

tall apex
#

My brain gives me ideas while I can’t even code mediocre jokers, it’s truly a curse

#

-# note to self, maybe add joker called ‘mediocre joker’

crisp coral
#

my brain doesnt give me any ideas

tall apex
#

I have lots of them, some good, some bad, all high quality shitposts

#

I just think ha I like that meme, and then I go what if it was a very intricate ability in poker

#

Thus I am now coding hit joker golden sigma

manic rune
#

oh what, bocchi discord server exists???

reef belfry
#

theres probably a discord server for anything

manic rune
#

true

tall apex
manic rune
#

amazing.

tall apex
manic rune
#

you eat girlfailures?? 😭

#

scary

#

is that why theres barely any girlfailure left in society

crisp coral
#

me i am failgirl

crisp coral
#

ow

#

dont bite me

tall apex
#

Literally 1984

next timber
#

do loc vars work in the name of a joker?

red flower
#

no

#

you can change the name using a key maybe

#

or use generate_ui

next timber
#

wait no they do

#

wtf

#

awesome

red flower
#

oh

next timber
#

lol

red flower
#

do they work in tooltips tho

next timber
#

idk, i mean when is the name of my joker realistically gonna appear in a tooltip

hushed field
hushed field
red flower
next timber
#

true

#

well that sucks

red flower
#

so i had to hook localize to fix it

glad osprey
#

anyone know how id do a joker like this
"if the card to the left would trigger at end of round, trigger it when this card is scored"

hushed field
primal echo
#

I'm trying to add a boss blind but when i get it on a reroll i get an crash saying attempt to compare number with boolean ill send full crashlog if needed

glad osprey
#

additionally id like to run calc_bonus for the end of money round

primal echo
hushed field
# primal echo

this will have to do with your in_pool func for the blind, I suspect

primal echo
#

idk why it's true and not 8

primal echo
hushed field
glad osprey
#

true

hushed field
glad osprey
#

would there be a way to check what the calc returns?

primal echo
# hushed field can you show the blind code?

i just want it to show up in game first before actually doing anything with it it's just this for now

SMODS.Blind {
    key = 'sillytestbkind',
    loc_txt = {
        name = 'The silly :3'
    },
    vars = {},
    dollars = 5,
    mult = 2,
    debuff = {},
    boss = {min = 2, max = 10},
    boss_colour = HEX('FFFFFF')
}
glad osprey
hushed field
glad osprey
#

also im now realizing that maybe a different context would be better

hushed field
#

the problem is that plenty of clean up behaviour doesn't interact with return at all

glad osprey
#

maybe have the card to the left additionally score before cards are scored

#

which would have more use and most likely would cause less issues

#

cuz i cannot think of any card that would benefit from the og

cyan lagoon
#

how do i make a joker destroy a random played stone card?

glad osprey
#

make an array of each stone card and use pseudorandom element to get one

#

then just :start_dissolve() it

cyan lagoon
#

well... how do i do that

wintry solar
#

Dont do that

native zinc
#

how doth one loc_text challenge names

hushed field
native zinc
#

like yknow i thought this would work

red flower
#

oh it needs to be a string

native zinc
#

well dropping the curly braces quite expectly changes nothing

red flower
#

is the key correct

native zinc
#

my prefix is definitely dex and i do have key = 'joker' in my Challenge

#

yeah uh idk

red flower
#

can i see the challenge code

#

maybe i can notice something

native zinc
#

not much to see really

red flower
#

weird

native zinc
#

yeah

#

that's it

glad osprey
#

correct mod prefix?

#

oh already checked that

native zinc
glad osprey
#

hmmmm

#

did you save the loc

red flower
#

yeah maybe the loc file is in the wrong place or has the wrong name?

native zinc
#

i mean

red flower
#

isnt it en-us

native zinc
#

well

#

that's impressively annoying to debug

#

i'm just gonna make it a default

glad osprey
#

yea thats what i did

#

honestly i dont even need a loc file i just use it incase someone wants to translate my mod for some reason

red flower
#

i wish we could split localization files

native zinc
#

hooray

red flower
#

or be evil and switch to loc_txt

primal echo
#

How would i get the most played poker hand

glad osprey
#

check obelisks code

#

how do i do this mf's when i hit them with "check the source code"

daring fern
glad osprey
#

if i had to guess how it does it tho it probably either goes through every hand and sees which one is most played that way or theres a specific attribute

primal echo
daring fern
#

Rise.

glad osprey
runic pecan
#

Is this effect strong enough for a Legendary-like?

glad osprey
#

what is foob

runic pecan
#

Fool the tarot card, except I don't want to put it that way.

glad osprey
#

why

runic pecan
#

Because Foob.

thin anchor
#

what

daring fern
glad osprey
#

because.. your only applying it to one...

runic pecan
thin anchor
#

well
i believe the flip just flips the card and doesnt do anything else

#

so it remains flipped

runic pecan
#

That was not how I was taught to use the E_MANAGER.
Is there gonna be another TIL moment for me?

glad osprey
#

they shouldn't be outside your func

red flower
#

yeah that's not how it works

#

you're just putting random stuff in the config table

glad osprey
#

also why is delay there twice

#

Who did you steal this code from

thin anchor
#

i made it myself

glad osprey
#

i find that unbelievable

#

given the double delay

runic pecan
glad osprey
#

oh wait that's right people make mistakes I forgot about that

thin anchor
#

look this is not really important

#

the main issue is the one i shared in the video

hushed field
#

also, is this a tarot that gives an enhancement? You shouldn't need to write your own use code for that

red flower
glad osprey
#
for x=1,#G.hand.highlighted do
 local scard = G.hand.highlighted[x]
 -- put change code here
end
hushed field
#

literally no need to write code for a tarot that gives a custom enhancement, unless you dislike the standard animation

glad osprey
#

wait do tarots just have an option to do that

hushed field
glad osprey
#

lmao

red flower
#

i should see if i can make my pendulum cards use that

thin anchor
#

🥀

runic pecan
glad osprey
#

from minor arcana

thin anchor
#

no

glad osprey
#

crazy

#

should change that totally

thin anchor
#

for what reason

glad osprey
#

consistancy :)

thin anchor
#

creativity :)

glad osprey
#

The Minor Arcana, sometimes known as the Lesser Arcana, are the suit cards in a cartomantic tarot deck.
Ordinary tarot cards first appeared in northern Italy in the 1440s and were designed for tarot card games. They typically have four suits each of 10 unillustrated pip cards numbered one (ace) to ten, along with 4 court cards (face cards). Taro...

#

look at all these

#

so many to do

runic pecan
#

I mean Cryptid added android card and (some what-about-ism BS)

thin anchor
#

exactly

glad osprey
#

im aware

#

just saying ;)

#

ngl im mainly just surprised someone hasnt done them yet

thin anchor
glad osprey
#

in my defense

runic pecan
glad osprey
#

*flees the scene*

runic pecan
#

That, ladies'n'gents'n'others, is why you always keep some room for a potential TIL moment.

glad osprey
#

how does glop work internally

pearl jacinth
#

i'm surprised how complicated a shader is

#

how do i make one

glad osprey
#

step 1: decompile balatro
step 2: borrow balatros shaders

pearl jacinth
#

i need to make one that brightens the card

glad osprey
#

elaborate

runic pecan
glad osprey
#

what does brightens mean

pearl jacinth
#

make a card brighter

glad osprey
#

in what way

#

does the card brighter

pearl jacinth
#

make every pixel 50% original color and 50% white

runic pecan
glad osprey
#

so moreso faded

pearl jacinth
#

so just the average between its original color and white

glad osprey
#

like this

#

?

pearl jacinth
#

yes

glad osprey
#

ah

#

that should be relatively uneventful

#

id say use cryptids oversat as a base

runic pecan
glad osprey
runic pecan
glad osprey
#

just make sure you
A: replace any "oversat" references with what you name the file

#

B: there isnt a b

#

thats all thats absolutely neccesary tho

#

or else crash :(

#

oh nevermind theres the b

cursive sentinel
#

quick dumb question, whats the issue between card_eval_status_text and blueprint? why the msg pops under the original joker only

runic pecan
#

Technically brightness and saturation is different values.

daring fern
cursive sentinel
#

ah

#

im idiot

daring fern
cursive sentinel
#

yeah figured it

#

im just bit slow it seems

glad osprey
#

for old bp

#

just incase that doesnt work

long sun
#

hihi, question

#

i'm putting a shader on my Legendary Jokers, but they all seem to render the same as the first one

#

hard to describe

#

like, they all shimmer the same way when i hover over the first one, and don't shimmer at all when hovering over the others

#

code for the first one

glad osprey
#

you are accessing the center

#

not the card itself

long sun
#

oh i see

#

what do i change? center > card?

#

pfffff nope :}

#
  • didn't fix the issue
glad osprey
#

i do not remember how to do it

#

holdon

#
draw = function (self, card, layer)
        if (layer == 'shadow' or layer == 'both') then
            card.ARGS.send_to_shader = card.ARGS.send_to_shader or {}
            card.ARGS.send_to_shader[1] = math.min(card.VT.r*3, 1) + G.TIMERS.REAL/(28) + (card.juice and card.juice.r*20 or 0) + card.tilt_var.amt
            card.ARGS.send_to_shader[2] = G.TIMERS.REAL
            card.ARGS.send_to_shader[3] = { key = "new_texture", value = G.ASSET_ATLAS["sgla_bmmask"]}
    
            for k, v in pairs(card.children) do
                v.VT.scale = card.VT.scale
            end
        end
        card.children.center:draw_shader('sgla_blackmirror', nil, card.ARGS.send_to_shader)
    end,
#

heres how mine works

#

it isnt for a soul but it does apply a shader

#

ignore the third attribute thats unused

long sun
#

icicic

#

lemme decode what this does ^^ hold on

#

okay no i don't understand this ^^

#

this is why i haven't learned shaders yet :)))))) uhm

#

how does this work?

sturdy compass
#

shaders are paiiiiiiiiin

manic rune
#

is smt still poking messages

#

😭

long sun
#

not sure how to fix this though :>

#

ah wait no lemme try something else

sturdy compass
manic rune
long sun
#

nope, Layton vs Ace Attorney

#

the spells in the Grand Grimoire

#

okay no my attempted fix didn't work -w-

#

i undid my code, what am i missing? i'm guessing some of the code from the third line needs to be put into the fifth line

#

like so

sturdy compass
#

I haven't a clue. Shaders are so foreign to me 😭

long sun
#

thanks for telling me :>

#

😭 ya

sturdy compass
#

I know I know, so helpful Clueless

sturdy compass
#

spinworth

long sun
#

i'm so close chat?????

#

removing the 0.1 caused it to align more (you're seeing the result), but it's not quite there :<

manic rune
#

...the fact you got shaders working is insane on its own, honestly 😭

long sun
#

fair 😭

red flower
wintry solar
long sun
#

they seem to

#

without them, only the voucher shader displays

wintry solar
#

ah yeah it defaults to dissolve

#

what are you trying to get it to do?

long sun
#

i'd like my soul to have the voucher shader (i.e., be shiny :>)

wintry solar
#

what's "not quite there"?

long sun
#

the shiny shader was too low

runic pecan
#

SMODS.Sticker wiki page doesn't have config={} or config={extra={}} entry.
Does that mean I can't modify its config?

rapid stag
#

my SMODS.Gradient doesn't work. what am i doing wrong?

rugged pier
#

hey yall, i have this custom boss blind defined where i have min = 4 to make it so it only appears ante 4 after, but when i reroll boss in earlier antes

#

it still shows up

hushed field
#

I haven't played around with it enough, but it may be broken atm

rugged pier
hushed field
#

Specifically the ante limits

rugged pier
#

ah

#

makes sense then

wintry solar
#

min should work fine

#

max has never worked

rugged pier
hushed field
wintry solar
#

hmmm, I'll t ake a look

rugged pier
#

thank you

rapid stag
wintry solar
#

it definitely works

runic pecan
#

Does this look like a vampire bite mark to you all?

hushed field
# wintry solar it definitely works

hmm, very strange. I don't know what would be causing it then. I know it's not working in Kino either, and I saw someone trying to solve the same problem a few days back as well

royal ridge
#

idk why

hushed field
#

ah, that'll be it

wintry solar
#

yeah if you use in_pool you need to do the ante check yourself

primal echo
#

what does boss blind realc_debuff do because i can't get it to do literally anything

next timber
#

is there any way i can make a joker do something at the start of a shop?

faint yacht
#

context.starting_shop

next timber
#

oh damn

#

thats not in the docs

faint yacht
#

5️⃣

next timber
#

thank you brave source code reader

#

how can i tell if the upcoming blind is a small blind during the shop?

#

or mods considered i guess i should check if the previous blind was a boss blind

rugged pier
#
config = { extra = { edition = {polychrome = true}, destroyed = 0, flag = false } },
    calculate = function(self, card, context)
        if context.before and context.scoring_hand then
            context.scoring_hand[1]:set_edition(card.ability.extra.edition)
                return {
                    message = 'Awakened!',
                    message_card = context.scoring_hand[1]
                }
        end
        if context.after then
            if context.scoring_hand[1] then
                if pseudorandom('vasher') < G.GAME.probabilities.normal/2 then
                    card.ability.extra.destroyed = card.ability.extra.destroyed + 1
                    card.ability.extra.flag = true
                else
                    card.ability.extra.flag = false
                    return {
                        message = localize('k_safe_ex'),
                        message_card = context.scoring_hand[1]
                    }
                end
            end
        end
        if context.destroy_card and card.ability.extra.flag then
            G.E_MANAGER:add_event(Event({
                func = function()
                    context.scoring_hand[1]:start_dissolve({G.C.BLACK, G.C.RED, G.C.RED}, true, 5)
                    card.ability.extra.flag = false
                    return true
                end,
                blocking = true
            }))
            return {
                message = 'Destroyed!',
                remove = true
            }
        end
    end

im trying to destroy a playing card here based on a flag, even though the flag is being converted to true, the card isnt being destroyed

#

any idea why that could be the case?

rapid stag
rugged pier
#

okay i changed up the method a little bit

#
calculate = function(self, card, context)
        if context.before and context.scoring_hand then
            context.scoring_hand[1]:set_edition(card.ability.extra.edition)
                return {
                    message = 'Awakened!',
                    message_card = context.scoring_hand[1]
                }
        end
        if context.after then
            if context.scoring_hand[1] then
                if pseudorandom('vasher') < G.GAME.probabilities.normal/2 then
                    card.ability.extra.destroyed = card.ability.extra.destroyed + 1
                    card.ability.extra.flag = true
                    return {
                        message = 'Destroyed!',
                        message_card = context.scoring_hand[1]
                    }
                else
                    card.ability.extra.flag = false
                    return {
                        message = localize('k_safe_ex'),
                        message_card = context.scoring_hand[1]
                    }
                end
            end
        end
        if context.destroy_card and card.ability.extra.flag then
            G.E_MANAGER:add_event(Event({
                trigger = 'after',
                delay = 0.1,
                func = function()
                    context.scoring_hand[1]:start_dissolve()
                return true end }))
        end
    end
#

this fixed it

#

maybe the delay helps

wintry solar
#

no don't do that

#

never use start_dissolve manually inside scoring calc contexts

#

the reason it doesnt work is that your timing is wrong, context.after happens after context.destroy_card

digital niche
#

what did i do wrong? it is supposed to create a card with one of the enhancements in that list

digital niche
rapid stag
rapid stag
wintry solar
rapid stag
wintry solar
#

you're destroying the joker right?

rapid stag
#

yes

uneven bobcat
#

elaborate if possible ...

#

thereds something wrong with my brain chat

rapid stag
# uneven bobcat elaborate if possible ...

@daring fern well i'm putting the gradient into a variable and referring to the variable and it's not working cirLost

oh i'm not calling my second colour correctly. why was that not throwing an error???

uneven bobcat
#

i got nothingf

rapid stag
#

variable = my gradient

uneven bobcat
#

somehow a gradient has given me more trouble than anything else today

#

giving up on modding forever . terribly embarrassing

lucid owl
#

how could i return a different hand when another is played/chosen? specifically, i want this card to count two pairs played with exactly 4 cards as a 4oak, but this lovely patch isn't seeming to do anything (after the else is the default two pair function in evaluate_poker_hand())

wintry solar
rapid stag
uneven bobcat
#

its working now and im unsure why but im not complaining; i think i genuinely spelt something wrong

rapid stag
#

bump, what should i do if i want to update a modded achievement's description during runtime cirDerp

rugged pier
#

what would be a context that happens before context destroy?

#

but after the scoring

#

final_scoring_step?

#

okay i switched it to final scoring step

#

it works

next timber
#

how would i go about passing info to the next run? i have my joker that loops time by saving and loading the run but the issue with that is that it means the joker doesnt get loaded, so i need to find a way to carry the joker over to the "next run" (which is actually the save state from earlier in the run)

daring fern
next timber
#

how do you save stuff in hte profile?

#

or maybe i can just hook start_run to directly take an argument to create a new copy of the joker

daring fern
daring fern
digital niche
#

oh like "fus_m_ruby"?

daring fern
digital niche
#

okok! ty! anything else?

daring fern
digital niche
#

where?

#

like, replace something for it?

candid sleet
#

hi, i got a bit silly and made a joker that changes every probability to always hit, unfortunately it seems after too many uses the lucky cards just crash the game, anything i can do about this?

daring fern
#

I think

digital niche
#

like this?

daring fern
digital niche
#

ooh okok

#

lemme test

candid sleet
#

The lucky cards went all the way up to nil somehow

digital niche
#
calculate = function(self, card, context)
            if context.setting_blind and not card.getting_sliced then
                G.E_MANAGER:add_event(Event({
                    func = function() 
                        local front = pseudorandom_element(G.P_CARDS, pseudoseed('cave'))
                        local cavy = pseudorandom_element({'m_fus_sapph', 'm_fus_cob', 'm_fus_ruby', 'm_fus_cinna', 'm_fus_red'}, pseudoseed('cavy'))
                        create_playing_card({front = front, center = cavy}, G.deck)
                        return true
                    end}))
                card_eval_status_text(context.blueprint_card or cavy, 'extra', nil, nil, nil, {message = localize('cavy'), colour = G.C.SECONDARY_SET.Enhanced})
    
                G.E_MANAGER:add_event(Event({
                    func = function() 
                        G.deck.config.card_limit = G.deck.config.card_limit + 1
                        return true
                    end}))
                    draw_card(G.play,G.deck, 90,'up', nil)  
    
                playing_card_joker_effects({true})
                end
            end}```
#

the full joker code

daring fern
#

In the function

digital niche
#

in the local or in the create card?

daring fern
digital niche
#

crash again

#

same crash

daring fern
#

I’m not sure then try looking at familiar, incantation and grim

wintry solar
#

I'm pretty sure its the card_eval_status_text line

digital niche
#

im not sure what it does, i just copied the marble joker code and started messing with it

lucid owl
#

i'm trying to count all two pairs, in groups of four cards, as 4oaks. this function correctly shows the text for 4oaks when two pairs (in exactly 4 cards) are highlighted, but when actually played the game goes back to giving the base two pair score. is there anything i'm missing?

digital niche
wintry solar
#

yes

digital niche
rugged pier
#

you guys know how the game displays the name of the poker hand you have selected but not yet played on the side bar?

#

how do i get that

zealous glen
#

what for

rugged pier
#

like if i wanted to display that poker name in a joker description

#

but it needs to update everytime a user selects a poker hand

#

not necessarily playing it

#

so im using update() to check every frame

zealous glen
#

don't

#

I use it for a few Jokers

rugged pier
#

yikes

#

whys it a bad idea

zealous glen
#

this is a simple example

zealous glen
zealous glen
#

so it's 1 frame every so often instead of literally every frame

#

(the description isn't updated every frame so you only need it in the frame the description is created)

rugged pier
#

let me dig through the code for the variable name

zealous glen
#

tl;dr: just calculate the current selected hand yourself

rugged pier
#

okay

#

local handname, _ = G.FUNCS.get_poker_hand_info(G.hand.highlighted)

#

this is it yeah

digital niche
zealous glen
digital niche
zealous glen
#

This is simple but in principle it could break some things since it's unexpected behaviour

#

A more robust way would be to copy the G.play CardArea to create one to use for animations like this, I think

#

But so far I haven't run into any issues so

digital niche
#

the "card: start_materialize" part is the animation>

#

?

zealous glen
zealous glen
#

This is very old code

zealous glen
digital niche
#

oooh, is it in the link you sent?

zealous glen
#

all there

digital niche
digital niche
digital niche
rugged pier
#

is there a way to loop through unscored cards?

#
calculate = function(self, card, context)
        if context.individual and context.cardarea == 'unscored' then
            local unscored_cards = {}
            if pseudorandom('marsh') < G.GAME.probabilities.normal/card.ability.extra.odds then
                for i = 1, #context.scoring_hand do
                    table.insert(unscored_cards, context.scoring_hand[i])
                end
                steel_card = pseudorandom_element(unscored_cards, pseudoseed('marsh1'))
                steel_card:set_ability(G.P_CENTERS.m_steel, nil, true)
                return {
                    message = 'Steeled!',
                    message_card = steel_card
                }
            end
        end
    end```


i need to change 
```lua
for i = 1, #context.scoring_hand do
                    table.insert(unscored_cards, context.scoring_hand[i])
``` to cycle through unscored cards
#

this is an undocumented feature unfortunately

lucid owl
rugged pier
#

i do something similar here

#

where i convert all hands into their flush variants

#

the original coder is credited in that link

red flower
rugged pier
red flower
rugged pier
#

is there a "not in" check in lua?

#

like python has

red flower
#

afaik no

rugged pier
#

rip

#

are G.play.cards and scoring_hand both tables?

red flower
#

yes

rugged pier
#

awesome i can use that then

#
    calculate = function(self, card, context)
        if context.after and context.cardarea == 'unscored' then
            local scored_lookup = {}
            for _, c in ipairs(context.scoring_hand) do
                scored_lookup[c] = true
            end

            local unscored_cards = {}
            for _, c in ipairs(G.play.cards) do
                if not scored_lookup[c] then
                    table.insert(unscored_cards, c)
                end
            end

            if pseudorandom('marsh') < G.GAME.probabilities.normal / card.ability.extra.odds then
                local steel_card = pseudorandom_element(unscored_cards, pseudoseed('marsh1'))
                steel_card:set_ability(G.P_CENTERS.m_steel, nil, true)
                return {
                    message = 'Steeled!',
                    message_card = steel_card
                }
            end
        end
    end
#

this should work right

#

nvm it does not

red flower
#

context.cardarea == 'unscored' doesnt work in after afaik

#

but you dont need it

lucid owl
#

(the hand text on the side)

#

might be best to just not bother with the first function

minor furnace
#

wait

#

it makes two pair count as 4oaK??

#

wild

rugged pier
rugged pier
lucid owl
rugged pier
#

Since my function is going to be changing the UI, you can just pass the new hand to that function

#

Instead of doing it in two places

lucid owl
rugged pier
#

Although I suppose you want a visual indicator before they play the hand

minor furnace
lucid owl
rugged pier
#

Something like active!

sturdy monolith
#

why does this work on Mr Bones but not here?

lucid owl
#

as in, the hand text

distant gate
#

I'm making a joker that gives held stone cards xMult (similarly to baron) but for some reason it's triggering when the round ends. What can I do to prevent this?

rugged pier
#

So basically, the name of the poker hand that you’re playing is being changed twice once when you select the hand, but you haven’t played just yet and the second time will be when you actually play the poker hand

#

In between those two times the game also calculates the poker hand so the game will initially calculate it as a two pair because that is what it is

#

Makes sense?

lucid owl
#

yeah, i get that

rugged pier
#

So instead of changing the poker hand two times the first time when you actually select the hand but don’t play it and you’ve changed it in the UI. You can just put it on your joker text I suppose?

#

Instead of the UI

lucid owl
#

that'd be easiest, yeah

rugged pier
#

Yup

faint yacht
# distant gate
if context.cardarea == G.hand and context.other_card and not context.repetition and not context.repetition_only and not context.end_of_round
red flower
#

i would do context.individual as well just in case

rough furnace
digital niche
#

how would i refer to this in a line? fusion_Ore?

dapper sun
#

how do i make my custom consumable work when a joker is selected?

gusty peak
#

can_use set to the function that returns #G.jokers.highlighted == 1

dapper sun
#

ty

#

is there anywhere where different internal values like those are listed? i haven't found anything about stuff like that on the smods documentation

gusty peak
#

Its on SMODS consumable page

#

API methods section

dapper sun
#

i mean values like G.jokers.highlighted, not can_use

gusty peak
#

Oh

dapper sun
#

i already knew about can_use

gusty peak
#

Not really, you just look at balatro source

dapper sun
#

ah ok

#

how do i get the amount of cards in your held (not played) hand?

gusty peak
#

#G.hand.cards

dapper sun
#

ty

#

how do i turn a joker into another one?

rough furnace
#

Simplest way is to destroy the old one and spawn the new one

#

Maybe you can call set_ability on it with the new ones key

#

Not sure what happens there

dapper sun
#

set_ability?

rough furnace
#

Yes that's what I said

dapper sun
#

how do i use that?

rough furnace
#

Card:set_ability(key)

sonic cedar
#

Hey guys? my sticker isn’t loading into the game, are there things i can check that would tell me why?

rough furnace
#

Is your mod on the mod page?

#

Also that helps

sonic cedar
#

okay and yes

#

this is unpushed though

sonic cedar
dapper sun
#

why isn't it letting me use the consumable?

gusty peak
#

maybe pos expects x and y

sonic cedar
#

oh it’s my atlas pos maybe

gusty peak
#

tho it would crash probably idk

gusty iron
#

just asking this in advance, is there anyway to check if theres a specific joker in your hand?

gusty peak
#

if its truthy then its in your jokers

gusty iron
gusty peak
#

what does your joker do?

#

and when

gusty iron
gusty peak
#

cause if you do it in the calculate function of a joker you dont have to check that, it runs calculate on existing jokers

#

#find_joker(<Key>) > 0 also works

gusty iron
# gusty peak what does your joker do?

basically, theres 2 jokers, one that affects mult, and one that affects chips

when seperate, they're decent, but if you have both of them, they get "buffed"

gusty peak
#

oh ok then thats valid

brisk rose
rough furnace
gusty peak
dapper sun
#

ty

gusty peak
#

ye it can be so confusing

rough furnace
sonic cedar
#

leave me alone breeze 💔

gusty iron
gusty peak
#

thats fair, same, only made 6 jokers, i made plenty of boss blinds tho and chess consumables

gusty iron
#

ill probably try to make a boss blind pack soon

#

i wanna focus on jokers

manic rune
#

i only made 24 jokers

gusty iron
#

i love this goober still 😭

manic rune
#

how many times does it roll

gusty iron
gusty peak
#

is is incompatible with oops by design or because you dont know how?

manic rune
#

it doesn't say so :p

gusty iron
#

softlock

gusty peak
#

oh ok

#

oh yeeeeee

gusty iron
#

i once got

gusty peak
#

thats kinda... busted

gusty iron
#

+11 levels with him in 1 turn (1 in 2048)

gusty peak
#

maybe like 1 / 4

gusty iron
#

the main downside is the cost

#

though even when i play with him i still only find myself getting to ante 10 (which is what i normally average)

#

so

#

i guess its balanced??

gusty peak
#

its buffed spaceman

sturdy monolith
#

can i use one atlas for the base sprite and another for the soul sprite on a joker?

#

or is that impossible

gusty peak
gusty iron
#

i have no idea what that means so maybe 🔥🔥🔥🔥

gusty peak
#

theres no way to specify 2

sturdy monolith
gusty iron
gusty peak
#

thats like legendary rarity cost territory

gusty iron
#

also, is there anyway to implement custom hand types into the game? ive wondered this for a while, but never really found out if you could

gusty peak
gusty iron
#

OKAY PEAK

#

ive always had an idea for a joker that lets you play 6 cards instead of 5, but i never knew if that would be possible

sturdy monolith
#

take a look at this

gusty peak
gilded narwhal
#

why does this not give a message

#

Like it works perfectly fine other than that it just doesn't give a message

glass wing
sturdy monolith
gusty peak
gilded narwhal
#

I don't think that's it because it would still trigger it would just say "k_upgrade_ex"

rough furnace
#

Check the docs

gusty iron
rough furnace
gusty peak
dapper sun
#

how do i get the highlighted joker's ability/key?

gusty peak
dapper sun
#

just its key

rough furnace
dapper sun
#

idk why i said ability lol