#💻・modding-dev
1 messages · Page 146 of 1
Should I change it to "when defeat a boss blind", "after each played hand", "after each discard", or keep it as it is?
nope
mult?
Chance Mult
Mult refers to the score, that's confusing
I'd go for after each played hand i think
how do i get the current ante number?
G.GAME.round_resets.ante
ty!
Hey! How would I go about checking if a hand has a specific rank in a hand, give xmult from the joker itself? May be a silly question lol
Would i use this to do it?
jokertoselect:calculate_joker(context)
loop over every scored card in hand, iirc this is G.hand.highlighted
an array of card objects
to get the rank/ID, G.hand.highlighted[i]:get_id()
where numbered are as expected, and then jacks are 11, queens are 12, kings are 13, aces are 14
above line assumes you are in a for loop, example
for i = 1, #G.hand.highlighted do
which will loop over the length of the array of all highlighted cards
i dont see usage of psuedorandom_element in the example jokers mod either
nevermind
is there a way to force a specific boss blind to appear?
Retcon + golden ticket (I have no idea, probably)
yea i do
i'd reccomend using G.hand.highlighted[i].base.value to get the rank key
works well with modded ranks
ooh ok
open the blinds in the collection then press 3 on the one you want
Which variable does Oops all 6s access to multiply the probabilities? I only remotely remember its name includes probabilities_mod but not entirely sure.
G.GAME.probabilities.normal i believe
aight lets see if my first-
yeag
lol
with a boss blind, i assume this function flags cards as debuffed?
recalc_debuff(self, card, from_blind) -> bool
but how would i mark a card as being debuffed
is there a property?
card.debuff = true
Is 1 + (6*pseudorandom('Hakos Baelz'))//1 the correct way to roll a D6?
I want it to pseudo-uniform-randomly land on 1, 2, 3, 4, 5, or 6.
should work i think
inktype joker
charcoal, actually :D
nicee
i think it looks great :3
thanks!!
you have a lot of talent and i hope your mod goes really well :D
pseudorandom('Hakos Baelz', 1, 6)
Nice
if you need to debuff cards manually, use SMODS.set_debuff to make sure that cards behave properly when multiple debuff sources work properly
SMODS.set_debuff(card)?
whats the context for a joker being removed from the joker slots? i may be overlooking it somewhere but i cant seem to find it in the wiki
how do I get the played hand? not the poker hand string that's being played, i want the cards that's being played
Does lua have a moddiv operator,
or do I need to use math.floor(a/b) instead?
Here we roll dice, here we cast dice
do you have an animation?
not the version of Lua used by Balatro
I haven't got to learn that part yet.
I've wanted to do one but I couldn't think of a way besides frame-by-frame animation, although I suspect it should be possible
if context.individual and context.cardarea == G.play and #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
-- Ask someone to explain how to use the event manager in detail here.
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.0,
func = function()
if #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
-- pseudorandom_element is a vanilla function that chooses a single random value from a table of values, which in this case, is your consumables.
local card = create_card('Tarot',G.consumeables, nil, nil, nil, nil, nil, 'car')
G.consumeables:emplace(card)
G.GAME.consumeable_buffer = 0
end
return true
end
}))
-- Ask someone who knows eval_status_text better to elaborate on this.
card_eval_status_text(context.blueprint_card or card, 'extra', nil, nil, nil, { message = localize('k_plus_tarot'), colour = G.C.PURPLE })
end
end``` so i have this (ignore comments they r from example joker Steammodded) and i basically want every card triggered to give me a tarot card (i am gona change it later so every 31st card gives a tarot but tryna figure this out first) and basically i have the part with the tarots sorted i think but the message is saying it when there is 1 tarot slot left and i play 5 cards it says the message ffive times is there a way to only play msg if it goes through the other stages?
sorry can you rephrase the question
i want every card played to give me a tarot and i think ive done it but the "+1 tarot" text is off is there a way to like only do it if the event works? Like only if a tarot is made or something
because the if for the Event Manager is working different to the 1 inside
this is the code
the card_eval_status_text
srry i should of said it better
First I think you don't need to manually do anything as Steamodded handles most messages now
So I think you can either have the Event just create the card or move it to the return
you do need an appropriate return
but Idk if it's documented yet
maybe ask in the main Steamodded thread
wdym like return message or smth or just return true
you should but the text status near line of code of creating that tarrot instead at the end
whenever i do that it doesnt say the text
I think the idea is that there's a return table
message = localize('k_plus_spectral'),
colour = G.C.SECONDARY_SET.Spectral,
card = self
}``` what like this?
for example
and do i put it with the return true or replace it
ahh ok
message_card = card
wait why
Funcs aren’t automatically timed (probably an oversight I’ll look later if it’s feasible to do) so you’re fine to use your event still
ok
what do you mean by this
when i put this insdie of the if context.individual and context.cardarea == G.play and #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then it gives me a juiec up error
You still need to use an event in the func = part rather than the function you put in being thrown in an event by the calculation handling
Huh so i put an event in the func = part?
how would i replace all consumables with my own consumable type for a deck
Hi, what are some resources for me to start learning to make mods? I'm currently more interested in making new decks
steamodded example mods
hello! apologies for interrupting, how do i make it so that a joker has a sound for being added AND removed from the deck? i believe i know about add_to_deck and remove_from_deck but am unsure how to use them
add_to_deck from what can tell is when it's activated it adds the ability
And remove is the code to remove it
When it's removed
add_to_deck = function(self, card, from_debuff)
if not from_debuff then -- prevents it from triggering when the card is undebuffed
play_sound('your_sound_key')
end
end
thank you! i did not expect the way its used
i want to make it so that each LCB Sinner joker has a greeting for being obtained (and additionally for don quixote to scream when removed from the deck)
how does blueprint shows what modifier it copied.
Suddenly more stuff
like how it gives the same message as the card it copied
it uses the same returns as the original card
just with the display target being the blueprint card
where does the shop get generated
pretty happy with my card art so far
in game.lua, update_shop i think?
Just to be sure, this is the part where the message is shown and where its calculated, yes?
if self.ability.name == "Blueprint" then
local other_joker = nil
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == self then other_joker = G.jokers.cards[i+1] end
end
if other_joker and other_joker ~= self then
context.blueprint = (context.blueprint and (context.blueprint + 1)) or 1
context.blueprint_card = context.blueprint_card or self
if context.blueprint > #G.jokers.cards + 1 then return end
local other_joker_ret = other_joker:calculate_joker(context)
if other_joker_ret then
other_joker_ret.card = context.blueprint_card or self
other_joker_ret.colour = G.C.BLUE
return other_joker_ret
end
end
end
yes
thank you, just wanted to be sure
I was wondering, is it possible to "un-stone" a card ?
would this work?
end
local jokertoselect = #jokers > 0 and pseudorandom_element(jokers, pseudoseed('crypto')) or nil
print(jokertoselect.ability.name)
local other_joker_ret = other_joker:calculate_joker(context)
if other_joker_ret then
other_joker_ret.card = context.blueprint_card or self
other_joker_ret.colour = G.C.BLUE
return other_joker_ret
end
end
end
return {
}
end
}
I need to try again with custom Yu-Gi-Oh cards
But still haven't figured out how to get the use button to work
afaik you would just have to remove the enhancement
since under the stone card they're still completely normal
awesome jill
okay, it no longer crashes but it doesnt copy the card
how do i allow negatives to be taken when there is no slots left?
im trying to get it to copy a random cards effects
a nudge in a right direction is all i need most likely
dang it, it's still adding when I told it not to
and i don't even see chips on there
^
why is the game asking for .ogg files? and why is it trying to open a different folder than other mods use?
even if i create donmanager.ogg in resources/sounds, the game still crashes as if theres Nothing There
you need your mod key
e.g. mine is myo so i call myo_(soundname)
not (soundname)
oh, okay!
otherwise you're calling basegame sound effects
How can I edit a jokers config values outside of the joker
card.ability.extra?
yeah it should
Ok
Do I do G.GAME. card.ability.extra
where are you accessing the card
In an update function
So that it can scale based on time
I also need to be able to detect any input
ruh roh!
<@&1133519078540185692>
Thanks mods
As I was saying
Rambleyy
yea... and i still need help
ok somethings wrong
hm
Unironically you might have created a neat new feature
Well, you made something new!
i'm so confused
im still trying to find out how the blueprint is able to copy the other jokers
what is the neat feature?
I'm assuming it's not possible to have the boss background be the blue-red swirl when making a custom finisher boss blind?
is it in the room with us right now...
Assuming you could fix it and find something to make use of it you could probably do some fancy card mods there
its gonna be funny
On the cash out screen menu
I'm stillstuck not knowing how to check ANY key input
Everything's possible (except the halting problem)
oh event manager geniuses.... i am so lost....
But really Bunco has colorful boss blind backgrounds
i am so confused
halting problem...?
For example:
it calls their calculate function
has to be doing that all the time, and also sets context.blueprint to true, so things that cant be copied arent
ok i dont know why this is happening
ill pull up my code when i get home in a couple minutes if you want
im not sure why this isnt working like the blueprint card
oooo i see
sure, make sure to ping me when you post it if you dont mind
but yea i was just askin if someone here has made a finisher blind where the swirl background isn't the same color as the accent color, like with vanilla finishers
you didn't read anything else that I sent 😭
My apologies
you see the vision...
I see something
Why Steamodded loads faster than lovely patches? 
theres a lot of extra stuff, because this joker selects a random joker to copy every round, but the important part is assigning other_joker (or another local variable of your choice) to a specific joker in your hand and then putting
context.blueprint = true (so it doesnt copy incompatible stuff)
and other_joker:calculate_joker(context)
how are you still playing modded
maybe it wasnt the update maybe one of my mods decided to cook me
wait, thats exactly what im doing, if you dont mind, can you just send me the code, i understand if you dont
yeah sure
before i do that though how tf do i put code in that box that everyone does
'''this?'''
no
I don't play Cryptid
nah i got it
```lua
this
```
its either bunco or extra credit messing me stuff up rn
calculate = function(self,card,context)
if context.setting_blind then
local jokerList = {}
local j = 0
for i,v in ipairs(G.jokers.cards) do
if v.ability.name ~= 'Blueprint' and v.ability.name ~= 'Brainstorm' and v.ability.name ~= 'Mimic Joker' and v.config.center.blueprint_compat then
jokerList[#jokerList + 1] = v
end
end
card.ability.extra.selectedJoker = pseudorandom_element(jokerList,pseudoseed('fuckthispieceofshit'))
end
local other_joker = card.ability.extra.selectedJoker
if other_joker ~= nil then
context.blueprint = (context.blueprint and (context.blueprint + 1)) or 1
local copy_return = other_joker:calculate_joker(context)
if copy_return then
return other_joker:calculate_joker(context)
end
end
end
here ya go @worthy stirrup
please do lua
thank you so much
wait, can i change it so choose a random joker every hand
quick question, anyone here have the bunco mod and are you having issues with it?
just wanted to get permission before i started changing
yeah no youre free to change
i made the mod to help get artists' jokers into the game, feels kinda fitting to also be helping a modder to get their joker in
though, id kinda like credit
cool
it does seem to crash if you exit to the menu and go back to the game
hasnt crashed for me
tested both when it could copy something and when it could not
actually it just crashed randomly before my eyes so
seems to have to do something with the loc_vars
i never got a proper answer for this problem
that being that a bit of text stays behind when i upgrade last played hand at end of round
any thoughts?
recently started modding balatro, I'm loving the Saturn mod, however the main branch has all the cool features but no consumable stacking. I know the mod is still a WIP but for the meantime I made a fork that merges the consumable stacking from the alpha-0.2.1-A tag into the main branch, here's the repo if anyone else is interested
Quality of life mod for Balatro. Contribute to sioonhho/Saturn development by creating an account on GitHub.
I wonder if you can reset it in a func return
noted
ill have to work on it later, but thanks for the idea
the newest jokers have been implemented into the sprite sheet so i dont forget who to add
anyways i gtg cyall
big fan of the american football inspired one, that's sick
hey guys, how do i set multiple card editions simultaniously?
local edition = {polychrome = true}
local edition = {negative = true}
_card:set_edition(edition, true)
this seems to just do the negative part since the top line is overwritten, and i thought this being an object i could merge them but that doesnt work in lua, im a compleet newb here and i just want to add this one thing since i want to try something out
gdi posted to the wrong spot
Cards can only have one edition
welp, runs fine in lovely but crashes on steamodded for some reason
truly a shame
does your game keep crashing too
are you using my saturn fork?
ahhh that makes sense
no im just trying to absorb information to see if i can fix my game lol
ah i feel
why its so hard to think about a mod idea
it stopped crashing on launch but now crashes when i play a hanf
hand*
and idk what any of this means lol
well it is happening inside Ortalab, you can see that on the second line from the top
so its just ortlab? cause im seeing so much other stuff too
a mod that makes restart faster
a mod that lets you add historical politcians
is my patch bad??
that already exists
it is not patching
brainstorm
and i wont let you influence me to get me to make that german guy
xD
is there a way to have a joker create or reference a specific other joker?
like lets say mewtwo also creating a mew? like do jokers have some sort of id or something
does the lovely log show anything? something about the pattern not being found maybe
@dry hamlet are you able to help me find out why its crashing my game
i fixed it
if not its all good
ill just play without that mod
still the same error i believe
i just dont know what any of it means
i mean i know it's happening here https://github.com/GauntletGames-2086/Ortalab-DEMO/blob/3b3fc3bba6ef020254b8286b7b27d1b2d85ed418/OrtalabDEMO/OrtalabDEMO.lua#L2261
i just don't know what mod_chips/mod_chips_ref is doing, and why it would be getting called with a table instead of a number
i see
yeah it does crash only as soon as i play a hand
weird...
is the creator for the ortalab mod active in the community or nah im sure theyd be able to help if willing
it's possible one of the other mods you have has a mod_chips function that expects a table instead of a number
Hello! Sorry for bursting in; i've been trying to fix my modpack for the last few days now
I've reached a point where I can get into the game itself, but it crashes once I play any cards.
Here's the ingame crash log
sounds like the same issue im having lol
check out the lovely/dump folder inside your mods folder
and checking the location stated at the top of the log, this is what's there
local deck_effect = G.GAME.selected_back:trigger_effect({full_hand = G.play.cards, scoring_hand = scoring_hand, scoring_name = text, poker_hands = poker_hands, other_joker = _card.ability.set == 'Joker' and _card or false, other_consumeable = _card.ability.set ~= 'Joker' and _card or false})
if deck_effect then SMODS.calculate_effect(deck_effect, G.deck.cards[1] or G.deck) end
end```
and this is my mod folder
aight im in dump now what am i lookin for
are you on windows?
sorry for the re ask
is there a way to have a joker create or reference a specific other joker?
like lets say mewtwo also creating a mew? like do jokers have some sort of id or something
this is what im looking at rn
you'll want to look into the lua files in the dump folder and look for any calls to dump_chips, that's where it'd be i'd bet
guys question, is it possible to make a mod with 16 potions consumable but at start of the run it would shuffle their effects and only reveal them once that potion is used
i assume i just jump from txt doc to txt doc lookin for that?
you could
or i can give you a little powershell script that'll search through everything in the folder and tell you where it finds it
of course there's the rule of never run code someone on the internet gives you and this is very basic, but if you're not comfy with that i totally respect it
I do see this in my lovely logs
anything is possible
nah i checked all of em
theres nothing referencingdump_chips
which confuses me even more tbh
even the ones in dump/functions?
i would have to assume ortalab just simply conflicts with how another mod calculates chips
yeah
wow i dont know how events work
super unfortunate
i dont have the skills to fix this myself so unfortunately it just looks like i cant use the mod
ty for the help opal

is this the correct way to have a joker make another joker?
local mew_joker = SMODS.create_card(G.cards['Mew'], nil, nil, nil, nil, nil, nil)
mew_joker.config.center.key = G.jokers.cards[1].config.center.key```
well i seen someone able to merge jokers so i guess
okay i think there's just something wrong with steamodded as a whole because it crashes under a few circumstances with no mods enabled lmao
should i not be using 1.0.0-alpha
no, but apparently the latest version is incompatible with some stuff so i may have not read the wiki enough
so the update did effect stuff odd
yeah steamodded main branch crashes when i play a hand, and text is replaced with nil and ERROR all over the place, so it's gotta be steamodded
yeah cause steamodded hasnt been updated in like 9 months
i wonder what in this update even did this cause not much changed
version.lua was changed 4 hours ago
why can't people just use lovely it's so much simpler 😭
So what I'm hearing is don't pull from the Steamodded repo rn
most likely yeah
thats what its seeming like anyways
wiki says to try the old-calc tag, i can play a hand now at least
does anyone know what im missing here? is the joker not found or what? im new to this modding stuff and just trying to figure out what does what
wonder if the stacked consumable crashing the game has something to do with the fact that i started this run before installing steamodded
In other news, here's a fun issue I have no ideas on how to work around
Can you send the top part of that log? It'd be a bit more helpful
i wonder if adjusting the timing of giving the tag would fix it
ah i set a center var that wasnt needed i guess
local mew_joker = SMODS.create_card({
set = 'Joker',
key = 'mew',
legendary = true,
area = G.jokers,
no_edition = false,
})``` trying to do this
but its just not working out for me rn
mew would not be the correct key
ive been searching for a key
might be easier to delay it so it doesn't proc until after the round, but earlier would be a bit more intuitive so you get the reward right then
the key would be "j_[mod prefix]_mew"
i dont know where to find the keys of the cards specificly, i tried numbers but no luck
hmm, how would i find this? j_[mod prefix]_mew
is there some sort of rule for this?
that would be turbo weird that feels so unrelated to why its crashing
about to find out
i can no longer test someone else in my family is playing balatro now 💀
i got pranked
its up to you now opal 🫡
I agree, but I have the trigger context as setting_blind and I think that's the tricky part since I don't think there are any other good contexts for this functionality
yeah must have been that, after starting a new run hovering over a stacked consumable doesn't crash anymore
ooooh something else crashed it i see
didnt scroll up enough
so multiple things are broken with steam modded it sounds like
unfortunate
yeah, it crashing from playing a hand was from using main branch steamodded probably, and it crashing from hovering a stacked consumabe form my saturn fork was probably just a quirk with the fact that the run started before steamodded was installed
all seems fine now
ok so is it possible for me to fix ortalab mod then or is that maybe a diff issue in a sense
maybe? it's probably something unrelated to steamodded i'm willing to bet
well it was crashing when i played a hand
i'd try using this steamodded branch/tag if you aren't already, wiki says it might solve some problems https://github.com/Steamodded/smods/tree/old-calc
i shall try
@sturdy compass just one question sorry, but is there an id definition somewhere? i cant seem to find it using grep. neither do i see create_card used anywhere. im mostly learnign here
do i just put this in my mods folder or my balatro folder itself its been a while since i downloaded steamodded
is there a reason this would cause a crash? its working fine for me but crashing someone else?
SMODS.Enhancement({
loc_txt = {
name = 'Brick',
text = {
'{X:mult,C:white}X#1#{} Mult {C:chips}#2#{} Chips',
'{C:green}#4# in #3#{} chance to',
'summon a {C:red}Gnome',
},
},
key = "Brick",
atlas = "Jokers",
pos = {x = 4, y = 6},
discovered = false,
no_rank = false,
no_suit = false,
replace_base_card = false,
always_scores = false,
config = {
extra = {
base_x = 1.3,
chips = 40,
odds = 100
},
},
loc_vars = function(self, info_queue, card)
local card_ability = card and card.ability or self.config
return {
vars = {
card_ability.extra.base_x, -- Multiplier
card_ability.extra.chips, -- Chip bonus
card_ability.extra.odds, -- Odds for gnome
G.GAME.probabilities.normal -- Base probability
}
}
end,
calculate = function(self, card, context, effect)
if context.cardarea == G.play and not context.repetition then
-- Apply the enhancement effects
effect.x_mult = self.config.extra.base_x
effect.chips = self.config.extra.chips
if pseudorandom('Gnome') < G.GAME.probabilities.normal / card.ability.extra.odds then
G.E_MANAGER:add_event(Event({
func = function()
local c = create_card(
nil, G.consumeables, nil, nil, nil, nil, 'c_fn_Gnome', 'sup'
)
c:add_to_deck()
G.consumeables:emplace(c)
play_sound("fn_gnome")
return true
end
}))
end
end
end,
})
what do you mean by id definition?
like where are the ID's coming from
yeah this person is using a newer version of steamodded but the enhancements is made with old calc
im used to id's being created by a function or atleast a builtin mechanism. but im trying to retrace
Counter question, is this mew card from your mod or an external mod
nono its the pokermon mod, but i love pokemon and i thought i'd be a good place to kinda dive into and see what does what etc
this is just for me locally ofcourse
@dry hamlet should i delete the old steamodded folder
yeah replace the one you have with the new one
yeah make sure you don't have duplicates
i will say the nice thing about steamodded is i can just reload the mod without restarting the whole game, little quicker
ok in that case, take a look in the pokermon code. Find where the Mew card is being created. The key will be defined as "mew", however steamodded will make the true key follow traditional joker standards, hence where the "j_[mod prefix]_" comes from. In the case of Pokermon, [mod prefix] would be "poke"
nope still crashes with ortlab
i see, yeah i did check it out, thats why i came with mew. makes sense. why would prefix be poke and not pokermon?
The prefix is set by the mod author and is meant to be a short "code" of sorts to distinguish what objects come from where
very helpfull man thank you
👍
How do I make a card do a little shake (like when you sell it or it's telegraphing that its effect can occur, like DNA or Trading Card)
card:juice_up()
hello, how do i play a custom sound ? i tried to mimic other mods but it doesn't work :/
does anyone know why in this code "left most" is index 1 and not 0?
local leftmost = G.jokers.cards[1]```
is this a design choice or whatsgoing on with lua
what if I told you it's still just restarting the game
Lua indexes start at 1 instead of 0
Thank you
5 years of gripping on 0 = 1, here it goes down the drain
We love coding languages that break standards of virtually every other coding language
hey it's quicker than me hitting quit and restarting from steam, i'll take it

just wait til you find out about debugplus watch commands
-# i don't use them myself because they're useless for what i do
lmfaoooooo
it can still be useful for some testing (I use DebugPlus watch commands to help develop DebugPlus)
I always wondered what that did
fair enough but I'm messing around in lovely patches half the time
and I still dont understand it 😅
can work nicely for testing util functions though
yeah true
also I imagine steamodded doesn't like being reloaded when the game is running that much
besides if I have something like utils or overrides I can just re-run the file manually, a lot of the other stuff happens at load time
I have a little chunk of code to detect if being watched and then I can do some printing if I'm watching one of my core files
was super useful for working on the config system
But yeah like if I modify the console I pretty much need to reboot the game
Is anyone active rn good with game states?
I'll take that as a no and will wait on it lmao
What do you mean?
I'm having an issue with one of my Joker's mechanics that's causing a conflicting game state. Here's what I'm trying to fix
generally my advice is just be extremly careful about which state oyur in when changing states
How are you spawning the tag?
(even Thunk messes up his gamestates sometimes and softlocks the game)
I basically copied the code from G.FUNCS.skip_blind
I wouldn't apply to run
Wouldn't that just delay application of the tag then?
yes
the other solution would be somehow delaying the state change that's already been started which sounds like a nightmare
Also the game doesn't work with anything messing with your hand in the middle of a round
hmm I see
iirc cryptid made a card that lets you go to a shop mid round and its soltuin for this was to prevent you from having booster packs to open
I had some aimilar issues like that
Hey, chat
How does one code new suits?
I'm familiar with that card, just didn't know that was the solution to get it working 
Sucks tho, delay application it is I guess. I really wanted it to apply immediately but if it's that involved I can pass on it
with hard work and tears, at least that's how I did it
but you can use this https://github.com/Steamodded/smods/wiki/SMODS.Suit-and-SMODS.Rank
lmfao
some guy named ethan, idk if you know him
anyone know why the shadows here are inconsistent in terms of being behind or in front of the button below? in one case the second button is in front of the shadow on the first pic, and the second button is behind the shadow on the second pic
sounds like a loser

sobs
random ethans in chat catching strays
wtf
ethan is a nerd ass name tbh
where can I find the code for the cards such as the duo, tribe, and familty? I can't seem to find it in card.lua
guy named Ethan: 
if I see an ethan I automatically go in for a neck jab
also idk why I've been waking up covered in bruises
"there can be only one"*
yeah I sure hope noone named ethan works on a project to help modify the lua code of löve games at runtime
surely not
oh damnit I messed up the quote
DAMN!!!!!!!!!!!!!!!!!!!
well...
holy shit I never knew it was baked in with the not Seeing Double check 😭
That's WILD
it's literally a NOT seeing double check
imagine context.cardarea == G.jokers and not context.before and not context.after

Y'all prob recieve this question allot, but is there any website talking about modding balatro?
SMODS wiki is probs your best bet
the github?
yeah
I don't think I would have ever caught that, thanks!
can 1 mod create a card of another mod? or is that too deep
if you first check if that mod is loaded, sure
i had to
oehh
I love how the new logo comes up on all the links now
lmao
what if its not a modded joker
what if its like triboulet
what do you want to do with triboulet
well by experimenting i came to the idea of having mewtwo create a triboulet card
not rlly for a purpose
could be any joker of the base set
SMODS.add_card{key='j_triboulet'}
ohhh i see
so its basically the same, but no mod prefix since its no mod
understood
why does it create the triboulet like this? its stuck on the right for some reason
it says you have 5 jokers
oh lol
meaning that theres an invisible one
someone is hiding
there's a ghost card
must be the invisible joker
is this an actual thing?
sometimes
I don't think I've seen a ghost joker before
It can be if you skill issued
but it's not impossibel
most of time when makeing a joker
but not actually defining it
lets say that it has texture assigned that is just blank
I've accidentally made a ghost joker by doing a poor job of removing cards before lol
im deffs skill issued
let the hate begin
local mew_joker = SMODS.add_card{key='j_triboulet'}
local mew_edition = {negative = true}
mew_joker:set_edition(mew_edition, true)
mew_joker:add_to_deck()
G.jokers:emplace(mew_joker)
card_eval_status_text(mew_joker, 'extra', nil, nil, nil, {message = localize('k_plus_joker'), colour = G.C.BLUE})```
Does a description box pop up when you mouse over the blank space?
Eww jank ass edition code
it doesnt
I didn't want to mention it
shush shush i knoww
set_edition(‘e_negative’, true)
im just replacing what i had
local mew_joker = SMODS.add_card{key='j_triboulet'}
mew_joker:set_edition(‘e_negative’, true)```
like this?
actually you can just
yeah i feel like this is still too much
SMODS.add_card{key='j_triboulet',edition='e_negative'}
arent there any better args to be set in 1 line
yeahhh this
no need to add_to_deck or emplace when using add_card btw
is that only for create?
it already does it for you, that's why you're getting ghost cards
I forget add card has an edition tag
SMODS.add_card is just SMODS.create_card but with add_to_deck and emplace added
i need to remember there's like 3 different things called create_card
is there any way to get the left button on the stacked moons to show over the jokers instead of behind?
i'm thinking no, and that it's just due to the order the rendering takes place, but maybe i'm wrong
did something recently change in smods regarding joker calculation? all my jokers are broken, i think context.other_card is returning nil now?
yes something did change
Thoughts on this legendary joker? Kinda tried to do an alt Perkeo but idk if it's better or worst
Certainly worse than Perkeo, but still interesting. Since it's not a negative copy, you generally lose 2 of your consumable slots (1 for the Fool itself, then 1 for whichever item you're copying). Also, being unable to copy Spectral cards hurts it (e.g. no Immolate/Seal/Cryptid spam). If it added 1 consumable slot along with this effect, I think it'd be more legendary-worthy
is there a guide somewhere to make jokers have text boxes for certain effects? i know it has to do with add_speech_bubble and say_stuff but im unsure how to make them actually work
Oh yea in some way this doesn't copy Spectral cards, what if both The Fool cards were negative? (or maybe make 1 negative The Fool, tho it sounds underwhelming compared to Perkeo)
(Btw are you actually someone's alt? 🤔)
By text boxes you mean like when the joker triggers and shows "X2 Mult"? If so look at card_eval_status_text
no, i mean literal text boxes, like when Jimbo says something to you
Ooooh
some mods do that, but im unsure how they make it work
I think Bunco's dev did something similar
But yea if you know the mod and joker you can check its code see which function it uses
Or even the base code with the tutorial sequence or game over
yeah ive been looking at card_character and modded jokers like roche that use text boxes
i may just write my own card stacking mod, with incantation and saturn as reference it shouldn't be too hard, i know visually i want a combination of the two
Negative Fool would be strong, but that just starts to become "Perkeo but Slightly Different." if you can swing it, it might be worth having the effect be "add a copy of the last consumable you used" so it can also add Spectral cards to your consumable slot. Would be a unique effect while still being perkeo-like
This is my alt account, yeah. My main account is one that I've had forever and also my IRL family is friended on there, so I use this for a bunch of other random stuff I'm interested in
Mh, fair, trying to do something close to Perkeo is kinda hard to balance, I'll scrap it for now.
Oh I thought you were someone from this server already, I was just curious.
i love patches
(lie)
How do i stop this from running untill all my events are done
wait, passing the context over to an event doesn't work anymore?
Better calc shouldn’t gave broken many jokers, can you ss some code that no longer works?
putting this in an event doesnt work
i thought i was already in better calc is the thing
level_up_hand iirc
and then what are the names/keys formatted like?
like how do i input said hand to that function
i think specifically when i try to access context within an even inside the extra = {func}
so this
putting it outside the event works, so does making a local other_card = context.other_card before the return statement
wow so like add_joker?
i think like level_up_hand(card, 'Pair', nil, howmanylevels)
it's inspired by that actually
why is the negative fix from cryptid not just preinstalled on smods
it would be so awesome
how do i make an event return something?
what negative fix
you don't
you cant take a negative if you have 0 slots, even though it adds one
this just got a lot more dumb
0 slots as in 0 slots left?
yea
like i have a deck with 0 consumable slots, but you cant take any negatives
its time to destroy a selected part of card.lua
iirc it just doesn't work if you're above full?
how do i make my joker juice up per trigger rather than just once same way as it would be in game normally for base jokers like lusty?
omg is Gregory House from House M.D!
Nope. just doesnt work
level_up_hand(card_thats_leveling, "HAND_NAME_HERE")
it certainly is
where hand name here by default is just the name of it - "Pair", "Flush Five", "Full House"
if it's for newly added hands that will be different
keys of hands are just their names
for modded hands, it's like 'six_Straight Spectrum'
if you've added hands with your mod those will be named prefix_key
where prefix is the name of ur mod prefix, and key is what you put as the key property
I have stolen your vicodin evil laugh
for whatever reason it is not prefix_name
i have more in my stashes
I have stolen the ones in your lupus book
nvm it does work?????
ok crisis averted
im not sure how you level a hand multiple times at once
it could just be u pass a number as the third arg but i wouldnt be surprised if it isnt a base game function
level_up_hand(card_thats_leveling, "HAND_NAME_HERE", nil, amtHere)
wait whats argument 3 then
smods doesn't use name for literally anything
i swear i found it somewhere but idk where
ok i have another question, i created a context that reads whether a card with a blue seal failed to make a card at end of the round, is there a way to tie a message to the card that failed?
currently the message is tied to the joker thats doing magic based on this, but id prefer it to tie the message to the card
any thoughts?
so this tecnically SHOULD work
Speaking of, what is the context when a hand type is leveled up?
context.other_card?
i dont think there is any specific one
card_eval_status_text(card,"extra",nil,nil,nil,{message = "Whatever", }) maybe
space joker can trigger during the played card phase
planet cards can be played mostly whenever
during shop, opening packs, during a blind, on the cash out screen
hand type level ups don't trigger a context
thats what i figured
gonna have to make a patch like i did
if you mean when they're allowed to happen, basically whenever? but if it happens during scoring you might need to do some jank
anybody know? stumped on this
anyone familiar with enhancement API around? why're modded enhancements impossible to add extra messages to lol
sorry if its something obvious but any knowers?
currently it just triggers once if the joker goes off but not on every card
what's your joker doing?
@tepid crow hey
wassup
Do you know about adding messages to Enhanced?
and why it might be different for modded enhancements vs. vanilla
I'm unfamiliar with the enhancements tbh
it works functionally just the juicing up animation didnt work for each card triggered, but it +mult for each card of a specific enhancement
but maybe @frosty dock knows
no i mean like the code can i see the code
What’s the context
you probably want context.individual
card = card in return yeah
i tried it in there first also same shit happened
Maybe it needs something else
i can try that
i forget when you need one or the other
so put juice up back in return and try the extra = {focus = card}
nah dont put the juice up at all
it'll happen automatically if you focus the card properly
oh ok
hm it looks like the basegame jokers that do suit mult just return card = card ||technically card = self but the basegame code is slightly different than smods compatible code!||
Dumb question here... But where are the default decks, vouchers, jokers etc textures?
from the game
use 7zip and open balatro.exe and go into resources/1x or resources/2x
thanks
it's not obvious but at least it's easy
worked thanks
What’s in your context?
eremel do you know how modded enhancements don't work
Hmmm?
it says it here in the code pic
Very confused how this timing isn't correct to get Flower Pot triggering. I have this happening in context.before which should be well before Flower Pot starts counting suits, right?
I mean where you call calc context
eremel pls
Changing cards during calc is tricky to get visually right and scoring right
Uhhhh I dunno
i put it as an elseif to this if statement, where it checks if a blueseal triggered and theres no space for planet cards
I see. I guess I'll just have to mess with timings more
Yeah I want to see the actual code you put in
working on it
If you want it to count for scoring you can’t use events
cuz i know it's something enhancement API-wise i just dont know if its actually a bug with the enhancement api or if im just dum
and should be hooking something im not
tragedy
Do hiker chips work?
yes hiker chips work
its super weird bc im hooking like all the same places hiker chips are added to tooltips
actually was slightly wrong on placement (instead it was an if statement checking before the other one, does practically the same thing tho) but this is what it looks like
I've been reading the SMODS wiki for some minutes so I can get on and do my mods, but I already have a question...
if I want to create more then 1 joker with 1 image, how would I code that? just set the table and then the offset?
like that
Do message_card = context.card
one sec
np
initialize this at the start with the atlas image youre using, the px and py determine how big a 'tile' is
Might be the generate ui function in smods.enhancement?
then on every joker put these two lines of code, saying to which atlas it goes to, then what tile it is, starting at 0,0 for top right most
then one more thing
I'm with you so far
i guess this is a good reason to try out that new lovely feature
in your mod folder put an assets folder, followed by two folders named 1x and 2x, followed by jokers.png or whatever you used in each, and in 1x you use normal sized sprites and in 2x you use 2x upscaled varients (shocking)
my sprite sheets for example
oh god im gonna have to regex
You can multi line pattern patch
yeah, I read that
oh for real
Yeah I think that was a 0.6 feature
the only thing is, how about the space in between each tile?
mhm?
its ok i cant read and i will be incessantly mocked for it
oh like the little transparent bits?
yh
None of us knew until one person randomly was doing it
does it eliminate since we defined the size at he begginig?
thats because of how jokers are, joker cards are actually 69 x 93 px, with an extra 1px transparent border
ohh ok
depends on the cards you're using
nvm nvm
how do you make a deck?
is there a tutorial anywhere
my atlas i work at with 2x size and then export at 50%
so there's 4 pixels between jokers
Y'all did firstly the 2x version and then downgraded it right?
yeah
this also applies for vertical stacks
tarot/planet/spectral cards aren't as wide, those have 8 pixels between rows
but still 4 between height
what no i draw at 1x what kind of animal draws at 2x
here's how my atlas looks
higher detail
oh that one
outer wilds mentioned
that one does
yes!
I'll mostly recollor some of them for my mod so yhh
i love outer wilds
fav game of all time here
I want to make something related to phasmophobia... Idk how to make ghost types turn into jokers tho lmao
the mod im working on isnt really related to outer wilds we just all like the game
so we used its planets
How hard would it be to code a Joker that does nothing, except cost 0 in the shop and sell for, I dunno, $10?
$25?
Some amount I've yet to decide
youd have to do something related to sell price
look at the egg for how thats handled
ok i gotta know, what does estrogen and projesterone do
and then just have it do nothing
estrogen turns 2 cards into queens
projesterone turns all cards in hand to queens, but each has a 1 in 7 chance to then become a stone card
(removing/replacing the enhancement reveals the card is still a queen)
estrogen
ritalin removes enhancements from 1 card (such as your unlucky projesterone rolls) in exchange for 50 bonus chips
probably but im not adding it
fair nuff
Can I make a channel for my mod, actually? Is there a process or review or something?
wdym?
how does the cryptid CCD deck work or how can i view it
look at the cryptid src
anyone can start a thread in #1209506514763522108
Hey there, new here. I've been learning to do game dev for a whole and felt like wanting to try my hand at making a mod for balatro. I was able to look at the source code and how other mods work but I'm a bit confused on where to actually start
same wiki, diferent pages
poggers
what is context.other_card refering to anyways?
like is it just always the card thats currently being processed?
without any other context to narrow down what's being done, it's just... the other card
so with this itd be the failed blue seal card right?
if you're passing it that way, sure
i think thats how itd work
if you're passing it as context.card, it's context.card
if you're passing it as context.my_blue_seal_card, it's context.my_blue_seal_card
the blueseal context trigger is happening during get_end_of_round_effect
since its triggering from self.seal stuff id presume that self is will turn into other_card in my joker's calculate, right?
this is the code im patching in, do i need to change anything with that to get other_card to work?
you're passing the card as context.card
in which case, refer to it as context.card
you don't magically pass anything through that you're not putting in the call
smods patching ftw
thanks!
do y'all use vscode?
why 😭
does anyone know how to code a joker that gives x3 mult if played hand contains a 2 and an 8
everything I tried failed
works
neovim
i use vscode with an nvim extension i barely use
-# i'm too lazy to learn how to use it
sorry, what is nvim?
neovim?
yes
Once I started using it I can't go back lol
never ever heard of it lmao
aure im making a coremod nyeh heh heh >:)
set up two boolean values checking for a two and eight respectively, then scan through the played hand and set the bools to true as they appear, then if statement checking if both are true
mainly what's stopping me is that I already have mousekeys and vim keybinds suck ass on colemak
i'll stop you by merging it into smods >:)
hey as long as i dont have to figure out how to do it >:)
merging patches that target steamodded is really simple, i just replace the file with its dumped version
ik u just asked something but, what would u do to differentiate the default card from mine? I used the same base and idk if just changing the background color would be that usefull
I think it fits the base game's style
why i cant made three juice_up in row ?
well the smods patch is just to make modded enhancements work right with it
the left one is alredy a joker tho
assuming they dont provide their own generate_ui in which case godspeed
How to do that
the left card is hologram's base, i dont think people recognize it without the giant flashy jimbo
I used something similar but with a black border for my joker
set up the bools in config, set them to false at the start of if context.playinghand (whatever its called), set to true via for loop checking for 2s and 8s in playing hand, then in the if context.joker_main also check if the bools are true as well, then apply 3x mult in there
Hey! Any idea why the juice up only works once?
if math.random(1, 100) <= 80 then
ease_dollars(math.random(1,3))
card:juice_up(1, 3)
play_sound('cardFan2')
delay(1.0)
end
if math.random(1, 100) <= 70 then
ease_dollars(math.random(2,3))
card:juice_up(1, 3)
play_sound('cardFan2')
delay(1.0)
end
if math.random(1, 100) <= 50 then
ease_dollars(math.random(1,2))
card:juice_up(1, 3)
play_sound('cardFan2')
delay(1.0)
end
wooo dirt cards show their mult finally yippee !
should work
you should set that up like this:
no it's like hiker chips
But I don't know how to set up a Boolean
this is showing up on my hologram joker i dont know why 😭
fair nuff
a boolean is just true or false
so set a thing in config set to equal false and boom, boolean
something like
twos = false
Is Balatro on lua 5.3? I would love to use __pairs
insomuch that i could do this
5.1
ok, thanks
or even:
please
sorry i dont know why it doesnt
i have a problem, mime isnt retriggering the effects of my joker and i dont know how to make that the case
consdiering that mime + blue seals normally works just fine i dont know why it shouldnt with my joker
considering it works off the same code as blue seals do
wait lemme get code
(that context is something i patched in to check if a blue seal would have triggered, but the consumable slots were full, and it works at the same time as blue seals normally do in get_end_of_round_effect in card.lua)
where it would have patched and the patch itself for context
uhh that card_eval_status_text doesn't look right
i don't think retriggers happen if there's no effect
It's just an idea, but would it be better if the level up's were activated BEFORE scoring the card?
try returning { triggered = true } or something equally meaningless after the calculate_context
technically no, because if theres four blue seals in hand and and an empty consumable space then only two of those seals will actually have an effect
the whole point of blue seals is that they happen at end of round
could i get an explanation on why?
cus you said its meaningless right?
what if if checked the max consum spaces and the total consum cards? then i don't think it would...
idk
you know better than me so yh
yeah i guess, but im looking for a neater solution
because retriggers on cards held in hand happen only when there's a non-empty effect the first time
else you would get a bunch of again messages for nothing
the main blue seal calc sets ret.effect = true
and one last thing, theres another return in getroundendofeffect, would that break things?
ah i see
yeah i guess it's more accurate to just modify ret instead of returning something yourself
doesn't really matter since you don't need to prevent other blue seal code from running at that's all there really is here
cool
idk if it's going to look good 😭
oh howdy it works
lmao it's so shit
lmao
the torn joker was just there so i won instantly
I got the same issue when I had the comma
actually
those dont need to be in a return
just set them to equal false after the if statement
oh
Is for i,j in pairs(G.jokers.cards) do valid?
Or is for i=1, #G.jokers.cards do the only available way?
still in brackets?
replace that with ipairs and should work golden
then j gets assigned to the indexed joker from the array you put in
I removed the return and it still has the exact sameerror
its the comma
add an enter there instead
something like
twosvar = false
eightsvar = false
rest of code
Ok, thanks
You also forgot an end for the if inside the for loop
Oh, I though it didn't need one if there was a elseif
technically that end is for the elseif
do you not have a lua extension
finally it runs without crashing on the first screen
probably not
then install one if you don't want to spend half your time debugging syntax errors
Is there one you recommend
just the stock lua extension for whatever editor you're using should do
there are two I know about for vscode
one provides auto-formatting which can be helpful
alt + shift + F
This just reminds me that I also haven't got my vscode lua extension yet.
sumneko one, keyring one, or gccfeli one?
wh
sumneko has the most DLs, its what I use and has that feature
gccfeli I haven't heard of
After all that the Joker doesn't actually do anything
oh it has 100k DLs lmao
It doesn't crash but it doesn't work either
I use these two
Tencent is... unreliable. Like, in general.
how so
not entirely sure but you're generating random numbers wrong
you're generating it 3 times, which I assume you don't want
and either way you should be using pseudorandom()
For starter, it's made in china.
the "correct" solution is
local (X) = pseudorandom('seed')
then use that local for all 3 tests
i don't use tencent either, i think i briefly looked at it and didn't trust it lmao
I only use sumneko's and it defo has auto formatting
Anyone know what the issue might be?
I remember first trying some auto-formatting which I didn't like
what doesn't
This is the joker's code
I tested in with full house eights and twos and nothing happened, no message, no xmult, nothing
well your check is messed up
rn what extra.twos and extra.eights keeps track of is if the last card scored is a 2 or 8
you should just perform your checks in joker_main on context.scoring_hand
Just downloaded the Lua extension and it just starts screaming at me "Undefined global 'SMODS' " lol
there's a config for it
easily solved by having smods in your workspace
that lets you disable each error
personally i was still getting it even after i added em, though i'm not sure if i did it "correctly"
It was also screaming at me but even before I downloaded it IIRC
I put Balatro in the same workspace and it was still complaining
so Idk
so do I get rid of the if context.individual
Just found it hilarious but not as annoying as it could be
