#đ»ă»modding-dev
1 messages · Page 426 of 1
It's one of them yes
It's not working, I dont think. It's not crashing, but nothing is happening
Put a print in there see if it exists at least
Nope, i don't think it exists how i have it right now
why does this randomly destroy multiple cards
context.destroy_card is called on every playing card.
So it would be getting a different random card every time.
oh i see. that makes sense
can you use config extra on blinds?
blind.ability.extra crashes and so does blind.config.extra
Try self.config.extra
Hey everyone, I was playing with Cryptid and almanac and wanted to only play with almanac (wich now I know is impossible), but now I can't even launch the game because cryptid is not checked... I searched in the files to see where I could activate cryptid again to make it work but can't find it
Remove the lovelyignore file.
All the ones you want to enable.
Kay thanks a lot!
SMODS.Seal {
key = 'RedBlue',
pos = { x = 0, y = 0 },
atlas = "Seals11_atlas",
badge_colour = G.C.BLUE,
calculate = function(self, card, context)
if context.end_of_round and context.cardarea == G.hand and context.other_card == card and #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
G.E_MANAGER:add_event(Event({
trigger = 'before',
delay = 0.0,
func = function()
if G.GAME.last_hand_played then
local _planet = nil
for k, v in pairs(G.P_CENTER_POOLS.Planet) do
if v.config.hand_type == G.GAME.last_hand_played then
_planet = v.key
end
end
if _planet then
SMODS.add_card({ key = _planet })
end
G.GAME.consumeable_buffer = 0
end
return true
end
}))
return { message = localize('k_plus_planet'), colour = G.C.SECONDARY_SET.Planet }
end
end
}```
want to repeat the seal twice if held in hand
@daring fern
am i stupid why does this not work
if context.repetition and context.cardarea == G.hand then
return {repetitions = 2}
end
just not working or crashes?
does nothing
what is it supposed to do exactly?
Try just flagging the card.
after calculate?
No, in calculate
any ideas about this?
Well i probably have no idea
u tried your best somthingcom
Im just curious what the seal supposed to do
yall would this work
when in hand trigger twice, and give 2 planets
imagine a red seal and blue seal on the same card, but red seal only works in hand not when played
Oh, combining red's retrigger effect for blue, i see
specifically the score_cal:arrow part
yes, but also if u enhance card to steel or gold it will also trigger twice
so half of the red seal effect is still there
So, up to 4 planets?
no 2 planets
Maybe try checking the code for Mime
it gives 1 planet per trigger
Perhaps.
and it trigger twice
And if its steel/gold card, it triggers twice again?
its exacly like a red seal, but doesnt trigger when played
okay it does not work fuck
I can only say, using a loop to retrigger itself?
thought of that, but the game uses "retrigger" function so i wanna implement that if possible
Oh
It's probably because you're not specifying hyper
oh you are right
i edited the function for easier readability and forgot to edit the joker to match
Oh yeah, line 74 has arrow called, but not defined
Maybe it wanted to be score_mod.arrow
well this was the original code, which worked just fine before
now that im migrating it to a function, i need to figure out what's wrong
most of the new function wasn't written by me so i'm having to fiddle with it myself
Where is arrow on line 74 defined?
i'm not sure, i'm guessing somewhere in talisman
again, it worked here in the old code
Is anyone able to help with dealing with booster packs? I'm trying to replace the packs in the shops with a joker
Yes.
ah, works now
Huh... Dunno much about Talisman, should probably look into it at some point
-# So how do I do that
What is the goal?
I want to replace the booster packs in the shop with the Mega version
It doesn't sound very hard in logic but I can't find the right syntax
So like
You would probably start by patching/hooking create_card_for_shop
Idk where to start lmao
Does cryptid have something similar so I can check the code
Damn
why doesn't it let me do this (before you ask lua extension doesnt tell me enough information to fix it)
this is why i hate return statements
You have an end above the if?
that's not what's crashing though
But it is though?
So I figured out how to check for packs, now how do I actually do that
wtf i have no idea why this does nothing
context.before and context.main_eval never evaluates to true... even though it should?
Remove the context.main_eval
yeah that works, but i'm not sure why if a main_eval check works here
It's because this is a blind, not a joker.
do blinds not have context.main_eval? huh
Jokers and similar are the only ones that have it.
makes sense
Sorry for asking again but could anyone help me with the booster pack thing?
Can I change the "size" of the pack directly or do I need to do it some other way
Yes.
How?
Try looking at Off By One from Cryptid
Hi, I think I may have found an algorithm to detect straights with multi-rank cards
I do have it implented, but its in c++ tho
Put all cards and thier possible ranks as pairs in a new array (card_ranks)
Sort card_ranks in ascending order by ranks
have an array representing the longest straight for each card_ranks (set to 1 initially)
for every card_rank
check all the card_ranks behind it and see if it can make a straight chain
(not the same card, rank gap is bigger than 0 but less than 1 (2 for shotcut))
update the longest_striaght with the max of the current and longest striaght of the previous one + 1
if theres is a longest striaght bigger than or eq to 5 or 4 (for 4 fingers) or 6 if you did that in your mod
then the hand has straight
Do you remember where it is in the code? There's like
A million files
I haven't thoroughly tested for edge cases and the like, but it seems to work so far, even with shortcut
Self.ability.extra works in the sense that now I can set the number or cards in the booster
But if possible I'd like to just spawn a mega pack
It is not possible to check if a booster is mega.
Ok thx
So the best bet is to set the number of cards to 5 and choices to 2
Yes.
I'm gonna try to set the choices to 2 then now
G.GAME.pack_choices doesn't work
its also fast enough to check a hand of 6 cards counting as all ranks about 30k times a second (in c++)
Is there an equivalent to self.ability.extra?
You need to patch it.
At the start it says
G.GAME.pack_choices = self.ability.choose or self.config.center
Can I use either of those 2?
Like, self.ability.choose sounds like the equivalent of self.ability.extra for the number of cards
You need to patch it.
Alrightđ
Atm the issue seems to be another one, with the if statement
self.ability.choose works perfectly, but if I put multiple of those in the if statement then it breaks
Ok the only issue is that I don't know Lua lmao I figured it out
can patches be applied mid-line, or does the line need to be fully replaced?
What's the syntax for no edition/no modifier/no seal?
Basically default cards with no modifier
Interested in this, what some of input structure are you needing?
I actually just made an issue with smods here: https://github.com/Steamodded/smods/issues/758
It just need a list of ranks assuming ranks have ordering and given any two ranks we can find their distance (for shortcut related stuff)
and for a given card we can get all the possible ranks of it to put in an array
hello
hello
Can you write in in lua instead?
calculate = function(self, card, context)
if context.end_of_round and context.cardarea == G.hand and context.other_card == card and #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
G.E_MANAGER:add_event(Event({
trigger = 'before',
delay = 0.0,
func = function()
if G.GAME.last_hand_played then
local _planet = nil
for k, v in pairs(G.P_CENTER_POOLS.Planet) do
if v.config.hand_type == G.GAME.last_hand_played then
_planet = v.key
end
end
if _planet then
SMODS.add_card({ key = _planet })
end
G.GAME.consumeable_buffer = 0
end
return true
end
}))
return { message = localize('k_plus_planet'), colour = G.C.SECONDARY_SET.Planet }
end
end
}```
want to retrigger when held in hand
any ideas?
Does it compute all Straights?
I mean, I can try, I'm not as fluent
tried adding this in calculate lua if context.repetition and context.cardarea == G.hand then return {repetitions = 1} end
but didnt work
it computes the best for each card (acting as a specific rank)
One of the requirements of the algorithm is computing all possible Straights, I think
I remember Aure bringing that up at least
Because itâs the vanilla behaviour
hmmm, but in vanilla you could only have like 1 or 2 straights
the only other option would be just an exhaustive search
Ace, 2, 3, 4, 5 would have at least 5 Straights
with four fingers I thing its just 2
huh how?
I think it would contain the 5 card version too
oh yeah, shortcut is wonky
So 4 Straights at least
Does anyone know if there's a term for no modifier (like 'm_stone')?
does SMODS.find_card work with redeemed vouchers?
If you'd need all possible straights its just brute force no?
What do you mean by modifier?
I thought you could do DFS, though IIRC Aure criticized it
Mb, I mean enhancement
it gets more complex obviously thanks to dynamic hand size n such
The center is theDefault one instead of Enhanced, but SMODS has a function to see if a card has an enhancement IIRC
I can't see that working, unless you make graphs for each card, no?
ohh mb sorry
I see it now
use a really big lookup table
Thatâs another thingâvanilla can assume the graph is simple
SMODS would need to handle a bigger graph
Yes I'm using "SMODS.has_enhancement" and it works properly with enhancements like 'm_steel', I was wondering if I could use the same function to check if a card had no enhancements
So even brute force on a simple graph wouldnât be a big deal
I also think you can solve a sequence of MILPs to find all possible Straights
I donât think thatâs efficient though
but how bad would brute force be actually
In vanilla itâs not too bad because the graph is constant
linear programming?
(bump)
i was forgotten 
So I think itâs close to O(played cards)
Mixed-integer linear programs, but yes
I know very little LP (LP and flow problem) so I don't see how it could apply
IIRC you model the problem of finding the highest scoring Straight
I feel like the solution is probably simple and I just don't know it
not next(SMODS.get_enhancements(card))
What's next for?
I used the function without next and the brackets and it works properly with any enhancement
calculate = function(self, card, context)
if context.end_of_round and context.cardarea == G.hand and context.other_card == card and #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
G.E_MANAGER:add_event(Event({
trigger = 'before',
delay = 0.0,
func = function()
if G.GAME.last_hand_played then
local _planet = nil
for k, v in pairs(G.P_CENTER_POOLS.Planet) do
if v.config.hand_type == G.GAME.last_hand_played then
_planet = v.key
end
end
if _planet then
SMODS.add_card({ key = _planet })
end
G.GAME.consumeable_buffer = 0
end
return true
end
}))
return { message = localize('k_plus_planet'), colour = G.C.SECONDARY_SET.Planet }
end
end
}```
want to retrigger when held in hand
any ideas?
hmm, but the DFS really could work no? if each node was a (card, rank) pair in a DAG, and the only paths are valid straight jumps (cards are not equal and the rank jump is valid) then you could do a DFS for every node in the graph
the function always returns a table so not get_enhancements will always be false
next checks if the table is empty basically
I just remember Aure criticized it. Isnât the discussion in the thread?
what thread?
Ohhh ok, thanks!
I assume the same works for editions or anything
no
I mean the 'next'
no
Damn
GitHub
card.edition is nil if it doesn't have an edition
(bump)
oh there was already an issue, damm
no idea but you can use G.GAME.used_vouchers iirc
grand, thanks ^^
Or iterate over the Voucher CardArea manually
Can anyone tell me what "loop in gettable" means as a crash error?
Oh wait thatâs Ghost Salt
yello ^^
I didnât recognize you
I wrote a little language mod to replace some joker names a month or so back, and steammodded seems to have broken it
and idk why
forgotten again TT
someone help me please 
ok now I'm even more confused
I'm now getting the same crash with other language mods, even though 10 minutes ago they started fine
for context, I have lovely, smodded, and #1346990688868372650 right now to test with
does anyone have a ipa with lovely injected that works with sideloading?
I am exceedingly lost, I have done a full reinstall of lovely, smodded and the mods now and I can't get it to work anymore
does anyone know what function i would have to hook in order to change the loc_txt description of any joker
I'm trying to add a custom tarot card, but the game crashes, with this crash code. Could someone please help me?
set('tarot')
key = 'rfool',
loc_txt = {
name = 'looF ehT',
text = {
"Creates looF ehT"
}
},
atlas = 'rtarot',
path = {x = 10, y = 0},
cost = 3,
calculate(self, info_queue, context)
local card = SMODS.add_card({key = 'c_rfool'}),
card:add_to_deck()
G.consumeables:emplace(card)
used_tarot:juice_up(0.3, 0.5)
end
}```
huh, i guess that worked? I'm not sure why but removing the dependency tag made it load properly
It crashes everytime I add info_queue[#info_queue+1] = G.P_CENTERS.j_inm_grooster because of sell_cost...
it doesn't crash when I remove it
(info_queue thing is for joker information and other stuff when you hover over it)
it was working before
Try ... (card.sell_cost and (card.sell_cost / 5) or 0) ...
Sorry I keep modifying
nw
But basically card.sell_cost might not exist
Uuuh not put the math.floor with the division
... (card.sell_cost and (math.floor(card.sell_cost / 5)) or 0) ...
@zealous glen dfs works
example
I tested it with random cards and shortcut and 4 fingers enabled, and it generated a shit ton of possibilities
but its repeating sometimes
ok I fixed the repitition
new link: https://godbolt.org/z/6jd9WTdYz
Is there a context for when the joker is bought?
(only the joker itself, not other things)
can't seem to find one in the wiki
Why not make it give an x (x = repetitions) amount of planet?
Like instead of creating 1 card
only one for everything
Tho I think I can see how it might break
context.buying_card
You can check the bought card if it's a Joker
within context.card
Oooh wait when the joker itself is bought?
ah
Is it like calculate but with add_to_deck instead of calculate?
Yes
thx
how does retrigger animation work in balatro?
You can have both add_to_deck and calculate
like how do i make it show?
Try specifing the returned card?
wil try....
wasn't it somthing like this? ```extra = { message = localize('k_upgrade_ex'), colour = G.C.MONEY },````
but with retrigger instead of upgrade
after or before calculate or does it not matter?
I'm guessing it doesn't matter
Doesn't matter
Be careful tho, if you don't account for debuffed, the function will trigger again when it's undebuffed
That's why from_debuff is a param
oh
bump
Hmm... I'm still struggling to get Genders to apply to ALL decks at the start of the run.
I guess for now, I could just make a custom deck that has genders apply to all playing cards
đ€
you can alsoe control the rank gap(shortcut) or the striaght size(four fingers)
it could be optimized further most likely
is debugplus the only mod development tool or are there more
theres #1367354388540297246 for unit tests
why does this happen?
ive got this error with this code. any help?
Trying to figure out how to make the pseudorandom_element NOT pick the same item in a list twice
Change it to G.playing_cards
Changing it to G.deck is what I tried after I got the same crash with G.playing_cards
Also card would be v
local v, k = pseudorandom_element(list, "seed")
table.remove(list, k)
local v2 = pseudorandom_element(list, "seed")
You need to check if G.deck exists before iterating over it
Try this ```lua
G.E_MANAGER:add_event(Event({
func = function()
if not G.playing_cards then return false end
for k, v in pairs(G.playing_cards) do
v:start_dissolve()
end
return true
end
}))
the issue is that it crashes because when you start the game G.deck = nil so pairs(G.deck) fails
How would I check if it exists?
you can use a if statement like this:
local apply_ref = Back.apply_to_run
function Back:apply_to_run(self, args)
if G.deck then
for k, v in pairs(G.deck) do
SMODS.Stickers["canfi_gender_applier"]:apply(card, true)
end
end
apply_ref(self, args)
end
does anyone know how to easily access balatro's code to look at it?
unzip the .exe of the original game
No, you need to use my solution.
im not entirely sure how to do that
Look at the lovely dump.
will extracting the source code mess things up with the application itself?
or i mean unzipping it
how do you add additional tabs for your mod page again
config = { chips = 50, mult = 15 },
and
return { vars = { self.config.chips, self.config.mult } }
end,```
im working on edition
why wont this work

It works! Ty!
Sometimes it doesn't work and you need to do it manually.
could you elaborate maybe?
loc_vars = function (self,card,info_queue), not just self i think?
lemme try
-# i dont have access to the documentation rn, and im a bit of a hurry so
also, it should be card.edition.chips, card.edition.mult in this case, i think?
I was using the documentation as reference and it only had self so thats why i was wondering
No, it should be card.edition.chips, card.edition.mult
How do I leave the generation of these two random letters?
func = function()
SMODS.add_card {
key = 'c_temperance', 'c_death',
skip_materialize = false,
}
G.GAME.consumeable_buffer = 0
return true
once again
i need help on creating a consumable type because apparently this causes the game to crash when I look at it
would it be better to make a copy of the balatro exe to unzip?
that's engine/ui.lua and it points to parallax or whatever
maybe i still need to set the consumable set to modprefix_calculator
just checked and for me its pointing at self.config.colour[4], which would throw an error if it doesnt exist
because right now it has no reference card to put in it
since there are no cards relating to the consumable
it can't display the thing
update
got a new error message :]
from changing the consumable's set to modprefix_calculator
it now crashes on startup
there's no pool
idk what to do
applying the changes didn't do anything the mult and chips still dont apply to the scoring :p
Good morning all! Super new to discord so my apologies if my questions are in the wrong place. Am I allowed to paste small bits of code in here to ask why they don't work?
im as confused as you
yes
oh you're in here too lol
{
"id": "weakness",
"name": "Weakness",
"version": "1.0.0",
"author": "Lex",
"main_file": "main.lua",
"dependencies": ["smods-main"]
}
i'm constantly getting an author error
AI doesn't know jack shit about the Balatro code base or how smods and lovely work
author has to be ["Lex"]
yea
omg hi aure
John, ty for that link!
omg hi bepis
turned out im usually in both channels when im free :p
btw bepis any idea on this bc it randomly sort of broke and idk why
it was working fine then randomly started doing this
that looks like something that's being passed into your function isn't shaped how you expect it to be
the easiest thing to do is to just add nil checks and see if something down the road still breaks
my main confusion is it was working, then i ran --dump-all once and it started doing this and even after deleting the lovely folder its still doing the error, idk if its that or just a coincidence but its confused me massively
the other thing is the error is at the start of G.FUNCS.Slider, which i haven't modified, do i just add a check into that function and see if it fixes?
hm might just be malformed UI code then
what object exactly?
omg progress! the array thing helped it move on from author, then it had a prefix error, and I fixed that too. It actually loaded!
though it has a red exclamation point now lmao
@frosty dock They wrote this and another C++ algorithm for Straight calculation
apparently my consumeable type is a "empty pool"
how do i fix this?
patching in a nil check worked, just gotta hope this doesnt cause any mod conflict but it shouldnt, thank you :)
doesn't seem like it at a glance, still I wonder what caused it
i mean if you want you can download and test it to see if its an issue of something i did on my computer (though it really shouldnt be) but i still have 0 clue why it suddenly started doing the error after working for like 2 weeks
My mod is sort of loading now, but Lovely is showing me this error: [G] 2025-06-11 11:13:28 :: TRACE :: Loader :: Mod weakness was unable to load: Missing Dependencies: 1: SMODS
dont even think i changed anything before it broke other than --dump-all
what is the dependency of smods in your json?
"dependencies": ["SMODS"],
ah okay, should be something like this
"Steamodded (>=1.0.0~ALPHA-0321b)"
],```
or are you asking me why it's listed as a dependancy?
oh wow, that's very diferent lol
yeah makes it have to be past a certain version, though that is quite an old one
do I need to rname my SMODS folder to that same name?
no
okay, here we go again đ
it reads the smods json to get the name then checks the version
OMFG
you can also just do "Steamodded" if you don't want a minimum version
Y'all are the best!
fully working?
dunno if it works yet, but there are no errors loading lmfao!
fair enough đ
i guess i play and see if i can find the new card?
would it not be in the collection?
and if it works, my next question will be hwo the heck has nobody created this tator card before lol
Lars: good question, i'll go hceck
oh snap, that was bad
it said there was a new card in the collection, but it crashed when i want to find it lol
do I need to make code for the actual card to?
my main.lua is just the code for the card i think. not sure about the artwork etc.
anyone know how to help me with this?
what could be causing rankless cards? lol
yo could i get a point in the direction of making my first consumable / consumable type? c:
engine/sprite.lua:11: attempt to index field 'atlas' [a nil value] followed by a bunch of dump-like stuff
how can i get a card's suit?
this should put it into the pool
pools = {["calculator"] = true},
probably learn how the vanilla ones work first and try implementing those things for your own ideas
so
apply this to the consumable?
yeah just in the SMODS.Consumable()
thx!
mmmm
not working
same error
bestie.,, i asked for how to make a new consumable, i know how the ones that are already implemented work-
maybe it's because i'm using mintconditioncards_calculator instead of just calcualtor

it gives you an idea of how the consumables code works tbf
didn't mean to offend my fren
how's it look?
Funny enough I just joined to ask about the same thing :'>
nope
same error
valid i think im just tense, thats my bad :3
im making mtg cards SLJLGDSGLDGH
There was the big chance my message could be not helpful at all, but I sent it anyway
that says calcualtor did you spell it right in the code?
i need to make like 4 dif consumables each with functional casting costs and effects X3
Maybe share in the SMODS server or GitHub to get more eyes on it
nono, I was aggressive and I couldn't tell the tone, you were offering to help and it wasnt cool of me to act that way. you're chilling asf <3
yeah i did
just made the typo in chat, sorry for any confusion
telling tone is hard for me online . w.
Hello! It's been a while
[SMODS _ "src/utils.lua"]:228: Attempted to insert object "c_destino_entropico_sevenSpades" into an empty pool.```
May I ask whats the call for the vanilla tarot/shop pool? :'>
didn't you have a different name
fair just double checking
@hushed field
How are you
Hiiii
im good, getting started on making the ENTIRETY of mtg alpha in balatro
hmm?
I got Genders working finally! That's one thing down.
bcos silly
soooooooooo
any ideas?
gender balalo!!!
if you make the set set = "Tarot" it should consider it a tarot card i think
MTG
lemme quickly read thru the smods code, check what the error is calling
balatro the gathering
Yep. I added Genders to playing cards because its something that's been at the back of my head for a while now
Id show yall an example, but I'm currently on my way to the zoo
Enjoy your visit :D
I don't know if this would be the right place to ask for help with a problem configuring a modpack
what version of smods are you on minty?
enjoy the zoo!
im gonna make it so you tap playing cards for mana :3
latest release
1.0.0 beta 0530b
would you add like a 5th suit for that?
Hi I'm still struggling with my edition, I have
config = { chips = 50, mult = 15 },
return { vars = { card.edition.chips, card.edition.mult } }
end,```
yes despite this it doesnt seem to be adding the chips or mult to the score
I'm still hoping to get Pikmin working relatively soon. I might have to redo some of my ideas
try using a calculate function
This was meant as a question for you, @tall apex
I did have one but it wasnt working but I'll do it again and just make sure i wasnt stupid lol
Much appreciattion for the earlier assistance. will be back for more!
anybody knows a workaround or fix for
A. Cartomancer crashing on deck view (specifically trying to load a 2nd page)
B. Some extra deck mods freak out when there's extra suits defined
c and less important, cartomancer crashing while (i believe) trying to display the amount of suitless&rankless cards. just by hovering over the deck view screen button
i think i probably will :3
idk how else it'd work
Yall does anybody know how to make my jokers not appear in the shop?
Like i made a legendary but bro still appears in the shop
And "in_shop = false," does not work
Legendaries dont appear in the shop at all by default
Well for some reason my does
Do you have a mod that enables that?
How do i make my scoring compatible with talisman?
local chips = G.GAME.chips
local blind_chips = G.GAME.blind.chips
local progress = math.min(chips / blind_chips, 1)
print(progress)
local color = Lerp_color("#fd5f55", "#3cb4ff", progress)
self.boss_colour = HEX(color)
end
Nope
Just my mod and some quality of life mods. Thats it
how to make a mod?
obligatory kitten image
anyone know how to trigger context.destroy_card for the cards you want to remove ?
when are you trying to destroy cards exactly
i mean after scored
the game should trigger it by default?
ok thanks:))
In my experience it does
there's an smods server?
im making a joker is there a way to check if cards are played like the reserved parking but for every card?
im a bit late , but
-- Tarot
SMODS.Consumable{
key = 'sevenSpades',
loc_txt = {
name = 'Seven of Coins',
text = {
"Add a -7 of spades",
}
},
atlas = 'Tarots', -- atlas' key
rarity = 1,
cost = 3,
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
pos = {x = 0, y = 0},
set = "Tarot",
can_use = true, -- How does this work :sob:
-- Main function of the tarot
calculate = function(self, card, context)
if context.using_consumeable and (card == 'c_destino_entropico_sevenSpades') then -- Check if the tarot is being used
local new_card = {set = 'Card', area = G.deck, key = '7s'}, -- Create a 7 of spades... I hope
SMODS.add_card(new_card) -- Add it?
end
end,
}
thanks
can use is a function, not a boolean, so you want to set it up like a function. The proper syntax should be on the consumable page of the smosd wiki
also i barged into modding chat but good schmorning chat
hi ice my goat i havent seen you in many moons
@red flowerAre extra deck jokers able to be sold from the extra deck? I'm correctly remembering that they are, right?
that happens when you disappear for many moons đ
Something something context.joker_main, G.hand
this is true science can back that up
I made some auxiliary objects Eternal to prevent them from being sold
I'm trying to do the opposite đ
They could be sold natively for me
That should fully be the case, yeah, I don't see why it's not working on my end, haha
Does anyone know why Talisman is causing a crash
but I'm more so just trying to parse the buttons code at this point
Maybe progress is a big number instead of a number
i dont understand why it would be, but how do i make it a non big number
like this?
idk
oh
to_number on it
that last function looks like chatgpt
Thank you for saying it
Remove the last function, make a for I, card in ipairs(G.hand) do before the return and then it should be at least somewhat better
@signal rose any updates?
530b is latest release iirc
is this better?
You sent the same exact picture as last time...
for real?
yep
according to the smods page that is the latest release
Look at it, it's the exact same image
Im having some issues with making the function properly add a 7 of spades to the deck ;^;
Oops! The game crashed:
functions/common_events.lua:2165: bad argument #1 to 'ipairs' (table expected, got nil)
Stack Traceback
===============
(3) global C function 'ipairs'
(4) Lua global 'get_current_pool' at file 'functions/common_events.lua:2165'
Local variables:
_type = string: "Playing Card"
_rarity = nil
_legendary = nil
_append = nil
_pool = table: 0x083cbec8 {}
_starting_pool = nil
_pool_key = string: "Playing Card"
_pool_size = number: 0
(5) Lua global 'create_card' at file 'functions/common_events.lua:2319'
Local variables:
_type = string: "Playing Card"
area = nil
legendary = nil
_rarity = nil
skip_materialize = nil
soulable = nil
forced_key = nil
key_append = nil
use = function(self, card, area, copier)
G.E_MANAGER:add_event(Event({ func = function()
local new_card = {set = "Playing Card", rank = 7, suit = spade}
SMODS.add_card(new_card)
return true
end
}))
end,
my issue lies in the fact that my consumable type is an "empty pool"
you are right sorry
how can i create an informative text on the side of my joker, like explaining what it does part 2
this should be the right one
how do i make a joker gain mult depending on the type of hand that's played?
Closer, but no for still innumerable reasons
and what should i do?
I actually worked on this today, let me share over my code:
--Jovial Merryment
SMODS.Joker{
key = 'merryment',
loc_txt = {
name = 'Jovial Merryment',
text = {
"This joker gains {C:mult}+2{} Mult",
"for every played {C:attention}High Card{}",
"{s:0.7}{C:inactive}(Currently {C:mult}+#1#{C:inactive} mult){}"
}
},
atlas = 'Jokers', -- atlas' key
rarity = 1,
cost = 5,
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
pos = {x = 2, y = 0},
config = {
extra = {
mult = 0, --Mult that will count up
mult_gain = 2 -- How much the joker gains per hand played
}
},
loc_vars = function(self,info_queue,center)
return {vars = {center.ability.extra.mult}} --This is to display the mult count on the description of the joker
end,
calculate = function(self, card, context)
if context.before and (context.scoring_name == 'High Card') then --Before scoring + If the hand is high card
card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_gain -- The new mult is mult+mult_gain (so X+2 every time)
return {
message = 'Upgraded!',
colour = G.C.RED
}
end
if context.joker_main then --This is when the joker scores at the top
return {
mult = card.ability.extra.mult --Adds the mult
}
end
end
}```
thx
<@&1133519078540185692> scam
I'm sorry was that the right user
the user id was 1092902813132144860
IT WAS NOT THE RIGHT USER
no it was
oh so was this another one

mods, kill that user
I'll go him lol
you'll go him đ
POV: sca, alert and it's 4 pictures of someone standing in fron of a presentation đ
Sorry I have the worst keyboard. Straight up typewriter
real
i need a new keyboard, it's a pain in the ass to remove and clean under keycaps so it's a crumb collector
how can i give negative to a random joker?
i think just looking at the game's code for ectoplasm would show you how
ok
@snow vale look at VanillaRemade instead
yeah i was
just making sure
[name]
damn i never be seeing threads
Whats the set/area call for playing cards? 
G.play, G.hand, G.deck or `G.discard' depending on where the playing cards are located
Thank you very much 
for my own question, how i can have an event trigger when mipmap levels are changed? any sprites i manually change w/SMODS.Atlas + raw_key are reset to vanilla if mipmap levels are messed with
G.GAME.blind.value?
I just try to contain things in their own areas if I feel they go to far
He's unbanned, sent him a request but cant send him any messages
G.GAME.blind is just nil
sorry if i was unclear abt that
I keep getting the same error from this function :'>
are you sure?
he assumed that the second scammer was the first
@steady blade can you weigh in.
first scammer had a display name of pedro or smth
no that was actually after lol
@pulsar furnace it shouldn't be? What context are you calling it in?
That can't be where the error is coming from because it says bad argument to ipairs, share the code, please?
in a apply, idk if theres a context when generating a blind or something like that (also its for a deck)
You are correct
Oh, I haven't messed with decks before. Also there is, it's context.setting_blind
that code you sent is not a function
oh
I was unsure because it wasn't a link, and @pulsar furnace told me it was wrong
nope he is banished
wasnt me
-- Tarot
SMODS.Consumable{
key = 'sevenSpades',
loc_txt = {
name = 'Seven of Coins',
text = {
"Add a 7 of spades to your deck",
}
},
atlas = 'Tarots', -- atlas' key
rarity = 1,
cost = 3,
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
pos = {x = 0, y = 0},
set = "Tarot",
-- Main function of the tarot
use = function(self, card, area, copier)
G.E_MANAGER:add_event(Event({ func = function()
local new_card = {set = 'Card', area= G.deck, rank = 7, suit = spade}
SMODS.add_card(new_card)
return true
end
}))
end,
can_use = function(self, card)
return true
end
}
I also did try with ```lua
local new_card = {set = 'Joker', area = G.jokers, key = 'j_destino_entropico_raraka', edition = 'e_negative'}
not martini syrr, @steady blade
Hi :3
helo
I need a new keyboard I feel like a stenographer
suit = "Spades"
I... uh...
Oh
It's okay! Everyone makes mistakes like that
Only if you never try
what now đ
You're not using the smods version that has that feature if I had to guess
i keep reading 530b is latest release
I installed it yesterday /shrug
Yeah the adding of playinf cards with add_card is on the dev branch of smods
Not out in a release yet
im on 0608b, but i use latest commit
yeah?
Hey Dilly
How should I go about adding a 7 of spades in 530b then? ;-;
what do you need?
You can go to the smods github and download the latest stuff by clicking the green Code button and then download zip
whats up
Nothin, I unbanned a scammer cuz of this message
By copying how vanilla does it, but honestly just get the dev version of smods
oh that was just a slight joke message, mb
now hes really gonna be c+rashing out youre crazy my man
way too confusing for us mate we get pinged all day and never have context
yea i was under the assumption 3 people got banned, 2 scammers and 1 poor guy caught int he crossfire
Dev version didn't help, still getting the same error :'>
Pass "Base" as the set
is was G.GAME.blind.dollars BUT it doesnt shows total reward until cash out
whac a scam
hey i hate having to ask questions that seem simple, but i saw the steamodded guide and i found the way to add money to the player after the round is done, but i couldnt find how to add money through out the round itself, like after every hand, can someone point me in the right direction please
ease_dollars(1)
just call the function
ohh ok, so i just call that function whenever i want it to happen?
You'll prolly want it in the right context for your needs, too
It finally works, thank you very much đ TTvTT
Yay
I had to do this all last night it was annoying. You also want the new lovely. dll in your dalatro directory
keyword whenever, you have to also specify when
calculate functions has a pretty ok documentation even if it's like missing 10 contexts
ooh ok, im going to look through the vanilla modded examples to learn more
wow
For basic timings, you can look at the Calculate Functions page in the wiki and see various contexts there.
yooo lets go
<@&1133519078540185692>
is that a scammer?
yes
Yes
pew pew
Scambots really like showing up around this time, huh.
weird
no, he just wants to give you free money
Please donât recommend this to new devs, the vast majority of people should be using the latest release
hi chatters errr i have a joker that creates a tarot card but it crashes when it does add card, does anyone know why?
I wasn't about to explain how to create a playing card without the utility function, too much of a pain
hey friends, can anyone tell at a glance why this isn't working quite right?
SMODS.add_card is a function ....
it's add_card( {...} )
They're calling it right
You can skip the parenthesis if it's only one table argument
no return?
it's not a returnable thing
oh icic ty :3
update smods, that's a very old version
i find it odd they changed the name from steammodded to smods
Besides what they said you don't want to do +2, you want +1 on both
people kept thinking it was for steam only
my first thought when i read the name
i like how this copy paste includes cryptid and talisman
then i learned it's named after the person
im getting this when i try to do badgeses . w.
ty for the help đ idk why i didnt update it when i started modding lmao
i like the "please remove -main from the folder"
somethin somewhere is formatted wrong
What's your current code
yeah you have to manually change the fil;e names
this is p much it
yeah that's just cuz talisman is weird like that and nobody bothered to put in effort to try and fix it
and manually delete version . dll in the separate, balatro dir and paste the new version . dll from the lovely link
Ah
that just gives me this
Sorry, I meant the comma at the end of line 10
the comma was for the return table
My recommended response in a situation like this would be something like âyou can check out how vanilla uses create_playign_card or wait a week or so for the new smods release thatâll have the featureâ. My plan is that thereâll be a new stable release every two weeks, and Iâd recommend people use that instead of latest commit (unless you are prepared for reporting bugs of new features)
Whoops I removed the reply @normal crest
Yeah I guess that was a better reply
Itâs just much healthier for the wider scene to use releases instead of latest commit
i'm a hat for a californian network interface controller
obviously?
my B
have any of you guys encountered any regressions in lovely 0.8.0? I had one report in the lovely thread but I haven't seen anything else.
A bit unrelated but create_card seems to accept "Playing Card" as set while add_card doesn't
we changed module injection timings which in theory could break backwards compatibility but it's not likely
Itâs seemed fine to me
word
are you sure? Add card definitely worked when I was testing the pr đ€
now I'm not sure
Oh nvm, create_card changes the set to either base or enhanced
I said nothing
haven't seen or heard of any issues yet
how can I give a card extra chip value? like for example if I play a ace of spades with a joker the value of the card goes from "+11 chips" to "+21 chips"
like hiker?
i mean its possible but i cant tell you how exactly
exactly
https://github.com/Steamodded/smods/wiki/Perma-bonuses
this probably
oh thanks
guys how can i add an info_queue that gives information on the edible keyword, i don't want to do a consumable type or something like that, just the description
like a pop-up when you hover over the word with the mouse?
oh no, like an extra bubble
idk myself i wanted to know if you meant the other thing
you mean an info_queue with custom text?
yeah, without creating an extra consumable,edition etc
you have to put it in the Other section of your localization file
if i don't have a localization file i can't do it?
Then append { set = "Other", key = "the_key_you_used" } to info_queue
you still can but I wouldn't recommend it
Making a localization file is easier
ok i'll do one then
return {
descriptions = {
Other = {
something = {
name = "something",
text = {
"something else"
}
}
}
}
}
that's what your loc file should end up looking like
does anyone know how to approach giving an enhancement a "use" button like cryptid does? :0
then you pass "something" as the key
I'd recommend putting your mod prefix in the key to make sure it's uniqur
i looked in cryptid but.,, i couldn't figure that out
tysm it worked perfectly
also can i color the name of the description?
What .lua has the code for the vanilla jokers? đ w đ
it's spread out but mostly in card.lua
Aside from some specific examples, a lot of vanilla joker code is in Card:calculate_joker(context)
Those that aren't are cards that are needed in non context scenarios, like Pareidolia is checked for in Card:is_face()
The easiest way to find a specific joker is to just search for it by its English name in your code editor, because for some bizarre reason, those effects are determined by card name
wimter . 3.
You'll typically find
- It's defined name in G
ame:init_item_prototypes() - Its return block in
Card:calculate_joker() - Its vars (if applicable) in
Card:generate_UIBox_ability_table() - Any vanilla examples of
find_card()searching for that card, though SMODS replaces it withSMODS.find_card()which uses its key instead
Hi hunnybyte!!!
Hiiii
I must grabe me some food before I sit down and Porgramm
porgram.,,
i should probably stop progrem and eat
Perhaps I get another bento....
idk what im gonna get but its either dino nuggets or soup

oh also i wanted to ask you coding question but rn imnna take a break
real
I'm always a heavy supporter of soup
I used a different word there and got automodded lmao
Well whenever you're available
Modding question
is there a context for âif a joker was moved (like drag dropped)â?
I want a function to trigger for when a joker is moved directly to the right of the joker I need the context for
i have a profound and intimate support of the suppertime meal known as soup at a rather large capacity

yurp im making most of if not all of alpha
Question. is there a mod that allows me to manually play the scoring animation one step at a time, so, I can press a key to advance to the next "event" in the scoring, (like, the next card to be scored, or the next joker to trigger, etc)
i wish, i have ones that need to trigger when dropped in the right spots
oh ty thats v kind :3
paiiiinnnnnnnn (Im trying to fix this)
SPEEEEEEEEEEEN!!!!!!!!!!!

mine isnt even a fix mine just doesn't work atm LMAO
I donât know why it does that either ughhh
and WHY only when I click a card???
Like??
Nope, I have to calculate it manually in update

perfectly normal balatro hand
I have a joker that is supposed to check if a card is retriggered, and then return that card to the hand, and i used to have it working but something broke in testing and now it only does the first card played. I tried a fix earlier but it made it so that all cards, even non-retriggered ones, went back to the hand so long as a single card was retriggered. Thoughts?
SAVIOR THANK YOU
why donât you just revert to the commit where it worked?
No it isn't!
You have purple glass!
you're right.,,, im a fraud.,
where are the 8 bears
pot of greed, draw 3
you canât do that thats cheating /ref
YES I CAN THATS WHAT IT DOES
POT OF GREED DRAW 3
I overwrote it while trying to do the fix that didn't work
... roll my dice
and I attack and I win right�
I still have stuff to draw and I'm annoyed cause I hate drawing. I'm trying to divvy art out to as many other contributors as possible so I don't go crazy and have a depressive episode trying to do the art myself
someone tell me, i will give you a very poorly drawn joker
Also banned! 2005
-# (ik ik it's a different reference y'all are making :3)
OMG I WOULD DO AN ART!! :3
Nice dbza ref
You'd have to join our server and get familiar with the source material which is a lot to ask lmao
did it w/ cardsauce, im a professsional art student

hey, sorry to barge in but i was wondering, would you, the mod devs for balatro say that modding is hard or not ?
play mods or coding mods?
coding mods
If you mean coding, it you don't know lua, then it's like everything else, you'll have to learn a lot
compared to other games, modding balatro is easy
Thankfully there's a lot of helpful guides, docs and refs
True from my experience
cus i wanted to make one for me and my friends with private jokes and all, but i'm completely lost x)
Not from what i could find, you can try scouring #1209506514763522108 for that. However, there are mods that let you slow the game down even further, so you might be able to use those to a similar effect?
You should start by checking this out #1349064230825103441 message
I'm trying to make a scoring animation that adds mult in a very specific timing
I'll look there, thanks
how do i get a boss blind to debuff a specific joker?
How does one destroy a card bypassing everything?
what do you mean itâs bypassing everything
ok, but the smods github "wiki" kidna lost me in it tbh
bu thanks i'll check the vids and all
Bypassing anything that prevents the card from being destroyed / makes a copy of it before it is.
I think the wiki assumes you got the minimal amount of coding skill, that's how coding documentations goes
i think i need some help w/ my code..,,
idk how to get started making a card go from one edition to the next
couldnt you add something to the invincible (
) card that has it's destruction prevention apply as long as it's not due to the bypass?
bump
A specific key or a specific card?
im trying to disable a joker, blueprint to be specific
No, because I'm not the owner of these destroy prevention items.
Cryptid made a tag that destroys your joker but gives it back in shop with the next edition
Forgot its name tho
Also idk if it takes into account modded editions
As for the first one, couldn't you copy what the remove function does (without actually using it in case other mods hooked into it or something)
Have you checked SMODS.destroy_cards?
as for the 2nd one.......... sounds impossible, you'd have to remove all references to the card everywhere, and you can't really do that, at least afaik
or maybe I'm overthinking it
maybe you can just set it to nil
That was what I started with yes.
I also do kinda want to be able to debuff the left most joker as well
can you like put the joker keys in a table
and then the blind checks for if one of the jokers is blueprint
and if you have it it debuffs it
like if you took all the randomness out of crimson heart
the key for blueprint is j_blueprint right?

Yes, because they just hook card:remove
Oh okay I figured this out actually.
Now, how can I change the name of a hand? is this a simple thing to do? or do I need to create a new mod that includes a custom hand
but i also dont know how to debuff a joker, i dont see anything on the wiki
SMODS.debuff_card(card, true)
oh
Why don't you make your own card:remove? Because of possible crossmod issues?
^ that's what I meant
the overthinking part was for the making the card unable to be copied before it's destroyed
Yes, that's what I was referring to.
and you can't do that unless you know where every reference to that card is and set all of them to nil
Where do I set the icon?
?
I'm not understanding
Have an atlas with modicon as the key
okii
thanks
They hook Card:remove and if it has the property they proceed but they make a copy first.
No.
ok got it
oh my god i came to ask a question and got wrapped up
why does this not score mult
recalc_debuff = function(self, card, from_blind)
SMODS.debuff_card(Card.get_id("blueprint"), true)
end
i think im doing this wrong
Card.get_id is for playing cards.
so what do i do for blueprint
for k, v in pairs(SMODS.find_card("j_blueprint")) do
SMODS.debuff_card(v, true)
end
Honestly I don't see a way you can avoid other mods copying a card in general, maybe for that specific scenario you can have your mod be the last to load and override the remove function but even then that sounds very prone to errors
thank you
set_blind = function(self)
for k, v in pairs(SMODS.find_card("j_blueprint")) do
SMODS.debuff_card(v, true)
end
end
What's the most effective way to send a calc context to 1 specific card?
I see the use of eval_card, but SMODS.calculate_card_areas returns some flags for another function
card:calculate_joker(context) or eval_card(card, context) probably.
Hi I'm trying to add a custom consumable to the game, the consumable is in the game however upon entering a shop or when I was in a shop on a preloaded save re rolling causes a crash
I got these in the console before rerolling:
INFO - [G] ERROR LOADING GAME: Card area 'shop_vouchers' not instantiated before load
INFO - [G] ERROR LOADING GAME: Card area 'shop_jokers' not instantiated before load```
and then the crash, any help is appreciated!
nvm I fixed it
Those errors are not a problem.
The former is normal but the latterâŠ.
Code?
Is there a way to change the upcoming boss blind for debug purposes
lines 817-821
G.GAME.spectral_rate = G.GAME.spectral_rate or 0
local total_rate = G.GAME.joker_rate + G.GAME.playing_card_rate
for _,v in ipairs(SMODS.ConsumableType.ctype_buffer) do
total_rate = total_rate + G.GAME[v:lower()..'_rate']
end
reroll boss button if you have debug+
where might one find this reroll boss button
I'll post soon my cat kidnapped me for food lol
You press 3 while hovering over a blind in the collection.

if you want a specific boss though do what somecom said
you might have to hold ctrl if you dont have that setting disabled
can i get a refresher on how set_edition works?
im prob not even gonna keep it bcos i have to do an upgrade system but rn i just want it to set an edition
card:set_edition('key of edition')
how would i make that affect every other joker than itself.,,?
You would put every other joker in a table and iterate over it.
have it go through every joker and skip itself i assume
they could use G.jokers.cards for the table if it's about the area, no?
Yes perhaps maybe?
i don't think it needs to skip itself since it gets removed before this triggers
well then
Then you would iterate over G.jokers.cards
hmm, okay I don't think i've done an iterate thingy in lua before
i've done it in C++ kinda
for k, v in pairs(G.jokers.cards) do
v:set_edition("e_modprefix_key")
end
i'd ask more questions but i dont wanna be annoying . -.
đ
I mean if you're willing we'd love to have you
idk what k v or i do in any of these statementss x-x
oh absolutely, i love doing spriteework to chill out
Hi hi! I have code for u!!!
its telling me to turn the = into a == when that is supposed to set the value, not check it

I'll dm for it
cool
is there a way to change blinds money reward?
Yes.
how
literally all im trying to do is set card.ability.extra.active to false but the game doesnt like that for some reason
i am so confused đ
Change G.GAME.blind.dollars
Remove it from the return.
in what context
but then wouldnt that make it below the return and not work anyways?
Any time when in a blind?
Put it in the func?
i have this but it only changes cash out, doesnt show the change
idk how to do it before selecting blind
You have to do it in the blind before or in the shop before.
how
Blind UI doesn't update unless it is removed and put back.
so how do i make it work correctly đ
I have a small question, I don't know why its never destroying the card like their is 1/3 chances to destroy the card if its a high card
I think I got this to work.
so you want it to give you money before a blind?
Use context.destroy_card
no
or its at the correct time but you want the animation or smth
i dont get the question
Yes, you maybe possibly could also update the UI manually.
it could work
oh i think i get the question now
but the change is when selecting the blind, i dont think it will update before selecting blind
so youve changed the reward money but the amount of dollar signs shown is still the old number?
you can update G.GAME.current_round.dollars_to_be_earned
that will dynamically change the dollars in the ui
in what context do i use that
wherever you change the money
<@&1133519078540185692>
bang
i dont understand
how to update it
its a string value
alright, brand new crash now, ive been staring at this for quite a while and i dont understand what the syntax error is
when i activate the lua extension it doesnt really give me any useful information either
You still have that end above the if
holy what is this indentation
it worked before đ đđ
it works but how i update it here
pyramid scheme đș
what's the actual effect you're doing?
wdym
the effect of the joker(?)
its a deck
it doesn't matter what it is, what's the effect
i dont understand đ
what does the deck description say
and you're trying to update it manually for each blind?
you would be better served using a lovely patch and a flag on your deck apply to add the extra reward
