#đ»ă»modding-dev
1 messages · Page 456 of 1
anyone got any idea why the first_hand_drawn context doesn't seem to be doing anything?
is this a bug with smods or did I screw something up?
do you mind sharing the code part directly ? the calculate part that is
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play then
if function()
local rankCount = 0
for i, c in ipairs(context.scoring_hand) do
if c:get_id() == 6 then
rankCount = rankCount + 1
end
end
return rankCount == 3
if rankCount == 3
return {
chips = card.ability.extra.chips,
}
end
end
end
end
}
so three 6s for 70 chips right ?
mhm!
man if im struggling this much with a relatively simple card im worried about some of the complex stuff I have planned 
it just sucks being so new to lua in general and just as new to smods and feeling like I have to be handheld through everything
you strike me as someone new to programming in general
you'd be correct
ive coded before in a different engine but
it wasn't a big project
i'm still tryna find my footing and be able to lead on my own but a lot of the information hasn't really stuck in my head and i'm still a good ways through the smods doc
so i'm as noob as you could probably get
i have friends who know their way around lua but
from what I can tell, you lack the fundamentals
not even of smods but just of lua and even programming logic in general
i've done a watch of a tutorial series but the info really didn't stick i guess
yeah I mean a lot of programming is practice and problem solving
there are plenty of websites out there that have beginner programming problems to help you build up those skills if it's something you're interested in
if context.joker_main and context.cardarea == G.play then
if ((function()
local rankCount = 0
for i, c in ipairs(context.scoring_hand) do
if c:get_id() == 6 then
rankCount = rankCount + 1
end
end
return rankCount == 3
end)()) then
return {
chips = card.ability.extra.chips
}
end
end
end
end
}```
try this
most likely yeah it would be, i'd like a link to those
I just wanna be able to make progress on this w/o needing to constantly be handheld ig
idk if there's ones for strictly lua, but really any procedural language will help
bumpy bump
what's the code for the description
do you mind sharing the full code this time ?
it's contained in a large doc but i'll send the relevant block to this joker
lua
SMODS.Atlas{
key = 'badguy',
path = 'TheBadGuy.png',
px = 71,
py = 95,
}
SMODS.Joker{
key = 'badguy',
loc_txt = {
name = 'The Bad Guy',
text = {
"If hand contains three 6's",
'{C:blue}+70{} chips' },},
rarity = 1,
cost = 5,
atlas = 'badguy',
pos = {x=0, y= 0},
config = {
extra = {
chips = 70
}
},
calculate = function(self, card, context)
if context.joker_main and context.cardarea == G.play then
if ((function()
local rankCount = 0
for i, c in ipairs(context.scoring_hand) do
if c:get_id() == 6 then
rankCount = rankCount + 1
end
end
return rankCount == 3
end)()) then
return {
chips = card.ability.extra.chips
}
end
end
end
end
}```
I'd recommend doing your own research and maybe starting with a language other than lua. Not that lua is a bad language but that I think there's less practice material for it. Something like python, which has a lot of similarities https://www.w3schools.com/python/python_exercises.asp
i think you added an extra 'end' at the end, just 3 ends instead of 4
ah you don't use the loc_txt, not sure if i can help that way sorry
there's also the fact that lua is not a big name programming language, so any docs and tutorials you find are more likely to be geared towards people who already have programming skills in other languages
yeah
i know a tiny bit about c but like barely anything
i'm as raw meat to this as you can get
don't start with C
ohhhh
joker boots but effect doesn't execute
what about the localization
that's already a step forward
wait, use chip_mod instead of chip instead of chips
hiii im new at modding and rlly wanna playtest my jokers, how could i get them easily to see if they work
You have debug plus?
Just put them in the mod folder and test them, Debug PLus is good
i dont think so, how does it work/how could it help
allows you to spawn your jokers from the collections, in fact you could use also Too Many Jokers that make the work easier since you can search the precise jokers you want
so did it work now or not ? :U
hey, for context, i made a card that retrigers stone cards and tranforms non scoring cards into stone card, but i wnt to make the code retrigger every queen twice , and transforms non-scoring cards into polychrome queen
what should i change ?
config = { extra = { repetitions = 1 } },
loc_vars = function(self,info_queue,center)
info_queue[#info_queue+1] = G.P_CENTERS.m_stone
end,
calculate = function(self, card, context)
if context.cardarea == G.play and context.repetition and not context.repetition_only then
if context.other_card.config.center.key == 'm_stone' then
return {
message = 'Again!',
repetitions = card.ability.extra.repetitions,
card = context.other_card
}
end
end
if context.before and not card.debuff then
card.ability.extra.AddChips = 0
for i=1, #context.full_hand do
local card_is_scoring = false
for j=1, #context.scoring_hand do
if context.full_hand[i] == context.scoring_hand[j] then
card_is_scoring = true
end
end
if card_is_scoring == false and not context.full_hand[i].debuff and not context.full_hand[i].clown_destroying then
context.full_hand[i]:flip();
context.full_hand[i]:set_ability(G.P_CENTERS.m_stone);
context.full_hand[i]:flip();
end
end
end
end
} ```
no change with this
do u know the command for spawning one?
iuse ctrl + c
I have this code for a sticker, but I'd like it to move when the Joker is activated with the sticker. Does anyone know how?
with debugplus in collection, get your mouse on a card and press 3
should spawn it
thank you so much
miss smth?
wait i just realised but you don't have a loc_vars
This code
add
return { vars = { card.ability.extra.chips } }
end,```
after config
something like this
no change
reshare the screenshot of the current code again ?
damn, what are you using to code ?
my text editor, it's just a new unsaved file so it doesn't show the colors effect
ohhhh
bump (bad timing, maybe if it is the case)
rechange chip_mod to chips back (yes i know)
no change
morning folks
Can someone help me? 
what do u mean by move?
shake
G.RESET_JIGGLES```
is for shaking
dna shake for example
other than that i dont know đ
mmm that little move a Joker makes when it activates not sure if Iâm making myself clear
when exactly do u wanna shake the joker? all the time or when active or another condition?
I FOUND IT !!
fr?
it needs to be only context.joker_main
you can remove context are card
i just tested of my own and it worked
alright Iâll give that a shot
The function of the sticker is to steal 10% of the base chips. I want it to shake when that theft happens
overal just this, i think the game couldn't process to be both for some reason
and i tested it without and with 3 6s
it does applies the effect only when there's 3 6s
hey quick question, does the art for an edition have to be a shader or would a png work?
shader
to adapt to the lights
i dont know if im correct or not, but i think all u need is a return function when theft happens
works! tysm
i'm prolly gonna put this on the side since clearly I need to re-examine lua
contexes is sometimes really not looked at too much lmao
my best suggestion is to look at other mods, one usefull resource is Vanilla Remade
Contribute to nh6574/VanillaRemade development by creating an account on GitHub.
it basically has jokers, enhancement, vouchers, etc
@fluid burrow can u add a retrurn before the last end and see what happens
it's the vanilla jokers codded in lua with smods in mind
so it's a good resource if you ever need to do something but don't know how
definitely been lookinâ at that a good amount yeah but
Iâm more talking just an understanding of coding logic like the guy said earlier
so yeah ima try and re-examine
bump 2.0...
inside the if?
add this before the last end
chips = card.ability.extra.chips
}```
and add this a the start
config = { extra = {chips =0} }```
outside
im 90% sure something is gonna go wrong but its a start ig
dont wanna go up and down to keep looking at it lol
@fluid burrow why is your code like this if u dont mind me asking?
i'm looking at other scaling jokers in game and they they scale is diff
what are you talking about?
here 3 examples from game jokers
they all store how much they scaled and how much they scale each time in config
and then they add condition to when to scale
your code, i dont see where and how
it may just be me not understanding it correctly lol
Hello dev chat
Hello izz
It could be because it's for a sticker and it's different from how jokers work
I just had the worst exam this semester đđ
oh
good
starting new joker today
wait what?
Whats the effect
im getting this crash and i dont know why ```lua
SMODS.Shader{
key = "filter_shader",
path = "filtered.fs"
}
SMODS.Edition{
key = "filtered",
loc_txt = {
name = "Filtered",
text = {
"nil"
},
label = "Filtered"
},
shader = "filter_shader",
Gains 10 chips for each triggered played seal
Couldnât locate your shader file
yeah is sticker code
Thats nice
@fluid burrow explain the joker function fully please
Oh
it should be easy
Mhm should look for triggering seals at end of round and played hand
yeah thats what the crash msg said but it is the right key i think
Itâs not exactly a Joker itâs a sticker applied to a Joker, and it mainly adds downsides. For example, 'Eternal' makes the Joker unsellable and indestructible. In my case, the sticker steals chips from the hand that was played
oh
i havent added mod prefix for anything and everything else is working right
now i see its a sticker ....
i thought it was a joker ahhhhhhh
Hereâs an example

Oops! The game crashed:
game.lua:2765: bad argument #1 to 'push' (boolean, number, string, love type, or table expected)
Additional Context:
Balatro Version: 1.0.1o-FULL
Modded Version: 1.0.0~BETA-0614a-STEAMODDED
LĂVE Version: 11.5.0
Lovely Version: 0.8.0
Platform: Windows
Steamodded Mods:
1: Happiest Day by mArcello [ID: Happiest Day, Version: 1.0.0]
2: DebugPlus by WilsontheWolf [ID: DebugPlus, Version: 1.5.0~dev, Uses Lovely]
3: More Speed by Steamo [ID: MoreSpeed]
4: Achievements Enabler by Steamo [ID: AchievementsEnabler]
5: Escape Exit Button by Steamo [ID: EscapeExitButton]
Lovely Mods:
Stack Traceback
(3) LĂVE function at file 'boot.lua:352' (best guess)
Local variables:
errhand = Lua function '(LĂVE Function)' (defined at line 598 of chunk [lovely debugplus.console "debugplus/console.lua"])
handler = Lua function '(LĂVE Function)' (defined at line 598 of chunk [lovely debugplus.console "debugplus/console.lua"])
(4) method C function 'push'
(5) Lua upvalue 'gameUpdateRef' at file 'game.lua:2765'
Local variables:
self = table: 0x274b7820 {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x278614a8, F_ENGLISH_ONLY:false, viewed_stake:1, HUD:table: 0x27a595f8 (more...)}
dt = number: 0.016734
(6) Lua method 'update' at Steamodded file 'src/ui.lua:84'
Local variables:
self = table: 0x274b7820 {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x278614a8, F_ENGLISH_ONLY:false, viewed_stake:1, HUD:table: 0x27a595f8 (more...)}
dt = number: 0.016734
(7) Lua field 'update' at file 'main.lua:999'
Local variables:
dt = number: 0.016734
(8) Lua function '?' at file 'main.lua:938' (best guess)
(9) global C function 'xpcall'
(10) LĂVE function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '?' (defined at line 909 of chunk main.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"])
so confused why my game keeps crashing
1
I think Iâve got an idea display a message when it activates, like (-10 chips) or something
return {'message'} should work
Now the problem is that they activate at the same time
could someone help pretty pls
send code
how can i fix soul's scale too?
somehow u need to make sticker trigger only for the joker its on
can i send in dm, its long
just screen shot line 2765 and around it a bit
like 10 lines up and down
scale??
yeah
oh
im thinking it might be that im missing something, im testing this with the foil shader just with a different file name, so maybe it needs something more
sorry not in my limited skills list lol
either call set_sprites again like so
newcard:set_sprites(G.P_CENTERS.j_pal_parsi)
or just set the multiplication (right) on the width and height directly on card creation
G.CARD_W * 1.7675,
G.CARD_H * 1.7675,
the soul not scaling is caused by the scaling applied during card creation which doesn't apply when you actually manually edit the transform values
ok
oh
I hate shader coding
Hard math
Shenanigans
i hate it too, mainly cause i have no idea how to even do it lol, hence why i stole foil code
LMFAO SAME
mb didnt realize they were cut
well for now i'll just make the code for the edition and i'll just set the shader part of it to false
i have no clue ...
Use a placeholder shader
I think
Keyword think
well shit đ
Balatro shaders are codded with f# and glsl
Thereâs no such resources for this
Only some examples
And the love 2d vlog on shaders
If you want i can send links
Question: how can I check for every joker if it has been destroyed by the custom joker itself?
Cuz I wanna check for every joker destroyed by this custom joker it gains +Mult
You can destroy and add value
If its last index it will destroy 1
If its index =last index and first index (thereâs only 1 joker ) so no destroy
If its first aswell it will add 1
If its neither last or first then it will destroy 2
Adding double value
i think debugplus is crashing my game
Oops! The game crashed:
game.lua:2765: bad argument #1 to 'push' (boolean, number, string, love type, or table expected)
Additional Context:
Balatro Version: 1.0.1o-FULL
Modded Version: 1.0.0~BETA-0614a-STEAMODDED
LĂVE Version: 11.5.0
Lovely Version: 0.8.0
Platform: Windows
Steamodded Mods:
1: Happiest Day by mArcello [ID: Happiest Day, Version: 1.0.0]
2: DebugPlus by WilsontheWolf [ID: DebugPlus, Version: 1.5.0~dev, Uses Lovely]
3: More Speed by Steamo [ID: MoreSpeed]
4: Achievements Enabler by Steamo [ID: AchievementsEnabler]
5: Escape Exit Button by Steamo [ID: EscapeExitButton]
Lovely Mods:
Stack Traceback
(3) LĂVE function at file 'boot.lua:352' (best guess)
Local variables:
errhand = Lua function '(LĂVE Function)' (defined at line 598 of chunk [lovely debugplus.console "debugplus/console.lua"])
handler = Lua function '(LĂVE Function)' (defined at line 598 of chunk [lovely debugplus.console "debugplus/console.lua"])
(4) method C function 'push'
(5) Lua upvalue 'gameUpdateRef' at file 'game.lua:2765'
Local variables:
self = table: 0x0a87a7b0 {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x0af39268, F_ENGLISH_ONLY:false, viewed_stake:1, HUD:table: 0x0b03a3a8 (more...)}
dt = number: 0.0166998
(6) Lua method 'update' at Steamodded file 'src/ui.lua:84'
Local variables:
self = table: 0x0a87a7b0 {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x0af39268, F_ENGLISH_ONLY:false, viewed_stake:1, HUD:table: 0x0b03a3a8 (more...)}
dt = number: 0.0166998
(7) Lua field 'update' at file 'main.lua:999'
Local variables:
dt = number: 0.0166998
(8) Lua function '?' at file 'main.lua:938' (best guess)
(9) global C function 'xpcall'
(10) LĂVE function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '?' (defined at line 909 of chunk main.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"])
im so confused ive tried everything, the game only begn crashing when i installed it, maybe i installed it wrong? idk
how do i enable joker retriggering?
You donât đ
The game takes care of it
You can disable blueprint compat
oh its enabled by default? idk why i thought it wasnt
ok so i have 2 issues with the code
- card in hand scaling triggers for all seals and in every played hand, i want it only when triggered
like blue seal on last hand, or red seal on a steal card mid play - discard doesnt scale
It is if your joker context isnât add to deck and remove from deck or selling_self
Or selling_card
Any other context will retrigger
0 idea
iâm cursedđ
dont give up, u will find the issue if u keep trying
so i just use context.repetition for it ?
No its
thatâs rlly sweet ty, ima sleep on it n try again tomorrow
Any joker with context different than those can be retriggered automatically
If you add repetitions
dont forget me pl
wdym adding repetitions, like ading them to the return?
Add context.end_of_round to cardarea==G.hand ?
Seal retriggers donât work for discards
but that will make it so i f i have a red seal trigger mid play in hand it wont work
i know, just checking if the discarded seal did trigger, then add chips
You have to force trigger i think
Yes
Depends on if you want to retrigger same joker or other one
what exactly are u planning?
the same one, its for the edition
oh i see
so for now i have this```lua
if context.joker_main or (context.repetition and context.cardarea == G.play) then
if true then --pseudorandom("filtered",1,2) == 1 then
return{ repetitions = 1}
end
end
Return {repetitions=1}```
It should be and not or
This would work
Add and (your pseudorandom)
would this work for it? ```lua
if (context.joker_main and context.repetition) or (context.repetition and context.cardarea == G.play) then
If you want it to be affected by game probabilities effect like ooops all sixes I wonât suggest that doing pseudorandom like that
This is fixed 1 in 2
No
No or
Its all and
i dont, i want it to be a fixed 1 in 2
Use game probabilities instead of 1
Wait iâll show you an example
i want it to be a 50/50, cause it either retriggers it or debuffs it
can i do this somehow?
so this would work right? ```lua
if context.joker_main and context.repetition and context.cardarea == G.play then
pseudorandom('seed') < G.GAME.probabilities.normal / card.ability.extra.odds then
Add odds in your config
Set it to 2
Print(âsomething â)
If it triggers it would show in your console
In debugplus
i see
its not retriggering the jokers, only the playing cards
for _, c in ipairs(G.discard.cards or {}) do
if c.seal and G.P_SEALS[c.seal] and G.P_SEALS[c.seal].calculate then
-- Build a context for the seal effect
local seal_context = {
cardarea = G.discard,
main_scoring = true, -- or false if you don't want to score
individual = true,
other_card = c,
discard = true,
}
G.P_SEALS[c.seal]:calculate(c, seal_context)
end
end```
what do u think of this code
AI helped but not sure
so this should work? lua if context.repetition and (context.cardarea == G.play or (context.cardarea == G.jokers and G.jokers.card == card)) then
Remove G.play
would it retrigger regular cards without it still?
an edition that has a 50/50 chance of retriggering the card or debuffing it
so it has to work on both jokers and playing cards
with this playing cards retrigger themselves but jokers retrigger playing cards
I just found thus and its so funny đ
AHHHHHHHHHH
1 second i think i figured it out
SMODS.Edition({ key = "overexposed", loc_txt = { name = "Overexposed", label = "Overexposed", text = { "{C:green}Retrigger{} this card" } }, discovered = true, unlocked = true, shader = 'overexposed', config = { repetitions = 1 }, in_shop = true, weight = 8, extra_cost = 4, apply_to_float = true, loc_vars = function(self) return {} end })
This is full code for triggering card with this edition
đplease read resources i send
Reading is overrated
context.other_card.ability.seal checks if card has a seal, correct?
oh, thats, way easier lol, sorry
context.other_card.seal I think
context.other_card.seal checks the key of the seal
Debatable đ even eremel doesnât know
We asked eremel he was like
Yeah i have no idea đ
If its any seal at all it might just be card.seal unless im just outdated as hell
Mentally speaking
I think so
I think cards added to deck but change cardarea
Maybe
Maybe iâm stupid
Might be context.using_consumable
Thats using not adding
Granted: you get a $400 Arby's gift card and a plain, dry McDouble
Sorry I thought they meant adding as in using it to add x thing
cant find it in smods docs
is there a way to change the displayed score requirement? Because the moment I change the score requirement for a blind it doesn't show any changes
I think your best alternative is consumable bought
context.card_added is for any card added
this is for only playing cards
bump
if context.card_added and context.card.ability.set == "Tarot"
Or similar? Maybe?
is the documentation for SMODS.Center completely gone?
yeah im a bit fried lol
can't really figure out why this doesn't work - i've been doing the same thing for loc_vars the entire time but it just won't work here
Yes
Hi vic
Maybe it needs dinner
hahaha a
no crash log?
not sure we can do anything to help if we cant diagnose the problem
try reverting your changes and see when it opens
Better but not great
Good to hear youâre okay
So I was right and awesome and epic
Small victories my friend
They make the world go round
how can I make a joker set the current played hand's chips and mult to 0?
Basically like The Flint blind but instead of halving literally sets both to 0.
guys...
can anyone help me with this crash log?
im SERIOUS!!!
THiS IS ALL IT SAYS!!!
one sec lemme emulate it
Copy the Flint code, but multiply by 0
SMODS.Rarity{
key = "Void",
prefix_config = {key = false},
badge_colour = G.C.DARK_EDITION,
pools = {["Joker"] = true},
get_weight = function(self, weight, object_type)
return weight
end,
}
i need help, it's my first rarity and im lost
what do need to add to make my joker appear only in souls and make it say not "common" but "Voidborn"
what the hell happened here
what's the code
you're feeding an incorrect argument to a function
I tried doing that but it crashes and says that "blind" is a nil value.
Someone else from #âă»modding-general said that I should't do that.
i dont fucking know man
that triggered when the money window popped up
how to i check if i used a specific consumable using context
the one that says cash out at the end of it
this is literally!!! the entire crash log
you shouldn't do that
I'm trying to make an enhancement which acts like the Glass Card so it has a chance to destroy itself. However, I cant seem to find a way to do this. I have looked into the source code and didn't really find where it supposedly destroys itself with that chance. I've looked at other projects but didnât find anything I could understand there either. I'm pretty new to modding Balatro, so help would be appreciated :D
my current code:
bump
just set chips directly and update hand text
you do not need to access the blind
update_hand_text({}, {mult = mult, chips = hand_chips})
thank you so much!
just set hand_chips and mult directly and update the text
i just tested this and its not retriggering jokers for some reason
thank you i got it to work
how to make ability like pareidolia but considered as numbered card?
hook is_face and return false
...
how's the joker defined
to make it appear in the soul i think you need to take_ownership of it
wdym
which part of what i said
all of it (ima begginer in making mods i might get lost easily)
like how do i check how i defin,ed it ? if i even defined it
what's the code for the joker, i mean
take_ownership is a way to change what a card does
the soul specifically spawns legendaries so if you want it to spawn another rarity you need to change it
Soulable should be used, right?
SMODS.Joker{
key = "Soulless",
loc_txt = {
name = "{C:dark_edition}The Soulless One",
text = {
"Gains {X:mult,C:white}X1.5{} Mult",
"then multiplies it by {X:mult,C:white}X1.5{} Mult",
"every time that {C:attention}scoring hand",
"contains {C:attention}three{} scoring cards",
"{C:inactive}(Currently {X:mult,C:white}X#1#{C:inactive} Mult)";
"{C:dark_edition}A celestial choir whispers, unseen, unheard by mortal ears."
}
},
atlas = "soulless",
soul_pos = {x = 0, y = 1},
rarity = Void,
pos = { x = 0, y = 0},
cost = 50,
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
config = { extra = {
xmult = 2,
xmult_gain = 1.5
}
},
loc_vars = function(self, info_queue, card)
return {vars = {card.ability.extra.xmult}}
end,
calculate = function(self,card,context)
if context.before and #context.scoring_hand == 3 then
card.ability.extra.xmult = (card.ability.extra.xmult + card.ability.extra.xmult_gain) * card.ability.extra.xmult_gain
return {
message = 'Ascension...'
}
end
if context.joker_main then
return {
card = card,
Xmult_mod = card.ability.extra.xmult,
message = "X" .. card.ability.extra.xmult,
colour = G.C.MULT,
}
end
end,
}```
fuuuuuuuuuuuuuuu-
i don't think rarities have that attribute unless it's new
nevermind it, im not motivated enough
rarity should be "modprefix_Void" in quotes
modprefix being your mod's prefix
and where should i put it ?
Must be rarity = 4
no that's for legendary
like this ?
yes but replace modprefix for your mod's prefix
like this?
uhhhh
no
im still finding how to fix this but now with this problem. i made this for now but it makes no sense
if next(SMODS.find_card("j_modprefix_key")) then
return false
end
return card_is_face_ref(self, from_boss)
can i see the code again
{n=G.UIT.C, config={align = "cm", padding = 0.05, colour = G.C.BLACK, r = 0.1}, nodes={
{n=G.UIT.C, config={align = "cr", padding = 0.01, r = 0.1, colour = G.C.CHIPS, minw = 1.1}, nodes={
{n=G.UIT.T, config={text = ((G.GAME.hands[handname].chips >= 0) and "+" or "") .. G.GAME.hands[handname].chips, scale = 0.45, colour = G.C.UI.TEXT_LIGHT}},
{n=G.UIT.B, config={w = 0.08, h = 0.01}}
}},
enitre code ? with SMODS.rairity and the smods.joker and all ?
just the joker
SMODS.Joker{
key = "Soulless",
loc_txt = {
name = "{C:dark_edition}The Soulless One",
text = {
"Gains {X:mult,C:white}X1.5{} Mult",
"then multiplies it by {X:mult,C:white}X1.5{} Mult",
"every time that {C:attention}scoring hand",
"contains {C:attention}three{} scoring cards",
"{C:inactive}(Currently {X:mult,C:white}X#1#{C:inactive} Mult)";
"{C:dark_edition}A celestial choir whispers, unseen, unheard by mortal ears."
}
},
atlas = "soulless",
soul_pos = {x = 0, y = 1},
rarity = "Awake_Void",
pos = { x = 0, y = 0},
cost = 50,
unlocked = true,
discovered = false,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
config = { extra = {
xmult = 2,
xmult_gain = 1.5
}
},
loc_vars = function(self, info_queue, card)
return {vars = {card.ability.extra.xmult}}
end,
calculate = function(self,card,context)
if context.before and #context.scoring_hand == 3 then
card.ability.extra.xmult = (card.ability.extra.xmult + card.ability.extra.xmult_gain) * card.ability.extra.xmult_gain
return {
message = 'Ascension...'
}
end
if context.joker_main then
return {
card = card,
Xmult_mod = card.ability.extra.xmult,
message = "X" .. card.ability.extra.xmult,
colour = G.C.MULT,
}
end
end,
}```
two things:
- in your rarity remove the whole
prefix_configline - your mod's prefix is
awaknotAwake
better but no name
hey that's also what i did lol
you need a loc_txt in your rarity
or a localization file entry
can i see the code
Hello N
watching on steammoddeds first mod github i found this thingy misc.labels['k_'..key:lower()] what do i do with it ?
hii
how can i change the game over/ win text that jimbo says?
do you have a localization file? if not ignore it
loc_txt = { name = "rarity name" }
is what you need
thnaks alot, it works now ! :)
and quick question now that i think of it, how do i cange the mod names color in the desc of the jokers ?
in your mod's metadata
makes sense
i search here first when i wanna make something without bothering poeple but thanks x)
what's the default_weight of rare cards ?
can blinds have config?
is this right?
it should be function Card:is_face
and the return should have self
also your joker's key should have the mod prefix
how can i change the text that j_joker says when you lose/win a run?
oh yeah it worked
thanks
how come playing a straight with two specific jokers from my mod crashes the game? (sometimes?? there was one specific instance where it didnt that i cant recreate) im baffled i have no clue what im doing
images are the error, the line in smods thats throwing it, and the calculate functions of the 2 jokers
is there any way to make it so whenever a specific consumable is ever shown on screen/spawned it becomes negative?
you're setting value to a number when it's a key?
you need to do it in set_ability iirc
is there any way to make blinds change what suit they're debuffing each hand?
wdym
by specific consumable i mean a consumable that changes
could also be consumableS
no it is one of mine
its just controlled by a different object
im making a partner
and i want their linked consumable
to always be negative
oh then you set it to negative in set_ability if the condition is true
huh? checking the value of a card always gives me either a number or "Ace", "King", "Jack" or "Queen" so i dont see why setting it to a number should cause a problem
idk just throwing ideas
it seems like you're setting the value to something wrong tho
whats the default wheight of rare cards ?
OHH it needs to be a string not an int
sorry meant to turn off ping
really werid that this bug only seems to show up if i play a straight with BOTH jokers though
or does it
yeah no the second joker had literally nothing to do with it
its just if the resulting average card was a face card or not
Hey! How could I add a seal to a played card with a boss blind?
I am trying to look into the Horse Boss Blind in the yahimod, but I cannot find the code to that :/ (It uses a function I cannot find for the life of me)
This is the Code I have for that:
name = "bosscasual",
key = "bosscasual",
mult = 0.5,
dollars = 0,
loc_txt = {
name = 'Casual',
text = {
'Nur fĂŒr Casuals!'
}
},
boss = { min = 1 },
boss_colour = HEX('3cc0c8'),
debuff_hand = function(self)
for i = 1, #G.play.cards do
if G.play.cards[i].seal == nil then
SMODS.juice_up_blind()
G.play.cards[i].seal = "FinusHD_casualseal"
end
end
end,
}```
The current Problem with that is, that the seal does not save :/
what is card_eval_status_text
it makes the text thing appear on cards like returning a message
you should use SMODS.calculate_effect instead tho
try G.play.cards[i]:set_seal("key")
That works!!! Thank you!!!
seems good enough
We arenât seeing this in shop đ
doe:
Get a lot of this guy âŹïž
pimp my code
ship it
that means whatever you are putting in localize is wrong
can you give me an example of what this usually prints
a random planet cards
the planet card's key?
yes
is localize(key, 'planets') a thing?
is it
ah god damnit
what do then
i thought it does
and even if it is, it should return a table with both the name and the description of that card
localize{ type = "name_text", set = "Planet", key = key }
yeah what N' said
-# im still trying to boot up vsc to check localize's code đ
oh yeah
please dont use :lower() lol
whats the matter
some mods might have keys with uppercase characters in them
what do i put in key?
huh
i mean i don't know what you want me to tell you without code
same
i just sent it tho
hold on
test
what the fuck
hold on
i got automodded
just send a screenshot
aiko(?) sent an explanation about that before
uhh your message with ``` being added with more characters when sent (color code or something) which causes it to go past the word limit
so it refuses to be sent
smt like that
ah that fucking blows
wrong type.........
N' said name_text, not Planet Cards đ
but also
the key is wrong
yeah it should be a string
why is it c_mercury instead of planet_name
-# its not even a string too
oh ok
keep it name_text?
yeah, type = "name_text" tells localize to grab the name only
planet_name is also wrong since it removes the c_
so which one is right
right, didnt notice that
thats my code!
so what do i put
oh sh it is?
name_text
no
try "c_mercury" for now to see if it works, go step by step
oh
yes
yeah i changed it for multi line names
without the "" you are getting c_mercury the variable
still nil
which is always nil unless some mods have c_mercury as a global variable for some reason
đ€ whats the code now
just the loc_vars code
o damn
loc_vars = function(self, info_queue, card)
local planet_name = string.gsub(card.ability.extra.desired_planet, "c_", "")
return { vars = { localize{ type = "text_name", set = "Planet", key = "c_mercury" } } }
end,
you are everywhere now đ
name_text
text_name???
Not text_name
GHGEWHRGRDWICGUIYEGI
just copy the code i sent is not that hard
blackjack??
what happened to stupid 1 to 20
JESUS CHRIST THERE YOU GO đđđđđđđđ
All me
amazing
good now replace "c_mercury" for card.ability.extra.desired_planet
alright
remove the string.gsub part btw
i am genuine;y SO sorry btw
dont change the key at all
for being this dumb
no its fine đ
I forgive you
how to make joker that give every joker from my mod give +mult?
yea but the effect affected my mod jokers
am i dumb for not understanding that
sorry im not asking the question completely
every joker has a reference to its mod
this?
yes
anyways, use context.other_joker
It's either joker.mod or joker.config.center.mod to access it
lemme go to balatro and check
how to identify my mod jokers?
look at your planet_name variable again
one sec one sec
where's srockw
MY BALATRO WONT OPENNNN
srock sold me fent
sounds like a hero to me
yeah so
check for context.other_joker.config.center.mod.id
it should print out the mod id the joker came from
do note that vanilla jokers wont have this, so add nil checks too
so i need to put my mod prefix to it?
if context.other_joker.config.center.mod and context.other_joker.config.center.mod.id == "your mod id" then
--stuff
end
nope, your mod id
the id is the id you put in your metadata json
true i did
sya that again
ahh i see
@manic rune @red flower
syn tax err or
what is this line
"This Duck will self destruct" goes hard
nxkoo
explode
remove that whole line you don't need it
aye
it should only be card.ability.extra.desired_planet
yes
though self destruct should be highlighted in {C:red,E:2}
i did
dont worry
im not leaving any text uncolored
my hands froze
how do i code on this thing
gehaha
will self destructs?
oh god damnit
grammar error
D:
self destroy
penguin club kil
let me see if this works
actually no, that means i have to
find mercury in shop
ok now you're missing the will
buy all other planet cards
this duck self destruct
either self destructs or will self destruct
bro also forgot to include maliconics
mercury poisoning
wait whats mercury for again
that's why cards have the info queue tooltips
oh dont worry, i didnt forget
okay maybe that's too much
why does it include all of them
add "Hold T to expand tool tips" like joyous
:3
im stealing the code
...
its context.using_consumeable
that's victin's mod
i should quit being a modder
i did mean them to use it
how the fuck did i forget about that
i didnt know victin made joyousspring...
OH WAIT, BESIDES MY STUPIDITY
i dont have an expand tooltips keybind
wait really
it didnt change when i get to Ante 2
đ€
you can hide tooltips in the config
we should have a context like context.end_of_ante...
i have a switch pages keybind and a related cards keybind
oh
one can only dream
on unrelated note, i think i lost my coffee
it's literally end_of_round and G.GAME.blind.boss
I FORGOT WHERE I PUT IT
nxkoo are you stressed
do i looklike it
true
yes
you're not drinkable
thank you N' for the insightful comments
of course i am i'm mostly liquid
...should i be scared that the documentation looks like this
LMAO
make me liquid
pdfs are good
how does that work
they're also food
im scared
Yummy
i once had a pdf as documentation before and it was 300 pages
i have grabbed nxkoo's message
put it down
no
what are u gonna do with it
hold it
sure
animator vs animation style
you're cooked if the documentation is a pdf
cook it
thaw it
The opposite, it likely means it's well documented
SMODS PDF
140 pages
How could I make it, that if you have a certain joker, one single song plays the entire time, unless you sell it or remove it in some way?
{
key= 'totk_music',
path = 'totkmusic.ogg',
volume = 2,
select_music_track = function()
if (totkjoker == true) then
return true
else return false
end
end,
sync = {
totk_ost_music = true
}
})```This is the code for the music, that I made with the docs and
```calculate = function(self, card, context)
if context.joker_main then
totkJoker = true,
return {
chip_mod = card.ability.extra.chips,
mult_mod = card.ability.extra.mult,
message = 'Willkommen zu den Tears of the Kingdom Highlights, mit mir FinusHD!',
sound = 'FinusHD_totksfx'
}
end
end,```this is the calculate code for the joker, I made. It seems to crash after the if statment for some reason :/
the reason it crashes is because you have an extra comma in that line
for your question i would check how jimball does it in cryptid
Oh okay, never played cryptid so I'll download it real quick lmao
I do believe cryptid checks every frame is jimball present 
select music track is meant to return a number
higher number = higher priority
ooooh, okay that makes sense
Also the totkjoker variable is not needed
Why?
Inside select_music_track you can check if next(SMODS.find_card('j_prefix_key')) then return 10000 end
10000 is just an arbitrary number I picked
ooooh, okay thx!
Will I then need to play that music, or will it play automaticly?
how do you word this better
It'll play automatically if the priority returned is higher than every other music
oooh, okay I get it now! Thank you!
my game crashed when i add vanilla joker, any help?
Cus vanilla jokers don't have mod defined in them
how to fix it?
(context.other_joker.config.center.mod or {}).id
So I have this code here: SMODS.Sound( { key= 'totk_music', path = 'totkmusic.ogg', volume = 2, select_music_track = function() if next(SMODS.find_card(j_FinusHD_totk)) then return 10000000 end end })
But the Balatro music still plays :/
"j_FinusHD_totk" in quotes
Ooooh yeah right đ
now it is in quotes, but still does not work? Do I need to wait until the balatro music stops, and if yes how could I stop it from playing?
you shouldn't need to wait, it's likely smt else is wrong
this should make it so it plays when you have the joker
like this?
anyone know a good way to get the number of unique cards in the deck?
Huh, interesting
try making the key music_totk
now it works thanks!!!!
wdym by unique
like either different suit or rank
it won't work
What's the issue
the joker didnt giving the mult
you would have to iterate through the deck and count each suit and rank combination and then check all the ones that are at 1
Hmm, maybe wrong context
well I think not at 0 is more like what I want maybe I need to reword it then
uh how would i get the cards in the deck?
Check what context baseball card uses
Not at my pc rn
G.playing_cards is the full deck G.deck.cards are the ones still in deck and not in hand/discard
SMODS.Joker {
key = "baseball",
blueprint_compat = true,
rarity = 3,
cost = 8,
pos = { x = 6, y = 14 },
config = { extra = { xmult = 1.5 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.xmult } }
end,
calculate = function(self, card, context)
if context.other_joker and (context.other_joker.config.center.rarity == 2 or context.other_joker.config.center.rarity == "Uncommon") then
return {
xmult = card.ability.extra.xmult
}
end
end,
}```
it is context.other_joker
theeeen maybe you put the mod id wrong?
Or bepis lied and it's not config.center.mod
But I trust bepis with my life
thank you do you know what way the info gets given when I use that so I can work out how to loop through it?
it is my mod id
they're an array of cards
this one worked but crashed my game when adding vanilla joker
can you send your metadata json file
one uses - and the other _
the one that worked used - in the mod id
Oh yeah you put different mod ids
if forced_key was like brandon or something how would the localization key look like?
sob
i dont even trust myself what the hell
anyone? new to localization...
I need help with this code
it should make a joker gain 1.1x mult when a hand is played
seems like a partner thing, which i dont know about rn
sorri
why are the played cards getting losing the debuff texture?
calculate = function(self, card, context)
if context.before then
if pseudorandom("filter",1,2) == 1 then
card:set_debuff(true)
return {message = "Filtered!"}
end
end
if context.repetition and context.cardarea == G.play and context.other_card == card then
return {repetitions = 1}
end
if context.retrigger_joker_check and not context.retrigger_joker and context.other_card == card then
return {repetitions = 1, message = "Again!"}
end
end
should use SMODS.debuff_card instead
i'll try that
it's in the utility functions section of the wiki
why isn't the joker scoring the x_mult
SMODS.Joker {
key = 'happi',
loc_txt = {
name = '{E:1}happi boi',
text = {
"Gains {C:white,X:chips}X#2#{} Chips",
"per played hand",
"{C:inactive}(Currently {C:white,X:chips}X#1#{C:inactive} Chips)"
}
},
config = { extra = { x_chips = 1, x_chips_gain = .1 } },
rarity = 2,
atlas = 'jester',
pos = { x = 1, y = 0 },
cost = 5,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.x_chips, card.ability.extra.x_chips_gain } }
end,
calculate = function(self, card, context)
if context.joker_main then
return {
x_chips_mod = card.ability.extra.x_chips,
message = localize { type = 'variable', key = 'x_chips', vars = { card.ability.extra.x_chips } }
}
end
if context.before and not context.blueprint then
card.ability.extra.x_chips = card.ability.extra.x_chips + card.ability.extra.x_chips_gain
return {
message = 'Upgraded!',
colour = G.C.CHIPS,
card = card
}
end
end
}
inside the first return only put x_chips = card.ability.extra.x_chips
SMODS.Joker {
key = 'happi',
loc_txt = {
name = '{E:1}happi boi',
text = {
"Gains {C:white,X:chips}X#2#{} Chips",
"per played hand",
"{C:inactive}(Currently {C:white,X:chips}X#1#{C:inactive} Chips)"
}
},
config = { extra = { x_chips = 1, x_chips_gain = .1 } },
rarity = 2,
atlas = 'jester',
pos = { x = 1, y = 0 },
cost = 5,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.x_chips, card.ability.extra.x_chips_gain } }
end,
calculate = function(self, card, context)
if context.joker_main then
return {
xchips = card.ability.extra.x_chips
}
end
if context.before and not context.blueprint then
card.ability.extra.x_chips = card.ability.extra.x_chips + card.ability.extra.x_chips_gain
return {
message = 'Upgraded!',
colour = G.C.CHIPS,
card = card
}
end
end
}
ok
try this instead, maybe the problem is that x_chips_mod doesnt exist
also card = card is not needed
still not working
now the cards stay debuff after round, would adding this fix that?
if context.end_of_round then
SMODS.debuff_card(card,false,"filter")
end
...does that even run when the card is debuffed
yeah it won't run if it's debuffed
id suggest hooking to end_round() instead
i just want to know where in the localization is it looking
Look where it is in the vanilla localization files
true
could i get help with that, im not 100% sure what i have to do to do that
local er_ref = end_round
function end_round()
er_ref()
for _,v in ipairs(G.playing_cards) do
SMODS.debuff_card(v,false,"fliter")
end
--do the same for G.jokers.cards
end
how can i make a blind that changes the suit it debuffs every hand?
it worked and i think i now understand better hooks
im not completely sure but my guess is something like the base game ones but with a calculate that changes its suit. you can see the base game ones here https://github.com/nh6574/VanillaRemade/blob/fbfeb4d2e14111c9c47706f71cc25c7b50e021c9/src/blinds.lua
I am currently making a mod which adds new face cards to the game. I have one here, the Fool, which goes above a ten, and behind another new face card. Outside of this, what else should I do to enforce the new order of cards?
hc_atlas = 'RF_Cards_hc',
lc_atlas = 'RF_Cards',
hidden = true,
key = 'Fool',
card_key = 'F',
face_nominal = 0.1
face = true
pos = { x = 0 },
nominal = 1,
strength_effect = {
fixed = 1,
random = false,
ignore = false
},
next = {'P', 'Tr', 'M' },
RF_prev= { '10' },
shorthand = 'F',
in_pool = RF_rankCheck,
} ```
```function init_prev_rank_data()
print("Initialize Remaining Previous Rank Data")
for _, rank in pairs(SMODS.Ranks) do
--Initialize
--In case the rank table does not have prev existed
--Base rank and ROYAL FAM one has them defined manually by default
if not rank.RF_prev then
rank.RF_prev= {}
end
next_rank_list = rank.next
for i=1, #next_rank_list do
local next_rank = SMODS.Ranks[next_rank_list[i]]
local RF_prev = next_rank.RF_prev or {}
if not table_has_value(RF_prev, rank.key) then
table.insert(RF_prev, rank.key)
next_rank.RF_prev = RF_prev
end
end
end
end
function getPoolRankFlagEnable(rank)
return (G.GAME and G.GAME.pool_flags[rank] or false)
end
local function RF_rankCheck(self, args)
if args and args.initial_deck then
return false
end
return getPoolRankFlagEnable(self.key)
end
SMODS.Ranks['T'].strength_effect = {
fixed = T,
random = false,
ignore = false
}
SMODS.Ranks['T'].next = {'F', 'P', 'Tr'}```
This is what I have so far, but do I need some type of override as well?
this doesnt seem correct

there's a temporary backward compat I think
already commited
does that not work on the display
im trying to use the new function, i just put the wrong value there i think
oof
ok its fine now and it doesnt lag too much
so im just pushing this
someone else with a worse pc can optimize jokerdisplay
my Mac was never meant to handle JokerDisplay in the first place
3 fps 
probably going down to 1
should there be an option
to only update the display when necessary instead of the standard 10 fps
yeah, but how can i change the debuffed suit every hand?
local suit = pseudorandom_element(SMODS.Suits, "seed")
and how do i update it?
i mean, the problem is that i cant get a "when necessary" that's why i dont use that lmao
i mean, that's just a variable, right?
i dont know how the variable for the blind thing is called, but it would be what somethingcom said in a context, probably context.after i think
how can i check how many discards the player had at the end of the round
this is what i have
there are multiple options so you could make a cycle
Update display: 10fps, when clicking, when hand is played, 1fps
local suit would have to be changed to blind.debuffed.suit i think
yeah maybe when i get the motivation to work on it again
it's ok, no rush
how do i make the game ignore if you have enough money to buy something?
hook G.FUNCS.can_buy
id assume that returns a boolean?
it's in functions/button_callbacks.lua
e.config.button is the callback function pressing the button would do
setting it to nil is the same as making the button do nothing
how would a make a thing where theres a 1 in 8 chance to make an item in the shop free
any item can be a voucher, joker, booster
actually scratch vouchers
seems too op
try blind.ability.debuffed.suit? if not no idea what the name of the variable is
ok ill try
anyone?
isnt there a coupon thing
for boosters and jokers
Yes.
neither
Try self.debuff.suit
ok
oh yeah, i forget self is a thing
it wont crash now, but the debuffed suit doesnt changes
try making it print the suit to see if it changes?
ok
if context.starting_shop then
for k, area in pairs({G.shop_jokers, G.shop_booster}) do
for k, v in pairs(area.cards) do
if pseudorandom("seed") < G.GAME.probabilities.normal / 8 then
v.ability.couponed = true
end
end
end
end
```?
this is what it prints :|
the overlay menu is used for full-screen ui but is there anything i could use for a smaller portion of the screen?
print self.debuff.suit instead cause i dont think thats what you want to see
i dont think so, you need to make it yourself
alright
the print works fine, but the debuffed wont change
doesnt seem to be working (ignore the partner stuff)
no idea then, sorry
Is this in context.starting_shop?
how do i modify a custom consumables spawn rate in the shop (this is for a voucher)
then maybe use SMODS.recalc_debuff(card) on all cards
you forgot to do v:set_cost()
couponed should work tho
in the calculate?
yeah, after changing the suit
but what card am i gonna refer?
call v:set_cost() after setting v.ability.couponed to true
would be something like this i think ```lua
for _,playing_card in ipairs(G.deck) do
SMODS.recalc_debuff(playing_card)
end
not working đ
can someone smarter than me help?
wait, maybe using the api method for recalc_debuff?