#💻・modding-dev

1 messages · Page 205 of 1

sturdy compass
#

It’s a little different but there’s unfortunately no documentation I can give for reference

manic rune
#

X means index

#

usually i,v is more used, with i stands for index and v stands for value (i think)

rapid stag
#

i see

manic rune
#

{
a = b
}

a in this case in index, while b is the value

#

index can be a string or a number

plush cove
#

i dont actually think this works for playing cards

manic rune
#

while value can be either a string, a number, or even a table

rose dragon
#

what to do about this?

plush cove
#

config your .luarc settings

tall wharf
plush cove
halcyon osprey
#

so uhh

#

tf i do 😭

rose dragon
#

indentation is terrible though

manic rune
#

just some lua stuff which i dont know how to do rn:
i want to make a table combining both of "Asta" and "AbsoluteNecessary", and i want the new table to be the exact same order of everything in AbsoluteNecessary, then everything from Asta from top to bottom

its prob obvious and im too dumb to not realize it

#

i tried running the Asta table through a for i,v loop, then basically did smt like:
NewTable[i] = v, but the order of the new value is completely random due to the index not being a number i suppose

rose dragon
#

if nuclear deck was actually good

manic rune
#

jesus

rose dragon
#

(i forgot to include division on the list)

lavish lake
rose dragon
wintry solar
manic rune
#

oh, thats very convenient, thanks :D

plush cove
wintry solar
#

No

#

Use create_playing_card

plush cove
#

i thought so, ty

rapid stag
#

anyone know where the return value of a joker's calculate() is used?

lavish lake
#

Does anybody know how to apply a purple seal to a card

wintry solar
wintry solar
onyx sonnet
#

Is there a way to check if a card has ANY seal whatsoever?

frosty dock
#

if card.seal then iirc

fallen vigil
#

what does check do in the debuff_hand function

onyx sonnet
#

Ty!

iron iron
lavish lake
#

Had this crash, I have this code:

SMODS.Joker {
    key = "stamped_document",
    loc_txt = {
        name = "Stamped Document",
        text = {
            "Adds a {C:attention}Purple Seal{} to a random card in",
            "your {C:attention}full deck{} at the end of round"
        }
    },
    rarity = 1,
    atlas = "joker_atlas",
    pos = { x = 1, y = 0 },
    loc_vars = function (self, info_quene, card)
        info_quene[#info_quene+1] = G.P_SEALS.Purple
    end,
    calculate = function (self, card, context)
        if context.after then
            local r_card = math.random(1, #context.playing_cards)

            r_card:set_seal("Purple")
        end
    end
}
raw geyser
#

Is there a way to trigger something on joker load?

raw geyser
raw geyser
#

Thanks!

tall wharf
#

card no reset pls help

zealous glen
tall wharf
#

ok

zealous glen
#

I think it runs before any scoring is computed

#

Because it’s all done in Events

wintry solar
#

can't you use end_of_round?

#

oh there's the bottom bit too

zealous glen
#

Actually maybe you can return a function that resets

#

Since SMODS can handle that

wise jungle
#

silly question, people on my screen
is there a way to directly access a chip_mod or mult_mod from other jokers? Something that's like G.jokers.cards[1].chip_mod

zealous glen
#

No

wise jungle
#

because for some reason jokers like Blue Joker calculates chips like that and i'm going insane over it

wise jungle
zealous glen
#

What do you want to do?

wise jungle
#

i wanted to dabble in balatro modding and i made a nice working legendary card where it basically takes all the +mults, xmults and +chips of other jokers and basically add it to the card, like blueprint but better

#

on most cards, like the flush joker cards and the ones giving straight up mults, its actually working really well, but on some obscure ones like blue joker and i assume swashbuckler, where they dynamically calculate the mult, they don't work too well, the only thing i can get from cards.ability is the increment (like how Blue Joker gives +2 chips for every card in the deck, so I only get the 2, not the actual total chips value)

wintry solar
#

there's no way to consistently get those values, especially with other modded jokers

zealous glen
#

I don’t think Balatro is setup to make that effect easy to implement

wise jungle
#

damn

crisp coral
#

unfortunate

zealous glen
tall wharf
#

just retrigger everything again aikoyori_troll

wintry solar
#

unless you force a naming convention across every modded joker ever of course

wise jungle
zealous glen
#

Break into people’s house and change their code

wise jungle
#

TRUE

tall wharf
#

asadasag

zealous glen
wise jungle
#

14 competing standards? i'll make it one

tall wharf
zealous glen
crisp coral
#

if you do I'll start keysmashing every variable of mine

wise jungle
tall wharf
#

so 16

wise jungle
#

LMAO

tall wharf
#

many such cases

wise jungle
red flower
#

what if you saved every joker's calculate function

zealous glen
#

Balatrostuck had an effect that memorized the Chips granted by every effect

primal robin
#

I have a problem with event manager. Can help someone pls?

local blind = SMODS.Blind({})

function blind:set_blind()
    -- This works fine
    local card = create_card("Voucher", G.play, false, nil, nil, nil, "v_magic_trick", nil)
    G.play:emplace(card)
    card:start_materialize()
    card:redeem()
    G.E_MANAGER:add_event(Event({
        func = function()
            card:start_dissolve()
            return true
        end,
    }))

    delay(0.5)

    G.E_MANAGER:add_event(Event({
        func = function()
            -- Here, `G.hand` becomes visible which looks not good while i'm doing my stuff
            -- It's a problem. Is the way to prevent this?

            local card = create_card("Voucher", G.play, false, nil, nil, nil, "v_illusion", nil)
            G.play:emplace(card)
        
            card:start_materialize()
            card:redeem()
            G.E_MANAGER:add_event(Event({
                func = function()
                    card:start_dissolve()
                    return true
                end,
            }))

            delay(0.5)

            return true
        end,
    }))
end
wintry solar
#

you could store already triggered values very easily

#

but it wouldn't be able to catch things that happen after it

wise jungle
primal robin
crisp coral
#

it shouldn't be doing that unless you're missing return true

red flower
wise jungle
#

very fair, not the first time i'd dabble into some weird magic to get things working but i don't want to somehow make balatro explode my pc

wise jungle
wintry solar
#

I wouldn't recommend doing extra calculate calls either

primal robin
zealous glen
#

Just set the Joker retrigger options to true and return true

wintry solar
#

you'd need to look into how post triggers work

#

then you can scrape the table that the jokers have returned in the joker_main context and extract the values you're looking for

#

this is assuming your joker is storing them and applying them all at once

wise jungle
#

oh yeah it stores and applies them all at once

wintry solar
#

if you wanted it to work for all your jokers regardless of positioning you could alter how it works so that it scores them as they are scored

wise jungle
#

...honestly not bad at all

#

i mean it still achieves the same target, just that it does it one by one instead of all into one

wintry solar
#

all in one is fine, it'd just only work for the jokers to the left of it

wise jungle
#

yeah i can see that

#

but wait wouldn't there be a way where the joker can be executed after a hand is played?

#

like basically the other jokers get to do their triggers and then after they are done and after the hand is done playing my joker card would calculate it all in one

#

like how in seltzer it decrements down after each hand played

wintry solar
#

oh actually yes

#

you can just add it in final_scoring_step

wise jungle
#

heck yeah
that way i dont have to worry about positioning AND i can get to achieve the desired effect of it adding all of the chips and mults in one go instead of it just acting like a stronger blueprint

wintry solar
#

so you want to do the post trigger stuff looking for joker_main to collect your values

runic pecan
#

Where can I find smods change log?

wise jungle
red flower
tall wharf
#

fucked up

#

😭

wise jungle
#

even the editor is blaming you lmao

tall wharf
#

😭

red flower
#

is the problem that the event is not returning true

tall wharf
#

yes

#

...

manic rune
#

wrong place, my bad

runic pecan
#

Should I change it to "after scoring"?

strong jacinth
#

Is it possible to make a voucher that makes it possible to play 6 cards instead of five?

manic rune
#

it is

manic rune
strong jacinth
manic rune
#

i dont think thats how you would do it, but there are mods which have done the same already

strong jacinth
#

Like?

manic rune
#

i actually dont remember if Cryptid does it

#

but i do remember a voucher which does exactly what you want

#

lemme check

#

ah, it does have it

zealous glen
#

Not Sticky Fingers smh my hand

tall wharf
#

literally 6 mods that do this select 6 cards thing

manic rune
zealous glen
#

"here" being that repo

manic rune
#

yeah

#

and i still equally dont like the idea of being able to select 5+ cards, personally

zealous glen
#

jojo reference smh mza hando

manic rune
#

once again, aiko, scrabble barely qualifies as poker

#

💔

manic rune
#

i have xchips too, its fine 😭

#

i have it to add varieties to my mod

zealous glen
#

/block Bepis

wintry solar
#

xchips isn't a variety though

zealous glen
#

xChips is just Mult but worse

manic rune
#

you wont believe how hard it is to add 25+ jokers, each having at least 6 additional abilities without them being bland 💔

wintry solar
#

its xmult in a coat

manic rune
zealous glen
#

mult*

manic rune
#

i like blue

zealous glen
#

xMult is xxChips

wintry solar
#

what?

manic rune
#

what

zealous glen
#

Mult and xChips both multiply Chips

wintry solar
#

xchips and xmult are the same thing

tall wharf
#

is this correct 😭

zealous glen
#

xMult multiplies Mult

#

so xMult is xxChips

#

and xChips is Mult

wintry solar
#

I see you don't understand basic multiplication

manic rune
#

that sounds so dumb but i somehow understand it

tall wharf
#

mult is xchips

#

shush

manic rune
#

xchips sfx is actually really nice

zealous glen
#

and xChips also applies immediately, which makes it worse

#

you'd prefer if xChips applied last, so at the same time as Mult

#

that makes Mult just better than xChips

manic rune
#

i actually have no clue what you mean by that

#

💀

zealous glen
#

Let's say you have x2 Chips and 5 then 5 Chips

#

(5*2) + 5 is worse than (5+ 5)*2

#

Mult does the latter always

#

So it's better than xChips

manic rune
#

oh, so you mean the order in the return{} stuff?

zealous glen
#

No, just the order of how it's scored

#

Photograph also applies xMult earlier than you'd want

#

Compare to other xMult Jokers like The Duo

manic rune
#

ok now im actually lost

zealous glen
#

The order of the effects doesn't depend on the order in return

wintry solar
#

I think he's talking about having it on playing cards

zealous glen
#

Photograph isn't a playing card

wintry solar
#

which is the specific scenario where xchips differs from xmult

zealous glen
#

It just applies it during the timing of playing cards

#

But that's not the point

#

Because Mult only multiplies Chips after all Chips have been added

#

So any scoring context where xChips could apply is earlier than when you'd want it

#

because you can always add more Chips before Mult multiplies Chips

#

That's the last step of scoring

#

It comes even after Plasma Deck

wintry solar
#

that's not at all how multiplication works

manic rune
#

i thought you meant, like

return{
  chips = 50
  xchips = 2,
}

and it runs still runs xchips before chips, which i can see the issue here, but if its just some stuff relating to context then i dont think ive found any problem relating to that

zealous glen
manic rune
#

i put xchips in joker_main and i still see it doing exactly like xmult

wintry solar
#

you could say the same with mult

#

that's just misordering your effects

zealous glen
#

No

#

Mult only multiplies Chips last

#

It does so after Plasma Deck, as I said

wintry solar
#

that makes 0 difference

zealous glen
#

It does, because you could add Chips after multiplying xChips

#

But it's physically impossible with Mult

wintry solar
#

say you paly a hand that gives 50 chips and 5 mult, and have a X2 chips joker, it'd give 100 x 5 = 500. If it was X2 mult, it'd be 50 x 10 = 500

#

exactly the same

zealous glen
#

I don't see how that's related

wintry solar
#

then what the fuck are you talking about

zealous glen
#

Regarding adding 5 Chips twice and applying X2 Chips

manic rune
#

...im too dumb and my brain loads too slow to even be a part of this conversation, sorry everyone 🙏

wintry solar
#

yes but that's misordered

zealous glen
#

Yes but you can't misorder Mult

#

Because it's the last step of scoring

#

So Mult is always multiplying Chips at the best possible timing

unkempt thicket
#

How could i add this with the hands table? like combine the two
i_hands = { ["Flush Five"] = {s_x_mult = 1.25, s_x_chips = 2, i_level = 0}, ["Flush House"] = {s_x_mult = 1.3, s_x_chips = 1.8, i_level = 0}, ["Five of a Kind"] = {s_x_mult = 1.25, s_x_chips = 1.75, i_level = 0}, ["Straight Flush"] = {s_x_mult = 1.3, s_x_chips = 1.8, i_level = 0}, ["Four of a Kind"] = {s_x_mult = 1.25, s_x_chips = 1.75, i_level = 0}, ["Full House"] = {s_x_mult = 1.2, s_x_chips = 1.7, i_level = 0}, ["Flush"] = {s_x_mult = 1.1, s_x_chips = 1.3, i_level = 0}, ["Straight"] = {s_x_mult = 1.25, s_x_chips = 1.75, i_level = 0}, ["Three of a Kind"] = {s_x_mult = 1.1, s_x_chips = 1.5, i_level = 0}, ["Two Pair"] = {s_x_mult = 1.1, s_x_chips = 1.5, i_level = 0}, ["Pair"] = {s_x_mult = 1.1, s_x_chips = 1.3, i_level = 0}, ["High Card"] = {s_x_mult = 1.1, s_x_chips = 1.2, i_level = 0}, }

zealous glen
#

Which hands table?

unkempt thicket
#

G.GAME.hands

zealous glen
#

What about modded hands?

wintry solar
zealous glen
#

You can't add Chips or Mult or xMult

#

afterwards

wintry solar
#

you have a joker that is + mult and a joker that is Xmult and you put the xmult first

unkempt thicket
zealous glen
#

I'm talking about Mult multiplying Chips

#

not xMult multiplying Mult

humble girder
#

what he means is that when your total chips for a hand are evaluated, it will multiply your total chips by your total mult

zealous glen
#

the last step of scoring takes Chips, takes Mult, multiplies those together, then assigns that number to your current score

humble girder
#

that is always the last step and in essence, correct

wintry solar
#

so how does that make xchips the same as +mult

zealous glen
#

Because xChips is multiplying Chips like Mult multiplies Chips

#

except earlier

humble girder
#

but no, xchips is not the same as +mult, it's the same as xmult except for plasma

zealous glen
#

and thus worse

zealous glen
#

You can already access them elsewhere

runic pecan
#

Do I need to worry about nil check?

zealous glen
wintry solar
#

genuinely I don't think you understand how multiplication works

manic rune
humble girder
#

multiplication is commutative, my friend, a base flush with 2X mult is 35 * 4 * 2, a base flush with 2X chips is 35 * 2 * 4, that's the same

#

source doesn't matter, because both +chips and +mult exists which can interfere with that order

zealous glen
#

The order of addition and multiplication matters

unkempt thicket
zealous glen
#

You want to multiply after addition to maximize your score

humble girder
#

this game has base form of scoring where cards can have Mult

zealous glen
#

Hence why Mult is performing the same job as xChips (multiplying Chips) but better

humble girder
#

it's best to ignore it. in a vacuum, unless you are plasma, XChips and XMult are equivalent

manic rune
runic pecan
zealous glen
#

and xMult is acting as xxChips by multiplying Mult

humble girder
#

no, xChips is acting as xxMult by multiplying Chips

#

because commutative

#

🙂

unkempt thicket
manic rune
#

you only really need that when you are checking for other cards other than itself

zealous glen
manic rune
#

though, having something like that is certainly useful for quick-checking context.other_card

wintry solar
#

what you're saying would only be true if xmult happened after the game did chips x mult

manic rune
#

ima snatch that idea, thanks riv

#

❤️

runic pecan
#

What about loc_vars?

zealous glen
manic rune
#

me too

zealous glen
#

or maybe card and not card.removed

humble girder
#

monkaS

manic rune
#

but smt like checkCard(context.other_card) seems a lot cleaner imo

frosty dock
#

any card that exists has an ability table

manic rune
#

yeah, but not all of them have extra

#

if im not wrong

frosty dock
#

if your center has an extra table in its config, they do

humble girder
#

extra is a stupid vanilla convention

manic rune
frosty dock
#

loc_vars gets fake cards sometimes, but they're shaped closely enough like a regular card that you don't need to worry about this for accessing config values

manic rune
#

i see

#

thanks john aure smods :D

#

learning new things everyday™️

frosty dock
#

Also wtf is this xchips discussion

manic rune
#

its about the order of how they trigger or something

tall wharf
humble girder
#

just uhh

#

don't look at it

manic rune
#

im actually too dumb to be a part of that 😭

humble girder
#

trust me

frosty dock
#

too late

humble girder
#

my condolences

manic rune
#

i shall make this my new catchphrase:
-# learning new things everyday™️

#

:3

zealous glen
red flower
#

I think it should be written as Xchips

humble girder
#

xMult is only comparable to xChips if you don't add Mult in-between applying xMult, but it's that possiblity that makes xMult worse than Chips. If you apply xMult after you'd added all Mult you could, then it doesn't matter if it's xMult or xChips (unless you have both I guess, since they multiply together too)

manic rune
#

💀

frosty dock
#

the default ordering (within the same calculation) is +chips, +mult, xchips, xmult

zealous glen
#

The ordering depends on the context

humble girder
#

the whole discussion hinges on the technicality that base playing cards have innate +chips but no innate +mult

manic rune
#

am i the only one genuinely unable to keep up with this

humble girder
#

it's not technically wrong it just doesn't matter by ante 8

wintry solar
#

it also has no bearing on the claim that xchips is just +mult

#

that's just categorically incorrect

zealous glen
humble girder
#

that claim is insane

frosty dock
#

that is the one scenario where xchips are slightly worse than xmult

humble girder
#

i agree

frosty dock
#

however it would still be much better on average than +mult

zealous glen
manic rune
#

xchips is often much better than xmult at early game due to how much chips sources give them

crisp coral
#

what is being talked about

manic rune
#

like, common jokers give uhhhhhhhhhhh +80, +100, smt like that ❤️

frosty dock
#

there is no practical difference between xmult and xchips, let alone any advantage to xchips ever

humble girder
manic rune
#

oh

#

oh yeah, saturation stuff

frosty dock
#

both multiply your score

humble girder
#

if the source is a joker, then it doesn't matter

manic rune
#

its better to increase the lowest variable, forgot that

frosty dock
#

unless you're on plasma deck, then xchips can be better than xmult

zealous glen
manic rune
humble girder
#

oh and yes, there's plasma but plasma is special

frosty dock
humble girder
frosty dock
#

that only works like this for additive scaling

manic rune
#

but if you got 3000 chips and 1 mult, isnt it better to get a +mult joker

wintry solar
#

I think this just boils down to victin arguing over a technicality he invented for the sake of arguing

zealous glen
humble girder
manic rune
#

i shouldve specified what i meant, sorry

humble girder
#

flat additive is always increase the lower one

manic rune
#

:(

frosty dock
#

flat mult is much better than flat chips here

zealous glen
frosty dock
#

but xmult vs xchips doesn't matter

zealous glen
#

So +13000 Chips will be better than +4 Mult

humble girder
#

flat vs flat it's whatever increases the lower amount (and some magnitude considerations)
x vs x it's whatever you have less later scored additive of

crisp coral
#

damn another xchips vs xmult discourse

frosty dock
#

all things considered, xchips is basically another version of xmult that can be better or worse in certain niche scenarios

humble girder
#

but if we're looking at strictly joker_main, there is never a difference between same magnitude X

manic rune
zealous glen
#

What you can say about additive Chips versus additive Mult is that, the larger one value is, the better a small increment of the other is

frosty dock
#

I don't see how that matters as it was only added into smods because modders wanted to use it

zealous glen
#

I just said I disliked it, and compared xChips to Mult

manic rune
#

i like xchips because the sfx is cool

#

❤️

unkempt thicket
#

How do planet cards (Lvl:num) color change based on the level?

manic rune
#
  • blue is cool
humble girder
#

there's plasma-like mechanics you can build around it that disrupts the balance but in vanilla, xchips exists, it's called xmult

frosty dock
#

I'm not sure why there needs to be an argument then

wintry solar
#

I think victin is comparing xchips to the final total mult for some bizarre reason

zealous glen
#

Because I think xChips is redudant with vanilla mechanics

#

and that's part of it

#

The final total Mult multiplies Chips after all Chip additions

#

So it's stronger than xChips anyways

#

since you could add Chips after applying xChips

frosty dock
#

the final total mult isn't a mechanic though

strong jacinth
#

Why is it so fat tho?

zealous glen
manic rune
#

it probably ate all of the fat from your vsc

#

❤️

frosty dock
humble girder
frosty dock
#

95*

crisp coral
#

71x95*

humble girder
#

meh

strong jacinth
zealous glen
crisp coral
#

still use 71x95

#

and center your voucher

tall wharf
#

vri which sprite are you on

frosty dock
#

yeah the sprite size accounts for empty space

frosty dock
strong jacinth
manic rune
#

the ghost

#

👻

crisp coral
tall wharf
#

the ghost of my voucher

manic rune
#

the ghost of "oops all 6s" is hunting you for skinning it alive, and put it on a voucher...

frosty dock
manic rune
#

...oh nvm

#

its the merge_list i think

strong jacinth
#

How do i center my voucher?

wintry solar
#

merge_list that's the one

zealous glen
#

Just move it in an image editing software

#

until it's centered horizontally within a 71 by 95 box

manic rune
#

i love smods for adding merge_list 🙏

#

never in my life has code treated me this well

#

is this how i do it?

zealous glen
#

I don't understand the behaviour when t == false

wintry solar
#

I think they need to be within a list themselves

zealous glen
#

If t == nil, then it returns defaults, but if t == false then it returns nil?

manic rune
#

t == false means you manually set it to "false"

#

its probably for something

zealous glen
#

I can understand the philosophy. I'm asking if that's what it's doing

wise jungle
#

how can i access the return table? is it like context.post_trigger.ret or in a different way? help a guy out i'm 💥 rn

wintry solar
#

context.other_ret

zealous glen
#

Should be context.other_ret

crisp coral
#

is this how to do a blueprintesque joker again

wise jungle
zealous glen
#

I think the error-avoiding way to do it would be

if context.post_trigger then
    local ret = context.other_ret
end
wise jungle
#

OOOOHHHH
okay okay i gotcha

zealous glen
#

something like this

wise jungle
#

yeah no lua is being mean to me i probably have been doing null checks in every single line lmao

zealous glen
#

you might want to avoid context.other_ret being nil anyways

wintry solar
#

oh I was planning on making a blueprint helper function

zealous glen
wintry solar
#

maybe I should do that today

zealous glen
#

unless you created it outside of that block

crisp coral
#

but is this correct twt

zealous glen
#

twitter?

red flower
#

TwT

wise jungle
wintry solar
#

probably should set context.blueprint_card to nil too

zealous glen
crisp coral
#

oh yeah i forgot

#

but it doesnt seem to trigger at all

wise jungle
wintry solar
#

let me grab my blueprint effect

zealous glen
wintry solar
#

oh

#

return the table, don't use trigger_effect

crisp coral
#

ughghghjdshjghjdsghjdsg

#

i need to do two twt

wintry solar
#

hmmmm

#

calc_effect rather than trigger then

zealous glen
#

to merge the tables?

#

then return them

#

or would that not work?

crisp coral
wise jungle
wise jungle
#

okay, to prevent from asking a lotta questions about this, is there like a page in wiki somewhere that tells all the things i can enable or not yet?

wintry solar
#

I don't think it's on the wiki yet

wise jungle
#

like i did enable post_trigger, and it works
and tried to enable other ref like that but it still keeps on giving me null

zealous glen
wintry solar
#

just post_trigger is needed

wise jungle
#

okay all good
it still does keep on giving me nil other_ref though, can't access the MULT MODS gRRRAAAAAHHH 💥
i'll give the mod a pause though, i'm going to be busy with something soon anyways, but if theres suggestions i dont mind listening to them

strong jacinth
#

So this code makes you able to select 6 cards, not play them. Any idea why and how i fix it?

#

And how do i make this voucher only appear once.

strong jacinth
#

Wdym? Like can you show the whole Voucher code?

zealous glen
#

That's a patch that changes the line in the game code that prevents you from playing the hand

unkempt thicket
#

oh its a lovely patch thats all you need should work with anything reguards of the object type

strong jacinth
zealous glen
#

No

unkempt thicket
#

You have to put it in a lovely file

zealous glen
#

It needs to be in a .toml file

#

with a lovely header

unkempt thicket
#

[manifest] version = "1.0.0" dump_lua = true priority = 0

zealous glen
#

in a lovely folder

slender mango
humble girder
#

you can't score before scoring

manic rune
#

yeah uh, am i understanding it wrong

slender mango
humble girder
#

actually, this is weird, I'm not sure why it even works this way

mult = mod_mult(G.GAME.hands[text].mult)
hand_chips = mod_chips(G.GAME.hands[text].chips)

check_for_unlock({type = 'hand', handname = text, disp_text = non_loc_disp_text, scoring_hand = scoring_hand, full_hand = G.play.cards})

delay(0.4)

if G.GAME.first_used_hand_level and G.GAME.first_used_hand_level > 0 then
    level_up_hand(G.deck.cards[1], text, nil, G.GAME.first_used_hand_level)
    G.GAME.first_used_hand_level = nil
end

local hand_text_set = false
-- context.before calculations
SMODS.calculate_context({full_hand = G.play.cards, scoring_hand = scoring_hand, scoring_name = text, poker_hands = poker_hands, before = true})
        
-- TARGET: effects before scoring starts

mult = mod_mult(G.GAME.hands[text].mult)
hand_chips = mod_chips(G.GAME.hands[text].chips)
strong jacinth
humble girder
#

seems to me like SMODS forcefully resets to avoid any before-context scoring

wintry solar
#

thats vanilla

humble girder
#

you could patch a context before mult, hand_chips, modded = G.GAME.blind:modify_hand(G.play.cards, poker_hands, text, mult, hand_chips) or before for _, v in ipairs(SMODS.get_card_areas('playing_cards')) do to serve your mod's needs

wintry solar
#

it's because context before is only used to level up hands

humble girder
#

ah

wintry solar
#

it's not really a "scoring" context per se

strong jacinth
unkempt thicket
#

you flipped the symbol it should be > not <

manic rune
manic rune
wintry solar
#

it accepts a table of tables

manic rune
#

a table of tables?

#

so, i do this instead?

wintry solar
#

what are your tables like before hand?

#

oh maybe this just merges tables that are integer indexed?

manic rune
#

the "chr" one is Asta

#

i tried it with simpler tables, doesnt seem to work too

lavish lake
#

guys what should I make for my mod Medium?

My vision:
This is a mod that makes purple seals more frequent and useful, as well as spectral cards. I want this mod to have around 20 jokers and a few vouchers. I want uncommon-rare joker ideas that have unique ways of triggering them, for example selling the joker to get a boost, or get a good boost temporarily for a few rounds. Purple Seals should be mentioned in the jokers, hence the name of the mod, Medium (the spectral card that makes purple seals).
wintry solar
#

it must be for tables that dont have keys

manic rune
#

💔

#

goddamn it

#

i wanted to somehow speed up the process of this

#

surely theres a better way 😭

red flower
#

Why don't you combine them normally and have a global table with the key order

manic rune
#

i thought of that too, but the thing is i still have the other table, which is character's configs

#

they dont retain their orders when i add them in

#

.

#

wait nvm, i misunderstood your idea

#

yeah let me try

rich veldt
#

how does create_card() exactly work?
(especially in terms of creating a joker)

unkempt thicket
#

Whats the weight of black hole?

manic rune
#

very heavy

unkempt thicket
#

Oh, i meant the card

wise jungle
#

lmao

tall wharf
#

is it possible to put custom object in info_queue somehow????

crisp coral
#

as long as its in G.localization.descriptions, yea

tall wharf
manic rune
#

i saw someone adding blinds to info queue before

crisp coral
#

oh literal GameObjects

#

idk

tall wharf
#

cardarea in tooltip 😭

strong jacinth
#

How would a straight work with the evaluate pokerhand function

red flower
#

ez

dreamy thunder
#

oh wow

tall wharf
red flower
#

put this in genrate_ui on the object that you are displaying in the tooltip

tall wharf
#

huh

#

so object type

#

so if i were to make a joker

#

i just

#

generate_ui = function()
that thing
end

red flower
#

yes

manic rune
#

magical ui man

red flower
#

only if you're adding that joker in a tooltip, it doesn't add a tooltip to that joker

manic rune
#

how did you figure it out that fast though, damn

tall wharf
#

so if i add a tooltip to that joker i can d othat

red flower
#

because I already messed with that to change some things

red flower
# red flower

it's kinda confusing but here I'm adding the card area to sheou to display when hovering house

manic rune
#

the j_joy_yokai_ash part, is that the card you are hovering or the card in the info queue?

red flower
#

the card inside the area

manic rune
#

got it

tall wharf
#

ok i will pretend to understand

#

and will update shortly

manic rune
#

i half-understand because N' basically hand-held me through the whole ui stuff at least twice now ❤️

red flower
#

i learned about how UI works with cardareas because eremel added one for jokerdisplay's config

manic rune
manic rune
#

and uh, from experience of doing that, im slowing understanding UI more and more

red flower
#

I should probably take some time to document my code today

neat plover
#

whats the variable to access the money of the player?

red flower
#

G.GAME.dollars

neat plover
#

thanks

tall wharf
#

i feel like i did something wrong

#

jimbo is a test

manic rune
#

i dont think you return anything in generate_ui

red flower
#

you need to call SMODS.Center.generate_ui(self, info_queue, card, desc_nodes, specific_vars, full_UI_table)

tall wharf
#

❤️

#

makes sense]

red flower
#

yeah, it shows up when you put Netherite Pickaxe in another card's info_quueue

tall wharf
#

ah

#

ok

#

i get it now

manic rune
#

i pray to the lords of UI that this works first try.

#

🙏

tall wharf
#

actually yeah that makes sense now that you say it that way

red flower
#

you can also put the cardarea in the main description if you don't check for full UI table main

tall wharf
#

ah

#

understand now

red flower
#

letsgo

tall wharf
#

about to make this a util function

manic rune
#

is this supposed to return nothing

#

😭

strong jacinth
#

How would you create a straight if there was no.

tall wharf
red flower
manic rune
#

👻

manic rune
#

how do i sort them in order then, what

red flower
#

pairs doesn't guarantee order

manic rune
#

yeah

#

im trying to put all the keys in order

#

uh, this

#

surely i dont manually type them in

neat plover
#

can i do that?

manic rune
#

you can

red flower
manic rune
#

and then theres the thing with characters' config too, im also supposed to order them

neat plover
manic rune
#

...do i just resort to manually putting in loc_vars at this point

red flower
#

can't you have the same loc_vars for everyone

manic rune
#

i cant

#

its different for everyone

#

except for the "type" and "element"

red flower
#

yeah you might need to do it manually

manic rune
#

goddamn it lua

#

😭

#

welp, i guess i tried

broken cliff
manic rune
#

i really hope no one will look at my code 🙏

broken cliff
#

its fine

manic rune
#

ive been trying for the past few days to find a way around this already, man

broken cliff
#

u have not seen 200+ if statements for all jimbos 😭

tall wharf
manic rune
#

im copying that

#

🔥

#

actually, does this count as plagarism or smt (my grammar sucks)

tall wharf
#

i mean

#

i don't mind

red flower
#

don't do add_to_deck or they're going to trigger effects

tall wharf
#

ah

manic rune
#

it was a joke, but im actually wondering if this is against the rules 😭

tall wharf
#

alr

neat plover
#

i want to do something like if gives you mult for every 5 dollars you have, but how do i do that

manic rune
#

math.floor(G.GAME.dollars/5)

#

i think

neat plover
#

cool

red flower
#

i would do floor

#

but yeah

tall wharf
#

programming would count as copying as extreme sport

manic rune
#

oh sh you are right, its floor

#

got floor and ceil functionality mixed

red flower
#

do you know where the ceiling is

manic rune
#

in this universe, probably

#

i actually hate when

#

if i were to add new stats

#

i would have to manually change the #num# of everything in localizations

#

can you do #num+smt#

red flower
#

you might need to create your own loc system lol

manic rune
#

godamdoamd

#

WHATEVER SAVES MY TIME AT THIS POINT 😭

#

where is the code located

#

im assuming smt related to ui in balatro source code

red flower
#

i dont remember how the parsing function was called

#

loc_parse_string

#

all the localization stuff seems to be in misc_functions

#

I think smods has some too

manic rune
#

i wonder if its any of those

red flower
#

nah I think those are just for reading the files

manic rune
#

mm i see

#

doesnt seem to lead me to misc_functions, so im guessing this is the only file which has loc functions?

red flower
manic rune
#

ghghghghgk i suck at this

#

thanks, hopefully i dont need a patch for this

tall wharf
manic rune
#

i wonder why am i torturing myself so hard for my first ever mod 😭

red flower
manic rune
# tall wharf

...i fail to see how canio fits in there, but nice

tall wharf
#

i got it working

#

and reusable function

manic rune
#

am i correct to assume i will need to increase this for #3+2# to work

red flower
#

no, I'm pretty sure it's the last elseif

tall wharf
#

reusable code for later

red flower
#

you need to parse that

manic rune
#

a patch it is

#

i think i know what im doing this time

#

this is just great

  • i cant get the code working
  • my parents seem to be getting in a huge argument right at this moment
manic rune
#

ok this is just a giant assumption, but from what im hearing: my mom seems to be cheating

#

hopefully it remains at that

#

nothing more than a false assumption

tall wharf
#

😭

strong jacinth
#

Any idea why this crashes

tall wharf
#

nothing is returned

#

obviously

strong jacinth
#

Why does it crash at Ui definitions

#

When i open run info

zealous glen
manic rune
#

i suppose so, but i love pushing myself beyond my limits

#

not like i will get an opportunity to do so ever again, if my life is as it is anyways

zealous glen
normal crest
#

Oh whoops, I didn't mean to send that

#

Ignore it

manic rune
#

i do need help right now, things couldnt go any worse than this

zealous glen
#

What kind of help

manic rune
#

mental help

#

some stuff is going on in my family rn

zealous glen
#

I see

manic rune
#

the fact that this all happens during the weekend means i will have to stay at home and witness everything unfold

zealous glen
#

Do you have a friend or maybe a neutral third-party to confide to?

manic rune
#

i will probably go to my friend's house tomorrow

strong jacinth
zealous glen
#

Anything to do in the meantime?

tall wharf
#

LET'S GO

manic rune
#

ignorance is bliss

#

i dont even know what is going to happen to me after this

manic rune
tall wharf
#

a lot of head spinning

strong jacinth
#

It is a rendering issue.

zealous glen
#

It’s good to focus on something that’ll make you more relaxed I think

manic rune
#

the thing is: i dont know if i would get the opportunity to continue on my mod after this

#

if everything goes wrong, i might publicize my mod files

zealous glen
#

Well, if you have the files in person or on the GitHub, you can come back later to it someday

manic rune
#

and uh, in which case, whoever wants to continue working on it can do so, i dont really mind

zealous glen
#

It can even be private on GitHub, I think

manic rune
#

i havent set up my github yet

strong jacinth
zealous glen
#

Might be a good time to do it

manic rune
#

you can guess the worst case scenario

#

and its actually pretty likely to happen

strong jacinth
#

Yeah, i heard what allegedly happend. Sorry for you my guy

manic rune
#

and uh, if i dont go online within 1 week, they can post the link into my mod thread for me

broken cliff
#

there a smods.https now

strong jacinth
#

And what does that do=

manic rune
#

oh thats cool

broken cliff
zealous glen
manic rune
#

mhm, i hope so too

tall wharf
#

hiiii

manic rune
#

hi

zealous glen
#

Hello

manic rune
#

what would i need to do if i want a joker to, uh

#

+4 mult (joker_main) then retriggers itself

#

wait nevermind im dumb, scrap that

strong jacinth
tall wharf
#

how do i resize this in render

strong jacinth
tall wharf
strong jacinth
#

Oh

gleaming zealot
#

minecraft glass

zealous glen
#

Are you setting the letters' scale?

manic rune
#

how the fuck did i get 2940 retriggers

#

😭

#

thats concerning

tall wharf
zealous glen
#

The card examples are cute

tall wharf
tall wharf
strong jacinth
#

How do i get the hand played like that cards with evaluate(parts, hand)

manic rune
#

n' the goat

strong jacinth
#

yes

zealous glen
tall wharf
#

scale was not properly set

#

that was it

zealous glen
manic rune
#

...oh, thats why

#

uh

#

accidentally made it so

#

retriggers = squared of itself

tall wharf
#

in render i had to just make the scale the same as the card

#

@red flower would it be possible to put these in info_queue things too

zealous glen
zealous glen
#

you can try it

#

Put your Joker in another Joker's info_queue

red flower
#

they should be there too yeah

tall wharf
#

or do i have to make another entry

dense vector
tall wharf
#

for example if i want the card there

manic rune
#

i think its possible

#

since the box in info_queue should work the same way as how jokers' description works

zealous glen
strong jacinth
#

Yo wsg N'

red flower
# zealous glen try this

This works but If you want only the cards to be there then you might need to create another object or hook the generate ui function

#

oops didnt meant to ping

red flower
zealous glen
strong jacinth
red flower
#

no

manic rune
#

swearing is allowed, dont worry :3

strong jacinth
#

awe man

manic rune
#

N', how many of those websites do you have

tall wharf
#

ok so

manic rune
#

😭

tall wharf
#

here is my loc_vars

red flower
tall wharf
#

what i am asking if it's possible to just do it from here

manic rune
#

ah i see

red flower
#

i dont think so

strong jacinth
tall wharf
#

or do i have to make a dummy center object to help with these

red flower
#

you probably need to make an object, I'm not sure

strong jacinth
red flower
#

i was replying to aiko

#

no idea about yours honestly

manic rune
#

...hm

#

joker_retriggers are wonky asf

#

i initially thought if i were to retrigger a joker, it would still run the if statement and allat, but it goes straight to this

#

thats odd

strong jacinth
zealous glen
quasi bison
#

is there any documentation for the G variable?

manic rune
#

oh nope, it just retriggers the FIRST played card, what the hell

red flower
red flower
quasi bison
#

alright

#

any specific file?

tall wharf
wintry solar
red flower
quasi bison
#

ty

zealous glen
#

?

manic rune
strong jacinth
red flower
strong jacinth
#

Can you do G.play[1]

strong jacinth
#

And can you do G.play.length

zealous glen
# tall wharf ?

If you add the whole Joker to a tooltip, it should also include the cards. I suggested you do it to test that the cards can appear in info boxes

red flower
wintry solar
#

Where are your retriggers coming from?

red flower
manic rune
tall wharf
manic rune
#

i dont think any other code checks for the played card, other than the part i showed above

#

HSRContextHandler is basically a function combining the check for different contexts, and return some stuff from which

wintry solar
#

So this card has a self retriggers property of 14?

manic rune
#

mhm

wintry solar
#

So what’s the problem?

manic rune
#

is it supposed to have the "Again!" pop out on the played card 14 times too?

wintry solar
#

If you retrigger it 14 times, of course it is

wintry solar
#

Oh it should be in the joker though

strong jacinth
manic rune
# manic rune

yeah, the code should stop checking the played card after the "+1 Astronomy!" pops, as shown in this

wintry solar
#

So you don’t want it to retrigger?

manic rune
#

mhm

#

it actually doesnt break anything, just that it looks odd

wintry solar
#

Then stop it from entering thet part like you do with blueprint

strong jacinth
#

Any poker hands creator experts

manic rune
#

how would i do that, is there a context like "not context.blueprint" but for retriggers specifically?

wintry solar
#

Yeah

clear epoch
# strong jacinth

first of all you should check for the G.play.cards[i].rank, not for the card itself

wintry solar
#

I don’t remember it off the top of my head

manic rune
#

is it something like "not context.retrigger_joker" lol

#

found this at the bottom of the calculate documentation, not sure if its the right one

wintry solar
#

That sounds correct

clear epoch
whole grove
#

Does anyone know how I can make a joker that changes the rank of a card that is played?

broken cliff
#

im still confused

manic rune
tall wharf
gleaming zealot
clear epoch
#

maybe digging through cryptid src code also might help if this isn't enough

manic rune
#

doesnt seem like context.retrigger_joker does anything, sadly

#

...its just a bit annoying visual-wise, so i guess i can work with that

clear epoch
manic rune
#

else, increases a certain variable once and set the played suit to true, preventing other playing cards of the same suit from triggering it

wintry solar
clear epoch
manic rune
#

the retrigger joker code wouldnt even work if i didnt have that turned on lol

clear epoch
#

put this at the beginning of your main mod file

manic rune
manic rune
# wintry solar You’re checking if it’s true here

its two blocks of "or" (i dont know the terms for those ❤️)

  • the first one checks if context.retrigger_joker is there. if it is, ignore if context.retrigger_joker is itself
  • the second one checks if context.retrigger_joker is not there, if it isnt then the code will go through
#

i also tried with just this, no luck though

clear epoch
manic rune
#

its this lol

zealous glen
wintry solar
#

Can you throw a print(context.retrigger_joker and “yes” or “no”) in pls

manic rune
#

inside the whole if statement? sure, wait

clear epoch
#

hmmm well first of all i'd highly advise against creating a different field in card.ability for each suit, i can only assume that messes things up a little. try a local table instead

#

gimme a sec and i'll show u what i mean

wintry solar
#

It wouldn’t cause any issues at all

manic rune
wintry solar
#

Okay

#

So it is working

#

Just it’s still spamming the again

manic rune
#

yeah

#

only happens if i play a card of a suit which hasn't been played too

wintry solar
#

Yes

#

This is from smods assuming that a card that returns something can be retriggered

manic rune
#

oof

#

is there any way i can work around this?

wintry solar
#

There is but I think waiting for a smods fix would be cleaner

#

Add no_retrigger = true to the return table

#

I’ll make it work at some point 🤣

manic rune
#

i see, but since its just a visual stuff i think it will be fine anyways, thanks :D

wintry solar
#

You should still add it, that message spam is awful 🤣

manic rune
#

fortunately its just me setting the joker's speed really high to see if the retriggers work anyways, so before the fix it shouldnt matter too much lol

clear epoch
#

@manic rune try this for your suit counting:

    if context.cardarea == G.play then
        local suits = suits or {["Spades"] = 0, ["Hearts"] = 0, ["Clubs"] = 0, ["Diamonds"] = 0}
        if context.individual then
            for k, v in pairs(suits) do
                if context.other_card:is_suit(k) then suits[k] = suits[k] + 1 end
            end
        end
    end
end```
#

i'm not saying it will fix the retriggering directly buuuut maybe it will somehow help smods bug out less

manic rune
#

oh, but the thing is that i want my joker not counting that suit for the rest of the round

clear epoch
#

even easier then

manic rune
#

and since that should definitely be saved, i used card.ability to achieve that

clear epoch
#

one sec

wintry solar
#

Yeah the suit counting is fine

#

Though you probably don’t need to loop through all the suits every time

manic rune
#

oh yeah

#

i think i was supposed to remove the loop 😭

#

wait nevermind, that was the part of another joker

#

ghhh my brain is fried

clear epoch
# clear epoch one sec

calculate = function(self, card, context)
    if context.setting_blind then
        suits = {["Spades"] = 0, ["Hearts"] = 0, ["Clubs"] = 0, ["Diamonds"] = 0}
    end

    if context.cardarea == G.play then
        if context.individual then
            for k, v in pairs(suits) do
                if context.other_card:is_suit(k) then suits[k] = suits[k] + 1 end
            end
        end
    end
end``` once again it most likely won't fix the issue but it might be worth a shot
#

plus i think it might be a bit more readable for the future

manic rune
#

oh, is the "suits" variable outside the calculate?

clear epoch
#

yep

manic rune
#

like, they are around here? (and i think you should help NoplayerCh too, i dont know how change ranks of played cards 😭)

clear epoch
#

this is technically not recommended but i've used it before when counting suits and i saw no issue rise whatsoever

manic rune
#

thats the main reason why i used card.ability lol

#

but if it does then i can actually see myself using it, thanks

strong jacinth
clear epoch
#

so probably 99% chance it does save

#

if that doesn't work

#

i'd do the same thing ancient joker and castle do and add a global variable in Game:init_game_object()

#

and ride off that thing

manic rune
#

i personally wouldnt add a global variable if its only used by one joker lol, but yeah, thats definitely one method

clear epoch
#

i mean, thunk did it and it was perfectly fine

#

¯_(ツ)_/¯

cerulean rose
#

any idea why my sticker is appearing on cards from judgement?

local hook2 = create_card
function create_card(_type, area, legendary, _rarity, skip_materialize, soulable, forced_key, key_append)
    local ret = hook2(_type, area, legendary, _rarity, skip_materialize, soulable, forced_key, key_append)
    if G.GAME.modifiers.enable_pencil_paralyzed and pseudorandom((area == G.pack_cards and "pack" or "") .. "_pencil_paralyzed" .. G.GAME.round_resets.ante) > 0.7
        and _type == "Joker" and (area == G.shop_jokers or area == G.pack_cards) then
        SMODS.Stickers.pencil_paralyzed:apply(ret, true)
    end
    return ret
end
clear epoch
cerulean rose
wintry solar
#

you should just have a table like card.ability.extra.suits and then toggle ones that ahve bene played

wintry solar
#

like if not card.ability.extra.suits[context.other_card.base.suit] then --code here end

clear epoch
wintry solar
#

no need for any loops

clear epoch
manic rune
#

...oh, you can get suits with context.other_card.base.suit? just knew that, thanks :D

clear epoch
#

my brain is probably also fried rn XD

wintry solar
#

and then just clear the table whenever you need to reset it

manic rune
#

(im still new at this whole modding stuff, dont blame me for not knowing these please 😭)

cerulean rose
manic rune
#

i can always put a check to see if it has wild enhancement lol

wintry solar
#

depends on the use case

#

do you want a wild card to count for all suits?

clear epoch
manic rune
#

i do

#

oh actually, does :is_suit() count for wild cards?

#

neat

clear epoch
cerulean rose
clear epoch
wintry solar
cerulean rose
#

are they?

#

lemme check

onyx sonnet
#

whats the context that glass cards use for being destroyed? im trying to do something with a similar timing

clear epoch
grim remnant
#

trying to figure out DeckSkin, any clue why the images just aren't showing up? (the only other thing we could find to this effect resolved it by just gutting the tutorial, which feels a bit inefficient for what we're trying to do.)

onyx sonnet
#

oh destroyed cards have their own timing in scoring?

wintry solar
cerulean rose
grim remnant
wintry solar
#

I think you have the pos_style wrong

#

deck would expect the full deck sheet iirc

clear epoch
tall wharf
#

ok so how do i register my own centers properly im trying to get the funny description working

onyx sonnet
clear epoch
onyx sonnet
#

context after was crashing my game

cerulean rose
onyx sonnet
#

with an error i couldnt really decipher

grim remnant
clear epoch
#

try it again and send the error here maybe?

onyx sonnet
#

will do

tall wharf
#

it's in here but it's not in P_CENTER_POOLS

clear epoch
#

cuz as far as i am aware destroy_card is the context for things like caino when cards are destroyed

onyx sonnet
#

nevermind it works but only for the first card

cerulean rose
#

it triggers once and passes an array of cards

#

if they all break at the same time

onyx sonnet
#

this is suppossed to destroy all sealed cards after a hand finishes scoring, and it increases mult for every destroyed card in this manner

wintry solar
#
if context.destroying_card and context.destroying_card.seal then
  card.ability.extra.x_mult = card.ability.extra.x_mult + card.ability.extra.scaling
  return { remove = true }
end
#

that's all you need

onyx sonnet
#

really?

clear epoch
# onyx sonnet

the context.main_eval is the issue for sure, just try eremel's method for now