#💻・modding-dev
1 messages · Page 254 of 1
no
it never changes so i dont need to do calculate stuff
how do i give myself a bunch of money with debugplus?
it's telling you you forgot to close a bracket
are you using an code editor or just notepad
Notepad...
tab and press the money button
get vscode!!!!
oh…..
silly guy been handicapping themselves
i recommend getting a code editor to highlight the syntax errors and format your code
is anything im doing here bad practice
guess i'm getting vscode...
strange, all my mods are updated, still an error
i get this error if i play a hand with this enhancement
the most surefire way to make sure steamodded is updated is to clone the repository in my experience
like properly updated
Send me your whole file, and I'll try to fix it
cause you're making it worse lol
send me your file and I'll make it worse
SMODS.Joker {
key = 'doise',
loc_txt = {
name = 'The Doise',
text = {
"Gives {C:mult}+#2# Mult{} when",
"even rank cards are scored.",
"All odd rank cards are debuffed.",
"{C:inactive}The Doise is currently{} {C:chips}alive{}{C:inactive}!{}",
"{C:mult, s:0.8}Swaps to being dead on end of round"
}
},
config = { extra = { chips = 0, mult = 35, dead = 0, pos_override = { x = 2, y = 0 }, soul_pos_override = { x = 2, y = 1 } } },
loc_vars = function(self, info_queue, card)
return{
vars = {
card.ability.extra.mult
}
}
end,
if card.ability.extra.dead == 0 then
return {"alive"}
else
return {"dead"}
end
end,
rarity = 4,
atlas = 'atlasjokerlegendary',
pos = { x = 2, y = 0 },
soul_pos = { x = 2, y = 1 },
cost = 20,
calculate = function(self, card, context)
if context.joker_main then
end
end
}
is there a way to force a joker to spawn in the shop via debug plus?
you can have a Joker summon into your inventory, but i dont think you can add one to the shop
no thats correct
why are you Red
ohh that whole if is wrong, that's another problem
return{
vars = {
card.ability.extra.mult,
card.ability.extra.dead == 0 and "alive" or "dead"
}
}
end,```
this would work i think?
key = 'doise',
loc_txt = {
name = 'The Doise',
text = {
"Gives {C:mult}+#1# Mult{} when",
"even rank cards are scored.",
"All odd rank cards are debuffed.",
"{C:inactive}The Doise is currently{} {C:chips}#2#{}{C:inactive}!{}",
"{C:mult, s:0.8}Swaps to being dead on end of round"
}
},
config = { extra = { chips = 0, mult = 35, dead = 0, pos_override = { x = 2, y = 0 }, soul_pos_override = { x = 2, y = 1 } } },
loc_vars = function(self, info_queue, card)
local status = card.ability.extra.dead == 0 and "alive" or "dead"
return{
vars = {
card.ability.extra.mult,
status
}
}
end,
rarity = 4,
atlas = 'atlasjokerlegendary',
pos = { x = 2, y = 0 },
soul_pos = { x = 2, y = 1 },
cost = 20,
calculate = function(self, card, context)
if context.joker_main then
end
end
}``` Try this
i had 3 of those errors like 10 mins ago dw
for you @sullen fern
i think that works
thank you
i was putting a closing bracket at the end thinking it was closing the whole joker section
Nope! it was just closing loc_txt
no more errors! lets go
Make sure you change your text in loc_txt to what I sent, it's very important
in fact it crashes cryptid?!
oh yeah, uh
Yeah make my changes and it should be good
+alive
anyone know?
i just wanna swap the enhancements on two cards
not sure if this is even a good way of doing it
decided to set "alive!" to #2# since that's the alive or dead var
yes
Yeah, that's what I sent lol
it did not help i was listening to clair de lune while this was happening
it was just further highlighting my shame
this whole chat is just PAIN
all the time
for all devs
GOD I JUST WANNA SWAP TWO DAMN ENHANCEMENTS IS THAT SO MUCH TO ASK
PELASE
usually it doesnt seem that bad but recently it definitely seems like it lmfao
Give me a minute to analyze it and I'll try to get a solution to you
LOOK AT THIS. THIS IS THE RESULT OF 3 LINES OF CODE WHY
ITS NOT EVEN MY MOD
should be fixed now....
and have odd rank cards be debuffed.
helped, thanks
so how do i make the joker give mult only on even rank cards
man what the fuck
I'm curious, would it be ok/chill/acceptable to make a thread in #1209506514763522108 for a mod I want to make and concepts for it, even if I don't really know how to do things yet? I have a lot ideas and I think having a page and a name behind my ideas might let me think better lol, or something like that, idk
thanks, also without any other mods it doesnt crash but also doesnt swap the enhancements
so clearly im doing something wrong anyways
pseudocode:
if rank_id % 2 == 0 gets even numbers
yes its fine
okey :3
I'll keep that in mind hehe, I'll be in there at some point then
okay, that's good to know
at this point i just want to send the lua file to see if anybody can figure out what the game is whining about
go ahead
the end.
here
go figure out what i've done wrong to upset john modding balatro
dear god why is it not indented
discord may have fucked it up idk
it did
yea welcome to discord file uploading
this isn't gonna work because it's expecting xmult and not regular mult
except whenever I click on it it switches between upside-down and normal 💀
however, I know how to implement the hook I need, so I just need to find the right function to patch and I'm golden
now ill steal it
dear god it worked
I mean I'm more than willing to share how I did it, because I'm sure more poeple are going to have this question in the future
can you send your whole file please
yes
however, my implementation is still incomplete
no worries people will just scour your git whenever things release
my shit isnt perfect but the important thing is that it functions
is this actually how scoring mult works
the beauty of open-source: usually, someone else has encountered your issue before and solved it
except when they haven't
curse of half of my life
like this?
yea that should just work
i can see them
..well, the undiscovered sprite at least
there we go, dosie gives mult.
but it's for all cards
so i need to implement the card debuffing
slight problem (this is in my mod's additions menu):
Yeah I'd Like To See Them.
hit unlock all on a new profile
Okay i have a question: how do i make an unlock condition?
I have a global function I wanna use called "tw_check" and it's currently set to 0.
I want to make it so that if tw_check = 1 that the conditions are met and unlocks stuff.
i need it to be per card
what the
your atlas pos isnt correct
damn it!
remember that the very top left is considered 0,0
at least one of the things here isn't a lie. it sure does give +35 mult
my stupid ass had it on x = 3 when it was supposed to be x = 2
now i gotta check if they work
gotta get debug plus hang on.......
i need it to specifically score for every even card
which is what this is for
if it debuffs odd cards can’t it just give mult for all cards
because odd ones are debuffed
hm, you're right
so they won’t count anyways
i just need to do it for all cards, then debuff the odd ones
You can do something like:
-- I don't remember the actual function to get the id
if context.other_card:get_id() % 2 == 0 then
return {
mult = card.ability.extra.mult
}
end
end
That will at least score the even ones with mult
would modulo 1 equal odd numbers?
ah
just do %2 != 0 to get odd
so 2 / 2 is 0 with no remainder
yeah, i keep forgetting that lol
it’s 1 i mean
don't blame you
i do this too
i have to code backend in js
so i need to debuff odd rank cards now
okay pillar john's +1 ante does work
debuff cards where id modulo 2 is equal to 1
if context.other_card:get_id() % 2 == 1 then
@open aspen Can you try this
context.scoring_hand[index + 1]:set_ability(next(SMODS.get_enhancements(context.scoring_hand[index])));
card:set_ability(enhanceSave);
No, it would be if context.other_card:get_id() % 2 ~= 0 then to get odd numbers
okay
although actually n % 2 == 1 does the same thing now that I think about it
is this my code with no extra arguments?
cause it formats weird somehow
yeah but thats not calculate
so even if it should achieve the same thing, its not what im ultimately looking dor
for*
I now have it only flipping modded sprites upside down lmao
okay something is wrong with the code of mathlete
it doesn't give +25 chips until you have 3 aces
what the fuck is going on
yea admittedly i hoped when blind calc dropped doc would drop with it
yeah, i only changed the stuff inside the if (index + 1) statement. My formatter probably formatted it
alas, here we are
same
okieee
:3
now to add the debuffing
why is my mod cursed with Always Going Wrong
if not docs at least i hoped the examples would be populated lmfao
mhm
something is terribly wrong
which should be easy
this is the error log
yea cause nobody knows how to use it much lmfao
somebody look at the lua again what happened
why does mathlete do this
i honestly have no idea wtf happened
-- Ensure the blind resets every new round
press_play = function(self)
self.won_blind = false -- Reset flag when the player starts a new round
end,
calculate = function(self, context)
-- Ensure the blind only activates once per round
if G.GAME.chips > 0 and not self.won_blind then
self.won_blind = true -- Set flag immediately to prevent multiple triggers
if G.GAME.blind and G.GAME.blind.chips then
local missing_chips = G.GAME.blind.chips - G.GAME.chips
if missing_chips > 0 then
G.GAME.chips = G.GAME.chips + missing_chips -- Add only missing chips
end
end
-- Force an immediate state change and round end
G.STATE = G.STATES.HAND_PLAYED
G.STATE_COMPLETE = true
end
end
}```
i did this for a guy earlier, but its not like its super complex
for a blind he wanted
...oh, so it interferes with G.GAME.chips directly?
mm
so i just made it do what debug does and set the blind score
how does debuffing work in terms of jokers
then do complete
i mean, i guess that works too, but visually speaking, i dont think its nice
my reverse tarots are now upside down, except when I click on them so I'm nearly there
brother look at ur code and talk to me about nice
and probably not the best solution either 💔
lmfao
hey, my code is shit but my jokers look nice
I pray one more hook is all it takes
:(
i think 'best solution' and 'looking nice' are last place vs functionality
so thats just what i aim for
are there any jokers that debuff cards
what about the "X1.5" message though
or can i like
look at a blind that does it
crimson heart
I've learned that "if it works, it works" is the biggest hurdle to learn when coding
anyone know why this is happening
once you do, coding becomes SO much easier
thats what ive done for the last like 10 years
at this point
i think as long as your shit is readable and works youre fine
i think i just need someone knowledgeable to look at my code and my error
cause i cannot figure this out at all after spending half the day
it's probably why Undertale has such a good story
Toby only put enough time into coding to make sure that everything would work for a casual playthrough
JUST enough for casuals
(which also makes the game obscenely broken for speedrunning, at least on 1.001 lol)
card:set_debuff(true)?
time to lock even further in to find the function related to clicking and dragging cards
i think that's how it works
IS that how it works?
Try this?
context.scoring_hand[index + 1]:set_ability(next(SMODS.get_enhancements(context.scoring_hand[index])));
context.scoring_hand[index]:set_ability(enhanceSave);
i'm a bit lost in the sauce, if you will
i will tomorrow I gotta go to sleep
i hope that works but at the same time it looks like cards with no enhancements return an empty table
it returns "c_base" from my testing
get enhancements?
yeah
alrighty I will try it tmrw then ty for all the help
I have a feeling what I'm looking for is in moveable.lua
i completely agree with this gentleman's statement
not biased at all
:3
still waiting for an answer for this btw
try it and see
i guess it really is dead now
context.other_card is what you want
anyone have tips on how to start modding for balatro?
context.other_card:set_debuff(true)
what if i want to do this method but write {X:mult,C:white} kind of text? how would i do that with this setup?
got an answer in #1349064230825103441 message
everything's outta wack
it only debuffs odd cards when a card is played
which is not what i want
it's counting cards in the hand and unscored ones as well
oh, you need to specify if context.individual and context.cardarea == G.play
still only debuffing when played
what is the intended effect, btw?
odd cards are debuffed the entire time this joker is in your possession?
yeah
actually its intended to swap the ranks it debuffs each round but i haven't implimented that yet
feels a bit weak imo
Ok, I think you need to loop through G.playing_cards in the add_to_deck function and debuff all the odd cards, then remove the debuffs in the remove_from_deck function. And then debuff newly added playing cards if they are odd in that specific function (I don't remember the name)
oh yeah it does chips instead of mult when it's dead also
ok, let me cook something up for you. Give me like ~10 minutes
can you send your whole Joker file
I discovered another isue with my methodology...
the buttons are on the wrong side (and upside down)
i love rotating
π/2
degrees
π radians
trying to figure out how to rotate only the sprite and not anything else attached to it
I think that's VT I don't know actually
Because with my reverse tarots, I'm trying to make it so that it will use the current normal tarot sprites, and flip them upside down, instead of using my custom sprite sheet
that way it will look nice if other people have modded tarot card sprites
currently, this is the entire code I have for flipping the card
function CardArea:align_cards()
align_hook(self)
if self then
if #self.cards > 0 then
for k, card in ipairs(self.cards) do
if card.config.center.mod then
if card.config.center.mod.id == "reverse_tarot" and card.config.center.set == "Tarot" then
card.T.r = card.T.r + math.pi
end
end
end
end
end
end```
like card.VT
I'll try that instead of T
less than 2 degrees 🥳
idk if that even works
1.57
I would have to learn how to write a shader
This is True
it feels like there should be a straightforward way to do this
I currently have two issues: the buttons rotate with the card, and it gets wonky when I try to drag it
key = "doise",
loc_txt = {
name = 'The Doise',
text = {
"Gives {C:mult}+#1# Mult{} when",
"even rank cards are scored.",
"All odd rank cards are debuffed.",
"{C:inactive}The Doise is currently{} {C:chips}#2#{}{C:inactive}!{}",
"{C:mult, s:0.8}Swaps to being dead on end of round"
}
},
config = {
extra = {
chips = 0,
mult = 35,
dead = false,
pos_override = { x = 2, y = 0 },
soul_pos_override = { x = 2, y = 1 }
}
},
rarity = 4,
atlas = 'atlasjokerlegendary',
pos = { x = 2, y = 0 },
soul_pos = { x = 2, y = 1 },
cost = 20,
loc_vars = function(self, info_queue, card)
local status = card.ability.extra.dead and "dead" or "alive"
return {
vars = {
card.ability.extra.mult,
status
}
}
end,
add_to_deck = function(self, card, from_debuff)
for k, v in pairs(G.playing_cards) do
if v:get_id() % 2 == 1 then
v:set_debuff(true)
end
end
end,
remove_from_deck = function(self, card, from_debuff)
for k, v in pairs(G.playing_cards) do
if v:get_id() % 2 == 1 then
v:set_debuff(false)
end
end
end,
calculate = function(self, card, context)
if not context.blueprint and context.playing_card_added then
for k, v in pairs(context.cards) do
if v:get_id() % 2 == 1 then
v:set_debuff(true)
end
end
end
if context.individual and context.cardarea == G.play then
if card.ability.extra.dead then
if context.other_card:get_id() % 2 == 0 then
return {
mult = card.ability.extra.mult
}
end
end
end
end
}```
Can you try this?
replace if card.ability.extra.dead to if not card.ability.extra.dead in the even number check, I messed that up I think
okay
OH NO
yup. its peak.
absolute cinema
like this?
I think so. It's hard to tell with the screenshot. Run it and see how it goes
uh, they’re not being debuffed.
this might be what I'm looking for?
i think i did something wrong
when you add the joker to your slots, it doesn't debuff the odd cards?
hmm. Sorry, that's all I've got right now, it's getting late
for k, v in pairs(G.playing_cards) do
if v:get_id() % 2 == 1 then
v:set_debuff(true)
end
end
end,
remove_from_deck = function(self, card, from_debuff)
for k, v in pairs(G.playing_cards) do
if v:get_id() % 2 == 1 then
v:set_debuff(false)
end
end
end,
calculate = function(self, card, context)
if not context.blueprint and context.playing_card_added then
for k, v in pairs(context.cards) do
if v:get_id() % 2 == 1 then
v:set_debuff(true)
end
end
end
if context.individual and context.cardarea == G.play then
if not card.ability.extra.dead then
if context.other_card:get_id() % 2 == 0 then
return {
mult = card.ability.extra.mult
}
end
end
end
end```
just gonna post this snippet here in case anyone wants to troubleshoot
is there a reason a blue seal wouldnt want to spawn a custom planet card?
i seem to just be being told center is a nil value but i haevnt a clue on how to fix that aspect
:3 im gonna try printing out all the keys of context again
and see what im working with
going to bed now, but I made a logo for my mod concept hehe :3
gonna @ myself so I remember to come back in da morning and post some stuffs hehe @analog spoke
so far I have a couple ideas, specifically, my main thing I'm starting with concept wise is Primordial jokers, a new rarity of joker that are found in a bit of an... interesting way, hehe
does your planet card actually have a hand type associated with it
it sure does, it works entirely unless a blue seal is applied trying to generate it
could you send your code and the crash
SMODS.Consumable {
object_type = "Consumable",
set = "Planet",
name = "Stoner Ascendant",
key = "stoner_planet",
pos = { x = 7, y = 2 },
config = { hand_type = "stoner" },
cost = 3,
aurinko = true,
softlock = true,
atlas = "tarots",
order = 11,
can_use = function(self, card)
return true
end,
loc_txt = {
name = "Stoner Ascendant",
text = {
"Level {C:attention}#1#{}",
"Levels up the Stoner hand",
"{C:red}+#2#{} Mult and",
"{C:blue}+#3#{} Chips"
}
},
loc_vars = function(self, info_queue, center)
local hand_name = "dilatro_stoner"
local hand = G.GAME.hands[hand_name]
local level = hand and hand.level or 1
local mult = hand and hand.l_mult or 1
local chips = hand and hand.l_chips or 50
return { vars = { level, mult, chips } }
end,
use = function(self, card, area, copier)
-- Debug: Print the center of the card
if card and card.config and card.config.center then
print("Stoner Ascendant Center:", card.config.center)
else
print("Stoner Ascendant has no center assigned!")
end
print("Listing all registered hands in G.GAME.hands:")
for hand_key, hand_data in pairs(G.GAME.hands) do
print("Found hand:", hand_key)
end
local hand_name = "dilatro_stoner" -- Explicitly use the correct name
if G.GAME.hands[hand_name] then
update_hand_text({ sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3 },
{
handname = localize(hand_name, 'poker_hands'),
chips = G.GAME.hands[hand_name].chips,
mult = G.GAME.hands[hand_name].mult,
level = G.GAME.hands[hand_name].level
}
)
level_up_hand(card, hand_name)
update_hand_text({ sound = 'button', volume = 0.7, pitch = 1.1, delay = 0.6 },
{
handname = localize(hand_name, 'poker_hands'),
chips = G.GAME.hands[hand_name].chips,
mult = G.GAME.hands[hand_name].mult,
level = G.GAME.hands[hand_name].level
}
)
update_hand_text({ sound = 'button', volume = 0.5, pitch = 1.0, delay = 1.5 },
{ mult = 0, chips = 0, handname = '', level = '' }
)
else
print("Stoner hand NOT found in G.GAME.hands!")
end
end,
in_pool = function(self)
local hand_name = "dilatro_stoner"
return G.GAME.hands[hand_name] and G.GAME.hands[hand_name].visible
end,
keep_on_use = function(self, card)
return false
end
}
i meant the code for the consumable
oh,m apologies
but did you start a new run
ah i see, let me fix that and take a gander
As for the use function, you might not need one at all
no? i thought consumeables required it
I'm pretty sure if it has a hand_type in config it will default to the use function of vanilla planets
so try removing it entirely
did it help with the blue seal issue
hey im like half asleep, why is this not calling for the number on the joker's table?
-w-
yea adding prefix was the answer, thank you very much
i must just be fuckin tired and thats why i didnt see it
i stared at it several times and ws like 'yea, thats it'
all of my other consumables even have the prefix idk how i didnt see it
h
Ok, now I simply need to figure out how to set my reverse tarot sprites to the normal tarot sprites
wait can't you call ability extra numbers in messages?
The #1# stuff is exclusively for loc vars, aka the text shown when hovering over your card
how do i do good balatro-like pixel art? because this is genuinely terrible and should burn.
is there a guide out there somewhere?

bro I wish I knew
oh word, how would i get it in a message then?
Google, Youtube, and practice
what exactly do you want the message to show
my strat has been using a friend, i find it effective
real
i actually have to try to learn? 
the number referred to in the extras table
thas it really
yop
hey we both have suited up fellas
message = "+" .. card.ability.extra.something
gotcha, thanks :3
well my suited up fella is pretty eh
mine isnt too fantastic either but he works
modpack where every mod must have 1 suited up fella that gives money
this however, my goat
hey quick question, is there something im missing here in applying pseudorandom to sound? or is that just not able to be done
prob not how it works but i could use some help c:
pseudorandom_element({'sound1', 'sound2', 'sound3'}, pseudoseed('whatever_you_want'))
how to destroy the jokers properly?
ohh, so just no square brackets just the round and the pointy one
Out of curiosity, is he 33 years old and living in northwestern Morioh (where the villas are?)
Ah shit
I gotta change his ass now
Lmfao
paws at u haiii~ :3
is it possible to make a message appear on command rather than when returning?
I have a message I want to occur with a deliberate offset before the mult is applied
i was scrolling through all my mentions and uh
yeah kind of actually!
its very limited but like its A method of doing it
how do i check if the player loses the run
i want to write a thing so that it plays a random sound whenever the player lose
hmmm,,,
try looking into the code for mr bones?
though i guess that type of implementation would require like
a joker to exist
for that effect
Hello! I'm new in mod making in Balatro and I want to get started on making them. What IDE do you guys recommend in learning lua?
oooh
personally i used visual studio code!
the file directory stuff helped me when i was diving through balatro's code and its relatively easy to use
uhhhh, how to fix this
Alright then I'll try researching on VScode, thanks!
found it! okay
you want to patch into the game.lua file and look at function Game:update_game_over(dt)
thanks doc
no prob
Preferably VSCodium if you can
it's an open Source alternative of it
wait how do you do it Again
sorry im new to this whole thing
oh, no worries!
uhh
so what you want to do i assume is play a sound effect when the game ends, right?
like,,, a "you died" sfx similar to dark souls or something
exactly
okay! so,,, this implementation requires looking into lovely patching
i figured
dont worry, you can run me through this
you can look into how lovely patching works here
ack
wait
how about this?
oh?
oh, no thats, a steamodded toml file dedicated to helping the soundengine i believe?
yeahhh
,,,but, uh!!
its, hard to explain lovely patching like this sorry 😭
its like:
[manifest]
version = "1.0.0"
priority = 0
# these just say that 'hey, this is a lovely file'
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = "self.SPEEDFACTOR = 1"
position = "after"
payload = '''
initSteamodded()
print('{{lovely:var_name}}')
'''
match_indent = true
times = 1
# this is the code that you want to use to modify game files!
# target is the file you want to edit, so for your case, "game.lua"
# pattern is what line of code in the file you want to look for
# position is where you want to inject your own code. after is the line after, before is the line before, and at replaces the line in pattern
# payload is the code that you want to edit!
# match_indent is for cleanliness only i believe
# and times is how many times you want this to happen, if it happens multiple times!
sjdhjsdh if you ahve any more questions feel free to like, ask
imma make this as an example too
do i name it lovely.toml?
how would i access the current game profile?
wdym?
i see
so i set the target to game
and then
whats the pattern
like G.PROFILES, how would i access the current game profile
the one you're playing in
need to check some game stats
damn
do you want me to just give it to you what i think you should use, or do you want to try and figure it out yourself?
oh its G.SETTINGS.profile
oh rad
you can give me that
and ill try to tweak it by myself
okay cool
you want to set the pattern to '''play_sound('negative', 0.5, 0.7)''' and the position to either before or after
because that pattern's in the middle of the function for when the game ends
so
i need it to detect game over
and then it will play out of 3 or 4 sounds i have saved
oh uh
this detect game over part is actually already handled by the patch!
the location where you're patching to in the code is in the middle of the game over function
the 3 or 4 sounds thing is all up to you
to figure out how sound playing and stuff works in the api
check out this one
so play_sound(blabla,bla,bla) ?
also i already have a main.lua doing this in my mod folder
yea
what band-aid if statement would fix this
ig i can just remove the juice up
¯_(ツ)_/¯
Replace context.other_joker with G.jokers.cards[i+1]
girlsmell
wrong chat helena
nop
@hybrid iris ?
is evaluate_poker_hand still used in smods? i've been trying to patch into it but none of my changes seem to affect anything
well remove the initSteamodded part up until the second '''
but yeah!
i can't find a replacement smods function though
(and, i can't get lovely to patch into smods...)
target = '''=[SMODS _ "src/utils.lua"]'''
this syntax should work from what i've seen but it doesn't
fire
i see
so now
i just need to make a sound file with that name
yea
i name them all youdied.wav?
shrug
i can only help you with the patching part
the actual code, im sure you can figure out yourself
fair enough
plus i dont know
OH WAIT
i think people should
be able to understand basic computer functions
we're not as perfect as you
literally few months or weeks ago, theres this guy on #⚙・modding-general that cant even make a new folder
let alone extracting
i prefer to keep it hands off to give them a chance to learn and figure things out
to be fair
things have been getting more and more anti-user knowledgeable
fair point
things aint user-friendly anymore?
it takes shit in and does some shit spits shit out and keeps shit stored
more like
big companies dont Want users to understand what their computer does
you cannot fault someone for not knowing
only for blatant chosen ignorance
but yeah dont punish someone/talk down to em for trying to learn
nerd >:O
i think the advent of smartphones actually worsens this
actually
so much abstraction
chatgpt has ruined programming forever
aikoyori is atleast 40
hey, ive seen 15 year olds who act this way too
daddy, i cant zoom in the books
age isnt a qualifier for being an accidental snob sometimes
uh oh
How could one make more than 2 layers for a joker?
game patches
they want users to think that everything's an app because it just makes them easier to exploit
im so confused
,,,hmm
,,,yeah wait i think this is right?
i have no clue how appending works
but, probably
you can test it out
whyyyyyy
IDK WHAT THEY PLAYED THOUGH
what in the chain has been broken
can't even do shit
without phone stopping me
yes!!!
complain about the devices and the companies
not the users
they dont know better, its not their fault
oh great aiko of yori
idk
oh right i have this game on
this function is NOT being called but i dont know why
Where does cryptid patch for more than 2 layers?
i have no idea whats this sound is
go looking in the lovely folder ig
probably in exotic or something
There is no exotic lovely file.
Is this the right one? ```
Draw midground layer
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = "if self.config.center.soul_pos and (self.config.center.discovered or self.bypass_discovery_center) then"
position = "after"
payload = '''
if self.config.center.soul_pos and self.config.center.soul_pos.extra and (self.config.center.discovered or self.bypass_discovery_center) then
local scale_mod = 0.07-- + 0.02math.cos(1.8G.TIMERS.REAL) + 0.00math.cos((G.TIMERS.REAL - math.floor(G.TIMERS.REAL))math.pi14)(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL)))^3
local rotate_mod = 0--0.05math.cos(1.219G.TIMERS.REAL) + 0.00math.cos((G.TIMERS.REAL)math.pi5)(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL)))^2
self.children.floating_sprite2:draw_shader('dissolve',0, nil, nil, self.children.center,scale_mod, rotate_mod,nil, 0.1--[[ + 0.03math.cos(1.8G.TIMERS.REAL)--]],nil, 0.6)
self.children.floating_sprite2:draw_shader('dissolve', nil, nil, nil, self.children.center, scale_mod, rotate_mod)
end
'''
match_indent = true
https://balatromods.miraheze.org/wiki/Aikoyori's_Shenanigans/Boss_Blinds thank to oinite12 i no longer have to show my screen recordings
Aikoyori's Shenanigans adds 10 new Boss Blinds, 3 of them being Finisher Blinds.
Can the Libre be disabled more than once?
i modified it to return nil and the game still functions
but what the HELL replaces it
anyone have any good tester mods? like a sandbox that allows me spawn in my own jokers and tarots at will?
like
DebugPlus
Polyamory
big fan
nah it doesnt work
sounds like it works pretty well to me
its the main.lua thats working
it can if you want it to.
i never checked
elaborate
Unleashing my 2 billion chicots to reach naninf blind req
it's just going to crash the game lol
i tried going to e308 blind
and it just froze and crash the game
(jen's almanac number)
@hybrid iris what is take ownership
hello
i think take ownership exists when you want to change an existing item in balatro?
not just the base game
anything that's registered before you
haikoryo
where do i put it then
ooh i see
is it possible to perform a context.individual check on debuffed cards?
hmm
this sounds like @/maratby's territory
:3
i think it is in steamodded now
not sure
when i did it i was using a patch
well yeah a lot of stuff is
which is incredibly annoying
i can't figure out what function they use now instead of evaluate_poker_hand
because it doesn't seem to do anything anymore
i might try to make a debuffed card calculate context thing
chat
I'm not a code wizard
Did someone mention a code wizard
omg it's the real code wizard
is it possible to use naneinf as a value code-wise? Let's say for example i want to add a joke poker hand with naneinf chips
you just type in 1e309
but it won't work with talisman
you'll see 1e309 with it still
in that case you just do to_big(10):arrow(11.1,100)
i don't know if that will create infinity but
from my testing if you put the first argument of arrow to be decimal it goes to infinity
Alright, i'll try that, thank you.
huh
wait nvm
anyone got any specral card templates floating around?
It works, although for some reason after scoring it doesn't exit the blind with talisman lol.
HAAAAAHAAHAHAHAHAHAHAAAAAHA
I tried this but it didn't work.
lmaooo
thank you!
quick question to everyone, is there a function or value i could call to like
calculate the amount of cards in my hand when i score a hand
like i play a high card and i have 9 cards left in my hand
how do i get that '9'
Does that dynamically update? Trying to make a joker that gives +2 mult for each card in hand when you play a hand
peak btw thanks
yeah it does
i am BRAND new at this shit
was just trying to make a few sample jokers before tackling some crazy shit
every time you call it it should update properly
trying to figure out both how to make ^MULT a thing (stealing it from cryptd) and then 2 vouchers
First voucher allows tarot spectral and planet cards come with Editions (foil poly etc) Second voucher increases the chance of them in the shop and when a planet card with an edition is used it ADDS the multiplier of the edition to that upgraded hand
like if we have flush at level 10 and say it has like 300 chips and 23 mult every time you play a flush
a holographic jupiter when used would give it the regular upgrade then tack on an ADDITIONAL +10 mult to that hand forever lol
should be fun to figure out
again might just poke around in cryptd
awesome thank you
^mult is a talisman thing AFAIK
aurinko:
oh wait really
any way to get it from talisman without making my mod dependent on it or should i actually just work my mod with tali
LAST question i promise
anyway to get intelisence to work with SMODS? like have VSCODE recognize shit like #G.hand.cards as an actual global game value?
cause as of now VS has no damm clue wtf im doing untill i actually throw the mod into balatro lol
no idea how it does it
ah rip
just put SMODS into the workplace you're in
the git repo?
oh word up
so if the smods folder is in my workspace its just gonna be chill like that
huge
massive even
onesec
what's the new version of checking G.STATE == G.STATES.TAROT_PACK🤔
how can you active a joker when selecting a card
hook card:highlight?
when can i find how to hook
or what do i need to do?
In LUA, it is a very important concept to understand that everything is a variable and all variables may be edited in runtime. This includes functions. With modding other peoples' LUA files, like Klei's basegame code, you may find yourself wanting to run your code before or after the original fun...
return true from your events lol
lol yeah i just noticed
is there a way to add a calculate function (a function that gets called when something is getting calculated) that is always going regardless of whether there is an active blind, joker, or etc.?
oh man this already exists LOL
yes, hook SMODS.calculate_context
messing around with one of my jokers 
wawa
it tickles my brain
why does this crash when loading into the game?
calc_hook = SMODS.calculate_context
function SMODS.calculate_context(context, return_table)
if context.playing_card_added then
print(context)
end
calc_hook(context, return_table)
end
what's the crash?
i think you need to return the reference
The animation is fun
uh, shouldn't
ghghgh
i cant seem to figure how how this work, didnt you send a video with the blind doing smt like that 💔
works thx
not sure how that would change things, that line might just need a nil check
where would i add that nil check...
no that's something I need to do
oh I see I'm passing a scored card that doesn't exist
why isn't this debuffing?
calc_hook = SMODS.calculate_context
function SMODS.calculate_context(context, return_table)
local x = calc_hook(context, return_table)
if context.debuff_card then
local c = context.debuff_card
if c.kmod_mem_debuff then
print("debuffing")
c:set_debuff(true)
end
end
return x
end
that's a very weird way to do that
i thought the local x = ____ would fix it
no, the manual call on set_debuff
you can do x.debuff = true instead
but also there's ways to set permanent debuffs directly with smods (SMODS.set_debuff)
yea that works thx
how to unset a debuff on itself?
while true do SMODS.set_debuff(card,true) end until the code fucking breaks and it de-debuffs itself :3
unset as in undo a debuff previously inflicted on itself in context.debuff_card or as in prevent debuffs from other sources?
undo a debuff previously inflicted on itself (also "it" is a playing card)
also good morning aure how aure you?
in that case, stop returning debuff = true in context.debuff_card
Also thanks, I'm doing good
good microwave aure, how table are u today
additionally call G.GAME.blind:debuff_card on it if it should be recalculated instantly
whats the var that has the store the amount of booster pack opened?
@bold sleet jumpscare
that's good to hear
oops
How does smods evaluate what modded booster pack the game has open? Whatever smods pack you open it returns G.state of 999, so how does the game know what cards to place in the pack?
Any clue where I can get the opened pack data from?
so uh great news that one worked but this guy is absolutely fucking my game up
this is all im given as well
any GLARING errors that you can see?
the joker has a 1 in 5 chance to make any played (and scored) cards negative
wouldn't set_edition just use e_negative
well thats what its SUPPOSED to do at least
i can try
it gave me the prompt for negative playing card to
i used it lol
negative_playing_card is only for tooltip stuff
SMODS.OPENED_BOOSTER is the card that was opened
OH shit that was it!
thank you!
now to add animations i suppose
juice up is the animations thing yeah
isn't saturn broken or is it updated
how do you change this dissolve colour
thanks bro
What are you trying to do?
play and retrigger unscored cards
dude i cant even begin to say how usefull it would be if someone rewrote all the base game jokers into the smods editions
cause like
ok now they do it correctly
i was looking for the exact same thing @vocal cedar
@native zinc
sorry
and source code is rough to read
my room is worse
but yeah splash isn't in card.lua
i think splash basically runs through each card and adds it to the scoring_hand list
the wiki is really unhelpful
but that's like the average modding wiki
so
really reading source code is the best thing i can do
also why exactly is splash here?
what do you mean why is splash here
it's there because it has to be there in a specific scoring step
oh
it's in evaluate play
oh wow i recognise you from me looking up "splash" in the search bar
i'm famous
One of the optional features in SMODS is being able to interact with unscored cards, btw, which depending on what you wanna do might make it a whole lot easier!
i just wanna score and retrigger the cards
but yes i am aware! i saw it when i was looking up splash
but wow they really need to Write This Down
Undocumented features are a core feature of smods
I hate that I've been debating doing this for a while, haha
bro start a github
just have a buncha people work on it
id help
(once i get better at all of this)
it's mostly copy paste from source except for all the contexts you need to add
and fixing up any god awful source code if elseif elseif elseif elseif elseif elseif elseif elseif
when i opened card.lua it was an experience
im going to bed but he is beautiful
animation looks like shit and the randomness is not great at all
like the random seed is straight up not working at all and it basically makes the whole hand negative
need to look at code for like space joker or just figure out a better random algo cause its currently doing a x in x chance to make your whole HAND neg instead of each card
but he is still amazinf
my goat
oh for each card just do a for loop
Tbh a lot of the jokers would be barely any effort, but I think my rewrite would be slightly unhelpful, as I want to do it so I can make vanilla jokers fully compatible with everything my mod does, haha, but it'd be easy enough to then turn that into regular vanilla from there
yeah
i did lol
the pseudorandom is like
not random
oh hm
well yeah but you can just write 3 in the code lmao
Calculation technically happens before any animation for scoring happens, so if you want things to happen as they're being animated, you want to make use of events
anyway it doesnt even have great animations yet unless you count juice up
what am i cooking...
Also, storing it as a variable makes it accessible by other jokers. For example, it'll be auto automatically compatible with Cryptid's misprinterize feature
oh fair i suppose
the dream is to play the hand
then the joker triggers and says "negatory!" each time it rolls the correct probability and makes a card negative
then plays the hand
i mean i want it to do the same shit the midas mask does in effect
but it wouldnt make all cards negatice, each card has a 1 in 6 to become it
That works with events
i think the pseudorandom seed isnt truly random either so its fuckin with my code
That's what pseudorandom means
regardless im going to bed for now, i made 2 jokers today, thats 2 more jokers than i have ever made in my entire life so we only getting better from here
yeah man
i might be actually stupid
lmfao
you right
You set it up correctly, I reckon you're just reloading a save or something, resetting the odds to be repeated exactly
hmm
ill mess with it tmr.
weird question btw
why did this code NOT work at all
ignore the make_negtative() i didnt know how to change edition
why would context played card and context scoring not actually target the card?
Unless it's from an optional feature I'm not familiar with, context.played_card doesn't exist
You want to do this in context.individual, and just go for context.other_card, as that always is a scoring card
oh gotcha
But you'll get it fully set up tomorrow, haha, have a good night
so many ways to code this stuff
its cool
yeah
thanks again ice. nice to see a reoccuring face that also manages to help me each time
im gonna get better at this shit
Kinda have to help out, as an Ice, considering you're Mr freese
im just trying to stretch my legs, make a few custom jokers and specral cards that add implementations for players to get negative playing cards in their hands cause i think thats such a cool feature
then im gonna tackle that legendary rework i was yapping about
i got permission from eaze to merge mods too man its gonna be peak
hey hold on what context should i be doign
heh thats a good point
i just assumed .before
what are you tring to do?
this for the splash right
oh i just wanna do splash but retrigger the unscored cards
before seems right to me
You wanna use before and add each unscored card to scoring hand, and I reckon you should mark them with a temporary variable as well, like 'card.splashretrigger = (card.splashretrigger + 1) or 1', so you can check in the individual context if a card has been marked to retrigger
Would it be possible to have vouchers be purchased to the consumable slot?
Because vanilla Splash implementation doesn't allow you to easily see which cards originally wouldn't score
first i would have to detect unscored cards
which. hm
i guess i can use the smods lmaooo
chat what number is this
Not that difficult luckily! I don't know if SMODS always has it stored in each context, but you'd iterate through the played_hand (or whatever the proper name for it is) context and check if the current card is in the scoring_hand context. If it isn't, you add it and mark it. Or you don't even add it, just mark it, and then just copy played_hand into scoring_hand
hm
An 8 with an oakland booty
ok how clear is the 8
Hey Ice
I don't think anyone would accidentally misread it as anything else
Yoo
When trying to make my first joker, I managed to make it score every card in hand by accident
Rite of passage for working with smods, honestly
Do u know a way I could increase the shop size? Like instead of 2 jokers being sold I could make it sell 4 same for the packs, I mean there is a mod but for some reason it causes the Vouchers to disappear and prevents them to be sold
What’s rite of passage, if you don’t mind me asking? I’m still new to coding. Only just finished up my second joker yesterday
A rite of passage is a tradition or ritual performed by people becoming part of a group
rite of passage is not a coding thing
Historically it could be required for e.g. children to be considered adults
I have no clue, sorry, I've never touched that part of the code. I'd look at the way Cryptid's jokers maybe implement this
has learning occured
Haha no worries, just a figure of speech
You can check out Overstock; I'm not sure if there's built-in support in SMODS for it
maybe there is
How could one let vouchers appear again after being redeemed?
Lemme check it out
Is that a mod or a joker card,
Looking it up, yeah, I have heard it before. I just woke up and I like to lurk in the mod-dev chat to see what’s going on
Haha no worries
how do you expand your consumables slot using debugplus?
eval G.consumeables.config.card_limit = 1e300
thanks
Vanilla Voucher
hmmm
lmao
Oh, you need to grab the played and scoring hands from the context.
You can add cards to the scoring hand using context.modify_scoring_hand, you’ll have to look in the lovely dumps to see how to use it though
would something like this work?