#💻・modding-dev
1 messages · Page 204 of 1
but most of the time loc_vars should be enough
Very fair lmao
I'm just trying to poke and prod (and probably know how can i restart balatro without closing and opening the game itself) as so far it still doesnt work
that along with message returns are also ways i debug while modding
I recommend getting debugplus
then you can inspect anything during the game
using the console and eval
i do have it
while ingame just open the console and do eval G.jokers.cards[1] for example
and everything in the joker will pop up
might be a bit overwhelming since there's a lot of UI stuff
im witnessing KNOWLEDGE
i don’t really exactly get the point of me downloading vscode
like i know its better but
it annoyingly doesnt list all of the values though, just lists bunch of stuff and then goes +14 more values
managed to make this work
I’d recommend using eval dp.hovered.whateveryouneed and hovering over the card when you press it over specifying a card
try doing eval inspect(G.jokers.cards[1])
it’s probably not gonna tell me anything about why my game’s crashing when i try to use my joker
pasting it in case anyone needs to do anything similar in the futur
function Card:add_to_deck(from_debuff)
local suit_jokers = {"j_greedy_joker", "j_lusty_joker", "j_wrathful_joker", "j_gluttenous_joker"}
local have_jokers = {}
for i = 1, #suit_jokers do
if self.config.center.key == suit_jokers[i] then
for m = 1, #suit_jokers do
if m ~= i then
if next(SMODS.find_card(suit_jokers[m])) then have_jokers[m] = suit_jokers[i] else have_jokers = {} end
end
end
end
if #have_jokers == 3 then
check_for_unlock({ type = "colorful_jonk" })
end
end
ay, instead of update, I can hook into cardarea:set_ranks, I reckon, and not do this update consistently 😄
I didn't know that
no wonder you have a wizard emote you are a wizard...
everything should be fine but it just spits out….
it will not, but it will help you with syntax errors and proper formatting
i mean that's what the error message is for
HELL YEAH
thank you so much y'all
as it turns out its supposed to be ability, not config
Why do you send such a little snippet
There is more stuff in the crash log
send all of it
this is a canon event in learning how to mod this game
yeah pretty much LMAO
there really should be a documentation about this, like even when looking at the balatro code itself it seems to suggest that its config
there's the examples wiki
i'd say update your steamodded first, if that doesn't fix it, remove all other mods and try only with yours
but there's like 2 mods out of all of them that show you some of the important basics
config is held in the center, which is basically the base of a card
once a card is actually created, the config in the center is copied to the card's ability
i wanna make a joker that adds hand size for every hand remaining, but reset it at when starting blind
i cant seem to figure this out
didn't work
oooooh, i seeee
same crash?
I think this idea is dead. I keep learning piece by piece how the get_straight function works and I lose morale each time lol
I'll keep the code around but that felt horrible
i removed all of the mods besides thrills and chills and
how do y'all get sentence highlighting for lovely patches on vscode?
it worked
Even Better TOML extension
thank you!!!
someone tell me wtf is hapening, its drawing enough cards, but the max hand size is fucked up
Realistic hand size be like
is this the right variable?
i may have an outdated version of cryptid
:sadtrombone:
or it may just be cryptid itself
becaus ehwen i have cryptid enabled the game crashes when i try to use fun is infinite
i don't think you should change that directly, use G.hand:change_size(arg) instead
note that arg is not the amount you set the size to, but the amount you increment it with
see if this works
okay, cryptid was the problem
i got the new version of cryptid and it worked
Show the rest of the code
it's visually a nothing burger currently, but damn I'm happy I got this working
changed it up, but now it removes hand size when starting a turn
variable names are broken because im completely lost
trying to figure out how to create a dagger-esque joker that returns dollars instead of mult, doesnt seem to be doing anything at the start of a blind
the getting_sliced variable is really only there to stop jokers from triggering, as far as I understand, but it doesn't actually get checked by the game to see if the joker should be destroyed
G.jokers.cards[i] should be checking for card, not self
oh yeah, never mind, i completely read over the return statement
I should go to bed, haha
thank you!
but it doesnt seem to be destroying the "sliced" card still
can the G.hand:change_size() function be used anywhere, such as within a joker's function?
guys am i dumb ````
calculate = function(self, card, context)
-- Check if a Jack is being played to set the flag
local is_jack
if context.cardarea == G.play and context.individual then
if context.other_card:get_id() == 11 then
print("IS JACK")
return {
is_jack = true
}
else
return {
is_jack = false
}
end
end
-- Check if a face card is in hand and the last played card was a Jack
if context.cardarea == G.hand and context.individual then
if is_face(context.other_card) and is_jack then
return {
x_mult = self.extra.Xmult,
message = "X1.5",
card = card
}
end
end
end
ill try using dissolve instead of destroy
change any self. with card.
nvm im onto something
Does the destroy context actually iterate over the jokers at all? 🤔
already fixed that and the selfs didnt have to do with the joker not being destroyed, dissolve worked wonderfully tho
oh i see
well i would assume so since jokers are treated as cards but apparently not
i didnt realise i was using dissolve as well 💀
function UTIL.createJoker(args) -- (key, edition)
G.E_MANAGER:add_event(Event{
func = function()
local _card = create_card('Joker',
G.jokers,
nil,
nil,
nil,
nil,
args.key)
_card:start_materialize()
_card:add_to_deck()
if args.edition then _card:set_edition(args.edition, args.edition.negative) end
G.jokers:emplace(_card)
return true
end
})
end
What do you think?
time to work on making a joker that creates consumables when a three of a kind is played
Okay yeah I tested it to be sure, I'm on the most recent version of SMODS, no mod is active except DebugPlus, and Verdant leaf just doesn't debuff anything by default
I guess I'll try to update DebugPlus and Lovely too to make sure
why no SMODS.add_card
when I wrote this function, it didn't exist
is it on the wiki?
yes
yeah, but contexts are called for cards within a card area. The wiki at least doesn't mention G.jokers as being iterated over in that context
it literally does what your function does but more
okay, there we go
looking through the runner 2 code
if context.before and next(context.poker_hands['Straight']) seems to be what the context should be
of course 'Straight' should be 'Three of a Kind'
of course, i also need to put in the code for creating the consumables
Okay, can confirm, most recent lovely and debugplus also results in this issue. I've seen it occur without debugplus active while playing "vanilla" with SMODS, so it's gotta be an SMODS thing. Only test left would just be to get it in complete vanilla (since the recent friends of jimbo update came out), but I see recent reddit posts talking about Verdant Leaf with no reference to it being bugged
when a Joker is not debuffed anymore, it calls Joker:add_to_deck(from_debuff = true)?
yes
k
so lanpan needs to
create three consumables when a three of a kind is played
then self destruct
does anyone know how to fix this? my game wont load anymore
You're attempting to index an atlas just named "centers". Do you have files named centers in your jokers/1x and jokers/2x folders?
now i need to figure out how to create a consumable
i mean
have the joker create a consumable
Had a silly idea for a modded joker
- Gives +mult equal to the total Jokers in your collection, but has a 1 in (total Jokers in collection) chance of appearing in the shop
it's pretty silly indeed, but in reality it might just be a stupid strong joker that is about as rare as an uncommon at most
ante 8
and done, now I just need to tie it into the actual card functionality rather than a hotkey, but that's barely any work
I'm not sure what's causing this issue
send langer screenshots please, more context needed
"Spades"
you're passing through a variable named Spades, but is_suit needs just needs a string
there's also no need to add 'true'
Wait this is the wrong card
ah well, i guess if you're bypassing the debuff you do want to ofc
i don tthink so?
looking through the perkeo example
I'm still getting the issue
what's your exact smods version?
local card = copy_card(pseudorandom_element(G.consumeables.cards, pseudoseed('perkeo2')), nil)
is there a way to change what the final ante is?
this is specifically a random consumable from your list of consumables but i'm sure i can change that
I opened an issue about it with all my info. I'm on 1.0.0~ALPHA-1425c-STEAMODDED, so a few commits behind recent?
I think trunk/main is 1428c
posted first build of my mod on the threads :]
probably by replacing copy_card
is there a way to change a card's edition without using card:set_edition, because I think this would be considered mildly obnoxious
Pretty sure this was fixed on the 26th
Wait, I see the issue. I forgot the ipairs
Cool. I thought I pulled recent about an hour ago but it looks like there was an issue with my git so I was mistaken that I was posting for the most recent version
Okay now I'm on 1428, I'll test it again and delete the issue if needed, my mistake
i mean the brute force way would be by changing card.edition
buuuuut set_edition does have a silent argument that blocks the animation when set to true
so maybe you might just wanna do that instead
oh yeah sweet, thanks
I have noticed one other minor bug with SMODS, which is that Mail-in Rebate, when copied by Blueprint or Brainstorm, plays all the money easing and sounds on Mail-In itself, rather than individually on it and each of the copy cards
Which I don't think is its vanilla behavior
that i confirm is still true as of 1428c
what happen to spamton D:
i've actually noticed that one too, i thought my ears were just trolling me
he's just like that
The card successfully made a random card negative, but nothing is happening after this. Did I forget to include something in the event?
return true
Is there a way to get a list of all Jokers (including injected ones) before init?
is there a list of new contexts available somewhere?
how would i make a joker create 3 consumables
or just like
a consumable in general
not just 3 of them
Before init? your mod would have to be the last to run
Works for me
doesn't have stuff like context.starting_shop yet which is what I want, I'd like to see what other new contexts there are
to my knowledge the only new context is starting_shop
me when the context is starting_shop!! 😳
so if I wanted to make something add another card to the shop, that'd be my best bet probably?
same lmao
and not blueprint!! 😳
then!! 😳
define add another
Im assuming starting_shop works like reroll_shop in the sense that it happens after pooling
so if you want to mess with the shop itself you're gonna have to patch
but if it's something like adding an additional card that yeah
yeah
fully functional™️ modpack manager
I see that SMODS has has_enhancement for enhancements. Does has_edition work for editions? I don't see anything for it on the SMODS wiki
What is the difference between G.play.cards and G.playing_cards?
okay, latter is entire deck, which is what I need
Does that include cards that have been taken out of the deck via being drawn, or just the current state of the deck
You can do card.edition and card.edition.<modprefix>_<key>
Current state of deck is G.deck.cards, G.playing_cards is the full deck
Cool, thanks!!
huh that
was easy, but like obviously it's not quite working right
Like this?
Oh, I see
if you want to check that it's not negative you can do not G.jokers.cards[i].edition or not G.jokers.cards[i].edition.negative
you might want to store G.jokers.cards[i] in a local variable to avoid repeating it so many times
is there a way to change what the final ante is?
is G.shop a thing at all? Right now I'm just using the Rare Tag code which uses context.area, which obviously here defaults to the Joker slots, so I'd like to change that to the shop
G.shop_jokers is the area you want
sweet, and like set_edition is there some function to set a stick like Eternal/Perishable/Rental?
I've got this code, which adds a Joker of a specified key to the shop. The only downside is that the items available in the shop are always huddled close together
But that's not an issue in my use case since the Jokers I use this for are meant to replace shop items, not supplement them
and this function is probably flawed anyway
well now it's in the right spot but you can't buy it and you can move it around completely freely
did you emplace it?
right!
there we go
now the other part of it, need to figure out how to get the sticker on it
is there not an ease hand size?
there's change_shop_size but that's permanent
also that was unrelated to any previous messages
what do i do in order to make a joker create a consumable
in the calculate function you can create a conditional for whatever context you want it to make the card in
i already have that
if context.before and next(context.poker_hands['Three of a Kind']) then
I think modify_scoring_hand is not there either?
Ugh I'm making change to edition code that's probably not going to be good for compatibility in the long run. But fuck it, we ball. I will fix it later
card:add_to_deck()
G.consumeables:emplace(card)```
SMODS.add_card is better
fair point
any time I've created cards so far I've just copied and modified existing code from the base game, but using the smods features is probably better
question somewhat related to the above: currently I have this function, which replaces a Joker in the shop with a new one
what'd be the best way I can make a version of this that doesn't replace the Joker, but also accomodates for the incerased spacing so the items aren't all clustered together?
to be honest i'm not too familliar with everything smods has
so it would be SMODS.create_card(t)
depends if you want to automatically add it to the area or not
add_card does basically this
is that any more efficient than the function I wrote lmao
t should be a table
i just patch create_card_for_shop and do what the rare tag does
joy_create_card is a list of cards to create that my jokers write to
if i have a question about a glitch while launching is this where i need to be?
or i guess the game crashing isn’t much of a glitch lol
what kind of consumable are you making
interesting behavior when there's more than 1 of them
they each make one and kinda clear the previous one
you need to give it a set, I'm pretty sure
so you might need to use pseudorandom_element to get the set name between tarot planet and spectral
or something fancier if you want modded consumables
okay they each make one but then the last one kinda overrides the others
what about modded sets though
there should be an SMODS table with all the consumables registered
idk how its called tho
i don't want to have to account for every single modded set
SMODS.ConsumableTypes for types
SMODS.Centers and check if center.consumeable for cards
how would i do that
take this with a grain of salt
local choices = {}
for k, _ in pairs(SMODS.ConsumableTypes) do
table.insert(choices, k)
end
local set = pseudorandom_element(choices, pseudoseed("anything"))
SMODS.add_card({ set = set or 'Tarot' })
lets just see if this works
is there any way I could change what the final ante is?
the choices should be empty to being with
Tarot, Planet and Spectral are in SMODS.ConsumableTypes
guys, how do I add a shader to a stake's sprite (like gold stake)?
I cant find the source code for the gold stake shader
this is what my mods folder looks like, is this correct?
when i want it to create 3
Looks about right, yeah
for i = 1, 3 do
local set = pseudorandom_element(choices, pseudoseed("anything"))
SMODS.add_card({ set = set or 'Tarot' })
end
you might want to check if you have room, unless you don't care
It's probably a problem with Reverie. Send the crash log here https://discord.com/channels/1116389027176787968/1226234529413468190
ok, thanks for the help, any other suggestions for mods to try out?
yeah i may want to have it check for space
but first, making the card self destruct
There are loads of awesome mods. CardSleeves, Bunco, UnStable, Paperback, Extra Credit, Plantain, Neato Jokers, Buffoonery (my own shameless plug here). The most famous one is obv Cryptid, though
And there are many more. These are just the ones I use all the time
bump
yeah just go find the Example Jokers stuff in SMODS documentation and look for the example Gros Michel
I appear to have created Jokers that when bought are both part of the shop and your Joker slots
okay they're stable if there's only one of them
so I need to put safeguards in to make sure this card cannot be duped
yep
do if context.before and context.main_eval and ...
is context.other_card valid inside of context.selling_card?
you'd just do context.card
it says right there that the card being sold is context.card
beat you to it
hi did you know you need to use context.card as outlined in the amazing smods docs
in my defense when the main calculate function has card in it and the context uses card to not necessarily be the same thing, I may want to check to see what it's looking at
like a 2 would do so much for clarity
yeah I think some of it can be confusing
i wanna do something i've wanted to do for a bit
making a new consumable type
and a new seal
function UTIL.showTextJoker(args)
if not (args.card and args.type) then return end
-- Setup eval according to args.type
local evalTypes = {
RankUp = { message = 'Rank UP!', colour = G.C.RED },
Beyond = { message = 'Beyond!', colour = G.C.RED },
Chips = { message = ((args.value or 0) < 0 and '-' or '+')..(args.value or 0), colour = G.C.CHIPS },
Mult = { message = ((args.value or 0) < 0 and '-' or '+')..(args.value or 0)..' Mult', colour = G.C.MULT },
JokerSlot = { message = '+'..(args.value or 1)..' Joker slot', colour = G.C.ORANGE },
CopyCard = { message = 'Copied!', colour = G.C.ORANGE },
Negative = { message = 'Negative!', colour = G.C.BLACK },
Upgrade = { message = 'Upgrade!', colour = G.C.DARK_EDITION }
}
if not evalTypes[args.type] then return end
local eval = {
message = evalTypes[args.type].message,
colour = evalTypes[args.type].colour,
card = args.card,
noJuice = args.noJuice,
sound = args.sound or 'generic1'
}
-- Prepare the message
local message = function(_eval)
attention_text{
text = _eval.message,
scale = _eval.scale or 0.7,
hold = 0.7,
backdrop_colour = _eval.colour or G.C.BLACK,
align = 'bm',
major = _eval.card,
offset = {x = 0, y = -0.05 * _eval.card.T.h}
}
play_sound(_eval.sound or 'generic1', 0.98 + 0.04 * math.random(), 1)
if not _eval.noJuice then
_eval.card:juice_up(0.6, 0.1)
G.ROOM.jiggle = G.ROOM.jiggle + 0.7
end
return true
end
-- Show the message
if args.istant then
message(eval)
else
G.E_MANAGER(Event{
func = function()
return message(eval)
end
})
end
end
for context
is if args.istant then supposed to be instant
well you can't init something that doesn't exist
what am i initing?
ah... yes, time to make something.
args is looking for istant because you misspelled instant
it is trying to initialize a function it does not have
that's not a function
well, not like function function
it shouldn't crash, that's not the problem I just wanted to point it out
now i need to make the self destruct seal
it should just return nil, not crash
just saw the problem
G.E_MANAGER:add_event(Event{
func = function()
return message(eval)
end
})
that's... odd
I don't know what changed (nothing did) but for some reason, when the game isn't paused, Polychrome, Negative, and Eternal seem to just vanish from the randomizing
please elaborate
you're missing add_event
oh yeah
are those the last values on their respective lists?
first actually
(this is all handled in update, shoulda had that in screenshot)
between 0 and 1 yeah
I use pseudorandom
but it was properly randomizing between all values earlier
so I stopped touching the update code
i don't see anything wrong with it so I might try pseudorandom
okay I cobbled together dogshit code that fixes it, now back to the more pressing issue
this code works fine when there's one Conman
if there are multiple, the cards that get created become glitchy and that's an issue, what'd be a way to circumvent some of these issues
"MODS.Atlas"
fuck
i suposse i should replace local selfdestruct = with SMODS.Seal
now, for the thing that the self destruct seal is known for. giving +5 mult and +150 chips
oh and also making cards go boom
iterating through pairs(SMODS.PokerHands), why are some hands missing (pair, flush, straight)
weird
this is what i have
first of all, applying the mult
off-topic but which IDE/theme is that?
I'm just doing this
vscode with github dark
huh that works
and the chips, don't forget about the chips
hey same
(not vscode tho)
How can I change the X (in the base hand score preview area) to a different symbol? I've patched in this code which lets me access it
,mult_symbol = self.HUD:get_UIE_by_ID('mult_x_symbol')
(patched into G.hand_text_area)
but how do I visually change the text and the text colour?
-# I patched in the ID "mult_x_symbol" to the symbol.
Holy shit built-in SMODS card bonuses are finally real 
so...
i need to make the card have extra mult and chips
and i also need them to be destroyed when scored
where did you patch it so I can check the structure?
here are the two main patches i used
[[patches]]
[patches.pattern]
target = 'functions/UI_definitions.lua'
pattern = '''
{n=G.UIT.T, config={text = "X", lang = G.LANGUAGES['en-us'], scale = scale*2, colour = G.C.UI_MULT, shadow = true}},
'''
position = "at"
payload = '''
{n=G.UIT.T, config={id = 'mult_x_symbol', text = G.GAME.mult_symbol or "X", lang = G.LANGUAGES['en-us'], scale = scale*2, colour = G.C[G.GAME.ui_mult_c or "UI_MULT"], shadow = true}},
'''
match_indent = true
times = 1
[[patches]]
[patches.pattern]
target = 'game.lua'
pattern = '''
blind_spacer = self.HUD:get_UIE_by_ID('blind_spacer')
'''
position = "after"
payload = '''
,mult_symbol = self.HUD:get_UIE_by_ID('mult_x_symbol')
'''
match_indent = true
times = 1
Instead why don't you patch it to a ref_table so you can change it dynamically?
Instead of text = "X" you do something like ref_table = G, ref_value = "x_symbol"
And then you change G.x_symbol
i'm not experienced with ref_tables? how do i do that? is it just:
{n=G.UIT.T, config={id = 'mult_x_symbol', text = {ref_table = G, ref_value = "x_symbol"}, lang = G.LANGUAGES['en-us'], scale = scale*2, colour = G.C[G.GAME.ui_mult_c or "UI_MULT"], shadow = true}},
wait fr? bonus mult on cards fr?
no, you replace text = "X" entirely by what I wrote
here's a guide https://github.com/Steamodded/smods/wiki/UI-Guide
where are seals located in the balatro source code
unfortunately they're kind of all around in card.lua, but CTRL+F "seal" and the respective types should help
i dont care if the text = "X" i'm still calling it twitter
so true
text = "twitter"
Yep. No more needing to patch that in. Finally no more duplicate bonus mult implementations 
yippee (i would put the emoji here if i had nitro)
I only want a condition to happen if all cards in the played hand are spades. Is there something wrong with my for loop?
No matter what I play, it always thinks theres no spades in my hand. I know this is whats happening because when I switch it to 'true' it works for all hands I play
G.hand is the held hand
G.play is the played hand
Thank you
balatro source code is all over the place
you also have context.full_hand and context.scoring_hand
i don't even know where the red seal code is
context.retrigger could be a start
oh repetition
i got the two mixed up
you mean the enhancement?
works now, how can i change the colour of the symbol?
fuuuck... thats not how red seal works
is there a seal that gives mult to a card
probably not
seals have their own calculate function so i think that you can definitely make it so it gives mult
Oh also, for events is there a way to add like a buffer before the next card's effect triggers?
but how is the question
there's a specific context for seals that you can use in there, and then just
return {
mult = card.ability.extra.mult
}
this might be wrong but I thing you need to add func = "function_name" to the config and then do something like
G.FUNCS.function_name = function(e)
e.config.colour = G.C.GREEN
end
maybe G.UIT.T doesn't take func tho
and you might need to put it on the parent
wait, there's a seal context?
well, seals, enhancements, and editions. its context.main_scoring
yes
so ihave the mult
the chips won't be far behind
so i may have to specify the chips and mult
but this is a start
yeah there should be like a config in seals where you can set that kind of stuff?
it’s probably the same as the jonkler
seal config gets put into card.ability.seal
do i replace card.ability.extra with card.ability.seal
why is the background white
all I did was put this in my localization
how can I make the background not white
SMODS.current_mod.description_loc_vars = function()
return { background_colour = G.C.CLEAR, text_colour = G.C.WHITE, scale = 1.2 }
end
ty
maybe it should be the default tbh
art's always by Gappie but nobody every asks how's by Gappie
yeah that was pretty weak i'll work on it
Gappie where art thou
how's "by" Gappie
that looks so much better
add a card to the bottom like this
yu-gi-oh!!!!!
i think that should do it, might wanna test it tho
are edition values storied in card.ability like with other centers?
i need to clear out the loc vars because i took the seal code from the pokermon silver seal
edition values are stored in card.edition
annoyed and confused, then
source code go brr
I'm basically attempting to have editions act as other editions (a legendary that makes all editions act as Holo, Foil, and Polychrome in addition to their regular effect (barring overlap ofc), and this should be enough to do it, but by the time calculation comes, all values except the edition's default ones are reset
if card.edition.holo or card.edition.foil or card.edition.polychrome or card.edition.negative then
card.edition.holo = card.edition.type == 'holo' and true or multi_editions
card.edition.mult = card.edition.holo and G.P_CENTERS.e_holo.config.extra or 0
sendDebugMessage('mult: '..card.edition.mult)
card.edition.foil = card.edition.type == 'foil' and true or multi_editions
card.edition.chips = card.edition.foil and G.P_CENTERS.e_foil.config.extra or 0
sendDebugMessage('chips: '..card.edition.chips)
card.edition.polychrome = card.edition.type == 'polychrome' and true or multi_editions
card.edition.x_mult = card.edition.polychrome and G.P_CENTERS.e_polychrome.config.extra or 1
sendDebugMessage('x_mult: '..card.edition.x_mult)
end
Enhancements are the new suit 
a part of me wants to say it might be easier to just have one new edition that is like all the other editions but idk
me with my joker that makes 5 stone cards a flush
YOOOOOOOOOOOOOO
bulwark? what's that?
I took the cryptid placeholder pill lmao
i love placeholders !
sorry to hear that you got fired @deft bane
NAHHHHH
fire all balatro artists, replace them with placeholders
Five Golden Rings isn't his tho
"four calling birds"
the seal doesn't show up...?
can you see it in the collection?
no
out of curiosity, since the docs aren't clear, how do we make some calculations (like for scaling or decaying variables depending on certain factors) not trigger with blueprint? just and context.no_blueprint on the if statement?
and not context.blueprint
ah, that makes sense.
did i do the code wrong?
i don't think so
name = "selfdestruct",
key = "selfdestruct",
loc_txt = {
name = 'Self Destruct Seal',
text = {
"{C:red}Card is marked to explode!{}",
"{C:mult}+#1# Mult{}, {C:chips}+#2# Chips{}.",
"Card {C:red}self destructs{} after{C:attention}being scored{}."
}
},
badge_colour = HEX("FF0368"),
config = {mult = 5, chips = 150},
loc_vars = function(self, info_queue)
return { vars = {card.ability.seal.mult, card.ability.seal.chips} }
end,
atlas = "atlasseal",
pos = { x = 1, y = 0 },
calculate = function(self, card, context)
if context.main_scoring and context.cardarea == G.play then
return {
mult = card.ability.seal.mult,
chips = card.ability.seal.chips
}
end
end
}
)```
i love changing things nobody is going to see
how can i get the starting chips and mult of a specific hand
G.GAME.hands[hand].s_mult and G.GAME.hands[hand].s_chips
is there anything wrong here
because at first glance there doesn’t seem to be anything
becuase i have NO IDEA why the seal isn’t appearing
and i don’t want to have to redo everything
hmm
i guess i gotta redo it
nvm
i figured out what was wrong
never fucking mind!
why does it not work
is there a way to put custom jokers in the middle of the joker list? just adding order = 120 to the joker definition doesn't work
It goes by creation order afaik
the seal SHOULD appear so
hotel? trivago!
is there a way to reorder them or change the order after the fact then?
I don't think so, unless you play to hook the collection functions
i have no idea why it isn't showing up
i know you can reorder the suits
i did
table.insert(SMODS.Suit.obj_buffer, 1, table.remove(SMODS.Suit.obj_buffer, #SMODS.Suit.obj_buffer)) -- Sort suits
table.insert(SMODS.Suit.obj_buffer, 1, table.remove(SMODS.Suit.obj_buffer, 1))
to put my custom suit last, idk why it works though i pulled it from somewhere else
so idk how to apply that to jokers
insert that one hercules "I OWN YOU" gif here
oh then idk maybe there's something like that
how are you loading that file
if you put the debug message on the file does it print
does that mean it does or it doesn't
hold on
i forgot to save the main lua file
okay,
it just doesnt.
other is a folder that exists
and seals is inside of it
can you screenshot it
wait. why is it saving seals to the jokers folder.
vscode, you silly goose.
that's not where it goes!
you silly sausage, you had me running in circles!
and i can now say with complete honesty that hovering over a card with the seal crashes the game
you're missing card in loc_vars
never made a seal so i dunno
Is it possible to make a card not score at all?
Does anyone know what I need to put in to make it only trigger on glass cards? Currently it does it for every type of card
why is the game crashing when hovering over a card with the seal
i thought i did everything right
i would use SMODS.has_enhancement, in this case SMODS.has_enhancement(context.other_card, "m_glass")
ok ill try it now 😄
in which context?
it has the correct sprite now at least
still crashes when i hover over a card with it though
I wanna make a joker that has a chance to not score a card at all
if context.modify_scoring_hand then
return {
remove_from_hand = true,
}
end
the card is context.other_card
Hey, I wanted to see if I could make a better keyboard control mod, and one thing I think would make it better is if it could stick little reminder overlays of the key for certain UI elements, the same way it works when you play with a controller (like putting a little "x" over the "play hand" button). If anyone already knows where/how in the code this is done, you could probably save me a lot of effort.
ok, so i have a joker that increases its xmult every time a wheel of fortune fails (the functionality is based off the one in cryptid) and for whatever reason, if it's being copied by a blueprint/brainstorm, each wheel fail will do the xmult increase an extra time for how many blueprints/brainstorms are copying it, even though i don't tell it to do so in the loc_vars function. all the loc_vars function does is return the joker's xmult vars? i don't understand what's going on here
i don't want blueprint/brainstorm to make it increase multiple times. am i misunderstanding something about what blueprint/brainstorm does fundamentally?
Guys what's the image for the vertical joker overlay? I already found the base card in the game files but cant find the vertical joker overlay image
blueprint/brainstorm copy everything in calculate, you need to explicitly tell it not to
fwiw, I think the code which creates the "View Deck" overlay when you hover over the deck in the round view is at cardarea.lua:390 or so, and looks like:
self.children.view_deck = UIBox{
definition =
{n=G.UIT.ROOT, config = {align = 'cm', padding = 0.1, r =0.1, colour = G.C.CLEAR}, nodes={
{n=G.UIT.R, config={align = "cm", padding = 0.05, r =0.1, colour = adjust_alpha(G.C.BLACK, 0.5),func = 'set_button_pip', focus_args = {button = 'triggerright', orientation = 'bm', scale = 0.6}, button = 'deck_info'}, nodes={
{n=G.UIT.R, config={align = "cm", maxw = 2}, nodes={
{n=G.UIT.T, config={text = localize('k_view'), scale = 0.48, colour = G.C.WHITE, shadow = true}}
}},
{n=G.UIT.R, config={align = "cm", maxw = 2}, nodes={
{n=G.UIT.T, config={text = localize('k_deck'), scale = 0.38, colour = G.C.WHITE, shadow = true}}
}},
}},
}},
config = { align = 'cm', offset = {x=0,y=0}, major = self.cards[1] or self, parent = self}
but it's not totally obvious how that works, so if anyone already knows how it works or has examples of it being messed with successfully in other mods, that'd be cool
it triggers properly on glass cards, but it also just triggers at the end of each hand played as well.
the main thing i'm curious about how to put an overlay on top of specific objects
please help. i don't know what in my seal is crashing my game
this?
it's crashing with "attempt to index local 'card' (a nil value)' and it's telling me to look on line 18
wait.
that definitely looks promising
i see the issue.
context.individual and context.cardarea == G.play
i see. how do i differentiate between blueprint or brainstorm triggering calculate() and the actual joker triggering calculate()?
context.blueprint_card
can someone who's actually made a seal help me
Can anyone tell me how to check for winning hand, the last card in that hand, and how to apply a seal to a card?
(you need to check that this is nil)
i know the second one, context.full_hand[#context.full_hand]
there's nothing wrong on line 18, right?
hmm still does it
what does it do exactly
it says something is wrong on line 18 but when i check line 18 i see that nothing is wrong
on the surface at least
if its saying that something went wrong on line 18 then
so it basically goes through all the cards, if its glass it gives the x1.5 mult as it should. Then, when all the other jokers would do their effects it gives ANOTHER x1.5 which it shouldnt
what does it specifically is wrong about line 18 in the message?
What about the first and third
well there's a reason i didnt answer those
removing "card" from the loc vars makes it show global instead of local
where are the seals located in cryptid's files
self.config?
just did a search on github
so would it be self.config.mult then
Okay then... can anybody more experienced answer how to do the first and third things I need to do?
oh wow
Has anyone made a guide on what to do to make a card in a mod?
Like the type of shit where someone takes a (probably simple) card from a mod and explains what each bit of the code for it does
Or is this more of a "figure it out by looking at other people's mods' code" type of thing
sorry if this is more a question for #⚙・modding-general
i think there are some youtube guides but I've never seen them
check this https://github.com/Steamodded/examples/blob/master/Mods/ExampleJokersMod/ModdedVanilla.lua
and I already checked #1209506514763522108's guides but the best I could find there are explanations on how to download mods themselves yknow?
ohhhhhhhh dang I didn't see that
swag, thanks mate
the main smods wiki also has most info
oh this is literally exactly what I was looking for lmao
self.config.extra.mult
there we go
what's your json look like?
under "name", add
"display_name": "Thrills and Chills"
still. error
did you restart the game after adding in "display_name"?
{
"id": "thrillsnchills",
"name": "Thrills and Chills",
"display_name": "Thrills and Chills",
"author": [
"violetblooded"
],
"description": "A mod that adds various doohickeys and whatchamacallits.",
"prefix": "thrills",
"main_file": "thrills.lua",
"priority": 99999,
"version": "0.0.0~PRERELEASE",
"website_url": "https://magmmlcontest.com/wiki/index.php/Alabell",
"badge_colour": "ff0368",
"dependencies": [
"Steamodded (>=1.0.0~ALPHA-1307d)"
]
}```
try this
anyone know why this might be happening?
still, error
you tried to call SMODS.change_base with invalid arguments
thats weird
maybe something in the seal's code is fucking with it?
yeah i walked into that one
the jokers don't show error
it needs to have a suit, even if the docs say otherwise?
I'm guessing it can't find the card's suit
Is there some easy way to reload mods without having to restart balatro?
ahh that makes sense
so uh... what did i do
how did i break negative? this should be 7/8
i imagine that debuff includes editions, i imagine something happened weird with it and it didn't undebuff properly. i've been using SMODS.debuff_card() to debuff and undebuff. is there something i need to do to make negative here work again or
no, but holding m might be quicker
also if there's some kind of dev guide that answers this and all the other questions I'm going to have in the next few minutes, that'd be awesome
i kept trying other_card and it was like 'no' and i was confused. im pretty new to this
holding m?
(i've seen those docs fwiw)
holding m restarts the game
with smods
card.ability.seal.extra.mult?
it worked
now for the destroying part
which should be the same as destroying a joker
is there anyone that can help me with this? I'm still trying to figure it out
it didn't do anything
like this, right?
what's the code
except that it wouldn't be g.jokers
also i couldn't find any documentation or examples of the context
it's not documented
context.individual doesn't occur at the same time as modify_scoring_hand
put that if outside
the elseif part i mean
can you post how you did it
i don't think this is how removing a playing card works
is there a way to get an inspector running on the game's lua? i don't just want to write/bind a bunch of printf statements
and what did it do
what version of steamodded do you have
try updating
can someome help me
the intent here is to have the card be destroyed after being scored
am i doing anything wrong?
anyone got a solution for me? i tried doing SMODS.recalc_debuff() on the stencil jokers but it didn't work
just checked and the context was added in 1415
i don't really know what's wrong here
what is main_main_scoring
...fuck
also main_scoring and after don't happen at the same time
so how am i gonna do it after scoring then
just after
entirely new problem just dropped. g.card probably isn't a valid thing
wait
no, that's not it
aha
why does this either:
multiply by default
not score at all
or, rarely, work as intented?
ease_to = G.GAME.chips + math.floor(
(G.x_symbol == "X" and hand_chips * mult)
or (G.x_symbol == "+" and hand_chips + mult)
or (G.x_symbol == "-" and (math.abs(hand_chips - mult) + 3))
or (G.x_symbol == "/" and (math.abs(hand_chips / mult) + 1))
or (G.x_symbol == "^" and hand_chips^mult)
or 0
),
(lovely patch, at, pattern: ease_to = G.GAME.chips + math.floor(hand_chips*mult),)
-# G.x_symbol is getting changed by the deck BEFORE scoring
(deck calculate code):
if context.before and not context.other_card then
local reveals = {
{symbol = "X", colour = G.C.UI_MULT},
{symbol = "+", colour = G.C.UI_ADD},
{symbol = "-", colour = G.C.UI_SUB},
{symbol = "/", colour = G.C.UI_DIV},
{symbol = "^", colour = G.C.UI_POW},
}
G.E_MANAGER:add_event(Event({
func = (function()
local reveal = nil
while true do
reveal = reveals[math.clamp(math.floor(pseudorandom("curious")*#reveals), 1, #reveals)]
if reveal.colour ~= G.C.UI_MULT_ALT then
break
end
end
G.x_symbol = reveal.symbol
ease_colour(G.C.UI_MULT_ALT, reveal.colour, 0.05)
return true
end)
}))
end
if context.after and context.cardarea == G.play then
G.E_MANAGER:add_event(Event({
delay = 4,
func = (function()
G.x_symbol = "?"
ease_colour(G.C.UI_MULT_ALT, G.C.UI_QUESTION)
return true
end)
}))
end
hmm maybe you did need that line
it does remove the cards from the deck though
the cards get removed but the deck number doesn't change
52/46? that doesn't seem right
ethereal floating cards
well
hm
maybe it's something to do with context.after
because it removes them when they're scored
which is not what i want
i want them to be removed after scoring
context.final_scoring_step
maybe
that didn't help
i have no idea but there are other places that check for hand_chips*mult before that line
nope, readding it makes the game crash again
what did you write
me?
yes
i mean with this
G.card:remove_card(card)
WHY ARE YOU LIKE THIS
wait those are playing cards right
yeah
there's a context for that
probably something like
if context.destroying_card and context.destroying_card == card then
return { remove = true }
end
but never made a seal so i dunno
is there a way to check if a card is changed to a certain suit? i wanna make a joker that triggers when that happens
i dont think there is by default, you need to hook a function to check manually
good lord
idk then
how is the code looking now
remove the event 😠
now what
delete all of this
that should work
now to impliment the first of many alabell cards
yay
does anyone have a consumable template
Hey y'all, I'm trying to create a joker that destroys all scoring stone cards, but currently it destroys all scored cards if there is a stone card. How do I fix this?
if context.destroying_card and not context.blueprint then
for k, v in ipairs(context.scoring_hand) do
print(v.config.center)
if SMODS.has_enhancement(v, 'm_stone') then
--if pseudorandom('stonemason'..G.SEED) < (G.GAME.probabilities.normal / card.ability.extra.odds) then
return {
remove = true
}
--end
end
end
end```
oh my
just like, something i can use to get a consumable done quickly
don't do the loop, check SMODS.has_enhancement( context.destroying_card, 'm_stone')
how i did it is that i add temp card ability
you can also just loop thru hand and
check which card is stone
right
you don't need a loop, it's called on every scored card
I'll need to update my code to use the SMODS functions
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play then
if context.other_card.ability.name == "Stone Card" then
context.other_card.ability.aiko_about_to_be_destroyed = true
for i = 1, card.ability.extra.chip_add_stack do
SMODS.calculate_effect({
chips = card.ability.extra.chip_add,
juice_card = context.other_card,
},card)
end
end
end
if context.destroy_card and context.cardarea == G.play and not context.blueprint and not context.destroy_card.ability.eternal then
if context.destroy_card.ability.aiko_about_to_be_destroyed then
return { remove = true }
end
end
end,```
this is the worst way of doing it
also check for context.cardarea == G.play
you forgot a comma
i dont think i actually made the alabell consumable correctly
yueah
i just didn't fully complete it
wait i forgot to put an equals after loc_txt
I'm trying to get a count of how many enhanced diamond cards there are in the cards but this code keeps continuously adding up
Does anyone know why this happens? I'm still really new to this so any help would be appreciated
-# still havent found a fix (why is it the hand before)
where did my hand go 😭
full thing
every time i try to check the consumables my game crashes
full crash log (idk if it'll be useful)
...really does not like me trying to print #G.jokers.cards huh
i just want to see how many jokers there are
nevermind, skill issue on my part 
this worked, thank you!
is there something wrong here which is causing the game to crash
where did you put this
i figured it out lol
i just needed to reset the count at the beginning every time
the consumables thing doesn't even show up. lol
on the additions section of my mod
still don't know what's going on
this is correct, right?
SMODS.ConsumableType{
atlas = "consumablesAlphabetPacks",
key = "Alphabet",
primary_colour = HEX("ffaf19"),
secondary_colour = HEX("5cecff"),
collection_rows = {6,6,6},
shop_rate = 0,
loc_txt = {
collection = "Alphabet Cards",
name = "Alphabet",
undiscovered = { -- description for undiscovered cards in the collection
name = 'Unknown Alphabet',
text = { 'Find this card when', 'letters are enabled' },
},
},
}
this is from my mod
SMODS.Consumable{
key = "Wild",
set = "Alphabet",
atlas = 'consumablesAlphabetPacks',
pos = { x = 6, y = 1 } ,
cost = 6,
loc_txt = {
name = "? for ????",
text = { "Convert up to #2# selected card's","letter to {C:red}Wild (#1#){}" },
},
loc_vars = function(self, info_queue, card)
info_queue[#info_queue+1] = {key = 'lettersWild', set = 'AikoyoriExtraBases'}
return {
vars = {
string.upper(card.ability.extra.letter),
card.ability.extra.max_selected,
},
}
end,
config = {extra = {letter = "#", max_selected = 1}},
can_use = function(self, card)
return #G.hand.highlighted <= card.ability.extra.max_selected and #G.hand.highlighted > 0
end,
use = function(self, card, area, copier)
for i=1, #G.hand.highlighted do
local percent = 1.15 - (i-0.999)/(#G.hand.highlighted-0.998)*0.3
G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.15,func = function() G.hand.highlighted[i]:flip();play_sound('card1', percent);G.hand.highlighted[i]:juice_up(0.3, 0.3);return true end }))
end
delay(0.5)
for i=1, #G.hand.highlighted do
local percent = 0.85 + (i-0.999)/(#G.hand.highlighted-0.998)*0.3
G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.15,func = function()
G.hand.highlighted[i].ability.aikoyori_letters_stickers = card.ability.extra.letter
G.hand.highlighted[i]:flip();play_sound('tarot2', percent, 0.6);G.hand.highlighted[i]:juice_up(0.3, 0.3);return true end }))
end
end,
in_pool = function(self, args)
return G.GAME.letters_enabled
end,
}
a dead giveaway, this should say 7 instead of 6
or, has it always been 5?
no, it should be 7
no it's always been 5
❓
why do you not click on it
because it crashes the game
huh
I'm pretty sure you didn't set the set property properly for your consumable cards
huh
try temporarily removing the consumables code
is there a way I could change what the final ante is?
there is a way
even when removing the consumable code, still crashes
now temporarily remove consumable type
i have a feeling that it's the consumable type that's at fault
Was that answering me or him?
that didn't fix anything
still crashes
you
so it's not that code
Do you know how to change the final ante or you know about a mod that does it?
this just means that the Alabell cards was probably good
i think you'll have to patch something in the game's code
did you remove both the type and the card
if you did and it still crashes i think it's something else
yeah it still crashes
try loading the game with just your mod
ok so I found that "win_ante = 8" but how could I modify that when getting a joker or something
do you have any other mod that might crash the game
ok
ah
you need to prefix your atlas
with your mod prefix
maybe
mod prefix in json file
nope.
the joker atlas is "atlasjoker" and i didnt have to use a prefix for it
so no.
so what the fuck is wrong
ah I'm stupid
?
why are there 5 consumable types
yeah umm
what
because even without cryptid it still crashes when i click on the consumables section
I'm trying to check with my own code
can you try removing undiscovered sprite part
pseudorandom_element() is causing crashes for me? 
nvm, i was calling it at a very stupid point in runtime
don't do that
i dont know man. i just dont
SMODS.Joker {
key = "stamped_document",
loc_txt = {
name = "Stamped Document",
text = {
"Adds a {C:attention}Purple Seal{} to last card in {C:attention}winning hand{}"
}
},
rarity = 1,
atlas = "joker_atlas",
pos = { x = 1, y = 0 },
loc_vars = function (self, info_quene, card)
info_quene[#info_quene+1] = G.P_SEALS.Purple
end,
calculate = function (self, card, context)
if context.after then
end
end
}
How do I add the rest of the functionality? I really need some help
it always gives me this error
i have no idea what it means
or why it’s importsnt
last ditch effort have you tried disbaling debugpkus
last last ditch effort have you tried updating lovely and smods
anyway he went to sleep
can i get help on this code pls
ok
what’s fucking with me is that other mods have new consumable types that work but not my mod for some reason?
i doubt its a lovely or steamodded issue
if lotiera and zodiac cards can work then why not alabell
you might have better luck asking others more knowledgeable than me in a few hours
i would store G.play.cards in ability
not sure how i would telegraph to the player
so why is the game now ignoring my card's enhancements 
Without checking the game code I think it might be your colour hex values
what is this Bakalatro
I really need some help 🙏 Everybody's helping everybody else but not me
only have 1 more legendary joker left
culprit seems to have been the steamodded update.
reverting to 1.0.0~alpha-1410c from 1.0.0~beta-0391a fixed it.
😭
joe biden pls
This is fixed in latest version
gang what
that is the latest version
joe biden 😭
I am going insane because nobody is helping
i will consider it but im not great at drawing real people
oh 
i guess do homer simpson
idk
No it’s not
yep yep, i see it, my bad
You’ve just posted a joker structure with no effort to try and create your effect, what do you want help with?
Writing the entire code for my mod :D
ive already done krusty so idk
also fun fact krusty was originally supposed to be homer in a disguse but they changed it
already jimbo
but dont worry
i have the perfect canidate
the weird background character from amazing world of gumball
once im done with this ill still have to work on finding like 140 more clown characters but its ok
i figure something out
and also i guess not everyone has to be a clown
The metamorphosis trio!
Uhh.. nobody knows how to add seals to cards? Dang it..
What does juice_card_until mean
It'll endlessly wiggle the card
thanks
what is happening?
i'm pretty sure there's only one place where the name of the stone card is pulled and that is from m_stone
so how... what
how is it working and not working
It could be that the English localization for the game in stone cards and tower doesn't pull the name from the variable but is contained within the string
tower card seems to pull it from a specific variable - if you look at the english localisation, it has a #1# and #2#
also, that function should be changing the actual string that they're pulling from - and as evidenced by how SMODS.process_loc_text() changes marble joker... it is. but... it's also not.
this was also working as expected before the new steamodded beta, so there's also a likelihood that something in there is not acting right (this is on steamodded beta-0301b)
So, i wanna, make a joker that increases the amount of cards you can play (from 5 to 6) and i need to make a patch or something, i dont really know how to do that, at all
everyone is doing this 😭
including me 😭
would this be an appropriate channel to post sprite art for custom decks?
i think that one miught be chat
Keep in mind that the game only account for poker hands with 5 cards
Oh yeah i dont want a 6 of a kind thing
I just want it to be a normal poker hand plus another card
you'll have to patch the game.
are you using notepad to code
yeah
what do you want to do
I’m trying to make it so that whenever a card is destroyed, it makes a King of the same suite.
Holy.
Free/Libre Open Source Software Binaries of VSCode
certified microsoft hater
what even is the difference between vscodium and vscode?
one is microsoft and one isn't
vscodium doesn't have Microsoft stuff
is that it?
yes
what's the difference between codium and intelliijs lua support?
codium's is better
what extensions should i use? are they any extensions made for balala/lovely?
you will need to store the card and place it in deck
and update deck card limit
Or use SMODS.create_card instead
what does that look like
these are the only 3 you really need imo
It’s a function that takes a table of values like ‘key’ or ‘set’ and goes through the motions of creating and adding the card to your deck for you
is it the same. like SMODS.create_card({'H'..'_'..'K'})
question.
when i do
for X, Y in ipairs(G.jokers.cards) do
what is X?