#💻・modding-dev
1 messages · Page 137 of 1
just replace everything in calc_dollar_bonus with that? because if that's what you mean that didn't seem to work
it's the same crash mesage
Weird then for sure.
Is the state of the deck available at money calculation time?
I’m just wondering if you might have to have your joker check the number of remaining cards at the end of each hand and then use that number at money time.
nah, i put variant to same thing
add_to_deck = function(self, card, from_debuff)
if (not from_debuff) and math.random() >= 2/5 then
card.ability.extra.variant = tostring(math.random(1,#bamtris_variants))
end
end,
loc_vars = function(self, info_queue, card)
info_queue[#info_queue + 1] = { key = "j_gerioc2_monomino", set = "Joker", vars = {} }
if card.ability.extra.variant and bamtris_variants[tonumber(card.ability.extra.variant)] then
info_queue[#info_queue + 1] = { key = bamtris_variants[tonumber(card.ability.extra.variant)][1], set = "Bamtris_Variant", vars = {} }
end
return { vars = { card.ability.extra.remain, localize{type="name_text", key = "j_gerioc2_monomino", set = "Joker"} } }
end,
update = function(self, card, dt)
if card.ability.extra.variant and bamtris_variants[tonumber(card.ability.extra.variant)] then
card.children.center.atlas = G.ASSET_ATLAS[bamtris_variants[tonumber(card.ability.extra.variant)][2]]
card.children.center:set_sprite_pos(bamtris_variants[tonumber(card.ability.extra.variant)][3])
end
card.ability.extra.remain = math.floor(card.ability.extra.remain+0.5) --for the case where the number isn't integer
end,
I'm being stupid, where is base chips and mult stored when a hand is first played?
so do you mean that I coud use cards_1 as the Neon key instead? or what other keys would I use? Sorry I'm still learning the basics lol. Still can't even get the options in my config to stay toggled on when i reload let alone making the option work lol. unless they just wont stay toggled if the code doesn't work...
hand_chips and mult are globals.
might just switch what the joker does ngl
any ideas for what this joker could do?
Thank you!
Thriller?
Michael jackson song
name of the album too
right, thanks
and those variants are independant of balatro seeds, they are completely random
hello, i have a question, how do i loop a played hand to check for something? i was told to do so by someone in order to get my joker's effect working
I also know that Balustro for example changes the Jokers right away, but there is also a toggleable option for using the NSFW Jokers that is applied through the config. However, combing through every lua in the mod, I can't find where it tells the game to use the "base" Balustro Jokers. I found the code for switching to the nsfw ones(BalustroJokers2.png) in the ui.lua but no mention of the BalustroJokers.png throughout the lua files. So not sure at all how that is implemented or I would use that for mine.
“Kings only score in the (1) position. Position moves each time. Each time across this gains X2 mult.”
The idea being to have Mr Jackson sliding across your hands and giving you more mult.
how might i check the current score and score requirements of a blind, or otherwise check if a hand did not beat the blind?
would this loop through all jokers in your joker slots?
Is it possible to see what a hands base values would have been when a hand is discarded?
how to add cardarea to ui?
how do i make a joker work like baseball card? i have something that sorata works but it also triggers when any joker of the rarity triggers instead of just triggering after everything is scored
Youre the guy that makes all the music jokers?
yep
Didn't I mention the Simplified Joker yesterday?
if context.other_joker and context.other_joker.config.center.rarity == 1 and context.other_joker.ability.set == "Joker" then
yeah thats what i have
but it does this
Figured this out. Does anyone know how to add chips or mult before cards are scored?
I stole your idea
cool! i actually have an mbdtf joker too
Is this under context.joker_main? Is the particular Joker last in the lineup?
not under joker_main, and what lineup?
does it do anything
club cards become glass cards
all of my jokers have unique actions
Last Joker held, I meant.
no, its the first
i found something strange though
it only happens when it's set to a custom rarity
as soon as i switch it back to one of the vanilla rarities it works completely fine
just made balatro good https://streamable.com/sk4lon
how to create custom_collection_tabs?
when v gets assigned to a thing in G.jokers.cards, what gets assigned? the name? something else?
I think it’s the joker object itself.
engine/sprite.lua:109: Shader uniform 'voronoi' does not exist.
A common error is to define but not use the variable.
Did I somehow import my shader incorrectly? I'm still getting this error, even with or without adding my mod's prefix to my SMODS.Edition's shader
I imported voronoi.lua in main with assert(SMODS.load_file("data/editions/voronoi.lua"))()
mhm, and how would i get the name from that?
cool
Does anyone have any idea on how to localize a language through steamodded or lovely?
i think i need to store the whole joker object, if i were to do that, would this if statement be able to call its name? (presuming i is the index of any joker in the array)
or would i put .name before [i]
so .name after the [i]?
cool
What is the context for entering the shop? Or (how) can a Joker detect when you enter the shop?
what do wrong
bro said yse
No context does that.
I hooked up cash_out button instead in the old version of the joker I mentioned.
ooh, okay, thank you
wait pause is "is_ace" not it
is there a way to tell if a joker is incompatible with blueprint? like a way to check if it is?
how about i say what my joker does
there’s a blueprint_compat mentioned in smods doc
If you mean in practice, i think you gotta just spawn both jokers and hope it doesnt crash
chooses a random joker each round, and copies it
cannot choose itself, brainstorm/blueprint, or any blueprint incompatible joker
so i need to find a way to find those incompatible jokers
well i want to work with other joker mods
Ohh true
dude literally answered you...
He was humoring my useless information
in case that answer would change if the whole problem was known
so can i call this like yadayada.jokerStorage[].blueprint_compat and itll tell me if its true or false?
like could i do this?
wait
like this?
Instead of bool_var == false,
why not not bool_var?
wasnt sure at first if or statements would mess that up
but thinking about it it shouldnt
i can only presume this works just fine?
Not saying code is wrong, but is there a reason you dont want it to copy blueprint or brainstorm?
blueprint leads to ambiguity
say you have two blueprints and they copy two different things
how do you know which joker my guy is copying?
and yeah brainstorm is fine, doesnt need to be there
why does that matter to the player?
just feels more fitting
cus i plan on telling the player what this is copying
by hovering over its desc
ah, gotcha. I figured it worked like blueprint where it calcs once you play hand
it sets it at the start of round
I just wanted to show off the abomination of a solution I found to my issue. "If it works it works"
oh your using joker storage, I missed that
that way it can trigger with just about every relevant joker it can, including perkeo because it wont reset until the next round start
this is all happening during context.setting_blind
also quick sanity check, would a 'copy random joker each round' work as an uncommon, or should just cheap rare be better?
something is afoot with my usage of context.other_card
oh, i guess i should be asking how to detect loading of items in shop
context.other_card:is_ace()
unfortunately doesnt seem like the case
G.shop_jokers and G.shop_boosters
new error
my fault
how do you format code on discord
```lua
code
if context.discard and not context.other_card.debuff and context.other_card:is_face() then
return {
dollars = card.ability.extra.money,
colour = G.C.MONEY,
card = card
}
end
end,```
A
yeah that
Thanks
use calculate = function(self, card, context) instead
before i bury myself, inputting nil into this if statement wont cause a crash, right?
or any problems for that matter
thanks
what is it asking for inside those parentheses
nil will be treated as false
can i check for nil like 'if variable == nil' ?
maybe
I've never tried that
Im pretty sure not would be easier
uhhh is this the channel to throw crash reports? I'm having issues with cryptid
like variable not nil?
probably to be raised in cryptid's forum post
Cryptid has a Discord server iirc
oh i see
oh yeah it does, right
Can you rephrase your question again? I didn't comprehend that.
what im trying to do is remove any incompatible jokers in my list by replacing them with the joker in front of them (and then that joker in front of them, etc until it hits the end of the array) but thatll introduce a nil value at the end when something gets replaced, so im wondering if things will break when it reads a nil value
what am i supposed to be putting in those parentheses
Like generally not specifically here
Teach me to fish
and if so, how to prevent it
Just calculate = function(self, card, context) in general.
Like, most of mod devs/coders use that set of input variables.
look at the code for blueprint, it has a nil case handler
in which file?
card.lua?
Ok I see
Thanks
yeah
is this it?
yes
so its checking for...
if the blueprint card is greater than the length of G.jokers.cards (i.e. jokers in posession) plus one? aint that a little too late?
well you have to change blueprint to your context
or is it checking if the target of the blueprint
so youre checking the next card in the index, +1 every loop
this checks if the +1 puts you outside the index
if so then dont do anything
mhm
adding this i think should work
if i is greater than the length of the array, skip the whole rest of the if statement, preventing any of the other guys trying to read nil
I've been coding for this joker for the past two days yet still not getting the visual and effect I want.
I'm leaning to compromise by changing the pick & paint mechanic to a form that is easier to code.
Any suggestions?
("copy one and then paste on the other" part must stay)
Is the previous line for i = 1, #card... do?
Then why are you worrying about i > #card...Storage?
Can I see your joker's config?
(this loop will have the array shrink by moving all indexes [i] and rightward to the left one, eventually causing the last one to get replaced with nil)
Is jokerStorage... the jokers in the joker slot?
for some reason none of my variables in config are applying when i try to add an edition? to clarify im using talisman but even with it disabled it still doesnt work
lets bump
yeah, and then i cull down the ones that are incompatible with this joker
(or would cause ambiguity problems)
Dude, you can use G.jokers instead!
and then ill use a random number to select one of the remaining ones to get rerolled
that would work?
cus i need to make sure the jokers are blueprint compatible
like thats required
i dont want the guy im making to choose a joker that doesnt do anything when copied
so i need to make a culled list for it to choose from
just local copied_joker = {} while not copied_joker.blueprint_compat do [randomly choose another i] copied_joker = G.jokers[i] end
and presumably also not [the other guys ive stated]
blueprint for ambiguity reasons, mimic joker (the joker im coding) for looping reasons, and brainstorm just because it feels fitting not being able to be copied
ok i need help understanding whats happening, what exactly is the while loop doing?
also is it ...this to do the code blocks?...
no
While the chosen joker is not blueprint-compat, choose another one.
oh
uh
that
is kinda easy huh
I just went ahead and injected a custom Joker context that is sent to Jokers after the shop loads its Jokers, vouchers, and booster packs (function Game:update_shop(dt)):
#Add new Joker context: tiwmig_load_shop, primarily used by Generic Brand Joker
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = '''
end
G.CONTROLLER:snap_to({node = G.shop:get_UIE_by_ID('next_round_button')})
'''
position = "before"
payload = '''
for i = 1, #G.jokers.cards do
G.jokers.cards[i]:calculate_joker({tiwmig_load_shop = true})
end
'''
match_indent = true
does that joker make things cheaper?
cus if so nice
yeah, Generic Brand Joker - All shop prices are 30% off
nice
it specifically has to be 30% or the joke won't work
There's one time I looked into the math.random_integer() source code in python, and it basically does:
- how many digits in binary is the given cap?
- generate as many random 0 or 1 as the digits from step 1
- if the number from step 2 is bigger than cap, back to step 2, else return the generated number
Here's a video of the Joker, thanks again yall for the help
niiice
Is that so?
The joker I mentioned to you earlier can make it either free or doubled.
Just v.cost = 0 or v.cost = v.cost * 2
Oh you say "The joke" not "The joker"
I was just kidding, the joke is that it's been reported a couple of times now that No Name products are around 30% cheaper than branded versions of the same products
(No Name is a Canadian generic brand)
already tried the following:
- get rid of the pools local, game references it anyway
- assign the joker to a preset rarity (common in this case), boots up fine (desired effect is to use the custom rarity)
so this will...
create a nil value in copied_joker
send that to the while loop
select a random jonkler
if that jonkler isnt bluecompat, do it again, repeat until yes?
whats with the empty array anyways?
It has to start somewhere
You can also start from a random i
And I suggest *(#G.jokers + 1)
sending it into the loop?
the reason i did +1 afterwards was because i didnt want it to roll zero, which to my knowledge wouldnt go towards any array index
cus it starts at index 1, right?
aint that the lua thing?
Why would there be zero joker in the joker slot,
if this joker is doing calculation in the joker slot?
im confused
im trying to make the random number not roll zero, which it can if i divide that random number without adding one
if it chooses a number between zero and one, then gets multiplied by # jokers, it can be between 0 and # jokers -1
Then *(#G.jokers + 1) would be wrong.
My bad.
s'all good
still trying to figure out my config issues if anyone has a moment to look at it. im stumped at this point :/ i have tried changing things around but I dont know enough. this may be beyond my scope lol https://discord.com/channels/1116389027176787968/1328320443693662311
local random_index = 1
while not copied_joker.blueprint_compat do
random_index = math.random(1,#G.joker)
copied_joker = G.jokers[random_index]
end```
huh
Try () them all
thanks
Sorry
local random_index = 1
while not copied_joker.blueprint_compat do
random_index = math.random(1,#G.jokers.cards)
copied_joker = G.jokers.cards[random_index]
end```
It's G.jokers.cards, not just G.jokers
#G.jokers.cards not #G.joker.cards
copied_joker should also look at G.jokers.cards[random_index]
gn!
thanks so much for the help
math.random isn't really recommended, as I've been told-
hey! i currently have my mod folder setup like this. i cannot seem to get this mod working, and couldnt get card sleeves either. do i have the setup done incorrectly?
Version.dll goes into game install folder
Where do I look up the hexcode for the suits?
nvm, found it.
ty
any idea on how to resolve this? it also happens to JokerSellValue. I tried placing js_utils (the API) in the mod folders and the main directory, but im still getting this error
What version of Steamodded are you on? It looks old based on this log file
it may be. i just got r2modman to install it correctly, then moved it over to my base %appdata% files so it just launches when i open from steam
im on 0.9.8
r2modman/thunderstore's version is really out of date
Yeah, I think r2modman downloads from the releaees
You need to get it from the green CODE Button on the main repo
Yup
oke, so 1/8 consumables done
all i need to know now is how to make:
cards gain perma chips/mult/xmult
cards getting coppied/destroyed
Can you have a modded suit only ever have certain ranks?
ok so half way through the tutorial I had the random thought of trying to change the card sprites, but I'm not sure how to find where the sprites are stored (I assume in the exe), is there any good resources to look at for editing card sprites?
change the card sprites...? you mean texture pack?
I'd recommend making a texture pack with https://discord.com/channels/1116389027176787968/1300851004186820690
thank you!
Would you guys consider this too broken? (1 in 5 originally)
no
not too broken
but i dunno why you need the grey lines
remove the limit (don't actually take my advice I just beat tutorial)
so uhm. you know how Blueprint is a Rare
we talking just effect, not rarity lmao
I accept rarity suggestions too its fine
even not considering rarity this is. 3 retrigs a bit over 50% of the time
50% of the time?
4 in 5 is 80% of the time
Yes sorry ç-ç
oh yeah, then it would be 2 in 5
if so 1 in 5 is fine imo
40%
anyway, can someone tell me about these?
Which ones?
I don't understand which grey lines you're referring to at all
If you have 2 dice it would give 3 retriggers too consistently
well, you dont need to have it
i think its obvious it would only alter its probability to triggering
Only the first 1 in 5 will be altered, the second and third retrigger will remain 1 in 5 regardless
also, where is anything about
highlighted:
in steammodded wiki?
oke, i got the destroying card code, so i have 2/8 consumables done
do i need all this shit? 😭
how do you "add to hand"
Not currently possible
wdym
Not without work anyways
so... my mod is a failure?
I don’t know what that means
I’m just saying it needs work to make it function
Elial and Autumn have their own implementation of it
i think there's a function called emplace
I was talking to Lars to add to Steamodded
Yes for putting cards in the correct place
You can make your own way 😁
If you really wanted to, anyways
You would need to implement the logic with lovely patches probably
if i had logic in my brain first lmao
Yes I said so
I was just saying you can’t just look at Hiker and do it for Mult and xMult
@tepid crow
the people yearn for the mult hiker
I mostly said that so that they can see how it's done for Chips and apply it to the others
-# But I suppose that was assuming they knew no vanilla joker adds permanent Mult or XMult to cards
Truly
thoughts on this ability?
Goldor (Legendary): Played Gold cards each give X3 Mult when scored
i'm unsure about the number, because it's more inconsistent to get a deck of Gold cards than it is to get a deck of Kings
Incredible synergy with Midas Mask
is that positive or negative? :D
Depends if you're aiming for a balanced mod
i am aiming for that
thinking over it, i'm gonna change it to X2
ooh maybe i could also give $1, to make making Gold cards slightly easier :D
I feel thats better too, Midas Mask turns face cards into gold and with Pareidolia you can abuse it a lot, but that's 2 specific cards so...
fair!
Maybe even lower, since it'd be just Glass cards without breaking.
it is a legendary, though
touche
1.75?
Is it possible to have enhancement score after the effect of the seal? Using context.cardarea == G.play and context.main_scoring and not context.repetition, but noticed that the red seal happens after my custom effect happens, and wondering if it's possible to time it differently
I think x2 or x2.5 is fine. Compare it to Triboulet; I think it's much easier to fill your deck with face cards rather than gold cards, so 2-2.5x mult isn't too crazy imo
According to function eval_card in functions/common_events.lua,
the answer is no... unless you make a patch.
quick code question! how would i go about returning both Xmult and money? (i'm guessing with events, though i'm unclear on how)
if context.individual and context.cardarea = G.play and context.other_card.ability.name == 'Gold Card' then
G.GAME.dollar_buffer = (G.GAME.dollar_buffer or 0) + self.ability.extra
G.E_MANAGER:add_event(Event({func = (function() G.GAME.dollar_buffer = 0; return true end)}))
return {
dollars = self.ability.extra,
card = self
}
return {
x_mult = self.ability.extra,
colour = G.C.RED,
card = self
}
end```
also ignore the broken code in the returns ^^
I'd suggest
dollars = self.ability.extra.dollars,
x_mult = self.ability.extra.xmult,
colour = G.C.RED,
card = self
}```
anybody got any recommendations for lua learning resources in order to create balatro mods?
ah kay, thanks! :D
The method I've been doing is just to stare at the game's source code (sometimes at other mods' source code) until it makes sense.
The reason I can do this is because I have years of experience in other languages. If your goal is just make a Balatro mod then... yeah, I don't have any better ones.
I didn't know if there were any guides tailored toward balatro (I haven't found any). I have some basic knowledge of C/C++ and Python. Perhaps there is a more general lua guide that I can use to better understand the syntax?
This might be helpful
https://discord.com/channels/1116389027176787968/1307744498360520805
But if you need general Lua information, https://www.lua.org/pil/contents.html could be of help.
There's the Steamodded wiki
Thanks all! ❤️
Check the Your First Joker(? Mod?) part
do any mods use the quantum Enhancement tech already
Is there a context for retriggers? context.repetition seems to be always false even after red seal
had another idea!
Famalia (Legendary): When Blind is selected, create a copy of The Familiar (Must have room)
like, the spectral card that eats 1 and spits out 3 enhanced face cards? I'm not sure I would be happy seeing that result from the soul, I'm pretty low on familiar
mhm, that card :D
since it creates the card when the Blind is selected, it lets you forge a Five of a Kind or similar
maybe it could create a small spectral pack on blind select?
myeh, then it's not The Familiar ^^
Playing cards or jokers?
Playing cards
true, I think that face cards have enough rep in legendaries between canio and triboulet though
Should be context.repetition
All played face cards become Polychrome when played and scored
which now strikes me as a worse Trib
Isn't repetition before and separate from main_scoring?
unless Paradolia?
But they keep the effect even after you sell the card
yes and no, polychrome lasts after you sell the joker
jinx
aha, great minds think alike :}
Yeah, main scoring is different to repetition
Anything I can do here?
Not check for main_scoring?
What are you trying to do?
I don't think there's a way to tell a scoring was due to repetition it if it was natural
I have an enhancement that adds it's own retriggers (using manual card evaluation), but I don't want it to be retriggered by the red seal
I'd have thought that retriggers don't retrigger retriggers
They don’t
not context.repetition_only perhaps
Without seeing how firch is applying the repetitions it’s hard to recommend something
I'm using the code aure provided yesterday to manually re-score any card
the retrigger doesn't happen on the same card that is triggered so I use that
this is basically piece of another code modified to work as a function
So you want the enhancement to rescore another card but not add multiple rescores?
The enhancement needs to rescore some cards but always do it fixed amount of times, without being affected by the external retriggers
Can’t you just remove the repetition calculations in your rescore function then?
If I rescore the card it still should be retriggered by the red seal, it's just it shouldn't apply it's enhancement effect anymore
Oh right I get it
Here's what I did so far (and it works fine here)
Set a flag the first time it scores and check for the flags presence
Then reset the flag in end of round
For the card? I pass an additional context for if the enhancement scored already and check for that
Or you mean to the card itself?
So I’m trying to make the mult hiker and I have the effect functional (as in each card is gaining its appropriate amount of mult and maintaining that across iterations) but how do you change the playing card tooltip to show the extra mult? Like I don’t even know where that’s initialized at in the base game code to start so much as tinkering with.
btw.. https://github.com/Steamodded/smods/tree/cardareas once I merge this we just provide SMODS.score_card
awesome! Will it be possible to pass additional contexts?
How do i play a hand, i see G.play but im sure thats most likely not all thats needed
so look at my hands, what do you see?
it adds context.main_scoring or individual as needed, hopefully soon with Lovely 0.7.0 it'll be possible to lovely patch into the function too to add more calls if that's what you mean
so you can put enhancements into G.Jokers or G.Consumeables
would it be G.play:play()
i feel like im doing it wrong
I mean so I could pass a context to have a context for specific rescore reason for example
something something SMODS.score_card(card, {is_rescored_by_my_enhancement = true})
I currently do that in my function
how does this ability sound?
Famalia (Legendary): When Blind is selected, add a King with a Purple Seal to your hand
can we have a SMODS.score_hand 🤔
you can pass any context you want
It's called SMODS.calculate_main_scoring because it does more than just score hands, it works for any cardarea
Does it do the entire evaluate_play sequence or just the scoring part?
it just scores each card in the scoring hand or card area with the given context
which amounts to some debuff checks in the G.play case as well as calling score_card on each card
SMODS.calculate_main_scoring(cardarea)?
I don't think we added that in better calc, you'd have to use lovely patches to add it
?
it takes a context and uses context.cardarea
hmm okay
so would i then insert a calculation after this code
for i = 1, #G.GAME.tags do
G.GAME.tags[i]:apply_to_run({type = 'shop_final_pass'})
end
(bump)
That... is oddly specific. (it'd be more odd if even which suit is specified)
where is the wiki page
true ^^
is there a way to search for this code without using regex (i.e. how does lovely handle newlines? i can't seem to find documentation or examples on this)
last I checked coding the feature comes before documenting this. It's not even merged yet
you can use multiline pattern patches
is there an example of this somewhere
what does it return? best hand? something?
man... why i cant think of a good concept for a mod
ahh i foudn it
searched through smods for it
it's a regex match unfortunately but it'll do for now ig
guys, you got any ideas what i can try to make for a mod?
That sounds useful
Not sure about legendary-like tho
Although maybe it is already good enough, eventually you end up with lots of kings and cool tarots
fair! okay, i'll test it as it is now, and let you know how i feel
Anyone know where the code for The Tower tarot is stored? I'm not finding it anywhere
someone said tarots were handled in card.lua but searching for "tower" nets me nothing
How do you guys do round-changing messages like this Joker here?
localization
can't find this elsewhere, but how do i create a card with an edition?
probably create_card
use a #1# in place of what you want to be changing, then use a loc_vars to pass whatever you want in variables
"this is a #1#"
in the joker
loc_vars = function(self, info_queue, card)
return {vars = {variable that changes}}
end,
Is it possible to apply enhancement effects after retriggers caused by the red seal (or after every other effect individual card could have)? I tried putting enhancement evaluation for my enhancement after the seal evaluation in the eval_card(), but it seems like retriggers still happen after the enhancement effect
I recommend checking out the SMODS example .lua for a bunch of Jokers and looking at Castle, which deals with the same thing except for ranks https://github.com/Steamodded/examples/blob/master/Mods/ExampleJokersMod/ModdedVanilla.lua
Would anyone happen to have an example of how to use calculate_effect in practice?
-# SMOD EXAMPLES ARE VERY MUCH FUCKING OUTDATED
whoops!
6 months old atleast
YOWZA
examplejokers isn't that outdated
it's just not updated for bettercalc yet
you might be referring to the documentation?
nah, examples
What's the context for checking what hand type is played?
is it next(context.poker_hands["Hand Type"]))?
bump for @crisp coral
context.scoring_name?
Nope I just dug through the source code more, it indeed is context.poker_hands
(next(context.poker_hands['Two Pair'])
TGTM, you one of people that helped me most of the mod
do you have ideas what to make? cuz potions kinda failed
okay you're just confused then, there are two example mods, ExampleJokersMod (the one they referred to) and SealExample (the outdated one you're referring to)
ah, mb then
[Asking for help]
Just found out a patch I made awhile ago is, in fact, not working at all.
It's meant to replace this
what happened to the potions?
how do some people make custom slot in cards?
(like someone made gemstone slots)
cant add perma boosts to card for Mult and xMult
without doing complex shit apparently
its a learning experience
atleast i done the destroying card consumable without needing help ironicly
This a good learning experience for patches!! Everyone loves patches!!!
new suit of playing cards for my mod
i dont know how to even do patches, and i am scared to try
mahjong
yep
It's simpler than it looks, it was intuitive for me
i dont know
i am scared of hours of learning just to make one thing
Fair enough
But you made your mod, didn't you?
not finished
its less than 30%
Fair enough.
I started looking into patches and was a bit confused on exactly what they do. They just insert code into the base game files? Do they need to go into any special folder or something?
They add code you define either before, after or at the target line of code you define
Do they need to go into any special folder or something?
You just need to create a lovely.toml with the patches
So you have a lot of liberty
i added perma x_mult, perma h_x_mult, perma p_dollars, and perma x_chips
in a few lovely patches
whats the thing about x_mult and h_x_mult?
latter triggers in hand
Also was wondering about that, cool to know
and how you specify normal mult and multiplayer mult?
x_mult and mult iirc
perma mult isn't in the game but it can be added by a few lovely patches
could i... um... "borrow" that patch?
okay so i've tested Famalia as it is, and it's too weak
so i'd like to give the new kings editions
i'm using this line to create my cards:
local _card = create_playing_card({front = G.P_CARDS[_suit..'_K'], center = G.P_CENTERS.c_base}, G.hand, nil, nil, {G.C.SECONDARY_SET.Enhanced})
but, how do i add editions?
card:set_edition('edition_key')
[manifest]
version = "1.0.0"
dump_lua = true
priority = 1
# Add permanent boosts
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = 'perma_bonus = self.ability and self.ability.perma_bonus or 0,'
position = "after"
payload = '''
perma_mult = self.ability and self.ability.perma_mult or 0,
'''
match_indent = true
# Fix mult
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = "return self.ability.mult"
position = "at"
payload = "return self.ability.mult + (self.ability.perma_mult or 0)"
match_indent = true
oke, so how do i apply this to the mod?
either create a lovely.toml file in your mod directory or make a .toml file inside YourMod/lovely
ah, cheers :D
like dis?
what are the edition keys?
if you want to apply the perma mult do card.ability.perma_mult = (card.ability.perma_mult or 0) + mod
i think i can use the mod for hidden values
true
so this theoricly will work?
three million config variables be upon ye
Learn to count myst thats only 9 🙃
98% of balatro devs can't count
I'm the other 3%
yeaa
and yes that's a rounding error
oh i noticed you're applying the mult to card and not _card
or highlighted
whichever one you're using
its a consumable, so what to do?
and also, how to make highlighted 2 or less but not 0?
you're a rounding error
no u
how exacly? just adding _ to card.ability.perma_mult?
return #G.hand.highlighted > 0 and #G.hand.highlighted <= card.ability.extra.max_highlighted i think
add an underscore before card, so _card.ability.perma_mult
also you don't need the highlighted local var since _card is the exact same thing
oke so it works
but the hidden card display mod doesnt
curse of the really long loc_vars!!
perma chips are as perma_chip or perma_chips
perma_chips
the people yearn for built-in perma bonusses
Are you still implementing it lars?
yeah me and victin were discussing what bonusses we wanted and what order we would apply them in
this is what we settled on
For jokers: Chips, Mult, xMult, end of round Dollars
For playing cards: Chips, Mult, xMult, Dollars, on held Chips, on held Mult, on held xMult, and end of round Dollars
For jokers perma-bonusses work in the order:
perma-chips -> perma-mult -> foil/holo -> joker_main -> perma-xmult -> polychrome
For playing cards perma-bonusses work in the order:
when scored: base effect + perma-bonusses -> enhancements -> seals -> editions
when held: perma-bonusses -> steel card -> [etc]
well, it does the animation but not actually gives chips
built in perma bonuses would be awesome
(also still asking for base xchips compat so i don't have to require talisman 🙏)
i love how at 8.12.2024 it been called useless
but now at 16.1.2025 its said that it kinda be awesome
your perma_chips aren't working?
it dont work, it only scores the base
_card.ability.perma_chips = (_card.ability.perma_chips or 0) + 12
xChips haters versus xChips enablers
i also have no clue why card value displays dont work for me
btw what lovely file would work best for it do you think @zealous glen? center.toml, playing_card.toml or entirely new file like perma_bonus.toml?
I think a new one unless we need to change the middle of calculation which is somewhere preexisting
oh @elder vapor, the thingy you gave me has nothing about chips
yea
I think a perma_bonus file would be best, i think most stuff would be limited to the card functions anyway right?
should be yeah
can a basic card have floating thingy like soul spectral card or legendary joker?
ish
probably, but you might need to put some work in yourself
Is there something I can change to this to make the UIBox happen when scoring starts? Not after scoring, but directly as scoring starts
Instead of when entering a blind
Would it just be changing if context.setting_blind to if context.before ?
i have done localization hopefully probably
does anybody have any idea how to make music only play when you have a specific joker? (or with any conditional at this point)
people make specific music play on specific boss blinds
when changing this to if context.before
it starts when the scoring starts, but it doesn't actually fully work
jimball
from cryptid
I think
yeah I got you
next(SMODS.find_card(key)) in your select_music_track
SMODS.Sound({
key = "music_1",
path = "1.ogg",
sync = false,
pitch = 1,
select_music_track = function()
return next(SMODS.find_card("j_MUSC_davidbyrne")) and 1.57e308
end,
})
Change MUSC to your prefix found in the json file, and the path to your filename
Make sure to change davidbyrne to the key of your specific Joker
That should work
i shall pay you nothing but my absolute gratitude
You put that after the Joker, not in it
it works yay
the 1.57e308 is how important it is to play first
oh yeah i forgot about colors
So if you have other jokers doing the same thing change their number at the end to change the order
mfw i am fighting against a boss blind with some epic theme and i pick up a jimball midblind
can I somehow make a suit have only 3 ranks?
@elder vapor, how did you done new slots for stuff? (the gemstone thingy)
stickers
hey y'all where should card eval text for G.discard display? rn it's fully off the screen because... well, that's where the discard area is
they don't interfere with any other card modifier
we keeping it bare in here 🙏
it's kinda funny just having the screenshake without the message appearing
How do i play a hand, i see G.play but im sure thats most likely not all thats needed
also thats supposed to say 20%
how can I get this to say +2 Slots
i was gonna say under the disard button but that could look weird
How do you envision it being used?
but then, dont like you cannot apply sticker to a gemstone?
and vice versa?
Consumable slots, joker slots?
Joker
Also does it actually do it already
nah, do it 1$ per 20 overkill
stickers don't interfere with other stickers
I just can't figure this out
however one decides to use it? that's not really up to me-?
they dont?
which is why i use them
Does it ALSO give 4 mult?
how the fu-
it was supposed to be 5$ per 20%
it shouldn't
(vanilla can have eternal/perishale rental jokers)
I mean it helps having an use case in mind to make the decision
far as I know
DM rq
Maybe make it an invisible card where the deck and play area intersect?
then do % in there
but i had to code it so you can't have multiple gem slots lol
cuz per 20 looks like score
i forgot
you trace a line vertically from the deck
and one horizontally from the play area
and put it there
also, is there a way to make custom stone card?
(no suit or rank but has an effect)
hm that's not a bad idea
i might be ready to ship this off!!
doesn't need an invisible card though
I can just align it above G.deck and use a vertical offset
Do ones on the deck display above the deck?
yes
How do i make it so I can forcefully play a hand with the code
Is there room below the deck in that case?
im so excited!! let me play a run with this
I don't think so ?
if people make suits for cards... is it possible to make null cards?
(rank exists but suit wont count to any flush or other stuff)
no_suit enhancement?
you can hook Card:is_suit and have it return false for that suit (unless wild card or whatever)
I wonder if it would be worth displaying the discard area for this

maybe, but where
card faced up and greyed?
i just will need to learn how
please, what code is ran when the Play Hand button is pressed
New to modding, I'm having difficulty finding where to start (even within the documentation) on creating a new joker. Specifically,
- Where do I place the new joker?
- How do I define the joker?
- How do I define the effects?
Let me find a ss to show how I see it
I reckon it's evaluate_play or something that calls evaluate_play
or the Steamodded override
hoopefully this isnt from me...
I've looked at that, that page is largely unclear
I would think evalute play would just find its score without truly playing it but idk tbh lol
Ah apologies, I foudn the example mods. That helps. Cheers!
Excuse terribly drawn image but I imagine like a randomly rotated pile of cards down here
It could go off the screen if needed
does this not work?
I'd prefer the discard pile above the deck, if it needs to be onscreen. But I wouldn't want it onscreen
not on Steamodded anyways
What are those Zodiacs on the corner anyways
oh Ortalab temporary effectss?
Okay, how can i check if a hand has anything selected
at which moment
when a keybind is pressed
#G.hand.highlighted ~= 0 probably
as it crashes when nothing is selected and the player asks to discard somethign
may i ask what those are on the top right? next to consumeables area
does anyone know what version of lua balatro runs off of
I think Ortalab Zodiacs
because im trying to do floor division and its not liking that, and i know its a lua 5.3 feature
I know it's a version before they added Euclidean/floor division
damn
Should this code work or am i failing to check something or overlooking something
SMODS.Keybind{
key = 'PlayCards',
key_pressed = '-',
action = function(self)
if G.hand and #G.hand.highlighted ~= 0 and G.hand.discards_left ~= 0 then
G.hand:discard_cards_from_highlighted()
end
end
}
what ya guys think?
ok how would i cut the decimal off of a number
function fslashfslash(x, y)
return x / y - (x % y) / y
end
siiiick
thanks
thanks
Yeah those are the ortalab zodiacs
i got this crash message when i had one card highlighted
so this should work for cutting of the decimal right?
yes
cool thanks
but you could also use math.floor at that point
gonna start work on an sts themed mod and try to add relics 
actually, i think this looks better
I think that's a bit too busy
so i should go back to old one?
You can try something in-between
...
gdi
The Graphics Device Interface (GDI) is a legacy component of Microsoft Windows responsible for representing graphical objects and transmitting them to output devices such as monitors and printers. It was superseded by DirectDraw API and later Direct2D API. Windows apps use Windows API to interact with GDI, for such tasks as drawing lines and cur...
kirby and the forgor 💀 land
and here we are

game freeze
thats a first
when the Event doesn't return true
found out why
was it an Event
nope still freezes
i like this btw
I can not for the life of me to get the 4 to change to a 2 lmao
or get the multi to say slots
whats that one mod that adds a new card area
ok so
i am trying to select a random blueprint compatible (and also not a copy joker for a couple different reasons) joker at the start of a round, it however gets stuck in an infinite loop when i select blind
im trying to figure out why
i just got an idea for texture pack
there's already a built-in function to select a random element from a list
uh huh
so I'd build the list and select from it
i.e. use G.jokers?
then iterate over G.jokers.cards to build a table with the Blueprint compatible Jokers
you gonna tell me it?
anyone know why my lovely says this when the dump implies this steamodded patch succeeded? (all other mods except steamodded disabled)
WARN - [♥] Regex '(?<indent>[\\t ]*)if G\\.F_NO_ACHIEVEMENTS then return end\\n[\\s\\S][\\s\\S]{16}--\\|LOCAL SETTINGS FILE' on target 'functions/common_events.lua' resulted in no matches
balatro has pseudorandom_element
I think it's pseudorandom_element
I don't remember
thanks
go to functions/misc_functions.lua:253 and you can see the function
how do i add a description to a challenge with smods.challenge?
🔥
the empty space will be used to be able to tell what enchatment it has
what description are you talking about?
challenges don't really have a description afaik
or i could do like this for better enchantment view
what you guys think? first one or second one design?
the like rules area
the custom rules?
i think so?
thats not the point of texture pack
yes
plus, i cant overlay enchantments, they are BELOW the rank and suit
return G.hand and ((#G.hand.highlighted <= (TGTMConsumables.config.CursedRunes and card.ability.extra.CardAmt * 2) or card.ability.extra.CardAmt) and (#G.hand.highlighted ~= 0)) this is erroring, says its comparing boolean to number.
i dont exactly mean how to add custom rules, i mean how to add text to the custom rules section
this is peak coding
Ah yeah those. Doesn't https://github.com/Steamodded/smods/wiki/SMODS.Challenge explain that?
You can check https://github.com/SDM0/SDM_0-s-Stuff/blob/main/data/challenges.lua#L7 for an actual implementation example
i think it works :]
im not sure why im erroring here, it seems like a smods issue but im not sure
is it due to new-calc
its probably because of new-calc
Try checking lovely dump
ok how to i make a joker actually copy another joker once i have it's target
like duplicate?
i saw something about other_joker but do i need to assign it or something?
do a create_card
guys, any ideas for face cards?
no like blueprint
look at blueprint
yeah i did, but i dont know if im missing steps
like i see this, but do i need to set up other_joker or something?
Unrelated, but which editor do you use? Grids look so useful and I dont think mine has it
make the face guys geometric looking?
like all angles
looks like aseprite
Is it good?
very
$20 on steam or free on github with the caveat that you have to build it yourself
I went from GIMP to PixiEditor and now Aseprite, nice
-# Rip my layers...
but anyways
can i just do this and itll just work?
mhm
It looks too similar to Ace imo, I would remove the middle gem
and add something else
Heated card enhancement
then give the proposition thats steel/gem releated
Givrs you a x2 mult, then unenhances itself
i am not makeing modded suits
because i am not useing any
nuh
just suits
ah
i will show you later how they look like enchanted
how about for ace i will enlarge it?
ok where is this guy
theres like idk how many joker files in here
hey all
I've been trying to help @wild patrol
I got the Joker to work on my end
But he's still having trouble
Use search bar
its more like
which of these files is he in
this is his crash
You could have the characters hold gems instead of whatever they originally have
Or it would be confusing if you refer to them as "face cards" without a face
probably in miscJoker
because its a random joker
I tried downgrading the steammodded didn't work either
so not compatibilty issue
is there more to lovely than just the .dll file?
i found it
where can I find the code for vanilla cards?
trying to find them in the exe but its very confusing
he needs to download lovely
he has lovely
it even says the version in his crash
wow - oh wow, oops
yeah I'm lost
It doesn’t say the lovely version
yeah I was about to say
womp womp
texture pack is a texture pack, i gonna do what i want lmao
Obviously, mine was a suggestion
wait what
it said 15.0 or something
LÖVE Version: 11.5.0
that's love, not love_ly_
he probably didn't download lovely at all
When I asked if he had lovely he said "the version.dll thing? yeah"
oh okay
He also said he got it fixed by changing his lua? Idk
I figured it out
it was the lua script
The extra message data at the bottom was crashing the game
calling for something that didn't exist no more
makes sense
Should mention on linux through proton so lol
thought maybe would have been proton for a second
what does this line mean
guess this is a good start for adding a yugioh card pack lol
guess now i need to learn how to add multiple cards in one script lol
ahh
I have some good examples of random stuff you can do
Nice
but u can't reuse those slots when selling extra cards
world's biggest file download
season 1 alone is 1GB 😭
I wonder if it would be possible to code the 5 pieces of exodia into balatro lmao
instant win condition on bosses

or are we just restricted to what can be done in the vanilla game just with some minor tweaks to values
no restrictions
Code injection can do crazy shit
If anyone is smart enough to code a script a that can trigger an auto win with 5 cards in the joker slot
I could easily slide in the exodia part of it
can I steal barrow ur code
sure
A collection of random stuff that I've created and drawn in Paint. - DigitalDetective47/strange-pencil
i'll 100% credit not gonna take it and not give credit
does anyone know how to make a blueprint like joker actually copy things?
im at the point of copying other people's code not knowing what it does
prolly just find the joker to its right and call its calculate function
but remember to set context.blueprint
noted
for context im making a joker that copies a random compatible joker each round
but thats still important, the context thing
joker centers have a blueprint_compat entry
it makes a list of all compatible jokers, then selects a random one from that list
I just hope the injector gets fixed to where it doens't get flagged as malware
i dont think thats really fixable as the way it works is fundamentally the same as a trojan virus
The leathal company injector works nearly identically so I don't see why it couldn't

just a matter of getting the signature whitelisted
how do i put the fact this is context.blueprint through this?
before calling the calculate function do context.blueprint = true
main reason having to keep the injector seperad from my main pc is I don't wanna risk any chance of a game injector flagging my tf2 games and vacing me lmao
I know sounds paranoid but I never wanna risk my steam account lol
idk, maybe make a copy of the table first
huh
crtl + c
ok
is it possible to have a modded save an an unmodded save?
I don't want the steam cloud save i got get corrupted by mods
you could make a new save thats for mods only (ingame)
besides that idk
alright
i really dont know what to do at this point
i think other_joker isnt actually being assigned to anything, or to a nil value, which is causing the joker to not actually copy anything
so presumably my way of making a list of compatible jokers isnt working
you do realize that other_joker is renewed after every time the function is triggered right?
it wont save
heres your reason
i mean you can try i suppose
nope
