#đ»ă»modding-dev
1 messages · Page 229 of 1
this isn't about a specific card of the scoring process, I'm talking about the entire evaluation of a card in a context, which includes calling every eligible calculate function like calculate_enhancement or calculate_seal, but not triggering effects returned by those functions
I think the debuffed state should be locked at the start of eval_card personally
i assumed it would be sufficient to check can_calculate once at the beginning of this process
i think it makes more sense to delay stuff like debuffs and destroying to effects being triggered anyway
â€ïž
else there's weird dependencies on the order things happen in eval_card, which isn't supposed to happen
The point of can_calculate was to enable order dependencies
Because modders want them
Itâs like Midas Mask needing to apply in advance and needing to hack the appearance of cards until the right moment
no that's different
I'm talking about order in the sense of calculate_enhancement being called before calculate_edition is
I mean that order is already important
order at this level is arbitrary, effects in the same card evaluation should be treated in unity
But the game already doesnât
this is so fucked why won't it WORRKKKK
are there ANY other functions i can hook that happen LATER than Card:open()?
we do though
they are returned in one table from eval_card
and processed by SMODS.trigger_effects all together
Are these specific effects like Chips and Mult
I mean like
Itâs a card applying an effect to the game state or itself
â€ïž
Not like a Joker acting on a card
btw eremel i ended up making a new cardarea type
if there's an enhancement that is, for example, "becomes debuffed after 3 uses", the 3rd play shouldn't stop seals and editions from triggering
Yeah Iâm thinking whatâd be a good way to handle that
it's also specific effects
I think in literal terms it should actually
But in terms of implementation Iâd prefer if it didnât
I think for a card modifying itself, we can lock the debuff state
Can anyone explain
though these shouldn't really be affecting debuff state, it's more that calculate_joker is called after
-# (This is game code)
And likewise maybe a card destroying itself should be handled after itâs individually scored
As in, it doesnât need to wait for Glass timing
But it also doesnât destroy itself before e.g. Editions
yeah that's the level eval_card operates at
tl; dr: I think a check at the start and none inside makes sense as long as theyâre all effects that come from the card and apply to the card
Or to whatever you want to say +Chips apply to
then that's exactly what i have now
How can I make a custom tooltip that's not ERROR?
I just wonder if thereâs a way to ensure e.g. a card gets destroyed after scoring
But before Glass
Just to avoid the messages proccing on air
Currently, I have this:
info_queue[#info_queue+1] = { set = 'Other', key = 'my_key' }
return {vars = {center.ability.extra.Xmult}} --#1# is replaced with card.ability.extra.Xmult
end,```
Where is set amd key defined
WHAT THE FUCK
i hate ui
i also hate ui
if aikoyori then only shenanigans
my understanding is that it's a G.UIT.O
How do you create a new card area
And the args are?
aiko please help me fix my config ui 
Are there written down any where
in the game source code
Uhh, these numbers are hard to know what they do...
Where do I need to define them?
also check steamodded wiki, might have a helpful definition or two
Me or Nope or KLG
pretty sure itâs easy if you just check under there
i managed to get the text up top but now it demands to be on the left
if i don't clamp the width with maxw, the ui element tries to be unreasonably large
-# under where
no change unfortunately 
đ

Where is the card area defined in the balatro src
cardarea.lua ...
đ
yes 
pretty sure you'll have to make one of them have full width
so that there's area to align to
full width to what, the screen or
of the container
how do i get the width of the container
do i need to do id shenanigans
hey quick question
theoretically
is it possible to flip over consumables
i thought thats what might be crashing since youre never supposed to see them flipped over
i think so?
idk
i think most cards flipped will show the current deck texture?
ill try smth
...nope
for this mod that i'm working on? uh sure, i can invite you, but i'll need to ask the other guy first 
calculate = function (self, card, context)
if context.using_consumeable and context.consumeable.ability.set == "Tarot" then
--TBA
end
end
is the card here the card that the Tarot card was used on, or the Joker card itself?
i guess not
Anyone has a good tutorial to make custom tooltip?
try setting height
show code
where exactly does it crash actually
making a six card hands mod, how would i define this as a six long straight?
at the part where it tries to flip the cards
wait if i just had _straight <2 would it count that as like A-2-3-4-5 and 2-3-4-5-6?
the pairs
hmmm\
Ive done something similar, the way i did it was:
SMODS.PokerHandPart {
key = "SuperStraight",
func = function(hand)
return get_straight(hand, 6, false, false)
end
}
SMODS.PokerHand {
key = "Super Straight",
chips = 280,
mult = 20,
l_chips = 60,
l_mult = 6,
example = {
{ 'S_K', true},
{ 'H_Q', true},
{ 'C_J', true},
{ 'D_T', true},
{ 'S_9', true},
{ 'H_8', true}
},
loc_txt = {
name = 'Super Straight',
description = {
'Six cards with consecutive ranks'
}
},
evaluate = function(parts, hand)
return parts.[YOURMODPREFIX]_SuperStraight
end
}
I have it as G.pack_cards.cards now
you can also take the first straight and check its length, technically
but this is cleaner
yeah, your nodes are a single node
don't do this, the implementation of this is subject to change
ohh ok
So i need to add more nodes?
i have to go for a while
also means you'll trigger on two unrelated straights
ill be back though
you have a node
you need a table that contains your node
fair ig but i have it max of six cards able to be drawn
You talking about .O node or the card area
unrelated does not mean not overlapping
the combine_nodes
ranks can branch
what does that mean
say I have a rank that comes after 10 but isn't a jack
King evolves into King 2: The Kingening
and I play 7 8 9 10 11 J
So i need to...?
and thatd count as a broadway
you need to wrap then in another table
ok
I donât know if it should
Because J doesnât come after 11
no i mean under my build it would
local combine_nodes = {
{
n = G.UIT.C,
-- etc etc you get the point
}
}
Ah I see
(which again, am fixing)
will that super straight thing work with four fingers?
the poker hand part?
you can change the length you pass in based on four fingers
how? just an if statement?
So like this?```lua
combine_tab_function = function()
local combine_nodes = {
{
n = G.UIT.C,
config = { align = 'cm' },
nodes = {
n = G.UIT.O,
config = { object = CardArea(
0.5,
0.5,
80,
100,
{
card_limit = 1,
}
)}
}
}
}
return {
n = G.UIT.ROOT,
config = {
align = "cm",
padding = 0.05,
colour = G.C.CLEAR,
},
nodes = combine_nodes
}
end
(If yes, it still crashes
same for the nodes of the column node
that is also a single node
is this how?
.
Like in the return?
ohh ok
aure did you leave the debug print in
mb didnt see
you can probably make a function that checks each letter of a string then adds a card with that letter to the cardarea, now that i think about it :3
no.
no
that is not my debug print
i think it's cryptid
Still same crash
Is it possible to have a rank change the amount of chips it gives over time?
combine_tab_function = function()
local combine_nodes = {
{
n = G.UIT.C,
config = { align = 'cm' },
nodes = {
{
n = G.UIT.O,
config = { object = CardArea(
0.5,
0.5,
80,
100,
{
card_limit = 1,
}
)}
}
}
}
}
return {
n = G.UIT.ROOT,
config = {
align = "cm",
padding = 0.05,
colour = G.C.CLEAR,
},
nodes = combine_nodes
}
end
And it crashes when i press new game
did you save
ok i did the four fingers part, do i also need to add the shortcut part or will that just work?
i presume i need to add it
you also need to add that if you want shortcut to work
ok
also lmao
A-3-5-7-9-J broadway
if i were making 7 card hands i could make a full circle
Or in general, is it possible to modify the base amount of chips a card gives?
I think its this button
you can use card.ability.perma_bonus for a hiker-like bonus
changing the base chips of an entire rank seems harder to do and isn't exactly supported by smods as of yet
why the leading _
oh is it not needed?
(also j_shortcut)
That's okay. Thanks for letting me know!!
i thought it was gonna be needed bc the vanilla handparts have it
it's put there manually for vanilla parts to keep consistent with what the game code calls them
ok
For my implementation of super straight I kinda just took the existing straight code and bumped the restricting values from 5 to 6
It crashes when its trying to load this button.
well get_straight now supports variable length directly
Well
there we go
When was that a thing?
uhm
wait i misread that
wait you have the balatro font for your visual studio code?
no?
it's been sitting there as a PR for a while, but it was only merged like 10 days ago
ok nvm not directed at me
also these guys work with it
Well that would explain why I never used it lmao
How do I give a joker an ability when it's being obtained?
add_to_deck = function
smt smt, check SMODS.Joker documentation, its probably on there
OKAY
SO
The function I hooked is correct
There's just something CATASTROPHICALLY WRONG with my code
is there like some sandbox mode or smtn I can use to test my cards?
Because if you run THIS
kinda tedious to play Balatro just to get one card
You can use Debug Mode
Or DebugPlus
how do I enter that
It explodes
nice
I FOUND THE ISSUE
Is it wrong or no,
how can I make a pack that uses a pool which is a list of joker keys
i can't find an easy to follow example of this
ITS SOMEWHERE IN THIS SHIT
crying about this rn
Cook cherry cook
is there any documentation on packs
Ok so I've got this now which I think should give +2 mult to every card affected by a tarot card, but G.hand.highlighted might be something different in this context iunno ```lua
calculate = function (self, card, context)
if context.using_consumeable and context.consumeable.ability.set == "Tarot" then
for i = 1, #G.hand.highlighted do
local target = G.hand.highlighted[i]
target.ability.perma_mult = target.ability.perma_mult or 0
target.ability.perma_mult = target.ability.perma_mult + card.ability.extra
end
end
end
I want to show the +2 mult above all the cards but I don't know how to do that
I think you could select your whole hand then use Hermit and this would proc
yeah that's what I was thinking
return {âŠ, message_card = âŠ}
so that's why it needs to be different
yeah but return just ends the function, no?
I want it to happen for every card
Yes
and I'm looping over them
Idk whatâs the recommended SMODS way right now
But classically it was attention_text I think
anyone know how to add more UI elements?
say like, 3 extra buttons to the pause menu?
Omg 3 buttons to pause menu 
bump
Thereâs already a few extra ones
its SMODS.calculate_effect()
attention_text has never been used for that
Even just to display a message?
Without an attached effect?
yes
Wait attention_text is the Boss thing right
yeah the message in the middle of the screen
how would i define a 4oak and a pair as a hand?
for people searching in the future (i know what you are): ```lua
if context.using_consumeable and context.consumeable.ability.set == "Tarot" then
for i = 1, #G.hand.highlighted do
local target = G.hand.highlighted[i]
target.ability.perma_mult = target.ability.perma_mult or 0
target.ability.perma_mult = target.ability.perma_mult + card.ability.extra
SMODS.calculate_effect {
message = localize {
type = "variable",
key = "a_mult",
vars = {
card.ability.extra
}
},
card = target
}
end
end
oh wait yeah still gotta fix the G.hand.highlighted issue somehow
This is what i do```lua
SMODS.calculate_effect({ message = localize('k_three_discards'), colour = G.C.RED }, card)
is there a way to make the popups appear somewhere other than the top or bottom, like on the side? I have a bunch of cards' descriptions that kinda clip into the right side
Line break it?
true
but I have a similar issue with the cards above it
(the title getting cut off, in this case)
optimally I'd just like the text to show up to the left instead
Anyone?
does anyone know?
Like what for
What about a Double Trio?
already done
thinking abt it might be done wrong
What about a 6 card flush or straight?
yeah thatll be the easy part
I also realize that a Broadway Straight Flush would be a mouthful
just gonna call it broadway flush
And a 6 of a kind flush?
(Flush six)
hello chat
nah i like this shithole tbh
crab bucket mentality
if i want a joker to give +chips THEN +mult, each time showing the appropriate number effect, can i just return both values, or do i have to return each one separtely with eventmanager or something
I think you could do what I did where you manually show the effect with calculate_effect
Hell nooo
it would be so awesome 
where can i look
but seriously does anyone know how to define this as a hand in the evaluate function?
SMODS.calculate_effect {
message = localize {
type = "variable",
key = "a_mult",
vars = {
card.ability.extra
}
},
card = card
}
``` This is what I did to show +2 mult above each card
Yes you can return both
what about the message
like imagine this but with the message going in order one after the other
yeah that's like a different thing you can't do it there I think
can ":take_ownership" be executed mid-game? more exactly for a specific challenge
try this though
he's probably more knowledgeable about modding than I am considering I just started like 30 minutes ago

i want it to be at just the jonkler tho
so I've found that the effect I'm looking for is present in the shop cards
but I can't find where in the code it opens to left
not at each individual played card
like the joker give chips, then give +mult, then give xmult, in that order
just do
return {
chips = X,
mult = Y,
xmult = Z
}```
I have a custom files for my jokers, but i'm not entirely sure how to make them work in the game files
I've opened with 7-zip, pulled the files out, edited them, then tried to put them back in, but that messed up the whole lineup when i opened the game, with some jokers textures being a group of four other jokers, and some jokers having no textures at all
Can anyone help me out?
I've tried following a few tutorials but am just not sure what the issue is
there's an automatic message attached to these values
oh ok cool
How can I apply take_ownership only to a challenge?
and is it exactly chips or chip_mod also have the message
wait, do you mean you took something out of the source code and put it back in???
so chips without _mod is a SMOD thing?
or
you probably put 1x sprites in the 2x folder
and vice versa
No, i didn't edit the source code at all i dont think
I was just in the resources and textures folders
How do i know which is which? All i have right now is one singular file that i'm trying to add into my joker roster, but when I add it (no matter whether its 1x or 2x folder) the textures get broken
like by "open with a 7z" do you mean, the executable?>
check the pixel width/height of yours vs the games sprites
yes
2x is just, twice the size of what 1x is
okay, han gon
Okay yeah it looks like i just
did the 1x in the 2x
Hello there, anyoneâs got examples of custom consumables ? Bonus points if it has a custom set as well
How can I apply take_ownership only to a challenge?
can you change the id of a playing card?
like how you can do something like Card:change_suit('Hearts')
i figured this out btw
nobody responded but the solution was whatever tf this was
yeah
in a dynamically typed language like Lua any variable can become a table (or start as a table) whenever
solved the issue
(added view_deck = true)
like
can i then use card.ability.extra.valueTable for that table
and like potentially manipulate it
ye#
G.GAME.starting_deck_size = 26 doesn't do anything for me
i want to make the deck size smaller
hot DAMN
check maybe the deck that contains only the two suits, or no face cards ?
I feel like you'd have to generate the deck yourself if you want exactly 26 cards
any tips for rewording this?
Discards are disabled when selecting blind
are you making balatro
That's much better ty
the deck i'm making vastly changes how discards/hands work so i have to rework certain jokers to balance them
oh i see
deck-specific changes my beloved đ
can you change the id of a playing card?
another question
is there a vanila function or an SMOD function to shuffle a table
or do you have to implement your own
-# in fact, cant you just use pairs
what
yeah
how
wait, let me check smt
oh nevermind, i think pairs works differently in luau compared to this
:3 sorry
in roblox, it runs through a table randomly

I donât think pairs is random, itâs just it isnât ordered consistently
im pretty sure it is in LUAU, since its always like that when i was still helping with games in roblox lol
but welp, maybe you gotta make your own function then
how can i get to work a challenge custom rule?
hey gang is there a way to see if you're at the end of round without using context?
you have to use SMODS.change_base i think
i'm in loc_vars which doesn't have context
G.STATE == G.STATES.ROUND_EVAL I believe could be used
i need help giving certain tarot cards a different undiscovered sprite, everything i do doesn't change anything no matter what
i already have the floating '?' icon changed, i need the base sprite changed
is there a way to check if a joker is unlocked yet?
joker.config.center.unlocked?
can't you use calculate to change the values you need in loc_vars?
forcing a custom consumable class into the tarot collection category in the menu would also work, i don't think that's possible though
oh yeah
if i implement table shuffling i probably should make it with the vanil seeded functions right
mhm
hey quick question. i know we really don't appreciate AI 'art' when making art for these. could we say the same thing for ai programming?
i also have this one function which selects a random number of stuff from a table
woud be hard to get ai to code with balatro api
and it doesnt select the same card during that process too
Thats such a cool idea
but if you can go ahead
...ehhh, i would personally advise against that, but its not illegal so sure
hey, with the deckskin SMOD api, is there a way to replace cards without showing them as replaced? I'm replacing all of the cards, but i only wanna show the KQJA on the screen since the rest of the cards are just recolors and it looks cluttered.
also something to note
the "numbers in this description" includes the 1 and 3 in 1 in 3
3 in 1
https://github.com/Steamodded/smods/wiki/SMODS.DeckSkin should have documentation about how to do that
so you can roll into 1 in 40
1 in 40
or 9 in 2
oh i shouldve read lol, it says right there the command :B
im actually happy i got this to work
this was a silly joke idea i talked with someone in dm
for what actual joker called Jonkler might dop
it's not much but it's honest work
can you give certain tarot cards a different undiscovered sprite? everything i try with patching doesn't change anything no matter what
i already have the floating '?' icon changed, i need the base sprite changed
also jonkler sprite
is there a way to change an enhancement's variable while it's in the deck?
like
not drawn
i also have those functions which shorten the process of enhancing cards
they all have animations and allat already in there
:3
how would oops all 6s work with this
it sure would
add a 0 and wait for the rare bug report where someone got an in 0 chance :3c
the 3 becomes a 6
with oops
although i guess what you mean is
what happen now if the 3* moves of the chance slot
unfortunately it will revert into being a 3
but the new number that comes up will also be doubled accordingly
insane synergy
although if it's permanently doubled that would also be funny syngergy
just crank every number so high it doesn't matter what lands in the xmult slot
although once the 40 hits the in X slot the values are basically as good as locked
unless you can get the 15 up there
how would i define this in code?
I'm having an issue: since this code is for a card enhancement, it does not run if the card isn't in hand/scored at the end of round, how do i have it run for all cards in deck?
in other news, hell yeah
cus this doesnt work
hmm that did give me an idea :3
Woah itâs the Upcraft
why is he number switched, is he stupid?
Fancy seeing you here
*up, thx
Oop sorry
does anyone know?
the thing is it triggers early
can a joker return xchips now that we have the perma-bonuses
does it just never happen?
is there an easy way to detect if a card has been copied, instead of just added to deck?
cus technically theres 6 seperate pairs in a four of a kind
im trying a fix
but this feels messy
try checking for a full house as well
why isn't this patch injecting? it's never making it into the code
[[patches]]
[patches.pattern]
target = 'card.lua'
pattern = "G.ASSET_ATLAS[_center.atlas or _center.set]"
position = 'at'
match_indent = true
payload = '''
(MANIFOLD.funcs.is_reversal(_center) and G.ASSET_ATLAS['manifold_centers']) or G.ASSET_ATLAS[_center.atlas or _center.set]
'''```
one sec
ye try that
thats the better solution
Turn cards in deck calculation on in optional features
look at Mods/lovely/dump/ to see if the code you want is still there
smods changes some stuff
This doesnât patch because itâs not a full line
ah that would probably do it
how would i do that? sorry if it's a stupid question
Does anyone know?
Youâre not showing any of the useful part of the crash log
So which part is the useful one.
Yeah, anything from 3 downwards is useful generally
to be fair the top can tell you the exact line that causes the issue
the issue is that sometimes it causes the issue because of something that happened prior
ok well how would i make a HandPart for a hous without using other parts? cus the function doesnt take other parts
idk what args in line 95 is, but whatever it is it doesn't have a config
any ideas?
And what exactly are you trying to do here?
make a HandPart that represents a full house
so i can make a 4oak+pair house
for my six card hands mod
Sorry I meant eldzey
I have no idea how poker hands work đ
damn đ
made another function for grabbing adjacent cards, with radius and allat â€ïž
i love making random functions
lowercase
hey youve worked with pokerhand stuff, do you think you can help with my problem?
Could they be tighter perhaps?
how do you get the symbol for the suit, like for example in Greedy Joker it has the diamond symbol in the description?
the end goal is a 4oak+pair house, and currently im trying to make a normal full house into a handPart
...weird
sometimes when i clone a joker
it seems something is fucking up the game so bad it went into stack overflow
its just sometimes though, weird
I don't see the diamond in the description
interesting
is that a language thing, maybe?
iunno
I tried just putting like the unicode symbols for them but they just don't get rendered
i cant create a challenge and be it a specific stake?
Itâs bunco
Is there a way to make a Joker that resets countdowns on other Jokers? ie Gros Michel and other perishables
does anyone experience lag when looking at hand info while selecting more than 5 cards in hand?
nop
turn your mod off đŁïž
ok what the fuck did my mod do to actually make it lag
did you call a billion unnecessary returns again
no
config = {
extra = {
buff = 1.5,
debuff = 0.5
}
},
loc_vars = function (self, info_queue, card)
return {
vars = {
card.ability.extra.buff,
card.ability.extra.debuff
}
}
end,
calculate = function (self, card, context)
if context.individual then
if card:is_suit("Hearts") or card:is_suit("Diamonds") then
return {
xmult = card.ability.extra.buff
}
elseif card:is_suit("Spades") or card:is_suit("Clubs") then
return {
xmult = card.ability.extra.debuff
}
end
end
end
``` why ain't this doing shit
it's supposed to give 1.5x if it's a heart or a diamond and 0.5x if it's a spade or a club and it just does... nothing
oh wait I may be stupid
I think it might be context.individual, I had it cuz I read somewhere that a certain similar card used it
i dont even know what the profiler is saying
what are you trying to do here
and also
I explained below
is this a joker, or?
yeah
card in calculation refers to the joker
you are telling the game to check whether joker's suit is Hearts
and secondly, the context is not clear enough
what are you trying to do here
ok so how do I get the scored cards then
not my fault i disabled my mod here
alright
i really suggest reading this, they documented all contexts you will possibly need
oh wow my fault then
yeah I looked at that before but I didn't scroll down far enough it seems
look i tried optimizing my mod
...its the third area including contexts you will see, but ok đ

:3
Who toucha da child
is there a way i can hex colour text? like say, in a joker description via SMODS.process_loc_text([full joker variable], "text", { "bla bla bla", "i want this this to be a specific colour", "bla bla bla" })
i know the UI methods have hex support, but i'm not sure if that will work for this
what's the proper way to create a joker in a calculate function?
SMODS.add_card crashes inside functions/common_events though maybe im usin it wrong
that's the proper way, what's your code?
SMODS.add_card("j_UT_dog_residue")
gave it the joker key
as i understand them being formatted
SMODS.add_card({ key = "j_UT_dog_residue"})
ahhh
N'
thx
yooooo!?
thank you!!
it looks so good
anyone?
oh also, i decided to turn the modding guide copypasta into a thread
i actually dont know about that, sorry
yes!
i've seen it in other larger mods but i'm not sure how to do something similar
you can replace the title screen graphic itself, but messing with the actual card that appears is a little trickier
the colours are impossible though, i've tried and can only get crashes 
the way the mod i'm working on does it (and i think this is how cryptid & cardsauce do it as well, as this functionality is basically directly copied from them) is via a standard steamodded atlas call with the key "balatro"
messing with the card sucks
you can only do some things or it crashes
YES.
i was able to give it an enhancement
cirno :D
but i couldnt change the rank
i mean, why would you
its called Balatro for a reason, not Bal2tro
;3
you can give it a seal
bal2tro would be very funny
idk i never tried
ok so, how do i explain this effect
but that stupid fucking card does not behave like other cards
chooses a random card in hand
then chooses adjacent cards to it
but it chooses like, 2 cards from each side
it's difficult, but you can also just make that ace of spades whatever you want, as you can see, i made it blueprint
how do i word that
how exactly do you replace the graphic
to get the overall chips and mult before they're multiplied, i'd use hand_chips and mult right?
yeah i think you might be able to replace the entire card
but the card that exists by default is a BITCH
or have a mod replace the graphic, I mean
look in game.lua for replace_card
the balatro graphic behind the card?
as i said, standard steamodded graphic replacement scheme
don't worry about it 
how do you patch to a line that appears multiple times in the code?
[patches.pattern]
target = 'game.lua'
pattern = 'replace_card.states.visible = false'
position = 'before'
payload = '''
if problematic.config_file.cardfuckery then
replace_card:set_ability(G.P_CENTERS["m_enhancement"])
end
'''
this is my lovely patch to give the card an edition
it already does that
i mean
i only want to patch to one of them
i thought pattern could only check one line?
Nah
i'm pretty sure there's an argument you can specify to make it do it only once (or however many times you want), but then you run into the problem if it only doing the first one, which might not be the one you want
yeah that
nope
[patches.pattern]
target = 'functions/state_events.lua'
pattern = '''
local splashed = SMODS.always_scores(G.play.cards[i]) or next(find_joker('Splash'))
'''
position = 'at'
payload = '''
local splashed = SMODS.always_scores(G.play.cards[i]) or next(find_joker('Splash')) or G.play.cards[i].seal == "TWT_nb"
'''
match_indent = true```
lines dont even matter at all, actually
you just do
your multiple
lines of code
here
'''```
its only for readability
ok well i tried that for something unrelated yesterday and it didn't work and someone said it's because it was multiple lines and changing that worked
but i guess that was wrong
yea ive been using multiline patterns for awhile
i try my best not touching patches in my mod
since it can cause unintended conflicts with other mods
Is it possible to increase the size of the hand played? I want to increase it from 5 to 6.
look at cryptid to see how sticky hand works
bc just increasing the card selection limit doesn't work
match_indent just applies the indent of the furthest indented line not included in the pattern right? idk if i'm wording that right
steamodded is gonna work on implementing card selection size soon
Could you tell me how to access its properties (sorry, it's my first time trying to make a mod)
check cryptid's files
you can access them through their mod's github
or download their mod, and open them up with vsc or even notepad (dont)
discord markdown being perfectly intuitive moment
:3
this part broke again
its supposed to destroy the cards that are equal to or are less then 6 (rank)
i was told to use destroying_card with cardarea
g.play i mean
huh
what are you trying to do here?
-# why does that sound so violent đ
is there no way to give text a custom hex colour?
shouldnt that already be handled
I still donât know what it is
how do you get this kind of effect on the X multiplier?
You need to find out yourself what passes args to it
The controls are in the localization file
the text colour? {X:[colour]}
or the actual card effect
no like the thing with the red around it
And how would i do that
Like {X:red,C:white}
where would I find that
yeah, {X:[colour]}
{X:[colour],C:[colour]}
so that specifically is {X:mult,C:white}
In the localization folder
Reading
ah ok
Something with the ui box
i sure do love when i try to make a blueprint like joker and try to use the blueprint code as a reference, but not understand anything
hey gang so i have this deck where end of round money turns into a multiplier for money instead, so if you would have normally gotten $7 at the end of round you would instead multiply your money by 1.7X. As it stands, basically any joker that gives extra money is completely broken. Like if you get a decently scaled cloud 9 or rocket you can easily double your money every round. How should I nerf those jokers?
Should I increase their rarity or just decrease the amount of money they give
Use the SMODS Blueprint effect helper function
or alternatively, choose cryptid path
embrace the unbalanced :3
thats fair
oh well
probably reduces it then
Cryptid is lame

Now let me copy this Cryptid Edition code
today im learning stuff about smods i didn't know existed
also is X$ aka yellow-bg a thing in steamodded
{C:money}
question chatt
I wanna replace the shop theme with this, how'd I do so?
Music: Main Theme (Credit Card Entry)
Composer: Kazumi Totaka
Playlist: https://www.youtube.com/playlist?list=PLL0CQjrcN8D0EOblQXRI5MCmsqvnFz4i0
Platform: Nintendo Wii
For more information, please read the channel description!
can you make it so that a Jokers can always appear multiple times even if you dont have Showman
That's just making the text yellow, i wanna make it so it's like xmult but money
{X:money}
oh damn its just that easy
What format should it be in?
and this
it's as shrimple as that
this is the hardest and most jank thing i've ever done
I remember doing it in a janky way
I feel like there must be a SMODS way to do it though
What is it
different consumables in the same set having different undiscovered sprites
Card:set_sprite REALLY does not like being patched
ive been using this for debugging but it's too funny to remove even though it's never used
you are not the only one
:3
i included the "a" part so that i can print values lol
that's probably smart
Superior debugging function
anyways i have a question
i have some weird functions too like these ones
just copy/paste blueprint code
why do you need those
did this
dont think it worked
Use the SMODS Blueprint effect helper function
i don't know why i added this but it's there
three
Well
At least itâs not a magic number
i probably needed 3
tbh
idk what that is
and idk how to access it
from now on any time i need 3 i'm referencing MANIFOLD.vars.three
Itâs not documented but there exists
zigzagy
and i'm professionally recommending any other mod devs to check if my mod is installed, and if it is, to reference MANIFOLD.vars.three any time 3 is in your code
this is black magic
i only know 3
this is definitely my most advanced "useless" function though lmfao
that one's kinda based actually
Noob question: Where are the jokers in the code? I want to look at flash card to see how its code is written
balatro source code, card.lua
ok great thanks
i should probably include that in my thread
what's your thread?
đ§”
oh pog i've just been cobbling everything together with those purple glue sticks
no documentation required only scraping everyone else's mods for incredibly niche functions
đ
anyways time to brainstorm consumable effects
why does this not work?
[[patches]] [patches.pattern] target = 'functions/common_events.lua' pattern = '''{n=G.UIT.O, config={object = DynaText({string = {localize('$')..format_ui_value(num_dollars)}, colours = {G.C.MONEY}, shadow = true, pop_in = 0, scale = 0.65, float = true})}}''' position = 'at' match_indent = true payload = ''' {n=G.UIT.T, config={text = (not G.GAME.selected_back.effect.config.ttr_yellow) and (localize('$')..format_ui_value(config.dollars)) or localize('$') .. (format_ui_value(config.dollars * G.GAME.selected_back.effect.config.money_mult + G.GAME.selected_back.effect.config.money_mult_min) .. "X") , scale = 1.2*scale, colour = G.C.WHITE, shadow = true, juice = true}} '''
it got patched correctly
For consumables, is theres a table/variable I can check to make sure game state is in a blind ?
(for can_use)
The blind table is G.GAME.blind
hierophant and canio are best friends and you can't convince me otherwise (they're both misspelled in the code)
So true, I kept screwing up hierophant tweaks because I didn't realize it was misspelled đ
what should i put as blueprint card
thats a new one
cant find where its set but I guess its nil until blind is selected ?
After you defeat a blind, this event calls set blind to nil, which means when not in a blind, it's an empty table
Thereâs also Gluttonous
And Consumables
you can also check G.GAME.blind.blind_set
Because it only sets that to true when it actually has a blind
perfect
They tried to fix it but it was brought back by popular demand
oh nice thank you !
oh i didn't know there was an update last week
what am i supposed to put in the blueprint_card parameter
my card's id?
what happens if you use a negative copy of the fool while your consumables area is over full? the code would lead me to believe it's consumed and then nothing happens but that doesn't seem right
yeah so, for some reason
there's updates every day basically
doesn't # before a variable get the length of it if it's a table or array? (i don't know lua)
so for a string it would just be nil
how do i have should_apply for a sticker still require an rng check
integer 38 is nil didn't you know
đ
@hushed field also I spotted this old message
i have no idea what i'm doing
...oh, right
hey guys could someone do me a favor and tell me what the lib file is?
this is incredibly broken but hey it works
i wonder how many reverse tarot mods there are
Peak Foolery
hehe :3
reverse tarot is the copper ore of balatro modding
is there any reason why this isn't triggering?
i feel bad for people who want to play with balatro modpacks because they probably have to deal with hundreds of reverse tarot variants that just flood the tarot pool
this looks funny but it is the most ambitious project ive worked on lmfao
Idk what that means but Zodiacs
before copper was added to mc basically everyone ever made a copper ore mod
minecraft modding was filled with hundreds of mods that all added their own separate copper ore (before the ore became official)
yeah
same thing with balatro and reversed tarots
all the big mods had their own copper ore
I was also thinking of adding my own reverse tarots but i'd have to have a config option to disable them if you had other reverse tarot mods
yeah that's what i'm gonna do
its a little different because not many mc mods were just there to add copper ore
but a lot of balatro mods just add reverse tarots
and mine are just a percentage chance to replace their regular variants so no affecting tarot odds
though ig i'd need a separate config for reversed vanilla tarots and reversed ones of the tarots in my mod
how do you make card status text appear when the joker triggers
hey guys how would i isolate specifically the cash gained from cashing out at the end of the blind so i can change how its ease_dollar looks?
what if instead of tarot it was tarat and they would do nothing
i dunno how but my joker is waiting until the very end of the calculation to say it's line
i'm guessing i'm not supposed to be using card_eval_status_text but idk what im supposed to be using instead
how do i use blueprint_effect
prob bcuz the line is being said in the last context
.
i'm sure you're next in line after me dw
i feel like
its used when the card is copied by blueprint to override the stuff
so it doesn't make the joker copy?
it overrides it i think?
i might be wrong
chat i need help
if you want to not make it copy the joker do blueprint_compat false
this code is meant to have a chance to make the card to the left and to the right infected cards
try doing before
it works fine on the left
but it occurs on all cards on the right
alright
I want to make a joker like blueprint
And I was told to use blueprint_effect
thats just for the ui
đ
hey guys how would i use cashing out as a context?
đ„
it's not end_of_round
you have to add not context.blueprint to your context if you want blueprint to not copy that effect
Yes
oh wait, i found something on the docs that solves my problem
you can look into the source code of how balatro handles it, but do not redistribute tho
or you could also look into how cryptid does it
Gg
does it work with Hello World! split on multiple lines?
oh wait, im missing a space there, hm
also when they are in another colour (like inactive)
I'll try and see
prob not
unless it concatonates all strings into one
nope, its just for one string sadly
but its definitely possible
my best bet would be to join all strings together and then segregate them later
i figured it out
depening on your string checking you could just do it over multiple strings'
mhm
oh yh
could js check for x amount of letters then check the next line for remaining
had to do some string manipulation shit here, since string.find only accounts for the first instance
you would just have to do a check over mutliple lines
and make sure you don't insert into the wrong strings
should i have it where the multiplier also appears in the ease_dollars instead of just showing the +$ here?
im trying to make all triggered 7s give the lucky card effect but the debug prints never even show up, am i checking the wrong contexts?
prob because context.other_card:get_id() never triggers
either you have wrong context
or Idk
its obvious that it never triggers, im aware of this because my debug prints dont show up

