#💻・modding-dev
1 messages · Page 507 of 1
yoyoyo!
i made textures for a skin but they appear grey in game
and only half of them are appearing
Participate in our hot potato fest
(just asking, when is "soon"?)
soon is now, I had a cat on my lap but now I'm pulling up the code I wanted to reference
okay fire
anyone know why this is happening ?
that doesnt do anything
oh wait that doesn’t explain the suit
Hmm
also i made several cards and most of them arent showing up
it was only showing customs for the hearts and dimond cards that i made but was greying them out
elaborate?
i will again one day fix the messages
but freedom
you finally did it
but how do i get it to not do that..??
this shit is certified ass!!!!
do i need to specify to make it hc or lc?
im pretty sure that's what you do? i dont really work with card skins
local is_suit_ref = Card.is_suit
function Card.is_suit(self, suit, bypass_debuff, flush_calc)
-- do this so that debuffed cards don't count for their suit when they're not supposed to
if self.debuff and not bypass_debuff then return end
-- replace the "modprefix" with your mod's prefix. this also assumes that "Spearts", "Spiamonds", etc. are the actual keys of the suits
if (self.base.suit == 'modprefix_Spearts') and (suit == 'Spades' or suit == 'Hearts') then return true end
if (self.base.suit == 'modprefix_Spiamonds') and (suit == 'Spades' or suit == 'Diamonds') then return true end
-- fill in the rest of the suits similarly...
return is_suit_ref(self, suit, bypass_debuff, flush_calc)
end
dont apologize lmao its mb
tyty!!
i can't access that link
Small issue with this, this should count as a flush, but it doesnt for some reason?
is there a way i can iterate through a table and during each iteration, track whether or not it's the last? for instance
blah = function()
for i, v in ipairs(myTable) do
if v:function(arg1, arg2, isThisTheLastIteration) then
return
end
end
end
it also doesnt seem to work in general
(i played a pair of diclubs when a joker was tracking diamonds, and nothing happened)
shoot, ok. flush calculations just use is_suit anyway so it makes sense that it's all or nothing. do you have the debugplus mod?
yeah
hare's rarity
2
4
ok great. hover over a card with one of your custom suits with the mouse, press / to open the console, type eval dp.hovered.base.suit, and send me the output
JCJ_diclubs
so i think it goes based off of the name
and not the key
OH WAIT
IM AN IDIOT
I MIXED UP CARD_KEY SUIT SUIT_KEY
...would i == #myTable work for this?
yea lol
i assume you've got it then?
yeah
yea it should
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play and not context.blueprint then
local enhancement_pool = { 'm_gold', 'm_steel', 'm_glass', 'm_wild', 'm_mult', 'm_lucky', 'm_stone', 'm_bonus' }
local random_enhancement = pseudorandom_element(enhancement_pool, 'edit_cards_enhancement')
context.other_card:set_ability(random_enhancement, nil, true)
local seal_pool = {'Gold', 'Red', 'Blue', 'Purple'}
local random_seal = pseudorandom_element(seal_pool, 'edit_cards_seal')
context.other_card:set_seal(random_seal, true)
local edition = poll_edition('edition_random', nil, true, true,
{ 'e_polychrome', 'e_holo', 'e_foil' })
context.other_card:set_edition(edition, true)
return {
message = "Card Modified!"
}
end
end
is there a reason why the seals and editions are being applied when the hand is played and the enhancement when it scores?
shouldnt it all happen when the card scores?
Is this cursed
is there a G.STATES.{thing] for discarding btw and if so what is it
-# i forgot it
-# or is it also just G.STATES.HAND_PLAYED
Who here has done extensive UI mods?
Mildly, but it could be worse. Try to find someone you know with visual impairments and see how well they can tell what's happening though, because I could see this being an accessibility issue.
i have done a UI mod
i have done a UI mod too
Perfect. So I want to add an interaction button similar to the sell button, but doing something else. I want these to be triggered by a joker. It's for moving cards into slots they wouldn't normally go to. What do I need to do?
Also in general, how can I override vanilla UI code? I want to make some colour adjustments.
you can always hover over the card
😨
This is true. But that was what I had thought of.
INFO - [G] Is j_test_broken in G.P_CENTERS? nil
INFO - [G] key type: string value type: string
INFO - [G] G.P_CENTERS does not contain key: j_test_broken
INFO - [G] calc_dollar_bonus does not exist.
INFO - [G] obj: nil
INFO - [G] key: j_test_broker
INFO - [G] value: j_test_broken
someone.......please........for why......does it not work 
you can either patch or hook the functions that do those things
there are a couple of ways you can add buttons to cards, my mod hooks Card:highlight and just overrides the vanilla buttons altogether, but i also add like 4 different buttons lol
it's not something that I can explain over messages tho. i can link to the code
Sure, that'll surely help. Thanks.
@/sleepy make a card button api that works with a controller pls thank you
here's the code
https://github.com/nh6574/JoyousSpring/blob/ff2ec2dc9c3d8a88e22cc68b9b8973c19fb00d91/src/general_ui.lua#L423
all the functions above that one except for function Card:align_h_popup() are used
i should probably move them around
your mod check should be if not next(SMODS.find_mod(mod_id)) then
as for the rest, I dunno what you're trying to do
can_use = function(self, card)
return #G.hand.highlighted == 2
end,
how would i make it so that the 2 cards selected also have to be the same rank?
I see. So I'm not that familiar with more advanced Lua stuff, but I can basically just declare functions and it overrides the vanilla?
if this fixes im offering my hand in marraige
I play balatro on my nintendo switch 2, it's honestly just what you expect, map buttons to each thing, and you can use the touchscreen, too.
I would probably use the touchscreen. It needs more love, lol.
also any ideas on how i would do this?
and G.hand.highlighted[1]:get_id() == G.hand.highlighted[2]:get_id()
literally i want the provided keys to add to that calcdollars table ONLY if the joker's definition contains a calc_dollar_bonus function
this is a hook so it doesnt override it, it just checks if the card is from my mod and adds the buttons to it instead of letting vanilla add the buttons
and also and not SMODS.has_no_rank(G.hand.highlighted[1]) and not SMODS.has_no_rank(G.hand.highlighted[2]) store them in variables to shorten it
actually better questoin
nvm
i know how to answer the question
lol
I semi-understand, but don't think I'll fully get it until I try it. Thanks.
does your crosstest mod create both j_test_broker and j_test_broken, if so, what's its priority compared to your mod
Hyperfixation priority: 1
crosstest priority: 2
crosstest main.lua:
looks like you're calling the function before j_test_broken is defined
i am?
so the
the detection isnt broken?
its the loading?
holding celebration until i see it myself
ok so like this right
yep that looks like the right order

if it still doesn't work, it's possible the jokers aren't added to G.P_CENTERS immediately, and you should check in SMODS.Centers instead
got it
ok trying with that then

it works jippie :)
cant you do this in a hook
this is for a function
i mean if P_CENTERS is not updated at that point
you can do it in Game:main_menu or something
idk whats the best function to hook at the beginning of the game
👰♀️
How might I take ownership of e_foil in order to change it's effects, as a joker? I want to simply make it X2 chips.
The wiki kinda explains it's a thing you can do, but it doesn't much explain how to make things happen in this kind of oblique way.
is this good or bad
true.....
pack it up guys wedding's off
i want the lorax gif to be posted here so bad
does anyone know how to make set_seal only activate when a card is triggered?
i know set_edition has a delayed argument which works
you mean so it triggers immediately when its scored? try setting immediate in set_seal(_seal, silent, immediate) to true
i mean applied, i have a joker that adds a random enhancement, edition and seal when a card is scored
the enhancements and editions are applied when the card triggers
but the seals are applied when the hand is played
@red flower do you have the latest smods installed?
pretty sure i found a bug in src/overrides.lua where there arent nil checks in funcs causing crashes when you restart a run with a card highlighted
[patches.pattern]
target = '=[SMODS _ "src/overrides.lua"]'
pattern = '''
text = flags.replace_scoring_name or text
disp_text = flags.replace_display_name or flags.replace_scoring_name or disp_text
poker_hands = flags.replace_poker_hands or poker_hands
'''
position = "at"
payload = '''
if flags then
text = flags.replace_scoring_name or text
disp_text = flags.replace_display_name or flags.replace_scoring_name or disp_text
poker_hands = flags.replace_poker_hands or poker_hands
end
'''
match_indent = true
[[patches]]
[patches.pattern]
target = '=[SMODS _ "src/overrides.lua"]'
pattern = '''
if flags.prevent_debuff then return false end
if flags.debuff then
SMODS.debuff_text = flags.debuff_text
SMODS.hand_debuff_source = flags.debuff_source
'''
position = "at"
payload = '''
if flags then
if flags.prevent_debuff then return false end
if flags.debuff then
SMODS.debuff_text = flags.debuff_text
SMODS.hand_debuff_source = flags.debuff_source
end
'''
match_indent = true``` fixed with this
hm odd
could you show the code
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play and not context.blueprint then
local enhancement_pool = { 'm_gold', 'm_steel', 'm_glass', 'm_wild', 'm_mult', 'm_lucky', 'm_stone', 'm_bonus' }
local random_enhancement = pseudorandom_element(enhancement_pool, 'edit_cards_enhancement')
context.other_card:set_ability(random_enhancement, nil, true)
local seal_pool = {'Gold', 'Red', 'Blue', 'Purple'}
local random_seal = pseudorandom_element(seal_pool, 'edit_cards_seal')
context.other_card:set_seal(random_seal, nil, true)
local edition = poll_edition('edition_random', nil, true, true, { 'e_polychrome', 'e_holo', 'e_foil' })
context.other_card:set_edition(edition, nil, true, true)
return {
message = "Card Modified!"
}
end
end
it doesnt happen to me, might be a mod that calls evaluate hand
jokerdisplay did that but i fixed it
hm
well itd be something to show them in the pr thing no?
also, great to have you on team piss drawer!
wdym
isnt there a thing where you give them suggestions and stuff?
the github issues?
perchance?
you can make an issue there if you want
uploaded an issue on github o7
huh im not sure why set_seal does things differently than the others
im still looking into it im gonna see why the others work as expected
yeah from what i understand it just doesnt take the delayed argument like the edition or enhancement ones
the second true in edition in theory is for that
i gues set_seal just doesnt have it
i think set_ability is vanilla and then eremel added it to set_edition too
nobody added the delay to set_seal
yeah immediate in set_seal seems to just skip making an event at all
and without it doesnt help either
i suspect you'll have to patch set_seal to make it work how you want
okay, I've gotten fairly close but I don't know how I'd check if you have a certain joker:
SMODS.Edition:take_ownership('foil',
{
calculate = function (self, card, context)
if context.post_joker and context.card_area == G.jokers then
return { xchips = 2 }
end
if context.main_scoring and context.cardarea == G.play then
return { xchips = 2 }
end
end
},
true
)``` I'm wanting to check for `j_mode_blue_monday`
because doing something like context.other_joker == "blue_monday" just does nothing, and also doesn't work for card scoring
i only just glanced but maybe you could do smods.find_card or smth
card_area is wrong, its cardarea
whoopsies
nice! I didn't even know that was a function, lol
it would probably just be card.config.center.key == "key"
what's the intention for this?
makes foils X2 chips
When you have the joker, Blue Monday, it changes foil to do X2 chips instead. It is supposed to go back to normal if you lose Blue Monday.
yeah this will just overwrite it
yeah :(
does foil use a config
it does, it's just config = { extra = 50 }
oh ok, it doesnt for what i was asking but dw lol
SMODS.Edition:take_ownership('foil',
{
calculate = function (self, card, context)
if next(SMODS.find_card("j_mode_blue_monday")) and (context.post_joker or (context.main_scoring and context.cardarea == G.play)) then
return { xchips = 2 }
end
if context.pre_joker or (context.main_scoring and context.cardarea == G.play) then
return {
chips = card.edition.extra
}
end
end
},
true
)
hm, that's what i was worried about, lol, having to completely override it :P
thats what take ownership does
i want to write either a joker, enhancement or deck effect (undecided) wherein scored cards explode (as in exploding dice - so instead of scoring their normal chips value, they score a random number between 1 and their normal chips value, if they score their normal chips value, they retrigger) but i don't know how to "replace" a card's value such that it does something else
where should i look to start looking into this?
can i just set bonus to 0 or
i assume you can just get the card.base.nominal per card and then just make it the base is the max and 0 as the lowest and just doa good ole rolling
calculate = function(self, card, context)
if context.before and context.main_eval then
for i, c in ipairs(context.scoring_hand) do
c.base.nominal = pseudorandom('explodeVal', 1, to_number(c.base.value))
end
end
if
context.repetition
and cardarea == G.play
and context.other_card.base.nominal == c.base.value
then
local cardRef = context.other_card
return { repetitions = 1,
func = function()
cardRef.base.nominal = pseudorandom('explodeVal', 1, to_number(cardRef.base.value))
end
}
end
end
? 
yes =]
now its just the thing of making the messages return properly
it was simple when the fridge joker was handling that, but now since its all done in calculate_joker thats been a struggle
idk give it a go!
that was just my spitballin
what was the source of the lag?
it was that we were probably iterating through all of G
now we just do
[[patches]]
[patches.pattern]
target = '=[SMODS _ "src/utils.lua"]'
pattern = '-- TARGET: add your own CardAreas for joker evaluation'
position = "after"
payload = '''
for _key, _cardarea in pairs(G.fridgeareas) do
table.insert(t, _cardarea)
end
'''
match_indent = true
alot of that has to do with gpu joker
ah
since im pulling the gpu util constantly
you could set context.blueprint_card to the fridge card
and set ret.card to the fridge card too, if the joker returned anything
gotcha gotcha, let me try and see if i can do that
i had a version where it worked for messages before when we didnt have it working for seals
but then since it called calc joker in jokers calc it meant it scored twice (once in jokers calc and once in my cal joker hook)
all mods should have documentation
dilly
i hope you rest wonderfully
im glad i got some stuff done because tomorrow is concert
are you singing
:)
hi fellow pissdrawer
hello fellow pissdrawer
normally itd take me a week to do something like things i did today
instead it only took today and last night
thats means your getting better :3
and that was last night with 4 am brain i had to fix my own code bro 😭
i amm!!!!! it's awesome!!!!
i feel like i aint getting much better
ill do x thing but then not comprehend how to do some basic thing
i just rotate knowledge
that's literally just programming
"not getting any better"
looks inside
listing rite of passage as an example
ur simply a baboon
my ass is nowhere near that color thank you very much
tell it to the judge

gn zzz
yeah that should be good
lmao
now he'll rest REALLY well
chiaki danganronpa
he will when i slide up next to him
this just looks really funny
no care, just chiaki
you know ball
chiaki danganronpa
chunky kong
how would i make a joker detect the jokers to it's immediate left and right
-# wait, i can just look at blueprint-
look at vremade blueprint
how can i compare the current blind score to the required score 
i remember that the required score var is G.GAME.blind.chips, but what's the one for the current score?
it was G.GAME.chips 
Big fan of chiaki Danganronpa
-# this joker gives xmult for how many times chiaki danganronpa has been mentioned in the balatro discord
Would it be possible to have a joker check a players other current jokers to see if any are in a pre-determined pool? I currently have a list of jokers in a pool via SMODS.ObjectType and was wondering if there is potentially a way to use it to pull this off.
I haven't quite thought this through fully but wanted to ask before I potentially waste anymore time trying to figure something out.
what change removes negative from this again
the 3rd parameter should be true if you don't want negative
so nil, true, true?
yes
alr
you can check if a card is in a certain pool by doing if card.config.center.pools.Spectral for example
🫡 I shall give that a shot, thank you
hello lads
i'm here because i need help and people in modding-chat are being weird
what need
so i'm using jokerforge
you'd be better off asking in #1386843228330004611
ok sure
Also yeah Joker Forge forum is much more active
Is there a way to access how many chips have been scored? I want to use it as a variable.
Not total score, like how many chips when the joker is triggered
hand_chips
in what context? context.hand_chips? G.GAME.hand_chips?
oh, really? Okay
same with mult
Is there a way to apply a shader to the whole screen instead of just a joker?
i'd assume the same way the crt shader is applied
I’ll probably have to do a lovely patch then
ok so i'm trying to make a joker that levels up the most played poker hand after a boss blind
how do i make it so a hand is ALWAYS set to a certain one, no matter what i play?
Okay, am I blind? I am looking for the way to add $$$ to cash out, but the context doesn't seem to exist in any documentation? Is there a better docs source than the github wiki since it's really tiny and doesn't actually have much.
Ah, okay. I'm glad this doesn't exist anywhere for anyone to read without finding this repo 
oh, i put it in calculate
how would i hook into a function from a different mod?
(doing this for compatibility)
what would be better to do to make a consumable that doubles all joker values more balanced
- make the consumable spawn in packs less often, a la Soul
- change it to double the values of a specific amount of jokers
- change double to 1.5x or something
- leave it be
I think SOULing it is probably the best balancing method imo, or having it be rarer at least
especially if it doubles values of jokers you get later
especially if it doubles values of jokers you get later
it would not do that
just the ones you have
oh ok
-# I must be recalling smth that does in Cryptid I think I forget tbh
then yeah probably just make it pretty rare
that can be very powerful with the right build
-# you might be thinking of the glowing deck?
the glowing deck pisses me off because it doesnt round the values so if you do stuff with money or heaven forbid hands per round
-# im probably thinking of the glowing deck
you just have. a decimal of those that you can never ues
im sure it wouldn’t be too hard of a process to make an addon to make it round
-# granted I wouldn’t know how off the top of my head but
hurrm
the issue with that is it's like
in a set of four of the Owl House glyphs lmao
so either i would do one of the other things that isnt making it rarer, or make the other three do something that would warrant making all of them rarer
I see …
if it’s its own consumable type, you could have its rarity be reduced heavily in the shop
or if it’s a unique kind, you could probably add the 4 to a pack that just contains one using a pool, and make the PACK very rare shop wise
yknow what i shouldve asked here but what does kind dictate in terms of packs
it's its own, but i don't want to make ALL of that consumable type rare
i could make the 4 their own type
seems like a bit much tho
i honestly think it'd be easier to just nerf the card a little
i have a joker that makes a random card wild if you play a hand with a scoring 8, but it sometimes hits wild cards and then of course does nothing, which is something i thought i specifically stopped it from doing. does anyone know what happened here?
iirc it’s like if they’re all Arcana packs
I forgot how you can use it, admittedly im no expert yet but it’s just a way of grouping like packs together if they have different keys/textures
there is the pack idea
I forget if you can adjust rarities of external pools without making a new consumable
nerfing it works too ofc
i also dont wanna make a separate pack
valid
so yea i'd rather nerf it
but how..
lower the number or make it like a certain amount of jokers
like 1-3
-# side note i MIGHT like sharks
-# my sona is a shark and i'm hugging my ikea shark while coding my mod called the shark pack
hm
I think both probably work well enough, actually, depending on how much the number reduction would be,
-# w for having a blahaj I wish I had one
i'd set it to either 1.5x or 1.25x
ya
I’d think that would work imo
-# admittedly at the end of the day it’s your decision and you could always go back on it later-
I think you gotta check context.scoring_hand[i] with SMODS.has_enchantment btw
so like if SMODS.has_enchantment(context.scoring_hand[i], “m_wild”) then
etc etc
yep i just figured that out 🙏 ty
-# np ! :>
the question is do i round up or down for certain things like cash (if i can be specific about it)
like the only thing i wouldn't round would be probably xmult
you could probably do either, or just have it round to the nearest whole as opposed to strictly up or down
if it’s any sway dnd rounds down
The story tab is fun, I love doing these stupid writeups
holy shit beyond canon
fairly certain it was intentionally named that
right i forgot that nearest rounding is. A thing
kris..
I need to play Deltarune so I can project my depressive transfeminine swagger onto Kris
how would i make the player lose the game on a condition in a joker?
this happens once when i was testing out my joker
it's something to do with the G GAME functions
start_run or delete_run
cool cool ty
make an event
also based
cough
Peak
-# art not by me, its by the shrimp
-# i'd ping them but idk if they would like random ping
Shrimpsnail?
nuhuh
Oh
I'm defining a new PokerHand, i need to check the order in which cards are played/appear in the hand for the hand to be valid.
For instance:
King, then Queen should count.
Queen, then King shouldn't count.
The evaluate function for SMODS.PokerHand gets the hand as an argument. The ipairs(hand) order reflect the selected order, is there another way to check the actual inhand position of cards?
I wonder why when I remove mult it just stop showing
all ik is that when you get negative mult, it disappears visually
is there a way to let negative mult appear
no idea
like its not that hard ig, since the mult part is probably a float type
Would anyone happen to here know how to resolve issues when using set_ability() to transform a card to one of different pixel size? I keep getting hese resizing issues on the floating sprites even if I try to reset the dimensions of the center child sprite
how would i check if a flush is a certain suit
hello
Anyone know the issue here?
how can I skip the initial animation when opening balatro? Is there a function that I can call in my mod?
you can click the screen to skip most of it already and it's at most 15 seconds...
code?
is there a function that I can use to click the screen?
ignoring the fact that the consumable's key should be butter_dog, try adding your mod prefix before butter in the consumable's extra and see if that works
example:
config = {
extra = '[mod prefix]_butter'
}
may i ask why you're going through the trouble of automating a single click?
It works now, thank you so much
yw, for future reference most things that ask for a key (set_seal, has_enhancement, etc) will need your mod prefix preceding it
understood
Hey yeah sorry, but now I have the problem of the seal not doing anything?
this is kind of a random question but did the mod name text cycling like this used to be a thing?
i feel like it didnt do this before am i going crazy its like comedically silly with my mod name length LOL
i haven't made a seal before, perhaps ask somethingcom or someone else with more experience
alright
When developing the mod, I constantly restart Balatro. So removing that to speed up the dev loop is quite beneficial in the long run.
that makes sense but there isnt much need when you can just do this by clicking:
-# you can click earlier than that, i just wanted to show that i was in the starting animation
I know but it's a manual input that I want to automate for speed up test suit.
In that case i wouldn't know how to automate it
-# never thought i'd see the day that a single near effortless manual input would be considered so much of a hinderance that it must be automated, but alr
I've solved it. Simply add this in the Lua entry point of your mod.
G.SETTINGS.skip_splash = "Yes"
How did I make this happen?
is this a riddle
I got no idea what I did here. I was just playing the Letter Deck and suddenly DEAD
one of the mods saves functions into something
Hey can someone help me out, so I have been working with this joker and am having a headache now literally a headache I asked so many People for it they helped me and yet nothing so my hope on you, basically this jokers second function is to give me xmults if all the other 4 jokers that I have made are there together and yah idk what or where am messing it up
there's definitely a better way to do this, but my suggestion would be to have four booleans (one for each joker) and then iterate through G.jokers.cards checking if each card is one of the four jokers (if G.jokers.cards[i] == "j_[mod prefix]_[joker key]")
Let me try it out, can I send u the code on dms and check for me?
if G.jokers.cards[i].config.center.key == "j_modprefix_key" ☝️
you can just send it here and let more experienced coders comment on it, too
right, ty Ali
i narrowed down the issue to it's source but i still have a question: how can i give a stake a timer using the one found here and have the timer pick up where it left off if you leave and rejoin the run?
How do I make a mod whose only thing is replacing all the music with a track I have?
I only have said track as a normal speed Mp3, do I need to download audacity to manipulate it first or is there a way where I can just convert to .ogg and nothing else?
looking for a general feeling about a tag_added context
i can see that being very useful already just because you could check for what tag was obtained
god please let it be a real thing
similarly, are people interested in a tag_triggered context?
Double Tag:
but cryptid makes its own tag_added context so id imagine adding it to smods itself would be a great thing
im all for tag related stuff
...what about "preventing" tags from triggering altogether, much like prevent_debuff?
tag storage
😂
meth not here
-# me when I am searching for meth in a given room:
breaking bad
I'm not sure it'd be possible to prevent specific triggers due to how triggers work
you could prevent all triggers on a certain context though
How could I draw a line between the two?
if you're already using main_end you can just add a thin row node before the cards
Oh, that’s a thing that’s able to be done? Thank you
how can I add 2 red buttons to this enhancement like it would be a consumable card?
(the 2 buttons goal is to increase/decrease the rank of said enhancement by 1)
I would look into how aikoyori's shenanigans adds buttons to playing cards
since now I got a balatro mod manager I guess it'll be easy to find that mod
bump
please
wait no I am mega dumb of course this is possible
call mods?
<@&1133519078540185692>
🔫
what'd i miss
FREE MONEY!!
stopping tags triggering is a bit jank if you want messages to trigger but it does work
show code?
-- togabalatro = SMODS.current_mod
local newicon = love.image.newImageData(togabalatro.path.."executable.png")
and what does it look like in the folder
...see the image below the error image.
what is the command for creating a button?
(one of those buttons you find on consumables if you click one of them)
the entire folder structure
i can barely see anything there
Do I need to patch lovely for my mod to use love2D code?
well okay that looks correct
you can just call love functions directly
im going to assume thats the main folder of your mod
Okay, just wanted to be sure
yeh.
might be something with how smods compiles it then which i dont really know anything about tbh
since the file does definitely exist
...and nativefs helped.
yeah its how love2d deals with paths
nfs is the answer to most problems like this lmao
Does remind me about that one video with someone remaking a section of Rewrite's song with window position manipulation and what not.
...anyone?
I don't think it's as simple as just running a function
Find a mod that does this
And read the code for it
aight
how can i make joker trigger when click?
Hook Card:click.
Ortalab has Index enhancement for playing cards that creates buttons and such.
note pebble 21 plus?
i wonder if i can work on this
im gonna try
aight, thanks ali!
how do i get the localisation name of a card?
also, how do i close a menu in a function?
👍 ^u^
G.FUNCS.exit_overlay_menu()
schweet ^u^ thankuthanku!
i'm getting this log:
this happens when i open my building menu
oh you need to check if G.OVERLAY_MENU exists
ah ^U^ gotcha
mm, same issue, even after replacing all references of that with one that checks it
(if G.OVERLAY_MENU then G.FUNCS.exit_overlay_menu() end)
oh. i see what i did -u- oops hold on
question: if you wanna create some balatro ui you code it in another file or in the main file?
anywhere
anywhere you like, the game treats everything as one big file basically
unless its like lovely patches or assets
it's because I'm learning how to make a ui consumable red button and how ortalab did it... jesus christ
UI is UI
not too hard once you get into it but there's alot of jank
try starting with simple things
is there a way to change what my menu's back button does?
depends on how you're making the menu
ah, i'm using create_UIBox_generic_options
for mine i just recreated all of it and made my own function for the back button
right ^^
it has a back_func argument
hmmm, what other tag contexts do we need
I have tag added, tag triggered, and prevent tag trigger atm
does triggered check for yep and nope
iirc gambler's tag does? unsure
what is gambler's tag from
Cryptid
the one that has a 1 in 4 to give an empowered tag
sorta guessing here, i'll double-check
yeah it nopes
you may as well add nope anyway ^u^; who knows
but nope isn't for triggers
why me 
nope just removes the tag
nope also used to be vanilla
why are you removing tags
so shouldnt be too difficult i assume
i think nope is used exclusively by rare tag
how can rare tag nope
what 😭
why would it do that
i was more referring to old edition tags
with the nopes
i mean i can see how that might've been added?
there may have been fewer rares at some point
maybe 3 rares, say
why does it nope?
i'd assume if it can't apply the edition
probably if you have no jokers
or that ^u^ nvm
-# what does :nope() do 
If, during calculation, all Jokers have an edition, it aborts.
weird, why doesn't it replace any?
deletes the tag
It's intended to simple make Jokers have an edition, not replace them.
it literally says it can replace them though....
^^^^^^^
Blame calc jank. 🍞
why doesn't it just sit and wait
Ali would you expect a joker that tracks triggers of tags to rigger when your settings tag fails to go off
not sure this is how it's meant to work >:3 (i've fixed this, dw)
Similiar to how we now can track if a probability fails, yeah, I'd expect being able to track whether a tag :yep()s or :nope()s.
-# Hell, I'd probably make one that scales based off of :nope()s.
I am conflicted on this, I don’t feel like using nope is similar to a probability failing, it’s just removing a tag
Vanilla uses :nope(), so...
it does but its also not necessarily for probabilities
I think it’s just a naming issue, vanilla doesn’t use it when a tag has triggered
It just inconsistently removes one tag when it can’t trigger
Contexts for if a tag is triggered, when it :yep()s and when it :nope()s sounds solid though.
I don't want to overflow contexts either though
it's either one context that tracks the tag being set as triggered, or it's one context that tracks tags having yep called
Then limit the context calling to the hooks of :yep() and :nope().
i would do the opposite and have one for triggered and make mods hook yep and nope
especially given nope is not that common
That sounds fine too, I guess. 🤷
-# At least for me, I've been hooking and calling contexts myself.
this also relies on people setting tag.triggered = true which has previously done nothing
bepis PRd this recently i think
I think
tag.triggered = true just prevents the tag from executing again from what I can see.
...yeah, https://github.com/Steamodded/smods/pull/813 ...
As for the other hook...
Is there a way to add the use ability to a joker or is that consumables only?
i have like a million contexts
not natively no
there are some mods that do it (like mine) but you need custom stuff
yeah
oh?
tries to test context in a different place
why is it running multiple times
hadn't removed old attempt
😭
Okay, how could a button cause a function to go off?
to make something a button you need to have button = "function_name" in a node in the first place
wait, first i actually got to get the button appear, 1s
that would call G.FUNCS.function_name
thank you btw
hook Node:can_drag?
Wait, i just realized, the joker description doesnt stay when you have it selected
ure
yeah this works
elcome
sorry to bother again, is there a way to fix this
or like, have a better option
what are you trying to do
i want a joker with a button to activate it
oh having buttons in a description is harder
what is the button for
to delete the joker and spawn in a new one, and hopefully if i can code it, add a lovely stencil on the screen
this stencil
https://love2d.org/wiki/love.graphics.stencil
and the player could activate the joker at will
ill take any eaiser way to do it
does it need to be in the description or can it be a button like all the other buttons?
it can be either, i dont mind
but, N' said what im doing is harder so lets just go with what the sell button does lol
sorry if im making this difficult for yall
i have a pokerhandpart which is four fingered flush but just not needing four fingers and another one thats the same but with straight and i want to make a pokerhand thats both of them but not on the same four like the image but i dont know how to do that
also how do i explain it
(for the run info)
Good schmorning chat
is there a way of checking whether the hand played is "not allowed" such as a 4 card hand in the psychic etc?
context.debuffed_hand
sweet!
gm dilly
Hi N how are you
good morning dilly
Hi eremel how are you
look I'm not on mobile today so you get your real name and not auto correct silly!
Lmfao
Im not silly this day, only serious
im silly
How are you silly
sillying around
Silly_The_Sillster
I was silly
Then I serioused
is there a way to get the edition of a joker and store it?
Greetings modding individuals
You sparkle brighter than every star in the cosmos
Hello :)
I wish the issues you have i had any brain to help with but alas I am not that guy
can i habs help please
is there a part(pokerhandpart) that makes it so that all cards score?
I will acknowledge you so you dont feel you are being ignored, i dont know the answer to your question right now because im still waking up, but if someone hasn't answered you soon I'll check once I am up and about
thank you
another question:
is there a way to make a poker hand that just always wins like setting to chips to the blind chips or smth
my info_queue isn't working, here. is it because the card it's referencing has multiple descriptions?
its first one says Gives a free Rare Tag, and its second, +1 consumable slot
lemme grab it, hold on
c_catan_settlement = {
name = "Settlement",
text = {
{
"Creates a free",
"{C:attention}Rare Tag{}"
},
{
"{C:attention}+#2#{} consumable slot"
}
}
},```
that should work fine
i notice that your loc_vars has a warning under it
what is it
when do you think multiboxes should be used to look best
ie after how many lines
i do it per effect but my cards have like 3 effects each
alas, nada
ah lemme see
OH god uhm
embarassing
there are
two of them -u-
oops!
lol
oh so close ;u;
this is because the card is assigned its +1 consumable slot ability when it's loaded
but, it's not loaded here ^^;
idrm tbh
i think the Catan divorce is finished 😢 Phanta will miss it
but it'll hopefully make Phanta a little less bloated
i have a pokerhandpart which is four fingered flush but just not needing four fingers and another one thats the same but with straight and i want to make a pokerhand thats both of them but not on the same four like the image but i dont know how to do that
though i am closeing my pc for today
the calculation for a regular straight flush already allows you to do that if you have four fingers, so you should be able to just do pretty much the same thing (do you have pokerhandparts set up for your currently-implemented hands? if so, you can just check if the hand contains both a four-flush part and a four-straight part, that's how a vanilla straight flush works pretty much)
?
or use this https://github.com/lord-ruby/Penumbra
i got this code from Aiko and I was wondering what definition is
local cardhighlightook = Card.highlight
function Card:highlight(is_highlighted)
local ret = cardhighlightook(self, is_highlighted)
if self.highlighted and self.area and self.area.config.type ~= 'shop' then
self.children.use_button = UIBox {
definition = AKYRS.UIDEF.wildcards_ui(self),
config = { align = "cl",
offset = { x = 1, y = -0.75 },
parent = self }
}
elseif self.children.use_button and self.highlighted then
self.children.use_button:remove()
self.children.use_button = nil
end
return ret
end
Thanks to both of you
nvm, i found it
definition is the ui stuff me think
the first node should be G.UIT.ROOT
bepis
dilly

ive got such a mess of a code
dw so do i
bepis i realized why my mod was so big when i handed it to you that one time
okay yes, its there but now the sell button is gone
you didnt add the sell button
{
n = G.UIT.C,
config = { align = "cr" },
nodes = {
{
n = G.UIT.C,
config = { ref_table = card, align = "cr", padding = 0.1, r = 0.08, minw = 1.25, hover = true, shadow = true, colour = G.C.UI.BACKGROUND_INACTIVE, one_press = true, button = 'sell_card', func = 'can_sell_card' },
nodes = {
{ n = G.UIT.B, config = { w = 0.1, h = 0.6 } },
{
n = G.UIT.C,
config = { align = "tm" },
nodes = {
{
n = G.UIT.R,
config = { align = "cm", maxw = 1.25 },
nodes = {
{ n = G.UIT.T, config = { text = localize('b_sell'), colour = G.C.UI.TEXT_LIGHT, scale = 0.4, shadow = true } }
}
},
{
n = G.UIT.R,
config = { align = "cm" },
nodes = {
{ n = G.UIT.T, config = { text = localize('$'), colour = G.C.WHITE, scale = 0.4, shadow = true } },
{ n = G.UIT.T, config = { ref_table = card, ref_value = 'sell_cost_label', colour = G.C.WHITE, scale = 0.55, shadow = true } }
}
}
}
}
}
},
}
}
heres the sell button
what is it
its dis folder lmao
sob
ui code jumpscare
dont worry u will get it
:3
also the button is on the wrong side me think
is any side truly a wrong side
dont worry, youll probably not be allowed to sell this joker anyways
i feel like im overlooking something simple
im gonna try and see if replacing it with self
wait
pass the card (self) to my_menu_function
hi srock
hi d
how are you my buddy pal
i feel you, i slept from like 10pm to 3 am, then was up for a couple of hours then forced myself to sleep until like 10
but today is concert day
now i gotta find out why its not centered
well i woke up the first time because my body does this cool thing where it stops breathing
so after i fixed some of the messages for fridge i then just put on a yt video, and closed my eyes for an hour until i tricked my brain into going 'well, i guess we may as well' while blasting cold air from my fan on my face
its not always effective but it worked out
hypotheically, if this was true, how would i fix it
uhh dunno, i copied joyousspring's code and the button was on the right side
:3
i can send it to u to check if u want
thamk
What does this mean
What does it look like rn
thamk
set align to 'cr' in your UIBox call
oh yeah heres the config too
i add a small version of this for the vremade wiki
very nice
i dont know why i said that in caveman speech
i thought about posting a small template of this to bmsp too but i guess its not necessary
do it so i can copy it
you are influenced by my stupid speech style ooooo
oh, got it, thank you srockw
I'm getting a bug with my mod. Can someone please help me fix it?
I have no clue how to code in lua lol (this entire mod is with help)
The mod is just to change the win ante from 8 to 10 btw.
im dying laughing rn
okay, how could i check if the card is a specific joker?
function Card:highlight(is_highlighted)
local ret = cardhighlightook(self, is_highlighted)
if self.highlighted and self.area then
self.children.use_button =
UIBox {
definition = my_menu_function("Flote", self),
config = {
align = "cr",
offset = {x = -0.4, y = 0},
parent = self
}
}
elseif self.children.use_button and self.highlighted then
self.children.use_button:remove()
self.children.use_button = nil
end
return ret
end
Penumbra crash
if self.config.center.key == "j_prefix_key"
thank you once more
What am I doing wrong?
In your SMODS.Sound call, the key has to include "music" somewhere
For it to be treated as music
I'm using Penumbra, not managing music through Steamodded directly
(the name of the music track should start with music_)
as in music_siiva_sanctuary?
Ok that makes sense
thats like
It can technically have the word "music" anywhere but yes
Anything else I might be doing wrong?
for music tracks yes it's required
i love modding balatro ^u^ it's so rewarding to get something to work
Bump
Also you can bang your head against the wall when it doesn't work!
Anyways, this is honestly the BEST outlook to have on programming, so congrats
you can do
if not G.GAME.modprefix_toggle then
G.GAME.modprefix_toggle = true
G.GAME.win_ante = G.GAME.win_ante + 2
end
or hook another function
calculate = function(self, card, context)
if context.before then
for _, v in ipairs(context.scoring_hand) do
v:set_ability(G.P_CENTERS["m_para_ashen"])
v.ability.perma_x_chips = v.ability.perma_x_chips or 0
v.ability.perma_x_chips = v.ability.perma_x_chips + card.ability.extra.xchips_gain
v:juice_up()
end
end
end
``` why is this joker code making the xnil chips appear
Any of you guys good enough with messages to tell me why this doesnt show a message of the playing card's id?
Nice, thanks
show your loc_vars
(the xnil chips does nothing when held i just don't know why it shows that)
it's on the playing card not the joker
mm, weird -u-
Like this, right?
you should be using your actual mod prefix
yes but replace modprefix for your mod's prefix
K
Thanks so much chat :3
also please fix your indentation
Sure
It should be message = kard:get_id()
thanks sroc
hi N
oh i thought this was an smods bug but this text is just unlocalized in vanilla for some reason
'
i dont know who either of you are
Okay bye
…
Why is the localize call commented out thunk
WHY
why tf does setting permanent played xchips make this show up
hilarious
It's trying to display perma_h_x_chips. Did you somehow give it bad data for that?
why do you hate me
my code never mentions perma_h_x_chips is the thing
calculate = function(self, card, context)
if context.before then
for _, v in ipairs(context.scoring_hand) do
v:set_ability(G.P_CENTERS["m_para_ashen"])
v.ability.perma_x_chips = v.ability.perma_x_chips or 0
v.ability.perma_x_chips = v.ability.perma_x_chips + card.ability.extra.xchips_gain
v:juice_up()
end
end
end
i MIGHTVE goofed somewhere
me or paradox
Paradox
gives the crash when i dont use tostring(), doesn't display when i do use tostring()
Kard
Even still I wouldn't recommend using get_id either for this
but why would it not show with tostring
I don't think you want to put the IDs in a player-facing visual because I'm not sure the typical player is going to really associate Jack to Ace with 11-14
this is for 2-5
it's hack
oh cus you're trying to put the message on the played cards
that have gone off screen
change the 2nd parameter of calculate_effect to just card
yeah
THERE we go
now i gotta fix the timing
because why are they displaying after scoring
despite being in
context.before
is it cause it's in an event?
yeah you're nesting two events, cus calculate_effect with message puts another
so just take it out of the event?
maybe
i think you can make the message immediate
gonna try the immediate message thing (trigger)
and then if that doesnt work ill take it out of the event
and if THAT doesnt work ill do the reverse and take it out of the calc effect
the immediate thing will work
surely one will wokr
i believe
you can pass instant = true to the effect table
oh ok i forgot about that one
yeah no that'll just work
ok no that passed all the messages at once lmfao
makes sense
i think i need to move it to the repetition context?
you can add a delay to the event i guess
or just try without instant and without event
wait no, it's cus you're looping through every card manually right
probably will have to add a delay
nah, too little, do like 0.8
alr
yeah no that only delayed when theyd send all of them at once lmao
what does your code look like rn?
you have to add trigger = 'after' to the event
what does that mean
"yeah no that only delayed when theyd send all of them at once lmao" but again
🤔
where'd you add this
in the event???
you didn't make it a string
I DIDNT
GDI
ok yeah i do need to change the context
but it works better now!
yeah main_scoring should work
wait no individual lmfao
what might cause the second line of this extract of game.lua to cause a crash?
if G.FILE_HANDLER.run then
G.SAVE_MANAGER.channel:push({
type = 'save_run',
save_table = G.ARGS.save_run,
profile_num = G.SETTINGS.profile})
G.SAVED_GAME = nil
end```
the crash being?
i think that happens when you're trying to save a function
if any of your jokers has a function in their ability you should get rid of that
very weird 😭 i haven't done that
what is your code that caused this crash to start happening
my last update was just removing content
i moved some of it to a new mod
and that new mod works fine
;u;
update was mentioned, so here's that
local update_ref = Game.update
function Game:update(dt)
if not G.GAME.phanta_zodiac_rate_cache then G.GAME.phanta_zodiac_rate_cache = 0 end
if Phanta.config["zodiac_enabled"] then
G.GAME.phanta_zodiac_rate = G.GAME.phanta_zodiac_rate_cache
else
G.GAME.phanta_zodiac_rate = 0
end
if not Phanta.config["animations_disabled"] then
for k, v in pairs(G.P_CENTERS) do
if not v.default_pos then v.default_pos = v.pos end
if not v.default_pos_extra then v.default_pos_extra = v.pos_extra end
handle_phanta_anim(v, dt)
handle_phanta_anim_extra(v, dt)
end
else
for k, v in pairs(G.P_CENTERS) do
if not v.default_pos then v.default_pos = v.pos end
if not v.default_pos_extra then v.default_pos_extra = v.pos_extra end
v.pos = v.default_pos
v.pos_extra = v.default_pos_extra
end
end
return update_ref(self, dt)
end```
does it stop happening without your mod?
yes
oh i found it ^^;
for k, v in pairs(G.P_CENTERS) do
v.phanta_set_anim_state = function(self, state)
self.phanta_anim_current_state = state
self.phanta_anim_t = 0
end
v.phanta_set_anim_extra_state = function(self, state)
self.phanta_anim_extra_current_state = state
self.phanta_anim_extra_t = 0
end
end```
no idea why this no longer works 😭
it was working before
aye, but it tries to save that, i assume
regardless, removing it makes it work ^u^;
and i'm making util functions instead
thanks :D
how were the functions used
self:
I mean what arguments did you pass to them
state
yeah I know, what type was state
string
very odd
is there any better way of cutting out the music like this
it looks fine, is there an issue?
It doesn't seem like there should be any reason it would not appear
Two question how do I make my card create the thing only one time even if its retrigger and why the name of my seal is Error
I set min_ante to 1 and it appears but if min_ante is 3 it doesn't????
I was struggling to get my tag to trigger, and finally realized that while jokers use context.starting_shop, tags use context.type.shop_start - is there any difference between these that I should understand, or is it just a naming mismatch?
Tag context is not the same as joker context
They're different structures, and as such have different contexts
But timing-wise they're both essentially "when the shop first opens"?
my tag doesn't work if two are present:
the first one yeps, but spawns the second Joker
and the second spawns the second Joker as well
I'm having an issue with multiples of my tag too. Mine spawns all the boosters at once instead of processing one tag at a time.
if context.type == 'shop_start' then
local logger = adc_get_logger()
local lock = tag.ID
G.CONTROLLER.locks[lock] = true
tag:yep('+', G.C.ADC.PLUM, function()
local booster = SMODS.add_card( { set = 'Booster', area = G.play })
booster.T.x = G.play.T.x + G.play.T.w / 2 - G.CARD_W * 1.27 / 2
booster.T.y = G.play.T.y + G.play.T.h / 2 - G.CARD_H * 1.27 / 2
booster.T.w = G.CARD_W * 1.27
booster.T.h = G.CARD_H * 1.27
booster.cost = 0
booster.from_tag = true
G.FUNCS.use_card({ config = { ref_table = booster } })
booster:start_materialize()
G.CONTROLLER.locks[lock] = nil
return true
end)
tag.triggered = true
return true
end
end
why do I get this crash
I think seals are like tags not jokers - essentially you use config instead of ability, so center.config.extra.mult
Look at how VanillaRemade is doing it: https://github.com/nh6574/VanillaRemade/blob/main/src/seals.lua#L61
return { vars = { self.config.extra.money } }
( @red flower hi hi hello please help ^^; )
( multiple Contestant Tags spawn the second card twice )
( and the first card 0 times )
i've reverted back to using SMODS.create_card, as it's not the issue
hmm i dont see anything wrong
here's a visual btw
it doesn't happen with one contestant tag, one uncommon tag
i've tried both combinations of those too
Maybe it's cus you're using a global variable card? I doubt it but who knows
Was it the issue
Is it normal that my runs doesn't save anymore
Does it sound normal?
In my experience runs be saving after entering blind, playing a hand, and cashing out
So it not saving at all would naturally be strange
im looking at vre's blueprint code, trying to see how i would detect a joker to the immediate right/left, but i'm not getting it
it's just this bit right at the start
local other_joker = nil
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card then other_joker = G.jokers.cards[i + 1] end
end
it loops through your whole set of jokers in order from left to right, and if it finds the joker that's doing the calculation (i.e. the blueprint), then it sets other_joker to the joker immediately to the right of the blueprint
if you want to get the joker to the left, then you'd have other_joker = G.jokers.cards[i - 1] instead
yeah kinda dumb question
ok, i need help with getting my animated sprite to not crash Balatro when I enter the collections menu, when I did not have the atlas_table = "ANIMATION_ATLAS"I could see my new consumable in the collections menu but it didn't animate
is there another atlas I need to define or something?
its look like this (kinda weird
is it possible to detect when a joker has been bought?
ok I found, its a bug in Talisman
I think context.buying_card inside a calculate function is probably what you need to detect something like that
what does that context apply to
Every card, you can filter jokers by doing if context.card.ability.set == "Joker"





