#💻・modding-dev
1 messages · Page 231 of 1

im trying to make a joker that turns 4s into an enhancement in my mod, this dont work
should i be having the for k, v in pairs thing
i think its the context thats wrong
can you try putting a print() in there to see if it even runs
also, i suggest using
if context.before and context.cardarea == G.play and not context.blueprint and run for i,v in ipairs(G.play.cards) instead
is there a shop rate for specific consumable cards like how theres weight = for the packs? i've made all 4 of these and would like to make them difficult to find as they provide huge deck fixing
pretty sure ther eis
is it just a weight = because i had a weight = 0, in there and still managed to find them in the shop while trying to figure this out
think it might be rarity = for that or i just got unlucky while trying to test this?
having some trouble with stickers, tried to put the keys of different stickers into compat_exceptions and it just doesn't exclude them?
i dont actually know how to do that personally, but i believe some mods have already managed to do the same
This shader effect looks really good, esp with the static art as reference
holy overpowered
overpowered, but in the same way baron is "overpowered" 😭
probably quite good if you get it early enough
so I have a Joker where 10s, Jacks and Queens can be followed by an Ace to complete a straight
and the program works fine, but I am wondering: did I code it in a way that would fuck something else up compatibility-wise?
i don't think so but I would like some reassurance
ankh -> sell one copy
not even early enough, you only need to get 10 rerolls to reach x1.5 and 20 for x2
it's only queens
who's to say you even have support for card xmult by the time you pick it up
you can say this for literally any joker???
"who's to say you even have support for discards when you get yorick"
that doesnt mean its bad
yeah? the thing is with yorick you almost always can discard
you only need 20 rerolls (not a lot) to reach trib level power
yes, double the ranks, it's more flexible
people flood their deck with one rank when using this anyway
no one goes for full houses with trib
maybe in white stake you could get away with doing exactly what you want
but the fact this is rare is insane
this being only for queens doesnt mean its bad
wee is only for 2s
and is a very good joker
and trib doesn't require any rerolls and works on more cards
i think that's a very large increase in power
Oh hey Toneblock :D
you only need 20 rerolls to match the trib power
thats not a lot if you have good econ
you reroll anyway
you dont really go out of your way to do it
hi fytos i'm being a bit stupid here
Aren't we all 😌
I'll ask a question so you can look smart now
yeah i mean good economy is generally an aspect of all winning runs
Soo I'm starting out with modding. Is there a list or something, that explains how many and what kinds of contexts exist?
steammodded lovely
is this an overpowered joker simply because it allows you to use that economy to get yourself a scaling trib?
maybe?
Yep, the SMODS docs have them!!
Alr thanks 
Cat image my beloved
https://github.com/Steamodded/smods/wiki/calculate_functions
Cat..
yeah this is the one
🙏
Whenever @wintry solar is in chat, PLEASE rework Celadon Clubs. Using Royal Deck against it is a near-guaranteed softlock.
If it just didn't allow hands with the "disabled" card, that would still allow me to discard through my deck to find usable cards.
Straight up making the cards unselectable when it's a "type" that is LITERALLY MY ENTIRE DECK except for one or two stone cards (which did not get drawn to hand at start of round), it's... Upsetting. And completely impossible to play against.
yeah should be simple to figure out
just remember about ease_hands_played(1)
I'm getting the hang of it much faster now I thibk
ease_hands_played?
you're gonna need it most likely
Anyway I appreciated the spirited discussion on the balance on the joker I guess?
yeah
it's not a discussion so much as a dumb argument 😭
i coulda entered a bit more respectfully
average aikoyori day
so i added half the ascii specs to my cards
the current problem is that
should you be able make a better scoring hands if cards are all the same cases
omg celeste card collection
better hands if you have proper punctuation
Yes 😅
I agree with the baron remark, buut it seems like this is way easier to build towards than baron
- A basic economy allows you take this to the moon
it's gonna introduce a shitton of hands to the mix
which might be problematic later
but EH
ending with ? randomises mult a little, ending with ! multiplies mult, ending with . adds some flat mult
:peacelineatthephone:
:D
your website is amazing holy
if you put a valid tld after period then the hand become website
and you get chips based on the status code of that website
i mean 600 - status code
this idea is the idea ever
smods https 🙏
good but i'd think specific status codes giving more/less seems more interesting for the meta
the 600 - something encourages people to send a request to a real web server
ah
i mean
sure i guess
i mean i might just have to list things
maybe there should be a joker that checks it
idk how you would trigger some status codes though tbh
Curled Hair Joker
- If hand is a Website, send a request and apply the effect depending on the status code.
If the status code is divisible by 2, add x chips
If the status code is divisible by 3, add x mult
If the status code is divisible by 5, gain $x
cURL
j_
why when i try doing j_triboulet it doesnt show up in my challenge
j_triboulet
are you sure you banned the correct type
aikoyori's favourite challenge
banning chicot
oh im an idiot i did key=j_triboulet isteand of id=j_triboulet
nope still didnt work
if code starts with 1 enhance all cards in hand
if code starts with 2 then X 20 mult
if code starts with 3 retrigger all cards
if code starts with 4 randomise x mult
if code starts with 5 destroy played cards
otherwise gain 5 dollars
this should be a common because websites are not an easy hand to make I'm pretty sure
it's based on niche situation when
- letters are enabled
- you have the period
- you can select that many cards in hand
- hand size
localhost: 
i mean if you're smart then yeah
you'll still need 9 hand size
oh right you can't use localhost
127.0.0.1
Trying to find the context for being in-round but not having played cards yet, any ideas?
Can't seem to find it, if that exists
check for G.GAME.blind.in_blind
this still aint working
print command prints nothing
How do I check for seals and editions on a card? I just need something that returns true if a card has at least one of those things
Where can I find a wiki or information about functions of the format "G.GAME"? 
you look in source code :>
G.GAME has a lotta things
generally related to the current run
Just download the version that doesn’t have it 🙃
wait that boss prevents cards from being selected?? 😭
who needs cruelblinds when you got "The Softlock"
new blind idea:
losing to it posts your long/lat in #📢・announcements
i think it would be pretty cool actually
X200 base blind size
everything works but remove 😭
Good morning chat
stop dying smh
all the contexts are correct, all stuff works normally
all, even message, but remove
I'd try context.destroying_card
same outcome
any hooks or patches that you've made that change destruction behaviour?
nope
this piece of code is copy-pasted from Weeormhole deck to its sleeve
and somehow
Weeormhole deck works, but Weeormhole sleeve is only missing the remove
are you sure it's the same outcome, btw? From what I know, destroy_card doesn't behave properly (I think it might not be in SMODS anymore? Though I'm sure I'm wrong on that)
no wait, I'm wrong, there's more going on there
ignore me, I'm misremembering, my own code does use destroy_card sometimes and works
Porcelain Plague
- All Cards debuffed until you play the one sole cards in your deck that isn't
am I cooking
yeah, no you're entirely right, I was majorly confusing some stuff and just puking out wrong info, haha. I'd delete the messages if it didn't make you look crazy 😛

Friend made this for me
so the message triggers but the destroy effect doesn't 🤔 Looking at the SMODS function that handle that, I don't quickly see why this wouldn't work. I'd save the issue and see if Eremel or Aure have some insights 😬
🏳️⚧️

the pill should look less busy imo
the only problem being that remove works in SMODS.Back but not in CardSleeves.Sleeve
btw, is there a proper SMODS way to change card create behaviour of vanilla packs? Or do I just patch it?
... huh
Fair. But I like it as is
might be some jank with the way card sleeves hijack the back eval then?
also the font is kinda thin
Ah, probably some jank that accidentally doesn't pass things properly.
you can take ownership of them
Are there any other mods that are sleeve compat that have destroy effects on their decks? Maybe they have a work around already
there's take_ownership_by_kind to e.g. modify all arcana packs or whatever
That does add my mod badge to them, doesn't it?
True, but half of the tarot card have that thin font, and half of them dont.
Ah okay, great. That'll do it then! Thanks 😄
thin ones are the ones with long ahh names
Tbf. Estrogen could be classified as a long name. As I said my friend made it for me, so im not gonna change it without their permission
it's not as long as incantation is it
Fair, but still. My 2nd point stands
8 letters is about the max I can make work with thick font, and that does get dependent on the letters, because the N, W, and M are wide as hell compared to the others
It's a cute art gift you got, Carrot ☺️
It'd be mean to discard it or change it when my friend made it for me, so I'm gonna use it even if it's not perfect
hey I'll not judge
you can do whatever you want I'm just doing my nitpicky thing
don't worry about it if you don't wanna change
That's fair, then
also I'm not that good at art I'm just rambling what i see so please don't take it too seriously
Fair enough
Hello
i love miku
I had had the opposite idea for a Blind
But it’d be secret
😭
if you play this secret card all your hands are debuffed?
oh ok
Then a new one is selected
Anyways that was the raw concept
Idk if I like it
I have a joker like that, which sets your scored chips back to 0 when you play that sole card
Hey can someone help me with something real quick?
Im trying to get a joker to give x2 mult when a steel card is scored but im having a hard time with the enhancement check
if context.individual and context.cardarea == G.play then
if SMODS.has_enhancement(card, "m_steel") then
return {
card = card,
Xmult_mod = card.ability.extra.Xmult,
message = 'X' .. card.ability.extra.Xmult,
colour = G.C.MULT
}
end
end
end
}
This is what I have rn
no, cardarea is fine
SMODS.has_enhancement(context.other_card, "m_steel") is what you wanna use
OH
Thank you very much
I knew it was gonna be smth like that
Works perfectly now
Ohhh, does Steammodded work on Mac as well? I saw it supports linux systems!
yes
Sweet
<@&1133519078540185692>
🔫
ty egg
hey i'm getting crashes whenever i try to cash out, while running talisman and saturn
is your talisman number limit set to vanilla?
it's a know issue that talisman is broken when on that setting
Heyy
probably saturn/smods incompat then
do i need a different version of smods then? or is there nothing i can do
I am trying to use SMODS.https and
Do I have to do anything special for my tarot card to show up in boosters?
I can't know for certain if I don't see the crash, but this version of Saturn should do #1278357824975405200 message
no
Cool cool
oh my god thank you so much it worked! Cheers
i have 1400 plutos so just them being on screen stunted my framerate so much lmao
seems like if you have both the "disable animations" on from saturn it always crashes at cash out, but if you use talisman's its fine. slightly annoying because talisman doesn't truly skip all animations, and is slower than saturn but oh well
how do i patch a smod file? I found this reply "it doesn't rely on any mod folder name
'=[SMODS _ "src/utils.lua"]', '=[SMODS modid "path/to/file.lua"]'" but can't understand
just edit smods directly i guess
i mean lovely patch
you put those as the target file names
target = '=[SMODS _ "src/utils.lua"]'
I keep reading your name john aura
aure*
thanks
john aura is what the rizzler evolves into at level 21
Recently I learned that the rizzler is a person and not a Platonic ideal
one can be both
I think Plato disagrees
that's true, but he didn't know about the rizzler
the art is in, now just the system that allows it to spawn 😄
does it take a ss of my screen
Actually Plato was once known as the Riζζlυs
What does it do
it reads your lips and makes you lose the game if you bad mouth it
upgrades sci-fi cards when you use a planet
a card enhancement that gives 5 chips and 1 mult for every time it's been upgraded, and gets upgraded when it's scored
star wars is a joker, so it's neither, though it's of the Sci-fi Genre
still gonna need to test if this is fun, but I don't doubt it's strong
does anyone know what the weight of the base booster packs in the game are?
but because I'm spawning legendaries under weird circumstances, I do want it to be fun enough for the effort to be worth it
Something something hard and soft sci-fi
Hey guys, does this concept sound cool?
Curses
A new type of upgrade that's more easily obtainable, giving an upside and a downside.
Example:
Curse of Jimbo
+10 Chips for every scoring card played
Jimbo now randomly appears and says a quip every so often
you can see that in your dump, by checking for --booster packs in game.lua! Most of them aer 1
star wars and 2001 are equally sci-fi when you're comparing it to an Adam Sandler comedy, so I'm luckily not going to be pendantic about those distinctions 😛
What about Click
fantasy. Remotes are real technology, and the magical powers were given to it by an angel
also I fucking hate click
I have a similar idea, but mine are (Dis)enhancements which means they can be interacted with via existing systems
Maybe it’s an alien 👽
It made me cry okay 😭
no Morty's definitely the angel of death
which part? when he joked about having sex with his daughter the first time, or the ninth? 😛
nah i know people like it, sander comedies just rarely are my thing, haha
To be honest I don’t remember any of that, I was like a young teen when I watched it
I cried at the end
Sufficiently advanced technology etc.
a quote from an author who clearly never read fantasy ❤️ (i know it's not said in that context but people miscite clarke about it all the time)
you're about to put me in rant mode as I start going into my very strong opinions on genre 😛
Rant away
-# I’ll leave and go back to work 
hahaha
i've been goofing here while i should be finishing up a client's assigment so i should definitely not rant honestly
I can't help myself
Oh and btw I don't think I have ever watched a movie with Adam Sandler in it
dont
Tell the client they paid for a rant and deliver it to them
keep it that way
He's in some great ones. I like Punch Drunk Love and Uncut Gems, as the basic 'i don't like Sandler but...' picks
For some reason White Chicks is popular in Brazil
i love that you've commited to making that without having seen a Sandler movie, haha
It’s not related to Adam Sandler
no i was gonna say, that's a Wayans brothers movie, right?
I do have a hole list of Sandler movies to add to Kino, just because they're well known and good for the synergy system, but I'm hoping I can concept some effects for those jokers without needing to watch a bunch of them for ideas, haha
hole
Why do I want to make Yume Nikki cards
I know it's a meme to make a parody out of that poster
i'll leave that in, that feels like sandler'd enjoy that typo
soporific
I thought Sandler mostly made movies to make money and hire his friends so they can also make money
You know what. I think I will.
that's my understanding as well, yeah. which seems admirable to me, haha
I'll add Effects as unique consumables
My brain can only remember one actor at a time
Isn’t Nicholas Cage the same?
Minus the friends part
I still want to add cooking to my Balatro mod. But that's for the future
no, Nick Cage does movies to pay off his massive debts for castles
Oooh, that's a fun idea, haha
That’s the making money part
After playing Dredge I was playing around with adding fishing
Balatro but with crafting
I mean I do plan on adding Potion Brewing
I did have an idea for a Joker like that
Kino's spellcasting was going to work more like a crafting system before I felt like it was too much of a hat on a hat
Farming would be necessary for that, though
@hushed field unrelated do you know Chespirito
There was a POC for a farming mod
POC?
Proof-of-concept
Oh
Well someone added a button that brought up the farming CardArea when clicked
the comedian? I'm vaguely familiar with him due to having dated someone that loved El Chavo, but I've not interacted with anything of his outside of talking about that show, hahahaha
Yes. Recently I watched an English language video essay about him. Not sure it was the greatest but it’s rare to hear about him in the anglosphere despite his fame south of the US
Return dollars = … in the table
Honestly I don't know why I decided to add Women as a Suit into Balatro. I thought it would be funny, but now I'm just confused why I decided to add it
Gonna keep it in
But still
😭
kk
I've officially released my Joker Pack. Where can I share it?
Get yourself a thread going in #1209506514763522108.
Okay. 👌
SMODS.Consumable{
key = "jimbjoke",
set = "JimboCards",
loc_txt = {
name = "Joke",
text = {
"Does nothing.",
"{}",
"Sorry!"
}
},
atlas = "jimboatlas",
pos = {x = 0, y = 0},
cost = 1,
calculate = function(self, card, context)
return {
message = "Nothing."
}
end,
can_use = function(self, card)
return true
end
}```
im trying to display a message when the consumable is used but its not doing anything
if anything that would display nothing a LOT of times
pretty much when anything happens
how would i do it properly?
using is a separate use function usually, but that doesn't support calculate returns
Do it in use maybe
i can't recall if you can do if context.using_consumeable and context.consumeable == card then
it can
not on use
I guess it can be called if the card stays in the cardarea
Hmm... For my Yume Nikki Booster, do I call it the Veranda Booster or the Nexus Booster?
it doesn't
so how do i do it
lovely patches
I personnally made a giant lovely patch to the evaluate_play function so that I can call effects from my consumeables when used, I have to figure out text but it works
(unless I make negative jokers of said consumeable which would also work)
to return a message, you could just card_eval_status_text where you'd otherwise return, right?
card_eval_status_text is entirely separate from the calc function, is it not? or am I just misunderstanding the way that gets triggered?
its not separate
but it is used to display text from a card, said text will be displayed under/over a card depending on the cardarea
you can just throw a SMODS.calculate_effect anywhere that doesn't support calc returns
where do I find the current score and the score requirement
G.Game.chips, g.game.blind.chips_amount i think
I'll see if that works
that will be called/processed the same way calculate would ?
this definitely works when it's in the Use function of a consumeable
I just tested it, it does exactly what you'd expect it to do
yeah calc_effect can be done whenever you want
calculate = function(self, card, context)
if context.using_consumeable and context.consumeable == card then
return {
message = "Nothing."
}
end
end,
can_use = function(self, card)
return true
end,
use = function(self, card, area)
return SMODS.calculate_effect()
end```
Like this, right?
What do I put in the args for SMODS.calculate_effect?
what are you trying to do
where in the source files can you find the implementations of the vanilla cards?
take the table from your return and put it inside calc_Effect
alot of it is in card.lua
yeah as usual I asked a question and then immediately found what I was looking for 
calculate = function(self, card, context)
if context.using_consumeable and context.consumeable == card then
return {
message = "Nothing."
}
end
end,
can_use = function(self, card)
return true
end,
use = function(self, card, area)
return SMODS.calculate_effect(card.calculate, card)
end```
like this?
what context do i use to make a joker run some code once at the beginning of the run
kind of like an init kinda thingy
calling card_eval_status_Text in use ?
yes
i use it on custom planets to have them display a relevant quote when they're being used
good morning fine chatters
but i wasn't sure if i actually just used that func for it, haha
i realized i didnt give a proper greeting
a lot of mods either hook one of the other inits in vanilla, like ancient joker, or patch a function into the game init
anyway today i finally resume not lazing about and doing more shit
ok so
how would i go about doing either of those options
and if there is a place i can yoink code look at an example, which one would you recommend
SMODS.calculate_effect({ message = 'Nothing.' }, card)
ok so this doesnt work
oh thanks
i get it now
if i use this, do i even still need the calculate table?
no
or i guess i could do some jank bodge solution with like
woah. i just downloaded your mod we had like super similar ideas LOL
under add_to_deck or blind_start init a flag and then set the flag to false
so it only runs once
idk
actually add_to_deck would work
curse of free thought, ive discovered like half of my shit is simmilar to others
though the downside is that all the values will not be initialised before you pick it up and therefore cannot be shown
but also
do copies of the same jokers share vars
I didn't play any other Joker mod before that (apart from the Joker fusion mod) so I didn't know anyone else's ideas.
Now I have the hardest part of modding, coming up with a name!
have you considered naming it after a spectral card?
Like for the Mod overall. I was going to call it Pawlatro but saw that someone else already has that name 😦 😦
I could go for FoxDeploy Jokers, just straight up naming. Or Menagerie, since it's all about animals. Or Animal Endgame pack, since it's focused on end game jokers for more options than steel + mime + baron
I just named my mod Cherry's Balatro Mod.
Animalatro
I am so good
i went simple with mine, just called it Dilatro
names ?
I named mine in a way that only tells you what it's about if you're on specific subreddits, or I guess watch a lot of Northernlion, haha. Which... in hindsight's not a great choice
name it after a card
question chat
is this balanced :3
can you use code to edit the description in loc_txt
yes
shit
you probably need to use generate_ui to generate your own descriptions in that case though
yeah seems fine, if the score's on fire too long it'll burn down anyway
i also didnt account for relic sets too
check out the funny i finished https://discord.com/channels/1116389027176787968/1349392241571008583
that will uh, definitely significantly make her stronger than that
:3 balancing my mod is painful
Amazing
it's gacha inspired, no balance is the way to go
shit, where do i learn that
god is this idea too ambitious
localization text gets loaded into some giant table that you could probably edit
ordo i resort to the bodgey solution that uses like 29 vars
What are you trying to do
youd have to figure out how its stored though it does some parsing
or could you not just have multiple localization texts and switch between them you can override the key iirc
I do have some fun animal names.... Fickle Fox is one I like. Or Incremental Hermie, Benevolence.... Interesting
@lyric wadi this isn’t too complicated, for example: #💻・modding-dev message
Could someone please explain why this doesnt work? i have prints for both checks and neither of them go through
bingo joker
it generates a bingo board where each cell is a playing card (rank & suit, e.g. 7
or Q
)
whenever a playing card is scored, it's daubed on the board
joker gives X2 Mult per completed lines
i made some more, higher effort ones like this one https://discord.com/channels/1116389027176787968/1348461931631087647
definitely out of my league but it feels like i can do this, somehow
do you need to edit loc text for that, i feel like editing the loc vars would be wiser
not sure, i'd have to check but i don't think context.individual and context.check_enhancement are ever true at the same time
see my shitty original idea is to just have 25 vars in the description that i set accordingly with a loop
like #1# #2# #3# #4# #5# and so on
and i would be able to work with that
if you wanna really make that pop, you definitely want to get into generate_ui. But you can definitely do that without it
it wasnt working without it either so im not sure that would work
but also that's a lot of vars and i feel like i can do better
I can think of some ways of doing it
I use logInfoMessage, I haven't used print() myself
I made a lower effort one like Fish: https://discord.com/channels/1116389027176787968/1232074540633428028
is this quantum enhancement shi
I have some jokers that are quest or codex jokers, that randomly generate multiple variables that they display, and that's all just done through passing on into loc_vars. Even the icons technically wouldn't need generate_ui, i think, because you can just pass a sprite object, the same way you can pass on a dynatext one
💔
the main obstacle is how to present the board
yerp
I think you do need to create nodes to accommodate the sprites
is the syntax the same
i think i can do the actual bingo logic
like i have an idea of how i will implement that
it's just the description
I suggest using main_end
are you sure? I know dyna_text doesn't need them, and that's also an object node. Though there's a mod that adds the icons in front of the words as QoL enhancement, so there's code to check how it works!
Idk what the difference would be code-wise
I'm not able to name the mod because I've only played with it in Dimserene, haha
should this only choose from a pool of suits and ranks that your deck has
or do i make it much more painful to actually fully utilize her effects :3
Nah, at that strength it's fine if it doesn't. Otherwise that joker's a very deck-fixing focused one
which one should i look at
im nerfing her 😭
I'm sorry, I can't say, but if you play with Dimserene, you can maybe find it which it is. I can check later today for you, though, if you remind me!
ranks in deck
random ranks in deck, but random suit (can be diamonds even if your deck doesnt have it) then?
yes
loginfoMessage("your message here with some string concatenated like this :" .. someString, "scope")
no i meant the one you have in your mod
i think balancing wise, that's the best option, but it may feel a bit weird if it's not consistent between the two
Oh god this mac is so nice but wow do I hate this operating system.
Why doesn’t the “Chosen Suit” just display the suit?
-# what do you mean by that
Oh, sorry! I haven't implemented them yet, so they're not pushed to the git
You can use loc_vars
ag
oh, so you mean the color of the "Spades"?
If you only care about doing text, you can look at my Skyscraper and Lvl. ? Death I showed above in my mod
its randomized
But you can display the actual value
Like the game does
I have a The Rock Blind (unrelated)
im uh, not sure what you mean by this
Club
should it be, uh
"Hearts cards" or wat
Hearts, Clubs, Spades, etc etc
"Played Clubs cards give X1.2 Mult"?
If scored card is "insert suit here"
where skyscrape
Or that yeah
is it tower into sky
Clubs card
Club confirmed
No it’s Skyscraper

Nah, ingame doesnt have that wording iirc
im gonna make a malverk mod that replaces every single heart in the game with an Amogus
i must be blind then
oh, its "Played cards with Hearts suit"
Work in progress shader, I am trying to make sparkles / glitter for a new edition that is inspired by special edition trading cards, like Yugioh cards
Maybe i am dumb but I write it here then convert later to work with pipping in to dissolve mask. unfortunately couldn't find a good way to iterate on brand new shaders better than this
You rn
where 😭
Now Scoring Club
you need to not use suits_singular to get plurals. I had the same problem
quick fix ❤️
@lyric wadi I see it wasn’t in the main branch: https://github.com/VictinZero/balatro-victins-collection/blob/alpha/modules/jokers/skyscraper.lua
It was in the alpha branch
not so blind now am i
DebugPlus allows you to see shader code live in-game
I use that on my main PC, but haven't set it up here on my laptop yet. Mostly due to being a luddite and hating macOs
how do i uhhh, change the color of this to the color of the suit
@quartz ravine
logInfoMessage("Im reading enhancements!", "scope") is this correct?
It is AMAZING for debugging shaders!
There’s a special control for it I think
See Castle
I got it wrong
sendInfoMessage("LuckY! Copying this card", "goldenRepeater")
oh so i add the joker key to it?
mmm
lads i have an idea
Castle stores the color in its extra vars
I also want to make a sparkling shader for an Edition (with actual sparkles) but I’m not sure how to go about it
Use this
the value in Suits should be like 'Clubs', or 'hearts', or whatever
how would i use that in the description
I am working on it. I was using the kind of specular lighting from gold seal, applied to the motes / sparkles, and using a color mask to have sort of polychrome like colors in specific areas of the texture, but I am still really trying to troubleshoot some things
Shaders are soooo different from standard OOP
how do i use {V:1} thingy
Most examples I found were too hard for me to parse. I found one that seems easier, but I’m not sure what’s the best way to handle a particle system and integrate it with Balatro
if i put this in my loc_vars
then uh, it should change color to the suit color
if i put {V:1} right?
Here is how I do a complex example of it
loc_vars = function(self, info_queue, card)
card.ability.polarity = getPolarity()
card.ability.polarityStr = card.ability.polarity[1] .. " and " .. card.ability.polarity[2]
local color1 = G.C.SUITS[card.ability.polarity[1]]
local color2 = G.C.SUITS[card.ability.polarity[2]]
local suit1 = localize(card.ability.polarity[1], 'suits_singular')
local suit2 = localize(card.ability.polarity[2], 'suits_singular')
sendInfoMessage(
"suit1 is " .. suit1 .. "and suit2 is " .. suit2,
self.key)
inspect(color1)
inspect(color2)
return { vars = { suit1, suit2, colours = { color1, color2 } } }
Look at the return statement for most of what you need, then here is how the token replacement works
"{C:inactive}(Currently rewarding {V:1}#1#{} and {V:2}#2#{}"
Do you think it could be handled inside the shader or only outside?
If it’s handled at Lua level it seems easier to write
That's a good question and I do not know if you could do it outside of the shader pipeline as it is today without like a ton of work.
I am doing in the shader only and just tweaking the math so I always make my particles in the same place, since the particles aren't real, they're just math derived.
Ohhhhhhhh will you have like an Eva unit 01 Joker. Or like a Gendo joker with reflective glasses?!
g2g bye
Does anyone know of a reliable way to get the jokers to juice up when it gives an individual playing card chip/mult/xmult/etc??
e.g. Lusty Joker juices when the +3 is added when the card is scored, however with my custom jokers i just get the message on the playing card but the custom jokers dont juice.
I've been trying to do this using events but the timing is not correct (usually juices when the cards default chips are added, not when the joker effect occurs)
can i see your code so far
mine juices automatically as should most returns that include chips mult xmult dollars etc
what smods version are you using?
oh hi aure, can i fetch you for something
i might just be stupid but i havent found any documentation regarding quantum enhancements
1.0.0~ALPHA-1428a-STEAMODDED
that's like what
2 weeks behind
should be fine but you should update
show your code
this is the code pretty straightforward
yeah that's self-induced
i wonder when we're getting 1.0.0 beta
card = context.other_card removes the juice
is it the card return?
11 days ago, actually
aaaa got it, thanks
yeah the card return is unnecessary
i wonder when we're getting 1.0.0 gamma
or rather, moves it to the scored playing card, which was already going to be juiced either way
john john, why is it that when my joker is retriggered, this still runs
because someone forgot to set context.retrigger_joker in the repetition context
i wanna say it wasn't me, but it was 
i feel like im the only person posting stuff relating to retriggering jokers rn ❤️
Does the SMODS.has_enhancement work for custom enhancements? And how would I get it to check for such
it works for custom enhancements too
i think im tripping
Do I just put my SMODS.Enhancement key where id normally put “m_steel” etc
why did 9 of spades return the id of 8
SMODS.has_enhancement(card, key): Returns true if the given card has the specified enhancement, either as its natural enhancement or an extra enhancement from jokers. from wiki
😭
why are retriggers on repetitions so weird
aure please i beg of you where can i find any explanation of how quantum enhancements work
Ah
Well if they're working on it its probably best to not bother them about it
I will ask if i see them in chat later tho
they did already document quantum enhancements
from the picture of their uhhh checklist
-# i dont know the word for that lmfao
the jist of it is this
you can use context.check_enhancement and return a table where the keys are the enhancements you want to apply
so i think you are not bothering them at all, IN FACT, i think it will be very useful if its posted early considering its a very confusing context :3 (or my brain is just too dumb to grasp the idea of it)
if context.check_enhancement and context.other_card.config.center.key == 'm_gold' then
return { m_steel = true }
end
for example this makes all (physically) gold cards act as steel cards too
i know the gist but the specifications are a bit important, i cant find much info about how to use context.check_enhancement and my attempt at bruteforcing doesnt seem to work
what's context.G.play supposed to do
they probably only want the played cards to be affected
so it only checks the scored cards, i dont want held cards to be affected
or well
played
fair
anyways there is no cardarea passed
i think in that context its probably better to allow for that extra something to happen
you can check the area on the card itself but i doubt that works correctly
there's a different issue though
maybe run a loop through G.play.cards, and just check if the card is in there?
i dunno
wouldn't be needed, context.other_card.area == G.play
oh i see
but as i said, i doubt that works correctly
get_id is forbidden in this context
it infact doesnt
forbidden?
you cannot use it
i see
why? because get_id needs to know if the card is a stone card
and to do that, it checks for quantum enhancements
this isn't ideal as it doesn't allow for more complex interactions, maybe there will be some kind of system in the future that can handle that better
for now all you can do is check the base ID
i guess you can also check if it isn't physically a stone card on top of that
So this happens, uhh
create_chemical_overlay = function()
G.FUNCS.overlay_menu({
definition = create_UIBox_generic_options({
back_colour = G.C.ELD.BACK,
contents = {
{
n = G.UIT.R,
nodes = {
create_tabs({
snap_to_nav = true,
colour = G.C.ELD.BACK,
tabs = {
{
label = localize("k_eld_combine"),
chosen = true,
tab_definition_function = combine_tab_function
},
{
label = localize("k_eld_inventory"),
chosen = false,
tab_definition_function = combine_tab_function
},
{
label = localize("k_eld_exchange"),
chosen = false,
tab_definition_function = combine_tab_function
},
}
})
}
}
}
})
})
end
And this is the code responsible
combine
What?
card.base.id ?
combine :3
Combine 👍
is there a function used to get the localized versions of messages for cards? wasn't it called localize
yeah
okay
it's not in the localization part of the wiki, from what I saw
I'm just getting into balatro modding and lua in general, where's a good place to look to get a good understanding of how the UI works? other than the wiki are there any mods that would be good to look at to see how others do things?
Maybe not in vanilla but in my mod….they do do something!
The Yugioh mod adds some new ux areas, Joyous Spring
oh nice
N also writes incredibly readable code for how complex his systems are, so it's a good one to learn from!
related question: can you move the stuff that describes consumables/card backs/etc. to the localization file
if so, how?
My localization file has every single piece of localization in Kino, if you wanna take a look at how that's structured
thanks!
I was reading through the wiki's UI section and I think I understand the node structure, I'm just confused on actually using it. I might just need to look at the game's source more to understand how it works, but I wasn't sure what the best practice was for modifying the vanilla UI to not mess with other people's mods that do the same
I wanted to check it out just because it was yugioh but I'll check it out for that too!
fair nuff
ok im having a bit of trouble figuring out the best way to go about implementing this joker idea
so the concept is that it copies the ability of random jokers that can currently be generated with the same type of code as judgement. its appearance does not change (at least for now), but its ability does and its description changes to match
trying to figure out how to implement this is tricky though. i know how to make a joker display another joker's description, that just needs a key, but the loc_vars provide an issue. how can i make that work with loc_vars?
not to glaze N too much, but it's honestly one of my favorite mods to play
right now im just trying to get the description changing down, then i'll figure out how to copy abilities
im thinking the approach for description and ability copying might work if i can initialize an invisible card somehow, but im not sure if thats possible to do
but that's because i am one
are there actually ANY good resources to learn ui stuff
cuz while i appreciate people pointing out examples of ui usage in modi can look at
Not really anything that's more in-depth than the wiki
Pointing at well done other mods is the best examples out there at the moment. I think Thunk might be the only person confident enough with UI stuff to actually write a guide on it, haha
But I do think the UI system that Balatro uses is largely just some extensions on the Love2D UI implementation, so there's maybe something to find there
they are actually like, incredibly unhelpful to look at
I got into this forgetting balatro modding is relatively new and thinking it would have as much documentation as minecraft modding LMAO the mystery is fun though
with how streamlined they are with helper functions in a separate file, uncommented code, combination with other stuff making it unclear what is what
it's like asking "how do i prep oil paint" and being pointed to a bob ross video because he used oil paint
anyway
sorry for the ramble
This is the best and most comprehensive by far
https://github.com/Steamodded/smods/wiki/UI-Guide
Beyond that, learn by doing. Play around with it all, experiment and see what works and what doesn't
i know to you guys it made sense to point toward a mod that used it as an example to see how it works
but as someone who has no idea how it works, seeing a mod using it in a form that's pretty beyond its basic functions does not help me learn what its basic functions are
unfortunately
Yeah, no I get you, it's not weird to be frustrated about it, haha. It's just that unless someone commits to writing a guide, there isn't going to be a better option than referring to other code.
😔
And the annoying nature of the ui system makes it difficult to parse compared to other parts of the code. I'd honestly generally not recommend people do things that need UI implementation if they're not comfortable parsing someone else's LUA because of that
how do i check the base id of a card without using get_id()?
.base.id
this might sound really stupid, but there wouldn't happen to be some kind of way to hot reload or something right? like some kind of way to test little changes in code? for example if I was working on code that is executed when a run is started, is the fastest way to test things just saving my code, closing and restarting balatro, and starting a new run?
But Kusane, if it can give you any hope, I'm taking notes whenever I figure out how to do some UI stuff so that once I feel like I could actually answer people's questions about it, I'll make a guide for it 😛 (Though at this point, not sure if I'll ever get comfortable in my understanding of how UI works)
honestly at this point i dont even know why i went down the ui rabbit hole
depending on what you're doing, DebugPlus watch commands could be useful. generally hot-reloading mods isn't possible due to side effects
cuz even if i canmake a separate box, im most likely still gonna be duing the grid with 25 vars
however smods has a keybind for quickly restarting the game
its like 5 seconds of holding M 😭
or some way to put longstring as a variable but idk if that works
it's holding M, though we've been wanting to make it configurable
it's just over a second
thats why i pinned the game to taskbar and manually close and reopen it lol
actually
how would i display a grid of 25 values in a description
without using 25 vars
i dont think there's really a workaround that's worth persuing
you're already storing 25 variables anyway, aren't you?
the easiest one without needing to do all that complex ui stuff is
the main_end return param in loc_vars allows you to pass arbitrary UI elements
only use 5 vars, representing each line :3
you can just have one of those with a bunch of text nodes
if context.cardarea == G.play and context.repetition and not context.repetition_only then
if SMODS.has_enhancement(context.other_card, "m_steel") then
return {
message = 'Again!',
repetitions =
card.ability.extra.repetitions,
card = context.other_card
}
end
end
end
}```
So I got this to work with base enhancements (such as steel) but when I sawp out m_steel for my custom enhancements key it just doesnt work, is there anything I need to do to get it to work?
i cant figure out why the first debug message stopped printing
Again, have you actually read the guide written by Divvy & Eremel? It's very complete, lists virtually every relevant function and all the syntax, and explains exactly how the structure works with multiple minimalistic examples. It's not from a mod, it's written from scratch to explain how it works and how to use it
https://github.com/Steamodded/smods/wiki/UI-Guide
true but would it be grid aligned
probably not 💔
Always makes me type a long line of mmmmmmm’s in to my ide lol
same
accidentally crashed my game once because my code had "functionmmmmmmmmmmmmmmmmmmmmmmmmmmmm"
💔
Me too
-# i always press ctrl + S out of reflex
okay where do i put the code for the ui
do you have the optional feature for quantum enhancements set?
gosh this needs to be documented
Quantum enhancement!?!
it says what the code looks like, it explains the structure, it says what the code do, it list many functions
it is enabled in my main lua file im p sure
where in the lua file does it sit
on your card, you can add a "generate_ui="
and that's the ONE thing that's not on there
it should be going off then
allows for cards to be multiple enhancements at once
like i am sorry i understand you are trying to help
Well, it's because that's only relevant if you wanna change the standard way a joker's ui is generated. (or any card), the ui system article on the wiki details how to set up a general UI, which could be a config page, a menu, a whole new thing, an indicator, etc.
but that's the extent of how much i understand
most of the time, touching that method isn't needed
like
Yeah, that's true. In this case you'd probably be fine adding the ui to the update
i know that's WHAT im supposed to read
Do jokers expose support for different shaders?
you can add any UI elements before or after the main description using main_start and main_end in loc_vars
but i read it, and i didn't quite understand it, hence why i came to ask the VERY first question several hours ago
not directly
so "try reading it again" is unfortunately not gonna solve my problem
hey does anyone know how to disable the chip message? im trying to move it somewhere else but now i have two chip messages
call me whiny because i am indeed whining and i do apologise for that
Typically when I do shader effects on my jokers I just spawn new sprites as children, set them to custom_draw, and then manually draw the shaders in the draw function of the joker
Im supposed to use my custom prefix arent I 😭

mmhmmh,,,
loc_vars = function(self, info_queue, card)
return {
vars = {},
main_end = {
{ n=G.UIT.C, config = {...}, nodes = {} },
}
}
end,
GUH?????????
When I think about Balatro UI, it helps me to look at a Joker tooltip and break it down:
- Different colors of text are different text nodes;
- Each line of text is a row node—the row aligns them horizontally;
- Row nodes are aligned on top of each other by being put into a column node;
etc.
There’s some specifics like how the red background for xMult is also a column node with a text node inside, and some rare nodes like root nodes and object nodes, but most of the time you only need rows, columns, and text nodes
Try looking at a Joker and imagining what its tooltip’s nodes look like
what
Which (mostly) works aside from some minor issues interacting with other things, and it makes the dissolve animation a little weird
can you check if it goes off on your machine?

I'm not currently at my machine
ah, thas fine
/tp aure machine
im 100% sure my smods is fully updated
like from block game omg
1.0.0 BETA 0312B
Minelala
Yume Nikki Boosterpack
Anyone??
From me? Never

oh
what would amogus pack have
amogus pack have 3 cards, but only two of them are real. taking the fake cards immediately destroy it, thus wasting the pack
jumbo amogus pack has 4 cards
mega amogus pack has 5 cards but because it's a bigger pack there are 2 impostors
it only has this in it
The Nexus Pack has a new type of consumable - Effect Cards. Applies a new type of buff to cards, Effects.
you can spot impostor cards in the pack by noticing something wrong in the card description
you can use smods to make a keybind to another key for restarting the game 
for example an Impostor Gros Michel might say 1 in 4 instead of 1 in 6
SMODS wiki knows probably
You're probably gonna hate this answer, but i promise i'm not being antagonistic, this is just my experience with learning the ins and outs of many codebases over two decades.
UI code is almost always a complex tangled web, no matter what platform or framework you use.
For Balatro, it's all very dependent on what the UI is for, and how you've structured your mod, and what it is you're doing - card tooltips? Joker descriptions? Modifications to existing menus? Custom UIElements? More?!
The reason mods are listed as good examples to learn from is that it's usually easier to copy something that works, untangle it to the point that you start to understand it, then make it yourself but better.
I agree that the UI guide is overwhelming and hard to process on the first read or two or five, but it really is written in the simplest way that it can be. It just takes a bit of patience, experimentation, and asking for help on specific problems. More specific than "where do I put the code for the UI", ideally
@lyric wadi for what I explained earlier, something like this
where's the read the docs gif when you need it
-# (where exactly does it say to upgrade hand again)
hm?
you'd do it in the consumeable's use function
beyond that I'm not sure
quantum_enhanncements
oh.
that's not how you spell enhancements last I checked
Someone bring up the 98%
:cantread:
no no im sorry, i dont mean to imply you're being antagonistic
i'm just saying that, while it's an answer that would make sense for everyone else at almost every stage, it's just not applicable to me at this very moment
and it's completely a me thing
Thankfully it’s an emoji that only people that can read can see

here's me not having nitro :jimbo_spin:
it's a perfectly good and valid answer that i am not in the right state to be able to consume
if that make any sense
ok no where is it documented
Let’s go being poor
i guess you could initialize everything expected in there to false and then add a __newindex that errors
oh wait
nvm
i can't read either
technically it's still doable that way but not how i expressed it
loc_vars = function(self, info_queue, card)
return {
vars = {},
main_end = {
{ n=G.UIT.C, config = {...}, nodes = {} },
}
}
end,
Something like this can be used to add UI nodes after a description. The main_end is parsed as UI code (as described in the guide) and added after the description. Similarly main_start would be added before the main description. In this case you probably want to have multiple text nodes arranged in a grid of rows and columns there
does anyone know how to localize the collection buttons?
I'm having a great time right now
hey aure got a question on dynatext, are you familiar with how that works?
Learning stuff is hard. Take regular breaks, don't give up quickly, practice breaking things down into small problems, and ask for specific help whenever you get stuck
would the #n# var work in the text parameter of a column/row
I don't think there's anyone that's done any work ever with UI stuff that's not very understanding of any 'learning UI' related frustration, haha
UI is fully what killed my game dev project a few years back, just because it was one of the few things that was so frustrating to get working. It's why so many games just have very utilitarian UI 😛
no, those are only handled by the localize function. a single text node does not have that kind of capacity
I'm wondering how I should implement Effects... I know they could probably use a better name, but I can't rename them because that's what they're called in Yume Nikki.
100% this. I feel like I know the ways of most portions of the game code at this point, but I still struggle with UI sometimes
depends on the question
I have a custom indicator that I wanted to place on the top right edge of the card, which is pretty easy. Moving it to the exact top-right part that I actually want it at? frustratingly impossible
I got some ideas, but they rely on creating a new type of card modifier. Is that possible?
i can finally get back to work on puyomod
would it be possible to make a dynatext that could rotate between description tables? i noticed that in misprint's code everything seemed to be just strings, could it handle line breaks?
which also means i can figure out why all my suits are called error
loc_txt.collection if you use loc_txt
would i be able to get away with doing this
I know in unity, I got really frustrated by the arbitrary nature of the numbers you use for UI and how unintuitive they were
if you use localization files, I don't remember off the top of my head and forgot to put it in the docs
omg keku from hit balatro mod cardsauce

yeah I knew that already
but someone wants to translate my mod into Chinese and so I want to put it in the localization file
you want the text to be in a G.UI.T node, so you'd have to add one node there, but I think this would work
idk how the hell I missed that wiki page when updating the docs to cover things like this
If i'm understanding your question right, it would be easier to just assign a single table to the DynaText string, and change the values in that table as needed - in an update() method or similar
😭
hmm
if you're going to update that can you make sure that someone mentions the localize function in there
alrighty
Actually wait no. This should be possible, I think I saw a mod do it before
I have to admit this one is pretty bad for not being documented. It's this way in legacy of how vanilla does things
it's misc.dictionary['b_' .. string.lower(self.key) .. '_cards'] in localization files
Replace n = G.UIT.C with n = G.UIT.T and you should be in business
thanks john smods
I am so sorry
before anyone asks i DO have a localization in place but the names of the suits just won’t show
idk how I failed to realize until now that I forgot about that page
maybe separate them by path lol
Why are some mods layered like this? Is there a benefit to doing it that way?
good idea
do the keys in your localization include your mod prefix?
organization ❤️
Oh. I might do it that way myself then
Also, is it possible to create a new type of card modifier?
card modifier?
Like how there's enhancements, editions, stickers, etc, etc.
I'd imagine it's something similar for the name in the badge?
in any case I'll just wait until that page gets updated before I proceed 🫡
❤️
yes
wait
hm
let me check
Oh, i already knew about that. But like, I want to create a new category of them. Is that also possible?
for sure
yeah
-# or at least, for consumables
PERKEO
2
there isn't exactly a smods API for new types of card modifiers, but it's definitely possible and has been done before



