#💻・modding-dev
1 messages · Page 539 of 1
https://github.com/nh6574/VanillaRemade/wiki#how-do-i-create-a-poolset this is a good start
m_[PREFIX]_[ENHANCEMENT KEY] i think
Question: Is it possible to add a description not connected to an object to G.P_Centers?
ill try that
so for example if your enhancement is tainted and your prefix is yoyorick it will be m_yoyorick_tainted i think
last thing i can ask if the 1 in 10 chance is balanced
if you mean info queues then yes, else if its the main description then yes but you will need to do some hooking
I think it should be rarer personally, especially if it's a common. Not really a "mysterious stranger" if he is constantly appearing. I would try 1 in 25 and see how that plays.
What would that hooking look like?
the rarity is something ill configure later on but i think 1 in 25 is fairer
thanks
But I cannot fully test until I learn how to hook it up but I need to get some rest
hook to generate_UIBox_ability_table or smt, then you want to change the return to be using the new description
Thanks!
why is my enhancement showing a ui error
You need a loc table or file for that
Sorry I’m off to sleep but smods and vanilla remade wiki should help
its fine
And the nice folks here can help
Is it an issue with the enhancement's appearance itself or...?
It's an issue with your localization, mostly
i forgot how to add enhancements to localization so i kinda just needed that
all ik is consumables and jokers
Idk abt the flipped one but for the cyber one
the flipped one
thats the enhancement
the joker isnt finished
i make the names and all that later
once the joker works
If only the SMODS wiki had a thing on localization
It'd be really cool if it did, wouldn't it
i forget that is a thing sometimes
but half the time that just leaves me confused like when i tried to make a deck
that went bad and i packed it in
but for loczation it will be fine
If there's an issue, first consult the documentation on both the SMODS wiki and the Vanilla Remade wiki (I'd provide links but I'm not at my computer rn, if someone else that's lurking here could please provide them)
how is it laid out?
both are on #1349064230825103441 lol
-# I keep on adding it to my threads list idk why discord removes it so much-
this is a bit hard to find because there's not a dedicated ConsumableType page, but it's documented on the smods wiki
https://github.com/Steamodded/smods/wiki/SMODS.ObjectType
inactive threads
but you can just type # starter pack (without the space between # and s) lel
bepus
hi dil
hello
i did not make more progress with what i asked you earlier
i instead made it to another extreme
lmao
ðŸ˜
i made ALL cards say + Mult instead of the amount
what the hell happened lol
mm
yeah you need a flag
you see the card argument in the function?
i tried that also but it didnt seem to read it properly in order to set the correct amount
like it was just + Mult not + x Mult
if card and card.ability and card.ability.converted_to_mult then
--use the new localize
else
--use the old localize
end
make sure its card and not _c lol
oh, that has to do with loc_vars
the place where you patched before has the loc vars of playing cards
make sure your new description is checking the correct place
isnt the right place just the new area in ability, so id just do ability.converted_mult
wuh
or do you mean the localization entry
u do this
How to make a blind appear with a chance?
Oh, I've rewritten the blind system, I'll have to figure out this myself
How do I make a mod load code from separate files?
There's SMODS.load_file(), though it's not as good as NFS
Wait, does the Blind:in_pool even work?
it should
Maybe I'm missing some lovely injections
Because in source code there's no such thing as in_pool
it's in the documentation at least https://github.com/Steamodded/smods/wiki/SMODS.Blind
i assume SMODS.Blind inherits it from a higher-up class that it extends from
im fairly certain in_pool does work, i use it for a blind you can only get by cheating
Yup, I forgot to check blind.toml
Wiki implies, that you can create non-boss blind, which is false
in what way
It's here
you mean showdown vs not?
I have my own system for small and big blind, and I forgot to insert some logic for in_pool
no this line does at least kinda sound like there's a way to define an entirely non-boss blind
boss: Marks this Blind as a Boss Blind and specifies on which Antes it can appear ({ min = 1, max = 10 }).maxis an artifact and not functional. Usein_poolinstead for advanced conditions.
(emphasis mine)
It isn't
i know at some point eremel wants to make a way for custom big and small blinds in smods
It's very simple
he didnt make it sound very simple, said there was lots and lots of things to change to make them work
My system only adds thing, which means full compatibility with other mods (which don't overwrite my patches)
Wait, SMODS doesn't register in_pool in my case
Litteraly, blinds don't have in_pool methods
yea this sounds like an issue with your situation in particular, considering how much you've adjusted blinds
how do I adjust the blind size from a Joker?
Thanks
I'm needing it to apply before going into the blind.
It won't work at least because chips equal to 0 at the start of blind
So how do I get it to find the blind requirements and reduce it by 90%
Wait, I messed up
Are you sure this is the crash report you wanted to send?
i don't think you're supposed to have the commas in the function part of the event
Yup
That's the one I copied from the crash.
@glass scaffold remove thees commas
Did that
Does it work?
WCCollection': [SMODS WCCollection "components/jokers.lua"]:643: '}' expected (to close '{' at line 636) near 'end
Missing close somewhere it looks like
No crashes and now it's working properly.
how do i make a joker self destruct after 5 rounds again
I think it will be not this next release, but the one after
iirc there arent any jokers in vanilla that do that
i mean theres decreasing jokers
but that isnt really what i'm looking for, i just want it to destroy after 5 rounds
Popcorn basically does that
Does it not
Well
make a decreasing joker but the decreasing value is actually just a round counter that starts at 5 and it doesn't affect the joker's calculation at all (except for when it checks when to destroy itself)
The difference is that it reduces its mult every round
sounds simple enough
hopefully
also how do i make it load this folder again
i forgar 💔
.
well in your case jokers is a folder, not a file
it's also in the items folder for you
yeah
the examples in the wiki are for this setup exactly
you would need to do the snippet for loading files from a subfolder, except replace "jokers/" with "items/jokers/"
(and a similar replacement for in the getDirectoryItems function call too)
thankss
epic
ok i have no idea what this is
and also not sure what i should change to make it self destruct after 5 rounds instead of decrease
do i still need card.ability.extra.xchips = card.ability.extra.xchips - card.ability.extra.rounds_left?
or should it just be card.ability.extra.xchips = card.ability.extra.xchips
or just nonexistant
currently it doesnt decrease in rounds but it does give the xchips
This is what i have:
if context.end_of_round and context.game_over == false and context.main_eval and not context.blueprint then
if card.ability.extra.rounds_left <= 0 then
G.E_MANAGER:add_event(Event({
func = function()
play_sound('tarot1')
card.T.r = -0.2
card:juice_up(0.3, 0.4)
card.states.drag.is = true
card.children.center.pinch.x = true
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.3,
blockable = false,
func = function()
card:remove()
return true
end
}))
return true
end
}))
return {
message = localize('k_extinct_ex'),
colour = G.C.ATTENTION
}
else
card.ability.extra.xchips = card.ability.extra.xchips
return {
message = localize { type = 'variable', key = 'a_mult_minus', vars = { card.ability.extra.rounds_left } },
colour = G.C.CHIPS
}
end
end
if context.joker_main then
return {
xchips = card.ability.extra.xchips
}
end
end
ok it still says "-4 mult" when it decreases but other than that it works
how would i change that?
wrong kate
so does anyone know how i can change this to say "-1 round" instead of "-4 mult"
tried message = localize ('-1 Round'), but that didnt work
probably need to do smth in the localization file
now that i think about it
wow i actually fixed it by myself
This is getting out of hand
Now there are two of them!
I wasnt sure where to put crash reports but does anyone know why this Rofflatro Mod crash happens?
There's another one?
Sorry there can only be one Kate
oh not again man
why are there two smods folder
is talisman broken on newest smods
I dont know the only mod I was using was roffleatro
I was using brainstorm seperately, but I turned it off and its dependency before running rofflatro
im quite stuck, does anyone know how to make their jokers give exponential mult?
Either you need to use talisman (and work through all of those issues), or you have to make your own operator, since smods does not provide one.
thanks
good mornin or whatever timezone ye got,
i think i have coded something wrong here
Made a custom file to show which code and what the card should do...
Also it crashed when i played a hand that has not a steel card.
it returns a nil
Context: #💻・modding-dev message
For future readers, what was going on here (for me) was that the intensity of the shader effect tied to how saturated the color is. And it's completely invisible if your chip is already grayscale.
Shiny Stake Not Working (for future search)
use SMODS.destroy_cards(context.full_hand[1])
it should destroy it properly for you
I understand it, but why this doesnt work?
and what difference
and thanks, its works
because in the back end, calculation happens within microseconds, and waht you see is queued events playing out in order, your code doesn't use any events so it just disappears straight away. SMODS.destroy_cards not only respects animation timings, but it also does all the other stuff that you should do when destroying a card to trigger other effects and avoid side effects
oh, thanks, i get it
is there a way to give yourself a joker using the debugplus mod ?
Use zokers mod menu
press ctrl+c when hovering it in the collection
Hello. I ask again if there is a way to destroy and re-construct an entire UI box to update its contents. To be more specific, the settings tab of a given mod.
(or just give me the function that makes the settings tab appear idk)
you'll need to call recalculate() on the UIBox
That refreshes the entire UIBox?
should do
It does not update its contents, tho.
Which is what I want to do.
Apparently hitting this button does recalculate the contents of the UIBox. I don't know where to look for its code, tho.
dont that mod doesnt even work and it also sucks. debugplus is more useful and versatile for testing mods in like every way
thanks
can you show your code for it?
I am just doing G.OVERLAY_MENU:recalculate()
try G.OVERLAY_MENU.UIBox:recalculate()
can you try eval G.OVERLAY_MENU to see whats printed
Does someone have an example code on how to apply a shader to something?
mmm
maybe try eval G.OVERLAY_MENU.UIRoot:recalculate()?
yeah so it doesnt have recalculate, hm
update your tonsmith btw
ok
Are you crazy or smth
-# Crazy? I was crazy once!
oh try eval G.OVERLAY_MENU:recalculate()
G.OVERLAY_MENU is UIBox. Use call G.OVERLAY_MENU:recalculate() 
it seems to have that function
yeah
ive never done that before so i just checked in game lol
I mean, the function exists, but doesn't update the UIBox contents.
to be fair i was basing on eremel's suggestion and kinda assumed it gotta be something in G.OVERLAY_MENU
Checking balatro's code it just seems to recaulculate the position of the UIBox.
:p
It probably has to be something with that.
Since G.OVERLAY_MENU is literally an UIBox.
If you need dynamic content inside, just use G.UIT.O
use dynatext then
😠how the fuck does one use that?
This text specifically should update automatically if you use vanill paginator
yeah you should use dynatext if you want to update the text
nah i made it manually lol
Also does dynatext update itself with the value provided to it?
yeah, though i havent tested to see if it actually updates yet 🤔
the ui documentation in steamodded recommends using either :recalculate() or dynatext for updating text rn
oh
Now, how the fuck does one use dynatext?
bump?
use a G.UIT.O node, in the object argument use dynatext
It is
dynatext documentation 101 mayb?
So dynatext is overkill unless you want animation
huh
i, remember N' telling me about this before but i forgot
i blame the documentation since i learnt ui from there 3:
sometimes, i should do a pr on that specific part later
its pretty misleading
anyways, instead of using text argument in G.UIT.T, use ref_table and ref_value instead
basically what they mean is that it will update the text accordingly to the value of ref_table[ref_value], so for instance if you have ref_table = G.GAME and ref_value = "pluh", it will update everytime G.GAME.pluh changes
My beloved hack:
ref_table = setmetatable({}, {
__index = function() return #G.consumeables.cards .. " slots taken" end
}),
ref_value = "count"

most hardcoded shit ever
3: i wish i understood metatables
i should learn what a metatable is
It's basically getter
dies of death
Like, metatables relatively easy, but in most cases you don't need them
do you look at references while you code
(if we assume you have some implemented class)
is this fine
Sometimes, usually from my own mods.
should i keep the dynatext part, actually
My shit is not working, btw
i would recommend doing it more often because this is not the syntax for dynatext
Did you know that element have tooltip which will display popup on hover? I'm too 
maybe something like If you want animated text, use G.UIT.O with DynaText.?
Could someone construct me the dyna text for me so I can have it as future reference?
can't you look at the vanilla code
The reward will be uh... 1 chip
i dumb
well dedumb yourself
:[
Just look at game's code
That doesn't help me 95% of the time.
In most caes you hae enough info from it
Then not just look but analyze code, you know
"go figure" isn't precisely a great answer, but whatever
it is because looking at any dynatext code will show you the syntax
Idk how differently explain "try to figure out how game uses pieces it has"
do you think i know the parameters off the top of my head
No, but I think you could- nevermind you are on the phone.
if you were saying to look it up i wouldn't have done it even on PC because you can do it yourself:3
mmm would adding soul_set = "Tarot" make it so my consumable is as rare as the soul?
Whatever testing shitfuck and see what sticks
I think that's what it does.
cool, thanks
Though I have gotten like 2 souls back to back, but that might be just luck
I have been trying to localize a message for my joker, which swaps chips and mult
but right now the message simply displays as "ERROR"
this determines the set it can appear in when hidden like the soul
the hidden part is hidden = true
give me a sec so I can show the code
return {
swap = true,
message = localize("charlatan_swap")
}
and right now this charlatan_swap is located in the dictionary section of the misc in the localization file
oh icic, thanks
can you screenshot that
one sec
try localize("k_charlatan_swap")
this is awful advice
I did try but no result
Oh
that part looks fine, i think the problem might be somewhere else in the localization file
descriptions = {
Joker = {
j_charlatan_briscola = {
name = "Briscola",
text = {
"Each played card with",
"{V:1}#3#{} suit gives",
"{C:chips}+#1#{} Chips and",
"{C:mult}+#2#{} Mult when scored,",
"{s:0.8}suit changes at end of round",
},
},
j_charlatan_corrupted_joker = {
name = "Corrupted Joker",
text = {
"{C:red}#1#{} Chips",
},
},
j_charlatan_sette_bello = {
name = "Sette Bello",
text = {
"First played",
"{C:attention}7{} of {C:diamonds}Diamonds{} gives",
"{X:mult,C:white}X#1#{} Mult when scored",
},
},
j_charlatan_primiera = {
name = "Primiera",
text = {
"Each played {C:attention}6{} or {C:attention}7",
"gives {C:chips}+#1#{} Chips and",
"{C:mult}+#2#{} Mult when scored",
},
},
j_charlatan_swappie = {
name = "Inverted Gravity",
text = {
"{C:attention}Swaps{} current",
"{C:chips}Chips{} and {C:mult}Mult{}",
},
},
},
misc = {
dictionary = {
charlatan_swap = "Swapped!",
}
}
}
} ```
this is the whole loc file
misc is inside descriptions there, isn't it
uhh im on my phone so i cant tell haha
same lmao
oh my god I knew it was something stupid
theres an extra bracket under misc though
it is, yes
so in assuming thats the cade
What do you typically write into func(card, layer) in SMODS.DrawStep?
welp
thanks chat
oh also is there any way to turn that message background into a different color
not the text itself but the little square thing
colour = something
https://github.com/Steamodded/smods/wiki/Text-Styling#named-colours-dictionary-gargsloc_colours some colour keys are here
How do I make a shop item change it's cost?
change G.shop_jokers.cards[1].cost if im not wrong
This isn't working even with :set_cost()
im pretty sure using set_cost resets the cost though
context.set_cost when
Okay, I'm trying to learn how to do shaders in LÖVE and in the SMODS Wiki it links to a 'general guide'. The guide uses stuff like
myShader = love.graphics.newShader[[
vec4 effect( vec4 color, Image texture, vec2 texture_coords, vec2 screen_coords ){
vec4 pixel = Texel(texture, texture_coords );//This is the current pixel color
return pixel * color;
}
]]
end
function love.draw()
love.graphics.setShader(myShader) --draw something here
love.graphics.setShader()
end```
in main.lua. That's not how I do shaders in Balatro with SMODS, is it?
you only need to look at the actual shader code from that site
So stuff like this?
vec4 pixel = Texel(texture, texture_coords );//This is the current pixel color
return pixel * color;
}```
yes
is there a context function for gaining/triggering tags?
yipee the shitfuck numbers work
soonTM
oh
omg it's the malverk layout 😲
Apparently
BepisFever did 90% of the front-end so uh...
does anybody here know how balatro programs random chance?
like what the specific lines of code are
looks into how pseudorandom works
I think it quite literally pulls an os.time() for the seed
Everything else go figure idk
functions/misc_functions.lua:253
So, what I'm doing: I modify G.GAME.inflation in an ease_round-like function. I want to make card cost update
Hello, i am making this joker that should tax you if you die, with enough money,
yet if i test this saving ability the dollars don't get taxed but added instead.
im pretty sure it works
please use ease_dollars instead lmao
I'll try to use an event for this thing
yeah you are probably setting the cost to something before :set_cost() runs lol
Yup
But when I do G.shop_jokers.cards[0]:set_cost() manually it works
instead of what, which line
also, your math here is wrong im pretty sure
for instance lets say my current chips is 50, and requirement is 100, so i would have something like this
((50/100 - 1) * 100)
= (0.5 - 1) * 100
= -0.5 * 100
= - 500
G.GAME.dollars = G.GAME.dollars - - 500 is + 500 basically lol
G.GAME.dollars = G.GAME.dollars - ...
ease_dollars(mod) increases money by that amount, while also having that pop-up animation for when money changes
bepis whats pemdas
i guess i coded that at 2 am in the morning,
...pemdas?
parentheses exponent multiplication division addition subtraction
Order
so what i wanted to get in the first half at Ln 12 was...
current chips: 50
Required = 100
((1 - 50/100) * 10) ... this?
which should be now not negative and neither be astronomically high.
yet at the second half at Ln 17
have you meant this?:
G.GAME.dollars = G.GAME.dollars - ease.dollars(mod)
no, just ease_dollars(-((1 - 50/100) * 10)) (or what the values actually are)
hold on doesn't the '-' between the 2 '(' make that value negative or was this meant:
G.GAME.dollars = ease.dollars(-((1 - 50/100) * 10)
Mod is the value you want to add
also it's ease_dollars with an underscore
how can i write something like #1#*2 (doubled value of first var) in localize file?
without additing new var
Double it in code
You can return in loc_vars addition doubled value
so this should be it right?
thanks
The (1-50/100) was an example
also it's just ease_dollars without the G.GAME.dollars =
Replace 50 and 100 with... uh, what did you want in the first place
oh jeez my attention span in the negative, yippiee
So i have changed it so that it works, the death attempt will be taxed.
How to increase reroll cost?
Good schmorning chat
hello dilliard
G.GAME.round_resets.reroll_cost
same
We're so twin
It's 3pm for me but I have just awoken so I accept it as morning
It is 0917 for me :b
But i have also only just woke at 3 pm or later
I hope your rest was awesome
It was, I was sat on my sofa coding last night n passed out in the middle of it, feel a bit lost on what I was actually going for here but ima try make sense of it
What are you trying to do
A custom enhancement which didn't work, and a joker that has a 1 in 2 chance to apply it to any card in played hand
Probably gunna make that a 1 in 10 tho
Thanks
Whats the enhancement
It's kinda of like lucky but less money lest mult and comes with XMult too
And the odds are a bit lower
But it doesn't sork
Does vremade have it so you could just adjust that
That's what I had done, must have bcoz it has the lucky cat explination under it
All I did was change the odds and add XMult value and change the names around so it wasn't vremade lucky anymore and was my enhancement name
Yet I got nothing ðŸ˜
Hmm
That seems odd
Just shows as error in game and doesn't give the effect
And my joker is having a hard time applying the enhancement but that's the joker issue not the enhancement issue since it recognises there is an enhancement to give
It's a bit of a wild problem only half asleep coding end up with
is this joker i made even balanced? It is atleast not blueprint compatible.
No
Why’s it rare
i mean inherently large numbers by default are not traditionally balanced, its just a one time use
it's rare, so that you have less chance of getting it.
well besides getting it from tags and tarot cards
I mean it's not an uncommon
one time joker stay with you for 1 round. You can make X666 Mult but it still help you to beat 1 round
also i did have changed somethin to this Joker (see response) to 2.5 mult
What plan?
I just think this is funny so i’m gonna throw it here
Best part is when you don't fucking know what the error means.
Missing } to close { at line 82628
error in main.lua, line 48
main.lua, line 48: }
And attempt to call a nil value
the fabled whatever the fuck you call this
the fabled nil check
at least thats what i call it
the plan to spread music
Yeah actually you attempted to call Global variable hand (a nil value btw )
i guess idk
The power to fucking change texts with DynaText
I am still working on changing all the values.
:o
the shitfuck
I will update it I swear.
Is there a way to remove the pixel filter on the background? I want to get unfiltered screenshots (like https://www.reddit.com/r/balatro/s/s0BZN4dZN0)
Set CRT to 0
(other stuff is unimportant here)
Can't wait for DebugPlusPlusPlus to drop
DebugSharp I'd say
A fully functional IDE in balatro
ftrust
The crt?
No the pixel filter
It’s in the shader code
You can grab it and export it to shader toy or any other shader
And remove the pixelated effect
Because i tried changing the background shader and it didn’t work sadly
You can change it and recompile the game but that’s against modding rules (altering game files )
Yeah I figured
theres a mod that removes it i think
i remember seeing it once
If it changes the shader I’d appreciate seeing it
How can I test how my shaders look or if they even work?
or add them to the draw function of an object but making an edition is probably easier
Mhm
And how do I apply it to an edition?
Okay, thank you :3
Oh
I think you need to type modprefix_shaderkey
I think i had this issue (not sure if it’s in the edition or draw function )
Turns out you cant just comment it out😢
Shader code is painful
Try sending values with debug plus
hey, how can i make SMODS.add_cart to create a card with a garantee random edition?
There’s no edition_poll like seal and enhancement
But you can make a table with editions keys and use pseudorandom element
whats poll_edition?
SMODS wiki at it's usual
this is all documented in the smods wiki
Honestly N
There's no poll_edition in smods wiki
You might have cooked with the wiki
Maybe I'm looking not in the right place
Yup, it's just unorganized
definitely is at the bottom
Same
why is it unorganized
Hey dilly
where should it go
hello
Utility page
Is smods.font a thing in the wiki
but it's not an smods function
no
Is someone making it ?
Smods overrides it
it doesnt change the signature
N' did you collaborate with SMODS or smth like that?
breeze said he was going to but idk if that will happen
I might do the SMODS.font if i have time
Yes
i do contribute to smods a bit
Eremel said my fork is useless
waos
LMAO
im not part of the "smods team" so i dont have any decisions over it nor did i help make it in the first place tho
Yeah N just came and conquered
yo
I think i need to help make a shader replacement function
Or hook
I still haven’t done it but one day
i think i need to uninstall balatro
still a dev question, but less specifically about code and more about the best way to set up an object. I'm converting the Counters I added to Kino so that they are their own object type. They function similarly to seals and editions, adding an additional calc to playing cards and jokers. Unlike editions, though, behaviour for Counters is slightly different between them being on jokers and playing cards, some are exclusive to only one, and all of them have an additional sprite sheet depending on what they're on.
For sprites, do I just have people give two atlases and poses, or do I force people to use a specific standard so i just extrapolate the one from the other? 🤔
I think stacked src can help
Oh, yeah, I should see how Bepis handles pools as far as different types of effects goes, because it adds both detrimental and beneficial effects
i think 2 atlas makes sense
atli
I think he mentioned you can add any effect because it works just like a joker calculate function
You might want to configure it a little to work on playing cards
And yes 2 atlas makes sense
Oh, yeah, that part isn't the part I'm worried about, luckily, haha. Only thing I'm wondering for that if whether it makes sense to set up two types of calculate function, but just typing that, I'm already realizing that's unnecessary, haha
Getting these things to trigger won't be an issue. I'm mostly just trying to figure out how I keep the logistics simple so other people that wanna use this API don't get overwhelmed, with the subdivisions that these objects make. The functionality itself seems to already work as I expect, in my first quick test, luckily
It is currently, but I'm setting it up to be its own mod for people that want to use the designs without wanting to require the entirity of Kino. Also because I already know that if I'd make another content mod, I'd want access to counters as well, haha
Just because I really like the space they open up, and I think other people probably can do some creative stuff with them, too
Why do I need to declare mouse_screen_pos and screen_scale in my shader? I didn't read anything about that
Very nice ice
For hovering effect
because balatro passes those by default
i think draw_shader has a custom_shader parameter to avoid that
You can just add it and do nothing
👀
I'm gonna force you to make some archetypes that use counters, N, be warned
i have a doc for the spell counter archetype
but i couldnt be bothered to make the ui for that
also gonna force the people at pokermon to use the investment counters to make ghimmigoul jokers, probably
How? I added extern with them and I still get that error
seems goofy, think it'd be a fun addition to a meme mod
Look at ethe ionized code
It literally says just copy someone’s shader end edit it
are you up to share that? Currently, the way I've implemented counters, they max out at 9, just because that's how I've maxed the visuals, but I think that might be limiting it a bit
I think it could add a little layer of challenge
And skill
Since balatro is just RNG
very mario rpg
Where?
Why do I even use sprites to display these numbers? 🤔 This seems... unneccessary
do y'all know how balatro programs random chance?
want to make a joker with an RNG mechanic and i want it to be affected by oops all 6s
how do I change #something to #somethingelse with this ast structure?
pseudorandom('seed') < G.GAME.probabilities.normal * numerator / denominator
Or, if you use latest SMODS version
SMODS.pseudorandom_probability(card, 'seed', numerator, denominator, 'identifier')
(https://github.com/Steamodded/smods/releases/tag/1.0.0-beta-0711a)
Smods mod examples under edition
oh yeah scaling detection is in smods now
yeah but It's not automatic
automatic is not possible
whatever the user wants to define as scaling?
self-scaling when a card scale themselves
so it shouldnt be automatic
scaling when a number is added in a card value
I have jokers that do that automatically every frame
they use card.ability?
Which I wouldn't mechanically want a player to interpret as scaling
and why would u put card update stuff in card.ability
why cant it be in card.ability?
well
I can just read the other code
and then define If It's a scaling value or not that way
by the code context
Because the jokers are all of the 'Gives [score], slowly go to 0 over 120 seconds'
i dont believe you understand the actual issue with automatic scaling detection
yeah cuz there's no issue
there's a fix for everything
it only depends If I would spend my time fixing it or not
the issue isn't code related
what how
I also have multiple jokers that scale internal values that aren't meant to be player facing, for example. I also have a joker who's value gets randomized under certain conditions, but I would not want a player to think of that as scaling.
the issue is that scaling as a concept isn't equivalent to numbers changing
numbers changing isnt scaling though
numbers changing is numbers changing
thats what am talking abt
the word scaling is too limited for the concept
I believe in my little steve
okay then numbers changing isnt what you want to do
yeah
for me two values getting a math operation done on them by itself or another card = scaling
I made a joker that increases the consumables slots by 2 when it's on the joker slots (like juggler does for the hand size).
Although the game gives me error saying that "consumable_slot" is a nil value.
How can I fix this?
but setting it like cardvalue =-321 not scaling
Because it's G.consumeables
And it's not working like the hand
Internal counters also exist, but don't actually count as scaling. The following two abilities would interact differently with the rules of anything that cares about scaling:
Gain +1 mult whenever a face card scores.
Gives +1 mult for each face card that has been scored.
I'd also say that within the context of Balatro, there's ways of numbers being operated upon that I wouldn't default to calling scaling. Like Hit the Road
ah, I forgot which was the right command for consumables slots
G.consumeables.config.card_limit = G.consumeables.config.card_limit + card.ability.extra.consumable_slot inside of an event inside of a add_to_deck
your system will eventually require manual developer intervention so why not just use the system thats in smods already
cuz automatic is better
sorry if this is dumb but what's the thing here
okay if you dont understand the problems with your solution then go ahead
And the same thing in the remove_from_deck but with a minus sign instead of plus
There's no problems that can't be fixed
it should be == instead of =
I suggest you to learn lua
alright. Good luck!
ohhh lmao
thanks for the help!
Scaling definition involves shrinking or enlarging something
So I guess hit the road counts as scaling
since it enlarges whenever a face card isnt scored
and shrinks whenever it is
In geometry
(I just searched it up didnt knew abt that before)
Also, don't rely on math.random, it's results are not controlled by your run seed
Oh
do you play other card games at all? I would not transfer mathematical concepts into rules design
is that really important? i kinda want it to be as random as possible
i think this is one of the cases where math.random actually makes sense
this will check to run os.exit every single calculation made by any card, by the way, so if you own this joker and do anything, it will basically be guaranteed to trigger
using pseudorandom would mean there will be one point where os.exist will always run lol
I like it this way
ah, fuck. any fix for this?
id rather have it math.random
I'm so confused when it comes to making shaders. What does what? And I can't find a good tutorial TwT
include it within the main context check
just use contexts
Just a more straight way to crash your game instead of playing with entropy
put it inside the context function, shoulda done that earlier
about to investigate your code agai, btw, Bepis
gulps
returns always end the function, so you can't put things after the return
i need a comma, don't i?
holy shit i'm dumb ðŸ˜
i did computer science lmao
how did my teacher not execute me
You can't put a code inside of a table (or an array)
wuh
out of curiosity, do you have lua extension installed 🤔
-# also that doesnt even look like vsc
i'm on notepad++ ðŸ˜
having visual studio code + lua extension can tell you where in the code is wrong
if you dont like microsoft theres vs codium or something
lsps are worth it use them whenever you can
Oker is born.
I didnt know stacked is that big
you can always try again
Bsr will never see the light of day
:3
Did that too :p (because it destroys the first drawn card)
And what it does?
That's pretty cool!
thanks!
It's a portal pew pew!
what's the full effect? does it just destroy the first card drawn?
yup, but I unintentionally made it a quick time event (you can move another card to be destroyed instead)
which, eventhough it's not very vanilla, makes it a better Joker sooo
Imma keep it :)
yeah that's the idea
G.GAME.hands[handname].level I think
ty very much
no because i lied, i deleted it :3 (i forgot)

Can someone help me with this? I found the problem in card.lua, but whenever I try to fix the file, it reverts back to the previous state.
Syntax error: card.lua:1606: '}' expected (to close '{' at line 1589) near 'playing_card_joker_effects'
Additional Context:
Balatro Version: 1.0.1o-FULL
Modded Version: 1.0.0~BETA-0711a-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.8.0
Platform: Windows
Stack Traceback
===============
(3) C function 'function: 0x1a1c7d98'
(4) global C function 'require'
(5) main chunk of file 'main.lua' at line 884
(6) global C function 'require'
(7) LÖVE function at file 'boot.lua:323' (best guess)
Local variables:
c = table: 0x1a1e1dd0 {identity:false, version:11.5, accelerometerjoystick:true, modules:table: 0x1a1e1e20, gammacorrect:false, title:Balatro, externalstorage:false (more...)}
openedconsole = boolean: false
confok = boolean: true
conferr = nil
(8) global C function 'xpcall'
(9) LÖVE function at file 'boot.lua:362' (best guess)
Local variables:
result = boolean: true
(10) global C function 'xpcall'
(11) LÖVE function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])
inerror = boolean: true
deferErrhand = Lua function '(LÖVE Function)' (defined at line 348 of chunk [love "boot.lua"])
earlyinit = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])
and apologies if I used the incorrect chat
if it's an error in card.lua, then some mod is patching that file and that's where the error is coming from. editing the files in lovely/dump/... won't actually do anything, SMODS/lovely dumps the patched versions of the vanilla and SMODS files there for reference only and doesn't read anything from them
How would I get a Joker from a specific mod?
<@&1133519078540185692>
elaborate, what's your goal here
booster containing jokers from only my mod
joker.config.center.original_mod.id == "modiid"
it's easier to just add your jokers to a pool tho
I'll try that out
Hi i would need some help, i want to make a system that at a start of an ante gives a random modifier for the entire ante(something like boss blind but for all blinds). Problem is i have no idea how would i make something like this
is this global or only for a deck/challenge/other?
global
i would recommend waiting a couple of days for the next smods version
it allows using a calculate function globally similar to jokers
ok thx
N' i have a question, what would be needed if instead looking for the highest level, i was looking for the most played hand?
ah
what is the held in hand at end of round context for seals/enhancements, if context.end_of_round and context.cardarea == G.hand and context.other_card == card is just doing nothing for me, am i being silly with something
<@&1133519078540185692>
true
thx mods
one day i might just join one of those and see whats up
okay so if i know anything about this its just going to make you "verify yourself" via an external website which actually just gets you hacked in some way
thats a shame lol
this should work according to the vanillaremade blue seal
yeah this is what im getting it from but for some reason it just doesnt lol
did you just directly copy vanillaremade blue seal?
because then it could also just be an issue with vanillaremade
just the context check, and i get this error when it gets held in hand at the end of round (which makes zero sense)
INFO - [G] 2025-08-15 19:20:08 :: WARN :: DefaultLogger :: Found effect table with no assigned repetitions during repetition check
this is the code btw
SMODS.Seal {
key = 'adddollarsheldinhandatendofround',
pos = { x = 0, y = 0 },
config = {
extra = {
dollars = 1
}
},
badge_colour = HEX('000000'),
loc_txt = {
name = 'add dollars held in hand at end of round',
label = 'add dollars held in hand at end of round',
text = {
[1] = 'A {C:blue}custom{} seal with {C:red}unique{} effects.'
}
},
atlas = 'CustomSeals',
unlocked = true,
discovered = true,
no_collection = false,
calculate = function(self, card, context)
if context.end_of_round and context.cardarea == G.hand and context.other_card == card then
return {dollars = card.ability.seal.extra.dollars }
end
end
}
fire name
one of my best
close the formatting with {}
thanks
i love how i'm learning a few more of the basics
thank you, everyone in #💻・modding-dev
the error makes sense because end of round is called with repetition
so it seems to work, you just need to restrict it to individual
i did not know that lol
Can I make one of my jokers appear multiple times, like with the showman effect, but for 1 joker?
yes, there's a return value in in_poolfor that
regardless of the warning, why do the effects just not proc still, am i doing something silly
all i want is a working card held in hand at the end of round for enhancements and seals ðŸ˜
no idea haha
its weird that it runs but doesnt do anything
can you write what i need to put into joker code?
or guide fot it
because idk how in_pool works
in_pool = function(self, args)
return true, { allow_duplicates = true }
end
thank you very much 
I have a question guys, so when I use this Joker it change the enhancement but just visualy for some weird reason is there a way to make the enhancement change for real and not just visualy. And is it possible to make the joker shake when upgrading the card as well
My can_use function is never getting called.
idk why fr but you should have in the use function (self,card,area,copier)
what are you talking about
area and copier are in the docs yes
it's never even printing the debug print you have?
yep, not even that
the joker wiggle either return a message or something, or call card:juice_up() As for the enhancements not having the effect on the same hand i'm not sure, I've had a similar issue for jokers that enhance cards.
I forgot that for the wiggle
thx
Oh, i might be stupid
I realized the issue, it's completely unrelated
I moved the location of the file and but didnt change it in my text editior 💀
hmm i got 3 jokers that don't wanna work as i intended them to be
how did you manage to fix it
for the enhancement I mean
I didn't. Although it doesn't really matter to me as its kinda a balancing feature. Although.... hang on, lemme check something
kk thx
I'll wait
The code from Midas Mask in V remade does work. I'm not sure what about it causes it to work, but it works for me.
Here's my implementation:
if context.before and context.main_eval and not context.blueprint then
local clubs = 0
for _, scored_card in ipairs(context.scoring_hand) do
if MODE_UTIL.check_suit(scored_card, "clubs") then
clubs = clubs + 1
scored_card:set_ability('m_bonus', nil, true)
G.E_MANAGER:add_event(Event({
func = function()
scored_card:juice_up()
return true
end
}))
end
end
if clubs > 0 then
return {
message = localize('mode_k_bonus'),
colour = G.C.BLUE
}
end
end```
I don't have main_eval it can be because of that ?
maybe? IDK
No its not because of that
How do I make my joker not show up in the shop/boosters and my seals not in booster packs as well.
?
for seal in_pool = function(self)
return false
end,
whats your upgrade_enhancement function
Oh, yk, it might be the other args in set_ability()
it's because you're doing it in events
oh
so the enhancement changes in line with animations which are after calculation
get rid of the event and do card:set_ability(key, nil, true) instead
that'll respect animations still but actually enhance the card in the correct sequencing
can 'remove = true' work at this cardarea?
Asking because this doesn't work:
calculate = function(self, card, context) if context.cardarea == G.play and context.repetition and not context.repetition_only then if context.other_card:is_face() then return { message = 'Again!', repetitions = card.ability.extra.repetitions, card = context.other_card, remove = true } end end end,
like that
hi there whoever is reading this, i am trying to create mods for balatro for the first time and i have never used lua before. could someone explain why this joker will not work? the message appears in game but the functionality does not work `SMODS.Joker{
key = 'snake_eyes',
loc_txt = {
name = 'Snake Eyes',
text = {
'Play 2 Aces',
'Create Random Spectral Card',
'Destroys an ace played and random card in hand'
}
},
atlas = 'snake_eyes_art',
pos = {x = 0, y = 0},
calculate = function(self, card, context)
if context.joker_main then
local aces = {}
local hand_cards = {}
for _, card in ipairs(G.play.cards) do
if card.rank == "A" then
table.insert(aces, card)
end
end
for _, card in ipairs(G.hand.cards) do
table.insert(hand_cards, card)
end
if #aces == 2 and #hand_cards > 0 then
G.E_MANAGER:add_event(Event({
func = function()
local ace = aces[math.random(#aces)]
if ace and not ace.destroyed then ace:destroy() end
local rnd = hand_cards[math.random(#hand_cards)]
if rnd and not rnd.destroyed then rnd:destroy() end
create_card('Spectral', G.hand)
return true
end}))
end
return{
message = "SnakeEyes Activated"
}
end
end
}`
no, remove=true is only in the destruction/discard context
yeeeeeeeah it work thx
is there a way i can add simple descriptions from G.localization.descriptions.Other to decks? like in a normal center's loc_vars i can specify info_queue[#info_queue + 1] = { key = 'myKey', set = 'Other' }, but i can't do this for decks 
no idea
is it even possible to destroy played cards?
idk why you pinged me tho
yes, use the destruction context
and for joker?
same thing
probably the same thing ig
and where should that context be placed?
i mean what i did here is wrong...
sup guys, how do i make a custom deck? (e.g: starts with a specific joker, 4+ hand, &c. &c.)
Not sure if this counts here since I'm not using smodded for this but I was making a deck as a surprise and I thought it was kinda cool that the game sorted the deck automatically since it's unlocked by beating purple stake
It could also be me putting it before erratic and forgetting but I'm pretty sure it just sorted itself
copy_card can transfer vanilla enhancements and editions, but not modded ones
afternoon
is this a good start?
no i hate the guy that wrote that
imposter syndrome strikes once again
the example is about adding to deck is there a way to make a hook when you play a hand?
what do you want to do
when you play a hand roll a 1 in 25 chance and if succeeded spawn in this joker
i already got the rest programmed in
I didn't recognise that because who on earth uses light mode on git
i prefer the light mode on github sorry
local card_add_to_deck_ref = Card.add_to_deck
function Card:add_to_deck(from_debuff)
local ret = card_add_to_deck_ref(self, from_debuff)
if not from_debuff and -- If the card wasn't added by being undebuffed
self.ability.set == "Joker" then -- and the card (`self` in this case) is a Joker
-- Adds it to the run's global table.
-- It is recommended (but optional) to preppend your mod's prefix to any global variable/field to prevent mod conflicts
G.GAME.vremade_joker_added_counter = (G.GAME.vremade_joker_added_counter or 0) + 1
end
return ret
end
is there a way to randomise the atlas pos when drawing or appearing a sprite, ie a joker?
You’re a madman
Math.random()
Make an update function to update the sprite
i figured with the random function i mean when are you supposed to do that
update = function()?
when do you want it to randomize
You can just change it in the pos
But copies of this joker will have the same sprite
then its not what they want lol
You can use card.children.center:set_sprite_pos({x=0, y=0}) if you have them on the same atlas
Idk i’m not a mind reader
in the set_ability?
youre a reader reader
what about a minder mind
my mind is very mind
ðŸ§
Should work
If you put it in the update it'll change every frame
set_ability = function()
card.children.center:set_sprite_pos({x=Math.random(0, 1), y=Math.random(0, 1)})
end,
yeah i figured with that
-# Also use "load = function()" to update the Texture after returning to a run 
i dont think you need to
appreciate the suggestion regardless
I usually do, I had textures suddenly reset after a full restart 
Isn't math lowercase?
Quick Question: Using main_start in a Deck/Back Description probably doesn't work, if I had to guess...? 

Find out
thanks
how do i change the color of the particles that appear when you click on a consumable type in the collection?
Honestly I think it could work depending on how your write it
now there's this but take your time or even give a resource i can look at to figure it out myself
Well, I tried (like the misprint joker) and it did not work so I'm asking to see if it's different or not possible 
You can do dynatext
(If you’re using the pos method )
yeah true
Just make a function that updates every frame and make it update a gloabl string variable and use it in desc
And return it in loc_vars
-# That is the Code I tried and it does not work ;p
god damn it
N my savior
This should work
I understand now, did not think of that as called Dynatext but yeah I can try that xD
-# But that wouldn't update the Desc. in real time 
Well there’s definitely an easier way i’m just lazy to look it up
(You can be lazy and not make an update function just add it to any drawstep you have since it updates every frame
it creates a bunch of green particles meanwhile the other types create particles of other colors, i dont think it's connected to the primary and secondary colour of the consumable type
Nah no need, I get'cha I get'cha
I really only need to change one small thing, if it doesn't work I'll just skip out on the lil flair x3

That’s the dissolve shader
(I think)
You need to send a color variable to the shader to change it
Tldr : it’s a lot of work for a simple thing just leave it like that
Nobody is checking the consumeables (maybe once at max )
I mean it depends, you could also copy paste the function from Card.lua in the Base Game and modify it - with custom sound and everything... At that point you could use it everywhere too! x3
for the time being im going to go make the art for record skip
feel free to mention me for resources of hooks or a solution if you have done something similar
Too lazy
I Give up
For what exact
@cursive gazelle
Alright
Seems like a relatively simple patch
heres the code i guess
oh i forgot to alter smth from the steamodded header oopsies i am not using dark mode
is there any good documentation on pools for jokers, spawning them in, destroying, manipulating pools etc, im adding it to joker forge so i need to know EVERYTHING
"is there any good documentation" no
..... why did you put this in main lmao
i wanted to condense the whole texture pack into one lua
Wheres the guide on how to mod the game
the "starter pack" pinned in #⚙・modding-general is a great starting point
Thanks
pools as in in_pool functions or SMODS.ObjectType or something else?
should i seperate luas
have another joker idea. gonna see if i can program it
Lottery Ticket
-$5 when blind selected
1 in 8 chance for $100
just a rough idea
but my last joker didn't care for balance
How would I go about making a copied card use a specific card back rather than just the default red back?
oh i thought i pr'd smods to fix that
I want it to use a card back that isn't the current card back
ohh i put this in set_sprites
https://github.com/nh6574/JoyousSpring/blob/35c57684b6e795915e9b9ea47c6b240e1283c5ea/src/card_ui.lua#L434
you can do it after you copy the card if it's not one of your cards
objecttype
i mean i dont think theres much for that outside the smods docs
i dont think there's much documentation other than the objecttype page and some bits on my wiki
Umm quick question... this here won't work, isn't it?
it only does the sock and busking thing so thats something i guess.
i apologize but i guess lua coding ain't really my strong suit, no pun intended..
im sure i will figure some stuff out lol
That worked, thanks
put the whole destroy_card if block outside of the repetition block
k thx, that one finally worked.
incase somebody wonders how far i am with this thing got only 1 joker left that needs to work...
edit: switched up the required enchancement on 1 joker.
get_id doesn't have arguments tho
suit.key should be correct
not v:get_id() will always be false
How would i ensure it isn't that rank then?
get_id() ~= id
That worked, thank you!
Right now, your limit isn't going to work. Instead of only giving seals to the first 3 cards in suit_cards, the code will instead apply the seal to all cards, up to 3 times per card.
You don't need the limit variable at all. Instead, replace the line for i = 1, limit do with if k <= 3 then
Noticed that but fixed it before i saw this ping, yours looks a bit cleaner though, thanks!
getting an error that says line 52 is attempting to call a nil value, any reason that'd be?
(I have very little Lua knowledge)
ur just trying to load ur files, correct?
yea
i'll also note that this isn't my own mod; I'm debugging a currently existing mod
the chunk from file ConfigHelper.lua errored so it returned nil
try replacing it with assert(love.filesystem.load(modpath.."ConfigHelper.lua"))()
Now it's just saying the filedoesn't exist lmao
Try "/ConfigHelper.lua" as the modpath might not end in a /
all it does is add an extra slash at the arrow
In that case, try using assert(SMODS.load_file("ConfigHelper.lua"))() to load your file instead. I use that to load my mod's files and it works perfectly fine.
This is so outdated ðŸ˜
Mods aren't loaded like that anymore
yeah this is 100% a graveyard mod, I'm basically just trying to see how many mods I can cram into my game before it gives up entirely
this worked! tsym <3
Actually it might not be
This feels like it might be an old mod tho
If it is, you may encounter some errors
I'm definitely expecting a lot of those lmao

