#đ»ă»modding-dev
1 messages · Page 310 of 1
random it is, then ^^
it's retroactive anyway so adding mult and chips after acts like the rotation only just happened after you added
since I got too lazy to make it otherwise
What about table.sort(G.GAME.hands, function (a, b) return a.order < b.order end)?
...is a.order a thing?
for the life of me i can't seem to make talisman evals work
if it is then i think so, yeah
what talisman evals
what is wrong with this...
sound effects and everything happen but
ohdamn those
the mult just does not change
ohhhhhhhhhhhhhhhh
what does talisman want from me
yeah, order definitely works then
bump
the one part that i hate the most about joker evals is using this regular method
have you tried to see if it works or not
mult_mod makes you add your own message
mult doesnt
in your case, i think u can just use emult
hmph
true, but do u use emult_message if u use Emult_mod?
No
a bit curious, since i wonder why they couldnt just use "message" instead
huh
ok thanks for acknowledging my dumb curiosity :3
Thatâs for overriding specifically the emult message
So you could still have multiple return values with custom messages
unfortunately it doesn't work for me specifically
is my copy of talisman wrong somehow
Probably
all it does is this for me
the mult doesn't get changed at all
emult, Emult, Emult_mod all dont work
this is frustrating, where can i get the latest copy of talisman
only Emult_mod makes noise btw
weird
Then talisman is built wrong
yeah
it was the talisman build
how did that happen
might have been that i had an outdated talisman as i updated smods
have they fixed the "amt > 0" crash yet
hopefully it doesn't break anything else
Just tested. The thing I worried happened. Now what?
bump
mmm, what is the effect of the sticker?
You could probably use context.remove_playing_cards
"Probability X3 while played"
hiya! what do i add to this condition to only check for Celestial packs?
if G.shop and G.booster_pack then
which conditions should i use to trigger this effect?
Kinda worked, thanks.
G.booster_pack_meteor maybe.
i have a joker that increments each time a certain rank is played within a hand, and procs when X cards of this ranks have been played in the hand, although i cant get to have the feedback happen at the moment it reads the card that incremented it above the threshold, any idea?
How could one draw a sleeve on a card?
what does this mean
what
trigonometry joker i assume?
complex numbers
it does nothing since the rotations apply retroactively so adding afterwards also rotates that
exp mult for example here would be the same as unrotating doing the exp mult then re-rotating
xmult is the only one that would actually work non-retroactively here
since (1 * 2) rotated is the same as 1 rotated * 2
its not immutable btw so the angle can change
because it works retroactively and the angles are the same but in opposite directions it turns out that it fully cancels out
and the number is the same as if you didnt have the joker
Any ideas?
technically it's visual then
yes thats the point
they stack if you have more than 1 btw
oh yeah, jen stopped using github for almanac because instead of actually using git he manually deleted and reuploaded each asset when he made changes
which is interesting
oh fuck reply ping i am dead
my apologies
lol wtf i didnt know that
thinking on how to make a third layer in the card sprite to move differently
thought id found a way but it does nothing
cryptid has examples of this but i might be able to explain the rough process of it
since entropy does a few things related that are manual
but you basically just make a second floating_sprite in the cards children and then manually draw it using draw_steps
and just as you say
i figured it out
i was looking at cryptid code but
i was using front instead of a custom other floating sprite
thanks for clarifying
time to tweak some numbers i dont understand
Rise.
How does one trigger effects on playing cards without jokers or consumables or seals or a certain deck present or vouchers redeemed?
a voucher that is claimed for the exact purpose of being an invisible joker
And possible on round one?
how do you check if a card has an enhancement. not a specific one. kinda like card.edition
for some reason nothing i do affects how the sprite moves and rotates, weird
#SMODS.get_enhancements(card) > 0
Whatâs the effect coming from?
A variable set on the card.
set_blind = function (self)
for _, card in ipairs(G.deck.cards) do
print(card)
if #SMODS.get_enhancements(card) > 0 then
card:set_debuff(true)
end
end
end
even with enhanced cards #SMODS.get_enhancements(card) returns 0? not sure what i am doing wrong here
You should be using G.playing_cards
umm, cards still aren't debuffed
You could check if card.ability.set == "Enhanced"
that seemed to work but it isn't debuffing đ its printing "I should be debuffed" though
set_blind = function (self)
for _, card in ipairs(G.playing_cards) do
if card.ability.set == 'Enhanced' then
print("I should be debuffed")
card:set_debuff(true)
end
end
end
I need advice.
It looks not good enough to me(, like it lacks something), but I'm not sure why/what...
Try using SMODS.debuff_card(card, true)
Rise.
new update of smodded seems to be breaking my card, is there a fix for this?
What line is that?
What was the difference in version for the previous one and the current?
i think it was Steamodded (>=1.0.0~ALPHA-1324a)
and now it's Steamodded (>=1.0.0~BETA-0404a)
That version is extremely old.
Show more.
it might not have been that version, i just had that in my dependencies
i'm checking what version of balatro multiplayer i have bcuz that'd change which version of smodded i had
oh god
quick question, how do i check discarded cards to see if they are a certain rank?
context.discard and context.other_card:get_id() == id
so like the played hand perfect
Rise.
Rise.
@daring fern did you notice anything wrong or a way that i could check for joker rarity and blueprint compatibility without going through "config.center"?
is there documentation of all the globals in balatro
The source code.
Why are you checking for blueprint_compat?
this joker retriggers common jokers twice, and i'm trying to avoid it retriggering jokers that don't like getting retriggered
Retriggering is different from blueprinting.
i guess, but generally jokers that don't get blueprinted have effects that would be weird to retrigger
like egg
It would just level up twice.
egg cannot be blueprinted, and retriggering egg makes it's value increase multiple times
i know
i don't think it's a very pressing issue though -.-
What if you checked first that context.other_card.ability.set == 'Joker'?
The problem is probably that you need to check that it exists first.
i've made it exist and it doesn't work
also context.retrigger_joker_check inherently needs a joker to work
so it wouldn't work if there wasn't a joker there, and i've tried checking context.retrigger_joker_check before everything else and it also crashed so
yeah there's just something wrong with config
What mods do you have?
idk when it happened but there's a config folder and mods that don't put things in there just crash when trying to index something from config
like neatojokers
checked and saw that extracredit breaks it
why does it do that
Did you update it?
I'm not sure then.
I mean like the G
how do i define the description of a locked joker
i see theres locked_loc_vars but no locked_loc_txt
unlock = {
'This is a condition',
'for unlocking this card',
},
``` in your localization file/`loc_text`
hm ok
I donât have advice for that atm sorry :3
It could read clearer somehow tho
yeah
I just am autism hungry and must make macaroni and cheese and I have a final due at midnight
good luck on your final
Tyty!
hey, i wanna do 'copies ability of 3 last sold common jokers' effect. how can i do that?
is it possible to upgrade a list of poker hands as the black hole, if so does someone know a mod that does it so i can check it up pls?
Did you look at black holes code?
yep, it does it indistinctively
for k, v in pairs(G.GAME.hands) do
level_up_hand(self, k, true)
end
i think of making an array of hand types
Thatâs how you do it.
but thats all hand types then?
Replace G.GAME.hands with an array of your making
You would make a table of all hand names you want.
as is would work? okok
(hi, could I scooch in with a quick question about how to balance a joker Iâve made?)
Also change self to card.
in the array i can just {'poker hand name', etc} or the syntax is more specific?
Case sensitive I think.
k will try like that and see
G.handlist đ
(As it stands, the joker retriggers Queens one time for each time a King or Jack is destroyed. I know itâs unbalanced as is, but I was stuck on exactly where to go to balance it while still making it fun. Should I increase the number of Kings or Jacks needed to be destroyed?)
It's also a table of registered poker hands.
Oh hello acid!!!
This honestly doesn't sound crazy broken
I suppose you could require that it has two tallies, and that you have to destroy both a king and a jack to get a retrigger
https://github.com/TheOneGoofAli/TOGAPackBalatro/blob/06ec710408c346e4af4291520a927179364071e2/togastuff.lua#L2391-L2400 I use it here.
So if you've destroyed 4 jacks and 2 kings, you get two retriggers
You could also make it start at 0 retriggers as well if you need
that sounds better, though what Iâm looking at is how annoying it would be- it does start at 0- to actually destroy enough Dude face cards to get the bonus
how do you define what's in the handlist?
It's not necessarily annoying, I would think. People are willing to go out of their way to scale Canio, for example, and retriggers are explicitly better than scaling XMult because of the potential for exponential effects
thatâs true
chat
Arguably you could also make it "Retriggers Queens [n] times if you have no Kings and Jacks in your deck", which has longer startup but has an inherent limit set on it compared to being able to create and then destroy more jacks and kings
The Fog
X5 Mult
If not sold within the next 5 minutes, get consumed by the fog and lose the run
Destroy eight specific cards in a standard deck to get one of the most powerful deckfixing-aligned abilities available
I think I would prefer it being able to stack to silly heights though
just more fun that way
That's true
what do people think about this one
the fog blind
flips 1 card every 2 seconds
It is just a list of all registered poker hands already defined.
it's coming
blover
cant i choose within the list?
oh shit not pvz!!!
what i aim to do is, each scoring wild card has 1 in X chance to upgrade all flush containing poker hands
and my issue is the upgrade of the poker hand type part
Iâll muse on maybe some other downside that could still let IS stack well while still not making it super overpowered
You'd want to iterate over the context.poker_hands and call levelling up on each entry in said table/list.
âyes, you CAN destroy kings and jacks as much as you like and get silly numbers of retriggers.
But.â
im not sure i understand ^^;
iirc
-- after the random chance rolls succeeds...
for _, v in ipairs(context.poker_hands)
level_up_hand(card, v, false, 1)
end
what are you trying to level up?
flush containing poker hands
i mean, poker hands containing flush
something is wrong here and i have no idea what is causing it rn
Hey guys does take_ownership work with other modded things or just vanilla
G.C.CSMR_PRESERVERS = HEX('000000')
SMODS.Rarity{
key = 'preserver',
badge_colour = G.C.CSMR_PRESERVERS,
default_weight = 0.75,
pools = {['Joker'] = true},
}
i have defined this custom rarity but for some reason it always spawns in shop, is there more i need to do to make it so it treats the rarity as an uncommon
I assume you didn't mean to reply to me here?
so flush, flush house and flush five?
wait
and straight flush
hang on
but yeah
Ah, hands containing a flush... oop, then my thing ain't fitting exactly. đ
could probably just if context.poker_hands['Flush'] then
Each scoring Wild card, has #1# in #2# chance to upgrade every Flush hand
Ah nvm
yep
the wild cards identifying*
so I'd suggest just adding a table of the hand type names to your config.extra and then iterating over it
i'm kinda new, i don't really know what it means,,, sorry
add hands = {'Flush', 'Straight Flush', 'Flush House', 'Flush Five'} in the config property of the joker
inside the extra, yeah
i declare it in the loc vars as well? and how do i refer to it as "level up"? ive never touched poker hands levels before
no not in loc vars
then use this but change context.poker_hands to card.ability.extra.hands
if nb > 0 then
print(nb)
for nb, v in ipairs(card.ability.extra.hands) do
level_up_hand(card, v, false, 1)
end
end```
this works, although is it possible to have one common animation as the black hole does?
i saw its code, it's a big brick of feedbacks
yeah it crashes when i try to just copy paste the black hole juice, the juice up crash
ok fixed te crash
although there's still a 4 part animation, i dont understand how black hole reduces it to one instance, or is it related to the way i instanciate the poker hand leveling up in here?
also it only happens once even with more wild cards despite them being detected and incremented (in nb), but the print of my nb in the if gives me 5 different values, i think imma take a break lol
Setting the false to true in that command skips animations and does it quietly.
bump
default_weight: Setting a numerical value for default_weight enables cards with this rarity to appear in the shop at the specified weight.
set a lower weight value
is there a mapping for what weights correspond to vanilla ranks
works! although what for stands the 1 after the true of the setting? and have i done my loop wrong for it to only happen once despite nb being superior to 1?
function level_up_hand(card, hand, instant, amount)
oh so i could put nb in the amount?
...as long as nb is not assigned by the for loop.
fun
I'm currently trying to make a joker that gains mult when a playing card is destroyed, and I have this code. This is not working and I don't know why.
context.remove_playing_cards*
mods/lovely/log
annoying part is that lua wont tell you that removing_playing_cards is nil because it evaluates to false
well
there is nothing that seems out of the ordinary đ
ok
so i pasted this
and i realize im a dumbass
trying to make playing five 5s give 5x mult but nothing is happening what do wrong
i was basing it off the if aces >= 1 code from superposition
Where do you define fives?
is there a way to retrigger a jokers add_to_deck function?
Also you should probably use joker_main not post
You could probably just call the function, but ill look at what it does before fully suggesting it
i am
this is what I'm doing but it's not doing anything
First issue I see is add_to only takes 1 var function Card:add_to_deck(from_debuff)
how would i go about defining it?
so i'm achieving this effect in the worst way possible, by just making a sprite as a child of the card and repeatedly updating its position - is there a way i can do this via drawstep?
additionally, is there a way i can do this with better timing? admittedly, i could just make a seal that is hidden from collections and is only cosmetic for this specific purpose, but i would like the sprite to appear over any existing seals the card might have 
The same way aces is defined and set?
just to clarify, this is for retriggering what happens when a JOKER is added with its add_to_deck function, not adding a new playing card to the deck
Truly forgot that SMODS does different
oh like this?
for i = 1, #context.scoring_hand do
if context.scoring_hand[i]:get_id() == 14 then aces = aces + 1 end```
just with 5s instead
yes.
I cannot find the definition of this function taking 3 variables. What version of SMODS do you have?
directly cloned from the main branch
ok yeah that woked thanks waffle
Mm nvm. Im missing things cause im tired.
woked balatro
add_to_deck is never ran with 3 variables, thats only relevant when making a joker as SMODS gives the third internally. Additioonally, if added_to_deck is true, add_to_deck will not do much.
i never used 3 parameters?
mentioning here. Your intellisense was telling you that you were passing false as the card parameter.
no, i used the class:method syntax so that self is implied, passed card for the card param, and false for the from_debuff param
ok yea no im just tired i see it now. 2nd part of this message still stands
Issue with running add_to_hand multiple times, means you would probably need to remove multiple times
things like changing hand size will persist x1 after removing from deck
I'm not doing that though
lemme send a vid to show what this joker does rq
You are running add_to_deck. That is what the function does.
If you buy a credit card, it will give you the -20, when you rerun the add_to_deck it will do another -20
that's what I'm trying to do
When you sell it, remove is only ran once, so you still in total -20
like that is the core purpose of the joker
look at the video i sent, it works perfectly
So you want the effects to still persist after the joker is gone?
yes
@sturdy monolith by the way, modify_ranks(âŠ, 1) seems to work fine for me
the joker is meant to be infinitely more powerful than even legendaries
hence the insolent rarity
Okay then, when I said this message, you could have said that instead of continuing
i literally did
i straight up said that that is the core purpose of the joker
After 4 messages.
just wanna point out that i had already ended the conversation before those 4 messages
I was explaining a downside, cause you never said anything about the effects persisting. I didnt want you coming back to the joker a few days/weeks later realizing that it was doing more than you wanted
that's really really weird
maybe for some reason my edition triggers twice?
probably not checking the context properly
The reimplementation of Foil and Holo by SMODS uses
context.pre_joker or (context.main_scoring and context.cardarea == G.play)
Polychrome uses post_joker instead of pre. Not sure how this would fix double running by adding a new way to run however.
that's because Editions break the rules and are inconsistent
they work differently on Jokers compared to everything else
both as Editions but also as other game rules work
this worked
thanks
đ
wait nvm i can't remember shit, i thought it was originally an ace for a second đ
Oh?
bump, in case anyone else has something to contribute here 
yes
and for the second question idk
(went from a 3 to a 5)
add a return true in the context
I feel like I remember something similar happening when I wasnt returning anything
the elusive assert wrapping the modify_rank:
huh
you might not even need a DrawStep but it's probably the robust way to do it
if you just add the sprite to the card like this you shouldn't need to manually update its position
the important part is setting the draw_major role of the Sprite to the thing it's supposed to be following
Is there a way to make a booster pack only have a certain set of jokers in it, like the meme pack from Cryptid?

... @daring fern this might also be the solution to your seal problem
did i cook
thought it was just gonna be a way of making plasma deck useless when i read it but thats actually really cool, kinda busted with xmult jokers or glass cards though
busted how?
you go from 4 mult to 22 mult lmao
because when you start multiplying, you will always start with a significantly higher number with this joker than without
from base hand
Correct
you scale way faster in chips than mult
but
idk if its busted
well acc it kinda is? cause plasma deck 2x blind size
That also triggers only when scoring is finished
This triggers before all of that
So this is only REALLY busted if a large portion of your scoring comes from planets
yea but my argument is plasma deck includes that anyways
Includes that for sure, but the thing with this joker is that its unaffected by any enhancements or jokers, unlike plasma
i think we agree its not busted
like it is balanced by that fact
unlike other jokers ive seen that do plasma balancing
this is what makes it pre decent and definitely not a bad hit
the fact you arent held back by plasma deck scaling
yeah, definitely feels like a strong rare imo
hello ive have a question i am wondering why my modded challenge isnt loading in the game
ive looked over my code and it looks like there is nothing wrong
but im curious what yall say
is the mod itself loaded?
yes its in the mod folder
is the challenge on a separate file?
yes
easy things to check: 1) if there's a syntax error preventing the file from compiling;
- if there's a typo in a key or something
so i fix a typo and still nothing
trying to set card ability to G.GAME.dollars throws error "attempt to perform arithmetic on a nil value"
error occurs at the line card.ability.extra.counterfeit_money = G.GAME.dollars
common?
oh that's clever
tiny thing but don't {C:attention} joker
does the vanilla game not do that?
heres line 237 in src also
i love C:attentioning joker
i do it all the time
opinions
how can i make this include debuffed cards? 
only when it has to do with the mechanic like stencil or abstract
calm luh bump
question
i'm trying to look for a certain edition in hand, am i on the right track or writing bullshit
i have some errors x-x
m_gold
m golg?
Oh, wait, edition.
Which one of these looks better do you think
vanilla, none of that cryptid hoo hah
purple "the fool" imo
Editions start with e_, enhancements - m_ iirc.
gotcha :3
Should it keep the The Fool card or have like The Fool Tarot card
And if I do have The Fool Tarot should the "Tarot" be purple as well
actually i got a ui opinion question too
we gaming with this layout?
actually i think thats the most clear
you generally want to be using SMODS.get_enhancements(context.othercard) for this - it'll return a table that you'll need to iterate through, but i forget what it is you'll need to check to see if it's a gold card
i think key?
if SMODS.has_enhancement(card, "m_gold")?
am dumb, misread, etc
SMODS.has_enhancement(context.other_card, 'm_gold') will work better for your needs
has_enhancement uses get_enhancements anyway.
bump
,,.. red angry lines
wouldn't you call for debuffed cards to do a seperate outcome but just.,, make it the same outcome?
...call for debuffed cards? what?
there's context.debuffed_hand but wiki says that's for hands debuffed by the blind. not specifically debuffed cards in context.individual
like the this if im not stupid idiot
wouldn't you just do that but make the returns the same outcome?
...never card = self. đŠ
ohh.,, icic
also question
i have the this now reffering to gold cards
.., how would i check if there are 3 or more?
can you quantify how many of an edition is present in your hand?
Enhancement.
Set a local variable to 0, then iterate over G.hand.cards with a for i = 1, #G.hand.cards loop and check if the given card has said enhancement, increasing earlier variable by 1.
https://github.com/TheOneGoofAli/TOGAPackBalatro/blob/6dde042dec9e8328b84e24f49139b1adb46e707d/togastuff.lua#L1153-L1176 See for basing.
You didn't close loc_vars with a end,... and your calculate is gone?
oh i havent added calculate yet , w,
I was thinking of a joker that would retrigger planet cards once for every $10-20 the player has, thoughts on the concept?
oooh, a "space program" joker 
G.hand:change_size(number).
wait where am i supposed to look here?
Lines 1153 - 1176... though this is for checking and doing something if face cards are present at all, you could modify it to look only for m_gold in G.hand.cards cards and do something afterwards.
hmm, it's a little complicated for me, im trying to tinker with it though
ok i think progress is made, but im still def lost in the sauce
forgot a then mb
when using context.selling_card how do i check for if the card being sold is that particular joker
for setting up my own booster pack Is this correct way to do it?
picture in file of error im pretty sure
show the error
I was not scrolled down at all.
Thats from 2 hours ago đ€Ł whoops
Not sure what dofile is, but what does snack_cards.lua look like?
Do a for loop on the returned value, and run SMODS.consumable on each table inside that table
ive used dofile and its worked not sure if right way when setting up as seperate files
right now you are trying to make 1 malformed consumable
oh smart in snack_cards
I just use SMODS.load_file(path)()
fair i think it does same thing tbh
so just smake a look to call all snack cards?
i did it for the packs its in so idk if i need in both
its consumable_choices in there tho
What you did for enhancements looks to be the exact right code
would just be a copy paste and switch it to consumabels
yea those worked when i tested last night
sounds good ill do it that way.
ill luk if its still being jittery i just added a lot into game
like this in snack cards?
@scarlet thorn
I mean, yea
have another shitpost
it loves the 9 of hearts
Quick question, Im trying to have a joker destroy itself when its probability is met. I have the code that destroys the joker but it just vanishes. I tried adding "juiced_up" to the function but it doesnt work. Here is the code I have. Ignore the 0 instead of pseudorandom, its just for testing:
I'm on mobile, so I can't view those files
how does one check how many cards are of a certain suit in a played hand are there in a condition
Loop through the area and run is_suit
Context.scoring_hand is what you won't I'm 90% sure
You are smod.booster registering them, returning rhay in a table, and then you are smods.boosyering them again.
Is there a way to remove a sticker from a card once it's been applied?
card.abilty.sticker_key = nil
oh i thought u do same with pack as cards
It was the was you had it previously
But you are looping through the table
bump
Context.card.config.center.key I'm pretty sure?
ok do i need to call the packs a certain way in main?
You already are
Show the last lines of packs file and where you load the file
Looks good. Show main file
Screenshot of the error
SMODS class creators are not plural
Good catch. And the error exactly says that lol
No. That error is exactly telling you that SMODS.Boosters does not exist
Perfect thank you
Booster not Boosters
This code is calling SMODS.Boosters and SMODS.Consumables, which does not implement __call and are just tables containing injected objects.
SMODS is write
I'm not sure Boosters exists but Consumables does afaik
lol u scared me thinking its SMOD idl why
Oh yeah actually neither do lmfao
me when 9 of hearts
For some reason Jokers doesn't exist either.
They're children of SMODS.Center and use that lmao
Stickers exists
That's what I'm thinking of
SMODS.Stickers
omg ur so right
its just the way u put it im dumb man
sorry been a long day
Not sure that message was related to ur issue
Show your code again
Where you do SMODS.Booster
This is on consumables now actually
Ok
Remove them
Good
i found a way to just like basically corrupt all animations in the game with some shitty code lol could be amazing for shitposts
if there was a joker that did this (essentially corrupting all animations randomly) but also was like legendary and had a good effect would y'all pick it up?
That's what naneinf runs look like from the like 3 I've seen
still having the error so any help is appreciated!
i think im getting errors now because i have made atlas for Snack cards nad put it would that explain this
so the downside is that it's annoying đ
That's the booster not an atlas
yeah but it would be funny
Gotcha in terms of how I wrote it or something else
I have absolutely no idea
Yea I havenât touched boosters really either so itâs just been hard to get it up and running
like just a genuine would anyone pick up a joker if it did this but also had some decent effect
i think it would be funny but thats just my oppinon
Does talisman disable animation remove your 'feature'
i'll check
Run the code and show the error and the code that caused it
here's the error and code, only happens when entering a shop with the joker
What line is 485
I have a joker that creates other jokers, and needs to remember which jokers it has created. All of its functionality works perfectly, but if I exit and reload the run, it causes an error because it now has references to jokers that no longer exist. What is the best way to accomplish what I'm trying to do?
it's the end of a consumable
im going to make a thread to not clutter chat
The error is on 485. I need to see 485
error assigning g.game.dollars to joker ability
sent it in the thread #1361916600428658769 message
Yes but also no?
it appears to stop it from happening on cards and jokers but other stuff is still fair game
Save it to the joker object
Card.ability.extra.something
that's what I'm doing, but it isn't working. My theory is that the cards that are loaded in are not the some objects in computer memory, so those references now point at nothing
but maybe that isn't how Lua works?
When I try this, I get an error
Show how you save it
You copied my mobile typo. Spell ability correctly đ
You know, the first thing I did was check spelling
But that only helps if I know how to spell
the card that is supposed to be stored in the array is instead a string called "MANUAL_REPLACE"
it looks like that shows up whenever Balatro tries to save a reference to an Object
I would instead set new_card.ability.name_debuff true
The game cannot save a recursive table nor metatable, if it finds one it's converted to MANUAL_REPLACE
And on remove, loop through all g.jokers.cards and any with ability.name_debuff true, debuff it
No need to save the joker, just save a value on the new one
the only edge case I'm worried about is if showman allows multiple Liches to be created, then each Lich should only debuff the jokers it created itself
M
I think could be used
I'm on mobile, so I can't help a whole lot
also if you restart the game with this 'feature' blind details are just gone lmao and you get to have a random card plastered on your screen
Yuck.
i probably wont do anything with it but it is very funny
Did you get it working
currently working on the new solution, I'll report back on progress
I'm not using card.id cause I couldn't find it quickly in the source code but I'm just using a global counter and assigning each lich its own id on creation, giving that id to all created cards, and storing those ids in ability.extra for each so it should all get loaded back automatically
Hey guys, any clue how I could Upgrade the most played hand by the number of time least played hand was played?
Still doesn't work.
If you restart the game, and get a new lich, then the ID could be duplicated no?
You would need to save it on the game variable
What's the issue?
I'm trying to draw a second seal on a card.
Unless there are builtin functions, you would have to loop through the hands and save the lowest and highest
well how do obelisk and supernova determine these statistics 
Mmm. I could look into it tmr but I'll prolly forget
I have no idea I'm on mobile đ
well, from flipping through them quickly, i can see that the items in G.GAME.hands have a .played var so 
Yea. If you search through my recent messages, I actually explained the exact solution previously
hmm
does every field on game get saved automatically
Try this: ```lua
local tempuse = 0
local lowtempuse = 10000000000000000000
local hand
for k, v in pairs(G.GAME.hands) do
if v.played > tempuse and v.visible then
tempuse = v.played
hand = k
end
if v.played < lowtempuse and v.visible then
lowtempuse = v.played
end
end
if hand then
level_up_hand(card, hand, nil, lowtempuse)
end
I'm pretty sure, but not entirly
anyway if any of y'all want this for shitpost reasons heres a joker that will just randomly break animations
SMODS.Joker{
key = 'test2',
config = {
extra = {
timer = 0,
}
},
loc_txt = {
name = 'animation test',
text = {
"animation test"
}
},
rarity = 1,
cost = 5,
atlas = 'Jokers',
pos = { x = 0, y = 0 },
blueprint_compat = true,
update = function(self, card)
local extra = card.ability.extra
local fps = 0.1 -- corruption speed higher number is faster lower number is more extreme but slower
local current_time = G.TIMERS.REAL
extra.timer = (extra.timer or 0) + G.TIMERS.REAL
if extra.timer >= (1 / fps) then
extra.timer = 0
G.TIMERS.REAL = 0
end
end
}
holy cow it worked
just like
first try
that's not how coding is supposed to work lol
So cool
thanks for the help!
Thumbs up
Most played hand is definetly a thing because one of the blinds uses it
and telescope
It wouldn't have to be a function though
It could still just be a loop
but the code is there somewhere for reference
Exactly
Tried this in the spectral card and use was greyed out. I might of done it wrong tho its my first consumable
This was brought up already
What did you put in the can_use function?
how do i do the joker pulsing animation ala DNA, trading card, invis, etc.
Oh sorry thats my bad, still new to
While something juice up
Or yea juice up until
Sorry if something here's wrong
Put ```function can_use(self, card)
return true
end
@daring fern I've 100% seen that while code somewhere
is there a correct way to hook into the card.hover function to provide functionality for a specific joker?
do I just have to do the normal hook thing?
What do you mean?
and check if it's my joker
Like how lucky cat has the lucky card text?
loc_vars and generate_ui might be what you mean. It would be the same place as ur Calc function
(Slang btw)
Wherever you put that, the game hard crashes.
I'm not sure I get what you mean by lucky cat, but I want clearer UI for which jokers are tethered to a given Lich, so I'd like to highlight the stickers on those jokers (change the sprite of the sticker)
but I want that to happen only while the Lich is currently being hovered
Mmm
In lich's update function,
If card.states.hover then
For all jokers connected to lich
Juice up until
It would do the dna shaking, and you can possibly figure the rest from there
didnt fix it Im afraid
Show your code.
I've put it in the wrong spot havent I
It needs to be outside the use function.
Yes
It's like the use func
You also need to put the variables in the code I gave you back where they were.
Show your current code.
Change it to can_use = function(self,card) at the top.
Okay so it works functionally now
except
When it uplevels it just shows the numbers
Its very ominous
Put this instead of the level up ```lua
update_hand_text({sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3}, {handname=localize(hand, 'poker_hands'),chips = G.GAME.hands[hand].chips, mult = G.GAME.hands[hand].mult, level=G.GAME.hands[hand].level})
level_up_hand(card, hand, nil, lowtempuse)
update_hand_text({sound = 'button', volume = 0.7, pitch = 1.1, delay = 0}, {mult = 0, chips = 0, handname = '', level = ''})
Thank you so much for your help! :)
is there a way to "win the blind"
I wonder if there's a reason the level_up_hand function doesn't just include all the needed functions to properly update the UI
you could check the debug plus mod code as there's a Win Blind button
yeah i was just looking at that right now but couldnt seem to find it
awesone thank you so much
it probably wouldn't be too hard to make a function that wraps all the hand upgrade behavior into one line instead of a bunch
I was thinking of making some kind of hand upgrade utility function, I already have a variant called level_up_hand_fast that just does the same stuff but two times faster
does anyone have an example of a context that triggers once after a hand has been discarded? would be apricated
pre_discard is pretty much that, it has access to all the same stuff discard has iirc, just not happening once per card
I'm pretty sure it's just called pre_discard because it happens right before the loop, and discard happens during the loop, for each card
yep, checking the code that's pretty much the case
How can i improve the writing here? i feel this doesn't suffice.
Does it have to be played?
yes
so close.. yet so far..
anyone know how i would create a copy of a consumable that was used from a booster pack as part of a joker effect?
this is what i have so far and, unsurprisingly, it doesn't work
don't really understand the logic of the copy_card function
seems about right but obviously very strong
maybe you could make it rankless and suitless as a balancing measure (?)
light work coughs blood
Rise.
I'm trying to put sleeves on playing cards
1.5 MB, 28416x128 2x image asset
and that's slightly optimised - if i optimised it even more, it'd probably only go down to 1 MB and 21248x128
i hate weird animated sprite bs hhhhhh
fuck it, send it.
Full send graaaaaahhh
can balatro handle a 111 frame sprite that's literally just for a meme and nothing else
I'd imagine it can
well it didn't like bad apple being one line when i tried to do that and that was roundabout the same amount of frames at similar dimensions
might probably run into the power of 2 issue
well the base joker atlas has >150 sprites so you'd probably be fine
You can cheese it by not relying on an animated atlas and iterate throught the frames manually via a Game:update hook or in the card's update function
cryptid and morefluff do this for jimball / hyperjimbo respectively
That's how I do it with my 4D Joker so I could have an actually nice looking sprite sheet. Jimball from Cryptid uses the same method
yes, i wrote something for this case when i did bad apple
And you made it one line of sprites??? 
Changed the ability a bit, and took Notmario's advice to make it rankless and suitless.
Insane for stone builds
that was easy
and with extra speed functionality to modify the level up animation
this function name sucks though
I could probably figure out adding a field for text override to allow the function to do stuff like black hole
hey, how would i fix my code? the it only triggers after any context, but not instantly
What do you want it to do?
no. i did not - i tried at first, but it wouldn't load properly.
trigger it instantly instead of waiting for the next context
Biblically accurate sprite sheet
No I meant what does the joker do?
Oh how fun
calculate = function(self, card, context)
if G.GAME.blind.in_blind and context.selling_card then
if context.card.config.center.key == 'j_csmr_edgard' then
ease_chips(0.75 * G.GAME.blind.chips + G.GAME.chips)
end
if G.GAME.chips >= G.GAME.blind.chips then
G.STATE = G.STATES.HAND_PLAYED
G.STATE_COMPLETE = true
end_round()
end
end
end
i am checking for chips being higher than chip requirement and im ending the round but the round doesnt end until i play the next hand
what am i doing wrong
You need to remux your video.
remux?
gain mult when you fill every jokie slot
one second im rerecording
Does ease_chips by any chance run an event? That could be messing with the timings
maybe, im not too sure, let me check actually
So if you buy a joker and your left with 0 slots left it will upgrade?
If it does thatâs probably your problem
I donât think that really matters
so whats the issue with it being an event?
yeah, but not always buying. like judgement
context.card_added and context.card.ability.set == 'Joker' I think.
Your check for if G.GAME.chips >= G.GAME.blind.chips is happening before the event is carried out, therefore itâs comparing âoldâ chip counts
I think your solution could be to put that comparison in an event itself
ah i suppose i can just change it to G.GAME.chips = 0.75 * G.GAME.blind.chips + G.GAME.chips
instead of using ease_chips
right
You could but thatâd lead to some weird side effects I think, i.e. the text not displaying properly
ah
doesn't work
is in fact, worse
because events happen in order?
Correct
okay bet let me try, thank you
đ Here's what my DriveSpace Joker does with the Blind requirement if it helps any.
nope! no workie
What's the toggle for?
for tetsing mainly
calculate = function(self, card, context)
if G.GAME.blind.in_blind and context.selling_card then
if context.card.config.center.key == 'j_csmr_edgard' then
ease_chips(0.75 * G.GAME.blind.chips + G.GAME.chips)
end
G.E_MANAGER:add_event(Event({
trigger = 'immediate',
func = function()
if G.GAME.chips >= G.GAME.blind.chips then
G.STATE = G.STATES.HAND_PLAYED
G.STATE_COMPLETE = true
end_round()
end
end
}))
end
end
would this be the way to go about it
Yeah that looks right
for testing mainly, but also if i wanna add an animation
awesome let me try
just a return true should do yeah?
Mhm
awesome thank you :)
Would this not work? ```lua
if context.card_added and context.card.ability.set == 'Joker' and (G.jokers.config.card_limit - #G.jokers.cards + G.GAME.joker_buffer) == 0 then
return {
message = localize('k_upgrade_ex'),
colour = G.C.MULT,
card = card
}
end
lemme try the buffer thing
Hmm
yeah i tried printing it
it shows old chips
before ease_chips run
even though its after
calculate = function(self, card, context)
if G.GAME.blind.in_blind and context.selling_card then
if context.card.config.center.key == 'j_csmr_edgard' then
ease_chips(0.75 * G.GAME.blind.chips + G.GAME.chips)
end
G.E_MANAGER:add_event(Event({
trigger = 'immediate',
func = function()
print("reqirement:" .. G.GAME.blind.chips .. " chips")
print("current:" .. G.GAME.chips .. " chips")
if G.GAME.chips >= G.GAME.blind.chips then
G.STATE = G.STATES.HAND_PLAYED
G.STATE_COMPLETE = true
end_round()
end
return true
end
}))
end
end
im going to just add a delay
Interesting
@daring fern
So it's working?
perfect.
when the dumbest stuff works
i mean i dont understand how an event that is after the first one, runs before the first one
how would i change the shop texture with a texture pack?
Probably some weird handling of immediate event triggers 
true
What do you mean?
I feel like you did something wrong since the sprite isnât attached to the card
i did what you told me to do 
Also when testing if a card could be destroyed I recommend using Card:can_calculate(true) and setting Card.getting_sliced = true instead of a custom variable (if itâs immediate)
Yeah but it didnât work so you adapted something incorrectly
all you said was to set the sprite's .role.draw_major to the card. which i did, as i showed
what else was there for me to do
Well, you can see it didnât work, so something wasnât adapted correctly
Setting an objectâs major to a different one is how thunk makes them move together
You can read their comments explaining it and see how itâs done in vanilla
chat how do you make tags give xmult
Idk you probably need a new Tag type
build tags into the calc pipeline
New SMODS API when
Right, Bunco has xmult and xchips tags...
How many sips does it take to finish a full mug of beer?
(What initial-count-down number should I give to a beer-based food joker?)
I think it should be as simple as just adding the tag area as a card area
But maybe not
But it should also handle removing the Tags and playing the iconic Tag sounds
100
i've got it working but the message isn't placed on the tag
(this is using a lovely patch)
Also Gawr Gura graduation :a
I mean Tags already do that themselves, you should still call yep when theyâre done
And Iâm saying there should be a return value to automatically remove them, or not remove them
And maybe customize how itâs removed
Done without calculation
Although if you look youâll notice the Tag got removed when accessing a Pack
I have tags that give both + and X mult, if you want to yoink my (admittedly quite bad) implementation (or use me as a dependency and use the context i add)
Bunco does that, no?
i did not know that
I love that the tag conditions are called yep and nope
does anything in vanilla even trigger tag:nope in normal gameplay? I know it's called once but I couldn't quite understand the code and i've never seen it in gameplay
If you have all of a certain rarity and you have one of the tags and no showman it nopes.
Huh, I guess that makes sense
So I'll never see it in my life with my pool of 1500+ jokers, lol
huh, I could've sworn I tried spawning in all rares and the rare tag just made jimbos instead of nope-ing?
Maybe it nopes into a jimbo?
Idk
Nevermind I just checked and it's only rare tags.
Went are they programmed different, lmfao
Wait... isn't showman an uncommon?
yep, because uncommon always has showman, unless you do have showman in which case it doesn't matter
showman is technically the default uncommon as a result... technically
oh huh. I just tried it again and yeah it does just nope once the rare pool is empty
What if you have 2 uncommon tags? It isn't supposed to spawn 2 showmen
I wonder what happened last time
Ngl I'm not sure I've ever picked up showman unless I'm already running dozens of jokers somehow or another
What if Showman is debuffed 
it just spawns a jimbo as the second uncommon
since it follows default pool rules instead of forcing a nope like rare tags do
the art disease is infesting my mod...
so true...
-# i actually think the main reason why people dont want to try out my mod is because everything's sprite is the same
And then on the other side of the coin there's all the fan art jokers with no code
maybe there will be more people willing to try out my mod when all the art is finished, who knows :p
âcool đ, what does it do?â
You are likely correct
Mood
Artists get free programmers but programmers donât get free artists ;P
There already was a GIF for that
i make a sheet like this when i need temp art. not a ton of effort but makes it way more playable
I get that lmao
is there a check to know if a certain consumeable has been used?
Ever? Retroactively?
no, in context.using_consumeable
although id be curious as for retroactively too
retroactively, not without setting it up yourself (though it wouldn't be too difficult). It'd just be a hook, I suspect, that sets values in a hash table
if context.consumeable.ability.set == "Tarot" and context.consumeable.ability.name == "Death" then though you're better of checking for keys, I think, if you don't want it to be a vanilla item
yeah for example
does it have to be both context?
is the checking for death not working if no check for tarot?
Always check for keys
technically not. This is from an old joker of mine, so the implementation's shoddy, haha
keys are like c_death?
Yes
yesss
You can do Card.config.center_key
is it not center.key?
seems both do the same thing(??)
oh, interesting
I don't know enough about centers to know why, but center.key and center_key both work
if context.using_consumeable and card.config.center_key == 'c_neptune' and not context.blueprint then
did i insert it wrong?
it cuts the if when i add it
nothing wrong with redundancy i guess.
it's context.consumeable.config.center_key but yeah
oh sorry thank you
card is always the joker that's calculating. It needs to be context.consumeable.config.center_key instead!
What they said
I say Card because itâs the class
But you need to find the correct instance of the class
thank you!
how do i get the current game speed 
If assert(false) then the speed is set to nil 
I'm bad at pixel art and good at coding.
-# it crashes your game
