#💻・modding-dev
1 messages · Page 479 of 1
Should be fine.
alr
this crashes for some reason
is it supposed to be context.debuff_card and not context.other_card?
yes
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
is it possible to replace booster packs with a different booster pack via the same method?
not directly, maybe you can delete one that's there
ohhh true i could just tick a variable up each time ones removed
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
G.GAME.blind.showdown also works but i think that's correct, why?
why do cards flipped like this not unflip before the hand scores (joker, not a blind)
because you're not checking the card area so they also stay flipped from G.hand to G.play
context.to_area == G.hand
This is the code of my deck. The goal is to lose the game if the 8th ante is completed when there's a seven in the deck. But the deck is destroying discarded cards, and crashing on any play
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)
Why would a return of true here destroy a discarded card? (trying to understand as opposed to just copy-pasting, I apologize if it's a silly question)
a
It's not silly. Cards that destroy in context.destroy_card in vanilla use return true for some reason. Because you're returning true in every context, it's also in the destroy card context
Ok, that was 100% it. Cards aren't destroying themselves now and I'm not crashing. Let's see if we can take this to Ante 8 and check it 😛
is K a constant somewhere?
i was about to say that haha
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...
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.
I recommend checking out vanillaremade if you haven't already
That remakes everything with SMODS capabilities, correct?
yes
why is it called smods/steamodded anyways
ah
How am I supposed to add +1 choice to a specific type of consumable pack
how do i set a card to be eternal in its code again
card:set_eternal(true) iirc
card.base.suit is a variable right
it's a string yes
for some reason, it only decreases the chips not the xchips
G.playing_cards is the reference to the entire deck, right?
why do my config options not save after a reload
i have a config.lua
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
does eternal work with tarots
good question
i do not know
the major point of making it eternal is so it cant be sold
i dont think so by default
i know the whole thing of like "you can hook it" but i dont think hooking will ever be easy for me no matter how much that one post gets linked to me
what's the condition for the card to not be sold? like what specific card is it
may i see
i just dont want it to be able to be sold at all
local card_can_sell_card_ref = Card.can_sell_card
function Card:can_sell_card(context)
local ret = card_can_sell_card_ref(self, context)
if self.config.center.key == "c_modprefix_key" then
return false
end
return ret
end
do i put that in the calculate function
the key needs to be without the c_nic_
no, anywhere outside the tarot
it will be c_nic_c_nic_incognito otherwise
made a tiny correction :p
How does the custom roles work
what was the change
card for self
This little text
oh i see
Yummy
ok, i do need to make it manually return a message it seems
wdym
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
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
yes
theyre in v_dictionary iirc
i know where messages go, i just didnt know if you could customize them to use the card's loc_vars
yeah i mean that messages with variables are specifically in v_dictionary, not just dictionary
Is there an easy to understand github build or something for making jokers, card editions, seals, etc
Is there an example of joker triggers when a keyboard's key is pressed?
vanillaremade has most of the vanilla items in an smods format
No, but there is one from cryptid that happens on left mouse button pressed?
Aww
how would i define something as a boolean without giving it a value right away?
Why?
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
You don't define variables directly in calculate
i guess in this case it could totally just be a joker variable actually yeah
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```
chat, remind me how i use SMODS.add_card to add a specific card when i have a key in mind
i forgot
iirc SMODS.add_card({ key = "insert_key_in_mind_here" })
yeppers
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
No.
That would just be key = false
?
not "key" returns false
ohhh ok
so if i wanted an "everything but" id still have to do the long way then
No, because you could temporarily ban the ones you don't want I think.
wait really? how?
Try looking at MoreFluffs Modded Pack because I know it does something like that.
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
is it because shop_rate is 0? maybe its required to be nonzero?
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
never gotten this one before
Code?
is this because of the new probability changes?
Yes.
sure sounds like it
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
is there a context for checking cards played and not just scored?
like a context that includes unscored cards
alright, what is it?
(context.cardarea == G.play or context.cardarea == "unscored")
Check out the https://github.com/nh6574/VanillaRemade/tree/new_probability_stuff branch
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
Did I do the good thing ? Cause it seem to not work
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
}
No, it's .config.center.key not .key
Also your missing the mod prefix and class prefix.
oh yeah omg I was far
how did I forgot such a thing
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?
yeah I got no clue. I took ownership of every Vanilla Joker and literally anythin that relies on probablity is broken because of the SMODS changes. Even using the newly formatted code from the probability branch of the SMODS git isn't helping
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?
oh, then what do i do?
The set needs to be Joker if you want stickers to show up.
wdym? change set to Joker?
like do i change set = "Batrocities", to Joker = "Batrocities",?
No, set = "Joker"
still confused. all code for the settings of my mod is attached below (mostly copied from cryptid)
oh, so i cant do modded with that?
Ugh I don't know why adding support for gradient backgrounds ended up being such a hassle
ooh thats sick
Basically there's a persistent issue with both the background and (a failed attempt at) the UI colors
if i do set = "Joker" then its gonna be jokers and not my modded right?
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
Yes.
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
so how can i do that with only my jokers?
set stickers = true inside the table you're passing to create_card()
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
hey, um dumb question, can someone send me the page of the smods wiki with pseudorandoms, like 1 in 4 chance?
Oh ok thanks
1 in 4 chance is just if pseudorandom("literally_anything") < 0.25 then
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
oooh okay thank you!
I think like this is how it would work
No, because then it would always have those stickers.
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
you could randomly choose stickers to be added before the function call, its not that complicated
okay i see, thank you so much
How would i do that?
bumppa
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
Ok thanks
so i tried to test a bit with odds and pseudorandoms and each time i spawn in the joker it crashes with this error
You need a context check in the elseif
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
Well anyway thanks man
I succeeded
Made a joker to just flip after i pressed key
Now to somehow make a joker free roam-
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.
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?
math.max(number, 0)
where does that go in this context?
is it just like, before the whole definition in brackets or something
It goes where you want to return 0 if the number is less than 0
am i on the right track here? 
No, you would put it around the entire number.
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?
either take_ownership or hook to its calculate
how do i do that? cant find it in smods docs?
thx
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
You use use
so its use = function(...,...,...)
No, it's use = function(self, card, area, copier)
yeah, i meant that, already written like this
...,...,... were just for faster typing
haha, next time i'll write in full
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
i know its somewhat wrong, can i get some help @daring fern
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
mb
card.other_card doesn't exist, also you should be hooking Card:set_seal
Then why are you checking for it?
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...
cause i didnt know what to use
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
where is the key of a card's enhancement located
card.config.center.key?
oh, thanks
I've narrowed it down a little
still needed a help on something
G.GAME.round_resets.blind_states seems to be a culprit
why isnt the xchips decreasing
What in the code is setting Big to Current?
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)
I've done wheel of fortune using patches
hmm
It's not possible if you're not on the SMODS dev version.
elaborate
also also is there a context to do something at the beginning of a round rather than every hand
context.setting_blind?
Yes.
@manic rune @daring fern if i wanted to split Luas for jokers, do i have to do something first before splitting it?
No, you would just put them in different files and load them.
not really, just put the joker code in another file and load them properly
I mean it's possible using lovely instead of only SMODS
so i dont have to worry its not loading because its already in the same mod folders?
No?
if context.pseudorandom_result and not context.result
Was calculate_context added on dev?
No.
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}
'''
anyone knows the code/function that creates multi boxes so i can implement them here 🤔
The release version still uses old probability.
No, they want any probability.
I was talking strictly about wof
maybe spacer?
i dont know to implement it horizontally, i implemented my spacer vertically
oh nevermind i think i figured it out, thanks
yeaahh
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
I think I've found the issue in my code... I am setting blind_states to use the blind itself, so when it occurs, it affects all uses of the instance
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...
i take back my words, i didnt figure it out 😭
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
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)
like... basically set your chips to something?
yeah
are you trying to use flexible multi box choices (like Mythos cards in Ortalab adding a different box)?
wait i got an idea
smods already provided multi box support
uhhh no clue how they look like

but all of my jokers are using generate_ui because of paging stuff
i personally wpuld do like
chips = 35 - chips
for example
i believe that will work idk tho
oh yeah, i want to do something like that
that could work yeah
try it
on it o7
btw
generate_ui is what smods wants your function name to be
the vanilla function is called generate_card_ui
neeevermind, figured it out
Yes, you need to do it outside of the return.
bump
I also looked at localize to figure this out lol
mhm, turned out i just needed to add AUT = full_UI_table to the localize functions
what does lenient_bignum() even do?
Bumping this since I’ll be trying to work on it again in a few hours. Willing to rewrite everything since it’s technically only 1 card right now, but since it’s only 1 card idk if it’ll matter
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...
is copy_card a thing
it's a function
oh okay
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?
how would i make a joker that has a really long message before giving mult
Like I said yesterday, just wait a couple of weeks for me to port it properly into smods so you don’t have to worry about making it all work yourself
I'm not clear on what exactly you're adding
looks like the issue may have been due to a specific savestate slot, other slots on the same seed/ante work fine. weird
now i can move onto seeing how to call the square sparkle effect used in booster packs/jimbo win and loss screen
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
(spoilers it will break)
-# pls no
it's the smods way
At least most of this code will be well tested
It’s been in the ortalab dev build since February 🤣
is there a number equivelent of Card:is_face() ?
🙁
not Card:is_face()?
don't think Ace is a number card
i mean you can logically just do if not card:is_face() and card:get_id() ~= 14 then
but hardcoded
🤔
works for all vanilla stuff
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?
smods sprite is completely unused i believe
i don't remember if 0.9.8 compat exists anymore
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
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)
just checking how to replace an atlas again
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
i think you can just use SMODS.add_card with the same arguments and run it twice, remove the add to decks
The Atlas as in "cards_1"? I didn't define it, so I'm not sure.
ok found it, the atlas to replace is cards_1 and cards_2 yeah
👍 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
neato
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.
you can do black text on white box but eh
I thought about that. It's what I was originally going to do, even.
But I also felt it was kinda eh
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
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.
gn
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
redoing pickle jar joker sprite...
ive been using the stuff in the "guides" tag in #1209506514763522108 as my reference personally,, but theres not really any specific "templates" from what ive seen
theres a post titled "A (Hopefully) Comprehensive Guide to Joker Art"
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
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 ^^;
wondering, is it possible to put booster packs in a booster pack, and have them be openable and all that? ^u^
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
here's how smods does pair to 5 of a kind https://github.com/Steamodded/smods/blob/67279fa91c98efd75fd0443f821c48277d6b8a51/src/game_object.lua#L2685
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
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
Had to read it a few times but I think I understand?
hold on how do i get the localization of the name of a joker
cause i need to pass it in as a var
yeah it's a bit wordy, I don't really know how to trim it down without leaving out important functionality
oml thank you sm 🙏
localize { type = "name_text", set = "Joker", key = key }
Maybe
Add a copy of first scored card in played hand to deck
Copy is scored in the played hand as the first card
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
I see what you mean, but sometimes the base game itself has needlessly wordy descriptions, especially considering you can't add temporary copies of cards to your deck in the base game anyway
base game wording low key kinda boo boo
btw where would be a good spot for these raw strings in my localization file?
never noticed that until I started modding lmao
Yea, I try to stay consistent with it until it forces my descriptions to be walls of text
reffering to "rounds", " rounds", "a round" and "round" btw as well as these in another joker
oh and these too
Geneuinly can anyone make heads or tails of this
oh is there not a way to apply custom stickers with debugplus?
how would i check in what cardarea a card is?
or rather, for when a joker is destroyed*
i dont think so
wow stickers seem so underdeveloped compared to everything else
does anybody know any good example jokers that create playing cards and add them to hand, for some reason im really struggling with it
dna?
and certificate as well
look for a base game joker that does that here https://github.com/nh6574/VanillaRemade/blob/fbfeb4d2e14111c9c47706f71cc25c7b50e021c9/src/jokers.lua#L3723C1-L3723C11
dna, certificate, marble joker, idk what else I would be missing
oh wow this completley did not work
certificate and marble joker adds to deck
dna copies played card, i tried looking but its not too much help
ill just stick to it guys, thank u anyways
Well hang on, send what you've got so far
certifcate adds to hand, does it not?
it does iirc
yes
this debuffs cards in the shop but not during a blind, for some reason
and if not changing the cardarea it sends it too would work
thats perfect then i always thought it added to deck so i didnt think to look haha
thats what i thought, i have made add to deck and copy to deck effects
my code is typescript not lua haha
its for joker forge
oh okay
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
how do i check which language the game is in
cert adds it to the hand, marble adds to deck
so cert and dna ig
if its for a jokers text use localization files, im pretty sure they automatically change the text
nope
if its for an effect i dont know
other purpose
i dont know then
is there any documentation that tells me what fields are in the "G" object
probably, but i dont know of them
Contribute to BakersDozenBagels/Smods-Wiki development by creating an account on GitHub.
yeah i sorted it, certificate was a big help, now im doing the 'copy card to hand' stuff and its working but the copied card gets copied at the location of the card its copying from which is strange but should be an easy fix lol
huh why wasnt this in the normal smods wiki?
still not merged
merge it
huh like on top of the copied card? that's funny
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
card.area
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?
makes sense, thanks
i think the answer changed from last time haha
in the next smods update it's context.joker_type_destroyed
oh dope lol
is there a roadmap for the releases? or do we know when that version is coming?
you need to check if it's a joker tho because that checks for any non playing card basically afaik
they try to do a week for testing and a release week, this should be the release week
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?
yeah, just change the values inside card.ability
oh that works, cool
other than that, is there a way to change the entire description of a joker, not just the vars?
what is the basic weight of rare cards?
yes, dunno how easy it is tho
oh well, I'll figure that out when the next smods ver comes out
Speaking of this, N, are you aware of any more probability jank that’s still h going around?
I haven't noticed anything but I haven't used the new contexts yet
how do i add a new button here and here with one that lights up when having cards selected
stupid question real quick : how do i get my mods prefix ? i can't find it and i don't remember what it is
do you have a json or a header
you need to patch/hook the function that makes the buttons
corobo was doing it here #💻・modding-dev message
does it have a prefix field
then it's the first four letters of your modid iirc
wait hold on i have no idea how hooks work... ive never done it before
it's in the docs
here's a tutorial
i recommend a patch for this tho
https://forums.kleientertainment.com/forums/topic/129557-tutorial-function-hooking-and-you/
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...
oh thats just normal monkeypatching
i meant i have no idea how patches work
it just adds stuff in the middle of the vanilla files
Does anyone know a seed for red deck - white stake to have a winning hand as first play?
how do you set a seal with DebugPlus?
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?
hold tab and it will tell you
How little knowledge I possess
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
Evil jonkler...
oh that was actually really easy, thank you!
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)
what's card.ability.extra.align
pretty sure thats defined at line 1276
huh...
am i stupid... why is it not doing anything. i have the folder and the toml
remove those first two things from vars, you're getting the configs confused
is it called lovely.toml or is it in a lovely/ folder? what's the code?
just did that but the compatibility is still broken
the code rn is just a direct copy+paste of the patch you showed me (im going to change it later obv)
but yeah its in lovely/
is there a way to add 2 of the same card with one function call, or do i just have to do the call twice
oh, put local other_joker before that line above it
so inbetween main_end = main_end and the vars?
oh yeah sorry I'm reading the rest of the conversation, that patch didn't work because the pattern wasn't the whole line haha
ahh
?? no, before if G.jokers then
good schmorning
ah okay
ok now that dilly is here i can go
there we go! thanks for the help
D:
i trust you will be able to handle modding-dev
Genuinely no idea how but a bunch of my custom seals just stopped working properly
Can I blame the most recent version of SMODS
technically you can blame whatever you want
I think I just give up at this point
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?
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
yep
so i guess the next step in my book is to make the listed probabilities evil blueprint has and make them dynamic
is there a way to get the IDs of the card(s) being affected by the tarot card in question?
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?
Like, as an example, the cards hanged man destroys?
yep
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)
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
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)
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)
Is the 0 (zero) the same as O (letter o) in the seed ?
would that be through take_ownership or does hooking a common vanilla function work differently?
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
do you use loc_txt or localization files
loc_txt, am i supposed to put a name table in there as well?
😭
Is it possible to lose money when a card is scored?
i wish docs told me that
the docs are kinda confusing but it still has a name field
ty though i appreciate it
it should be
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
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
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"
i should add pokerhandparts to vanillaremade
actual goat, i still dont really understand how the hand table is structured so ive been having issues, but this is a literal godsend, i love you so much random internet person ❤️❤️❤️
also i dont know if its just me but i have an issue where i can READ and understand code but cant WRITE it
bump
i feel that, it feels much easier to read than write but thats why i love ides which let me hit tab to fill shit in
real and same, luckily VSC at least has lua(u) autofill, so there's that
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.)
parts are scary i think i use it all of once
most of the time parts dont matter
cuz my earlier code was basically just getting card.base.value and trying to mess around with next() to do checks
nowhere
smods docs has some vanilla docs but not most
bump
i think i only used it for my 2 3oaks lmao
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
It does work, it's just that if the first probability succeeds, then the second one does not work
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?
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...
SMODS.merge_effects might be useful to you
i already got the #x# variables i needed in the description and the vars defined, it's just that it refuses to change
can probcopy the plasma deck calc into your joker from vanilla remade no?
yeah plasma effect is like 4 lines
okay there has to be a better way of doing this right
oh I thought vanila remade only has the jokers lol, thx ill try it
calculate = function(self, back, context)
if context.final_scoring_step then
return {
balance = true
}
end
end,
mm..
make an array of names and compare them in a loop
unless you want a more specific thing to look for for mod support
Oh, that's new!
this joker is supposed to gain +mult whenever an 8 card changes suit, enhancement, edition or seal
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
oh yeah you would need to hook a couple of functions for that
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
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...
take ownership is for objects, hooking is for functions
well the game isn't crashing anymore but its not doing anything
don't know if this will work, but is there a way to change the photo of your joker every turn?
may i see the code
yes, card.children.center:set_sprite_pos({x=0, y=0}) (or whatever pos in your atlas)
hmm that looks like it should work, what's smods version do you have?
shouldnt it be self, card, context since this isnt back
yeah
try updating
yeah your versions out of date
okay i'm looking at this, but check_for_unlock is only ever called with a type of action (e.g. "modify_deck") and doesn't get information about what card is being modified or how
actually a quick question, what does "if not" do specifically? like my best guess is it checks if the given index isnt nil but i could be wrong so i just wanted to make sure
missclick
its if something is false or nil then blahblah
so if we dont have a rank, it then starts counting that rank, then if it doesnt match
oh gotcha 
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
bepis ♥
hi dilly
Hi dilly!!!
winteerrrrrr!!!
oh yeah i see that, im proud of u :3
how is the pretty lady this day
Kicking ass at bowling 
:D
some days i feel like trying to impart my knowledge best i can
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
fuck yea youre so epic
💅 completely unrelated to the topic at hand
Anyway I'll work on more mod stuff when I get home
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
do you feel like helping with my extremely annoying problem of "i need to check for all possible modifications to a card but only if that card is an 8"?
instead did some java assignment
SHEEEEEEEEEEEESH
the most i have did today is making a quick animated sprite code thats easy to implement
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"
this is animation trigger, for manual purposes
and for a looping animated sprite you just do this
I'm actually cracked, used to be semi-professional
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
thats a great question, id probably just store the id and suit of an 8 and then check if it either changes rank or gains an enhancement or edition through get_id but i dont think thats a proper way to do it
or also destroyed
Yeah let's just redact that little thing right there
maybe winter whos a smarty pants would be able to help better
or bepis who is also smart
sure but like. the problem is finding a way to listen for all possible card modification events
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
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
whats the crash
and yes, it is just supposed to be Business Card, I just needed to mess with loc_vars
can i see more
yeah hang on
just copy paste it here
i looks like youre passing card.ability.extra to it somewhere
did you restart the run before testing?
yeah, I just made a new run
make sure you saved the file correctly too
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
ohh is this a take_ownership?
that seemed to fix it lol
yeah the problem is that the original is using the odds in card.ability.extra
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
makes sense. I wish that SMODS would automatically stop the OG code from running if you take ownership and redefine something
thanks
so... i dont know anymore
i think you can also do it by always returning something in calculate
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,
}```
like return nil for example?
thats the same as returning nothing
i think return nil, true works
I JUST NEED YOU TO GO TO THE RIGHT SIDE 😭
you need to return true for the event to end
n' can u help me please i have been struggling for an hour now 😭

oh, yeah twas it, thank you sm
id normally give up here but this is for my friend, so gngggg
Hey bepis
Use mine I guess
hi heaven
hi heaven!!
youve never given up
🤔
105 lines of code to make checkbox
I'm pretty sure you don't want make own from scratch
why not make in 3 lines ://
Because definition alone takes 40 lines
nuh uh
no definition allowed
oh its that complicated??
modules/ui/parts.lua:62
i also didnt know you have to, make your own checkbox for this
It's kinda old code, but works for all my needs
Localization is new, maybe implemented not ideally
But, you know, works
Why the need to remake the vanilla toggle? Was this for the mouseover hover tooltip feature?
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"
im too tired to try and understand how this works
i will see it tomorrow, thanks sleepy :3

hi bepis and also bye bepis because youre going to bed so gn bepis
same
Even with my current Ui understanding, feels like I know less than a guy who made Balatro Goes Fishing
I think it's just for fixed-size padding
UI for fishing looks crazy
this was the correct answer, but alas, apparentally messing with the hand highlight limit is something balatro REALLY doesnt like unless youre the cryptid mod, so it caused my game to crash every time i selected 6 cards 🥲, tysm for the help tho
there's an smods function for increasing play size
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....
my mod was made before that was added lmao, i remember someone pointing out they had to add that to the api
the better method is looking at the code
Ideally cash out function expects button which called this functions
rippp
is it available?

yes, unzip the balatro.exe or better yet look at the lovely/dump folder
#1335020527596736592 message
yeah the api probably broke it
but that sorta makes me happy because in that case increasing highlight limit is easier now
True, I assumed that'd be sufficient to do what you wanted
is there something to the likes of cryptid's init function?
AFAIK the only thing that does is run code when the joker is loaded, to make it easier to disable jokers
i mean, presumably somewhere in here i want an if card:get_id() == 8 then ..., but there's no card for me to call that on
if you tell me maybe i can point you to it 😭
hold on this might be way easier than i thought
i really just need it to update every round
a context is perfect
yeah
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
WOW! that's soo nice and soo useful for many things. Thanks a lot!
what else do i need
bump
call it twice
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
oh god
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
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
that's what I was thinking too, I was just wondering if there was a simpler way
ugh
Thank you lol
augh I wanna add JokerDisplay support for Maximus but the documentation still scares me 😭

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
i would just look at the vanilla jokers and worry about the docs when doing something more complicated
It's still scary LOL 
Mfw the first joker on my list would probably need a DynaText display and I have never messed with that before
what does it do
-# (also hi astra and also n i guess do you ever sleep good god)
4X Mult but loses -0.01X every second
its 3pm i slept at night
It's literally 2 in the afternoon
you can do this without dynatext because jokerdisplay updates every frame :p
Oh thank goodness
not you
lol
like if you have a variable for that in config already you can literally just copy jimbo from the examples
oh tbh i thought we were on opposites youre literally just an hour ahead
I do. Kickass
everyone here sleeps except for SomethingCom
where is he 
meditating
I fear I may have summoned him
Stalking and lurking when you least expect
Thought the reaction was Something for a second
lol sorry
heheh
evil schemes are no match for straight up cheating (hi srock)
you releasing your mod soon?
hi tomato
Ok now I think I'm starting to understand the structure of this
this month for sure
oh..
the todo list looked much smaller in your channel
that's because it was
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?
i added those yesterday
i see
626b is a weird SMODS version to be running
specifically 626b is w- curses astra
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" }
}
}
i think you attempted to concatenate a local _type
SMODS.add_card{ key = "key here" }
ah okay
is your name actually tomatose, or is it meant to be just toma
thanks. ive update to 0706c and see if the issue is still present
deadbeet/tomatose
i love puns
toma is just shorthand
nickname?
what if there was an EVIL tomatose
How to use set_edition properly for negative?
coma:tose
yeah hi you're looking at her
I don't get the pun
set_edition("e_negative", true)?
In vanilla it's set_edition({ negative = true }, true), so I'm just double-checking
edgy 13 year old word in emo diary with broken red heart sticker but vegetable
deadbeat
comatose
"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>"
Guys I might be old
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
hi old? im toma
💔
and then like
:beetroot: if it existed
it's halfway between deadbeat and deadbeef
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
It begins...
wut
perma_mult instead of perma_bonus
ok for xmult i would recommend checking cavendish instead
hmm. makes more sense. i thought bonus was a general thing
i love death note
🍞
breb
breb
theres a wiki for that wut
theres a wiki for everything besides the stuff there isnt a wiki for
(also everything)
ok cool
(hi dilly)
hihi
JimboJimboJimboJimboJimboJimboJimbo
He's the 4D Joker
He lives in the time dimension
my back feels great btw so now im starting to think you broke in and chiropractinated it
i told you i would fix you
you must trust me
my abs even felt less sore when i woke up what did you do
my secret....if i reveal the magic you will call the police

hello can someone tell me what's this error usually mean ?
traumatizes you
ts flush house 🥀 💔
wtf is freakylatro
that's my mod xd
what amkes it freaky
the way Jimbo looks at you
well seems like you messed up your localization somewhere (something about a perfect six?)
maybe i am gonna check
wait I need :somecomthinking: how do I get it 🙏
Another question: i forgot where the wiki for take_ownership on a joker is. could anyone hlep me?
api documentation iirc
im still getting this error after updating smods to 0706c
this debuffs cards while in the shop but not during a blind for some reason
Ok I think I'm getting the hang of this now
math was a little wonky from debug actions but it does work
you need to return debuff = true
i think i only changed to debuff_card because debuff doesn't work either
if you remove the suit check does it work
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
what's the intended effect?
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
if you remove the check does it debuff everything
not until i do something to remind the game to debuff cards, like sell a joker
the suit check works fine
this feels like a bug then
this only happens when the variable switches suits
when does it do it
actually no
whenever the round reset variables get called
like how castle and idol do it
hmm idk when thats called but I think the problem is that it is called after the first debuff_card context
nah its called at end of round
no
when the variable switches, the card debuffs go from happening only during blinds to happening only outside of blinds
make it 27
wh
what do you mean
yes
is that the whole calculate function
i mean im doing all of them but i havent done them yet 
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
}
it's the only part that should really matter
that function is how i decide which suit to debuff and it works fine
no idea lol
shit
ok yeah i have the same bug
if i wanted add_card to give you multiple copies, would i just run the function again or is that a param
this does the same thing
run it again
so there’s not much that can be done until there’s an smods update that fixes it basically?
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?
idk im looking at what it might be
only at the end
got it
still confused
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
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,
}```
ease_discards_played doesn't exist
ease_discard or ease_discards, one of the two
check vanillaremade :3
vanilla remade was made by this one really peak and cool and epic fella
chat how do we feel about this animation
no, d_size is also not a thing
is his name N' by chance
im downloading this mod as soon as it releases
TBOI balatro mod
huh??? i thought that was the term for discards 😭
holy shit im also maing a tboi mod
barely
its gonna be a while unfortunately, I'm kinda slow at coding and I wanna add everything
ill check vanilla remade...
Jimbo's Collection mod for tboi is basically balatro in tboi
we now have them both sides
i also want to add active items and trinkets
when I do trinkets, I'll probably make them tags
as their own mechanics
I have a channel under modding if you wanna follow it. I post progress every now and again
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,
}```



