#đ»ă»modding-dev
1 messages · Page 542 of 1
(bump?) like do I need to add all of the JSONs and stuff included in mods like cryptid
will try :3
Yes
woohoo
Check the aikoyori joker in aikoyori shenanigans
It has a spinning animation
Might help as a reference
If im your place
I would check the smods example page
It has a really good explanation on how mods work and comments of stuff
And once you have a brief understanding of mod structure you can start by reading the wiki docs
bump2
Because G.UIT.R aligns children vertically along their baselines
How can I change that?
Something like this
{
n = G.UIT.C, config = {
align = "cm",
colour = G.C.BLACK,
padding = 0.1,
h = 1,
w = width / 2,
},
nodes = {
{
n = G.UIT.T, config = {
text = "CONSUMABLES",
colour = G.C.RED,
scale = 0.5,
vert = true,
},
},
UIBox_button({
colour = G.C.CSTORM.CON_BUTTON,
minw = 3,
minh = 3,
button = "cstorm_consumables",
label = { localize('k_cstorm_consumables') }
}),
}
},```
ok i'm confused

I would use SMODS.sound to replace the background music under a condition right
that's what jimball does and I need to do the jimball thing with my joker
yes
Yes
and it's crashing on startup because it's "not a music track"
what does that mean and how do I make it not crash
Are you using the right format
it needs to have "music" in the key
Tried that and it makes it worse because it stretches the UI. And the problem is still the same
yeah the game looks for the key to change a value when loading the sound
ive never been legitimately excited for something to work before right now
ohp
i forgot
to add the
card.ability.extra
hold on.
Lock the height
h=3,
In the Column?
can anybody help me with this? happens when i hover over the joker
In consumables
Light mode đ
Ok so whenever I refrence SMODS it has the squggles of doom and I feel as though I am missing something
that's not an answer and doesn't help me at all
like is there a plugin for vs
wait how do you make a second layer to sprites like the legendry's have?
Now it looks like this... You know what? I'll just leave the text away. Can't be bothered to destroy my head on something like this right now
Iâm sorry i couldnât look at it for long my eyes are sensitive to #ffffff
I love ui debugging
It hurts my brain
UI is a lot of fidgeting
Try wrapping them both in one column
can anybody actually help me with this or am i gonna get more reddit-tier comedy from s
I personally like making the backgrounds of each node a specific colour to help me visualize how it all orders stuff, then just make them all clear once I've set it up
I have the steamodded framework installed and it still shows the doom squggles
How do I do that again?
Iâm sorry I genuinely couldnât read it 
Say the magic words
You're not returning colours in loc vars
You don't pass a colour in loc_varz, I think
?

ah, i need to include the colour? my bad
I think the more concerning is the lack of highlights meaning that this is probably notepad
i think ranks are all highlighted with a specific colour, right?
orange (C:attention)?
.
Yeah
thank you
no I didn't đ đ thank you so much đ đ
I genuinely respect it
I need my highlights
Im blind apparently đ
What words do you mean? TwT
Trying to make localized text specifically for Jokerdisplay, this is located in my loc file:
misc = {
dictionary = {
k_jdisplaybefore='Before',
},
}
}```
and this is in my jokerdisplay creator:
```reminder_text = {
{ text = "(" .. localize("k_jdisplaybefore") .. ")" },
},```
but the localized text is just "ERROR"
The V tag is for custom colors and to use it you need to return the colours in loc vars
{
n = G.UIT.R, config = {
align = "cm",
colour = G.C.BLACK,
padding = 0.1,
h = 3,
w = width / 2,
},
nodes = {
{
n = G.UIT.C, config = {
align = "cm",
h = 3,
},
nodes = {
{
n = G.UIT.T, config = {
text = "CONSUMABLES",
colour = G.C.RED,
scale = 0.5,
vert = true,
},
},
}
},
UIBox_button({
colour = G.C.CSTORM.CON_BUTTON,
minw = 6,
minh = 3,
button = "cstorm_consumables",
label = { localize('k_cstorm_consumables') }
}),
}
},```
It works now, thank you so much >0< (I have blank underneath it now though)
Blank ?
What are you trying to make here
I know that my stuff gets shown in additions but I wanted to make a tab that's similiar
this didn't help :(
Recreating the existing tab
they hook draw_step and rotate the sprite manually
I want the sprite to change to a new sprite
what are you trying to do marie
animate soul_pos like jimball
Thatâs not what animation is đ
i have a joker i just made that does that
Well technically youâre right
you can either use jimball's hook code or smth like it to do that
i have a joker that does something similar using a different method
I thought you meant animating like making it move
jimball's code didn't work
Yes, the space underneath Other and Consumables is too much and pushes the menu up very much
Not making an animation
how did you do it
what's the trick
Change the height of the column
Should fix it
like this?
hold on
if I can spin the regular card, I want to do that
yes like that
I wanna do both
spin the regular card and make the soul_pos move
but one at a time (i mean that as in implement them 1 after the other)
I dont think you can animate the regular card iâm not sure
Maybe with somz drawstep
if card.ability.extra.delay >= 1 / card.ability.extra.FPS then
card.ability.extra.x_pos = (card.ability.extra.x_pos + 1) % 20 -- 20 is the number of frames
card.children.center:set_sprite_pos({x=card.ability.extra.x_pos,y=0})
card.ability.extra.delay = 0
end
card.ability.extra.delay = card.ability.extra.delay + love.timer.getDelta() -- dt kept returning 0
end,```
I modified this code from EasternFarmer
SMODS.DrawStep {
key = 'repertorium_erika',
order = 50,
func = function(card)
if card.config.center.key == "j_repertorium_erika" then
if not G.repertorium_erika_soul then
G.repertorium_erika_soul = Sprite(0, 0, G.CARD_W, G.CARD_H,
G.ASSET_ATLAS["repertorium_001erika_soul"], { x = 0, y = 0 })
end
G.repertorium_erika_soul:set_sprite_pos({ x = math.floor(G.TIMERS.REAL * 7) % 2, y = 0 })
G.repertorium_erika_soul.role.draw_major = card
G.repertorium_erika_soul:draw_shader('dissolve', nil, nil, nil, card.children.center, 0, 0, -0.6, -0.3)
end
end,
conditions = { vortex = false, facing = 'front' },
}
this is what i do math.floor(G.TIMERS.REAL * 7) % 2 switches betweent the 2 sprite positions but you can make it do more frames
edit: oh and you might need to replace then -0.6, -0.3
Does nothing :(
Hello, what's happening
You summoned me
I don't have an issue personally, someone asked how to make an animated joker and i provided my personal method
No, don't leave this to me now D:
well, i do have a problem, but that's unrelated

Okay can i see the full tab code
this is a lot of words that i do not recognise
also i have localization in misc disctionary k_jdisplaybefore='Before', but localize("k_jdisplaybefore") returns "ERROR"
what does the order argument do
Take a wild guess
and what is the -0.6, 0.3 for
When Im doing my pathing to refrence Smods it says that it is missing property "path"
its the order with other drawsteps, i mostly copied this from the soul
oh I see
those are the x and y offset of the sprite i changed them from 0 because i misaligned the asset :3
oh okay
And I just pasted the pathing code into the folders thing
i'll set those to 0 then
In dms?
Here
i also made her dance https://www.youtube.com/watch?v=6nsHMhtZ8Sw
what is G.repertorium_erika_soul
Man
a global that stores the sprite, its created there so just rename it to something unique
Are you literally just making another version of the additions tab
i can assume the atlas is to go inside G.asset_atlas[] but do I need to tell it which mod to look in or does it already know it should be an atlas in my mod
it knows because of the prefix
modprefix_atlaskey
gotcha
I'm making that tab to show stuff that I added after an update to the mod...
oh i should do this good idea actually
Thank you

and I change the % 2 to the number of frames in the animation?
I think you can probably just lift the entire additions code then and change what gets added to it
You donât need to rebuild it from scratch
My thought xD
yeah, but they all have to be in the same row for that
you can change the 7 to change the speed
Brb
Why do I have an error saying that im missing a path property
Its that yellow squiggle
howdy yall. I've made quite a few jokers but am trying to tackle a much more difficult one. I'm trying to create a joker which makes planets created by blue seals negative, but I don't know what event(s) to watch for, is there a way to detect cards being added? i imagine im supposed to be looking during the context.end_of_round but i need to detect whenever a card is added during that
(sorry for the long message address when anyone gets a chance)
where does it say folders lol
you would actually just take_ownership of the blue seal
and set the card it creates to negative when it is created (if the joker is detected at the same time)
that might have a mod conflict if another mod takes ownership of the blue seal for some reason but that's the simplest way
@wispy falcon
Yes?
Wait where the heck do I put it (im so sorry for asking so many questions but my brain is not working rn
You didnât close the (
:P
I changed it and it still looks like this
Two identical tabs đ€š
i am the worst newbie of all time đ„
Hm?
is there a way to take ownership of every joker?
alright, im stumped
i want to have a seal that when applied to a card it makes it impossible to destroy said card via conventional means
i have a hook into both Card:shatter() and Card:start_dissolve() that checks if the seal is there and then doesnt destroy it, plus performs some cleanup from G.play and G.hand (i mightve already picked a suboptimal function to hook but idk, havent read enough source code yet)
everything works except one thing. if a card is saved like this, and then it is scored again, it counts towards the poker hand but it doesnt score itself?? almost as if it skips context.individual or smth
and i geniunely dont know what actually changes about the card for it to not score but still count towards poker hands
i thought maybe card.destroyed being set to true does smth, but manually putting that away does nothing
Why are you recreating additions?
yes just loop thorugh all of them but better question is why
I'm making that tab to show stuff that I added after an update to the mod...
You know youâll have to update that every patch
to tag them all as undiscovered when you start a new profile
At least major patch
sorry to ask for help again but is it okay if i get some?
I know and I'm committed
i dont think you need to take ownership for that, you can modify G.P_CENTERS
The value mentioned can start undefined
I'm so sorry for asking thanks for the help, I accidently was using a workspace ive used for other stuff before
mb
I decided I wanted to add some more functionality to JimboQuip
Still need that blank space at the bottom to disappear though
is this the current code
how would one do that?
I think you would loop through it and set each value.discovered to true if value.set == "Joker"
i see. the card is the one that is currently selected by my joker (like mail-in rebate)
but im not sure
how should i go about solving this?
Yes, except for "tl" is now "cm"
how do I debug the soul_pos never showing up with the new code
maybe call the reset_card function at the start of the round?
have you tried reducing the height
oh i dont use soul pos for this
.
Yes, it does nothing
Anyways goodnight chat

wdym
You reduced the wrong height
thats what the code i sent does
I literally reduced every height and nothing changed
but not with soul_pos, it creates the soul sprite separately
Based
?
regardless of the means by which it is achieved, the soul sprite is not appearing and I just figured out why
is there any way that I can just give myself my card
like some console mod or something
debugplus
ok thx
also should i
remove the soul_pos from the card's code
to prevent them from overlapping
oh my god it works
this is awesome
example of what i mean. like am i missing some obvious parameter in card or smth??
is there an easy way to set the scale of the sprite a bit higher using this code
the sprites are a tad too small and resizing them would take too long
i think the first two 0s do that but im not sure
in draw shader
or in the Sprite() you can change the card_w and card_h
hovering over the function explains what the function does
it has two args for ms and mr
which i can assume are size and rotation?
ah yes
there's also mx and my which are the positions
so it would make sense
this worked and now he is too big
No, you have to patch SMODS.calculate_destroying_cards
Any other idea?
he is beautiful
ni
no
Guess I'll have to keep it like that for now then. Thank you anyways :3
could someone help me figure out how to solve an issue i'm having?
whenever i attempt to discard, it states that i tried to index a nil value, being ass_card
i know this is a failure from not inputting it beforehand, but i want to know how
the card should be randomly selected by the joker, and give +5 mult when discarded
now how do I change the background color
ease_background_colour
How do I make a seperate window appear, when a button is pressed?
i think it's like ease_background_colour{new_colour = G.C.RED} but i dont remember exactly
what
how do I use pseudorandom()
it crashed apparently
pseudorandom("seedle", 1, 10) should work shouldnt it
exponentiation needs talisman or you can like, make your own?
it didn't
weird
You should use SMODS.pseudorandom_probability(card, "seedle", card.ability.extra.numerator, card.ability.extra.denominator)
Where the numerator is 1 and the denominator is 10, in the card's extras. It'll ensure your probability effect works with any other effect that alters or reacts to probability.
I am not trying to do probability
I want a random number
math.random crashed too
for this joker specifically i do not care if it respects the seed or not
where are you using it
What's your exact code? Can't debug a crash properly without it.
(the raw pseudorandom function doesn't support passing a numerator/denominator anyway, passing numbers after the seed gives it a range to return a random integer)
if context.individual and context.cardarea == G.play then
return{
repetitions = math.random(1, 10),
xmult = math.random(1, 100),
}
end
look into G.FUNCS.overlay_menu
you would need to call it in the function you button calls
my ass is too tired rn may i follow up with a question tmrw?
i got the same crash when i replaced the random with regular numbers
something is wrong
i figured it out
Can I find that in the wiki?
Nvm, finally found it
anyone know how to make the deck creator mod compatable with the cryptid mod so you can add cryptid mod stuff to a custom deck? If it doesn't exist could you point me where i can learn to make it?
Is there any way I can make it so that when my mod is active it removes all the vanilla jokers?
splash
Can someone please help me create a config page? I have the config icon showing up but whenever I switch to it I get this error:
Oops! The game crashed:
engine/ui.lua242: attempt to index local 'node' (a number value)
HW = {}
HW.config = SMODS.current_mod.config
SMODS.current_mod.config_tab = function ()
return {
n = G.UIT.ROOT,
config = {
align = "cm",
padding = 0.1,
},
nodes = {
n = G.UIT.C,
config = {
align = "tl",
padding = 0.1,
},
nodes = {
create_toggle({
label = "Enable Mod",
ref_table = HW.config,
ref_value = 'global_enable',
}),
}
}
}
end
yes if you wait a couple of days there will be an easy way to do it with smods
else look into how pokermon does it
will do. How do i learn to do that?
If anyone has any ideas, please ping me. I am basically coping from TagManager but it doesn't work...
you don't need a config tab for enabling your mod
smods already lets you enable/disable mods
is there anything else you want config for
This is not an easy task you need to understand the deck creating mod code and also cryptid
yes for inputting an api_key and changing when the mod triggers. I was just using enabling the mod as an example/learning.
i have no idea what you're trying to do and i'm probably not going to be able to help
right now I just need it to not crash and show up đ
don't we all
Would there be a way to trigger a joker effect when a certain hand type of a certain suit is played (rather specifically a royal flush of diamonds) I swear I saw some documentary with a ton of stuff like this but I cant find it anymore
just check the hand type is flush and then check the suit of 2 cards
and if they're diamonds it's a diamond flush
how would I pull a localization for a joker name to use it somewhere else?
j_rickie_mirror = {
name = 'Mirror Joker',
text = {
"Swaps the {C:chips}chips{} and",
"{C:red}mult{} of your hand."
}
},
},```
or would I need to add a dictionary entry just for that
localize{ type = "name_text", set = "Joker", key = "j_rickie_mirror" }
I've got time, motivation, and a reckless disregard for my mental wellbeing. I just need to learn LUA then read through the mods' files, right?
whats the context for when a card is being destroyed
context.remove_playing_cards for playing cards, context.joker_type_destroyed for everything else
does your mod have a repo? I need help with my config
does this help
https://github.com/nh6574/JoyousSpring/blob/6cdb73ea92b95713b0afbaa0b20b12106a776276/src/mod_info.lua#L217
How would I check for a certain hand type I cant seem to figure out how to do that
hey why this isnt working, pls help
Is this a dumb way to check for a straight flush
Is there just a straight flush one
i have a weird issue, i have a joker that makes some cards face down, i enhanced those face down cards but for some reason this made their face down sprite stone cards (0711a)
you don't need to check for context.before and not context.blueprint twice in a row btw
ok thx
if it's true in the outer if block, it'll definitely be true in the inner if block
does anyne know if theres a guide to be able to make my own texture pack for some cards ideally compatible with malverk
Guys how much storage space on a persons computer can I use before they get mad?
100 gib
This is what I have right now and I am having an error with getting the suit (im pretty sure its because that is only detecting one card)
Also If I could just say royal flush let me know bc that would be really convinent
context.other_card only exists in contexts where an individual card is scoring (i.e. not context.before)
you need to loop through the context.scoring_hand table if you want to check all the scored cards
for royal flush this is the easiest way
#đ»ă»modding-dev message
(read the follow up questions beneath that too)
So if I did context.scoring_hand = context.evaluate_poker_hand and context.display_name == "Royal Flush" and then looped through the suits would that work or something like that?
no, what i sent needs to be done in a separate check
ok
do cards store their original sprite pos at all?
card.config.center.pos?
indeed, thanks for saving me from swimming through debugplus output
Yes and no. I just don't see what I'm doing wrong.
This is what I have changed it to:
The debug thing says that there is something waiting to happen but it just doesnt kinda
I still need to add suit detection but ill get to that when I get to that
they need to be different checks, not nested
before and evaluate_poker_hand don't happen at the same time
would I have one trigger a boolean which allows the other to activate?
Ok that worked now the message is sending I just need to do the X mult
The mult is triggering before the hand is played so it gets reset
do context.initial_scoring_step instead of context.before (assuming you do want it to trigger before any cards score)
if I copy it directly and modify my config.lua it kinda works...
Preferably it triggers after all cards score
then you'll want context.joker_main instead, which triggers during the usual joker scoring section
Ok thx
got it working :D
need some advice here, working on a demonic tutor joker from mtg if anyone is familiar. basically i want it to be âsell this joker, search your deck for a card and put it into your handâ any idea where i could start on making that effect happen?
how to stop this from gaining like X400 mult at end of round?
loc_vars = function(self, info_queue, center)
return { vars = { center.ability.extra.xmult } }
end,
calculate = function(self, card, context)
if context.end_of_round and not context.game_over then
if G.GAME.blind and G.GAME.blind.boss then
card.ability.extra.xmult = (card.ability.extra.xmult or 1) + 2
card.gained_this_round = true
end
end
if context.joker_main then
return { xmult = card.ability.extra.xmult }
end
end,
-- Reset the flag at the start of a round
add_to_deck = function(self, card, from_debuff)
card.gained_this_round = false
end,
update = function(self, card, dt)
if G.GAME.current_round and card.gained_this_round and G.STATE == G.STATES.SELECTING_BLIND then
card.gained_this_round = false
end
end
}
In your first if statement, also check for and context.main_eval. This ensures the check only runs once, and not for every card in your deck.
where exactly in it?
if context.end_of_round and not context.game_over and context.main_eval then
In that line.
thanks!
hey guys, trying to get this effect to happen before scoring so the 8s score as polychrome but cant seem to figure out the correct context
You can use context.before and loop through context.scoring_hand
how exactly does that work? sorry lmao i am really bad at this
how would i write that is more of the question im asking
i tried getting it to detect 8s the way midas mask detects face cards, because that joker does exactly the effect in the right order of things im looking for here. but i was having trouble reverse engineering it
You don't need to 'reverse engineer' it. You can check Vanilla Remade to see exactly how a mod would implement it.
https://github.com/nh6574/VanillaRemade/blob/main/src/jokers.lua#L2159
You can borrow most of its calculate function. Especially, the exact context (if context.before and context.main_eval and not context.blueprint then) as well as the for-loop it uses. (for _, scored_card in ipairs(context.scoring_hand) do)
then would i just use the same get_id to get it to detect the 8? i feel like i tried that already but i might have done it wrong. i have been using vanilla remade
The :get_id() == 8 part you're using now should work fine. But when you check within that loop, it'll be scored_card:get_id() == 8
gotcha. thank you! ill try it out
that worked! thank you very much
the only other thing id like it to do is have a message pop up when they become polychrome. would i use the same code from midas mask for that as well?
Yes, specifically its return statement.
gotcha. what do i put in the faces > 0 part? i tried scored_card again but it crashed đ
Midas Mask just uses "faces" as an arbitrary counter. In other words, "If there weren't any faces turned gold, don't send any message, because nothing happened."
You can call your own counter variable whatever you want. The important part is how its used: Being set to 0 before the loop, being added onto if/when polychrome is added to a card, and then being checked if that counter is > 0.
So the idea for my new consumable was that if you select a card, itâll be destroyed and appear in the shop at random. If you select Canio for example, itâll be destroyed from your deck and then appear in the shop but itâll cost you.
It shouldnât require showman but Yâknow?
What's... the point? Is it just to reroll the edition, or?
key = 'Moneymaker',
loc_txt = {
name = 'Moneymaker',
text = {
'When a {C:attention}Lucky{} card gives you',
'{C:money}Money{} or {C:mult}Mult{}, also',
'receive the opposite effect',
}
},
atlas = 'Jokers',
pos = {x = 0, y = 0},
rarity = 2,
unlocked = true,
discovered = true,
blueprint_compat = true,
cost = 1,
config = {
extra = {
mult = 2000,
dollars = 2000
}
},
loc_vars = function(self, info_queue, card)
info_queue[#info_queue+1] = G.P_CENTERS.m_lucky
return { vars = { card.ability.extra.mult, card.ability.extra.dollars } }
end,
calculate = function(self, card, context)
if context.individual and
context.cardarea == G.play and
context.other_card.lucky_trigger and not
context.blueprint then
return {
message = "Kachow!",
colour = G.C.GREEN,
message_card = card
}
end
if context.pseudorandom_result and context.result and context.identifier == 'lucky_money' then
return {
mult = card.ability.extra.mult
}
elseif context.pseudorandom_result and context.result and context.identifier == 'lucky_mult' then
return {
dollars = card.ability.extra.dollars
}
end
end
}```
i have another problem
You can get soul cards in the shop
my idea for this joker is to get the opposite trigger when a lucky card triggers for money or mult. it works, but the order of operations is extremely wonky and the joker ends up triggering before you see the lucky card trigger go off (btw its set to 2000 each just for ease of testing)
If you have cryptid, you can buy pointers without equilibrium deck
Or if you have entropy, you can buy define
Oh did you mean they'll be available more than once? The way you worded it at first just kinda made it sound like you'd only ever be buying back what you destroyed.
But only if you even acquire it, you have to have a copy of the card to emplace it into the shop.
No, itâs more like
You can get rare items that are never usually found in the shop
Once an item from your deck or whatever is selected, the consumable will destroy it and itâll forever appear in the shop.
AT RANDOM by the way.
It wonât show up with every reroll, itâs just no longer impossible to get it in the shop.
And you have to acquire your wanted item too, you canât just look for it in the collection like pointer and define does.
What you can do, is to initially store which card(s) gave what, within the pseudorandom_result steps. Then, the Kachow step can give out the money/mult as needed.
so i tried this, and for whatever reason the money from the joker is still triggering before anything else
What's your code now?
local moneybonus = 0
local multbonus = 0
if context.pseudorandom_result and context.result and context.identifier == 'lucky_money' then
multbonus = multbonus + 1
end
if context.pseudorandom_result and context.result and context.identifier == 'lucky_mult' then
moneybonus = moneybonus + 1
end
if multbonus > 0 then
return {
mult = card.ability.extra.mult
}
end
if moneybonus > 0 then
return {
dollars = card.ability.extra.dollars
}
end
end```
opted to just get rid of the message since it will be showing the money or mult anyway
assuming both lucky abilities trigger, i would like it to be ordered like this card mult > joker money > card money > joker mult
No, it would have to be card mult > card money > joker money > joker mult
that is fine too. as long as the joker is triggering after the card has resolved
if context.pseudorandom_result and context.result then
local effects = {}
if context.identifier == 'lucky_money' then
table.insert(effects, {mult = card.ability.extra.mult})
elseif context.identifier == 'lucky_mult' then
table.insert(effects, {dollars = card.ability.extra.dollars})
end
return SMODS.merge_effects(effects)
end
i just cant seem to figure that part out
joker money is still triggering before anything else
Code?
pretty much just used exactly what you gave me. was there somewhere different i was supposed to put it?
all i did was put what you put it chat directly after my calculate function and its working exactly how i had it before (albeit in much fewer lines)
extra = {
mult = 2000,
dollars = 2000
}
},
loc_vars = function(self, info_queue, card)
info_queue[#info_queue+1] = G.P_CENTERS.m_lucky
end,
calculate = function(self, card, context)
if context.pseudorandom_result and context.result then
local effects = {}
if context.identifier == 'lucky_money' then
table.insert(effects, {mult = card.ability.extra.mult})
elseif context.identifier == 'lucky_mult' then
table.insert(effects, {dollars = card.ability.extra.dollars})
end
return SMODS.merge_effects(effects)
end
end```
Yes, lucky card mult is calculated before dollars
right, but my issue is that the joker is giving money before the lucky card has shown its effect yet
currently it is going joker money > card mult > card money > joker mult
Can you film it?
yeah sure
mkv is not playable on mobile, you need mp4
Youâre on 0711a?
Yes.
yea i believe i am
I thought we had fixed probability result timings but maybe not đ€
we've been racking our brains about the timing lmao
i could just be doing it wrong still though. i havent tried using the new replacements
how would i need to write the code using the new probability changes?
You already are using them
gotcha gotcha
Is there a way to destroy a card in context.pre_discard? i know i can do it in context.discard but it looks bad
Because visually, I want the destruction effect to happen when the discard button is clicked, but it only happens when it gets to that specific card
trying to make a blind that basically does what the flint does, but after the hand scores instead of before. How would I modify this?
my best guess is that I need to change the 2nd if statement, I'm just not sure what to change it to
You would use context.final_scoring_step instead.
So, I think there's an added final scoring step that smods adds, which you'll wanna use for an effect like this
Modify hand is explicitly about modifying the base hand values, so you shouldn't try and use it to modify anything outside that timing window
sick, thanks! now to figure out how to get all these to work -_T
let me know if you have any questions, but I'm sure you'll be able to figure that out! It's not difficult at all once you know about the proper contexts! đ
I'm like 90% sure all of them will work, it's just actually implimenting them into the mod itself. I initially made everything on JokerForge, and haven't done much patching
joker forge mentioned đ„
If youâre directly setting hand chips and mult you should use mult = mod_mult(value) (and mod_chips()) for proper tracking
How do I split things into multiple files?
I thought I would do something like this:
-- main.lua
UI = SMODS.load_file("ui.lua")
UI.init()
local UI = {}
function UI.init()
-- function code goes here...
end
return UI
But I'm having no luck.
(Please ping me as I am bad at checking)
calling UI.init()
I also had a mistake in the code example so I fixed that
assert(SMODS.load_file("ui.lua"))()
Thanks <3
hi everyone, for some reason the balance effect is not working exactly properly
how do i access the balance effect manually
return { balance = true } doesn't work?
it works but the balanced values are incorrect
like i got chips up to ~e13
then everything is down to 8.5
(yeah i had a exponentiation joker)
if context.joker_main or context.forcetrigger then
return {
emult = card.ability.extra.immutable.emult,
echips = card.ability.extra.immutable.echips,
}
end
if context.final_scoring_step then
return {
balance = true,
message = "Balanced!",
colour = G.C.DARK_EDITION,
func = balance_sound,
}
end
this is a cut from the joker effect
Sup guys, I'm currently working on this seal, but I'm having a hard time displaying the current mult. It's calculated correctly but just doesn't show up in the tooltip. Any ideas?
SMODS.Seal {
key = 'catalyst',
pos = { x = 0, y = 0 },
config = {
extra = {
XMult = 1,
increase = 0.1,
XMult_base = 1
}
},
badge_colour = HEX('ffac38'),
atlas = 'HamodSeals',
unlocked = true,
discovered = true,
no_collection = false,
loc_vars = function(self, info_queue, card)
return {vars = {self.config.extra.XMult, self.config.extra.increase}}
end,
calculate = function(self, card, context)
if context.main_scoring and context.cardarea == G.play then
card.ability.seal.extra.XMult = card.ability.seal.extra.XMult + card.ability.seal.extra.increase
SMODS.calculate_effect({x_mult = card.ability.seal.extra.XMult}, card)
end
if context.end_of_round and context.cardarea == G.hand and context.other_card == card and context.individual then
card.ability.seal.extra.XMult = card.ability.seal.extra.XMult_base
end
if context.discard and context.other_card == card then
card.ability.seal.extra.XMult = card.ability.seal.extra.XMult_base
end
end
}```
What version of SMODS do you have?
817 or something
i cant go back to 711 because balatro simply refuses to boot
Does it only happen with this joker?
havent tested yet, but supposedly this joker should do what sync catalyst does
card.seal.extra.XMult & card.seal.extra.increase?
oh yeah how do you access current hands/discards
No, card.seal is the seal key.
G.GAME.current_round.hands_left and G.GAME.current_round.discards_left
card.ability.seal.extra.XMult & card.ability.seal.extra.increase
calculate = function(_, card, context)
if context.joker_main or context.forcetrigger then
return {
emult = card.ability.extra.immutable.emult,
echips = card.ability.extra.immutable.echips,
}
end
if context.final_scoring_step then
return {
balance = true,
message = "Balanced!",
colour = G.C.DARK_EDITION,
func = balance_sound,
}
end
if context.setting_blind then
local balance1 = (G.GAME.current_round.hands_left + card.ability.extra.immutable.echips) / 2
G.GAME.current_round.hands_left = balance1
card.ability.extra.immutable.echips = balance1
local balance2 = (G.GAME.current_round.discards_left + card.ability.extra.immutable.emult) / 2
G.GAME.current_round.discards_left = balance2
card.ability.extra.immutable.emult = balance2
return {
message = "Balanced!",
colour = G.C.DARK_EDITION,
func = balance_sound,
}
end
end,
yep, I'm stupid. This did the trick
I changed it in the calculation already but forgot to do it in the tooltip
đ
You just need to use the not jank version of your other mods
i guess, too lazy to be bothered though
Donât expect support then
thanks for the help anyway
yeah it looks like i just have to write the balancing effect myself.
are the hand_chips and mult global variables
Yes.
i'm working on a config tab, so far so good but i can't figure out how to synchronize the toggle and the value it changes - when loading the config tab the toggle always appears disabled even when the option is enabled. anyone worked with this stuff before?
how would i change this line from Midas Mask so that it picks a random enhancement and not just gold?
scored_card:set_ability('m_gold', nil, true)
try this
in your case it should be guaranteed so something like
scored_card:set_ability(SMODS.poll_enhancement({key = 'whatever', guaranteed = true}), nil, true)
i think
ref_table = config, ref_value = "usemusic"
thanks!
why is my column node acting like a row node đ
What stuff goes into the config of G.UIT.O?
the children have to be rows
How does one change the contents of a deck? I want to create a deck that only has Aces.
Im back to ask more dumb questions (yippie yay everybody applaud) My card is working perfectly, and all I need to do is to add in the suit detection. This is what I have so far
I believe this will help I am new though so who knows lol https://github.com/Steamodded/examples/blob/master/Mods/DeckOf4s.lua
spoiler alert = im using the exact same thing lol
lol
bump
yeah that was totally deffinently 100% what I was going to say in all of my totally definently 100% real gamer wisdom
14 stands for Aces iirc
yeah 14 is the id for aces
nope.
what's the error?
Can you show the code?
"Ace"
@wispy falcon its the exact same, just switched from "4" to "A"
Hold on im going to see if I get the same error
i might pr it so it takes any kind of key
quick question, how can you check if a card is steel or gold in hand
I know you need context.other_card:
but i dont know what function to call nor what the return values are
try this
bump
worked on my end
SMODS.has_enhancement(context.other_card, "m_gold")
(or "m_steel" for steel)
i dont think that's going to work
have you tried it
thank you, @olive wren
my bad
also im calling it balala from now on
thank you @red flower and @spring lantern
balala joker poker
bump2
can someone direct me to a page on checking for suits bc I was working on something for that last night which I was told to go through the context.scoring_hand table to check suits but I dont know how to do that
or just a page in which context.scroring_hand is used
if c:is_suit('Suit') then
-- do thing
end
end
thank you
whenever you need to iterate through a list of cards that's how you do it
for loop iterating through pairs(list of cards)
there's technically a better way but this is faster and easier to understand
ok I will note all of this for the future in my mind palace
I have gotten here and am def doing something wrong with checking the cards
but I only really need to check one and I dont know how to do that
Yes, it would be 'Diamonds'
ok fixed
Also IsDiamondsCount doesn't exist.
yeah its just a var
bump3
bro that's a pretty not ok thing to do
IsRoyalFlush is declared as a global var
and there is nothing setting it to false
afaik
so once its true its gonna be true forever
I set it to false
use local isRoyalFlush = false
I think
I just realised what you were sayinh
and have no clue how to fix this
Im just going to check manually if it is a royal flush but I also have no clue how to do that
I just need to check if there are an Ace and a Ten in the SFlush right
(I also dont really know how to do that)
IDK how to copy it over ill just do this for now
I guess I can lit copy the whole thing
if i have to type it im not doing it lol
SMODS.Joker {
key = "GreedyMan",
pos = { x = 5, y = 6 },
rarity = 2,
blueprint_compat = true,
cost = 5,
discovered = true,
config = { extra = { Xmult = 10000 }, },
loc_txt = {
name = "Money Bags Mcgee",
text = {
"{X:mult,C:white} X#1# {} Mult",
"When playing a royal flush",
"of diamonds",
},
},
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.Xmult} }
end,
calculate = function(self, card, context)
if context.before and context.display_name == "Royal Flush" then
IsRoyalFlush = true
end
if context.joker_main and next(context.poker_hands['Straight Flush']) and IsRoyalFlush and not context.blueprint then
return {
message = 'I like money',
Xmult_mod = card.ability.extra.Xmult,
IsRoyalFlush = false
}
end
end
}
I dont even have the thing checking the suit yet but i'm trying to make it so that the royal flush cant be selected and then have them play a dif hand
calculate = function(self, card, context)
if context.evaluate_poker_hand then
card.ability.extra.IsRoyalFlush = context.display_name == "Royal Flush"
end
if context.joker_main and card.ability.extra.IsRoyalFlush and not context.blueprint then
local isDiamonds = true
for _, playing_card in ipairs(context.scoring_hand) do
if not playing_card:is_suit("Diamonds") then
isDiamonds = false
break
end
end
if isDiamonds then
return {
xmult_message = 'I like money',
Xmult = card.ability.extra.Xmult,
}
end
end
end
question, cant you just check if its a royal flush in context.joker_main
đ€ theres no context.display_name in context.joker_main?
no
damn
its a thing i added for that context
What stuff goes into the config of G.UIT.O?
TYSM
Okay and let's say I have a cardarea added, do the cards I want to add go into the childnode?
yes
are you still trying to recreate the collection
if you add cards to the cardarea then it should show up there
Okay, gonna try that
Yes, adding the buttons functions right now
why dont you just copy the regular collection
smods has a lot of functions for that
How?
go into the code and do ctrl-c and ctrl-v lol
Damn, guess I was overthinking it xD
SMODS.card_collection_UIBox is what you want for the cards
Thatâs what I said yesterday đ
oh wow this was easier than what I was doing, thank you very much
i need help, im trying to make a joker like the popcorn one, but it doesnt work
have you looked at the code for popcorn
i know you can use the funny lua for checking if a file exists but
would it be able to return the name of a folder?
if a specific folder exists or what subfolders are in a folder?
I want to find the name of a folder
this is a folder that will exist (on windows) and not everyone names it the same thing
and I know the directory to get to it, but how do I check the name of the folder that is there
you can list the files doing NFS.getDirectoryItems("path/to/folder"), but idk how you would get if it's the folder you want
you can check if it's a folder and not a file doing NFS.getInfo("path/to/folder").type == "directory"
that's surprisingly easy
I can just manually blacklist the other folders because they are fortunately few
and named the same thing every time
How do I make my own table?
I have designed a totally very good looking joker at 1x scale, I assume whenever I am making a new joker I just increase the drawing size and then add another right?
yeah
elaborate?
leave a 1-pixel blank border around each joker on the sheet
ok
that means there will be a 2-pixel gap between each joker, and they are 1 pixel away from each edge if adjacent to an edge
đ
I want to change G.P_CENTER_POOLS.Joker to something that shows only the new stuff I added (That I would change into the table). So how do I make my own table for that?
From here:
G.FUNCS.overlay_menu {
definition = SMODS.card_collection_UIBox(G.P_CENTER_POOLS.Joker, {5,5,5}, {
no_materialize = true,
modify_card = function(card, center) card.sticker = get_joker_win_sticker(center) end,
h_mod = 0.95,
})
}
end```
loop through G.P_CENTER_POOLS.Joker and make a new table containing your cards
A. do I need an X2 for each one
B. does that just mean scaling up the png?
increase the size of the sheet to include those borders yes
How?
and, once you are done with making the joker sprites, export the entire sheet at 2X scale
and put it in assets/2x
ok
regular in assets/1x
local new_jokers = {
["j_modprefix_key_1"] = true, -- put the key for your new cards here
["j_modprefix_key_2"] = true,
}
local new_pool = {}
for _, center in ipairs(G.P_CENTER_POOLS.Joker) do
if new_jokers[center.key] then
table.insert(new_pool, center)
end
end
then use new_pool
actually this is dumb
What?
local new_jokers = {
"j_modprefix_key_1", -- put the key for your new cards here
"j_modprefix_key_2",
}
local new_pool = {}
for _, key in ipairs(new_jokers) do
table.insert(new_pool, G.P_CENTERS[key])
end
better
- Can I use that for everything (vouchers, booster packs etc.) or just jokers?
new_poolreplacesG.P_CENTER_POOLS.Joker, right?
I am very much failing to set up the atlas for my jokers, I believe it has something to do with the pathing
- anything thats a center so yes for vouchers and packs
- yes
Nice, thank you :D
Is it because I only have the one
should I make a second for this
or do I route it to a folder
path = "JokersImages.png"
where do you have the image, is it in both assets/1x and assets/2x?
yes
Wait, is something in the collection that isn't a center?
Blinds and tags
do I need to route it to the assets folder?
No
How would I do it there?
i think tags have the same logic but with G.P_TAGS
blinds have a different collection view i dont recall how that one works
And decks are center too or not?
yes but they also have a different collection ui
I forgot to change the name of the 2X one đ€Šââïž
i'd like to once again ask if anyone knows how to fix this
the behavior of my mega dice booster (which you just draw cards from) doesn't exactly match the mega buffoon pack; i'd like the whole UI to stick around instead of briefly disappearing
(video 1 is the dice booster, video 2 is the buffoon pack for comparison)
https://cdn.discordapp.com/attachments/1233186615086813277/1399451444297334965/Base_Profile_2025.07.28_-_12.58.15.03.mp4?ex=68a56478&is=68a412f8&hm=2cfe3baeb17e9d02b5092442af8c9c13e91b884179d99ed9b38a41e15b4f7be2&
https://cdn.discordapp.com/attachments/1233186615086813277/1399451445975056577/Base_Profile_2025.07.28_-_12.59.25.04.mp4?ex=68a56479&is=68a412f9&hm=1e790b626595ad5339675f17034880dcf5586e96b03061482f96427602fc5d3b&
alr lemme try that
just here to say whoever is responsible for the existence of this func you're a lifesaver and i love you
me
is there any sort of tutorial for animating actual card sprites
i saw there was smth wip in the vanilla remade wiki but i was just curious
ive used love.draw stuff for onscreen effects but
i can prolly figure smth out if there's nothing, im moreso just curious
it's mostly switching the position of the sprite in the atlas using card.children.center:set_sprite_pos
oh wait you can just set the sprite pos like that
okay that's actually really useful đ
As some of you have seen: New rarity time POGGIES!
Does anybody have a link or a refrence to a mod's code with custom rarity
heres docs on rarities
https://github.com/Steamodded/smods/wiki/SMODS.Rarity
also vanillaremade has example rarities
How to resize sprites again ?
thx
do you want to scale a sprite to 2x/1x or what exactly?
oh so you want to display like a 213 x 285 high res image on a joker without it being 3x as large?
i myself am not familiar enough with balatros sprite system to answer confidently then
Ahh
Should this be in the atlas
in the card ur making
I know the default rarities have a number assigned to them but for custom ones do I just use the key or name
yall remind me how to check if a card has any edition
how do I check If played poker hand is a specific hand like High Card for example
ohh shit thanks
Remove next
so context.poker_hands["High Card"]
context.scoring_name == "High Card"
oh thanks
this will be always true
context.joker_main and context.scoring_name == "High Card"
or just context.scoring_name == "High Card"?
Right because every hand contains a high card
no because all hands start as empty tables and empty tables are truthy
first one
thanks
What are you making seu pai
Iâm pretty sure just putting the correct dimensions as your px/py is enough for hi res images
Rarities are confusing fr
You shouldnât need to play with display size iirc
from steal a brainrot
why
stop
we dont need our game to be tainted by thou forces of evil and bombarded by the very place in which evil lies
for now it only buffs and doesnt add the mutation badge
We need Noobini Pizzanini and Cocofanto Elefanto in Balatro
NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
yes
oh ok
I mean maybe it will make them more sane
I got a diamond mutated splash
mutation have a base chance of 1%
diamond has a base chance of 10% while gold has 90%
which means I got a 0.1% mutation
diamond increases joker values by x3
WHICH MEANS I GOT A VERY RARE AND GOOD MUTATION ON SPLASH
WHICH HAS NO JOKER VALUES
đ
why not on burglar
all I wanted was +9 hands
sploosh
Btw does someone know how I add custom badges to jokers
I wanted to check If the card has mutations and If It does it adds their badges
is it possible to do that with set_card_type_badge too?
if you want to add new badges, use set_badges instead
oh fair
Card:set_badges()?
I have a small question, if I copy functionnality part from a toml file but not the bug with some card part, Does the bugs will occur or it will be fix because of the other toml
no, it's a function you define in the original joker definition
from SMODS.Joker wiki documentation:
oh thanks
This is my rarity script, how do I assign this rarity to a card?
rarity = "modprefix_GreedRarity" in the card's initial definition
REPLACE "modprefix" WITH YOUR ACTUAL MOD'S PREFIX
thx
is there a way to hook every card set_badge function so it adds my badges?
hmm
not sure. you might want to represent the thing you're making as its own card modifier type and then set it up to add its badge from there, like how editions add a badge to cards
I have a feeling I am missing something
Mod prefix is wrong
your mod prefix is mycoolmod
I should prob learn to read before asking questions next time
bump đ„ș
My game freezes after some minutes and crashed, can someone help me please ?
I have the Cryptid mod installed
you want to ask in #âă»modding-general
yo i need help with two things if that's okay
Don't ask to ask
sorry i just get worried that i ask too many questions
but i was wondering how i could make my own custom message
i noticed in vremade's code that it localizes certain messages
marked as k_[keyword]_ex
like 'k_upgrade_ex'
if you dont care about localization you can just do message = "Your message here" if you do you need to add them to a localization file under misc.dictionary
example (misc is outside the descriptions table)
Why does the price of my things isnt like in the misprint deck ?
heyo-- kind of a dumb question but how do i get the amount of chips/mult played in the currently played hand?
i'm kinda new to balatro modding and i'm slowly learning about it as i go on đ„Č
...man how did i miss that ._. thank you đ
:3
afaik this method no longer applies if you're on the dev build of steamodded (i.e. not 0711a, the latest release)
oh? well is there any other method i should be aware of?
i think it does
Im trying to make a card that has a 50% chance to increase the end of round payout and a 50% chance to decrease the end of round payout at the end of a round but I don't know how to change the end of round payout in general
I put a bunch of mods together and then it crashed at the item shop
it maybe does still work so you should be fine
i'm thinking about how smods is adding a new SMODS.Scoring_Parameter class, i thought maybe they wanted to dissuade people from using hand_chips and mult directly in the future
Yeahhh, that happens when you use a lot of mods. Best way to test is to install a couple at the time and see if that works
Also, if I can reccomend one more mod and do some self-promo, you might wanna check out #glue
Noted
But I recommend trying to figure out what works and go from there.You're for sure running a dev version of smods, which also will add to instability
Glue's made to potentially add more shop slots, but the main thing I think it's good for is to just let you return the joker spawn rate back to normal if you play with a lot of mods that add consumables, haha
gold mutation + diamond mutation chance of this happening is 0.05%
this is peak balatro btw
yeah cuz gold buffs values by 1.5
and diamond buffs by 3
so its 4x1.5=6x3=18
this is so cursed ong
đ
aha, thank you
is the localisation file in the original balatro files?
oh, in steammodded
thanks!
come to think of it now, it wouldn't make sense to edit the original game files themselves for a mod
How do I increase the amount of money that a card gives at the end of a round
card.ability.extra.<money_value>=card.ability.extra.<money_value>+1 for example
Okay, I think I'm really stupid right now. Why does it say this?
Can I theoretical make a file that will only containing values where the mod will read all of them to use it, say as a example to use as a mult on a certain joker. If this is possible how would I make this?
I already have the file containing stuff
I just need a way that these variables are used by other files
i don't care about localisation for now, considering nothing is really being developed for public release right now
i think i will though. languages aren't my strong suit though
and i don't want to use google translate because it will just get things wrong
Was being stupid but found the error
You got this giga chad
hey. i did the first method and it didn't work
unless i need them in speech marks and not apostrophes
show code
are you putting it in the pseudorandom_probability or is there more code off to the right of the screenshot
the person is meant to gain $50, not have their money set to 50 if it triggers
yes
thats what that does
there's more code. basically, there's a 1 in 6 chance it triggers when a blind selected
strange. i guess ease_dollars(x) and dollars = x are the same?
yes
thank you for your help, n
in a calculation return
i feel guilty asking so many questions
returning a value like chips, mult, or dollars in calculate generally adds to the relevant value, it doesn't set it
dont worry about it
don't be, that's why the community exists. (but also reading documentation + examples is a pretty good skill to have :P)
i see
also the code is still not working
do i need to set the message's appearance to where the joker is?
wait it just says return nvm
i somehow missed the "return" part
got that in my head for next time
thank you N
Quick bump
Even if I set as global it doesn't seem to read
Fred did you got vscode yet
This is my attempt at making it increase randomly, it worked intially but failed to work once I added the probabilities
context.man_eval is always false because context.man_eval does not exist
does anyone know how to make a text input in the config? I don't see any examples of doing that.
no. i'm gonna do that
Listen i can buy it for you
no, no, it's okay

Okay then suit yourself
Someone link the part of VanillaRemade wiki where the vscode is setup
No youâre not a nuisance dude
Itâs just that the code is not highlighted
(Brain cannot function)
Btw can i ask whereâs your pfp from
I think
some
Is a syntax error
oh
sorry
twitter post of the original art is in my discord bio, the character is Susie Haltmann from Kirby: Planet Robobot
just one second before i type my question
I really liked it
The art style peaked my interest
this is my attempt at adding the chance into the description
i have a joker known as assassin, which i want to gain 5 mult whenever a certain rank is discarded
whenever i discard any card, i get this error
any help?
it did not work and I dont know what to do
i think it's something to do with setting ass_card before, but i'm not sure how to do that
Are you sure
This is correct?
it should be
Itâs green
i mainly replicated code from mail-in rebate in vremade
would you like all of the code for assassin?
Yeah but it just doesnt display a number
I think I need to increment the #2# and #3# thing but I dont know how
You need to return them in loc_vars
Sure
{C:numerator} and {C:denominator} aren't valid, so it might be bugging out there
what happens if you take out the colors entirely
https://github.com/Steamodded/smods/wiki/Text-Styling#named-colours-dictionary-gargsloc_colours very helpful documentation
thx
Add a check to handle when ass card is nil
i see. so i call the function reset_ass_card when it is nil?
local ass_card = pseudorandom_element(valid_ass_cards, 'ass' .. G.GAME.round_resets.ante)
if ass_card then
G.GAME.current_round.ass_card_rank = ass_card.base_value
G.GAME.current_round.ass_card_id = ass_card.base_id
else
G.GAME.current_round.ass_card_rank = 'Ace'
G.GAME.current_round.ass_card_id = nil
end```
Something like this
thank you
line 92, unexpected symbol near 'local'
i might have placed this snippet of code in the incorrect position
Might have an extra , or }
don't see anything strange here
yes you definitely put that in the wrong place
Whyâs the âifâoffset ?
an SMODS.Joker object can't just run code, it just stores parameters. those parameters can be functions, and then you can put code in those functions
@cursive gazelle look at this
my bad
Whatâs the golden and diamond badges

hooked set_badges
function Card:init(X, Y, W, H, card, center, params)
self.mutations = {}
print("going to call function on center:",center)
if center.applied_mutation_badges == nil then
local last_set_badges = center.set_badges
center.set_badges = function (self,card,badges)
mutation_set_badges(self,card,badges)
if last_set_badges then last_set_badges(self,card,badges) end
end
end
return last_init(self,X, Y, W, H, card, center, params)
end
and on Card:load too
oh wait

