#💻・modding-dev
1 messages · Page 454 of 1
G.GAME.blind.in_blind and G.STATE == G.STATES.SHOP
no clue what i did wrong here, tried adding a custom deck texture
Hi ratmilk things still keeping clean
i hopwe to add jokers to mod mod now 😭
but first
i need to go back
and fix the config for all of my consumables
Oh damn
I've been working on a few more think I'm on 15 jokers now
And my ass artist isn't replying 🥲
I would find someone else but this person is doing it for me for free sooooo ill be patient
Thank you indeed
I might've found out how to fix the materializing when in round
what am i supposed to use instead of smods.init, i see its outdated
I love N so much wish I had a N in my username
nothing
I removed it, I just get repetitions warning spam
how do i modify SMODS.joker itself
Oh oops
have you got any ideas for this then N'?
define SMODS.INIT first
this should only be from jokers that are giving bad returns in repetition contexts anyway
SMODS.INIT = {}
Well since it doesn't really have a check for repetitions..
funny enough it triggers on each context call
replace all of that for SMODS.Atlas
no
how do i get a jokers rarity? tried card.ability.rarity but it says its nil
The last thing I did this morning before I went to bed, was done so poorly 🤣 I need to not work on this when I'm abt to pass out
card.config.center.rarity
take_ownership?
i want to modify the calculate function of certain vanilla jokers to let them do things they couldn’t otherwise do
what exactly does this do? does it preserve prior values or will i have to reimplement them myself
i don’t intend to replace things, more so add on
it preserves anything you don't replace
Ok it works now thanks 👍 I'll record a video to demonstrate the thing
uh i tried this but i don't see any of my custom playing cards in game
iirc the original calculate still runs if you don't return anything
that's correct
what i need is to have it check a condition and then turn itself into a different joker if that condition is fulfilled, preferably maintaining scaling
oh for that you need SMODS.DeckSkin
thanks
can i have a joker just turn itself into a different one, and paste over the config values?
if i format it identically
The joker card message is weird tho
hopefully because i love your card idea
im glad people are using merge_effects
whats that
isit for hooks
because im still using the outdated stuff then
it's to combine calculate returns
oh
for example to blueprint two cards
I'm mostly trying cuz it seem weird
bump
would this be too op ?
no thats just hanging chad but better
you cna get mult after your previous mult
exactly but is it too op for a common
so its good
do i make it rare or uncommon maybe
id boost it to uncommon at least
No, this is worse than hanging chad in a lot of situations so I would not say it is OP. Especially when you consider that hanging chad is balanced in the multiplayer mod to be exactly this.
why is hanging chad balanced?
i also wanted to make dusk but first hand so ill call it dawn
(or rather, first two cards, not last two)
try with message_card instead of card
oop
Because Photochad and just chad + glass card is incredibly powerful.
Btw is the xmult chips order something I cannot control?
you would need to order the tables
2 glass cards
I see
That requires having 2 glass cards over just 1
That's the difference. Having 1 card to do the thing is a lot easier than having 2
And for the low price of just finding a justice card in the shop while you already have chad, it was incredibly strong in multiplayer.
so this isnt even more overpowered ?
being last grants access to the rest of the mult
making it larger
I would argue it is not stronger than hanging chad overall
also i notice alot of your cards titles and descriptions are all lowercase, is this intentional or temporary?
true
yeah thanks to gruelling labour last night im all gud
you can even send other people the locale to edit
or make a new locale in a different language
but the different language part is rearly used despite localization being made for it
idk many languages only english french spanish and japanese
😭people really don’t take discord seriously,. Wtf is Ratmilk
and im light on spanish and japanese
you despise whimsy
thats 3 more than i know
is there a way I can make Spectral Packs always contain a certain Spectral card?
Yeah dilly the dillster
Yes
It’s actually easy
dilatro..... dihlatro hehehe
imagine goat milk, but instead of a goat, its a rat
my name is peak because its 2 of my irl nicknames

that doesnt make my name sound any better i jsut wanted you to think of that
Or a consumable
A deck effect actually
Yeah that could work
black hole?
what made u decide on ur user it is quite erm odd
tbh, sounds funny in spanish
what it sound like in spanish
Do these seem OP for Uncommon Jokers?
Each scored card with no Enhancement adds +3 Chips to this Joker. Each scored card with the Bonus or Glass Enhancement adds X1 Mult to this Joker.
Copies Chips of last played hand, adds the first 2 digits of that value to Mult. (i.e. 33333 adds 33)
maybe a rare idk
funny story, i was palying levelhead and randomized my nickname and it generated FratMilk, and i thought RatMilk sounded funnier so i went with that
This is how “telescope” does ir
You need to change it up a little
Thanks!
damn yk i cant lie thats a better story than mine
how balanced ylal think ts is
Oh no again
<@&1133519078540185692>
funny :3
YES KING!!!!!!!!!!
shoot him
gottem
Chat i was reading that was rude
i made a glass card and purchased two oops all sixes him
thanks my shooter youre my goat
i was on steam and my friend wanted to stream but my old user was master of aids so i looked at the keyboard and typed first thing that came to mind, boom krada zoniko became my name on everything
anyways how balanced yall this this is
i wonder how this would pair with my mod which lets cards get the eternal sticker, thus making an eternal glass
Pretty balanced
horrible because i dont check for eternal stickers
i take ownership of glass so, should negate that
how does one become creative and think of new ideas
Actually i think the art would look better if it was a vignette
my mod just destroys the card
dont think, just imagine
Found out doing this works, hopefully this wasn't a one-off succesful thing
no increasing chances, it just destroys it
Btw ty message_card worked
that isnt helping i keep thinking of coffee coz i want coffee but im all out
make a coffee card
then think in coffeen't
make a consumable called coffee beans that gives X1 mult to any coffee joker in hand when used
oooo i like that
then i just make different coffee cards like latte and frape
lovely business cat
rat milk
catnt
Like this meth
you should probably get one
you could, maybe make them based off food jokers
only thing is how do i define them as coffee cards
Pretty proud of myself w this one (tho I was heavily helped)
like decaf is like popcorn but +60 mult
interesting
i have 3
** one more
^^^
I do need to make some coffee, thanks for reminding me
late night at work so
i dont have from where to rob another
ofc ofc
cat distribution system
wdym
In this economy ?
yea i got the first five from that
no we need this in dev chat please
they probably got tired
so for the coffee beans card to work it needs to have detected a coffee card, how would it know what is and what isnt
make a group i think
never used groups before so
we need to contact a trusted developer
yes we do i need this its a gud gud idea
my idea for the coffee beans is
multiply a coffee cards stat by x1.5
on use
all coffee held in hand
man i need to add more jokers
welp
holojobo cmere
im turning you into a card
add phillip and what he does is he wins
my mod is based off a game
thats it
has anyone made a balatro inspired mod
vanilla+ mods in question:
i want to make a N inspired mod
same
i love pokemon
adds 50 slightly different variations of the letter N
normal n, upside down n, sideways n, slightly transparent n, invisible n
ive never actually played a pokemon game beyond like a very beginning
i do intend to start soon since my game collection is on its way to handhelds now
small n, big n, wide n, tall n
so how does one define the action of playing the first hand
but the gba pokemon games are so costly
i hope you enjoy them
just the first ahnd of the game?
of the round yeah
whast the end goal, ill go look for the context
to make a reverse dusk called dawn instead of last hand its first hand
i hope so too!
i got the n64 pokemon games
stadium 1 and 2 but idk what those are, as well as snap but im again unfamiliar with snap also
just copy dusk and make its hand check into a static check
or copy dna
... idk how
if context.before and context.main_eval and G.GAME.current_round.hands_played == 0 and #context.full_hand == 1 then
copied right from N'
only the hands_played part
yeah
like just if context.before and context.main_eval and G.GAME.current_round.hands_played == 0 then
that means first hand
thank you
Thank you lots
can i make a challnge such that you can't play specific hands
you can but i don't think it's very straightforward because i dont think challenges have calculate
No they don't sadly
challenge calculate smods when
mod calculate when
how rare is a weight of 0.005 for a pack?
almsot 3 times as rare as a mega spectral apck
send error and code
this a channel for helping developers
not for uhhh
saying we have problems
its not an error it just doesnt do what it should and the code doesnt say owt is wrong so idk why its not doing anything
ok then uhhh
man we really need a flowchart for solving issues
send code
and describe what it IS doing
key = "joker18",
blueprint_compat = true,
atlas = 'joker',
rarity = 2,
cost = 5,
pos = { x = 4, y = 7 },
config = { extra = { repetitions = 1 } },
calculate = function(self, card, context)
if context.before and context.main_eval and G.GAME.current_round.hands_played == 0 then
return {
repetitions = card.ability.extra.repetitions
}
end
end
}
``` quite litterally nothing its acting as a plaseholder rn
repetitions have to be in the repetition context
havent used repetitions tbh, but uhhh, i think they have to be in their own context
check how dusk does it
THE COMMAS ARE GETTING TO MY TYPING
@red flower cant he define context.repetitions along with context.before?
oh yeah hold on
no
i was abt to type that
@drowsy heath looks like you can jsut edit that last part to be G.GAME.current_round.hands_played == 0
doesnt sound like a bad idea ill lyk if it works
is there a way to have an enhancement sprite that draws over parts of the card? i want to cover the card's suit icon thats right under its rank
oh mod calculate was a thing, right
so im trying to make it so a buffon pack materializes after a blind if the objective is completed during a blind but not sure how to postpone that buffon pack until the player ended the blind n stuff
just got this
not sure how to continue
Why not save it in a variable and trigger it when in shop?
we do have context.starting_shop dont we
like this entire code save it in a var?
You could create a free booster in the shop
check how tags does it with rare jokers
It's how I do it but with arcana packs
G.E_MANAGER:add_event(Event{
func = function()
local _booster = SMODS.add_booster_to_shop('p_arcana_normal_'..(math.random(1,4)))
_booster.cost = 0
return true
end})
Wow discord destroyed that code
does the vanilla remade have an example of groups ?
It was for easy copy/paste
and for buffon pack is just p_buffoon_normal?
so i can do the coffee thing
wdym
object types?
also chat i just got done fixing all of my consumables so now i can start work on shit
p_buffoon_normal_1 or p_buffoon_normal_2
there's something with "groups" idk
he wants to "group" his coffee jokers to refer to them
yeah ObjectTypes
and for the mega?
there's no example of that in vanillaremade
yeah i was gunna explain it very crappy
oh poo
where would i find that
p_buffoon_mega_1
alright thank you
i usually use toga's mod as an example
wait could i use cryptid as an example with the candy jokers
i think its cryptid that has it
yeah cryptid has the food jokers too
okok ill do that then
okay i cant find anything about how the thing was made
i found where the spooky jokers are
search for SMODS.ObjectType in the code
oh wait you can do that
you can literally search the entirety of github for it
though there was something like group_text
group_key? for boosters?
How do you create a random tag? Do I use add_tag() or create_card()?
kind = 'string' to group Booster Packs.
idk i thought there was a way to group jokers together
like from cryptid
cause it's not really it's own hand it's just an Ascension. of 5oak
...does the context.scoring_name internally remain the same?
maybe
too stupid to make shaders
for my mod i might takes cryptids hand type system since i'll have jokers that add highlighted hand size

xchips not xChips
how do i set different loc_txt if the card is locked
🤓
there's something for that
i think there's an example in localizations
how can you check if there's a specific rank in your deck?
for loop with a check for rank, idk the check function tho
local passed
for k, v in pairs(G.playing_cards) do
if v:get_id() == rank then
passed = true
break
end
end
found it
thanks a lot
okat so i have a card defined as a coffee card now how do i make my joker detect that and gain 1x mult per coffee joker owned
coz i dont think cryptid has an example
card.config.center.pools.objecttypekey iirc
i think you should give all coffee cards a config of extra = { coffeeboost }
and have beans multiply the coffee boost
what
yeah
every hand you play substracy 5 mult
make the mult into the config
so when you use coffee beans
you can make the consumable give the coffee cards more mult
by multiplying the config coffeeboost by 1.5
THATS A REALLY GUD IDEA WTF
i am lost on where to start that but cryo is out the window here comes coffee jars
make a new consumable type for coffee beans
ill just use the cryo consumable and change it out
easier to make 1 than 2 consumable types
keep it simple
if context.individual and context.cardarea == G.play and context.other_card then
local v = context.other_card
if v.key == 'v1' then
return {xmult = 2}
if #SMODS.find_card("j_dark_joker", true) > 0 then
result.mult = (result.mult or 0) + 50
result.chips = (result.chips or 0) + 100
end
end
end
end,
}```
im lost lol
and make like 1 coffee bean give 1.5 and enforcer give 2
You have an if statement after the return
ohhhhh
so the return all at the bottom
lemme try
better like that?
That's crazy, imagine making videos about development in Roblox in Lua, and then make mistakes like this
Yes, but result doesn't seem to exist here.
Also v.key includes j_ and mod prefix.
done
oh thanks for clarification
ty
j_modPrefix_v1?
Yes.
I usually code simple ui
not this kind of stuff
alr alr
Well, let me fix it for you.
local v = context.other_card
local result = {}
if v.key == "j_dark_v1" then
result.xmult = 2
end
if #SMODS.find_card("j_dark_v1") > 0 then
result.mult = (result.mult or 0) + 50
result.chips = (result.mult or 0) + 50
end
return result
oh okay I guess
thanks lol
Lua in Roblox also controlled by Lua
luau*
modified version
but
same thing that's true
Core the same basically
that's what I said here!
Like how did you manage make UI with mistakes like this, it's basic level of understanding how language works
Nothings against, just curious

exams in 2 days, its 11pm and im tired as hell
prob fatigue
lol
Fair enough for me
lol
im not a man...?🥲
😭
i too used to do development in roblox and i still make mistakes like this
you only are a real man if you do not speak ill of smods documentation
it sucks
real
how can i make a custom deck start with a custom suit?
granting it boosts it otherwise would not have?
how do i turn a joker into a different one
do i just have to add the new card and remove the existing one
i want to do it to where the card flips, and then comes back as something else
:set_ability
i dont get it
could you explain
card:set_ability('j_new_joker_key')
?
yes
okay
thanks
will it finish calculate despite being considered a 'new card'
SMODS.Joker:take_ownership('smiley',
{
config = {ext_ovr = {faces_destroyed = 0},
calculate = function(self,card,context)
if context.remove_playing_cards and not context.blueprint then
for _,removed_card in ipairs(context.removed) do
if removed_card:is_face() then
card.ability.ext_ovr.faces_destroyed = card.ability.ext_ovr.faces_destroyed + 1
end
end
if card.ability.ext_ovr.faces_destroyed >= 20 then
card:flip()
end
end
end,
},
true,
)
is there a syntax error in this im missing
OH
im missing a bracket
so how would i add to the config table
rather than overwrite it
You could hook card:set_ability or you could add it in add_to_deck I think.
huh? how would i do it with add_to_deck
i need to add a value that tracks face cards destroyed for the overclock condition
SMODS.Joker:take_ownership('smiley',
{
calculate = function(self,card,context)
if context.remove_playing_cards and not context.blueprint then
for _,removed_card in ipairs(context.removed) do
if removed_card:is_face() then
card.ability.ext_ovr.faces_destroyed = card.ability.ext_ovr.faces_destroyed + 1
end
end
if card.ability.ext_ovr.faces_destroyed >= 20 then
card:flip()
card:set_ability('j_charcuterie_ferocious_grin')
card:flip()
end
end
end,
},
true,
)
and theres a syntax error here but i dont know where
How to make joker check if player used a discard, destroyed card or sold/destroyed joker itself
card.ability.ext_ovr = {}
card.ability.ext_ovr.faces_destroyed = 0
should have all you need in there
ah i see
MY ARTIST IS ALIVE YESS I CAN SOON HAVE ART FOR MY JOKERS
I want joker to reincarnate, replacing other joker in hand when it gets destroyed or sold
rn i can't manage it to make it detect destroyed crads or discrads
What about using cryptid as an example, they have selling cards to make one and replacing cards
hmm which one
Like erm the one that replaces all sold cards with a jolly joker
I cant remember the name of it for the life of me tho
I think it is that anyway
ill check
how do I stop this from happening (it should apply negative to more than just one joker)
if SMODS.has_enhancement(context.other_card, "m_lucky") then -- if card is lucky then
if pseudorandom('Bord') < G.GAME.probabilities.normal / card.ability.extra.odds then --if odds succeeds then
if SMODS.Edition:get_edition_cards(G.jokers, true) then
editionless_jokers = SMODS.Edition:get_edition_cards(G.jokers, true)
eligible_card = pseudorandom_element(editionless_jokers, pseudoseed('bord')) -- this whole thing just finds jokers without an edition
return {
message = "Negative!", -- makes a funny message to signify that a card is negative
func = function()
G.E_MANAGER:add_event(Event({
func = function()
eligible_card:set_edition('e_negative', true)
return true
end
}))
end
}
end
end
end
end
What exactly is happening ?
lucky cards have a 1 in 100 chance to make a random joker negative
Instead they all said negative and didn't do anything ?
all the lucky cards attempted to apply negative to one joker
i love writing shaders
Oh
Erm was it a one time event or have you tested it multiple times, could be that they all just set on one joker
I've done it multiple times, same thing happens
Weird
Okay I fixed discards and destroys. now I need to detect when joker itself is sold
Could be thay the joker is decided before play and then they all do that and its not random person lucky card maybe idk I've never done that before so I've not got a clue
Per*
Not person wtf is autocorrect doing
What was wrong with it?
I simply ran the thingy to find editionless jokers inside of the return{}
Ohhh okok
Also by any chance do you know how I could make a joker detect another joker from a object type to gain a mult value
I have the object type set up
And a joker within it
But how do I make it so that my other joker detects I have that in hand and gains a mult value
Coz I'm like lost
Wait hold on i can base it on cryptids m jokers
if joker.config.center.pools.objecttypekey
Oh I was gunna say base it on the m joker which gains mult per jolly but that works too
That wouldn't help because jolly is not a pool.
Oh I thought they were
isn't the pool just M
-- checks for Jolly Jokers or cards that are supposed to be treated as jolly jokers
function Card:is_jolly()
if self.ability.name == "Jolly Joker" or self.ability.name == "cry-jollysus Joker" then
return true
end
if self.edition and self.edition.key == "e_cry_m" then
return true
end
return false
end
?
can i not use card within an event
cant find jokers code in cryptid
you can
you shouldn't use context
idk why are you assuming it's that
'attempt to index local card (a nil value)'
calculate_effect is missing the card
what is calculate for in consumables
ohh
m.lua, search for local macabre.
is card the first or last argument
to make them act like jokers
last
jokerlicious
can't you just detect if a joker has ability.extra.coffeeboost
@red flower can you detect if a joker has a certain config
I think ima leave it as just the coffee cards and stat boosts from the coffee consumable
yes that's how i do it in my mod for the yugioh cards
@drowsy heath
you don't need to do pool shenanigans
for his usage it's really just setting a config so checking the same config seems appropriate
That i do
I cant figure out the last bit of this code to make it work o forgot how to do it
it's the same thing but in that case you're setting up two systems for the same purpose
i feel like instead of doing if joker is in pool, just set its config
key = 'joker19',
atlas = 'joker',
pos = {
x = 7 ,
y = 4
},
rarity = 2,
cost = 5,
blueprint_compat = true,
config = { extra = { xmult = 1 } },
loc_vars = function (self, info_queue, card)
return { vars = {card.ability.extra.xmult} }
end,
calculate =function (self, card, context)
if joker.config.center.pools.coffee then
return {
}
end
end
}``` what goes in the final return for it to give the extra 1x per coffee joker
no i mean checking if a joker has say an extra.mult value, increase that value
How do I make a joker change a cards edition/enhancement when scored?
Referencing midas mask doesn't work because it applies before the hand is played
discord really butchered your code lol
yeah ill just let it do that, its still readable tho
reference midas mask
change context
the logic is wrong, you need to have a strict context check and loop through the jokers
doesn't have to be the same context
local coffee = 1
for i, v in ipairs(G.jokers.cards) do
if v.config.center.pools.coffee then coffee = coffee + 1 end
end
return coffee
huh
"for _, scored_card in ipairs(context.scoring_hand) do"
Iterates over the numbered entries in a given table up until a break in the numbering occurs or reach end of table.
Meanwhile pairs will iterate over every table entry, numbered or not.
so am i, i got no clue how do this
where do i put that
ipairs stands for index pairs
i still think it's easier for him to just check for a config and set the config
why
got a type mismatch error
the message below you
How would I change this to give cards the negative edition instead? Do I just change m_gold to m_negative or something
what does that have to do with your solution
i think it's easier
it's the same thing
scored_card:set_edition("e_negative")
:set_edition('m_negative')
you're replacing v.center.config.pools for v.ability.extra
did they? seems like they are having lots of issues
well ok im not helping anymore
this is true, can't you use that for a cartomancer like card for making coffee cards or for a booster pack
yes
- what smods version
- how are you defining the objecttype
it's not that deep 😭
I'd rather teach people to do things properly instead of ending up with cryptid-like code
where do i find my smods version
If steam is telling me it's unable to sync my balatro saves with the steam cloud is that like
Bad
open the game and it's in the top right
Do I just open it anyway
It'll sync later.
1.0.0 beta 0506a
Do I wait it out or what
Just continue starting.
Cool
update
How can i give a card a badge based on if it has a certain ability, I'm doing this and it gives one with the proper info quene but not badge name or color.
is cryptid code really that cryptic?
i used it to make my skateboard item
you might need to do (v.config.center.pools or {}).coffee
no it's bad
i didn't say it was cryptic
some of it is
like whatever doble scalae does
it was a joke
i remember sync catalyst was incredibly complicated in how it balanced chips/mult before i made it just do balance = true
did you put that code directly in calculate as toga wrote it
yeah that was meant as a general function not to put directly
what does gain mean in this context? permanently? only when you have them?
when you ave them
Like Baseball?
yeah that was going to be my next question
yeah
but i want it to be all triggered on that one card so instead of on the jokers its on the coffee beans
so its not 1.5^x its a bse xmult
so not like baseball card
yeah....
he wants every coffee card to have its mult increased by x1.5 (whatever value the card is either xmult, chips) when using a coffee bean consumable
if context.joker_main then
-- TOGA's code without the return
return { xmult = 1 + coffee }
end
just make xmult coffee
since it's going to act like popcorn
this is a completely different thing from what we have been talking is this true
@drowsy heath are you still doing that idea?
that would have problems if it's at 0
true
well since it's like popcorn if it hits zero just eat the card
no need for the +1
well idk they can make that change later im just helping them make it work
k
what about togas ifwhat odea
Am i missing something?
id help more but im not at my pc right now
whar
lol
but what idea
the idea for having a coffee bean consumable that would increase whatever the coffee is doing by 1.5x
what's the code
i feel you are doing the wrong thing for the right thing idk
i gave myself 5 lattes and 1 coffee and ende with 2x flat mult
yeah because it's not detecting anything
you're missing the mod's prefix
oh
j_modprefix_key
Whenever a trigger happens, it just makes the first scored card negative instead of the scored wild card? Not sure why this is happening
both
unless coffee is your mods prefix
It's supposed to be a 1/5 chance that scored wild cards become negative
no its mm
Guys I cant fucking crack it. How can joker check if itself was sold/destroyed?
remove_from_deck
I just gave up and asked GPT, he says SMODS.Hook bullshit
yeah don't
which does not exists
because context.individual already loops through all the cards, and you're doing a loop inside that
still only a flat 2x
I'd be looking at gros michael because whenever it expires it logs that
did you restart the run
I need joker to respawn itself when it gets destroyed or sold
Does the joker like, get buffed every time it's been sold?
oh yeah forgot to do that mb
you can do that in remove_from_deck
still only 2x
I see
is latte joker20
yes
My coding experience rn is super abstracted. I don't like, actually know what all the functions do under the hood
Didn't even know context.individual had that function lol
I'm working off other jokers completely
i would recommend looking at the vanilla jokers
I am
uhh might be an smods bug lol
can you try putting j_mm_joker20 = true in the ObjectType cards
Anyway how do I check if a scored card already has an edition?
I'm assuming it's something like "if SMODS.has_edition(context.other_card, 'e_negative')"
But not sure
ok
context.other_card.edition
for a specific one context.other_card.edition.negative
I used "if SMODS.has_enhancement(context.other_card, 'm_wild')" to check for wild cards
well you are not gunna be happy bcoz its still flat 2x and was a fresh run
Stolen from golden ticket
can i see the code again
Is there an easier way to do that
no that's correct
wait
i think ik
hold on
for some reason i had coffee_beans as my key but even changing that to the right key didnt work
are you sure mm is your mod's prefix?
yeah
is it something to do with the coffee beans code
can you do me a favor and do print(v.config.center) in that loop in your joker
and send me the log
Unsure why this is wrong
scored_card is not defined?
This was working earlier albeit editioning the wrong card
please send more context
Can't I just change both instances of scored card to other card
Or context.other_card
no because you can't use context in an event
i did some fixing of my own an got this
What's the code
ima feel stupid when i tell you this but i wasnt loading the content.lua file when testing before
i mean i was gonna say that next lol
yeah i thought something was up then remembered i never added it to the list
remove the whole inject thing and put the thing in cards in it again, see if it works
Okay now it's happening before scoring happens like midas mask 😅
I added local scored_card = context.other_card right above "scored_card:set_edition('e_negative', nil, true)
Is that the wrong spot am I being dumb
what's the context
full context
oh if you want it before you might need context.before
that worked but the 1x on the card descrption should update right ?
no they don't want it on before
no, you need to count the jokers there too
did everything else work?
yeah
add an extra true to the function call
at the end
oh i misread sorry
it's good 
Why would returning true twice do anything (genuine question)
took me this long to realize the egg has a drawn on joker face
set_edition has an argument to delay the application
i always thought the egg was just evil and fucked up
how do i count the jokers and make it show as a mult in the discription
Take a look at abstract joker
copy the loop you do in calculate but put it in loc_vars
im making so many typos today
maybe because it's cold
scored_card:set_edition('e_negative', nil, true, true) like this will delay the application of the visual of the edition to respect the timing you've chosen due to how calculation functions internally
How to make a new counter like the extension of cryptid ?
I would like to interact with it and some joker to be modified depending on the value
I guess I could start in "config" but other than that I have no idea
what exactly is the loop bcoz i dont think i did it right all i get is red lines everywhere
what toga sent
yeah thats what i put in and it showed red
may i see
This happens on scoring like I wanted, but there isn't really a delay
this is str8 after i put it in no changes
It happens the instant the card is scored, before the chips even come up
for i = 1, #G.jokers.cards do
if G.jokers.cards[i].config.center.pools and G.jokers.cards[i].config.center.pools.Shape then
shapecount = shapecount + 1
end
end
Im tryna do this piece of code but i dont want the joker itself to be counted even though its part of the pool
what would the code be?
yeah no
what i meant is to copy that code and put it in the loc_vars that is before that
how can i check if im hovering over a specific joker and that im clicking a key
- 1?
how can i manually remove a joker from the pool as if you had it
like after the {card.ability.extra.xmult}
i guess i could try that
Try looking at how FusionJokers does it.
G.GAME.used_jokers has the jokers owned i don't know if that helps
before that return
anyone know?
what's the end goal
because i know how to check in the other order
i just wanna reroll my objective and reward to make things easier for myself lol
without the context, just the loop with the coffee count
no yellow or red lets see what the game says
these do stuff when pressed while hovering a joker
https://github.com/nh6574/JoyousSpring/blob/bfe4f9bfc4d38135c652aeed94b0942ad0a1f736/src/card_ui.lua#L508
you also need to change the return btw
change it to what
return { vars = { 1 + coffee } }
Or where can I find doc about it ?
The repo is not availiable until the 1.0 of the mod
oh is that polterworx
yes
so N' the counter either says 2 and only counts the coffee itself + its flat mult or it says 5 and counts itself +fkatmult +latte
like paya's terrible additions iirc
coffee should start at 0 like i said
instead of 1
i tried that and it said 2x
can i see
I'll take a look thanks !
i mean local coffee = 0
If I want to remove the edition of a card do I just use "scored_card:set_edition(nil, nil, true, true)"
Or is there a variable for not having an edition
i think so
Ho by the way
Is there a place where all the attributes of context and G are explained ?
In the SMODS wiki there is only like 2 or 3 examples but for example not many things about context.full_hand etc...
now we are at 4x but its still counting itself i only have 3 lattes in hand
what if instead of 0 and overcomlicating things i just do -1
most vanilla code is not documented
but someone is working on it for G specifically
https://github.com/Steamodded/Wiki/pull/30
is there a way to change the weights of rarities mid-run (specifically ones that are usually not obtainable in the shop)
How can i give a card a badge based on if it has a certain ability, I'm doing this and it gives one with the proper info quene but not badge name or color.
how can i turn a config value into a string
the new contexts are missing but most stuff like full_hand is there
okay problem solved it still counts itself but the base mult starts at -1
gud enough for me
yes, there's a bit about it in the docs
This is supposed to remove the negative edition from non-wild cards
Doesn't do anything
Scratching chin
not 'm_wild' is not correct
What should I use for that
you want not SMODS.has_enhancement(context.other_card, 'm_wild')
lua makes me feel things i dont like
Oh lol
lua
why
Working with lua is frying my brain and I'm forgetting how to do basic coding
how would i make a conditional description for a joker in a localization file (or is it only possible in loc_txt)
example his coee was right but the word needed to be at the start even tho rlly it ould make more sense for it to be where he had it 😭
wdym, like changing descriptions?
how can i check if the player owns a certain joker
this would be the same in any programming language not "string" is usually false
yeah but idk them ik lua so i will hate while i can
next(SMODS.find_card("j_modprefix_key"))
i guess the best similarity would be cryptid's profanity setting changing descriptions but im not trying to change it based on a setting
you can change descriptions dynamically by returning a key in loc_vars
Removing the edition happens before scoring? Even though I copied the code from the part that creates the edition and it worked on scoring?
Full context
Applying the edition happens on scoring, removing the edition happens before scoring like midas mask
wdym
return a localization key thru loc_vars and it'll use that instead
i think this might be a bug, i would ask eremel honestly
Question: How come it says Nil, something up with my code?
I'll let it sit for a bit
Because it works
you define it as Xmult but you use xmult in loc_vars
It's just the timing that's off tbf
Once I add all the jokers I want and get them working at their bare minimum I'll neaten them up
oops, missed that. Thanks!
Bugs can be tolerated
is there any difference between a default_weight of 0 and not having it at all in a rarity definition
trying to sort out some art for my cards a couple of them were finishes
No.
cool
is this right
the syntax is at least, idk if the profiles thing is correct
what does the nil do at the end of it, just not have the key change if the condition isnt met?
yes
i don't think so but it also doesn't hurt
It’s just a visual bug, delaying the edition visual doesn’t work when removing an edition
Where Cryptid mod has joker code?
Or changing an edition actually
Im so fucking done trying to make joker register when itself gets sold/destroyed
how can i make it so this patch only applies to a specific joker?
i tried card.config.center.key, but that caused it to not trigger at all..
pardon my manners, good evening all
i also need to get a count of how much of this joker they have
so wouldnt a for loopbe better
sorry i forgot to mention that
#SMODS.find_card("...")
oh that works?
yes
can i also get a reference to those jokers from that
yes it's an array
wins is a table, that said I didn't check what actually gets put in there
N' coffee beans is playing up again even tho nothing has changed
nobody has apparently
crashes saying line 9 jokers have been given a nil value
fine I'll check
alternatively, can someone tell me why the quip would show up blank for some people? is that an issue with their games, or an issue with my code?
so when i do that it makes an indexed table with references to all the jokers
apparently G.PROFILES[G.SETTINGS.profile] is nil anyway?
so if i want to do stuff to the jokers id put it through a for loop?
what's line 9
definitely isn't
for i, v in ipairs(G.jokers.cards) do
in the coffee beans joker code
Okay so G.PROFILES[G.SETTINGS.profile].joker_usage doesn't have all the jokers by default, so you have to check that it's there in the first place
i mean this is hovering over it in the collection?
how do i do that
check that it's not nil
because G.jokers doesn't exist outside a game
you need to check if G.jokers
adding an if makes it glow red
if SMODS.has_enhancement(context.other_card, "m_lucky") then -- if card is lucky then
if pseudorandom('Bord') < G.GAME.probabilities.normal / card.ability.extra.odds then --if odds succeeds then
if SMODS.Edition:get_edition_cards(G.jokers, true) then
editionless_jokers = SMODS.Edition:get_edition_cards(G.jokers, true)
eligible_card = pseudorandom_element(editionless_jokers, pseudoseed('bord')) -- this whole thing just finds jokers without an edition
return {
message = "Negative!", -- makes a funny message to signify that a card is negative
func = function()
G.E_MANAGER:add_event(Event({
func = function()
eligible_card:set_edition('e_negative', true)
return true
end
}))
end
}
end
end
end
end``` This code crashes my game when It attempts to apply negative when all jokers are negative
id send that one gif of "not drake" at the computer if i could
and after that you can do if next(G.PROFILES[G.SETTINGS.profile].joker_usage.[your joker key].wins) then stuff
if G.jokers then
-- code here
end
like that?
how do i check if a joker is in G.PROFILES[G.SETTINGS.profile].joker_usage
local usage = G.PROFILES[G.SETTINGS.profile].joker_usage.[your joker key]
if usage and next(usage.wins) then
-- stuff
end
in collection its fine for it to say xnil as in game it will work yeah ?
yes but also you can fix that by returning { vars = { 1 } } or something
nah its fine my mod has tons of quirks its just like that
right now i have 2 arts sorted
the rest have their atlases removed since i was sick of the white box
and everything is working
im feeling great now
ig i can just make more coffee cards and then do a full playtest of the mod
that fixed it but now i get the "attempted to compare number with table" error
i plan on adding alot more but i havnt like rlly used them in a practical setting
well what line is it
You'll probably need to switch to regex if you want to patch that specific of a location
i can tell you the exact code that does it actually since you pointed it out earlier
usage.wins > 0```
When you don't have distinguishing features at a position you want to patch then you'll either needs to get smart about the times patch field or you'll need regex.
is wins something where its nil by default but not nil if youve won before (with the joker and all that)
see but it's not like the patch doesnt work
it patches and the effects save and all that
but it tries to apply to every joker
which in turn disables a whole bunch of jokers' effects that arent the joker this patch was made for
(how do you regex patch)
wins is a table whose keys are the stakes and the values are the amount of times you won in that stake
and it's never nil
Yeah, this is happening because your pattern isn't specific enough
so is there no way to actually check if a joker's been won with before since its tracked by whatever individual stake?
@drowsy heath
There's an example of a regex patch on the lovely repo. Regex by itself is challenging so also heavily consider if you can solve this problem in other ways.
Eg. can you inject this at runtime?
next(usage.wins) will tell you if wins has at least 1 key, aka if you've won with this joker before in any stake
i literally do not know
the joker's supposed to copy the effects of other jokers based off of keys added to a table
would that work at wherever runtime is?
thats sick but would it work with my code i have
wins is only populated once you win, so when you never won it's an empty table
alr
idk you're codebase
holy grammer
OMFG
hmm i don't know if this is true, i think the problem is the if condition being true for all jokers
like would it effect any of the things i have in my code i can fit it in if it will
Ah yeah that's also true haha
wont ***
but then that brings my original question 😭
I didn't look at the actual code so
can i see how you tried card.config.center.key
shouldnt, i just dragged it into my code personally
ratmilk what is your favourite type of coffee
if card.config.center.key == 'j_hpfx_ijiraq'
but like added as an and
i also tried switching card for self
decaf
oh rlly
my code will work with any joker that has coffee in its config
therefore you can do stuff like...
oh so it will work with my stuff then
can you try printing card.config.center.key before the if
whats ur fav coffee
alright
worth trying and you can make it decaf
the decaf coffee in my mod is called ratmilks decaf, YOU WILL TAKE THE CREDIT WHEN IT IS DUE
denied me last time but now its too late i already have everything done

now this doesnt work
seems like it works to me
cus you removed the nil check for usage
the code i sent wasn't decoration D:
where would be the best place to set that then
if usage and next(usage.wins) then
just like it was in the code i sent
idk why you removed it
it wasnt there originally because the first thing was for localization
here he is all juiced up was +200 and loss of 10 played 2 hands