#💻・modding-dev

1 messages · Page 479 of 1

short apex
idle plaza
#

Should be fine.

short apex
#

alr

pure salmon
#

this crashes for some reason

#

is it supposed to be context.debuff_card and not context.other_card?

red flower
#

yes

pure salmon
#

ok

#

odd that doesn't apply to stay_flipped but whatever

#

is_face always returns false on debuffed cards apparently

#

any way to get around that

red flower
#

i think it has an argument for that

#

not sure

#

yeah it does

#

card:is_face(true)

vague crest
#

is it possible to replace booster packs with a different booster pack via the same method?

red flower
vague crest
#

ohhh true i could just tick a variable up each time ones removed

sullen brook
#

Anyone know how to identify whether the blind just completed is the 8th ante boss blind?

#

I'm using G.GAME.blind.config.blind.boss.showdown but I think this is incorrect

red flower
#

G.GAME.blind.showdown also works but i think that's correct, why?

pure salmon
#

why do cards flipped like this not unflip before the hand scores (joker, not a blind)

red flower
#

because you're not checking the card area so they also stay flipped from G.hand to G.play

#

context.to_area == G.hand

sullen brook
red flower
#

context.main_eval

it's destroying cards because you're returning true at the end, remove that

#

(to answer the comment in your screenshot context.end_of_round is called on each card in hand to trigger end of round effects like gold cards with mime)

sullen brook
cinder whale
#

a

red flower
sullen brook
red flower
#

i was about to say that haha

sullen brook
#

Eh, that's supposed to be a 7

#

Hold-over from tinkering with flavor ideas as opposed to functional ones

#

I get a crash on round completion. Seems it doesn't like the 'main' in my context.mail.eval check? Gonna look over the documentation again, I'm missing something...

red flower
#

i already said it

#

context.main_eval

sullen brook
#

Oh, ok got it. I missed that on the first pass

#

I think some digging around the vanilla files may be in my near future.

red flower
#

I recommend checking out vanillaremade if you haven't already

sullen brook
#

That remakes everything with SMODS capabilities, correct?

red flower
#

yes

bitter portal
#

why is it called smods/steamodded anyways

red flower
#

the person who made it is steamo

#

so steamo + modded

bitter portal
#

ah

final jewel
#

How am I supposed to add +1 choice to a specific type of consumable pack

hybrid shadow
#

how do i set a card to be eternal in its code again

red flower
#

card:set_eternal(true) iirc

lament agate
#

card.base.suit is a variable right

red flower
#

it's a string yes

lament agate
#

for some reason, it only decreases the chips not the xchips

sullen brook
#

G.playing_cards is the reference to the entire deck, right?

urban wasp
#

why do my config options not save after a reload
i have a config.lua

hybrid shadow
#

so it would seem that add_to_deck does not work with tarots

either that or the args are different from how they are on jokers

#

or card:set_eternal(true) doesnt actually make the card eternal

red flower
#

does eternal work with tarots

hybrid shadow
#

good question

#

i do not know

#

the major point of making it eternal is so it cant be sold

red flower
#

i dont think so by default

hybrid shadow
red flower
#

i can do it for you if you want

#

as an example

hybrid shadow
#

alr

#

thank you

foggy ginkgo
#

My challenge name isn't working

#

I did the localization thing too

red flower
red flower
foggy ginkgo
hybrid shadow
foggy ginkgo
#

Here's the key

red flower
hybrid shadow
red flower
red flower
foggy ginkgo
#

Oh

#

That actually makes sense

red flower
#

it will be c_nic_c_nic_incognito otherwise

foggy ginkgo
#

That makes so much sense

#

And to think I was cooking

red flower
foggy ginkgo
#

How does the custom roles work

hybrid shadow
red flower
#

card for self

foggy ginkgo
#

This little text

hybrid shadow
#

oh i see

foggy ginkgo
#

Yummy

hybrid shadow
#

ok, i do need to make it manually return a message it seems

red flower
#

wdym

hybrid shadow
#

ok so the actual function is returning an xmult value but the message part of that xmult return doesnt work? unless the game automatically doesnt give the message if the xmult value is 0

red flower
#

it doesnt

#

but it still calculates it which is weird

hybrid shadow
#

so my alternate question here is, can i make a message in the localization file and use #1# in that localization file to use the card's loc_vars in the message

#

or i can probably just do the regular value in the message anyway since its probably gonna be the only card that does x0 mult

hybrid shadow
#

i know where messages go, i just didnt know if you could customize them to use the card's loc_vars

red flower
#

yeah i mean that messages with variables are specifically in v_dictionary, not just dictionary

hybrid shadow
#

oh ok

#

whats the xmult sound name

foggy ginkgo
#

How do I do editions on challenges

#

Nevermind I figured it out

dire totem
#

Is there an easy to understand github build or something for making jokers, card editions, seals, etc

gray void
#

Is there an example of joker triggers when a keyboard's key is pressed?

hybrid shadow
daring fern
vague crest
#

how would i define something as a boolean without giving it a value right away?

vague crest
#

when i add a local variable in the calculate function i

#

actually wait can i just set it to false and itll only be false that one time

#

my thinking was that it would set it back to false like constantly but i realize idk if thats actually true

daring fern
vague crest
#

i guess in this case it could totally just be a joker variable actually yeah

bold gyro
#

i'm trying to hook evaluate_poker_hand in order to make the played hand always contain a Two Pair. I've used code from Cryptid's Exploit's old effect. It almost works, but the game doesn't intuit that played hand must contain a Pair if it contains a Two Pair. Also, the game assumes played hand was originally a High Card if a Pair is played, and makes one of the cards in the pair unscoring. What should I do?

local evaluate_poker_hand_ref = evaluate_poker_hand
function evaluate_poker_hand(hand)
  local results = evaluate_poker_hand_ref(hand)
  if next(SMODS.find_card("j_picubed_weemini")) then
    local count_2 = 0
    for k,v in ipairs(G.hand.highlighted) do
        if v:get_id() == 2 then 
            count_2 = count_2 + 1
        end
    end
    for k,v in ipairs(G.play.cards) do
        if v:get_id() == 2 then 
            count_2 = count_2 + 1
        end
    end
    for k,v in ipairs(G.hand.cards) do
        if v:get_id() == 2 then
            count_2 = count_2 + 1
        end
    end
    if count_2 > 0 then --important bit starts here
      if not results["Two Pair"][1] then
        results["Two Pair"] = results["High Card"]
      end
    end
  end
  return results
end```
rapid stag
#

chat, remind me how i use SMODS.add_card to add a specific card when i have a key in mind cirDerp i forgot

bold gyro
#

iirc SMODS.add_card({ key = "insert_key_in_mind_here" })

sturdy compass
#

yeppers

sonic cedar
#

i know you can just leave key unspecified if you want a random card from the provided set, but if i set it to like key = not 'specifickey' would that work

sonic cedar
#

cool thanks

#

long way it is

daring fern
#

That would just be key = false

sonic cedar
daring fern
sonic cedar
#

ohhh ok

sonic cedar
daring fern
daring fern
wise walrus
#

Trying to see any solutions to my "attempt to perform arithmetic on a nil value" in chat history and not seeing much, anyone have ideas? Only happens when going to the shop. I almost want to assume you have to have some type of booster pack for consumables but i could be wrong

#

i can follow up in the morning on this, definitely not staying up till 3am or something for what could be a small fix lol

scarlet imp
#

is it because shop_rate is 0? maybe its required to be nonzero?

wise walrus
#

Even with shop rate of 2 or a decimal still causes it

#

As a test I wanted to create a consumable rarity that’s similar to Spectrals and only appears under certain conditions

#

just for extra context as well, I only have 2 consumables in this and they’re copies of each other. difference being the 2nd copy doesn’t have the pool=. issue happened even with one

scarlet imp
#

never gotten this one before

daring fern
scarlet imp
#

is this because of the new probability changes?

tepid crow
#

sure sounds like it

scarlet imp
#
SMODS.Joker:take_ownership("business",
    {
        config = {
            extra = {
                odds = 2,
                dollars = 2
            }
        },

        loc_vars = function(self, info_queue, card)
            if BI.has_reroll_item() then
                local text = BI.generate_pool_text(card)
                info_queue[#info_queue + 1] = {
                    set = "Other", key = "item_pool", vars = {
                        text.is_modded,
                        text.rarity,
                        colours = {
                            text.colour
                        }
                    }
                }
            end
            return {
                vars = {
                    G.GAME and G.GAME.probabilities.normal or 1,
                    card.ability.extra.odds,
                    card.ability.extra.dollars
                }
            }
        end,
        
        calculate = function(self, card, context)
            if context.individual and context.cardarea == G.play and
                context.other_card:is_face() and
                pseudorandom("business") < G.GAME.probabilities.normal / card.ability.extra.odds then
                G.GAME.dollar_buffer = (G.GAME.dollar_buffer or 0) + card.ability.extra.dollars
                return {
                    dollars = card.ability.extra.dollars,
                    func = function()
                        G.E_MANAGER:add_event(Event({
                            func = function()
                                G.GAME.dollar_buffer = 0
                                return true
                            end
                        }))
                    end
                }
            end
        end
    },
    true
)
#

just business card, but I had to change the loc_vars

#

none of what I added messes with the card's functionality, and this crash only occured when I played a hand, so I think I'm just using a non-updated version of this card's code from Vremade

vague crest
#

is there a context for checking cards played and not just scored?

#

like a context that includes unscored cards

vague crest
#

alright, what is it?

daring fern
vague crest
#

ohhh its just including both i see gotcha

#

ty

scarlet imp
#

still getting the crash

#
loc_vars = function(self, info_queue, card)
  if BI.has_reroll_item() then
      local text = BI.generate_pool_text(card)
      info_queue[#info_queue + 1] = {
          set = "Other", key = "item_pool", vars = {
              text.is_modded,
              text.rarity,
              colours = {
                  text.colour
              }
          }
      }
  end
  local numerator, denominator = SMODS.get_probability_vars(card, 1, card.ability.extra.odds)
  return {
      vars = {
          numerator,
          denominator,
          card.ability.extra.dollars
      }
  }
end,

calculate = function(self, card, context)
  if context.individual and context.cardarea == G.play and
      context.other_card:is_face() and
      SMODS.pseudorandom_probability(card, "business", 1, card.ability.extra.odds) then
      G.GAME.dollar_buffer = (G.GAME.dollar_buffer or 0) + card.ability.extra.dollars
      return {
          dollars = card.ability.extra.dollars,
          func = function()
              G.E_MANAGER:add_event(Event({
                  func = function()
                      G.GAME.dollar_buffer = 0
                      return true
                  end
              }))
          end
      }
  end
end

I changed loc_vars and calculate to this

final jewel
#

Did I do the good thing ? Cause it seem to not work

urban wasp
#

my config isn't saving after closing the game. i have a config.lua file that should be right (attached below). what could be the issue?

return {
    ["HTTPS"] = true,
    ["music_all"] = true,
    ["music_mythic"] = true
}
daring fern
#

Also your missing the mod prefix and class prefix.

final jewel
#

how did I forgot such a thing

frigid cargo
#
create_card = function(self, card, i)
        ease_background_colour(HEX("ffac00"))
        return SMODS.create_card({
            set = "Batrocities",
            area = G.pack_cards,
            skip_materialize = true,
            soulable = false,
        })
    end,
    select_card = 'jokers',

    in_pool = function() return true end

why doesnt the jokers have any extra stuff like eternal even when the stakes are higher?

scarlet imp
frigid cargo
#

oh i thought it would just do that normally depending on the stake

#

thanks

#

do i have to create an if statement if stake is this or what?

frigid cargo
#

oh, then what do i do?

daring fern
frigid cargo
#

wdym? change set to Joker?

#

like do i change set = "Batrocities", to Joker = "Batrocities",?

urban wasp
frigid cargo
chrome widget
vague crest
#

ooh thats sick

chrome widget
#

Basically there's a persistent issue with both the background and (a failed attempt at) the UI colors

urban wasp
#

yeah

#

looks great to me though

#

i'm unsure if somebody's done this better, if at all

frigid cargo
chrome widget
#

Because they assign the individual values in the table of whatever passed in color as targets to ease R, G, and B individually, it means that they don't respect gradients unless you manually assign the Gradients to wherever the colors are stored. Then you have to make sure to change them back when you want to lose the gradient mode, because if those tables are still referencing the gradients, the update of the gradient will just overwrite them and persist

chrome widget
#

Same issue with the UI, though that one seems even weirder and I haven't figured out why it doesn't work. It keeps just setting it to black

frigid cargo
scarlet imp
#

wait hol up

#

make a list of possible stickers actually

#

since on the SMODS wiki it looks like it adds stickers depending on a table you pass to it

void sparrow
#

hey, um dumb question, can someone send me the page of the smods wiki with pseudorandoms, like 1 in 4 chance?

urban wasp
scarlet imp
#
create_card = function(self, card, i)
    ease_background_colour(HEX("ffac00"))
    return SMODS.create_card({
        set = "Batrocities",
        area = G.pack_cards,
        skip_materialize = true,
        soulable = false,
        stickers = {
          --possible stickers here
        }
    })
end
scarlet imp
daring fern
urban wasp
# void sparrow oooh okay thank you!

if you want it to be attached to odds (e.g. affected by oa6s and value manip from other mods), then do

if pseudorandom("bingbong") < (G.GAME.probabilities.normal / card.ability.extra.odds) then

where card.ability.extra.odds is (presumably) 4

scarlet imp
void sparrow
scarlet imp
#

I’m not at my computer anymore so I can’t check, but I’m sure there’s a table in either the source code or SMODS with the stickers inside. Find that, and use pseudorandom_element or something similar to get a random sticker. Something like that should work

frigid cargo
#

Ok thanks

void sparrow
#

so i tried to test a bit with odds and pseudorandoms and each time i spawn in the joker it crashes with this error

daring fern
void sparrow
#

im guessing that the joker tries to add mult but because no hand was played it crashed???
but the context is final scoring step

#

ooooooooooh

#

thats a mistake i'll make again, so im commenting that

gray void
#

Now to somehow make a joker free roam-

merry frost
#

Hey there, still having trouble with playing Boss Blinds before I'm supposed to. The issue I'm having is that the UI refreshes when I don't want it to. I have patched Ante increasing, I just need to stop the UI from resetting the blinds. Here are my patches

#
# Prevent Boss Blind from increasing Ante if it is not the last round of an Ante
# TODO: Fix Blinds refreshing when a Boss Blind is beaten before it usually is, the below doesn't work
[[patches]]
[patches.regex] # Double escape
target = 'functions/state_events.lua'
pattern = 'G\\.RESET_BLIND_STATES = true' # Line 94
position = 'at'
match_indent = true
times = 1
payload = """if BlindStation.FUNCS.get_current_blind_type() == 'Boss' then
    G.RESET_BLIND_STATES = true
end"""

[[patches]]
[patches.regex] # Mid-line match, double escape
target = 'functions/state_events.lua'
pattern = "G\\.GAME\\.blind:get_type\\(\\) == 'Boss'" # Multi-line from line 111
position = 'at'
match_indent = true
payload = "BlindStation.FUNCS.get_current_blind_type() == 'Boss'"

[[patches]]
[patches.regex] # Mid-line match, double escape
target = 'functions/state_events.lua'
pattern = 'G\\.GAME\\.round_resets\\.blind == G.P_BLINDS\\.bl_small' # Multi-line from line 258
position = 'at'
match_indent = true
payload = "BlindStation.FUNCS.get_current_blind_type() == 'Small'"

[[patches]]
[patches.regex] # Mid-line match, double escape
target = 'functions/state_events.lua'
pattern = 'G\\.GAME\\.round_resets\\.blind == G.P_BLINDS\\.bl_big' # Multi-line from line 260
position = 'at'
match_indent = true
payload = "BlindStation.FUNCS.get_current_blind_type() == 'Big'"
#
---Returns the current Blind type.
---@return string str The current Blind type, either 'Small', 'Big' or 'Boss'.
BlindStation.FUNCS.get_current_blind_type = function()
    return G.GAME.blind_on_deck or 'Small'
end
#

The bottom three patches are fine, it's the top one that I'm not sure about.

vague crest
#

if i wanted a joker to display 0 if the number is negative instead of displaying the negative number, whats the process for setting that up?

vague crest
#

is it just like, before the whole definition in brackets or something

daring fern
vague crest
#

am i on the right track here? laugheline

daring fern
vague crest
#

ohhhhh

#

YESSS got it working i understand what its asking of me now

molten musk
#

hello

#

i have a question, if i want to change a consumable effect, like add a second conditional effect on top on the original one, do i need to use lovely injection or just do it normally?

manic rune
#

either take_ownership or hook to its calculate

molten musk
#

how do i do that? cant find it in smods docs?

daring fern
molten musk
#

just to make sure, this will modefy the whole code? so i need to add the original code if i want it to do the original effect?

#

@daring fern do i use calculate or loc_var for consumables here?
cause i know consumables use loc_var normally

molten musk
#

so its use = function(...,...,...)

daring fern
molten musk
#

...,...,... were just for faster typing

#

haha, next time i'll write in full

void sparrow
#

what context should i use to make my joker blueprint it?
there's context.post_trigger but i don't know how to use context.other.card to select the specific joker on the left

molten musk
#

i know its somewhat wrong, can i get some help @daring fern

rare phoenix
#

hey so might be a dumb question but im VERY new to modding balatro and lua as a whole so idk but uh whats the function for +mult

rare phoenix
#

mb

daring fern
molten musk
#

i know that card.othercard doesnt exist

#

how do i hook?

daring fern
daring fern
molten musk
merry frost
#

Ok, so I've looked into it, and it doesn't seem like the first patch I put in is even necessary. Something else is causing the UI to behave weirdly when beating Bosses out of order.

#

The target of my attention might be create_UIBox_blind_choice()... I have to find a way to stop it from ignoring the true state of the game

manic rune
#

where is the key of a card's enhancement located

daring fern
manic rune
#

oh, thanks

merry frost
#

I've narrowed it down a little

lament agate
#

still needed a help on something

merry frost
#

G.GAME.round_resets.blind_states seems to be a culprit

lament agate
#

why isnt the xchips decreasing

merry frost
#

What in the code is setting Big to Current?

median veldt
#

how would I do stuff if any probability fails

#

like for example

#

gain mult every time wheel of fortune fails (not specifically wheel of fortune, just yk)

rotund sable
#

I've done wheel of fortune using patches

median veldt
#

hmm

daring fern
median veldt
#

elaborate

#

also also is there a context to do something at the beginning of a round rather than every hand

#

context.setting_blind?

daring fern
lament agate
#

@manic rune @daring fern if i wanted to split Luas for jokers, do i have to do something first before splitting it?

daring fern
manic rune
rotund sable
lament agate
#

so i dont have to worry its not loading because its already in the same mod folders?

rotund sable
#

No?

daring fern
rotund sable
#

Was calculate_context added on dev?

daring fern
rotund sable
#

Then wdym

#
[[patches]] # https://github.com/thefaketh30ne/grab-bag/blob/main/lovely/jokers.toml#L8-L16
[patches.pattern]
target = "card.lua"
match_indent = true
pattern = '''G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.06*G.SETTINGS.GAMESPEED, blockable = false, blocking = false, func = function()'''
position = "before"
payload = '''
SMODS.calculate_context{wheel_of_fortune_fail = true}
'''
manic rune
#

anyone knows the code/function that creates multi boxes so i can implement them here 🤔

daring fern
daring fern
rotund sable
#

I was talking strictly about wof

manic rune
#

wuh

#

spacer?

lament agate
#

i dont know to implement it horizontally, i implemented my spacer vertically

manic rune
#

oh nevermind i think i figured it out, thanks

lament agate
#

yeaahh

median veldt
#

I have no idea what I'm doing
Trying to debuff a random hand

#

card.ability.extra.hand = eligible_hand.name this just sets it so you can see what the hand is on the card

#

i dont think it works like that tho

merry frost
#

Is there a way I can copy the blind so that I can safely change one state without affecting all others?

#

Even commenting that out hasn't helped...

manic rune
plain gazelle
#

what condition should I use to check if specifically a, for example Celestial pack was skipped? I tried using the context.card too, it didn't work

tawdry oriole
#

is there a way to modify the current scored chips with a joker? (i tried changing hand_chips in a return like you would for chips but that didn't do anything)

median veldt
tawdry oriole
#

yeah

gilded blaze
tawdry oriole
#

wait i got an idea

gilded blaze
#

smods already provided multi box support

manic rune
gilded blaze
manic rune
#

but all of my jokers are using generate_ui because of paging stuff

median veldt
#

i personally wpuld do like
chips = 35 - chips
for example
i believe that will work idk tho

manic rune
median veldt
#

try it

tawdry oriole
#

on it o7

gilded blaze
#

btw

#

generate_ui is what smods wants your function name to be

#

the vanilla function is called generate_card_ui

manic rune
#

neeevermind, figured it out

daring fern
gilded blaze
manic rune
#

mhm, turned out i just needed to add AUT = full_UI_table to the localize functions

tawdry oriole
#

what does lenient_bignum() even do?

wise walrus
merry frost
#

I am totally stumped. I think I might need someone to look over my entire code. This Blind replacing thing just isn't working out how I'd like it to...

lament agate
#

is copy_card a thing

gilded blaze
#

it's a function

lament agate
#
calculate = function(self, card, context)
        if context.after and context.poker_hands and not context.blueprint and #context.scoring_hand > 0 then
            local min_rank, max_rank = 14, 0
            for _, c in ipairs(context.scoring_hand) do
                local id = c:get_id()
                if id < min_rank then min_rank = id end
                if id > max_rank then max_rank = id end
            end

            local target_rank = pseudorandom('chaos_mirror') < 0.5 and min_rank or max_rank

            local cards_to_swap = {}
            for _, c in ipairs(G.playing_cards) do
                if c:get_id() == target_rank and not c.debuff then
                    table.insert(cards_to_swap, c)
                end
            end

            if #cards_to_swap >= 2 then
                local new_rank = pseudorandom_element(
                    {1,2,3,4,5,6,7,8,9,10,11,12,13}, 
                    pseudoseed('chaos_mirror_rank')
                )
                
                for _, c in ipairs(cards_to_swap) do
                    c:set_id(new_rank)
                end
                
                return {
                    message = (target_rank == min_rank and "Low" or "High").." cards → "..localize(new_rank, 'ranks'),
                    colour = G.C.PURPLE
                }
            end
        end
    end
}
#

will this works?

rare phoenix
#

how would i make a joker that has a really long message before giving mult

wintry solar
merry frost
#

I'm not clear on what exactly you're adding

wise walrus
#

now i can move onto seeing how to call the square sparkle effect used in booster packs/jimbo win and loss screen

wintry solar
# merry frost I'm not clear on what exactly you're adding

To sum it up very briefly, I’ll be adding primarily the option to create custom small and big blind options, similarly to how you can currently create boss blinds, but as part of that there will be all the necessary util stuff so that you can effectively play and blind in any slot and it won’t break

maiden phoenix
#

(spoilers it will break)

wintry solar
#

-# pls no

tepid crow
#

it's the smods way

wintry solar
#

At least most of this code will be well tested

#

It’s been in the ortalab dev build since February 🤣

rotund sable
#

is there a number equivelent of Card:is_face() ?

royal ridge
#

Card:get_id() or nothing unfortunately

#

quantum ranks when

rotund sable
red flower
#

not Card:is_face()?

rotund sable
#

don't think Ace is a number card

royal ridge
#

i mean you can logically just do if not card:is_face() and card:get_id() ~= 14 then

#

but hardcoded

rotund sable
#

🤔

royal ridge
#

works for all vanilla stuff

paper elbow
#
local deck_standard = SMODS.Sprite:new("cards_1", "", "8BitDeck_opt2.png", 71, 95, "asset_atli")
local deck_hc = SMODS.Sprite:new("cards_2", "", "8BitDeck_opt2.png", 71, 95, "asset_atli")

deck_standard:register()
deck_hc:register()

What am I doing wrong?

royal ridge
#

smods sprite is completely unused i believe

#

i don't remember if 0.9.8 compat exists anymore

paper elbow
#

Hmm'k. Well I was basically just lazily copy-pasting code from the DarkMode mod, so I really shouldn't be surprised.

#

But how do I go about swapping out the default deck?

#

Like, the suits, I've already got the backs working with Malverk

gaunt phoenix
#

I want to add 2 stone card into my deck, but that isn't working (create a Stone card on a random place on the screen) anybody know why ?

#

(pls ping me)

royal ridge
#
SMODS.Atlas({
    key = "cards_1",
    path = "8BitDeck_opt2.png",
    px = 71,
    py = 95,
    raw_key = true,
})

@paper elbow i think this is correct formatting, just can't find where exactly the atlas name is defined so i took it from your snippet

royal ridge
paper elbow
royal ridge
#

ok found it, the atlas to replace is cards_1 and cards_2 yeah

paper elbow
#

👍 Yeah, I'd just tested it and it succeeded. tysm!

#

It's definitely still pretty rough looking, but this is essentially the desired result. The card back is from the Dark Mode mod

royal ridge
#

neato

paper elbow
#

Yeah. Still a lot to do to make my deck skin work. Not sure how to go about doing the outline. I'll show you what I mean

#

The "Balatro Black" is simply not legible on jet black cards.

#

But I want these skins to work on white and black cardbacks equally. Haven't thought of a good solution yet.

#

A possible solution is to make the text and frames the suit colour.

royal ridge
paper elbow
#

I thought about that. It's what I was originally going to do, even.

#

But I also felt it was kinda eh

royal ridge
#

if you've got absolutely no solutions gfx wise, you could just create 2 versions and hook into get_front_spriteinfo to display them when you want to

paper elbow
#

That's fair. Right now, I'm going to keep thinking on it

#

I gotta go lay down now though, I need sleep and I have a really bad headache. Thanks for the help.

royal ridge
#

gn

ripe jacinth
#

does anyone have templates for making joker cards

#

i wanna make an absolutely god awful "adding all the bad ideas of jokers in my head" mod

bitter portal
#

redoing pickle jar joker sprite...

nova torrent
#

theres a post titled "A (Hopefully) Comprehensive Guide to Joker Art"

lofty sand
#

is there any way to change the text on a joker when a specific context is called? not like displaying the config in the descrtiption, like changing the entire description

nova torrent
#

i want to say that im still relatively new to modding, but the thought that i had was
define different versions of the text in the "misc" portion of a loc file, and depending on the state, call localize to get the text you want, which you can send through a variable to the card itself's localization

#

if that makes any sense ^^;

long sun
#

wondering, is it possible to put booster packs in a booster pack, and have them be openable and all that? ^u^

honest birch
#

i hope this isnt a handholding type of question but could anyone point me to a good example of how to use PokerHandParts? i cannot figure out how to add a basic six of a kind hand and right now im stuck at literally crashing while selecting cards

#

all i know is that the "hand" argument spits out a table of all cards in a given played hand

errant fulcrum
#

So I have this code that I copied from the example to add a custom seal

    set = "Spectral",
    key = "testsigil",
    name = "Test Sigil",
    config = {
        -- How many cards can be selected.
        max_highlighted = 1,
        -- the key of the seal to change to
        extra = 'leshys_corpseeater',
    },
    loc_vars = function(self, info_queue, card)
        -- Handle creating a tooltip with seal args.
        --info_queue[#info_queue+1] = G.P_SEALS[(card.ability or self.config).extra]
        -- Description vars
        return {vars = {(card.ability or self.config).max_highlighted}}
    end,
    loc_txt = {
        name = 'Test Sigil',
        text = {
            "Select {C:attention}#1#{} card to",
            "apply a {C:attention}Test Seal{}"
        }
    },
    cost = 4,
    atlas = "Sigils",
    pos = {x = 5, y = 2},
    discovered = true,
    use = function(self, card, area, copier)
        for i = 1, math.min(#G.hand.highlighted, card.ability.max_highlighted) do
            G.E_MANAGER:add_event(Event({func = function()
                play_sound('tarot1')
                card:juice_up(0.3, 0.5)
                return true end }))
            
            G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.1,func = function()
                G.hand.highlighted[i]:set_seal(card.ability.extra, nil, true)
                return true end }))
            
            delay(0.5)
        end
        G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.2,func = function() G.hand:unhighlight_all(); return true end }))
    end
}```


And it was working before but now when I used it I get this error and I cant figure out what's wrong
lofty sand
#

hey, I'm having trouble with wording a joker and just looking for a second opinion on if the wording makes sense, or if I'm schizo posting.

#

does that description make enough sense for what the joker does?

#

epic

#

ty

errant fulcrum
#

Had to read it a few times but I think I understand?

bitter portal
#

hold on how do i get the localization of the name of a joker

#

cause i need to pass it in as a var

lofty sand
red flower
errant fulcrum
lofty sand
#

that is better wording for sure, but I kinda want the wording to match DNA and chad's wording, cause chad uses the wording "the first played card used in scoring"

#

also hold on I just realize the sprite is way off lmao

errant fulcrum
lofty sand
#

base game wording low key kinda boo boo

bitter portal
#

btw where would be a good spot for these raw strings in my localization file?

lofty sand
errant fulcrum
#

Yea, I try to stay consistent with it until it forces my descriptions to be walls of text

bitter portal
#

oh and these too

errant fulcrum
bitter portal
#

oh is there not a way to apply custom stickers with debugplus?

stiff quiver
#

how would i check in what cardarea a card is?

lofty sand
#

or rather, for when a joker is destroyed*

bitter portal
#

wow stickers seem so underdeveloped compared to everything else

vast bough
#

does anybody know any good example jokers that create playing cards and add them to hand, for some reason im really struggling with it

molten relic
#

dna?

honest birch
#

and certificate as well

lofty sand
#

dna, certificate, marble joker, idk what else I would be missing

bitter portal
#

oh wow this completley did not work

vast bough
vast bough
#

ill just stick to it guys, thank u anyways

errant fulcrum
molten relic
stiff quiver
vast bough
#

oh damn

molten relic
#

yes

pure salmon
#

this debuffs cards in the shop but not during a blind, for some reason

stiff quiver
#

and if not changing the cardarea it sends it too would work

vast bough
#

thats perfect then i always thought it added to deck so i didnt think to look haha

vast bough
vast bough
#

its for joker forge

errant fulcrum
#

oh okay

vast bough
#
export const generateAddCardToHandReturn = (
  effect: Effect,
  triggerType: string
): EffectReturn => {
  const suit = (effect.params?.suit as string) || "random";
  const rank = (effect.params?.rank as string) || "random";
  const enhancement = (effect.params?.enhancement as string) || "none";
  const seal = (effect.params?.seal as string) || "none";
  const edition = (effect.params?.edition as string) || "none";

  const customMessage = effect.customMessage;

  const scoringTriggers = ["hand_played", "card_scored"];
  const heldInHandTriggers = ["card_held_in_hand"];

  const isScoring = scoringTriggers.includes(triggerType);
  const isHeldInHand = heldInHandTriggers.includes(triggerType);

  let cardSelectionCode = "";

  if (suit === "random" && rank === "random") {
    cardSelectionCode =
      "local card_front = pseudorandom_element(G.P_CARDS, pseudoseed('add_card_hand'))";
  } else if (suit !== "random" && rank !== "random") {
    const cardRank = rank === "10" ? "T" : rank;
    const cardKey = `${suit.charAt(0)}_${cardRank}`;
    cardSelectionCode = `local card_front = G.P_CARDS.${cardKey}`;
  } else if (suit === "random" && rank !== "random") {
    const cardRank = rank === "10" ? "T" : rank;
    cardSelectionCode = `local card_front = pseudorandom_element({G.P_CARDS.S_${cardRank}, G.P_CARDS.H_${cardRank}, G.P_CARDS.D_${cardRank}, G.P_CARDS.C_${cardRank}}, pseudoseed('add_card_hand_suit'))`;
  } else if (suit !== "random" && rank === "random") {
    const suitCode = suit.charAt(0);
    cardSelectionCode = `local card_front = pseudorandom_element({G.P_CARDS.${suitCode}_2, G.P_CARDS.${suitCode}_3, G.P_CARDS.${suitCode}_4, G.P_CARDS.${suitCode}_5, G.P_CARDS.${suitCode}_6, G.P_CARDS.${suitCode}_7, G.P_CARDS.${suitCode}_8, G.P_CARDS.${suitCode}_9, G.P_CARDS.${suitCode}_T, G.P_CARDS.${suitCode}_J, G.P_CARDS.${suitCode}_Q, G.P_CARDS.${suitCode}_K, G.P_CARDS.${suitCode}_A}, pseudoseed('add_card_hand_rank'))`;
  }
...
#

this is how the code looks lol

marsh scroll
#

how do i check which language the game is in

lofty sand
#

so cert and dna ig

stiff quiver
marsh scroll
#

nope

stiff quiver
#

if its for an effect i dont know

marsh scroll
#

other purpose

stiff quiver
#

i dont know then

marsh scroll
#

is there any documentation that tells me what fields are in the "G" object

stiff quiver
#

probably, but i dont know of them

vast bough
marsh scroll
red flower
vast bough
#

merge it

lofty sand
stiff quiver
#

btw N how can i check a cards cardarea? for context im doing a hook to card:sell_card to prevent selling in a cardarea

red flower
#

card.area

lofty sand
#

I think I already asked this but I don't remember the answer, is there a way to check for when a joker is destroyed?

stiff quiver
#

makes sense, thanks

red flower
lofty sand
#

oh dope lol

#

is there a roadmap for the releases? or do we know when that version is coming?

red flower
#

you need to check if it's a joker tho because that checks for any non playing card basically afaik

red flower
lofty sand
#

oh sweet, so it should be any day now

#

also while I'm at it, is there a way for a joker to modify the configs of other jokers?

red flower
#

yeah, just change the values inside card.ability

lofty sand
#

oh that works, cool

#

other than that, is there a way to change the entire description of a joker, not just the vars?

copper thorn
#

what is the basic weight of rare cards?

lofty sand
#

oh well, I'll figure that out when the next smods ver comes out

wintry solar
red flower
#

I haven't noticed anything but I haven't used the new contexts yet

bitter portal
#

how do i add a new button here and here with one that lights up when having cards selected

copper thorn
#

stupid question real quick : how do i get my mods prefix ? i can't find it and i don't remember what it is

copper thorn
#

a headrer

#

header*

red flower
red flower
copper thorn
#

nope

#

but my other mod doesn't have one either and has a prefix

red flower
#

then it's the first four letters of your modid iirc

bitter portal
red flower
red flower
# bitter portal wait hold on i have no idea how hooks work... ive never done it before
Klei Entertainment Forums

In LUA, it is a very important concept to understand that everything is a variable and all variables may be edited in runtime. This includes functions. With modding other peoples' LUA files, like Klei's basegame code, you may find yourself wanting to run your code before or after the original fun...

bitter portal
#

i meant i have no idea how patches work

red flower
#

it just adds stuff in the middle of the vanilla files

midnight hornet
#

Does anyone know a seed for red deck - white stake to have a winning hand as first play?

errant fulcrum
#

how do you set a seal with DebugPlus?

static ember
#

hi, i was working on a joker, and i got it into the game (no functionality yet but not relevant to the question), but its locked/not discovered and im not sure how to unlock it?

red flower
errant fulcrum
red flower
wispy sparrow
#

just realized there's 2 different configs for the evil blueprint that share a similar property (that being the odds), so i combined them together. and it works perfectly except for the fact that the compatibility part of the description doesn't work now

honest birch
#

Evil jonkler...

static ember
wispy sparrow
#

here's the entire block of code relating to the evil blueprint compatibility

#

i'm not really sure what went wrong with this after i combined the 2 configs (the one with the odds)

red flower
#

what's card.ability.extra.align

wispy sparrow
red flower
#

nope

#

that's for the UI node

wispy sparrow
#

huh...

bitter portal
red flower
red flower
wispy sparrow
bitter portal
#

but yeah its in lovely/

rapid stag
red flower
wispy sparrow
red flower
bitter portal
#

ahh

red flower
modern kindle
#

good schmorning

wispy sparrow
red flower
#

ok now that dilly is here i can go

wispy sparrow
#

there we go! thanks for the help

modern kindle
red flower
#

i trust you will be able to handle modding-dev

modern kindle
#

i will turn them all against the world

#

they will be my legion

errant fulcrum
#

Genuinely no idea how but a bunch of my custom seals just stopped working properly

#

Can I blame the most recent version of SMODS

modern kindle
#

technically you can blame whatever you want

errant fulcrum
#

I think I just give up at this point

main minnow
#

if i want a joker that gains mult when certain tarot cards are used, should i be putting an if context.using_consumeable in the calculate function?

normal crest
#

Yes!

#

You need to filter what kind of consumable it triggers on tho

#

Since that context includes all

#

I believe you should be able to do that with and context.consumeable.ability.set == "Tarot" iirc

main minnow
#

yep

wispy sparrow
#

so i guess the next step in my book is to make the listed probabilities evil blueprint has and make them dynamic

main minnow
#

is there a way to get the IDs of the card(s) being affected by the tarot card in question?

wispy sparrow
#

i already replaced every number in the description with #x#

#

is there anything i need to add to the vars to make the probabilities dynamic?

normal crest
main minnow
#

the specific effect i'm looking for is "gains +mult whenever an 8 changes suit, enhancement, edition or seal"

#

(yes i know this'll require checking spectrals as well but i assume the code will work out basically the same)

normal crest
#

I don't think there's a context for that

#

But whenever that happens the game calls check_for_unlock, so you could hook that and make your own context

wispy sparrow
#

i even followed the similar scheme to vanilla balatro when it mentions any chances but the probabilities are not dynamic if theres something that increases the odds (or makes it guaranteed)

honest birch
#

how do I set a name for a PokerHand?

#

i looked around the docs for a good solid 10 minutes and found nothing and its been bothering me

#

(also i cant get my pokerhandpart to trigger properly but thats an issue for another time)

midnight hornet
#

Is the 0 (zero) the same as O (letter o) in the seed ?

main minnow
pastel kernel
#

i need help with my joker, it applies polychrome but it can't apply mod

    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play and not context.blueprint then
            if context.other_card.edition and context.other_card.edition.polychrome then
                card.ability.extra.SA2XChips = card.ability.extra.SA2XChips + card.ability.extra.SA2Mod
                card.ability.extra.SA2XMult = card.ability.extra.SA2XMult + card.ability.extra.SA2Mod
            else
                local chance = pseudorandom('peacock_polychrome')
                if chance < G.GAME.probabilities.normal / card.ability.extra.odds then
                    context.other_card:set_edition({polychrome = true}, true)
                end
            end
        end
        if context.joker_main and context.cardarea == G.jokers then
            return {
                xchips = card.ability.extra.SA2XChips,
                xmult = card.ability.extra.SA2XMult,
                card = card
            }
        end
    end
red flower
honest birch
honest birch
primal terrace
#

Is it possible to lose money when a card is scored?

honest birch
#

i wish docs told me that

red flower
#

the docs are kinda confusing but it still has a name field

honest birch
#

ty though i appreciate it

wispy sparrow
#

i'm not sure what i should add into the vars or config to make the listed chances for jokers change when their odds increase or decrease

modern kindle
# honest birch how do I set a name for a PokerHand?

i just use loc_txt myself for poker hands rn, i assume localizing works the same as normally but i havent yet made those entries

for six of a kind, im sure theres a much better way but i do this

 evaluate = function(parts, hand)
        local rank_counts = {}
        local rank_cards = {}

        for _, card in ipairs(hand) do
            local rank = card:get_id()
            if not rank_counts[rank] then
                rank_counts[rank] = 0
                rank_cards[rank] = {} 
            end
            rank_counts[rank] = rank_counts[rank] + 1
            table.insert(rank_cards[rank], card)
        end

        for rank, count in pairs(rank_counts) do
            if count == 6 then
                return { rank_cards[rank] } 
            end
        end

        return {} 
    end
honest birch
# red flower the docs are kinda confusing but it still has a name field

im gonna be really honest, the reason im in this chat so much is because the docs are pretty much unreadable to me, it took me around 3 breaking bad episodes to learn that to return your custom pokerhandpart you have to do "YOURMODSPREFIX_KEYOFPOKERHANDPARTKEY" instead of just "POKERHANDPARTKEY"

red flower
#

i should add pokerhandparts to vanillaremade

honest birch
#

also i dont know if its just me but i have an issue where i can READ and understand code but cant WRITE it

modern kindle
honest birch
#

question btw, where in the docs is there a list of all the uhhh idk what they're called but the things like class inheritence in C++ (so :get_id() for e.g.)

modern kindle
red flower
#

most of the time parts dont matter

honest birch
honest birch
#

fair enough

red flower
#

smods docs has some vanilla docs but not most

modern kindle
wispy sparrow
#

just trying to make sure the chances for evil blueprint change dynamically whenever there's a oops! all 6s joker in play or something that acts similarly to it

primal terrace
tepid needle
#

trying to code a joker that have a plasma deck like balance effect, the game crashs when hand is played, im not sure how the values of the current chips and mult are named
does someone know?

midnight hornet
# red flower yes

thanks. I've found that "0000441" contains 4 of a kind in the first hand, but I cannot use that seed in manual testing (zeros only works with G.FUNCS.start_run. from scripts). I guess im looking for other seeds...

crisp coral
wispy sparrow
#

i already got the #x# variables i needed in the description and the vars defined, it's just that it refuses to change

modern kindle
red flower
#

yeah plasma effect is like 4 lines

main minnow
#

okay there has to be a better way of doing this right

tepid needle
modern kindle
#
    calculate = function(self, back, context)
        if context.final_scoring_step then
            return {
                balance = true
            }
        end
    end,
red flower
#

unless you want a more specific thing to look for for mod support

primal terrace
main minnow
#

so currently i'm at the stage of "just check for every card that could affect those things"

#

although i'm realising this is a bad approach

red flower
#

oh yeah you would need to hook a couple of functions for that

main minnow
#

how

#

"hooking functions" is a thing that keeps being mentioned, and i'm sure it's extremely obvious but i don't actually know how you do it

red flower
normal crest
tepid needle
karmic nest
#

don't know if this will work, but is there a way to change the photo of your joker every turn?

red flower
tepid needle
#

ignore the description ill add those later

red flower
#

hmm that looks like it should work, what's smods version do you have?

modern kindle
#

shouldnt it be self, card, context since this isnt back

red flower
#

yeah

tepid needle
red flower
#

try updating

wispy sparrow
tepid needle
#

oh ok

#

ok it works now, thank you :)

main minnow
honest birch
rotund sable
#

missclick

modern kindle
#

so if we dont have a rank, it then starts counting that rank, then if it doesnt match

honest birch
pastel kernel
#

how do i display "upgrade" splash message to joker and not playing card?

    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play and not context.blueprint then
            if context.other_card.edition and context.other_card.edition.key == "e_polychrome" then
                card.ability.extra.SA2XChips = (card.ability.extra.SA2XChips) + card.ability.extra.SA2Mod
                card.ability.extra.SA2XMult = (card.ability.extra.SA2XMult) + card.ability.extra.SA2Mod
                return {
                    message = localize("k_upgrade_ex")
                }
            else
                local chance = pseudorandom('peacock_polychrome')
                if chance < G.GAME.probabilities.normal / card.ability.extra.odds then
                    context.other_card:set_edition({polychrome = true}, true)
                end
            end
        end
        if context.joker_main and context.cardarea == G.jokers then
            return {
                xchips = card.ability.extra.SA2XChips,
                xmult = card.ability.extra.SA2XMult,
                card = card
            }
        end
    end
manic rune
#

how do i add a button here

#

im too dumb to figure this out i think

modern kindle
#

bepis ♥

manic rune
#

hi dilly

modern kindle
#

hello

#

did u see im being helpful to people for once

chrome widget
#

Hi dilly!!!

modern kindle
#

winteerrrrrr!!!

manic rune
#

oh yeah i see that, im proud of u :3

modern kindle
#

how is the pretty lady this day

chrome widget
#

Kicking ass at bowling CattoBlush

modern kindle
manic rune
#

im helping th30ne with making his mod's config ui rn

#

i just need to, freaking figure out how to put the button where i want

modern kindle
chrome widget
#

💅 completely unrelated to the topic at hand

#

Anyway I'll work on more mod stuff when I get home

modern kindle
#

i need to start working on mod stuff again

#

ive been dealing with bs and school shtuff

#

i have some paper im suppose to do by eod thats like 6 pages but i havent even thought about it yet

main minnow
modern kindle
#

instead did some java assignment

sturdy compass
manic rune
#

the most i have did today is making a quick animated sprite code thats easy to implement

main minnow
#

currently i'm at the stage of "hooking check_for_unlock and finding that that doesn't get passed info about what card is being modified"

manic rune
#

this is animation trigger, for manual purposes

#

and for a looping animated sprite you just do this

chrome widget
#

It's one of the funniest facts about me because I don't strike most people as an athlete. But I was a varsity jock in high school and was captain of the boys bowling team

manic rune
#

idk anything about bowling but damn

#

thats very cool

modern kindle
#

or also destroyed

chrome widget
#

Yeah let's just redact that little thing right there

modern kindle
#

maybe winter whos a smarty pants would be able to help better

#

or bepis who is also smart

main minnow
#

the only way i've found to do that is to hook that weird unlock function because it gets called any time a card is modified

#

but all it knows is that a card has been modified, it doesn't know which

scarlet imp
#

has anyone who has worked with probability before tell me why this crashes the game?

config = {
    extra = {
        odds = 2,
        dollars = 2
    }
},

loc_vars = function(self, info_queue, card)
    if BI.has_reroll_item() then
        local text = BI.generate_pool_text(card)
        info_queue[#info_queue + 1] = {
            set = "Other", key = "item_pool", vars = {
                text.is_modded,
                text.rarity,
                colours = {
                    text.colour
                }
            }
        }
    end
    local numerator, denominator = SMODS.get_probability_vars(card, 1, card.ability.extra.odds)
    return {
        vars = {
            numerator,
            denominator,
            card.ability.extra.dollars
        }
    }
end,

calculate = function(self, card, context)
    if context.individual and context.cardarea == G.play and
        context.other_card:is_face() and
        SMODS.pseudorandom_probability(card, "business", 1, card.ability.extra.odds) then
        G.GAME.dollar_buffer = (G.GAME.dollar_buffer or 0) + card.ability.extra.dollars
        return {
            dollars = card.ability.extra.dollars,
            func = function()
                G.E_MANAGER:add_event(Event({
                    func = function()
                        G.GAME.dollar_buffer = 0
                        return true
                    end
                }))
            end
        }
    end
end

this was taken from the probability branch of Vanilla Remade, so there's no reason I can see that it shouldn't work

red flower
#

whats the crash

scarlet imp
#

and yes, it is just supposed to be Business Card, I just needed to mess with loc_vars

red flower
#

can i see more

scarlet imp
#

yeah hang on

red flower
#

just copy paste it here

scarlet imp
red flower
#

i looks like youre passing card.ability.extra to it somewhere

#

did you restart the run before testing?

scarlet imp
#

yeah, I just made a new run

red flower
#

make sure you saved the file correctly too

scarlet imp
#

I learned a trick a while back that putting name = "<mod-prefix>-<card_name> stops its original code from running so I'll try that

red flower
#

ohh is this a take_ownership?

scarlet imp
#

that seemed to fix it lol

red flower
#

yeah the problem is that the original is using the odds in card.ability.extra

marsh scroll
#

is there a way in jokerforge to change this to "current hand size - 6" for example? something like the example for bootstrap (pic 2), idk how to achieve that

scarlet imp
#

makes sense. I wish that SMODS would automatically stop the OG code from running if you take ownership and redefine something

#

thanks

honest birch
#

so... i dont know anymore

red flower
surreal knot
#

Why at the end of round my game waits certain amount of time until the 1 in 100 hits and I lose?

    key = "radioactive",
    atlas = "Backs",
    pos = {
        x = 2,
        y = 0,
    },
    credit = {
        art = "Makson6327",
        code = "Makson6327",
        concept = "Makson6327"
    },
    loc_vars = function(self, info_queue, card)
        return {
            vars = {
                G.GAME.probabilities.normal
            }
        }
    end,

    calculate = function(self, card, context)
        if context.end_of_round and not context.repetition and not context.individual then
            G.E_MANAGER:add_event(Event({
                func = function()
                    if pseudorandom("radioactive_hit") < G.GAME.probabilities.normal / 100 then
                        G.STATE = G.STATES.GAME_OVER
                        if not G.GAME.won and not G.GAME.seeded and not G.GAME.challenge then 
                            G.PROFILES[G.SETTINGS.profile].high_scores.current_streak.amt = 0
                        end
                        G:save_settings()
                        G.FILE_HANDLER.force = true
                        G.STATE_COMPLETE = false
                    end
                end
            }))
        end
        if context.final_scoring_step then
            return {
                xmult = 3
            }
        end
    end,
}```
scarlet imp
manic rune
#

PLEAAAASE UI PLEASE

red flower
manic rune
#

I JUST NEED YOU TO GO TO THE RIGHT SIDE 😭

red flower
manic rune
red flower
#

do u think i know UI

#

this is the best i can do

primal robin
manic rune
#

a

#

im so cooked

surreal knot
manic rune
#

id normally give up here but this is for my friend, so gngggg

formal parrot
#

Hey bepis

primal robin
#

Use mine I guess

manic rune
#

hi heaven

red flower
#

hi heaven!!

modern kindle
manic rune
primal robin
#

105 lines of code to make checkbox

#

I'm pretty sure you don't want make own from scratch

modern kindle
#

why not make in 3 lines ://

primal robin
#

Because definition alone takes 40 lines

modern kindle
#

nuh uh
no definition allowed

manic rune
primal robin
#

modules/ui/parts.lua:62

manic rune
#

i also didnt know you have to, make your own checkbox for this

primal robin
#

It's kinda old code, but works for all my needs

#

Localization is new, maybe implemented not ideally

#

But, you know, works

paper zealot
#

Why the need to remake the vanilla toggle? Was this for the mouseover hover tooltip feature?

primal robin
#

To make text from both sides, left and right to checkbox

#

And place checkbox by itself properly, it's janky

#

And support formatted text

#

And make text fixed width, also from both sides

#

And yes, hover popup too

#

And there's too much "And"

manic rune
#

im too tired to try and understand how this works

#

i will see it tomorrow, thanks sleepy :3

primal robin
sonic cedar
#

hi bepis and also bye bepis because youre going to bed so gn bepis

manic rune
#

😭

#

hi toma, gn toma and everyone here

primal robin
#

I never used G.UIT.B btw

#

No idea what it does

manic rune
#

same

primal robin
#

Even with my current Ui understanding, feels like I know less than a guy who made Balatro Goes Fishing

paper zealot
#

I think it's just for fixed-size padding

primal robin
#

UI for fishing looks crazy

honest birch
red flower
midnight hornet
#

Is there a way to know which params are required by the function in G.FUNCS ? For example, G.FUNCS.cash_out should require some params, but I don't know which one (I got to this conclusion using DebugPlus and eval G.FUNCS.cash_out()). After trying and error, I know that eval G.FUNCS.cash_out({config = {}}) works. I wonder if there is a better method than manual trying....

honest birch
red flower
#

yeah it might have broken the old stuff

red flower
primal robin
#

Ideally cash out function expects button which called this functions

honest birch
midnight hornet
primal robin
red flower
#

yes, unzip the balatro.exe or better yet look at the lovely/dump folder

honest birch
#

but that sorta makes me happy because in that case increasing highlight limit is easier now

normal crest
tawdry oriole
#

is there something to the likes of cryptid's init function?

red flower
#

other than reimplementing that yourself, no

#

why

tawdry oriole
#

alrighty

#

i wouldve needed it for a function

#

not a function* a joker

red flower
#

AFAIK the only thing that does is run code when the joker is loaded, to make it easier to disable jokers

tawdry oriole
#

oh then perhaps that's not what i need

#

i'll find something else

main minnow
red flower
tawdry oriole
#

hold on this might be way easier than i thought

#

i really just need it to update every round

#

a context is perfect

red flower
#

yeah

normal crest
# main minnow

You shouldn't do this in calculate, and if you need to have a reference to the card modified then this won't be all you need

midnight hornet
red flower
normal crest
# main minnow what else do i need

I'm thinking you'll have to mess with lovely patches and make your own context from that, that said I'm not sure how I'd do it myself and I'm not at my pc to check

main minnow
#

oh god

scarlet imp
#

is there a way that I can tell where a card was obtained from? I want to set a variable inside of my Jokers that says if it was obtained from the shop, from a pack, from Judgement, something like that

red flower
#

I don't think that gets passed to the card once it's created, but you can maybe hook create_card to get that information from the key_append

scarlet imp
#

that's what I was thinking too, I was just wondering if there was a simpler way

#

ugh

#

Thank you lol

sturdy compass
#

augh I wanna add JokerDisplay support for Maximus but the documentation still scares me 😭

primal robin
sonic cedar
#

are the info_queue nils fixable actually
like if this guy has the effect of stencil, can the infoqueue actually keep track of his values instead of just doing xNil etc

red flower
#

i would just look at the vanilla jokers and worry about the docs when doing something more complicated

sturdy compass
#

It's still scary LOL Sob_praying

#

Mfw the first joker on my list would probably need a DynaText display and I have never messed with that before

red flower
#

what does it do

sonic cedar
#

-# (also hi astra and also n i guess do you ever sleep good god)

sturdy compass
#

4X Mult but loses -0.01X every second

red flower
#

its 3pm i slept at night

sturdy compass
red flower
sturdy compass
#

Oh thank goodness

sonic cedar
sturdy compass
#

lol

red flower
sonic cedar
scarlet imp
#

everyone here sleeps except for SomethingCom

sonic cedar
#

where is he Fear

red flower
#

meditating

scarlet imp
#

I fear I may have summoned him

sturdy compass
#

Stalking and lurking when you least expect

chrome widget
scarlet imp
#

lol sorry

sonic cedar
#

somecom would never skull react

#

-# (hi winter)

#

get outta here jedi ik thats you

scarlet imp
#

heheh

sonic cedar
#

evil schemes are no match for straight up cheating (hi srock)

scarlet imp
#

you releasing your mod soon?

normal crest
#

hi tomato

sturdy compass
sonic cedar
scarlet imp
#

the todo list looked much smaller in your channel

sonic cedar
#

that's because it was

midnight hornet
#
Ops! The game crashed:
[SMODS _ "src/game_object.lua"]:3454: attempt to index local 'start_colour' (a nil value)

Additional Context:
Balatro Version: 1.0.1o-FULL
Modded Version: 1.0.0~BETA-0626b-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.8.0
Platform: OS X
Steamodded Mods:
    1: DebugPlus by WilsontheWolf [ID: DebugPlus, Version: 1.5.0~dev, Uses Lovely]
    2: More Speed by Steamo [ID: MoreSpeed]
    3: BalatroBot by S1M0N38, phughesion, besteon, giewev [ID: balatrobot, Version: 0.1.0]
Lovely Mods:

Stack Traceback
===============
...

I've noticed that the game sometimes crashes unexpectedly with this error. Does anyone else experience this issue?

sonic cedar
#

i added those yesterday

scarlet imp
#

i see

sturdy compass
sonic cedar
urban wasp
#

why does this crash upon use

SMODS.Consumable {
    key = "ip_192",
    name = "://IP_192.168.1.1",
    set = "Code",
    pos = { x = 9, y = 2 },
    config = { immutable = { odds = 2727 } },
    atlas = "crp_placeholder",
    loc_vars = function(self, info_queue, card)
        if not card or not card.ability or not card.ability.immutable or not card.ability.immutable.odds then
            return { vars = { 0 } }
        end
        return { vars = { lenient_bignum(card.ability.immutable.odds) } }
    end,
    can_use = function()
        return #G.jokers.cards < G.jokers.config.card_limit
    end,
    use = function(self, card)
        for i = 1, math.max(G.jokers.config.card_limit - #G.jokers.cards, 100) do
            if pseudorandom("crp_ip_192.168.1.1") < 1 / lenient_bignum(card.ability.immutable.odds) then
                SMODS.add_card("j_crp_normalis")
            else
                SMODS.add_card("j_crp_bulgoe")
            end
        end
    end,
    crp_credits = {
        idea = { "SolvLyi" },
        code = { "wilfredlam0418" }
    }
}
sturdy compass
#

🍅

sonic cedar
red flower
urban wasp
#

ah okay

normal crest
#

is your name actually tomatose, or is it meant to be just toma

midnight hornet
sonic cedar
#

toma is just shorthand

#

nickname?

urban wasp
#

what if there was an EVIL tomatose

primal robin
#

How to use set_edition properly for negative?

scarlet imp
sonic cedar
normal crest
sonic cedar
primal robin
#

In vanilla it's set_edition({ negative = true }, true), so I'm just double-checking

sonic cedar
urban wasp
# scarlet imp coma:tose

"jo jookjkerjokerr pookker oeorkkr
i'm just a guy, don't play my base game
<link that goes nowhere>

<second link that also goes nowhere>"

normal crest
#

Guys I might be old

chrome widget
#

Hopefully I can finish up this weird thing with the background and blind UI colors today. I've been working on it long enough with little progress that it's getting aggravating

sonic cedar
proper tangle
#

❤️‍🩹

#

i fixed it

urban wasp
#

:beetroot: if it existed

sonic cedar
#

the origin of deadbeet is

definitely an origin though

proper tangle
#

it's halfway between deadbeat and deadbeef

vast night
#

Hi! It's me again. How can i make a card gain mult just like hiker does it?
The hiker code just changes mult_mod

sturdy compass
#

It begins...

vast night
#

wut

sonic cedar
red flower
sturdy compass
#

lmfao

#

I was wondering if there was an xmult formatting option

vast night
sonic cedar
#

chip

scarlet imp
sonic cedar
#

i love death note

sonic cedar
modern kindle
#

🍞

sturdy compass
#

breb

modern kindle
#

breb

vast night
modern kindle
#

theres a wiki for everything besides the stuff there isnt a wiki for

sturdy compass
#

ok cool

sonic cedar
#

(hi dilly)

modern kindle
#

hihi

scarlet imp
sturdy compass
#

He's the 4D Joker
He lives in the time dimension

sonic cedar
# modern kindle hihi

my back feels great btw so now im starting to think you broke in and chiropractinated it

modern kindle
#

you must trust me

sonic cedar
#

my abs even felt less sore when i woke up what did you do

modern kindle
#

my secret....if i reveal the magic you will call the police

sonic cedar
modern schooner
tawdry oriole
#

ts flush house 🥀 💔

modern kindle
#

flushing a house sounds like a terrible idea

#

would really damage the pipes

sonic cedar
modern schooner
#

that's my mod xd

modern kindle
#

what amkes it freaky

scarlet imp
#

the way Jimbo looks at you

modern kindle
#

god i need jimbo

#

sorry, that was strange to say

sonic cedar
modern schooner
#

maybe i am gonna check

scarlet imp
#

wait I need :somecomthinking: how do I get it 🙏

vast night
#

Another question: i forgot where the wiki for take_ownership on a joker is. could anyone hlep me?

sonic cedar
midnight hornet
#

im still getting this error after updating smods to 0706c

pure salmon
#

this debuffs cards while in the shop but not during a blind for some reason

sturdy compass
#

Ok I think I'm getting the hang of this now

#

math was a little wonky from debug actions but it does work

red flower
pure salmon
#

i think i only changed to debuff_card because debuff doesn't work either

red flower
#

if you remove the suit check does it work

pure salmon
#

here's outside of the blind vs. inside The Head boss blind

#

the suit check myseriously doesn't work sometimes and works fine other times

red flower
#

what's the intended effect?

pure salmon
#

from a set of boss jokers that does an effect on a suit (Goad buffs Spades, e.g.) and debuffs another suit, randomy chosen at the end of the round

#

the random variable works flawlessly

#

but the actual debuff effect is busted

red flower
#

if you remove the check does it debuff everything

midnight coyote
#

how do i check for game over in an unlock context

#

like in the check_for_unlock

pure salmon
#

the suit check works fine

pure salmon
#

this only happens when the variable switches suits

red flower
#

when does it do it

pure salmon
#

actually no

#

whenever the round reset variables get called

#

like how castle and idol do it

red flower
#

hmm idk when thats called but I think the problem is that it is called after the first debuff_card context

pure salmon
#

i cant change when these trigger though, right?

red flower
#

nah its called at end of round

sonic cedar
pure salmon
#

when the variable switches, the card debuffs go from happening only during blinds to happening only outside of blinds

modern kindle
sonic cedar
modern kindle
#

yes

red flower
sonic cedar
urban wasp
#

okay, so, my mod has config and stuff right? makes things do other things. okay well when i exit the game after changing settings in-game, none of the configs that i set are saved; they all just go back to being false
the lua below is my config file and the file attached is my lib/settings.lua, both of which i am loading before everything else. most of this code is stolen from cryptid by the way. help!

return {
    ["HTTPS"] = true,
    ["music_all"] = true,
    ["music_mythic"] = true
}
pure salmon
#

that function is how i decide which suit to debuff and it works fine

red flower
#

no idea lol

pure salmon
#

shit

red flower
#

ok yeah i have the same bug

sonic cedar
#

if i wanted add_card to give you multiple copies, would i just run the function again or is that a param

red flower
pure salmon
sonic cedar
# red flower run it again

do i set the buffer to 0 on only the second one, or do it on both and increase it by 1 in between the two functions?

red flower
#

idk im looking at what it might be

sonic cedar
#

got it

red flower
# pure salmon so there’s not much that can be done until there’s an smods update that fixes it...

yeah i think it's a timing issue, the suit changes before the game calls debuff_card at the end of round, if a card is already debuffed when it's checked then it gets undebuffed anyway

so because you're changing suits the game debuffs the new suit at end of round and then when the next blind starts it calls debuff_card again but because the cards were already debuffed it undebuffs them (which would be normal behavior for end of round)

i dont think this is a bug per se, you can try saving the previous suit and only changing to the new suit in context.setting_blind

molten relic
#

why doesnt this work?

#
        return { vars = {card.ability.extra.d_size } }
    end,
    add_to_deck = function(self, card, from_debuff)
        G.GAME.round_resets.d_size = G.GAME.round_resets.d_size + card.ability.extra.d_size
        ease_discards_played(card.ability.extra.d_size)
    end,
    remove_from_deck = function(self, card, from_debuff)
        G.GAME.round_resets.d_size = G.GAME.round_resets.d_size - card.ability.extra.d_size
        ease_discards_played(-card.ability.extra.d_size)
    end,
}```
red flower
#

ease_discards_played doesn't exist

molten relic
#

what is it then?

#

mea confusa

red flower
#

ease_discard or ease_discards, one of the two
check vanillaremade :3

molten relic
#

is the rest of the code fine?

modern kindle
#

vanilla remade was made by this one really peak and cool and epic fella

scarlet imp
red flower
molten relic
zealous peak
#

TBOI balatro mod

molten relic
molten relic
#

barely

scarlet imp
#

its gonna be a while unfortunately, I'm kinda slow at coding and I wanna add everything

molten relic
zealous peak
#

Jimbo's Collection mod for tboi is basically balatro in tboi

#

we now have them both sides

molten relic
scarlet imp
#

when I do trinkets, I'll probably make them tags

molten relic
#

as their own mechanics

scarlet imp
quick scarab
#

I having a problem where my joker doesn't seems to spawning an custom consumable when the chance rolls around

#

any help

#
SMODS.Joker {
    key = "cassie",
    atlas = 'Joker',
    pos = { x = 5, y = 4 },
    blueprint_compat = true,
    rarity = 2,
    cost = 4,
    config = { extra = { odds = 3 } },
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue + 1] = {key = "fnaf_WIP", set = "Other"}
        return { vars = { G.GAME.probabilities.normal or 1, card.ability.extra.odds } }
    end,
    calculate = function(self, card, context)        
        if context.joker_main then
            if context.using_consumeable and not context.blueprint 
            and context.consumeable.ability.set == 'fnaf_item' and pseudorandom('fnaf_cassie') < G.GAME.probabilities.normal / card.ability.extra.odds then
                G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
                G.E_MANAGER:add_event(Event({
                    func = (function()
                        SMODS.add_card {
                            set = 'fnaf_item',
                        }
                        G.GAME.consumeable_buffer = 0
                        return true
                    end)
                }))
                return {
                    message = "+1 Item"
                }
            end
        end
    end,
}```