#💻・modding-dev
1 messages · Page 167 of 1
how do i set the mult and chips of a seal and how to i refer to them in the description
oh that's just another thing you can add to boosters
it groups them together based on the name you give it
no problem
probably in the seal's calculate function
and then referring to them in the description would be the same way you would in a joker
how do i make a card with the specific seal self destruct after scoring is complete (like a glass card)
that's the main point of the self destruct seal after all
the code i made for a tag isnt working
i copied the cryptid schematic code and altered it for my joker
not showing up though
game works, just my tag doesnt exist
hey i'm trying to use EnhanceAPI and just loading it in crashes whenever i play a card
this is what my mods folder looks like
i wanna make my booster pack appear in shop so that i can test it
made a minimal sticker that does nothing, but where does the Error come from... 
(i also tried it on the latest version of smods and it doesn't work either)
try replacing the name with this
maybe without the text part
idk thats what worked for me
looks like it should work but i guess not
i do have debugplu
plus*
Aha, thank you kindly
any ideas?
to give it to yall straight i don’t really feel like combing through the code of balatro just to find out how self destruction works
lol
the plight of a newbie balatro modder
like, doesn't show up in your mod's additions/tags at all?
Hmm, can you send the whole file it's in?
like just send a copy of the lua file?
ok
its a bit messy lol but it works so idc
I suggest you use SMODS.Tag instead and stop looking at the cryptid source code, it's a mess
lol ok i wanted to use smods tag but couldnt figure out what to put in it
the wiki is confusing for someone not super used to coding
so what do i do?
take a look at other mods that properly use SMODS.Tag, e.g. ortalab https://github.com/Eremel/Ortalab/blob/master/objects/patches.lua#L66
can't you press 3 on your booster pack in the collection?
Finding out which mod to emulate to find good examples is non-trivial... seems like it'd be a worthy goal to
- ensure the wiki has one example for each kind of game object, or 2) get e.g. Eremel's permission to link to their tag code in the wiki, someone else's code for a sticker, etc
there's https://github.com/Steamodded/examples but it has no examples for SMODS.Tag (and is also a bit of a mess to navigate in general ngl)
aye, I'm referring to that part, which has many helpful examples for some things
yea
clearly i screwed something up
its hard to know what is needed and wht needs to change
there seems to be one too many "end"
k ill delete one
no it doesnt work
It should. Are you sure your debugplus is updated?
game launches but the happens when using debug to spawn it
the atlas part is unchanged aside from just changing their atlas name to mine
unless
nvm i misspelled my atlas
lemme try now
now it spawns but gives me this after reaching the next shop
also how do i give it a name and description?
idk i got i a little while ago
ill download a new version soon
im in bopl rn
try ctrl+3
so the intent is for this to, at the end of thre round, give 2 dollars per Joker on that list on line 279 currently owned. Right now it's instead giving 10 dollars when all 5 are owned.
I don't get why since it should be looping from 277 to 283 once for each joker, (in the current test 5 times total), increasing by 2 each time, and then going on to give the dollar value once, for a total of 10 dollars.
is there like a table of events i could use as reference for when i want to put them into code?
such as gaining chips/mult or resetting
hm i may have somehow allowed jokers guys
hey, want a +4 mult?
and i gotta make the uno cards pullable not usable
but howwww do i make the pack not use a consumable
PLUHHH
extremely new to modding- am I missing something? why does this always say nil?
are you giving a loc_vars function for the (enhancement?)
(also vvv cool art i like wood card)
thank you, I spent ages trying to get it to look right
if theres a wooden joker you gotta make it look like its carved into the wood
uhh, I do have it but it's currently empty, what would I need for this? this might be a bit complex for a first mod but I'm trying to make this enhancement be worth 20 chips for every wooden enhancement in your deck
wrong channel lol
What's the preferred way to throw an error for logging in Lovely?
that's totally doable, but the thing is the way you're writing the description right now means that it's looking for the second variable in the vars table in the table returned from loc_vars (complicated wording lol)
the two pound signs denote a variable; the number between is the index
ahh I see
i.e. loc_vars needs to have something to the effect of
return { vars = { 1, 2, 3... } }```
nice, okay now I just need to figure out how to calculate this
error() like in traditional lua
love2d implements an error handler which lovely sees (balatro overrides that error handler but it works mostly the same) (steamodded overrides that error handler but it works mostly the same with a much greater amount of info)
fallback card moment
theres also assert() which may be more useful in some cases, but is otherwise the same
if you just want to log somthing to the console see https://github.com/Steamodded/smods/wiki/Logging
and print
sendErrorMessage(message, logger) is what I'm after, thanks
Good to know. In my case i wanted a non-fatal report without prompting a crash
ah
crashing is usually good for that kinda thing because of the stack traceback
but i get it
for the crash log theres also a method of adding info under your mod in the crash log
I'm manually invoking SMODS.save_mod_config and would like to see reports if it fails, but it's not critical if the config isn't able to write to disk every time
i think that crashes if it fails anyways
looks like it doesn't on the love end so maybe im wrong
oh are you looking for pcall?
I don't think it's necessary. Looks like save_mod_config would only actually error on assert(mod.config and next(mod.config)) failing, all other calls just return the success state. I'm almost definitely overthinking this though
Actually pcall probably is best practice for this, thanks
is the default version of the consumable not set? i'd assume it ran out of those consumables in the pool and now it's spawning default cards
yeah it looks like the default default card is jimbo
does smods have something to set those?
got it working! though, there's still a bug that I'm not sure how to fix. the value is very commonly out of date, only refreshing when playing a hand or discarding cards, and always updates before using death, so if you're adding new cards, it's always going to be one card out of date, how do I fix this?
here's the code as well
What I usually do for my jokers is I externalize the counter to outside the enhancement in a seperate function, then call it in both loc_vars and calculate
Interesting, if you have 5 jokers and 5.1 joker slots, you can add one more joker to stay at 6/5.1
(Nothing in particular seems to break if you have fractional joker slots)
1.8 discards left
The localization for this sticker doesn't work - ideas?
(and the add_to_deck and remove_from_deck don't work either, I assume they're only for cards...?)
yeah i know why its cuz i onlt have one consumable and i have no duplicates turned on
actually, playing with it now, the bonus_chips aren't actually even added when the card triggers?
Aha, self.config.extra_jokers whould be the variable I use in loc_vars
I think a lovely patch is probably the best way to make this sticker do its thing without having to add code in all cards
i'll see if I can try to figure this out, been trying for like half an hour to fix literally anything
i think hooking works
Just came across a really funny bug with this Joker. I've since fixed it but I thought I'd share lol
HEY 🗣️
HEY 🗣️
Unsure why, but the variable in the description is always showing as nil
Tried without the brackets for the returning value?
yes, still returns nil
why is "max = 70" outside of the extra
Whoops, fixed it
Still showing nil though
Show the full, bit difficult from just snippets alone. Chalking up to Joker key not being right imo.
Also did you save the file(s)
Here it is
rate this ability?
The Spear (Rare): If played hand contains any Spades, destroy one and upgrade Straight
seems pretty cool! It's deck thinning and scaling!
okay lemme go for mine
Lifesteal Scythe (Uncommon): Whenever a card is destroyed, this gains +5 mult.
this ranges from playing cards to jokers
so like
using hanged man, Madness, and most of the spectral cards ngl
most of them destroy a card
hmm, doesn't scale fast enough imo
what do you suggest?
hah wait no that's fine
Jimbo doesn't scale fast enough either :bonk:
just, destroying cards is quite difficult to do consistently

that's why Canio grants X1 per destroyed face card
i see
but that plays more into specific cards being destroyed
ah heck there's a balatro related :bonk:, we'll need to find some other non-existent emote to use instead
ya but consider, it starts really small
i mean it's specifically related to Cryptid
you could probably get a Green Joker to scale faster
i mean i'm not one to be good with game balance, so =w=
doesnt green joker only interact with hands and discards?
it's not necessarily about having the mod outclass the base game
ya i mean, fair =w=
yeah
what she's saying is that playing hands is more common and consistent than destroying cards
well i mean +5 is fine i guess :>
At the end of the day, do what drives ye.
hokai ideas for the other three
The Fuse: If played hand contains any Hearts, destroy one and gain X0.1 Mult
The Mace: If played hand contains any Clubs, destroy one and gain $5
The Dagger: If played hand contains any Diamonds, destroy one and gain +10 Mult```
RE:VENANT (Rare): After 6 rounds, sell this to instantly clear current blind.
The thing was 12, but feedback from elsewhere suggested otherwise.
I lowered it to 6 so it's not that much of a burden
12 rounds would be at minimum half the game (excluding hieroglyph)
6 is at minimum a quarter of it
3 then??
6 does feel fair though
yeah.
I have another joker this works well with.
although I'd probably take any other rare joker than this, cus it feels like a worse Mr Bones (who already isn't that impressive)
interesting concept, though
I'm trying to make this actually practical
maybe lowering it's rarity to Uncommon would help
that way it's more likely to appear, and still benefits off of being in your hand thanks to Baseball Card
yeah
I can't see much of a reason to take this except for the ante 8 finisher (in endless, buying one free round is either absolutely unnecessary (and has quite a high opportunity cost) or won't save you for the following blind)
which means you need to find it before the ante 6 boss and already be decently confident you'll need it, plus you need the spare cash to afford it, so you're probably only buying this in antes 4-6
Feels Bad
i mean i guess there are jokers that exist to get outclassed
Ride the Bus 🙏
there's something salvageable here, though
mm?
a joker that makes some alternate condition win the blind
maybe drawing your whole deck?
oh yeaa that sounds good
maybe using a number/type/etc of consumables?
like
the joker is meant to be a massive greatsword/railcannon thing
so "putting it all into one shot" could work
(hi, this is RE:VENANT)
i think it needs to be at least a little bit reusable to be an interesting option, but also not consistent reusable
how so?
like how would i make it more reusable
like
just
instead of selling it, just give it a cooldown period?
perhaps, I'm very not sure
another idea:
the main thing about railguns is their speed, so how about skipping a blind (which powers the speed tag) activates it?
that sounds real cool
would it start activated or deactivated?
RE:VENANT (Uncommon): Instantly clears blind upon drawing whole deck. Recharges after skipping a blind.
yea
to be clear what i meant by that, the lose condition where you still have hands left but no cards to play
right, that.
gave up a few hours ago, gonna try getting some help with this again
this enhancement gives +10 chips per all other cards with that same enhancement in your deck. the issue I'm having is that the chip value calculates correctly, but is very commonly out of date, only updating right before changes are made to your deck, so it ends up being wrong if you've just loaded the game (nil or default value) or have added or removed one of them to your deck (off by 10 chips). it's also not actually applying the bonus chips when scored.
does it crash?
it doesn't crash, just has some issues that I have no idea where i'd start looking for
since i'm extremely new to this kind of modding
i suggest instead of storing the current value in extra, write a function that determines the value when you need it
trying to keep every card up to date all the time will be a major hassle to get right (as you've already discovered)
does that make sense?
is there an event when the edition has been applied
I do yeah, I tried earlier but messed up the syntax horribly, so i'll try again
so could u create a G.storagenum for storing all the chips u need to give out later
when edition is applied, add ten
otherwise, subtract
question, how do you level up a particular hand?
try looking at the code for Space Joker
will try this, lets see
look at the code for Black Hole
or Saturn
would this account for creating new cards with it already applied via death, any spectral cards that create new enhanced cards, opening packs, etc?
since you want Straights specifically
Saturn is less helpful to look at
try checking if the played hand is a straight
that's not my card's ability
that's the thing, it doesn't check for played hand
this is why i suggest not trying to keep your value in sync
hm
where do i find Black Hole in the game's source?
spectral cards
find in files exists in many text editors
searching for "Black Hole" will get you most of the way there
or at least get you an ID to search for after
@long sun try this maybe?
level_up_hand(self, "Straight", nil, 1)
hmm just thinking, actually
(ah thanks :D)
but i think creating a copy of Saturn might be more useful in this modpack, for Luke
found that by scowering through the files, let me know how that works out for ya
okay so i may end up editing a legendary joker
Birus (Legendary): -1 Ante when sold.
hmm, yeah, copying the calculation into loc_vars still seemingly updates it right before the new card is created, so it's out of date
like, the value is updated by a new card being created, but it happens too early
I am also still having trouble getting the chips themselves to apply to scoring?
you need to return the chips from your calculate function, like return { chips = 47 }
(but only in the correct context)
@long sun
update_hand_text({sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3}, {handname="Straight",chips = G.GAME.hands["Straight"].chips, mult = G.GAME.hands["Straight"].mult, level=G.GAME.hands["Straight"].level}) level_up_hand(self, "Straight", nil, 1) update_hand_text({sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3}, {handname=context.scoring_name,chips = G.GAME.hands[context.scoring_name].chips, mult = G.GAME.hands[context.scoring_name].mult, level=G.GAME.hands[context.scoring_name].level})
its a bit clunky but let me know if that works out for you
update: i forgot to put "context" in a few places, whoops, but it should be all fixed
yup, I tried it out in my own code, and it worked like a charm!
it threw an error for me =w=
that might have been before I put the context. bit in
try copy-pasting the new message
it should work fine
possible ^^
indeed!
though it's a bit clunky, it scored the cards that were destroyed
but i'll change the timing :D
nah wait no this can be fixed
what's your overall card code looking like? i wanna see if you have the joker context set up properly for how you want it to work
if context.cardarea == G.jokers and context.before then
local destructable_card = {}
for i = 1, #context.scoring_hand do
if context.scoring_hand[i]:is_suit("Spades") and not context.scoring_hand[i].getting_sliced then
destructable_card[#destructable_card + 1] = context.scoring_hand[i]
end
end
local card_to_destroy = #destructable_card > 0 and pseudorandom_element(destructable_card, pseudoseed("thespear")) or nil
if card_to_destroy then
card_to_destroy.getting_sliced = true
G.E_MANAGER:add_event(Event({
func = function()
(context.blueprint_card or card):juice_up(0.8, 0.8)
card_to_destroy:start_dissolve({ G.C.RED }, nil, 1.6)
return true
end,
}))
update_hand_text({sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3}, {handname="Straight",chips = G.GAME.hands["Straight"].chips, mult = G.GAME.hands["Straight"].mult, level=G.GAME.hands["Straight"].level})
level_up_hand(self, "Straight", nil, 1)
update_hand_text({sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3}, {handname=context.scoring_name,chips = G.GAME.hands[context.scoring_name].chips, mult = G.GAME.hands[context.scoring_name].mult, level=G.GAME.hands[context.scoring_name].level})
return nil, true
end
end```
i mean, they work otherwise!
except The Mace but i can probably fix that
glad to help out a little bit!
have you checked how the hanged man does it?
return remove in context.destroying_cards
how can i directly set/get the chips/mult for custom xchips implementations?
hand_chips and mult are globals for currently scored Chips and Mult respectively.
thx
this crashes
I know i'm definitely doing like a million things wrong but even looking at lua tutorials I can't tell how the syntax works at all, my brain can't parse any of it even though I know exactly what the smaller pieces are doing
the error?
bcuz normally isnt it supposed to return a table?
and not just a number
line counter not shown 💀
anywho calculate function should have context and return the table
wait that's. an old version of the code ignore that
why did I have that image lying around
there we go, same code just with line counter
calculate should be a function returning a table
it should return the table with chips equalling out to the chips u want to score
and calculate should feature a context check
so it doesnt trigger every context possible
heres an example of calculate function
(I'm a bad coder, so maybe that's not what the advice is about) But if there is a function without checking if there is a G.playing_cards, then when you look at the collection, it will cause an error since g.playing_cards is nil
the error is prob in the wrong context
it triggers in every context, mind u
so it would trigger when ur in shop
or rerolling
or at the end of the round
afaik theres no card to be spoken of when ur in shop
so u should add the context check
I know, it's just that there will be another bugs if look at the collection in main menu
Although I can easily be wrong.
and u can do chips = woodScoreCalc(self.config.chips) so u could still do ur check
G.playing_cards will always exist afaik
u can modify it when in shop(when the joker is added to the joker area)
When I tried make mod without checking if there is a G.playing_cards using debugplus, and I got the bugs in the main menu like problem with pairs, meaning there was no G.playing_cards.
"in main menu" ur not ingame
therefore it doesnt exist
anywho whats ur progress @wheat
Huh, true
alright the game is launching now, but woodScoreChips in the function is nil
declare/put the function above the enhancement
hm, same thing happens
hm
it should be self.config.extra.bonus_chips
thats why its nil
give me 2 mins to write it up for you, hold on
Swap return woodscorechips with with the last end?
no the problem is not there
function received an improper reference to bonus chips value, and accepted nil instead
aka u put the wrong value that doesnt exist
alright it's not crashing now, though it's not updating the value whatsoever
loc_vars = function(self, info_queue, card)
return {vars = {count_wood() * card.ability.config.bonus_chips}}
end,
calculate = function(self, card, context)
if context.cardarea == G.play and context.main_scoring then
return {
chips = count_wood() * card.ability.config.bonus_chips
}
end
end
function count_wood()
local count = 0
for _, v in pairs(G.playing_cards) do
if v.config.center_key == 'm_ytf_wooden' then count = count + 1 end
end
return count
end
there you go
u didnt update loc_valc
js use what eremel posted
loc_vars and calculate go in the nehancement, the function underneath
oh hold on
it's an enhancment 2 secs
fixed
okay thank you, this works- though I had to replace card.ability.config.bonus_chips with self.config.extra.bonus_chips otherwise it'd crash
thanks for sticking through my complete lack of understanding with everything, been trying to learn an actual programming language for years now but nothing's ever stuck, so I'm hoping this mod is gonna be a project interesting enough to keep me in it until I understand
what the fuck am i doing
Anime by the looks of it
Yoasobi^^
All they did was the opening song of the anime
How can I make text appear above a card in hand when a joker ability triggers?
oh my bad, it should be card.ability.extra.bonus_chips, it's more correct to do it this way
ahhh I see, thanks
Hey everyone. I want to lead off with: I've never modded anything, or coded anything. I have a general idea of things pertaining to it, but I've never done it. However. My friend and I were joking about it one day, imagine if there was a post run screen, that shows how many blunders you've made, like on chess.com how it shows how many blunders you've made. So, I had chatgpt write a mod for it. I don't know how to implement that into a mod though, so I was wondering if someone here, could do that for me, if I were to send the code. Obviously I don't care for anything from it, or credit or anything. I had the idea but don't have the ability to carry it out, so I thought I'd ask y'all. I also don't know if the code is going to work 100%...
curious what even counts as a blunder
Not picking up a certain joker, not playing a specific hand that would've mathematically been better etc
Which of course not picking up a certain joker could be because you're going for a specific build
chess is a pretty straightforward (structurally) game that afaik makes it easy to calculate how "good" a move is, I don't know if blunders are really calculable for something like balatro?
So that could be potential for the mod to say you have more blunders. So could be potential for not ideal things, but could be interesting
I think they are in an aspect, I'm just unsure of how deep it really can be...
i'm not saying a total run analysis is impossible but would require a lot of work on the backend
I can send the code, because I honestly have like no idea what I'm looking at, but if someone wants to take a glance at it, they're more then welcome to lol
This is what I'm assuming the code is classifying as a blunder:
if (move.PlayedHandStrength < move.PossibleMaxHandStrength)
return "Played a weaker hand than possible.";
if (move.UsedJoker && move.JokerEffectiveness < 50)
return "Used a Joker inefficiently.";
return "Unknown blunder."
magic variables
if only
I'm curious, what are people's opinions on what new tarot cards in mods should be? minor arcana? making up new tarot cards? something else? I need to add new tarot cards so you can even access my enhancements outside packs but I'm sort of lost in regards to what they should actually be
i think first course of action for run analysis would be a way to define material/tempo
I can only assume that's some code terminology 😅
does anyone have a guide on patches? i see a lot of mods having them but i dont know how to make one, their function and basically the basics
I've thought about this a lil, we have strength, but a weakness card would be kinda nice. If you were early commiting to aces and find a trib, you wouldn't have to work so hard to rebuild around it...
the joke is that if everything was already defined it technically works but like, no idea where the numbers are coming from
I gotcha. So this may just be something that won't pan out at all? 😆😅
maybe one day but you'd need to build quite a big system for this
hi guys, I'm new here
I created a mod with a new seal and a new tarot that applies that seal to max 3 selected cards, but when I try to use the tarot the game crashes
This is the code for the new tarot, any advice?
I gotcha. Well I appreciate the feedback🫡
just a guess, but if those are modded seals then they should be seal_(your mod's prefix)_(the seal's key)
it would just be prefix_sealkey for seals i think
oh, i see
i'm trying both bepis and tone methods, see u later
in Mods/lovely/dump/ there's a dump of the modified game code that's being run when you launch the game
um
i'm not exactly sure how much you know already actually
literally nothing lol
oh ok
IT WORKS THANK YOU SO MUCH 
gg
thinking on this, it's probably not impossible to find nonstandard tarot decks that include extra major arcana cards, though at that point it's indifferent from making up your own tarot cards
I did this
itd be really nice if you can help me go through what patches can do, im practically new to this whole balatro modding scene :D
How do I separate my joker's name into multiple lines?
I don't like the way those letters being squeezed together.
there we go
I've spent the past week adding the friends vs friends cards to balatro
I just got done with the weapons yesterday
Hi again guys, second dilemma
I tried to create a new deck wich starts with 2 tarot cards called "The Sauce" (key = sauce) but when I start a game with it, it doesn't have any consumables and it crashes
Any advice?
@manic rune @royal ridge
If I remember right, you have to use events to add the consumables in the apply function of the deck
I could be wrong tho, it's been a while
you can have a look in card.lua, buncha interesting game code there (basegame joker calculates and stuff)
once you've found a place where you want to patch, you can make a (yourmod)/lovely/(filename).toml file beginning with the structure that goes something like
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0
(just open .toml files in notepad, no big deal)
then you can actually do a pattern match, the file will usually look something like
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0
# description of patch can go here, this patch makes spare trousers work on flushes instead of two pairs
[[patches]]
[patches.pattern]
target = 'card.lua'
pattern = '''if self.ability.name == 'Spare Trousers' and (next(context.poker_hands['Two Pair']) or next(context.poker_hands['Full House'])) and not context.blueprint then'''
position = 'at'
payload = '''if self.ability.name == 'Spare Trousers' and (next(context.poker_hands['Flush'])) and not context.blueprint then'''
match_indent = true
# square joker gives $4 when scaling
[[patches]]
[patches.pattern]
target = 'card.lua'
pattern = '''if self.ability.name == 'Square Joker' and #context.full_hand == 4 and not context.blueprint then'''
position = 'after'
payload = '''
ease_dollars(4)
G.GAME.dollar_buffer = (G.GAME.dollar_buffer or 0) + 4'''
match_indent = true
the line that is the focus is pattern. you can also put multiple lines here, but you shouldn't need to do that most of the time. note that a pattern match will match multiple lines if possible which can cause syntax errors and unexpected behaviour
target is card.lua, since that's the file which is being patched
payload is the stuff you want to inject/change, it can be pretty much anything
position can be either before, after, or at. at overwrites the code, while the other two are self-explanatory
forgot to reply lol
lmao
.
mmm, i think i got it now, thanks :D
yes I already read this doc and I found some example but none of them explains how to create a deck that starts with 2 consumables
im getting a crash from my mod but idk whats causing it
ill send the crash log in just a sec
px and py should be numbers not strings
ohhh
How can I make text appear above a card in hand when a joker ability triggers?
oh, its a table? thank you
its "cost", not "costs"
how would i go about storing a custom variable in a playing card?
i believe you store it in ability table
what i did for my mod is using context.other_card.ability["blah blah blah"]
oh i wasn't setting a new index i think that's why mine doesn't work
still makes an error huh
oh im using extra whoops
is there any way to quickly get all non modded vouchers so i could test my vouchers
How can I make my Joker shake and show a message when its ability triggers?
i think its message()
or its return()
does this increase the chances of a negative?
probably? the best way to know is to test lol
doed anyone know a good example of a modded joker that uses the functionality of matador? where a joker ability goes off when the boss blind "is activated"?
had issues with this before
well, im not sure if i refresh the mod it will apply the redeem effect twice upon the reload or if i need to buy it again
Matador isn’t a good example of a Joker that uses the functionality of Matador
Thunk has said they want to rework it
what would i need to do if i want to add more boxes in a joker's description?
ah yeah i can see that
damn guess depressed brother is gonna be disabled for a while then
What do you mean
Better swap depressed brother for something else ;P
like what Riv_Falcon did in their mod, you can see how their joker's description has 2 boxes
You probably need to hook or patch into the code that creates the boxes manipulate the UI nodes directly
An easy alternative would be to add boxes inside the white box
I don't understand why my message doesn't appear in-game.
damn, gotta learn about hook then 💀
thanks
You’re returning it to the Event Manager
The Event Manager doesn’t care
So, where should I return it?
Maybe in the body of the calculate function
ehy victin
do you know how to solve this?
I tried to create a new deck wich starts with 2 tarot cards called "The Sauce" (key = sauce) but when I start a game with it, it doesn't have any consumables and it crashes
how can i check if theres consumables in the shop
Idk I’ve never created a deck
Try iterating over the shop and checking
how do you check that, are you hooking on the SMODS hook? if not tell me which function, and to see whats in the shop you need to check the contents of G.shop_joker.cards
what do i need to do to have a joker working like blueprint?
found it on this
https://github.com/Steamodded/smods/wiki/Calculate-Functions
good to know ill keep that around
thingy works now i just need a sound effect, i think i can check the balatro files and use the same file name for it right
sick, what does the joker do?
the video explains it all
conceals your cards, the cards are given a random suit and rank but when played, they return to their original rank and suit
uhm, cool concept
could be a boss blind ability now that i think about it
would have been more like it
i got one of my vouchers to work
it's a joker ability due to the reference
where and how do you call the function this doc makes you create?
but it works perfectly
it does, good job on that
ive removed that part of the code but now im just trying to figure out how to make it call for it when the shop is rerolled/ first opened
i figured both of those out, let me show you, i just need to get my github repo
first load is not perfect
https://github.com/PILIX123/TwitchOverlay/blob/57e650c34b0554808a0af387a8adb12a490a4185/main.lua#L61
but this is for the reroll context
https://github.com/PILIX123/TwitchOverlay/blob/57e650c34b0554808a0af387a8adb12a490a4185/main.lua#L53
thanks
im gonna work on the art of my other vouchers and then work on it more
im trying to make consumables in the shop negatives
yea, part of a voucher mod im working on
very nice, hope we cross path again with more updates to our mods
I'm planning on making a small mod solely for handling these hover ui, but I haven't make it stable enough, hence not publishing it on github yet.
ah i see, it looked really nice so i wanted to do that too lol
i shoota da gun
That’s a nice offset sprite you’ve got there 😉
this SHOULD work like brainstorm except it uses the rightmost joker's effect, right?
How to make the offset sprite?
Thanks
https://streamable.com/35uoo8 somehow brainstorm works but my joker which should have the exact same function doesnt, and my joker can still copy vanilla jokers which is so weird 😭
I mean it doesn’t look like there’s anything to copy until you’ve added the brainstorm
it should add some variables to the cards in hand when i played a hand
but for some reason it just straight up disables the rightmost joker's function too
Can you show the code for both jokers?
its this one (rightmost joker)
this is the one with the copying function
i assumed its because of the "and not context.blueprint" which made the code not run, but brainstorm and blueprint still allowed it so idk whats going on 💀
Never thought I'd see star rail in balatro
been working on this for a few days or so lol
Nah that code should still run
Can you throw a print outside that event and see if it prints?
lemme see
istg am i doing smt wrong here 💀
i even tried copying blueprint's code once and slapped it on my joker, the same bug still happens
not related to your issue but that for loop is pretty unnecessary
and your check should compare against card not self
oh yeah i know, i was so desperate i tried copying Thinktank's code from Familiar to see if it works
though the problem still remains, which is that my modded jokers' effects r disabled if they have that "not context.blueprint" in the condition
If you remove the copying joker does it print?
yeah
😭 fr?
You need to set context.bluepritn back to nil
In your copying joker ^
im kinda lost here, where am i supposed to put that?
After you calculate the other joker
and you should set blueprint_card to nil too
just make sure to store the value before
👋
Hello! Using SMODS, is there an easy way to access stuff provided by another mod? I see SMODS.current_mod.* stuff, so I tried (specifically trying to use Pokermon stuff in mine) - SMODS.pokermon.config and SMODS.Pokermon.config but neither worked - I figured I should search out documentation/help rather than continuing to randomly stab at it at that point
SMODS.Mods['Pokermon']?
SMODS.Mods["Pokermon"]
awsome, thank you both!!! ❤️
And you don't need the [] or "
But as nothing was done for suit/ranks by SMODS itself, if I want a rank to also be considered a different one (Aces count as 10s, for example) w/ a Joker, do I hook or patch?
I say good luck lol
i remember cryptid OR ortalab (i cant remember) having a joker like that (all face cards are consider K, all number cards are considered 10s, something similar to that function)
that's cryptid
The game never goes in my
return {message = "Isekai'd",}
end```
and I'm confused as to why. Anything stupid I'm missing?
I see... How could I solve the problem, then?
from what I see only the code within your for loop after you define destroyed_cards should go in the event
Tho I just realized you're using that textkai variable to see if jokers_to_create is >= 1
Yeah. That's the point. The message should not appear if no joker is created.
then you could replace textkai == 1 with that, jokers_to_create > 0
and just get rid of it entirely
use SMODS.calculate_effect within your event
Gotta love when the simplest solution just doesn't appear in your brain... 😅
hi sorry to bother i am trying to create a joker similar to dna that create a negative copy if the first hand is a single card but can't get it to work , the error is that "full hand is a nill value"
you need to check the context too, when do you want it to happen
you want to check for if context.cardarea == G.jokers and context.before and G.GAME.current_round.hands_played == 0
if you don't narrow down the context, i believe it triggers when the hand isn't drawn, causing a crash
when the first played hand is a single card similar to dna
pretty sure dna triggers before
before i think
then use this
^
ok thx i will try this
thx
right so how would i add a custom enhancement to the info queue of a consumable?
info_queue[#1116390750314307698_queue + 1] = G.P_CENTERS.m_gold
but instead of m_gold you put m_prefix_id where prefix is your mod prefix and id is well, the id of your enhancement
yeah i figured
didn't think it would be as straight forward, oops
actually, speaking of info queue
how would i access the smods negative playing card info where it says +1 hand size
to be sure, is context.buying_card or context.selling_card relating to jokers
Any card.
okay, im probablt just gonna check this at the start of every blind then
i think you just check the set
same as above but G.P_CENTERS.e_negative
Oh wait
yeah
try e_negative_playing_card
Fivest five of a kind I've ever seen
that truly is a five of a kind of only one rank
do you guys think this Joker can be helpful
It would be better with hand types it can work with
Otherwise it’s just extra discard limit, which is fine
would you say its worth a joker slot
this is while I was testing and I thought it was funny lol
Yes
That’s pretty neat then, I’d say it’s worth it
Hey there yall, I am thinking about making a mod for Balatro but have never had any experience in the field beyond some very basic coding. Any advice, tips, or tools yall find especially useful? I can do the pixel art myself no sweat, but its the coding aspect thats a bit daunting
Start simple to get the hang of things then slowly work up to more complex effects. Make sure you read the wiki and don’t be afraid to ask questions if you need help, there are plenty of us who do know what we’re doing that are happy to help!
hey, how do i make sure other_joker gets assigned?
right now it is always turning out as nil when the joker is being sold
i copied blueprints code to select the joker to the right of this
== card not == self
Also why is the entire logic inside an event?
How does it work with full houses and 5 of a kinds?
cuz i was trying out stuff since it was not wanting to work
thanks tho
thanks! i appreciate it
sorry to bother again i feel like my conditions are close but wrong it never seems to enter inside the loop (trying to make a negative dna)
It picks the highest hand in the tier
Could you technically play an eight of a kind of all of your held in hand cards are aces?
What’s this for?
I know that it would count as a five of a kind but still
yes
scholar would be happy
same as before , i am trying to add a negative copy of a card to the deck, given that it is the only card played on the first hand (similar to dna)
can someone add coulrophobia mode for balatro
where every single instance of jimbos are replaced with cats
No like what object
Joker?
yes yes joker
Then remove the cardarea check
ok i will try
it probably has its uses
how do you add chips to a card, like hiker does?
hey guys, anyone has evere modded a deck in Balatro?
still hasn't
What’s the question?
I need to create a new deck that starts with 2 tarots that I created and a Joker
I did this, but when I start a game it crashes
Probably have to put the full id for the consumable
now the conditions are met (i enter the loop) but i am back to my previous error
Does anyone here know how to sort modded out on linux?
The joker still works as intended, but hovering over it gives this error. No other joker with info_queue breaks this way. I wonder if this is something I did?
I tried with the key and with the prefix_key version but none of them works
Try c_prefix_key
What's your loc_vars code
it works u are my goat
config = {consumables = {'c_ortalab_lot_barrel'}},
Something like this but with your key
for a vanilla joker? I didn't take ownership of it, so whatever's vanilla
Or rather, do you have any lovely patches, didn't notice it was a vanilla joker
I think they're just Smods. All the other mods I have sit on top of smods rather than using lovely
What’s your mod list?
IT WORKED
SMODS.Back({
key = "regazzi",
loc_txt = {
name = "Ragazzi Deck",
text = {
"Start with two {C:attention}sauce",
"and the joker {C:green}Pios Balls"
}
},
apply = function(self, back)
G.E_MANAGER:add_event(Event({
func = function()
for i = 1, 2 do
SMODS.add_card({
set = "Tarot"
})
end
return true
end
}))
end
})```
Here's how I added two random tarot cards
thank you so much guys ur pretious
huge
love from italy porcoddio!!!
dang you can put that in the config
never knew 😭
Red are mods I have but turned off. Yellow are my own mods and I did turn them off to look, but it still happens.
It very well could be one of those mods, I’m not aware of anyone else having this issue
Yeah you have a lot of mods, hard to pinpoint the culprit
Is there a font for Spectral/Tarot cards?
Or do I just gotta pixel-art something thats legible and nice?
using SMODS to disable them all and enable them one-at-a-time, it seems to be Tag Preview doing it
That was my guess
which I guess makes sense? This is the only joker that has info_queue relating to tags
yup, known issue
im trying to make a tag that spawns a custom joker, and im having problems. I spawned the tag with debug mode and at the next shop the joker appeared, but the game seemingly froze as the tag stayed and i couldn't interact with anything, but the music continued. Any idea why this is happening? (Also, how do I add a description to the tag?)
?
if context.type == "store_joker_create" then
local card = create_card("Joker", context.area, nil, nil, nil, nil, "j_gcbm_avo")
create_shop_card_ui(card, "Joker", context.area)
card.states.visible = false
tag:yep("+", G.C.RED, function()
card:start_materialize()
card:set_cost()
return true
end)
tag.triggered = true
return card
end
i got the basis for the code from someone else in here yesterday, so some of it may be wrong idk
You need the yep
that works
i just need tto know how to add a name and description for the tag
its just blank rn
also i put set_cost to 0 and the joker still costs 15
any idea why?
why did it send that bunny lol
card.ability.couponed = true in yep.
yeah that's crazy, I found it out from the source code of the game
and how do i add a name and description?
Same loc_txt structure.
k
ehy @wintry solar , do you know how to create a deck that starts with a joker?
Can this be pixel precise?
It’ll have to be in terms of the games coordinates
tried and didn't work
hmmm do you know the correspondence to 1 pixel
🤷♂️ dunno I just adjusted until it was where I wanted
Is it possible to add a new hand type through SMODS?
yup
I think?
I think I based it off self.T.w being 71 pixels
thx
oh looks like this isn't actually a thing and has to be done manually, shall I make it a thing that works instead?
I think it needs to be a lovely patch
Yeah I was thinking it could scale off the size it should have and the in-game one
every time I get a modded consumable from a booster pack, it adds itself twice?
one is invisible tho
oh wait I think I fixed it lmao
yeah it was be being clueless
@vagrant flax using jokers = {'key'} in your config on newest smods will work now
should someone add the information about config on decks to the wiki? seems like that would be helpful
how do i make it so that my booster pack has the consumable type be pulled into your consumable slot and not be used
what i mean is
i have a booster pack
and the cards inside it (besides all the placeholder joker guys) have a use button instead of a button that like adds to your consumables
oh I was just doing this
raevyn howw are you always doing what im trying to do-- 💀
literally a smarter version of me lol
so you're going to want to use the keep_on_use function and make that always return true
and then in your use function, at the end, add card:start_dissolve()
so it destroys itself when you actually use it
in the consumable, consumable type or booster
in the consumable
no problem
oh
that's not how to do it
it'll mess with usage counting for one
is there a way to access a card's key to index into G.P_CENTERS later?
unsure if it's an actual property of it or if i should make a patch that stores it
card.config.center_key
so how should we?

Does anyone know if it's possible to have a card and joker set only appear if you choose the deck for them?
sure you can
uhhh it's probably something we should handle on the smods side tbh
yeah ngl, thats a pretty essential feature
so should i just do raevyns suggestion for now?
So I win for now
Oh yeah I forgot to mention that
seems like an issue with your can_use function
just need to figure out the best way to enable it
Make can_use return true
I have all of mine all return true all the time
Which isn't good lma
Lmao
Rae's Scuffed Solutions™️
super scuffed 🤣
There's a state that's when a booster pack is open, I believe
G.STATES_SMODS_BOOSTER_OPENED, iirc
ok
I don't know if that's just for modded boosters tho
what did you do?
well this is a modded booster so EEEEEEEE
I've learned so much about modding from the project I'm working on
Mainly that debugging is hell
And holding the m key is a bit annoying
Shoutout to whoever made the LSP definitions for smods btw
ikr, it always types in my vs code
You're my hero
Wish there was a simple way to change the keybind
I think you can make your own keybinds with some code
Yea
this is the consumable ```
SMODS.Consumable {
key = 'skip',
set = 'unoc',
loc_txt = {
name = "Skip",
text = {"pluh"}
},
atlas = 'uno',
pos = {x = 0, y = 0},
keep_on_use = function(self, card)
return true
end,
use = function(self, card, area, copier)
card.start_dissolve()
end,
can_use = function(self, card)
return true
end
}
and then when i use the thing in a booster it decides to crash bc it indexed self
Well, you dissolve the card after you actually use it (also I believe it's card:start_dissolve())
so you have to have some kind of check to see if the card is being used in a booster pack
Here's some of my code
At the very end of the function is where the start_dissolve is
so smth like this?
SMODS.Consumable {
key = 'skip',
set = 'unoc',
loc_txt = {
name = "Skip",
text = {"pluh"}
},
atlas = 'uno',
pos = {x = 0, y = 0},
keep_on_use = function(self, card)
return true
end,
use = function(self, card, area, copier)
if G.STATE == G.STATES.SMODS_BOOSTER_OPENED then
return
else
card:start_dissolve()
end
end,
can_use = function(self, card)
return true
end
}
My goat
ok so i opened the pack and when i clicked use on it
it just disappeared LOL
i also need this for my mod
give it a yes_pool_flag and have the deck set it on game start
see gros michel and cavendish for the flag code and.... hmm, i can't think of a good example for the deck code
There we go, pushed. Use select_card = 'key of card area to save the card to' in your booster object
for example, select_card = 'consumeables' to save to the consumable slots
I also need this for ortalab so I'd have been doing it at some point anyway 🤣
when?
oh in the booster pack?
consumeables have a can_use function on them
is there a way to have the color of text in a description be variable? {C:#4#}#1#{} Joker doesnt work and neither does passing the whole thing as a loc_var work, like loc_vars = function() return {"{C:blue}Common{}"} end and then #1# Joker
you can define custom colours in loc_vars
i guess you're trying to add dynamic formatting
see colours in the return here https://github.com/Steamodded/smods/wiki/Localization#loc_vars
oohhh i see, thank you
if i wanna create the self destruct seal i need to learn how to trigger self destruct after scoring is finished
hey uh
i made kinda same concept but it does it at the end of the round
not every hand
yeah i want it to trigger after every hand scored
i guess i won't be much help for you but if you are interested https://github.com/Aikoyori/Balatro-Aikoyoris-Shenanigans/blob/7a55d3cc747206388bf65958e81c00dc26119358/modules/hooks.lua#L525
you can use the destroying_card context in that case
I think that’s context.after
Is select_card a string to the CardArea?
yes
ok
it wouldn't work referencing the cardarea directly
Wondering something... How can I get the number of cards currently held in hand?
#G.hand.cards
Do y'all think it's realistic for me to try to make a mod with very little experience, or should I start somewhere else?
uhh
yeah absolutely
modding this game is easy if you're not adding new mechanics or shit
as long as you're willing to read docs and stuff you should be fine
also balaui
https://www.balaui.dev it's pretty cool
shows you joker code format
but be warned, it likes putting variables as strings instead of integers, not a difficult fix tho
anyway
my sound is being distorted by the game
Thanks!
i knew the game changed sound files a bit but how do I reverse engineer it
to make the sound normal ingame
Finished these 2 cards, how they looking?
heres a better ss (idk why the first one was so small)
i forgot to show off the alabell card and seal sprites
Hi
Someone have some documentation about card_eval_status_text
i already created a additionnal script for implemt the "x_chips" and want to put a message when i multiply the x_chips
but dont rly understand the parameters about the fonction card_eval_status_text
I think Steamodded implements xChips no?
no
its only Talisman
But its okay i already implement it
the problem is with the card_eval_status_text
what do you mean by "newest mods"?
this may be the greatest joker ever
no. but it is cool
newest smods (also known as steamodded)
not currently but aure and I have mentioned adding it
Ohhhhh
and u know when its gonna be release
I don't even think they have decided whether to add it or not
talisman does iirc
'cause if its soon, maybe i can more focus on the other jokers and for this one juste w8 the implementation of xchips
but i dont want to made a dependency with talisman
it isn't hard to add though
i just want my mod can be launch without it
so if we do decide to it'd be pretty speedy
imo it steps a bit far from vanilla, and it;s functionally xmult in almost every circumstance
I only suggest adding it so people stop asking about how to add it 🤣
^chips\
something something xChips slippery slope
iirc it was also suggested to implement ^mult (and ^chips) so people can stop requiring talisman for those
(if people want ^^things they'll probably need talisman anyway :v)
^mult (and ^chips) seem too far for me but idk
I don't think we'd implement ^mult/chips
"slippery slope" and all that
They can require Talisman for those
esepcially since your going to be needing talisman for the higher scores anyways
I don't like xChips but I think it's ok for SMODS to add it as an API
/chips that always divides your chips into a smaller number
I think for the most part they only want ^Chips because Cryptid does it
that's just Mult
0.5x mult
I love <X1 mult
-1x mult
negative scoring is fun
oh yeah did playing cards accumulating mult and xmult hiker-style get added to smods or was that just put on the to do list
I don't think I like negative scoring
I think victin and lars are working on it
is there any documentation/template for specifically making tarot cards?
-# Lars has put in all the work so far, I need to stop procastinating 
thats fine take your time
-# jk I need it for ortalab hurry up pls
-# I was wondering if you had worked on it recently actually
yeah
wow that was quick! thx eremel, btw will i need to maneuver the change into old calc cuz i use old calc
no you just need to use new calc why are you using old calc
bc as i have heard not very much mods use new calc, i download mods too
bc people hate new calc
pretty much every mod but crytpid uses new calc at this point
and cryptid is being updated
Mika's Mod Collection?
ikd what that is
it has some decks and stuff
ill try switching then
mika's isnt even 1.0
huh, it just works
if we remove the compat layer it will just stop working
0.9.8 compat layer go brrrrrrrrrrr
ah ok
yeah I was about to say that's 10 months old
that's hilarious lmao
me finally giving in to the breaking change propaganda-- /j (about propaganda)
ok i just switched and guess what
a miracle
the game launched
i was expecting 40 errors to be thrown at me
so
yeah you should really be developing for new-calc anyway
you just might have a few calcs trigger more than once or not trigger depending on what they were
or some patches miss
is it a problem with the mods or the new calc
the mods
ok
The names people use here are interesting
lol
When is stupid meeting dumb*ss
bc i am #1 dumbass, its no secret
SMODS Cinematic Universe
LOL
a lot of mods used weird shortcuts that worked on old calc because only certain contexts got passed to certain items
better calc passes every context to every item so being insufficiently specific with contexts will have funky results now
some of the shortcuts were so weird I'm surprised they even worked under old calc
also 
ngl i have a slight feeling my jokers could be funnied by the new context stuff, though im sure its simple fix so
i just realized
NO
everytime i say "must be simple fix" it is 10x harder than i thought
WHAT HAVE I DONEEE
so I'm quite literally just starting working on something (I wrote out 50 Joker ideas and decided that's my current limit for ideas before I need to start making them), and I'm wondering what the 'key' it talks about here. I'm not familiar with this area of modding so I'm just wondering like, Mod name or something, should this be the same for every object, etc?
50 is an oddly large limit--
key is individual to each object, it's how the game refers to it
okay, good to know
ok eremel your new feature good
YAY
ty
yknow i just realized smth
im kinda stupid
why would i not let duplicates in a booster pack about uno 💀
a booster pack that has a sprite made to look like a deck too
Hey everyone im pretty new to modding but wanted to try doing some statistical analysis on bits of the game as a sort of a personal project. Where should i start in pulling things like game infomation like the hand a deck (probably with the end goal of giving it to Python)?
You probably would want to look into how the code works (https://github.com/Steamodded/smods/wiki/Your-First-Mod#useful-resources has some info on this). https://canary.discord.com/channels/1116389027176787968/1224730080056573972 may also be useful
the current hand is stored under G.hand iirc
or well the cards are in G.hand.cards
This is super helpful thank you!
I made a custom enhancement tarot card that works perfectly, except it doesn't do the card flip animation when converting to a different enhancement, what am I supposed to do for that?
(video example)
you need to add the flips in events before and after you change the ability
Hey yall, I have the json all set up for my face card reskins. how do i set up the lua file to make it work? i have been rummaging through the github wiki but i cant seem to figure it out
local percent = 1.15 - (i-0.999)/(#G.hand.highlighted-0.998)*0.3
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.15,
func = function()
G.hand.highlighted[i]:flip();
play_sound('card1', percent);
G.hand.highlighted[i]:juice_up(0.3, 0.3);
return true
end
}))
end
delay(0.2)```
*before* the code that converts to enhancement
```for i = 1, #G.hand.highlighted do --unflips cards
local percent = 0.85 + (i-0.999)/(#G.hand.highlighted-0.998)*0.3
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.15,
func = function()
G.hand.highlighted[i]:flip();
play_sound('tarot2', percent, 0.6);
G.hand.highlighted[i]:juice_up(0.3, 0.3);
return true
end
}))
end
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.2,
func = function()
G.hand:unhighlight_all();
return true
end })) --unselects cards
delay(0.5)```
*after* the code that converts to enhancement
you'll notice that the hierophant unselects the cards that you selected after converting them but your tarot does not
oh yeah, that too
thank you!
I wish there was more example code in the docs for how to achieve base behaviors like this
yeaa
the best documentation is really just the game source code lol
cryptid helps too, sometimes
I should take a look at that
doesn't seem to work
it won't let me reference outside locals during the take_ownership call
is there an example Joker somewhere so I have like a good guide for formatting and how to actually like, slot in functions and stuff?
https://github.com/Steamodded/examples/blob/master/Mods/ExampleJokersMod/ModdedVanilla.lua
this can help Somewhat
what exactly are you trying to do tho?
currently reading through things mostly but attempting to make a Joker that gains + 1 Mult for each scored face card, then obviously adds that when it gets scored itself
key = "placeholder",
loc_txt = {
name = "Placeholder",
text = {
"Text goes",
"here, on",
"{C:attention}multiple lines!{} by {C:mult}+#1#{}",
"{C:inactive}(Currently {C:mult}+#2#{C:inactive} Mult)"
}
},
config = { extra = { mult_add = 1, pool = 0 } },
rarity = 0,
blueprint_compat = true,
eternal_compat = true,
atlas = "jokers",
pos = { x = 0, y = 0 },
cost = 4,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.mult_add, card.ability.extra.pool } }
end,
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play and not SMODS.has_no_rank(context.other_card) then
if context.other_card:is_face() then
card.ability.extra.pool + card.ability.extra.pool + card.ability.extra.mult_add
return {
extra = { message = localize('k_upgrade_ex'), colour = G.C.MULT },
colour = G.C.MULT,
card = card
}
elseif context.joker_main then
return {
message = localize { type = "variable", key = "a_mult", vars = { card.ability.extra.pool } },
mult_mod = card.ability.extra.pool
}
end
end
}
heres what should do exactly that
breakdown!
key is the key of the joker, in case you want to check for it later or something
loc_txt is the name and description
config is where you can store variables and the like, so for example mult_add is how much mult it will add to itself when a face card scores, and pool is what it sounds like - a pool of all the mult to add
rarity is whether its common, uncommon, rare, legendary which are 0, 1, 2, 3 respectively
blueprint_compat means it can be cloned with blueprint or brainstorm, eternal_compat means it can have the eternal sticker
atlas and pos are to do with the sprite - i can explain those separately if you want
cost is how much it costs in balatro bux
loc_vars is how you return variables to the description field, so you can use #n# to display them, where N is their order in the array you return
the description there shows +1 (mult_add) highlighted with {C:mult}{} so it will show in the red text
And then the line below that shows how much mult it would currently be adding, like how Runner does with chips
i would reccomend using localization files
this should be 1, 2, 3, 4
how easy would it be to make extra booster packs spawn
have i misremembered
i might have misremembered im tired lol
see booster joker from cryptid
using a deck, specifically
ok
i still cant figure out how to use loc_vars with these
but anyway
loc_vars is the same as it is with loc_txt
And finally calculate is where everything actually happens! you can read more about the various things it can do here:
https://github.com/Steamodded/smods/wiki/Guide-‐-Joker-Calculation
but for our purposes, we only need two contexts.
the first makes sure that what's currently happening is that cards are being played, then checks if the card is a face card, and if it is, increases the joker's pool count by one.
then later, it checks for context.joker_main which means that jokers are adding chips/mult/xmult etc etc, and adds the mult from its pool!
sorry if this was a lot
thats the old guide
Oh, and in regards to formatting, is using the tab key instead of a bunch of spaces acceptable?
I have not touched lua I do not know what breaks it
look i am linking to what i was given
cause it works
bits of it might work, but bits of it are wrong now
this is the updated one
heya! so I'm trying to make a Joker that adds +1 free Reroll every time you go through a shop without rerolling, and it works mostly as intended, but there's one major bug that I only realized after discussing in the Cryptid server
if you have only one of these jokers, it works perfectly as intended. but if you have two of them, and you reroll, the value is subtracted from both rather than from just one
is there any way around this? besides swapping to using D6 Tags rather than a native free reroll function 
remove = function(self, card, from_debuff)
G.GAME.current_round.free_rerolls = G.GAME.current_round.free_rerolls - card.ability.extra.reroll_total
calculate_reroll_cost(true)
end,
calculate = function(self, card, context)
if context.setting_blind and not context.blueprint then
card.ability.extra.win_reroll = true
G.GAME.current_round.free_rerolls = G.GAME.current_round.free_rerolls + card.ability.extra.reroll_total
calculate_reroll_cost(true)
end
if context.reroll_shop and card.ability.extra.reroll_total == 0 then
card.ability.extra.win_reroll = false
return {
play_sound('tarot2', 1, 0.4),
message = localize('k_nope_ex')
}
end
if context.reroll_shop and card.ability.extra.reroll_total ~= 0 then
card.ability.extra.win_reroll = false
card.ability.extra.reroll_total = card.ability.extra.reroll_total - 1
end
if context.ending_shop and card.ability.extra.reroll_total < card.ability.extra.reroll_max and card.ability.extra.win_reroll then
card.ability.extra.reroll_total = card.ability.extra.reroll_total + 1
return {
message = localize('k_upgrade_ex')
}
end
end```
and here's the config if you need it
config = { extra = {reroll_bonus = 1, reroll_total = 0, reroll_max = 10, win_reroll = true}},
loc_vars = function(self, info_queue, card)
return {vars = {card.ability.extra.reroll_bonus, card.ability.extra.reroll_max, card.ability.extra.reroll_total}}
end,```
ok where can i find the lovely patch that adds the extra booster pack slots that cryptid adds
search the repo for G.GAME.modifiers.cry_booster_packs
So if I have this right
SMODS.Joker{
key = 'princess',
loc_txt = {
name = "Princess",
text = {
"Gains {C:mult}+1{} Mult for each",
"scored face card",
"{C:inactive}(Currently {C:mult}+#0#{C:inactive} Mult)"
}
},
rarity = 1,
discovered = true,
cost = 4,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = false,
atlas = "Princess",
pos = { x = 0, y = 0 },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.mult_add, card.ability.extra.pool } }
end,
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play and not SMODS.has_no_rank(context.other_card) then
if context.other_card:is_face() then
card.ability.extra.pool + card.ability.extra.pool + card.ability.extra.mult_add
return {
extra = { message = localize('k_upgrade_ex'), colour = G.C.MULT },
colour = G.C.MULT,
card = card
}
elseif context.joker_main then
return {
message = localize { type = "variable", key = "a_mult", vars = { card.ability.extra.pool } },
mult_mod = card.ability.extra.pool
}
end
end
}
this should be functional so long as the files are all properly organized?
yeah should work fine!