#💻・modding-dev

1 messages · Page 226 of 1

tall apex
#

I JUST GOT THE EGG JOKE

#

that took me a second i related to the sexy part but i do be a the that

chrome widget
#

Flirty transfem joker that makes comments about every other woman joker you add to your slots, as well as a few miscellanous gags

tall apex
#

real asf

#

oh, question

chrome widget
#

Yep yep??

tall apex
#

um, my jonkler doesnt work and crashes the game X3

chrome widget
#

WHOOPS. Show me your crash log

tall apex
#

i am trying to make a joker that just adds 5 chips whenever any other joker triggers

tardy wind
#

Yoooo, anyone's got a quick setup guide for mods ?

chrome widget
#

Well, the error points to a function called get_compressed(), which is a loading function

chrome widget
#

It's used almost entirely for loading save data values for your profile

#

Did you accidentally corrupt your profile or something?

tall apex
#

guh?

#

no it does this when my silly tries to exist

chrome widget
#

Confirm that it doesn't occur when you don't add the joker

#

Just in case

tall apex
#

okie c:

#

i mean this code probibly doessn't work the way i think it does

#

. 3.

sturdy compass
#

Can you show the full code?

chrome widget
#

oh wait lmao you're working on cardsauce

tall apex
#

oh im not on the project, this is my own mod c:

#

i just enjoy it

chrome widget
#

Nono I just saw you posted that you're working off it in the cardsauce server

chrome widget
#

I also used cardsauce as a basis b/c Gote/BarrierTrio is a friend of mine and we're working on this as a spin-off ish mod for a JoJo server we're both in

turbid maple
#

okay what the hell are you supposed to do with desc_nodes in generate_ui

tall apex
#

if you wanna see the joker i made earlier today gote pinned it in mod discussion LMAO

chrome widget
#

In generate_ui, if you add stuff to the desc_nodes table, it'll show up on the UI

#

generate_ui is an...... interesting function

turbid maple
#

I appened some random example node

#

it crashes and burns because at some point it tries to index variable node in set_parent_child

tall apex
#

also my little spungus is the cause of the crash i played about 3 antes in on the same seed

chrome widget
#

Out of curiosity, add another set of braces around the outermost node

#

But my other suspicion is that you probably don't need to add the ROOT node

#

So instead start from the second outermost node

turbid maple
#

what the hell???

chrome widget
#

Any given UI tree has exactly one root, and desc_nodes is probably (I say this without having looked at the code) childed under something else that has a root

turbid maple
#

oh my god

latent portal
#

I FIGURED IT OUT!!!!

chrome widget
#

👍

latent portal
#

GUYS

#

I FUCKING DID IT

turbid maple
#

so each entry of desc_node is a...

#

uh..

#

an array of nodes??

chrome widget
#

Yep

turbid maple
chrome widget
#

Tree structure, it'll append as many as you give it

#

and then resize them according to the config values on the parent (which in this case are probably specified somewhere for joker descriptions, but idk where)

turbid maple
#

I assumed an element of a desc_nodes would be, a singular node

chrome widget
#

Each node can contain an array of nodes, is the thing

turbid maple
#

so I was trying to set it to a singular node containing nodes = {...}

#

¯_(ツ)_/¯

latent portal
#

hey whats the color for gray text and stuff

chrome widget
#

{C:inactive}{}

latent portal
#

thanks

gilded narwhal
#

hey guys how would i make it so it actually shows the correct price when i initially enter the shop because for some reason it only updates after you reroll

plush cove
#

calculate_reroll_cost(true)

tall apex
#

I GOT IT

#

yibeeeeeeeeeeeeeee

#

two jokers in one night, i'm proud c:

merry raven
#

I want to create a global function that constantly checks if there are remaining stickers in the deck at the end of a round, and if there are, clear them

I'm not sure if this is the way to do it, any insights?

tardy wind
#

In joker description, how can I have a dynamic variable ? Say i want to display a mult that changes
Im checking other mods, but i dont think im getting it

chrome widget
#

oh lord, good question

#

The easiest way to do this I think is using the generate_ui function

#

I have an example right here:

#

Unless you just mean displaying a variable by base, which is built into loc_vars

tall tangle
#

Well how do Runner, Yorick, Obelisk, etc. do it?

chrome widget
#

It gets a lot harder when you want to do conditional formatting

tardy wind
chrome widget
#

Okay good yeah sorry I just had flashbacks attempting to do a joker that switched between displaying xMult and +Mult

#

No you just pass in a variable in the return table for loc_vars

tardy wind
#

conditionals I'll figure out a lazy way around it

scarlet spire
#

for example #1# in your joker's description would be written out as the first variable in your loc_vars

latent portal
#

quick question

#

what's the best way to get the score of a hand that's currently being played

tall wharf
#

the what

merry raven
# tardy wind In joker description, how can I have a dynamic variable ? Say i want to display ...

Use loc_vars and config

Take my joker for example:

    key = "bladefury",
    loc_txt = {
        name = "Bladefury",
        text = {
            "Charge with 5 {C:green}Strand{} cards.",
            "When charged, playing a {C:attention}Pair{}",
            "or a {C:attention}High Card{} will",
            "slice them into equivalent pairs,",
            "cloning them but with halved ranks.",
            "{C:inactive}(Currently: {C:attention}#1#{C:inactive})"
        }
    },```

config = {
extra = {
charge = 0,
}
},
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.charge .. "/5 Charging" } }
end,


`#1#` will point to a changeable variable in your description. The number in the hash symbol will determine the position of the value you're putting in it (in this case 1 points to the first value defined in `config`, which `charge`)

`loc_vars` will output return the values defined at `#1#`'s position

And basically you can modify the value anywhere in your code by doing `card.ability.extra.[the value in your config]`, this is mine: `card.ability.extra.charge = math.min(5, card.ability.extra.charge + 1)`
latent portal
#

like after score is processed

#

how many chips it scored

tall wharf
#

i think it's something like G.GAME.current_round.something

#

actually have you tried looking around in the source code

#

like i think you'll have to multiply them

latent portal
#

found it

#

G.GAME.current_round.current_hand.chip_total

#

huh

#

i can't get context.after to work

#

is it deprecated or something??

#

does anyone know why it doesn't do anything

turbid maple
#

GAHH these are nodes with n = G.UIT.R containing two text nodes why are they going into columns

green plank
#

this is about right, but i still need to figure out how to restrict it

latent portal
#

hey how do i make a joker grant money again

#

im returning money = card.ability.extra.money but nothing's happening

turbid maple
#

huh??????

plush cove
#

or if you want it to happen at the end of the round, you'd write a calc_dollar_bonus() thing

stray warren
#

You could do that too I guess, but returning dollars = x should work as well

latent portal
#

yeah i do want it to happen at the end of the round but thats only if you dont have anything else to calculate right

plush cove
gilded narwhal
#

why are these getting rounded up?

#

it should just multiplying the price of everything by the current ante but its adding 1 for some reason

stray warren
#

set_cost() does some math.max shenanigans, so it's probably related to that

tall wharf
#

pixel art is difficult 😭

turbid maple
#

WHY CANT I GET YOU IN ROWS

#

Am I dumb what's wrong here

        desc_nodes[#desc_nodes + 1] = {
            {
                n = G.UIT.R,
                config = { align = "tm", 0.1, emboss = 0.1, colour = G.C.L_BLACK, r = 0.1 },
                nodes = {
                    {
                        n = G.UIT.R,
                        config = { align = "cm", padding = 0 },
                        --stylua: ignore
                        nodes = {
                                { n = G.UIT.T, config = { text = "Placeholder #2", scale = 0.35, colour = G.C.UI.TEXT_LIGHT }, },
                                { n = G.UIT.T, config = { text = "Placehodler #2 Electric Boogaloo", scale = 0.35, colour = G.C.UI.TEXT_LIGHT }, },
                        },
                    },
                },
            },
        }
tall wharf
#

i don't know if it's just naming being funny but try C

tall apex
#

do you all know how i'd check for how many of a certain edition my deck has?

turbid maple
#

¯_(ツ)_/¯

tall wharf
#

I'll try more UI shenanigans later ig

chrome widget
#

Is it possible to pass multiple colors into a message return?

tall wharf
#

i would wrap text in a row or something

latent portal
#

this is the card ive been working on (art is placeholder)

chrome widget
#

Some other effects the game expect a table of colors, and I want to know if it's possible to do a gradient or something or if I'd have to code that myself

latent portal
#

what do you guys think?

tall wharf
#

cool

gilded narwhal
tall wharf
gilded narwhal
green plank
#

mfw this is a joker that i could actually code and not worry about anything else

gilded narwhal
#

holy glass cards!

tall wharf
runic pecan
#

Does anyone know why Misprint’s mult range is 0-23?
Like, why 23? I looked up the wiki and it didn’t say why, either.

green plank
#

you wanna see the inspiration behind that joker

#

it's this

tall wharf
#

😭

#

mine is common

green plank
#

that is what they decided to make the rarity as

tall wharf
#

personally i am just doing word play on these numbers

modern kindle
#

does it need to have a reason

#

maybe the thunkler likes the number 23

runic pecan
#

OK

tall apex
#

unexpected symbol near '{' on line 61

#

me when theres NOTHING ELSE THERE

green plank
tardy wind
#

and you check after that loop if the list size == 5

#

or well, >= straight_size

#

(since it can be 4)

#

since its « and » in your joker, forcing a hand size of 5 isnt that bad as well

green plank
#

so this is what i have

tardy wind
#

so in the context.before code block

#

you do something like

#
cards = {}
for card in played_hand
      if card.rank is ace or 2 or 3 or 4 or 5 and card not in cards then add card to cards 
end
if cards.size == 5 then xmult = xmult + xmult_gain ```
#

this is not real code just pseudocode to show the idea

tall apex
#

question

#

why is it saying this 'center' is a nil value

stray warren
#

center isn't defined anywhere

#

the parameter is called card

tall apex
#

AH

tardy wind
#

try card.center

tall apex
#

okieeeee c:

#

it works! :D

green plank
tardy wind
#

i wrote my pseudocode assuming hand size of 5

tall wharf
#

why does everyone and their mother changing hand selection size

#

and why is there no library just for it yet

tall apex
#

Good night balatro modding community

tall wharf
#

😭😭😭😭😭😭😭😭😭

manic rune
#

good table

#

NAH THEY ARE ALL REMOVED 😭

tall wharf
manic rune
#

home depot™️ done got demolished by discord bruv

tall wharf
#

ok i thought embed was gone

manic rune
#

EVERYTHING IS ACTUALLY GONE

tall wharf
#

gone

tall wharf
#

dementia

#

i think i have dementia

rapid stag
#

someone please help, i've been wrestling with this for far too long with the steamodded documentation open the whole time and i just don't understand why red text do that and not what i want it to

manic rune
#

im gonna try adding the 2 limited 5* before going on hiatus for my tests

rapid stag
# tall wharf i can't see code

in root node:

            {
                n = G.UIT.C,
                config = { align = 'cm', id = 'cir_config_toggles' },
                nodes = {
                    {    
                        n = G.UIT.R,
                        config = { align = 'tm' },
                        nodes = {
                            -- Contains 3 nodes
                            {
                                -- Changes apply on restart text
                                n = G.UIT.T,
                                config = {
                                        text = "Changes Apply On Restart",
                                        scale = 0.4,
                                        colour = G.C.RED,
                                        align = 'tm'
                                    }
                            },
                            {
                                -- First options column
                                n = G.UIT.C,
                                config = { align = 'tm' },
                                nodes = {
                                    {
                                        n = G.UIT.R,
                                        config = { align = 'tr', padding = 0.05 },
                                        nodes = {
                                            create_toggle({
                                                label = "Enable Title Screen Logo",
                                                w = 1.5,
                                                text_scale = 0.7,
                                                ref_table = CirnoMod.config,
                                                ref_value = 'titleLogo',
                                                callback = CirnoMod.callback_titleLogoToggle
                                            })
                                        }
                                    },
[...the rest of the nodes]```
tall wharf
#

you'll want to wrap the options in another node

#

the 2 columns

#

and then set the one just inside root to C

plain apex
#

this should be applying x_chips on new calc but is only applying the x_mult what did i do wrong?

if config.newcalccompat ~= false then
    Cubic = SMODS.Enhancement({
        object_type = "Enhancement",
        key = "Cubic",
        loc_txt = {
            name = "Cubic",
            text = {
                "{X:chips,C:white}X#1#{} Chips {X:mult,C:white}X#2#{} Mult",
                "Idea: BoiRowan",
            },
        },
        atlas = "Jokers",
        pos = { x = 1, y = 17 },
        config = { extra = { x_chips = 3, x_mult = 0.6 } },
        weight = 0,

        loc_vars = function(self, info_queue, card)
            return {
                vars = { 
                    card.ability.extra.x_chips, 
                    card.ability.extra.x_mult 
                }
            }
        end,

        calculate = function(self, card, context)
            if context.main_scoring and context.cardarea == G.play then
                return {
                    x_chips = card.ability.extra.x_chips,
                    x_mult = card.ability.extra.x_mult
                }
            end
        end
    })
end
rapid stag
#

i did something wrong cirLost

n = G.UIT.ROOT,
        config = {
            r = 0.1,
            minh = 6,
            minw= 6,
            align = 'cm',
            colour = G.C.CLEAR
        },
        nodes = {
            {
                n = G.UIT.C,
                config = { align = 'cm', id = 'cir_config_toggles' },
                nodes = {
                    {    
                        n = G.UIT.R,
                        config = { align = 'tm' },
                        nodes = {
                            {
                                -- Changes apply on restart text
                                n = G.UIT.T,
                                config = {
                                        text = "Changes Apply On Restart",
                                        scale = 0.4,
                                        colour = G.C.RED,
                                        align = 'tm'
                                    }
                            },
                            {
                                -- Options columns wrapper
                                n = G.UIT.C,
                                config = { align = 'tm' },
                                nodes = {
                                    {
                                        -- First options column
                                        n = G.UIT.C,
                                        config = { align = 'tm' },
                                        nodes = {
[...the rest of the nodes]
rapid stag
tall wharf
#

huh

rapid stag
plain apex
tall wharf
#

sorry haven't watched the video hold on

#

huh

tall wharf
#

my phone isn't liking it very much when it sees code

manic rune
#

here

tall wharf
#

right thanks

#

uh

tall wharf
plain apex
tall wharf
#

probably my bad

tall wharf
manic rune
rapid stag
tall wharf
#

you're on an old version that doesn't have xchips

plain apex
#

well that explains why xchips wasn't working

tall wharf
#

like that's almost as old as the latest old calc

rapid stag
tall wharf
#

ui is pain

rapid stag
#

yes cirSuffering

manic rune
#

cirno

plain apex
#

i could send you my ui thing if you want

rapid stag
tall wharf
#

actually

#

i wonder if you need to wrap text in a c too

#

ui is painful

rapid stag
manic rune
#

cirno :3

rapid stag
plain apex
manic rune
#

wtf 😭

tall wharf
# manic rune wtf 😭

「あたしヴァンパイア まずはこっちおいで」
8th Album「MANNEQUIN」Listen & Download: https://nex-tone.link/A00094938

2024年11月27日発売
9th Album「TRANSFORM」特設サイト: https://nbcuni-music.com/deco27
8th Album「MANNEQUIN」特設サイト: https://nbcuni-music.com/deco27/mq/

Music: DECO*27
Arrangement: Rockwell

Movie by OTOIRO
Director: ぬヴェントス
Illustration: 八三
Art Director: DMYM

Twitter:...

▶ Play video
#

I'm so reskinning this

manic rune
#

:3

#

do it

#

aiko, do u think this is good

plain apex
#

SMODS.current_mod.config_tab = function()
local scale = 5/6
return {n=G.UIT.ROOT, config = {align = "cl", minh = G.ROOM.T.h0.25, padding = 0.0, r = 0.1, colour = G.C.GREY}, nodes = {
{n = G.UIT.R, config = { padding = 0.05 }, nodes = {
{n = G.UIT.C, config = { minw = G.ROOM.T.w
0.25, padding = 0.05 }, nodes = {
create_toggle{ label = "Toggle SFX", info = {"Enable Sound Effects"}, active_colour = Fortlatro.badge_colour, ref_table = Fortlatro.config, ref_value = "sfx" },
create_toggle{ label = "Toggle Crac SFX", info = {"Enable Sound Effects for Crac Joker"}, active_colour = Fortlatro.badge_colour, ref_table = Fortlatro.config, ref_value = "cracsfx" },
create_toggle{ label = "Toggle LeftHandedDeath", info = {"Enable Left Handed Death"}, active_colour = Fortlatro.badge_colour, ref_table = Fortlatro.config, ref_value = "deathcompat" },
create_toggle{ label = "Cryptid Compatibility", info = {"Enable if Cryptid Mod is Installed"}, active_colour = Fortlatro.badge_colour, ref_table = Fortlatro.config, ref_value = "cryptidcompat" },
create_toggle{ label = "Ortalab Compatibility", info = {"Enable if Ortalab Mod is Installed"}, active_colour = Fortlatro.badge_colour, ref_table = Fortlatro.config, ref_value = "ortalabcompat" },
create_toggle{ label = "Old Calc Compatibility", info = {"Enable if using Steamodded Old Calc"}, active_colour = Fortlatro.badge_colour, ref_table = Fortlatro.config, ref_value = "oldcalccompat" },
create_toggle{ label = "New Calc Compatibility", info = {"Enable if using Steamodded New Calc"}, active_colour = Fortlatro.badge_colour, ref_table = Fortlatro.config, ref_value = "newcalccompat" }
}}
}}
}}
end

Fortlatro = SMODS.current_mod

Fortlatro_config = Fortlatro.config

Fortlatro.enabled = copy_table(Fortlatro_config)

local config = SMODS.current_mod.config

manic rune
#

her base speed is at 125 so she can actually self-retrigger without help from other jokers

plain apex
tall wharf
#

maybe dm wasn't open for them

plain apex
#

no i was trying to send it here

tall wharf
#

ah

#

what the fuck lmao

plain apex
#

like????

manic rune
#

why is some of the text italic

tall wharf
#

oh wait

#

codeblocks is funny

plain apex
#

probably discord formatting since discord was being a pain

manic rune
#

jesus

#

i think god was punishing you for using light mode :3

plain apex
#

the coding is light but the discord is dark

tall wharf
#

dark mode for notepad++

manic rune
#

yin yang type shi 😭

stray warren
#

Yeah, the asterisks were translated to markdown and everything between them was italicized

#

That's why you always enclose code with ```

tall wharf
#

wait

#

i think i know actually

tall wharf
#

i think the text he's sending was approaching 2000 characters if you add ```

#

it happens

manic rune
#

oh well, at least i got the trampoline

tall wharf
#

i was right

#

yeah the limit was more like 1950

plain apex
#

so thats why discord wouldn't let me send it

tall wharf
#

it's been like this ever since i started using Discord

manic rune
#

it seems fine

stray warren
# tall wharf

newlines and whitespace are included in the count, so it's actually more than that

tall wharf
#

and the limit was doubled

manic rune
#

oh yeah

#

wait,

#

WAIT

#

I FROGRTQ OT CANCEL tHE SUBSCRIPTION

stiff locust
#

how do I grab the name of the current poker hand

green plank
#

i could look for throwback's code but this seems a bit easy

stray warren
#

Also this probably happened, causing the error

plain apex
manic rune
#

god fuckin damn it :(

plain apex
#

i doubt most people are doing this but it works lol

stray warren
#

I mean, I think old calc is gonna be completely obsolete pretty soon, if it isn't already

stiff locust
#

what

#

people are STILL on old calc???

manic rune
#

i feel like old calc is mostly used only because of jen almanac

stiff locust
#

yeah well jen can't read so

plain apex
#

i mean im on old calc but if i actually updated stuff like i should i could probably be on new calc lol

stray warren
#

You'd save a lot of hassle by just jumping ship and supporting only new calc

past valve
#

is there a way to pull the price you just paid after buying something from the shop? looking to make a joker that deals with a % chance to refund after purchase.

plain apex
#

out here running versions of stuff from 2024 because i never updated anything past when i modded balatro 💀

manic rune
#

thats a lot of mods

stray warren
#

Do you download the zip or clone the repos

manic rune
#

now supports extra text from debuffs

#

yipee

gilded blaze
#

is there a way to make a deck apply Splash without having Splash 💀

plain apex
gilded blaze
stiff locust
#

you can patch it

manic rune
#

the splash man

stiff locust
#

pretty easily

stray warren
gilded blaze
#

I've tried that tho, but I need the exact patch

#

my attempts didn't work

stiff locust
#

check my mod's lovely.toml

#

i have the exact unbeatable patch

#

you just need to check what deck the player is on there

chrome widget
#

Can anyone help me with a concise way to phrase something?

"Gives X1 Mult for each hand size below 9
(Currently X2 Mult)"

Primary concern is that we can't specify "cards in hand" because you can have cards not matching your current hand size (such as by using Cryptid, multiple DNAs, or hand size reductions while you still have max cards in your hand). But "each hand size below 9" sounds off

plain apex
#

if only balatro modding was like lethal modding then i could just press the handy dandy update all button lol

stray warren
#

what app is that? I used R2modman in the past for lethal

gilded blaze
#

this is the said patch right?

gilded blaze
#

eh, it targets splash fusion jokers

stiff locust
#

you just remove the for loop and change the if condition

#

to if you have x deck selected

#

oh yeah and remove break

plain apex
gilded blaze
#

yea, attempted that too but haven't found the correct solution

stiff locust
#

look at cardsleeves

#

the sleeves check if you have x deck selected for stack effects

manic rune
#

silly me :3

plain apex
#

anyway play fortlatro very cool and very badly coded fortnite x balatro

merry raven
#

Is it possible to implement rescoring
Like after scoring all cards, all cards will be scored one more time, including Joker interactions, etc

gilded blaze
manic rune
#

19 fps

#

💔

gilded blaze
plain apex
chrome widget
#

Okay, need quantum enhancement help:

    if context.check_enhancement and context.cardarea == G.jokers then
        if SMODS.has_enhancement(context.other_card, 'm_lucky') then
            return {
                ['m_glass'] = true,
            }
        elseif SMODS.has_enhancement(context.other_card, 'm_glass') then
            return {
                ['m_lucky'] = true,
            }
        end
    end 
end```

This code is crashing the game, I assume from infinite loop, because it's re-proccing the check_enhancement context when the new enhancement is returned? Why? Shouldn't it only do it once, since it's expecting the return table to add the new enhancements?
manic rune
#

maybe add and not too?

gilded blaze
#

is this the correct way to allow Splash clones without Showman

#

I'm confused because the API did not provide a structure example

simple mural
#

i want to make cards that will give from x1.02 to x1.1 mult when they score. vedalUUH

chrome widget
manic rune
#

hm

#

yeah i dunno myself, i never used quantum enhancements 😭

gilded blaze
#

sadge

simple mural
manic rune
#

allowing cards to have more than one enhancement

gilded blaze
#

I have a deck that glassify all cards before they score
and it doesn't use quantum enhancement oof

manic rune
#

-# i think

gilded blaze
#

oh, so that's what quantum enhancement is

manic rune
#

basically, what they are doing is making lucky cards count as glass cards, and vice versa

gilded blaze
#

I'm so dumb

plain apex
#

mfw i break the lucky card

manic rune
#

but the thing is; i dont even know a single mod which uses quantum enhancements 😭

chrome widget
#

I guess I just have to only consider the main enhancement? I guess???

manic rune
#

so if i were to add quantum enhancements, i wouldnt even have any reference to look at

#

which kinda sucks

simple mural
#

Does RPG Balatro exist?

manic rune
#

my mod technically counts

#

:3

simple mural
#

I'm thinking about what lucky card will do in my mod...

#

Maybe 5 chips for each $2 and 15 chips for each 2 probability vedalUUH

chrome widget
#

I guess SMODS just doesn't expect you to be able to chain multiple quantum enhancement effects (I.E. a quantum enhancement makes a card considered lucky, and this joker then makes it also be considered glass because of the quantum enhancement)

#

Because it calls the check_enhancements context when you use get_enhancements, which is how you add the quantum ones in the first place

manic rune
#

how do i better word this

#

💀

#

this sounds so fucking dumb

simple mural
manic rune
#

oh, theres a function to force a loss

#

i remember seeing it, though i cant recall what its called

plain apex
#

how feasible is this 4th suggestion? i think it would be pretty cool if i actually figured out how to do it imagine having 2 editions on a card lol

manic rune
#

maybe check debug plus

manic rune
plain apex
#

neither have i which is why i question if its possible lol

manic rune
#

nothing is impossible, but maybe it involves some patching and hooks which can potentially make your mod incompatible with other mods ❤️

simple mural
#

Maybe with quantum enchantments it will be possible to make a system of card levels?

simple mural
manic rune
#

theres perm chips

#

you know Hiker?

simple mural
manic rune
#

💀

#

its a joker in vanilla balatro

manic rune
#

increases base chips of played cards

simple mural
chrome widget
#

maybe "hand size value"?

manic rune
#

nop

#

that sounds odd

chrome widget
#

Having it be an equation also sounds odd to me

simple mural
plain apex
#

i have 2 jokers that do hiker flavored chips

manic rune
#

-# you didnt have to reply that

chrome widget
manic rune
#

i have this joker which complements Hiker, Foil and Bonus cards :3

plain apex
#

how do people actually understand the like editions stuff tho the code to make one of those look like anything makes no sense to me lol

chrome widget
#

Shaders 😔

#

I've done some shader stuff but mostly by copying other code, I am not a graphics programmer

plain apex
#

best i got was asking chat gpt to help me with that one time and it created the color blue

rapid stag
gilded blaze
#

BlueStone Card

chrome widget
#

Better looking elsewhere. There's lots of examples of shader code online made by actual people

#

I typically search for GLSL stuff since Love2D uses GLSL, just with some aliases for things

manic rune
#

i refuse to rely on AIs to help me with coding honestly

plain apex
#

eh it depends really sometimes the ais help

#

and other times they give the worst code ever

rapid stag
# tall wharf ui is painful

progress, but now the box desperately wants to be really wide and wants to put everything to the left despite no left alignments.

rapid stag
#

without the maxw in the root holding it back, it just does this

#

like, this scale is correct but it shouldn't be trying to make the ui so wide? i don't understand why it wants to be however wide it's trying to be

but when i clamp the size with max, it scales the text weirdly

gilded blaze
#

I'm skipping lunch because of this shit

plain apex
#

first person balatro when fr (in the first one moving my mouse around would move the cards)

manic rune
#

sorry

stiff locust
#

do you have a permit?

manic rune
#

its the splash cops

gilded blaze
#

and it's a themed deck, not direct copy from your mod

stiff locust
#

i don't genuinely mind it at all

#

but i would watch for incompatibilities between my mod and yours

timid star
stiff locust
#

next time you record balatro

#

please enable streamer mode on discord

timid star
#

lol

stiff locust
#

so it doesn't leave real discord pings in your recording

#

🙏

timid star
#

i just use the snipping tool 900ugglyy

plain apex
stiff locust
#

snipping tool can record what

#

the fuck

timid star
#

it can

stiff locust
#

Oh my god it can

gilded blaze
plush cove
timid star
#

it's useful so i dont make video clips every time

hard flume
#

How would I go about grouping cards together into a category? I'm trying to make a custom collection of ranks that would be categorized into their own group, like Face Cards.

stiff locust
#

I do take ownership of Splash, and I replace add_to_deck, remove_from_deck and calculate

#

it shouldn't have any conflicts with what you're doing

gilded blaze
#

I'm just asking if the code structure is correct

#

to allow duplicates

stiff locust
#

i have no idea

#

but if that works

#

tell me

gilded blaze
#

💀

stiff locust
#

I want to do that too

gilded blaze
#

it's very hard to verify

stiff locust
#

just as a native feature of my mod

gilded blaze
#

you can't use DebugPlus to spawn Splash and reroll shop to test

#

because the game seed doesn't care about external additions

manic rune
#

you could use brainstorm

stiff locust
#

use that reroll mod yeah

manic rune
#

to auto-reroll until it finds splash?

#

oh, and uh

#

use something to decrease the reroll cost to 0 too

stiff locust
#

debugplus eval ease_dollars(100000000)

manic rune
#

-# quickest option would be to download cryptid and use that one exotic joker

manic rune
#

imagine your luck sucks so bad its not enough though 😭

gilded blaze
#

Ig Crustulum should help in debugging

#

ouch, game crashed

#

I don't have time to debug the crash dammit

#

starving rn

manic rune
#

go eat lunch

#

dont just skip it

stiff locust
#

i'll figure it out for you so i can put it in my mod as a base feature

hard flume
#

Is it possible to make a category/group of cards ala face cards? I know how to make custom ranks, but I want to group them into a group

gilded blaze
#

maybe I'm doing something wrong

#

calling it from SMODS.Joker:take_ownership(Splash) instead of SMODS.Back doesn't sound right, does it?

#

gah, there's no example for this

stiff locust
#

okay well

#

i tried your method with my working take_ownership

#

tried the reroll method for debugging it and balatro hard crashed before brainstorm found splash

#

then i had a better idea

#

just spawn a bunch of riff raff and let them make every common joker

#

eventually, the only joker they make should be Splash if this is working, since it will never fall back to jimbo since splash is always available

#

(spoiler: it didn't work)

gilded blaze
#

did you roll all spawn jokers to negative to allow room for new ones

stiff locust
#

i gave myself 300 joker slots with debugplus

gilded blaze
#

a

#

sure

stiff locust
#

i didn't run out of space, it just started spawning only jimbos

#

so it hit the fallback, meaning it spawned every joker it could

#

so yeah i'm not sure

scarlet spire
#

how would I go about making an enhancement that doesn't allow itself to change to any other enhancement?

gilded blaze
#

how do we work with this info

#

I hate my life so much

#

I could've just asked AI to explain the API

#

and here's the code

chrome widget
#

Tbf, it is in the docs for Jokers

simple mural
#

I really want to make a joker that gives a xmult equal to the current round, but where if you don't win on the first played hand you play, the round ends vedalUUH

chrome widget
#

I have reached 50 of 90 completed jokers for my mod!!

manic rune
#

nice :D

gilded blaze
#

at first I only intended to work on localization

manic rune
#

i didnt know you were working on a content mod too, actually

#

:3

gilded blaze
#

all thanks to a youtuber who managed to spread my Vietnamese mod to those who aren't good at English

manic rune
#

i think one of my friends is using that mod too

scarlet spire
merry raven
#

The harder part of making the Jokers for me is honestly the art

frosty dock
#

(Note: it will also mess with quantum enhancements)

scarlet spire
#

I see, thanks

#

i'll have to look into hooks a bit more, i've mostly been doing patches

#

only hook I currently have is for a castle-like card that references almost directly from the jokers documentation

frosty dock
#

patches would work as well of course, they're the more powerful tool

#

you can just return early

hard flume
#

cat rank

scarlet spire
#

ah, yeah I assumed so, just wasn't sure if a hook would be safer or something like that

manic rune
#

good afternoon everyone

amber eagle
#

I wish there was a way to use brainstorm and search for exclusively triboulet or chicot instead of perkeo, but it looks like I just dont entirely understand how immolate works considering that my brainstorm edits didnt do anything (at least they didnt crash the game)

#

And i obviously manually added toggles for both chicot and trib into ui.lua, as well as at the top of brainstorm.lua

manic rune
#

when can we have sleeve sleeves...

zealous glen
#

@tall wharf

tall wharf
#

yeah

zealous glen
#

Making it permanent at least makes it better than the old version

#

I wouldn’t play with it but I think the design is better and more interesting

tall wharf
#

sricker

long sun
#

hi, how do i get the round number?

limpid flint
#

Good evening everyone

hushed field
#

good afternoon, modpack man

topaz monolith
#

Currently making a joker and this error popped up. Any ideas? First image is the error, second error is the Joker I am working on

red flower
#

are you checking if target is not nil

topaz monolith
#

Doing print(target) and these information came up. Don't really see anything that relates to the target playing card

#

I don't know if the position of the copying card section is in the wrong spot or the 'if'/'for' statements are all not correct so its pulling wrong information

scarlet spire
#

cards are actually huge tables of tons of data, this is normal

topaz monolith
simple mural
#

Joker that gives x0.5 mult at the end of the round, but destroys 5 random cards vedalUUH

#

I have an idea for an edition.
Double Edition.
Doubles the effect of a joker/card/consumable like a blueprint, but takes up one more slot

#

For example u can have Blueprint Joker with Double Edition, it will work how a two Blueprint Jokers but also it will take two Joker Slots SilverBudInspect

#

Or if this edition is on the card, you can use only 3 normal cards and a one Double Edition card in the hand and this card will work how with a red seal

manic rune
#

im pretty sure this breaks things, since pseudorandom_element chooses a random value from a table

and in this case, it chooses something from the card like its position, center or smt smt

#

you can just do
local target = pseudorandom_element(context.scoring_hand, pseudoseed('lycanroc_copy')

#

i think

#

which will choose a random card from the scoring hand

long sun
hushed field
# long sun (bump)

you might want to expand your question a bit! What do you mean with ''the round number' ?

long sun
#

like, the number on the bottom-left that says "Round"

#

like, the first Blind you play is Round 1

#

etc.

topaz monolith
hushed field
zealous glen
hushed field
#

I think it's literally G.GAME.round, no?

long sun
#

will try ^^

zealous glen
#

Idk

long sun
#

modulo is % in Lua, right? just checking

zealous glen
#

I think some values are saved directly where they are displayed

zealous glen
hushed field
#

God, I still seem to be unable to remove cards from the deck in context.after, it's impressive how difficult this seems to be

long sun
#

perfecto, that worked - thanks!!

humble girder
#

why do you need to remove them in context.after?

#

what's wrong with context.destroy_card?

long sun
#

[the ability i made: +$7 on odd rounds, +$1 on even rounds]

hardy viper
hushed field
#

Because they're not being destroyed, haha

hardy viper
hushed field
#

They're being moved to a banishment-esque cardarea until the end of the blind

humble girder
#

🤨

zealous glen
#

Also

manic rune
humble girder
#

so why does emplacing it not work?

zealous glen
#

You should set card.getting_sliced manually

hardy viper
#

oh

manic rune
#

so you can just set the card to be destroyed in joker_main, before or wtv and it should work :D

hushed field
#

I can't figure out why. It has something to do with the way events are ordered

hushed field
#

But I'm not destroying cards, haha

zealous glen
#

What are you trying to do?

hushed field
#

I have alien jokers that can abuct any card object for the rest of the blind. So I'm trying to have them abduct playing cards under specific circumstances

manic rune
#

this is what i did to destroy cards
(addToDestroy is actually just adding the card to card.ability["card_to_destroy"])

hushed field
#

Which works if I don't mind the visual jank, but I'm trying to fix the visual jank currently

zealous glen
#

Coding-wise

hushed field
#

It's a separate cardarea that's outside the deck/playing cards, in which cards are stored and accessed for the rest of the ante

manic rune
zealous glen
#

Which might require an Event to time it properly

hushed field
#

You'd think so, but the event timing is very tricky to get working

prisma loom
#

Ok so there's a G.GAME.blind.boss but is there a context for small and big blinds?

zealous glen
#

Also I suggest looking into Card:can_calculate

zealous glen
zealous glen
#

Blind.showdown

#

IIRC

manic rune
#

.

#

nevermind, showdown means at ante 8

prisma loom
tall wharf
#

no

prisma loom
#

madness' effect is not what I want

zealous glen
manic rune
#

im going back into the cave

#

:3

tall wharf
#

G.GAME.blind.showdown == true

zealous glen
#

You can manually check what the Blind is

manic rune
#

good table, everyone

hushed field
#

Well, before the cards get moved to the deck, but after they're destroyed. I've currently got it structured as a function that sets a Before event, triggerign right before the draw_play_to_discard is called

zealous glen
#

You won’t want to look at that variable

tall wharf
#

.boss

#

fuck

zealous glen
#

But at the Blind name or key

tall wharf
#

G.GAME.blind.boss.showdown == true

zealous glen
#

To verify that it’s the Small Blind

hushed field
#

And I can't figure out why the emplace and remove doesn't properly work there

tall wharf
manic rune
#

is this real chat

prisma loom
#

sorry that confused me

zealous glen
prisma loom
#

so for small blind I use G.GAME.blind.showdown == true
what's for big blind?

zealous glen
hushed field
#

It's the only way to avoid cards being abducted crashing destroy funcs, and removing from deck is my fall back option but would need a whole different set of event chaining for any visuals to make sense

zealous glen
#

The Showdown Boss Blinds are the final bosses

hushed field
#

That's probably true

zealous glen
#

Although I can’t remember if I integrated that into Card:can_calculate, you can see if “yes” then hook or patch into it

#

That’s what the function is for

#

Take a look at the closed PR

tall wharf
#

showdown ones are the ante 8 bosses

hushed field
#

I guess I could make it so the destroy functionality checks for potentially being marked to be abducted. But honestly, it also makes a lot more sense gameplay flow wise to abduct after destroy effects

zealous glen
#

As I said

prisma loom
zealous glen
#

That was the first thing I said because it’s the first thing I predicted

#

Because checking for specific Blinds is the same as checking for any other specific object

#

Just look at the key

#

-# or the name, in theory

#

-# (don’t do name)

#

So there’s nothing Blind-specific about checking for Small Blinds

zealous glen
#

I think it should only try to abduct cards that won’t be destroyed

#

Which Card:can_calculate should help you with

#

As it’ll ignore cards set to be destroyed*

hushed field
#

That's fully dependent on the joker effect, but that's probably true.

#

I'll look into that regardless, because that's a good failsafe

zealous glen
#

If a card is destroyed it can’t be selected

#

But the actual destroy is only shown later

#

To the user

hushed field
#

I'm sure my current code will also start bugging out once I have sufficiently complex abduction jokers interacting with each other, so I should generally start considering fail safes

zealous glen
#

But you can imagine that it’s already been destroyed for the purpose of other effects

zealous glen
#

:P

hushed field
#

Yeah, I'll add it for sure, haha, it's just that it's only part of my woes, timing-wise, haha. I'll test if running the code before the destroy timing (without checks) works first, and then I'll get to implementing can_calculate, haha

zealous glen
#

You shouldn’t need to implement much

hushed field
#

I assume it'd be a single call with some context for it to check yeah

zealous glen
#

Actually it doesn’t have a context but maybe it should

#

It has at most one Boolean argument

zealous glen
hushed field
#

I'm currently trying to find out where that moment would be, yeah

#

Something that I am wondering about is whether cards can be in multiple cardareas at once, even? Or if that's just a reference being broken, if the game seems to indicate that?

zealous glen
hushed field
#

I'm suspecting that the cardarea thinks the card is still in there, somehow

zealous glen
#

How are you moving cards?

#

Are you using CardArea:draw_card_from (or to, I can’t remember)

hushed field
#

an area:remove_card and an area:emplace. draw_card_from doesn't update the playing_cards list, but I guess i already do that manually. It didn't work in an earlier test, but that may have been a timing issue still, so I should try it again

zealous glen
#

You should use CardArea:draw_card_from then manually remove them from the list

prisma loom
hushed field
#

I may have been led astray by this working as intended if I didn't mind the card disappearing visually during the scoring, haha

prisma loom
#

but this works

zealous glen
#

You might find it looking for e.g. bl_goad

#

I imagine it should be bl_small

prisma loom
prisma loom
#

but it doesnt work

hushed field
runic pecan
runic pecan
zealous glen
manic rune
# runic pecan 🤔

oh yeah, i cant help but notice this after a while of using your multi text box thingy, sometimes a line can be really close to the border of the box

hushed field
# zealous glen What do you mean?

my understanding is that I can do Kino.abduction:draw_card_from(abductedcard.area), but I can't specificy which card needs to be moved

manic rune
prisma loom
zealous glen
#

Maybe not that function

zealous glen
#

You’ll want something like

#

Blind.key == ‘bl_small’

runic pecan
prisma loom
hushed field
# zealous glen You can

it's also worth noting that those functions internally do exactly what I'm doing, in calling a :remove_card() and then an :emplace()

zealous glen
zealous glen
#

I’m not going to write G.GAM…

#

You know how to access the instance of Blind you need

#

So I just need to name the parameter of the class

prisma loom
#

ic ic

#

thankspeepoLove

manic rune
#

if my joker is retriggered, then shouldnt this also be retriggered for all played spade cards?

#

nevermind, its not even retriggered at all this time

#

weird

#

before updating smods it at least worked for the first played card

lyric wadi
#

chat is there a way to listen for a tarot card usage

#

and like what kind

#

i know like there's a vanil joker that gain mult when any tarot used

zealous glen
lyric wadi
#

but like i want to make a Joker that scales whenever Wheel fails, but suffers big penalty if Wheel hits

zealous glen
#

You can test if a Tarot was used

manic rune
zealous glen
#

Or if a specific Tarot even

manic rune
#

save how many times my joker is supposed to be retriggered into a var, then return that in the context to repeat playing cards

zealous glen
#

Idk about seeing if Wheel succeeded or failed though

lyric wadi
#

like Gain +3 Mult if Wheel of Fortune fails, halves it if Wheel of Fortune hits

zealous glen
#

That might need more power

lyric wadi
#

Joker where whenever Wheel fails, you lose $2 and immediately spawns another Wheel

#

the true gamba joker

hushed field
#

Hmm, it seems the destroying card functionality also makes explicitly clear that a card is being destroyed to the function that discards cards after playing, because its timing is that whacky. The function is entirely related to the way that the event timing works, as cards that are destroyed are also still retrievable in G.play by the game. So the solution is to add a check to those functions, seemingly. Which I suspect will create some compatibility issues with other mod's patches, but alas

zealous glen
hushed field
#

I think it'd probably be a good addition to SMODS, but God I don't trust my code to be used by other people that fundamentally, haha

zealous glen
#

And at least it’s good to have feedback for

#

What would someone use can_calculate for

#

Since it’s not a vanilla method

#

But it’s something that helps mod be compatible

lyric wadi
#

help chat different question

#

how do you check what enhancement a card have when playing/discarding

hushed field
#

Going to massively refactor this code because I'm sure my trying to solve something I don't fully understand has made it a lot more bulky than it needs to be, but it's finally working properly! Look at that, 1 card abducted, so only 51 in the deck!

lyric wadi
#

and related question, how do you check how many card was discarded

hushed field
hushed field
lyric wadi
#

fair

#

but also i asked because i didnt know where in the wiki to look okay

dire palm
#

How can I get the number of Negative cards the player currently owns (full deck + consumables + jokers)?

zealous glen
hushed field
#

Oh, it was about the enhancement check, yeah for that check the page about the specific object type is handiest!

zealous glen
#

So I’m not gonna give potentially wrong info when I know where to find it

hushed field
#

@zealous glen was the can_calculate function you added only recently pushed?

#

oh wait, i'm checking an old commit of smods for some reason that I can't explain, haha

icy chasm
#

Hey everyone! I'm new to modding balatro (as in making a mod, not actually modding the game), and I'm having a bit of trouble figuring out how to code the cards that I want to create. would anyone be willing to help me out? (I've only really coded in java, not lua)

turbid maple
#

Have you checked out the wiki

turbid maple
#

obligatory cat image

icy chasm
#

oh, I did not know that existed, Thanks!

old bane
#

how would i make it so that duplicates of Jokers can appear in shop? I wanna make a voucher that functions similarly to showman but idk how to make that work

lyric wadi
#

voucher spawns a negative eternal showman

hushed field
hushed field
#

So happy with that effect, honestly, just wish I was good enough with shaders to get the visuals to be real juicy, haha

old bane
#

just jokers

hushed field
old bane
#

i see 👀

hushed field
#

i say that, i just checked, each card type checks for showman separately

#

it's not even an additional check

#

just a patch that replaces the joker check

old bane
#

ah lmao

#

is that in card.lua?

hushed field
#

common_events

old bane
#

i see

manic rune
lyric wadi
#

goal of code :

  • count how many cards are being discarded

  • if it's a wild card, add 1 to a counter

  • if they're not a Wild card, set the string suitFound to the suit of the non-Wild

  • if exactly 2 cards are discarded, and exactly one of them is a Wild, set the bool to true

#

crash log from code :

#

am i stupid

hushed field
lyric wadi
#

oh

#

i am stupid

hushed field
#

Your code in this case wouldn't be able to tell you which card you're trying to compare things to. in this case, if v is the card you're currently checking, what are you trying to compare it with? Which card is other_card supposed to be?

lyric wadi
#

i just copied some code and stiched them together

#

honestly forgot im in an loop with i and v

old bane
hushed field
lyric wadi
#

incremental combination joker

#

if you have two copies of the same jokers with the same edition next to each other, they combine into one and upgrades their edition

#

two holo merges into one poly kinda beat

#

imagine

hushed field
#

Besides storing the entire card object, I assume objects have a unique ID, right? Does anyone know the way to get that ID?

old bane
#

how does the calculate function for vouchers work? is that what is used for stuff like observatory?

lyric wadi
#

it does crash when discarding a wild card though, which i kinda need to not happen

lyric wadi
#

line 56 is

hushed field
#

context.v

lyric wadi
#

bru

#

so you dont need context for that??

hushed field
#

context is a table that is passed along by the code when calculate is called. So, there is never a context.v

#

In this case, your v is already defined as well, you're v is the card currently looping from the G.hand.highlighted

#

if things are connected by a . they're basically contained within the other

lyric wadi
#

okay

#

the checks works

#

it is correct triggering when 2 cards are discarded and 1 of them is wild

#

that was the easy part im just stupid

#

now comes the hard part

#

how do i convert the suit of held cards in hand

#

a la Sigil or the suit Tarots

hushed field
#

SMODS has a change_base function

lyric wadi
#

oo

hushed field
#

if the base game has an effect that's super similar to what you wanna do, you're lucky, SMODS probably has made a way to make that easy for ya!

manic rune
manic rune
#

surprisingly enough, no hooks and patches were needed for this

#

and it seems to work pretty smoothly

rich roost
#

Would it be possible to create a mod to play 2 random cards every 10 seconds if there is not hand played in that time?

Like can I mod the game so the game makes an an action?

hushed field
#

yes, definitely

rich roost
#

Nice! What object makes the actions? Is that G? I can’t figure out how to automate an action 😕

tardy wind
old bane
tardy wind
#

you can also look at the boss blind that discards two random cards

rich roost
hushed field
lyric wadi
#

ok it's not converting the card swhat am i doing wrong

hushed field
rich roost
#

Ya Im going to explore all the actions the game can automate, I feel like “bullet” (like chess) Balatro would be a fun time

hushed field
#

the cards in G.hand are in G.hand.cards

lyric wadi
#

ah ok

hushed field
lyric wadi
#

so much to learn

old bane
# hushed field what's going wrong?

joker only shows his face when the game fails to find a suitable joker to generate, I have a copy of almost every joker in my mod, and I turned off the generation of vanilla Jokers. I also redeemed the voucher that allows me to find copies of Jokers, meaning that the voucher isn't doing anything, because otherwise, the game would've just generated a copy of whatever joker like showman

rich roost
#

Nice! I’ve just started modding like a week ago so I’m getting caught up on code base but looking forward to some fun ones!

lyric wadi
#

yippe the card ganges

#

now i need the cool animation

#

where in the wiki do i read about card animations

hushed field
old bane
lyric wadi
#

the usual suit change animation

#

would work fine

#

since i am changing suit

#

you know when it flips over and then flips back

hushed field
#

I don't think that's a precoded animation. But that behaviour'll be in the tarot code

old bane
hard flume
#

in game

dire palm
#

How do I make my Joker shake under certain conditions like Loyalty Card does when it's active?

old bane
hard flume
old bane
#

you can find more about it in sixth sense’s code i think

hushed field
#

yeah, you create an eval function that checks your intended behaviour, and then pass that to juice_card_until

dire palm
#

So, how should the eval be made?

lyric wadi
#

okay i found a prolnem

#

i dont know if this is with my mod or something

hushed field
#

I'd check your lovely dump and just search for an example of juice_card_until

lyric wadi
#

but

#

the suit conversion joker works

#

it changes the suit of the cards in hand

#

unfortunately, somehow, enhancements other than wild also stopped working

#

i have a mult card with seltzer and it is not adding any mult

#

??????????????

#

is this my mod fucking with the game or the game fucking with me

manic rune
#

show code :3

lyric wadi
#

also omg hiihi :3

stiff locust
#

how do i get the name of the current poker hand

#

i wanna save it as a variable

manic rune
hushed field
manic rune
#

probably something with change_base if i had to guess, i never used it though so i cant confirm

stiff locust
manic rune
#

what does next() do

#

i see it mostly being used for checking poker hand

tardy wind
lyric wadi
#

ok but apparently Steel Cards still work

#

so far mult and lucky no, steel yes

manic rune
#

its only affecting the cards that got their suits converted, right?

lyric wadi
#

i dont know how to track them tbh

#

cuz i dont rember whcich one i converted

tardy wind
#

add a sticker

frosty dock
lyric wadi
#

also i just ran into Hook and i have now found out that hook discarding CAN trigger the suit change

#

since it can hit 2 cards, 1 wild and one non wild

manic rune
#

thats cool tho, really reminds me of blindexpander

lyric wadi
#

and i am keeping that edge case in on the basis that it would be funny as fuck if it happen to someone

manic rune
# lyric wadi

correct me if im wrong, but doesnt context.discard run for each discarded card?

frosty dock
lyric wadi
old bane
ivory coral
#

hello, im trying to make a check (preferably in context.after?) for if the hand just played did not result in defeating the blind, e.g. the blind is still ongoing, but my code here
if not to_number(G.GAME.chips) >= to_number(G.GAME.blind.chips) then
gives me the error
attempt to compare number with boolean
it might be a talisman thing but im not 100% sure, anyone know whats up with this

lyric wadi
#

you need a bracket

old bane
lyric wadi
#

right now it is parsing as not to_number which is applying not to a number

ivory coral
#

aah i see

lyric wadi
#

which makes the left side a boolean

ivory coral
#

yeah it works now tyty

lyric wadi
#

yaay

#

i heped

#

hepld

#

helpde

#

fuck

manic rune
#

this doesnt seem to be retriggered

turbid maple
#

off topic but modding balatro is my first experience with lua and I really don't see the value of having maps and arrays be represented by the same type because it's slightly annoying

manic rune
#

or sometimes, when i switch up the order of the contexts, it only retriggers for only the first card

turbid maple
#

Is there some benefit to this I'm missing

stiff locust
#

what's a map

manic rune
#

i love when i assumed card wasnt a table :3

turbid maple
#

basically tables but not an array

tardy wind
#

lua isnt a strongly typed language (even less than javascript) so you can do whatever you want to your tables, objets etc

turbid maple
#

well yeah but I don't see the point of arrays explicitly be tables with integer keys

#

I'd really prefer a different syntax for them

tardy wind
#

like what ?

#

[index] is probably the most common way of accessing anything in a list

frosty dock
turbid maple
#

square brackets?

manic rune
#

yeah, i do

tardy wind
#

square brackets do work afaik

manic rune
#

the retrigger works just fine for joker_main

#

but for other contexts, its a bit funky

tardy wind
#
t = {"a", "b"}
letter = t[0]
``` pretty sure ive seen this
manic rune
#

i dont think [0] works

#

-# i never tried so idk

#

since tables start from index 1

ivory coral
tardy wind
#

so not [0] but [1]

turbid maple
#

well no the complaint is that you're making a table with { 1 = "a", 2 = "b" } which pretends to be a table but I'd slightly prefer if this was an entirely separate array type

tardy wind
#

imo i really dont see the issue with that

turbid maple
#

it doesn't really matter because yeah you can make it work like an array

tardy wind
#

lua isnt strongly typed so it makes sense to have 1 type do everything

#

c-like arrays dont exist in lua, everything is a key-value pair in some way

stiff locust
#

is there a function for just drawing cards

turbid maple
#

I mean my complaint was "would it be a big deal for lua to have an array type" and you're just telling me that "lua doesn't have an array type"

stiff locust
#

not specific cards i just want it to draw more

old bane
#

you can probably find it in the serpent's code i think

#

the boss blind that draws 3 cards

stiff locust
#

hmm maybe

turbid maple
#

there's some functions from drawing from cardareas in misc_functions.lua I think

stiff locust
#

hand_space = math.min(#G.deck.cards, 3)

manic rune
#

you know what, i kinda dont like how for tables with indexes that arent number in order like:

table = {
["hello"] = "hi",
["good morning'] = ":3",
}```

theres no way to go from hello -> good morning consistently without the need of other stuff, since ipairs dont work
stiff locust
#

so it just.. sets the hand space to 3?

#

that might work for my purposes

stiff locust
turbid maple
#

try ctrl+fing for "draw_from" in that file? I don't have access to the source code right now but I'm sure there were some like that

manic rune
stiff locust
#

it is??

manic rune
#

it is

#

pairs still run through the entire table, but the index it chooses is completely random

stiff locust
#

cool

vague helm
#

@manic rune Continuing the conversation from #⚙・modding-general : the proposed modification doesn't work because extra is considered to be nil - for the record, the actual debuffing / rebuffing does work despite the previous version of the code referring to a potentially nil value. If I didn't include the nil check, that wouldn't have worked. That said, referencing it the way that you proposed certainly looks cleaner

manic rune
#

ohhh right

#

your joker doesnt have config extra

turbid maple
#

that's not really lua specific map traversal is usually undeterministic due to how they work under the hood

manic rune
#

uh, use card.ability["debuffed_card"] instead of card.ability.extra["debuffed_card"]

manic rune
manic rune
#

the order is important

#

BUT