#💻・modding-dev
1 messages · Page 473 of 1
help
does anyone know why the colors arent workibng
it crashes when i hover over the joker
i can just do it for you if you want
or i can explain it
shouldnt you only have colors in colours?
oh wait nvm, hm
im not really in need im just curious
whats like the function for it
you could combine the code for walkie talkie and one of the hand jokers
when someone gets a chance to look at this id be grateful
like taket he conditions for jolly joker and add the mult and chips from walkie tyalkie
no like
add base chips and mult to a poker hand
like leveling it up kina
oh wait, colours should be in vars i think
you are putting it outside
try adding message_card = context.other_card in the first return, maybe
i did try card = context.other_card so maybe that will do it
edit: no change, unfortunately
hello lads
im trying to figure out some ui stuff just so i can understand how it all works incase its useful
and im on the smods wiki UI Guide page following it, but i feel like im missing something big
like ive figured out how ui nodes work got a function that returns the root node a ui thingy
but i am not understanding what a UIBox is at all
i copied over from the guide anyway and like, i dont know what comes after that? like where actually is the ui i just coded how do i see it in-game
this is the config
config = {extra = {type = "..."}},```
why does
```lua
loc_vars = function(self, info_queue, card)
return {vars = {card.ability.extra.type, colours = {G.C.SECONDARY_SET[card.ability.extra.type]}}}
end,``` crash
Log?
let me test something
just reached 45 functional jokers thanks so much everyone 🥳
How does the game know to change the colour of a consumable's "Use" button to red when its use condition is met? I can only see one colour defined in the use_and_sell_buttons function for consumables
just looks a bit shit is all
try doing the crash message when the card scores too
why do I get the cash with the right message but I get a second message saying error after
hello my name is car and i made this song for everyone
I've noticed something else strange actually
It grows in size a little on the initial click
You have to cycle back to "locked"/"unlocked" a second time before it's the proper size, no matter if it's the first click or not (it's just more noticeable on the first click)
i think anyway
I could be hallucinating ive been looking at this for an hour
how do i make this destroy erntire hand
because dollars already handles the message automatically and the message key is wrong
oooooooooooooooooh 😆 😆 😆 😆 😆 😆
im gonna ask again
I made it work by first marking cards for deletion which solves pointing to the specific card with a message during the deletion phase
oh is that what you wanted
you could have done message_card = context.destroy_card
oh
let me try that
this is my first time making a mod for anything so im blind here
bu
yea that. that did it. drop in on the old code i shared LMAO
if context.destroy_card and (context.cardarea == G.play or context.cardarea == "unscored") then
return {remove = true}
end
how do you detect if the player is in certain Ante while also in certain rounds
say, he's in Ante 8 in just 6 rounds
Similar problem, my "Again!" text for doing repetition triggered by Joker appears on the played card in hand rather than on the Joker during scoring. i'd like it to be more like the Dusk card
if context.cardarea == G.play and context.repetition and not context.repetition_only then
return {
message = 'Car!',
repetitions = card.ability.extra.repetitions,
card = context.other_card
}
end
i mean, you are putting the message under the scored card there
yea i think im misunderstanding how things are working
yea i just needed to not be using card = context.other_card
i think
G.GAME.round_resets.ante
G.GAME.round
or something like that i dont have the code rn
Can anyone tell me why this activates for all cards discarded and not just the ones with the seal?
if context.discard and context.cardarea == G.hand and card.seal == 'leshys_beeswithin' then
SMODS.add_card({set = 'Base', area = G.hand, no_edition = true, enhancement = 'm_gold'})
end
end,```
and context.other_card == card
@daring fern @grok is this true
trying to fix a weird hook bug, is this the right way to call it?
this doesnt work
u know you can open the game and test it in the console right
oh fuck you're right
remove the prefix from the definition (the second image)
oh wait is a prefix needed as well in the first image? ei see
Code?
Does anyone have a mod or resource I can look at to try and implement adding mult as many times as there are a certain rank in your deck? like +3 mult for every 9
vremade cloud nine maybe?
you would have to tweak the code a lot
as long as it can tell me how to check the deck then it shoulddd be okay
oh very nice
Any idea why my varSeal variable isn't working here? I grabbed this code straight from the examples page in SealsMod.lua only modifying the entry in config. This works to apply the seal if I type the key of the seal manually into set_seal, but when I use the variable, nothing happens. Weirdest thing is this was working until just now when I was tinkering with another event, and now it's borked.
Because it would be card.ability.varseal
shouldn't G.STATE be G.STATES.packname when you're inside the menu for a Booster Pack? Like G.STATES.BUFFOON_PACK for example
bump in case anyone can find out why
how are we able to get the base code for balatro, surely its encrypted
very easy to access as long as you own the game actually. There's a YouTube video on how to get access to it that's very easy to follow
No.
i mean more in like a general sense, gmaes are usually encrypted right?
I'm not a game dev, but I'm sure they usually are for security purposes
true mb
then what would it be? Are those states unused?
does context.post_trigger only apply to other jokers, or can i make it apply to itself?
-# also good evening
Just exited my custom blind and got this error.
It triggers when any joker triggers, as long as it is enabled.
simple question, how do you apply a sticker onto a joker?
SMODS.Stickers["modprefix_key"]:apply(card, true)
thanks
G.STATES.SMODS_BOOSTER_OPENED?
ok but i need it to be specifically this card, so will card == card work here?
No, it would be context.other_card == card
thanks. Is there a way I can mess with the cards inside of a booster pack? like context.other_card or something
Yes.
How would I make a deck that gives an extra joker slot?
Another simple question, how do you get only the jokers in shop? The way I'm trying isn't working, as it's getting the jokers held by the player too
https://github.com/nh6574/VanillaRemade/blob/main/src/backs.lua Look at the black deck for reference
Thanks :D
G.shop_jokers.cards
can someone tell me why i get squigglies here (at the bottom). mod runs fine and im assuming everything is proper but idk if im missing something
add the balatro source code to your workspace
No.
😭
Thats how I fixed it..
You need to add the lovely dump to your workspace.
ahh
ty!
?
The cards are in G.pack_cards.cards
how do I get the rarity of the card being sold during context.selling_card? according to wiki card = card -- the card being sold so card.config.center.rarity should work but it returns the rarity of the joker
context.card.config.center.rarity
ah, thank you
when I click the "Use" button on my Joker, how can I get the game to execute the code I need it to? rn it's just doing nothing lol
Code?
I figured it out I think
How does one call all objects of a certain type at the same time? Lets say seals for example, but the results include both modded and vanilla?
I'm trying to see if I can utilize a math.random to scroll through the number of available seals in the game, pick one, and set the name to a variable for later use.
how would i add a button to a joker? like how they have SELL
....how much time do you have
Basically, you're primarily looking at hooking G.UIDEF.use_and_sell_buttons() (which is for mouse ui) and G.UIDEF.card_focus_ui() (for controller ui)
How do I only run code in a calculate if the joker is not being retriggered?
set_seal(SMODS.poll_seal({ guaranteed = true, type_key = 'pseudoseedstringgoeshere' }))
I just got done doing this lol
well, "done" might be a bit of an overstep
sighhhh hello somecom /j

i would genuinely love to know how to add a button so I can replace the Spectrals in my mod to fuse Jokers.
same
tho I'm still struggling with the details
speaking of which
bump
I can put one together for you if you need. What's the circumstance for it?
It is very weird how we're all coincidentally doing this at the same time
do you just want to add a simple "Use" button or something else?
No
so like the other person said, you'll want to hook G.UIDEF.use_and_sell_buttons and use nodes to add new buttons to the card
Basically, when you create buttons in the ui, you can pass a function key into it, which it looks for in the G.FUNCS table that automatically passes the UI node in as a parameter
okay okay im getting ya
So you'll have to define your handler function as G.FUNCS.whatever(e)
one thing I did to make my life a bit easier is have G.FUNCS.function_name and also a Card:function_name, and have the G.FUNCS one reference the Card: one, that way you can define the behavior of the button within the card itself rather than inside of the G.FUNCS function
Can I use this for a seed string? It keeps returning purple seals every time.
function Card:tboi_can_use(any_state, skip_check)
if not skip_check and ((G.play and #G.play.cards > 0) or
(G.CONTROLLER.locked) or
(G.GAME.STOP_USE and G.GAME.STOP_USE > 0))
then return false end
if G.STATE ~= G.STATES.HAND_PLAYED and G.STATE ~= G.STATES.DRAW_TO_HAND and G.STATE ~= G.STATES.PLAY_TAROT or any_state then
return self.config.center.tboi_can_use(self, self)
end
return false
end
-- Color change for TBoI Jokers
G.FUNCS.tboi_can_use = function(e)
if e.config.ref_table:tboi_can_use(false, false) then
e.config.colour = G.C.RED
e.config.button = "use_card"
else
e.config.colour = G.C.UI.BACKGROUND_INACTIVE
e.config.button = nil
end
end
this is what I'm talking about, but I don't think its strictly necessary
No.
Remove the type_key.
In that case, what is type_key referencing?
The seed to use for the randomness of the seal.
Hmmm

can it please save my changes
this is the stupidest fix I have ever had to do to fix a UI issue
it does not work if it is repeated any less than four times
actually 5 lol
recalculated five times
the G.FUNCS thing is done four times for parity
computers are magical lol
well
not completely fixed
but now it's one issue instead of like three
probably just gotta mess with the padding and offsets in your nodes now, right?
i mean if you click the button then it returns to normal
so you'd think it would just need to reupdate
huh, weird
...do you think eight times would work
you know what that means, Ctrl+c -> Ctrl+v a sixth time
this feels like an insult to programming as a whole
unfortunately eight times did not work
sometimes I look back at my coding assignments from my first semester in college and feel the same way
damn, maybe 42, the coding number
my first semester in uni had some abhorrent python code
I programmed a game where like 3/4 of the code without exaggeration was regexes
I programmed connect 4 for one of my assignments as we had to make a computer player and mine was... inefficient, to say the least
has anyone found a way to do this?
when its the computer's turn to move it takes like a second to continue the program
did you use minimax
I was new to programming, I didn't even know what minimax was lmao
unfortunate
I used brute force, looking 2 moves into the future
...only two moves?
thankfully since connect 4 only has 6 moves max it was only 6^3 possible moves
like two moves for each person or two moves in total
well the current move, the opponent's response, then the move after that
it was bad, I could definitely do it better now with minimax and alpha-beta pruning if I actually cared
The thing is that tic tac toe should be a brute forceable game
like three moves is just (10 - initial turn count)P3 moves in total, right?
yeah, computationaly its not very complex
yea
well
I guess that number would be a strict max because games would end before that
pretty sure this counts possible board states
it's how many paths of three moves you could have chosen
assuming game overs don't exist and ruin everything
right right, 9! would be the amount of board states
but its way overcounted because of all the possible boards with 3 in a row
I mean even still it's not too much of a problem
9! is what like uhh
is it 362880 or is that 10!
yeah you got it
yea
wait I'm dumb it couldn't have been 10! because 36288 isn't divisible by 5
anyway
shh
less than a million is usually pretty trivial to calculate nowadays
I would even say the same for a billion if your code is decent enough
yeah
if num < 1000000000:
num+=1
print(num)
type shit lol
go eep
but this damn use button won't work
unrelated but it upsets me that Lua does not have +=
It takes like six seconds to implement; I've made programming languages before it's like the least difficult part of it
yea
like even Python at least has +=
WHY DOES LUA NOT HAVE INCREMENT OPERATORS ANFHFHDHDHDH
on god
time to start the change.org page
every language should follow in the steps of C# where if any binary operator a # b is followed by = (like a #= b), it is automatically parsed as a = a # b
lua++
not entirely out of the realm of possibility 
TypeScript was made because JS was so bad they had to make TypeScript
does anyone know why G.STATE is G.STATES.PLAY_TAROT in the shop hahahascbnaoienfoianwfcmac
i'm going crazy with this dumb button
it should also follow in the steps of C# about being able to overload operators
I am sick and tired of saying a.add(b) or a.plus(b) whenever I use a non-native type
does anyone remember the thing that lets you test ui stuff without me having to open the game
see failure
change thing
reboot
repeat
is that a thing
i could also be going insane so keep that in mind
function Card:hpfx_transform_button(card)
local transform = nil
if card.area and card.area.config.type == 'joker' then
transform = {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 = 'hpfx_Transform', func = 'hpfx_can_transform'},
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('hpfx_shed'),colour = G.C.UI.TEXT_LIGHT, scale = 0.4, shadow = true}}
}}
}}
}},
}}
end
end
G.FUNCS.hpfx_can_transform = function (e)
if e.config.ref_table:hpfx_can_transform(false, false) then
e.config.colour = G.C.RED
e.config.button = 'hpfx_Transform'
else
e.config.colour = G.C.hpfx_IjiGray
e.config.button = nil
end
end
so here's my overrides setup so far where do i go from here
Yes.
well make up your mind will you 😭
im sayin
/j
You're gonna want to make this a G.UIDEF() function instead, and return the nodes
both
You'd return transform, if it's valid
the function that will actually do stuff in game is going to be referenced by the node
Then you're gonna need to hook G.UIDEF.use_and_sell_buttons() and insert it somewhere into the larger node tree of those buttons
okay right
I guess just to post the updated problem here with actual detail
Here is an example of it
On the first click it's all messed up but it fixes itself after you unselect and reselect the card (or after you click the button twice)
The button doesn't do anything besides change a boolean so it can't be the code for the button
am i doing it right so far
No.
Need to do G.UIDEF. in the redeclararion, and remove the parenthesis from your local reference
Forgot to say this earlier but thank you for the help
Is there a wiki page with all these helpers and stuff?
well
I guess that doesn't have all of them
ok fixed
do i just do something like "if card area is G.jokers and [condition so this only applies to a certain or certain jokers] then return the function"
am i at least close this time 😭
-# somecom im gonna get you lmfao
Technically you already do that in the inner function, so really you'd just have to use the return from that function. Otherwise it'll be nil, and it just won't do anything on the tree
hi 1 up
its actually d6 but I haven't made the sprite yet lol
hi d6
hi d6 but I haven't made the sprite yet lol
is there any limit to the atlas size?
you mean the size of the image?
yeah
well mine is 1500x3600 and it works fine so probably not lol
aw sonnuva bitch i've been restricting myself to 138x186 for nothing
divide the size of your hard drive by the dimensions of each sprite and by 4 bytes
🙏
I thnink it would be the other function you made, hpfx_transform_button
ohhh yeah the actual button lmfao
No
nvm 
You're gonna need to get the original return from the local ref of the function and slot it in somewhere here
The tree provided by G.UIDEF.use_and_sell_buttons() is this:
n=G.UIT.ROOT, config = {padding = 0, colour = G.C.CLEAR}, nodes={
{n=G.UIT.C, config={padding = 0.15, align = 'cl'}, nodes={
{n=G.UIT.R, config={align = 'cl'}, nodes={
sell
}},
{n=G.UIT.R, config={align = 'cl'}, nodes={
use
}},
}},
}}```
if I have button = "tboi_use_card" inside of my button node it should be referencing this function when clicked, right?
every time I see "tboi" I think it's abt smth else
I think I'm gonna call it a night, this button is making me sadge
and by "call it a night" I mean "play Isaac for about 2 hours then sleep after if possible"
function G.UIDEF.use_and_sell_buttons(card)
local ret = thunk(card)
local inner_nodes = ret.nodes[1].nodes
inner_nodes[#inner_nodes+1] = {n=G.UIT.R, config={align = 'cl'}, nodes={
G.UIDEF.hpfx_transform_button()
}}
return ret
end```
return ret?
and here i was writing something completely different i was cooked
probably this. Additionally under the assumption that jokers cannot be consumables, you could also do this I suppose
function G.UIDEF.use_and_sell_buttons(card)
local ret = thunk(card)
local inner_nodes = ret.nodes[1].nodes[2].nodes
inner_nodes[#inner_nodes+1] = G.UIDEF.hpfx_transform_button()
return ret
end```
Which just puts it in the same node level as the use button, and depending on the card it'll just show one or the other
well i mean it is for jokers so i should use this one then right
Both work, really, though the latter option might have less spacing by default?
Since there's not an extra row node added?
like less than the sell button?
No I mean, this is ordering a descending row of buttons (you can see this in game, the sell button is above the use button for consumables)
ohhh you meant on the card
The second option essentially contextually swaps the use button for the transform button on jokers, since on jokers the use button will be nil, and on consumables the transform button will be nil. The first option adds a unique row for the transform button below where the use button would be
And idk if there's some default spacing/padding that would have an increased gap or w/e. Haven't tried it lol
ok i should use the latter in this instance then
especially since i dont have any jokers that would need a use button lmao
Yep yep
Cant guarantee it'll work 100%, UI is fickle and if there are other issues with the code I didn't immediately catch em
only one way to find out i--wait how do i add it to the card 
it should just add it automatically
calculate = function (self, card, context)
if context.cardarea == G.play and context.repetition then
if context.other_card:get_id() == 11 then
return {
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.3,
card:juice_up(),
})),
dollars = card.ability.extra.jack_dollars,
repetitions = card.ability.extra.repetitions
}
end
end
end
i want to make the dollars activate per repetition too but idk how
G.UIDEF.use_and_sell_buttons() is called from Card:highlight() as the definition for a new UIBox
look at the code for Rough Gem, could give you some help probabl
So by hooking the function, it'll just get added to the UI when the card is clicked like normal
ok thanks
but then what if i only want it to apply to specific cards?
change the conditions that cause G.UIDEF.hpfx_transform_button() to return
In the one you sent me, you're only checking that it's in your joker slots
Here
ohh ok
you could also add a field in the card's config, and the button only gets placed when the field is there
Can i see the crash error
Not all, Just a bit
look down, did it have an error parsing a file?
something's wrong with my nanners apparently
usually it says the line near that if you look around a bit
like forgetting to close a function or something like that
ahhhh i guess they didnt like me hitting enter here
it being "ambiguous syntax" and all
oh
new crash
oh it's all gonna be ambiguous syntax huh
yeah there we go
W
How to prevent a tag from being triggered on the result screen?
https://github.com/RivFalcon/Holotro/issues/7
and G.STATE ~= G.STATES.ROUND_EVAL?
Show more code.
itd be better if i sent the whole thing actually
GUYS
the crash only happens when i click on the card
I DID IT!!! Converting ranks works!!
Where are you calling this function?
overrides file
Are you inputting a card?
Would It not be Better making function name = Globalfunchere?
I was having something similar happen before too, make sure you have both the can_use and use actually defined so that it's not trying to read a nil value
First line you sent
I solved like this in the end
ok wait i might not be wdym
It was Crazy stupid, maybe Yesterday i had too much burnout going on
he is here..
Car+ Cloud Nine would be cool
When you are calling this function, is the first input a card object?
it would, it's based off of the cloud nine example code someone posted here earlier
oops
classic
IT'S BEEN A LONG DAY
happens to the best of us
what do you WANT from me 
if self.config and self.config.func and (((self.config.button_UIE or self.config.button) and self.config.func ~= 'set_button_pip') or self.config.insta_func) then G.FUNCS[self.config.func](self) end
should this be uncommon
so a value isnt being set right
It seems good where it's at. It's like a Cloud 9 but for scoring and Cloud 9 is busted
I wouldn't worry too much about the balancing of your cards rarity wise until you've played a decent amount with them. Jokers need their run to shine yknow
Unless its Obelisk, that thing is terrible
everyone knows you must beat balatro 17 times before you make a mod
real
this would mean it can't find the function you're talking about
is it because it's in my main file and not my overrides
I don't think it would matter in that sense
Make sure the file is loaded and that everything is spelled correctly i guess
make sure the... the main file is loaded?
we're both tired here
lmao
wont put spelling past me though lmfao
ok so here it is in the main file (1) and the uses in the overrides file (2, 3)
G.FUNCS.hpfx_Transform
it looks like i spelled them right which means ONE of them is missing some k-that
it's missing that
how would i go about making a ui box (or realistically any element that i can make red and slightly transparent) slowly scale over the screen starting at the top
you know, reboot chaining is actually way less painful when you have more than 4 gb of ram
You also don't need to send the context variable, and card is a misnomer. The first and afaik only supported parameter sent is the node that calls it (usually just called e in vanilla code)
I think at some point I'm going to get rate limited on the APIs in my other mod
from chain rebooting

ok but
jokers use this regularly
with the context param
am i gonna have to have a separate one for the button
or is there a way to do this with shaders
i'm too stupid for shaders tho so i might have to start stealing things
Contexts are not valid in functions like this. They run every frame independent of card calculations
version without context param it is
Also in general if the parameter is grayed out and you're not using it, you can just get rid of it
yeah i know
they irk me so i tend to kill them
👍
there are three versions of this now
Transbutt is mine thanks
And what code is it pointing to?
^
Means the function you attached to the button isn't in the G.FUNCS table
can i just add G.FUNCS to this
It wasn't when you send these screenshots so yeah
heck yeah
that doesn't seem very powerful
it aint
if you have enough 9s to get this above half joker levels, you have enough 9s to play a hand with any base mult
the uncommon badge:
+12 off the bat is too free for a common joker though
it's in a bit of an uncomfortable spot w/r/t rarity
fine by me
+2 instead of +3 would be around uncommon
i was thinking similar. every 9 is picked because cats have 9 lives
+2 could be picked because car is 2
car is 2?
apparently
not anymore
car was two
how do you make a joker that appears in a shop automatically buys itself
is it possible
i mean erosion is +4 per, the deckfixing requirement is way less demanding (hang any cards rather than specifically strengthing 8s / using death to convert into 9s), and it's really bad
well, it's really situational
nxkoo what are you plotting already 🥀
Yes.
shh
how to
Is the button field on your node correctly referring to this function?
You could perhaps always check if the card appears in G.shop_jokers.cards then call the buy function?
whats the function for buying
i think so????
G.FUNCS.buy_from_shop?
No
thank you so much
Remove G.FUNCS from this. It needs the function key to check the G.FUNCS table
oh huh
so just
buyfromshop?
The function itself is declared as G.FUNCS.hpfx_Transbutt(). Then you refer to the function by its key, 'hpfx_Transbutt'
is there a way to have a function be ran when a joker appears anywhere in the game, like when it's spawned in basically
giggling my ass off at this function name am i 4
three hours later
What the UI code is doing is taking that string and attempting to do this:
G.FUNCS[key]
So in your specific example it was trying to do G.FUNCS['G.FUNCS.hpfx_Transbutt']
oh well no wonder lmao
Yes.
AND YET 
Show me what you changed
Guess I'll have to catch up on the saga in the morning lol
And show me the function it's trying to call?

almost sent a ss of it oops
function G.FUNCS.hpfx_Transbutt(card)
G.E_MANAGER:add_event(Event({
trigger = "immediate",
delay = 0,
func = function ()
if card.config.center.blueprint_compat and card.config.center.key ~= 'j_hpfx_ijiraq' then
local key = card.config.center.key
table.insert(G.GAME.raqeffects, key or G.GAME.current_round.fodder_card.jkey)
end
return true
end,
}))
G.E_MANAGER:add_event(Event({
trigger = "after",
delay = 0.15,
func = function()
card:flip()
return true
end,
}))
G.E_MANAGER:add_event(Event({
trigger = "after",
delay = 0.15,
func = function()
card:set_ability(G.P_CENTERS["j_hpfx_ijiraq"])
play_sound("card1")
card:juice_up(0.3, 0.3)
return true
end,
}))
G.E_MANAGER:add_event(Event({
trigger = "after",
delay = 0.15,
func = function()
card:flip()
return true
end,
}))
return true
end
That is not the correct function??
what do you MEAN 😭
i'm sending the
after you just because of this
Didn't you have a function that sets the state of the button based on trying to call this function???
That's the one you're supposed to call
scared tf out of me i thought it was over over
An idea
can i do the same in booster pack?
trying +2
Yes, but it would be G.FUNCS.use_card instead.
ok so before i do some switches
am i missing any functions
Okay okay okay hold on let me reset for a monute
how do you check if a player is inside of the booster pack?
G.booster_pack and not G.booster_pack.REMOVED and SMODS.OPENED_BOOSTER?
any way to get this to show up correctly without the player going into the blind?
thanks
Yes.
Your button needs two things basically:
- a function to set the state of the button based on whether or not you can press it currently (I assume this is hpfx_can_transform)
- a function to actually be called on press (I assume this is hpfx_Transbutt)
okay... how?
Have you tried looking at The Clock?
oh yeah that probably would help
In most examples I've seen, the state function is usually on a higher level node than the button function. I don't know if that's absolutely necessary or not
moving it rn
Do me a favor and also not collapse the code for the functions
Since I can't see what might be breaking
why does he sound so menacing...? 😭
also yes both are correct assumptions
ref_table stuff in can_transform
function is Transbutt
i wanted it to fit mb
(why didnt i just send three images?
)
moved the state thing up alr so dw about that part
Oh well you're calling hpfx_can_transform as if it's a function on the card object?
Any clues why this doesnt erase Kings? Ace is 14
Or is that a different function named the same thing?
i have no functions named the same just so i dont confuse anything lmfao
I actually have duplicates for the same reasons
What is this function then?
me being a dumbass winter
is that what you wanted to hear
im a FOOL
This is being called as if it's a function declared like this:
Card:hpfx_can_transform(param1, param2)
I assumed it was just like checking if the card is valid to transform currently but if you never declared that function then yeah that's nil
do i declare it in the joker
Idk depends on what you need it for
do i even need 2 params actually
In what situations is a card that can transform (I.E. it has a button to do so) not valid to transform (meaning the button should be greyed out)?
oh well when you put it like that
i dont need the if statement at all huh
ahhhh
If you don't need to check that, then you don't need that function at all
i guess really just between transitions (like when youre getting paid out after a blind)
but the game already handles that doesnt it
I think the game automatically grays out buttons during certain things? Like how you can't press use on Planets until after end of round results finish?
So probably
Yeah
Nope. Get rid of it and only use the button property
holding my "this time for sure" down in case im missing something else
To give an example, the Use button on consumables runs a function like the one you just got rid of every frame to determine if the button should be grayed out or not. So internally it calls the card's Card:can_use_consumable() function to selectively determine whether you can press the button, such as how consumables that require you to highlight something can't be used until you have a playing card highlighted
And then it sets the color of the button and the on press function accordingly
ok yeah then i literally dont need it
Ye
THIS TIME FOR SURE

WAIT I KNOW THIS ONE
IT'S STILL CALLING THE CAN TRANSFORM FUNC WHICH DOESNT EXIST
Did you not remove the func = "hpfx_can_transform" from the UI node?
THIS time for sure (no i did not but I CAUGHT IT)
(despite you telling me exactly that)
what does... rule 3 of modding rules even mean
It basically means don't @ localthunk telling them how to fix the vanilla code
AAAAAAAAAAAAAAAAAAAA 
You'll want to change the color of the button in the node
I assume it didn't work?
And what is card in this instance? Show me more of the function
You're passing in the wrong thing for this function
oh god
Like I mentioned before, the only valid parameter for functions used as button callbacks is the node for the button itself
oh g-oh thats not bad actually
IMO change the parameter in this function to e and before this event do
local card = e.config.ref_table
ok ok got it
It doesn't automatically pass in the card object itself, so you have to grab it from where you stored it in the node
It's needed for both
but not the uidef
No, because when that's being called, you're passing in the actual card object
thoughts?
Highly underpowered
actually let me adjust the button's looks first
Also I'd recommend changing the text for the Xmult to white for vanilla consistency
it was 0.25 initially but someone said it was too much
0.25 is too much, sure, but try 0.15 or 0.2
Or even 0.10, but that puts it closer in the realm of being a common
maybe keep 0.25 but make it start at 0? so with a vanilla deck it'd be at 1x and scale it up from there
Honestly that doesn't sound too powerful at all tbh
yeah no it sounds right
That's like fine??
Maybe cut it down to 0.2 if you absolutely need to but 0.25 seems good
0.2 to keep it uncommon perhaps
although. thats a funny tag when im using the two sprite card thing. it looks menacing and intense
Even 0.25 isn't enough to get into rare territory, given that Lucky Cat is an uncommon
And that scales tremendously
really appreciate the input folks!
no worries mate!
1 billion dollars to winter
and 2ndjedi
and corobo
and somecom
C:white in question
card too scary couldn't play mod
we need an accessibility feature for making the cards less scary 😭
4 am for me im GONE
<3
...after i update creds
Guys any help?
I May be stupid, i solved It like this
Almost done :3
i wish balatro would just auto word wrap sometimes 💔
morning
Ok sometimes my cards make the game crash and i don't know why
It crashes on src/override.lua
Oh it's this part
Crazy
Thats because i can't disclose some mods for now :)
But it's my mod's fault i know for sure
Then log is useless
i like how you only screenshotted up to line 583 not 589
Oops
local ret = {}
for _,k in ipairs(SMODS.Rank.obj_buffer) do
if next(ranks[k]) then
tuples[#tuples+1] = {k}
end
Better than screenshots tbh
Sigh
Can I change the display order of items of a set in collection without changing the order of how the codes and files are loaded?
key = 'Knave',
card_key = 'F',
pos = { x = 9 },
nominal = 8,
face_nominal = 0.05,
face = true,
shorthand = bbb_lang.english_names and 'Knv' or 'F',
next = { 'Knight' },
loc_txt = { name = bbb_lang.english_names and 'Knave' or 'Fante' },
in_pool = allow_suits
}
Did i miss something on ranks?
#💻・modding-dev message
#💻・modding-dev message
double bump
is it possible to like count how many unique suits are in the scored hand
i knew something felt wrong looking at the mult numbers, that was it
Does anyone know how to use in_pool for a back? I'm trying to remove a few jokers from appearing in a deck and I can't find any documentation that isn't just for individual cards saying whether or not they're in the pool
i dont think decks have in_pool, the docs are just lying
Ah, fair. Then how might I go about preventing some cards from appearing? The functionality exists, though I only know it's used in the challenge decks
yeah you can do what they do, add them to G.GAME.banned_keys[key] = true
N my custom ranks crash when used because some overrides.lua in SMODS while checking for straights, how can i fix?
what's the code and the crash
Alright, where would that go? Don't see an obvious place for "deck setup" code
apply
The crash is ```Oops! The game crashed:
[SMODS _ "src/overrides.lua"]:589: bad argument #1 to 'next' (table expected, got nil)
and my code go on https://github.com/Kuroeks/BBB/blob/main/main.lua
random question: is it possible to manipulate the drawing of cards, like making certain suits more likely to be drawn or something
#💻・modding-dev message
#💻・modding-dev message
double bump x2
A code card in cryptid adds a sticker that works like this
Seal**
I'm assuming your ranks in next need your mod's prefix
Can you send the mod link I can look into it
Also what's the seal
i'm going to send the wiki link
https://balatromods.miraheze.org/wiki/Cryptid/Stickers#Global_Sticker
It was a sticker not a Seal in the end XD
Cryptid adds 6 new stickers to Balatro. Cryptid also introduces the ability for stickers to be applied to any item, instead of only being applicable to Jokers. Affected...
bump... again again...
Man...
@red flower First of all thank you so much 🫂
Second, can you help or redirect dogeiscut
no sorry
this doesn't exactly sound like what I'm looking for
"Cards with this sticker will always be drawn at the beginning of each Blind"
Then maybe you can add a condition (like the infamous WoF 1/4) and edit for every hand instead of First of the blind
:)
i suppose
i feel like theres a better way to manipulate the weight of an entire suit or something
i dont know if its possible at all
which is fine lmao
maybe?
Thats actually a cool card, i should try aiko's mod
if you want higher probabilities then you need this + your own custom logic for weighting
i dont know of any mod that does that
then i'll be the FIRST tiktokproud just kidding i'm. not too great with lua
I'll write it down tho
how do you check if there's currently a highlighted playing card?
G.hand.highlighted[1]
thanks
card that gets balatro to 0 fps
wow i guess my shader is so bad it makes the game close after it loads 😭
What did you even do for this to happen
🙊
elial jumpscare hi
hi sdm 0
hi haya
@red flower can i override rank 7 so that using strenght 7 becomes Knave with my custom suits, and 8 with vanilla suits?
no idea
Either take ownership of 7 and give it a "strength_effect" table or hook SMODS.modify_rank
take ownership of 7 is so funny
I suppose it's time to go through all these smods PRs I've been too busy to look at 🥳
Yeyyyyy
How do I draw a Line like this in a Description?
i'm gonna take ownership of 3 and make it another 4
seven.
#💻・modding-dev message
#💻・modding-dev message
double bump x3
you would need to use main_end in loc_vars and add a grey Row/Column node + the text underneath
i would recommend just using multibox description instead lol
Ah .. I see 
Well, then: Do you have an Example for the Multibox-Description?
there's one in the localization docs
or check my hit mod JoyousSpring, all jokers have it :3
Nice Plug, I'll check that too then 
How to take ownership?
Oops Sorry didnt meant to notify ping
I think it's explained in the docs question mark?
pls request that submitters also submit corresponding documentation for new features 🙏
I can do that but there is no way that I am prepared to spend time reviewing wiki PRs
#💻・modding-dev message
#💻・modding-dev message
double bump x4
Looks really good actually, I might go ahead and add it to my other Jokers later too x3
Thank you 
What is context.other_card?
The concerned card by context like individual
when would it not equal card inside of calculate?
Say you have Hack, card is the joker, context.other_card is a played card
Ooh, that makes sesne.
Okay, thank you!
Im just looking for ways to fix my issue with my brown seal here, and figured I should probably get a better understanding of this cobbled together code
What are all the triggers for an Event?
before, after, immediately, ease, [no trigger]
What... do they do exactly?
check the event manager docs
Oh! I was looking for that on the docs
Thank you!
there has been a mistake
its making an awful noise too
ughhhh i cant figure out why its drawing cards before the cards finish discarding
seriously... i cant figure this out
im gonna flip
hi! some of my consumables that i'm placing in the shop are showing as undiscovered
as in, they use the undiscovered sprite and undiscovered text, even though they're in the shop and i should be able to see their sprite and text
i know i've forgotten to do something here, but what?
how do i fix this???? 😭
SMODS.Seal {
key = 'Brown',
atlas = 'cfawm_enhancers',
pos = { x = 0, y = 0 },
badge_colour = HEX('a0522d'),
calculate = function(self, card, context)
if context.discard and context.other_card == card then
G.E_MANAGER:add_event(Event({
trigger = 'before',
delay = 0.0,
func = function()
local any_selected = nil
local this_index = nil
for i, playing_card in ipairs(G.hand.cards) do
if playing_card == card then
this_index = i
break
end
end
if this_index and G.hand.cards[this_index + 1] then
G.hand:add_to_highlighted(G.hand.cards[this_index + 1], true)
play_sound('card1', 1)
any_selected = true
end
if any_selected then G.FUNCS.discard_cards_from_highlighted(nil, true) end
return true
end
}))
return { message = "Discarded!", colour = HEX('a0522d') }
end
end,
}
it's because you're running this all in an event iirc
try adding a function to your return
wait no you don't need to do any of that, you can just remove the event around it
it'll work without the event
so try
SMODS.Seal {
key = 'Brown',
atlas = 'cfawm_enhancers',
pos = { x = 0, y = 0 },
badge_colour = HEX('a0522d'),
calculate = function(self, card, context)
if context.discard and context.other_card == card then
local any_selected = nil
local this_index = nil
for i, playing_card in ipairs(G.hand.cards) do
if playing_card == card then
this_index = i
break
end
end
if this_index and G.hand.cards[this_index + 1] then
G.hand:add_to_highlighted(G.hand.cards[this_index + 1], true)
play_sound('card1', 1)
any_selected = true
end
if any_selected then G.FUNCS.discard_cards_from_highlighted(nil, true) end
return { message = "Discarded!", colour = HEX('a0522d') }
end
end,
}```
er... that crashed my game 😭
log?
like it went into an infinite loop?
it made a pretty awful noise too
It just... instantly closed after making a terrible noise when i discarded
I think something you should do is first highlight each concerned card and THEN you discard them
what's your seal's ability?
It's supposed to also discard the card to the right of it when IT is discarded
ideally allowing for chains
oh i see
what if you remove discard cards from highlight
you're discarding in the function, which triggers your seal again
infinitely
so you can remove the line that discards the cards, as that'll happen anyway
Well it shouldn't do it on the same card twice though?
okay but your seal discarding triggers the context.discard context
in that context the card is still highlighted so it will
Do SMODS.rank { next = {} support multiple ranks?
i think the seal's cool btw! :D
seems to, it's a table so i'd assume it could have multiple values in it
Then how would strenght work
bump btw ^u^ sorry
now it just highlights?
random selection between all next ranks
Can i filter it via suits?
whats Phanta.config
did you global right
ah, that's all of the config options you have enabled
i've assigned that elsewhere
Like hearts do only 1st next, spades only 2nd next
Oh right!!
SMODS.Seal {
key = 'Brown',
atlas = 'cfawm_enhancers',
pos = { x = 0, y = 0 },
badge_colour = HEX('a0522d'),
calculate = function(self, card, context)
if context.discard and context.other_card == card then
local any_selected = nil
local this_index = nil
for i, playing_card in ipairs(G.hand.cards) do
if playing_card == card then
this_index = i
break
end
end
if this_index and G.hand.cards[this_index + 1] then
G.hand:add_to_highlighted(G.hand.cards[this_index + 1], true)
play_sound('card1', 1)
end
return { message = "Discarded!", colour = HEX('a0522d') }
end
end,
}
yeah now you're just adding to highlighted without discarding that card
... im confused
i would probably look into how discard from highlighted works and do that for the card you want
i'm wrong ^u^ dw
that does not add it to the cards being discarded
you'll have to discard it manually
Hm okay... so now im back at square one... or i guess back at the hard crash.
i know how this works now — you do need to discard that card manually, but discarding the card you've already discarded will cause an infinite loop
i'd maybe add a bool that determines if it's already made the check
no, what I'm saying is that instead of using discard_from_highlighted you should do what that function does inside but just for your card
Right, it shouldnt discard itself though
ya
^
really all it does much is a call to draw_card from hand to G.discard
else you would probably have to figure out the event order and that sounds like a pain
(sorry, bump)
its not that hard 😭
So basically
I should take ownership of the 7
Then somehow filter the next rank with suits
You probably interested in smth like bypass_discovery smth
^
counterpoint: im stupid
will look into it :D cheers!
Vanila game have no check for shop booster pack area, only for jokers and vouchers
So in your case you need manually set one of there for yor card
card.bypass_discovery_center = true
Would this work?
G.E_MANAGER:add_event(Event({
delay = 0.6,
func = function()
if G.GAME.starting_params.scopa_Deck then
SMODS.Rank:take_ownership('7', {
next = {'BBB_Knave'}
}, true)
else
SMODS.Rank:take_ownership('7', {
next = {'8'}
}, true)
end
return true
end
}))
I'm currently trying to make a joker count any cards after the base 5 as being scored, I have this which is mostly copied from splash, how do I make it only activate on cards after 5? I tried changing the i = 1 to i = 6 but it just makes the game crash.
if context.before then
for i = 1, #G.play.cards do
context.scoring_hand[i] = G.play.cards[i]
end
table.sort(context.scoring_hand, function(a, b)
return a.T.x < b.T.x
end)
delay(0.2)
for i = 1, #context.scoring_hand do
--Highlight all the cards used in scoring and play a sound indicating highlight
highlight_card(context.scoring_hand[i], (i - 0.999) / 5, "up")
end
end
use the context instead
https://github.com/nh6574/VanillaRemade/blob/975e35dce07617c7a9db01ce032152b07e4f0f2f/src/jokers.lua#L1362
unless you mean you want to expand play limit
I've alredy done that, I was just trying to make the card past that count, that does seem like a much better way
It didnt work anyways
I throw in the towel
How do you add vfx?
Bump
you can only use DynaText in loc_vars?
you can use it anywhere, it's an ui element
whats the shortcut to quick restart balatro? I remember it being holding R but that doesn't seem to work
Hold M
alt+f5
cool, thanks
oh you're right it was M not R
it's R for restarting at a crash screen
is the correct context for rerolling the shop "context.shop_reroll"?
context.reroll_shop
what are all the main valid contexts for checking blind requirements. i can see from mr. bones that end of round works but are there any others?
you can check and alter them whenever i think
i do at least, and it doesn’t cause problems
if you want to end the round early or something, never found a way to make that work seamlessly
yep, you right.
i usually alter the blind requirement in context.setting_blind if i can help it
how do i change the main menu card suit? doing this crashes the game [[patches]] [patches.pattern] target = "game.lua" pattern = "replace_card.states.visible = false" position = "before" payload = "replace_card:change_suit('Hearts')" match_indent = true overwrite = false
finally figured it out :D
(i ended up doing something completley different...)
i want to add a message for each brown seal but i dont know how to manually create those message things
Check card_eval_status_text
(except the first parameter is the discarded card I suppose)
this is specifically for checking blind requirements rather than setting it. when i try to check it during individual trigger or wherever, i get an error
but my code for checking may be wrong
aaand this causes issues when i discard multiple brown seals at once next to each other....
sighhhhhh
it didnt actually seem to break anything but it paused for longer than i'd like to and made a bunch of noises for cards clearly off screen
i think some cards just got... discarded multiple times
my code was checking for blind requirements OVER the blind rather than under
NEVERMIND IT DUPED MY CARDS 😭
show your new code?
SMODS.Seal {
key = 'Brown',
atlas = 'cfawm_enhancers',
pos = { x = 0, y = 0 },
badge_colour = HEX('a0522d'),
calculate = function(self, card, context)
if context.discard and context.other_card == card and not card.disable_brown_seal then
G.E_MANAGER:add_event(Event({
trigger = 'before',
delay = 0.0,
func = function()
local to_discard = {}
local this_index = nil
for i, playing_card in ipairs(G.hand.cards) do
if playing_card == card then
this_index = i
break
end
end
if this_index then
for i = this_index + 1, #G.hand.cards do
local next_card = G.hand.cards[i]
table.insert(to_discard, next_card)
if next_card:get_seal() ~= 'cfawm_Brown' then
break
end
end
end
if #to_discard ~= 0 then
play_sound('card1', 1)
for _, card in ipairs(to_discard) do
G.hand:add_to_highlighted(card, true)
card.disable_brown_seal = true
G.FUNCS.discard_cards_from_highlighted(nil, true)
G.hand:remove_from_highlighted(card)
end
end
return true
end
}))
return { message = "Discard!", colour = HEX('a0522d') }
end
end,
}
I was trying to make it find chains of brown seal cards and like, discard them all in advance
but i forgot to account for discarding multiple cards at once 😭
and i kinda also dont know how to acount for that
hi again ^^
i have this line now:
local card = Card(area.T.x + area.T.w/2, area.T.y, G.CARD_W, G.CARD_H, G.P_CARDS.empty, _center, {bypass_discovery_center = true, bypass_discovery_ui = true})
im trying to avoid reimplementing remove_from_highlighted because i dont understand it and i want cards to trigger their discard effects
this works mostly, but the "Not discovered" text isn't showing up
any ideas?
oh wait uhm
wrong line
wrong script, that's from the base game -u-
heeyah
local card = SMODS.create_card { key = key, area = G.shop_booster, bypass_discovery_center = true }
will try something in the meantime
mm, okay that didn't work either
(i tried bypass_discovery_ui)
okay well i decided to scrap the code i just sent... it feels like im never gonna get this working the way i want 😭
it's now back to how it was before
Mmmh I should try recreating it one day
SMODS.Seal {
key = 'Brown',
atlas = 'cfawm_enhancers',
pos = { x = 0, y = 0 },
badge_colour = HEX('a0522d'),
calculate = function(self, card, context)
if context.discard and context.other_card == card then
G.E_MANAGER:add_event(Event({
trigger = 'before',
delay = 0.0,
func = function()
local any_selected = nil
local this_index = nil
for i, playing_card in ipairs(G.hand.cards) do
if playing_card == card then
this_index = i
break
end
end
if this_index and G.hand.cards[this_index + 1] then
G.hand:add_to_highlighted(G.hand.cards[this_index + 1], true)
play_sound('card1', 1)
any_selected = true
end
if any_selected then G.FUNCS.discard_cards_from_highlighted(nil, true) end
return true
end
}))
return { message = "Discarded!", colour = HEX('a0522d') }
end
end,
}
why is this code always creating a seven of diamonds in the title screen? i want it to create an ace of hearts ```function Card:resize(mod, force_save)
self:hard_set_T(self.T.x, self.T.y, self.T.w * mod, self.T.h * mod)
remove_all(self.children)
self.children = {}
self.children.shadow = Moveable(0, 0, 0, 0)
self:set_sprites(self.config.center, self.base.id and self.config.card)
end
local mainmenuref2 = Game.main_menu
Game.main_menu = function(change_context)
local ret = mainmenuref2(change_context)
local newcard = SMODS.create_card({
set = 'Base',
suit = 'Hearts',
rank = 'Ace',
area = G.title_top,
no_edition = true
})
G.title_top.T.w = G.title_top.T.w * 1.7675
G.title_top.T.x = G.title_top.T.x - 0.8
G.title_top:emplace(newcard)
newcard:start_materialize()
newcard:resize(1.1 * 1.2)
newcard.no_ui = true
return ret
end```
It can be
hey can i use self in my button ui function if i add it to the params, or does balatro's code not work that way?
(UIDEFbuttonfunction(card) -> UIDEFbuttonfunction(card, self))
also good morning pardon my manners
is hooking create_card_for_shop thr best way to test buying a joker?
well first u need to find out if patching or hooking is what you need, they can do the same thing but it's still good to know when to use which
how do i hook into the shop
is there a context for cashing out/entering the shop?
or rather
can someone tell me why this conditional isnt fulfilled as true?
context.starting_shop
literally starting_shop
Lua doesn't work this way
some contexts aren't that blund 😭
truth nuke
If the parameter isn't being passed in by your code, you can't use it in the function
yeahhhh i knowww 
im just trying to make the button only apply to the fake cards plus the costume
It depends on what k is
k is nil when that block checks it because the code is after the for loop closes
Cards can't have nil keys, so if a card doesn't have the visiblyIjiraq flag, that code will never run
well the visiblyijiraq thing gets applied in the joker's set_ability (pretend i checked for false in the override)
wrong image
Point being you're still perpetually comparing key == nil in that condition
well actually no since the button should only appear when you have it so disregard that
ohhh ok
so just put it in the for loop?
If that's how your code works, sure
Do you understand the concept of scope in programming?
to an extent? im not good at this ui thing

so it's probably stuff i already know but the ui stance is uhh
Scope is unrelated to ui. It's a fundamental programming concept
no no i know i mean like my brain
k and v, due to the way loops work, are declared as local variables to the scope of this loop. The moment this loop closes and the code goes past it, both k and v become nil
So they only exist within that loop code
so then break wont help here right right
What this loop is functionally doing is running through the exceptions, and if the key is in the exceptions list, breaking early and doing nothing else
The loop code currently accomplishes nothing
Given exceptions is a map (I think?), you can probably just change the key == k comparison in that bottom if statement to exceptions(key)
so then id have to put the whole ui setup withIN the for loop for it to actually matter
oh fr?
And remove the for loop entirely
i should show you that table actually in case
(this continues)
basically part of an override setup for the disguise (instead of disguising as and mimicking 8 ball, it'll disguise as and mimic MY 8 ball)
Huh, weird. You're trying to explicitly type them
it's not for every joker
Is this some code setup I'm not familiar with?
No I mean declaring they keys as string types, and the table as a global
ohhh hold on ill show you
Both of those are implicit per how Lua works
(this works btw there's no issue with it)
so, within the costume's set_ability function it has these lines:
No I'm glad I'm just confused why you're using it
Point being, exceptions is not an indexed list. It has string keys, so you can check if a key exists on the table as you do there and just do exceptions(key) unless you actually want to compare to the values in the table rather than the keys
which has it both trigger a flag, and set its ability to the current round's card (which is decided randomly) OR the current round's card as an exception if possible
well the values (strings) are the actual keys of the exceptions, and only get interpreted as the basegame keys when added to the ijiraq's effect table
-# AHEADDDDDDDDDDDDDDDDD
-# AHEADDDDDDDDDDDDDDDDDDDDD
-# the loudest of all whispering
-# it's a talent
if card.area and card.area == G.jokers and key ~= 'j_hpfx_ijiraq` then
local excepted = nil
for k, v in pairs(exceptions) do
if key == v then
excepted = true
break
end
end
if excepted or card.visiblyIjiraq the
-- run your code in here
end
end```
@shell timber here's what I've got.
okay so it looks like you have mismatched brackets in your lua file
can you send the contents of that?
this is what my code looks like.
Missing a comma after the key
okay so for your SMODS.Thing calls you want curly brackets instead of regular ones
that as well
facepalming at myself
Also yes, you use curly brackets for table declarations (which is what this is doing)
and the return still stays outside right
Idk, you didn't show the return
bless yall, thanks a bunch 
no problem
can you reword a teeny bit
i probably get what you mean but ive been wrong before
this answers that question
so technically you can just return transform from within that inner block, because otherwise the function returns nil anyway
Or you could explicitly declare local transform = nil before it goes into this code` and then return it after it leaves these blocks
Both are functionally identical, though the latter option is kinda more readable
did that 👍
so ill just leave it as is then
ok one last check to make sure
Yeah that works. I'd indent that inner block more though
It's a little hard to read
should be good
only thing would have to be if for some reason card.visiblyIjiraq returns false
yeah i zoomed out and shook my head
yep
Looks good
god i love having ram ive had balatro open this entire time and my framerate is still smooth as hell
I'm naked and full of mucus on the floor of my bathroom after trying to shower to clear my sinuses b/c im sick and dying
So I'm just helping you on my phone lol
oh you poor soul
well good news
phase 1 pass
dont panic im just stupid and forgot to change this back to card
getting sick in this heat is like a death sentence though i hope youre okay /srs
hell yeah
I'm gonna go visit a partner in like a week but I feel like DEATH
Hey, i'm trying to make my joker rank up the first 3 cards of a played hand but right now it only rank up seemingly all the cards played, and does flip them, rank up, flip them and rank up again, how could i fix that ?
if context.cardarea == G.play and context.other_card == context.scoring_hand[1] then
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.4,
func = function()
play_sound('tarot1')
card:juice_up(0.3, 0.5)
return true
end
}))
for i = 1, #context.scoring_hand do
local percent = 1.15 - (i - 0.999) / (#context.scoring_hand - 0.998) * 0.3
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.15,
func = function()
context.scoring_hand[i]:flip()
play_sound('card1', percent)
context.scoring_hand[i]:juice_up(0.3, 0.3)
return true
end
}))
end
delay(0.2)
for i = 1, #context.scoring_hand do
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.1,
func = function()
assert(SMODS.modify_rank(context.scoring_hand[i], 1))
return true
end
}))
end
for i = 1, #context.scoring_hand do
local percent = 0.85 + (i - 0.999) / (#context.scoring_hand - 0.998) * 0.3
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.15,
func = function()
context.scoring_hand[i]:flip()
play_sound('tarot2', percent, 0.6)
context.scoring_hand[i]:juice_up(0.3, 0.3)
return true
end
}))
end
end
end,
WEHHHHH
can you force a deselection? (the button stays on ijiraq if you dont deselect it)
also PAIN
I should say it's basically the code took from Vanilla remade's strengh tarot card but edited
Wdym?
what in the world does "third first" mean
i wanted to say the first three cards, my english a bit broken rn





