#💻・modding-dev
1 messages · Page 422 of 1
Really? Can I see?
I have one that adds a reroll button to the actual booster pack
But not that rerolls the packs in the shop
And here you can see how your example is more helpful, than just saying you've seen it done before
Although it does feel like Some is doing that on purpose, so eh
I think something is one of the more helpful people in here alongside N
That reminds me though, did you ever get assistance on your question something
Ui wise
No.
N bestie you were or are here help out something
something has really difficult problems 😭
someone's having issues with Waxed, and they sent this crash report
most UI stuff to me is like "i know how i would start but idk how to do it"
I know nothing about shaders but that seems like a shader problem, not the edition.
ah i see
i'll shoot that over, in case anything is immediately obvious
(also, i just renamed it, so that's not the problem)
yes i wanna add new tab and idk can use smods or i have to code with lovely
Where do you want the tab?
like a post-shop shop?
are you using the waxed variable anywhere in your shader code?
if not, it gets automatically removed
it contains:
vec4 effect( vec4 colour, Image texture, vec2 texture_coords, vec2 screen_coords )
{
vec4 tex = Texel( texture, texture_coords);
vec2 uv = (((texture_coords)*(image_details)) - texture_details.xy*texture_details.ba)/texture_details.ba;
tex.rgb = tex.rgb * 0.25 + vec3(0.75, 0.6, 0.4 + waxed.x - waxed.x); // Making sure the waxed variable isn't optimised out. I love this game. :)
tex.a *= 0.35;
return dissolve_mask(tex * colour, texture_coords, uv);
}```
yes black market that sells only rare and uncommon (or other mods rarity) with triple price
yeah that + - does in fact get optimized out
ah -u-
oh ok that's something i need to figure out how to do myself too haha
good luck
Damn triple price
Costly ass market for an uncommon
thanks i need it
how would i fix this? would i change it to + waxed.x*0.00001?
this is black market😁
Oh, making an entirely new shop? That sounds cool
No idea how that code even works
Can load jokers into an existing shop fine, buhlike
that should be fine
awesome sauce, thanks :D
Hi again! I just wanted to know how i can replace a joker by another one (with a speccific edtition)
(If possible make it the joker to the right of the calculatin joker
there's only like 1 person in here that knows how shaders work, we're doomed
You would probably start by patching the end shop button.
card:set_ability("j_modprefix_key") and card:set_edition("e_modprefix_key")
i run these functions on the joker to replace riight?
Yes.
i will ask chatgpt maybe works
No.
so what can i do?
That's not going to work, and would likely just feed data to the model... x.x
look at balala source and see how it makes its shop
Reading how the vanilla code does it might help
yea
...please don't feed the vanilla code into an LLM
another small question. im looking at dagger from vanillaremade. what does "getting_sliced" stand for?
ok ill try them. Thanks!
It stops the joker from calculating.
so that means?
It wont calculate anymore.
i mean getting'_sliced
if u kill a joker before it calculates it wont calculate
OOOOOOOH
Huh... Am curious about how slicing differs from being debuffed, like if that affects brainstorm calcs or anything
i dont get it but ill copy it anyways lol
you have to mark jokers destroyed with getting_sliced so other jokers don't do stuff on them and also stops them from calculating like they said
get it now
thanks!
(just needed to llook a lil further lmfao)
it's basically the same but sliced is supposed to be temporary
Ah, so it's a matter of intent rather than function, thanks!
so i think i am doing something wrong again. i've modified the code of ceremonical dagger from vanillaremade, but for some reason when selecting a blind, the "to infect" joker, now repeatedly creates a new event and starts the juice animation (i believe?)
calculate = function(self, card, context)
if context.setting_blind and not context.blueprint then
local my_pos = nil
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card then
my_pos = i
break
end
end
if my_pos and G.jokers.cards[my_pos + 1] and not G.jokers.cards[my_pos + 1].ability.eternal and not G.jokers.cards[my_pos + 1].getting_sliced then
local infect_card = G.jokers.cards[my_pos + 1]
G.E_MANAGER:add_event(Event({
func = function()
infect_card:set_ability('j_reddit_contagious_laughter')
infect_card:set_edition('e_negative')
end
}))
return {
message = "Infected!"
}
end
end
end,
the joker gets replaced but the event queue fills up
my message just doesnt want to send lmao
oop
youre missing the return true in the event
return true
If you want to return a message in that event, could use an SMODS.calculate_effect function. Not sure if that's a recommended way to do it though.
Then after calling that function with your desired message on the desired card, you can write return true to exit the function.
No, because SMODS.calculate_effect is already in an event.
depends on the timing you want
Hm... If you didn't want that timing when queued in an event, what would be an alternative method of returning the message on the target card?
do you need to do anything to make your joker appear on shop? or does it have the chance based on the rarity?
ok, thanks
Wait yeah, Axy could just... look at how the calculate effect function returns messages, and just read. Duh.
Hello dev chat

<@&1133519078540185692> kill him
ok
Thanks bestie
a/wsfbwaaf
Danke
almost had him
xD
fast and furious you never even had your car dot gif @exotic hedge
its a competition between all of us lol
Whoever gets the next snipe in here gets the mcdonalds happy meal
May the best mod win
Who has the biggest kill count is the question of the day
dot gif what
am i confused
This would be an interesting statistic
we can't send gifs but i'm referencing a specific gif
Quick Mr mod turn on gifs
Even mods bend to the gif ban 😭
some things are beyond even my power
Would you do it for a scooby snack
You should be able to add instant = true iirc to the table
what would be the structure of create_card? idk how lua arguments work
More often than not, you should use SMODS.add_card instead.
ok, ty
honestly a joker that makes another's operators act as one higher sounds pretty dope
i have this joker that debuffs a random joker when blind is selected, it debuffs the card completely fine and whatever, but i dont see any message when it happens
i do but it isn't enabled
hmm no idea then
Out of curiosity if yo unwanted to add a tool tip to jokers how could you with tool tip ui?
You mean an info_queue?
excuse me, is there a way to make it so my new consumables and jokers do not appear in the shop?
should i be using "weight"?
i want them to only appear in my booster packs not in the shop at all, any advice?
return false in in_pool
in_pool = function(self) return false end
ooo ok so if i add this it wont put itself into the pool of shoppable objects?
I think so.
Maybe? I haven’t used that just meant if the way I’m describing should be used with tool tip function is this better?
also, jokers with a custom rarity or consumables part of a non-vanilla set will not appear by default
oo ok thats good to know
idk if this is a dumb question or not but how would I go about adding mult value to a joker if I sell another specific joker(s)
im very new to development 
if context.selling_card and context.card.config.center.key == "j_modprefix_key" then
card.ability.extra.mult = card.ability.extra.mult + number -- you need to replace card.ability.extra.mult with your own variable
end
```?
You'd wanna check for context.selling_card and if context.card == your card value
Is there a way to hide suits by default? I'm added a custom suit but I only want it to appear from my spectral card
what does next() do?
gives you the next key, value pair in a table
it's basically used as a shorthand to see if a table has something inside
oh ok
what does soul_set do?
consumables dont have rarities
dang, cause if i removed soul_set then the consumable doesnt popup in the spectral deck
How do I get the chips of cards played/discard? Trying to make this joker.
so it calculates the hand you last discarded and its joker effect is that?
thats fire
yes, how would I find those variables?
Do you want to include editions and enhancements chips?
Yes
card:get_chip_bonus()
guessing its the same for mult?
Do you want lucky cards to have a chance to give mult?
Could you provide both lucky cards having chance and excluding them from the calculations?
What do you mean?
Sorry, could you show lucky cards providing the chance to have mult, got myself confused.
It means that the joker would have a chance to get the mult from a lucky card.
👍
Then you would use card:get_chip_mult()
soo i created an object type for my consumable cards, and now i am trying to make my booster pack use that object type to pull from it but it doesnt seem to be working, is there a way to fix that
Code?
How does this work exactly? lol
whats the code to make spectral cards popup in spectral packs like normal?
in_pool = function(self) return false end
?
oh ok thanks
how do i send the code more compact so its not spam
```lua
-- Code here
local go_fish_rods_obj_type = SMODS.ObjectType {
object_type = "FishingRodConsumableType", -- must match category
key = "GO_FISH_RODS",
default = "FishingRod8",
cards = {
["FishingRod2"] = true,
["FishingRod3"] = true,
["FishingRod4"] = true,
["FishingRod5"] = true,
["FishingRod6"] = true,
["FishingRod7"] = true,
["FishingRod8"] = true,
["FishingRod9"] = true,
["FishingRod10"] = true,
["FishingRod11"] = true,
["FishingRod12"] = true,
["FishingRod13"] = true,
["FishingRod14"] = true
}
}
SMODS.Booster{
name = "Go Fish Pack",
key = "go_fish_pack",
atlas = "Jokers",
pos = {x = 1, y = 1},
weight = 2,
cost = 5,
group_key = "go_fish_pack_group",
config = {extra = 3, choose = 1, name = "Go Fish Pack"},
discovered = false,
loc_vars = function(self, info_queue, card)
return {
vars = {
choose = card.ability.choose,
extra = card.ability.extra
}
}
end,
ease_background_colour = function(self)
return G.C.BLUE
end,
create_card = function(self, card)
return create_card('GO_FISH_RODS', G.pack_cards, nil, nil, nil, nil, nil, 'go_fish')
end,
kind = 'GoFishBoostPack'
}
did it work
here it is !
The cards need to be classprefix_modprefix_key
hey question! so im trying to make a joker that makes all clubs be treated as wild cards, and i wonder if thats possible? like not just as any suit, but also to interact with jokers that look for wild cards
oo ok thanks, ill look into this
You have to use quantum enhancements.
the what
It allows cards to be treated as enhancements that they aren't.
oh nice! and how to do that? :>
Firstly, you have to enable it.
SMODS.current_mod.optional_features = function()
return {
quantum_enhancements = true
}
end
do i put it in main lua file?
Me too stupid to understand the faults of me code.
Yes.
gotcha
You have a , after card.get_chip_mult() also you should install the lua extension.
Also you should be doing context.other_card:get_chip_bonus()
what do I do to get the number of the current Ante
G.GAME.round_resets.ante
awesome thanks
a-and what then? honestly documentation is telling me nothingg
In the calculate function of your joker you would do ```lua
if context.check_enhancement and context.other_card:is_suit("Clubs") then
return {m_wild = true}
end
oh! thanks a lot!
So sorry but it doesnt work. Am I missing something in the context, or config?
You would also do the same thing for card:get_chip_mult with card:get_chip_bonus
Yes.
when do you want to draw them?
You would just use draw_card I think.
you can use context.drawing_cards and return cards_to_draw = total_number
pos = {x=0, y= 0},
order = 99,
atlas = "atlas_batrocities_consumeables_corrupt",
unlocked = true,
cost = 4,
hidden = true,
config = {
max_highlighted = 1,
},
loc_vars = function(self, info_queue, card)
info_queue[#info_queue + 1] = {key = 'batrocity_negative_card', set = 'Other', vars = {}}
return {vars = {(card.ability or self.config).max_highlighted}}
end,
use = function(self, card, area, copier)
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.4,
func = function()
local negative_chance = (pseudorandom("atlas_batrocities_consumeables_corrupt",1, 2))
local corrupt_card = G.hand.highlighted[1]
if (negative_chance == 1) then
corrupt_card:set_edition("e_negative")
card:juice_up(0.3, 0.5)
end
return true
end
}))
end,
}
)
does anyone have any idea as to why it wont pop up it spectral packs?
Try removing hidden
How does one add a new hand sorting option?
is it possible to code this without too much hassle?
(and how would I go about doing it)
uhh sorry to bother you more but tried it and game crashes without message the moment i select a blind with it
Code?
Yes.
Does it replicate multiple jokers?
i mean if you want to experiment with him, he's in the playtesting branch on the github
how would I go about being able to proc another card?
here ^^
Yeah. Ideally, it would keep them all in a list or something similar
Then probably yes.
You would have to create a fake card.
how would you access the information of another card like that?
ah ok
how do you check hand size
G.hand.config.card_limit?
It seems that is_suit checks for SMODS.has_any_suit which calls context.check_enhancement which causes an infinite loop, so replace that with context.other_card.base.suit == "Clubs"
alright! gonna try it!
how do I go about creating a fake card with the information of another card?
it works but i think theres still some massive loops somewhere cause when i played a hand it took like 30 seconds for stuff to happen
Did you play a hand with many jokers that check for enhancements?
fancy
just two! even laggs when selecting cards!
what did i do wrong here?
you need to be in the latest commit of smods
if you arent
not commit, release sorry
yes
use context.amount instead of G.hand.config.card_limit
huh
ok it just straight up crashes now
Line?
you've named your calculate function blind instead of card
this server would be really annoying with a star board lol
lmao
make it a pointboard
all of my shameful code fails would be on there 😭
How do i draw a card that was just discarded? Ive been trying with Card:draw() but it doesnt seem to be working
Although it'd be pretty funny to star all the same answers you give
I wonder what the most common answer is in all of this server
checked it lags even without any other jokers
good lord
card:draw() is for drawing sprites not cards.
Notice how nothing says start an old run 😔
That makes more sense with what the documentation says
How would i, then?
Fuck he got me
i was still getting it lmao
draw_card
Is anyone here able to help me with this? I've been searching for answers for a while and I cant find anything. Not using steammodded.
don't worry, everyone's would be
whats the thing for making a UI toggle thing
like the n = G.UIT. part
is it G.UIT.O?
Or if anybody knows anything about replacing the music..
how do i make a shader?
fr
I really wish balatro was coded in gdscript, python, java, or even c# 😔
im honestly glad its lua
what's a lua extension
something
the current joker im working on is already 700 lines of code long 
lua is a pretty straight forward language
LOL

🤔board when
or the question mark reaction
it's definitely nice for newcomers to learn to mod, but I'd rather the beginner language just be python because it just feels better to learn first
Lua is so unique compared to any other language I've seen/learned and I feel like it'll long-term lead to bad habits for any people who are interested in coding when their first language was lua
Board? Wdym?
i honestly should use lua extension im just stubborn
for instance, lua is indexed at 1 in some cases and 0 in others... no other language is like that
for some reason its aesthetically unpleasing to me
like starboard where posts that get star reactions get posted in a starboard channel by a bot
i honestly dont like python
am i the only one who just decompiled the game and is modding it that way? Are all you guys using steammodded and other tools?
See thats the interesting thing, I started with gmod lua
And other languages haven't felt very hard for me to learn
I'm pretty sure lua is always indexed at 1
never done it myself; here's the docs
currently i'm learning two languages, lua and rust (though im not very far in rust)
me neither, but it's closer to a conventional programming language
which when you actually think logically about finding an item in a list, it's a lot more intuitive for someone who isn't already aware of coding standards
how do you add seals to jokers in a preset back
oh damn. Nice 😎 👍
pos indexes at 0
that's a balatro thing
unless that's a love2d/balatro only thing
that's not a lua thing
ah, ok
that's a thunk thing

which is funny because lua and rust almost couldnt be further apart
its like comparing english to cantonese
holy jesus. How is rust?? 😭
I need to learn it soonish (I think next year in college)
wait no, that's assembly
i genuinely hate the docs for UI in SMODS
its like the most complicated thing with a bunch of args
the wiki does need some attention ngl
and theyre like "actually you should figure it out yourself"
fuck off
teach me how to make a toggle
at least say the damn args for it
we STILL dont have docs for blueprint_effect 😭
is there a reason for that
they hate us
documenting contexts is a boring job that I keep putting off
fair
blueprint_effect is extremely helpful (wish i knew how to use it without a pesky return statement though)
i was able to make the code for old blueprint in cryptid 4 times shorter using blueprint_effect instead of the janky bullshit it was using before
that's actually really cool
refactoring code is fun
SMODS.current_mod.config_tab = function()
return {
n = G.UIT.ROOT,
config = { align = "cm" },
nodes = {
{n = G.UIT.C,
config = { align = "cm" },
nodes = {
{n = G.UIT.T,
config = { align = "cm", text = "Jokes", colour = G.C.MONEY, scale = 1 },
nodes = {
create_toggle({id = "score_toggle",
label = "Joke Jokers",
ref_table = "?",
ref_value = "?",
callback = "?"
})
}}
}}
}
}
end
am i doing this right at all?
but yeah, finding motivation to write docs is hard because when I have time I'd rather do some actual coding, and also then when you do write docs it seems that people either a) don't read them and ask questions that are answered in them, or b) complain that they aren't "good enough"
fair
I think a lot of people think that docs should be a tutorial/guide
if you dont know
can you add seals to cards when adding them to a back
i similarly shortened sync catalyst down to like 3 lines inside the calculate context by updating it to balance = true instead of its jank
w
balance = true sounds useful
Yes.
yeah i got it to work with a sticker which was really fun to do
100%
a lot of "the docs are bad" comments are usually people just being new to programming and not understanding what the words mean
awesome... how if I may ask
How do I create an unlockable back? I've tried, but it doesn't work.
i just dont like that the docs are like the only place you can find info on how do to stuff minus just looking at other mods code
that's not a reason to complain about them though
yea
I assume you are talking about putting seals on cards for a deck?
its more of a '"we should have something else" thing rather than the docs being bad
lol
on jokers
i cant really read that on mobile but check this for an example
https://github.com/nh6574/JokerDisplay/blob/main/src/config_tab.lua
like it's perfectly valid to want a guide to how to do stuff, but that's not what documentation is for, someone just needs to have the motivation to write a guied
that's so fair
and then you get moments where you wanna do something and have to look through every content mod that exists only to find out that none do what you actually want
I have a vague outline for a creating jokers guide that I want to write, but I have a lot of other stuff that I like to do with my spare time
im dumb as bricks, I meant stickers
SMODS.Stickers["modprefix_key"]:apply(card, true)
the issue is that i also dont know what ref_table, ref_value, and callback even are
i dont think you can have children in a T node but idk
i think the main difference between my final playable beta and the actual release for my mod is that the actual release is gonna have comments everywhere saying what everything does
oh right the toggle IS what i was using for that
yea the toggle should replace the T node
ref_table/ref_value: uses ref_table["ref_value"] as the value for the toggle
callback: function that runs when changed
ok
so would ref_table be the thing in the config.lua file?
new UI in that box id assume
pinning this because i also need to figure this out
and then look at how the base game does it
also modded jokers seem to not treat those as a "wild card" anyway, so effects like "wildcards give 1.5x mult" dont trigger
ref_table should point to the config
What modded jokers are you testing with?
return {
["jokes"] = false
}
so if this is my config file, whats the reftable and refvalue?
Some don't use SMODS.has_enhancement
for ref_table you need to save it somewhere like this when the mod loads
https://github.com/nh6574/JokerDisplay/blob/1cdf2b5c93ba5965c03f1952d077c262e6503f97/JokerDisplay.lua#L10
ref_value would be "jokes"
ah i see
is JokerDisplay your mods key?
honestly my best advice for wanting to do UI is to look at a mod that has well written UI
or ID i mean
i dread writing ui code
uhh a lot, checked with wild card charlie from neato, bismuth from tesseract, bicycle from paper back, none treat it as a wild card
for toggles, do you really need a callback?
cause the place that needs the toggle can just check it there right?
time to work on my mod again after a 2 day break
iirc you need a callback to actually update the value, it doesn't do it by default
I haven't written actual ui in a while though
im seeing toggles without callbacks so
im assuming thats not true
there's definitely one ui element that needs the callback, it might be option slider
wow that's really useful! let me go and save its place in the wiki so i dont forget! 
How do I add text?
yes but no
that's a global table i made, the mod key doesn't matter
yes
? like you would any other locked text?
use this but replace the text with whatever you want it to say
unlock = {}
the deck's locked, that's for when it isnt
oh
alr, i have a conundrum
i have two stickers that don't do well if set on cards mid-blind
would it be better to make a separate pseudorandom element for the sticker randomization that only runs if the consumeable is used mid-blind, or just try and exclude the stickers from being applied if the consumeable is used mid-blind
sticker or seal
sticker
can someone help me with this?
alternatively i could possibly figure out a way to make it so the consumeable only works outside of blinds but that isnt much fun tbh
What do the stickers do that wouldn't work during a blind?
show code for both where you create the shader and where you use the shader
do toggles just return a boolean
heres my shader definition
SMODS.Shader({ key = 'chromatic', path = 'chromatic.fs' })
add hand size/play-discard card limit
and heres my edition definition
SMODS.Edition {
key = "chromatic",
shader = "chromatic",
config = {
chips = 20,
mult = 15,
x_mult = 3
},
loc_txt = {
name = "Chromatic",
label = "Chromatic",
text = {"For every trigger,", "{X:mult,C:white}X1.25{} Mult"}
},
in_shop = true,
weight = 5,
extra_cost = 3,
apply_to_float = true,
disable_shadow = false,
disable_base_shader = false,
get_weight = function(self)
return G.GAME.edition_rate * self.weight
end,
in_pool = function(self, args)
return true
end,
}
rate the textures 🔥 🐴 (enhancements)
Why wouldn't that work during a blind?
Well I think one of them is red/color
Another seems pretty blue/color
So good job
yay
my mod is called colorful cards so they need to be color if you want them to look like color for color color
because the only way it really works is to add/subtract the size/card limit when its added/taken away from the hand
if its added mid blind it doesnt count as being drawn but it can still count as being played/discarded which makes it do the subtracting part
you should 100% add a pantone 448 c enhancement for funny
The logic is sound, but i think you're missing black which is my goat
upon update
im starting with 6 for now
until im satisfied with how they work
This is fair
any help with this?
is your shader in the assets files
Godspeed my coloring friend
I almost chose the wrong word by total accident
its in assets/shaders, yeah
Couldn't you use the apply function for that?
were u bouta say colored friend
Yes
lol
if that works without breaking the other stuff maybe
this is where they go, right?
OH FIRE I FIXED IT
does it add xmult when something doesnt happen
why does this have a weird blue background?
how would i check if a card triggers?
is this not just X1.25 Mult?
close
it's when something (probability) does
-# if you can get that to happen 
it triggers on card trigger, unlike normal editions
which just trigger after
(context.post_trigger and context.other_card == card) or (context.main_scoring and context.cardarea == G.play)?
yeah
what does it mean for every trigger
get that on hanging chad and thats like x2.5 mult
does it reduce the chances of anything happening
if you have a joker that retriggers a joker with th edition
the edition gets triggered again
just put (retriggerable)
gotcha
Why not just say X1.25 Mult when triggered?
saying its retriggerable makes more sense
a lot of people probably dont even know that editions arent already retriggerable
Sadly no, because retriggers aren't counted as post triggers.
a smidge 🤏
whats the context for when inside of a blind
what
like when you just get in?
G.GAME.blind.in_blind
it would not
which looks the best? one card from every suit
that probably works
remember it's not a context
im stupid and forgot the word for parameter
they all clash with the regular card texture so probably anything but red
red makes hearts nearly invisible
it works!!! :D
orange on diamonds would look cool
i mean i could like make it lighter
literally all except red
why does it still have this ugly disgusting despicable blue background
SMODS.current_mod.config_tab = function()
return {
n = G.UIT.ROOT,
config = { align = "cm", no_fill = true },
nodes = {
{n = G.UIT.C,
config = { align = "cm", no_fill = true },
nodes = {
create_toggle({id = "jokejokers",
label = "Joke Jokers (restart game after changing)",
ref_table = CGNik.config,
ref_value = "jokes"
})
}}
}
}
end
(how do i add config to a toggle)
sure
i mean better than this
uh okay the apply function fucked something up and now the stickers wont actually appear on the cards
Why does this both not delete the playing cards, but also not put the jokers in the deck view?
like the function still does stuff but the sticker and its associated badge and description arent showing up
this dosent have the actual thing that makes it work but it has the basics
dont mind the config
but it works fine to make it appear
i dont get it, they applied fine before
yeah thats not my issue here
huh
they used to show up and now they dont actually get applied
put colour = G.C.CLEAR in your root node config
I'm almost done with this joker, but i have two issues: one is that it can be discarded and regained multiple times, the other is something i don't even understand (both are shown in the video) and I can't figure out how to fix either of them
hiya! just double-checking, is Card:has_edition a thing? is it SMODS.has_edition(card)? just has_edition(card)?
No.
It's card.edition and card.edition.key == "e_modprefix_key"
cheers ^^
The only reason SMODS.has_enhancement exists is because of quantum enhancements.
card.edition would be nil
tytyty
why use decimals when you can just say 1 in 40?
it's not just wof
ah, got it
Rouge joker - gains +3 mult for every red enhanced card scored (havent coded it just textured)
for some reason adding this to my sticker code no longer applies the sticker just the effect
Add card.ability["modprefix_key"] = true
how would i retrigger multiple jokers?
get better
would i use an extra = {} table?
You would return repetitions = number in context.retrigger_joker_check while having it enabled.
No.
what would i put in localize(), if i want something from misc.labels?
what does this mean?? im having difficulty understanding
"key", "labels"
cheers ^^
can you play sfx when you lose based on if you own a certain joker
whats the context when you lose
Are you trying to replace the game over sound under specific conditions?
yeah
heyy i was wondering if there is a way to change what some of the built in buttons do? I am trying to make it so skipping on my custom booster pack makes it so the player loses 5 dollars but im not sure where to start to change that
You would have to patch here:
any advice ?
Cryptid has a booster that does something when you skip it.
oo ok ill look through that, do you remember which booster pac does it ?
Baneful Buffoon Pack
thanks!
WHY DOES THIS LOOK CURSED
is this shader finished?
yeah
Why does it just say X1.25 Mult? Or did you change the effect?
it doesn't look very chromatic
Yes, but did you change the effect?
my friend named it, but he described it looking like chrome
i was just playing around with debug and i just saw that you can put it on booster packs for some reason
Because if you didn't it should say X1.25 Mult when triggered
chromatic means it's dominated by one colour, whilst this looks grey, which is an absence of colour
if it's supposed to be chrome, I'd name it chromium or something
does anyone know how to make a joker that makes a rank of card be considered as another rank?
I'm checking the pareidolia joker code and I'm a bit confused
i dont think pareidolia changes rank
Multi-Rank or just it turns into the other rank?
ive always wanted to make a joker that works something like that
multi-rank, I checked pareidolia cause it makes all cards act as face cards
Face cards have their own check, that is currently not possible officially.
That's a shame it seems, thanks for the help though
would it be possible to make something count as 2 suits
Yes.
fire
Fixed whatever the fuck the second issue was, but the redo flag still isn't working
You need to put the flag on the discarded card.
Not sure if this is the right place to ask, but how do I make a deck?
Real-time name update for a card :)
That makes sense, but it isn't working
Check for not discardedcard.ability.redo Instead.
it still crashes
@daring fern Do you mind if I DM you rq? It's relating to the thing I mentioned earlier I'm just really shy about asking about things in public 
GD ALBUM 
whats the variable for how much money hands/discards earn at end of round
nvm found it
I know absolutely nothing about Geometry Dash myself, but the JoJo fic this references used levels as names for a Stand
I was just tasked with making it cycle through all the names it uses
how do you add this to a joker?
thanks
yw
ok i have the json file but its not showing up in my mods list am i missing something
?
Is there a context I can check for increasing ante?
Youre so freaking cool
ease_ante
Thats a function though
ah, I want to check when the ante is changing.
Gbdhshsh thanks dilly
I lub the work u do
My gf is at the airport now so soon I must resume development
me when my mod doesnt show up
how would i change a card's sprite via code?
You hook ease_ante?
When gf have to leave :(
(im probably missing a single file idk)
We was sad but life must happen sadly
ok so I had it right
Most direct way to do it is to set card.children.center.atlas = G.ASSET_ATLAS[key] and then call card.children.center:set_sprite_pos(pos)
What key and pos you use are dependent on the sprite
grrrrrrrrrrrrrrrrrrrrrrrrr it's so close to being done but im back to this issue
im assuming pos would be something like {x=0, y=0}?
Yeah
I have all my modded atlases set up to have their defaults be 0,0, though if you're trying to get the art of a specific card, I'd grab it from card.config.center.pos
this was my quirky ah ah way of doing it for a card that changes sprites depending on what happens
lowkey wasnt hard okay fire
why is my mod not appearing in my mod list
wait thats sick
did you set up the json properly?
Hello fellow mindwave enjoyer
hello fellow mindwave enjoyer
i think so?
the friend i made the joker for is addicted to mindwave

if it's not giving an error i think it should show up
send your main lua
hi
:yippee:
bro just had to reload
hi
My stickers aren't appearing and I don't know why
so that answers that question...
decided to test more procedural sprites
how can i select whatever the current profile is without hardcoding it?
currently im trying to make it so theres a card that summons your most played joker (then other cards) and i can make it work fine with just setting it like G.PROFILES[1].joker_usage
but i want it to work for whichever is the profile currently selected and just doing G.PROFILES didnt prduce the results i wanted
How does it access profile in set_consumeable_usage()?
it changes based on day?
this is sigma
yuh
i dont got a clue how it accesses anything else yet, i was just looking at joker usage right now
and i can get it for a selected profile (ie profile 1) just not seeming to figure out how to make it select the current profile
No just mean that's my first thought of an example of how it would choose the current profile
I'm not at my computer right now though
Hmmm wait a minute
Cardsauce codebase help me
It's G.PROFILES[G.SETTINGS.profile]

What is the value for the discards that you have left? G.game.discards?
Hi Guys im new to modding balatro but not new to modding games I was just wondering if anyone had tips to get started or a guide I dont wanna do to much probably just add a couple jokers
Thanks so much very appreiciated!
This wiki should be pinned here atp lol
ofc!
G.GAME.current_round.discards_left i believe
for hands its the same but hands_left iirc
well it has a texture now... i guess?
not quite the correct texture but it's a start
rate the jokers (they all obtain +3 mult for every card with their specified color enhancment is scored)
Didn't work sadly
those are the 1x textures lol i meant to send the 2x
pretty patties in balatro??
uh not exactly?
i mean yeah those are the only colors rn so they look like that
also since green joker already exists i made their names french so instead of green joker its vert joker and instead of red joker its rouge joker
idk why i put that at first lol, ty
the seven human six joker souls:
undertale reference
i question how have you never played undertale ever
fr its literally on sale for $1 constantly
like its a dollar, play it
😭
if I want a sound to play when I sell a joker how would I do that (I have a joker that is buffed when specific jokers are sold)
How do I properly run functions for a played card in an event, cause this just gives me an error (Says the game is trying to index a nil value or something similar)
good news:
anyway
how do i apply a texture to something (i would like to be able to see the deck)
Tbf I've also never played Undertale
I was looking other directions in 2015 lmao
where were u looking
Also I was reading RWBY fanfic every night for hours
how do texture
have you created an atlas for your textures?
no idea
that's probably a no then lol
this should explain it
don't use context in events
outside of the event do smt like local c = context.other_card, then change context.other_card in the event to c
still cant figure it out
theres a tutorial video telling you how to set up your atlas
where
oh joy time to fix the white line above one of my jokers
white line?
oof
how do I make sure that my joker works with blueprint?
I tried that already and didn't work, i'll give it another try then
oh, but also
and now: to not fix the white line above the card because I am lazy
its :set_ability("m_steel") btw
set blueprint_compat to true (thats for it to show its compatible visually), and basically dont have and not context.blueprint in your contexts
Is there any place where I could check all variables or available functions that I could use for something like the "G" class?
balatro source code
You know the file where it's stored?
Hey quick question: Is there a way i can make a custom playing card only appear in the main menu like the balatro multiplayer mod does it (but the seecond card being another texture and not being able to show up in the decks)
I was searching through the exe a while back
mhm
refer to how other mods do it
hwo would i make a card effect 1 probablility specifically
like. if I wanted it to make glass cards break 3/4 times instead of 1/4
so just do nothing and it will work?
might need patching in which case
if only blueprint compat automatically made it and not context.blueprint
i mean I could have it just change the [global] variable for the probablility when its added to deck a la Opps! All 6s but im not entirely sure if thats. A Good Idea?
it would likely function but idk if it would break anything else
I'd like to keep it functional with Oops! tho which this method wouldnt do
is this your card
my enhancement ya
its basically glass for chips but a little weaker and breaks less often lol
i see
BUT it breaks on triggers not at end of hand
id probably hard code it so it accounts for something more than just G.GAME.probability.normal
thats the easiest way i can think of without messing other stuffs
hard code oops?
oh, no, your enhancement
OH lol
I can maybe add in Oops! compat myself lol
since it would just be a simple instabreak with both cards
mhm, good luck :p
ty
CardComplex was the perfect name for this mod why am i making the jokers so complex LMAO
vouchers use the same calculate contexts as jokers right
yes
Yep
wait so this means theoretically I could make a voucher that gives like 2X mult every hand after you buy it
lmao probably
im having. ideas over here
lol, even
it also means you could probably put jokers in your voucher slots and theyd be fine maybe
am I able to do an if/else statement in the localization files?
And if not, how do I change the local text when I have a localization file?
ohhhhh i assumed this is how observatory worked
mine prolly wouldnt cause they. like move n stuff
would they just. hop out of the vouchers slot????
now im not just having ideas im having ✨ HYPOTHESISES ✨
not in there, unfortunately, since it's a table of strings and not a code block
technically you could make the text change via loc vars which are empty if non-applicable
idk about other ways to do it however
thanks for the hint. do you know how i can render a custom texture for the card tho? with atlas prob but ill need some help lol
how do I change ```lua
loc_vars = function(self, info_queue, card)
local lp = card.ability.extra.lastPlayed
return {
vars = {card.ability.extra.xmult_gain, card.ability.extra.xmult, lp[#lp - 2], lp[#lp - 1], lp[#lp]}
}
end
can I do an if/else return thing?
what do you mean?
you wanna remove the lines if there are no data?
id check SMODS.create_card, probably
wait is this a playing card or a joker
you can build the string itself and make it return the text instead of the values, so that if there's no data you can just make it an empty string
though for this situation i'd suggest you just make it say something like {C:inactive}No data{} until youve played 3 hands
smthn like this
idea: using a wild card with it's real suit in a flush of its kind gives this joker gives this joker some more amout of mult idk
idea: a joker/voucher that makes all consumables that have randomly selected card requiresments (ex. replica, incantation, grim, unstable's conferment) turn to SELECTED cards instead
idea: cards that select a certain rank or suit choose a RANDOM rank or suit each round
if its the former then probably take reference from how balatro itself does it lol
oh true
playing card
Observatory uses the "other_consumeable" context which I believe is basically a variation of "other_joker" (which is what Baseball Card uses to grant mult for other Jokers)
yeah you can just set in_pool for the enhancement with that texture to false lol
yeah i have a few other_joker jokers, that's a cool context to know. if only it was on the wiki...
Im trying to think of all of the possible effect triggers and responses for vanilla-like jokers
Am i missing any big effect timing things?
Possible effect bases:
- When leaving the shop
- When entering a blind
- When using a consumable
- When selling a Joker
- When playing a hand
- When discarding
- When buying from the shop
- When a card is destroyed
- When rerolling the shop
- When another Joker triggers
- When opening a Booster Pack
- When skipping a Booster Pack
- When the round ends
well yeah im aware of that but im trying to translate that into actually useful english
lol
what is the format the game looks for in an info_queue? trying to add my own custom set of them to a voucher which has a ton of different effects based on the deck youre playing
You can either use a center, or use a table that looks for a specific key
didn't you miss When the round ends? that's a big one
Cause like that page is nice and helpful but when thinking of joker effect concepts its annoying to scroll thru paragraphs of info that isnt fully useful in the context
Oh yeah
When a boss blind is defeated is used on Campfire, and there's a completely unique alternate context for this for Anaglyph Deck for some reason
is there no way to just add my own text to it w/o needing a key / center
bump
there's also Playing/Discarding first hand, used on DNA, Sixth Sense and Trading Card
You should put your text in a localization file under "other" and then look for it like this:
info_queue[#info_queue] = {key = "key", set = "Other", vars = { } }
This allows you to give a name and description for a custom one
I don't think there's a way to give it plain text
It expects some kind of table
yeah was aware of those but i didnt think to write em down separately from the standard hand played/discarded but i suppose i should
me needing to add a localization file just for this because i have no intention to localize my mod since i am but one person🥀
Loc files aren't really useful for other language support
They're more flexible in a lot of ways
mood. i have one set up just for the functionality
me localizing my mod into broken spanish becasue thats the only non english language i """"speak""""
lord
mine would be some french and spanish but like. the french is good but only for the lore bits
how would i make a joker that replaces certain tags?
Depends on what you mean. Tags are pretty nonstandard compared to other objects in terms of how their effects are calculated and how they're drawn
whenever an edition tag appears replace it with a negative tag
playing card
Oh you mean it replaces one tag with another
Yeah
you have to do extra stuff for it to be in deck 😭
idfk
i just want it to be a custom texture lmfao
sry
id make an enhancement with the texture you want, set in_pool to return false and just not touch it at all
then check whatever code that adds that card, add another one and put the enhancement on it
thats my approach 🤔
it will still appear in cryptids equilibrium deck
Yeah
shrugs
yeah its annoying when that happens
i just know from experience that they will pop up LMAO
my entire mod's skill tree spawned in the shop once 😭
This has changed now. we love placeholder pack
wtf!
I'll be honest, I'm not sure I understand the appeal of cryptid, but godspeed
CardComplex 🔛🔝
waluigi is probably one of the best non exotics in cryptid
imo
i've never lost a run with waluigi
I think my enjoyment comes from the same place that makes me enjoy eldritch horror.
Horrors I cant comprehend and Numbers I cant comprehend
also perkeo and pointer is so op
Unfortunately im not at my computer so I can't look at the vanilla code to know where tags are stored
hook to create_tag, probably
you can just make more perkeo and then get more
-# wait is that the function's name
. remind me one day to make a list of all hookable functions
enhancement or edition?
enhancement, if you want to make a shader then edition
create_tag has an arg that includes the key of the created tag or smt, no?
prolly have it do the normal roll then check what it rolled itno then change
whats the size for booster packs? just the same 71x95?
its either the tag's center or key
k get it. and should i remove the title_card:set_base(G.P_CARDS["C_A"], true) then??
?
no dont, just add another card to there
i don't know the function or it's paramaters so this is new to me
?
let me seeee
arent you trying to add another card
not completely change the one card added by balatro
exactly
yes, dont touch ANYTHING the base card is using then
and iit uses this
local title_card = create_card("Base", G.title_top, nil, nil, nil, nil)
-- title_card:set_base(G.P_CARDS["C_A"], true)
title_card:set_ability('m_reddit_mmc')
oooh
huh?
what pool do i set it to
Okay nvm i gtg 😔 good luck out there soldier
do you have the enhancement set up
yes
byee
i see
you arent overriding the title card already in game, right
if you arent then the code above should be right, i think
it still pulls a card from the Base pool
how could i remove the baes
what do you mean by that
thanks for your time lol
The fabled Reddit of Diamonds
did you set this to true in your SMODS.Enhancement
all good, i try my best :p
tysm
andd like i see in the docs i should also enable "overrides_base_rank"
-# i didnt notice enhancements dont have in_pool, oops
how do i add cards to the starting deck
anyone
if the function itself then you can check how jokers that add playing cards to deck work,
SMODS.Joker {
key = "certificate",
unlocked = false,
blueprint_compat = true,
rarity = 2,
cost = 6,
pos = { x = 8, y = 8 },
calculate = function(self, card, context)
if context.first_hand_drawn then
local _card = create_playing_card({
front = pseudorandom_element(G.P_CARDS, pseudoseed('vremade_certificate')),
center = G.P_CENTERS.c_base
}, G.discard, true, nil, { G.C.SECONDARY_SET.Enhanced }, true)
_card:set_seal(SMODS.poll_seal({ guaranteed = true, type_key = 'vremade_certificate_seal' }))
return {
func = function()
-- This is for retrigger purposes, Jokers need to return something to retrigger
-- You can also do this outside the return and `return nil, true` instead
G.E_MANAGER:add_event(Event({
func = function()
G.hand:emplace(_card)
_card:start_materialize()
G.GAME.blind:debuff_card(_card)
G.hand:sort()
if context.blueprint_card then
context.blueprint_card:juice_up()
else
card:juice_up()
end
return true
end
}))
SMODS.calculate_context({ playing_card_added = true, cards = { _card } })
end
}
end
end,
check_for_unlock = function(self, args) -- equivalent to `unlock_condition = { type = 'double_gold' }`
return args.type == 'double_gold'
end
}
Any idea why this error ocurrs?
It's something to do with Cryptid. I would highly recommend against developing with Cryptid in your environment unless you're making a Cryptid expansion or are developing compatibility
I may try compatibility with Cryptid after I learn lua
That is much easier said than done
try updating cryptid
after disabling the cryptid
I know
wtf is cac
i'm making a cryptid addon and there aren't any issues for me
That version came with a mod pack
what mod pack?
I mean making an addon is easier than making a seperate mod with compat
I dunno, polterworx
lmfao
you can download the source code from github and update it like that
and update steamodded and talisman while you can
And aiyokoris
try updating then disabling polterworx and see if it doesn't crash
How do I check whenever any chance based effect triggers and conversaly whenever one doesnt
how do I fix the attempt to compare number with table bug that Talisman causes?
G.E_MANAGER:add_event(Event({
trigger = "after",
delay = 0.15,
func = function()
card:flip()
return true
end,
}))
G.E_MANAGER:add_event(Event({
trigger = "after",
delay = 0.15,
func = function()
card:set_ability(G.P_CENTERS["j_hpfx_ijiraq"])
play_sound("card1")
card:juice_up(0.3, 0.3)
return true
end,
}))
G.E_MANAGER:add_event(Event({
trigger = "after",
delay = 0.15,
func = function()
card:flip()
return true
end,
}))
why does this flip face down twice? does card:flip() work differently now?
mod compatibility is the issue
what mods do you have
ik that yahimod has this issue
and if you are using yahimod downgrade to 2.0 and don't use any twitch jokers
Steamodded Mods:
1: Galdur by Eremel_ [ID: galdur, Priority: -10000, Version: 1.2, Uses Lovely]
2: Talisman by MathIsFun_, Mathguy24, jenwalter666, cg-223 [ID: Talisman, Version: 2.2.0a, Uses Lovely]
Break Infinity: omeganum
3: DebugPlus by WilsontheWolf [ID: DebugPlus, Version: 1.4.1, Uses Lovely]
4: Nopeus by jenwalter666, stupxd [ID: nopeus, Version: 2.2.5, Uses Lovely]
5: Handy by SleepyG11 [ID: Handy, Version: 1.4.1a, Uses Lovely]
6: Jen's Library by jenwalter666 [ID: JenLib, Version: 0.4.0]
7: Cartomancer by stupxd aka stupid [ID: cartomancer, Priority: 69, Version: 4.13, Uses Lovely]
8: Jokes of a Feather by Doctor Ducko, Chilli, Hydrop0x [ID: JokesOfAFeather, Version: 1.0.0, Uses Lovely]
Lovely Mods:
it was my own
oh its that easy?
bro forgot this was the development chat
oh mb
yeah and you put to_big around the values of comparison
just trying to help
youre good lmao
wow tysm I was really overthinking that
example
yeah i still have no idea what im doing
bump 2