#💻・modding-dev
1 messages · Page 398 of 1
thats a better idea for sure
i dont watch markiplier so idk many markiplier quotes
like one i have in mind is it makes your mult x0 and he says "NO, STOP, WHAT ARE YOU DOING, WHAT ARE YOU DOING"
valid :3
tf, why does it display small text like that? i might put that part inside a background instead
woe x0 mult upon ye
not working?
real asf
can i see the code? it might be the bug im fixing
-10 mult, destroys joker to the right of him "Well, that's a problem. Not my fault I did everything I could. Also why are you still here?"

remove context.jokermain check and for loop
key = 'wokepv',
rarity = "cr_awake",
atlas = 'cookies1',
pos = { x = 2, y = 1 },
soul_pos = { x = 1, y = 2 },
loc_txt = {
name = {'{s:0.6}Compassionate{} Pure Vanilla Cookie'},
text = {
'Test',
},
},
}```
i lLOVE RNG
wait why, i wanna retrigger every playing card
Why does using copy_card give the default back art?

then how do i do it?
it's small because you made it small lol
it calls calculate with context.repetition after each card scores
oh
i want everything to be a gamble or tradeoff in my mod high key, i want my jokers to feel like a genies wish and you get fucked over 90% of the time >:3
cryptid'nt
you might want to check that it's calling calculate for played cards and not held cards but i dont remember the context for that
that wasn't the problem, i was talking about how it's weirdly spaced out and not centered
you have to make a deck where only your jokers spawn with more joker slots
gambling all day every day
WAIT YOURE SO REAL FOR THAT
thats just how it is, vanilla doesnt really use that so it was never made to look good
hence im making an enhancement that is indestinguishable from normal enhancements, and when destroyed or played, you IMMEDIATELY lose the run.
Oh you had that issue too N? #⚙・modding-general message
better idea: on destruction create 2 copies of itself so it gets harder and harder to not play
Why do you need a util function to put a singular number in two functions?
yes, the fix is already merged into smods :3
Ah ok I'll update SMODS 👍
i return.,,
How can i make a joker halve the blind size?
my card enhancement name might be to silly for server it got me myooted . w.
well now im curious
be silly in moderation
i dm'd it to yuou .w.
that works but you also need to update G.GAME.blind.chip_text = number_format(G.GAME.blind.chips)
I'd wrap such in an event, anyway.
-# Taken from DriveSpace.
G.E_MANAGER:add_event(Event({func = function()
G.GAME.blind.chips = math.floor(G.GAME.blind.chips/2)
G.GAME.blind.chip_text = number_format(G.GAME.blind.chips)
G.FUNCS.blind_chip_UI_scale(G.hand_text_area.blind_chips)
G.HUD_blind:recalculate()
G.hand_text_area.blind_chips:juice_up()
return true end }))
i was trying to add a bg color to part of the joker's name
key = 'wokepv',
rarity = "cr_awake",
atlas = 'cookies1',
pos = { x = 2, y = 1 },
soul_pos = { x = 1, y = 2 },
loc_vars = function(self, info_queue, card)
return {
vars = {
colours = { HEX("#F4B844") }
}
}
end,
loc_txt = {
name = '{B:1}Compassionate{} Pure Vanilla Cookie',
text = {
'Test',
},
},
}```
no #
ok yeah, totally the guide's fault for mentioning it like that
yeah its fixed in a pr but it hasnt been merged
I GOT IT TO REMOVE MORE CARDS AGAIN :D
I don't know how that fixed the problem but it did!!!
I'm so glad rn
hm,, ok so upgrading an edition to the next might be tricky
because start_dissolve removes in an event, so you dont have the problem Myst said
i know cryptid does that? idk if cryptid does their own thing for that though
they do, i tried also looking at DebugPlus to see if i could source code from when you do ctrl + q
the cryptid stuff is a lot more complicated though because the rework tag makes a new copy in the shop
looks like it just loops through editions and then adds one to the edition index when the original edition is found
ohh, and the edition index is what defines the edition?
goodness i gotta make an index now

does anyone know how to substract one dollar from the total each time a joker triggers?
any joker or your joker
forgot to reply properly, @tawdry shale
if its your joker, you can just add dollars = -1 to the return
What about just removing everything but 3s? Could modify what I did with just Aces.
i personally use a variable for the cost
If i want jacks to be considered also kings and queens, do i do this?
this might be for another day this makin my head spin XwX;
i'm referencing the maximum joker from the cryptid mod
...being considered as both is... way more difficult.
Oh my god, it was the remove function, thanks
Now I know not to use that
1 card being multiple ranks is not currently supported by SMODS because of determining straights
i dont think youre supposed to do hooks inside the joker but i may be wrong
whats wrong with this code? i want to retrigger a single random card a random amount of times but instead it retriggers a random amount of cards a random amount of times
if not context.end_of_round and context.repetition then
sel_card = 0
for _, playing_card in ipairs(context.scoring_hand) do
sel_card = sel_card+1
end
selected_card = pseudorandom("seed",1,sel_card)
if context.other_card == context.scoring_hand[selected_card] then
return {repetitions = pseudorandom("seed", 1, 10)}
end
end
end ,
i'm just referncing code from cryptid
init is cryptid specific.
https://github.com/TheOneGoofAli/TOGAPackBalatro/blob/250a12884466c5247bd862872e7d5c09ea255fd8/togastuff.lua#L327-L350 are more general.
can you add rarities to consumables?
calculate = function(self, card, context)
if context.cardarea == G.jokers and not context.blueprint then
local debuffed = {}
for k, v in ipairs(context.full_hand) do
if v:is_face() then
debuffed[#debuffed+1] = v
v:set_ability(G.P_CENTERS.m_gold, nil, true)
G.E_MANAGER:add_event(Event({
func = function()
v:juice_up()
return true
end
}))
end
end
if #debuffed > 0 then
return {
message = localize('k_gold'),
colour = G.C.MONEY,
card = self
}
end
end
its saying context.full_hand is a bad argument for ipairs() but thats exactly how its done in midas, any ideas?
you're missing a context check
context.cardarea == G.jokers and not context.blueprint is too general
midas mask is for scoring_hand and yeah what he said
i think you need main_eval or joker_main or smth i forgot what its caused
joker_main
i needa actually learn the difference
joker_main is the main joker timing
main_eval is just the equivalent to (not context.individual and not context.repetition)
interesting, thanks
if context.joker_main then
if context.cardarea == G.jokers and not context.blueprint then
like so?
you dont need context.cardarea == G.jokers but yes that works
that makes sense, thank you
How do set all jacks to be considered kings?
I would want that but i''ve been told that ain't super easy to do
local cgi_ref = Card.get_id
function Card:get_id()
local id = cgi_ref(self)
if conditions and id == 11 then
id = 13
end
return id
end
and do this outside the joker right
whats the ingame function for adding small and big blinds
i need to override it so i can put in my own
Try looking at Ortalab
okay thanks
if v:is_face() then
debuffed[#debuffed+1] = v
v:set_ability(G.P_CENTERS.m_gold, nil, true)
G.E_MANAGER:add_event(Event({
func = function()
v:juice_up()
return true
end
}))
end
im not sure why v:juice_up() is causing a crash here
ah its a lovely patch
What is v?
So you can't have Jacks considered as both itself and Kings
or is there a solution but it's very convoluted to try and implement
You could just patch Hit the Road, Baron and Triboulet to use a custom is_id function.
Hmmm that could work but how can i put that in the code of my mod without completely modifying the game itself
Is there a way to interact with base game jokers through mod code?
a card within full_hand
if context.joker_main and not context.blueprint then
local debuffed = {}
for k, v in ipairs(context.full_hand) do
if v:is_face() then
debuffed[#debuffed+1] = v
v:set_ability(G.P_CENTERS.m_gold, nil, true)
G.E_MANAGER:add_event(Event({
func = function()
v:juice_up()
return true
end
}))
end
end
if #debuffed > 0 then
return {
message = localize('k_gold'),
colour = G.C.MONEY,
card = self
}
end
end
for k, v in ipairs(context.full_hand) do
You could take ownership of it.
Ownership??
Yes.
But you could also patch it.
https://github.com/balt-dev/SMODSTemplate/tree/trunk
made a mod template and decided to release it
can the loc file of a mod contain and if statement
No.
im trying to change the desc of lucky cards depending on the presence of a joker, should i just take ownership instead?
Yes, you would take ownership of the loc_vars though.
why..?
Because if the joker is present you can redirect the localization to somewhere else.
I'm trying to make an enhancement that, while held in hand, makes played scoring cards give x mult. It seems that calculate works differently on enhancements than it does on jokers, because I didn't get anywhere with my attempts.
It seems like calculate only runs when the enhanced card itself is evaluated? How would I work around that?
Does anyone know how to ajust the editions of shop jokers and jokers out of boosters?
You would have to either have a hidden joker or patch the game to call context.individual in a function.
my cards are returning to hand like I want here but they flip over when returning, anyone know whats causing this? I've changed the stay_flipped and dir arguments but doesnt seem to do anything
I signed up to something real complicated, didn't I ._.
I think I'll push this one back and do my other enhancements first then, thanks :3
Is this supposed to be a card that returns to hand after scoring?
I think you would have to patch where the game tries to move the cards to discard.
how do i run a check for if a joker has eternal
if card.ability.eternal
yeah, that
does that work in take_ownership
Yes.
ill try that see what happens
What's the use case you wanna check for eternal for?
How does one change the base blind size?
Ah, yeah. There's also SMODS.can_calculate() in case you wanna see if a card is destructible, which accounts for other mod features as well, but if you just wanna know whether it's eternal, this works!
hooray!
SMODS.can_calculate() is to see if it's being destroyed
Oh wait, oh wait, only if it is being destroyed, not whether it can be? I guess that makes sense. I'm sure this implies things for Kino, though, haha
yeah it checks if it's debuffed or if it's getting_sliced
SMODS.Back{
name = "Showman",
key = "showman",
pos = {x = 1, y = 3},
loc_txt = {
name ="Showman",
text={
"Start with a",
"{C:dark_edition}Negative{} {C:attention}Showman{}",
},
},
apply = function(self)
G.E_MANAGER:add_event(Event({
func = function()
-- Create a Showman card with negative edition
if G.jokers then
local card = create_card("Joker", G.jokers, nil, nil, nil, nil, "j_showman")
card:set_edition({negative = true}, true)
card:add_to_deck()
card:start_materialize()
G.jokers:emplace(card)
end
return true
end
}))
end
}
When running this code there are no crashes only the joker doesnt create, anyone know why?
j_showman doesnt exist :3
oh.
j_ring_master
Also you're returning true even when G.jokers doesn't exist.
do i just remove the returning of true
No, you put it in the if
is this right
Code?
why not go through the jokers card area and check if there's an eternal jimbo
Try replacing all the add joker code with SMODS.add_card({key = "j_ring_master", edition = "e_negative"})?
this i made earlier and did work
idk man i havent done a quip before 😭
ok
might be better to look for the eternal jimbo in the add_speech_bubble instead of taking ownership just to check its presence
How would I go about making a blind decrease the number of scored chips each second? I've tried looking at how cryptid does something similar with "The Clock" but I just don't understand any of it.
nope
but this is the same and did work
you could set something to run on a timer with scheduling event that decreases the scored chips
it only has an extra for loop but that shouldnt matter right?
or whatever its called
and how would i do that
Try adding if not G.jokers then return false end at the start of the event.
bump!
G.GAME.chips has the current scored chips
you can make an event with a delay to continuously decrease it
WIAT FUCK
wrong one

for the eternal jimbo
yes that one is me
it turns out the juice up crash was from another joker entirely, which also
crashes the game when its sold???
you could use SMODS.find_card to find all the jimbos
where do i see if its false
thoughts?
SMODS.Joker{
key = 'coup',
loc_txt = {
name = "Coup D'etat",
text = {
"Adds {C:attention}double{} the rank",
"of {C:attention}highest{} ranked card",
"held in hand to {C:red}Mult"
}
},
unlocked = true,
discovered = true,
rarity = 2,
cost = 5,
atlas = 'Jokers',
pos = { x = 2, y = 0 },
blueprint_compat = true,
eternal_compat = true,
perishable_compat = false,
in_pool = function(self)
if G and G.jokers and #G.jokers.cards >= 3 then
return true
end
return false
end,
calculate = function(self, card, context)
if context.individual then
if context.cardarea == G.hand then
local temp_Mult, temp_ID = 0, 0
local raised_card = nil
for i=1, #G.hand.cards do
if temp_ID <= G.hand.cards[i].base.id and G.hand.cards[i].ability.effect ~= 'Stone Card' then temp_Mult = G.hand.cards[i].base.nominal; temp_ID = G.hand.cards[i].base.id; raised_card = G.hand.cards[i] end
end
if raised_card == context.other_card then
if context.other_card.debuff then
return {
message = localize('k_debuffed'),
colour = G.C.RED,
card = self,
}
else
return {
mult_mod = 2*temp_Mult,
message = localize { type = 'variable', key = 'a_mult', vars = { 2*temp_Mult } },
card = card,
}
end
end
end
end
end
}
thats the full joker code, does anyone know why calling juice_up() on this (or selling it) would crash the game?
anything below 1 is treated as 1
how would i set a timer to work on a blind?
so like this?
can anyone tell me why this crashes when i try to apply the seal with the consumable?
you could create the repeating event in set_blind, which stops itself if the blind is defeated
Use card:set_seal("modprefix_key")
i just sold another joker (the one with the code above) and it sold the joker ive been working on
SMODS.find_card returns a list, so you could go through the list to check if any of them are eternal
you could set a flag or false, then go through the list with ipairs and set it to true if any jimbos are eternal
what do i replace for that?
your mod prefix
and the seal's key
G.hand.highlighted[1].seal = "Syrup_seal"?
no like
i meant what function do i replace to use that
nvm
i misread it
i want to make this joker enhance played cards with a modded enhancement, is this code ok?
G.play[i]:set_ability(G.P_CENTERS["idk_china"], nil, true)
end```
No.
i doesn't exist.
just G.play?
now getting this
No, it would be context.other_card
okay, thanks :)
It should be xmpl_whatsapp_seal
OKAY. NOW do i have it
bump
quotes around the j_joker
oh phew
since it's a string key to put inside find_cards
generate_ui shenanigans if anything, but not entirely sure
i think the file was corrupt or something, i created a new file with the same code and it worked
i hate this
ah ok, cool
return key in loc_vars to change the name to another localization key
vars wont really work as far as i know
like this?
yes
yeah
neat. thanks!
ok so now it doesnt crash yet now the consumable literally doesnt do anything :(((
How would I make a loop that works on the set_blind and doesn't freeze the game?
try blocking = false
ok I don't think I understand lol
would I write smthn like
{
key = "test",
loc_txt = {
name = "title",
text = {"description 1", "description 2"}
}
}
and then return key = "test"? And how would I be able to edit the title with this?
right now the main problem is i know 2 loop types and they both wouldn't work in this scenario, i think i worded my last question wrong and it should've been more like: what type of loop should i use?
mine isnt with variables but here's an example? (localization file)
ah ok
how can i make a new flag for checking if a card has expired before, to achieve an effect like gros michel -> cavendish
for in_pool
I would also like to know ^
both vanillaremade and smods example mod have this actua- yeah that
the smods one is more explained
so looks like michel sets a flag to true, and cavendish checks if the flag is true before getting added to the pool
i forgot to say before but thank u bc that fixed my problem
question is
does setting the flag to true create it, or does it need to be defined / initialized elsewhere
like can i just slap G.GAME.pool_flags.vremade_gros_michel_extinct = true into the code and be done with it
does setting the flag to true create it
correct
cool
about the j_hpfx_trapezoid:
- Is that after an SMODS.Joker or anything?
- is that the key that a joker will use later on?
- do you need to add the
j_hpfxbecause it's your mod tag? Or did you do that for categorization purposes?
how does one make a joker eternal?
card:set_eternal(true)
(yes, theres a dedicated function for it, idk why)
you can set any other sticker with an actual function for stickers in general
but eternal in specific is easier
about the j_hpfx_trapezoid:
- It's a localization file. This is just the text
- Yes, it's the key you switch from to the
alt - Both?
thanks
ohhh so for perishable card:set_perishable(true) would not work?
i started with this today so im learning a lot
yeah all the vanilla ones do
oh
well not pinned but that makes sense
yeah
set_sticker is just for modded and if you want to use the vanilla ones with their actual names for some reason
set_sticker okay thanks
to be more specific, localization files use full object keys
ah, ok cool
yeah, I think I found the right wiki page to look at on the smods github page
cool
ok so im tryna make a consumable that applies a seal and if i do the first one the consumable doesnt do anything, and if i do the second one, it just crashes the game what do i do??
what's your mod prefix
if i make a higher shop rate for a consumable type, will it appear less or more?
trying setting it to 99999999
if it doesnt show up every time, less
this is ok right like this wont break it and will actually pick between two i have
try it and see I guess
aint that the truth
ok it appears every time
so higher then
yeah
does anyone have an example deck that shows how to put a texture for ur deck
will this make it rare? (ik it will)
the steammodded example decks dont have textures
its just the same as jokers
xmpl
decks are just jokers with apply functions instead of a calculate
also with the 1x and 2x?
ok thx
not instead of
as what youll generally be using
wild deck - all cards are wild cards
just got onyx agate on this hit new deck
ngl idk if this is OP or garbage
shouldnt this work?
uhh ignore that its also in loc_txt
is there a table with all card areas?
this? it isnt working
do u have the asset in both the 1x and 2x folders?
not as far as I know but smods has some utility funcions for the joker areas iirc
why
yeah
i want a joker that fills all card areas with random cards of that type
that sounds incredibly OP but go ahead
its of my custom rarity
this was my last special grade
who is this for?
hmmm that seems like it would cause problems if you do all cardareas
im curious now
like it would break my mod for one
wdym
fair point ill do it for my areas and vanilla
are they all based on jjk characters
yheah
and if so, who is that one
this is gonna be suguru
does it trigger both?
i think that makes more sense yeah
yup
oo cool
try adding , nil, true after the string
@keen totem feel free to try out the mod wink wink
do you have it posted in the modding channel?
is there a table of all consumeable types?
un
ed
anyone know why this doesnt work?
i made it pos and not atlas pos
but still doesnt do anything
also no crashes or anything
Ji-Jimbo Kaisen
Jujutsu Jokers (#1358478527934103572 ) sounds better imo
i haven't decided on the name for my own mod yet
Do you have the example mod enabled
someone already took the "Cookie Poker" name
bala run?
Nah :clueless:
does anyone know if theres an easy way to hook the functions used by jokers (eg calculate, add_to_deck)
like is there a different function that i can hook or do i have to loop through all the jokers and hook the functions that way
What’s your folder structure
Nah, id win
yes, Card:calculate_joker and Card:add_to_deck
ah so it is calculate_joker
and how easy from that point would it be to get the mod calling that
well if we assume that the card calling it belongs to the mod then easy
Folder>lua file, assets>1x, 2x
And in 1x and 2x moddedvanilla.png
The bigger one in 2x
is it lowercase
no
what is the syntax for that, is it a property of the card itself
sorry if these are stupid questions
try changing to single quotes maybe
im considering adapting a feature im gonna write for my mod to instead be a library
jujutsu jimbo
Alr
does anyone know why the line self.T.r = -0.2 within:
G.E_MANAGER:add_event(Event({
func = function()
play_sound('tarot1')
self.T.r = -0.2
self:juice_up(0.3, 0.4)
self.states.drag.is = true
self.children.center.pinch.x = true
G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.3, blockable = false,
func = function()
G.jokers:start_dissolve(self)
self:remove()
self = nil
return true; end}))
return true
end
}))
might be causing a crash
context is
if context.cardarea == G.jokers then
if context.before and not context.blueprint then
well what's the crash
let me get a log rq
change all the self for card
yeah yeah just go play it lmao (i need feedback)
(for you in a function atleast)
Oops! The game crashed:
[SMODS NYCTO "ddcjokers.lua"]:153: attempt to index field 'T' (a nil value)
Additional Context:
Balatro Version: 1.0.1o-FULL
Modded Version: 1.0.0~ALPHA-1129a-STEAMODDED
Love2D Version: 11.5.0
Lovely Version: 0.6.0
Steamodded Mods:
1: Nyctophilia by Nycto, AnnaSH [ID: NYCTO]
2: DDC Challenges by Nycto, AnnaSH [ID: DDCChallenges]
Lovely Mods:
Stack Traceback
===============
(3) Lua field 'func' at file 'ddcjokers.lua:153' (from mod with id NYCTO)
Local variables:
(*temporary) = nil
(*temporary) = number: -0.2
(*temporary) = nil
(*temporary) = nil
(*temporary) = number: 11747
(*temporary) = string: "attempt to index field 'T' (a nil value)"
(4) Lua method 'handle' at file 'engine/event.lua:99'
Local variables:
self = table: 0x03549d88 {start_timer:true, timer:TOTAL, blockable:true, trigger:immediate, func:function: 0x03223e18 (more...)}
_results = table: 0x02d458c0 {blocking:true, pause_skip:false, time_done:false, completed:false}
(5) Lua method 'update' at file 'engine/event.lua:182'
Local variables:
self = table: 0x02d489d8 {queue_last_processed:185.98333333337, queues:table: 0x02d48a00, queue_dt:0.016666666666667 (more...)}
dt = number: 0.0166642
forced = nil
(for generator) = C function: next
(for state) = table: 0x02d48a00 {unlock:table: 0x02d48a28, other:table: 0x02d48ea0, tutorial:table: 0x02d48a78 (more...)}
(for control) = number: nan
k = string: "base"
v = table: 0x02d48a50 {1:table: 0x02f55488, 2:table: 0x03549d88, 3:table: 0x02e46e40, 4:table: 0x03350d90 (more...)}
blocked = boolean: false
i = number: 2
results = table: 0x02d458c0 {blocking:true, pause_skip:false, time_done:false, completed:false}
(6) Lua upvalue 'gameUpdateRef' at file 'game.lua:2537'
Local variables:
self = table: 0x0276dc58 {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x032e32b8 (more...)}
dt = number: 0.0166642
http_resp = nil
(7) Lua method 'update' at Steamodded file 'core/ui.lua:81'
Local variables:
self = table: 0x0276dc58 {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x032e32b8 (more...)}
dt = number: 0.0166642
(8) Lua field 'update' at file 'main.lua:965'
Local variables:
dt = number: 0.0166642
(9) Lua function '?' at file 'main.lua:909' (best guess)
(10) global C function 'xpcall'
(11) Love2D function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '?' (defined at line 880 of chunk main.lua)
inerror = boolean: true
deferErrhand = Lua function '(Love2D Function)' (defined at line 348 of chunk [love "boot.lua"])
earlyinit = Lua function '(Love2D Function)' (defined at line 355 of chunk [love "boot.lua"])
the crash
will do
also, send only the first couple lines from the log next time. that's the only part describing the main problem
so apparently something's wrong with my ipairs? do i change the _ to k
ty <3
actually i might be doing smth stupid so
the idea is to make some of the core functions of jokers and such be changed to run with a pcall
so if theres an error i can just put a dialog instead of crashing the game
is this a decent idea to put in a library?
also im getting this error
vanilla cards/jokers don't have a "mod" defined in self.config.center, so you can't get mod.id
replace the plain print statement with this:
if self.config.center.mod then print(self.config.center.mod.id)
else print("vanilla") end
i would like feedback on this because i dont wanna waste my time on a bad idea or smth that can be done more easily
i feel like it could be useful for playtesting purposes
Someone should definitely make a spiderman mod with a card called J Jimbo Jameson
hello chat, im making a deck with a specific effect when defeating a boss blind, but checking for if context.end_of_round and G.GAME.blind.boss then makes it trigger like 7 or 8 times at once, what check can i add to make sure it only triggers once instead?
you could hook into Blind:defeat instead maybe
is there a way to set specific colors so that i can later use it for text anywhere? (instead of defining them again and again)
i did that to make an increment for a specific boss
bump
(that first line is just for initializing)
did what i suggested work or no
i had accidently had the lua file a second time in my mods folder im so stupid
it works tho thanks so much
oml 😭
sure
nop
i got nothing then 🥀
yeah im kinda done-so
is there a way I could increase the effects of other Jokers while a certain joker is held? Right now I have a bunch of statements like this in my calculate:
if not _joker.ability.mult == nil then
_joker.ability.mult = _joker.ability.mult * card.ability.extra.multiplier
end
but it doesn't work
this is all being done during context.before btw
context.main_eval
changed the v to vv like in the misc_functions, still crashes
so Im bumping this
any ideas anyone?
Wait Im stupid
Nvm Im stupider what did I do wrong
doesn’t gift card do that but with sell value
np!
how would i use the color of my modded rarity in text?
{C:<your-color-code>} maybe, but I've never used a custom color before tbh
oh, i just need to use the key for my rarity
I think it's `{C:YourModPrefix_YourRarityKey}
I think it's {C:YourModPrefix_YourRarityKey}
{C:colorname}
example: {C:IjiGray}
mod prefix isn’t required unless it was put in the earlier string
is there a way to step-through the code while the game is running? would be really helpful
i wish
god I wish
yeah
i'm trying to make a custom enhancement that has a chance to retrigger a played card when an adjacent card scores, but I'm struggling to get it to work. this is my best attempt at getting it to trigger (random chance not included), but I really have no idea what I'm doing which is evident by its lack of doing the thing
calculate = function(self, card, context)
if context.cardarea == G.play and context.main_scoring then
local my_pos = nil
for i = 1, #context.scoring_hand[1] do
if context.scoring_hand[i] == card then my_pos = i; break end
end
if my_pos and (context.scoring_hand[my_pos+1] or context.scoring_hand[my_pos-1]) then
card.ability.repetitions = card.ability.repetitions + card.ability.extra.retriggers
return {
message = "Hit!",
card = card
}
end
end
end
can anyone help me with what i'm doing wrong and how to fix?
reading code on mobile is hell N’ you have my utmost respect
ok well you already had that but now you have it twice
can I print out the values in-game? like to the console?
yeah
use print(value)
I tried and they don't seem to show up, I guess that's a red flag already lol
Just double checked - for colours added by SMODS.Rarity, SMODS.Gradient, SMODS.ConsumableType and SMODS.Suit, it definitely requires the mod prefix.
{C:prefix_rarity} works, {C:rarity} doesn't.
it's giving the wrong total value
surround the numbers in the description with ##
the hashtags correspond to the argument in loc_vars you want to access, so instead of +4 do +#1#
and so on
as for the wrong total
make sure you're resetting its total mult addition when a card is removed if it is a cookie
also don't do 2 * #G.jokers.cards, make sure you use the card's ability
card.ability.extra.bonus * #G.jokers.cards or something like that, and put "bonus" in the Joker's extra config
why is this happening
it's crashing
[SMODS CookieRun "jokers/commons.lua"]:25: attempt to perform arithmetic on field 'bonus' (a nil value)```
because your bonus was returned as nil
what are you doing in the loc_vars
why are you multiplying by G.jokers or am I missing something
breeze is about to blow me out of the water
trying to return the total value of joker after it adds +2 mult for each common cookie
why not just do a for loop instead
DebugPlus can help a bit with this.
It provides an eval command for running code live, if you want to check the contents of a table or change a value, and you can even do eval dp.hovered to inspect the object currently hovered over with the mouse.
There's also watch lua, watch config_tab and watch center which allow you to make code changes to your files and see the results immediately (with some limitations)
https://github.com/WilsontheWolf/DebugPlus/blob/master/docs/dev.md
you need to get another instance of the joker or restart a run
Surely they started a new run
the total is wrong again
you want it to be 14?
abstract joker does this, just make sure to apply an additional rarity filter since abstract does all jokers
figured it out. barely noticable capitalisation error in the atlas key

so im making a mod with the partner mod, why is there <Jr ERROR>?
isn't it supposed to be 12? (4 + (2*4))
Gingerbrave is a common
There are 5 gingerbraves
im kinda dumb when it comes to coding could u send a text file of the example in this ss
😭
i mean for each gingerbrave, not the total jokers
?
Did you add the base mult into the addition
Right now it’s just the gainedmult
(2*5)
ok, so like...
card.ability.extra.mult + card.ability.extra.bonus * (G.jokers and #G.jokers.cards or 0)
ok, so looks like it's also counting itself for the mult bonus, and is counting any joker
any joker period or any common
any joker period
those are definitely not common jokers
it's from this
https://github.com/xssgm/Touhou-Balatro-texture-pack/blob/main/localization/default.lua
extra = {
mult = 4,
bonus = 2,
}
},
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.mult, (card.ability.extra.mult + card.ability.extra.bonus * (G.jokers and #G.jokers.cards or 0)) } }
end,
calculate = function(self, card, context)
if context.other_joker and (context.other_joker.config.center.rarity == "cr_common") then
return {
mult = card.ability.extra.mult + ( card.ability.extra.bonus * #G.jokers.cards )
}
end
end,```
you're not counting commons you're counting jokers
okay, so when taking ownership of a vanilla joker, how do i properly overwrite the calculate functionality? because when i specify a calculate function, it seems to do both that and its original behaviour
does anyone have any clue why a card is randomly crashing when hovered, with an issue about "colour" being nil? it's a crossmod consumable with paperback and thus uses its badges, but for some reason people are experiencing crashes that i can't replicate myself
not my crash log
it shouldn't unless the joker doesn't act in calculate_joker afaik
does it use cal— yeah
:3
I'm proud of you

this crash makes zero sense lua SUCKS
it does, yes.
which is it
it's 8 ball
weird
What are you trying to do
i am optionally making 8 ball use 9s instead, provided both the config option and the malverk texture are active
either im blind or there's nothing about colour in here
yeah, which is why it's so insanely confusing to me
⑨
is this a patch moment
i have zero clue 💔
i meant cirno mb 😭
supposedly the crash still happened with only this mod and paperback installed
which makes it even more confusing
oops lol
sounds like something with paperback
oh nice ty
all good
that part's confusing too because it's perfectly normal for me
how would i get the sell value of a joker?
but several people have reported this crash, only with this card
joker.sell_cost
did you accidentally make a dependency somewhere
nope

wait, so calculate() isn't exclusive? 
i am sure!
only dependencies are steamodded and lovely
this card just doesn't show up whatsoever if paperback isn;t installed
fuck the line is "pretty sure"
i mean isnt that a good thing since it's a paperback collab
yeah that's intended
oh ok
did you try with paperback disabled?
oh i see, if calculate() doesn't return anything, it just continues throughout the rest of calculate_joker()
hm
admittedly it's less of a collab and just adding functionality on our part lol
not having paperback present at all makes the card not show up, which is intended
no i mean disabled specifically
what i'm trying to fix is this strange crash multiple people have reported
hmmm
also does your mod require a certain smods version?
can you send the localization
card doesn't show up
wacky, but a simple fix for my issue
again intended
anything above 1.0.0~BETA-0312b
what if you undid it to fix this issue rq
i think that was just an arbitrary version i picked
ok so it's the exact same as paperback that's not the issue lol
i just pick the version im modding on
lol that's probably where i got it from ngl
sometimes you can get the mod disabled but not lovely patches that's why i asked
i'm too lazy to update that though + i don't want to haveto deal with people asking why a dependency crash happened lol
darn
thought maybe a color was used in the desc
nope, originally i thought that too
well the crash line is all about drawing the card (as in rendering, not as in picking up)
yeah, which is very weird because everyone has said it;s just from being hovered over
the only time ive had that is when i fudged the description so i thought itd be that
maybe take out the attention color just to see?
or maybe it's the badge???????????
it's kinda hard to test for me unfortunately given i haven't ever experienced this crash
oh right
hi, im having problems, what this mean?
however my inability to replicate it has been corroborated
so i'm thinking it's not an issue on our part at all
it's still counting itself and any joker regardless of rarity
return { vars = { card.ability.extra.mult, card.ability.extra.mult + card.ability.extra.bonus * (G.jokers and #G.jokers.cards or 0) } }
end,
calculate = function(self, card, context)
for i = 1, #G.jokers.cards do
if context.other_joker and (context.other_joker.config.center.rarity == "cr_common") then
return {
mult = card.ability.extra.mult + ( card.ability.extra.bonus * #G.jokers.cards )
}
end
end
end,```
um... where do i find mine?
in your metadata file
im new to modding and may be stupid but if you're already doing a for loop shouldn't you get rid of * #G.jokers.cards
correct me if im wrong
I will tell you what I read in the code and tell me if this is what you want:
Each Joker with rarity cr_common gives (mult) + (bonus) * amount of jokers you own
yeah that would mean for each common joker it would give 5 times the bonus instead of the normal amount (assuming you own 5 jokers)
so 5 common jokers give 25x bonus
the problem is it isn’t just doing common
oh it's the outer loop i think
I am really waiting for balatro Kai to release
I'm really waiting for JoyousSpring version 0.8 to release
am i allowed to bump or re-ask a question i asked earlier
i posted it at a bad time and it got lost in other messages
so no one responded
look up "bump" in this channel
yes
its been said 776 times (like the word bump), you can bump your questions that got lost
bumping this
sorry, this is my first time asking a question here (i think)
nah youre good
i was just curious and also wanted to have to see it as well
cause bump said been said alot
this is what i'm currently trying to do
calculate = function(self, card, context)
if context.cardarea == G.play and context.main_scoring then
local my_pos = nil
for i = 1, #context.scoring_hand[1] do
if context.scoring_hand[i] == card then my_pos = i; break end
end
if my_pos and (context.scoring_hand[my_pos+1] or context.scoring_hand[my_pos-1]) then
card.ability.repetitions = card.ability.repetitions + card.ability.extra.retriggers
return {
message = "Hit!",
card = card
}
end
end
end
this is my (failed) attempt to just get it to retrigger at all
im not sure how calculations with enhancements work honestly
How would i make a joker do a certain calculate function if a certain seal is played on a card
?
does context.repetition work?
how would i implement that? i'm still new to modding and dont understand everything yet
just next to the cardarea or somewhere else?
loop through context.scoring_hand and check if any card has card.seal == "sealkey"
some gameplay of minesweeper in balatro
i made the board larger because 5x5 is boring
kk
while i'm struggling to make a card retrigger people are out here making minesweeper...
that's insane
:3c
I don't know if it works but it would be like
if context.repetition and context.cardarea == G.play and [chance calc] then
-- get the index of the card
if context.other_card == context.scorimg_hand[index-1] or context.other_card == context.scorimg_hand[index+1] then
return { repetitions = 1 }
end
end
i'm just being silly
bro what 😭
i put . i put minesweeper in a joker
i have no sprites atm but like i was really bored the past few days
Some of y'all are insane istg
is this error happening because of the extra tarot card i made?
sorry i was going to tell you before but completely forgot lol
you need to update steamodded
desperately trying to figure out why my red seal isn't retriggering my joker 
@daring fern help 
it didnt do nothing, so progress!
...well, what if i just try returning an empty table
did you get the index or did you copy that part literally
if context.repetition and context.cardarea == G.play then
local my_pos = nil
for i = 1, #context.scoring_hand[1] do
if context.scoring_hand[i] == card then my_pos = i; break end
end
if context.other_card == context.scoring_hand[index-1] or context.other_card == context.scoring_hand[index+1] then
return {
repetitions = 1
}
end
end
replace index for my_pos then
._. i dum
anyone tell why is this crash happening?
aight so i wanna effectively have an alternative 5 of a kind and uh,, only the first card scores?
SMODS.PokerHand {
key = "Polycule",
-- above_hand = 'Flush Five',
mult = 12,
chips = 160,
l_mult = 4,
l_chips = 8,
example = {
{ 'S_Q', true, enhancement = "m_hime_lesbian" },
{ 'D_Q', true, enhancement = "m_hime_lesbian" },
{ 'H_Q', true, enhancement = "m_hime_lesbian" },
{ 'C_Q', true, enhancement = "m_hime_lesbian" },
{ 'H_Q', true, enhancement = "m_hime_lesbian" },
},
evaluate = function (parts, hand)
if #hand < 5 then return {} end
local scored_cards = {}
for i = 1, #hand do
local _card = hand[i]
print(_card.ability.name)
if _card.ability.name == "m_hime_lesbian" then
scored_cards[#scored_cards+1] = _card
end
end
if #scored_cards >= 5 then
return scored_cards
end
return {}
end,
}```
anyone know why that would be?
it properly recognizes the hand when 5 of them are played but
return { scored_cards }
am i stupid
it needs to be a list of lists
because its all combinations of the hand
skill issue
if context.repetition and context.cardarea == G.play then
local index = nil
for i = 1, #context.scoring_hand[1] do
if context.scoring_hand[i] == card then index = i; break end
end
if context.other_card == context.scoring_hand[index-1] or context.other_card == context.scoring_hand[index+1] then
return {
repetitions = 1
}
end
end
ahhhh
❤️
in your case you can only have one but for smaller hands you can have more
isee
SMODS.Joker{ key = 'doctor', loc_txt= { name = 'Doctor Whatsapp', text = {"Cada carta con un sello de whatsap", "Se activa {C:attention}una{} vez mas",} }, atlas = 'doctor', rarity = 1, cost = 4, pools = { ["sahur"] = true }, unlocked = true, discovered = true, blueprint_compat = true, eternal_compat = false, perishable_compat = false, pos = {x=0, y= 0}, calculate = function(self,card,context) if context.scoring_hand and card.seal == 'xmpl_whatsap' then return{ repetitions = 1 } end end, }
can someone tell me why this doesnt retrigger a card when it has a whatsap seal?
for i = 1, #context.scoring_hand do
is this error happening because of my custom extra tarot?
@red flower thx
- You need to check for context.repetition
- You are checking if the joker has the seal, you need to do a for loop on context.scoring_hand
thanks, what does a for loop look like?
ok, it no longer crashes! but the card still won't retrigger D:
can you do a print in the return to see if it reaches there?
is context.main_eval concurrent with context.retrigger_joker?
i think so
can anyone please help?
if context.repetition and context.cardarea == G.play then
print("Context good")
local index = nil
for i = 1, #context.scoring_hand do
print("Checking "..i)
if context.scoring_hand[i] == card then
print("Found index")
index = i;
break
end
end
print("Before if")
if context.other_card == context.scoring_hand[index-1] or context.other_card == context.scoring_hand[index+1] then
print("Context good 2, electric boogaloo")
return {
repetitions = 1
}
end
end
reaches if statement, fails it
ok that's good it means the repetition works but the logic is wrong
i fixed it im just stupid
(i didnt have brackets around the localization)
oh wait i read the logic in reverse
what this does is retrigger the two adjacent cards
ok so returning an empty table fixes the red seal not retriggering
the problem now seems to be the fucking time machine thunk seems to have programmed into the game??? what is happening???????
why is what's programmed
blueprint copy of joker calculate -> again retrigger notice -> retriggered blueprint -> normal joker calculate -> again retrigger notice -> retriggered joker
yet what clearly happens here is
blueprint copy of joker calculate -> retriggered blueprint -> again retrigger notice -> normal joker calculate -> retriggered joker -> again retrigger notice
this doesn't make any sense??????????????????????????????
i think this is god punishing you from putting seals on a joker
What does your tarot do? It looks like something has modified the pool of cards
if a card next to the nuclear card scores -> retrigger nuclear card twice
oh ok that's a bit more complex logic
can you check if the other thing works? if it does i can write a mock up for that
the code does not retrigger the other cards
damn
:(
why doesnt my message work
it just says error
and i can't find any solutions to that crash
so i rolled back to the old metadata system
madow tsuki
bump
...i'd say it's event manager shenanigans, but i've done a few of those, especially in weirder ways than this and had no issues like this -this is the first time i've run into the order of operations disordering itself like this since i got red seals working
what does it even mean btw?
why doesn't my message work?
return {
message = localize({type = "variable", key = "para_money_minus", vars = {money_minus}}),
colour = G.C.RED
}
please, i've been stuck on this error for minutes and i can't find a fix for it
it looks like you have an extra set of ()
where
message = localize{type = "variable", key = "para_money_minus", vars = {money_minus}}
...how do i suppress the repetition message? 
still just says ERROR
this works
if context.repetition and context.cardarea == G.play and context.other_card == card then
local index = nil
for i = 1, #context.full_hand do
if context.full_hand[i] == card then
index = i;
break
end
end
if (context.full_hand[index - 1] and SMODS.in_scoring(context.full_hand[index - 1], context.scoring_hand)) or
(context.full_hand[index + 1] and SMODS.in_scoring(context.full_hand[index + 1], context.scoring_hand)) then
return {
repetitions = 2
}
end
end
IT WORKS!
thank you so much!!!
is there a way to make it work multiple times though?
i was hoping that it could be triggered by red seals and other nuclear cards (with infinite loops causing the explosion)
you can't really make it act in two different timings without patches I don't think but you can add as many repetitions as you like
oh and yeah i dont think you can repeat repetitions
how do you get the number of chips and mult before they are multiplied together, and also modify those values?
oh...
bump.
return {
message = localize{type = "variable", key = "para_money_minus", vars = {money_minus}},
colour = G.C.RED
}
why doesn't this show a message? it just says ERROR
would there be a way to calculate how many times its neighbors score ahead of time? if not, what are patches and would that be reasonable, or would it be too difficult as im not experienced with modding yet
anyone please help on how i could fix this error?
show us the whole error
i wanna make custom consumables (not spectral or tarot cards)
SMODS.ConsumableType {
key = 'kk_plugins',
collection_rows = { 0, 0 }, -- what does this mean?
primary_colour = G.C.SET.White, -- where is this used?
secondary_colour = G.C.SECONDARY_SET.Black -- where is this used?
}
does this look correct for defining the type & can i have my questions written in the code answered?
not really, you can calculate if the neighbors score but i dont think you can get how many retriggers within calculate
i mean, I wouldn't even know where to patch
but you can look at the lovely github for a guide on patches
collection_rows is how many rows and columns the consumable has in the collection
the rest idk
??? this mod doesn't have a main.lua
ok i have no idea what the issue is then
wtf is your main file called though if not main.lua
RIP
CookieRun.lua
return {
message = localize{type = "variable", key = "para_money_minus", vars = {money_minus}},
colour = G.C.RED
}
why doesn't this show a message? it just says ERROR
as i said before, it's happening as soon as i tried switching to the .json metadata system
can we see the metadata file compared to the header
...did you remove your steamodded header when implementing your json metadata
yeah

"id": "CRPack",
"name": "Cookie Run Pack",
"display_name": "Cookie Run Pack",
"author": ["sooji gooji"],
"description": "A Balatro expansion mod that adds new Cookie Run jokers and consumables.",
"prefix": "CRPack",
"main_file": "CookieRun.lua",
"priority": 0,
"badge_colour": "F9AA3C",
"badge_text_colour": "FFFFFF",
"display_name": "YM",
"version": "0.1",
"dependencies": [
"Steamodded (>=1.0.0~BETA-0328a)",
"Lovely (>=0.6)"
]
}```
what is "para_money_minus"?
custom message i have in my localization file
oh, and money_minus is valid?
why not use SMODS.signed_dollars()
should i just roll back to the old metadata system? this crash doesn't happen when it uses the old method, but then i can't use mod prefix
i didnt know that was a thing
how do i do that
variable type needs to be in v_dictionary
it's a pretty simple function, i showed it's code here when i reported an issue with it not returning the correct value for 0
#1209564621644505158 message
@placid silo has to suffer with the crime of using my mod :3
forreference
XDDD???M
bump
oh, i found a fix to that crash, consumables need to have the same name and key, and i didn't added a name for it
does remove_default_message not work?
oh right, that's a thing. where would i put that, in the same table that defines the repetition?
yes
is it G.C.FILTER or G.C.ATTENTION
filter
both work i think
...wait no, what 
okay, my issue isn't just that one joker. it's global. for some reason, retriggers for me just broke globally. it does the retrigger and then the again message after.
506a
well balatro multiplayer crashes with my mod sometimes 
ok, i finally found the root cause of the crashes, it probably has to do with my rarities
how does pools work in SMODS.Rarity?
I have this code that applies a multiplier effect to most vanilla jokers that give Mult effects. As you can see I have a case to handle Jokers with specific effects, such as Shoot the Moon, which I've been testing with. All other Jokers, such as Jimbo, which I also test with, are handled by the general case. Jimbo works properly in that his Mult gets modified by the Joker and then applies the modified amount, and his description changes accordingly. Shoot the Moon's description changes, but no matter what each Queen only gives +13 Mult when held in hand. Any ideas on why that might be happening?
btw I'm going to copy the above code into the context.after block to undo the change after calculation, just need to get the code working first
even stranger, Baron works perfectly lol
where can i find the keys for vanilla jokers?
game.lua in the game's source code, or the key field in VanillaRemade
Someone please do a antonblast suit skin
hearts because of red
anton annie = king
Brawl Tall Maul Small Busters = Queen
satan = Joker
sounds like a cool idea but idk anything about antonblast
just a little strong
why does this say error?
how do you check if the player has a joker already?
I want to create hard synergies >:]
is the base game joker atlas just Jokers
if you don't specify an atlas and type out a pos it'll default to the joker atlas
no atlas required for base game, just use pos as you would be for the Jokers.png base game file
ok cool
is there a way to check if any joker was triggered? (not inside of a joker)
like could i use this to set a variable to true or does post_trigger always iterate regardless of possibility
ehhh i dont know nothing like that, only boredom
1 in 2 to retrigger jokers
ok but this is for a true-false condition
uh im wrong
yea i think it, tbh i dont know xd
"a joker was triggered? set the var to true, otherwise keep it false"
i never see something like that, sorry
i can do that easily within a joker, but i want to do it in the main file so it's universal
got a couple problems. the joker is supposed to give +4 mult, and +2 mult for each common cookie, but
- the total amount in description is wrong
- the joker also counts itself again, giving +6 mult when alone
just a little
I'm trying to remember something like that, but most of the true or false are when "sell joker, use consumable, upgrade hand, buy joker"
bump
how would i make it so it doesn't count itself while checking for common jokers?
however you find all common jokers - #SMODS.find_card("j_modid_cardname")
wait a minute, I literally already wrote code for this
~= card
well unless youre not using a for loop actually
in lua you use ~= like != ?
yes
thx
where do i put this?
can i see your for loop rq
return { vars = { card.ability.extra.mult, card.ability.extra.mult + card.ability.extra.bonus * ((G.jokers and #G.jokers.cards or 0)) } }
end,
calculate = function(self, card, context)
if context.joker_main then
return {
mult = card.ability.extra.mult
}
end
for i = 1, #G.jokers.cards do
if context.other_joker and (context.other_joker.config.center.rarity == "CR_common") then
return {
mult = card.ability.extra.bonus
}
end
end
end```
just take out this bit actually
if you dont want it to count itself
it doesnt but the mult was added to the bonus value before (i thought you wanted it to count itself since it's also a common)
won't this just display the wrong total then?
where and how do i define the name for my custom consumable type?
you need a text table
like this?
yeah try that
wait this is consumabletype
ygeah
how do I check if a condition is met only while a game is going on?
currently a joker is turning negative in my collection because another joker is also on the same page as that joker, which I guess means the game counts that as filling the condition, but I want it to only happen while a game is happening
current code
:D
sorry for delay
try these out
modify as needed to suit you ofc
loc_vars = function(self, info_queue, card)
return{
vars = {
card.ability.extra.mult,
card.ability.extra.mult * (G.jokers and #G.jokers.cards or 0)
}}
end,
if context.joker_main then
local count = 0
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] ~= self and
G.jokers.cards[i].ability.set == 'Joker' then
count = count + 1
end
end
return {
mult = card.ability.extra.mult * #G.jokers.cards
}
end
tried current and it's still broken
i should try a bunch of normal jokers too
armed and DANGEROUS
bump
...wtf
now it's fine for everything except this specific custom joker
How might one go about checking whether or not the played hand is the most played hand
i don't understand
why not just check if it's in the joker area
probably maybe something
so true
try a pairs with G.GAME.hands
something like
local playhand = (G.GAME.hands[context.scoring_name].played or 0)
for k, v in pairs(G.GAME.hands) do
if k = context.scoring_name and v.played >= playhand and v.visible then
--do whatever it is ig
end
end
i think?
okii
this is pretty much just obelisk check but inversed
in which obelisk checks if it isnt the most played hand
was just refactoring my code and the way i went about it was absurdly messy
Good to know theres an easier way 
lmk how it goes!
yeee
IT'S SPECIFICALLY CONTEXT.BEFORE
WHY
that;s so random
well context.before is prescoring
that's no reason it should be breaking retriggers
but it's still in the scoring loop
are you not using the retrigger context
yes - the actual function of retriggers is fine. but it's putting the message after the retrigger specifically during context.before for whatever reason
did you put it in an event
put what in an event
the message
i'm not putting a message anywhere. it's return { repetitions = 1, card = self }. this is red seal functionality.
wait this is red seal?
yep.
how do put small text in a cards description?
i dont think you need card = self
{s:"any number less than 1"}
ok thanks!
so this joker has been crashing my game for a while now and I've kinda just been avoiding fixing it because I can't figure it out. Anyone got ideas?
It crashes when I enter a new blind, which leads me to assume its effect of adding a fish-enhanced playing card to your deck isn't working properly
if i play a high card the mult goes up to x1.4 mult, but when the hand is scored it does x1.3 mult, is there any way to fix that?
and how do i format color?
i don't think G.jokers.cards[i] ~= self is doing anything, it's still counting itself
seems like it. but my issue still persists
thanks!
try changing to G.playing_card iirc
oh 🤦♂️
You're setting the Xmult value inside of an event. Typically events should only be used for animations, as they tend to run when the Joker visually triggers (which is after the score calculation actually happens). Looking closer you realistically don't even need to be using events here outside of maybe the sounds, but that can be set in your return table instead which is honestly the better solution imo
what do you mean by counting itself exactly
guh
can anyone else confirm if this is happening for them or is it just me because i can't imagine this is something i did
i don't recall touching anything that would specifically break retriggers in context.before
didn't work :/
i might be instantiating the playign card wrong or smthn. I'll read the wiki and see if I can glean anything new
whats in ur locvars
for... what?
for the jokers in particular that i'm experiencing this on?
the only thing i can think of that is in common between these two that i've tested is that i return a .key value,
but i can't see how this has anything to do with the fact that the retrigger message is in the wrong order specifically from context.before
if you're talking about the seal, there isn't one. this isn't a custom seal or anything, this is via a calculate_seal hook
which right now, looks like this
ohhhhhhhhhhhhhhhhhhhhhhhhh well no wonder im confused i had no idea this was a h-jesus christ
and i don't see anything in here that specifically reorders the message to AFTER the retrigger
for a specific context
something i implemented to return from a joker specifically to deal with this because i thought it was happening for a specific joker
until i realised this was just randomly happening based on the context
and now i'm completely lost as to why this is happening at all
because it shouldn't
Hi, I know I have been messaging a lot, but I need to know, if anyone uses VSC, how do you make it so iVSC recognizes the documentation for SMODS?
the gingerbrave card gives +4 mult, and +2 mult from each common. if it's the only card present, it should give +4 mult, not +6
can i make a card do something in context.before? i want to see if this is replicable across card red seals
this way i could more confidently rule anything that i've done out
Open VSC through your entire mods folder
try ~= card
this or set up the lsp definitions
youre cooking actually why did i say self
the classic blunder
been on a roll with knowing stuff today though you shouldve seen me earlier
toma being john knowledge? 

Can you please elaborate on what I need to do. I am pretty new as to making mods
This will be my first mod that I make.
im late but here anyway
in my defense i was gonna open obs and record it
fair enough
Funny how we had very similar thoughts to just send some sort of media tho
is checking how many of a certain playing card in your deck you have still using SMODS.find_card()?
and how do you look for a card with a specific enhancement?
congrats!
to answer the latter with steel
it works for the description total, but it's not working for the effect itself
what was your effect code again
+4 mult from itself and +2 mult from each common card
as in, your actual implementation
ah
game crashed. Is this written correctly?
if context.joker_main then
return {
mult = card.ability.extra.mult
}
end
for i = 1, #G.jokers.cards do
if context.other_joker and (context.other_joker.config.center.rarity == "CR_common") then
if G.jokers.cards[i] ~= card then
return {
mult = card.ability.extra.bonus
}
end
end
end
end```
make sure to set your var to 0 there as well
oh, as well
and neither self nor card works there to stop it from ignoring itself? 
thanks for the clarification
np
If I just wanted to change the description thingy of a Joker do I just do card.loc_txt.text = { "so and so" }
wdym change
I have a Joker that has an interaction with another Joker and I wanted the description to change when that Joker is present
generate_ui shenanigans. you'll also need two descs
j_hpfx_trapezoid?
it's one of my jokers
o
example of what i mean. the description will change once the card is added to my jokers
do I just put this before the calculate function?
yeah
okii
thank u
only do the add_to_deck thing if you want it to trigger how mine does
how do i make it so something happens on discard? i use this but didnt work ```lua if context.pre_discard and context.cardarea == G.play then
context.discard
i also used that but it was triggering the effect once per discarded card
context.cardarea == G.play is for when a card is played.
nope. you can see it's also counting itself for +2 mult
how do you know it's not the four other gingerbraves dawg 😭
hm.
pretty obvious from first one. first one gives +4 mult, then +2 mult from the same card before counting from others



