#💻・modding-dev
1 messages · Page 561 of 1
Follow up to this; it seems like the joker reduces the cost of the shop items when the joker itself is triggered, not when the calculate effect per-card is triggered
How would I change it so that the calculate effect drops the price?
-- jokers
for index, shop_card in ipairs(G.shop_jokers.cards) do
if shop_card.cost > 0 then
G.E_MANAGER:add_event(Event({
trigger = "after",
func = function()
SMODS.calculate_effect({
trigger = "after",
message = "Reduced!",
colour = G.C.MONEY,
func = function()
shop_card.cost = math.max(0, shop_card.cost - card.ability.extra.price_reduction)
return true
end},
shop_card)
return true
end
}))
end
end
Remove the event.
just call the calculate_event?
calculate = function(self, card, context)
if context.selling_card and G.STATE == G.STATES.SHOP then
-- return
return {
trigger = "immediate",
message = "hoI!",
colour = G.C.GREEN,
message_card = card,
func = function()
G.GAME.current_round.reroll_cost = math.max(0, G.GAME.current_round.reroll_cost - 1)
-- jokers
for index, shop_card in ipairs(G.shop_jokers.cards) do
if shop_card.cost > 0 then
local new_cost = math.max(0, shop_card.cost - card.ability.extra.price_reduction)
local msg = "$"..new_cost
if new_cost <= 0 then
msg = "Free!"
end
SMODS.calculate_effect({
trigger = "after",
message = msg,
colour = G.C.MONEY,
func = function()
shop_card.cost = new_cost
return true
end
},
shop_card)
end
end
return true
end
}
end
end
still has the price reduce before the card gets triggered
im tryna make a joker that activates on a set of number once.
so like imagine a low straight A-5, i want it to activate 1.5xmult to gain 0.25xmult on the 2s 3s 4s & 5s once, so if i was to play a flush five or something it would add a different xmult for the same ranks.
how would i do this? Would i make a list or what?
actually i think i mightve figured it out somehow
nope nvm
n = G.UIT.R,
config = { align = 'cm',},
nodes = {
create_option_cycle({
scale = 1,
w = 4,
label = "UI Options",
opt_callback = 'callback_func',
options = {"Custom Suits", "Face Only", "Vanilla"},
value = 1,
ref_table = helluva_config,
ref_value = 'hellvacustomsuitui',
}),
},
},
G.FUNCS.callback_func = function(args)
args = args or {}
if args.cycle_config and args.cycle_config.ref_table and args.cycle_config.ref_value then
args.cycle_config.ref_table[args.cycle_config.ref_value] = args.to_key
end
end```
I have this code and it *functions* but whenever the menu is opened it shows the value back on the first option again. How can I make it update so that it shows the correct current option when you open the config menu?
im sorry im bad at ui but perhaps i can show you my code for reference?
You have a functional option cycle that doesn't reset itself?
yes
I'd love to see it ^^
function G.FUNCS.btct_tarotM_rateChange(args) -- Tarot
Batrocities.config.tarotM_rateChange = args.cycle_config.current_option
Batrocities.config.selected = args.to_val
G.E_MANAGER:add_event(Event({
func = function()
if Batrocities.config.tarotM_rateChange == 1 then
G.GAME.tarot_rate = 4 * 1
return true
elseif Batrocities.config.tarotM_rateChange == 2 then
G.GAME.tarot_rate = 4 * 2.4
return true
elseif Batrocities.config.tarotM_rateChange == 3 then
G.GAME.tarot_rate = 4 * 4.7335
return true
elseif Batrocities.config.tarotM_rateChange == 4 then
G.GAME.tarot_rate = 4 * 8
return true
elseif Batrocities.config.tarotM_rateChange == 5 then
G.GAME.tarot_rate = 4 * 12.2
return true
elseif Batrocities.config.tarotM_rateChange == 6 then
G.GAME.tarot_rate = 4 * 17.333
return true
else
G.GAME.tarot_rate = G.GAME.tarot_rate
return true
end
end
}))
end
ignore the huge elseif statement
thats the function for the cycle
I think I have a rough idea of what's going on
How does the matching node look?
Wait maybe I don't understand this xD
wdym?
I mean how it looks above in the nodes that set up the ui
ah
-- Config Tab
SMODS.current_mod.config_tab = function()
return {
n = G.UIT.ROOT,
config = {
align = "cm",
minh = 6,
minw = 10,
padding = 0.2,
r = 0.1,
colour = G.C.BLACK
},
nodes = {
{
n = G.UIT.R,
config = { align = "cm", },
nodes = {
{
n=G.UIT.O,
config={
object = DynaText({
string = localize("btct_string_A"),
colours = {G.C.WHITE},
shadow = true,
scale = 0.4
})
}
},
}
},
create_option_cycle({ -- tarot cycle here
label = localize("btct_string_B"),
scale = 0.8,
w = 6,
ref_table = Batrocities.config,
ref_value = "tarotM_rateChange",
options = { 1, 2, 3, 4, 5, 6 },
current_option = Batrocities.config.tarotM_rateChange,
opt_callback = "btct_tarotM_rateChange",
}),
create_option_cycle({
label = localize("btct_string_C"),
scale = 0.8,
w = 6,
ref_table = Batrocities.config,
ref_value = "planetM_rateChange",
options = { 1, 2, 3, 4, 5, 6 },
current_option = Batrocities.config.planetM_rateChange,
opt_callback = "btct_planetM_rateChange",
}),
create_toggle({
label = localize("btct_string_D"),
ref_table = Batrocities.config,
ref_value = "disable_malfunctionFlash",
})
}
}
end
heres the entire config menu
Nah this is already plenty xD

I figured it out
current_option = morenatsu_config.morenatsustyle,
Just needed this option
Repost your issue
I'm trying to make a custom blind, but the ignore_showdown_check doesn't seem to do anything?
i seem to have figured it out somehow so no need lol
That's a pretty interesting concept
thanks! I stole it directly from the Binding of Isaac /lh
why is this stake not applying diamond stake
SMODS.Stake {
key = "violet",
name = "Violet Stake",
applied_stakes = { "cry_diamond" },
atlas = "crp_stake",
pos = { x = 1, y = 0 },
shiny = true,
colour = HEX("8a71e1"),
above_stake = "cry_diamond",
modifiers = function()
G.GAME.starting_params.ante_scaling = 2
end,
crp_credits = {
idea = { "Unknown" },
art = { "Grahkon" },
code = { "wilfredlam0418" }
}
}
https://bsky.app/profile/j8-bit.bsky.social/post/3ly5iu3wknc2u
but what if it was random
-# ↩ Vibri (Mario Party real) (@gimmick.bsky.social)
no but as it turns out the D100 isn't too hard to make from here either
Thank you! But it isn't my sprite, Ruby made it
Can we localize the json display name of the mod?
Most complex joker I've ever made is done (I'm bad at coding)
Numbers will be tweaked when balance testing happens
coolio
so uh looks like Lucky Cat but 41% stronger on average
something something expected value
i mean pretty much
i feel like this could be adjusted for something else like glass cards ngl
I'm proud of myself and it's for one of my mod
obv glass joker has that niche but yea
i like it and it's not too easy to code so good job
well ive never coded a joker myself
It's an alt version of lucky cat (whole theme of the mod)
ahh i see
just pointing out how the effect is very similiar to an existing one
in that case the decrease should definitely go up
to something like x0.1 or even x0.15 imo
I'll probably make it x0.1
x0.1 will make it 18% weaker than normal lucky cat i think?
i mean oops all 6s is kinda the thing though
Still working on that I see (cryptposting)
yeah i stopped cryptposting dev for a little while since people started sending me like death threats and stuff but i've learned to deal with it and i'm getting back into it
a perfect balance seems to be around losing x0.085 on a non-trigger
soo tweak that as you will
too oddly specific imo some changing around is probably good
given that it's swingy, having a higher expected value than the non-swingy counterpart might be a way to make it worth taking
It's not ment to be exactly the same as the normal version, they're supposed stronger with a trade off
i mean lucky cat is already kinda swingy but this is even more so
alr
i would say x0.075 is good then
balatro cuts off decimals at like 0.01 i think though
might be wrong
it WILL be stronger as long as you keep it below x0.085
you'll only be able to obtain them with tarot/spectral cards that turn them into their other versions
and i guess all6 makes it have higher potential than regular cat
more uhhh volatile
yeah given all this x0.075 is best bet in my opinion
in other news, local balatro modding dev (me) bumps this certain message because they are going insane
guys i think i made a bomb
zip bomb joker when
WHAT
ok so
Zip bomb balatro mod 🔥
I made two jokers that turn into each other
on a cycle
but they both have each other in their info queues
so as soon as you hover over the joker, your game crashes
hard crashes, no log
😭
this is funny as fuck and I am 100% making a landmine
which does this intentionally
later
just make separate info queues for only when hovered so that doesn't happen
yeah i'm gonna do that
yeah i've done this on accident before
in fact i literally did this today
😭
Of course you have 😭🙏
How do I make a custom card area appear only on specific decks? I'm trying to use G.GAME.selected_back and G.GAME.selected_back.effect.center.key but to no avail 
ii think you're missing the e_ before crp on the label key
i've never really done editions but i'd assume that's the issue
already tried that
i'm going insane like i've been trying to fix this ALL day
unironically it is 12:50 am i've been coding almost non-stop since about 2:00 pm
true but only sometimes
well true
I'm just stupid and can't code for shit
i'm best at writing/suggesting i'm pretty good at coding absolutely and utterly abhorrent at art
What's the hex codes for the low and high contrast colors of the playing cards
my art is like
okay
they're on the modded wiki hold on
I can shade cylinders and spheres
My pixel art is meh while my normal art is peak
that will look like ass and peak art takes time
then make it not look like ass
low contrast
spades #3c4368
hearts #f03464
clubs #235955
diamonds #f06b3f
high contrast
spades #3a17b3
hearts #fa2315
clubs #0081e6
diamonds #e18400
playing on low contrast is scary ngl
i play on mobile a lot and i use high contrast on there
then on computer i have a deck skin
I barely play on mobile since I just watch yt on my phone mostly
i've been playing a LOT of vanilla balatro on my phone
Pretty cool
i can use love.timer.sleep in balatro right
I have 2 solo mods I'm working on, 1 being coded, other in concepting still. The one being coded still needs a lot more ideas
you can use most if not all love functions
okay
i need to eradicate a card
I don't want the card to stay on the screen and I want to make sure that it is destroyed no matter what happens
how do I do this
i have one that i've been concepting for a while now but i doubt i'll actually ever code it since it focuses on something i'm not very good at programming for
something with dissolve
ns what
no but there's stuff like the stacked effect that makes it immune to destruction x times
😭
I don't wanna have to manually stop every single destruction prevention
can't you just card:destroy() or whatever it is
that depends a lot on how the effect is coded
reverie's destruction checks can see even if you use card:remove()
i'm going to cover as many bases as I can
Unrelated, how does one add the separate text boxes in the description of something
^
peak, thanks
this code crashes if you have no modded stickers
at least I think that's the cause
SMODS.stickers is nil for me
easy fix but thought id tell you
hm
i. don't think I've ever had that be the case
i will install a mod that adds a sticker and double check
(what mods have those that aren't too big)
I'm also kinda surprised that vanilla stickers aren't in there?
i thought they were, i vaguely recall testing this
¯_(ツ)_/¯
now i guess i have to test it again
hey guys i'm asking again, how would i be able to set an edition's shader as a vanilla one, since this crashes
SMODS.Edition {
key = "really_negative",
weight = 0.3,
shader = "negative",
in_shop = true,
extra_cost = 5,
get_weight = function(self)
return G.GAME.edition_rate * self.weight
end,
config = { card_limit = 3 },
loc_vars = function(self, info_queue, center)
return { vars = { self.config.card_limit } }
end,
crp_credits = {
idea = { "PurplePickle" },
code = { "wilfredlam0418" }
}
}
prefix config is involved, i assume
yeah some others were talking abt that earlier when i asked
wait no i think that's a different thing. maybe? uh. it's something to check
not sure how i would implement that though
prefix_config = {shader = false}?
so literally just
SMODS.Edition {
key = "really_negative",
weight = 0.3,
shader = "negative",
prefix_config = { shader = false },
in_shop = true,
extra_cost = 5,
get_weight = function(self)
return G.GAME.edition_rate * self.weight
end,
config = { card_limit = 3 },
loc_vars = function(self, info_queue, center)
return { vars = { self.config.card_limit } }
end,
crp_credits = {
idea = { "PurplePickle" },
code = { "wilfredlam0418" }
}
}
Yes.
oh my god it worked
okay how do i add the negative shine on top of it kinda forgot to mention that
Use the draw function, or use SMODS.DrawStep
oh... i'm not entirely sure how to do that
smods wiki to the rescue
yeah i have no clue how to use drawstep
it'll be fine
probably
how do i make it so that a voucher's effect replaces another's
just check if the second voucher is redeemed when you calculate the first one's effect
and if it has been redeemed, don't do the effect
that's assuming you made both vouchers
how do you alter held in hand enhancement card
like i.e Gold card now gives $5 instead of $3
You would either take ownership of it, or hook Card:set_ability and change it.
how would i take ownership of said enhancements
so i could take ownership of this
Yes.
Where is Wee Joker on the texture sheet?
The first one.
Ah it just wasn't showing because I forgot to define the key.
is there a way to have this not be affected by retrigger_joker?
right now i have to add this everywhere thats using context.bsr_stats which is annoying
🤔 here, right? i assume i add if not context.bsr_stats then outside the if statement or smt similar
yeah that seemed to do it, thanks
oh yeah, another question, what do i do here to have the card retriggering? right now it seems to retrigger everything
why is it jimbo
i need to turn x joker into y joker and it seems to be working on everything other than the sprite
i tested it turning jimbo into splash
thats odd, set_ability should also change the sprite too
and
everything, actually
it's not changing the effect i'm losing it
I need to turn X card into Y card But Like Actually
how r u changing it
I was hoping that replacing the center with the center of the new card would do it
it only changed the descriptions
oh, no
you want to do card:set_ability(G.P_CENTERS["j_splash"])
i forgot if it accepts just the key too, but using a center works
it accepts just the key yes
oh
that's way easier than i thought it would be
today is one of those "write a function for something that is already easily possible" days
how to get definitions and autocomplete?
thankyou!
Because _card is from a loop of G.jokers.cards
card would be the card that it's calculating the retriggers of.
i can't seem to figure out why this spectral card crashes trying to apply my custom seal to a card, the setup seems the same as vanilla remade for those spectral cards?
is there something wrong with my seal maybe?
ohh ok
my prefix is PORO and i tried m_PORO_Pink like you do with enhancements but i guess seals are different
Gotcha ok thanks
is there none
I don't think so
damn... 💔
i gotta do checks for when card with purple seal is discarded, card with blue seal on hand in end of round, and when card with red or gold seal is played
sup guys
is there a tutorial on coding stuff for balatro mods?, really can’t rely on joker forge for long
check out the second pinned message in modding-chat
why is it, still, retriggering the right joker, what
ello, I wanted to ask if there's a way to just create custom tooltips that aren't connected to jokers/cards with this specific purpose?
im pretty sure deck hover tooltips HAVE to be linked to a tag or center because of how they work
you could create a dummy center so the code knows where to grab the localization from, though i patched into it personally so i dont have to do it lol
or that
alrighty
@red flower help me 3:
i have, no clue what to do now
i tried printing out eval and im like 95% sure im adding repetitions in the right place
-# im not even gonna bother questioning why its not retriggering 10 times, i just want it to work...
no idea
im cooked
i need a joker to set its sell cost to -2
card.sell_cost doesnt appear to be working
where would I do this
u probably will need to hook to Card:set_cost() to prevent the card's sell cost from being changed by the function 🤔
ughhh
sorry for the beginner question but how do you make the mult effect/message show up after the chips one
if context.joker_main then return { chips = card.ability.extra.chips, mult = card.ability.extra.mult } end
i'm just gonna make the joker subtract 5 dollars when sold
i cannot deal with another patch or hook today
if context.joker_main then
return{
chips = card.ability.extra.chips,
extra = {
mult = card.ability.extra.mult
}
}
end
probably
if context.selling_self then
ease_dollars(-5)
end
i can't even do that right today
what is wrong with this code
why is it not running
it's not inside another context and there is nothng to get in its way
just put anything thats not in the intended order in extra
you can put extra in extra too btw
ok thankyou
extraception
is there a list of the colours with {C:}
yeah but you only really need
red, blue, attention, inactive, edition, dark_edition, money and green
okay thankyou
there are also suit colors but i forgot where to find them
scroll down to the bottom and you should see the color list and where its defined
return {
message = "-#3# Chips",
colour = G.C.CHIPS
}
how to use text styling on messages? or at least referencing a value
No, it's not retriggering the right joker, the right joker is retriggering it because you're checking that for every joker and consumable and voucher because it's in a for loop.
🤔 but card.ability.excess_action_value of the right joker should be 0 though
so it shouldnt retrigger itself
Yes, it isn't, the right joker is retriggering the left joker.
:3 wtf
What is the goal?
if a joker have card.ability.excess_action_value then it will retrigger itself once per 100 of that
Have you tried using perma_repetitions?
Permanent retriggers for a card.
if this is for scoring effects, those already do messages automatically
otherwise, you can use the localize function to use a message from the game (if you dont have a variable, just localize(<text key>), otherwise localize { type = 'variable', key = <text key>, vars = { <variables to use> } }
this is for reducing chips by #3# on hand played
then it should be automatic
why do i only see seals using that lmao
well if you mean as in scoring that and not scaling down like ice cream or smth
i mean like an icecream
if context.after then
if card.ability.extra.chips > 0 then
card.ability.extra.chips = card.ability.extra.chips - card.ability.extra.chips_loss
return {
message = "-10 Chips",
colour = G.C.CHIPS
}
end
end
i want the -10 to be -#3#
message = localize { type = "variable", key = "a_chips_minus", vars = { whatever the variable is } }
thankyou
sorry i didnt really know how to interpret your message before ill work on that
That's what it uses to add the retriggers.
huh
i see
:3 wtf
why is retriggers 0??
oh wait
this doesnt work for jokers though, does it
3:
Not normally.
this seems to have fixed it (hopefully)
should_apply = function(self, card, center, area, bypass_roll)
if (area == G.shop_jokers) or (area == G.pack_cards) then
return SMODS.Sticker.should_apply(self, card, center, area, bypass_roll)
and G.GAME.modifiers.enable_marked_in_shops
end
end
how to make context_end_of_round only happen at end of ante?
you can use context.beat_boss
in addition
or use one of the new ante contexts although i think one is broken in the release https://github.com/Steamodded/smods/discussions/919
thankyou
loc_vars = function(self, info_queue, card)
return {
vars = {
card.ability.extra.mult,
card.ability.half_of_mult
}
}
end,
calculate = function(self, card, context)
if context.end_of_round then
if card.ability.extra.mult > 0 then
card.ability.extra.half_of_mult = math.ceil(card.ability.extra.mult / 2)
card.ability.extra.mult = card.ability.extra.mult - card.ability.half_of_mult
return {
message = localize { type = "variable", key = "a_mult_minus", vars = {card.ability.extra.half_of_mult}},
colour = G.C.MULT
}
end
end
if context.joker_main then
return{
mult = card.ability.extra.mult
}
end
end
why is it saying half_of_mult is nil (i set it to 20 but i dont see why it should matter)
shouldnt it be card.ability.extra.half_of_mult?
wow thankyou 😵💫
how do i handle oops all sixes?
https://github.com/nh6574/VanillaRemade/blob/main/src/jokers.lua probably has what you want
SMODS.Challenge {
key = "test",
loc_txt = { name = "Test Deck" },
jokers = {
{id = "blueprint"}
}
}
why this no work
does it:
a) crash
b) doesn't show up
c) it works but you didn't load the file/ restart balatro
It's j_blueprint
crash when select
.
with a custom joker do i put j_ aswell
It would be j_modprefix_key
damn you're fast
ahhh thankyou
does anyone know where the game decides you won a round after getting the required score
here?
somewhere in end_round
it also checks for game over
state_events.lua:96
if G.GAME.chips - G.GAME.blind.chips >= 0 then
game_over = false
end
yeah but it checks after being called
i dont need that, just when it is called in the first place
it checks because its also called when you run out of cards for example
i have no idea then
my problem is that it seems to be called as part of the state machine which makes it a bit harder to pinpoint but i think it is the screenshot i sent earlier
if context.individual and context.cardarea == G.play then
SMODS.destroy_cards(context.card, nil, nil, true)
end
whats the right way to remove scored cards with a joker?
what if i want it to reconsider every time the cards are retriggered, and stop retriggering if it gets destroyed?
add a flag to the card
info_queue[#1116390750314307698_queue+1] = G.P_CENTERS.m_wheel_of_fortune
trying to make the info queue for the wheel of fortune but it won't work, is there something i typed wrong ?
c_wheel_of_fortune
Ah alright, thanks
how would i fix this error text where it should also say Pink Seal
i love pressing alt+f4 instead of alt+f5
put label in your loc_txt
it's in the doc 🫣
oh thanks i forgot to check this for some reason
i was just tryna go off vanilla remade 😭
the SMODS.Back docs say that you need to use events in apply if you want to change the starting deck, but couldnt i just... not? its not like you can see the cards when you're modifying them so the timing doesnt really matter
i think the events are for timing after the deck is set to the standard
i see
without i think it applies before your deck is reset
what arguments does set_seal take again? for some reason vscode decided to just stop showing them and just says its unknown
its the seal key as a string and then vanillaremade does nil and true
i dont know what the other two arguments do
the second argument is apparently called silent
so im going to assume it mutes the sound
i think that makes it not juice up
They are silent and immediate iirc
how do i check if a voucher is owned
G.GAME.used_vouchers.<key>
guys please help me, in my code hand_chips = 0work only with context.joker_main,i need to do it before played cards add score, but if i use context.before, then hand_chips = 0 dont work.
do it in context.intial_scoring_step
oh yeah modify_scoring_hand exists
doesnt it
just use that and return chips = 0
i think
Assuming you effect is to set chips to 0, use initial scoring step like Eris suggested but you’ll need to do hand_chips = mod_chips(0)
this is a dumb question
how can i just replace a vanilla texture ala resource pack but in a mod without doing any take ownership stuff
use malverk
this is cool and i didn't know about it but also not what i asked
also it doesn't support what i'm trying to replace anyways
as far as i'm aware "make a texture pack for malverk" is your only option if you don't want to take ownership of the vanilla atlases-
hm
if you want a strict binary "this voucher is or is not owned", sure
if that's too simple you can also use SMODS.find_card() like with any other card
i probably could take ownership of the atlas
just don't wanna take ownership of a bunch of objects and manually change their atlases
did not process that that was an option though
ah yea
yea i think taking ownership of the atlas is probably a reasonable route
guess i gotta figure out how that works then
alternately you could take ownership of the item and change its atlas+pos to your own atlas
which option is better depends on what exactly you're doing
^ yeah that'd be really inconvenient for this
trying to get rid of the stupid gradient on high contrast cards bc it's inconsistent with other stuff in my mod
ah yeah, if you're changing several items, the atlas is probably easier
so atlas ownership def easier
way more used to modding other games where you can just drop a texture in the vanilla texture's filepath with the same name and it overwrites it
Card colours are done by deck skins, you can just create one of those
I’m of the opinion that blanket replacing vanilla textures with no option to stop that from happening is a bad choice
is there any case where create_card is called before G.GAME is initialized?
i assume not but just to be sure
Maybe the splash screen?
alr it worked, ty all
you too, huh?
i hate doing that
My favorite part is being clueless and waiting for Balatro to open
How can I check in a joker is a pseudorandom effect fails, and what are some of the main contexts for it to happen? (i.e. Wheel of Fortune failing, Glass Cards breaking, Lucky Cards not triggering, etc.)
https://github.com/Steamodded/smods/releases/tag/1.0.0-beta-0711a ctrl f pseudorandom_result
thanks! :D
trying to make a joker give money if the volume level is at a randomly generated value but it never does so, is there a better way to check?
this is fair and i think mostly applies to actually substantial/noticeable changes but i'll prob have a config or smth for it anyways
a deckskin wouldn't make sense for this anyways
is there a way to access the last hand played prior an arbitrary moment in a run?
by "last hand" i mean the cards that have been played in that hand
why doesnt this work
i see
bump
I think what you're trying to do is supposed to use context.joker_main instead?
try printing the music volume and card level so you can see what they are, i assume music volume can be a decimal or something or is on a range from 0 to 1
unless it is a context issue, idk enough about those
also math.random(1, 100) is redundant, math.random(100) defaults to random integer from 1 to 100
Balatro modders best friend.
The print function
if you don't have stupid dumbly named print functions built into your mod what are you even doing
i have a function that freezes balatro for a given amount of time
i have this and if i remove it the game crashes on launch
why...
Lemme try that real quick
three
i want it to proc before scoring
I think you don't need context.main_eval just context.before(not sure though but worth a try)
i'm not sure i realised you could type things into a command line in-game
or that there even was one
debugplus
debugplus mod
yeah i have that
/
im just dense
hold tab for the awesome debugplus cheat sheet
the value doesn't print somehow
ingame nothing is printed
gusy ples halp
when you enter a blind nothing shows in the console?
unless you're editing yahimod for whatever reason you're probably better off placing an issue report at it's github than asking here https://github.com/Yahiamice/yahimod-balatro/issues
they are editing yahimod for whatever reason
im making a yahimod but it locked it
because funny yahiamod
Is there any way I could play an animation after cards are scored but before they're discarded? I'm trying to do a Strength or Midas Mask style effect but it happens while the cards are flying away
how can i make the animation of changing score requirement like that? (Bunco, Hedge Trimmer) I looked through the entire mod code, but I still didn't understand what was responsible for it.
Rest well warrior, for tomorrow we have another ui coding session
this seems like an event with the ease trigger
calculate = function(self, card, context)
if context.after then
local do_message = false
for _, playing_card in ipairs(G.play.cards) do
if SMODS.has_enhancement(playing_card, 'm_stone') and SMODS.pseudorandom_probability(card, 'j8mod_metamorphic', 1, card.ability.extra.odds) then
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.1,
func = function()
play_sound('tarot1')
playing_card:flip()
return true
end
}))
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.1,
func = function()
playing_card:set_ability('m_glass', nil, true)
return true
end
}))
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.1,
func = function()
play_sound('tarot2')
playing_card:flip()
return true
end
}))
do_message = true
return true
end
end
if do_message then
return {
message = localize('k_upgrade'),
colour = G.C.TEXT_INACTIVE,
message_card = card
}
end
end
end
(current code for reference, also I don't think that message triggers
have you tried without nil, true in set_ability
it seems impossible to find something like this in a file with 8886 lines 😣
last sticker question before im done with stickers
can i move my sticker up dynamically (i.e. via code)? i want other cards to have my sticker at the bottom but have cards like these move the sticker up
bluh
is there a reason why when you click on stakes when starting on your modded stake it gives this error, is there something i miss
i wonder if there is a way to make like a G.C.SILVER
you need to remove the prefix from the applied stakes or it tries to get it from your mod
G.C.SILVER = HEX("FFFFFF") whatever code
in like the main.file or it has to be a lovely patch
are you supposed to have that in the main file?
in here
yeah, but it still pulls away during the animation
hey so what kind of crash completely bypasses the crash screen and closes the game outright
you better not make a joker that crashes the game
what about in final_scoring_step instead of after
no im trying to figure out why a mod is crashing and theres no crash screen
infinite loop
i'll try that, I just hope it doesn't make the cards break lol
stack overflow
ive seen stack overflow trigger the crash screen...
yeah but not always
ok does TOGApack have any known crashes
to get the colour is it like C:G.C.SILVER?
like at start of roun
no, if you defined it as G.C.SILVER then it's just that
although I would recommend giving it a mod prefix
ah wait i understand now
- is there a way to define something like c:silver
- is it like g.c.farceur_silver for getting a mod prefix
for description text you need this https://github.com/nh6574/VanillaRemade/wiki#how-do-i-add-my-own-custom-colors-to-use-in-descriptions
do you need to use loc_colour() every time you use it?
no just once when you define it
sorry i dont think anyone here will be familiar with yahimod's codebase
G.C.SILVER = HEX("bec7d4")
loc_colour()
G.ARGS.LOC_COLOURS.fSilver = HEX('bec7d4')
yahia probably summoned a demon for yahimod
you can do G.ARGS.LOC_COLOURS.fSilver = G.C.SILVER
actually fire thanks
aew maen
can someone else help?
should i go for a darker gray
i think yes
im trying to get it so that the randomized quote gets changed at a set range
and now all my variables are messed up
this is only tangentially related but i'd recommend making your own content in a separate mod that just has yahimod as a dependency
yahimod is exceedingly unstable in terms of gp and coding internally so unfortunately getting guaranteed help isn't easy
https://github.com/nh6574/VanillaRemade/wiki#4-basic-mod step 4 here (should jump straight to it)
ah ty anyways
alr ^w^
how can i make a joker that is forced to the right side like with pinned?
Give it pinned sticker
pinned is left side
Ah
Make a sticker like pinned
Tho i think it’s an smods function
Not sure
Yup
It’s handled in cardarea.lua
You may wanna take a look at it
how can you get the most played hand of the run OUTSIDE of context?
like this one used here (ingame left, code right)
like can i just recreate the loop and use it?
???
Hai toma
hi s
Sorry he was faster
the blurb linked to the collection crash bit so i was confused lmao
:D
its the girl from the video
any advice apart from "just move the sticker up in your atlas"?
Wait i have a meme for this
someone?
move the sticker down 
eremel talked about redesigning the sticker system to allow that but probably not soon
youd probably overwrite the scoring ui itself
calculate = function(self, card, context)
-- i think we have to do this for stone cards
if context.modify_scoring_hand and not context.blueprint then
if SMODS.has_enhancement(context.other_card, 'm_stone') then
return {
add_to_hand = true
}
end
end
-- change stuff after scoring
if context.post_joker then
local stones = 0
for _, playing_card in ipairs(context.scoring_hand) do
if SMODS.has_enhancement(playing_card, 'm_stone') and
SMODS.pseudorandom_probability(card, 'j8mod_metamorphic', 1, card.ability.extra.odds) then
stones = stones + 1
G.E_MANAGER:add_event(Event({
trigger = 'after',
func = function()
playing_card:set_ability('m_glass')
return true
end
}))
return true
end
end
if stones > 0 then
return {
message = localize('k_upgrade'),
colour = G.C.TEXT_INACTIVE,
message_card = card
}
end
end
end
sorry for the ping; rewrote things a bit and while it seems to work for the very first stone card played, it doesn't seem like it affects any other ones
tried looking at splash to see if the other stones were just not counted but I don't think that helped either
granted i hate ui so i have no idea but
I'm afraid of people who write all the code in one huge file
bunco gaming
it sounds like something complicated(
remove this return true
oh wait lmao
also you dont need this for stone cards they always score lol
ahh fuck, didn't even consider i was returning early
thanks :D
cool cool
one huge file is awesome though
overall then im done with stickers
? the chip text doesnt change for you?
change, but its ugly
i mean i dont have anything else to say other than the previous answer of "use an ease event"
big difference
I dont really see how its ugly, its just a number change
you would like it to something like decrease by one or do a little juice
like this, but I just want to change the simple jumping from a number to a number.
you could do a small for loop where it's decrease by one by the number
not sure if that worked
it's a gimp moment lol
yeah that's better
pretty cool, i think
how would i go about removing the consumable card area for a specific deck
i made this, but it still do it instantly, how can i make gaps of time between changing text?
probably a simple wait method
probably make the card_limit for it always 0 and setting G.consumeables.states.visible = false is the easiest
use an ease event!!!!!!
?
Where have you been before(...
awesomesauce
here are some ideas for stakes to split the sticker stakes:
- have the final boss ante at 10
- shop prices increase
- re-rolls increase or limited amount of re-rolls
- smaller selection in booster packs
- vouchers only appear every even ante
so, what should i put into ref_value?
ref_table = G.GAME.blind, ref_value = "chip_text"
feel free to suggest
silly me, im write ref_table = G.GAME, ref_value = "blind.chip_text"
yeah the stake applied page is broken
aw man
maybe could do a scrollable list or make a second table like one for vanilla and modded stakes
it just needs to be fixed, it's on my list to do at some point
👍
it uses decimal numbers, may i avoid this?
put func = (function(t) return math.floor(t) end) this in
eremel
can i unlock check at the end of a run?
am i going insane or is there an issue with quantum enhancements when they're applied based on chance
wdym
i just tested this scenario for #945
and I've verified the chance itself goes through
but the quantum lucky cards never trigger
unless the chance for them to be lucky is guaranteed
asking cause i did this and it didnt work
hmmm
I don't remember how often they're updated
I get 22 calls of check enhancement when I play one
tried 2/3 chance to count as lucky, not a single lucky trigger out of 50-ish cards played with luck doubled on lucky cards
the math ain't mathing there
on the bright side, the infinite getter loop fix works flawlessly
I just tried 3/4 to count as bonus and it worked fine
it also didnt loop infinitely
and I'm not on that PR
it's about combinations of getter contexts that call into each other
like above "Double probabilities on lucky cards" and "X in Y chance for playing cards to count as Lucky cards"
this inflooped for me on main
but the lucky triggers don't happen when prob mod isn't there either
there's definitely some jank going on though, it changes depending on the order I select the cards
can we delete all quantum things pls
did 24/25 to count as bonus just now (on main and with hopefully no other shenanigans) and it's counting about 1/6 of the cards as bonus
the caching is definitely borked
at least the infloop fix has nothing to do with it so I'm still fine merging it
least scuffed part of quantum enhancements
when does the cache get cleared?
I'm not gonna act like I remember anything about the quantum enhancements implementation
oh it gets cleared every frame lol
it should get cleared at least at the start of every update loop
A bit off-topic but i really wanna express this thought: My biggest gripe with most of these features is that documentation for pre-existing features isn't even done; I've heard this from someone else: we shouldn't be introducing these new features when documentation for most existing features isn't even complete
I'd find these new features less problematic if we actually documented them, then at least we might have a bit of a better grasp on them and potentially improve implementations
There aren't that many old features that don't have some form of docs afaik
And writing docs for stuff isn't fun
afaik docs are mostly incomplete for newer features, like more recent calc contexts
I think the benefits of new features outweighs the problem of missing docs
Id rather have a useful feature and have to do some digging than not have it at all
there are a load of contexts missing because I haven't had the motivation to finish my rewrite of them
but if you are slightly familiar with how contexts work, they're easy enough to find in the code
This should go without saying but take your time dude, it's awesome you're doing it at all
I've been hesitant to assist with documentation because I was grossly unfamiliar with SMODS code, but after several times that required me to look into such, I could - and should - help out at this point
also i put a lot of them in vanillaremade for this reason :3
I've been working on documentation discipline for a while now - via mods and the modded wiki - so I really gotta put it to good use
I think it's mostly the blind calc ones that aren't there (and a handful of others) but those can all be done with the blind methods anyway
the blind calc ones are very useful (thank you aure)
I think it sets a bit of a sour precedent, i.e. then everyone is not expected to help with documentation, and then it spirals out of control and suddenly half of the project is undocumented or outdated
but if you want to help out with documenting stuff, feel free. I've always said that I don't have the time to be reviewing wiki PRs, but if people can comment on them and the consensus is they are good, I'm happy to merge them when notified
on the other hand, I'm also commited to writing up detailed stuff in the release notes for any new features that are added, that can be lifted directly to the wiki at some point when there's an idea of where it should sit (I do realise that this isn't ideal for linking to though)
see https://github.com/Steamodded/smods/discussions/919 for reference
jade or jadeite?
white - silver
red - ruby
green - jadeite
black - quartz
blue - jasper
purple - amethyst
orange - carnelian
gold - lapis
``` this is the gemstones i have come up with
jaded stake /hj
Does someone have an idea of why it's crashing ? couldn't fully figure out how juice_card_until works :/
are you working with stakes?
err i mean
stickers
:3c
both
okay wait new question
i'm a bit lost as to how i'd implement my Joker
so, my Joker has a MORE menu
(or, at least, i'd like it to have one)
when MORE is selected, it should open a menu with a text field
ui 😨
the ui's not the hard part here :3
try juice_card_until(card, eval, true)
so
steal cryptid's code card text field
i have a variable called G.GAME.phanta_death_note_cards
🧠
i did that :3
oh okay
it's an indexed array of all owned Death Note cards
Working, tysm
when the MORE button is pressed, it should call the run_deathnote_menu function
first question: how can i pass in the card that the MORE was pressed on as an argument to this function?
wait i may already have this sorted
if ref_table is the same as e then i've solved that problem
okay i may actually have just coded everything myself ;u;
untested
okay wait actually, question
what exactly is ref_table?
wait no nevermind
rare case of localthunk documenting his code 
awesome sauce
what functions should i hook to mess with the shop's content again
what do you think
???
???
not sure if carnelian (the one below lapis) is too close to jasper
what do you think
plan to have half stickers and half adding some difficultly but not fully sure yet what would make it balanced
i wish you luck in your stake/sticker journey
bumping this
silver :
ruby > no sell value
jadeite :
quartz > no edition / only base edition
jasper :
amethyst > cannot be duplicated (ankh/invisible) or reappear (showman)
carnelian :
lapis > cannot be copied by another Joker (blueprint/brainstorm)
``` got the stickers down i think
also lmk if u have trouble with setting stickers up cuz i spent a the whole day yesterday trying to get it to work lmfao
🙏
do not wanna have people go through that 😭
feel free to suggest and any would be good, where in the placement:
- big blind gives no reward money
- limited about of rerolls
- rerolls cost extra
- items cost more
- one less booster selection
- mega and/or jumbo booster packs don't show
- vouchers only show each even OR odd ante
- final boss blind is increased to nine or ten
- interest per x is increased / interest max is lowered
does context.post_trigger not work in a seal's calculate
literally this is all i have and it's not printing anything
(to reiterate, this is a seal, not a joker)
and yes i know it's an optional feature, i should have it enabled already
i think it only works on jokers but i could be wrong
dang
why is this not letting me open the game
dumb question, whats the key for the tarot card the justice?
C_justice
Set=“Tarot”
c in capital letters?
okay thanks
how do you check when a playing card is retriggered
have i made my UI correctly? the text box is blank until i click on it, the prompt text doesn't appear, and the UI box shifts upwards when the textbox is selected
@red flower sorry for the ping but i'd like two cents from u ^u^
idk anything about text input sorry
👍
mm, try looking at what Phanta does, it's worked well for me
bump..... adding a nil check to the G.GAME.hands didnt help......
oh lol :3
Miku jumpscare
Okay I just need to figure out getting in audio to play when the card is visible and pick a better joker ability and this is done
Just do it when it’s added to deck
Implying I know how to code this is bastardized from Aura
Ha
Just call the smods function when add_to_deck
Idk what it’s called SMODS.Sound of SMODS.Music
Idk
something like
SMODS.Sound {
key = "music_badapple",
path = "badapple.ogg",
sync = false,
pitch = 1,
select_music_track = function()
return next(SMODS.find_card("j_modprefix_key")) and math.huge or false
end,
}
Does smods.find check every card area
perfect, i did something simiilar :D
Including the collection
Just G.jokers
ya
checking any time it is on screen is a bit harder
Yeah
its probably not that hard but i cant think of a way rn its too late
Can’t you call it when the animation starts
You’re in Argentina wdym too late
It’s 1 Am for me
9 pm is late
same here 🤝
Welp
Sorry unc
Why are you making animations with aura
Because I don't know how to otherwise xDD
I think bepis made an example
If you can send that to me that'd be great. I am late for a vr concert!
I think using aura is a bad choice because, that’s +1 dependency
Aura isn't a dependency it's another mod that adds animations to cards that I adapted to play on the bad apple card instead
Also you can ask them he’s pretty active but he also lives in asia so it’s too late for him now
how about this:
silver - re-rolls increase by one dollar
jade - items increase by one dollar
jasper - one less booster selection
carnelian - interest max is lowered from twenty to ten
i think eight would be bad since with the two stakes scaling it might make most runs hard
maybe the booster selection or the vouchers one what do you guys think
these all sound like pain
is silver per ante
ante 1 = $5
ante 2 = $6
so on and so forth
both are static just a global increase by one
i cant even beat gold stake normally these would absolutely destroy me
same...
maybe from 25 to 15 for carnelian
i don't mind making a challange for others though 😅
oh shit i just realised that wouldn't work since its just max five without vouchers 😭
Interest cap is 25 , do you mean card as (items )
interest cap but there's the vouchers woops
will need to come up with something else
No it’s fine
Red deck gives +1discard and blue stake take it from you
Lol
Also nice ideas i really like them
isnt blue stake getting a rework?
We’ll have to wait for the ipdate
is DARK_EDITION for all editions
Honestly idk why’s it taking so long , are the ideas not planned yet ?
thankfully yeah
Or is local thunk just on a vacation
hes cookin
i mean even if its the latter localthunk deserves it but its more so that
it has to go through qa and making sure that localisation and cross platform support works
I think he said there’s going to be 1 new joker
the fool joker
He’s not that type of person lol
he ain't
I think his self insert would be the fool since he used it as his pfp for a while
i mean i don't know him but that doesn't sound like something he would do from interviews and such
maybe...
And it’s a big maybe
Anyways
Great stake ideas
I’m definitely stealing some and reverting the effect

welcome to computer science finders keepers 😈
LMFAO
its all fun and games until you come up with an idea but its already been done
!!!
been there done that
Post trigger is a thing
I think
Idk what it does
I’ve done something similar with my mod but using no calculate function
also rn i concepting and doing the art
like i mean i may or may not even finish it lol
which sounds better: can't reappear or be duplicated OR can't reappear or duplicate
im not sure
also wouldn't that just be for triggers
I have no idea
can't reappear or be duplicated
love me a {C:attention}???{} Jokers
haven't came up with a name yet sorry
is there a way to see a value in another joker? i.e. reading the amount of mult that jolly joker will add. for my usecase i dont want to just read "oh jolly joker! that means 8 mult" because with mods that change other jokers' values i want it to see that and be "oh a joker with 12 mult!" if it's been changed
please
for rerolls when increasing it just where five becomes six or every click increases it quickly
It’s jank
But should work
how do you check if a card is debuffed
ability.debuff ?
ability.debuff?
could have cards with the rerolls and booster packs and vouchers in the other
Ya
if ability.debuff?
problem
context.other_card and card.debuff?
I think context.individual ignores debuffed cards so try using a for loop
i can patch in the ability to type apostrophes, but patching in the ability to type zeroes crashes the game
No
hook, in button_callbacks, is nil
every other digit is fine
why does zero crash the game?
🤷♀️
idk what the fuck to do here
could do interest per x to decrease
No!
actually jokerforge might have a function for that it wouldn't hurt to check

let me see if it does
maybe interest per x increases to like ten or somewhere in the middle
or i can just come up with another stake idea
no idt
actually i don't believe jokerforge has anything for that last i checked
wow ive looked through like every Joker mod i have installed and none do anything like this, thats immensely lame
i might very well be blind tho
I think i have something like that
Wait
This function increases values
You can make it return values in a table instead
ooo
(Based on given operator )
how about 1 interest 5 increased to $10 or maybe $8?
pleaseeeee
not even gonna get the first joker of suggestion box done 😔
Just work on something else
Interest per dollar is raised from $5 to $x?
what is another idea that can work then
okay let me do something easier
how do you check if the played hand contains like a specific amount of stone cards
For loop
And counter
oh yeahhh
sorry my mouse was hovering over vouchers when i took the screenshot 😅
not sure tailcoat and napkin are good names
not sure if either are good
painted deck would go crazy
wait what is that joker chip doing there
lil easter egg (i dont actually know why, mightve been unused)
unused asset
it looks kinda tough ngl
Gameplay update featuring jimbo stake
Tailcoat -> Minted
if you're making Jokers that are one-of-a-kind it'd be cool to have them named in a similar way, maybe
honestly its been fun to mess around and oh yeah since i don't plan to go all in feel free to take my ideas for your own mod
OH MY GODDDDD IT ACTUALLY WORKSSSS
how to make ajoker destroy scored cards as they score? context.destroy_cards seems to be after scoring
More ?
it's great how it works with anything in P_CENTERS except for the things that i specified shouldn't work
(like Boosters, Vouchers, etc.)
Good one 🥔
Just researching and learning the modding process. If I wanted my mod to tweak another mod (for instance, the abilities of another mod's Jokers), that would be done with a Lovely patch, right?
No
Take ownership
Lovely patches change the vanilla code
Okay so I'm trying to get the bepis animation setup but I'm getting an error on the joker attempt to call global 'AddRunningAnimation' [a nil value]
Function isn’t defined
that's really cool!!
How would one define it
It should be defined
Idk how your code looks like
key = "badapple",
config = {
extra = {
victim = 1,
scale = 1,
rotation = 1,
odds = 6572,
constant = 0,
respect = 0,
no = 0,
var1 = 0
}
},
pos = {
x = 0,
y = 0
},
AddRunningAnimation({'j_badappleanimated_badapple',0.1,99,21,'loop',0,0,card}),
display_size = {
w = 71 * 1,
h = 95 * 1
},
cost = 2,
rarity = 1,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
unlocked = true,
discovered = true,
atlas = 'badapple',
actual joker code yada yada}``` The Joker
The animate object code is the raw one from Bepis since I don't think you're supposed to touch that
-- SMODS.load_file("Aura.lua")()
assert(SMODS.load_file("BepisFever.lua"))() -- Testing
-- Jokers
local NFS = require("nativefs")
to_big = to_big or function(a) return a end
lenient_bignum = lenient_bignum or function(a) return a end
local function load_jokers_folder()
local mod_path = SMODS.current_mod.path
local jokers_path = mod_path .. "/jokers"
local files = NFS.getDirectoryItemsInfo(jokers_path)
for i = 1, #files do
local file_name = files[i].name
if file_name:sub(-4) == ".lua" then
assert(SMODS.load_file("jokers/" .. file_name))()
end
end
end
load_jokers_folder()``` This is in the main lua
You can’t just add it like that
Her'es the bepis code
(I’m on phone ) 😭
🫓
Unless I'm reading it wrong they said to put it there in the Joker definition and to just load the animation lua before the jokers
how do you instantly lose a run?
Get the mod that lets you fold
It's been great for testing quips
cheers :D
I think that's something available in DebugPlus