#💻・modding-dev
1 messages · Page 458 of 1
this works? kami_explosive_compat = false,
like make a joker read "X10 mult for every card played" and when bought it changes to like "haha you fell for it"
Yes.
Loop thru jokers, see if find joker finds the target card, if so then break and give the alt localization text
You do this in loc_vars I think.
or atually can i just detect when a joker is bought and then destroy that joker and spawn a different joker in
only for this specific joker
like once bought, destroy and create a new different joker
cant i detect being obught from shop with this?
How can i get the rank value of a card from a scoring hand
does this code not work?
now i have an odd question
how can i make the screen turn black for a set amount of time before returning back
that sounds like a generic love2d question that probably nobody here has direct experience with
is there a way to just make one big ui box that covers the screen and then delete it later?
i dont need anything fancy
jsut cut to black and back again
seems possible, as long as thunk didn't place restrictions on the size/location of the ui box
be aware you can exit most ui boxes by pressing esc
have you seen how big the sprites for the numbers alone can get
i mean literally just a box
like a big ass rectangle
nothing attached
oh you didn't mean thunk's UIBox
anything thatll complete the job really
yeah just a regular rectangle lmao
Did some fixes but i'll bump cuz idk if this is correct
i would prefer to have a function that makes this black rectangle appear and another to dissapear
how do i destroy a card without it doing any effects
nvm found out how
how do i create a specific joker
SMODS.add_card
Should be?
arguments?
it works just only when im doing a objective inside the shop , if im doing an objective made to be completed inside a round , it doesnt spawn that buffoon pack
check the wiki page https://github.com/Steamodded/smods/wiki/Utility
also is there a way to have a joker have no rarity
I don’t believe so
probably not but you can make one if you dont want it to appear in shop
afaik you cant
it doesn't work properly
why do you not want it?
i'm not getting Xmult returned like it should
Interesting, do you handle that or does SMODS.add_booster_to_shop handle that? In either case, you probably want to create some sort of "queue" you add to, that you can then access whenever the user enters the shop
because i think its funnier to have this specific card not display a rarity
its fine if theres a rarity on the inside
how can i make that queue?
but i jsut dont want any badges to be displayed on the joker
this is a joker presumably? you can just save it to the config/ability table
is there a way to make a joker not appear in collection?
I probably should’ve looked at the reply
Let me get home first
no_collection = false
Yes.
woops
Did you even read the wiki page before asking this question
just this but true
Yes.
if context.other_card.base.suit == 'Diamonds' then
local ret_dollar = to_big(G.GAME.dollars) * to_big(card.ability.extra.xdollars - 1)
return {
dollars = ret_dollar
}
end
why would this cause a talisman error
easier to ask then to sift through the smods docs
my stupidity baffles me sometimes
it cant kill you to go to a website surely
Trying to get the rank value of the last card of a five card hand but it isn't return anything
the people helping here are, well, people
it was just a simple question, that yall chose to answer, you didnt have to answer yet you did anyway
we cant answer everybody at once so it'd be much preferred to do some problem solving yourself before coming here
Firstly, you should use is_suit, Secondly, you need to use to_number()
card:is_suit('Diamond')?
ykw
no its obviouis
dont even gotta ask
No, card:is_suit("Diamonds")
wdym , like save the entire code of block in a var ?
like this or would i 'to_number' both
Put the to_big() back and just put a to_number() around the whole thing.
is it in assets/1x/horror.png
its done this way to account for things like smeared, right? just curious
Yes.
okay
I mean you're already kinda doing it with current_objective_Completed right? You just need to check if the player is already in the shop:
- if so, spawn the booster pack
- if not, just set the var to
trueand read it when the player enters the shop
Makes sense?
wdym read it when the player enters the shop?
if current_objective_Completed then
yes
idk how but it fixed itself after i reloaded again
i got this in the config , how can i call it?
maybe the real horror was the atlas that decided it didnt wanna work
No, not that. Can you show your full joker's code?
sure here
first of all move that keybind out of the joker block
i just deleted cause not sure how i can reroll the stuff without having access to the config of the joker
how would i recalculate a boss blind's debuffs upon creation or destruction of a joker
You want something like what you did for calc_dollar_bonus. Find a specific timing on when you want the reward to happen (e.g. when user enters the shop), and then spawn the pack
How can i find a specific joker by key and call juice_up on it from the calculate method of an enhancement?
I tried to implement the way that raised fist gets mult but with scored cards, but it crashed when putting "scored" in place of cards in hand
for k, v in pairs(SMODS.find_card("j_modprefix_key")) do
v:juice_up()
end
Idk how to properly get the rank value as xmult from a card
is there someway to check when the user enters the shop?
How do I summon a random Tarot card?
SMODS.add_card({set = "Tarot"})
There's a context! context.starting_shop
.base.nominal
verdant leaf only disables itself and im looking for something more complex
seomthing like this?
I think so yeah, try it
can you help me with the keybind thing as well? if you dont mind
it seems like the juice_up happens too soon compared to the return message. is there a way to make sure they sync up?
the calculate function in question:
calculate = function(_self, card, context) -- _ prefix for unused args
local hasReinforcedGlassJoker = next(SMODS.find_card("j_mot_reinforcedGlassJ", true))
if context.destroy_card and context.cardarea == G.play and context.destroy_card == card and pseudorandom('glass') < G.GAME.probabilities.normal / card.ability.extra then
if hasReinforcedGlassJoker then
for k, v in pairs(SMODS.find_card("j_mot_reinforcedGlassJ", true)) do
v:juice_up()
end
return {
message_card = card,
-- TODO: add proper localization
message = "Saved!"
}
end
return { remove = true }
end
end,
Put it in an event.
Does anyone know how I can do the raised fist stuff but with scored cards?
does anybody know why does this code give me a crash
calculate = function(self, card, context)
-- Individual card scoring
if context.individual and context.cardarea == G.play and not context.blueprint then
if context.other_card:get_id() == 8 then
if pseudorandom('effect_0_create_tarot_card') < G.GAME.probabilities.normal / card.ability.extra.odds then
if #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
G.E_MANAGER:add_event(Event({
func = function()
local tarot_card = create_card('Tarot', G.consumeables, nil, nil, nil, nil, nil, nil, nil, 'joker_forge_tarot')
tarot_card:add_to_deck()
G.consumeables:emplace(tarot_card)
G.GAME.consumeable_buffer = 0
return true
end
}))
end
return {
message = localize('k_plus_tarot')
}
end
end
end
end
but when i remove the line that checks probability, it works fine. ive been scratching my head at this for a good half-hour now. for reference the crash is:
card.lua:3401: attempt to perform arithmetic on field 'extra' (a table value)
i looked at the vanillaremade 8ball joker, that has the card creation in a different way, it uses add_card and it puts it within the return statement in and extra field, i cant do that here because the code has to be formatted in a certain way to be easily reproducable. just looking for more insight on what causes this
It's G.play
tried looking around the smods documentation but couldn't find anything
i'm not sure what that means. could you elaborate?
G.E_MANAGER:add_event(Event({
func = function()
v:juice_up()
return true
end
}))
thanks. could you perhaps explain what the code is doing here? i'm not super familiar with the event system of smods/balatro
Moving it out of the joker definition might help, otherwise no I'm not sure
It is creating an event and juicing the card in that event.
https://github.com/Steamodded/smods/wiki/Guide-‐-Event-Manager has some good explanations
I'll also say you should consider using the new probability system in smods, see #1209564621644505158 message
yknow how invisible joker shakes when its ready? how can i make that into a single fire event that increases shake power with each shake and shakes more rapidly?
for reference on why i cant do it the vanilla remade 8ball joker way, it is because the buffer check needs to be self contained before it reaches the return statement. if i do it the vanillaremade way, that check has its end statement after the return statement.
would spamming events like this be on the right track, minus the blockable
thanks, i appreciate it. much more helpful
/gen
Solly
i got this error
came up with a better solution, looks good, any way to make the joker not sell or make the sell noise when being removed? id guess it would just be modifying its sell value but
how did you do this lmao
There's only 1 buffoon mega pack, see https://balatrowiki.org/w/Booster_Packs
oops
i may be blind but is there a context for when a playing card is modified
This is terrifying
or would i need to hook into set_ability or sm
SKULL EMOJI
Yes.
wait, i should just check bloodstone's unlock cond
hm
i need to make that into a contextt
where the deck is modified
ill send a bit more in a sec im polishing
im basically checking for if theres >= 40 cards of a certain suit
its beautiful
so in theory i should check every time the deck is modified
as unlock condition or something else?
as overclock condition
is there a way of disabling selling of a joker without the eternal sticker
i need the joker itself to check in calculate
Yes.
how
Hook Card:can_sell_card()
you could also check what bloodstone does internally, but that might slower
if args.type == 'modify_deck' then
if card.unlock_condition.extra and card.unlock_condition.extra.suit then
local count = 0
for _, v in pairs(G.playing_cards) do
if v.base.suit == card.unlock_condition.extra.suit then count = count + 1 end
end
if count >= card.unlock_condition.extra.count then
ret = true
unlock_card(card)
end
end
whats the args for that
context but that isn't used.
thatts my main hangup
would i hook it like putting it in add_to_deck
I meant you could recalculate it every context but that's probably a bad idea for performance lmao
i'll just calculate before scoring
if i find a better solution
then ill implement it
so like i got 20 dollars this ante but the buffoon pack never spawned
confused about this one
aslo the code
here ill give a demonstration
if you still have this line if card.ability.extra.current_objective_Completed == true then return end then it'll probably never get to your booster pack spawning code
if you ever need the playing_card_modified context I made once: https://github.com/larswijn/CardSleeves/blob/342307d97fc9ec4d3bc5be1eca69e6431e7af521/CardSleeves.lua#L2036
i have that so it doesnt repeatdly give me the reward
local card_sell_ref = Card.can_sell_card -- note how im not including parenthesis. I'm "saving" the function so i can return it later.
function Card:can_sell_card(context)
if "condition" then -- replace condition with whatever you need
return false
end
return card_sell_ref(self, context) -- return the original function if your special condition isnt fufilled
end
.
hopefully tthis should be good? idk im nott too good at commentting
i just write self explanatory code
i only comment if its kind of hard to understand
otherwise
?
i shouldnt do that. that's bad practice
first line should be . not :
final return should include self
whoops
How would one make negative give ^1.2 Joker Slots instead?
I needed a reference, wasn't scrolling back up manually every time
I'm pretty sure it's also preventing the code from giving the reward even a single time
oh lmao fair
so what is "condition"
i would hook into the behavior of the edition code itself
fml , not sure how i can have the reward not be given multiple times and not prevent some rewards to not be given
but i mean like, how can i make a joker unsellable through this
Set a second variable that's "reward_given" or whatever 🙃
like how can i change the "condition"
can someone tell me what is causing this code to crash when a hand is played
calculate = function(self, card, context)
-- Individual card scoring
if context.individual and context.cardarea == G.play and not context.blueprint then
if context.other_card:is_face() then
if pseudorandom('effect_0_add_dollars') < G.GAME.probabilities.normal / card.ability.extra.odds then
return {
dollars = card.ability.extra.dollars
}
end
end
end
end
this is literally just business card logic, i tried emulating the exact calculate function from business card, yet it still causes the same crash. removing the random check leaves no crash.
card.lua:3480: attempt to perform arithmetic on field 'extra' (a table value)
surely this is something very silly but ive been having issues with pseudorandom consistently, if someone has some good documentation on it that would be great lol
would self be the card object
if self.key == [JOKER_KEY]..? try that
only hooking ive ever done is this
[JOKER_KEY] replace with ""?
joker key can be replaced by the key of the joker that you want to be unsellable
hopefully this works i guess
im so stupid smh
not stupid, you just didnt understand and thats alright
Run it and find out
kinda annoying i have to beat a boss to reroll my stuff since idk how to do the keybind thing lmao
Whats the crash?
Code seems fine
thats what im saying haha
Your config
Has an issue
Can i see it ?
SMODS.Joker{ --Business Card
name = "Business Card",
key = "businesscard",
config = {
extra = {
odds = 2,
dollars = 2
}
},
loc_txt = {
['name'] = 'Business Card',
['text'] = {
[1] = 'Played {C:orange}face{}',
[2] = 'cards have a {C:green}1 in',
[3] = '2{} chance to give',
[4] = '{C:money}$2{} when scored'
}
},
pos = {
x = 0,
y = 0
},
cost = 4,
rarity = 1,
blueprint_compat = true,
eternal_compat = true,
unlocked = true,
discovered = true,
atlas = 'CustomJokers',
loc_vars = function(self, info_queue, card)
return {vars = {}}
end,
calculate = function(self, card, context)
-- Individual card scoring
if context.individual and context.cardarea == G.play and not context.blueprint then
if context.other_card:is_face() then
if pseudorandom('effect_0_add_dollars') < G.GAME.probabilities.normal / card.ability.extra.odds then
return {
dollars = card.ability.extra.dollars
}
end
end
end
end
}
where tho
(ignore the description not being variables lol)
bro ive been trying to fix this kinda error with pseudorandom for the past couple hours, its been happening on loads of jokers that i generate with joker forge
what’s the error
attempt to perform arithmetic on field 'extra
did you try restarting the run?
yeah restart the run
yeah everytime i go and test i restart
Oh
thank you 🙏
could it be incompatibility with mods? i swear this was working like days ago tho
goodmorning
goodmorning
curses
my balatro might be cursed
maybe use ease_dollars?
are you sure this is your card crashing and not the actual vanilla business card?
OH
don't give your joker a name
wait
id
in the top-level anyway, do give it a name in loc_txt
i am sure it is my business card
but, it will share the same id as original
lemme change id and test
Well, it's both. Vanilla business card code is crashing on your business card
if context.individual and context.cardarea == G.play and not context.blueprint then
if context.other_card and context.other_card:is_face() then
if pseudorandom('businesscard_effect') < G.GAME.probabilities.normal/ card.ability.extra.odds then
return {
dollars = card.ability.extra.dollars
}
end
end
end```
end
It WORKS FINE
I literally tested it
LOL
why does this play the sound a lot and freeze the game?
Mhm
Its a feature
name isnt used?
I was talking about goodmorning's code if you meant my message
ah
the issue was it was sharing the same id "businesscard"
i just changed it to something else and it works perfectly
is there anyone here who's made a super fancy custom replacement for a joker's description box?
can you do that
Huh ?
N DID
oh you meant like that
Return true?
SMODS doesn't use it, vanilla does 🙃
Are you sure
this is the reason whenever i went to test anything on https://jokerforge.jaydchw.com/vanilla it always fucked up. bruh
didnt see it was vanilla lol
removing it doesnt fix it
how do i stop it?
how can i check for a specific joker that is put in my joker slots for the first time?
oh i havent set up the routes properly on the site, the /vanilla isnt working haha
Try return {sound=“sound key”}
that also does the same thing but doesnt play the sound
elaborate?
the game just freezes
i recall seeing some very custom joker tooltips in here in the past and i was hoping i could see some of their generate_ui()'s UI code for direction on how to write my own
does this card add itself by any chance
well
lil yachty computer gif
show the whole code
forgot i had setting blind in the contexts
my own stupidity has be flabbergasted
*me not be 😭
are we fr scrimblo
I keep opening this channel and forget to actually send my problem
let me fix that
We’re working on a patch for this bug
In the meantime wait for the next smods update
anyone know how to do this?
i found a temp fix called "remembering"
elaborate?
is it the joker itself checking? another one? is it yours or from vanilla/another mod?
trying to check for when my joker is first put in the joker slot so i can reroll the stuff i need rather then rerolling on buying the joker
add_to_deck?
hook it?
how do i check if its added to my joker slots for the first time then
why does this show up blank? it worked fine before
what are the play_sound parameters,i know theres one for pitch but is there one for speed
idk like this?
no
then how
bump
its like a calculate function
but when it gets added to deck
and without context
additionally, what is c1 
The card being bought.
c1 is the card bought
ah 
the docs use the internal names for some reason
its kinda confusing, you want to use context.card
tried it like this but doesnt work lol
idk the logic of your mod
just want to check for when the joker is added for the first time in the joker slots lol
i can send the jokers code
please do
actually gonna page @hushed field for this because i recall you have some very custom joker generate_ui()s
here you go
i have custom generate_ui's in my mod
they dont do anything too fancy with the description tho
can you add your joker during a blind and then click on a card in hand
I think I may have set my cardarea position wrong, oopsie
Is there any way to check if an specific Joker is on the Joker slots? And if so, is it possible to check how many there are of them and whether they are sold or destroyed? I'm trying to make a joker that scales with certain ones currently owned and another with food jokers that expire/are sold/"slashed"
i kinda have an idea for a joker effect that changes its odds based on which joker slot it's in (1 in [slot #] odds)
Am I crazy or couldn't you move all your setup stuff within the if card.ability.extra.times_jonkler_application_added == 1 then logic section of the calculate function into the add_to_deck function?
but idk if there's a way to pick up on it being moved
I did and it didn't work still
just check its slot every time the probability needs to be run
I spawned the joker with debugplus btw
#SMODS.find_card("j_modprefix_key") checks how many there are
context.selling_card for selling
for destroying there's going to the one in the next smods version called context.joker_type_destroyed
i mean that makes sense, yeah. i'd also need to do that every time the description is looked at
I see, thank you very much
that's what i do with my position based jokers
Do you need to update the center.ability.extra.current_reward_text and center.ability.extra.current_objective_text values in that setup section as well?
Nah
did you try what i said
check if that updates the objective
iirc the vanilla copying jokers just check on update where they are, for reference
and this is bad
didnt have to press on a card
im having a problem , now everytime i press something , it rerolls the objective and reward for some reason
went into blind then added it
because you're not using strict context checks in calculate
card.ability.extra.times_jonkler_application_added stays 1 and runs on every calculate
oops
bump
lemme put the randomizing code into the add_To_Deck func
that fixed it
@red flower actually while you're here i have a sort of vanillaremade question but not quite
i'm writing... basically imagine canio's effect, but when face cards are destroyed, it has a chance to create a negative version of that card (and draw it to hand if during a blind), so i'm looking at both the way you've written canio and dna and basically frankensteined them together-ish? but i feel like i've done something wrong 
my area of concern is the actual copy creation part, adding to deck and emplacing to hand, etc.
now i gotta check for the buffon spawning code
use loc_vars
what part is not working
not good with math, anyone know what do modify my percent to to avoid this error
dunno, haven't tested it. i just felt something was off and thought you might be able to spot it
i dont immediately see anything wrong no
When i == target doesn't c go to 0 and therefore the divisor is negative?
idk why you're not using get_id or is_suit tho
@red flower you know why this doesnt work btw?
isn't pseudorandom element missing a seed
just do this?
yeah i don't see anything else wrong
i still dont entirely know how the card works tho
😭 every time i see get_id used here, i see people say to use .base.value instead, is that not right
doesnt work
so basically once you get the joker , you are given an objective , complete that objective in the ante you are in to receive a reward , the objective and reward rerolls every ante
I've never seen that, but it's basically the same so it doesn't matter
is_suit does matter
2 to 10 is 2 to 10
11 is j, 12 is q, 13 is k, 14 is a
Tried importing the code for blue seal into a joker, but it spawns two jokers instead of just one
and context.main_eval
maybe it doesnt work cause it doesnt know what the ability.extra stuff are , should i put the vars somewhere i can access them
bump's awaited sequel
oh, yeah
Is hpfx_eternal_jimbo a valid quip?
yeah
Quips don't use mod prefixes?
@red flower tried something like this but it didnt work rip
aren’t they added automatically
No.
Mod prefixes are not added to quips.
anyone know how to track spades and make it so that every 10 adds a discard?
ykw if it works it works
every 10…what…
Like in your deck?
yeah
look at cloud 9
how can i make a burst of particles around a card
i completely forgot about cloud 9 lmao thanks
went back to the initial commit just to see
it's the same 😭
anyone know how to exactly go on with this?
WAIT
NO
IT ISNT
THERES ONE LINE IN THE LOCALIZATION THATS DIFFERENT
WHY

how can i turn off music completely while a joker is present
does anyone know why the animation for card receiving seals/editions happens before cards are scored, but the animation for enhancements has the correct timing?
G.SETTINGS.SOUND.music_volume = 0?
realizing that said music and not sound
yes but will this cover if the player tries setting the music back up?
If you do it constantly then yes.
an update loop for that seems laggy
going into pause menu is the only way to set music vol right
what if i hook exitting pause with setting music to 0
or actually
what if i just disallow pause
lol
you could probably hook what uses the volume
my progress (VERY LOUD WARNING, sorry)
turn it like 1 percent
It wasnt that bad, even with headphones
I have sensitive ears
it wasnt exactly that good, as a counter
The "that" in my reply mighta been doing the heavy lifting
what do you mean, do you mean there's more to improve?
Is there a list somewhere of all the tag names to be used in the add_tag(tag('')) function?
Holy shit
Yes.
where?
My ear dumps are obliterated
game.lua
i cleaned out your ear/dump
nah its just personal pref, im not a loud for the sake of loud fan
Thanks now i don’t have them anymore
I want this joker to gain xmult for every unscoring card, but this plays the message multiple times (no huge deal), and the xmult it gained doesn't count until the next hand, how would I fix it?
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
card.ability.extra.message = true
end
if context.main_eval and card.ability.extra.message == true then
card.ability.extra.message = false
return {
message = localize('k_upgrade_ex'),
colour = G.C.MULT
}
end
I'm probably missing something obvious here
the loc_vars arguments are wrong
oh
yeah
loc_vars = function(self, info_queue, card)
I feel very embarrassed
i recommend using vscode or another better code editor to get lsp autocomplete
I can't stand vsc 
context.main_eval is not a main context timing
you might want context.individual
why? there are others as well
UI is really annoying to use and the shortcuts I like aren't there unless you add them manually
Would be perfect if its UI was like vs
that's fair i would still look into something that is compatible with the lua lsp
i mean notepad++ does a relatively good job
about as good as it can do
It has autocomplete
does it let you use the lsp defs from smods?
with context.individual the message shows up by the playing card, still showing up once for each card, anything I can do about that?
I have no idea
maybe...?
is there any way to make a sound play when clicking an editioned card?
naw
lsp is a program
thats hooked up to a code editor
n++ doesn't reallt have lsp capabilities
maybe try vim idk
apparently there's an lsp plugin according to google
So I'm having a little trouble with a custom card area saving it's contents between saves and loads. I'm hooking start_run to make the area, and what I'm doing with it is grabbing unbought cards out of the shop to store for later. However the card just lingers to the title screen nd is gone on load
another meta question. if you wanted to create a joker with a custom message associated with its effect, would you still want that custom message to play regardless on if the effect was successful? for example, you have a joker that creates tarot cards and your message was "boom", would you still want that to play everytime it attempts to create a tarot card, even if one is not created due to no room?
where are you saving the cardarea
oki how do i hook this up with smods
ah fuck that's probably the issue I totally forgot about that
Ask for help
:3
what do I need to hook for that?
honestly I don't use shortcuts for that reason, but it has the command panel thing which is very useful
removes all need for shortcuts if you are willing to take 1 o 2 more seconds to type
Heres code, the crash says there's a problem with atlas being a nil value?
I triple checks the asstets and they are all the same values as in code.
SMODS.Atlas{
key = 'dishsoapblueflavored',
path = 'dishsoapblueflavored.png',
px = 71,
py = 95,
}
SMODS.Joker{
key = 'dishsoapblueflavored',
blueprint_compat = false,
eternal_compat = true,
rarity = 3,
cost = 8,
loc_txt = {
name = 'Dishsoap Blue Flavored',
text = {
'Creates two',
'{C:dark_edition}Negative{} Blue Bubbles',
'Jokers every {C:attention} round{}'
}
},
atlas = 'dishsoapblueflavored',
config = {odds = 2},
pos = {x = 0, y = 0},
calculate = function(self, card, context)
if context.setting_blind then
SMODS.add_card({key = "j_loljk_bluebubbles", edition = 'e_negative'})
SMODS.add_card({key = "j_loljk_bluebubbles", edition = 'e_negative'})
end
end
}
it has opened like five windows in internet explorer to the github issues page
i wouldn't, i would play a different message maybe
can i see the crash
yah
start_run is fine i think but you need to save the area to G i mean
the command panel is a plus sometimes but I've never really found it necessary
I literally use it all the time lol, mostly to swap between different files
can i see more of the crash
ctrl+c and paste it here
do you not just ctrl+tab for that?
got it
good idea
I don't, it's faster for me to press ctrl + p and type the first 4 letters of the file, also it opens the file if it isn't open already
(cus I usually have like 4-5 files opened so I'd have to press ctrl + tab multiple times)
fair
i can attest to this, much much faster than anything else
hmm idk sorry
alright thats fine
I guess I've never really thought about switching tabs all that much
I'm never really focused on more than 2-3 tabs at a time and I have monitors for that
i did this one the same way as the other jokers I have and they work but this one for some reason likes to be different
lmao
i have like a million tabs opened because my mod has a million files 😭
i mean i have all my tabs open but I don't like
actively use more than a couple at a time
Personally I have the lovely dumps added to my workspace as well, so whenever I need to look smt I just type the name of its file in the cmd panel
so i just slap them on each monitor and then have like youtube/discord on the third/fourth monitor
i switch out constantly, specially for looking at vanilla/smods code
Also I have one monitor, tho I don't really see how more than one would help me here
Oh yeah I have the smods directory in my workspace too
Is there a way to retrigger jokers?
two is a nice sweet spot
You can compare with code or guides on one monitor and code on the other
three if you really want to cross check with other things at the same time
context.retrigger_joker_check iirc
it's an optional smods feature you have to enable tho
thanks!
This code snippet applies to all cards in deck and not just scoring cards and I don't know how to fix it:
if context.other_card:get_id() == 13 then
assert(SMODS.modify_rank(context.other_card, -1))
end
if context.other_card:get_id() == 11 then
assert(SMODS.modify_rank(context.other_card, 1))
end
end```
Is this not enough for it? It's working fine referencing it in other stuff with G.card_storage, but saving is still the issue
you need a context.cardarea == G.play check
that should work as far as i know
does smods have native support for xchips?
yes
Let me take a video of what's happening then, I wonder if it's to do with the shop?
I may have figured out my problem hold up
Careful about the CardArea not being instantiated.
it literally is
like, that's a screenshot of it being instantiated before load
Well, it seems to be working now, it might have been a cardarea type problem? just need to see if I can emplace back into the shop out of it
afaik the cardarea type is just for how the area displays itself, but i might be wrong
I was looking at the code and I think it affects how align and stuff affect it
yeah
hi
Works like a charm (besides not being able to highlight it, but that's an easier fix I think)
always wanted to use this one
Oh also N, joyous spring was a huge help in tracking how the hell buttons work on ui elements
its not attempting to be scary, but rather be threatening
vanilla was a pain in the ass tracking things
This username is also, uhh.... not great
I'm trying to change a value when the player buys/sells blueprint/brainstorm, but it's crashing and saying that other_card is a null value, how might I fix this?
if context.buying_card then
if context.cardarea == G.jokers then
local name = context.other_card.ability and context.other_card.ability.name
if name == "Blueprint" or name == "Brainstorm" then
card.ability.extra.ForestRetriggers = card.ability.extra.ForestRetriggers + 1
end
end
elseif context.selling_card then
if context.cardarea == G.jokers then
local name = context.other_card.ability and context.other_card.ability.name
if name == "Blueprint" or name == "Brainstorm" then
card.ability.extra.ForestRetriggers = card.ability.extra.ForestRetriggers - 1
end
end
end
context.card not context.other_card
ah ok, thank you!
btw this didnt work
yeah
is key what i should be looking for?
The goal: "adds 3 random Enhanced Diamond cards in your hand"
The bug: "added cards are not all with Diamond suit"
Does anyone know where I did wrong?
dont question it
okay, turns out the highlighting issue is bigger than I thought lmao, it's not a highlight limit thing
WHAT IS THAT
Dear god
oh
self.config.center.key
well
try the new SMODS.add_card{ set = "Enhanced", suit = "D"}
thanks
anywhom so does anyone know how to rename the jokers using Malverk perchance?
I believe it's because you need to get card_key from the rank instead of key
Yes.
btw do you know how to disable the pause menu
I've tried it last night but it kinda failed
i wanna do something silly 😝
It's accessing an invalid key rather than the one you want, specifically for 10 - Ace
malverk doesn't rename i dont think but you can rename them using a localization file
oh
check this mod
https://github.com/xssgm/Touhou-Balatro-texture-pack/
Every menu that pauses the game?
yeha
It seems like you would have to do a lot of hooking/patching.
like prevent pausing at all while a certain boolean is on
Oh yea i did do that
It didnt work??
isnt there like a open_pause i can just hook too and reject
No, because every menu has its own function.
To be fair, i havent renamed most of them yet
But the ones i did rename didn't have their new names
maybe i can handle it with a patch?

how does the file look and where is it saved
Currently cant check, i'm on my phone and wont be on my PC until like, 4-5 hours?
Perhaps you could do something with G.FUNCS.overlay_menu
Will ya still be up until then?
i will be profoundly asleep
I can wait for ya to wake up
Just give me a time
i think it's better for you to post it here regardless a lot of people know their stuff here
O okok
I'll come back when i have my PC
swapping the order of the remove and emplace fixed my problem? weird
also as far as i know its only the esc key and this that makes the pause menu pop up
i only need it while its ingame so
hes so silly amiright?
You aint wrong...
Where does an SMODS.Back calculate which cards are available within it? ie, "A deck of all spades"
the silence is deafening, and also the scream but yknow
I'm trying to make a joker that sets probabilities to 0, but i'm having trouble getting probability to where it shoud be if the card is sold with a Oops all 6s in hand, but everything i've been trying has crashed, any idea on how to fix this:
yeah ok so my mod is having very weird issues
heres the code i guess?
and heres the thing
the person testing doesnt even have any of these jokers but for some reason the issue happens when the mod is enabled
its also not that hyperspecific some cards just fuck up
causing this error
honestly i would wait a bit for the new smods release with the new probability API
Oh, i see, then i'll just leave a warning for the time being to not buy Oops alongside this joker to avoid ruining the run's probabilities
wait wait what is that joker even supposed to do besides set all probablilities to 0
since currently, selling this joker with Oops in hand and then selling oops changes probabilities to 0.5
its just to set probabilites to 0
basically glass card support + a few other jokers i'm working on
ohh ok
yeah it sounded kinda bad but that might be good depending on what the other jokers are
its because of the get_id hook returning when the card is debuffed
whats the best way to display a number that the player will have to keep track of
nevermind i figured it out
like a discard counter
yeah, its pretty bad even with just glass, but i'm planning on some jokers with negative probabilities.
Hi I'm new to the modding thing, uuh I was wondering if there was a way to make something give a random seal to a card
local seal = SMODS.poll_seal({ key = "seed", guaranteed = true })
card:set_seal(seal, false, true)
Oh okay thank you so much!
i need a little help if you guys dont mind, i am trying to make a custom joker similar to invisible joker where after 2 rounds i sell it to create another joker, but instead of making a copy of another joker, it spawns in a specific joker,
i have the mechanics working with the rounds and stuff but everytime i try to spawn the joker it crashes
is there an easy way to just have a card spawn a specific joker?
SMODS.add_card{key = "j_modprefix_key"}?
Started helping someone with a mod that isn't Maximus and made some pretty cool tech for it. Basically it's arbitrary consumable logic
ok i really like those card designs for the consumables
i am extremely lost, im just trying to target every joker to the right of this one, everything about this seems completely wrong
does add_card go over the joker limit?
oh hey thats the mod that saved me from going mental trying to figure out tags
im essentially sleepwalking through coding this
some help would be very appreciated
i do not understand loops at all despite putting considerable effort into learning them
you have to store the index outside the loop
then check if loop index is more than the index you sture
this index you are going to store will store index of the current card that is being calculated
before the loop you just
local cardind = 0
and if gjokercards[i] == card then cardind = i end
how can i set the games gamespeed
so like
something like this
G.SETTINGS.GAMESPEED = number
if i set it to 0 what would happen
actually can you change cardind to #G.jokers.cards instead of 0
you can do the table insert thing still
Hmm, is there an easy way to check when a joker is unhighlighted short of doing it in update?
is there a way to randomize the game windows position
Yes.
Yes.
hm is that all i should change
or is
like
you just need original logic
and you need to check if the i is more than cardind
if i wanted it to shake how could i make that effect?
which will be all the cards to the right
i might be lost now
you randomly pick a few times
i am sleepyu as fuck
get the current windows position and randomly add coordiantes to it?
no you just set it a few times
with small offsets
you pick
a position
then you add some offset to that position a bit
set window pos to that
A specific instance of said joker? That's where I've been running into trouble, and I don't want to hook highlight to move my card area around every single time I unhighlight a joker
do it a few times
this genuinely makes no sense to me 😭
and i can just run love code like any other funciton right
what is cardstotheright
dont remember someone suggested it and it didnt work so its gone now
you need to define a table before the loop called that
this is the code i have atm
:<
i feel like im close im just
missing something
i cant make a for loop to save my life
😭
its genuinely the most egregious gap in my coding knowledge
i have tried and tried
and yet every time i try to make one my code is thought bubble gif worthy
https://www.lua.org/pil/4.3.4.html
This might be helpful, if you've not looked at it
how can i stop a specific file from being loaded
for i=1, #G.jokers.cards do
if i > cardind then
-- do things
end
end
```?
like say i have a load_folder function set up, how can i make it load files EXCEPT for a file i mention
if file ~= "filename.lua" then?
man if only i could jsut call :juice_up on the game window lol
that's what i was thinking, but i wanna make sure that it's better to do within or outside of the for loop
...I hope you are not going full hog like some other stuff does?
Download link: https://gamebanana.com/mods/599931
5 MONTHS OF WORK (2-3 years for @springlessmusic and jasper) HAVE FINALLY LED TO THIS, VS REWRITE ROUND 2 IS FINALLY HERE!
It's been an honor working with the dev team to make this a reality, it was extremely fun!!! (and stressful lmao)
Programmed in collaboration with @DaPootisBird, I am not ...
chat why is it doing that
did you see the person doing this in balatro
i want a card where every time you beat a blind itll run a fucked up function that can either fuck with your settings, fuck with your window, or do something other
alright, i think i'm on the right track here
i think my problem now lies in the G.jokers.cards[i]
should i be cardind?
or something else
wait this is peak
what the hell
or am i going about this incorrectly
i love basil
can you send the text version?
local function juice_up_game()
local animtimer = 50
while animtimer > 0 do
local x, y, displayindex = love.window.getPosition()
local d_width, d_height = love.window.getDesktopDimensions( displayindex )
local w_width, w_height, flags = love.window.getMode( )
animtimer = animtimer - 0.5
local m_width = d_width - w_width
local m_height = d_height - w_height
if not flags.fullscreen then
love.window.setPosition( (math.sin( animtimer ) + 1) / 7 * (m_width - 224) + 112, (math.cos( animtimer ) + 1) / 7 * (m_height - 224) + 112)
end
end
end
thank you kindly
oh dear
having the game window move around without consent is peak
this is awesome actually
yea I'm not gonna do that crap of abomination
disruptions are just annoying to deal with
it discourages the fun of playing modded Balatro
i am picky about what i add to my mod
you heard someone mention disruptions
how do i make it so when you buy a joker it cant show up in the run ever again even if you sell it
set in_pool to false
for whatever reason a stake I added above gold isnt applying previous stakes
i would detect the buying of it through add_to_deck how do i set in_pool from there?
wait would i have a config that changes it?
bump, it doesnt crash but it also doesnt do anything
like a config pointing to a bool and the in pool looks at it
so how would i get card over here
unless self suffies
You need to keep the previous for loop.
i dont understand
The one that sets cardind to the joker position.
i havent done this myself so fair warning, but maybe something like
in_pool = function(self, args)
if args.type == 'insertyourargsthinghere' then
return false else return true
end
end
and then you'd hook into add_to_deck probably
so there should be two for loops?
or should they be embedded or something
Yes.
so what would i put in insertyourargsthinghere
im a wee bit stupid so bear with me
actually wait
cant i jsut make a pool flag
maybe
whats the function that gets called when a joker gets initilized
the arg is created by whatever you put in the string
isnt it just init
random question, do individual tarot cards have different weights?
oh wait isnt that cryptid shit
(cant wait to be told to look at the source code as if thats being helpful at all)
mb gang
look at the source code
im kidding
i dont think so
im pretty sure all consumables have equal weights
except for
soul cards
those are defined separately
true
alr then, im not changing the rate of upgrade cards
theyre already set to show up less often than some other types of cards (that is, so long as vanillaremade is accurate to the actual rate of tarot cards in shop)
how do i make a card sell for 0, i tried setting its cost to 0
hook/patch Card:set_cost
i dont wanna do another hook 😭
alright ill do it
you are going to hate modding then
card:set_cost on add to deck
Oh you also need a card.ability.extra_value right before it
just hook/patch Card:set_cost
the haters keep tryna tell me to hook
why would you hook it when you can do it in two lines of code on the card
so set that to 0?
better practice
don't use ability.extra_cost, it's inconsistent because sell cost is affected by Clearance Sale and Liquidation while ability.extra_cost isn't
the joker is 0 dollars, i want the sell price to be 0 dollars, i think the inconsistency will miss
Trying to figure out why when I destroy 2+ clubs or spades it only registers as one instance of mult increase than 2. Is it something with the removed_card section?
ok jonathan blow
so you couponed the joker
since buy and sell cost cannot go below 1
It can
Card:set_cost doesn't allow it
Sell_cost does however
Because I do that
give me a second and I can show you it does
sell_cost is affected by ability.extra_cost
i think i did something wrong
but still
I wouldn't recommend that
what would the hook look like?
like this?
ss13/14 mentiond
No, I don’t think they do, I think the negative is messing with values somehow
just tried hooking it as well and it didnt work
wtf
what
the creature
ow
hes so nicwe he cleaned your ears
if it's related to one object, I recommend setting the condition that that object
e.g. for joker:
local set_cost_ref = Card.set_cost
function Card:set_cost()
set_cost_ref(self)
if self.config.center.key == "j_modprefix_key" then
self.sell_cost = 0
end
end
lunch 
Oh.
i cant get him off!!!!
That’s so cool
thats cooler than whatever god awful thing im doing lol
My poor ears…
hes cleaning them ❤️
I wish he would learn boundaries
hes 9 seconds old
I do not care
i think the potassium mod does it somehow
give me a minute i could try figuring it out maybe
G.SETTINGS.play_button_pos
is that a bool?
No.
oh its a 1 or 2
does anybody know the function to call to increase joker slots in the shop? i've tried consulting a few mods as reference and got how to increase the other slots i wished, but the joker slots for shop has been my bane.
its just change_shop_size
no G.GAME
is there a juice up for the whole screen that makes it shake
i know it gets triggered when you press a button
yknow what would be really fucked up
if my joker looks at your steam games and launches a random one
that would be funny af
oh damn, i somehow completely overlooked just doing this, thx
Absolute peak idea, would be funny
Is there a way to sense if a specific card has been created
add_to_deck function
does that work with tarot and spectrals too?
How do you retrigger rightmost joker?
ok, so the add_to_deck is not seeming like the thing I need, I have a joker that if it creates a specific spectral it is destroyed
why is this crashing my game?```lua
local _card = SMODS.add_card({set = "Playing_Card", suit = _suit, rank = "6", edition = edit_type, })
Is the joker the one creating the spectral card
yes
Use start_dissolve after the spectral is created
hey could anyone please help me with the steps to modding a very simple thought into the game? would be very much appreciated
the thought is it would fade an image in and out with and audio clip anytime a two of a kind is played
well, it's a specific spectral that's created that will destroy it
Whats your code like so far
I haven't added anything yet, but it does make the spectrals
Im busy for a bit but if you dont find a solution until then I'll send you a code snippet
thanmks
ok i thought i fixed the problem but no it still doesn't work.
Context: trying to do it so that this joker when bought becomes eternal and gives the player some money on buy, but makes the player lose money after beating 6 blinds while also losing its Eternal Sticker. Where i need HELP rn: i'm trying to first get the player to lose the money after the blinds beaten (currently testing with just 1), but i'm not having any sucess.
you could make it return negative money at end of round, also iirc calc_dollar_bonus has to be outside the calculate function, so maybe thats why it doesnt work
So I took the deserved day off of making the mod and I was bored all day n felt a bit lost. What am I gunna do when I've finished the mod im gunna have nothing to do all day
do more mods
config = { extra = { repetitions = 1 } },
loc_vars = function(self, info_queue, card)
return { vars = { 1, card.ability.extra.repetitions } }
end,
calculate = function(self, card, context)
if context.end_of_round and context.game_over == false and context.main_eval and not context.blueprint and G.GAME.blind.boss then
card.ability.extra.repetitions = card.ability.extra.repetitions + 1
return {
message = localize('k_upgrade_ex'),
colour = G.C.FILTER,
card = card
}
end
if context.repetition and context.cardarea == G.jokers then
local right_joker = nil
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card then
if i < #G.jokers.cards and G.jokers.cards[i + 1].ability.set == 'Joker' then
right_joker = G.jokers.cards[i + 1]
end
break
end
end
if right_joker then
return {
repetitions = card.ability.extra.repetitions,
card = right_joker
}
end
end
end,
}
does it work like this?
retriggers the rightmost joker
I mean i would rather do a mega mega mod and keep updating it, idc how large it gets rather than make loads of little bits
makes sense
That all stands on how much my artist is willing to commit
They are doing it for me for free rn with the stats I gave them
because it's not retriggering
im not 100% sure how to retrigger jokers, but you can look at cryptid mod for examples
i'm using vanilla remade
for reference
If you want the rightmost joker cant you base it on brainstorm and switch the left to right ?
Idk if I sound stupid
But thats what I would do
hmm
It worked for me with "droopy chad" which retriggers last played cards twice instead of first card
Card**
Idk of its same with retriggering jokers tho
i believe context.repetition isnt used for retriggering jokers
but in cryptid mod theres a joker that retriggers the leftmost joker, so you could look at that one for the used context
Brainstorm....
So, the loseMoney var already has negative money, so at least there is that. I moved tge cal_dolar_bonus outside of calculations, and tried to just insert the blinds beaten counter in it, but now i had a crash, do i need to simply change the "if ... else ..." or something else
how can i choose a random card from your hand that doesn't have an enhancement?
Wait no I feel dumb i understood it wrong ur right cryptid is the best example
Wait, it’s written as context.retrigger_joker_check?
Been up all night watching tv its like 8am now... gunna try and survive so I dont mess up the sleep schedule
Basically, going by VanillaRemade's Brainstorm, i believe you'd simply need to find a way to get the last Joker in the array instead of the first, but other mods with such jokers might do the trick better
Calc_dollar_bonus doesnt have context like calculate
I’m looking at cryptid mod, at the chad joker
Retriggers the leftmost joker 2 times
oh, i see, i'll see what i can do then
You can put your thing in calculate then reference the variable in calc_dollar_bonus
the last joker is G.jokers.cards[#G.jokers.cards]
oh, i see, thank you, i was afraid it wouldn't be able to be referenced, i'm just comming back to programming after years, and its first time with Lua
modders, what do you usually do when adding a talisman support?
You see a number? to_big 
all?
Well you need only for comparisions
Cry
mmmm
i see
i dont see any documentations for it though
so im a bit lost
on adding a talisman support
Check how other mods do it, I have talisman compat in mine
Last part in utils.lua and wherever I use to_big
you got any links?
also thats messed up
there should be a doc for it
simply dont support talisman
So true
There should not be existing in the first place
Im on phone so I can properly fetch where I use to_big elsewhere
-# theres a difference between a dev that love their playerbase and not
what joker of yours that uses to_big?
I have the idea... its almost there... but its not there,,,
I genuinely do not understand why I can't get the black-colored Joker to appear.
Every time I attempt to change it, it either goes back to the Violet one or nothing at all.
Please help me from crashing out.
isnt it 2, 2
too too
thanks N
so like
its just money thing?
read the last line
Nope, that got the brown-colored one. But I think 1, 2 is gonna do it.
YOUR TOO TOO
too too
Also, it was 1, 2
thats stupid
WELCOME TO: Lua.
no, just when comparing with mult, hand_chips, G.GAME.chips or G.GAME.blind.chips
ohhhh
okay
how do i do it tho
like
example
if i want to make a mult joker
talisman compat
(btw the skin on the last 3 are the same as the ones above)
most of the time you don't need to unless you're comparing using < or >
I'm doing coding, I HATE doing art assets.
OHHH
okay
i understand it
son of a bitch
that's fine because it's your own value
it's only when comparing with values that the game has by default
noted
Has there ever been a joker that disables a boss blind whenever it gets debuffed?
not that i have seen
morning
Morning izz
hi heaven