#💻・modding-dev
1 messages · Page 129 of 1
do not
Oof
you want the old_calc tag
use new calc
is it fixed yet
its been fixed for a few days
huh
context.individual still exists right?
yeah
ok
should 1304a be okay
probably
thats old calc, yeah
can someone help me figure out what this invalid metadata json file error means? i can post my mod code too
trouabador rework for silly deck !
Not sure how an updated Steamodded would help my situtation unless someone has more specific guidance
yeah throw up your json, I don't think it should be anything hardcore that's your problem
I don't remember what weird capitalization the key has in old calc and new calc unifies them all
"id": "sinful_jokers",
"name": "Sinful Jokers",
"display_name": "Sinful Jokers",
"author": ["Peachfroggg"],
"description": "Adds four new suit based jokers.",
"prefix": "sinf",
"main_file": "sinfuljokers.lua",
"priority": -21,
"badge_colour": "fda0a5",
"badge_text_colour": "a61a1f",
"version": "1.0.0",
"dependencies": [
"Steamodded(=1.0.0~ALPHA-1309c)",
"Lovely (>=0.6)",
"Balatro (==1.0.0)"
],
"dump_loc": false
}```
what is this "new calc" i keep seeing? Is it a rework of some calculate method, like the one in SMODS.Joker?
what mod reworks the deck selection screen like this
galdur
Galdur
and i'll rework the selection screen eventually
it's a rework of calculation in general
it makes a lot of things more flexible, but it does it in a way that breaks a number of existing mods
also the 23 hands 32 discards thing is very similar to a modifier i have in place on some of my challenges, it's cool to see people adapting the same ideas into different forms
and it's still kinda in beta, so it has a few bugs of its own to work out
though iirc they've gotten the worst ones by now, all that's left is little stuff
What is the modifier out of curiosity
Does it effect most current SMODS functions? Like mods that use those current versions break with this?
down in 12 (the first image) was literally the first challenge i made and what started this modpack in the first place
that second one is an optional "B-side" challenge and will not be required to 100% the mod, but it's doable, just hard
if you calculate enhancements or editions they will break, if you play around with evaluate_play or eval_card that will also break
my girlfriend beat it
everything else should be fine
But yeah the second challenge is pretty much just my deck but you get way more resources and you can also get them back
Great minds think alike 
i want to completely rework the challenge select UI to add an entire second menu with a different colour scheme (i'm thinking purple) to pick B-sides
I did download the newest version, 1310b, and my code worked so i appreciate the heads up about the calc shenanigans
and i also want to rework the entire vanilla challenge unlock system, in such a way where you can select locked challenges and the "custom rules" box will tell you what you need to do to unlock them
I'm thinking of something very similar for B-side decks. After I finish T. Red I'll probably start work on the selection menu
the most i've done with UI so far is uh
add a modifier that turns off the "endless mode" button in the "you win" screen
i do this with the vanilla lua 'unpack' function
@sonic cedar did you solve it in the end?
(unpack takes a table and returns its values, e.g. local one, two, three = unpack{1, 2, 3} will have one = 1, two = 2, three = 3)
That's very clever actually
i'm thinking of maybe replacing the "completed X/Y challenges" text with a [B-Sides] button
what
there's code in here for a daily challenge type mode??????
this is in the challenge select menu
i feel like i remember this being mentioned a while back… fingers crossed 🤞
balatro content update 2025: daily challenges
man thunk is bad at keeping things hidden lmfao
iirc it's left over code from beta
wait what does it look like
it does this
would this be more balanced as an uncommon or rare?
both
ah
if a lucky card gives mult or money you gain an extra 5$
uncommon but gives $3?
mmm seems good
$5 feels a liiiittle too much for an uncommon but a bit too little for a rare with that condition
iirc it was added in some 1.0.1 build but wasn't there before
3 seems about right
you can still earn a lot of money with the right buildù
i would use this in a lucky card run
seems like thunk originally planned on daily challenges but changed their mind for the challenges we have now
tbf i found a flag that leaked there was a mobile version in the works like 9 months before the mobile version was officially announced
G.F_MOBILE_UI?
yup lol
yeah i remember noticing that as well
that was added in march of 2024, whereas mobile wasn't revealed until like september
that's 6 months but alright
i'm bad at remembering dates
sorry unrelated, but does anyone know if there’s a way to detect when a booster pack is closed (either skipped OR a card is chosen)
i wanna make a joker which increases your hand size but only while you’re inside a booster pack basically
cool art
that's what Lucky Cat reads ;P
bump
see where it is
how do that
area
can you further elaborate on calculating enchanments or editions, im just not understanding
they calculate like jokers now
oh, so if i format it like it was a joker it would work
how can I get the key for the played poker hand?
does "colour" just not do anything or am i being dumb? the "swap!" still shows up in blue regardless of what i set colour to
if context.joker_main and context.cardarea == G.jokers then
return
{
colour = G.C.GREEN,
message = 'Swap!',
mult_mod = hand_chips - mult,
chip_mod = mult - hand_chips
}
end
end```
oh god the challenge select menu is a pain to modify, but it's ok if this mod takes like a month to come out
just use swap = true
is there a context for when cards are drawn
or only for when you draw your first hand
aren't there modded challenges already
yes
i mean i'm adding my own "layer" to the challenge select menu
for "b-sides", things too hard or outlandish to put in the main set
but imagine daily runs that refresh
i did also have an idea for this
Thunk had an idea for this
thunk had an idea for dailies yes
i mean im mostly just worried about the color
who knows whether he'll add it in the 2025 content update or if it's a left-over from times gone by
it works fine on other jokers but this one is being a pita for some reason
how would you check if a specific suit is being scored
this is not working the way it's supposed to :(
Maybe a stupid question, but how do I check if the card still exists, as in it's still within the reach and is visible?
what's reach
card and not card.removed?
some form of context.cardarea
probably
works for boss blinds but not normal blinds
Im making a joker that levels up the first played hand of the round. Problem is, i dont know how to level hands up or how to detect if its the first hand of the round.
read the vanilla code
Imagine a card from the deck preview - I closed the preview, but the card still technically might exist in your hand, but the exact card that was shown in the collection was removed
I don't understand this because they're different cards
Not the same card
have a look at the code for burnt joker
can someone explain how exactly delay() works?
It creates an event that doesn't do anything but take space in the queue
probably gonna steal the event queue concept for my next game in all honesty this is one of the coolest parts of the codebase
that's not really something thunk created
event management is probably core to many/most digital games
definitely, but i like the way balatro's works
although I'd have expected an implementation with listeners instead of a single track queue
can someone explain why the event stuff is so good? i really dont understand its usage
it allows you to very easily queue things to happen in the future or after one another
rate this new version of Identity? :3
@tawny perch gappie of the mountain what is your wisdom
yeah it's pretty
thanks!! :D
the art is good
why negative though
ok but if I use it like this it does not delay the dissolving?
G.E_MANAGER:add_event(Event({
func = function()
local voucher = create_card('Voucher', nil ,false, nil, false, nil, pvoucher, nil)
voucher.cost = 0
voucher:redeem()
delay(10)
voucher:start_dissolve(nil, false, 10, true)
return true
end
}))
why is that?
so you can hang onto eg. Deja Vu or Aura
i mean it is a joker and not a tarot
so i think them being negative is fair enough
delay pushes something else into the event queue
delay creates an Event. The dissolve happens in the same event that runs delay
it doesn't affect the execution of the current event
so the card is dissoveldeddfdre by the time the delaying event is ran
you're paying for a random, but negative, Mega Spectral Pack, with the condition of needing a vacant Joker slot
its pretty nice, i think if you practice on effects itd be much better, like make it 3d, but right now its pretty
thanks!! :D
Thoughts on reworked merry andy? (the +1 hand from the boss blind is for beating it in one hand)
how would i practice that?
oh fuck you're reworking a bunch of jokers to work with your mechanics????
that's super cool
Yeah I have like 10 done rn
What's refund?
Blinds and vouchers as well
a good first step is trying to replicate the vanilla spectral effects
Gaining discards back
in this deck discards do not naturally regenerate
this is one way to gain discards
then doing it faster and faster
I see
ah ya, the background was inspired by the Spectrals ^^
what do you mean faster
REPLICATING CRYPTID SPECTRAL CARD SPEEDRUN (WORLD RECORD)
as in, the more you practice for 20 minutes
then you do 10 and see how you do
you can also try to replicate effects from reference not in game, or even from mods
ooh btw here's what it used to look like (this version was inspired by Soul, but i prefer the look of the normal Spectrals)
You should keep that flash I like it
That's true, I figured it out! Was an issue on my end
hmmm
I think the speed at which I do art is like, 1 Joker for 3 days of work 😭
so then how would I make the execution of the dissolve wait for an amount of time?
that i don't know
i'm not sure how this was inspired by the soul
like so? :3
maybe i would split it into two events
Maybe add some shading on the yellow stuff?
oh
well thats fine, i guess 1 hour per joker is a personal thing
the more tarot-y nameplate and label on top
tarot shape
could do!
:diet_cola:
Now a different question:
How do I get a center position of a card? I tried using:
{(card.VT.x + card.VT.w/2) * G.TILESCALE * G.TILESIZE, (card.VT.y + card.VT.h/2) * G.TILESCALE * G.TILESIZE}
but it doesn't seem right; tried drawing a circle there using love.graphics.circle and it's offset to the left
well yeah, the soul is a spectral tarot
identity i presume is a spectral only
I mean I'm not taking this long by choice 😭
I'm an art noob
it's a Joker, actually :}
oh yeah gappie since you're here can i have feedback on these spectrals since we're on that topic :3
well yeah, im not doing that by choice either lol
The position of the hands in Fate compared to the reference throws me off a little
erroneous pixel on the top border of Ineptitude
also I wonder if in-between the yellow fingers should be white
get the sacrificial dagger
destroy that pixel
one here on fate
I'm REALLY precise with pixel placement can't you guys tell
use masks :D
I saw a couple people mention looking at the balatro source code
how do I do that
7zip
extract the exe with 7zip
You can copy the executable then unzip it
oh lmao is it really that easy?
yes
Yeah 😭
cool
extracting all LOVE2D games is that easy
i think you would do good with studying lighting, fate, while has good hands, the lighting doesnt make too much sense
I think aswell, that fate should have the effects follow the flow of the drawing, theyre sort of going against that, you can look at most spectrals for reference, but the effect is already pretty cool
Ineptitude on the other hand, i think is due for some background changes
currently its uninteresting, but the good part is that it follows the 'flow' of the spectral
you just need a lot mpre variety in the background, aswell as trying to highlight the main focus of the drawing
is this any better? i'm a little convinced but the spectral colour scheme doesn't have a shaded white
and it feels busy
thank you gappie !
and yknow ineptitude could definitely use some work with the text, i think taking from ectoplasm is a good idea
Does anyone know if there's a way to set a joker effect at start of run (like after deck is selected)? I've got a joker that changes effects based on the selected deck, and I tried to use G.GAME.selected_deck.name, but it seems like the ability is just set on startup. Is it possible to change the identity of a joker at runtime?
you could do something like Castle with a global variable
ohhhhhhh true
and set_ability maybe
yeah good idea
see the Castle example in Example Mods
yeah that's a great idea, thank you!
thanks to whoever suggested that :D
@tawny perch any suggestions for faster art maybe 🤔
practice, practice, practice 
faster art just requires you to get to a point where youre satisfied with whatever youre drawing, and then, do it faster
this can help with line confidence and help you draft ideas faster
hey do you mind if I dm you because I also have all the decks i've done art for that I haven't rlly gotten feedback on but I don't really wanna flood this channel 😭
I mean you could post them in fanart
That's what the channel is for
and I'd like to see them too
Fair enough
alright, but you could also just, post it to the right channel
I'll just do that instead mb 😭
im gonna breakfast first
the breakfasterrrrr
I guess. I do think I have a bit of unusual approach because I try to do art very mathematically, while I don't think most artists do it that way
so like, vector art
no
I think I'm gonna finish this deck art I'm working on then I'll post to fart
SVG art is my main art outlet :D
it's smaller in file size, easy to edit, infinitely scaleable and lets me think mathematically about my art :D
also, the jonklers!!
how do i add a playing card to the deck in apply?
i never saw that joker coming
my mind is too fast for eyes 🎶
Hey!!!
That's gotta be a standalone mod ;P
-# so I can read the code
I hate canvases, I had so many trial-and-error with those
what I do is:
create a global table of blackholes in card:init
in the game:draw, switch a canvas to apply a local shader for each blackhole that exists in the table
then switch it back so it doesn't break the CRT shader
canvas switching looks like literal juggling, I do not understand why the order I made them in works
what's a canvas
and how do you switch them
a separate rendering space
is there a way to add a random edition with card:set_edition()?
cool shader
and switch with love.graphics.setCanvas() and love.graphics.draw()
I'll release this when I'll figure out how to properly detect black holes
because I don't think init is called on load?
there's a way to poll a random edition
check the wiki
try set_ability
this is the docs
there's also a homestuck mod
oh ye i shoulda checked if there was a smods function for it
technically it's vanilla IIRC
I KNOWWWW ITS CRAZY GOOD
IM WAITING FOR IT TO RELEASE
my autism flares up
i love homestuck
@long sun how to play kyudosudoku 
Ooh you read my site!!
Awesome!!
but really I only got three 4s so far 😭
asking again now that there's less happening
how would i set up a custom ability for a joker?
usually it's all inside calculate
i was hoping you wouldnt say that 
Nah, doesn't set on run load
it should
got this code heavily copied from burnt joker thats supposed to do basically the same except on the first played hand. But it doesnt work. No errors no crashing, the effect just isnt working. any idea why? Heres the calculate code:
calculate = function(self, card, context)
if context.area == G.jokers and context.before and G.GAME.current_round.hands_played == 0 then
local text,disp_text = G.FUNCS.get_poker_hand_info(context.scoring_hand)
card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_upgrade_ex')})
update_hand_text({sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3}, {handname=localize(text, 'poker_hands'),chips = G.GAME.hands[text].chips, mult = G.GAME.hands[text].mult, level=G.GAME.hands[text].level})
level_up_hand(context.blueprint_card or self, text, nil, 1)
update_hand_text({sound = 'button', volume = 0.7, pitch = 1.1, delay = 0}, {mult = 0, chips = 0, handname = '', level = ''})
end
end
set_sprites does but I'm sure set_ability also does at some point
card not self
When I load the run, it seems that only the base playing cards are being ran through set_ability
no signs of black holes
are there any anywhere
when I open the collection it runs the set_ability weirdly, yes
replaced it but it still doesnt seem to do anything
set_sprites works
okay
So, set_ability is run whe the card is created, and when you load a run it recreates every card
is there a way to insert a playing card into the deck without spawning an actual card object?
oops
also I forgot to mention, but I actually had to unscramble the black hole sprite
looks a bit cursed by itself
try printing values like hands_played etc.
did that and it says its 0 until after everything is finished calculating
keep doing that
can localize{} with the vars argument be used outside card_eval_status_text or message =
i need to localize something and put it in a variable, but I also need it to have a variable inside the localized text, like how return message = localize{type = 'variable', key = 'a_xmult', vars = {card.ability.extra.x_mult}} would work
copying that localize function doesn't work, it just gives ERROR or nil instead
okay i changed the if statement to be seperated instead of using ands so that i could check what stage it didnt work. Apparently its not counting the area as being G.jokers. Im gonna remove that to see if it works
sorry for typo, what happens if you remove the check for context.before?
yeah you should be fine to do that
well it's not working
Removing the area check makes it work! Im not actually sure why it was there anyways
it's context.cardarea
card.ability.extra.last = localize{type = "dictionary", key = "k_soup_hand", vars = {card.ability.extra.interval} } just gives ERROR and idk what's not working here
would adding a random seal to each played card be a balanced ability for a legendary?
is the checking needed for what im doing though? im only upgrading the played hand. Im not sure it needs to check it and it seems to work fine without a check
I don't think dictionary is a valid type of localize
just leveling up the played hand?
yes.
put it in misc.v_dictionary and use type = 'variable'
vars aren't supported in dictionary
im gonna be honest i think my brain malfunctioned when i added the area check
oh
you get strings out of dictionary with localize('k_something')
just do ```lua
if context.before and G.GAME.current_round.hands_played == 0 then
return {
level_up = true
}
end
assuming you're using bettercalc
is bettercalc a seperate mod that changes the stuff or is it part of smods i forgot
it's just newest smods
oh i think i should have it, i updated like a few days ago
are there any mods that add cards to the deck to make it more than 52 on a new run? I cant seem to find anything for that.
works well thanks
would adding a random seal to each played card be a balanced ability for a legendary?
or would it be too strong / weak?
i can see it being incredibly strong and like you have basically no reason to not pick that up
but since it's a legendary it's meant to be strong so idk
i was thinking about nerfing it by adding a chance to not add anything, but i think it would make the joker underwhelming
me when this doesn't work for stickers
(i am the only person using stickers)
it should work for stickers
is there a way to set args.initial_deck based on what deck is being played on?
args.initial_deck is just a flag for if the starting deck is being generated
@mellow sable we need to talk
this worked thanks
you can use G.GAME.selected_back to get info on the selected deck
would I compare that to the key of a deck?
whats context.from_playing_card
straight black hole isnt real it cant hurt you
you don't need to add anything to support stickers on playing cards with better calc
and that function doesn't return anywthing
better calc is just better huh
that's why it doesnt work for you
oh 💀
like the calculate part
no wonder
you used to manually have to check stickers?
they were never very well supported
Can anyone help me figure out why this is happening
Attempting to use pseudorandom in an effect for a joker
which looks better, outline or no outline?
the argumetn can be string or number, but you must have put in an object
No outline
Ill peep
I'm having trouble with adding a deck to my mod; I've done the SMODS.Back{} call, but does that even add it to the options or do I have to initialize it somehow?
I'm trying to add a custom rarity but whenever I try to set a joker to the rarity it crashes with this message
what is your mod prefix and what is your custom rarity?
Many lost souls in the chat rn
like the key for the rarity?
yeah
"jmrcrd" and "album"
okay so to apply a custom rarity you have to add your mod prefix
so for you it'd be jmrcrd_album
ok
Ok that wasn't it
Anyone know what i did wrong in that image
where would i start to add a joker to the game
pseudoseed takes a string, not self, and you don't have a center to look at, replace it with card
Ah thanks
Theres also a youtube tutorial
mhm, thanks
two things before i check that out, is card.lua gonna be useful at all (i presume yes), and second:
its beautiful
I haven't used it yet for any of my purposes
thunk-like coding
thunk is a really good programmer
tbh i presume its fine, just like
i kinda chuckled seeing it
I have zero experience in programming but thunk left a pretty intuitive trail for my small brain to understand
frankly the game is like 50mb i think its fine to have a little bit of stuff like this
What actually is a string?
a piece of text
doesn't matter how long or short it is, a 'string' is just, well, a string of characters
Ah alr
all of the message content in this channel is all strings for example
or images
so am I just replacing "self" with the joker key?
pseudorandom(pseudoseed('whatever your jokers name is'))
Oh ok thanks a ton
for instance vanilla uses pseudorandom(pseudoseed('wheel')) for wheel of fortune
you can also directly use pseudorandom('key')
What does psuedoseed do?
Awesome it no longer crashes when I pick a card thanks a ton
oh, pseudorandom(pseudoseed('key')) and pseudorandom('key') do literally the exact same thing
intesting
I have an idea but I need to know if its possible
Can you like, make hand types, but instead of like playing them to unlock their planet cards, you get a planet card to unlock the ability to play them?
probably
I made it to ante 15 with one of my modded jokers
2 of them from invisible technically
And 2 brainstorms
And a blueprint
Wait wouldn’t this be #⚙・modding-general
I just realized
check #🎨・fan-art
Is there a way to have custom textures for vanilla files
Easily
And bundled with a mod
And by easily I mean something that I can do within the span of the weekend
Other than the sprites themselves
hey real quick just being 100% sure
the lovely injector thing is safe to download right?
Yes
It uses the same technology as a Trojan virus but it isn’t
yeah i read that part i just wanted to be sure
You can build the same thing yourself if you’re worried
yes
basically it is a trojan, but dw it doesnt interact with the pc it just messes with love games so you can make MODIFICATIONS >:)
so its a friendly trojan basically
It would’ve been funny to tell you you’re cooked but you seem nice and I don’t want to do that to some random dude
Or dudette
Lovely is safe to download though yes
Or non-binary duderino
.jkr?
bruh lol
yeah, its just similar
I just checked and it’s all of the above
jkr is the save file extension (save files are actually just compressed Lua source code piped through love.data.compress)
how to enable demo mode in balatro full game?
yeah
i just found it funny he named it that
Time to draw a trout
"JUST KIDDING real" files fr
so to add balatro demo you need to get balatro demo from steam and inject it?
theres a demo?
yes but it might have been removed
the balatro demo was removed from steam around the time of the full release
does anyone have demo version? i seem to can't find from archive
i wish i had the demo
guys like
is there any info at all on how better calc works
like how to use the thing
so that i can port my mod
or should i just wait until they actually put smth in the wiki about it or its more adopted
How do you have multiple joker atlases in the same file
I forgot
Is it multiple SMODS.Altas
Is it possible to make custom rarities?
Or all the things inside the same thing
Yes, cryptid did it
yes
You have all your jokers in one image, then use one atlas for that image. just use pos = { x = #, y = # } to set the image to display.
is there documentation for this yet?
id assume so
x and y start at 0 too
tysm
So 0,0 for joker 1, 71,0 for a joker that’s adjacent to it, etc.
does SMODS.Rarity take key as number?
no, it doesnt go by px it goes by like the size of each card and the one adjacent to it would be 1,0
no its 0,0 for joker in top left, 1,0 for joker adjacent to that, etc.
That’s easier
got a new joker done
now have 10 jokers total
yes
ooh cool
so is it supposed to be beginner friendly?
Do you take suggestions?
this is cool art
of course!
thank you! i make it all myself
yeah it should be easier than before
all jokers should say 'joker' on them somewhere (aside legendaries) so i'd consider making the text on the weezer blue album joker say 'joker' in lowercase on the top right to match the real cover
every vanilla joker aside the 5 legendaries says 'joker' on it somewhere
as they are transitioning to full game, did they remove the demo code?
Toxicity (or Steal this Album, your choice but toxicity is more iconic) - System of a Down
Wonder what’s next - Chevelle
Slipknot - Slipknot
The sickness - Disturbed
Endless hallway - He is Legend
does SMODS.Rarity take key as number?
likely yes
as i know, rarity is a number
These are some of my favorite albums
no, custom rarities are strings
even if it did you would still need the prefix so you would have to make it a string anyway
LD-50 by mudvayne is also an amazing album but you should not make that a joker
I have 2 variables in Xmult and Xmult2 that call for x10 and x0.01 mult respectively.
How do I make which variable it uses for mult random
are you on latest smods?
do lua return { xmult = pseudorandom('joseluckreturn') > 0.5 and card.ability.extra.Xmult or card.ability.extra.Xmult2 }
Isn’t it Xmult_mod to set the x mult
not anymore
Now its mult vs xmult right?
you can still use Xmult_mod
When did this happen?
but why bother remembering all the slight differences depending on which part of scoring it is when you can just use xmult now
#bettercalc
SMODS.Rarity{
key = "gerio_unobtainium",
loc_txt = {
name = 'Unobtainium', -- used on rarity badge
},
pools = {}, -- you are not supposed to get this cards anyway
}
```no getting this card
?
m

♒ this is the closest thing i can do not being in cryptid and not having nitro lmao
or Ⓜ️
Anyone got a fix for the Deck Creator mod? needs updating for the newer steamodded
lua isnt going to yell at me if i have the first bracket not be on the same line as the thing its tied to, right?
i just know lua is a little weird with things, and wanted to make sure
the main issue is that you're checking if the file exists by reading the whole thing and discarding that, when a similar thing can be done by just checking if the file exists
the second issue is that if the config is empty you get a very nondescriptive "attempt to call a nil value" in main.lua (which you need to request a lovely dump for)
the third issue is that the load family of functions never fail, only returns nil, so you can do
local cfgfunc = loadfile("/config/Trance.lua")
Trance_config = cfgfunc and cfgfunc()
which never fails even if the config is malformed
so basically im just finding an excuse to yell at you for fun because you did something wrong which is okay and acceptable because we all make mistakes sometimes but the REAL reason im upset is because the person who had this issue sent me an incorrect lovely log which happened to have the line mentioned in the crash be an oldfunc() call (which lines up with the original error, attempt to call a nil value) which led to me spending like 15 minutes trying to figure out why tf love.update somehow became nil (that random line that it happened to fall under was my code by the way so i felt responsible for this somehow even though it was the trance thing all along)
rant done
lmao
Hey what's the context for detecting if you are on a specific blind?
Balatro mod developer tries and fails to code file loading (real)
Or rather specific boss blind
is trance a lovely mod or are you just not using the smods loadfile
i assume the first one
First one
I don’t like making my mods Steamodded-dependent unless they have a reason to be
Even Talisman has partial functionality without it
Would it be like if G.GAME.blind == "The Needle"
Idk
?
figured out my answer, it is no, it does not yell at me
in other news: im doing it!
is there any documentation on SMODS.Consumable? I can't find it on the smods wiki
calculate = function(self, card, context)
if context.cardarea == G.play and context.individual and not context.blueprint then
if context.other_card:is_suit("Clubs") then
card.ability.mult = card.ability.mult + card.ability.gain
return {
message = localize({ type = "variable", key = "a_mult", vars = { card.ability.gain } }),
card = card
}
end
if context.other_card:is_suit("Hearts") and card.ability.mult ~= 0 then
card.ability.mult = math.max(card.ability.mult - card.ability.loss, 0)
return {
message = localize({ type = "variable", key = "a_mult_minus", vars = { card.ability.loss } }),
colour = G.C.RED,
card = card
}
end
elseif context.joker_main then
return { mult = card.ability.mult }
end
end
i can't get the message here to show up on my joker instead of the playing card
what kind of object is that on?
this is a deck
try removing the check for hands played
since the effect happens after hands are removed the variable would be set on hand 2 and would only apply from hand 3 onward
its awesome :)
Is there a template anywhere for creating custom jokers? Goal is to simply add one that is a x2 mult just to learn how to mod
check the example mods in steammodded
Is that on the github page or is that a channel here?
Ah found it on the github! THanks
Question: is there a way to disable the rarity and mod badges? (I don't mean the config option, I mean like... for a specific card)
hm. might have something to do with the bettercalc update
what context would i need for looking for money spent in the shop
like context.[thing]
how do I debug my joker? like, do I just reroll until I get it or is there a way to make it so a game starts out with it?
theres a debug mod that im using
nvm (i'm just learning the thing this is not real)
real
https://github.com/WilsontheWolf/DebugPlus?tab=readme-ov-file
you should be able to use this if you arent already
theres a lot of different keybinds
okay so how do i modify mult when my joker triggers
what do you mean by that
you need a calculate function
check out the example mods
im going through this myself right this second
https://www.youtube.com/watch?v=Zp-4U5TlbxY
heres a tutorial vid im using
STEAMODDED 1.0.0
A tutorial on how to make a modded Joker.
https://github.com/art-muncher/Example-Mod -- EXAMPLE MOD
https://github.com/Steamopollys/Steamodded -- STEAMODDED
https://github.com/WilsontheWolf/DebugPlus -- DEBUGPLUS
-----------------------------------------------------...
meow
so. why is context null
i have this
it's probabky horrible because. again. i hate lua
content
oh
the docs say context
content
yeah I'm saying that you have it as content
true
im trying to check if anything is done in the shop, will this do?
the only ones that I'm aware of are eval and final_scoring_step but can you use others
your config has a semicolon instead of a comma after it
my c++ ass is not liking this so far
also instead of defining a custom message just return { xmult = card.ability.extra.Xmult }
unfortunately this is still happening
when is it crashing
when i hover the card
let me try playing a hand without hovering it
the card works but hovering crashes
try starting a new run
i just changed the variable to a constant and it works
Just if context.buying_card or context.reroll_shop will work.
Cartomancer?
could also be "discarding is disabled"
Legend, thank you!
figured this out btw, i needed to do self.xyz
Hey, how would one have a Joker select a random card in the player’s hand after new cards are drawn?
Not to force play it a la Cerulean Bell but to essentially have the joker be looking out for that card in the next scoring hand
bump
that dusk is NOT helping
why's merry andy lost -1 hand size?
question, what's the color you use for the (currently whatever status) thing at the bottom of scaling jokers description?
no
not necessarily but you can
any way to add custom characters to the font?
so i'm trying to make a shitpost. how do i change the probability when a joker is in the hand like all 6s does?
check the code for oops
honestly i just forgot to write it
It still has the -1 hand size
And also the boss blind is +4 discards and +2 hands because
1 hand from beating the boss in one hand
1 hand from grabber
2 discards from beating the boss without discarding
1 discard from drunkard
1 discard from merry andy, as the discard being removed from burglar technically counts as a discard being used, so merry andy was able to "refund" it
how would i end up doing that?
extract the balatro exe as a zip
this is quite literally my first time making my own mod for anything excluding mcreator
balatro file -> cards -> ctrl f oops
damn its that easy huh
yep
yeah it's crazy
is it the 2/3 hands played
Can someone help figure out why the end_of_round statement is always activating despite it being gated behind chance? Bizarrely the money is always stolen but the message never appears
idk why it doesn't reset once a blind is finished
huh
Only when selecting a new one
doesnt dusk retrigger stuff on the last hand of the round
Yeah it's been reworked
oh
the sort of syntax for adjusting probability is in card.lua
I do not fully understand how to interpret this though
nice!
finally, the wheel's REAL odds
my game crashes here when this is triggered at end of round, is this not the way to increase Xmult on a scaling joker?
using this to define Xmult
ur statement ends with a comma
does it not need to?
it absolutely shouldnt
do you have DebugPlus? should say why or at least point in the right direction
oh i see whats happening
74 being that line
no you dont put the scaling code in the return value
you set the ability value then return
i seeeee
it felt like a thing that would happen in return, cus the actual application of that mult does
so this?
so i'm trying to make a card repeat like hanging chad, but it crashed. what do i do here?
it's crashing because scoring_hand is null
you also need to check for retrigger context
added an error handler for when scoring_hand is null but then it throws this
so... how
change it to card = context.scoring_hand[1]
wdym why
context.end_of_round happens multiple times
it was supposed to be 1.5x end of this round
i found it
my custom rank isn't able to make straights
how feasible would it be to make a cardarea under the deck?
and also the cards are sideways so they poke out
How would I go around increasing odds of a consumable appearing in shop?
i did it
its done
it doesnt break
it might not work with blueprint bc i dont know how exactly that works but it works
blueprint calls the calculate function of the joker it's copying with its config
blueprint is distinguished by the fact that it sets context.blueprint to true
i seee
also btw blueprint_compat is purely visual, you still need to handle blueprint in calculate
so do context blueprint and make it do the things i want it to do?
yeah i saw that part
actually you should do not context.blueprint on the end of round check
mhm
???
i need to know if theres something weird with the deck
ok now trying to add a joker that adds chips when a certain card is played, it once again crashed at attempt to call juice_up (a nil value)
just have card be the card played
check the code for gluttonous joker
but beware that Card:calculate_joker has different parameter names
self there will be card in your function
ok changed the return to have card = context.other_card instead of card = self and now it works
+20 markiplier
an
moment
Is this sprite ok for a joker?
(Disclaimer: methods involved screenshot and resize)
(Maybe I should've do the same for my previous joker)
the compression of the art is funny so 10/10
We need a mod that adds a new thing to chip calc called markiplier
markiplier is exponent
Yes.
i did also put it in as +20 markiplier
dew it
Hello everybody my name is multiplier
@wind turtle Idea
Market Pliers consumable
Allows to swap a joker you own with one from the shop at no cost
this is literally my first ever mod
Is there a way to see a joker without having to discover it first? I'm trying to test mine out.
discovered = true in the joker's code i think
ah ok. Thank you
I'm trying to make a consumable that gives a random joker of a custom rarity, but in game it just makes jokers infinitely.
can anyone help? I have no idea why this is happening
oh this is a consumable i'm so dumb
have you returned anything in the use() function?
no
idk what that means this is my first time getting this far with smods.consumable
i think i'm cooking here
Would it be deceptive if I give a joker some positive effects without including them in description?
(Specifically, making a rare joker that holds a hidden mechanic which if you also have a specific legendary joker, the rare one will act as a copy of the legendary one on top of its own effect.)
if you put AAAH?! It's Infinity!? from snow's mod, it will make you instantly lose?
rather than 99/100 I’d just say “otherwise”
it could make the description a little bit shorter
is there any more people that can help?
you are spawning a joker for every center in the game
what the heck is that for loop about
idk
also use SMODS.add_card to handle other addition stuff
you didn't return true
wait wait wait
are those chances inclusive or exclusive currently
500 mult then immediately loses
I believe it means
1% loss and 99% 500 mult on first
2% loss and 98% 500 mult on second
3% loss and 97% 500 mult on third
and so on
how do i trigger a joker when the hand is played>
no no no i mean
can both trigger at once
nah it's 99% chance to get +500 and 1% to lose, then 98% to get +500 and 2% to lose, etc etc
no
the mult does not increase
i might make it gain for funsies
ok i realized i got my wording wrong
are the chances independent or dependent on each other
ok so i stopped the infinite spawn problem but now it just puts it on top of everything and not in the joker area
i.e. does getting one influence the other
i.e can you get both chances to trigger at the same time or not
ok
but consider
itd be really funny
it just can be dragged freely
it would
what the fuck
also the really low chance of neither triggering
This is why I suggested using the word “otherwise” instead of listing both of the chances
ye
yeah idk why the fuck it's doing this 😭 this should be fine right?
func = function()
SMODS.create_card({
set = 'Joker',
area = G.jokers,
legendary = false,
rarity = 'jmrcrd_album'
})
return true
end
}))```
so now how do i do random
...did you :emplace it? Alternatively, use SMODS.add_card instead.
how do i make the loc_vars have a value from config without it crashing? do i do self.config?
where do i put smods.add_card? do i just put it below the smods.create_card?
replace SMODS.create_card with SMODS.add_card
oh ok
Example:
config = { extra = { curchips = 0, bonuschips = 10 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.curchips, card.ability.extra.bonuschips } }
end,
ease_hands_played(number)
so sorry to say this but i think i beat you to the punch </3
that worked... once and stopped after i made it random, but the rest of it still works and the message still displays
is there any way for a joker to just. end the game
So, I'm tryjng to have a Consumable Type's name show up. I have it made, with a card there, but all that is messed up is the name. It shows "ERROR".
If it helps, the code:
key = "Testing" --change soon
primary_colour = G.C.MONEY,
secondary_colour = G.C.MONEY,
collectiom_rows = {4, 4}
shop_rate = 0,
loc_txt = {"Testing"},
can_stack = false,
can_divide = false,
}```
Okay I have a dumb idea for a joker and need to see if anyone thinks it will be balanced.
It consumes the joker to the left of it except for another copy of itself, add's the sell value to it's multiplier, and then copies itself
how to get use from consumable?
when i try to do ease_hands_played(0) it tries but doesn't work
like it only changes function when you enable the settings
erm
ease_hands_played adds hands
and setting hands to 0 wont make you instantly lose iirc
you need to return true in an event function, otherwise it repeats forever
and you need to emplace the card in G.jokers (unless smods handles that, i personally dont use SMODS.create_card)
smods only handles it if you use SMODS.add_card instead
try G.STATE = G.STATES.GAME_OVER; G.STATE_COMPLETE = false
A joker that eats another joker except its own kind and then goes mitosis?
I'd set it to Rare if not Epic.
Sacrificial Dagger but reproductable
so fixed this, halfway
Name shows in collections but hovering on the card itself still pulls up "ERROR"
Think i messed up the consumable itself-
how to get use() from consumable?
like it only changes function when you enable the settings
Behold, my second joker:
How do I put Red Seal's description in the info_queue of a loc_vars function? info_queue[#info_queue+1] = G.P_SEALS.Red isn't working
info_queue[#info_queue+1] = {set = 'Other', key = 'red_seal'}
seal descriptions are in the 'Other' set
Thank you
np
How do I make my joker "jump" like bloodstone or other "Played cards [...] when scored" jokers?
card:juice_up(0.5, 0.5)
Do I put it right above return?
yes
Thanks
how to get use() from consumable?
like it only changes function when you enable the settings
Is the highlighted part correct?
i’ll try that tomorrow thanks
replacing balatro's source code with my own tetris does work (has balatro icon)
it will hard to prove but my own tetris is also made in love2d
Now make 6 jokers, each a letter that spell "Tetris" (Also always Negative)
And when you have all of them in hand, it boots up Tetris
no i'm not making that card
i'm making the tetris joker that produces 2 monomino jokers every round, destroying itself after 4 rounds. these 4 monomino jokers can be combined to random tetrimino jokers.
Dang
how the hell do i make a config pAGE
I already changed it to
"not context.other_card.config.center == G.P_CENTERS.m_stone"
(i want to make a textbox that allows you to limit the limit of x of a kind hands
in case
Copied from golbat of pokermon, by the way.
use ~=
SMODS.has_enhancement(context.other_card, "stone") ?
SMODS.has_enhancement(context.other_card, "m_stone")
Thanks
Though checking for all stone like cards would be better
depends on use case really
So like
"not context.other_card.config.center ~= G.P_CENTERS.m_stone" ?
Oh
No like not context.other_card.config.center.always_scores
It might need the stone check too
So put this on the end on the has enhancement part
I changed it to look like this
old-calc
You should update and develop on new calc
Done
Now you can do things like lua return { xmult = 7 } and not have to worry about the messages and stuff
How do I get the exact xy position of the center of the card on screen?
iirc card.T.x is the top left of the card, so you can add card.T.w / 2 and similarly for y
I was trying that but it didn't really work with different screen sizes for some reason
On the other hand G.CURSOR.T.x doesn't behave like that
drawing a circle at those coordinates results in this
and it gets different on different screen width/height
we already have flush 100
But 33x3 is 99
But that’s not 100
close enough
99≠100
Flush 500 when
But lua isn’t real
well cryptid doesn't support controllers (and it's impossible to control balatro cryptid mod cards that use joker selections with xbox controller/dualshock 4)
Don’t use controller controls, use a button mapper
balatro is easier to select specific cards with xbox controller than mouse
because there will be so many cards that is not feasible to select with mouse
like this (126 consumables)
also normally you can't sell the potion from cryptid but with controller you can
here's cryptid code that removes sell button from cursed jokers
--Really hacky patch to remove sell button for cursed jokers
local G_UIDEF_use_and_sell_buttons_ref = G.UIDEF.use_and_sell_buttons
function G.UIDEF.use_and_sell_buttons(card)
local m = G_UIDEF_use_and_sell_buttons_ref(card)
if card.area and card.area.config.type == 'joker' and card.config and card.config.center and card.config.center.rarity == "cry_cursed" and card.ability.name ~= "cry-Monopoly" then
table.remove(m.nodes[1].nodes, 1)
end
if card.config and card.config.center and card.config.center.key == "c_cry_potion" then
table.remove(m.nodes[1].nodes, 1)
end
return m
end
```except this dosen't go well with controllers
1 mere controller breaks cryptid so hard
like you must buy everything then you can buy a legendary but with controller you can bypass restrictions and buy
like the controller is murdering cryptid
xbox controller is selecting phantom cards too (from preventing removal with my unbreakable sticker)
it still correctly handles can_sell()
Any ideas?
this is called phantom card
that it got survived from removal
how do i deal with phantom cards, like bypassing the absolute by lovely replacements?
🔥
👀
thank you mr qwertyuiopfgfg
what the fuck have you been cooking
🔥
this large lua file won't able to handle by playstation 1
time to add like 30 stickers
if the carddeck is about to deleted, it marks the card area being deleted and removes absolute card accordingly but it doesn't work for some reason
does card.area return cardarea or cardarea.cards?
cardarea
then explain why isn't working
what the hell is an absolute card
in card:remove()
i used checks for bypassing absolute's ability by checking if cardarea is marked for removal
--in lovely modified cardarea:remove():
self.marked_for_removal = true
--in hooked card:remove:()
if self.ability.unbreakable and not self.area.marked_for_removal then
else
originalremove(self,...)
end
remove only takes care of on-remove effect and getting rid of references to the card
the actual remove animation and whatnot already happens in start_dissolve
so I think that's what you want to hook
wtf is that?
i already hooked and it still not working
and it's wrong reference
it happens if you exit the run or closing (or changing page on) sticker page
the true reason why it didn't work is because it returns nil instead of true or false (if the function does not end with return, it will automatically append return nil to end of function)
well yeah that's how functions work
and, here's some info
truthy values: number, string, function, true booleans, anything else
falsy values: false booleans, nils
if you don't return anything then it returns nothing
Jelp, my brain is stupid and doesn't know how to make so I can load more than one file for my mod.
we have docs for this... SMODS.load_file returns a function
you're supposed to use it like
assert(SMODS.load_file("/contents/"..v))()
random bs go!
Fr
Me when I try to code something my way for 4h and look up the tutorial
oh smods has a file loading thingy now? cool
i can't hook to start_up
i wanna add some custom "stickers" that isn't really stickers
ok
maybe i have to put it somewhere else
i just lovely patched start_up
fair
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = "set_profile_progress()"
position = "before"
this should be right after smods is initialized
ty
