#💻・modding-dev
1 messages · Page 338 of 1
im really just going to wait till i can get a legendary item and earn 10 bucks
docs say it should work tho
ok so im not great at modding and in the rules it says no console mods but I play on pc through xbox launcher. Would there be any way for me to still mod the game
not yet
oh hell no
im broke okay 😭
It’s in the works
its not one of those. clicker games where you resell your rare items for money on steam marketplace
@zealous glen what vanilla wording do you hate the most
i dont see any calculate() function
well i got it because its cute i like it because its cute and i like it to earn a quick buck
Also what do you use to open the code, anytime i click on one of the files it asks what i want to open it with
vscode
i use vscode with lua extenstions
thanks
Blue Seal is pretty confusing compared to other in-game texts.
Hot take but I liked the original wording of Smeared better
Otherwise my brain is too cooked to think of more
can you remember what the og smeared text was, im just curious
those are fine
Something like “Suits become reds and blacks”
but yeah, blue seal desc fucken sucks
how do i get the lua extensions
Individual wording usually conveys what cards do. I’m more against the specific templates chosen and the lack of consistency
found a way on reddit
someone made a guide on github explaining it really well
Like DNA is unnecessarily long
search lua in the extensions tab and install the one by sumneko
But it’s not confusing by itself
IIRC it is inconsistent with other similar effects
So maybe it could generate confusing that way, but in practice it doesn’t
I can accept inconsistency for clarity and flavor
But people treat vanilla Balatro wording like it’s MTG
it doesnt seem to be doing the if reset thenloop at all
it looks like it should work to me
SMODS.Stake {
key = "aqua",
applied_stakes = {'stake_orange'}, -- automatically applies orange yeah
loc_txt = {
name = "Aqua Stake",
text = {
"All things in the shop cost {C:attention}25% More{}.",
}
},
atlas = "Stake",
pos = {x = 0, y = 0}, -- 0
sticker_atlas = "Stake",
sticker_pos = {x = 0, y = 0}, -- make these later
unlocked = false,
colour = {0.203, 0.921, 0.91, 1}, -- g
above_stake = "stake_orange",
modifiers = function()
G.E_MANAGER:add_event(Event({func = function()
G.GAME.discount_percent = -25
for k, v in pairs(G.I.CARD) do
if v.set_cost then v:set_cost() end
end
return true end }))
end
}
``` is anything wrong with this
does it do the other branch of the if
i dont know
the game crashes when i try to select it
it does say upgrade
thats the only thing
nvm it doesnt havent saved my code
hmm no idea
do u have a "Stake" atlas
can jokers contain an in_pool function?
yes
okay i fixed it
sorry read wrong
...small issue?
"All items in shop cost 25% more" why is more capitalized why is it referred to as things arghhtrfefgberigfbrjfb im becoming victin
more
They’re beginning to morb
13 DOLLAR VOUCHER OKAY
tiny issue, this is supposed to be below orange.
btw i would rephrase this to "Everything in the shop costs..."
"Everything in the shop costs."
much cost
If you get clearance sale the price will go to 25% less then what they normally would be I think.
how do i fix this
OH
how do i kill vouchers
okay i should probably fix the placement issue
so
my joker would totally not be broken in this stake xD #1365359484020461699 message
its looking for stake_JCJ_stake_orange, when i just want it to look for stake_orange
how would
i do that
Guess who's back
how did the bullet hell go
I did in fact make it
how do i fix thisss 😭
your question is only 4 messages behind you don't need to shout for help so often lol
ur good
can i use these as the key if i want to replace them (without the extention of course)
No.
okay i understand now
prefix_config = { applied_stakes = { mod = false } },
chat im starting to learn
You would do replace = key
In the sound definition.
oh okay
Now it's my turn to ask a weird question:
How would I make a config option that makes it so vanilla jokers do not show up?
so like
SMODS.Sound {
path = 'musicpath.ogg',
replace = music1
}
It needs to be a string.
im an idiot but yeah thanks
let me see if i have my old code for that
gg, 2 more issues:
"Applies Orange Stake" nono good i need fix
Killing the discount vouchers we hate them 😡
my goat 
wait where is the name of the poker hand stored? is it context.poker_hands?
context.scoring_name
dang
okay i am not firguring out what wrong here
could you help me find whats wrong?
Oh wow that's a relatively simple hook. Thank ya kindly
okay this did not work
uh
any tips on fixing this
ok disregard that one, it had a bug with seeds
this is the fixed one
https://github.com/nh6574/JoyousSpring/blob/f672662a98964a73dc411cbc82dc906b0548375c/src/globals.lua#L105
What's the not _legendary check for?
i didnt have any legendaries at that point so i wanted the soul to not spawn jimbo
yeah
which contextt do i use if i want to copy a joker like brainstorms or blueprints' effect?
im going to give the jokera different effect
you need to use SMODS.blueprint_effect for that
dont ask me how to use it tho i have no idea yet
goddang
does C:money exist
Hi guys, does anyone know how to make a custom poker hand active only when using a certain deck?
try this
#💻・modding-dev message
Why doesn't this work T_T
where shouldi put it? calculate?
yes
yes
I LOVE THIS
unpleasant gradient reference appreciated lmaooooo
wheres gold stake. 😡
when this orang gradient stake shows up at your door
This is so mean 😭
That’s a niche idea I wouldn’t ever come up with XD I love that weird constraint
okay wait why isnt gold stake appearing
Help
Is this your own shader?
Yes
nice balatro version
guys the tariffs hit balatro...
What's wrong?
Sned code
had to mess around with the order a bit.
The shader code
can you print the photo first please, i can't read the code
Thanks to everyone for helping me earlier, finally able to mod my game through xbox launcher
i'm gonna seal the seal everything person with everything if they react again 
🦭
@daring fern 🦭

apart from the nitablade, v.1.1.8?
oh is that "proper russian" modded balatro? interesting
how do i add a playing card to hand?
Try looking at certificate.
i already looked at marble joker, since it'll be with a enhancement that works similarly to stone cards, but i was wondering if smods added an easier way to do it
like they did with jokers
What's the best way to offset a sprite by a certain amount?
I was attempting to use a role to do this, but unfortunately it causes weird behavior when this card is destroyed/removed
You just gave me a new meme to post in all my social circles thank you
how do you change joker textures, like I found the sprite sheet but dont know how to change it
ur wlecome
Like a texture pack?
yeah
add your mod prefix to the shader name
shader = "<prefix>_test"
Im trying to make my own textures, im also doing this through the xbox launcher so i cant download stuff which kinda sucks
at least that's how akyrs does it: https://github.com/Aikoyori/Balatro-Aikoyoris-Shenanigans/blob/02c2c8b46be1763b5202db7d243d1dc8efc65b7e/modules/edition.lua#L38
What would be the best method of making a card-shaped square appear on a card and then expand and fade out? Would it be using a card sized sprite, or using an actual UI element?
what yall think is the most important things to know how to do in lua for modding in balatro?
decided 5 was too easy. have fun!
Basic syntax, way too many people are confused why their mod isn't working and they forgot to put a comma in a table or an end at the end of a function
Vagabond's going to be so bad, but I like the idea.
And also learning how Balatro does it's own formatting, like doing things based on different contexts and using return tables
i would like learning lua but is hard, too many content creators are english and i speak spanish lmao
Could always try doing text-based documentation or real-time translated subtitles
i see some
sure
well thats another problem lmao
maybe i could ask gemini for teach me
that's horrid, great idea
learn a bit of english honestly...like watch some shows in english, it's not extremely hard
Also gonna bump since conversation shifted immediately
my amazing ability to overlook minor mistakes and forget commas despite knowing lua syntax decently well
that's what the editor is for
Overlooking and then fixing is infinitely better than not knowing and having no idea what you're doing
At least then you don't have to go into help chats and say "what wrong with code" and everybody might as well point at the missing syntax with a big red arrow
someone have a good content creator for learning? maybe i could try understand with my shitty english lmao
agree (i have done this by accidentally misspelling loc_txt as loc_text)
Your written English is actually very good, so learning spoken wouldn't be as hard as learning it from scratch, especially with subtitles, you just have to match phonemes with words
I once accidentally swapped my loc_txt and loc_vars
Good thing English is phonetically consistent
you gotta make 1 sacrifice to the syntax crash gods per thing done, thems the rules
OKAY YEP THIS WORKS
Syntax for the syntax gods
how do you check if a card is blueprint compatible?
(technically not a syntax error if it crashes at runtime but I get it)
card.config.center.blueprint_compat: bool I think
Yep, definitely [=
hey, it's us again. it's been awhile but we figured we've got nothing better to do rn. this joker is still acting weird with DNA specifically. it's supposed to retrigger the joker to the right 3 times, and this works as normal with retrigger effects and scoring effects, but DNA's duplication? nope, it only retriggers it Once, yielding 2 cards when it should yield 4.
is there like... an easier way to do that that's been added in the time since we've been working on this mod, or what exactly should we do to make it so card duplication is also done 3 times?
Reminder that it's only visual
But there's no consistent way to check otherwise right?
like this?
im trying to make it copy a random compatible joker
while yes, that value is only visual any joker that sets it to false should be assumed to be incompatible
what yall use for coding in lua? is better vscode or notepad++?
vscode but thats cuz ive always used it, also for other stuf
i forgot to account for the fact that there could be no compatible jokers then i should do smth
N++, though I did Lua stuff in SLADE back when I modded for SRB2.
Should probably do something like
local compatible_jokers = {}
for _, joker in ipairs(G.jokers.cards) do
if joker ~= card and joker.config.center.blueprint.compat then compatible_jokers[#compatible_jokers + 1] = joker end
end
if #compatible_jokers > 0 then
local joker = #compatible_jokers == 1 and compatible_jokers[1] or pseudorandom_element(compatible_jokers, seed)
end
I'm not a lua expert but afaik it's just syntactic sugar on iterating a dict: for key, value in pairs(dict), ipair for if the keys are ints
The code would replace the first 8 lines of inside of the if
Iterate on this? Maybe bring the ret obtaining outside the for loop?
local ret = SMODS.blueprint_effect(card, other_joker, context)
if ret then SMODS.calculate_effect(ret, card) end
ipairs is for when you have an array like { 1, 2, 3, 4 }
pairs is when you have keys like { key1 = value, other= value 2 }
wel i know what the generally mean just not how to use it and when
but i just need to keep writing and ill get it eventually
why yellow line
the local joker doesn't exist in that line
Why isn't it working?
maybe you don't pay it enough?
Trying to get a vibe check, do folks generally like Mods having locked or unlockable content, or just having everythign available from the get go
i love unlocking and discovering stuff
I see you setting a var but not returning it or doing anything with it
i just unlock all
stupid question, uh, what lines should we be focusing on here?
me too! This is why I thought I shouldn't just list all of my jokers and stuffo on the readme for my page
So what do I do? Tell me
because i am. entirely unfamiliar with how blueprint_effect works
for readmes/websites it depends - if you can explain well enough what your mod does without spoilers, that's enough for me personally
or if you are mysterious enough like lobotomy corp (https://github.com/Mysthaps/LobotomyCorp), when i saw that readme i knew i had to try it out and it didn't disappoint (even though i have no idea what lobotomy corporation is and don't understand any references)
lmao
I like that they have a spoiler tag on their readme, I will do the same thing! (I realized I was spoiling things by screenshotting it, so I deleted it!)
yeah, you could also add spoilers tags / collapsibles to your readme
I am not sure if EMult is a thing.
exponential mult is definitely a thing
in fact you should just be able to use emult in the latest versions of talisman???
yeah, but they are just assigning it to an unused local variable
at least, idk if it's in smodded but ik it's in talisman at least.
I think your context window if block should end with something like this
return {
e_mult = card.ability.chips,
card = card
}
Something along those lines
also, uh, sorry to nag/sorry for the ping--how the heck does blueprint_effect work, we can't find documentation ANYWHERE on this? what lines would we put this on/would we need to replace stuff? :o
yeah it's not documented yet it's somewhat new
how can i know in what pos put a deck?
that... wouldn't shock us. it would be nice to know for a fact if we need to like, just swap out a few things, or if using blueprint_effect would render the vast majority of this redundant

do you mean message?
x = 0 is all the way left, y = 0 is all the way up, so something like 3rd row 5th column would be x = 4, y = 2
since i now copied a random joker, how do i make this one activate with that effect?
Unrelated but based pseudorandom seed [=
:3
how can i add a probability-based effect (similar to wheel of fortune) to my joker? i don't have any experience with the randomizer so i don't know how i'd pull this off
What’s the best way for adding +1 discard or hand? Is there a function?
Math.random
Or pseudo
pseudorandom('seed') < G.GAME.probabilities.normal / odds
it's easiest to start by just looking up how the base game does the effect you're basing it off, pretty much everything is in card.lua if you just ctrl+f
Good shout
thanks :3
Anyone know +1discard or hand?
I wanna have a consumable give either temp +1 hand or discard
what or were is pos in the game? i still dont understand what it is
Maybe a hot take but I'd actually recommend looking at other mods instead, since SMODS provides a lot of functionality that makes things easier/more mod-compatible
pos is one of the fields on SMODS.Joker, you can find more info in the docs
Here are some examples too
okay, that works... DISGUSTINGLY easily; the only issues we've seen are "hanging chad/other such 'retrigger a playing card' effects don't get retriggered again", "obviously, now it's not tripling anything at all", also the game acts... Really weird if you sell the card being copied. how can we make sure playing card triggers actually happen/how can we make it so it retriggers the joker in question 3 times/make it. Not freak out if the target is sold?
is there a page of smods that explains some terms?
Here's the page on Jokers
https://github.com/Steamodded/smods/wiki/SMODS.Joker
wiat you know how to use smods.blueprint_effect?
ive been doing it the old fashioned method and im having trouble
no we do not. we're... trying to figure it out right now
btw, i was trying make a modded deck, thats why i asked what is pos for
keep me updated 😭
im pulling out my hair here
and given we just had the game crash on us so catastrophically that it didn't even load the proper crash handler, the game just quit out, it's safe to say we. Don't quite get it yet SGDFHJLK
Ah then use this page
https://github.com/Steamodded/smods/wiki/SMODS.Back
I guess but it would default to the top left corner of the atlas
good luck
if i dont put a pos it will work anyway? and what is atlas? the image of the deck?
Yeah there's a page for atlas too
...did I not say to do the calculate_effect in the for loop to make it activate thrice?
-# Maybe check if the sold card (context.selling_card?) is valid and such, too.
thx
Atlas is just a way of having multiple images in a single image file and organizing them by size and position
But you have to make an atlas
And then your jokers and deck and everything can use it
I just realized that I somehow accidentally committed a list of yugioh cards I wanted to buy. Into the base of my repository. Like three months ago
I would recommend ExtraCredit, it's very approachable and understandable. They laid out their mod super well
i love melffys
Hi
would it be easy at all to change this code to run on the start of a variable reaching a certain value?
I really should work on my mod but like. I don't know...
My first win was with a combo deck of Melffys and Epurrleys. When I got a fully loaded Melffy Mommy, she was practically invincible!
Like you want to watch the value of a variable and as soon as it reaches a certain value perform the code?
pretty much, upon reaching ante 4
Oh if it's on a certain ante you can probably hook into whatever function increases the ante
To edit built-in code, you need to write a lovelyPatch. But keep in mind that a lot of mods like Cryptid and Talisman heavily rewrite the base game code, so it can be hard to get it working
A easier idea might be 'context.leaving_shop` and check the ante there, then do stuff
But context requires a calculate function which requires a card
Or a hook in the right place
Pikmin Poker seems like a really fun idea until I realize I have to program taking the Pikmin out and also assigning them to different Squadrons and then my head starts hurting
It'll be worth it though
After all, me and Pikmin share a namesake
(Carrots)
What do you want to happen once you reach a certain ante?
for my card area to be displayed
And how do I add a name and description to my edition?
try events?
by reading the docs: https://github.com/Steamodded/smods/wiki/SMODS.Edition 
-# loc_txt
ok, I would modify common_events or state_events to listen for ante 4, and proceed from there. You'd need to setup a Lovely patch to do it


no patch needed imo
G.E_MANAGER:add_event(Event({
func = function()
if whatever_holds_ante_count == 4
-- init your stuff here
return true
end
return false
end,
blocking = false
}))
ngl i was just looking for a similar thing to apply to a challenge im doing, just opted to have the game start at ante 4 and end at 8
it's doing the thing AGAIN!
@glad osprey
@red flower
what
what the?
looks like a deck skin? am I missing smth
oh the 5eo
I'm blind
why is it level 0 now?
tbh.... that's still the right number
what did you change? or did it do this all on the same boot?
I changed nothing.
Now that is slick! I haven't used event manager in this way before
and now when I click on a card, it closes the game.
okay, that ALMOST works, but for some reason, instead of duplicating the card 3 times with DNA, it only does it twice...??? (and it still gets mad when you sell the card it's trying to copy if it's the rightmost card)
was having that issue earlier; updating talisman fixed it
how do I update talisman?
wait, do you not have talisman mod?
I do.
oh. just, delete your current talisman folder, and grab the latest release and install that like you would an ordinary mod.
Where's the updated version?
should just be on their github.
i don't know if this is THE solution though, i just got it from the docs: https://github.com/Steamodded/smods/wiki/Guide-‐-Event-Manager#examples
specifically this
God, I just realized I also have to make Pikmin flower over time as well. Why is my first foray back into modding Pikmin again?
Oh right. I'm autistic. /silly /lh
ok, it works now.
You removed the check for if there are other cards to the right of it or if it is the rightmost Joker. Do other Joker effects copy 3 times?
my game for some reason isnt showing cosumable why is that?
i got the consumables to load in now name still isnt right
thats local
You need the loc_txt skeleton for the name
ad
And ask those things
Lol it happens
ik but like i hate getting trippedc over somethign that literally is so simple 😭
this still isnt being picked up
im pretty sure i defined that right
ERROR is my favorite consumable type.
Collection also goes in loc txt and I think it's what makes the collection tab
not mine 🥹
ah
good call
didnt work :/



Well, as a different question, is it possible to color sprites based on G.C colors?
look at Aura
why are we looking at John smods
The card or a mod?
hihi, question :D
so, i'm making a Joker that retriggers played + unscored cards (cards that have been both played and not scored), but it's not working
the mod
i have a deck that gives $1 per unscored card, but this ability doesn't happen, and instead, my Joker says 
can you see why?
@heady siren i wish i could share my code but it's garbage and typescript transpiled to lua
maybe ask @daring fern
bump
I don't see it giving money, and it is calling repetitions = 1 so that would make it repeat
If you want it to give money, then you need to add ease_dollars I believe
return {
dollars = self.ability.extra,
card = self
}
there we go, thats what it should do
that won't work :)
you never need the card = stuff
Ohh I understand now!
surely it's return { dollars = card.ability.extra.money_given }
Why typescript?
because i don't like lua
Lol
reasonable take
hmm, my deck suddenly stopped working
but i got the Joker working :D
the deck doesn't do anything, whereas before, it gave $1 per unscored card
-# (sort of half follow up to this one)
my joker randomly changes cards' suits and ranks, but when it does modify a card (or cards) they happen all at once before anything scores
i think i know why (calculations are done beforehand iirc) but idk how i'd make it only modify the cards once the joker triggers visually
How do I add text here?
loc_txt.text?
The game crashes immediately
Well if you put literally that then I suppose it would
Is there anything wrong with this? The game keeps crashing every time I try to load this
. This right?
I mean in your loc_txt or localization file, there should be a 'text' entry
Like name
well there's a lot missing from that, no loc_vars to fill in the variables (and config), and no atlas to load the joker's graphics
filling that in should do the trick (also gabriel joker peak..)
what's the crash? something to do with atlas?
you are missing the Jokers.png files probably
I have them?
can i see the folders?
Like attach it to discord real quick?
One thing I saw another mod do that caused this same crash was having an 'assets' and 'Assets' folder
no i mean the folder structure
Oh
Mine is capitalized
Let me see if that's it
How would I get that to you? Just a bit oblivious
Lua is case sensitive so prolly
They managed to have both
Nah, same crash
open the folder with vscode and screenshot the contents with everything unfolded
Meant to reply to this
Not sure how they managed that if they were on Windows
if you open the mod folder you're going to see all the files inside in the sidebar
i want to see that
ok what's inside assets
1x and 2x
The filesystem determins that but there's a solid maybe and you shouldn't do wrong capitalization cause then I install it and there's an error
71 x 95 and 142 x 190
Tip: turn off "hide known file extentions"
please
win+shift+s to screenshot
it will copy it automatically so you can just paste it in discord
Thank you
Why does nobody use the print screen key anymore 😭
Some laptops don't have it
can i see a screenshot of it anyway
sometimes it's a very dumb thing you don't notice
Yeah and also screenshit inside the 1x/2x folder
I remember I spent like half an hour troubleshooting someone's Atlas one time and the problem was they made x1 and x2 instead of 1x and 2x
I looked up the smallest netbook I could and even it had it as a second layer on f11 with the fn key
But fair
Mine has print screen on the alt of some other key I don't use
windows 11 also has a setting that changes the behavior of printscreen (you can toggle it to always take a full-screen screenshot), i recommend win+shift+s because it always sends you to the overlay where you can screenshot a region
Mine has an almost full size keyboard because it's a chonker
Can you right click > properties it for me real quick
Which thing do you need?
Just send the window
might be a silly question does anybody know if theres a way to check specifically small blinds? i know 'G.GAME.blind.boss' checks boss blinds, and therefore 'not G.GAME.blind.boss' checks small/big blinds, but is there a way to specifically check either one of them? from my understanding G.GAME.blind.small or G.GAME.blind.big doesnt exist does it?
you can also go to the folder, in the titlebar type 'cmd', and then in the command prompt, type 'tree'. it gives a very good view of the contents
G.GAME.blind:get_type() == 'Small' iirc
thank you i will give it a go
Windows+shift+s is my go to!
no idea personally btw sorry
does anyone here know of a mod which did progressive unlocking. I am not sure how to hook things up to unlock cards on x or y condition
its good, just as confused as yall are
for some reason this inst applying for my enhacement
similar to hiker creep enhancement
you are an angel sent from heaven
ok, your jokers.png is in the assets \1x and \2x folders, right?
it works
Also your joker isn't using the atlas
crash code here
Every one of my jokers references an atlas.
Now it might be possible not to do it
ok, what would I reference here?
Also fuck yeah, Yugioh
when you load an asset, you set the name and file path like this (or something similar)
SMODS.Atlas{ key = "FoxModJokers", path = "foxModJokers.png", px = 71, py = 95, atlas_table = "ASSET_ATLAS" }
Your joker then references the key value.
In your case, your key is 'Jokers' or 'jokers', whatever you put in the Smods.Atlas line
Thanks I really like my Yugi! He picks a random hand (actually the same as Todo list) and then if you play that hand, it unlocks 'heart of the cards!' and the joker flips to reveal grown up Yugi, and then all cards scored for 2x a piece. It increases in strength the more times you play the chosen hand. But it resets back to base after the shop and you have to play another chosen hand to get the xmult back each round
Why does it work on regular cards but not on jokers?
at the moment is still not working
Change key to Jokers
missing a comma after py = 95
Can you do us a favor? Go to your mod folder, and type 'cmd' into the address bar, then type tree and copy/paste that here. I am guessing the file is slightly in the wrong place
where is the adress bar?
Why does it work on regular cards but not on jokers?
FWIW, all of mine are in this folder
Or the 2x variant
reminder
Folder PATH listing for volume Windows
Volume serial number is 4E97-6172
C:.
└───assets
├───1x
└───2x
damn i hope that's going ok
To be very direct your joker file should be here
Mods<YourModFolder>\assets\1x\yourFile.ext
it is
it looked ok to me
Why does it work on regular cards but not on jokers?
Most people put lua files in the root of their mod folder, or in the src folder, while textures / joker art always goes in the assets\1x and \2x folders
How would one go about destroying cards offered by a booster pack
jokers don't use main_scoring (as far as I know)
use joker_main
That is where it is at the moment
Check this mod out, see how they did it?
https://github.com/GuilloryCraft/ExtraCredit
I bet if you compare their's and your's you'll see what's missing
A small-scale vanilla-style content mod for Balatro University! - GuilloryCraft/ExtraCredit
Okay, I'll do that after I eat
That's painfully windows, actually using backslashes for paths :p
Been doing this for a few hours
Sorry man, it can be frustrating to get started
I actually began by sliding my own jokers into the very mod I linked you, I found it easy to understand their code.
After a week or so I understood what I was doing and started over in my own project
It's not working
Don't be sorry, you've helped me a lot and I'm thankful for that
Besides, spent most of that time brainstorming
Because I'm doing a ultra kill inspired mod
Change context.cardarea to context.cardarea == G.play maybe

Use event manager to do it one at a time
yeah you need to use events
Check this out, for unscored cards, this joker decreases the value of those cards
for _, thisUnscoredCard in ipairs(unscoredCards) do
sendInfoMessage("confirming would be modifying card " .. thisUnscoredCard:get_id(), self.key)
if thisUnscoredCard:get_id() > 10 or thisUnscoredCard:get_id() == 2 then
sendInfoMessage("This card is too high or a 2, skipping " .. thisUnscoredCard:get_id(), self.key)
else
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.3,
func = function()
local suit_prefix = string.sub(thisUnscoredCard.base.suit, 1, 1) .. '_'
local rank_suffix = card.base.id == 2 and 14 or math.max(thisUnscoredCard.base.id - 1, 2)
rank_suffix = tostring(rank_suffix)
thisUnscoredCard:flip();
if FoxModConfig.playSounds then
play_sound("Fox_yoshiEat", 1.05)
end
thisUnscoredCard:set_base(G.P_CARDS[suit_prefix .. rank_suffix])
return true
end
}))
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.15,
func = function()
thisUnscoredCard:flip(); play_sound('tarot2', 0.6);
thisUnscoredCard:juice_up(0.3, 0.3);
return true
end
}))
end
end
Hopefully that helps you
It's not working
Ok nvm i dont wanna be flashy
How do you stop a certain booster type from appearing in a deck
Whats the context.pre_joker == thing
I don't know exactly, I saw it in similar code
Maybe just change it to context.pre_joker
Tried it
Whats a good way to have a consumable only show up in packs conditionally (e.g. if theres a glass card in the deck)
in_pool
This is because of the in_pool() function. It also prevents cards from showing up in other locations
If you want to specifically filter it from packs and nowhere else, you could probably make something conditional based on the game state (there are individual states for packs being open)
the game also has prefixes for the packs you can check doing args.source == prefix
thanks!
how do you change a card sprite's xpos/ypos when a condition is met
For reference, the default packs use these appended keys:
- Arcana: 'ar1' or 'ar2' (if it's a Spectral card from Omen Globe)
- Planet: 'pl1'
- Spectral: 'spe'
- Standard: 'sta'
- Buffoon: 'buf'
Modded packs will use unique ones based on your implementation
i will save this
for some reason the chip gain wont trigger when i play a debuffed hand? i looked at matador, and this should be right?
this is in the main file:
also also here's the table blind_keys mentioned there
Iirc card.children.center:set_pos
During consumable booster packs, are playing cards drawn determinable with G.play before in_pool is checked? Would love if my card was only picked if a selected card is available in G.play
mmm jk thats not very vanilla
how can i put plasma deck effect on my deck?
you can write it in the back's calculate function
mult = (hand_chips * mult) / 2
update_hand_text({ delay = 0 }, { mult = mult, chips = hand_chips })```
theres other visual effects you'd need to implement but thats the main scoring operation change
update i checked if the table was the issue by removing the table condition, still no chip gain.
i reordered the if statement to see if it was an if issue (still no chip gain)
UPDATE 2: remembered that i dont need blind.triggered if im using debuffed_hand, so i deleted that part (this did not fix the chip gain)
i just understood what you were saying
i don't think so
my consumable isnt getting a joker when i use from my pool why is that?
i dont know what the problem is because it looks complicated but don't use math.random for gameplay, use pseudorandom
or pseudorandom_element
ok
i classfied them like this ik i can call u have any idea by chance?
i mean that makes sense to me
why didn't this work?
oh wait i see
it should be key instead of id
the comma after y = 0}
ur prbo right lol
ah
removing it still results in the same crash
i return once more am i genuinely just missing something obvious
the scoring itself works fine, but it's supposed to trigger a chip gain if the played hand triggers the boss blind (it doesn't do this. no message or anything)
this is the full code
i have the lua extension installed idk why it doesnt work
you need a comma before update
i see
end,
update = blahblah
does it enter context.debuffed_hand?
huh im still getting a syntax error
i test it by going to a blind like the window and playing, well, a debuffed hand. so id ASSUME, but again it's probably something obvious im missing
so weird
i have a define where the local is string of all of them
omg
i need j_key dont i
yes
😭
i mean can you print something before the if blind_keys check
this will work right?
oh uh yeah hold on ill set that up
print or sendDebugMessage do you think
oh you're trying to set a function to a value, that won't work
i dont remember how set_pos is used tho
same thing
maybe?
hm
i think it's vanilla so no probably
how u setting up ur tarot?
wdym
like ur lua fil
i see
im not sure what you mean
ur file may i see
meow
hm okay now my judgement is invisible ingame
and it crashes when set_pos is triggered
nothing printed oh for the love of god
that's a problem
ok but to what though
🙏
atlas should be fine
no typos
i dont get whats wrong
How are you setting the sprite?
ah
and it uses the default judgement pos
But yeah the pos is probably its pos on the vanilla atlas
i thought i didnt need it because i was taking ownership
i understand now
sadly it did not
not a mod but what do you guys think (still very much in development and missing features)
what code
specifically when an edition is applied to it with
hold on
yeah
when ast_nil is applied to it
it's set_sprite_pos
the only time it gained chips was when i had added cardarea == G.jokers but that....
this only displays x2 and doesnt give xmult anyone know?
card basically enahncement works where it switches x2 to x1 to x2 to x1
back and forth
uhhh what about adding context.main_eval?
where
yeah
alllllrighty
plasma deck is going crazy rn
wait im foolish that was added after that video hold on let me go back and see what it used to be
ok yeah it did the thing in the video when it was this (left) compared to current (right)
do i still add the main_eval context?
seems like that since i put it within the debuffed_hand context, it just doesnt get detected at all
is there a way to make a card only appear in the pool after a certain ante?
bump 2
Use an in_pool function
hmm no it wouldn't work there
it's weird that debuffed_hand doesn't work
you're telling me
is it an optional feature maybe?
like from
This is quite a hodge podge my brotha
wdym
it shouldn't be
I have no idea what I am looking at because it's such a mess
asking just to be sure but you did try lowering the chance right
im not sure how i would set up a toggle mult all im asking
Yeah
to switch from x2 to x1 back and forth
It doesn't work no matter what I set the number to
Someone else got it before me tho actually so 😭
if you do rarity = 4 does it work
What the hell are you talking about? It's a normal looking smods object declaration?
I'm talking about the calculate in particular
Oh fair. I don't know enough smods to evaluate that
lmao
its just a util function i set up
wild how easy editions actuall are thanks bro this is legendary lol
gonna change the debuffed hand context to the triggered blind G.GAME just to see if it's debuffed_hand's fault
would this work
ok while you do that im going to take a quick nap for about 8 hours or so
hell
yo, i think i'm too tired to code, why is this not retriggering the card?
SMODS.calculate_effect(
{
card = randomScoredCard,
message = localize("landedOnFace"),
repetitions = card.ability.extra.edgeRepetitions
},
card
)
it even shows the message so i really don't get it
would SMODS.get_enhancements(v, true) return the enhancment name?
thats a lot of legendaries
turns out repetition stuff NEEDS to be returned and can't be in a calculate_effect!???!?!?!!??
Based
Isn't there a retrigger api? Or is that what that is?
how do you change the interest treshhold
i have no clue...i got it working now and i just accept the magic as is
calculate_effect doesn't exactly work on its own
what's the context here
like your full code
like 5 is to 1 changed to 1 is to 1 or something
can't really share the full code unless you want to see transpiled garbage or typescript but the context is this
context.cardarea === G.play &&
context.repetition &&
!context.repetition_only
Do you only know typecript and just brute force that to work?
(For reference I know basically 0 of any language currently)
it's not bruteforcing LMAO
i just don't expect anyone to easily translate the syntax here
I mean fair
I was being cheeky
lemme fix this now and i'll show how my joker looks in typescript rn
const tetrahedron = Joker({
atlas: "tetrahedron",
/**
*
* @param card
* @param context - The root object
* @param context.after - The root object
* @param context.cardarea - The root object
* @param context.scoring_hand - The root object
* @param context.final_scoring_step - The root object
* @param context.repetition
* @param context.repetition_only
* @param context.other_card
* @example
*/
calculate: function (
this: any,
card: typeof SMODS.JokerType,
context: {
after?: boolean,
cardarea?: any,
final_scoring_step?: boolean,
other_card?: any,
repetition?: boolean,
repetition_only?: boolean,
scoring_hand?: any[]
}
) {
let returnValue;
const isContextForVertex = (context.final_scoring_step && context.cardarea !== undefined);
const isContextForEdge = (
context.cardarea === G.play &&
context.repetition &&
!context.repetition_only
);
const isContextForFace1 = isContextForEdge;
const isContextForFace2 = isContextForVertex;
if (isContextForVertex) {
calculateVertex({
card,
context
});
}
if (isContextForEdge) {
returnValue = calculateEdge({
card,
context
});
}
if (isContextForEdge) {
card.ability.extra.landedOnFace = rollWithOdds({
odds: card.ability.extra.oddsFaces,
seed: "tetrahedron"
});
}
if (card.ability.extra.landedOnFace) {
if (isContextForFace1) {
const unmergedReturnValue = calculateFace1({
card,
context
});
if (returnValue !== undefined && unmergedReturnValue !== undefined) {
returnValue = {
...returnValue,
...unmergedReturnValue,
repetitions: returnValue.repetitions + unmergedReturnValue.repetitions
};
}
if (returnValue === undefined && unmergedReturnValue !== undefined) {
returnValue = unmergedReturnValue;
}
}
if (isContextForFace2) {
calculateFace2({
card,
context
});
card.ability.extra.landedOnFace = false;
}
}
return returnValue;
},
config: {
extra: {
edgeRepetitions: 1,
landedOnFace: false,
oddsEdges: 6,
oddsFaces: 4,
oddsVertices: 4
}
},
cost: 2,
discovered: true,
key: "tetrahedron",
soul_pos: {
x: 0,
y: 0
},
/**
*
* @param info_queue
* @param card
* @example
*/
loc_vars: function (info_queue: any[], card: any) {
const variables: Record<string, any> & unknown[] = [
G.GAME.probabilities.normal ?? defaultNumerator,
card.ability.extra.oddsVertices,
card.ability.extra.oddsEdges,
card.ability.extra.oddsFaces
];
return { vars: variables };
},
pos: {
x: 0,
y: 1
},
rarity: 1,
unlocked: true
}) as {
animation?: {
fps?: number,
frames: number,
immediate: boolean,
next_frame?: boolean,
t?: number,
target: number
},
soul_pos: {
x: number,
y: number
}
} & ReturnType<typeof Joker>;
actually not that far off
from lua
holy shit typescript??
Not that far off meaning it's a modern, ultimately inherently C-influenced lwnguage
Coonie has inherited the spelling demon.
damn
I've always had it. My friends used to call it Coonglish
when I had friends
finally works
okay, new question: returning from calculate with repetitions=2 shows the same message twice...is there a mod or example out there that shows how to display two different messages there?
I should write Jokers in Bash and write BashToLua
That'd still involve learning programming languages though
true
i guess i need to use calculate_joker 💀
I should just port Balatro to Bash ngl... can't be much less efficient then lua, right?... right...
we just dont know

and yes i'm a glorp main now
does anyone know what the table is that get_enhancments() returns?
gleep main here
glorpify roffle
get glorped
Tfw you accidentally open the emoji pane and close it in a panic nevertheless you're paranoid of sending something super sus you didn't endnotes know you had
Lmao. I thought i saw this somewhere
im honestly very surprised that this only appears once in card.lua, considering the emperor
.
oh wait i didnt realize the emperor is right next to it
:p
They're both there though?
Yeah lol
dumdum
im sorry 😭
Thunk didn't really orient around objects very well
i have tunnel vision problem 🥀
So you get weird shit like that
some cards don't have the name parameter anymore though
especially modern jokers
truly,
how could you modify a card based on a condition? as in, if a card shows up at any time, i'd like to replace it with another once conditions are met? so if you were to buy a booster pack and the card appears, it'd be replaced with something else, etc
i love vanilla balatro, so i decided to stick to how
did his jokers ❤️
whats with this random extra space here 😭
If only it wasn't way too late to just rewrite balatro in Smodded code
or are you a 4 spaces tab user
sounds like hell on earth
Indeed... and it'd make mods no work no more anyway
Because they patch into this nonsense
Bed me has arrived…I’ve slept like a combined 4 hours in the last 3 days, imagine the coziness I’m experiencing rn
Sleep doesn't real
are you wanting it to stay in the if statement with #G.consumables.cards?
because as of now i think it is
mhm
hmm
Why... why not just use shiny Espeon, who is actually green?
check the lovely dump and see if it got messed up
Oh shinies weren't in the early 3D games
Lame
im guessing its because the original code doesnt look like that
check the lovely dump after launching the game with that patch at least once
so when my code is checking for the occurrence, theres none, so it cant replace anything
it'll have the full code with that patch applied
i did
hm
it didnt add anything
Sry i‘m new to the glorp game…there is not enough glorp sleep related gifs
I duct realize they predate gen 2
I may be stupid
Lol I love that gif
Coonie what are you talking about
I was just wondering why Espeon was a shoddy recolor
Pokémon?
Now I know
Yes
maybe throw a times = 1 in there for good measure?
lemme try
One is the green cats in the gif is a shiny espeon well... kinda it's a recolor that's a bit shoddy
I‘m sorry guys but once more
and nope
so weird
Shiny Espeon /is/ a glorp. The humans in Johto are just comfused
im gonna resort to another patch, then
here's one
rip
I mean them both
should be the same
Both of them is nice too tho
(Ignore my stroke) i thought I was being clever. I was not
❤️
i got so annoyed on my first day of playing balatro that loyalty card didn't punch the holes out over time so i'm making this just to appease myself
modding balatro while listening to jazz records is an other level of losercore
it's peak tho
today i had What's Going On by Marvin Gaye and now i'm throwing on Miles Davis's Kind of Blue
🤓
Aura did this already
oh cool
If you think about it I was into glorp before anyone. I drew this in third grade
loud incorrect buzzer
My art skill has not materially improved
Loud wait a second they may have not released it but I saw an animation of it in the mod thread
Oh ok
it still has like all the regular hole punch places
i want to visually see how many rounds i have left
as it stands it looks like aura just makes it punch when it hits the 2x
or 6x
I thought aura jokers did things like that?
what's loyalty card again
they haven't implemented it yet lol
Fair
and the animation in the mod thread has too many hole punch spots
maybe i can ask them to push my small fix
what is this 💔
i think conditional texture changing is still pretty finnicky to deal with which is why a lot of that stuff isn't implemented yet
An... quick attempt to redo a suit joker for my planned mod fun scratch
How do i make a sound effect pitch higher each time it plays consecutively? (then reset to its standard pitch once its done)
It’s a nightmare imo, just look at auras current code
Was also done in like 15 min on my phone to be fair
This uh... approach still has much more potential ngl
...oh dear lol
There’s a pitch setting I saw
I don’t know more sorry
yeah i know about the pitch thing but thanks
it works 🔥
-# why do i feel like theres already a built-in function for this
i dont think it actually accounts for modded planet cards and hands right now, hm
Most played hand is definitely built in
yeah, it is, but i havent seen any function that uses that to check for which planet cards are for that hand
actually
i should check telescope's code
Look at The Harlot from familiar
But it might be using anything built in is the point
And tbh... it's best to use smodded ways to do things not
isms
The Harlet
im pretty sure they made their own code for that
-# i think thats just telescope's code fully pasted in, actually
So yeah it's all the same in this case
What does the harlet and telescope do again?
finding the planet card for the most played poker hand
im not sure about the harlet, never tried out that mod
Isn't familiar your mod, lol
Yea, i forgot
this update is out now btw
Oh cool, i made five of those
god wtf nevernamed keeps fucking cooking holy shit
another benefit is that it still lets you use priestess even when your consumeable slots are full
(the ones that actually took skill to program)
so you can stack up your negative planet cards for observatory or something else
how can i make the joker pick between these three sounds to play when it's sold?
"soundkey_"..pseudorandom("idfk",1,2)"
basically, uh
have them all using the same key with the only difference being the number at the end
so that you can use pseudorandom to randomly pick one of them
:p something like that
gonna try to set that up (also hiiiii i only just realized it was you hi bepis hi)
hi :3
yeah?
nornally its just 0 to 1 right?
changing min and max change that too
that also means you want to use math.ceil, floor or something to round up the number
and i think you will want to make it from 1 to 4 instead, since if its only from 1 to 3 then the chance to get 3 is impossibly low, so maybe something like math.min(math.floor(pseudorandom("seed",1,4),3)?
its fine lel
ok last thing before testing
does the "seed" not matter like
it can just be whatever?
it chose the secret third option (play no sounds at all actually because i hate you)
is that not how the context works
what app is that? looks cool
vscode
how do you get that fonts and colors? my code looks bored
jsjsn weird
can u try printing the entire string
install the balatro font from game files
add in vscode settings
wich one are you using? there are like 6
m6x11plus
come again
oh wait
hm
setting min and max actually doesn't print 3.48478483 anymore, its just the rounded number
oh so
"hpfx_death"..pseudorandom("isold",1,3)
that alone should work
and also, if it still doesnt work, maybe try (mod_prefix)_hpfx_death... instead 🤔
ok testing time!!
so i know how to add shaders like foil and polychrome to decks, but how would i add seals? are they shaders too?
No, try looking at cryptid.
cryptid is lowkey the balatro modding bible
if only it used actual smods class definitions but that would probably break some unreasonably stupid backend
I read the source code (old testament)
that too
although i copied hanged man's code for a consumable and it didnt work so idk what im doing wrong
Probably because of the original game using the self argument because the vanilla code is typically in Card table functions?
but where in cryptid
ui.lua
rrr......
it's late so i'll try this tomorrow but thank you bepis 