#💻・modding-dev
1 messages · Page 40 of 1
that's not a word in my vocabulary
9 jokers, 5 editions and 4 packs
I'll check it out to learn how to add editions and packs
I did a mod! https://discord.com/channels/1116389027176787968/1256925657594597377
Kinda waiting for people to comment on it
if i had a nickel for every modder whose name sounds similar to myst, i would have two nickels
Arsène (Rare) (Linked to: The World)
- RK1: Copies the ability of Joker to the left
- RK5: Copies the ability of Joker to the left, 1 in 3 chance to do it twice
- RK9: Copies the ability of Joker to the left, +1 Joker slot
- RK10: Copies the ability of Joker to the left, +2 Joker slots
Gonna rename myself do SDMyst_0
RK5 scares the piece of paper out of me
i just wish that i had someone to make art
i just found out about SMODS.PayoutArg
no
it's a thing for hands remainign and remining discards stuff
ask Math to pr the joker retrigger api
it doesn't seem to be used very much tho
I actually wanted to use it
and i feel it needs to be fleshed out more
...
heyy @hallow forge ❤️
like there is no function to tell it to now show up on the pay out screen
lol
but, i think they meant mathisfun
Still want to see Mathguy vs Mathisfun in a pit fight
that's kind of your fault for not specifying
i'd pay to see that
:p
i misclicked
NT was supposed to be joker retrigger
what NT is nobody will know
Actually mathguy wasn't talking about joker retriggers
oh
I was tho
I got this Joker that adds 20 chips at every scored card.
calculate = function(self,card,context)
if context.individual and context.cardarea == G.play then
return {
chips = 20,
card = self
}
end
end
but it crashes
Does anyone know where to get the mod to get rid of scoring animation
card = card
ever want MORE blinds.
I'll never understand how this code works
self in Card:calculate_joker() is actually passed to calculate as card, self is the center proto object, not the card itself
just replace card = self with card = card
hey is there a consumable version of card.ability.extra?
the first card is the key name in the {} object that is being returned, the second card is the actual card passed in the function parameters just above
an object in lua is defined like {key1 = value1, key2 = value2, etc.}
where keys are strings, just pieces of text, while the values can be anything lua allows
yes, it's the same as jokers
"wait, it's all just cards?"
"no"
I can't art, i don't have time to art, and i want to make cards not art but apparently card ugly with no art
oof
show SMODS.Atlas code?
you didn't put atlas = ...?
i did the same thing for blue and red. and it worked
self in that context is basically the joker instance (that you create with SMODS.Joker{}). It only exists in the **steamodded **and is different from a Card instance (which is how any card is represented within the game, so jokers, playing cards, consumables etc.)
learned that the hard way
what is center
oh
same thing that was discussed above
self is just the object's prototype, not the actual card
Yeah, I figured that. I just couldn't figure out how they accessed the chips value to multiply
it's handled with lovely patches
probably would be nice to add those in steamodded as well
I eventually plan to make a PR
retrigger jokers as well 🙏
Does using 1/2 like that work? I think it might, but it's usually better practice to type it out explicitly as 0.5
technically works but i'd wrap it in parentheses if i were to do that
Also why do you even use loc_vars if you have no variables in your text?
That's kinda redundant, comparators should have lower priority than arithmetical operators
Are you creating your own mod? Or just trying to load someone elses?
Well then it's crashing because you're attempting to index a nil value.
which is?
You're passing a nil argument into some function or calculation when it's expecting something else.
Lua method 'set_sprites' at file 'card.lua:166'
so i need sprites?
???
I can't tell you what you need, I can't see your code.
I can only tell you what the error means.
Can u just copy paste ur code here, instead of pasting a screenshot please lol. -- It's kind hard to read it.
key = 'midas_mix',
loc_txt = {
name = 'Midas Mix',
text = {'A gold potion may have rich flavor'},
},
set = 'Potion',
pos = {x = 2,y = 0},
config = {
extra = 30
},
discovered = false,
cost = 0,
can_use = function() return true end,
loc_vars = function(self, info_queue, card)
return {vars = {1,card.ability.extra}}
end,
use = function(self,card,area)
if pseudorandom('midas_mix') < 1/2 then
card.ability.extra = card.ability.extra - 60
else
card.ability.extra = card.ability.extra
end
end
}```
Thanks
I cant see where you are calling set_sprite
does Steamodded.Consumable have a required sprite sheet argument?
atlas yes
I'm guessing that's what you're missing then (?)
so i do need sprites
??
all cards need an atlas to pull sprites from
If you're trying to make a card, of course u need sprites (?)
that made sense why red and blue work
didn't somebody tell you this 2 hours ago
LOL
🔫
doesn't steamodded have documentation for this (?)
outdated ( i think)
and center is one of the more fleshed out documentations
Spoonfeeding but all the code spills out
if i laugh my family's gonna wake up holy shit
IMDEAD
you think i didn't try that
myst stop im trying to keep it together
try what
making a sprite
potion
allegedly
correct
incredible
ik
Honestly I would just download a png if i'm being real 😭
Myst ur so rude omdddd
what the hell did i turn this into
Nothing
Nothing, Nothing
Uhh, so yeah. Look I advise you read the Lua documentation, and the steamodded documentation.
no
Did you?
Yes
Ah okay.
no way
STOP.
I'm so sorry
lol
No but where is the white stripe
on the outside
i think i should add it
the two pixels anti aliasing
the long lost cousin
don't use black in balatro art 
LOL
You know what might be funny and fitting for the mod
yep
You could do the art by inserting images and downscaling them to fit in the sprite
IM DEAD
thanks for the art
oh ur so right. My bad.
No problem homi
The image for the booster
im dying
LOLOLOLOL
If you stick the image into the joker template it could actually work as an art style for your mod
You’re not reshuffling anything tho
oh ye
Their art style is just doing everything all at once
ok
this is just what i did
If I was on my computer I would send a proof of concept
or pepsi
this art is
you want to draw
not really
pripsi xma
its not prime, its washed 💀
it's not washed it's dirty 💀
its not prime its composite numbers
ultrakill reference: accepted
I think the atlas should default to the tarot one anyway right?
yeah
@solid salmon
If you want to use it
Are they as good as your coding skills?
insane burn
no
I love it, but also hate it so much.
im crying
thank for the art
🫡
sorry spring
why not
like
wheels of death
car wheels
cart wheels
cart wheels
other wheels
rigged
how
rigged

sorry spring

but the wheel has chosen
oh no its okay i dont care LOL
you didn't consider my art though /j
its not a joker tho
@elfin coral ntsc-rs is v cool, i just had a look at it.
:D
its easing the pain of losing
ii hate it so much
perfect
either im crying, or my eyes are bleeding
ow my head
im joking
ik
altho the res is painful
ik that
have you heard of nearest neighbour
no
isnt that that one game that matpat made a theory about
i'm just pulling your leg

should the gimmick of potions just be that they're all prime bottles
I thought you were talking about first past the post Valadaptive...
i was but then it would be funny if all of them were prime bottles for no reason
you should make the background like tarot cards but then all of the numbers are primes
2,3,5,7,...
I can't see your code, but look at the differences between red and blue (the working one) and midas mix (the broken one)
i kinda want to learn modding so i can put my stupid joker / boss ideas in
That should help find the error
Please do before trying to mod Balatro
yeah XD
also which language will i learn to do balatro mod stuff
^
broski, read the docs. https://github.com/Steamopollys/Steamodded/wiki/05.-SMODS.Center
ah, okay!
Time to add ANOTHER thing in my things to get good at :3 list

atlas should not be inside loc_txt
i think reading the docs might also help 🤔
To be fair, atlas is listed as an "optional parameter"
Probably would've tripped me up as well
i think its optional bc u can use the default atlas if u add sprites to that, or reuse game sprites. but idk i dont use steamodded.
yeah but midas mix keeps on crashing the game
key = 'midas_mix',
loc_txt = {
name = 'Midas Mix',
text = {'A gold potion may have rich flavor'},
},
set = 'Potion',
pos = {x = 0,y = 0},
discovered = false,
cost = 0,
can_use = function() return true end,
loc_vars = function(self, info_queue, card)
return {vars = {1,card.ability.extra}}
end,
use = function(self,card,area)
if pseudorandom('midas_mix') < 1/2 then
card.ability.extra = card.ability.extra - 60
ease_dollars(-30)
else
card.ability.extra = card.ability.extra
ease_dollars(30)
end
end,
atlas = 'midas_mix',
}
SMODS.Atlas {
key = "midas_mix",
path = "midas_mix.png",
px = 71,
py = 95
}```
It looks like betmma mods are messing with the set ability function to me
huh
Soon Grandmas will be exploited for cookies
money
so get rid of your card.ability.extra stuff
all of it
well in the version you sent you don't ever define it so you're trying to adjust it when it doesn't exist
lol
What does charge to play mean there
it's supposed to say Charges $7 to play The Manacle
It takes $7 dollars, and you must have at least $7, and then The Manacle would be activated
how do you get these?
is there a G.GAME.round_resets.discards for money?
G.GAME.dollars?
thx
i did the atlas and it still doesn't work
key = 'midas_mix',
loc_txt = {
name = 'Midas Mix',
text = {'A gold potion with rich texture'
},
},
set = 'potion',
pos = {x = 0,y = 0},
discovered = false,
cost = 0,
weight = 3,
can_use = function() return true end,
loc_vars = function(self, info_queue, card)
return {vars = {1,2}}
end,
use = function(self,card,area)
if pseudorandom('midas_mix') < 1/2 then
G.GAME.dollars = G.GAME.dollars / 2
else
G.GAME.dollars = G.GAME.dollars * 2
end
end,
atlas = 'midas_mix'
}
SMODS.Atlas {
key = "midas_mix",
path = "midas_mix.png",
px = 71,
py = 95
} ```
try updating betmma vouchers
can I see the error message now?
can you try putting name = "test", in your card definition
@wintry solar , i found SMODS.PayoutArg in the Steamodded code and was thinking there should be a method to prevent the PayoutArg from showing up, like if it's 0 ot smthng
I forgor to add one 💀
can someone please help me with something quickly
im trying to use a mod that adds seals to the game
but whenever i load up my game i get this
no idea what any of it means lol
I think that means you're missing some utility mod that this depends on
should be linked where you downloaded it, probably
that makes sense lol
thank you
i have this util file to go along with it now but its giving the same error still :(
i think maybe something is wrong with the inject sprites part of the util
it says its doing smth with a nil value
which would explain why i couldnt call the function before
why does this crash the game?
Out-of-curiosity, how would you implement an effect that adds an extra repetition but with a percentage effectiveness?
I have some ideas but they don’t sound great
are you aware how to add an extra repetition?
I mean, yes, but I'd like to check that for the repetition from this specific source it behaves differently
can you not send an extra repetition from the source when required/
what do you mean?
have a look how brainstorm/blueprint works
I'm pretty sure they have a flag, which indicates the action is from them.
iirc
do your calculation in the joker and then return the correct number of repetitions
Blueprint and Brainstorm don't create repetitions
so u could just check if the action is from your joker, and then calculate some sort of % decrease
how wdym then
Seltzer creates repetitions
Blueprint and brainstorm have the effect of retriggering a joker.
The number of repetitions is 1
No, they have the effect of copying a Joker
What do you think that word means
but only some of the time?
jesus ur so self-righteous
if u want ppl to help u, you should try being a bit nicer lol
All the time
But the repetition has partial effectiveness
Maybe, which is why I'm asking for ideas
In principle I can hook the functions that evaluate Chips, Mult, etc. and check for a global variable in them
I think that's the idea that uses the least injections/overwrites, and, while not nice looking, might work
all the calculation is done within the stack though, the functions are given a final value and just update it
(Although that would make the card_eval_status_texts incorrect)
I mean, do I need to change anything else? The effects are collected into a table and then processed.
yes, but you can't hook the functions, assuming you mean mod_mult etc.
I can't?
they're just passed the calculated value
mod_mult(mult + effects[ii].mult)
funnily, the mod_mult function doesn't actually do anything too
Yeah, and inside them I multiply them by a value if some global is true
but that's going to multiply the previous value too
so you're applying your scalar more than once to each increment
Look at how Boredom does this in Cryptid
What does Boredom do?
1 in 2 chance to retrigger each played card or Joker
Basically I just return 1 retrigger with a 50% chance
See, I wanted to reduce the effectiveness to make it deterministic
Rather than random
So like every other?
Though I’ll test if the effect with integer retriggers is too strong before committing to partial effectiveness
You could probably use a counter instead of RNG
this puts me in debt
Like multiplying the Chips, Mult, etc. by a number
as in decimal money
Oh
The original idea started at 0.25 and increased by 0.25 per level, but in hindsight that might be too slow
Maybe I’ll do 0.5 for both
Anyways, I just made a broken Joker to test a future Enhancement effect so maybe Cryptid will like it @mellow sable
(unrelated)
Feel free to make a PR with it!
I mean, if you find it interesting 😅
What’s the effect?
Sorry if I’m like half distracted since watching Balatro on SGDQ
So, the Enhancement would make it so when a card is destroyed, it grants its Chips to cards in hand. So the Joker does that but it’s also Trading Card for every hand
That sounds awesome
I’m getting almost 10,000 Chips per hand. Not the hand score. Chips.
Oh the Joker itself doesn’t gain anything
#⚙・modding-general message pls test texture/palette stuff
Do you think I can beat Violet Vessel? It's extra large y'know
I didn't give myself any Jokers besides the one I just made 
(and I didn't give myself money either)
Sounds tough
Ante 6 Violet Vessel :< scary
Who can I ping to get a github link pinned in a post?
in the #1209506514763522108 forum
Egg
Still got a lot of work to do but this is getting somewhere.
me when i get the water:
Which one do you prefer?
imo none of them look particularly good, but of them 2 is the best one
I'm not too happy with any of them but I'm not sure what to do. I want this Blind to be simple, small, and curvy, but none is all 3
yeah i'm not sure what to do either ¯_(ツ)_/¯
What about these two?
try smoothing out the corners
Oh vanilla blinds do use single pixels. I thought it was only 2-by-2s
Like this?
looks better
the right one is the numeral 8 smh
fuck it, [xChips](#1257660889520144446 message)
Do you know how to update the Blind text mid-blind?
(and maybe during in the Blind select screen)
why the fuck would this patch not work
but this does
I'm actually so confused
side by side is identical, and I'm not overriding anything
where are you putting your keybinds.toml file?
my mod folder
if it's not named lovely.toml then you'll need to put it in a folder called lovely
that already happens in-game (drunkard)
ok so im fine
Well it’s random
You’ll have to play a bit
But if you want to be sure set the rate to 1000
i set it to 8
ik
can someone help me with defining a sprite for a custom spectral card please
i have no idea what im doing
im using feder api thing
i literally dont know anything about lua
but ive managed to reverse engineer this
but the image is a fool card
i have art i made for the card but im wondering how to set the image for it
yw
sorry
im a bit confused
where do i actually put that bit
tried shoving it in
idk anything about lua
hi, so you're using 0.9.8 so the syntax is completely different
oh i thought i had 1.0.0
thats smart i didnt think to look up documentation
thank you
init is a 0.9.8 thing
yes
do you want to use 0.9.8 or 1.0.0
0.9.8 is not compatible with 1.0.0 mods, and 1.0.0 has compat with 0.9.8 but it's not stable
ill see if any of my mods break when i install it quickly
feder api isn't even its own thing anymore?
a bunch of the 0.9.8 apis come from it though
Honestly you should prob switch to 1.0.0, its getting close to release
Theres already a sizable amount of 1.0.0 mods
if i stay with 1.0.0 is there any easy way for me to add my own stuff to the game?
Yes, absolutely.
You'll proably need to learn a bit of Lua to do so, but Lua's an easy language to pick up, and from my experience adding new things in 1.0.0 is much easier than it was in 0.9.8.
cool
are there any resources for making it easier
like the api thing i was trying to use
This is the current documentation for 1.0.0
Anything in the table of contents with a number in front of it is part of the new docs, while the entries below it are for the old 0.9.8 docs
thank you very much
if i wanted to do something stupid like 1 in 5 chance to get a voucher
how could i do it?
create a card with the voucher center then redeem it
what if i wanted to make more than one?
create multiple cards with the voucher center then redeem them
with what
i never get why all you modders use pseudorandom when mathrandom() is there
want to elaborate?
if you use mathrandom() you will get different rng even with the same seed
that's not the point of random?
the whole point of seeds is so you can play the same run with the same rng
i think so
...
btw u forgot quotes
unfortunately the way you used create_card is far from how it's supposed to be used
gee if only i knew
read the source code
which part
think of a similar thing that would happen in the game, then look at how the game did it
for example, if i wanted to create a voucher then i would look at either the shop functions or the voucher tag
...or betmma's Housing Choice
How do you set the background color for Showdown Blinds?
i'm pretty sure there's a check for boss.showdown somewhere that disabled the color
oops all spectrals
my favourite part of this game is the probabilty jokers and things
like lucky cards
Fix what
the error
Look at the code and see what it needs
key = 'ironic',
atlas = 'bonus_tags',
loc_txt = {
name = "Ironic Tag",
text = {
"Create a {C:red}Common{}",
"{C:red}Bonus Blind{}"
}
},
pos = {x = 0, y = 0},
apply = function(tag, context)
if context.type == 'immediate' then
local lock = tag.ID
G.CONTROLLER.locks[lock] = true
tag:yep('+', G.C.BLUE,function()
if (#G.consumeables.cards < G.consumeables.config.card_limit) then
local card = create_card("Bonus", G.consumeables, nil, 'Common', nil, nil, nil, 'top')
card:add_to_deck()
G.consumeables:emplace(card)
end
G.CONTROLLER.locks[lock] = nil
return true
end)
end
end,
discovered = true
}```
am i doing something wrong here, my tag won't activate when collected.
meh it's not too much of a problem
as per how the game's code handles these, you need the type in your tag's config: config = { type = 'immediate' }
Is it possible to do something like oops all sixes but always make the probability guaranteed
Like instead of 1 in 2 it's 2 in 2
And instead of 1 in 4 it's 4 in 4
ye
There’s the easy way to do it
hey @frosty dock do u happen to know how to update the G.CHALLENGES cache thats used to generate UI for challenge tab?
updating G.CHALLENGES doesn't do it. It must be something that's happening on game initialization. Because my changes to G.CHALLENGES only apply to the UI on game restart.
the challenge API was an extremely straightforward addition to steamodded iirc
ah I haven't messed with that, let me see then
yeah
challenge API is easy, its just updating the UI elements dynamically which is a problem
i mean, depends whats possible
but currently its not updating at all
while the game is open
you have to restart, for it to update
even though G.CHALLENGES is what is being used to get the data for the UI. and G.CHALLENGES is being updated dynamically.
if you're fully restarting the game, where is the data in G.CHALLENGES coming from?
I'm p sure it wont be possible w out a massive rewrite for the challenge data to be updated dynamically while the UI is open, but even just on the main menu it wont updat ,.
my own challenge API
injecting into G.CHALLENGES.
pretty much nothing about G.CHALLENGES is static normally
this is all a bit too vague for me to tell what exactly is going on, do you have any code to show for it?
yeah, ill push my stuff to a seperate branch
also I'm getting tired, I'll have a look at this tmr
Alright, thanks.
im using the not just yet mod, does anyone know how i can make this button less wide so its not in the shadow of the deck?
ive tried changing stuff in the bottom picture
like adding maxw and stuff
but i can never make the width smaller
how would i make it so consumeables in the shop and vouchers show up as negatives?
Are you familiar with lovely patches?
I've got a patch that makes Common jokers show up as Polychrome, so you should be able to tweak that patch to work with what you want
i'm not familiar, but i think i can figure it out. i'd just need to see the code to figure it out, so if you wouldn't mind sharing, that would be great
# Top Gear - Common jokers in shop are polychrome
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = '''local card = create_card(v.type, area, nil, nil, nil, nil, nil, 'sho')'''
position = "after"
payload = '''
if G.GAME.twewy_top_gear then
if card.ability.set == 'Joker' and card.config.center.rarity == 1 then
card:set_edition({polychrome = true})
end
end
'''
match_indent = false
And here's some of the documentation for how to add lovely patches
thanks
This patch only works on the shop itself - you're going to need to make another separate patch for modifying booster packs
👍
how do you make new hand types? (in 1.0.0)
TalismanCompat is defined in Betmma Vouchers mod and you didn't use it 🤔
Could anyone explain why this gives an error, which is
attempt to call method 'juice_up' (a nil value)?
It makes it to the debug message and sends checked, so my best guess is something to do with "card = self",
local suit_check = card.ability.extra.cur_suit
if context.other_card:is_suit(suit_check) then
sendDebugMessage('checked')
return{
message = localize{'k_again_ex'},
repetitions = 1,
card = self
}
else
sendDebugMessage('Failed')
end```
What magic does Thunk imbue into his debuff shader to make the X transparent
try card = card
Tbf I've just edited the parts that set the color of the X and non-X so there might be some missed wizardry
Text didn't show up, but it didn't crash, and did retrigger, so I'll mess around a bit more. Thanks, and, is there ever a case where you'd use self over card while modding?
shader pixels can have 4 components: r, g, b, and a (where the a is how transparent the pixel is)
try ('k_again_ex') instead of {...}
idk if that would do anything
what do I do here?
This is the most accurate mod screenshot ever made.
what font are you using in that screenshot
I think I made the Swashbuckler happy with this run
that's way too good lmao
I think it’s balanced /serious
Honestly without Swashbuckler in the mix it does feel relatively balanced
Compared to other uncommon econ jokers like Rough Gem, Lightning Rook does have a greater payout, but it needs to be sold to actually cash in that money
on the other hand, that's at most $25 per hand
If you've managed to get your hand to the point where you can consistently play that, you've pretty much won already
I found that even with trying to pick up as many aces as I could, I only averaged $10-$15 per round.
Retriggers exist
Which affect all econ jokers on scoring, I guess
yeah i didn't want to mention retriggers
I think comparing it to other economy Jokers like Cloud Nine and whatever the Face card one was suggests it’s balanced
It’s more restrictive, and slower
c9 is dogshit lol
Exactly
oh i'm really sorry for this lol
this button is dumb, i tried for like an hour or two to try and fix it, it's just a pain messing with the ui system
there's a better looking alternative i tried, but it shifts the discard and play buttons and i find that worse than an ugly button
if you want to try it out, i believe all you need to do is to change the first n=G.UIT.R into n=G.UIT.C
Anybody know the best way to get started for just adding some basic jokers to the game with steammodded? I have a few ideas I want to try out, nothing crazy like an overhaul of the game or new functionality. Simply 5 ish jokers with unique effects
i suggest looking at others mods code
https://github.com/Steamopollys/Steamodded/tree/main/example_mods/Mods/JokerAPI_Example @river panther
Have a look at this jokerAPI example
hey fellas
how does one install steamodded 1.0.0 on a Mac? i think i'm lost
I mean I got a pretty good foundation now
its so funny how
has basically become a meme in the modding community
the perfect reaction to any souce code spaghetti ranting
oh my fucking god why do you still have that mod
ITS SO PEAK
Why wouldn't I?
Hey guys, new to balatro modding - what am I missing about showing messages during joker calc? I got this:
calculate = function(self, card, context)
if context.using_consumeable and (context.consumeable.ability.set == "Tarot") and not context.blueprint then
new_chip_val = card.ability.extra.chips - card.ability.extra.chip_mod
if (new_chip_val > 0) then
card.ability.extra.chips = new_chip_val
return {
message = "AAA",
colour = G.C.CHIPS
}
else
...
after running thru this block, i can see that my joker's chip state has changed, but I never get the message
because all messages must be a return from the localize function
ive also tried
return {
message = localize {
type = 'variable',
key = 'a_chips_minus',
vars = {card.ability.extra.chip_mod}
},
colour = G.C.CHIPS
}
to no avail
should be in the return
look at base game joker effects for reference
(minus the change that every self in vanilla calculate_joker becomes card in Steamodded)
^speaking of, it took me way too long to realize that too
i know there's a table explaining the diff in the wiki but might be good to call that incongruency with the OG code more explicitly? or i missed it
Anyway, feeling stumped bc I feel like this is sooo close to what Ice Cream calc does already. I just cant figure out what would be different
They don’t have to
There’s no difference between a string and a string
localize just rets a string right
AFAIK yes
Maybe sometimes it has no return?
I vaguely recall it doing in-place substitution
But maybe it was another function
- Does
a_chip_minusexist?; and 2) When this context is originally called, does the game pass the result tocard_eval_status_text?
it exists in one place, ice cream, which i was mimicking
but ive tried other keys too
What about 2?
thats a new name to me, ill have to look
(in other news, just confirmed
calculate = function(self, card, context)
return {
message = 'AAA',
colour = G.C.CHIPS
}
also does nothing, so im really doing smth wrong)
hold up im cooking
GOT IT. using_consumeable calcs never used ret statements in the og code to fire messages. they have to manually G.E_MANAGER:add_event into card_eval_status_text
i forgot when it returns nodes and when it returns a string


I don’t think it ever returns a node, it replaces the node’s text in-place
So it’s either nil or a string
AFAIK
You can just card_eval_status_text without the event I think
you're reducing chips?
is that intended
if the initial value 0 then it's never going to get to return statement
Does anyone know what function handles drawing cards from pile to hand?
is it CardArea:draw_card_from(area, stay_flipped, discarded_only)
anyways, finished it
https://streamable.com/mj27uo
deck with only top 52 cards visible
the rest of the cards are not drawn until they're in hand
Basically yeah
I didn't do it for specific mod, just QoL for endless runs and I guess mods that allow adding a bunch of cards in deck
you have no idea how much i need this

is there a index in the Joker's card table that tells which mod it comes from?
i've been going with if card.children.floating_sprite.atlas.key == 'PT_Jokers' then but I think there's something easier
center tables have a mod field for modded objects
if you have access to self, that would be self.mod and self.mod.id == 'your_id' or replace self by card.config.center if you don't
thanks ❤️
np
your_id is just the one you specify in the Steamodded header, right?
yeah
How would u access Center of another modded card tho, that doesn't sound realistic, unless you specifically add it to the Card table
Unless I don't know something
wdym, like I said you can get the center from any Card as card.config.center
lmao dw
Probably want to check if Center exists
Ah, I see
mod exists only if it's modded?
yeah
pretty straightforward
use self in any mod API functions, the other variant will do otherwise
Where do you have that code btw
I don't think using self there makes sense
In a temp file so I don't forget it
Ah lol
though print(card.config.center.mod.id) will break on vanilla cards
See, I have this Joker that is similiar to Baseball card, but only with PT Jokers
so I have to check if other_joker is PT
yeah you'll want config.center then
i suppose context.other_joker is the card's value of the other jokers
I have a question about context.other_joker in general: does it iterate on the calculating joker itself?
Like: if I have 3 Jokers and the first one has context.other_joker inside it, will it iterate on all 3 Jokers or only on the other 2?
the way that works is that after a joker's main calculation, it's sent as other_joker to all other jokers, including itself
okok
Last question (both you and I know this is a lie)
What is the purpose of G.E_MANAGER:add_event()
I had juice_up() in my joker's context.individual and it was juicing up right after I hit "Play hand". I put this instead and everything goes fine, the timing and all
G.E_MANAGER:add_event(Event({
func = function()
_card:juice_up(0.5, 0.5)
return true
end
}))
So basically, all joker calculation happens when you hit play hand, but the event manager manages the order and timing of the visual effects after the calculation is done
events are like a queue, when you add an event it doesn't trigger until all events before it are finished
got it
so maybe this can help my mod
I have this function that basically acts like a return{chips, card} but can be put inside the body of the calculate function and it adds the Chips.
My problem is that it activates before all other jokers (including the ones at the left) and even before the normal +Chips of the cards.
put update_hand_text in an event, probably
Did that, the joker still acts first than the scoring card. Now the update_hand_text happens after the total scoring making the 204x0
you probably have to mess with blocking and blockable parameters
for the event
and maybe just put the entire thing in an event
idk
if you say "put everything under an Event" i tried that
I had this message ready
i don't know what they are
the function is as the name implies
if its blocking, it blocks other events until its done
if its not blockable, it'll ignore blocking events
the problem with this G.E_MANAGER:add_event() is that it adds the event too late in the queue
for reference, the joker is basically this
I still need to figure out why the juice up Event is timed perfectly and if I put all this in an event then it is executed after the total score
Try looking at the code for juice up
you need to inject if you want it to happen after the playing card is scored
you can see how the queue is formed & operated on in state_events.lua:688
yeah basically all calculate jokers return their effects and state_events.lua puts them in a table called effects
yea
and then iterate on every effect one by one
you need to inject the section of code where it iterates through effects
im thinking you basically make a second effects list that your functions add to
but there might be a different solution
I think I need to inject at line 803, with a variable that is populated by the aChips() function, and then the game pulls from that variable and adds to the effects table
you probably need to inject in all the different contexts
effects is overwritten between card areas
not really, imo
When context is different than individual the jokers act as intended
here i'll show you
yea but if you inject there it'll have no effect on the video you sent earlier
rather, it would make it worse
and why is that?
it would do the effects at the start of scoring G.hand
Joker's calculate for reference
so it would go card->blue joker->card->blue joker->card->blue joker->your joker->your joker->your joker
isn't the base game working like this? state_effects.lua:796-803
The game calls calculate_joker with context.individual and saves the return values in local eval, then if eval contains something, it is added inside the effects table
yes but effects is cleared after each card area
Yeah, but I'll just need to add to the individual's effects table
there are multiple context.individuals, one for each card area
if you put it in the spot you sent earlier, it'll be only for G.hand's effects
so inside the aChips(), I'll do if context.individual and cardarea == G.play then
ohhhh so line 691 too
but what if someone wants to add chips for cards in hand?
ignore bad syntax
youd needa add a new parameter to aChips for which cardarea its happening in
and your other scoring functions
i'll take it from context
me when i took on sapets project ...
does anyone know how i can make using a card spawn a specific joker
its a modded joker so im not sure how to get it in the pool
Doesn’t your key need to be a string and have your mod prefix?
i have no clue tbh
i know barely anything about modding
ill try that tho thank you
It’s already in the pool if you created it, but as Eremel said you need to pass the correct argument
j_prefix_name
thank you
it worked
thank you
if i have it as legendary rarity can a soul card spawn it?
ah
super late but yes. its a food joker
you need to specify soul when creating a joker instead, rarity does not matter for it
i have it specified as soul cos i wanted it to be like hidden and rare
but didnt want it to spawn from soul cards
it spawns from a unique card im adding
i just made in_pool always return false and now the soul card wont spawn it
idk if theres a better way to do that
In 1.0, you can use hidden and soul_rate
that should do fine without in_pool
ive done this so soul card wont spawn it
oh
i used a soul and it spawned my modded joker
its legendary rarity so im assuming thats why
hm that's tricky
what'd you do?
I mean in code, what did you change to make it work?
i put the in_pool thing
this
nah its all good
although the code looks funny
probably a better way to do it
but i suck at this
is there a way i can make a card show up in arcana and spectral packs?
The set of rules these follow is pretty simple. A soul card can show up when a soulable card is generated for:
- The card type of the soul card or
- the card type specified in
soul_set
So, if your card is a spectral, you should put soul_set = 'Tarot'
my cards are a custom consumable type tho
currently not, but that's an arbitrary restriction
we could have it so you can pass soul_set as a table
that would be cool
the soul_set thing is actually not very extensible, it'll likely be reworked for 1.0
this is your chance to give feedback!
do you think this would implement an xChips?
--EZSC are injections in the code
The expected joker's ability would be "Each scoring card gives X2 Chips, this joker gives X1.5 Chips"
this is a demonstration of injecting inside the context.individual and cardarea == G.play, but the code blocks would be injected in every context
could anyone help me learn how to mod balatro? I've never modded a game before so I'm new to all of it
Rate my art boys First 3 jokers
anyone know which file G.FUNCS.use_card is in? i can't seem to find it
button_callbacks.lua line 2110
ty