#💻・modding-dev
1 messages · Page 138 of 1
can jokers detect if there are more jokers from the same mod?
youd probably have to add a way to detect it within each joker
how can you edit the weight values of vanilla rarities
I can't seem to find where the weights are set at all
ok so whats up with cryptid's old blueprint setting it up the same way
probably loop through jokers and see which one is from your mod
difference is other_joker is always being set
mmm
unlike with your code where its only being set when blind is selected
ok
lol I found balatro's drm
it's so simple but funny
if it can't detect steam running it just closes lol
--Steam integration
if G.SOUND_MANAGER then G.SOUND_MANAGER.channel:push({type = 'stop'}) end
if G.STEAM then G.STEAM:shutdown() end
end```
That's def indie game dev levels of drm
I love it
it's just the default steam drm + a love wrapper afaik
love.event.quit()
end```
it's in a line a code checking for steam
The game controllerdb.txt is funny to
has a list of random ass controllers
like the wii classic controller
even has support for street fighter joystick controllers
LOL
so real quick, if i set up local other_joker within an if statement itll stay in that if statement right?
just a sanity check
yes
ok
if true then
local var = "defined"
if true and true then
-- var is still defined
end
-- var is still defined
end
-- var is no longer defined
yeah
Daily reminder for everyone wants their mod on the Balatro Mod Manager:
https://github.com/skyline69/balatro-mod-index
hey guys, i'm wondering how do i change the reward of a blind ? (make it give more or less money)
does it install dependancies
wdym?
can you just not edit the vanilla rarities using take_ownership like jokers and stuff
if you install a mod that has dependancies, does the mod manager download said dependancies
(ex. talisman)
i just changed how my card works
Oh, no. Currently that only counts for steamodded. But you can add a big sign in the description and I think it's clear then
@elder vapor Btw your mod is already on the mod manager I think
skyline, will i be able to add later when i am done with mod that i be happy about?
also @elder vapor, so many stickers can be applied to one card?
if so, how do they look like stacked?
like, what sticker has priority to be placed ontop
Does anyone have a recommendation for where I can learn more about modding balatro? I'm currently running through the Lua documentation, so any other pointers would be appreciated!
yeah i sent a PR yesterday, i'll have to update the mod description
for my mod i make it so you can only have 1 gemstone applied at a time
Any time you want!
alrighty thanks mate
i see
and you have seperated page for gemstones or they use the sticker ones?
Actually the goat for this
published my mod 
Will I have to do Lovely stuff to change the rarity function for vanilla rarities or does SMOD have a function that can modify them I tried take_ownership but it doesn't seem to work on them, probably because the way they are coded, I assume you can edit the pool midgame because I've seen other modded jokers do it
Ok the release of my mod did not go so well
Releases happen to go that way yes
do you have ur assets and shader shit
It was a faulty line of code in steamodded, but Eremel fixed it. Just use
return {
remove = true
}
end```
Is there a way to save a config from a mod?
chat how do i make a deck skin with deckskins lite; wanted to try it out
my texture pack finnaly compleated, yippie
anyone know how i could make a patch to save the last played consumable's key? i already have a variable made for it to be saved in, but im not sure how to do the patching stuff.
also is there a function for creating a card with its key?
What file are the vanilla jokers located in?
Not the sprites but the objects themselves
game.lua for data like cost, rarity, config values and whatnot, card.lua for the code for effects, localization folder for descriptions
So are specific functions also located in game.lua
how can i check if a voucher is used or not
Wdym
i have a a joker which spawns a custom consumable but i want it to work only after redeeming the set voucher
HOW DID THIS HAPPEN
.
is the deck at the bottom right of the screen during normal play a Moveable object? how would i access a reference to it?
i think you can hook Card:use_consumeable and set the variable right after it, without needing a lovely patch
hook?
something like
huh. i had no idea this was a thing. I thought that could only be done with Game.init_game_object()
lemme try that
It can be done with any function. That's the cool thing about hooks
i thought i knew alot about lua, but it seems theres alot of stuff i havent learned...
dw this is something I learned recently too lol
hihi! i've had two ideas for Modern Art, and would like to see which one you guys prefer :D
(Common): +20 Mult if played hand contains exactly one distinct rank
(Uncommon): ×2 Mult if played hand contains exactly one distinct rank
You can do hooks in any language
ah wait, just realising that the condition is a more lenient Half Joker :P
Speaking of hooks and stuff btw, has Steamodded/Lovely updated to allow patching into Steamodded yet?
what's one distinct rank
at most one rank then?
not quite
i didn't think of that when i read "one distinct rank"
that implies you can only play a high card
one distinct rank, but there are five ranks there (just, they're all the same)
No there's one rank
there's five of the same rank, but one distinct rank
i think the second one is nice.
I think most people would interpret 5OAK as one rank
and get confused by "distinct"
and though think it needs two ranks
what is a "distict rank"?
What do you think it is?
Let's go full house
Yeah that's where I'm getting lost too. The term "distinct rank" seems to not be well defined
okay i've found out that KTaNE terminology doesn't carry over to Balatro :>
What's that
is there a difference between Card.ability.name and the key of a card?
Keep Talking and Nobody Explodes, my primary mod outlet
okay i have a middleground
i'll be taking the second ability of the two
Let's use the default Joker as an example. Its name is "Joker" and its key is j_joker
I think that looking at ranks, you look at the set of ranks, not a tuple
is the prefix j for joker?
"if all played cards have the sane rank"
yep, that one :D
Yes and that's the standard
(Uncommon): ×2 Mult if all played cards have the same rank
Looks fun for pairs
thanks ^^
i see. How can i access the key of a card? is it just a simple variable like Card.key?
so would 9 9 9 9 7 not work since the 7 is a different rank that is being played but not scored?
oke
so.... what makes people take it over the 3 rares from vanilla?
Pair(x2), Thriple(x3), Quad(x4)
Depends if they check scoring_hand or g.play.cards
well i'm asking for the intent
though again, it's a looser version of Half Joker, so i kind of want to change it a bit
It's a bit more involved. You'd want Card.config.center.key
ooh i'll sit on Modern Art for a bit, because i have an idea for Sketch!
(Rare): All played, unscored cards give ×1.5 Mult
Does that only effect unscored cards? The comma looks confusing
mhm
the ones that dont score
example: playing high card with 5 cards, makes it trigger 4 times
I don't think it needs it
hokai i'll revert
It's a rough first try, but does this look... decent enough?
"All played cards" is probably enough
ya, looks good!! though consider changing the fill colour of the text
no, but that would trigger on all cards
which is different, and broken :>
isnt xmult 7,5 too much?
Ah ok the wording confused me
All played + unscored cards seems to include both
ya, it works the same way that Green seal does
(speaking of which, lemme check how it words itself)
Green Seal?
all played cards give x1.5 mult if not part of poker hand
^?
does it include debuffed cards?
I think
Played cards that don't score give x!.5 Mult
no
hey i can answer the question myself :>
debuffed cards dont even count as unscored/scored
it just skips its calculation
but no, Jokers usually don't do anything with Debuffed cards
"Unscored cards give x1.5" works
Ah I see we've devolved into lingustics 
need to be faster :3
all cards held in hand aren't scored
C'mon 😆
again, i'm asking for intent and not implementation
lemme rephrase it then :>
ping me if you know anything or i might not see it 🙏
Splash says "each played card" but doesn't count debuffed cards either
debuffed is a debuffed
(Rare): Unscoring played cards each give ×1.5 Mult
wont give effects
First card ever to have anti synergy with splash
LMAO
:D
well the intent of splash might be different from the intent of a modded joker. again, i'm just asking a clarifying question to the person who is coming up with the concept
wave! debuffed cards don't count
in the same way that Triboulet doesn't see debuffed Kings
Is there a better rundown of what exactly the patchers job is and when I should be using it
i did receive an answer to my query
Its main use is to modify the source code at runtime
The one on the git is kinda weird to follow, and either I missed what I'm looking for or its not there
So you specify a pattern to look for, where you want your code to go (before, after or at (to replace the pattern)), and what the new code will be
Got it
Also stupid question, which mod folder am I supposed to be working out of lol
Okay so i got some hooks that should be saving the used consumable to a variable (As long as its not a fool or revenant card)
local init_game_object_ref = Game.init_game_object
function Game:init_game_object()
local ret = init_game_object_ref(self)
ret.last_consumable = nil
return ret
end
local use_consumeable_ref = Card.use_consumeable
Card.use_consumeable = function(self, area, copier)
use_consumeable_ref(self)
local card_key = self.config.center.key
if card_key ~= "c_fool" and card_key ~= "rev_revenant" then
G.GAME.last_consumable = card_key
end
end
I think thats the right key names.
Now i gotta make my revenant card create a negative copy of this card using that key. anyone know how i can do this? This is what i have so far
SMODS.Consumable {
key = "revenant",
set = "Spectral",
loc_txt = {
name = "Revenant",
text = {
"Creates a negative copy of {C:attention}1{} random",
"{C:attention}joker{} card that has been destroyed"
}
},
can_use = function(self, card)
return G.GAME.last_consumable ~= nil
end,
use = function(self, card, area, copier)
--Make negative copy of consumable with the key of G.GAME.last_consumable
end
}
ignore the card description
You just create a lovely.toml in your mod folder
The one you create within the big Mods folder
So the Steamodded one?
The common one
yeah
Got it
👍
if G.GAME.last_consumable then
SMODS.add_card({ area = G.consumeables, key = G.GAME.last_consumable, edition = 'e_negative' })
end
- I'm pretty sure that in lua setting a key to
niljust removes the key from the table so the first hook isn't needed - It looks like you forgot to give some arguments to
use_consumeable_ref(self)? - Aure just gave the code you asked for
ahh right. Ill remove that nil thing and put in the arguments
and the code seems to work right
except i think i might be using the wrong keys in the second hook
my card created another copy of itself
is there a context for cards that don't score?
hey guys i have a question, i want to change the blind reward to make it able to show negative dollars and i don't really know how to do that except using the collection_loc_vars function. can someone please help me with that ? thx
Don't think so, you can add your logic near Splash
does it not work by just putting negative dollars?
hmm, this seems hard to implement — i'm gonna change the ability slightly
it works, i get the negative dollars but it doesn't appear in the collection nor in game (i'm gonna take some screenshots)
yes
Gives X0.5 Mult for each played card that doesn't score
no idea why this isnt working, the key in the consumable is "revenant" and the mod prefix is "rev" and ive tried both "rev_revenant" and "revenant" by its self. anyone know why this is?
it's the same context for cards that score
the cards just aren't in the scoring hand
oh okay!
(took all the screenshots possible)
But for them to give x1.5 mult wouldn't they need to score?
see how Steamodded makes negative dollars show up at the end of round and adapt it
okay i'm gonna check that
"Gains X.01 Mult for each scored Diamond.
Currently X1 Mult
How would I fix this? Right now I have it if *all scored cards are Diamonds
calculate = function(self, card, context)
if not card.debuff then
-- Upgrade the Joker when hand is played
if context.before and not (context.individual or context.repetition) and not context.blueprint then
for i = 1, #context.scoring_hand do
if context.scoring_hand[i].ability.name ~= "Wild Card" then
if context.scoring_hand[i]:is_suit("Diamonds") then
return
end
end
end
Easy
#G.play.cards - #context.scoring_hand
yepyep! on it :D
But you could still try with the previous idea
Man, I do not miss seeing lua
Anyone know how i can make a description similar to The Fool? with the little text that shows the name and then the description of that card on the side?
what's the bonus card enhancement called? is it just self.ability.bonus?
to add on to this question, i also want to know what color you use for negative text. oh and spectral and tarot card names colors
Yes
It’s all in loc_vars
weird bug, the xmult box appears, but does nothing and is blank
The wiki gives the signature
code:
calculate = function(self, card, context)
if context.joker_main and #G.play.cards > #context.scoring_hand then
return {
x_mult = 1 + (card.ability.extra.xmult * (#G.play.cards - #context.scoring_hand)),
colour = G.C.RED,
card = self
}
end
end```
Probably the wrong variable name
xmult? Xmult? xmult_mod?
To have an info box with another object’s information you add the respective center to the end of the info_queue
config = { extra = { xmult = 1.5 } },
Not there
Here
also i forgot to change it to something else but ignore that :D
Xmult_mod or x_mult_mod
The game uses both it's confusing
weird. Ghost works fine with x_mult
x_mult = Xmult
moment
nevermind! i'm wrong :>
turns out it's Xmult_mod
but the weird thing is, Goldor works with it
To have something like the Fool you can assign to main_end
return {
dollars = card.ability.extra.money,
x_mult = card.ability.extra.xmult,
colour = G.C.RED,
card = self
}```
still need help here, dunno how to check for vouchers
And the color is dark_edition
alright so even stranger
@viscid bough
the xmult is being applied, but no message, still
oh i. i'm a moron :>
there's no message :>>>
ive got this:
loc_txt = {
name = "Revenant",
text = {
"Creates a {C:dark_edition}negative{} copy",
"of last played {C:attention}consumable{} card",
"{S:0.5,C:tarot}The Fool{S:0.5} and {S:0.5,C:spectral}Revenant{S:0.5} excluded"
}
},
and it seems to be working except for the attempt at changing size. Also, when you said main_end did you mean the little text at the bottom that says None if nothing was used or the cards name if there was something used?
Im not sure how to set the text of main_end to be the name of the card if i only have the key
let alone make it red if nothing was used
Hello someone know how can debug joker, like i want to print some values in console or something just for seeing, i talk about values of variables
s not S
and i've an other question what is the difference about center and card
'cause at some places, i put card for card.ability.extra.(....) for exemple and other i need to put center
i dont understand why
thanks in advance 
Center is like a prototype; card is the card you see in-game
but in this example, i dont understand why they use card. and not center cause the value of repetition its on center
The card was prototyped with the center
So it has a copy of the data
ohhhh okay, i understand better
this, but the way it's implemented makes it so much more confusing than it has to be
and for debug, you know where and how i can print the variables values in the console
ooh new idea for Modern Art
like i juste want to see if my code passed a if
Gives $5 if Blind is defeated in one Hand
an example
you can use sendDebugMessage etc, see https://github.com/Steamodded/smods/wiki/Logging
how can i add to the info_queue by getting the info from the consumable key?
ty you helped me so much
something like this
Okay, I got an odd question:
Let's say I have ModA with
local Test = --Code--
and i want ModB to reference that local variable. How do I do that?
crap
the entire point of local is to prevent that from happening
well there goes my idea i had, scrapping it now
well at least it didn't crash
but idk if a bonus card is a good joker
@tepid crow hola. so how would you go about adding those effects mid-game?
right so my first thought is to go through the list of backs currently in the game (I think G.P_CENTER_POOLS.Back works? double check if that works for modded decks), and randomly picking one of them
what you would then do is call that deck's :apply_to_run (or :apply in case of modded decks I think?), and store a copy of that deck's :trigger_effect so you can call it each time your deck's trigger_effect (I think it's calculate in new smods?) is called
make sure to store the decks you've "copied" in a table somewhere and you reload it with :load when the player continues the run
does that make any sense? 🤔
yeah
actually you don't need that last part, just can store the key of the decks you've "copied" in your back's config.extra and then find them again using the list of backs currently in the game
no need for :load
good luck! let me know if you have something working? 😄
Reverse engineering is rough
but man, is it satisfying to get it working
reverse engineering?
Trying to figure out how it works
I haven't done lua in a while so i wanted to figure out how Midas Mask changes played cards before scoring
and if there's already a vanilla function to change enhancements and if it'll work for played hands
yeah i'm dumb, wiki does straight up outline how to do that
lmao nice job anyways
Is there anything special I need to do to make it appear in the shop? I assume yes
Make what appear in the shop
a modded joker
Not if you used Steamodded
sick
anyone got some ideas for what the art could be?
skull of some sort right?
some kind of grave, resurrection theme
...could take it literally and take a Doom I & II Revanant sprite, cyanotype it and then, after conforming the palette to the one spectral use, use a part of the result in there. Though, I did briefly imagine it being animated too. 😂
ultrakill skull
Tombstone with a hand coming out of it?
@hidden timber i wanted to ask a question about installing mods using your mod manager, if a mod requires a dependency like DeckSkinsLite, how would it be installed? would I have to format my folders on github to look like this?
Mod_Name/DeckSkinsLite/assets/1x
(something similar with the skins folder as well)
I'm looking in jokers.png but cannot find the Wee Joker. is it a special case? I wanted to make a few jokers that size
coded to be small it seems
Temporarly, just mention it in the description & you can also add the dependency to the mod manager too
So would i have to include an installation guide?
guide is a better word
No, just say, that you need the DeckSkinsLite mod for the mod
okay, but there's the official size. 0.7x of the normal size
the thing is i would need to install the contents of my mod inside of the deckskinslite folder. is there anyway to automate that?
im guessing not at the moment

Oh I see, why would you do that?
making it an easy install via the modmanager
so installing the mod would just put the assets in the asset folder and the lua file in the skins folder
No, I mean, why do you install the contents of the mod inside the deckskinslite folder?
Why not make a seperate mod?
well my mod only changes one suit at the moment
and deckskinslite basically integrates the selection of skins via the already built in "customize deck" button
steamodded has that built in though, deck skins lite just wraps the steamodded api
forgive me, im not really experienced in any of this lol
i kinda just started a texture pack for balatro because I love the game and really wanted to see a luigi's picture poker texture pack made
Hey so calculate doesn't accept args as a context how would I do the whole if args.context == "eval" thing with calculate
Would it just be like if eval
This is tags or deck effects?
deck effects
Deck effects should pass if args.context == "eval" just fine... Though, from what I can assume, in your case, it does not.
Yeah you need to do that for trigger_effect
Wait does trigger_effect still work or has it been like completely removed?
Because in the wiki it just says it's depreciated
Okay I just tried it seems to not work
-# (we have a thread)
EVERYONE CAN SEE IT
-# (everyone)
trigger_effect should be replaced by calculate because under better calc, it functions like any calculate function. trigger_effect can still be used but has different arguments
it still gets passed the base game args that trigger_effect normally gets, when they happen
Gotcha
I don't think I need to use args anyway I can just use context.end_of_round
Okay one more quick q how can you tell what booster pack you skip
Like I wanna have a different effect if a mega pack is skipped
doot
how do I get the contents of the played hand? Not the scoring hand, the played hand?
Shit wrong modding chat mb!
context.full_hand
is that without the #?
# gets the number of keys in a table
This doesn't work
Here's the crash
SMODS.OPENED_BOOSTER has the card of the booster pack iirc
Is there a mod template that just has, like, the files I need and stuff?
Not really. Each joker you make is going to end up being pretty much bespoke, but chances are they will fall in line with jokers that were either made examples of, or whose code is easily readable in the game's OG files. I've been told some examples are out of date but I will again point in the direction of the example mods for Steamodded, where at least the ExampleJokers mod helped me out. https://github.com/Steamodded/examples
trying to make a joker that finds the highest value card and turns it into a stone card and I really am not sure what to do here. I went after Raised Fist's code to model after, just filp it in reverse, and the iterative loop works but I have no idea how to iron out the second half of the card's function that actually turns the card into stone. "The Tower" tarot card has no documentation I could find. At the same time I've debugged this and "if raised_card == context.other_card" won't even run. Any pointers?
the code not running would be due to context.other_card not existing here
oh brother i had wondered
print('Final value of highest card: ', temp_ID)
if raised_card.debuff then
return { ... } -- debuff return table, too lazy to type it out
end
print('Something will happen here')
raised_card:set_ability(G.P_CENTERS.m_stone) -- there's some other code you may put around this for it to look nice, such as flipping the card. but that's not needed to get it working
i need to figure out card flipping, great idea
wow dude thank you so much
as for not finding anything about the tower, the code for using it indeed doesn't mention it by name
we could have some consumables in ModdedVanilla
ended up with this. Im not very good at this art stuff, but its good enough for now.
okay, so now I have a card animating the flip over to show that it is promoting, but it only flips face down? It doesn't finish the animation to show that it's now a queen
repeat the flip afterwards?
yes
king having affairs 😳
Is there a way to make a sound happen when a Joker is triggered?
Not constantly when you have the Joker
Just when it is used
i believe Cardsauce does that, so yes, but im not sure how
is cardsauce a joker or a mod
idk what that means
but do you happen to know which Joker it is
OH
Is it the Luigi looking one?
wouldn't it just be putting the play sound command in the trigger part?
going off of seltzer
is SMODS.Center directly creates center but not recommended to use?
if you are creating custom type of center, then it might be plausible to use
turn on show file extensions
im trying to set the enhancement for a card but not visually show it till later. I tried set_sprites but it does nothing. as a test i even tried straight up setting the center to a new sprite and it still looks like the enhancement, so theres probably something somewhere setting the centers sprite itself. any ideas?
yall ever get a really absurd mod idea thats way too hard to make but still a fun idea ?
maybe not hard but .a task
yes
I've been trying to get a gameboy emulator to run in Balatro
anyone up to do a quick art review? i think im overthinking it
i can!
trying to make this look like a lightbox
wait i forgot a layer or two one sec
my refernce
yeah that looks really good
anybody able to help me with this? still not figured it out
im basically gonna make a hearts/diamonds vers of blackboard for my suit based pack
twelve souls and ortalab have both already done this
jesus good luck
is there a way to check if the most played hand is discarded?
not specifically, but you can check which played hand is discarded (burnt joker) and also check what the most played hand is
how to access card.ability.extra while the game loads from saved run?
also, how do i see the code of vanilla jokers? I keep seeing people say you're able to but I never know where to look
extract balatro.exe as a zip
has anyone else had the problem where text added to playing card descriptions doesnt work on specifically modded enhancements?
im trying to modernize my old code for various things and the permamult and suit level tooltips both fail to apply to the description if it is a modded enhancement; cards without enhancements and those with vanilla enhancements are fine
ive been trying to read through the related code as for why modded enhancements are treated separately for this and i just cant find it and its driving me nuts aaa
Does anybody have any ideas as to why these atlases aren't loading, and my jokers are instead appearing as Joker? (the coloration just means if they've been added to git or not, ignore it)
how come its highlighted red in 2x
because I haven't added it to my git repository yet
how to access card.ability.extra while the game loads from saved run?
check the content of the 2x images
you may need to register them with :register()
the functional atlases I have in another file use the period so
:register() is deprecated, no?
also, the syntaxc is
SMODS.Atlas({ stuff })
(yes but no, you don't need the brackets)
something something implied call if only argument is table?
yes
and yeah the 2x file is just an upscaled version of the 1x file
is your joker set to the atlas
oh do you know if the atlases are being properly registered?
I have no idea how to check
how to access card.ability.extra while the game loads from saved run?
ive got a joker thats supposed to have a 1 in 4 chance to duplicate consumables on use, but nothing is happening when i use cosumables. No message shows up or anything.
SMODS.Joker {
key = "recycle",
loc_txt = {
name = "Recycle",
text = {
"{C:green}#1# in #2#{} for {C:attention}consumables{}",
"to be duplicated on use"
}
},
config = { extra = { odds = 4 } },
loc_vars = function(self, info_queue, card)
return { vars = { G.GAME.probabilities.normal or 1, card.ability.extra.odds } }
end,
rarity = 2,
atlas = "Jokers",
pos = { x = 0, y = 0 },
blueprint_compat = false,
calculate = function(self, card, context)
if context.using_consumable then
if pseudorandom("reduce reuse recycle") < G.GAME.probabilities.normal / card.ability.extra.odds then
SMODS.add_card({ area = G.consumeables, key = context.consumable.config.center.key })
return {
message = "RECYCLED!",
colour = G.C.GREEN
}
else
return {
message = "TRASH!",
colour = G.C.RED
}
end
end
end
}
think so yea
card.ability.extra? it shouldn't be any different
load = function(self, card, card_table, other_card)
card.ability.extra.kado = card -- no-cloning theorem fix
end,
do you know if card is actually a card
can anyone help me figure out the issue with this? it happens on card click after a run is loaded in
current mod list
anyone have any idea whats wrong with this?
the game loads the card and it treats as cloned card instead of genuine card
because of cyclic reference i have to overwrite/hook game's copy_table function to prevent cyclic reference
idk
how would I go about doing this anyway
remember that atlas coordinates are 0-indexed
both 1, 2 and 2, 1 in my atlas have sprites
and from my prior efforts, I know that if you point to an element of the atlas that's just transparent pixels
you just get an invisible thing
i get that far but I don't know where to look after that
and no the variants are not duplicates of card it's a real variant that changes no gameplay elements whatsoever
Anyone able to help me figure out why this Joker isn't working?
It's supposed to play a sound when it triggers
It claims the sound doesn't exist
did you prepend your prefix?
did I what
this is because you might downloaded wav file instead of ogg file
then prepend your prefix
what does that mean
--- STEAMODDED HEADER
--- MOD_NAME: HandPlus
--- MOD_ID: gerio_handplus
--- PREFIX: geriohp
--- MOD_AUTHOR: [GerioSB]
--- MOD_DESCRIPTION: Creates Extra Hand Types.
----------------------------------------------
------------MOD CODE -------------------------
ah
where do i attach this prefix
in the key or the path
or the sound in the joker part
did you have a prefix in header?
it's in .json
upload so i can see what's going on
it's supposed to be
return {
mult_mod = card.ability.extra.mult,
message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } },
sound = "mvan_jokerbabysound", volume = volume, pitch = pitch
}
does always_scores = true on enhancements just not work? both my enhancement and the one from ortalab using this don't score when played alongside other stuff like stone cards do
So what kind of variation are we talking about?
Like, which part is shared and which part diverges?
it's just a atlas and position replacement, nothing else is used
OK so sprites are different. What part/trait/function do they share in common with each other?
all of them
So you want a bunch of jokers, while having different sprites, act exactly like each other.
no 1 joker different sprite function same
Isn't there like seven of them?
look at this
And I seem to forgot, your current question is?
1 joker different sprite function same
Can you, like, rephrase your sentence, with Grammarly if possible? English is not exactly my native/first language.
there is just 1 joker that functions same while having different design
And depend on what circumstances does it have different design?
40% chance
can anyone nudge me in the right direction? I have an idea but idk if it'll work
Check Burnt Joker and Obelisk.
How many variations of them do you want to see your mod displaying in Collection pages?
i didn't coded in
it's a simple sprite replacement
wdym "didn't coded in"
all
I don't think this is a proper timing to reply "Yes" to my question of "How many".
In the code he shared earlier there's 7 variants, so technically it's a good answer
7 or 8
wait
The way you said "1 joker different" made me falsely presume that 7 of them share the same in every part of code with just an extra odd one standing out like a bullied victim.
1 joker, different sprite, function same
There you go.
So you want ONE(1) joker that can switch its sprite on defined circumstances.
yes
Is that even possible? @frosty dock
'Cause I actually don't know if that's a thing or not.
would either of you happen to know how to verify if an atlas has been properly registered
Haven't encountered an atlas not being registered properly except external problem (syntax error in other part of the file, forgot to rename the sprite file, forgot to put them in both 1x and 2x, etc.). Hence haven't feel the need to. Sorry.
So I just have two awful ideas:
a)Code some edition specifically for this joker to use.
b)Use stickers that can cover entire joker with new sprites.
could you also maybe look at Jimball from Cryptid? since that thing's got an animation, might be able to offer an insight as to changing sprites
That, is an animated sprite.
qwerty asked for conditional sprite transformation.
oh that's just an outright supported thing?
my method is much better
replace the atlas and change sprite pos
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
And is that working?
yes
And is your problem solved?
i already solved it with my own way by looking a source code
if you don't believe me, then check my mod
https://github.com/TRRESTGHGYTCFTGBCXSZD/gerio_cards_part_1
https://github.com/TRRESTGHGYTCFTGBCXSZD/gerio_cards_part_2
No, I believe you.
I'm just upset that I wasted both of us at least 40 minutes.
cryptid's seal the deal also has alt sprites
so is there's a way to put an additional collection tab that shows variants?
how do i destroy selected playing cards?
add remove = true to your return table
Not that I know of.
I added remove = true but it didn't do anything
context.individual and context.cardarea == G.play make sure you added them
oh yeah
relocalize with a_mult_minus not a_mult
thank you
I didn't have to ask the question lmao
and make sure the number is enclosed in math.abs(-5)
it looks awkward with +-5 mult
where dhould i add it? this is how i have it rn but now it just does nothing
(trying to make it so that if the first discard is a two pair it destroys the discarded cards and upgrades Xmult)
check purple seal code
would that be in game.lua in the code?
maybe
How do I write the patch pattern if I want to patch this part?
I wrote pattern = "(?<indent>[\t ]*)if scoring_hand[i].ability.name == 'Glass Card' and not scoring_hand[i].debuff and pseudorandom('glass') < G.GAME.probabilities.normal/scoring_hand[i].ability.extra then\n([\t ]+.*\n)*end" and it didn't work.
Anyone know why this ain’t working
How many tests have you run? It looks like you don’t display anything if the probability test isn’t passed, so you wouldn’t know the difference between low-rolling and nothing happening
I would recommend doing something on failure, like playing JuiceUp on the joker.
Just to test
It supposed to send a message even if it’s not rolling right. And I’ve tested a lot, even with some Oops all 6s to make it guaranteed
The code does have "TRASH" as roll-failing message
Oh? It’s hard to follow the “end” braces when the indents are messed up on my tiny phone screen XD
I’m wondering if it has something to do with the hook I put with the use_consumable function. However, the hook returns the right things, and the hook doesn’t change it
is there a way to recalculate the scored hand after applying an effect to cards in a manner similar to Midas Mask?
In this case I am convering all scored 8s and 9s into 7s so that can affect what the played poker hand should be
vampire doesn't recalculate if stone cards have their enhancements removed
The hand type is set stoned once the cards are played
Ah, an excellent point 
Yeah I should probably just leave it lol
And Vampire doesnt even specify 'doesnt affect scored hand' because that is implied so I'll just leave my joker as is
So I just found out that smods also patched and changed this part (in better_calc.toml, of all files), which might be the reason why my patch didn't do anything.
Can I make a patch that is targetting another patch?
I wonder if I can make a monster reborn card in balatro
Guess it could be a tarot card that restores a deleted card, but not sure if there's any code I could leech from to make it work

I've got this feature scheduled for the next update.
Well, the code for the ability of The Fool makes reference to a G.GAME.last_tarot_planet
That might be a starting point, seeing how it records the last used tarot/planet
Ooh that's a good it idea
Forgot about the fool
Right now just trying to figure out how to put them in their own card packs
Tho not sure if having jokers and tarot cards in same pack would confuse the game
Was gonna add copycat and make it just a carbon copy of blueprint lol
The downsides is the spectral cards won't be recycled that way though
I'm almost certain it is
yeah, codex arcanum does it. you could have a sneak peek at their code to see how they did it
Ty
all arcana pack?
an pack that literally contains all tarots
I'm trying figure out how they did it lol
Is that all I really need
Looks like there's some extra stuff in there that's needed
Ok I think I see how this works
That files is basically creating the pack and is calling the cards from mod/CodexArcanum.lua
Hopefully I'm reading this right
no dont use codex as a reference
codex is old at this point smods has its own booster api
ortalab uses it
As a
individual what would be a good example of making one card with a proper file structure
big recommend to look at a currently maintained project instead of codex lol
So I know how to properly do this
Getting sent left and right to different mods with different file structures and different methods of being done
yeah
sorry but fr codex is out of date
unfortunately i dont have much time but yeah i recommend checking like ortalab in the current ecosystem if you want to peek at mod workings
Like I just something like
folder structure with card assets a one lua script to setup the mod one for the custom pack and one for list of cards lol

I'll take a look saw it earlier
I just hate like copying someone's mod and reskinning it you know
You're bound to eventually copy someone else, even on accident
Still knowing I've done doesn't let me know I learned anything
At least watching video guides when ur copying code you're learning how things work along the way copying a mod from GitHub and just changed a couple lines and textures doesn't really help me learn more coding
You know
But studying that code, seeing what it changes and sets does
If you just copy paste then yeah
theres no better way to learn balatro modding than look at how other people have done things atm
just studying other code is pretty much all we got lol
and this discord of course
Yeah, but everyone has their own style of coding so sometimes it can be kinda hard to find best ways to make something
Especially in lua
Used to mod GMOD back then the only organization you'd really see is a Lua model material and sound folder lol
Anything after that is anything goes
I mostly just need to get a simple script going for a custom pack to slap my new cards in ain't really going above and beyond
Usually the best way is to start small work your way up
Maybe I can just look how the vanilla game handles card packs instead
atleast look at the wiki a little, particularly the booster section
That seems a bit easier to understand
it would help if wiki links / up to date examples were pinned in the discord ^^;
More guides would be nice for more simplified code for people to begin with as well
Actually, if you need an example of booster packs that contain specific Jokers defined in a "list", I have one that does just that.
does lobotomy corp do that?
LobotomyCorp has uses a different (but similar to the vanilla) function to generate its own pool of cards
got it
heya fellas! im having some trouble over here- for some reason the game wont show the name and description of this sticker
i really dont know why..
if you're looking at its code, the parts you'd wanna keep in mind are the ones under these comments: --create the pool, --cull the pool and --if pool is empty
Tried name and text instead of label and description?
well, no see- the label works
its just everything inside description isnt shown
ive tried looking around inside other code files and they all seem to do the same thing as me
it must be some really small thing im missing
hmm
Honestly just need a script that can make a custom pack for a list of cards
Trying to basically port in Yu-Gi-Oh cards as a funny meme pack
But some might have effects that aren't joker
So like to put them all in one specific pack so you are guaranteed to pull
Kinda like a real TCG pack pull lmao
With 5 cards per pull
An example code would help a lot without all the bells and whistles of more experienced modders
it says seal
but it's a sticker
Are you wanting it to say sticker?
Change Miku seal to Miku Sticker in the label and the name below it should work
no, i'm just showing bird the structure for the sticker to show the name and description
was a quick example, but i'm also gonna make a miku seal
(when held in hand, creates hierophant tarot)
I wanna make a whole vocaloid set with a bunch of the most popular ones and some themed stuff for them
creating absolutely horrendous code for this
is there a way to hook steamodded functions
I have a question for the assets, whats the difference between x1 and x2 as in where are they being used respectively?
When making a custom Joker, do you make it x1 first and upscale it for the x2 folder or the other way around?
I've been doing them in the x2 format to paste into the x1 folder afterwards and I really don't see a difference
she's beautiful
smooth
That doesn't help me understand
1x to 2x is better IMO
because you can't lose detail upscaling correctly
😭 she got so scrunkled
I see I've been doing it wrong then
So then the question is what is the correct way to upscale them
I do want to make a rare joker that has a 1,000 chance of applying Uber Miku
it just covers the entire card in mikus
Probably missing something really obvious here, but when using a custom Shader in a Seal:draw() method, I can't pass it the same list of arguments as a normal shader
nearest neighbor IIRC
I want to make that a type of sticker
I like the idea of a card being covered in stickers
Anyone have any idea why the args list is different?
an example of what you mind find in image editing software
they're different forms of interpolation
Ah I see now, thanks for the info 😄
cryptid upscaled with a python script which is funny i think
I just switched to that program
I was using PixiEditor, it's a different world entirely lol
gimp gaming
photopea because Photoshop too expensive
Honestly forgot for how long I've been using Paint.NET as main... but if I need to palettize something, Photoshop still is kept in the backpocket.

go miku, go
But as long as it works in the end for the user, anything can go.
-# Some still use the older versions of MSPaint for stuff.
yea somewhat most of the difficulty comes from working with only one physical Card object and dealing with triggering all the other joker callbacks with that one card
imagine it triggers madness and just dies
i could solve one issue but i cant find any examples for hooking into other mods (in this case steamodded) code...
cant you just make a table of references to the calc functions of the jokers it destroys?
shouldn't that just be smods_foo_ref = SMODS.foo
I was gonna add kuriboh as a wrestler joker card copy
SMODS.foo = function(args) smods_foo_ref(args) end
Where u sell it to protect from boss effects
where would i find documentation on making the cards flip
Gonna add exodia then try solving adding a card pack to the game
card:flip()?
I don't think there's documentation
Before doing more cards
there's only flip
ah oke
ohh okay that'll work thank u
thought there was like a whole thing about card animations and shiz
I thought of adding some YGO Jokers but I'm not sure I'll do that
I do have some programmed in
i was wondering abt lovely injection but i can probably just add my code to the end like that
yet another pot of greed in balatro
It was the most obvious starting card
lmfao
trying to find just a small clip of miku saying miku
what's the point of this? truly burning hte planet for no reason
I programmed a Tour Guide and I had an idea for AFD/Terraforming
It's literally the staple meme card of Yu-Gi-Oh next to exodia
I'm trying to stick with the theme of a card
And giving it a balatro equivalent effects
the WIP
me too, which is why BEWD was easier
Adding BEWD wouldn't make sense since it's a vanilla with no effect in the actual game on it's own
but I never programmed it
Oh that makes sense lmao
as far as i can tell returning multiple disconnected calc results in one call is very Jank
I had an effect for AFD/Terraforming but I decided to swap it because it wasn't Planet-themed
so now I need a new flavor for it
You were right 😭
Now to figure out how to downscale my preexisting x2 images...
Ur BEWD idea way too advanced for me to code so I'd probably give up on it lol

I'm going for simplicity
an easier version would be to destroy 2 Jokers when bought
How far along is ur version of a Yu-Gi-Oh pack mod
I'm not making a Yu-Gi-Oh! pack mode so
Ah
as far as i can tell if i wanted to activate two jokers that had a "retrigger cards" effect but one said the usual "Again!" and another said something else there's no way i could replicate that in the effects of one joker without some very scary hooking i dont wanna touch but probably will end up doing anyway
either 0% or 100$ or NaN depending on your opinion
Soon as I can figure out how to add a new card pack
100 australian dollars...
I'll probably be off to the races on my mod
boosters are like mid tier trickiness to add
are the 2 arguments in play_sound just volume and pitch?
yeah its still inherently harder to use than other SMODS objects tho
you have to handle a lot of the process smods mostly just gives you the hooks to do so
Is the wiki based on the alpha or old version of smod
thoughts on this ability for Blind Joker?
(Common): Creates a Planet card if played hand contains a Pair of Aces
i dont know lua sorry
alpha
Ok
seems weak
Well I'll try coding it myself see if I can get new pack to work
also I made a chowder shader
well, it is common :}
it's like worse than common
Superposition is much rarer, so i thought Planets instead of Tarots would be good
strength-wise
maybe make it targetted planet for the played hand?
Superposition was buffed to not create Planets IIRC
To be fair, I think you can have an "ObjectType" that has both Jokers and Consumables to "take". 🤔
yeah it gives tarots now
it's common
https://github.com/Eremel/Ortalab/blob/master/objects/loteria_boosters.lua
no question this is easier than before but still more involved than the simpler things in SMODS (consider these are basically boring normal packs)
I know it gives Tarots, but I'm saying it was buffed to not give Planets
the hand you need to play is rarer
i guess, yeah
but ya targeted planets would be neat
The point is that the effect is so weak you wouldn't buy it
just kinda feels wack to play a hand wiht pair of aces, like say full house
and then just get high card
fairfair ^^
I do think making it targeted makes it much stronger
maybe most played hand?
i mean, it's a decent setup, that's why people use Superposition
that's stronger still
fairs
who's using Superposition
people who don't get any other joker
an empty joker slot can actually be more useful than superposition
you get stake stickers for having the joker in your joker slots when you beat ante 8, right?
yes
i mean, fair - superpos isn't that great either
ya i'll go with targeted planets ^^
nah, I'd take egg over superpos all day
I think target planets makes it uncommon or rare
egg's better actually! consider Swashbuckler and Ceremonial Dagger
the temperance in question:
swash is a good call
temperance when egg
@frosty dock can you answer a quick lua question
why is vscode yelling at me
how would i go about delaying an action?
specifically flip a card, do the change, then flip again
events
local func_(v) return true end
that's not how you write functions
you're right I lost the function
mm, actual complicated code
the difference between local foo; foo = function and local foo() …
or maybe it was something else similar
with
local foo = function() ... end
a reference to foo doesn't exist within the function, so it can't be called recursively
local function foo() ... end
is syntactic sugar for
local foo; foo = function() ... end
both of which do allow foo to be called recursively
But I think the former works for recursive calls, no?
Because it didn't break when I did it recursively
even though vscode complained
puppy brain so small to figure out what the hell i'm doin
idk I've seen it break from doing that
you can reference vanilla for code that flips a card, does something to it, then flips it back
how do i check if a voucher has been redeemed or not? i have a joker which i want it to work after the set voucher has been redeemed
if G.GAME.used_vouchers["voucherkey"] == true iirc?
Does pseudorandom account for a card being in the collection or not?
huh, there's no joker in vanilla that flips played cards
how to create consumable set?
where is SMODS.ConsumableType located at? undocumented?

had another Common idea:
Gives $2 when a Tarot card is sold
might increase the value though
:}
it doesn't affect sale value actually
it just gives extra money ^^
the plan was for this to work well with a Crescent machine
Are consumables things like celestial cards
mhm!
generally speaking, consumables are things that go in your consumable slot
Can you combine jokers and consumables together into a back or would that cause coding issues

I should probably turn pot of greed into consumable for a plus 2 hand
Or is it more funny for plus 2 joker slots
-# the people yearn for oddities
or draw 2 cards
how many times did you have to re-record it because that lucky didn't proc
I just recorded once
Is there a draw 2 card type function
lucky
I didn't pay attention to the lucky
Could probably make it a draw 2 joker card
draw 2 extra cards per draw
how to make own stone cards i wonder
So much to learn
there's context for right after discard so, doable
exacly
i'm currently trying to figure out how to make miku say miku when she mikus the cards
Pretty sure there's a play sound function
yeah
i'm wrapping my head around G.E_MANAGER
cause i want to flip the cards nad play a sound
can't you use the vanilla example
If you can find how sounds play in vanilla game
You prob copy paste a sound function to play on card flip
If it's a Miku card only
yeah i'm tryign to figure out how it works
puppy brain is small and slow
I know there's vanilla example code for joker
But not many examples for anything else
like this probably
The Star, The Moon, The Sun, and The World
i think the worse part of makeing mods, is to try to get idea for it
Ideas are wasy
i have a hard time doing that
Trying to get a base going is the hard part
mods can be as simple as just
the only time i get ideas is during sleep, and it takes alot of energy out of me
"played cards play a cat sound when scored"
or as complex as
"When blind is selected, destroy joker to the right and add it's ability to this joker"
that's a mod
normaly yes
but if going by the minecraft modding community sense
nah
insanium cards
chat my crash screen just opened two instances of balatro on restart
they're in the same terminal
i will get sleep paralys faster than that lmao
intresting lmao
Why are you trying to make a mod if you don't know what to do
wanna learn to do so
plus, haveing 7 hours a day to spare
it can be boring
so why not fill the gaps with something?
ok well now what
Imagine having 7 hours to spare a day to code

Imagine having any free time to code
ok, we getting somewhere
add your mod prefix to where you're playing the sound
i am more wondering why its sound is called miku
the game doesn't have enough information to know the sound key you're giving it is from your mod
don't worry about it
i'm a little stupid, here?
or the path for hte atlas
whats your mod prefix?
vcld
then you also need to put it there, i think it was before but not sure
what am i doing wrong here? its displaying properly what the mult should be but isn't giving me it?
SMODS.Joker{
key = 'Vbucks',
loc_txt = {
['en-us'] = {
name = "Vbucks",
text = {
"{C:mult}+#2#{} Mult for each {C:money}dollar{} you have",
"{C:inactive}Currently {C:mult}+#1#{} Mult"
}
}
},
atlas = 'Jokers',
pos = { x = 1, y = 8 },
config = {
extra = {
multmod = 2, -- Multiplier modifier per dollar
mult = 0, -- Stored multiplier (calculated dynamically)
}
},
rarity = 2, -- Uncommon joker
cost = 10, -- Cost to purchase
blueprint_compat = true, -- Compatibility with blueprints
loc_vars = function(self, info_queue, card)
return {
vars = {
self.config.extra.mult, -- Current multiplier
self.config.extra.multmod -- Multiplier per dollar
}
}
end,
-- Function to calculate multiplier
calculate = function(self, card, context)
local dollars = G.GAME.dollars or 0 -- Store dollars
local multmod = self.config.extra.multmod
local mult = multmod * math.max(0, dollars) -- Ensure multiplier does not go below 0
self.config.extra.mult = mult -- Store the calculated mult
-- Apply the multiplier in scoring
if context.joker_main then
return {
message = localize {
type = 'variable',
key = 'sj_mult',
vars = { card.ability.extra.mult }
},
mult_mod = card.ability.extra.mult,
card = self
}
end
end
}
no - this card creates targeted planets
game uses cash not dollars
isn't that better Bootstraps?
haveing it read "the planet card" alone sure
but when creating it should be "create a planet card"


