#💻・modding-dev
1 messages · Page 416 of 1
50$ steam gift card
@/mods
I'm very new to balatro modding (like literally started last night) and I'm trying to make a joker that turns scored 7s into lucky cards. For some reason, I keep getting crashes because other_card was a nil value (crash attached). This happens as the hand is played, but before the cards are scored. Does anyone have a fix for this or should I try to find a completely different way to code it? (joker code also attached)
if i wanted to make an enhancment would i need to make texture for every card in the game or just the card look
I believe just the card look
the base game has them seperate so unless it affects the actual numbers or something then the card look alone should work
it might affect the actual numbers
i just need it to make a kind of smeared look and itll be like "chip value randomized"
would the assets go in x1 and x2? asset for just backgrounmd
The numbers are on a separate layer from the card
gotcah
You should be able to check them in the resources folder
x1 is way lower resolution and using a different sprite sheet entirely and x2 is bigger
Enhancements are just a layer, too
add if context.othercard then above if context.cardarea == G.play then
does lovely pattern patches only affect full lines of code and not like, snippets of them
You could have a smear texture that goes over where your number would be. But all your smears would look the same. Unless ya coded something but i aint know nothing bout dat
is there a way to make the badge color change between multiple different colors
(where it says the mod name)
bump?
I've been trying to get a specific mechanic for a Joker that I'm modding, but I haven't been able to get it to function properly without crashes or just having it not work, The concept is that every time you play a Flush, the joker would add 1x mult, (similar to the square and droll jokers). I am very new to modding but I have played modded balatro before..
whats the cardarea for the scoring part of the played hand again
i forget if G.play and G.play.cards are different and how exactly theyre different
how to check if a card is polychrome? i tried doing card:get_edition() == "e_polychrome" but that didn't seem to do it
G.play is the card area, G.play.cards are the actual cards
I think you can do Card.edition.type
card.edition and card.edition.polychrome
is G.play the whole played hand or just the scoring part
whole hand
That's pretty extreme. JESUS CHRIST
do you know what the cardarea for the scoring part is
Just.... Straight up ^3
What would I use to make a custom rule to edit the starting deck of a challenge?
you gotta destroy 20 exotics to get it
Who up exponenting
? you just said G.play is the whole played hand
yea
i dont think they have an individual area for scored cards
what are you trying to do
i have a sticker, and i want the if statement to check if the card is in the scoring part of the played hand
ah
I love it when code messes up for a reason you can't even see
look at how green seal from cryptid checks
thats unscoring
it's not a different card area
bump
real quick
how would i remove the ability to reroll
so context.cardarea == G.play and not context.cardarea == 'unscoring'?
there's probably a function in G.FUNCS that handles that
cardarea will only ever be one thing
and by that I mean the button being enabled
that doesnt seem right
I know the deck takes a cards table, but I want it to be one random card every run, which I haven't found a way to do within the challenge.
Yeah idk that
how do i make the juice up effect happen on the joker in context.individual and context.cardarea == G.play?
so am i unable to make a sticker that only works when the card it's on is played and scoring?
context.cardarea == G.play
isnt that the whole played hand tho
Maybe hook the Back apply to run function, and if your challenge is selected then replace the one card with a random one
That's all I can think of
no
Where would I find that?
i know it's card = [something], i just can't recall what it is
and context.main_scoring?
it would depend on what the effect is
but potentially, yeah
they said on scoring
Which part of that
the back apply to run function
idk in what file exactly but somewhere in the source code, you only really need to know its parameters
Which idk off the top of my head
i tried this
but instead it allows me to reroll forever instead
yeah but it still depends on what exactly the effect is, they might just want some to trigger on cards that are scoring, rather than when they score
i just hope they understood only the cardarea check isn't sufficient
you'd want to hook the function not replace it entirely, and outside of any joker definition
Would someone potentially know of a mod that has a challenge with random cards in deck?
It doesn't seem like there is one
juice_card = card
So like this?
card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmult_add
return {
message = localize{type='variable',key='a_xmult',vars={card.ability.extra.xmult_add}},
colour = G.C.RED,
juice_card = card
}
end```
how do i get the game to let the player play hands larger than 5 cards
cryptid is largely spaghetti code due to being a community project but ill see if i can find out where it may be
With the HandLimitAPI, it is SMODS.change_play_limit(mod), where mod is number to increase by.
where would i put that? i have a sticker which increases the number of cards that can be highlighted, would i replace that with SMODS.change_play_limit?
how do i get the current stake of the game?
Assuming SMODS.Sticker, put SMODS.change_play_limit() in the apply function of the sticker.
why would it be in the apply function?
anyway its saying that change_play_limit is a nil value
SMODS.change_play_limit(), full function and a thing as of 0530b.
ah i gotta switch smods versions again, hope nothing breaks
And the apply function executes for applying/removing of sticker.
ah, yeah im using calculate functions bc the sticker is on playing cards
now its doing smth rlly weird
¯_(ツ)_/¯
what's the effect of the sticker?
+1 card selection limit when card with sticker held in hand (i can send the code i have in a sec)
so you'd want to look at context.hand_drawn I think, and then modify the limits when it's contained in the drawn cards, and then check for it being played/discarded and turn them back down
the only real issue is that the card with the sticker keeps increasing the number whenever other cards get selected (and the number didnt go down when it was discarded so i gotta fix that too)
I tried to make a joker that prints out another joker called 'package' however an error gets given when the joker attempts to create a package. Any help is much appreciated
if im developing a mod how do i spawn in a joker to test it
is saying all vlc[number] audio files do not exist when i know for a FACT that they are in the right spot and have the right names. (might be deserved for the elseif spam though...)
how would i go about doing that
you need your mod prefix in the play_sound calls
check if context.hand_drawn contains your card, then increase the limits
guys can u give me ideas for enhancments
red: x1.5 mult when scored
orange:
yellow:
green:
blue: +25-100 chips when scored
purple:
this is just what i have so far, its for my mod called colorful cards
play_sound('norm_vlc[number]') assuming this is what you wanted me to do for each play_sound the same crash happens
NEVERMIND I DID IT IN THE WRONG FILE
so if context.hand_drawn and and what else?
now it's saying that it can't read the ogg bitstream
What is that mod that rerolls the run until u get a seed that gives u a legendary in the first skip pack
Also can i mod the game if i have it through xbox game pass
not yet
brainstorm
checked to make sure all the ogg files were working properly and they are, so I'm not too sure what the issue is for this
Where would i be able to mod balatro then
steam
Ok
Can i transfer the date from my xbox game pass balatro account to the steam one or no
what context could I use if I want my joker card to always be the first joker scored after playing cards
id imagine context.final_scoring_step but im not sure if jokers can use that context
they can but it's the opposite of what they want
oh is that after jokers
yes
no that's after final_scoring_step
pre_joker might work? idk if that's passed to jokers
or before but idk if that handles scoring
heyy can anyone help me with a consumable i am working on, i am able to destroy a selected card but i dont know exactly where to go from here. i have been reading through the steamodded resources but im not sure exactly how to do this
i want the consumable to only be able to destroy a selected card from a random rank, so the tarot chooses a random rank then the player can only destroy that card if they have it in hand
Whelp I didn't expect this feature to take nearly as much effort as it did
guess I will find out
does anyone know what else id put here to check for if the card drawn has the sticker
honestly, i have no idea how to check if a card has a sticker :3
but you would loop through context.hand_drawn which is a list of the cards drawn
could not read ogg bitstream error when it tries to play a sound
how do i have a random rank selected? like mail in rebate, i want to impliment that to a consumable
yeah that doesnt work
can anyone tell me how i would get the texture of my enhancement and the actual enhancment working
i just need it to do x1.5 mult
it's like a joker
like almost exactly
dang
how simple would making a joker play a custom sound when obtained be
so path = redenhance.png basically
I cant believe I had to rewrite half of the game's consumeables to get this to work 😔
Mod compatibility with this is gonna suck probably
add_to_deck = function(self, card, from_debuff)
play_sound("modprefix_key")
end
yeah for the atlas
what exactly is a stand
it has an smods.atlas too??
oh ok
i expected something more complicated
You see, some people can produce a manifestation of their fighting spirit which can only be seen by those with Stands
yes
Yeah this is a JoJo mod
thanks for the reminder that i need to do basically the same thing with my own mod lol
omg thank you, this is a lot of good information
Regardless the primary implementation issue with this is that a ton of vanilla consumeables use the ability.consumeable table, which is a reference (not a copy) of the center they're drawn from. So not only did I have to add config values and change implementations for cards that weren't set up to have a variable selection limit, but I also had to change the others too otherwise I couldn't change the limit on an instanced card without it applying to all new instances of the card since it'd change the center's value too
Blegh
i love vanilla jank
hiya! quick question, how do you localise a Joker's name?
would it be localize("j_prefix_name_of_joker", "Joker")?
localize{type = 'name_text', set = 'Joker', key = card.config.center.key}
Or wherever you're drawing your key from
cheers ^^
Is there a built-in context that allows me to make cards drawn face-down through jokers? i've tried context.hand_drawn, but it flips AFTER it's drawn
context.stay_flipped
check context.to_area == G.hand and return { stay_flipped = true }
what's the same-card version of context.other_card? is it just context.card?
it's still other_card
mm, this code isn't getting any matches
i'm assuming G.P_CENTER_POOLS.phanta_Zodiac is nil — where would all Zodiacs be listed?
oh mm, i should've done that first, there are 13 tables in it
ya so it's not that then dfkjgndfjkg
Is G.ROOM the game window?
i think so
mm, so j.config exists, but not j.config.center
i'm guessing there's no center, since it hasn't been created, but uhm. am a bit confused
j is the center
yes
Help me understand here:
create_UIBox_your_collection_jokers() creates the UI for the collection jokers. It does this by creating 3 different CardAreas which it then adds 5 jokers each to.
When it creates the CardAreas, it provides the X, Y, W, and H values, G.ROOM.T.x + 0.2*G.ROOM.T.w/2, G.ROOM.T.h, 5\*G.CARD_W, 0.95\*G.CARD_H
Nowhere is the Y different, yet the CardAreas show on different Y values when the collection comes up.
Are they being moved into the center somewhere else?
i think that's the spacing being handled automatically
UI elements act like HTML flexbox
(iirc, correct me if i'm wrong)
I originally thought that would be the case; however, I've basically copy-pasted the whole function, and it yields me 3 stacking card areas on top of one another.
mm, weird -u- i was wrong then
The fact that the Y value is G.ROOM.T.h makes me think they are off screen potentially and moved in? But that also feels wrong because (originally before I started messing with the Y value myself) the cards spawned halfway offscreen.
okay weird ^^ one more bug to solve
this line: names[#names + 1] = localize{type = 'name_text', set = 'phanta_Zodiac', cards[i].config.center.key}
is giving me ERROR
the set's key is phanta_Zodiac
printing cards[i].config.center.key gave me c_phanta_gemini
did i miss something? ^^
they are ordered by the UI nodes I'm pretty sure
like ghostsalt said
i think you'd just check if context.other_card == card
Then do you have an explanation for why the cardareas I created had all of the cards stacked on top of each other despite being in the same set of nodes?
idk I would need to see the code
Let me think up a bit before making my problem your problem, I think I have an idea.
i made my own collection for my mod's menu if you need a reference
but it's basically just copying the normal one
Part of my problem lies in that this is a custom ui element in the Options menu, but I think I've put myself in the right direction
how would i call and use the information of a card's suit in a hand
smods wiki does a piss poor job with describing anything regarding calling info
do you want to check if a card has a suit or do you want to get the base suit
i want to get the suit of context.scoring_hand[0] and apply it to context.scoring_hand[1]
card.base.suit iirc
alr i tried smth and am not sure why it isnt doing anything (sort of mishmash from vanillaremade, context from hanging chad and code from dna)
is this a joker?
hmm try removing the cardarea check
im guessing this is nowhere close to anything that'll be functional
balatro in general has 0 good examples of jokers changing suits on cards. tarots yes but from what i see they work differently

everything up to the first if condition is fine
after that it should just be
SMODS.change_base(context.full_hand[2], context.full_hand[1].base.suit)
is it really just that simple?
the logic looks correct I'm guessing the context check is wrong but i never worked with stickers
yes
how can i find the name of a joker if i have just the key
i changed it to a context check i know would work and it still doesnt do anything
okay... all of the values in the menu show nil.
i don't know what's wrong, i don't know what to do
when i trigger the joker the game crashes
no idea then sorry
ok ty!!!
do you have a loc_vars function
uh.......
well problem is this is i kinda have no clue what i'm doing
i'm using like a template... just changing values and functions how i presume it would function
the thing is i did it with another joker and that one works just fine
does that one have a loc_vars function
loc_vars = function(self, info_queue, card)
return {
vars = {
card.ability.extra.poker_hand,
card.ability.extra.repetitions,
card.ability.extra.rep_mod
}
}
end```
ohh
okay lemme try
okay... the game no longer crashes. that's a good thing
made another mistake in the if, i guess
thanks :3
the numbers show up too!
the art and rarity show up correctly for the second joker show up correctly however the name and description are gone.
are there any decent regex guides or like a regex generator thing? I can't really wrap my head around this
uhhhhhhhh why is my condition not entering? can_use should be returning true in this condition
loc_txt not loc_text
what are you trying to do?
stuck again... might be a stupid question, but i've never programmed in this language before either.
how can i make it so the retriggers increase and trigger when the played hand matches the one in config, and contains an ace?
im sorry this is too much to read 😭
you should try printing condition by condition
devil card is killing me
it just works
is this a joker? if so this is very old syntax
are you using samplejimbos?
it is, and yeah
then stop and use a newer example mod
thank you
add and not context.retrigger_joker to every instance of not context.blueprintunless I'm misunderstanding how pattern patches work, or there's a way to do that with hooking, but I think regex is the only way? idk
Idk, I don't want retrigger jokers to double scale things. and I don't want to comb through every joker
I could make it a setting to turn on and off as well
I'm trying to make retrigger effects more reasonable but maybe that's foolish
hmm no idea then, I have used regex patterns but never for multiple lines
silly question but is the little joker text on the sides of most jokers a png i can download, I want to make sure its sized correctly.
am i missing something here?
yes, the second calculate overrides the first one and also that's not how add_to_deck is written at all
alright...
lol?
i actually wanna bump this in case anyone knows anything
yes, that's correct
now look at yours again
why is there an if, why is it in calculate
game told me to put an if there
or rather it said expected then
i assumed every then needs an if
Guuurrrrrr
gura
Rip gura
o7
o7
never watched her
Same
i liked amelia
Who’s amelia
watson
yes
show code
oh i had 1 too many ends
Hmm, why do you have to assert SMODS.modify_rank?
you don't have to but if you do it will give you useful info and crash properly if it fails
naw she crashed in the middle of the ocean
and then crabs ate her or smth
deserved for being british
The British aren’t real
Uhhh because thats how it works
key='TDSOTM',
loc_txt={
name='The Dark Side Of The Moon (1973)',
text={
"If {C:attention}played hand{} contains {C:attention}two cards{}, the right card",
"becomes the {C:attention}suit{} of the left card.",
}
},
blueprint=false,
perishable=true,
eternal=true,
unlocked=true,
discovered=true,
rarity = 1,
cost = 4,
atlas = 'vinyl',
pos = {x = 5, y= 0},
config={ extra = {size=2}},
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.size } }
end,
calculate = function(self, card, context)
if context.joker_main and #context.full_hand == card.ability.extra.size then
SMODS.change_base(context.full_hand[2], context.full_hand[2].base.suit)
end
add_to_deck = function(self, card, from_debuff)
play_sound(vinyl_TDSOTM)
end
end
}```
didnt change the suit, didnt play the sound. im suffering
There are very few functions that SMODS uses that it expects an assertion for.
the add_to_deck is still inside calculate
whuh
also i made a typo before the second [2] should be a [1]
If it's not technically needed, I'll remove it I suppose
do i have to add it above the calculate?
or below but not inside
N have you played entropy before ?
no
well i cant add another end between the calculate and add to deck, the game crashes if i do that
Fuck :D
i installed entropy to troubleshoot something but that was it
Do you know how i can add the jimbo that talks when you lose
To the start of the game
To welcome you
are you sure that's the problem and not a missing comma
no sorry..
Alright, I almost got everything, the last part is in this, for some reason that option cycle button is outside of the UI when I have the (inner darker) box element.
Relevant code (see label):
return {
n = G.UIT.ROOT,
config = {
align = "cm",
padding = 0.05,
colour = G.C.CLEAR,
},
nodes = {
{
n = G.UIT.C,
config = {
align = "cm",
padding = 0.05,
r=0.1,
colour = darken(G.C.UI.TRANSPARENT_DARK, 0.25),
},
nodes = { -- cut out for space, irrelevant for this
}
{
n = G.UIT.C,
config = {
align = "cm",
padding = 0.05,
r=0.1,
colour = darken(G.C.UI.TRANSPARENT_DARK, 0.25),
},
nodes = {
{ --\/\/\/ THIS
n = G.UIT.C,
config = {
align = "cm",
padding = 0.05,
r=0.1,
colour = darken(G.C.UI.TRANSPARENT_DARK, 0.25),
},
nodes = Showman.deck_tables,
}, --/\/\/\ THIS
create_option_cycle({options = joker_options, w = 4.5, cycle_shoulders = true, opt_callback = 'showman_ui_joker_page', current_option = 1, colour = G.C.RED, no_pips = true, focus_args = {snap_to = true, nav = 'wide'}}),
},
},
},
}
I have a feeling it is because of the type n = G.UIT.C but I am not really sure what else it would need to be in order for the option_cycle to end up inside, when it is normally inside before the dark box is added.
Is it a height issue and it gets pushed out because it runs out of space?
try R
i mean
On which one? The one containing the inner box and the button?
ive tried
end,
end
ive tried
end,
ive tried
end,
end,
only one where it doesnt crash on startup is single end no comma
😅 nope, haha
calculate = function(...)
end,
add_to_deck = function(...)
end,
expected symbol near end
show code
can it be a screenshot pls
but i think add_to_deck is still inside calculate
you have an extra end inside add_to_deck
remove the last end
and in the part you have
end,
end,
change it to
end
end,
also blueprint, perishable and eternal are not correct fields
i...ok?
oh
needs _compat dont it?
wait, can_use is called every frame you have the consumable highlighted?
wacky
yes
yeah all buttons do that
...buttons? so the sell button on things is also calling something?
if the button has a condition
aight the effect works now but the audio still doesnt play and im not sure if thats due to me messing up the file/folder structure or if the code doesnt work
oh play_sound needs a string
yeah its prefix_key isnt it?
no
was worth a shot
play_sound("vinyl_TDSOTM")
oh
also you need to define an SMODS.Sound if you haven't
and that would just be at the top like
yes
how...would i define that
smods wiki doesnt have an example for defining one
unless im just stupid
I don't know what I am doing, I am just copying perko code and hoping for the best, I get an error message however
SMODS.Sound{key = "TDSOTM", path = "filename.ext"}
you should learn how to read the docs tho
what do you want to do
make a copy of the fool when playing full/flush house
someone remind me the correct syntax for calling localize with a_xmult?
check vanillaremade
remove these lines
card:add_to_deck()
G.consumeables...
replace them with
SMODS.add_card{key="c_fool"}
Just curious if there’s a way to add a consumable slot in general for base game
I know there is not sure on how to use
G.consumeables:change_size(1) should work i think
or changing G.consumeables.config.card_limit
im trying im really not good with this sorta thing
in which scenario?
Where that specific consumable is always negative in packs shop etc
Might do this instead
you can make it negative in set_ability
Would you have to do this in the booster or can u just do it in card
you can add it to the card
Ok bet I’ll try it out
it does not work, I am told that there is an unexpected symbol near if
show code
if context.before and next(context.poker_hands['Full House']) then
G.E_MANAGER:add_event(Event({
func = function()
SMODS.add_card{key="c_fool"}
return true
end
}))
end
oh ok sorry i didn't even notice that wasn't inside calculate
ah, do i just add calculate = function(self, card, context) before it?
it needs to be in calculate
https://github.com/nh6574/VanillaRemade/blob/e3c5869f2e8eba54bea64b967a8adb63bd601f1f/src/jokers.lua#L25
yes
thank you so much, you have helped me like 3 times in the past 24 hours xd
is there a way to iterate through the keys of all jokers in the game without having to write them all out
G.P_CENTER_POOLS.Joker
can't find it 
So, the idea of this joker is that it gives eternal to the joker on its right, but eternal stays when it's sold, and it removes eternal from previously eternal cards, and only one works at a time, can anyone help me?
calculate = function(self, card, context)
if G.jokers then
local other_joker = {}
local protected_joker = {}
for i = 1, #G.jokers.cards do
if G.jokers.cards[i].config.center.key == 'j_willatro_bodyguard' then
protected_joker[#protected_joker+1] = G.jokers.cards[i+1]
for j = 1, #protected_joker do
protected_joker[j]:set_eternal(true)
end
end
for j = 1, #protected_joker do
if G.jokers.cards[i] ~= protected_joker[j] then
other_joker[#other_joker+1] = G.jokers.cards[i]
for k = 1, #other_joker do
other_joker[k]:set_eternal(nil)
end
end
end
end
end
end
I dont understand what you're saying
It stays eternal but loses eternal?
What do you mean by previous jokers with it lose it
My understanding is that you buy it, every card loses eternal, but the card to its right is somehow always eternal?
But what if a different card is to its right because this one is sold?
Said eternal stays when it is sold, meaning a new card would get eternal if its sold and it should lose eternal status
Well, if you put a joker to the right of it, that joker becomes eternal, all fine. But when you sell this joker, that other joker will remain eternal, not good. Now, if you get an eternal joker and this card, it removes eternal from that joker if it's not on the right of this joker. Very confusing, I know.
So while you have the joker the card to its right is always eternal, and the only eternal?
or is that what is not supposed to happen
What if you put a flag on the joker to the right?
How would I do that?
i have returned with what i hope is a simple question!
how do i check for when a glass card gets shattered
You would get the joker to right put eternal on it and do card.ability.flaggedbyeternal = true then you would check in update if there are jokers not to the right that are eternal and have that flag and remove it.
config = { extra = {chips = 50},
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.chips, card.ability.extra.chips + ((G.GAME.consumeable_usage_total and G.GAME.consumeable_usage_total.spectral or 0)*100)}}
end,
calculate = function(self, card, context)
if context.using_consumeable and not context.blueprint and context.consumeable.ability.set == "Spectral" then
return {
message = "+".. 100
}
end
if context.joker_main then
return {
chips = card.ability.extra.chips +
((G.GAME.consumeable_usage_total and G.GAME.consumeable_usage_total.spectral or 0)*100)
}
end
end,
}
im tryna add 100 chips for every spectral card but it doesnt update the "currently +50" (50 is the starting)
(im also really new to this so idrk what im doing)
(the code works its just the text i dont understand)
what does your loc_txt look like
loc_txt = {
name = 'Gabba Ghoul',
text = {
'{C:blue}+100{} Chips per {C:spectral}Spectral{}',
'card used this run.',
'{C:inactive}(Currently {C:blue}+#1#{C:inactive})'
}
},
ignore the name im not the drawer or the person making the ideas
so the number between # corresponds to the order in which you return vars in loc_vars
so #1# refers to the first one you return, which is 50
which is why it says at 50 all the time, you want to make that #2#
ah
ok thanks for the info
bumping this
(i hope) i get the calculate context i just need the conditional
yeah i mean i just took from cryptid's epic tag's code
are all your returns there?
wdym
cause if its a stack overflow maybe you left something open
i mean
this is the exact same code as another tag that i have that has the same intended effect but for an exotic instead
SMODS.Tag {
key = "exotic_tag",
atlas = "crp_tags",
pos = { x = 2, y = 0 },
min_ante = 4,
config = { type = "store_joker_create" },
apply = function(self, tag, context)
if context.type == "store_joker_create" then
local rares_in_posession = { 0 }
for k, v in ipairs(G.jokers.cards) do
if v.config.center.rarity == "cry_exotic" and not rares_in_posession[v.config.center.key] then
rares_in_posession[1] = rares_in_posession[1] + 1
rares_in_posession[v.config.center.key] = true
end
end
local card
if #G.P_JOKER_RARITY_POOLS.cry_exotic > rares_in_posession[1] then
card = create_card("Joker", context.area, nil, "cry_exotic", nil, nil, nil, "cry_eta")
create_shop_card_ui(card, "Joker", context.area)
card.states.visible = false
tag:yep("+", G.C.RARITY.cry_exotic, function()
card:start_materialize()
card.misprint_cost_fac = 2
card:set_cost()
return true
end)
else
tag:nope()
end
tag.triggered = true
return card
end
end,
crp_credits = {
idea = { "Unknown" },
art = { "Glitchkat10" },
code = { "Glitchkat10" }
}
}
i changed nothing but the rarity mentioned
oh hey youre the exotic guy
erm what
is mythic in your pool
what exactly do you mean
guy who did exotic rarity
were you not the guy who posted abt it before
i don't think so
#G.P_JOKER_RARITY_POOLS.cry_mythic
does the mythic rarity actually get put in there
ahhhhh yeah
i see the issue now
i just have to add pools = { ["Joker"] = true }, to the mythic rarity definition now right
-# oh my god i have no idea what do i even say here
yeah probably try it out 
I'm trying to make a joker that gives a 25 percent decrease to shop prices when held. however, when I sell it, it keeps the discount and I was wondering if there was a way to get it to remove the discount.
lol
add an effect on remove_from_deck
flip a coin, it will work if you guess right
i think i have an example somewhere one sec
-# okay i don't know where it went
why not just use add_to_deck and remove_from_deck
i did that for one of mine (one extra card selection in hands(not extra card to play))
yeah this is what i was kinda saying
oh here
SMODS.Joker {
key = "statically_charged",
config = { extra = { } },
rarity = "crp_exomythic",
atlas = "crp_jokers",
pos = { x = 1, y = 6 },
soul_pos = { x = 2, y = 6, extra = { x = 3, y = 6 } },
cost = 200,
blueprint_compat = true,
demicolon_compat = false,
loc_vars = function(self, info_queue, card)
info_queue[#info_queue + 1] = G.P_CENTERS.e_crp_overloaded
return { vars = { } }
end,
add_to_deck = function(self, card, from_debuff)
if G.GAME.modifiers.cry_force_edition and not G.GAME.modifiers.cry_force_edition_from_deck then
G.GAME.modifiers.cry_force_edition_from_deck = G.GAME.modifiers.cry_force_edition
elseif not G.GAME.modifiers.cry_force_edition_from_deck then
G.GAME.modifiers.cry_force_edition = "crp_overloaded"
end
end,
remove_from_deck = function(self, card, from_debuff)
if G.GAME.modifiers.cry_force_edition_from_deck ~= "Nope!" then
G.GAME.modifiers.cry_force_edition = G.GAME.modifiers.cry_force_edition_from_deck
else
G.GAME.modifiers.cry_force_edition = nil
end
end,
crp_credits = {
idea = { "Glitchkat10" },
art = { "Tatteredlurker" },
code = { "Glitchkat10", "MathIsFun_" }
}
}
i didnt even see ur message im sorry 😭
isn't really a great example because of cryptid-specific variables but
I'll try that out
thank you guys
that’s the cost of making a cryptid addon
let me tell you how much I’ve come to hate Cryptid:misprintize() since I began to live (I have not had to mess with it yet)
i spent like an hour trying to get additive value manipulation working
This guy still does NOT want to fit cleanly underneath the darker box, wtf
the jankiness of cryptid's code and my mediocre coding experiemce made it very difficult
basically
add_to_deck = function(self, card, from_debuff)
--code that does the discount
end,
remove_from_deck = function(self, card, from_debuff)
--code that does the discount but opposite
end,
Alright cool
bumping this again
if card.glass_trigger
oh so it really was that
so this'll work then right
It should.
chudhit 🔥
How do I make a UI element that is just text? I can't find anything that is like just a label, only create_text_input
trying to change cards into an enhancement from a consumeable but using extra = 'prefix_key' doesn't work
{n=G.UIT.T, config={text = "put your text here", scale = put your text scale here, colour = G.C.UI.TEXT_LIGHT, align = "put your alignment of the text here"}}
try mod_conv (no extra)
I think I've made progress, however:
A: Jokers to the left of this card keep eternal
B: Any jokers made eternal by this one stay eternal after it's sold
C: This joker can remove eternal from previously eternal jokers
D: Two of these jokers do not work together(minor)
E: idk, this stuff is just confusing
calculate = function(self, card, context)
if G.jokers then
local other_joker = {}
local protected_joker = {}
for i = 1, #G.jokers.cards do
protected_joker[#protected_joker+1] = nil
card.ability.flaggedbyeternal = false
if G.jokers.cards[i].config.center.key == 'j_willatro_bodyguard' then
protected_joker[#protected_joker+1] = G.jokers.cards[i+1]
for j = 1, #protected_joker do
protected_joker[j]:set_eternal(true)
card.ability.flaggedbyeternal = true
end
end
for j = 1, #protected_joker do
if G.jokers.cards[i] ~= protected_joker[j] or (G.jokers.cards[i]:set_eternal() == true and card.ability.flaggedbyeternal == true)then
other_joker[#other_joker+1] = G.jokers.cards[i]
card.ability.flaggedbyeternal = false
for k = 1, #other_joker do
other_joker[k]:set_eternal(nil)
end
end
end
end
end
end
sorry but I don't think I get what that means :( Is that like a function for something or do mod and conv stand for other values?
in your config, set that variable to your enhancement's key
mod_conv is one variable
like card.ability.mod_conv
wait lucky_trigger existed already so i can just do this right
A: i got nothing
B: setup something in remove_from_deck
C: add a check to see if the joker was already eternal before applying
E: real
Are all the scores in Balatro calculated at once or are they done as the animation plays?
well in that case i'm just missing the blind and the guy's done muhahah
was gonna answer till i realized i dont know actually,,, huh,,,
is there anything noticably wrong here?
Because if it's all at once, one of my mod ideas is getting thrown out the window
is it not working
nah it surprisingly works
but im not sure if anything there will mess with anything else
only one way to find out,,,
ai helped me a bit with it
if this is what you were looking for it's still not working
man what is this 😭
what's the key of your enhancement
I've been trying to get it to work how I want but I just can't get the text to be on top, see image
It's all at once before the animation plays.
key of the enhancement is awesome, prefix is norm
so m_norm_awesome?
you need that...
good to know :((
how do i find the limit for consumables
count until you find it
ok even after doing that the card still isn't functional unfortunately
this is the config, SURELY this is right
mod_conv
omg
you didnt change it 😭
how i miss these things is beyond me...
and it's still doing nothing..
surely everything in the config at least is right now 🥲
...can you send the full code
Are we all mature like...is it ok for a mod to contain a swear? I genuinely dont know what community consensus on that is
whats the code for counting the amount of consumables you have at the current moment?
#G.consumeables.cards
afaik only nsfw (like sexual stuff) is not allowed here
it's whatever
Aight
what should I put instead of that then?
Nothing, remove the use function.
ah ok thanks
What do the different UI element G.UIT._ types mean? I figure T is for text, O is for object, but I am really struggling to understand the differences.
what about for when finding the max amount of consumables you can have?
G.consumeables.config.card_limit
ok thanks
this didn't work (yes i only just now tested it; adhd made me do something else i forgot)
what didnt work i didnt say anything 😭
do you not remember the conversation around there
😭
you told me to insert the mythic rarity into the joker pool
i remember,,,
I SAID I REMEMBER 
wait this is a tag not a rarity am i stupid
this is a tag, but the change that i made was that i inserted the rarity it creates into the joker pool
...unless you didnt put that into the rarity code either..
put what into the rarity code?
pools = { ["Joker"] = true },?
the pools th-yeah
oh ok
there's gotta be something that exotic uses that mythic doesnt and it's just in your mythic code causing bs
otherwise im out of ideas 
are consumables, decks, blinds, and skip tags any harder to make than jokers?
i'm considering expanding my mod past just jokers, but worried about the quality dropping.
nop
also, how do i set up a joker spritesheet? the mod has so many custom jokers that i feel it would be much better to just have a spritesheet instead of each joker as its own image
big image with each 71x95 space being a joker
you cant send (tenor) gifs but
[spongebob forcing himself through the wall of the krusty krab gif]
hi bepis
https://www.finalparsec.com/tools/sprite_sheet_maker i think i used this, its nice
Use this free tool to make a sprite sheet for your Unity game and optimize performance for your 2D game.
thank you so much
hi hyperfixation girl
sob
debugplus
made a silly light joker i want to code
Yes.
i mean this is the code for mythic
...
local mythic_gradient = SMODS.Gradient({
key="mythic",
colours = {
HEX("ff6600"),
HEX("ffff00")
},
})
...
SMODS.Rarity({
key = "mythic",
badge_colour = mythic_gradient,
pools = { ["Joker"] = true }
})
...
-# reply ping intentional
G.STATE.COMPLETE = true
end_round()
om pretty sure
im
ill try it, thank you!
what's your mod prefix
crp
shite
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.xmult_gain, localize('High Card'), card.ability.extra.xmult } }
end,
calculate = function(self, card, context)
if context.before and next(context.poker_hands['High Card']) then
card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmult_gain
return {
message = localize('k_upgrade_ex'),
colour = G.C.RED
}
end
if context.joker_main then
return {
xmult = card.ability.extra.xmult
}
end
end
}
Why does it still upgrade even if card isnt a high card?
where default_weight
if context.scoring_name == "High Card"
trying to swap the values of chips and mult, but nothing happens with this.
Just do return {swap = true}
oh ok thanks
I am sorry I am very stupid and I tried your code however I get an error message, this is what I am working with, I just set the hand to high card for testing
i omitted it because i would not like it to appear in shop
so im having an issue
but it's,,, required,,,
this code partly works
required for what? a ton of my other rarities don't have it and they work completely fine
it turns the card to glass, BUT strangely does NOT have them give the 2x mult, BUT also still allows them to break
am i using the wrong timeframe?
wait why dont you just
look at your other rarities then
i think you are not corre
wdym
ive had this rarity ingame for 23 microeternities and it's never been the cause of issues directly
let me be wrong in silence
-# WRONG
can we pls turn balatro into a text based game im so god damn tired of ui
you dont want that i promise you
i do
i don't like ui at all ever
like look at what you did for the other rarites
also please tell me you don't actually use this font for colors
how would this help
what is your problem
monocraft is the goat
comparison purposes
"why does this work and this doesnt"
wait where would i put it
balatro but it's the oregon trail
okay but they have the exact same code and i don't see how that would help me create a tag for this
i didnt mean literally i mean what your problem with the font is
Replace next(context.poker_hands['High Card'])
i love monocraft
oh
what's the error
line 138 state dne
oh ok i was just boutta do it
it's just generally not very pleasant to look at due to its pixelated nature
eeh
ive been using it for like 2y and its a real good one
unless you can suggest any other monospaced fonts for me to try out im stickin with it
i feel like you would use comic sans when writing a resume
try putting them after the return
r/rareinsults ahh 😭
just causes a crash before i load in
yes
r/theytried
(i don't even know if that's an actual subreddit)
-# it probably is tbh
You can't complete the round during scoring.
that prob makes sense xd
meanwhile my fun-enjoying ass
oh hell no
oml i didnt even notice
wiiideee chips
i would quit coding if those were my only options
jumpscare
hard mode
why 😭
gonna be so real with you
the larger sin than the font is your coding env being so light
Whatever Font | dafont.com
my computer screen sucks <3
it is at max brightness rn and my phone can go higher
i read this as "coding envelope," wtf does "coding env" mean
environment
mmm
it's not that bright
THERE we go.
i had to reimplement mult deletion because the one i made in vallkarri relies on activating it mid-run, not starting with it
i mean like this is my bg color on vs code, p sure this is the standard for dark mode in vs code
"chips deletion" you failed actually
shh
see this is just mean 😭
i think i mightve deleted mult a bit too hard
i waited for an image that would never come
lol
still trying to get help on my stack overflow insta-crash over here
how would you recommend accomplishing this
sob
Is this code wrong?
Howd you get that debug menu?
what nia said
not that i have a problem with it but i find it incredibly funny that of the 3 names i have you use the one that is least prevalent
nah nia better
yeah that'll do
god this reminds me that i really want to make an ariral joker
Yes.
last time i saw this, it had like 3000 mult
say that again
that again
how do I fix it?
cool thanks
i'm very sad that i can't post tenor gifs in here
i assume normal uploaded gifs still work though
"Nope!"
Remove the context.joker_main check.
well damn
do your loc_vars match your configs
like this?
also, seals on every joker guy, you're always lurking and you're always here, do you have any idea why my funny hard crash happens 😭
Something is a very smart and cool guy :)
It is cool he is around to help so many fellas
I think so.
thats on the blind loading
which didn’t happen before I added this new stuff
which means I added something that screws up
i see; usually i get that crash due to what i mentioned
well
no mythic tag today 🔥
mythic tag tomorrow chat
trust (i'll figure it out (probably not (hopefully though)))
I forgot to check if ret am I stupid
That wasnt it oh no
what if I comment it out
Oh so it’s not even those ones
Anyone know how to create this part?
oh it’s my blind check code
info_queue
haven’t made one myself yet but it’s that one
Do you put this part in the localization?
No, in loc_vars
“Well now why isn’t it working”
<— she didnt uncomment her glass code
breaking the sound barrier speedrun:
where tf is my oops
touché
JESUS
no that's jimbo
my bad true
even playing a pair gives you enough mult that the game needs to start bringing out #
(that joker is sort of good)
can someone explain to me how the hell to do make this code work, it doesn't crash, it just doesn't do anything and the help I got earlier I cannot understand what they were saying
we got another carot tho
another kakarot
what

mb
anyways uhhhhhh bump
is the cardarea check necessary im 97 percent sure it ins
tisn'
isnt
jfc
Its if a gold is played, but ill remove that and see what happens
is the rarity color a gradient
yes
that's probably it
exotic tag works perfectly fine though
does the exotic tag use a gradient
exotic uses dark_edition?
Is there a way to get the month and day?
or an smods gradient
no, it uses a custom smods gradient
what's the code for that
i have no idea where it is
cryptid don't have a "rarity.lua" like me
might be able to find it though
guess im that 3 percent lol, crashed when I removed it, didn't crashe when I readded it


searching in the cryptid code tag:yep always uses a static color or dark_edition
ok now what, demon joker? extreme demon joker?
geometry dash mentioned
you probably know best for this
whenever you get a chance, take a peek
this is my one in a lifetime message in modding dev im off to modding chat now
it applies glass
then how did i do this 😭
SMODS.Tag {
key = "exotic_tag",
atlas = "crp_tags",
pos = { x = 2, y = 0 },
min_ante = 4,
config = { type = "store_joker_create" },
apply = function(self, tag, context)
if context.type == "store_joker_create" then
local rares_in_posession = { 0 }
for k, v in ipairs(G.jokers.cards) do
if v.config.center.rarity == "cry_exotic" and not rares_in_posession[v.config.center.key] then
rares_in_posession[1] = rares_in_posession[1] + 1
rares_in_posession[v.config.center.key] = true
end
end
local card
if #G.P_JOKER_RARITY_POOLS.cry_exotic > rares_in_posession[1] then
card = create_card("Joker", context.area, nil, "cry_exotic", nil, nil, nil, "cry_eta")
create_shop_card_ui(card, "Joker", context.area)
card.states.visible = false
tag:yep("+", G.C.RARITY.cry_exotic, function()
card:start_materialize()
card.misprint_cost_fac = 2
card:set_cost()
return true
end)
else
tag:nope()
end
tag.triggered = true
return card
end
end,
crp_credits = {
idea = { "Unknown" },
art = { "Glitchkat10" },
code = { "Glitchkat10" }
}
}
but doesnt do the 2x scoring
but does allow them to break
im attempting to like make it re evaluate the cards after applying glass but it just
wont
im pretty sure cry_exotic doesn't use SMODS.Gradient
Shouldn't you do context before for converting to glass before scoring so it'll properly convert it
Or am I crazy
Was about to ask the same thing
im understanding it more than ive been with the help of an ai but this issue is being a bit of a pain
what's the issue?
I have a joker who converts cards to glass and I use context before to ensure the 2x scores
glass' 2x doesnt apply but it still allows them to break
So I assume thats why you arent triggering the 2x but are breaking
oh my god it doesn't
SMODS.Rarity({
key = "exotic",
loc_txt = {},
badge_colour = HEX("708b91"),
})
also seemingly doesnt work on diamonds even with smeared joker so i assume i'd have to write special code for that
they do it the vanilla way in update
i never even knew there was a vanilla supported way to do gradient rarities
this 97 year old Balatro mod still makes gradients the old fashioned way
the problem is that SMODS.Gradient adds extra info to the color that the attention text function doesn't like
I'll make an issue later
Half of my stuff is still the old fashioned way
Im horrified of updating smods with how out of date my stuff is
Which context exactly?
try doing it in context.before
Oh
Im glad I updated first
I have but it just doesnt apply the glass at all when i do that
guys why does this crash my game
Look for dark_edition in vanilla, that uses a gradient the vanilla way
I assume i'd need to check suit first then context.before?
anyone else have any way to help me?
Thanks SMODS.Blind and SMODS.Atlas for not making any sense.
"chudhit" 😭
i mentioned that too 😭
Context before just takes care of whatever changes before any scoring occurs by my understanding, so in utilizing that its meant to allow your conversion to take place then score
"we both crode"
what
anyway a hacky way to fix it is to just use { color[1], color[2], color[3], color[4] } as your color
Yeah still wouldnt work
Whats ur favorite color N
green
does anyone know why it keeps crashing? i tried a lot of fixes, none of them worked.
i'm just going to use a hex average
Im certain it would, its likely just an incorrect implementation
Cause again, I have a joker who does convert to glass and scores properly
Its just a 1 in x chance to convert the hand to glass and it works properly
what's your atlas look like filewise
It's a .PNG
like the size
32 x 32 at 1x.
Yep
bruh
SMODS.Tag {
key = "mythic_tag",
atlas = "crp_tags",
pos = { x = 7, y = 0 },
min_ante = 5,
config = { type = "store_joker_create" },
apply = function(self, tag, context)
if context.type == "store_joker_create" then
local rares_in_posession = { 0 }
for k, v in ipairs(G.jokers.cards) do
if v.config.center.rarity == "crp_mythic" and not rares_in_posession[v.config.center.key] then
rares_in_posession[1] = rares_in_posession[1] + 1
rares_in_posession[v.config.center.key] = true
end
end
local card
if #G.P_JOKER_RARITY_POOLS.crp_mythic > rares_in_posession[1] then
card = create_card("Joker", context.area, nil, "crp_mythic", nil, nil, nil, "cry_eta")
create_shop_card_ui(card, "Joker", context.area)
card.states.visible = false
tag:yep("+", HEX("#ffb300"), function()
card:start_materialize()
card.misprint_cost_fac = 4
card:set_cost()
return true
end)
else
tag:nope()
end
tag.triggered = true
return card
end
end,
crp_credits = {
idea = { "Unknown" },
art = { "Glitchkat10" },
code = { "Glitchkat10" }
}
}
I threw that in the SMODS.Blind part and in the SMODS.Atlas part, all of them led to the same crash.
no #
ah
Unless the atlas, pos, AND the atlas_table all go on one line, then I got no idea.
can i see the code
did you try ASSET_ATLAS
Here's what I have it at right now.
name have . not ,
yes I saw that, I'm asking for the code with what I said in
font clipping im pretty sure
Im just askin out of curiosity
Can a tag or a card description be added animations or stuffs like
The tag wiggles/shakes while the card tagged is highlighted
I hope so
it needs to go in the atlas
bumping this, do i just change self to card?? it's a blind so i dont think that makes sense but??
So like this?
yes
(I tried that before, no dice.)
ANIMATION_ATLAS tho
This isn't an animated texture.
is that for all blinds or just animated
it needs to be
oh
well then
it can be a 1 frame animation im pretty sure
yes
That seems a little convoluted for a static blind texture.
But whatever, it works
i also believe it's this because the game crashed each time i tried to load a blind until i commented it out, in which everything worked fine
bump?
those are not the arguments for stay flipped
also the hook doesn't make sense because the hits for pseudorandom are independent
It looks like you need to indent the SMODS.Debuff another line and add an end on the next line after.
cardarea is never G.play in joker_main
remove the check
also indent properly yes
it has one
it crashes their game without it
I meant add another one.
because the rest of the code has a problem, not because it's wrong
crashes are good
oh yeah those are straight up just the wrong arguments huh
how do i make the hook make sense though
Of crashes are so good why it make me so rage angry
i would just patch it
Indent the line with SMODS.debuff_card again.
you need to go to therapy
(this is a bit i dont think that)
I tried it, they said I was too good at self reflection:(
i tried to avoid it but it's inevitable
thanos patch
so true!
can i see more
oh?
“I think im getting the hang of these patches” I says oblivious
I was then stabbed 100 times in the chest
context.full_hand[i] is always nil
oh, I thought you were the one who told me to put it there lol
well i might say different things in different contexts
i dont know what the effect is
If a gold card is played, then the Joker is debuffed
its a reference to the Cyberman's old weakness, gold
@red flower Finally after hours of reversing, trial and error, and plug and chug, I got it
replace all of that with
if context.individual and SMODS.has_enhancement(context.other_card, "m_gold") then
SMODS.debuff_card(card, true, "CyberGold")
end
thank you




…