#💻・modding-dev
1 messages · Page 427 of 1
if context.before then if context.after
ah so thats why i had the end
honestly, correct indentation would be a god send for you
i am really bad at indentation since im still relatively new at lua 😭
If you have the lua extension you can do Right Click > Format Document
Oops! The game crashed:
[SMODS destino_entropico "destino_entropico.lua"]:229: attempt to index global 'card' (a nil value)```
The call causing the crash:
```lua
loc_txt = {
name = 'Me petting my nuclear bomb',
text = {
"{X:mult,C:white}X.3{}",
"{C:green}#1# іn #2#{} chance to {C:red,E:2}explode{}",
"{s:0.7}{C:inactive}Me petting my nuclear bomb{}" -- < This one here D:
}
},
Variable Declarations:
config = {
extra = {
Xmult = 3,
odds = 3
}
},
loc_vars = function(self,info_queue,center)
return{
G.GAME.probabilities.normal, -- #1
card.ability.extra.odds -- #2 - This is line 229 from the Error
}
end,
is there a documentation or something?
that did not do anything
lua extension has literally never actually helped me
Are you sure you have the correct lua extension?
Yes.
this is so emberassing 😭
im having so much trouble on what should be a completely simple joker
the code literally worked just fine before i tried to simplify it and now it refuses to work no matter what i do
# Money coupons
[[patches]]
[patches.pattern]
target = 'blind.lua'
match_indent = true
position = 'before'
pattern = '''
if G.GAME.modifiers.no_blind_reward and G.GAME.modifiers.no_blind_reward[self:get_type()] then self.dollars = 0 end
'''
payload = '''
if G.GAME.ortalab.blind_rewards then self.dollars = self.dollars + G.GAME.ortalab.blind_rewards end
'''
# comment
[[patches]]
[patches.pattern]
target = 'functions/UI_definitions.lua'
match_indent = true
position = 'before'
pattern = '''
G.GAME.orbital_choices = G.GAME.orbital_choices or {}
'''
payload = '''
local dollars = blind_choice.config.dollars
if G.GAME.ortalab.blind_rewards then dollars = dollars + G.GAME.ortalab.blind_rewards end
'''
[[patches]]
[patches.pattern]
target = 'functions/UI_definitions.lua'
match_indent = true
position = 'at'
pattern = '''
{n=G.UIT.T, config={text = string.rep(localize("$"), blind_choice.config.dollars)..'+', scale = 0.35, colour = disabled and G.C.UI.TEXT_INACTIVE or G.C.MONEY, shadow = not disabled}}
'''
payload = '''
{n=G.UIT.T, config={text = dollars < 10 and string.rep(localize("$"), dollars)..'+' or localize("$")..dollars..'+', scale = 0.35, colour = disabled and G.C.UI.TEXT_INACTIVE or G.C.MONEY, shadow = not disabled}}
'''
these are the patches I use for a similar style of effect
this was the old code that i was using for this same joker (which worked just fine)
this is in the same file as the deck? or some diffrent file
in a .toml file
oh ok
now as im trying to simplify it using a new function i made for scoremod (example) i just cant figure it out
So I tried using context.destroy_card but it doesn't work too
context.end_of_hand doesn't exist.
context.destroy_card is not a function.
hi i was interested in getting into modding does anyone have any good resources they liked using for learning. I found some but I want to see if anyone else has suggestions?
omg I was really thinking it exist mb
Why? Because I can 
can you make cis nonbinary
okay i tried completely rewriting the code again and i am still getting the same error
I started by grabbing a mod with a single joker, breaking it open and changing things around to see what worked and what broke
https://www.nexusmods.com/balatro/mods/323?tab=description
Of course, do that while reading through the github documentation
Then throw your hat in the ring and try making your own Joker!, any basic one will do, just to get the grip of it
am i just stupid im so confused
Nah I’d Joke
You still have too many ends.
where is the lua extension when you need it good lord thats a lot of end statements
Maybe you have extensions that are interfering?
For the if above of course 🍌
only have 2 extensions (the rust extension never gets enabled and i always try enabling the lua extension whenever i run into a syntax error)
it's just badly formatted
i do THINK i finally found the issue
End x mult
at least i hope so 😭
okay i think i finally got it
i sincerely apologize to everyone for my severe incompetency 😭
you need to apologize for that formatting
Anyone know how to have a joker check if a blind is about to be beaten? It seems like even when the context is context.after the score still doesn't update in time despite having been calculated already on screen
i apologize for my formatting
Like for a joker that does x if a hand doesn't beat a blind, but does y if it does beat a blind
nil my beloved (please end my suffering)
horse race test spotted
I don't know who this nil guy is but I swear when I find him
Text call
loc_txt = {
name = 'Me petting my nuclear bomb',
text = {
"{X:mult,C:white}X3{}",
"{C:green}#1# іn #2#{} chance to {C:red,E:2}explode{}",
"{s:0.7}{C:inactive}Me petting my nuclear bomb{}"
}
}
The other two things
config = {
extra = {
Xmult = 3,
odds = 3
}
},
loc_vars = function(self,info_queue,center)
return{
G.GAME.probabilities.normal, -- #1
local_odds = {center.ability.extra.odds} -- #2
}
end,
If anyone can skim what's wrong do let me know ;-;
Well what happens
its gotta be like vars = {var1, var2, etc}
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.xmult, card.ability.extra.cost, card.ability.extra.triggers, card.ability.extra.reset_triggers, card.ability.extra.reset_triggers - card.ability.extra.triggers } }
end,```
example
When I did that it started giving me the "229: attempt to index global 'card' (a nil value)" Error ;n;
thats because you put center instead of card
I'll try this, thank you!
also you should change this to use an argument for the mult instead of just writing X3
vars = { card.ability.extra.xmult } -- I assume?
Why did the cat eat the letter i
hungry
It's because the і you put is not a normal i
I found out the crash my game was having was because I was trying to load the previously broken save rather than starting a new one (I am very smart :3)
і instead of i
I dont even know how to unpack this, is it because my keyboard is in spanish?
Probably.
Im saving this in a pastebin, thank you ;-;
if i may ask, what does the jovial merriment joker do, im curious
thats awesome
hello, a question, how could I replicate the randomness behavior of misprint but with chips?
look at the VanillaRemade repo to see how misprint works
Ok thanks
whats the g.c color for the default text color (in card descriptions)
@zealous glen
black
wrong
G.C.UI.TEXT_DARK, i think
huh
thank you so much im finally done with this thing
Another Jovial Merryment :0
That works. black isn't a valid colour in the list, so it would use the default of TEXT_DARK
oh my god LMAO
JOKER LORE DONE HAHA
except it doesnt turn back
but thats like a 90 second fix at most
entropic?
unfortunately not an entropy reference
just a really convinient crossover between the name of the mod and the writing i did
ah lmao
im sorry for posting here really often but i am once again asking for help
What is the issue?
this card is supposed to remove the played hand if it contains a seven
but instead it just removes every single card on screen
remove the bottom return
Not again 💥
and context.main_eval
Wait huh
I was using end_of_round for the context, as it is supposed to die only when changing round
Should I put it as an and?
Looking at the documentation, config are for local variables?
SMODS.Joker {
key = 'RussianRoulette',
loc_txt = {
['en-us'] = {
name = 'Russian Roulette',
-- x2 mult (maybe increase?)
-- 1 in 6 chance of self destruct
-- lowers the denominator each hand played (1 in 5... 1 in 4)
-- resets the denominator to six when blind is selected
text = { 'Example', 'text', 'on', 'five', 'lines'},
}
}
atlas = 'joker',
pos = {x = 0, y = 0},
rarity = 1,
eternal_compat = false,
}
Adding it as a and worked like a charm, thank you!
Interesting joker idea. Is the balance like the average of chip and multiplayer?
No, it is for variables that are independant for every card.
Every card as in each Joker card?
No, it's like that for all cards.
Whats the input and output of pseudorandom()? 
pseudorandom(seed (string),min (number),max (number)) i have used it like that
I see.
you can omit min and max
seed, min, max and a number that is from 1 to 0 if min and max are not specified.
What would be the output then?, decimals from 0 to 1?
yeah
Thank you, I love you guys 😭 💖
nice deck skin
SMODS.Joker {
key = 'RussianRoulette',
config = { extra = { odds = 6 } },
calculate = function(self, card, context)
end,
loc_txt = {
['en-us'] = {
name = 'Russian Roulette',
-- x2 mult (maybe increase?)
-- 1 in 6 chance of self destruct
-- lowers the denominator each hand played (1 in 5... 1 in 4)
-- resets the denominator to six when blind is selected
text = { 'Example', 'text', 'on', 'five', 'lines'},
}
}
atlas = 'joker',
pos = {x = 0, y = 0},
rarity = 1,
eternal_compat = false
}
something like this?
Perhaps.
thanks winter
first time modding ?
yes and no. i have messed around with modding on other games and languages
I might be anoying but I've tried for like 5 hours and I'm not able to destroy the card
context.destroying_card does not happen during context.final_scoring_step
but I'm getting this crash idk why
Code?
the entire code ?
Yes.
you can use pastebin or github gists 😅
I think you should also be able to upload the .lua file
i'll try
it work
Would anyone happen to know what determines how buttons are attached relative to a card? It moves it around depending on the cardarea for me, but I'm not sure how I'd account for that, yet
edit: solved my issue, i was an idiot, removed the code to hide how much of an idiot i am
im starting to learn UI, why doesnt the text show up ingame at all? also does anyone know the best place to learn UI from aside from the wiki (eg tutorials, guides, examples)
if anyone responds ping me please 🙏
can you show the rest of the code?
I'm not super knowledgeable about SMODS.Joker, but I think it adds your mod's prefix to the key automatically, so it should be key = 'blueChicken' instead of giga_blueChicken for all the key definitions
this is it for the UI itself
i should clarify that the box shows up and the text showed up previously but im not sure what changed
can you fix this or is it always like that
you need to give it a name
You can fix ✨ everything✨ if you try hard enough
Idk man I'm pretty stupid I just stupid harder I dont win
it has a name it just breaks in the menu
show the original code please
@final jewel since you used the question mark instead of responding im gonna just explain that
in your mods settings you specify a prefix, so you only need to put things like key = "bluechicken" and it becomes j_giga_blueChicken
oh ok
text needs to be a table.
im assuming youre referring to under loc_txt?
Yes.
Its like an habit that I have because of C# coding
whats a habit
i realise i worded that wrong 😭 i know what a habit is, whats your habit
can someone actually answer this question
okkk
How would I check if a played hand has unscoring cards?
they did answer your question
it can be fixed, if you cant figure out how then look at what other mods do
the other mod is yahimod and that ones broken as well
and im not gonna look for the booster code in cryptid
if #context.full_hand ~= #context.scoring_hand?
That might work, I'll try it out.
garbshit adds boosters
you need a group_key = 'key', in your booster definition, the localization goes in misc>dictionary>key
i use loc_txt{ do i put it in there?
I'm not sure how it works with loc txt but you should use a loc file regardless
im gonna be honest im never translating my mod
But I dont think the crash is related to the name of my key like its when I select a card (Its normal that the card is invisible, I just didn't make the art)
how would smods.load_file handle a png
hm. i think the text is getting too much should i keep like the resetting and lowering the odds hidden and the player discovers that for themselves?
link?
why do you need to load a png
Even if the crash isn't related, the way you wrote your key before is just bad practice and would cause you issues later
No that's kind of an important information to withhold as a secret mechanic
do not question
good luck with that then
it is not easy to find
you are right about that hm
Gains X0.5 Mult for each hand played
1 in 6 chance to self destruct instead
Odd increases with each hand played
and resets when Blind is selected
best I can do for a concise tooltip
thank you
first result is wiki, then three videos, then wiki, then hanging chad on the actual wiki, then an article about balatro, riff raff on the official wiki, then another artical
The first search result for "garbshit balatro" is the wiki page for it with a GitHub link on there
The majority of mod wiki pages have the GitHub link if it exists
nevermind
kk thx
local vif = Talisman and to_big and to_big(G.GAME.dollars):lte(0) or G.GAME.dollars <= to_big(0)
i have a variable here created for the purpose of creating a check for if you try to buy anything while you have less than or 0 dollars
however, it appears this is accidentally talisman dependent
how can i make it from dependent to compatible?
usage of variable pictured
@turbid maple what do you think
don't like "odds increase" coming before said odds
ou damn
gains mult and odds with each hand played?
but the sound is in the folder
maybe make sure the file format is .ogg?
is it because of the code?
nope gotta fix some shit lmao
what does the file location look like in the code?
What is it that you're actually doing that for
this?
2 jokers that change the effects of most consumables (1 doubles effect of tarots and the other removes downsides from spectrals)
because before I had presented something similar with another sound but I didn't have to register it.
the jokers.lua
ooooou
also making sure that the ones that destroy cards dont destroy cards with one of my stickers on them
forget it, I think I saw the problem
I fell asleep for a while but now that I'm awake bump
ok, now the other problem
in the code I modified everything that gave multi for chips (because it is literally a gros michel but it gives chips), and it still gives multi
so I wouldn't know what to move anymore
Removing downsides from spectrals seems interesting
Wraith (I think) would become discount soul
walmart soul
Yes
Would it be possible to get the most prominent colour on a joker?
For example lusty joker would probably be #ec2d33
Like go over every pixel somehow and increment counts for every hex value.
sounds tedious
Also in most cases the color would probably be ugly
if this was C, yeah
however this is lua
I'm referencing the code for diet cola but how could i make a joker produce the skip tag of a selected blind?
If you mean "blending" the colors
No, I mean the colour that is used most.
If you mean getting the colors with the most pixels with the exact color then it's like
most common color
90% of the jokers is white right?
Yes.
But for the other jokers that are not mostly white.
Either way it's probably not possible without directly getting the sprite in the code
G.GAME.blind_on_deck
random question but is there a way to use a custom color for localization text (and if so how would i do)
Where do i put it? inside of the tag function?
"{C:blue}text in blue{}text in white{C:mult}text in mult red"
"custom"
establish it in your main file (image 1), have this at the top of ur code wherever you want to use it (not the main file) (image 2)
You would do return {vars = {colours = {colour}}} in loc_vars
example (it's the same as literally any color)
Love2D's ImageData has a getPixel function that you could iterate over. I think the sprite atlas tables contain image_data, I'd try that first
Like this?
ok
Yeah you can def do this it just might not be cheap doing it in Lua code
Even the best implementation of a most common colour value function will be slow though, and in the worst case you'll need a table with 16.7 million entries. You'll only want to run it once for all Jokers on load and store the results
Hi
https://love2d.org/wiki/ImageData
You could also grab the memory address with getFFIPointer and do it in C instead
is there a way to "randomize" the text, so to speak?
for example, at the end of the round, the joker throws a text like gros michel, but I want it to say different and so on.
what I mean is that I have these and I would like them to rotate for each round won
I don't know if I'm getting into it.
Ohhh that's cool!
Good luck with that
is there a way to make a joker give you specific tarot cards?
could you tell me how?
SMODS.add_card({key = "c_modprefix_key"})
thank you
TIL: holding "m" will relaunch the game (I think this is caused by debug plus)
bad argument to min here
just found out you can do this maybe this could help
thinking about it, there is a chance you can get go above six hands so i'm not sure if it would be a good idea
How??? That’s crazy I love it
I really need something like this for funny text
j_mod_multi_joker = {
name = 'Name',
text = {
{
'First line of box 1',
'Second line of box 1',
},
{
'First line of box 2',
'Second line of box 2',
}
}
That and another badge I can use for categories
Can I make it toggleable via configs too?
ive been using multi box stuff for all my jokers that destroy themselves like gros michel
i don't know if that is possible feel free to find out
but maybe... there can be... three boxes...
Oh yeah btw if anyone knows how to add stuff to the ui send me because I have this feature I need a ui thing for
not sure which word is the best. odds, probability
Temporary hands and discards.
apparently when in game, the bad argument is that im giving it a table and not a number
This guide is the best for creating your own UI elements, though it'll take some time to read through and understand:
https://github.com/Steamodded/smods/wiki/UI-Guide
If you want more specific help, ask more specific questions
Might need another Ritalin for that LOL
is mintconditioncards your entire mod prefix
yeah
Thx for sending
youre injecting it before it exists
so
i just need to rearrange the script order so that they execute in a different order?
i think so. if the default is the consumable i think you should remove set = from it just to make sure you dont have an eternal error where they keep trying to call the other before they exist
maybe add the chance colour for odds or change the y in x in y chance to a different colour or is that too much
SMODS.Joker {
key = 'RussianRoulette',
config = { extra = { Xmult = 0.5, Cmult = 1.00, odds = 6 } },
loc_vars = function(self, info_queue, card)
return {
vars = { card.ability.extra.Xmult, card.ability.extra.Cmult, (G.GAME.probabilities.normal or 1), card.ability.extra.odds }
}
end,
loc_txt = {
['en-us'] = {
name = 'Russian Roulette',
text = {
{
'{X:mult,C:white} X#1# {} Mult for every hand played',
'{C:inactive}(Currently {X:mult,C:white} X#2#{C:inactive} Mult)',
},
{
'{C:green}#3# in #4#{} chance this card self-',
'destructs for every hand played'
},
{
'Odds increase with each hand play',
'Odds reset after {C:attention}Blind{} is selected'
}
},
unlock = {
'Have a Joker card self-destruct',
'during a run to unlock this card.'
},
}
},
atlas = 'joker',
pos = {x = 0, y = 0},
rarity = 1,
eternal_compat = false
}
same error
despite the order
i think it's time to actually make the code and find out how to make an unlock condition. looking at the wiki, is there something you have to program in for the blueprint and its cousins (brainstorm) to work or would it like run the calculate function again
youre still putting it in the pool before the pool exists
so how would i go about injecting the consumable into the pool after it's been initialised?
without the pools line going to the tiles page just causes the game to crash since it's trying to load a page with nothing on it
how do i know if my lovely injector code works
i believe joker main is the right choice
ok swap them back, idk why its crashing unless you havent made the pool yet
maybe i just haven't made the pool yet
idk how specifically to make one though
You can check the %AppData%/Balatro/Mods/lovely/dump folder for code changes made by Lovely patches. Just make sure you close the files before starting Balatro, or Lovely won't be able to delete them and will error
no wait
maybe i need to use the cards = {} like with any old ObjectType
bump (reason for bad argument is that its apparently a table and not a number)
calculate = function(self, card, context)
if context.setting_blind then
return {
-- reset effect?
odds = 6
}
end,
if context.joker_main then
return {
-- roll
-- if true self destruct
-- if false add to mult
return {
xmult = card.ability.extra.xmult
}
}
end
end,
hmm is there a random function
i'mma try this
hi im home
try G.GAME.skip_tag actually
you might have to hook into it though
nope
same error
@sturdy compass
didnt you do something like this in maximus actually
is it G.GAME.skip_tag or am i crazy
i just wanna make my own consumable type this is going to be the death of me
looking at the examples, it's something like thisif pseudorandom('gros_michel2') < G.GAME.probabilities.normal / card.ability.extra.odds then
what does the string do?
the string here is the seed i think
how do you make your own seed unless the pseudorandom can work with 1 to 6
you just make one ngl
pseudorandom('russian') like this?
whatever you make the string will be that seed
because 6 is the whole number
youre doing 1/6 which is approx. .167
your pseudorandom('seed') returns a number between 0 and 1
so if your number is less than ~.16 then the statement is true
calculate = function(self, card, context)
if context.setting_blind then
odds = 6
return {
message = 'Reroll!'
}
end,
if context.joker_main then
if pseudorandom('russian') < G.GAME.probabilities.normal / card.ability.extra.odds then
-- destroy
message = 'Fire!'
else
card.ability.extra.cmult = card.ability.extra.cmult + card.ability.extra.xmult
return {
cmult = card.ability.extra.cmult
message = 'Safe!'
}
end
end
i tried putting cards = {c_mintconditioncards_balloon = true} into my consumable type and it just came up with the same error message
something like this?
oh yeah
forgot to add the card.ability.extra.odds += 1 and probably should add an overflow statement just to be safe
idk how to deal with this i havent made custom object types before
ah
i won't bother you any further
thanks for helping, even if we didn't resolve it
only the parts that you want to include, i can walk you through what does what here (though i am wondering why you arent looking at vanillaremade)
i am looking at vanillaremade that's how i figure out how to properly do the mult gain
why is the pseudorandom cavendish2 and not vremade_cavendish, are you looking at an older version
i'm looking at both the example and vanilla
Quick question: how could I make a consumable take 2 slots instead of one?
in any case card = nil doesnt really do anything here since the card is removed by this point anyway
oh yeah that makes sense
so i have a file .toml, i what to know if it needs some code in the main file to actually work or something
getting an error and trying to toubleshoot and honestly not sure what is causing it
i'm not certain myself since it's finnicky
but you could make it so a consumable reduces your number of slots by 1
it tells you what line to look at
the return for else
i'm looking at the code and checking to make sure which code block goes to what and i'm still not sure what causing this
why is your second message not being returned here
your 'fire' message
isn't it supposed to be in one area? i was going to readd the self destruct animation after or before the fire message
the message needs to be in a return
Is there a way to get the suit of a card thats played? I tried this but it was just an error and I don't know the correct term.
don't tell me that's why the error was happening 💔
whats the goal here
If I wanted to make a consumable that had the effect of taking up 2 slots instead of 1 slot how would I go about doing that 
send ut
what is line 34 here, include the line numbers on the left of your vsc
I'm making a Joker that if you play a royal flush it will convert all cards remaining in hand to the same suit played then give you a death and hanged man. I've got the death and hanged man for playing a royal flush working and I'm trying to figure out how to set the cards remaining in hand.
apologies
you need a comma at the end of the line
if a return has multiple lines, its a table, so it needs commas
looks like all is left is to add the self destruct and test
also isnt it is_suit()?
oh wait it might just be that
moment of truth
I was just taking from how I checked for an ace and a king with get
ok it works, but visually there are some issues
the 1 in 6 doesn't update as it looks like and the animation seems too quick
I like this concept actually
i should take some screenshots of my fav jokers (the ones that work anyway
it should be 1 in 5 now but its not
I did do this however I had to lovely patch it. G.GAME.skip_tag is of my own creation lol
is there a reason why it does that?
maybe the 2x mult is enough to tell that it's safe?
show code
i mean youre not changing the odds because the odds start out as 6 and youre adding odds when odds are less than 6
so decrease the odds?
What if someone has more than 6 hands? Do all of the jokers just die if they use every hand?
and invert the if statement
yeah it looks like it
is that a fair trade off is this is likely going to be a common/uncommon
Does this description make sense? Had it worded differently and wifey thought it was confusing, so looking for if its clear now.
can anyone tell me what the sprite size is for a deck? I keep trying to find the size for it but when I open the game it doesnt show (I apologize if this isn't the right channel)
like this? @hybrid shadow
That's probably the clearest wording, it makes sense. Do the relevant card ranks change colour or something when they're scored?
It's a pretty neat Joker idea actually
Currently no, but that is the intention, to have them turn green (or some color) after being played
i thought i messed up the code since i spawn in one and i immeditally fired but here it is
i think i did it right
yeah i think it done
good night
im new to this and tried to do a scalating joker when the round ends
i use an if with context.end_of_round to do the sum function, but for some reason it triggers the sum like 800 times in a row.
jokers look for jokers that work similarly to see the code and fix this problem.
then i use context.game_end = false idk why or how this fix the problem
im trying to understand how it works, can anyone help me?
I know it could be something simple and annoying, I'm just starting out with this xd
how did i guess a maximus variable
looks awesome
thatll work but it wont reset when blind selected
Is there a way to check if a card in play was scored or not?
cardarea == G.play only contains scoring cards (but idk if thats what you want)
Ngl I should really mark my variables better 😭
no mxms_ prefix ,,,,
I thought that contained all played cards
Yeah…
that should work
apparently not given it works for me
yeah i need to balance this because even if you have a hundred of them only a dozen of them remain
Hi I'm trying to make a joker that would retrigger the whole scoring steps from beginning to end for 5 times. Right now it does repeat 5 times but it never triggers held in hand effects. can anyone tell me why?
maybe do the final round or something or a whole number mult gain?
well, good news!
the pool's not empty!
why is this just not triggering
like i even went up(? down?) to $-20 and it didnt trigger
bad news is that i'm apparently trying to compare number with nil
okay i'll keep it as it is but change it to a whole gain so there is an incentive to use it for a blind or two
Now the joker doesn't trigger at all
Animation wise is there any documentation on how to do that let me see if like a voucher opener is better
I will
there's also [this](#💻・modding-dev message) though
only three left out of twenty 😭
second round and all are gone i would say that balancing is needed
maybe 1 in 12? final round? or you KEEP the card but something else happens like it resets the mult or the shot is 0.5 on your mult
So something like add_tag(Tag(G.GAME.skip_tag))
Kinda, but again, I had to make a patch for skip_tag to even exist
yeah let me try the last one
Now fully understanding this my bad but How do you do a patch to make it?
minor bump
-# miniscule bump even
It was as easy as this
Thank you so much!!!
anyone know how to fix this error
it occurs on me viewing the consumables
Unique??
cuz there's like
a button that appears when you have more than 3 consumable types
Like change the method name and/or aspects of the patch?
in the collection
Add something like your mod prefix in your variable. Here's my now revised version with my mod's prefix
Gotcha
Got home now so imma put this to work on my jonkler
in a for statement is context.scored_hand
thanks for the help!’
I didn't think you could mix the two
To this end ^, is there a way to pass a variable to the joker text and have it parse the formatting (e.g. {C:attention}). My attempt to do so, it just displayed the text, "{C:attention}Text{}".
wdym
the actual regular cardarea for scoring cards is G.play but for statements dont read that so you have to use context.scored_hand
Yea G.play crashes no matter what
How would I go about making a deck where you start with an eternal joker
shouldnt those be formatted with HEX()
or no
yeah colors should be formatted like that
mmm
i see
can you not use global variables in conditionals
local para_extra_slots = function(self)
return self.ability.para_negativesticker or self.config.center_key == "j_para_cooledwater"
end
local para_card_removal_old = Card.remove_from_deck
local para_card_addition_old = Card.add_to_deck
Card.remove_from_deck = function(self, card, from_debuff)
if para_extra_slots(self) and G.jokers ~= nil and self.area == G.jokers then
G.jokers.config.card_limit = G.jokers.config.card_limit - 1
end
return para_card_removal_old(self, card, from_debuff)
end
Card.add_to_deck = function(self, card, from_debuff)
if para_extra_slots(self) and G.jokers ~= nil and self.area == G.jokers then
G.jokers.config.card_limit = G.jokers.config.card_limit + 1
end
return para_card_addition_old(self, card, from_debuff)
end
why do my hooks do nothing?
yeah turns out that was the whole issue
thank you so so much
Added the code but it crashes at line 2656
This is in a Lua file, not a toml file
Solved my issue, all i had to do was check if the card existed
so do i make a toml file within my mod folder for this to work?
You can either make a file called lovely.toml or make a folder called lovely and name the toml whatever you like inside of that folder
within my mod folder right just to not confuse myself?
yes
Got a crash
I am coming to the realization you have never done patches before
Yeah i'm sorry ;;
You need to add this top the top of the file
Thank you, again i'm sorry, a lot of balatro modding is still new to me
We've all been here before
Patching in particular is a weird concept to get a hold of
I can definitely tell
Gonna try to look at how patching lovely works to understand it next time i might need it
There’s definitely some documentation out there
Think of it as a way to add to or edit vanilla code
Documentation can be found here https://github.com/ethangreen-dev/lovely-injector?tab=readme-ov-file#patches
I see
i am losing my mind
Shop? What shop?
it ate the whole damn storefront
just call the function???
What does Transform even do 😭
you know exactly what it does
When would G.GAME.dollars be <= than card.ability.extra.dollars
dollars = 0
Does the buying_card context take place after easing dollars?
i have no idea 🌈
LOL
EREMEL I AM BEGGING YOU TO FINISH UPDATING THE WIKI PLEASE
please eremel i need this my joker kinda contextless
It looks like it does not
you gotta fw me
shrimply create your own context
im literally about to
-# oh my god i forgot how to make a context
How can i make a consumable reduce the consumable slot size by 1?
G.consumeables.config.card_limit = G.consumeables.config.card_limit - 1
Ty!
You could potentially loophole it and do if to_big(G.GAME.dollars) - to_big(context.card.cost) <= to_big(card.ability.extra.dollars) then
how will this affect processing power
breeze why are you typing an essay

modding dev cannot be that serious
i mean hey if it doesnt work
making my own context gurarararaha
lmao
Does anyone have a good way to check the end of ante
context.end_of_round and context.main_eval and G.GAME.blind.boss?
If you say check if you beat a boss blind I will throw Cryptid Ruby Stake ™️ in your face
ow
right in the ruby stakes
I'd like to deal with the possibility of a single ante containing multiple boss blinds
how would you detect the consumable being in the consumable slot? sorry if that's a dumb question
still tryna wrap my head around consumables
You might honestly have to patch in your own context in that case
Not in that way. The "simplest" way might be to use a different {V:} for each entry:
https://github.com/Breezebuilder/Steamodded-Wiki/wiki/Text-Styling#variablecustom-text-colour-modifier-v
So define a table to contain the colours:
local rank_colours = {
G.C.FILTER, -- A
G.C.FILTER, -- 2
G.C.FILTER, -- 3
G.C.FILTER, -- 4
G.C.FILTER, -- 5
G.C.FILTER, -- 6
G.C.FILTER, -- 7
G.C.FILTER, -- 8
G.C.FILTER -- 9
}
``` Then wherever you're tracking the previously-played ranks, also do something to the effect of
```lua
rank_colours[5] = G.C.GREEN
``` when scoring a 5, for example.
Then use
```lua
"{V:7}7{} {V:8}8{} {V:9}9{}",
"{V:4}4{} {V:5}5{} {V:6}6{}",
"{V:2}2{} {V:3}3{}",
"{V:1}A{}"
``` for the styling part of the localization string, and finally set
```lua
vars.colours = rank_colours
``` in the `loc_vars` function.
It's a pretty dumb solution, but it would work without requiring any major patches or changes
(insert gif of the emoji crying with two arms up exploding here)
This might be close enough: 
how's this not a thing in smods yet i'm sending a pr
balancing
3
3
1
keep it as is (common)
That would be quite nice tbh
gee i wonder
Wording things is hard sometimes usually always
if youre talking multi phase boss blinds then you can do that with just a few hooks
The essay was for me lol, thank you. On first glance, I don't understand what you're saying, but I will read through it and come back with questions if I can't figure it out.
fair
for multiple blinds in an ante well yeah that requires a lovely patch
this is your fault
no im talking crap like this
Pretty sure this is the case
oh that
custom context it is
Since I just marked all my global vars with the mxms prefix I should do that with my contexts too huh
The horrors
What have we become

you don't put your global things in a table?
Im so glad I have Find and Replace
whats that mod?
joker display
joker display
thanks
yw
granted
at random i will start eating your files
I think I’d actually cry
just do what i do and push everything to git whenever i do some form of significant change
then you can let everyone eat your files
what you thinkin for something
is there a way to make my card destroy a random card from my deck when a round starts
erm
something something using pseudorandom to select a card and remove it from your full deck in the form of a table under the setting_blind context
probably
great at least i know thats possible to do
Disregard the "A", I've got something screwy, but yes, that is perfect!
Now to make the joker actually function 🤣
Thank you for the help Breeze, very much appreciated!
nvm it's actually the easiest thing ever
lmao
it doesn't work (I don't know why)
I'm working on logic for a consumable that when you have it takes up 2 slots so like lowers slot count by 1 but I can't quite work out how to detect when the card is in your consumables to execute the slot decrease
did you try getting rid of the and
why?
oh fuck do i need to do this for custom colors
I did just in case but probably not
Ok so i applied a patch to allow for creating a blind's skip tag but now it causes a crash now and i don't know how to fix it
works, thanks
bumping this
Where would i put this in the consumable's code?
In the use function.
Tried this but i'm still getting crashes, can anyone help me with this
You might just need to add a null check before running add_tag to ensure that sizimod_skip_tag has been set first
ohh i see
like see if the skip_tag variable in my patch is not null?
nil, rather.
imma be honest i have no idea what to add here
the end closing if context.setting_blind then shouldn't have the ,.
whoops
don't know what's causing a nil value
You can check exactly what line is throwing the error if you check your tag.lua file in %AppData%/Balatro/Mods/lovely/dump
Is there a way to make a card cost $0? Setting cost to 0 leaves it as $1.
Yes.
It looks like generate_Ui is what's causing the issue rn
Okay, but how?
Got it all working! Thanks again for the help tonight.
Sweet. Do you have a thread for your mod to keep up with it, or still in-progress?
Hook Card:set_cost()
Still in progress, Only been working on it since 6/6.
Now comes the issue of knowing how to actually stop the error because that's something i have zero clue how to do
One thing I'd love to add now, is the shake like Loyalty card when its active. Gotta figure out how that part works.
Look into juice_card_until (which should be named juice_card_while based on how it's used)
Sweet, I'll dig into it.
how do i trigger an effect like in plasma deck when balancing chips?
Yeah i'm completely stuck idk how to fix the error i'm getting from line 513
Dunno if it's something with my patch or not
That was way easier than I thought it'd be
if anyone can help with my skip tag issue it'd help alot cuz i've been stuck on it for 2 hours now
Turns out I can check G.GAME.blind_on_deck
How do I check the id of a joker in the shop?
how we looking
Almost as good as if you remembered to return ret 
gdi
lol
now we're good?
G.GAME.dollars is a number, though? Or a table, in case of Talisman...

i cant send the patchy gif but i can feel it
we DO IT ALL again then
wait i dont
know what to put there instead
shoot
lmao
Don't let your dreams be dreams - you can redefine numbers as functions if you want to. What's the worst that could happen?
truly
This might be a descent into madness (average coding session)
not even potatro will save my computer
no i dont think it's descent at all actually
typo
typo
it’s not descent if I never rose

WHAT IF
i put the transformation
in an event
and then the event
will call the other three events
is that even how events work
why is my overrides file red
oh right
surely if i do this
eat
and come back
everything will work
(do not get me started on context.after just not existing i guess (different can, different joker))
What if you put the comparison in the event too
can you give me a mock-up my brain isn’t braining
what is the goal
literally i just want to call that function if you buy something while you’re at or under 0 dollars
do everything inside the buying_card context?
hmmm
what about if G.GAME.dollars - context.card.cost <= card.ability.extra.dollars
What was the issue
same as now
I can buy up to -20
But no matter how many things
Or what
The function won’t get called
can you show me your code with this approach
Something like this
G.E_MANAGER:add_event(Event({
func = function()
if to_big(G.GAME.dollars) >= to_big(card.ability.extra.dollars) then
hpfx_Transform(card, context)
end
return true
end
}))```
So that way it delays the comparison til after the dollars get eased (I think)
uh huh
Literally the same as
what does to_big() do?
But the conditional is different
Talisman compatibility
Talisman compatibility
LMFAO
fire responses
LMAO
brainwave dot gif
mindwave even
holy shid
Heh
well of course this doesn't work
you're defining a global variable func
not calling the function at all
Holy shit 😭
Also ease_dollars calls an event too, so this would still happen before I think
Yeah I was worried about that
do this with the condition including the cost of the bought card and remove the func stuff, just call the function
me after pulling my hair out for an hour and a half seeing the solution is “global func dumbass”
that's just life
No thoughts behind those eyes
Auto-block anyone who uses the word "just", or starts a sentence with "i mean"
I mean, just ignore them

i mean, we're all just here to help
That was Astra 😭
If I wanted to add to this:
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play and then
that the card is a 7, would context.other_card.rank == 7 work for the logic check?
'just' is mentioned almost 30k times so hebetter block alot of mfs
No. You'd wanna check for context.other_card:get_id() == 7
I mean, you just want context.other_card:get_id() == 7 instead
Thank you :'>
i only checking in this channel sowwy
Breeze boutta block you 
I mean, I was already under the impression that they just blocked me
lmfao
dont worry breeze has used the word just several times anyway...
breeze blocks himself
thats what im sayin

this means breeze has to block- goddammit
be faster haya smh
always be slower
D:
read it like an english paper
On second thoughts, this might not be the best policy
LMFAOOOOOO
what did i DO
you gotta do it man, its too late for you
Blocking myself now, goodbye chat
o7
godspeed
damn
ok but what if you shift + alt + F
i mean you don't have to block everyone just because the block function exists
here's an idea


my side suddenly hurts for no particular reason
what could i possibly be giggling at

May i present to you all: the hardest to code joker I've ever made
Incredible
this would take me 4 hours so you're right
I'm doing the thing, I'm nesting else if statements , you guys proud of me? 💖
no

what if all of our jokers were if statements
: ^(
i will turn all of your jokers into one liners
and make a PR to your mod
if SMODS then smods.joker =
youre never gonna believe what im doing ri- NOOOOOOOOOOOO NOT A PR
You can simply just
not pull the request
if bala then only tro!
if SMODS and SMODS.Joker then SMODS.Joker {} end
principle
oh and, if type(SMODS.Joker) == "function"
if not SMODS then SMODS.Joker{}
waza
hi bepis
me casually uncoding everyone's jokers by making every if statement false
truth nuke
hi bepis!!!!
if true then
true = false
are you happy now
dear god
GHHGRRRR.. HIGH JOKER
absolute evil
i was not unhappy with how it was before
so i'm still happy
i did it because i was unhappy
im updating my mod next april fools just to add this at the end of it
now we are both happy
yippie
if G.GAME then G.GAME = nil end
syntax error
crash on startup
the MOASE
would that even work
the game just uninstalls itself
why did this make me laugh for like 2 whole minutes
dude i didnt even consider an april fools update
"Uninstall Balatro with this ONE easy trick!"
im gonna april fools lock everyones collection again
always consider an april fools update
while true do SMODS.restart_game() end
that's so much worse
dude im laughing so fucking much rn at this fucking code
does anyone know how to get the player's current money? I've tried using dollars but it just crashes
G.GAME.dollars
thank you
peep my super complex edition
where's the edition
thats the secret
that worked to get me to laugh again
the actual answer is that i handle its effect elsewhere because you cant get this inside of a shop, only from inside a specific joker
joker inside me
😛
oooooh i have smt like that too
what does urs do
you gotta- [STATEMENT REDACTED]
Will it run or will it crash, place your bets ladies, gentleman, gambler ladies and gambling addicts 
iOS version of this emoji needs to get locked up
GAAAAAAAAH
the freak
mine is for a fridge
after 5 rounds of a food item in the fridge the card becomes rotted
means it doubles the value of all jokers in the fridge and makes them negative
It crashed on the very first line 💀
they are also doubled int he fridge normally, so in fridge cavendish is 6x mult, but once its rotted it -12x mult
why is there a red line
also
bro in february i made a fridge joker that triples the lifespan of all food jokers 💔
do I post Chud again
hyperfixation chud joker reference
yea mine doubles and makes them never get used up
do it
Idk I dropped out of Video game design because of calculus and it has always been there in NetBeans
urs is good tho
:D
i got 2 editions in my mod im working on, one is charred and the other is quantum/superposition
nothing ever happens
x2 mult happens
:////
LOL
charred you cant get from the store, whenver you destroy a card it has a chance to survive being destroyed and become "charred"
my biggest problem is shaders
figuring out those is a bitch
but ive got an enhancement in the works, and ill prob do more editions at some point
new roffle video
looks inside
hey guys
dude i dont even care for his content much cause its just not my style but hes all over my feed
I LOVE ROFFLE I LOVE ROFFLE I WANT A JOKER THAT OPENS A TAB TO ROFFLE'S CHANNEL WHEN I CLICK IT AAAAAAAAAAAAAAAA
i dont even watch balatro content
and quantum is diff for jokers and cards, jokers it creates a duplicate when you rearrange your jokers and on cards it either creates a copy to play or in your hand
book of shaders brother
bookofshaders.com or smt
and the online glsl editor
if not roffle then
return {
message = "youtube.com/[icantbefuckedtowritethis]"
}
glsl editor is live shader editing tool and bookofshaders is literally everything you can do w shaders
super goated
yea its just learning a whole new thing is alot of effort
Trying to make a joker destroy face cards at random but it keeps destorying other cards and even destroys cards held in hand
youre not pointing at a cardarea
the if statement needs a cardarea to work on only a specific area
oh like this
yup
context.destroy_card is called for each card individually
you don't need the for loop
np
ohhh
when are they releasing free loop
me wrapping all my free loops in for loop
lua extension
i mean the lua extension is prob good to have
just confused on how to get dropdowns
balatro wise? God I wish
would this work?
cause like
context.destroy_card is actually the card being destroyed
smods has lsp definitions
im tryna follow a tutorial to understand how its structured to begin with
other_card doesn't exist here
im pretty inexperienced with vscode
how would i get that
to work
would probably want context.individual instead?
not for destroying cards
so should i do context.destory_card:is_face()?
[SMODS _ "src/loader.lua"]:571: [SMODS destino_entropico "destino_entropico.lua"]:353: unexpected symbol near '}'
Why it crash in line 353 ;-;
*Code attached for review... and Line 353 is quite literally the last line 🥲
what are the measurements in UI code? e.g. minw = 1, that's equivelent to the width of 1... what?
yeah
Probably a missing end
if im nesting else if statements, do I need one at the end or one for each?
waait you have literally no thens at the end of your conditionals
and it's elseif in lua, not else if
Oh... I see
Put this in a .luarc.json file
{
"workspace.library": [
"C:\\Users\\[PUT YOUR USER NAME HERE]\\AppData\\Roaming\\Balatro\\Mods\\Steamodded\\lsp_def\\folder",
],
"diagnostics.disable": [
"undefined-global",
"lowercase-global",
"need-check-nil",
"duplicate-set-field",
"inject-field",
"undefined-field"
],
"runtime.version": "LuaJIT",
"type.weakUnionCheck": true,
"type.weakNilCheck": true
}
How would i get the amount of chips that will be scored this hand?
aight
where exactly is this luarc.json file? 🙏
you make it
inside my mod?
ye
Make sure smods-main isn't nested
it aint dont worry
i already solved that problem
after 30 minutes of being very stupid
also renaming the folder simply 'smods' is pretty standard
yeah aight
ok so i put a "luarc.json" file inside my mod
and pasted that code in with some adjustments
my user+smods-main
now what?
".luarc" not "luarc"
that should be it just refresh
capital c
ok 😢
oml this made me look at mine no WONDER mine arent working im still linked to the og instead of my instance
ur probably fine
sigma
hi
hi!
hello bepis



