#💻・modding-dev
1 messages · Page 439 of 1
The shaders require a position and effect function
they don't have to do anything iirc
How would I limit the controller to only allow focus on an overlay's elements?
I'm probably wrong tho
ignore the comments being wrong why does this apply the 0.25 to my score instead of scaled xmult?

how would i add those? i know nothing about shaders so i just used a glsl gui and used find and replace for conversion
return xmult
not XmultMod
ah ok
thanks that worked but it's also applying the 0.25 xmult after the scaled
so now it's just doing scaled xmult like x1.75 and then x0.25
Code?
i think i figured out how to add the position function but i still cant figure out the effect portion
Remove the message.
yeah that worked thanks
i wanted to add a food element to this where it self destructs after a certain number of rounds, as it's scaling after each round could i just code it so once xmult is over 3 xmult it SDs?
heres the effect portion
bumping this now that i have a tall glass of dr pepper and a kinder mindset
Try looking at It is forbidden to dog from Aikoyori's Shenanigans
will do
can someone please help me add a custom sound effect to the game? i don't know where or how to register it.
SMODS.Sound {
key = "key",
path = "foobar.ogg"
}
ty
make sure to put it in assets/sounds
yes
bump
but this would theoretically retrigger a specific joker twice?
No, it is context.retrigger_joker_check
why?
retrigger_joker is not a valid return value.
here's the shader code
im trying to make a custom hand thats just zero cards for an edge case with a boss blind, and it just isnt registering properly or something, how do you fix this?
also iterating through all the hands with for k,v in pairs(G.GAME.hands) do print(k) end doesnt show it in the list either
Try looking at the None hand from Cryptid.
also when changing the return to be similar to cryptid's none hand return { hand and #hand == 0 and G.GAME.hands["star_nothing"].visible and {} or nil } it gives this instead
from cryptid yeah? my code is basically a copy of theirs
G.handlist?
The star_nothing hand doesn't exist.
im not sure if hands need like an extra file for the game to load it properly or if its just like adding jokers in one file
but i cant just put G.GAME.hands["nothing"] right
like in cryptid it has the key as cry_None
they don't
how are you loading it?
are the other files in libs loading properly
its the only file in libs and console shows its loading properly yeah
what's the sound effect for when an ante increases?
bump
try adding a print to the hands file
like inside pokerHand or just at the top
at the top
ight
hey guys last thing for tonight, I don't know why the description of the card wont work in game. the texture shows up, but the description is an empty box
so it didn't load?
Tarot not Tarots
highlight2
hmmm then idk
if you make the poker hand visible does it show up in the run info?
opps im a little silly
thats the funny thing even when its not visible the game crashes upon opening the run info
ill try making it visible tho
oh wait what the hell
making it visible made it show up
got it as this now for my joker compared to this and its not working still 
still cant play it though thats for sure
i mean i can see that it exists there in the log
getting this error when making a shader converted from glsl. what other conversion steps are there?
none hand in cryptid has a bunch of patches maybe you need some of them
i still need some help
with what
hm true
wait i think it's because float is supposed to be number
this is gonna be one hell of a rabbit hole to fix
this
You need to use the patches that that joker uses.
loc_vars = function(self, info_queue, card)
return { vars = { } }
end,
calculate = function(self, card, context)
if context.after and context.poker_hands and context.poker_hands['Flush'] and #context.poker_hands['Flush'] > 0 then
local flush_cards = context.poker_hands['Flush']
local example_card = flush_cards[1]
if example_card and example_card.base and example_card.base.suit then
local flush_suit = example_card.base.suit
for _, c in ipairs(G.hand.cards) do
if c and c.base then
c:set_suit(flush_suit)
c:juice_up(0.5, 0.5)
end
end
return {
message = "Shrimps are pretty rich.",
colour = G.C.SUITS[flush_suit]
}
end
end
end
}
is this right
because this doesnt do anythin
g
It's SMODS.change_base(card, suit) not card:set_suit
i like kero kero bonito
oh for god's sake
hold on
how do you know its flamingo
nope, same error after changing all instances of float to number
the message
right
but like
i want to change the cards held in hand
suits
with the suits of the played flush
Yes, that is the function for changing suits.
?
you want local flush_cards = context.poker_hands["Flush"][1]
new local or overwriting the other one?
Change card to c and suit to flush_suit
overwriting the one you have
where do you find information about G (i want to guess it read game information)
i''ve been searchin the git for 30 mins already
cant find shit
Yes, it is.
thats not a yes or no question smth
.-.
i just woke up
anything
f
this is the best you will be able to find
https://github.com/Steamodded/Wiki/pull/30
🥀
thanks
thanks
it works!!
thank you
@daring fern @red flower you guys are my savior
bump, and bump, and bump. one day i'll make a splash
😭
yeah you're DOOMED 🥀
where do i find help on this bc i have not found a single helpful resource
i would assume someone would know considering you kinda need one for an edition
hold
i just decided to not make editions
i wouldn't make editions if i didnt think of a really funny joke for one and now im commited
I just took the code from a vanilla edition and then wrote what I wanted it to do instead using the stuff in there
it probably helped that I hadn't touched shader language stuff for over 10 years
i just used the smods and love2d docs and converted from glsl
it says that it's just changing words but clearly it isn't
i have the effects converted but i dont know how to use them or just make it not crash
you might wanna search it up yourself my fucking god its spinning for 3 minutes already
its something like
how to import shadertoy shaders into balatro tutorial or something
you can also ask the guy there
that
discord is actually tweaking for me
everything runs fine
the edition im making is pretty specific
i dont think i could find it on shadertoy, plus i already converted from glsl which is basically 1 to 1 with love2d's shaders
you can ask the guy for some help tho
How do i get a joker to detect when it's been added to your hand? i wanna have a joker that creates a copy of itself whenever it's bought from the shop or summoned by another joker
the issue is just the formatting of it
like the effect function is missing and i dont know how to make it
he knows shaders
alr
How do you set up mod settings?
I'm trying to make a simple toggle for experimental/unstable jokers
Create a config path if not done yet
is context for when you start a new round a thing
Yes.
what is it
context.setting_blind
oh i was right then
trying to make a +20 mult joker that destroys itself after 5 rerolls it is not destroying itself when it reaches 5 rerolls gg
set_flags and add_to_hand don't exist.
so how do you instantly play it?
like
i want them to spawn in my hand
and immediately plays it
local _card = SMODS.add_card({set = "Playing Card", suit = "Hearts"})
G.hand:add_to_highlighted(_card)
G.FUNCS.play_cards_from_highlighted()
```?
huh
sure
thanks
and how do you specify the rank?
rank = "Ace"
thanks
Can you manipulate decks to have certain blinds? Imma look into it later curious if anyone knows or tried
like this?
Aces are called Ace
"A" isn't a valid rank.
damnit
even after using the shadertoy guide it still crashes, i might give up on this
awesome
It's "Ace" for aces.
Jack for J Queen for Q King for K
Arguments also same for change_base I think that’s the function name
i seeee
Yuh I just checked it is so if u ever wanna change cards use that unless it’s like strength I would suggestion modify rank
okay now what
ast_config doesn't exist.
Yea I would scour all the files like utility, game objects, and other broad stuff in SMODS it helps to see what it looks like and how it’s being used
Teaches you how to build any custom ones needed for mods if so
"A" should work too, takes both types of keys
how do i actually check for config
if SMODS.current_mod.config.key then
SO I WAS RIGHT
"H" should also work
H?
for hearts
Hello, I am an actual dumbass, i've looked at some references but there's a lot of shenanigans going on, can someone point me to just changing the language files, i litterally just want to rename 3 planet cards
this texture pack does that
https://github.com/xssgm/Touhou-Balatro-texture-pack/tree/main/localization
touhou balatro texture pack
How are we supposed to get the rank of a highlighted card
Seems like quantum enhancements aren't working with cryptid installed for me, anyone have some insight?
does anyone happen to know why the texture doesn't go down with the button?
definition = {
n=G.UIT.ROOT, config = {align = "cl",colour = HEX("a58547"), minw = 2, emboss = 0.1, r=0.1, padding=0.1, button='your_collection_fishies'}, nodes={
{n=G.UIT.O, config={object = FishingMod.FishieButtonSprite}},
G.hand.highlighted[1]:get_id()
thankx
I have a function that may work, but has lag.
I'd be willing to try.
nevermind I think i got it
function SEALS.get_quantum_enhancements(card)
if card.ability.soe_enhancements and #card.ability.soe_enhancements >= 2 then
local quantumenhancements = copy_table(card.ability.soe_enhancements)
for i, v in ipairs(quantumenhancements) do
if v == card.config.center.key then
table.remove(quantumenhancements, i)
break
end
end
return quantumenhancements
end
return {}
end
function SEALS.calculate_quantum_enhancements(card, effects, context)
if card.debuff then return nil end
context.soe_extra_enhancement = true
local old_ability = copy_table(card.ability)
local old_center = card.config.center
local old_center_key = card.config.center_key
local extra_enhancements_list = SEALS.get_quantum_enhancements(card)
table.sort(extra_enhancements_list, function(a, b) return G.P_CENTERS[a].order < G.P_CENTERS[b].order end)
for _, k in ipairs(extra_enhancements_list) do
card:set_ability(G.P_CENTERS[k], nil, 'quantum', true)
card.ability.extra_enhancement = k
local eval = {enhancement = card:calculate_enhancement(context)}
table.insert(effects, eval)
end
card.ability = old_ability
card.config.center = old_center
card.config.center_key = old_center_key
context.soe_extra_enhancement = nil
end
``` I have these, you would need to change them around to suit your needs also you need to do some patching.
# SMODS.calculate_context()
[[patches]]
[patches.pattern]
target = '=[SMODS _ "src/utils.lua"]'
pattern = '''SMODS.calculate_quantum_enhancements(card, quantum_eval, context)'''
position = "after"
payload = '''
SEALS.calculate_quantum_enhancements(card, quantum_eval, context)
'''
match_indent = true
times = 1
# SMODS.calculate_context()
[[patches]]
[patches.pattern]
target = '=[SMODS _ "src/utils.lua"]'
pattern = '''SMODS.calculate_quantum_enhancements(card, effects, context)'''
position = "after"
payload = '''
SEALS.calculate_quantum_enhancements(card, effects, context)
'''
match_indent = true
times = 3
# SMODS.calculate_context()
[[patches]]
[patches.pattern]
target = '=[SMODS _ "src/utils.lua"]'
pattern = '''SMODS.calculate_quantum_enhancements(card, return_table, context)'''
position = "after"
payload = '''
SEALS.calculate_quantum_enhancements(card, return_table, context)
'''
match_indent = true
times = 1
It has many problems though.
ignore the mult, but you can put play sound in here right?
No, it would be sound = "modprefix_soundkey" in the return.
Play_sound(‘prefix_snowgrave’)
sound or play_sound
Both prob work
ill try both
blessed it works now
You just always are trying to prove me wrong so karma can be b
CLAM NOOOO
He was like a brother to me
Just stating the fax lol consistency shows key
No need to get so heated.
Instead of arguing, let kill each other
NO
isnt that just advanced arguing
-# Undocumented SMODS.Booster parameter go brr.
You are trying to do something related to score when mult doesn't exist.
oh come on if it was a bit higher jokers wouldnt cover it
did i miss something in here
I think you got a bit too much mult
You can't do xmult in context.setting_blind
oh damn really?
I mean, you can, the game just doesn’t like it.

that sucks
just a smidge
only a spoonful of xmult
so like
It’s just a slight bit too much mult in the back /ref
After scoring? Like after adding the total up?
mult will always be 0 after scoring.
oh
like
this joker draws and plays the ace of hearts right?
Yea
No, it creates it.
is there any way to read the final amount of chips and mult you get?
that too
Yes.
i'm basicall making this
So after the cards are done scoring, you want the xmult, yes?
yes yes
but it saves the starting values
It is hand_chips and mult
and where do i put it
Seal guy, am I right or am I misremembering
Replace your context with that one
wdym, like G.GAME.current_round.current_hand.hand_chips?
will it break the main thing tho?
here's the code
calculate = function(self, card, context)
if context.setting_blind and not context.blueprint then
G.E_MANAGER:add_event(Event({
delay = 0.2,
func = function()
local _card = SMODS.add_card({
set = "Playing Card",
rank = "Ace",
suit = "Hearts"
})
G.hand:add_to_highlighted(_card)
G.FUNCS.play_cards_from_highlighted()
return true
end
}))
return {
sound = "mvan_snowgrave",
xmult = 99999999999999999999999,
message = "P R O C E E D.",
colour = G.C.SUITS.Hearts
}
end
end
}
You could also just, make another part of it
Add another if statement with the new context and move the return with the mult to that
And I think it should work
No, it's just hand_chips and mult
sure
this doesnt work btw
yyyyyayy,,.,.,finall'e
how long did it take you
no xp bar but i would genuinely rather remake my mod from memory until its identical than make a working progress bar
The whole code or just the sound?
i don't want to talk about it
this is the world's worst possible syntax
and the fac tthat it works scares me
Oh, I never done anything with sound so i cant help you, sorry
Try: ```lua
func = function()
play_sound("modprefix_key")
end
sure
How would I debuff a specific joker?
SMODS.debuff_card(joker, true "source")
local get_joker_to_left = function(jokers,card)
local index
for i=1, #jokers do
if jokers[i] == card then
index = i - 1
end
end
return index or 0
end
local get_joker_to_right = function(jokers,card)
local index
for i=1, #jokers do
if jokers[i] == card then
index = i + 1
end
end
return index or 0
end
SMODS.Joker {
key = 'rusty_razor',
config = {extra = {mult = 3, odds = 15, base_mult = 1, curr_mult = to_big(0)}},
loc_vars = function(self,info_queue,card)
return {vars = {card.ability.extra.mult, (G.GAME.probabilities.normal or 1), card.ability.extra.odds,card.ability.extra.curr_mult}}
end,
rarity = 2,
atlas = CHAR.G.jokeratlas.key,
pos = { x = 67,y=0},
calculate = function(self,card,context)
if context.setting_blind then
if pseudorandom('tetanus') < (G.GAME.probabilities.normal or 1) / card.ability.extra.odds then
local victim = card
if not victim then
return
end -- Safety check
victim.getting_sliced = true
G.GAME.joker_buffer = G.GAME.joker_buffer - 1
-- Store reference in local variable for closure
local dissolve_target = victim
SMODS.calculate_effect({message = localize("k_nope_ex")},card)
G.E_MANAGER:add_event(Event({
trigger = "after",
delay = 2.5,
blockable = false,
func = function()
if dissolve_target and dissolve_target.start_dissolve then
dissolve_target:start_dissolve()
end
G.GAME.joker_buffer = 0
return true
end,
}))
else
local diss_trg1
local comb_sell = to_big(0)
local diss_trg2
local victim1 = G.jokers.cards[get_joker_to_left(G.jokers.cards,card)]
local victim2 = G.jokers.cards[get_joker_to_right(G.jokers.cards,card)]
if victim1 then
comb_sell = comb_sell + to_big(victim1.sell_cost)
diss_trg1 = victim1
G.GAME.joker_buffer = G.GAME.joker_buffer - 1
diss_trg1.getting_sliced = true
end
if victim2 then
comb_sell = comb_sell + to_big(victim2.sell_cost)
diss_trg2 = victim2
G.GAME.joker_buffer = G.GAME.joker_buffer - 1
diss_trg2.getting_sliced = true
end
G.E_MANAGER:add_event(Event({
trigger = "immediate",
blockable = false,
func = function()
if diss_trg1 and diss_trg1.start_dissolve then
diss_trg1:start_dissolve()
end
if diss_trg2 and diss_trg2.start_dissolve then
diss_trg2:start_dissolve()
end
G.GAME.joker_buffer = 0
return true
end,
}))
comb_sell = comb_sell * card.ability.extra.mult
print(comb_sell)
card.ability.extra.curr_mult = card.ability.extra.curr_mult + comb_sell
return {
message = "+" .. comb_sell .. " Mult",
colour = G.C.RED
}
end
end
if context.joker_main then
return {
mult = card.ability.extra.curr_mult
}
end
end
}
``` talisman crash, attempt to compare number with table
you are attempting to compare a number with a table it does not get simpler than that
go check on the line it tells you is the problem and just to_big() both sides of the comparison or something
Line?
then something youre doing is likely setting a bignum to a non bignum
usually not
strange
and its a joker problem
cause i can play hands just fine without it
could it be when i multiple comb_sell by card.ability.extra.mult
let me try that
nope
here's crash log
im gonna disable partner
it may be partner
it was not partner
i dunno what im doing
What is that line in the lovely dump?
common_events.lua:1083?
if amt > 0 or amt < 0 then
if extra and extra.instant then
if extrafunc then extrafunc() end
attention_text({
text = text,
scale = config.scale or 1,
hold = delay - 0.2,
backdrop_colour = colour,
align = card_aligned,
major = card,
offset = {x = 0, y = y_off}
})
play_sound(sound, 0.8+percent*0.2, volume)
if not extra or not extra.no_juice then
if card and card.juice_up then card:juice_up(0.6, 0.1) end
G.ROOM.jiggle = G.ROOM.jiggle + 0.7
end
else
Which line is 1083?
its that if statement
in card_eval_status_text
I had that error once, I fixed it by patching that line to do to_big() on all the numbers.
There is probably a better way though.
can i have your patch?
i’ll credit you
Never mind, it seems I had that, but I removed it because I fixed it some other way, also that line seems to already has to_big for me.
What am I doing wrong here? Seems to be not working at all.
if G.jokers and G.jokers.cards then
for i = 2, #G.jokers do
if G.jokers.cards[i].config.center.key == 'j_willatro_silvermirror' then
local vampire = nil
if vampire and G.jokers.cards[i-1].config.center.key == 'j_vampire' then
vampire = G.jokers.cards[i-1]
end
if vampire and G.jokers.cards[i+1].config.center.key == 'j_vampire' then
vampire = G.jokers.cards[i+1]
end
SMODS.debuff_card(vampire, true, "j_willatro_silvermirror")
end
end
end
What is happening here
Why is i starting at 2? Also it should be #G.jokers.cards not #G.jokers
hmm
odd
i’ll just patch it myself then
if i figure it out some other way
then i’ll just do that
i starts at 2 because otherwise it could be substracting 1 from 1 in joker position, and there's no joker 0, if that makes sense.
Also, thanks!
Yes, you would break the loop if there is no G.jokers.cards[i-1]
is there way to read up on check for unlock without looking at balatro source code?
No.
There is also Peazip
What does the source in SMODS.debuff_card do? Can I use it to specifically debuff or un-debuff only from one particular source?
thanx btw
if i wanted to try and make an enhancement type also considered all suits would i specifically need to use quantum enhancements or is there a way besides having it also be considered a wild card
Yes.
Sweet
No.
not even unofficially?
Yes.
...do repeat .. until loops work for jokers, etc? never seen anybody use it but that's a pretty nice lua feature that i haven't utilized (and could)
I don't see why it wouldn't.
it'd make sense to, i just wasn't sure given i've never seen it utilized in a mod lol
No.
can i repurpose this tho? since it only plays 1 card
How could one increase all values on a card by 1?
hello everybody, new to modding and I'm looking for a way to make this joker set your money to 10 at the end of the round, I've looked through the game files a bunch and I'm assuming I'm going to have to manipulate the G.GAME.dollars variable but I'm not sure how to go about this? any help would be super appreciated, this is the code I have so far (based on the example jokers I'm learning from)
return (-G.GAME.dollars) + 10
Code?
how would i check if a card has any enhancement?
next(SMODS.get_enhancements(card))
You can't return an event.
wdym return an event
You have an Event in the return
how can i make it return multiple messages?
so do i remove the return part
nesting them should work?
No, you move the event out of the return.
return {message = "1", extra = {message = "2", extra = {message = "3"}}}
something like
return {
message = ...
delay = ...
extra = {
message = ...
delay = ...
extra = {
etc
}
}
ok
no promises on the timing of your text working out though 🤔
that's what t&e is for
anyways, how can i crash the game
without the screen that explains why
why would you possibly want that
reasons
I'm wondering if you have any actual good reasons lol
no
none of them are good
more so that I can give you a better approach to do what you want to do
this joker is designed to put the 'joke' in joker
as in, cryptid's crash card?
yea actually kinda
disclaimer that I don't think it's very funny, but love.event.quit() might work
very cool
how do i make the images for jokers with a different file than jokers.png
You make another atlas?
how
is there a way that i could make it say something before crashing? without the return, it crashes, with, it doesnt
Show the joker?
its a consumable
Yes.
Show the consumable?
Yes, show the code.
do you know how? (when you have the time, no rush)
alright
You would probably put the crash in an event in a func in the return.
is there doc for this?
No.
how do you detect a card that is stone enhanced?
func = function()
G.E_MANAGER:add_event(Event({
func = function()
love.event.quit()
return true
end
}))
end
```?
SMODS.has_enhancement(card, "m_stone")
thanks
thanks
card.ability.set
Yes.
okay great
how would i debuff duplicate jokers in a boss blind?
doesnt seem like boss blinds have config
??? any help??
Ah
bumping this
Second NES game's ram conditions fulfilled
how would i grab all of the suits currently loaded
The other game is Donkey Kong. The thing I had to finish was doing certain checks on the NES emulator's ram to determine win/loss states for the joker
Last game to do this for is Dragon's Lair, though I'm having some issues with getting the NTSC version to boot, so I'm seeing if I can just use the PAL version instead and mess with framerate and audio refresh rate so it plays decent
I've considered doing sprite editing for this!!! Donkey Kong I probably could easy, though the ability to do rom hacking is unfortunately dependent on what other tools people have made for things
One of the biggest issues with Dragon's Lair is that people haven't mapped out its RAM to any decent degree. For TMNT II, I found a half completed one full of errors and did some searching myself in a hex editor
So if I want to do sprite editing for TMNT and DL, I probably have to do some mapping myself to find out where sprite info is stored on the rom
it’d be super awesome but also hell
Is this not correct for adding wheel of fortune to info_queue for a voucher description? It doesn't seem to be working.
info_queue[#info_queue + 1] = G.P_CENTERS.m_wheel_of_fortune
It's c_
remind me what the correct nesting structure for dynatext string is? is it
DynaText({[...] string = { { string = 'A' }, { string = 'B' } } })```,
```lua
DynaText({[...] string = { { { string = 'A' } }, { { string = 'B' } } } })``` or
```lua
DynaText({[...] string = { { { string = 'A' }, { string = 'B' } } } })```
why does the one on the left not increase the boss blind size but the right one does decrease boss blind size?
Blind:disable() recalculates the chips of the blind based on its original config values. It's how The Wall and Violet Vessel reset their chip values when disabled
Now do an oot randomizer
but this also doesnt increase the boss blind (it may just not be triggering the actual doubling part)
...how would i go about replacing the rarity badge on a joker? 
i know that cryptid (and i think also cardsauce?) replace their own mod badges by looking for the colour
Sorry, we just causally have games in balatro now?
i solved it; my best worse idea now works as intended wait nevermind it's not disabling the blind now
what your joker code look like now
currently it's back to this
weird
so it'd just disable the blind as of now and skip over the multiplication of chips
is there a way for a consumable to affect the chips/mult given by level ups
kinda like turning cryptid's universum into a consumable ||universum is X2 chips and X2 mult on level up of a hand||
is there any reason this isnt working? It should be retriggering all other jokers
calculate = function(self, card, context)
if context.joker_main then
if context.retrigger then
return {
repetitions = 1,
card = retrigger_card
}
end
end
if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= self then
for _, joker in pairs(G.jokers.cards) do
if context.other_card ~= self then
if context.other_card.bptarget and context.other_card.bptarget ~= 0 then
return {
repetitions = 1,
card = joker
}
else
return {
repetitions = 1
}
end
else
return nil, true
end
end
end
end
basically except for changing the actual effectiveness of level ups
ig i should also ask if its possible to change the number of level ups a planet gives
ok wait can someone tell me why this works
can someone tell me how to save a joker’s own key to a table within the joker?
My joker gains a random amount of mult when playing a hand. Anybody have any idea why?
How do you make an enhancement trigger its bonuses when it stays in hand, similar to Steel Card
Waded through Balatro's source code for Steel Card and found nothing but configs and parameters instead of the actual functionality
what’s happening here
context.main_scoring and context.cardarea == G.hand?
which bonus
does h_chips work or no
That, somehow, increases the Emult value. Not the visible one, but the actual one. No, they are not the same. No, I haven't the slightest clue how they got seperated in the first place.
what’s your loc txt
Damn yeah this worked
I keep thinking that context.main_scoring is only for cards that you play and score
VRemade for the win lol
truth nuke
I'm trying to have a joker remove cards scored with a certain enhancement but no matter what i try it always gives me this error no matter where i put return = { remove = true }
and i know it's only the return crashing it and nothing else bc it works without it
i.....got nothing........
pretend i never said anything
That's okay. This pile of flaming garbage is the pinnacle of 2 weeks of constant rewrites. It's a miracle it does anything at all tbh.
Most recent try, still for naught
do we think this is a fair effect for an uncommon (i will take literally any suggestions as to how to nerf this, this is way too strong)
Make it a rare joker
yeah, disabling all boss blinds is incredibly strong. some mods even go out of their way to penalise boss blind disabling because of how strong it is conceptually.
you should also copy chicot's wording for that part of the ability, too
Isn't doubling all blind requirements just plasma deck
im considering adding a boss blind that just kinda does nothing unless you disable it
yes
speaking of rarity, bump
@tall wharf 
i very briefly saw one of my other jokers and i just see this on my screen for like half a second
...where... where is the code that applies the rarity badge to a joker...?
What happened here??? it was JUST working??? i havent touched this code in days
can we see line 38?
Oh it's UI, have fun with that
😭
-# it's been an hour of the same fucking error im growing annoyed of this shit
oh my fucking god this makes zero sense
this code worked just fine twenty minutes ago
something this code is identical to how it works in cryptid's oil lamp
and also, again it worked twenty minutes ago
i have not even opened this file in days
have you not touched anything in the code?
try restarting your computer and/or updating SMODS and Lovely, sometimes perfect code breaks for no reason at least in my experience
alright
chicken jockey
this is where the lua extension comes into play!
please read my latest messages
can you show me the entire code
oh i think i fixed it
i reinstalled smods (i already had the latest commit, but doing this fixed it anyways)
huh
first time seeing a syntax error from your mod fixed by reinstalling/updating smods
guess anything can happen at this poitn
cosmit bitflip /s
anyways, cryptid server is dead so
does anyone know how to banish a card?
You mean like Delete from Cryptid?
yeah, but the code for delete is so incredibly complicated i dont even know where to start with it
not the most simple thing ever
I think this is the main part:
Fixed it, idk why the draw_card caused that crash, but at least it's fixed
Hello modding devs , i hope you have an amazing day today
My pc is in a storage container rn so I cannot make my mod 😭
How many cookies should a cookie jar contain?
(asking this because 30 is a little too few)
50? maybe 100 if you’re really hungry (or if you’re vv)
oh fuck i think it worked???
wh
holy shit me when a consumable actually works first try
...i'm so lost. i've been rifling through vanilla code, but it seems to just... apply the localised rarity text to the badges table? there's nothing i can find about processing it into a badge anywhere
Yes, most badges get made by one thing in the G.UIDEF.card_h_popup function.
...so if i hook SMODS.Rarity:get_rarity_badge() i can alter the vanilla rarity badges?
Perhaps.
bump
nevermind, found it.
Yes.
cool, so i can actually design the consumable without worrying then
related note
Yes.
alr
how do you add a consumable category?
Can confirm, this is it
how do you detect a card being retriggered?
You would have to hook SMODS.calculate_repetitions I think.
Counting how many time it scores in context.individual and context.cardarea == G.play and then wipe it in context.after.
I would code context.other_card.retrigger_count = (context.other_card.retrigger_count or -1) + 1
Why would it start at -1?
how would i do that
and ill try this for the time being
So that it doesn't count the first time of scoring (which is not the result of retriggering).
Does anybody know how to spawn sprites on the screen? Where would I start if I want to:
- display sprites taken from an atlas
- use conditionals that will change those sprites' textures
- remove those sprites
- consider them a "card" in order to use animations such as
flip()andjuice_up()
so here's what I'm planning, a joker that gains certain mult or chips if there's not a single card getting retriggered by something
this seems like a pretty easy crash to fix, wondering what i did wrong here
Then I'd suggest if context.individual and context.cardarea == G.play then if context.other_card.scored then context.other_card.retriggered = true else context.other_card.scored = true end end if context.after then local no_retrigger = true for _,v in ipairs(context.scoring_hand) do v.scored = nil if v.retriggered then no_retrigger = false v.retriggered = nil end end if no_retrigger then [upgrade] end end
Or, alternatively, if context.individual and context.cardarea == G.play then context.other_card.scoring_count = (context.other_card.scoring_count or 0) + 1 end if context.after then local no_retrigger = true for _,v in ipairs(context.scoring_hand) do if (v.scoring_count or 0) > 1 then no_retrigger = false end v.scoring_count = nil end if no_retrigger then [upgrade] end end
im pretty sure ive followed documentation
thank you so much
question
why is consumeabletype key "anomalous", but in the consumable's set its "Anomalous"? 🤔
dw about that extra comma i already fixed it
also, you might want to check if it needs mod prefix too, i forgot if it needs that
hm let me think
about what you mean
ConsumableTypes don't use prefixes.
i see
if splinter_of_verity then
-- Limit rank pool to face cards and Aces (11-13)
local random_rank_index = math.random(11, 13)
local new_rank = SMODS.Rank.obj_buffer[random_rank_index]
else
-- Normal randomization
local random_rank_index = math.random(1, #SMODS.Rank.obj_buffer)
local new_rank = SMODS.Rank.obj_buffer[random_rank_index]
end
So I have made a card that randomizes its suit and rank every time you score it, and I have made a Joker that limits its pool of ranks to face cards and Aces
But how do I take into account into potential modded ranks? Is there even a way to detect face cards and Aces more modularly?
Firstly, use pseudorandom please, Secondly, rank.face and there will never be more than one Ace rank.
Is there documentation on pseudorandom somewhere
No.
If something is a vanilla function it is likely not documented.
it should be the same as math.random but with an arbitrary string
so instead of math.random(1, #SMODS.Rank.obj_buffer) it would be pseudorandom("string", 1, #SMODS.Rank.obj_buffer)
Can decks not use ability?
Yes, because they are decks, not cards.
Cheers
glad to help!
What's the difference between pseudorandom and pseudorandom_element?
i have no idea 😭
pseudorandom_element is for getting a random element from a table.
self.config
i just did this instead lmao
So is it places like this one that I should use pseudorandom_element?
Doesn't that make checking init == false useless?
does it?
Yes, because you are setting it to false then checking if it is false
well yeah
Yes.
its only supposed to happen on the very first call
first time its called its set to true
then never gets called again
that is intended
Then it will be set to false again.
Hmm don't think I'm doing it right, seems like it only returns numbers
I went from this
local selected_enhancement = void_enhancements[math.random(#void_enhancements)]
to this
local selected_enhancement = void_enhancements[pseudorandom_element(#void_enhancements, pseudoseed('void_enhancement'))]
local selected_enhancement = pseudorandom_element(void_enhancements, pseudoseed('void_enhancement'))
Oh damn
can context.other_joker be called upon doing something specific (ie, selling a card or starting blind) or does it only work after scoring?
(would also like an example if it is possible)
How would I go about using pseudorandom on a range of values, say like a number between 1 to 10
no as decks are not cards
ive figured it out
they have effect then effect.config which points to its config
i used a global variable instead
also wtf is this 😭
pseudorandom("seed", 1, 10)
dw i fixed it
why not just put that in apply lmao
Alright, thank you!
i realized the issue
because apply occurs at an extremely inconvenient time
and it does not work
just put it in an event then
i can try later
none of these are even printing the joker just does nothing oops. any suggestions? trying to convert played glass cards into base + polychrome
i have this code (without a proper conditional besides if the second joker exists in hand for testing) and it only seems to take effect after playing a hand. so i'm wondering if i can make this trigger elsewhere or if it's just after playing a hand
looking at the midas mask code, at for k, v in ipairs(context.scoring_hand) do what does k represent
Alright hang on I'm trying to get the hang of using pseudorandom more
Is this correct, from
local random_joker = G.jokers.cards[math.random(1, #G.jokers.cards)]
to
local random_joker = pseudorandom_element(G.jokers.cards, pseudoseed('arc_joker'))
Yes.
other joker really only exists for joker main as it is used for applying effects on other jokers
if you want an effect to depend on another joker use SMODS.find_card
Do I need to specify a "1"? Like this example: pseudorandom("string", 1, #SMODS.Rank.obj_buffer)
if context.whatever and next(SMODS.find_card("j_fucking"))
is it just like. the index of how many times its looped through the function
Yes.
k is the index
Gotcha
ok cool 🫡 wasnt sure
local random_joker = pseudorandom_element(G.jokers.cards, 1, pseudoseed('arc_joker'))
Seems about right
i dont think my operator calculations are entirely accurate
yeah that's what i do with my other jokers, only issue is that the code returns endlessly unless they have a proper conditional
and i also can't get it to detect whether a specific joker is sold, i tried destroy.card but that only seems to work for the played hand which is so lame
It would be the key if you're using pairs
i only got a few million on a flush using pentation
Sorry if I keep posting here, I need to really make sure that it's correct so I know what to change the hundreds of math.randoms in my code without agonizingly testing every single one of them
im not using anything atm im just trying to understand the midas mask code
(i feel like i've asked the "detect if a specific joker is sold/destroyed" question like 10 times and i haven't gotten a proper answer
)

Idk how to do it, but if youve extracted balatro.exe you can see the campire joker code, and transform it :P
I don't have access to it rn
Is it the joker itself?
yeah this, context.selling_card doesn't seem to work for specific jokers
no, another specific joker
For destroyed you need to make a new context.
ok there is something wrong here for sure, 85^^^^8 is definetely way larger than that
context.other_joker:get_id() == 'his joker'
i am so confused
siiiiiiiiiigggggggghhhh i said id do it awhile ago, send me the code you have bc it's more up to date and ill do it
get_id doesn't work for jokers.
without the context it just destroyed the played hand? so idk if it even works if you make a context for another joker
why does it create a lovelyignore?
I thought it worked like that lol
For sold it is context.selling_card and context.card.config.center.key == "j_modprefix_key"
No, you need to make a new context.
SMODS.destroy_cards(card) specifically @daring fern
it does not work with trying to call for a joker, it just destroys the played hand
You need to make a new context.
SMODS.destroys also doesn't exist.
fixed
i guess i'll try this again, but it didn't work the last 3 times i tried to add this context
Specifically by hooking Card:remove()
oh now it works???
ok sure whatever 
i'm assuming it's context.destroy_card if i want to call for the card being destroyed? (via ankh, hex or a similar effect)
No.
context.destroy_card is for destroying playing cards.
Are Aces always 13 when I use card:get_id(), regardless if there are modded ranks or not?
then i'd have to use SMODS.destroy_cards(card)?
i'm assuming by adding context and hooking Card:remove()
or for the ceremonial dagger effect, i'd have to call getting_sliced?
Yeah I still don't know how to fix this
No.
then how do i call context for a specific joker being destroyed 
would i add this to calculate or have it separate? (like the four fingers function)
i'm gonna assume i just add it to the calculate, let's try
local random_rank_index
if splinter_of_verity then
random_rank_index = math.random(11, 13)
else
random_rank_index = pseudorandom("dissected_rank", 1, #SMODS.Rank.obj_buffer)
end
I know it's using math.random right now but there's another problem
I'm a bit confused on how I'm gonna go about using rank.face to force my rank-changing enhancement to use faces only and also lump in a way to include Aces too
ok outside of calculate it is
SMODS.Ranks[key].face
am i reading this right
nil means nothing.
What should be in key's place or is it a constant
The key for the rank.
Oh the ids from get_id?
so what's being made nil in this function then
initial
i will assume i dont need to know what that is 🫡 thanks
im reading the rest of it correctly right
Oh no wait it's literally just the key of the rank and not the id
Yes.
But I still don't understand what to put in the key field of SMODS.Ranks[key].face because I can't really account for every single mod now and in the future that has custom face ranks
What if people made more than the usual 3 face cards?
this isn't doing anything what am i missing here? (just trying to make them lose the glass for now, will try do the polychrome once i've got the first part)
You would loop over SMODS.Ranks and check if v.face
Alright I'll take a look
typo'd cardarea gg
games crashing when i enter a blind 
[SMODS GRATLATRO "main.lua"]:352: bad argument #1 to 'ipairs' (table expected, got nil)
im sure its something very silly im just missing
When do you want to do the enhancing?
Add and context.before to the first check.
is there a way to retrigger the tutorial? I want to add a card that does that along with other multipliers, but with the tutorial not affecting gameplay.
Yes.
Im new to this, you wanna help me with the mod mayb?
I get that this is just a bit that you do when someone asks an open-ended yes-or-no question, but it's not super helpful
oh :/
ok when it goes to make the card polychrome it insteads overlaps a standard +4 mult joker sprite over the card and then it crashes?
Calling G.FUNCS.start_tutorial() should be enough
You can try it with DebugPlus by running eval G.FUNCS.start_tutorial() in the console
any programs you recommend for starters? Im new to this and am just clueless frfr.
Programs for code editing? Check out #⚙・modding-general message
thanks zawg
...
local new_rank_key = pseudorandom_element(face_ranks, pseudoseed('dissected_rank'))
local new_rank = SMODS.Ranks[new_rank_key]
print("New Rank Key: " .. new_rank_key)
else
local new_rank_index = pseudorandom_element(SMODS.Rank.obj_buffer, pseudoseed('dissected_rank'))
local new_rank = SMODS.Rank.obj_buffer[new_rank_index]
print("New Rank Index: " .. new_rank_index)
end
local new_rank_id = [something to get the ID of new_rank]
How do I fetch the ID from a rank key? card:get_id() doesn't really work because there are no references to cards here
SMODS.Ranks[key].id
Unfortunately got an error
I did this: local new_rank_id = SMODS.Rank[new_rank].id, but it seemed like it couldn't capture the rank keys? It just did in the print messages I added before, but not in here?
SMODS.Ranks
Oooooh
Still nothing, maybe I need to do tostring to add quotation marks to the key?
Yeah nah still doesn't work, even with or without tostring
With tostring: local new_rank_id = SMODS.Ranks[tostring(new_rank)].id
Without: local new_rank_id = SMODS.Ranks[new_rank].id
What is new_rank here?
local random_rank_index
if splinter_of_verity then
local face_ranks = {}
for k, v in pairs(SMODS.Ranks) do
if v.face or k == "Ace" then
table.insert(face_ranks, k)
end
end
local new_rank_key = pseudorandom_element(face_ranks, pseudoseed('dissected_rank'))
local new_rank = SMODS.Ranks[new_rank_key]
print("New Rank Key: " .. new_rank_key)
else
local new_rank_index = pseudorandom_element(SMODS.Rank.obj_buffer, pseudoseed('dissected_rank'))
local new_rank = SMODS.Rank.obj_buffer[new_rank_index]
print("New Rank Index: " .. new_rank_index)
end
new_rank is the rank key, and there are two cases, one for if the "Splinter of Verity" joker is present and one without
You can see the results in these images
"New Rank Index" is when it doesn't have Splinter of Verity, "New Rank Key" is when it does
Misleading print logs, I know, but they're still both keys
how would i make info queue include info for polychrome too? new to using info queue
is there like dev tools?
like something like guarantee a joker in shop or something
i use the debugplus mod i think it's called
can u send a link to it
alrighty
Its the best tool for making mods
Lets you spawn jokers
Add money
Add joker slots
Change seal / edition / etc
You name it
[hold tab for information]
what the hell is that editor man
Code blocks
ah yes c++ days still haunts me
Same
chat remember to use neovim to edit your code
anddd it crashed
If you’re gonna mod you have to get used to it
It will crash
A lot
99% of the time if you’re me
@daring fern Never mind, I managed to fix it
if context.cardarea == G.play and context.main_scoring then
local original_rank_id = card:get_id()
local random_suit_index = pseudorandom_element(SMODS.Suit.obj_buffer, pseudoseed('dissected_suit'))
local new_suit = SMODS.Suit.obj_buffer[random_suit_index]
local new_rank_key
if splinter_of_verity then
local face_ranks = {}
for k, v in pairs(SMODS.Ranks) do
if v.face or k == "Ace" then
table.insert(face_ranks, k)
end
end
new_rank_key = pseudorandom_element(face_ranks, pseudoseed('dissected_rank'))
else
local new_rank = pseudorandom_element(SMODS.Rank.obj_buffer, pseudoseed('dissected_rank'))
new_rank_key = tostring(new_rank)
end
local new_rank_id = SMODS.Ranks[new_rank_key].id
card:flip()
SMODS.change_base(card, new_suit, new_rank_key)
Check your debug plus
i mean i just put the debug in the mods folder and it exploded
bro you can't tell me how much i hate lua's loose typing
it was
Does Info_queue work on cards and can i have multiple?
I’m the #1 lua return statement hater
you see i don't use return
im based like that
Technically it works on enhanced cards
I wish i was you
So how do i set it?
well you should read my bio to know why i don't use return
the language
thinking of making a simple balatro mod w/ rust but maybe ffi may incurs a lot of performance penalty
I believe you got this
would be quite silly
Reading the crash explains the crash (sometimes, but in this case definitely)
You call a compiled Rust library with the C bindings that Lua provides
Reading the boss blind explains the boss blind
You may be addicted to Rust - recommend seeking professional medical help
Thats pretty cool
when using SMODS.add_card how do you prevent it adding a consumable while at max consumable slots used?
luajit has c ffi
😭
“Youre code here” ```
thanks
how can i create a custom rule for a challenge?
oh well im thinking of making yet another balatro mod based on a gacha game
Which gacha game
(iykyk)
yeah, but, how do i create a functional one?
We already have a hsr one
the one my pfp comes from
i pretty much only play only one gacha game now
nah, arknights
Reading the wiki explains the wiki
I used to play wuwa ,
Interesting
concept edition:
- oirginium card: x1.5 mult, destroyed after 3 turns, when destroyed, spread effect to nearby cards
Adjacent cards ?
That’s a really interesting concept
yeah, works on both played hand and uh, not-played card
I never thought about this before
So the effect triggers in hand or played
this is pretty much how oripathy works, also if you are interested this game also has 3 anime seasons
3 ?
im thinking of played,
i mean the 3rd season will premiere in 4th july or something
It sound like better steel cards
it's ok me too
Can you tell me the story of the anime ?
Also this isn't an opinion that you asked for, but I think normalising distributing compiled libraries within Balatro mods would be a bad move for the community. It's much harder to audit and verify compiled code, and it makes it nearly impossible for other modders to learn from your mod without making the snowball a little bigger in the process.
I might watch it
it's pretty muc the story of the game itself, the anime currently covers act 0 and act 1
Arknights was mentioned
thx
(too bad im shit at drawing)
arknights is mentioned
arknights has less sleeper agents than LC
Yeah and whats the story of the game😭
oh cmon
*more
you will uh follow the story of the creator of the worst disease on a planet and his journey to cure it and his wacky companions, against his yandere omnipotent exwife
@subtle merlin did i described it accurately 😭
Idfk I don't play for the story
70% of the game thrown out of the window
I only know the lore of chapter 0, 1, and 14
Just put the fries in the bag
how do you make legendary joker portraits
anyway here's some of my jokers idea:
- Amiya [Rare]: gains 0.1x mult for each destroyed originium cards
- DWDB-221E [Uncommon]:
creates originium
first the background, then the joker dude
you can look at the example ig
Summarized lore:
Prelude: You're a doctor!
0: Oooo, bad guys!
1: More bad guys!
2: Drone strikes
3: Drone strikes and GRASS!!
4-7: irrelevant
8: welcome to Hoth!
9-13: idk
14: S T A R E I N T O T H E F A C E O F G O D
I want to make an Arknights balala mod but I'm already working on D2 balala mod n I don't want to do too much
pos = { x = 0, y = 1 },
-- soul_pos sets the soul sprite, only used in vanilla for legendary jokers and Hologram.
soul_pos = { x = 4, y = 1 },
I want to make an Arknights balala mod but Im terrible at arts
Ep 15 is the real shit bro
ok now what about adding them?
several people are typing
just add the joker like normal in smods
1 limbillion
i mean the custom background and joker art
has someone made a fate one yet
There's 15 now? How much did I miss after gay wolf alter?
in the assets/
a lot, ep15 kaltsit is now kaltwas, priestess officially revived and is the new antagonist, mon3tr is now anime girl
I need to stop going from Arknights to CRK to Arknights bc I miss a lot of lore stuff
Is Wis still broken?
yes, she still is, and yes, i have wis
IS6 is set in Yan btw
why is the description not showing up?
name = "Jimbo",
text = {
{
"test",
}
},
}
},
}, ```
Nonononononononono FUCK I HATE IT THERE
loc_txt
what does that mean
localized text
is that like another file i need to change?
It's where you put your name and text to get it to appear
No, look at the wiki and it should be easily visible
okok
Balark
Still trying to clear the annihilation mission there
Balarktro
sis, im level 120 ingame, i nuked every stage with logoat and ines
and wis
{C:flex}god{}
Ines this, Ines that she can't be that good
she is that good
how do i make this read the chances of it happening?
it should read 1 in 4 and the 1 in 4 is working fine i just dont know how to get it to read
just 1 in 6 or something
I don't want to have to build another E2 90 character my last one took a solid week -_-
it needs to go up when you have oops all 6s though right?
loc_txt = {
name = 'Gros Michel 2',
text = {
"{C:mult}+#1#{} Mult",
"{C:green}#2# in #3#{} chance this",
"card is destroyed",
"at end of round"
}
},
ah thanks
i ran out of lmd
-# I'm still out here saying Siege is good like it's the fucking 3rd anniversary or smth x3
hsr, ba, genshin (wish), r1999, lc (gifts from paperback)
That's only 5
I also plan some decks for arknights countries
5 is so many
or vouchers?
im still confused on how to add descriptions
N O T E N O U G H
but it isnt in the en-us
maam your ears are big as hell
WOW I missed a lot
sigh I'm going to spend the next 2 and 1/2 months playing it constantly before burning myself out, aren't I?
this channel is becoming modding chat 2 with all this offtopic discussion
Yea, sorry
Elaborate?
i've managed to hook card.remove() but i've hit a bit of a snag
how would i make it detect that only a specific card/joker gets destroyed? the way it seems to work right now is that it triggers the upgrade when any joker is destroyed which is not what i want
if i try to add context.card.config.center.key to the calculate call or the card.remove() hook it crashes because either context is a nil value, or card is a nil value
i mean we have uh, lappland alter
I tried to get her, failed, just like wis
loc_txt isnt used in en-us atleast in the sample mod i used
i tried using SMODS.find_card but that makes it seem like the effect only works when the joker is present, which means the effect also triggers if the joker is present and a random unrelated joker is destroyed
adding context.card (or anything similar like other_card) to make context.card.config.center.key not crash just seems to break the function altogether
why is this on balatro modding 😭
please try looking at VRemade, Paperback, More Fluff, just any mod that adds jokers, go to their joker.lua and every single one should have an example of loc_txt
Nope, nope, nope, nope, nope, nope
We get a lil sidetracked :3c
I thought it was all managed in en-us but now i know where to look thanks
how could i change the gamespeed after entering a boss blind?
is there a template anywhere for a blueprint joker? i tried just copying over the stuff from vanilla but i don't really understand it too well
Vanilla Remade:


