#đŸ’»ăƒ»modding-dev

1 messages · Page 542 of 1

rotund sable
#

I recall a similar issue and I think it was fixed by wrapping the merge_lists in curly brackets

olive wren
#

(bump?) like do I need to add all of the JSONs and stuff included in mods like cryptid

long sun
#

will try :3

cursive gazelle
#

Yes

stiff locust
#

woohoo

cursive gazelle
#

Check the aikoyori joker in aikoyori shenanigans

#

It has a spinning animation

#

Might help as a reference

#

If im your place

#

I would check the smods example page

#

It has a really good explanation on how mods work and comments of stuff

#

And once you have a brief understanding of mod structure you can start by reading the wiki docs

wispy falcon
#

bump2

cursive gazelle
#

Because G.UIT.R aligns children vertically along their baselines

wispy falcon
cursive gazelle
#

Something like this

#
{
    n = G.UIT.C, config = {
        align = "cm",          
        colour = G.C.BLACK,
        padding = 0.1,
        h = 1,
        w = width / 2,
    },
    nodes = {
        {
            n = G.UIT.T, config = {
                text = "CONSUMABLES",
                colour = G.C.RED,
                scale = 0.5,
                vert = true,   
            },
        },
        UIBox_button({
            colour = G.C.CSTORM.CON_BUTTON,
            minw = 3,
            minh = 3,
            button = "cstorm_consumables",
            label = { localize('k_cstorm_consumables') }
        }),
    }
},```
stiff locust
#

ok i'm confused

cursive gazelle
stiff locust
#

I would use SMODS.sound to replace the background music under a condition right

#

that's what jimball does and I need to do the jimball thing with my joker

cursive gazelle
#

Yes

stiff locust
#

and it's crashing on startup because it's "not a music track"

#

what does that mean and how do I make it not crash

cursive gazelle
#

Are you using the right format

red flower
#

it needs to have "music" in the key

stiff locust
#

oh

#

okay

#

i-is that

#

is that it

#

i just.

cursive gazelle
#

That’s weird

#

Lol

stiff locust
#

huh.

#

it worked.

#

i haven't tested if the song plays properly yet

wispy falcon
red flower
#

yeah the game looks for the key to change a value when loading the sound

stiff locust
#

ive never been legitimately excited for something to work before right now

#

ohp

#

i forgot

#

to add the

#

card.ability.extra

#

hold on.

wispy falcon
fluid nebula
#

can anybody help me with this? happens when i hover over the joker

cursive gazelle
#

In consumables

cursive gazelle
olive wren
#

Ok so whenever I refrence SMODS it has the squggles of doom and I feel as though I am missing something

fluid nebula
olive wren
#

like is there a plugin for vs

crimson marlin
#

wait how do you make a second layer to sprites like the legendry's have?

wispy falcon
# cursive gazelle In consumables

Now it looks like this... You know what? I'll just leave the text away. Can't be bothered to destroy my head on something like this right now

cursive gazelle
wispy falcon
hushed field
#

UI is a lot of fidgeting

cursive gazelle
fluid nebula
hushed field
#

I personally like making the backgrounds of each node a specific colour to help me visualize how it all orders stuff, then just make them all clear once I've set it up

olive wren
#

I have the steamodded framework installed and it still shows the doom squggles

wispy falcon
cursive gazelle
#

I’m sorry I genuinely couldn’t read it 00_furinanosebleed_DNS

cursive gazelle
rotund sable
hushed field
red flower
wispy falcon
cursive gazelle
fluid nebula
rotund sable
fluid nebula
#

i think ranks are all highlighted with a specific colour, right?

#

orange (C:attention)?

rotund sable
fluid nebula
#

thank you

olive wren
cursive gazelle
olive wren
#

Im blind apparently 👍

wispy falcon
timid zinc
#

Trying to make localized text specifically for Jokerdisplay, this is located in my loc file:

    misc = {
        dictionary = {
            k_jdisplaybefore='Before',
        },
    }
}```
and this is in my jokerdisplay creator:
```reminder_text = {
    { text = "(" .. localize("k_jdisplaybefore") .. ")" },
},```
but the localized text is just "ERROR"
rotund sable
cursive gazelle
# wispy falcon What words do you mean? TwT
{
    n = G.UIT.R, config = {
        align = "cm",
        colour = G.C.BLACK,
        padding = 0.1,
        h = 3,
        w = width / 2,
    },
    nodes = {
        {
            n = G.UIT.C, config = {
                align = "cm",
                h = 3,
            },
            nodes = {
                {
                    n = G.UIT.T, config = {
                        text = "CONSUMABLES",
                        colour = G.C.RED,
                        scale = 0.5,
                        vert = true,
                    },
                },
            }
        },
        UIBox_button({
            colour = G.C.CSTORM.CON_BUTTON,
            minw = 6,
            minh = 3,
            button = "cstorm_consumables",
            label = { localize('k_cstorm_consumables') }
        }),
    }
},```
fluid nebula
#

i did not know that. now i know for next time

#

thank you kindly

wispy falcon
cursive gazelle
#

Blank ?

wintry solar
#

What are you trying to make here

wispy falcon
stiff locust
cursive gazelle
stiff locust
#

they hook draw_step and rotate the sprite manually

#

I want the sprite to change to a new sprite

red flower
#

what are you trying to do marie

stiff locust
#

animate soul_pos like jimball

cursive gazelle
red flower
#

i have a joker i just made that does that

cursive gazelle
#

Well technically you’re right

timid zinc
#

i have a joker that does something similar using a different method

cursive gazelle
#

I thought you meant animating like making it move

stiff locust
#

jimball's code didn't work

wispy falcon
cursive gazelle
#

Not making an animation

stiff locust
#

what's the trick

cursive gazelle
#

Should fix it

red flower
stiff locust
stiff locust
#

I wanna do both

#

spin the regular card and make the soul_pos move

#

but one at a time (i mean that as in implement them 1 after the other)

cursive gazelle
#

I dont think you can animate the regular card i’m not sure

#

Maybe with somz drawstep

timid zinc
#
        if card.ability.extra.delay >= 1 / card.ability.extra.FPS then
            card.ability.extra.x_pos = (card.ability.extra.x_pos + 1) % 20 -- 20 is the number of frames
            card.children.center:set_sprite_pos({x=card.ability.extra.x_pos,y=0})
            card.ability.extra.delay = 0
        end
        card.ability.extra.delay = card.ability.extra.delay + love.timer.getDelta() -- dt kept returning 0
    end,```
I modified this code from EasternFarmer
red flower
# stiff locust yes like that
SMODS.DrawStep {
    key = 'repertorium_erika',
    order = 50,
    func = function(card)
        if card.config.center.key == "j_repertorium_erika" then
            if not G.repertorium_erika_soul then
                G.repertorium_erika_soul = Sprite(0, 0, G.CARD_W, G.CARD_H,
                    G.ASSET_ATLAS["repertorium_001erika_soul"], { x = 0, y = 0 })
            end

            G.repertorium_erika_soul:set_sprite_pos({ x = math.floor(G.TIMERS.REAL * 7) % 2, y = 0 })

            G.repertorium_erika_soul.role.draw_major = card
            G.repertorium_erika_soul:draw_shader('dissolve', nil, nil, nil, card.children.center, 0, 0, -0.6, -0.3)
        end
    end,
    conditions = { vortex = false, facing = 'front' },
}

this is what i do math.floor(G.TIMERS.REAL * 7) % 2 switches betweent the 2 sprite positions but you can make it do more frames
edit: oh and you might need to replace then -0.6, -0.3

wispy falcon
rotund sable
cursive gazelle
rotund sable
#

You summoned me

timid zinc
rotund sable
#

I don't have a problem lol

#

Just curious

wispy falcon
timid zinc
#

well, i do have a problem, but that's unrelated

cursive gazelle
stiff locust
timid zinc
#

also i have localization in misc disctionary k_jdisplaybefore='Before', but localize("k_jdisplaybefore") returns "ERROR"

stiff locust
#

what does the order argument do

cursive gazelle
#

Take a wild guess

stiff locust
#

and what is the -0.6, 0.3 for

olive wren
#

When Im doing my pathing to refrence Smods it says that it is missing property "path"

red flower
stiff locust
#

oh I see

olive wren
red flower
stiff locust
#

oh okay

olive wren
#

And I just pasted the pathing code into the folders thing

stiff locust
#

i'll set those to 0 then

wispy falcon
cursive gazelle
#

Here

red flower
wispy falcon
cursive gazelle
#

Should’ve bombed the chat

stiff locust
cursive gazelle
red flower
wintry solar
# wispy falcon

Are you literally just making another version of the additions tab

cursive gazelle
#

Yes

#

And i’m helping for some reason

#

Lmao

stiff locust
red flower
#

modprefix_atlaskey

stiff locust
#

gotcha

wispy falcon
red flower
wispy falcon
stiff locust
#

and I change the % 2 to the number of frames in the animation?

wintry solar
#

I think you can probably just lift the entire additions code then and change what gets added to it

#

You don’t need to rebuild it from scratch

cursive gazelle
#

He’s too deep we can’t go back

#

Commitment

wispy falcon
red flower
stiff locust
#

they are all in the same row

#

ii think i got everything

cursive gazelle
olive wren
#

Why do I have an error saying that im missing a path property

#

Its that yellow squiggle

fallow urchin
#

howdy yall. I've made quite a few jokers but am trying to tackle a much more difficult one. I'm trying to create a joker which makes planets created by blue seals negative, but I don't know what event(s) to watch for, is there a way to detect cards being added? i imagine im supposed to be looking during the context.end_of_round but i need to detect whenever a card is added during that

(sorry for the long message address when anyone gets a chance)

red flower
#

where does it say folders lol

olive wren
#

oh

#

im delusional

#

nice

#

👍

#

thank you again

stiff locust
#

and set the card it creates to negative when it is created (if the joker is detected at the same time)

#

that might have a mod conflict if another mod takes ownership of the blue seal for some reason but that's the simplest way

cursive gazelle
#

@wispy falcon

wispy falcon
cursive gazelle
#

Just align=“cm”

#

You have it to “tl”

olive wren
cursive gazelle
crimson marlin
wispy falcon
rotund sable
#

Two identical tabs đŸ€š

fluid nebula
#

i am the worst newbie of all time đŸ”„

wispy falcon
mossy quest
#

is there a way to take ownership of every joker?

willow scroll
#

alright, im stumped
i want to have a seal that when applied to a card it makes it impossible to destroy said card via conventional means
i have a hook into both Card:shatter() and Card:start_dissolve() that checks if the seal is there and then doesnt destroy it, plus performs some cleanup from G.play and G.hand (i mightve already picked a suboptimal function to hook but idk, havent read enough source code yet)
everything works except one thing. if a card is saved like this, and then it is scored again, it counts towards the poker hand but it doesnt score itself?? almost as if it skips context.individual or smth
and i geniunely dont know what actually changes about the card for it to not score but still count towards poker hands
i thought maybe card.destroyed being set to true does smth, but manually putting that away does nothing

rotund sable
red flower
wispy falcon
cursive gazelle
#

You know you’ll have to update that every patch

mossy quest
cursive gazelle
#

At least major patch

fluid nebula
wispy falcon
cursive gazelle
#

I love the energy

red flower
rotund sable
olive wren
# red flower

I'm so sorry for asking thanks for the help, I accidently was using a workspace ive used for other stuff before

#

mb

sturdy compass
#

I decided I wanted to add some more functionality to JimboQuip

wispy falcon
#

Still need that blank space at the bottom to disappear though

red flower
red flower
fluid nebula
red flower
#

but im not sure

fluid nebula
#

how should i go about solving this?

wispy falcon
stiff locust
fluid nebula
#

maybe call the reset_card function at the start of the round?

red flower
red flower
stiff locust
#

.

cursive gazelle
wispy falcon
cursive gazelle
#

Anyways goodnight chat

stiff locust
#

how do i change it so that it works on the soul_pos

#

and not the base card

cursive gazelle
red flower
cursive gazelle
stiff locust
#

I want the sprite of the soul_pos to change

#

and not the sprite of the base card

red flower
#

thats what the code i sent does

stiff locust
#

then why is the soul_pos not there

#

it's just gone

wispy falcon
red flower
#

but not with soul_pos, it creates the soul sprite separately

cursive gazelle
fluid nebula
stiff locust
olive wren
#

is there any way that I can just give myself my card

#

like some console mod or something

red flower
#

debugplus

olive wren
#

ok thx

stiff locust
#

also should i

#

remove the soul_pos from the card's code

#

to prevent them from overlapping

#

oh my god it works

#

this is awesome

willow scroll
stiff locust
#

the sprites are a tad too small and resizing them would take too long

red flower
#

i think the first two 0s do that but im not sure

#

in draw shader

#

or in the Sprite() you can change the card_w and card_h

stiff locust
#

hovering over the function explains what the function does

#

it has two args for ms and mr

#

which i can assume are size and rotation?

red flower
#

ah yes

stiff locust
#

there's also mx and my which are the positions

#

so it would make sense

#

this worked and now he is too big

daring fern
wispy falcon
stiff locust
#

he is beautiful

red flower
#

ni

red flower
wispy falcon
#

Guess I'll have to keep it like that for now then. Thank you anyways :3

fluid nebula
#

could someone help me figure out how to solve an issue i'm having?
whenever i attempt to discard, it states that i tried to index a nil value, being ass_card

#

i know this is a failure from not inputting it beforehand, but i want to know how

#

the card should be randomly selected by the joker, and give +5 mult when discarded

stiff locust
#

now how do I change the background color

red flower
#

ease_background_colour

stiff locust
#

and then i just put any color in

#

like ease_background_colour(C:red)?

wispy falcon
#

How do I make a seperate window appear, when a button is pressed?

red flower
stiff locust
#

how do I use pseudorandom()

#

it crashed apparently

#

pseudorandom("seedle", 1, 10) should work shouldnt it

solid mesa
#

exponentiation needs talisman or you can like, make your own?

stiff locust
#

it didn't

red flower
#

weird

idle plaza
# stiff locust `pseudorandom("seedle", 1, 10)` should work shouldnt it

You should use SMODS.pseudorandom_probability(card, "seedle", card.ability.extra.numerator, card.ability.extra.denominator)

Where the numerator is 1 and the denominator is 10, in the card's extras. It'll ensure your probability effect works with any other effect that alters or reacts to probability.

stiff locust
#

I am not trying to do probability

#

I want a random number

#

math.random crashed too

#

for this joker specifically i do not care if it respects the seed or not

red flower
#

where are you using it

stiff locust
#

repetitions and xmult

#

in a return

idle plaza
#

What's your exact code? Can't debug a crash properly without it.

frosty rampart
stiff locust
#
if context.individual and context.cardarea == G.play then
            return{
                repetitions = math.random(1, 10),
                xmult = math.random(1, 100),
            }
        end
red flower
#

hmm that seems correct

#

is the crash actually there

stiff locust
#

same crash with pseudorandom and math.random

red flower
#

you would need to call it in the function you button calls

willow scroll
stiff locust
#

something is wrong

#

i figured it out

wispy falcon
#

Nvm, finally found it

fallen hawk
#

anyone know how to make the deck creator mod compatable with the cryptid mod so you can add cryptid mod stuff to a custom deck? If it doesn't exist could you point me where i can learn to make it?

cursive gazelle
#

You’ll have to fork it and add more compatibility

#

Yourself

unkempt rover
#

Is there any way I can make it so that when my mod is active it removes all the vanilla jokers?

stiff locust
#

splash

mystic meteor
#

Can someone please help me create a config page? I have the config icon showing up but whenever I switch to it I get this error:

Oops! The game crashed:
engine/ui.lua242: attempt to index local 'node' (a number value)
HW = {}

HW.config = SMODS.current_mod.config

SMODS.current_mod.config_tab = function ()
  return {
    n = G.UIT.ROOT,
    config = {
      align = "cm",
      padding = 0.1,
    },
    nodes = {
      n = G.UIT.C,
      config = {
        align = "tl",
        padding = 0.1,
      },
      nodes = {
        create_toggle({
          label = "Enable Mod",
          ref_table = HW.config,
          ref_value = 'global_enable',
        }),
      }
    }
  }
end
red flower
fallen hawk
mystic meteor
stiff locust
#

smods already lets you enable/disable mods

#

is there anything else you want config for

cursive gazelle
mystic meteor
stiff locust
#

i have no idea what you're trying to do and i'm probably not going to be able to help

mystic meteor
#

right now I just need it to not crash and show up 😭

stiff locust
#

don't we all

olive wren
#

Would there be a way to trigger a joker effect when a certain hand type of a certain suit is played (rather specifically a royal flush of diamonds) I swear I saw some documentary with a ton of stuff like this but I cant find it anymore

stiff locust
#

just check the hand type is flush and then check the suit of 2 cards

#

and if they're diamonds it's a diamond flush

olive wren
#

oh yeah

#

thx

mossy quest
#

how would I pull a localization for a joker name to use it somewhere else?

            j_rickie_mirror = {
                name = 'Mirror Joker',
                text = {
                    "Swaps the {C:chips}chips{} and",
                    "{C:red}mult{} of your hand."
                }
            },
        },```
#

or would I need to add a dictionary entry just for that

red flower
#

localize{ type = "name_text", set = "Joker", key = "j_rickie_mirror" }

mossy quest
#

okay okay we're cooking

fallen hawk
glad osprey
#

whats the context for when a card is being destroyed

red flower
#

context.remove_playing_cards for playing cards, context.joker_type_destroyed for everything else

mystic meteor
olive wren
#

How would I check for a certain hand type I cant seem to figure out how to do that

red flower
#

context.scoring_name == "Flush"

#

for contains it's next(context.poker_hands["Flush"])

azure laurel
#

hey why this isnt working, pls help

olive wren
#

Is this a dumb way to check for a straight flush

#

Is there just a straight flush one

stiff locust
#

yes

#

there is

#

it's called Straight Flush

olive wren
#

oh

#

yeah that checks out

#

thx

timid zinc
#

i have a weird issue, i have a joker that makes some cards face down, i enhanced those face down cards but for some reason this made their face down sprite stone cards (0711a)

frosty rampart
# olive wren

you don't need to check for context.before and not context.blueprint twice in a row btw

olive wren
#

ok thx

frosty rampart
#

if it's true in the outer if block, it'll definitely be true in the inner if block

dull tinsel
#

does anyne know if theres a guide to be able to make my own texture pack for some cards ideally compatible with malverk

rough furnace
#

Guys how much storage space on a persons computer can I use before they get mad?

red flower
#

100 gib

olive wren
#

This is what I have right now and I am having an error with getting the suit (im pretty sure its because that is only detecting one card)

#

Also If I could just say royal flush let me know bc that would be really convinent

frosty rampart
#

context.other_card only exists in contexts where an individual card is scoring (i.e. not context.before)
you need to loop through the context.scoring_hand table if you want to check all the scored cards

red flower
#

(read the follow up questions beneath that too)

olive wren
#

So if I did context.scoring_hand = context.evaluate_poker_hand and context.display_name == "Royal Flush" and then looped through the suits would that work or something like that?

red flower
#

no, what i sent needs to be done in a separate check

olive wren
#

ok

frosty rampart
#

do cards store their original sprite pos at all?

red flower
#

card.config.center.pos?

frosty rampart
#

indeed, thanks for saving me from swimming through debugplus output

mystic meteor
olive wren
#

This is what I have changed it to:

#

The debug thing says that there is something waiting to happen but it just doesnt kinda

#

I still need to add suit detection but ill get to that when I get to that

red flower
#

they need to be different checks, not nested

#

before and evaluate_poker_hand don't happen at the same time

olive wren
#

would I have one trigger a boolean which allows the other to activate?

#

Ok that worked now the message is sending I just need to do the X mult

#

The mult is triggering before the hand is played so it gets reset

frosty rampart
#

do context.initial_scoring_step instead of context.before (assuming you do want it to trigger before any cards score)

mystic meteor
olive wren
frosty rampart
#

then you'll want context.joker_main instead, which triggers during the usual joker scoring section

olive wren
#

Ok thx

mystic meteor
#

got it working :D

prime knoll
#

need some advice here, working on a demonic tutor joker from mtg if anyone is familiar. basically i want it to be “sell this joker, search your deck for a card and put it into your hand” any idea where i could start on making that effect happen?

velvet ingot
#

how to stop this from gaining like X400 mult at end of round?

    loc_vars = function(self, info_queue, center)
        return { vars = { center.ability.extra.xmult } }
    end,

    calculate = function(self, card, context)
        if context.end_of_round and not context.game_over then
            if G.GAME.blind and G.GAME.blind.boss then
                card.ability.extra.xmult = (card.ability.extra.xmult or 1) + 2
                card.gained_this_round = true
            end
        end
        if context.joker_main then
            return { xmult = card.ability.extra.xmult }
        end
    end,

    -- Reset the flag at the start of a round
    add_to_deck = function(self, card, from_debuff)
        card.gained_this_round = false
    end,
    update = function(self, card, dt)
        if G.GAME.current_round and card.gained_this_round and G.STATE == G.STATES.SELECTING_BLIND then
            card.gained_this_round = false
        end
    end
}
idle plaza
velvet ingot
#

where exactly in it?

idle plaza
#

if context.end_of_round and not context.game_over and context.main_eval then

In that line.

velvet ingot
#

thanks!

prime knoll
#

hey guys, trying to get this effect to happen before scoring so the 8s score as polychrome but cant seem to figure out the correct context

idle plaza
prime knoll
#

how exactly does that work? sorry lmao i am really bad at this

#

how would i write that is more of the question im asking

#

i tried getting it to detect 8s the way midas mask detects face cards, because that joker does exactly the effect in the right order of things im looking for here. but i was having trouble reverse engineering it

idle plaza
#

You don't need to 'reverse engineer' it. You can check Vanilla Remade to see exactly how a mod would implement it.

https://github.com/nh6574/VanillaRemade/blob/main/src/jokers.lua#L2159

You can borrow most of its calculate function. Especially, the exact context (if context.before and context.main_eval and not context.blueprint then) as well as the for-loop it uses. (for _, scored_card in ipairs(context.scoring_hand) do)

prime knoll
#

then would i just use the same get_id to get it to detect the 8? i feel like i tried that already but i might have done it wrong. i have been using vanilla remade

idle plaza
#

The :get_id() == 8 part you're using now should work fine. But when you check within that loop, it'll be scored_card:get_id() == 8

prime knoll
#

gotcha. thank you! ill try it out

prime knoll
#

the only other thing id like it to do is have a message pop up when they become polychrome. would i use the same code from midas mask for that as well?

idle plaza
#

Yes, specifically its return statement.

prime knoll
#

gotcha. what do i put in the faces > 0 part? i tried scored_card again but it crashed 😭

idle plaza
#

Midas Mask just uses "faces" as an arbitrary counter. In other words, "If there weren't any faces turned gold, don't send any message, because nothing happened."

You can call your own counter variable whatever you want. The important part is how its used: Being set to 0 before the loop, being added onto if/when polychrome is added to a card, and then being checked if that counter is > 0.

pastel kernel
#

So the idea for my new consumable was that if you select a card, it’ll be destroyed and appear in the shop at random. If you select Canio for example, it’ll be destroyed from your deck and then appear in the shop but it’ll cost you.

#

It shouldn’t require showman but Y’know?

idle plaza
#

What's... the point? Is it just to reroll the edition, or?

prime knoll
#
    key = 'Moneymaker',
    loc_txt = {
        name = 'Moneymaker',
        text = {
            'When a {C:attention}Lucky{} card gives you',
            '{C:money}Money{} or {C:mult}Mult{}, also',
            'receive the opposite effect',
        }
    },
    atlas = 'Jokers',
    pos = {x = 0, y = 0},
    rarity = 2,
    unlocked = true,
    discovered = true,
    blueprint_compat = true,
    cost = 1,
    config = {
        extra = {
            mult = 2000,
            dollars = 2000
        }
    },
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue+1] = G.P_CENTERS.m_lucky
        return { vars = { card.ability.extra.mult, card.ability.extra.dollars } }
    end,
    calculate = function(self, card, context)
        if context.individual and 
        context.cardarea == G.play and 
        context.other_card.lucky_trigger and not 
        context.blueprint then
        return {
                message = "Kachow!",
                colour = G.C.GREEN,
                message_card = card
            }
        end
        if context.pseudorandom_result and context.result and context.identifier == 'lucky_money' then
            return {
                mult = card.ability.extra.mult
            }
        elseif context.pseudorandom_result and context.result and context.identifier == 'lucky_mult' then
            return {
                dollars = card.ability.extra.dollars
            }
        end
    end
}```
#

i have another problem

pastel kernel
prime knoll
#

my idea for this joker is to get the opposite trigger when a lucky card triggers for money or mult. it works, but the order of operations is extremely wonky and the joker ends up triggering before you see the lucky card trigger go off (btw its set to 2000 each just for ease of testing)

pastel kernel
#

If you have cryptid, you can buy pointers without equilibrium deck

#

Or if you have entropy, you can buy define

idle plaza
pastel kernel
#

But only if you even acquire it, you have to have a copy of the card to emplace it into the shop.

pastel kernel
#

You can get rare items that are never usually found in the shop

#

Once an item from your deck or whatever is selected, the consumable will destroy it and it’ll forever appear in the shop.

#

AT RANDOM by the way.

#

It won’t show up with every reroll, it’s just no longer impossible to get it in the shop.

#

And you have to acquire your wanted item too, you can’t just look for it in the collection like pointer and define does.

idle plaza
prime knoll
idle plaza
#

What's your code now?

prime knoll
#
        local moneybonus = 0
        local multbonus = 0
        if context.pseudorandom_result and context.result and context.identifier == 'lucky_money' then
            multbonus = multbonus + 1
        end
        if context.pseudorandom_result and context.result and context.identifier == 'lucky_mult' then
            moneybonus = moneybonus + 1
        end

        if multbonus > 0 then
           return {
            mult = card.ability.extra.mult
        }
        end
        if moneybonus > 0 then
            return {
                dollars = card.ability.extra.dollars
            }
        end
    end```
#

opted to just get rid of the message since it will be showing the money or mult anyway

#

assuming both lucky abilities trigger, i would like it to be ordered like this card mult > joker money > card money > joker mult

daring fern
prime knoll
#

that is fine too. as long as the joker is triggering after the card has resolved

daring fern
prime knoll
#

i just cant seem to figure that part out

#

joker money is still triggering before anything else

prime knoll
#

pretty much just used exactly what you gave me. was there somewhere different i was supposed to put it?

#

all i did was put what you put it chat directly after my calculate function and its working exactly how i had it before (albeit in much fewer lines)

prime knoll
# daring fern Code?
        extra = {
            mult = 2000,
            dollars = 2000
        }
    },
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue+1] = G.P_CENTERS.m_lucky
    end,
    calculate = function(self, card, context)
        if context.pseudorandom_result and context.result then
            local effects = {}
            if context.identifier == 'lucky_money' then
                table.insert(effects, {mult = card.ability.extra.mult})
            elseif context.identifier == 'lucky_mult' then
                table.insert(effects, {dollars = card.ability.extra.dollars})
            end
                return SMODS.merge_effects(effects)
        end
    end```
daring fern
prime knoll
#

right, but my issue is that the joker is giving money before the lucky card has shown its effect yet

#

currently it is going joker money > card mult > card money > joker mult

wintry solar
#

Can you film it?

prime knoll
#

yeah sure

wintry solar
#

mkv is not playable on mobile, you need mp4

prime knoll
#

oops my bad

#

any ideas?

wintry solar
#

You’re on 0711a?

prime knoll
#

what on earth does that mean 😭

#

steammodded ver?

daring fern
prime knoll
#

yea i believe i am

wintry solar
#

I thought we had fixed probability result timings but maybe not đŸ€”

prime knoll
#

oh wow so its an smods thing

#

thats wild

split yew
#

we've been racking our brains about the timing lmao

prime knoll
#

i could just be doing it wrong still though. i havent tried using the new replacements

#

how would i need to write the code using the new probability changes?

wintry solar
#

You already are using them

prime knoll
#

gotcha gotcha

timid zinc
#

Is there a way to destroy a card in context.pre_discard? i know i can do it in context.discard but it looks bad

#

Because visually, I want the destruction effect to happen when the discard button is clicked, but it only happens when it gets to that specific card

zenith scaffold
#

trying to make a blind that basically does what the flint does, but after the hand scores instead of before. How would I modify this?

#

my best guess is that I need to change the 2nd if statement, I'm just not sure what to change it to

daring fern
hushed field
#

Modify hand is explicitly about modifying the base hand values, so you shouldn't try and use it to modify anything outside that timing window

zenith scaffold
#

sick, thanks! now to figure out how to get all these to work -_T

hushed field
#

let me know if you have any questions, but I'm sure you'll be able to figure that out! It's not difficult at all once you know about the proper contexts! 😄

zenith scaffold
#

I'm like 90% sure all of them will work, it's just actually implimenting them into the mod itself. I initially made everything on JokerForge, and haven't done much patching

vast bough
#

joker forge mentioned đŸ”„

wintry solar
mystic meteor
#

How do I split things into multiple files?

I thought I would do something like this:

-- main.lua
UI = SMODS.load_file("ui.lua")

UI.init()
local UI = {}

function UI.init()
  -- function code goes here...
end

return UI

But I'm having no luck.

(Please ping me as I am bad at checking)

#

calling UI.init()

#

I also had a mistake in the code example so I fixed that

faint yacht
mystic meteor
sand sandal
#

hi everyone, for some reason the balance effect is not working exactly properly

#

how do i access the balance effect manually

faint yacht
#

return { balance = true } doesn't work?

sand sandal
#

like i got chips up to ~e13

#

then everything is down to 8.5

#

(yeah i had a exponentiation joker)

#
        if context.joker_main or context.forcetrigger then
            return {
                emult = card.ability.extra.immutable.emult,
                echips = card.ability.extra.immutable.echips,
            }
        end

        if context.final_scoring_step then
            return {
                balance = true,
                message = "Balanced!",
                colour = G.C.DARK_EDITION,
                func = balance_sound,
            }
        end
#

this is a cut from the joker effect

rugged void
#

Sup guys, I'm currently working on this seal, but I'm having a hard time displaying the current mult. It's calculated correctly but just doesn't show up in the tooltip. Any ideas?

SMODS.Seal {
    key = 'catalyst',
    pos = { x = 0, y = 0 },
    config = {
        extra = {
            XMult = 1,
            increase = 0.1,
            XMult_base = 1
        }
    },
    badge_colour = HEX('ffac38'),
    atlas = 'HamodSeals',
    unlocked = true,
    discovered = true,
    no_collection = false,
    loc_vars = function(self, info_queue, card)
        return {vars = {self.config.extra.XMult, self.config.extra.increase}}
    end,
    calculate = function(self, card, context)
        if context.main_scoring and context.cardarea == G.play then
            card.ability.seal.extra.XMult = card.ability.seal.extra.XMult + card.ability.seal.extra.increase
            SMODS.calculate_effect({x_mult = card.ability.seal.extra.XMult}, card)
        end

        if context.end_of_round and context.cardarea == G.hand and context.other_card == card and context.individual then
            card.ability.seal.extra.XMult = card.ability.seal.extra.XMult_base
        end

        if context.discard and context.other_card == card then
            card.ability.seal.extra.XMult = card.ability.seal.extra.XMult_base
        end
    end
}```
daring fern
sand sandal
#

i cant go back to 711 because balatro simply refuses to boot

daring fern
sand sandal
faint yacht
sand sandal
#

oh yeah how do you access current hands/discards

daring fern
daring fern
faint yacht
#

card.ability.seal.extra.XMult & card.ability.seal.extra.increase

sand sandal
# daring fern `G.GAME.current_round.hands_left` and `G.GAME.current_round.discards_left`
    calculate = function(_, card, context)
        if context.joker_main or context.forcetrigger then
            return {
                emult = card.ability.extra.immutable.emult,
                echips = card.ability.extra.immutable.echips,
            }
        end

        if context.final_scoring_step then
            return {
                balance = true,
                message = "Balanced!",
                colour = G.C.DARK_EDITION,
                func = balance_sound,
            }
        end

        if context.setting_blind then
            local balance1 = (G.GAME.current_round.hands_left + card.ability.extra.immutable.echips) / 2
            G.GAME.current_round.hands_left = balance1
            card.ability.extra.immutable.echips = balance1

            local balance2 = (G.GAME.current_round.discards_left + card.ability.extra.immutable.emult) / 2
            G.GAME.current_round.discards_left = balance2
            card.ability.extra.immutable.emult = balance2

            return {
                message = "Balanced!",
                colour = G.C.DARK_EDITION,
                func = balance_sound,
            }
        end
    end,
rugged void
#

I changed it in the calculation already but forgot to do it in the tooltip

sand sandal
#

🙁

wintry solar
sand sandal
wintry solar
#

Don’t expect support then

sand sandal
#

yeah it looks like i just have to write the balancing effect myself.

#

are the hand_chips and mult global variables

spring lantern
#

i'm working on a config tab, so far so good but i can't figure out how to synchronize the toggle and the value it changes - when loading the config tab the toggle always appears disabled even when the option is enabled. anyone worked with this stuff before?

candid sleet
#

how would i change this line from Midas Mask so that it picks a random enhancement and not just gold?
scored_card:set_ability('m_gold', nil, true)

spring lantern
#

in your case it should be guaranteed so something like
scored_card:set_ability(SMODS.poll_enhancement({key = 'whatever', guaranteed = true}), nil, true)

#

i think

red flower
spring lantern
#

ohhh shit thanks

#

works perfectly tysm

spring lantern
#

why is my column node acting like a row node 😭

wispy falcon
#

What stuff goes into the config of G.UIT.O?

red flower
spring lantern
#

huh

#

i guess that makes sense?

delicate spear
#

How does one change the contents of a deck? I want to create a deck that only has Aces.

olive wren
#

Im back to ask more dumb questions (yippie yay everybody applaud) My card is working perfectly, and all I need to do is to add in the suit detection. This is what I have so far

olive wren
delicate spear
olive wren
#

lol

delicate spear
#

ok update

#

changing the rank to 10 WORKED

#

was ist los

spring lantern
#

try 'A'

#

or 14

wispy falcon
olive wren
#

yeah that was totally deffinently 100% what I was going to say in all of my totally definently 100% real gamer wisdom

delicate spear
#

ima try 14

wispy falcon
#

14 stands for Aces iirc

spring lantern
#

yeah 14 is the id for aces

delicate spear
#

nope.

spring lantern
#

what's the error?

wispy falcon
#

Can you show the code?

red flower
delicate spear
olive wren
#

Hold on im going to see if I get the same error

red flower
#

i might pr it so it takes any kind of key

tepid yacht
#

quick question, how can you check if a card is steel or gold in hand

I know you need context.other_card:
but i dont know what function to call nor what the return values are

delicate spear
#

its not the nil suit

spring lantern
wispy falcon
olive wren
olive wren
#

Ace

red flower
spring lantern
#

(or "m_steel" for steel)

delicate spear
spring lantern
#

have you tried it

olive wren
#

I just did it it does work

#

trust

delicate spear
#

holy shit it did

#

damn

spring lantern
#

N' knows his balala

#

if he says something trust it

delicate spear
#

thank you, @olive wren

olive wren
#

man it wasnt me

#

thank N and alrex

delicate spear
#

my bad

olive wren
#

also im calling it balala from now on

delicate spear
#

thank you @red flower and @spring lantern

spring lantern
#

balala joker poker

wispy falcon
olive wren
#

can someone direct me to a page on checking for suits bc I was working on something for that last night which I was told to go through the context.scoring_hand table to check suits but I dont know how to do that

#

or just a page in which context.scroring_hand is used

spring lantern
#
  if c:is_suit('Suit') then
    -- do thing
  end
end
olive wren
#

thank you

spring lantern
#

whenever you need to iterate through a list of cards that's how you do it

#

for loop iterating through pairs(list of cards)

#

there's technically a better way but this is faster and easier to understand

olive wren
#

ok I will note all of this for the future in my mind palace

olive wren
#

I have gotten here and am def doing something wrong with checking the cards

#

but I only really need to check one and I dont know how to do that

daring fern
sand sandal
daring fern
olive wren
#

yeah its just a var

wispy falcon
sand sandal
#

IsRoyalFlush is declared as a global var

olive wren
#

oh

#

uhhhh

sand sandal
#

afaik

#

so once its true its gonna be true forever

olive wren
#

I set it to false

sand sandal
#

use local isRoyalFlush = false

olive wren
#

I think

sand sandal
#

which is a falsy value

olive wren
#

I just realised what you were sayinh

#

and have no clue how to fix this

#

Im just going to check manually if it is a royal flush but I also have no clue how to do that

#

I just need to check if there are an Ace and a Ten in the SFlush right

#

(I also dont really know how to do that)

red flower
#

can you copy the code here

#

i can fix it

olive wren
#

IDK how to copy it over ill just do this for now

#

I guess I can lit copy the whole thing

red flower
#

if i have to type it im not doing it lol

olive wren
#

SMODS.Joker {
key = "GreedyMan",
pos = { x = 5, y = 6 },
rarity = 2,
blueprint_compat = true,
cost = 5,
discovered = true,
config = { extra = { Xmult = 10000 }, },
loc_txt = {
name = "Money Bags Mcgee",
text = {
"{X:mult,C:white} X#1# {} Mult",
"When playing a royal flush",
"of diamonds",
},
},
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.Xmult} }
end,
calculate = function(self, card, context)
if context.before and context.display_name == "Royal Flush" then
IsRoyalFlush = true
end

        if context.joker_main and next(context.poker_hands['Straight Flush']) and IsRoyalFlush and not context.blueprint then
            
                    return {
                    message = 'I like money',
                    Xmult_mod = card.ability.extra.Xmult,
                    IsRoyalFlush = false
                    }    
        end
end

}

#

I dont even have the thing checking the suit yet but i'm trying to make it so that the royal flush cant be selected and then have them play a dif hand

red flower
#
calculate = function(self, card, context)
    if context.evaluate_poker_hand then
        card.ability.extra.IsRoyalFlush = context.display_name == "Royal Flush"
    end
    if context.joker_main and card.ability.extra.IsRoyalFlush and not context.blueprint then
        local isDiamonds = true
        for _, playing_card in ipairs(context.scoring_hand) do
            if not playing_card:is_suit("Diamonds") then
                isDiamonds = false
                break
            end
        end
        if isDiamonds then
            return {
                xmult_message = 'I like money',
                Xmult = card.ability.extra.Xmult,
            }
        end
    end
end
manic rune
#

question, cant you just check if its a royal flush in context.joker_main

red flower
#

you can check manually yes

#

this is easier imo

manic rune
#

đŸ€” theres no context.display_name in context.joker_main?

red flower
#

no

manic rune
#

damn

red flower
#

its a thing i added for that context

wispy falcon
#

What stuff goes into the config of G.UIT.O?

manic rune
#

anything thats an object

#

dynatext, cardareas, cards

#

object = ...

wispy falcon
manic rune
#

yes

red flower
#

are you still trying to recreate the collection

manic rune
#

if you add cards to the cardarea then it should show up there

wispy falcon
wispy falcon
red flower
#

smods has a lot of functions for that

wispy falcon
#

How?

red flower
#

go into the code and do ctrl-c and ctrl-v lol

wispy falcon
#

Damn, guess I was overthinking it xD

red flower
#

SMODS.card_collection_UIBox is what you want for the cards

wintry solar
#

That’s what I said yesterday 😭

wispy falcon
#

<@&1133519078540185692>

#

Damn, that was fast. Nice one xD

willow scroll
harsh warren
#

i need help, im trying to make a joker like the popcorn one, but it doesnt work

stiff locust
#

i know you can use the funny lua for checking if a file exists but

#

would it be able to return the name of a folder?

red flower
#

if a specific folder exists or what subfolders are in a folder?

stiff locust
#

this is a folder that will exist (on windows) and not everyone names it the same thing

#

and I know the directory to get to it, but how do I check the name of the folder that is there

red flower
#

you can list the files doing NFS.getDirectoryItems("path/to/folder"), but idk how you would get if it's the folder you want
you can check if it's a folder and not a file doing NFS.getInfo("path/to/folder").type == "directory"

stiff locust
#

that's surprisingly easy

#

I can just manually blacklist the other folders because they are fortunately few

#

and named the same thing every time

wispy falcon
#

How do I make my own table?

olive wren
#

I have designed a totally very good looking joker at 1x scale, I assume whenever I am making a new joker I just increase the drawing size and then add another right?

stiff locust
#

yeah

red flower
stiff locust
olive wren
#

ok

stiff locust
#

that means there will be a 2-pixel gap between each joker, and they are 1 pixel away from each edge if adjacent to an edge

olive wren
#

👍

wispy falcon
# red flower elaborate?

I want to change G.P_CENTER_POOLS.Joker to something that shows only the new stuff I added (That I would change into the table). So how do I make my own table for that?

From here:

    G.FUNCS.overlay_menu {
        definition = SMODS.card_collection_UIBox(G.P_CENTER_POOLS.Joker, {5,5,5}, {
            no_materialize = true, 
            modify_card = function(card, center) card.sticker = get_joker_win_sticker(center) end,
            h_mod = 0.95,
        })
    }
end```
red flower
#

loop through G.P_CENTER_POOLS.Joker and make a new table containing your cards

olive wren
stiff locust
stiff locust
#

and, once you are done with making the joker sprites, export the entire sheet at 2X scale

#

and put it in assets/2x

olive wren
#

ok

stiff locust
#

regular in assets/1x

harsh warren
#

thanks

red flower
# wispy falcon How?
local new_jokers = {
    ["j_modprefix_key_1"] = true, -- put the key for your new cards here
    ["j_modprefix_key_2"] = true,
}

local new_pool = {}

for _, center in ipairs(G.P_CENTER_POOLS.Joker) do
    if new_jokers[center.key] then
        table.insert(new_pool, center)
    end
end
#

then use new_pool

#

actually this is dumb

wispy falcon
#

What?

red flower
#
local new_jokers = {
    "j_modprefix_key_1", -- put the key for your new cards here
    "j_modprefix_key_2",
}

local new_pool = {}

for _, key in ipairs(new_jokers) do
    table.insert(new_pool, G.P_CENTERS[key])
end
#

better

wispy falcon
olive wren
#

I am very much failing to set up the atlas for my jokers, I believe it has something to do with the pathing

red flower
olive wren
wispy falcon
olive wren
#

Is it because I only have the one

#

should I make a second for this

#

or do I route it to a folder

wintry solar
#

path = "JokersImages.png"

olive wren
#

oh

#

no it still doesnt feel like it

red flower
#

where do you have the image, is it in both assets/1x and assets/2x?

olive wren
#

yes

wispy falcon
#

Wait, is something in the collection that isn't a center?

wintry solar
olive wren
#

do I need to route it to the assets folder?

wintry solar
#

No

wispy falcon
red flower
#

i think tags have the same logic but with G.P_TAGS
blinds have a different collection view i dont recall how that one works

wispy falcon
#

And decks are center too or not?

red flower
#

yes but they also have a different collection ui

olive wren
#

I forgot to change the name of the 2X one đŸ€Šâ€â™‚ïž

frosty rampart
#

i'd like to once again ask if anyone knows how to fix this
the behavior of my mega dice booster (which you just draw cards from) doesn't exactly match the mega buffoon pack; i'd like the whole UI to stick around instead of briefly disappearing
(video 1 is the dice booster, video 2 is the buffoon pack for comparison)
https://cdn.discordapp.com/attachments/1233186615086813277/1399451444297334965/Base_Profile_2025.07.28_-_12.58.15.03.mp4?ex=68a56478&is=68a412f8&hm=2cfe3baeb17e9d02b5092442af8c9c13e91b884179d99ed9b38a41e15b4f7be2&
https://cdn.discordapp.com/attachments/1233186615086813277/1399451445975056577/Base_Profile_2025.07.28_-_12.59.25.04.mp4?ex=68a56479&is=68a412f9&hm=1e790b626595ad5339675f17034880dcf5586e96b03061482f96427602fc5d3b&

stiff locust
#

how would i save the suit of a card

#

figured it out

hybrid shadow
red flower
#

end_of_round?

#

the area exists during the entire run

hybrid shadow
#

alr lemme try that

spring lantern
#

just here to say whoever is responsible for the existence of this func you're a lifesaver and i love you

red flower
#

me

solemn shuttle
#

is there any sort of tutorial for animating actual card sprites

i saw there was smth wip in the vanilla remade wiki but i was just curious

ive used love.draw stuff for onscreen effects but

#

i can prolly figure smth out if there's nothing, im moreso just curious

red flower
#

it's mostly switching the position of the sprite in the atlas using card.children.center:set_sprite_pos

solemn shuttle
#

oh wait you can just set the sprite pos like that

#

okay that's actually really useful 👀

olive wren
#

As some of you have seen: New rarity time POGGIES!

#

Does anybody have a link or a refrence to a mod's code with custom rarity

rocky plaza
#

also vanillaremade has example rarities

cursive gazelle
#

How to resize sprites again ?

olive wren
#

thx

rocky plaza
cursive gazelle
#

I want to display a high scale image

#

But i don’t want it looking big

rocky plaza
red flower
#

there's a parameter for that

#

display_size or something

#

check the docs

cursive gazelle
#

I’ll look in the docs

#

Ty

rocky plaza
#

oh i think i found it

cursive gazelle
#

Should this be in the atlas

rocky plaza
#

in the card ur making

cursive gazelle
#

I see

#

Thanks

olive wren
#

I know the default rarities have a number assigned to them but for custom ones do I just use the key or name

spring lantern
#

yall remind me how to check if a card has any edition

cursive gazelle
#

SMODS.Has_edition ?

#

Check the docs

ocean sinew
#

how do I check If played poker hand is a specific hand like High Card for example

spring lantern
#

ohh shit thanks

ocean sinew
#

so context.poker_hands["High Card"]

red flower
ocean sinew
red flower
ocean sinew
#

context.joker_main and context.scoring_name == "High Card"
or just context.scoring_name == "High Card"?

cursive gazelle
#

Right because every hand contains a high card

red flower
ocean sinew
#

thanks

cursive gazelle
wintry solar
olive wren
#

Rarities are confusing fr

wintry solar
#

You shouldn’t need to play with display size iirc

ocean sinew
olive wren
#

why

ocean sinew
olive wren
#

stop

ocean sinew
#

no

#

I made mutations too

#

but I still need to figure out how to add badges to cards

olive wren
#

we dont need our game to be tainted by thou forces of evil and bombarded by the very place in which evil lies

ocean sinew
#

for now it only buffs and doesnt add the mutation badge

ocean sinew
olive wren
#

NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO

ocean sinew
#

yes

olive wren
#

oh ok

ocean sinew
#

Though my mod will get cancelled

#

but roblox kids will like it

olive wren
#

NOT THE ROBLOX KIDS

#

AHHHHHHHHHHHH

#

lol

ocean sinew
#

yes

#

I need to summon them into the balatro community

#

and this is the only way

olive wren
#

I mean maybe it will make them more sane

ocean sinew
#

I got a diamond mutated splash

#

mutation have a base chance of 1%

#

diamond has a base chance of 10% while gold has 90%

#

which means I got a 0.1% mutation

#

diamond increases joker values by x3

#

WHICH MEANS I GOT A VERY RARE AND GOOD MUTATION ON SPLASH

#

WHICH HAS NO JOKER VALUES

#

😭

#

why not on burglar

#

all I wanted was +9 hands

stiff locust
#

:DDD

idle plaza
#

sploosh

ocean sinew
#

Btw does someone know how I add custom badges to jokers

stiff locust
#

you mean like the rarity text

#

you can do it in set_card_type_badge

ocean sinew
#

I wanted to check If the card has mutations and If It does it adds their badges

#

is it possible to do that with set_card_type_badge too?

frosty rampart
#

if you want to add new badges, use set_badges instead

stiff locust
#

oh fair

ocean sinew
final jewel
#

I have a small question, if I copy functionnality part from a toml file but not the bug with some card part, Does the bugs will occur or it will be fix because of the other toml

frosty rampart
ocean sinew
#

oh thanks

olive wren
#

This is my rarity script, how do I assign this rarity to a card?

frosty rampart
#

rarity = "modprefix_GreedRarity" in the card's initial definition

REPLACE "modprefix" WITH YOUR ACTUAL MOD'S PREFIX

olive wren
#

ok thx

#

wait whats a mod prefix

#

im kinda dumb fr fr

#

I just know the name

red flower
olive wren
#

thx

ocean sinew
frosty rampart
#

hmm
not sure. you might want to represent the thing you're making as its own card modifier type and then set it up to add its badge from there, like how editions add a badge to cards

olive wren
#

I have a feeling I am missing something

cursive gazelle
#

Mod prefix is wrong

frosty rampart
#

your mod prefix is mycoolmod

olive wren
#

I should prob learn to read before asking questions next time

mighty ember
#

My game freezes after some minutes and crashed, can someone help me please ?

#

I have the Cryptid mod installed

fluid nebula
#

yo i need help with two things if that's okay

olive wren
#

no. Pick one.

#

👿

rotund sable
#

Don't ask to ask

fluid nebula
#

sorry i just get worried that i ask too many questions

#

but i was wondering how i could make my own custom message

#

i noticed in vremade's code that it localizes certain messages

#

marked as k_[keyword]_ex

#

like 'k_upgrade_ex'

red flower
#

if you dont care about localization you can just do message = "Your message here" if you do you need to add them to a localization file under misc.dictionary

frosty rampart
#

example (misc is outside the descriptions table)

final jewel
#

Why does the price of my things isnt like in the misprint deck ?

chrome token
#

heyo-- kind of a dumb question but how do i get the amount of chips/mult played in the currently played hand?
i'm kinda new to balatro modding and i'm slowly learning about it as i go on đŸ„Č

chrome token
#

...man how did i miss that ._. thank you 😅

red flower
#

:3

frosty rampart
#

afaik this method no longer applies if you're on the dev build of steamodded (i.e. not 0711a, the latest release)

chrome token
#

oh? well is there any other method i should be aware of?

olive wren
#

Im trying to make a card that has a 50% chance to increase the end of round payout and a 50% chance to decrease the end of round payout at the end of a round but I don't know how to change the end of round payout in general

wheat tulip
frosty rampart
hushed field
#

Also, if I can reccomend one more mod and do some self-promo, you might wanna check out #glue

wheat tulip
#

Noted

hushed field
#

But I recommend trying to figure out what works and go from there.You're for sure running a dev version of smods, which also will add to instability

#

Glue's made to potentially add more shop slots, but the main thing I think it's good for is to just let you return the joker spawn rate back to normal if you play with a lot of mods that add consumables, haha

ocean sinew
#

gold mutation + diamond mutation chance of this happening is 0.05%

#

this is peak balatro btw

olive wren
#

oh lord

#

also 18 dollars at the end of the round?

ocean sinew
#

yeah cuz gold buffs values by 1.5

#

and diamond buffs by 3

#

so its 4x1.5=6x3=18

#

this is so cursed ong

#

😭

fluid nebula
#

is the localisation file in the original balatro files?

fluid nebula
#

oh, in steammodded

#

thanks!

#

come to think of it now, it wouldn't make sense to edit the original game files themselves for a mod

olive wren
#

How do I increase the amount of money that a card gives at the end of a round

ocean sinew
#

card.ability.extra.<money_value>=card.ability.extra.<money_value>+1 for example

wispy falcon
quick scarab
#

Can I theoretical make a file that will only containing values where the mod will read all of them to use it, say as a example to use as a mult on a certain joker. If this is possible how would I make this?

#

I already have the file containing stuff

#

I just need a way that these variables are used by other files

fluid nebula
#

i don't care about localisation for now, considering nothing is really being developed for public release right now

#

i think i will though. languages aren't my strong suit though

#

and i don't want to use google translate because it will just get things wrong

wispy falcon
cursive gazelle
#

You got this giga chad

fluid nebula
#

unless i need them in speech marks and not apostrophes

red flower
fluid nebula
#

something tells me this is going to be a very obvious solution that i didn't know

frosty rampart
#

are you putting it in the pseudorandom_probability or is there more code off to the right of the screenshot

red flower
#
return {
  message = "Winner!",
  dollars = 50
}
#

instead of those 2 lines

fluid nebula
#

the person is meant to gain $50, not have their money set to 50 if it triggers

red flower
#

yes

red flower
fluid nebula
fluid nebula
red flower
#

yes

fluid nebula
#

thank you for your help, n

red flower
#

in a calculation return

fluid nebula
#

i feel guilty asking so many questions

frosty rampart
#

returning a value like chips, mult, or dollars in calculate generally adds to the relevant value, it doesn't set it

red flower
frosty rampart
fluid nebula
#

also the code is still not working

#

do i need to set the message's appearance to where the joker is?

#

wait it just says return nvm

#

i somehow missed the "return" part

#

got that in my head for next time

#

thank you N

quick scarab
#

Even if I set as global it doesn't seem to read

cursive gazelle
#

Fred did you got vscode yet

olive wren
#

This is my attempt at making it increase randomly, it worked intially but failed to work once I added the probabilities

frosty rampart
#

context.man_eval is always false because context.man_eval does not exist

mystic meteor
#

does anyone know how to make a text input in the config? I don't see any examples of doing that.

olive wren
#

Its working now yat

#

yay

#

how do I get the probability to show in the description?

frosty rampart
#

any of the code text that's not visible here is just a comment

olive wren
#

huh

#

I have that I think

fluid nebula
cursive gazelle
fluid nebula
#

no, no, it's okay

cursive gazelle
fluid nebula
#

thank you for the offer but really

#

i'm good

cursive gazelle
#

Okay then suit yourself

rotund sable
#

Someone link the part of VanillaRemade wiki where the vscode is setup

rocky plaza
fluid nebula
#

oh by the way

#

sorry to be a nuisance but may i ask for help with some code

frosty rampart
cursive gazelle
#

(Brain cannot function)

cursive gazelle
rotund sable
fluid nebula
frosty rampart
fluid nebula
#

just one second before i type my question

cursive gazelle
olive wren
#

this is my attempt at adding the chance into the description

fluid nebula
#

i have a joker known as assassin, which i want to gain 5 mult whenever a certain rank is discarded
whenever i discard any card, i get this error

#

any help?

olive wren
#

it did not work and I dont know what to do

fluid nebula
#

i think it's something to do with setting ass_card before, but i'm not sure how to do that

olive wren
#

I know im dumb bc C is color

#

But I dont know what else goes there

cursive gazelle
#

This is correct?

fluid nebula
#

it should be

cursive gazelle
fluid nebula
#

i mainly replicated code from mail-in rebate in vremade

#

would you like all of the code for assassin?

olive wren
#

I think I need to increment the #2# and #3# thing but I dont know how

cursive gazelle
cursive gazelle
fluid nebula
olive wren
#

This is what it looks like rn

#

not even nil

frosty rampart
#

{C:numerator} and {C:denominator} aren't valid, so it might be bugging out there
what happens if you take out the colors entirely

olive wren
#

nvm fixed it

#

Yeah that was mainly the problem, +returning values, +some other stuff

frosty rampart
olive wren
#

thx

cursive gazelle
fluid nebula
#

i see. so i call the function reset_ass_card when it is nil?

cursive gazelle
#
local ass_card = pseudorandom_element(valid_ass_cards, 'ass' .. G.GAME.round_resets.ante)
if ass_card then
    G.GAME.current_round.ass_card_rank = ass_card.base_value
    G.GAME.current_round.ass_card_id = ass_card.base_id
else
    G.GAME.current_round.ass_card_rank = 'Ace'
    G.GAME.current_round.ass_card_id = nil
end```
#

Something like this

fluid nebula
#

thank you

fluid nebula
#

i might have placed this snippet of code in the incorrect position

cursive gazelle
#

Might have an extra , or }

fluid nebula
rotund sable
#

oh god

#

you have to replace the old snippet

frosty rampart
#

yes you definitely put that in the wrong place

cursive gazelle
#

Why’s the “if”offset ?

frosty rampart
#

an SMODS.Joker object can't just run code, it just stores parameters. those parameters can be functions, and then you can put code in those functions

ocean sinew
#

@cursive gazelle look at this

cursive gazelle
#

Take ownership ?

fluid nebula
cursive gazelle
#

What’s the golden and diamond badges

cursive gazelle
ocean sinew
#
function Card:init(X, Y, W, H, card, center, params)
    self.mutations = {}
    print("going to call function on center:",center)
    if center.applied_mutation_badges == nil then
    local last_set_badges = center.set_badges
        center.set_badges = function (self,card,badges)
        mutation_set_badges(self,card,badges)
        if last_set_badges then last_set_badges(self,card,badges) end
    end

    end

    return last_init(self,X, Y, W, H, card, center, params)
end
#

and on Card:load too

#

oh wait