#💻・modding-dev

1 messages · Page 569 of 1

wispy falcon
#

I was just about to delete my message because I thought that TwT. I'm too tired and should head to bed instead of coding this...

daring fern
#

Did you put a function in G.GAME?

long sun
#

oh -3- yes i must've

#

this can be fixed though

round lion
#

how do i skip the redeeming animation for a voucher

long sun
#

the game is crashing because of a nil atlas, however PhantaDeckJoker exists — i've tested that by seeing the Joker in the collection before it is changed

#

what did i do wrong?

daring fern
long sun
#

oh😭 thanks

split saddle
#

what's the best way of going about destroying a random card from the deck?

frosty rampart
#

there should be a pseudorandom function that gets a random object from a table, don't remember the name of it off the top of my head

#

ah it's pseudorandom_element

split saddle
#

ok

toxic edge
#

Im having an issue with making a very basic joker in the game, its saying it cant find the file path for atlas but i already have the image for the joker while being named "jokers.png" in 1x and 2x in an assets folder. Anyone now how to fix this?

Lua code:

--- STEAMMODDED HEADER
--- MOD_NAME: Johnbo
--- MOD_ID: JOHNBO
--- MOD_AUTHOR: [Wii_Bowler]
--- MOD_DESCRIPTION: I love johnboing it so good yes
--- PREFIX: Jnbo
-----------------------------------------------
---------------MOD CODE ----------------------

SMODS.Atlas{
    key = 'Jokers',
    path = 'Jokers.png',
    px = 71,
    py = 95
}


SMODS.Joker{
    key = 'joker2',
    loc_txt = {
        name = 'Johnbo',
        text = {
            'When Johnbo is collected',
            'Give like perma mult idk'
        }

    },
    Atlas = 'Jokers',
    pos = {x = 0, y = 0}
}

-----------------------------------------------
----------------MOD CODE END -----------------

Json code:

{
    "id": "JOHNBO",
    "name": "Johnbo",
    "display_name": "Johnbo",
    "author": ["Wii_Bowler"],
    "description": "Hehehe funny johnbo",
    "prefix": "JNBO",
    "main_file": "main.lua",
    "priority": 0,
    "badge_colour": "",
    "badge_text_colour": "",
    "version": "1.0.0",
    "dependencies": []
}
frosty rampart
#

capitalization matters, make sure the files are named "Jokers.png" with a capital J

toxic edge
#

they both do

frosty rampart
#

show a screenshot of the files in the file explorer app, with the path fully visible

toxic edge
#

is this good enough?

frosty rampart
#

yes
you've typo'd the assets folder as "assests"
fix that

toxic edge
#

thx man that was it

crystal perch
#

any way i could define the text highlight through a global with something like DynaText

#

like the equivalent of {X:mult,C:white} but in this format for use in DynaText
{string = ' +', colour = G.C.MULT}

red flower
#

not with only dynatext

#

you need to wrap it in a column node

#

check how localize does it

round lion
#

how am i meant to call blind configs? is it blind.ability.config or something

red flower
#

blind.effect or blind.config.blind.config

crystal perch
#

well i have a whole thing i just want to change the highlight colour, here's the full code

red flower
#

yeah you can't do it with only dynatext

#

i actually did misprint text like that before actually let me get the code

crystal perch
#

i referenced the vanilla remade docs for a lot of this

red flower
crystal perch
#

this the code?

red flower
#

yes

crystal perch
#

very cool and awesome

#

i will check it out

split saddle
#

i think we should have high contrast suit emojis egg

crystal perch
# red flower yes

having an issue where the Xmult doesn't appear (either it's white and unhighligted or it's clear), and the word does not change from "Mult"

#

i would send the code but it can't fit in a screenshot and a message is 1744 characters over the limit

#

and the func ofc

red flower
#

the function is looking for "+50" and "X1.5" specifically

#

if the text can be other things then you need to check for that

loud summit
#

does the event queue "after" mode bypass the normal queue order?

loud summit
#

how do you check if youre drawing cards in a booster pack

red flower
#

context.other_drawn iirc

#

something like that

loud summit
#

oh

#

that simple, huh?

hard flume
#

I wonder how hard it would be to make a coin flip

wet stratus
#

Can someone give me some guidance to learn how to start making mods for Balatro? I have made a few mods for other games Skyrim, and Baldur's gate but don't know where to start here

frosty rampart
wet stratus
loud summit
#

how would you have a joker store a boolean thats like only to prevent an infinite loop

#

like should you just put that in config { immutable }?

#

or is there a proper way to store "internal" variables like that

red flower
#

saving it in the config is fine

loud summit
#

ok

red flower
#

if you don't care about saving the value on a reset then it can be directly in on the card

loud summit
#

also is there a context for when a booster is closed in any way

loud summit
#

thx

#

so it turns out putting a command to draw more cards in other_draw leads to an infinite loop because that alos counts as other_draw

red flower
# loud summit ?

if you only need the value once in a place where the game doesn't save then you don't need to save it to the config

loud summit
#

you can just do card.foo = x?

red flower
#

yeah

loud summit
#

are nil/undefined values truthy or no

red flower
#

no

loud summit
#

ok good

#

so its safe to just use that as a true false switch and check it before its actually set

red flower
#

yeah

loud summit
#

cool thx

daring fern
#

split saddle
#

how do i know if a card is getting destroyed by grim?

magic steppe
#

I've tested about every joker in the mod and these are the ones that have this issue, every other one doesn't have this issue

#

I'd ask GayCoonie (the dev of the mod) about this but from last I've searched he seems to have gone MIA

crystal perch
#

is there any possible way i could make jimbo always say "The house always wins!" if you lose by a specific condition

magic steppe
wheat jewel
#

If i want to make a method that goes through ranks in order rather than choosing a random rank, how do i go about doing so because i'm lost

split saddle
wheat jewel
split saddle
#

yeah

wheat jewel
daring fern
wheat jewel
#

tryna think of how to do it, whether to do it in the joker code itself or in the method i'm doing

split saddle
#

i guess if you're doing it with rounds you should probably use modulo (%) to get the index of the table

magic steppe
wheat jewel
split saddle
#

yea

#

also it's ranks plural

wheat jewel
#

would the inner logic be like G.GAME.rounds % (idk what to add on this side of the modulo operation)

split saddle
#

try SMODS.Ranks[G.GAME.current_round % #SMODS.Ranks]

wheat jewel
#

Gotcha

wheat jewel
split saddle
#

i think that's good

daring fern
wheat jewel
split saddle
daring fern
wheat jewel
#

oh shit

#

forgot

#

to put the image

split saddle
lyric maple
#

i tried to make a joker that gives mult when a joker from my mod (kls) is sold. this doesn't seem to work and it crashes

    calculate = function(self, card, context)
        if context.joker_main then
            return {
                xmult = card.ability.extra.xmult
            }
        end

        if context.selling_card and context.card.ability.set == "Joker" and context.card ~= card and not context.blueprint and context.main_eval and context.other_card.config.center.original_mod == SMODS.Mods["kls"] then
            card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmult_gain
            return {
                message = localize { type = "variable", key = "a_xmult", vars = { card.ability.extra.xmult } },
                colour = G.C.MULT,
                card = card
            }
        end
    end
daring fern
split saddle
#

got it

sturdy finch
#

ok im probably an idiot but im stuck here
trying to do something for each joker the player has, excluding negative ones (thematic reason for this). i'm trying to check if a joker is negative but just copying over the 'check for edition' code results in a crash. assuming there's a different way i have to check this ?

split saddle
split saddle
daring fern
wheat jewel
# wheat jewel

would printing out the rank work like this or a different way?

lament agate
#

how to check each played cards and not the joker itself

#

again

#

i forgot

sturdy finch
#

thank you so much 😭

daring fern
sturdy finch
lyric maple
split saddle
#

or i can't react???

#

wtf

daring fern
lyric maple
#

i tried that too

fathom star
#

funny monkey doodoo jokers i made

lyric maple
#

actually maybe it's because my mod prefix is kls but my mod name is KLS

split saddle
#

i knew removing cards directly from the deck wasn't going to work as intended

#

when the joker is in play, new cards don't get added to the deck view, but removed ones do disappear

magic steppe
#

(hope im not taking up too much time on the coding assistance since I pratically know zilch about it for this game @daring fern )
but as far as I see I don't seem to have found any differences in its code from Defused and Fusion in terms of its context checks (unless im looking in the wrong place)

daring fern
wheat jewel
#

How can i print out the rank in the joker description without causing errors

daring fern
#

SMODS.Ranks[(function() for k, v in pairs(SMODS.Ranks) do if v.id == ((G.GAME.round % (SMODS.Rank.max_id.value-1))+1) then return v.key end return 'Ace' end)()].key

wheat jewel
daring fern
wheat jewel
#

like this?

daring fern
wheat jewel
#

ok!

#

i tried to do ! in the if but the syntax isn't like that

#

is this correct?

wheat jewel
daring fern
#

Also, install the lua extension.

wheat jewel
#

for vs code?

magic steppe
#

okay hold up I think I'm getting an angle here

daring fern
wheat jewel
#

this is supposedly causing the issue rn

#

the brackets near the .key

#

unexpected symbol error

magic steppe
#

all I had to do was change this to this

daring fern
# wheat jewel unexpected symbol error

SMODS.Ranks[(function() for k, v in pairs(SMODS.Ranks) do if v.id == ((G.GAME.round % (SMODS.Rank.max_id.value-1))+1) then return v.key end end return 'Ace' end)()].key

wheat jewel
daring fern
wheat jewel
# daring fern What is currently happening?

the joker is supposed to give $2 when a specific ranked card is scored, the gimmick is that it's supposed to go in order like it's going in a circle like a ferris wheel, but it isn't doing so during scoring

daring fern
wheat jewel
#

Btw quick question, i had this issue a few days ago and left it off for a bit, but i tried to make a joker that will give money based on if you change the volume level of the music, but that never gets returned by the joker at all

#

is there another way to do it

magic steppe
#

next is Flag Bearer

#

alrighty, easy peasy, same as dementia joker's solution, change the last if context.cardarea line

#

thats the last of the regular fusion jokers now cause now its time for the others

#

trying the context.cardarea line first

#

...okay wow uh

#

are all of these going to be fixed by just pasting "G.jokers and context.joker_main then" in their last context.cardarea line?????????

magic steppe
#

...

#

huh

daring fern
#

Also SMODS.Jokers doesn't exist.

magic steppe
#

...I say that and watch something is gonna go out of whack

#

well well, looks like they're all working without a hitch!

magic steppe
# daring fern Yes.

I appreciate your assistance (even if the solution was literally changing one line of code to another lol)

hard flume
#

Im working on a coin flipping mechanic. I assume that in order to get it to actually flip, I'd need to use either drawSteps and/or Shaders, right?

daring fern
hard flume
#

Okay, but how? Just have a list of sprites, or can I do it in the same way playing cards are flipped?

wintry solar
lethal spindle
#

Guys

#

Does anyone exactly know

#

how you can add a new button containing text, like Money or Ante to the left

#

Or maybe should I simply just ask how the Ante button code was done so I can make a copy

#

I really need to stop using Jokerforge

robust marsh
#

how would I hide a specific card? By hide I mean straight up just make it as if it's not there but still let it score/do its thing.

robust marsh
#

ty

vast night
#

it's me again, and this time i wanna ask where the run-initializer is, so i can hook into it. i looked at game.lua but didn't find anything there

#

(ps: with run-initializer i mean the function that gets ran once a new run is made)

vast night
robust marsh
#

oki

vast night
# robust marsh oki

hm. idk what i did wrong, but it still crashed. could be that some calculates happen before the run was fully initialized?
ps: i just made a check to init data once its needed

vast night
# robust marsh can you show the code
-- Initialize Run Save
FATES.Data.Funcs.init_run = function ()
    G.GAME.Fates = {
        active_fates = {},
        fate_history = {}
    }
end

local start_run_ref = G.start_run
G.start_run = function (self)
    -- Before Hook
    local ret = start_run_ref(self)
    -- After Hook
    FATES.Data.Funcs.init_run()
    -- Return
    return ret
end
#

mb

#

i hooked into the wrong fun

#

😭

#

nope

robust marsh
#
local start_run_ref = Game.start_run
function Game:start_run(args)
    start_run_ref(self, args)

end

You're probably looking to do something like this

vast night
#

still nothing

daring fern
daring fern
daring fern
vast night
#

wait

#

lemme test smtn

sturdy finch
#

Odd Modd is going well

vast night
daring fern
vast night
daring fern
#

How does one run balatro in balatro?

vast night
#

also is there an instance where i can make this be only ran once (context.cardarea = G.jokers somehow didnt work)

if context.end_of_round then
daring fern
vast night
vast night
daring fern
vast night
robust marsh
#

what's the G.jokers.highlighted equivalent for boosters

daring fern
robust marsh
real crown
#

How possible would it be to make a Joker that puts you in limbo?
Like any time you beat the boss blind, instead of going to next Ante, the Ante restarts, the scaling on hand levels, jokers, the joker lineup itself, your money, everything goes back to what it was when you bought the limbo Joker? Of course no eternal compatibility and you could break the cycle by selling the Joker, but I'm unsure how possible it is to implement certain aspects, like scaling on other Jokers

daring fern
#

You would just save everything at the start of the ante and revert everything back at the end.

slender bay
#

What would I need to put in here to create a specific joker when sold? can't quite find anything that works

daring fern
slender bay
#

thanks

#

Any suggestions to fix this?

wintry solar
#

Wolf isn’t a joker key

slender bay
#

It's an earlier key I put in, or does that not work?

daring fern
slender bay
#

oh

#

hm, still crashing

daring fern
slender bay
daring fern
slender bay
#

ohh

stoic void
#

I was going to say the modprefix and key need to be the actual modprefix and key

timid narwhal
#

yo, i need a lil help in making a mod...idks about mod developing but got a cool idea ig

#

like i was thinking of making a lil group to make these mods and stuff

grand iris
#

Hello,i wanna make a mod that replaces all jokers with custom sprites,how can i code the lua? (if you know what i'm talking about)

#

i really suck at coding lol

hidden mirage
#
rules = {
        modifiers = {dollars = 20}
    }```
why does this not crash but doesnt do anything in a challenge
daring fern
real crown
#

If I do
if context.playing_card_added then local card = context.cards...
Will card contain all cards that got added, or does it get called for each card one by one, so doing it for 1 card is enough?

hidden mirage
daring fern
real crown
#

Thank you!

mystic river
#

are these not the same table?? how do i get the cards i returned up there

#

... hello computer i marked that up -

#

these tables

daring fern
mystic river
#

so like

{
 1 = {card, card, card, card, card},
 2 = {card, card, card, card, card},
 3 = {card, card, card, card, card},
 4 = {card, card, card, card, card},
}

??

daring fern
#

Because cards is a table of cards, and you're returning that but in another table.

mystic river
#

... aha. i see. what i did

#

so the problem is that i'm stupid, but in a completely different place than expected

vernal path
#

same tbh

slim ferry
#

what the fuck does this even mean

cursive gazelle
#

You need to do

#
local new_card = SMODS.change_base(G.hand.highlighted[i], nil, card.ability.extra.rank_conv)```
wintry solar
#

no you don't

slim ferry
#

why would i need to store the value when its just changing an existing card

cursive gazelle
#

That’s what i understood from the comment

wintry solar
#

you should just do assert(SMODS.change_base(blablabla))

cursive gazelle
#

OHHHHHH

wintry solar
#

in case it fails

#

it's not needed though

real crown
#
        if context.playing_card_added then
            local card = context.cards
            for _, card in ipairs(context.cards or {}) do
                if card.get_id and card:get_id() == 12 then
                    local _card = copy_card(card, nil, nil, G.playing_card)
                    _card:add_to_deck()
                    G.deck.config.card_limit = G.deck.config.card_limit + 1
                    table.insert(G.playing_cards, _card)
                    G.hand:emplace(_card)
                    _card.states.visible = nil

                    G.E_MANAGER:add_event(Event({
                        func = function()
                            _card:start_materialize()
                            return true
                        end
                    }))

                    return {
                        message = 'I just want to make you happy!',
                        colour = G.C.PURPLE
                    }
                end
            end
        end
    end```

Is there a simple way to display the message without returning? If I return, then if a second queen is added (e.g.: cryptid), only one gets copied, but if I remove the return it works properly, without message though.
I know it's an option do display the message x number of times after it's all done, but I want it displayed as it happens.
daring fern
real crown
#

Then it wouldn't display the message for each copy, right?

daring fern
slim ferry
#

if you want that you would use SMODS.calculate_effect(<return table>, card) in place of returning iirc

real crown
#

Thank you, works like a charm!

#

Whoops I just noticed I redefined card multiple times too so it didn't know where to put it, but fixed

hidden mirage
#

how to get a pseudorandom value from 0-1 or just a random int within bounds?

cursive gazelle
#

You can do math.random() but it will be different each time even in the same seed

cursive gazelle
rotund sable
#

pseudorandom("seed")

cursive gazelle
hidden mirage
#

hmm who should i trust

cursive gazelle
#

Pseudorandom

#

Obviously

hidden mirage
#

and is there a table inbuilt of every tag,vouncher,edition etc

cursive gazelle
#

What do you want to do exactly

hidden mirage
#

its fine i will just make a table manually

cursive gazelle
#

mr_bones suit yourself

slim ferry
#

🧠

cursive gazelle
#

Lua is magic

cursive gazelle
slim ferry
#

the tables are G.P_TAGS, G.P_CENTER_POOLS.Voucher, and G.P_CENTER_POOLS.Edition btw

cursive gazelle
#

🏊

slim ferry
#

why art thou swimming

cursive gazelle
#

Edition pool

slim ferry
#

does pseudorandom_element ignore elements with value nil?

cursive gazelle
#

I mean probably

daring fern
north stone
#
repeat
      yellowprint_value = math.random(1, #G.jokers.cards)
until G.jokers.cards[yellowprint_value].blueprint_compat ~= false```
how do i make it check if a joker is blueprint compatible? this isnt working
slim ferry
#

use a for loop first of all

wintry solar
#

G.jokers.cards[yellowprint_value].config.center.blueprint_compat but this will loop infinitely if you don't have any compatible jokers

north stone
#

okay thanks

slim ferry
#

does get_current pool return a table of tables or of object keys?

red flower
#

keys

hard flume
#

Does anyone know how Balatro does the flipping animation for playing cards? Id like to try to recreate it myself

slim ferry
#

card:flip()

hard flume
#

Yes, but like. Where is it stored so I can look at the code so I can recreate it for my own purposes?

#

(I need to create a coin flipping animation)

slim ferry
#

i imagine somewhere in functions/common_events.lua

hard flume
#

Ty

wintry solar
#

it'll be in card.lua

hidden mirage
#
 if context.individual and context.cardarea == G.play then
            if SMODS.pseudorandom_probability(card, 'jackpot', 1, card.ability.extra.odds) then
                context.other_card:set_ability('m_gold', nil, true)```
why is other_card nil
wintry solar
#

event shenanigans

#

do local _card = context.other_card and then _card:set_ability(...)

hidden mirage
#

Yep figured

#

thanks

real crown
#

I don't remember there being such a functionality in the game, what's the way of having a Joker triggered when it's destroyed? Can it even trigger at that time, or is it already gone and the code won't run for that?

#

Specifically destroyed, not sold

still cedar
#

Why does this error appear when I hover over a joker in a collection?

daring fern
still cedar
#

thanks

north stone
#

how would i go about making a joker that checks if you have two specific ranks of card in your played hand

faint yacht
cursive gazelle
#

Seeing double but change suits to ranks

long sun
#

i'm trying to add my mods to the Mod Manager, but i need access to push to a branch

#

how did you guys do it?

maiden phoenix
#

Submit a pr

long sun
#

i don't have access to push to a branch to make the PR though

#

my commit history

wintry solar
#

fork it first

long sun
#

ah -3-

#

i've never done that before, so lemme figure that out

wintry solar
#

it's a god awful method of submitting mods tbh

long sun
#

oh it's positively terrible

#

i haven't tested this at all

agile path
#

good morning chat

#
config = { extra = { odd_one = 1, odd_two = 5 }, },
    loc_vars = function(self, info_queue, card)
        return { vars = {card.ability.extra.odd_one,card.ability.extra.odd_two } }
    end,

calculate = function(self, card, context)
        if context.joker_main and pseudorandom('adhd_joker', card.ability.extra.odd_one, card.ability.extra.odd_two) then
            return {
                mult = 15
            }
        end
    end
}

this isn't doing a 1 in 5
it's doing a 5 in 5

long sun
#

the pseudorandom value will always return true

#

you're not comparing it against anything, and it will always exist

agile path
#

so, what changes do i make?

long sun
#

use SMODS.pseudorandom_probability(card, "heartbreak", 1, card.ability.extra.odds) instead

agile path
#

ahhh, okay

long sun
#

and change ur loc_vars to something resembling this ^u^

#

but change the heartbreak to your random key

#

okay i've forked it, and i've made a commit on the fork

#

how do i make this a pull request ;u;

still cedar
#

Why this error appear?

long sun
#

remove one of the ends after the if

hidden mirage
#

trying again 💀

calculate = function(self, card, context)
        local _card = context.other_card
        if context.individual and context.cardarea == G.play then
            if SMODS.pseudorandom_probability(card, 'jackpot', 1, card.ability.extra.odds) then
                _card:set_ability('m_gold', nil, true)```why is context.other_card nil
long sun
#

ah no nevermind i've got it ^u^ thanks

wintry solar
hidden mirage
wintry solar
#

and can you share your code with line numbers?

hidden mirage
wintry solar
#

you're still using context.other_card in an event

#

line 32

#

it tells you where the problem is

hidden mirage
#

yikes

#

sorry and thankyou

robust marsh
#

I don't understand why this is happening since i'm not giving ease_hands_played a table at any point

wispy falcon
#

Any idea how I would make a consumable change into a random joker every round?

red flower
robust marsh
red flower
#

my guess is you're passing card.ability.extra to ease_hands_played

robust marsh
#

i can paste the code here but yeah, i am completely clueless

wispy falcon
#

What's the table with all jokers in the game (vanilla and modded)?

daring fern
#

daring fern
keen atlas
robust marsh
#

it's straight up returning { odds = 2, dollars = 1 }

#

i do not get why

wispy falcon
#

How do I make it change back when the flag is true? Do I use the flag in every Joker?

hidden mirage
#
 _card:set_ability(pseudorandom_element(G.P_CENTER_POOLS.Enhanced, 'jackpot1'), nil, true)
  G.E_MANAGER:add_event(Event({
      func = function()
          _card:juice_up()
          return true
      end
  }))
   return {message = "msg"}```how to have message show right before enhancement?
wispy falcon
#

At the end of a round

long sun
#

is there a context for when Cash Out is pressed?

daring fern
long sun
#

awesome ^U^ thanks

robust marsh
wispy falcon
#

Yes. It would change into a random joker when a blind is selected and turn back into itself at the end of the round

#

So how would I change it back again?

wispy falcon
#

I currently have this but the calculate doesn't apply to it anymore, when it changed into a joker

        if context.blind then
            local RNGesus = pseudorandom_element(G.P_CENTER_POOLS.Joker, "scorpioJoker")
            card:set_ability(RNGesus)
            Is_from_scorpio = true
        end

        if context.end_of_round and Is_from_scorpio == true then
            Is_from_scorpio = false
            card:set_ability("c_cstorm_scorpio")
        end
    end```
daring fern
glossy sky
#

Is there a way to check if another joker becomes debuffed?

wispy falcon
daring fern
wispy falcon
slim ferry
#

nothing

#

mod calculate is just self, context

rocky osprey
#

hi chat, i wanted to ask how the level color text on planet cards work? i did this but the colors didnt show up

exoplanet.lua

...
    config = {
        hand_type = "sp_plateau",
     },
    loc_vars = function(self, info_queue, card)
        return {
            vars = {
                G.GAME.hands[card.ability.hand_type].level,
                localize(card.ability.hand_type, 'poker_hands'),
                G.GAME.hands[card.ability.hand_type].l_mult,
                G.GAME.hands[card.ability.hand_type].l_chips,
                colours = { (G.GAME.hands[card.ability.hand_type].level == 1 and G.C.UI.TEXT_DARK or G.C.HAND_LEVELS[math.min(7, G.GAME.hands[card.ability.hand_type].level)]) }
            }
        }
    end,
...

en-us.lua

c_sp_j1407b = {
    name = "J1407b",
    text = {
        '({V:1}lvl.#1#{}) Levels up {C:attention}#2#{}',
        '{C:blue}+#4#{} Chips and',
        '{C:red}+#3#{} Mult'
    }
},

yes i know i got the chips and mult swapped i'll change it later

wispy falcon
slim ferry
#

no

#

you dont use anything

#

like i said in the message right after thatg

slim ferry
wispy falcon
slim ferry
#

what

#

oh

#

no because you need to target a card

#

so you need to actually find the card you need to turn back first

#

oh i thought you meant for mod calculate

#

yeah no you gotta loop over everything and check what cards need to be transformed

rocky osprey
slim ferry
#

i dont know the exact level colours but it definitely shouldnt be that colour

#

strange

rocky osprey
#

hmm

real crown
#

Is there a way to have the hand size adapt to the joker's config?
From what I can find Jokers that change hand size only do it on adding to deck and removing from deck, and Bean does every time remove 1 from it
But is there a way to not continously change it, but just like set the hand size change from this Joker, and it'll adapt if it the hand size variable of the Joker changes from 1 to 2?

slim ferry
# rocky osprey hmm

i'd make an issue in vanillaremade since that seems to be where you got the code from

rocky osprey
slim ferry
#

so the way is to just modify the config and hand size by the same amount

real crown
#

That sounds annoying, thank you!

daring fern
wispy falcon
slim ferry
#

correct

#

and youre changing it back

daring fern
wispy falcon
slim ferry
#

when you transform the consumable

robust marsh
#

what would i hook into to prevent the boss blind from refreshing blinds when you beat it

slim ferry
#

guh

wispy falcon
# daring fern Are you setting `card.c_cstorm_scorpio`?

I'm doing calculate = function (self, card, context) if context.blind then local RNGesus = pseudorandom_element(G.P_CENTER_POOLS.Joker, "scorpioJoker") card:set_ability(RNGesus) Is_from_scorpio = true end end in the consumable itself and ```if context.end_of_round and Is_from_scorpio == true then
Is_from_scorpio = false

    for k, v in pairs(G.I.CARD) do
        if v.c_cstorm_scorpio then
            v:set_ability("c_cstorm_scorpio")
        end
    end
end``` in the `SMODS.current_mod.calculate`
slim ferry
#

that does nothing

robust marsh
# daring fern `get_new_boss`?

no i don't think so.. You know how when you advance the ante after beating the boss and all the blinds get reset? I'm looking for that specifically

daring fern
wispy falcon
wispy falcon
slim ferry
slim ferry
#

<thing> = <value>

robust marsh
wispy falcon
slim ferry
#

yes

wispy falcon
#

It works now, thank you

#

How would I add an info to the joker now?

#

Like info_queue

daring fern
rocky osprey
#

can i force the color on it or

wispy falcon
daring fern
wispy falcon
daring fern
wispy falcon
slim ferry
#

whats so confusing he literally just what to change the check to

#

nothing was said about the info_queue

wispy falcon
#

I'm confused because this doesn't work

[patches.pattern]
target = 'functions/common_events.lua'
pattern = "elseif _c.name == 'Palette' then loc_vars = {_c.unlock_condition.extra}"
position = 'after'
match_indent = true
payload = '''
elseif card.c_cstorm_scorpio then loc_vars = info_queue[#info_queue + 1] = { set = "Other", key = "scorpio_ability" }
'''```
#

Wait...

slim ferry
#

whats the area for boosters in the shop?

daring fern
wispy falcon
daring fern
wispy falcon
#
[patches.pattern]
target = 'functions/common_events.lua'
pattern = 'for _, v in ipairs(info_queue) do'
position = "before"
match_indent = true
payload = '''
if card.c_cstorm_scorpio then loc_vars = info_queue[#info_queue + 1] = { set = "Other", key = "scorpio_ability" } end
'''``` still crashes
daring fern
robust marsh
#

Been trying to make blinds go in a reverse order for the past few days, pretty close to giving up atp droidcry

still cedar
#

Why this error appear?

robust marsh
red flower
#

but honestly i personally wouldn't touch blind stuff until smods adds the functionality

robust marsh
#

I was hoping i could hook into the function which boss blinds use to reset blinds

#

but alas

charred widget
#

Hello friends! I was wondering if you could help me with a few things

#

Wo-Chien here gets 0.1x mult for every spade card in the deck, but the variable isn't updating properly in the joker's description. how can i fix this?

robust marsh
daring fern
hollow mango
#

i'm trying to add a sound but i keep crashing when it tries to play it. i register it like this

SMODS.Sound({
    key = 'collage_dollar_mult',
    path = 'collage_dollar_mult.wav'
})

then i place it in assets/sounds/
and then i call it like this play_sound('collage_dollar_mult', 0.95 + math.random()*0.1, 0.6)

and then it crashes like this:
Could not open file resources/sounds/collage_dollar_mult.ogg. Does not exist.

I don't understand. Isn't it supposed to look in assets? And why is it looking for an ogg when I specified a wav?

daring fern
hollow mango
#

oh mb 💀 i thought it was just a straight up key system and the prefixes were a convention, i guess i never realized

#

tyyyy

slim ferry
#

wh

#

okay thanks discord formatting for breaking my shit

robust marsh
#

mmmm, is there a way to straight up just make it so the small and big blinds dont show up at all

still cedar
#

Why this error appear?

robust marsh
slim ferry
charred widget
#

ah

slim ferry
#

add another } to the end of the return

charred widget
#

ok thank you 🙂

daring fern
still cedar
daring fern
charred widget
slim ferry
robust marsh
charred widget
slim ferry
#

replace count with spades

daring fern
charred widget
slim ferry
#

when did this happen

still cedar
charred widget
robust marsh
slim ferry
#

replace xmultvar with card.ability.extra.xmultvar

charred widget
#

how can i make it so it debuffs a suit?

slim ferry
#

add the following to calculate:

if context.debuff_card and context.debuff_card.area ~= G.jokers and context.debuff_card:is_suit("<suit>") then
  return {
    debuff = true
  }
end
still cedar
#

I did this but appears a new error

robust marsh
daring fern
glossy sky
#

Is there a context, or something akin to do that that checks if another joker becomes debuffed?

wispy falcon
#

Is there something that tells you if a lucky card, glass card or so is going to hit or not?

glossy sky
charred widget
slim ferry
#

hm

#

what does the code look like

charred widget
wispy falcon
# red flower why

I thought that I could use that as the ability of my consumable type

red flower
slim ferry
slim ferry
#

uhhhh fuck

#

do you have anything that makes spades count as clubs

charred widget
#

no but im gonna try something that probably won't work

#

update: it didn't work

wispy falcon
slim ferry
red flower
charred widget
#

but i dont think that changes anything

slim ferry
#

in lua quotes are interchangable yeah

charred widget
#

wait

#

it just fixed itself

slim ferry
#

wh

charred widget
#

i just started a new run and its only debuffing clubs now

still cedar
slim ferry
charred widget
slim ferry
#

thats

#

odd

#

might just be a product of not starting a new run after making changes though

charred widget
#

yeah that's true

wispy falcon
#

How do I make only 5% of the score balanced?

grand iris
#

hello,i need help! basically i use malverk,i am replacing joker sprites but the 1x sprites wont show,the 2x sprites works tho

slim ferry
#

not a default smods feature

grand iris
#

should i send the lua?

#

maybe i messed up something on the code

#

game does not crash so i dont really think so

slim ferry
grand iris
#

yes i do

#

1x folder

slim ferry
#

do they have the same name

grand iris
#

2x folder

#

soo yeah kinda weird,they have the same name

real crown
#

Is there a context for when a Joker is specifically destroyed? Not sold, destroyed by like Sac Knife or Madness
And also have the event trigger inside, as I'm afraid it would no longer trigger if a Joker is destroyed

slim ferry
#

context.joker_type_destroyed i think

grand iris
slim ferry
#

sure

real crown
#

Thank you!

grand iris
charred widget
#

ok the ruin pokemon are mostly working but they're interacting really weirdly when they're spawned and sold

slim ferry
#

its probably some wierd thing i dont know about

grand iris
#

yikes

slim ferry
charred widget
#

i would have to show you directly to actually get across what i'm seeing rn

slim ferry
#

alr

grand iris
#

let me see,and i'll tell you if it works

charred widget
slim ferry
#

i dont even know

#

😭

#

wtf is this

charred widget
#

fuck it we ball ig

grand iris
#

ok still not working

slim ferry
#

like i get it recalculating debuffs when selling

grand iris
#

damn it

slim ferry
#

but why is it doing

#

that

slim ferry
charred widget
slim ferry
#

alr sure

floral marsh
#

hum heya, I am new to balatro modding and I was wondering if there was a way to make the flip effect permanent, after the use of a spectral card

real crown
daring fern
floral marsh
wispy falcon
#

Is the joker area G.jokers?

daring fern
torn vapor
#

Should I make my mod balanced?

#

Wrong channel, my bad.

grand iris
#

this is really weird

#

my game wont crash,so the code is good right??? i dont know what i messed up

#

i checked the pngs and they are the edited ones

#

this is rlly weird

#

ignore the lag on the video,steam recording

timid night
#

how can I use JSON in Balatro?
Im making a meme joker that gives XMult for each user in a voice channel - it all completely works including the requests. But I cant decode the response

if context.setting_blind then
            https.asyncRequest("http://localhost:3000/vc/975100210671919134", UpdateUserCount)
            card.ability.extra.mult_current = vcusercount;
        end

response:
{"name":"vc","memberCount":2}

grand iris
#

this is the 1x spritesheet

#

2x spritesheet

#

so i dont know why its not working

still cedar
#

Why this error appear?

floral marsh
still cedar
slim ferry
#

yeah

#

thats supposed to happen

candid prism
# grand iris

oh uhh for some ungodly reason you have to nest malverk content

grand iris
candid prism
#

this

#

lua.lua is empty simply bc the .json needs a main file

grand iris
#

so i have to make a json?

candid prism
grand iris
#

what should i do then

candid prism
#

i just used one bc its my normal modding process

candid prism
grand iris
candid prism
prisma loom
#

Hi, folks. My teammate is currently on hiatus in terms of Balala coding, so I'm looking for some help

#

If anyone is interested dm me

grand iris
#

is that right

grand iris
#

alright,i'll try

#

can i name the folder anything i want

candid prism
prisma loom
#

forgot to add

grand iris
floral marsh
#

alright I should be able to flip cards before they are drawn thanks

slim ferry
#

what function handles poker hand parts?

charred widget
#

How can I play a sound when a joker is added to your joker slots?

slim ferry
#

use play_sound(<sound key>) in add_to_deck

#

and check for not from_debuff so it doesnt play when undebuffed

charred widget
#

wait is the thing that goes (self, card, context) the check?

slim ferry
#

add_to_deck = function(self, card, from_debuff)

charred widget
#

so would it be
add_to_deck = function(self, card, not from_debuff)

#

play_sound(<sound key>)

slim ferry
#
add_to_deck = function(self, card, from_debuff)
if not from_debuff then play_sound(<sound key> end
end
charred widget
#

and i would add this after calculate?

slim ferry
#

yeah

charred widget
#

ok so there's something specific i wanted to do

#

i wanted it to pause for just a second, then play the sound effect and juice up at the same time

#

would i have to create an event for that?

slim ferry
#

yeah an event would be the way to do that i think

#

since thatll wait for the animation of it moving to the slots

charred widget
#

so if i'm trying to make it a function, would i put SMODS. before play_sound?

slim ferry
#

wdym

#

play_sound is already a base balatro function

charred widget
#

ok

grand iris
slim ferry
#

yes its an unfinished string at line 15 like it says

charred widget
#

ok eris i think i've been hiding something from you

#

i'm trying to use a custom sound

slim ferry
#

if youre using a custom sound then

grand iris
#

fixed the error

#

but now i get this

slim ferry
#

you should probably ask the malverk thread for that

#

since this seems like a malverk specific issue

grand iris
#

the malverk thread is dead

red flower
grand iris
#

HOLY SHIT I FINALLY DID IT

#

AFTER TWO HOURS

#

MY GOD

#

ok basically the x1 sprites shows and i have no crash

#

that's what i was trying to fix

fathom star
#

Hi so im using jokerforge to make sum jokers, and im trying to make a sound play when mult is applied, but it plays when the hand is played instead, what should i do?

wispy falcon
#

Anyone know how to disable this warning? It's starting to get on my nerves

red flower
#

click on quick fix and thenm disable globally

wispy falcon
#

Thank you

broken rivet
#

with hypercam or hyperjimbo

fathom star
shell timber
#

you need to add your own scoring step iirc

broken rivet
strong terrace
#

tried to this custom joker but doesn't work in game. it should give +100 chips if the played hand has only 1 card.

frosty rampart
#

needs to be card.ability.extra.chip_bonus i think

broken rivet
shell timber
#

sure go ahead

#

make the mf_ different probably to avoid double triggering

frosty rampart
wispy falcon
#

How would I make a consumable not highlightable?

broken rivet
real crown
#

Would it be possible to have a Joker that "saves the gamestate" when you buy it, and as long as you don't sell it, you will keep repeating the same ante over and over again, you'll get the same items in the shops, your money will keep resetting to what it was, jokers, joker/planet scaling and the deck itself keeps reverting until you sell that Joker?
I asked something similar in the morning, but that wasn't this deep

frosty rampart
frosty rampart
real crown
#

Thank you for pointing me in a direction!

frosty rampart
#

i'm not sure where it saves the state, but using revert immediately resets the game state to the beginning of the current ante

ocean sinew
frosty rampart
#

you mean like you can't click on it to get the Use and Sell buttons?

slim ferry
#

i imagine you would hook/patch card:click to stop it from being highlighted

broken rivet
frosty rampart
#

yea I don't think anything vanilla uses it
my Dice use it for sure

frosty rampart
# wispy falcon Yes

you should just set [card].states.click.can to false once it's acquired
if it can appear in the shop, that might be a bit tricky, because you want to be able to buy it. but if not, then just do it in the card's set_ability or something

broken rivet
frosty rampart
#

d20 gives +(random number from 1 to 20) Mult before other scoring effects, d100 gives +(random number from 1 to 100) Chips before other scoring effects. they work properly on their own but i'm not sure how they interact with other cards that have initial_scoring_step effects yet

broken rivet
#

ah

#

i'll probably just use initial_scoring_step then

#

morefluff was the inspiration for that joker effect but don't think it needs to be one to one with morefluff lol

wispy falcon
frosty rampart
#

ok yea if it only ever spawns into your consumables slots, do it in the set_ability function

shell timber
frosty rampart
#

yea it's not documented on the calculate functions wiki page yet :3

#

but it was added in 0711

broken rivet
slim ferry
#

initial scoring step is peak

broken rivet
#

i mean granted
i didn't know about context.money_altered and also patched in a custom context for that

slim ferry
#

thats still pretty new tho

frosty rampart
#

i should put together a list of all the contexts for people to be able to reference while eremel is still rewriting the calculate wiki page

i will do that after i eat lunch i think

broken rivet
#

would be nice

wintry solar
#

I was doing some earlier actually!

wispy falcon
#

How would I make a card similar to blueprint but it picks a random joker and does double their amounts? Let's say it picks Even Steven. Instead of giving +4 Mult for even numbers, it would give +8 Mult for even numbers

slim ferry
#

this crash happens when hovering one of my consumables, any idea why?

#

guyse

wispy falcon
robust marsh
#
local old_get_new_boss = get_new_boss
function get_new_boss(self)
    old_get_new_boss(self)

    if G.jokers and G.jokers.cards then
        for _, j in ipairs(G.jokers.cards) do
            if j.config and j.config.center and j.config.center.key == "j_tdec_photoquestion" then
                if G.GAME.round_resets.ante == 0 then
                    return "bl_beast"
                end
            end
        end
    end
end

I'm trying to force a specific blind on ante 0 while a specific joker is held, although the game keeps crashing..

frosty rampart
#

you aren't actually returning anything unless it's ante 0 and you have the joker
do this I think

local old_get_new_boss = get_new_boss
function get_new_boss(self)
    if G.jokers and G.jokers.cards then
        for _, j in ipairs(G.jokers.cards) do
            if j.config and j.config.center and j.config.center.key == "j_tdec_photoquestion" then
                if G.GAME.round_resets.ante == 0 then
                    return "bl_beast"
                end
            end
        end
    end

    return old_get_new_boss(self)
end
wispy falcon
robust marsh
frosty rampart
#

lemme eat lunch and then I can look at the crash

robust marsh
#

enjoy your meal

slim ferry
#

is there a way to disable the animation of cards getting added to the deck? currently with one of my decks you can see an animation of cards being added at the start of the run

frosty rampart
hearty mesa
#

what's the difference between card.config.h_popup and card.config.h_popup_config?

frosty rampart
#

bru
you specifically did "bl_[modprefix]_beast"?

robust marsh
#

holy fuck i forgot that the prefix is supposed to be in between

#

i'm so sorry

wispy falcon
real crown
#

What's the context for all the time? Like one that runs every tick

slim ferry
#

use the update function for stuff that has to happen every frame

real crown
#

Thank you!

keen atlas
#

what thunderstore api should i use to get list of packages from a community

#

found it

robust marsh
#

how would I make a boss blind immune to Luchador or Chicot

slim ferry
#

hook blind:disable()

robust marsh
#

ty

wispy falcon
rotund sable
#

Check if the ability.extra is a number if so double it, if not iterate over it's element's and double the values

#

Optionally you could add a check of sorts

#

For something similar to blueprint_conpat

timid narwhal
#

I’ve got an idea for a Balatro mod and am really hyped to make it, but I’m kinda new to modding. so anyone here interested in like collabing on it maybe?

slim ferry
#

i dont think thatll work for this situation

#

because thats more of a Cryptid.manipulate type deal

rotund sable
#

Oh wait

slim ferry
#

i'd look at how forgery from paperback does it

rotund sable
#

I kinda misread

#

Yeah I basically explained Cryptid.manipulate

#

Maybe oversimplified

hearty mesa
crystal perch
#

how would i get the number of destroyed Jokers this run, or make a function to track that, in order to make an effect like this possible

crystal perch
red flower
hearty mesa
red flower
hearty mesa
wispy falcon
#

Does someone have the mentioned list? I can't find it there

  -- The list of all effects can be found in smods/src/utils.lua:1121
  'chips', 'h_chips', 'chip_mod',
  'x_chips', 'xchips', 'Xchip_mod',
  'mult', 'h_mult', 'mult_mod',
  'x_mult', 'Xmult', 'xmult', 'x_mult_mod', 'Xmult_mod'
}```
red flower
wispy falcon
real night
#

i frogotr

wispy falcon
# real night

G.GAME.current_round.hands_left and G.GAME.current_round.discards_left

hearty mesa
red flower
hard flume
#

Is it possible to give Jokers backs? Do they already have them? Because if the answer to both of those is no, then im gonna have a hard time implementing coin flipping

tawdry kettle
#

Someone can explain me how to download mods in balatro mobile

robust marsh
tawdry kettle
#

?

robust marsh
#

rule 4: "Only PC Modding discussion is permitted - discussion of modding Balatro on other platforms will not be tolerated."

robust marsh
#

anyway uhh does anyone know how I could do win_game() when a specific boss blind has been beaten

tawdry kettle
robust marsh
tawdry kettle
#

My laptop is not working properly I buy the game in for 600 Indian rupees in Play Store

wind steppe
#

how do i patch smods?

robust marsh
wind steppe
#

ty

#

talisman needs to do a better job at patching

robust marsh
wheat jewel
#

I'm trying to make a joker give money if you set your music volume ingame to a randomly generated value, but it never gives it at all, is there a way to fix it?

wind steppe
wheat jewel
#

was doing that to test stuff

wind steppe
#

also you can remove the in_pool

wheat jewel
#

for the music

wind steppe
#

appearing if you dont have a duplicate is the default behavior

wheat jewel
wind steppe
#

rn actually your joker appears even if you have another

#

because of the way in_pool works

#

after the print add print(type(to_number(G.SETTINGS.SOUNDS.music_volume)))

#

let me know what that prints

wheat jewel
#

like this?

wind steppe
#

yup

wind steppe
#
[[patches]]
[patches.pattern]
target =[SMODS _ "src/utils.lua"]
pattern = "if args.operation == '-' and scalar_value < 0 then scalar_value = scalar_value * -1 end"
position = 'at'
payload = "if args.operation == '-' and to_big(scalar_value) < to_big(0) then scalar_value = scalar_value * -1 end"
match_indent = true

gives me

robust marsh
wheat jewel
wind steppe
robust marsh
#

mb for not pointing that one out

wind steppe
#

replace SOUNDS with SOUND

wheat jewel
#

not from the command menu by pressing /

wind steppe
#

did you save your lua file

#

try running the print in debugplus as well

wheat jewel
#

I did yes

wheat jewel
wind steppe
#

what if you just print G.SETTINGS.SOUND.music_volume

wind steppe
#

the debugplus console

wheat jewel
#

ohhh

#

lemme try that

#

wait a minute i gotta figure out the print command first

wind steppe
#

just eval and then put the code after it

#

like eval print(G.SETTINGS.SOUND.music_volume)

wheat jewel
#

maybe imma try eval print(to_number(G.SETTINGS.SOUND.music_volume))

wind steppe
#

yeah do that

wheat jewel
#

still nil

#

that's the issue then

wind steppe
#

so thats probably not how you get the volume then

robust marsh
#

How would I remove the endless button under a specific condition?

wheat jewel
#

there might be something about it in the SMODS documentation

#

if i'm not mistaken

wind steppe
wind steppe
#

thats why i was replying to someone else

wheat jewel
#

my baddd

#

i thought you replied to me for sec

#

got distracted with somethin

wind steppe
#

how would i get a joker to show a message without returning?

robust marsh
real crown
#

Is it possible to replace the default Jimbo with something else for a custom rarity?
So if the pool runs out of cards, it will keep giving that one Joker

wind steppe
#

what sound is typically played on retrigger?

sturdy finch
dapper sun
#

i don't think this is right 😭

#

how do i add a 3rd node thingy

#

okay i figured it out

#

this looks so scuffed i love it

wind steppe
#
        elseif context.individual and context.cardarea == G.play and not context.blueprint then
            local scaled = false
            if context.other_card:get_id() == 9 then -- Check for triggered nines
                card.ability.extra.nine_counter = card.ability.extra.nine_counter - 1
                scaled = true
                if card.ability.extra.nine_counter <= 0 then
                    SMODS.scale_card(card, {
                        ref_table = card.ability.extra,
                        ref_value = "planet_retrigger",
                        scalar_value = "planet_retrigger_growth",
                        scaling_message = {
                            message = localize('k_upgrade_ex'),
                            colour = G.C.SECONDARY_SET.Planet,
                            message_card = card
                        }
                    })
                    card.ability.extra.nine_counter = card.ability.extra.nine_requirement
                end
            end
            if SMODS.has_enhancement(context.other_card, 'm_lucky') then -- Check for Lucky Cards
                SMODS.scale_card(card, {
                    ref_table = card.ability.extra,
                    ref_value = "x_probability",
                    scalar_value = "x_probability_growth",
                    scaling_message = {
                        message = localize('k_upgrade_ex'),
                        colour = G.C.GREEN
                    }
                })
                scaled = true
            end
            if scaled then return nil, true end

why do the messages occur before the playing card itself scores?

feral tree
#

Is there a easy way to detect when you've clicked on a joker?

ocean sinew
slim ferry
#

or just

#

hook card:click()

ocean sinew
#

ctrl v ctrl c my function

#

and give me credit

#

😎

slim ferry
#

🤷

#

alr

ocean sinew
#
local l_click = Card.click
function Card:click(...)
local c = l_click(self,...)

if G.deck then
SMODS.calculate_context{
    card = self,
    mod_prefix_card_clicked = true,
    area = self.area,
}
end
return c
end
round lion
#

how do i make something only appear if theres a specific mod installed

slim ferry
#

use the dependencies field for that

obtuse silo
#

how would i make text update on a card?

round lion
slim ferry
#

In the object defintion if youre doing it for individual objects

obtuse silo
#

actually
more pressing matter
Am I able to store arrays in a card's config?

slim ferry
#

Yeah

#

extra is already a table itself

#

Tables can be stored anywhere just fine

wanton valley
#

Hi, how do you have like a 1 in 2 chance for a card to activate (give a multiplayer etc.)

umbral zodiac
#

more importantly, extra extra do not store a card in a joker's config

spring gyro
umbral zodiac
#

it wont instantly cause issues but its unstable and generally very unrecommended

winter flower
wanton valley
obtuse silo
#

well
this worked just fine for the effect i'm trying to get
only problem is that the countdown number doesn't update

#

simply put
without putting a table in config
there's simply just no way of getting the effect i want (a buff when ten unique ranks are played in straights)

#

since having the declaration in the calculate function just resets it

hard flume
#

What size are individual blind sprites again?

umbral zodiac
#

yea, 34x34 (at 1x scale obv)

wanton valley
#

is there a way to look at vanilla jokers' code but in the SMODS format?

umbral zodiac
wanton valley
umbral zodiac
#

😭

umbral zodiac
obtuse silo
#

oh

slim ferry
#

Why do tables store just fine in G.GAME but not in cards

#

That seems wierd

umbral zodiac
#

shrug

#

they could work fine in cards and its just a bit of a bad practice to do so unless you need to

#

i won't be the first to admit i know nothing about if it actually causes issues but
knowing the game's saving i wouldnt be surprised if it didn't like storing a table

#

ive just heard to not do it so i dont personally

obtuse silo
#

works just fine

#

i exited and re-entered the run and the list saved

slim ferry
#

I mean i know functions cant be saved

#

Same with objects

umbral zodiac
#

yeah

slim ferry
#

Because of data storage shit

umbral zodiac
#

i guess someone confused an object for a table when they were claiming that putting a movable or its descendants into a card was evil

slim ferry
#

I remember being told that saving tables at all was like evil n shit

umbral zodiac
#

and then i just never bothered to learn more because i never needed a table for storing something for a joker

#

i still think its bad practice but if you have to its probably fine

obtuse silo
slim ferry
#

Actually if you cant store tables in cards then Cryptid.manipulate wouldnt need to be recursive

#

So its probably fine

stuck yew
obtuse silo
#

ah thanks-

stuck yew
#

also, technically speaking, you don't need countcards. you can just do 10 - #card.ability.extra.numberarray as the 2nd locvar. unless you're using countcards for more than just that

obtuse silo
#

very helpful

loud citrus
#

I want to update my mod, but github is making me add 2FA. Any suggestions on what to use?

red flower
#

card.ability.extra is a table

red flower
umbral zodiac
#

idk it feels bad to put a table there since 99% of the time you dont need them anyway

red flower
#

imo it's better practice to have poker_hands = { "High Card", "Pair" } than poker_hands_1 = "High Card", poker_hands_2 = "Pair"

hard flume
#

How would I go about doing a 50/50 chance again? I forgot since last time I tried modding full time

umbral zodiac
#

i mean im not saying to expand out a table into individual elements thats obviously stupid im just saying if you can i think its better to avoid a table in the first place

umbral zodiac
# red flower why

i do not have an answer for you that isnt just already what i said above
and i also have to go so iwill probablky not be able to reply again for a while

spring gyro
obtuse silo
#

would I specify K for King or 13 for King?

wind steppe
obtuse silo
#

Seems to be the case
I was just formatting it wrong

#

Needed to format like {id = 'K'}, instead of 'K', 'Q', 'J'

#

doesn't seem to have worked

#

i swear i'm doing this right

real night
#

do challenges have calculate functions

red flower
real night
frosty rampart
azure flicker
#

Hiii, im new here in the modding side of balatro, and overall modding and i wanted to know what should i learn, or do, or anything

#

im really lost and don't know where to start

#

i'm not even sure if this is where i should be asking this

frosty rampart
azure flicker
#

oh, ok, thanks a lot!

wind steppe
#
        elseif context.individual and context.cardarea == G.play and not context.blueprint then
            local scaled = false
            if context.other_card:get_id() == 9 then -- Check for triggered nines
                card.ability.extra.nine_counter = card.ability.extra.nine_counter - 1
                scaled = true
                if card.ability.extra.nine_counter <= 0 then
                    SMODS.scale_card(card, {
                        ref_table = card.ability.extra,
                        ref_value = "planet_retrigger",
                        scalar_value = "planet_retrigger_growth",
                        scaling_message = {
                            message = localize('k_upgrade_ex'),
                            colour = G.C.SECONDARY_SET.Planet,
                            message_card = card
                        }
                    })
                    card.ability.extra.nine_counter = card.ability.extra.nine_requirement
                end
            end
            if SMODS.has_enhancement(context.other_card, 'm_lucky') then -- Check for Lucky Cards
                SMODS.scale_card(card, {
                    ref_table = card.ability.extra,
                    ref_value = "x_probability",
                    scalar_value = "x_probability_growth",
                    scaling_message = {
                        message = localize('k_upgrade_ex'),
                        colour = G.C.GREEN
                    }
                })
                scaled = true
            end
            if scaled then return nil, true end

why do the messages occur before the playing card itself scores?

unreal wedge
#

Hello! I am working on a mod (it is currently in fairly early progress but already in a state where it adds enough content to be unique) and was just curious on best ways to publish it

wet crag
#

Oh, and the Balatro Modding Wiki. You can post a link to your GitHub there along with info about your mod.

unreal wedge
#

Thanks!

#

Btw one more thing does uploading it to Nexus work too? Cause I've never used GitHub before so Nexus would probably be a bit easier to me

wet crag
unreal wedge
#

Ah gair

#

Fair*

unreal wedge
wooden nexus
#

Question: Does anyone know where the code for the pre-existing stakes are?