#💻・modding-dev
1 messages · Page 455 of 1
and it says remember to top up bcoz i do want to add the to ups
the coffee value can be anything
yes, this is before the break
this is while it's broken, which (with the if statement readded) seems to only happen to the exception jokers i have
and the other bits
if you pay close enough attention you can see i forgot to change mult to xmult
i noticed that instantly
its too late the shame has set in
ok the problem is: i still dont understand what your joker does lol
me neither, and I've tried reading the code you usually show in this channel
you've been at this for days
*weeks
D:
i need to rename coffee bean to coffee pot so i can use the consumable name as coffee beans
what is the intended effect of your joker
or make the consumable type coffee
then i need to craft up whatever whchcraft u have done so i can use it
the type is coffee but the actual consumable will be coffee beans
SMODS.Joker { -- Decaf Joker
key = "decaf",
blueprint_compat = true,
eternal_compat = false,
rarity = 1,
cost = 5,
pos = { x = 1, y = 15 },
config = { extra = { mult_loss = 5, coffee = 60 } },
loc_txt = {
name = "Decaf",
text = {
"{C:mult}+#1#{} loses {C:mult}#2#{} Mult per round",
}
},
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.coffee, card.ability.extra.mult_loss } }
end,
calculate = function(self, card, context)
if context.end_of_round and context.game_over == false and context.main_eval and not context.blueprint then
if card.ability.extra.coffee - card.ability.extra.mult_loss <= 0 then
card:start_dissolve()
return {
message = "All gone!",
colour = G.C.RED
}
else
card.ability.extra.coffee = card.ability.extra.coffee - card.ability.extra.mult_loss
return {
message = "-"..tostring(card.ability.extra.mult_loss),
colour = G.C.MULT
}
end
end
if context.joker_main then
return {
mult = card.ability.extra.coffee
}
end
end
}
then i will have milk, sugar, all that stuff
SMODS.Joker { -- Dalgona Coffee Joker
key = "dalgona",
blueprint_compat = true,
eternal_compat = false,
rarity = 1,
cost = 5,
pos = { x = 2, y = 15 },
config = { extra = { mult_loss = 0.4, coffee = 2 } },
loc_txt = {
name = "Dalgona Coffee",
text = {
"{X:mult,C:white}X#1#{} loses {X:mult,C:white}#2#{} Mult per round",
}
},
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.coffee, card.ability.extra.mult_loss } }
end,
calculate = function(self, card, context)
if context.end_of_round and context.game_over == false and context.main_eval and not context.blueprint then
if card.ability.extra.coffee - card.ability.extra.mult_loss <= 0 then
card:start_dissolve()
return {
message = "All gone!",
colour = G.C.RED
}
else
card.ability.extra.coffee = card.ability.extra.coffee - card.ability.extra.mult_loss
return {
message = "-"..tostring(card.ability.extra.mult_loss),
colour = G.C.MULT
}
end
end
if context.joker_main then
return {
xmult = card.ability.extra.coffee
}
end
end
}
SMODS.Consumable { -- Coffee Bean
key = 'bean',
set = 'Tarot',
pos = { x = 4, y = 0 },
config = { extra = { coffee = 1.5 } },
loc_txt = {
name = "Coffee Bean",
text = {
"Multiply {C:attention}Coffee{} cards by {X:mult,C:white}X#1#{} Value",
}
},
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.coffee } }
end,
use = function(self, card, area, copier)
for _, v in ipairs(G.jokers.cards) do
if v.ability.extra.coffee then
v.ability.extra.coffee = v.ability.extra.coffee * card.ability.extra.coffee
SMODS.calculate_effect({ message = "Refill!", colour = G.C.MULT }, v)
end
end
end,
can_use = function(self, card)
return SMODS.find_card("j_modprefix_key")
end
}
there
soryr for the flood
i dont have nitro i had to send invidviual messages
pls dont take out your torches and rakes
lmao
return SMODS.find_card("j_modprefix_key") what specifics do i put here
coz i want it to work on all the jokers
but if i put in an id then it would only do that one ?
Oh BTW these are like
Each line is a different joker
(Ehnancement and glass is one uncommon Joker, chips of last played hand is another uncommon Joker.
this will always be true btw
oh so just leave it as is
there are two main components to this
- the costume, a fodder joker that just picks a random joker to disguise as to serve as a transformation for ijiraq WITHOUT me having to program in 150 joker files
- the exceptions, jokers with effects that can't be copied with the costume (conditions seen in the second image) or if i want to create a custom effect which the costume will use instead
the patch is to make the actual effects get transmitted properly, which, when setup properly works. but ONLY for the costumes? the exceptions' effects don't activate, and they don't transform
no I don't know what you're talking about but that is the same as return true so it doesn't make sense
in can_use
oh does the patch work for everything that's not an exception? or did i misunderstand?
oh yeah i forgot to change that value lol
no that’s exactly it
Everything COSTUME related, not every joker lmao
that can is only a thing that makes it so you cant use coffee beans if you have no coffee cards
ohhhhh
can_use = function(self, card)
for _, v in ipairs(G.jokers.cards) do
if v.ability.extra.coffee then
return true
end
end
end
put that there
hmm still seems complicated sorry lol
I almost sent a sticker
whats that one balatro mod that adds those little buddies on your screen
like a tiny cuter version of cards
partner
thanks
is there a way to uncomplicate it…..
@drowsy heath you could look at the partner mod and make something with it lol
no the code is probably on the right track it's just the effect itself is complicated
i would need to know more about it to help
about the code i mean
the partner mod ?
I didn't even understand the joker
it’s never been more over
what could i do with that tho
- There’s a Joker
- It disguises itself as another Joker in the game
- When the Joker is triggered, It takes off the costume, but keeps the effect of its costume
- The effects stack
It can have more than one costume right?
So is it disguised when you first find it
Or when does it get a costume
yes, the costume changes per ante
yes
literally start of your run
Does it put a new costume on if you’ve already revealed it?
about the ijiraq or its costume
@hidden sable help
everything lol
they are basically mini jokers that stay with you through your whole run
whas the last thing you did
yesish, but having multiple ijiraq at once isn’t possible, as they destroy each other, leaving one
basically if you have ijiraq, you can still find a costume, triggering the costume will turn it into ijiraq, which will destroy the other ijiraq
the ijiraq will have the effect of its initial costume and any other costumes you find
and how do you find new costumes
so i erm made the consumable and the consumable type run in the main lua after putting the coffee beans in the coffee consumable type, it worked in the collection page and i saw it but then loaded into a round n crash
how do you target all jokers to the right
theyre all in one joker
so find the joker
Trigger the joker
costume gets added to the list of effects
shwo code
for everything you added
I think I get it
and the part you currently need help with is triggering the effects of all the jokers?
- costume
- costume's transformation function that gets called once joker is triggered
- override that handles per-ante costume changing and also resetting of the effect table
- override of usage of the costume's transformation function
- ui code overrides
- example of an exception's transformation code (troubadour in this case)
wait what i was suposed to change that wasnt i
i didnt know what to change it to i got confused and must have eft it
solely the exceptions (exceptions need to be created when the costume's code doesn't apply to how the joker works) (or when i want to do my own effect for the fake joker), which override where they'd be in the costume's selection (example: if the costume would pick troubadour, it wouldnt, because there's an exception for it. the exceptions take priority)
@hidden sable what do i put there
@drowsy heath
is there anything you dont get at all i can try my best to explain
what does one of those exception files look like in its entirety
it isn't very clear in the pics you sent
at least to me
here's troubadour again
i was absent for that lesson mb teach
Oh so the exceptions are actually different jokers
well it didnt work and now im even more confused
and is Transfodd the actual function that is used when getting a new costume, the one that adds it to the list of copied effects
okay so nevermind it did work but not on the jokers i designed
i need to work it in to them tho
transfodd is how you get from the costume to the ijiraq, but yes it adds the key to the table
getting a NEW costume is done in the third image of those 6
the exceptions also have this
but they use a version of it that uses card instead of self
so if I understood correctly, what you'd want to do is, in the function where it sets the fodder_card.jkey:
- reroll the key until you get a joker that isn't an exception or
- if it's an exception but it has a replacement use that key instead
but I'm not confident I understood the problem entirely yet
yeah that's what it does already
the transformation isnt broken
the problem is that exceptions' effects don't activate at all
nor do they transform
ok so @hidden sable i have the things all working now but they only work with you joker which uses the coffee in its code yet mine dont use that, is there a way for me to make a list of accepted jokers on the consumable instead of reworking my jokers
can you send the hpfx_Transform function
you may find it similar
this is the same function
except it uses card instead of self
this is because the Costume uses self to function properly
@red flower could you help me with this
Oh I see, that's just for going back to jiraq
i just need to let the consumable know which jokers it can effect
without reworking my jokers
yes
So the actual effect of the troubador exception happens in add_to_deck and remove_from_deck
which is what's presumably not triggering
it happens in context.after
But the only thing it does in context.after is transform back to jiraq
which it does not
since adding the patch, the effects of specifically the exceptions are being blocked out
somehow
is this the same as the pool from before?
the code ratmilk gave me for the consumable it effects jokers that have coffee written into them whereas my other jokers i made just have coffee as a pool
Can you resend the patch again and the definition of exceptions
so they are not picked up in it
is there a way to add a list of accepted jokers to the consumable instead of changing all my jokers to work with coffee as that makes the obtype pointles
ill just hsow u the consumable code u will understand
just change v.ability.extta.coffee for (v.config.center.pools or {}).coffee
in the function at the bottom
or in the middle
ill do the one on line 17
wait all of them ?
just make your coffee joker use coffee for its mult instead
extta
the exact thing im trying to avoid is reworking the jokers
yeah the problem is that you need something in the card's ability to multiply
sadly you were already blocked
where did this battle start
duble block me
just chill behave
Can you print the return value of calculate_joker alongside the key it's currently copying
do you mean ret or something else
oh in the patch i thought you meant the override one
just to confirm, right now it works properly with every other effect, but when it reaches one of your exceptions it doesn't transform back to ijiraq and stays as that exception
yes
and the actual effects of the exceptions dont activate either
be right with you
i have a joker which changes which rank will trigger its conditions each round, but I cant figure out how to start it at a random rank. whats the process for this?
can you do print(k, joker)
just to know whose return value it is
Ofc ofc
also is the functionality of this meant to be the exact same as Transfodd
literally yes
they have differences
besides one using self and the other card
if those aren't intentional then you shouldn't have two separate functions that do the same
huh oh no those are
?
INFO - [G] j_hpfx_ijiraq
INFO - [G] test
INFO - [G] j_hpfx_ijiraq nil
INFO - [G] j_joker nil
repeat a billion times
was it only copying j_joker
"why am i sending a costume instance?" i did not gain 4 mult. so now i dont know what the hell is going on
it was in fact the costume of that ante
it can only copy jokers that would turn into the guy by the way
you cant somehow give it a blueprint and now it's blueprint
it would have to be specifcally the fake (exception in this case) version of it
so not even j_joker worked?! 🤔
can you try removing the calculate function from your troubador exception
as for what i did:
- started a run
- spawned the costume (
eval SMODS.add_card({key = 'j_hpfx_costume'}) - got splash (this will not work, the exception hasnt been added yet either)
- restarted
- spawned the costume
- got jimbo
- went into a blind
- played a hand
- no mult gain
- transformation occurs
- close game
if j_joker actually turned back i suspect that stuff you put in the exception is messing with it
...what would that do?
this
the troubadour is a whole different file though?
yeah but troubador exception is the one that's not turning back right
well do all of the exceptions have the same context.after part
no
can you show me the code for an exception you have tried
here's raised fist
do all the exceptions have an hpfx_Transform call
and if so, can you try without it
i mean i guess i can? i dont know what you expect to happen but
sure ill take it out of raisedfist and try and get it
anyone know what this is?
check if the repo has a wiki section
no effect trigger, no transformation
the prints?
which of the prints is that, surely not the print(k, joker) line
is it the first print in the payload
or did it ever print test
of course not
there was never an ijiraq
and the table was never calculated
because the card never transformed
anyone know how to add partners
isn't that due to this line in the costume
that's for the variable
Yeah but it worked with j_joker cus of that variable, no?
but if any of your exceptions are made from the costume then they won't be considered ijiraq due to this
is that not correct or am I missing something
isIjiraq is (mainly) for transfodd
you'll typically see or because again
they're exceptions to the costume's rules
hi, trying to create a variable like mail in rebate, where would i create a variable like this?
since i can see it's not really part of the joker itself
either in your overrides or your main file it's one of those
well, my logic was j_joker never calls hpfx_Transform in its code, and yet it transforms back
because it calls transfodd
it's not an exception
okay so i fixed everything
random number from 1 - 13
i made all new coffee jokers that work with the consumable
AND they also work with the coffee pot
so i get mult from them
i guess i dont need as much help as i thought i did
but your exceptions that don't transform back have an hpfx_Transform call in their calculate, which is ran when you call calculate_joker
that was pretty much my line of thought here
did you add the glink nugget typeface?
i wanted help had issues and ended up without it an found a solution, its ugly and oh it is but it works
im fucking with you
which worked
beFORE i added the patch
ever since ive added the patch is when this "effect'nt" thing started
add latte that gives xchips
im also making a chips variant of the coffee pot so you can get Xchips per coffee cards u have too
espressooooo
latte gives base +20 and nothing else i want one that doesnt expire
i want to add things that help with other decks such as plasma thats why i want xchips rlly coz plasma is fun and everyone mains chips on there
wait, what does G.GAME.raqeffects look like once it has copied one of your exceptions
This code is all over the place I'm now more confused than ever before
well when it actually did
it adds the key of the joker it's PRETENDING to be to the table
example:
braised fist triggers, turns into ijiraq. While it is turning into Ijiraq, it adds j_raisedfist or whatever it is to the table
braised
is defining it just as simple as this or is there extra steps i gotta do
in that case wouldn't your patch never be running your exception codes and only the original ones
if for an exception it added the original key
don't you want ijiraq to replace troubador's behaviour with your exception's
not the actual troubdaour
the costume version
which already works
so the costume version of the exceptions is the one with a different effect, the actual copied effect is the original one
does anyone has a blank voucher template?
adding to the table worked fine as well too
but i cant add to the table
if the joker cant transform
okay so this is the mean in which non-exception jokers turn into ijiraq again right
yes (note the transfodd)
oh sick
thank you
and thru what means are exceptions meant to turn back to ijiraq
hpfx_Transform
hi somecom
hi also smt and hyper and srock and lurkers
i was joking if we're fr
youre just like one of the 2 people that didnt use toma so i found it funny
my preference is: "whichever one tells me you're talking to me"

do you guys ever play vanilla
i want to
the problem is whenever i make mods for some thing i decide my mod is the objective best way to play the game
just like deltarune 3/4
i did it for lethal company and this now
oh i dont have that issue ever
i was coding a joker that gives you money and self destruct itself when they found a specific joker in a shop
the thing is
i dont know what joker
would i want it to be
😭
yes you do
im not putting common joker
(obelisk)
you're crazy
oh im insane
i'm lost
i have the issue all the time
lategame upgrades for lethal i think is the goated way to play, and since i only ever play my mod i think its the best
the only other things is i intend on trying out all ym friends mods when im release ready
its not that i think im better than everyone elses
i just only ever see mine lmfao
hi dilly the dillster
MAN 😭
where'd i lose you
do you have your code in a public repo or smt so I can try it out
I need to see this with my own eyes or I feel like I'm gonna go insane
literally yes actually
let me push this out so it's up to date for you tho
good commits
thank you
i also think good commits
double thank you
im gonna add a partner thing to my mod and i wanna make it where it detects consumables not jokers is that a thing i can do?
Yes.
what have you done, no joker works
no, but, literally none of the jokers work, not even related to ijiraq
yeah
i know
I wasn't aware this was an issue to begin with
only the transformations work
also can i make partners have their own "voicelines"
it comes and goes
"how"
i am in this channel for a reason
i am going to explode into a million pieces
helloo, trying to figure out how to change this code to switch every time a boss blind is defeated, rather than at the end of the round, is there a simple change to do this?
hooking into Blind:defeat might be better?
i will put you back together so you may resume assisting
try not to mesh with my 1 million pieces
did you try print checking yet? see if something doesnt get reached?
did you forget the question
each of my pieces will explode into a million more
I'm pretty sure I put prints and asserts everywhere, and they all passed.
i can fix you
(said by the utterly sane)
no
oh my god the r in srockw stands for fRactal
you have to declare local jokers, triggered before entering the if, the ones in the else statement are only alive during the scope of the else statement
i posted that here to show theres something about individual quips
that solves the jokers not triggering
as for ijiraq, I don't even know how I'm supposed to get it ingame
But how do you get it without spawning, or is that not implemented yet
literally find it
I see
ijiraq itself is not in the pool
okay well that works I guess
here's a list btw
well now that your jokers trigger again you can probably find the issue....
but i'll try
im so tired of the smart people here calling themselves stupid cause what does that make me smh
stupider
D:
ur just being mean to me because u think im cool
lmfao
did this actually fix it btw
sometimes thats all you need
okay well i just tried with making the fodder_card j_raised_fist, spawned costume, after triggering it turned into ijiraq, then I played a hand with ijiraq and it triggered the effect
so idk
this is what i changed
four lines.
actually no that last one is barely a line you jut removed local
it took three lines
also here you need to remember calculate_joker returns two values
OK WAIT IMPORTANT THING
better it takes only a few small changes than needing to redo it all
DOES IT STACK PROPERLY
haven't tested that
i've been working on this joker for weeks
i only started working on its own effect last week

this is right its just another / for a subfolder yeah ?
just coz i had alot of them and it was a pain to keep it in a big list
now ik what im looking for
yeah
"folder/another folder/another another folder/you get it/file"
it's like file explorer
or. you know. a filepath
it properly copied both raised fist and j_joker
orange cat it is
okay so we should've started with "all the jokers stopped working"
would've saved us a couple hours
also those print statements are super laggy, remove them when testing or your pc will explode
oh no i know dw they're gone
i was sending you walls of print of course they're laggy 😭
tho it seems it copied the exception of raised fist rather than the original one
so what exactly isnt happening? like how much of this IS working
what.
probably due to hpfx_Transform adding it directly
wait that's right i removed the
It's hooking the event function, but the card isn't changing so the game crashes.
thing that swaps the thing around
let me put that back in transform
brutal 😭
also would you like your 500 thank you's receipt online or printed
they can be in the commit description that fixes it
i hardly deserve them anyway, we spent 2 hours talking about stuff that wasn't the issue at all
but if we didnt
would it have been figured out
ngl yes, the issue was such a minor thing
can i be in denial in peace srock
You need to check if scored_card exists first.
yeah idk why i removed this (i know i forgot the do)
how
if scored_card then
done
Hey all. I know this is probably a stupid question, but I'm super new to all this and I can't figure out why this line in my challenge code isn't working to put a spectral card I created in at the start.
The cbfk is the mod prefix I'm using, and I've tried without the c, without the cbfk, without both, and it never puts that consumable in at the start of the challenge.
Is the key spectral_prism?
Yep
It's consumeables
For more context, the initial config of the spectral card:
Can provide more if helpful
Yes, the problem is you called the table consumables instead of consumeables
omw... -facedesk-
that's
's fault
Geeze, I see the confusion now. Thank you for the quick clarification.
it will happen again so dont stress
after 3 times it's your fault for being literate (i am joking)
is it possible (and if it is possible, how?) to have the blueprint compatible thing appear twice on a joker? for example if I wanted to have a joker that retriggers jokers to the left and right under certain conditions
Yes and 🤷 .
not again,.... god not again.....
Question: can i have a table that contains a return and it's table?
You cannot return in a table.
noted
If I wanted a joker that gained had size per obtype joker I have is that possible
you put 501
you're a programmer, why'd you count
Yes.
just let computer do it
how do i turn a card negative if i have the cards reference, the reference could either be a consumable, joker, or playing card
it’s more special if it hurts
Oh is it easier said than done or fairly easy

ref:set_edition('e_negative')
trying to implement a joker that levels up hands 3 additional times when a planet card is used, current code doesn't work. anything I did wrong here?
it will handle the diff types of negative automatically
Is there a joker from a mod i can use as an example that you know of
that context is not from smods, likely one whatever mod you got this from made
i mean if its not conveniently possible then im totally fine with just adding a (checks compatibility of joker to the right) clause but
would be cool
not to my knowledge
it’s not too hard to do if I’m thinking it right
i can see that the description takes main end and only main end
tried a main_end2 and it didnt add anything extra and i tried changing the original to main_end3 and it removed the compatibility thing completely so
you'd want to make main_end a column UI element that has two rows, one for each compatible thing
ooh i see i see i think im seeing the vision
its really interesting to see how this stuff actually works
Could she use if context.using_consumeable then?
any way to remove the effect where the whole shop goes down
yeah but it'd require more logic than just returning the amount of extra levels
ohh my PEAK
the funny thing
its actually flipped right now for some reason LOL
easy fix though
anyone?
this description is beyond peak
have you tried not using a consumable
no i want a consumable
<3 i like to have a fun one before its functional it keeps morale up
one day i like set up 5 jokers that didnt do anything with the intention of setting them up one by one and the description for all of them was "this joker does something amazing!" i was saying that phrase in vc like the whole day
i found out by playtesting my mod is somehow on equal level of balanced as base balatro
im shocked
i managed to not pull a cryptid
I'm trying to remove the edition from a joker, why doesn't this work
(I'm assuming the first parameter in the set_edition call, "nil", stands for no edition)
how do i get a cards edition
what's line 107 of your jokers.lua file
how can i check if its negative
if card.edition and card.edition.negative
k
How would I check for unscoring cards?
context.cardarea == "unscored"
is that an optional feature 🤔
am i defining this right
you're better off asking in the thread for this mod
No.
the thread is dead sadly but ill go there
yeah im honestly stumped as to how I could implement this just using smod contexts
i guess it's not optional anymore
Rare Astra question
What would the context combo for me be to have this booster spawn and open at the start of an ante? Ignore the current combo because it does not work lmao
im sooo confused trying to get this to work
try looking into lcorp's code, in one of their challenges they have it so a booster pack is opened at the end of ante
it should just retrigger both jokers when the criteria is true (once every 4 hands) but instead it does nothing besides throw a weird error into the console the hand after it's supposed to trigger
Oh bet
store the return value of each blueprint_effect call and return SMODS.merge_effects { eff1, eff2 }
wdym by store return exactly?
No, it would be SMODS.merge_effects({eff1, eff2})
weird, but fixed
local eff1 = SMODS.blueprint_effect........ etc etc
This doesn't seem to be working, which contexts should I be using here? I just want the joker to gain xmult for every unscoring card.
if context.main_scoring and context.cardarea == "unscored" and not context.blueprint then
card.ability.extra.x_mult = card.ability.extra.x_mult + card.ability.extra.xmult_gain
end
ihave this and it's not throwing the weird errors anymore but its still not triggering if theres anything else i missed
in the 2nd loop you're still assigning other_joker instead of other_joker2
also you don't need two loops for that
you can do both assignments in one
ohhhh my god 😭 ok good catch and ty
managed to find the toml file which adds the context but putting it in a different toml file still doesnt seem to make it work
That was the ticket, thank ya tons
very stumped
Where did you put the file
main_scoring isn't called on jokers.
that looks good, what's the actual contents of the file
What should I use instead? It increases multiple times if I just remove it.
ohhh it works its just like a hand behind for some reason
context.individual
i got some weird bits to work out i fear 💔 but its functional !! ty everyone
if i wanted a consumable to make something lucky would the edition be lucky or lucky_card or something like that
i'm unsure if toml need to be called within a main.lua or not???? from what i parsed they execute automatically
can you go to Mods/lovely/dump/functions/common_events.lua
and see if you can find your payload
just ctrl + f "modify_level_increment"
^^??
thats what i meant
you'd so other_card:set_ability('m_lucky')
seems like it's there?
out of curiosity what math function is % actually doing here? trying to understand the loyalty card functions better
how would i get it to work in this instance
i took a guess but didnt work
a % b is the remainder of integer division between a and b
so 5 % 2 would be the remainder of 5/2, which is 1
CARD:set_ability('m_lucky')
card:set_enhancement doesn't exist.
has any of you done a custom UI with a custom tooltip? Can't figure out how tooltips work
was a guess but how would i make it work
move the } in line 26 to the end
your calculate function is outside the joker definition
you mean line 25?
so how would i make it work
@drowsy heath
no but for the way im doing it
this
Yes, would set_ability not work?
yeah, and add a } after the last end
so if i had 50 cards in deck i would get 2 back
what i have now doesnt work no im using set ability correctly arnt i
and what is the way you're doing it? there's pretty much only one way you should be making a card lucky and it's how I said
is there a way I can test to see if a hand defeats a Blind or not? currently I have if context.after and not context.end_of_round then but the second condition doesn't seem to do anything
i mean the structure, i dk how to make your line fit into my code
i want it to make all cards held in hand lucky
replace all this with what I said
How could I condense this into a singular message instead of a message for each card?
if context.main_eval and context.cardarea == "unscored" and not context.blueprint then
card.ability.extra.x_mult = card.ability.extra.x_mult + card.ability.extra.xmult_gain
return {
message = localize('k_upgrade_ex'),
colour = G.C.MULT
}
end
You would do the message in a different context.
remove the =
ok
you made that one up
try removing the comma on line 32
odd, im tired i might head to bed after i get this one done then
i clearly need it, this whole consumable ive been upside down
this is just lua syntax, I recommend getting VSCode with the lua extension by sumneko
it will let you know of any syntax errors before launching the game
Which context?
and can automatically format your code to make it easier to read
yeah Ive been using Zerobrane for a while
vscode my boo
ill grab that shortly
😭
When you want to send the message.
works now! genuinely tysm
anyone know whwtas wrong here
card is functional
whats it supposed to do
I tried context.before like my other similar joker and it didn't work.
bump
return how much is in the deck but limit it below 8 or 24
Yes, it has to be in a different if
yeah i got no idea whats wrong
Yeah, that's what I did.
local message = false
if context.main_eval and context.cardarea == "unscored" and not context.blueprint then
card.ability.extra.x_mult = card.ability.extra.x_mult + card.ability.extra.xmult_gain
message = true
end
if context.before and message == true then
message = false
return {
message = localize('k_upgrade_ex'),
colour = G.C.MULT
}
end
anyone?
okay im calling it a night its nearly 6am and i wanna be alive tomorrow ive slept all day last 3 days and worked at night lmao
message is set to false everytime calculate is called.
Also context.before happens before context.individual
keeps happening when i select the first blind
Where could I run it then?
turns out this line is REQUIRED
since partners never does a check to see if extras even exists
one last weird issue, what seems to be happening is it doesnt retrigger any jokers if it cant trigger the joker to the right ?
bump
I also tried context.blind_defeated and it does nothing
thanks jacob
Am I using the right condition for checking the edition of a playing card
how can i disable the behavior of cards not showing up twice for only my consumables
like a showman
pretty sure context.final_scoring_step is causing the issue here. This context is used for stuff like Plasma Deck's balancing effect
I'll try
so in_pool(self, args)
return { allow_duplicates = true}
No, it would be return true, {allow_duplicates = true}
yeah without that it goes to verify the edition but it crash saying that has_edition has a nil value
how would i check if blueprint didnt find a joker to retrigger?
or if like, blueprint retriggering a joker doesnt actually do anything
specifically during a hand
because whats definitely happening i tested it more is if joker2trigger isnt anything then jokertrigger never triggers
otherwise it works fine
and this only happens during a hand, it works fine with copying in the shop
Is there a way to detect and count the triggering of scoring effects during a hand? Trying to make a Joker that adds mult equal to the number of scoring effects before the Joker is reached in the main Joker scoring step
I had a version before new calc that was very hacky
🙏
I found a way a while back. I’d have to check how I did it when I’m back at my PC
At what stage do you want to check?
I want it to be in context.after or sometime around then. The Joker's effect is that it gives $3 when played hand does NOT defeat the Blind
I assume this is the correct way to format this??? (trying to make a joker which sets cash to 0 and generates a random tag when destroyed, at the set cash to 0 part)
Oh yeah I’ve done a joker with that exact trigger before. I can dig that up in a few
thanks lol
whats the prefix for tarot cards?
Iirc all consumables are prefixed with c_
you can add all the hands used - 1 on the payout screen
no not like that, it's like Todo list where it gives you money mid-blind
oh then uhh
that part works fine, I just need to make it so that the effect does not proc when blinds are defeated
thanks
If you have the source you can check. I haven’t touched modding in a while
first time coder, I am trying to understand how all this works and am a bit unsure bout my code (and why lots of it is all red)
oh right I used some lua injections
do i copy/paste my code itself or screenshot be better?
Is there a way to make a joker only appear as a hidden card in spectral packs?
idk if there's some API stuff that would get the job done now tho
to share it
lemme check that first
?
ok so this was my hacky solution to tracking chips for joker and blind purposes. Use a different variable name if you want to go this route
you are returning an if
first attempt
then my context check was context.after and G.GAME.eman_chips < G.GAME.blind.chips
so get rid of the return?
so you essentially create a global variable that keeps track of a blind's health?
no put the if before the return
just don't return an if
kinda
I might check how much of what I did was necessary
cuz it's been a while
but that requires I go digging thru the source code
Yeah I think its on the right track though, thanks
I know I used it for both a joker and a boss blind
which is probably why there's two injects
How do you ensure a joker isn't in it's respective rarity's pool?
where do you want it instead?
I really gotta figure this shit out 😅
nowhere
i want it to keep its rarity, but not be in it's pool
prob just set the in_pool function to return false or nil
itll have its own condition for being created
in_pool = function(self, args)
return false
end
uh yeah how much programming experience do you have?
ah, ive used that before, i wasnt sure that would work, its caused issues for me before
or return nil idk
not very much, i'm very much a novice
i know the basics around lua (mostly) but
i'm nowhere near advanced
yeah so basically
the ease_dollars part is very much not part of the return
it's something else
bumpy bump
yes
thanks
shoulda just tried it bro
all consumables are c_
i see??? man i really wish there was an easier place to understand some of this stuff since it really isn't in the api doc
yeah it's called the lua docs
learn lua
you are writing in lua
what are you even trying to do exactly?
^ (Sets cash to 0 when sold and generates a random tag)
wanted to figure out the sets cash to 0 part first
sets cash to 0 part is just this
did i do something wrong?
you could probably do it without patches with some shenanigans with hands used
There is already a Planet pool.
How do you target all jokers to the right of a joker?
you guys couldve told me
what do you mean
😭
we didn't know the damn this ou were trying to do
like how blueprint targets the joker to the right, but for every joker to the right
how do you get to the planet's pool tho
what's the exact effect of the joker?
G.P_CENTER_POOLS.Planet
index for loop for all jokers with a greater index than the current card
for i=1, #G.jokers.cards do
if i > my_pos then
table.insert(cardstotheright, G.jokers.cards[i])
end
end
my_pos is the position of the joker that you would've put in a variable.
crashes when sold
at that point, don't you just set i to my_pos + 1?
alrighty, thank you
and skip the whole if statement that's kinda pointless
i dont understand for loops yet even though ive been really trying
oh yeah cuz to_big isn't defined
ahh
where would I do that
sorry for my amaturish nature i'm kinda learning smods as I go along
yeah that's from the Cryptid mod, but to make your own fallback if Cryptid isn't loaded, you'll define one in your main lua file
should probably re-read the manual a few times along the way
No, that's from Talisman
actually its from talisman
ohh
there would be 2 entries of one joker
add this line to your main lua file to_big = to_big or function(x) return x end
why?
it's just the start index of the for loop?
sorry misread
for i=(my_pos + 1), #G.jokers.cards do
table.insert(cardstotheright, G.jokers.cards[i])
end
works! now I just need to figure out how the hell to draw from a random tag
yeah this work work mb gang
I'm optimizing this lol
I don't think a bunch of ? reactions is a substitute for a question
error launching, total rookie at coding so I'm confused when looking at this section of my code
the code for ref
You're missing ,s after the strings.
when mr poly bridge reacts ❓ to my message
gonna bump this now
Yes.
i feel like mr poly bridge is a gd fan, only they would do this
you're gonna wait until they ask how before responding with
ok how?
Hook SMODS.calculate_individual_effect
guess I gotta look at the SMODS source?
dammit he actually has a solution
no just hook it
like any other hook
I need to know what parameters it has to hook it lmao
nuh uh
what's the global value for the amount of chips the player has already scored
(effect, scored_card, key, amount, from_edition)
G.GAME.chips or hand_chips for current hand.
game.chips
forgot the h
G
I MEANT G
unsure where to start with this, is there a place to get a bit more insight at to what things I can do to draw from tag pools or somethin' similar?? sorry for the novice questions 😅
what page on the wiki is the function documented (if it is)?
It isn't.
Why did you try to predict somecom behavior? Foolish endeavor
Such has been worth exploring this for copy support.
it worked. Thank you
can't you compare the blinds chips in final scoring step
is it a better solution than I came up with?
because I could use a solution that's better than injects lmao
mr poly bridge suggestion: instead of 🤷♂️ use
I still patched the game, but I patched the Vanilla code instead to make a global variable that tracks each blind's health. You want the patch?
sure
[[patches]]
[patches.pattern]
target = "blind.lua"
pattern = "self.chips = get_blind_amount(G.GAME.round_resets.ante)*self.mult*G.GAME.starting_params.ante_scaling"
position = "before"
payload = '''
G.GAME.blind_health = get_blind_amount(G.GAME.round_resets.ante)*self.mult*G.GAME.starting_params.ante_scaling
'''
match_indent = true
times = 1
then, to check whether or not the played hand defeats a Blind, I do this:
if context.after and G.GAME.chips + hand_chips * mult < G.GAME.blind_health then
works perfectly, and isn't too difficult to understand I think
I think the global variable is gonna be really useful to me later on too, since I want to add other Jokers with similar effects
wait are hand_chips and mult globals?
i mean someone got hit
G.GAME.blind.chips in question:
this is in the context of a Joker's calculate function, so they're defined here. Not sure if its global since it wouldn't make much sense in the shop for example
shiiit I didn't need a patch at all
?
im losin' it
nah I just love patching lmao
press shift alt f
next patch is jus remaking balatro
next patch is gonna be making a mod using nothing but patching
usually what I do when I go digging and don't find what I need initially

why are all the jokers so happy, can we get one joker that's just depressed af
no change
canio
that's my attempt to format your awfully formatted code
he doesn't exist, he died in 1870
what are the legendary jokers even based on?
Canio bruv
he doesn't exist he died in 1870
I've never seen Canio in my life officer
spot what's wrong with this image chat
nothing, those are the 6 jokers you can get from the soul
it's not jimbo
Jimbo at home:
also for those who don't know if you have all soul jokers the next soul will make jimbo
nope no trickery like that
look at the finer details
you miscolored his uh... idk what those dots are called
they match the wrong part of his hat
i know whats wrong, theyre not yuri /silly
just comparing it to this
nothing about miscoloring, if it's miscolored, then that's fault of the fact i got this image online
also some pixel scaling is off but it's not that
look at perkeo
Perkeo eye
Next question
he isn't checking for his opps anymore
ohhhh
Oh we did it already
oof
damn
fun fact the irl versions of trib and yorick wore red not blue or orange and black
that wasnt fun at all
so I'm making a boss blind and this doesn't seem to be triggering
spot what's wrong in this image
or rather, something's off cuz it's supposed to destroy your winning hand
but it isn't doing that
the wrong part is canio died in 1870 so he can't be real
#🕹・game-discussion died in 1870 so it's not real
Good morning dev chat
WTF is this?!!
Looks normal
took negative too seriously
Negative chip value goes unreasonably hard
what did you even do

do blinds have a calculate context for destroying cards?
does it have value in main game that set W numbers?
like 0,1,2,3,4....

what's it supposed to do?
making chip value show minus numbers
probably requires some kind of lua injection
is there a way to make it so this calc requires 3 of the same card to execute?
so like each card triggers the effect if there's 3 of them?
the idea is that it's a joker that only triggers if there's 6 of the same card
3 i mean LMAO
three 6's in one hand = joker gives chips
like overwriting variable type?
idk
I don't know how it all determines the display, but there's probably a bug that prevents it from rendering negative numbers
There should be extra in line 38?
seems to make sense, elaborate on the for loop part? just wanna be sure I get this right
thats not only problem this is problem cause if i paly this hand minus values turns into positive values
I feel like you should really read the smods docs
what's turning into positive values?
ive read through them a decent bit but not in their interity
like -2 x -200 = 400?
no this is what i want but when i play it instead of -2 X -200 shows 2 X 200
oh
no lua docs
both
Trying to make my voucher so it gives double tags for any blind skipped but it'll crash the moment i redeem it with a Context is Nil error, any help please ?
(i also used vanilla remade for the double tag part, edited it partially)
key = 'solarwind',
loc_txt= {
name = 'Solar Wind',
text = {
"Complete itself with the Slide",
"Double tags for each blind skipped"
}
},
requires = { 'cymbal_slide_redeemed' },
pos = { x = 0, y = 0 },
redeem = function(self, card)
check_for_unlock({ 'solarwind_redeemed' })
if context.skip_blind and not context.blueprint then
return {
func = function()
G.E_MANAGER:add_event(Event({
func = (function()
add_tag(Tag('tag_double'))
play_sound('generic1', 0.9 + math.random() * 0.1, 0.8)
play_sound('holo1', 1.2 + math.random() * 0.1, 0.4)
return true
end)
}))
end
}
end
end,
}```
man I love technical debt
somehow, somewhere, I managed to make retriggers stop working
how? idk
retriggers out of stock
retrigger machine broke
imma just update my smods and see if that fixes it
what's technical debt
when the shit in your programming catches up to you
in my case it's discovering that my poorly documented code broke the retrigger machine
When you leave some bugs to fix later or adjust you build up debt that you’ll eventually need to fix
Like not making a localization file and instead making a loc_txt in every joker then deciding i want a localization file now you have shit ton of stuff to edit
Probably before its too late
yeah
Its easier imo
oh I'm sure it is once it's set up
currently tho I need to figure out what in God's name I did to break retriggers as a mechanic
I’ve spent 2 hours figuring it out because i was using mod key instead of prefix
oof
Yeah probably don’t do that lmao
still tryna figure out the whole "loop" part, though the joker does work based on 6's being used
tried doing this which i quickly realized was stupid and unintuitive 
wait the loop part is when trying to exactly score three 6s right ?
if ((function()
local rankCount = 0
for i, c in ipairs(context.scoring_hand) do
if c:get_id() == 6 then
rankCount = rankCount + 1
end
end
return rankCount == 3
end
it should be something like this, i worked on a joker require exact precise cards too earlier
if hand contains 3 6's then yeah, wouldnt need to specifically be a 3 of a kind with 6's
then use that, you might need to arange a bit but that way it'll make so it detect there's three 6s, though that way it won't react if there's more than three 6s
alright, i'll give this a shot
this is how my full code looks like with this implemented
if that can help to see how it should be used
Also, Joker Forge is what i used for the specific triggers of played cards x time in the played hand, you should find it in the #1209506514763522108 tab, it's still a huge wip but it can be useful
might have formatted this incorrectly?
there's two (( in red, i think it's a syntax error
ok I fixed the retrigger machine
i think you forgot to put a end after return rankCount == 3
here's a point of advice, don't forget the return part of your hook
how do you fix this
