#đ»ă»modding-dev
1 messages · Page 317 of 1
Thereâs an easy fix for this that I can add later
;-;
bonk
PLEASE
this DOES check if the consumable being used is not a planet right
wait
Ability is a table isnât it
i donât know
i wonder what this does
Then why did you check equality with something you donât know
because iâm making educated guesses
isnt that the dude from cryptid
that's a species
not x == y is wrong it should be x ~= y or not (x == y)
Itâs like Mario both the species and the individual are named Mario
i suppose
ugh
what the fuck am i even doing
let me do some debug print statements
lets figure out whats in ability
SMODS provides a function to see if a card has an enhancement
you can print values and tables, that's how i learn what everything means
i need to see if it has a specific one
bump
Thatâs what the function does
I think so. I think that itâs SMODS.current_mod.reset_game_globals
I'll try that
thanks
so that would be SMODS.has_enhancement(G.cards.highlighted[i],"m_astropulvis_cursed"
if im correct
hey wait a minute
yeah
i am so stupid
;)
hi n creator of joyousspring

hiiii
you should play joyousspring
you should play joyousspring
temu pareidolia
when does this calculate? how does it work with plant?
iâm curious
that character is not among us, nor a character from among us
i don't think it calculates, it's just an is_face hook lmao
i'll see how it works with the plant
Iâm not gonna keep the joke going to not clutter the dev chat
does what i expected it to do
this is scary
face cards dont change it seems(?)
how would you stop a planet card from leveling up a hand
face cards don't change
like king, queen and jack are obviously face cards
although maybe i should've worded that a little bit better
^
hook the level up hand func!
maybe
i was thinking like "every card has a 1 in 2 chance of being a face card sounds like a funny idea"
J of diamonds doesnt proc photochad but 2 of spades does
spades numero uno
how do i make the uh
joker noise
i guess the hanging chad/mime noise to be more specific
131 of clubs
what am i doing wrong?
the main_end goes into the first box instead of the last as intended, and i don't think i'm setting the colour right...?
for the color you use {B:1,C:white}
main_end probably works with the main description box, you'd have to ask eremel for that one
...this looks about right or am I tripping?
eremel told me directly to use main_end if i want to put my sprite at the end of the description 
it says end of main box
it should be an extra X3 so it looks right to me
Right, then figured out the proper way for that.
i figured 'main box' referred to the description as a whole. it wouldn't make sense for it to refer just to the first box given what i showed in prior screenshots and stated what i wanted, for something to be stated that was counter to what i was asking for
i agree
but also you can use generate_ui just for that bit probably
instead of the whole thing
doing that replaces the entire description with the sprite.
i mean you would have to do it in a different way than what you were doing before
i couldnt tell you how because this feature was literally released yesterday and i havent looked too much into it yet
so should i go back to the way i was originally trying to do it by manually building the whole description in ``generate_ui()`?
you can create a function that calls and outputs the base function by just including this! SMODS.Center.generate_ui(self, info_queue, card, desc_nodes, specific_vars, full_UI_table)
thats not what i said but if that's what you want to do lol
you also don't need to finish every feature as soon as possible. you can leave what you had before until you figure out how to make this one work
i put that at the start of my generate_ui() and it causes a crash 
did you add a colours table to loc_vars after using B:1
hey does anyone know how to make a joker output a custom mr bones message without modifying the loc files
that crash is basically always incorrect info_queue, but in this case probably an issue with localize! I can't help in too much detail, but both Kino and JoyousSpring use a custom generate_ui function you could check out to see how they do it
yes, eremel added it recently i think
return the string instead of true
oh it takes a colours table
...ok, so maybe i am not capable of reading the wiki page 
it just said "ERROR"
hmm it might need to be a loc key let me check
is this correct for applying a shader to an edition?
(testing with vanilla shaders)
yeah it needs to be a key to a dictionary loc
like "k_mod_saved"
figured it out 
you need to append to an element in .multi_box and not to .main
like that (sorry for the crappy image)
Gotcha
red car đ 
here's a state diagram of balatro, in case anyone else needs it
btw: is it normal that SMODS_BOOSTER_OPENED overrides the other booster pack states?
just realized the diagram is garbage because handPlayed can also lead to drawToHand - will fix it when i'm sane again
could you post this in #1349064230825103441 too? Not sure if state diagrams are very starter pack-esque, but it's a good place to gather resources
i can remind myself to do that once it's fixed yes :D
didn't even realize that thread existed, discord is so 
is there any documentation about how to spawn a joker in? (similar to riff raff ig)
SMODS.add_card({ set = 'Joker' }) is the shortest way.
is that random?
yes, but you can specify a key instead
more documentation here
https://github.com/Steamodded/smods/wiki/Utility
â€ïž thanks
For SMODS.Back's calculate, how do I access the config of the deck, assuming calculate = function(self, back, context)? Don't want to modify the actual initial prototype object for this.
back.effect.config it was.
i love how this is still shorter than my longest joker
how can i make a joker with a use button
hook card:highlight
i see
How's this?
yeah that looks awesome!
sweet! I'll get to the clock now rq
remember i'm only a guy with opinions, feel free to ignore them ya know 
I'm aware, I just thought your advice would make my card designs better actually
is there a way to trigger effects from a tag without destroying it?
i'm trying to do a "decrease blind size by 25% for the next two blinds" sorta thing
aren't there already tags that do this?
there's definitely tags like that in a mod i played, one sec
I put this in #âă»modding-general but not many people responded, which one looks better?
my ranking would be (from best to worst) 3, 1, 2
2 looks like only the bottom left is glowing
but in the other ones the bottom left color clashes with the similar background imo
is there also a list of like contexts? like if i wanted to do something at the begining of the round?
I personally think the first one looks the best
First one uses text colors, second one uses the playing card colors, and the third one uses the suit mult joker colors directly
beginning of round is context.setting_blind
all contexts are here https://github.com/Steamodded/smods/wiki/Calculate-Functions
i see...the bottom right (diamond i assume) could also be a bit narrower, no?
It's thicker because I'm trying to avoid sharp corners
and if the colors of the center are "fixed" than maybe the background could change?
you have the same-ish kind of "sharp" corner on the top of the spade, i feel like it could be fine
thank you!
but i definitely like the concept all in all
yw
there is a mod that has a tag that works like the misprint joker across several rounds, i just can't find it now sorry
This is a joker that adds up to 4 temporary aces to your hand on first draw, one of each suit, that's the main concept I'm trying to convey
While editing it, I ended up with just the background while organizing variants, how does this look?
Honestly just the background looks kinda good
tags only get destroyed when you call the yep function, but they can have effects that do not call them!
would I do it like this? ```lua
apply = function(self, tag, context)
if context.after then
...
just realized discord's image viewer is NOT made for original size pixel art lol - can you maybe show it in game or resize it?
no, not exactly. I removed tags from Kino a while back, but I'll grab some old code that still has this functionality. I don't think it's apply that triggers them, but I might be misremembering
thx
Solution: make the image double the size (the game has an option to trigger a high graphic resolution that youâll need to create bigger jokers for regardless)
In-game there's also a color filter though, so I might as well show it with that
i like the bg too in theory, but i just don't like the lack of contrast in relation to the bottom left color personally
They're the colors from already existing jokers
And I wanna try to stay true to that
So I'd change the dark background rather than the ace colors
sorry, i was giving wrong information. You're right, it is apply! This is some old code of mine of a tag that retriggers the first card of each suit, which only disappears if the hand's fully done or all suits have been triggered.
config = {type = 'repetition_check', type_end = 'hand_played', retriggers = 1},
set_ability = function(self, tag)
tag.ability.suits = {}
end,
apply = function(self, tag, context)
-- Check for right context.
if context.type == tag.config.type then
-- Check for suits already encountered
local _is_viable = true
for i = 1, #tag.ability.suits do
if context.card.config.card.suit == tag.ability.suits[i] then
_is_viable = false
break
end
end
if _is_viable and
context.card.config.center ~= G.P_CENTERS.m_stone then
tag.ability.suits[#tag.ability.suits + 1] = context.card.config.card.suit
return {
card = context.card,
effect = nil,
repetitions = tag.config.retriggers,
message = localize('k_again_ex')
}
end
end
-- after hand is played, disappear
if context.type == tag.config.type_end and context.after then
tag:yep('+', G.C.GOLD,function()
return true
end)
tag.triggered = true
return true
end
end,
no_collection = true,
in_pool = function()
return false
end,
set_chocolate_bonus = function(self, chocolate_bonus)
if chocolate_bonus then
self.config.retriggers = self.config.retriggers + chocolate_bonus
end
end
}```
ahhh, tysm
i assume this is because i'm not doing a card-specific effect, but nothing happens lol
(the burn one is the only one that has any code lol)
Here's the jokers in-game, first one is based on text colors, second one is based on playing card colors, third one is based on suit mult joker colors with no transparency, and the last one is the suit mult joker colors but only the outline shape, which is my personal favorite
Which one looks the best?
Do you think it would look better with a full white outline, no outline, or how it is right now with the white lines in the center?
Iâd definitely try the full outline
this is my code btw (i replaced the variable names for brevity)
SMODS.Tag {
config = {type = "after"},
apply = function(self, tag, context)
if context.type == tag.ability.type then
modify_blind((100 - [POTENCY]) / 100)
[COUNT] = [COUNT] - 1
if [COUNT] == 0 then [POTENCY] = 0 end
tag:juice_up()
return {}
end
end
My non-coder ass is so confused right now, just now this thing was working in the game just fine but now it doesn't return the message and I don't think I even did anything???
try all of them with white outline if you can, i feel like 1 and 3 also have potential
Full outline vs no outline
I'm honestly not sure between these two
No outlines looks real classy
100% with outline
i like the no outline more
in the return value you'll need to put a card value, like card = card or card = ToTheRight
also you probably shouldn't capitalise message, just convention tho
See how a 2 wide outline looks?
also that outline seems unusually thin?
But like, it worked without that? Or maybe I'm going insane
I think no outline is looking better rn though
what resolution is the art at?
Oh true
I think it was actually capitalization, because it works now! How did I change capitalization on accident is beyond me tho
strange xD
@hushed field sorry for ping, but i'm still getting an issue
Standard 71x95
Here's with the 2 wide outline, and I filled the shapes because otherwise it looks terrible
I'm torn between this one and the no outline one
can the outline be brighter?
The no outline one has a certain simplicity to it
yes but the outline one has contrast to it xD (maybe i'm just colorblind)
the edge looks jagged somehow but i like it a lot
100% the capitalisation, you donât need to specify a card, if the automatic positioning isnât what you want youd need to add message_card = somecardhere
how would i remove somthing form a pool
Also here's a slightly cursed joker [=
@manic rune
like removing a voucher from the voucher pool
long descriptions đ„
trying to prevent jokers from being destroyed,
i tried injecting this and got this error:
engine/object.lua:35: attempt to call method 'init' (a nil value)
thats a really odd looking for loop
i just started a couple days ago
so im unfamiliar with the best ways to look for jokers/optimize :p
for _,joker in ipairs (G.jokers.cards) do
no wait i got the order wrong
there
but also - ur probably better off checking for the joker's key instead
what's the difference between x in table vs _, x in ipairs(table) again?
mk ty
im guessing i need my mod prefix too?
so
mod_prefix_jokerkey
does the first one even work?
no clue
j_prefix_jokerkey
i'll try it and take your word for it
how does one use a joker to destroy a joker (ig like madness?)
no probs
here! the code for madness. i needed to find it myself :)
if self.ability.name == 'Madness' and not context.blueprint and not context.blind.boss then
self.ability.x_mult = self.ability.x_mult + self.ability.extra
local destructable_jokers = {}
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] ~= self and not G.jokers.cards[i].ability.eternal and not G.jokers.cards[i].getting_sliced then destructable_jokers[#destructable_jokers+1] = G.jokers.cards[i] end
end
local joker_to_destroy = #destructable_jokers > 0 and pseudorandom_element(destructable_jokers, pseudoseed('madness')) or nil
if joker_to_destroy and not (context.blueprint_card or self).getting_sliced then
joker_to_destroy.getting_sliced = true
G.E_MANAGER:add_event(Event({func = function()
(context.blueprint_card or self):juice_up(0.8, 0.8)
joker_to_destroy:start_dissolve({G.C.RED}, nil, 1.6)
return true end }))
end
if not (context.blueprint_card or self).getting_sliced then
card_eval_status_text((context.blueprint_card or self), 'extra', nil, nil, nil, {message = localize{type = 'variable', key = 'a_xmult', vars = {self.ability.x_mult}}})
end
end
getting the game's source code is a really good way to figure out how to write jokers and understand how the game's code flows
yeah i have been looking through the smod docs but not looked much through the game code itself
that's because it uses a different format
here's how i wrote my code for my madness like joker:
note. it is very sketch.
Went with the base game double outline effect, and added some very light shading, I think I've got a zinger here
Very colorful
I think that's one of the coolest full size jokers I've seen before
Looks great
(thank you @maiden mauve)
this part worked, but for some reason it won't stop the slicing...
joker.config.center.key
but also you can replace that whole loop with next(SMODS.find_card("j_your_key"))
Looks really good, reminds me of those childrenâs magnet toys weirdly
yo tysm
yeah i guess i was just hoping there would be a call for it
. im still pretty new to lua
Only just now realized that it triggers for EVERY card to the right, not one. What am I missing?
we all start somewhere!
at least you didnt start with the binding of isaac qwq
lmao that bad?
i haven't messed with repentagon yet, but base is so ass.
the more i mess with balatro, which i only started a few days ago, the more i love the lovely injector over proper support atm
This is the only reason I even know lua
-# 10k hours wtf
j esus
-# On this account alone, it's about double that across all of my old accounts
This game was my childhood and is now a large part of my adulthood
For better or for worse
i mean i played a fair bit of gmod but holy
i don't even understand garry's mod, always sounded like roblox for pre gen-zers to me but you have ten thousand and seven hundred hours on whaaat
@wintry solar hello mr eremel sorry for ping but i wanna ask
Most Roblox games encourage you to engage with their systems and mechanics above all else, but Garry's Mod encourages you to engage with people above all else, if you boil it down Garry's Mod is more of a social game than anything
Can i use the functions in cryptid ? Like local jokers ?
Or do i just stick with smods.joker
donmt use cryptids code as a reference
Why not
Cryptid is broken from a balance standpoint and a code standpoint, but that's a given with how insane that mod is
a lot of it is written in a needlessly complicated way
Still a very good mod, but held together with duct tape and popsicle sticks
100%
That's what has the most documentation and will be the most compatible with other mods
cryptid is fine to reference for specific effects, but generally I dont recommend it
Thanks a lot
That and it won't break with updates as often as Cryptid references probably will
Do i use talisman ? In my mod
Like Tables
It's jank but fun
There's a reason Cryptid breaks so many mods, and is best used by itself
the way it handles big numbers isn't compatible with other mods and it forces any other mods to specifically cater for it, I don't like that at all
Does ortalab not use talisman
no
Ohhhh
Thanks for the advice
Iâll keep it in mind
I also don't find "big number go brrr" fun so there's that too
fwiw you can write mods to be compatible with and without talisman afaik
Same
if you do want to make ridiculously large numbers feel free to use it
It's basically a library mod, so honestly I can argue for it forcing other mods to cater to it, it fundumentally modifies how the game works for the better in my opinion
Nope donât want that actually
forcing other mods to change how they do something as basic as comparing numbers is not good design
A library doesn't force other libraries to comply to it most of the time
If it was built into Steamodded as the default it would be much better
no it wouldnt
it would still be a problemm
having to wrap every number comparison in tobig() is not a good standard
I should clarify, built into Steamodded from the start
yeah it's not forcing anyone, also how else would you implement something like that?
And built in without a specific method like that
they should just do that on their own end
if they do I wouldn't have a problem with it
Brrr how do I make it only trigger for one joker only and not all of the jokers to right my head is kinda melting
but in it's current state it's too aggressive in what it modifies for a library
It's only a problem because mods aren't made to be compatible with it by default
Can i make my mod compatible with cryptid without talisman ?
You can't even run Cryptid without Talisman I believe, so no
Oh wait I fucked up completely, now it triggers for left too. Gotta go back
Then again I've been wrong about what Cryptid requires before, so take that with a grain of salt
it would still be very annoying to wrap all comparisons in to_big
how do i clear an edition/enhancement/seal off of a card
Thus why I said this
but they can just add that to talisman if it was possible
bump
?
:set_ability("c_base") for enhancements, :set_edition(nil) for edition, :set_seal(nil) for seals
im pretty sure, never did the last 2
thanks
Does anyone know the name of the card area for the vouchers in shop
Maybe shop_vouchers
G.shop_vouchers yeah
I'm so going to jail for doing this
in my case it's the minecraft figura mod
How do I access one or all of a playing card's suits?
(playing card).ability.base.suit i think?
don't exactly remember but the code for castle in vanilla uses it iirc
I'm wondering if there's a more versatile method in SMODS to account for Smeared-like effects
:is_suit()?
But I'm not asking if it is a specific suit
ah
I just want all of them
SMODS has recently made an util function for smeared effect
Idk if it's what you want
Do you know the name
It has smeared in it, just ctrl+shift+f it
SMODS.smeared_check
I know I could do what I want by iterating over the list of suits and checking each one with is_suit manually
?
I want to know if SMODS makes that easier because it sounds like it should
I think not. It just handles Smeared
i dont think it does
i think the game has all of the suits stored somewhere
yeah that should be it
Should it have a callback or not?
how do i do the flint thing
where jt plays the anim and sound
i wanna do it for my blind
is it like a event
What exactly
ah nvm
more pressing issues
like how this doesnt work
why doesnt this work
it doesn't work because you're trying to access variables that haven't been defined
are these chips and mult in the room with us right now
this is after scoring so they should be there?
no
or right before the end of scoring
so how do i manipulate them?
so the function doesn't know what you're talking about
So either you use the vanilla, non-calculate method or you try to see if the context provides them, or if SMODS makes them accessible somewhere else
Wait hold on
hm
yeah the whole gimmick is that it takes a bite out of it right at the end
Try reading the wiki to see if SMODS provides what you want there
Otherwise you might need a hook or something
does it crash
what does it do
nothing
should i use a print to test this
always
never reached
let me
omit the last bit
now it crashes
so the code is reached but i need to pull chips from somewhere
ok yes i think it's hand_chips
i hate modding this game some times
do i put this as the current value and the return value
like in both parts of the equation for the return
chips = hand_chips * value
mult stays the same?
yes
bruh
<@&1133519078540185692>
we got another on
alright it works but not as intended
i need it to subtract mult
not give it
or divide mult i mean
then do the opposite calculation
đ so may tabels
can i just put a subtraction symbol on my parenthesis
idk where you mean
@red flower you're more intelligent what do you think
let me just try it
it's a pretty function i would hang out with it

i dont understand what the callback is for
efficiency
how do i do the flint animation where it juices up the chips and mult as it takes it away
and plays a sound
hmm still don't get it
why do you need a partial list of suits
specially when table order is not guaranteed
I don't actually; I just want to find the first suit it is that it hasn't seen
so instead of going over the whole list it just breaks and exits early
I have the same issue with SMODS.find_card where sometimes I don't care how many cards there are, just that there is one
oh i feel like that's too specific of a case for a callback in that function and it also has the problem of order not being guaranteed
i dont think the performance matters that much
I guess I PR without the callback
hey so if i wanted to temporarily remove the suit of the entire deck would i need to store the entire deckâs suits for the blind
you could hook SMODS.has_no_suit
i donât understand what hook means in this instance
apologies
OH MY GOD
<@&1133519078540185692> sorry
anyways
you dont know what hook means or you dont know what he's telling you to hook for?
donât know what hook means in this context
In LUA, it is a very important concept to understand that everything is a variable and all variables may be edited in runtime. This includes functions. With modding other peoples' LUA files, like Klei's basegame code, you may find yourself wanting to run your code before or after the original fun...
hmm
confusing
its variables and tables all the way down
okay
so hooking is when you like
intercept a function?
letting you alter the game without modifying source code
quick question to yall, which one do you prefer to refer to jokers? (don't mind the actual joker, just the part at the bottom)
left
kay thx
okay.. it makes a bit more sense
so you redefine a function
so how would this be relevant in the context of SMODS.has_no_suit
whats the format for making differently sized jokers like photograph?
there's like two options to pass to Jokers, one of them is display_size, check the wiki
one changes the size of the image the other the size you can hover over I think
𫥠thanks
what are the args for has_no_suit
iâm trying to hook but itâs crashing when i do it
is this illegal
it takes a card
it's funny
what's set_blind
when the blind starts up
you should hook outside a function
that doesnât make sense to me. why would i do that before i needed it? iâm not arguing, just curious.
got this crash
I'm starting to do it more often and I'm scaring myself
because it's easier to check for mistakes if you are not dinamically overwriting functions, and also that might make it so you do it more than once
you'll hook again each type the function is called
well iâm temporarily overwriting the function, yes?
also this is not a hook, you're just replacing the function so it will cause conflicts
o
hm
a hook calls the original function as well
right
yes
so i would call the original function
so what do i do with the return value of that
so letâs say
this function has more than one return
which it probably does
i have no idea, i donât see it in documentation
how would i control just the one that gets me to where i want
local smods_has_no_suit_ref = SMODS.has_no_suit
function SMODS.has_no_suit(card)
if your blind is active then
return true
end
return smods_has_no_suit_ref(card)
end
this is what you want to do
ohhh
i see
so i intercept only if it fills the condition
should i put this in like a
utilities.lua file
like make it into its own thing
if you want
so now i need to check to see if the dip is active
can i make a second, optional parameter
to the hooked function
or is this bad practice
question: i am currently coding a joker that i wish to have this effect
Pigmentum Joker
When Blind selected, destroy Joker to the right and add its rarity value to n
Retrigger all Jokers n times
-# (Common/Uncommon = 0, Uncommon = 1, Rare = 2, etc)
(Currently 0 Retriggers)
Exotic Ascended Canvas
the code that i am using will be posted in a moment, but the main issue with it is that it simply isn't gaining any retriggers for some reason; any help is appreciated
also, a lot of the code to destroy stuff was borrowed from the dagger jokers from cryptid
also, no effect is done when destroying the joker to the right
sob
its bad practice unless you really need it but you dont, just check G.GAME.blind
does G.GAME.blind report the key of the blind
i have no idea how to navigate the wiki 
G.GAME.blind.config.blind.key
bl_modprefix_key i think
yeah
if the check is hooked then they should all be suitless i think
YEP!!
I CANT PLAY A FLUSH
OH MY GOD
THIS IS GREAT
why is my legendary consumable not being added into packs with this exact set? if i remove the line it appears just fine in spectral packs but not the card's base set (that being "Silly")
is there anyway to make your own deck using smods?
SMODS.Back
thanks
ugh..,. im trying to make a challenge that starts you out with the custom stuff im making so i dont have to keep rerolling searching for my one joker and it's giving me Attempt to index local center (nil)
1: joker code
2: challenge code
DebugPlus
just use this
3 to spawn joker
2 to discover it
in the collection
i was aware there was likely a tool to just give you stuff but this is also teaching me how to make challenges that dont crash lol
ty though
trying to make make a differently sized joker like photograph. i have no idea where on the wiki i should be looking can i get a hand
i dunno if its just me but i canNOT navigate the wiki like at all
?
what seems to be the problem
i saw the answer to this before im looking for it rn
okay yeah i forgor
is it possible to hide a consumabletype from the collection
one of my jokers systems is a leviling thing so i basically remove the previous joker its on and add new one is this the best way to remove it? my first two jokers of system worked but crashed on a later on having same code
i dont think so there have been some feature request for it
ive done some patches for now anyway
Individual object rarity for jokers and consumables wasn't something someone was already making an smods feature, right?
Trying to make played 6s get permanent +2 mult, someone tell me how dumb I am.
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.perma_mult, card.ability.extra_mult}}
end,
calculate = function(self, card, context)
if context.cardarea == G.play and card:get_id() == 6 then
context.card.ability.perma_mult = context.other_card.ability.perma_mult + context.card.ability.extra_mult
return{
extra = { message = localized('upgrade'), colour = G.C.Mult},
card = card
}
end
end```
@red flower @hushed field do either of you check wht are a card's suits
What do you mean?
how can i make info queue boxes actually have the variables filled in?
I haven't accounted for modded suits, but my set up for that is just iterating over SMODS.Suits as pairs, and passing the key to the is_suit function
vars = {...}
I had tried this but card.base.suit was nil
that makes a lot of sense
Hmm, I'm not at my pc but I can check in a moment
In this case, you're trying to set up a function that adds the card's suit to a list of found suits, right?
Yes
game crashing when trying to index 'other_card' (a nil value)
not sure why as this is pretty much the same implementation as something like baron and shoot the moon
Other_card only exists within specific contexts
If you're basing this on source code, the structure of it may obfuscation that does checks happen inside of another context!
should i move the context.other_card to within the cardarea == g.hand context
(context.individual for both of those)
-# obfuscate*
Nope. I'm not sure if this is the best logic, but the way I try to see it is that most contexts operate on a context type, which is a bool, and then parameters. They all get passed along as parameters, but the type will always be unique. Context.joker_main, context.individual, and such, are examples of that
My phone's autocorrect, I swear : đ
Ice's English degree: 
so then how would i fix this
oh i fixed it actually by just puttin everything under an if context.individual
Quick question about seals, specifically their appearance
what's up
Is it fixed to be necessarily in the seal position and shape, or can it be any texture theoretically?
If so, can it also be a texture that visually removes part of a card?
uhhh
so here's the atlas where seals are stored
as you can see their position is determined entirely by the texture
so as long as it's within the bounds of the card area it can be whatever and wherever you want
The big question is if it can be a texture that removes part of a card instead of adds on top
as for a texture that removes part of a card i'm not sure, you'd have to replace the card base much like the enhancement textures
Like a hole in the place of a seal
Issue is that the idea makes sense if it specifically is a seal, not an enhancement
no
there may or may not be a colour code in balatro that it recognizes as empty space or true 0 alpha on render
but i am not aware of its existence if there is one
I'm gonna try asking somewhere else too, thanks for the input
I figured it out
you could try applying a custom shader to it
much like how gold seal has its own shader
You mean for boosters and card modifiers?
a shader which would just render as transparent
And having transparency
Something to try maybe
In any case, where does one find how shaders work?
The Book of Shaders maybe
message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xmult } },
whoops
linked the working with shaders part
book of shaders, shadertoy, etc.
Does anyone have experience with adding permanent mult to cards?
Steamodded example mods. Contribute to Steamodded/examples development by creating an account on GitHub.
use the Runner 2 as reference (starting at line 88)
it adds perm chips but it's the same for mult
Runner adds chips to itself, I'm talking about adding it to playing cards.
Which would be like hiker.
oh then just copy the runner code
What do you mean? Runner doesn't relate at all to what I want.
Yeah, perma_mult for mult, that I learned already.
oh just use that then
What's the self.ability.extra? I'm not familiar with that.
you set that in the card's ability config
just have this in your joker's smods definition
config = {
extra = {
perm_mult = 1
}
},
and then use
card.ability.extra.perm_mult
Oh, got it.
You can also do gain thatâs what I used didnât know this worked too
I think it mainly is how you structure the calc function tho
you can name your extra abilities whatever you want and as long as you call it properly it'll work
yeah that's why i called it perm_mult because it's for adding perm_mult to playing cards
not to the joker
Since my joker gained mult on certain hands scored why I did it XD
thatâs smart
I might take that idea if I do for cards đ„č
awesome
how do I stop this from giving my Joker X0.5 mult multiple times when a Boss Blind ends, instead of just once?
if context.end_of_round and G.GAME.blind.boss and not context.blueprint then
card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_mod,
card_eval_status_text(card, "extra", nil, nil, nil, {
message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.extra.Xmult } }),
colour = G.C.MULT
})
end
You should have some way to keep track of itâs level or times itâs been done. Is it also placed in config too
you could have a config value that increments on boss blind end, and if it's < 1 set the xmult
then on round start you set it to 0
when does recalc_debuff go off
Okay guys if I say a jokers xmult is doubled, and I have something like X1.5 should that turn into X3 or X2
3 if you are physically doubting in calc function
The X3 is literally just 1.5 Ă 2, but the 2 is 1 + (0.5 Ă 2)
Depends on how ur scaling it
I just mean like for balancing
That should give u 3
Yea that is more linear than doubling so youâre not exponentially doing it from glance
Keep your equation linear youâll be good
?
Would it be something like this?
calculate = function(self, card, context)
if context.joker_main then
return{
message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.extra.Xmult } }),
Xmult_mod = card.ability.extra.Xmult,
}
end
if context.end_of_round and G.GAME.blind.boss and card.ability.extra.dewit < 1 and not context.blueprint then
card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_mod,
card.ability.extra.dewit = card.ability.extra.dewit + 1,
card_eval_status_text(card, "extra", nil, nil, nil, {
message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.extra.Xmult } }),
colour = G.C.MULT,
})
end
if context.setting_blind and card.ability.extra.dewit == 1 then
card.ability.extra.dewit = 0
end
end,
instead of incremembing it by 1 just set card.ability.extra.dewit to 1
because you're looking for if it is == 1
I use = to assign a value, and == to see if it is that value, right?
yeah

i'm trying to add a custom enhancement and a tarot that creates it, but I'm struggling to figure out what to put as the first argument for set_ability. this is from the blue_seal example but instead of set_seal i'm doing set_ability.
any advice?
i guess i just don't know what to put for the key, cause currently i have m_credit and it doesnt work
The key you define will have m_modprefix_ added to it
got it, thanks
is there a way to put cards back in the deck without discarding them
What would I do for copying the rightmost card?
There's gotta be a million people that have made reverse brainstorm, right?
is there a G.GAME thingy to check what the current antes base chip score is?
thereâs an SMODS function for it
go look at utility functions
i did and when i tried to call the function it had an issue with a variable G.GAME.modifiers.scaling so i eval'd it in game and it never returned any valid value...
does card.base.nominal factor in other modifications to chip value? i assume not, and if it doesn't then how would i get the chip value after all other calculations?
You mean like perma chips?
ye
Those are at card.ability.perma_bonus
card.ability
in an SMODS joker object, you should never be using self
what would be the best way to give a temporary modifier to a card's chips? like for only a round
Give it perma chips then remove them.
ye thats what i am doing currently, just was wondering if there was a better way
also cant read chip_mod or Xmult_mod, hence the definitions
What are chip_mod and Xmult_mod supposed to be ?
_mod just adds the values without displaying a message
yea im gonna worry abt the message later
ok, has anyone here drawn a star? like a 5-pointed star. really small. smallest possible scale. like i'm struggling trying to work this out and i end up drawing a house 
i also remember seeing one in a sprite somewhere but i can't for the life of me remember where
How could one make blue seals on jokers retriggerable?
blue + red seal, call that a purple se- wait
this is the smallest you can reasonably get a 5-pointed star
or maybe this, if you're desperate for it to be as tiny as possible
so they can get that small
i was envisioning one a little larger, not thinking they could be smaller
bigger than this but smaller than a large star is actually harder I think
it's this specific size where the angles are hard to make work
i know for fact that i've seen something around the range of a 7x7 star before 
does anyone have an example of how to find the next items in a shop queue?
figured it out
iirc cards are made at the time of the shop restocking, not really a "queue"
so would there be a way for a joker to display the next items to be in the shop do you think?
no
i remember someone making a joker that predicted what would appear in booster packs
are the cards in booster packs determined when the pack is opened? 
You maybe could do what the soul does with the seed, but that would probably be a lot of work.
fuuuuuuuuckkkk
there isn't a queue but the next shop item is always going to be the same thing on a given seed iirc, so I assume the question is more just "can I tell what the next generated shop item will be" which probably has a solution somewhere
I guess that's possible but it seems like a lot of work to get working lol
yeah, i would try seeking out whoever made that joker that predicts the content of booster packs as iirc it does something like that, they might have some insight for you as to how to do that
hm how abt a joker that has a chance to refund the cost of a booster, how could i find the cost of a booster opened
That is very doable
boosters are also classified as "cards" so you could use the open_booster context and take the costs of it from there
omd im looking on the smods wiki anbd i cant find how to find the cost of a booster
So context.open_booster returns with these values
the card value returned (being context.card) is the booster object
so you could do context.card.cost to get the cost easy peasy
ahh okayyy
how could i only get the tag's info_queue popup? i would rather not also have the descriptions of the packs themselves
You could probably set it to {key = "tag_meteor", set = "Tag"} for each of them.
perfect, thanks!
why does this not work
self is the prototype of the object not the joker, you want card instead
also you might want to be more clear about what's not working and what your effect is in the future
its like ceremonial dagger but goes both ways
and destroying the jokers doesnt work
yeah replace self with card inside the function
do i also replace the "if G.jokeers.cards[i] = self?
with card
it worked thanks
if you could also help with this one, why does this not make the cards be triggered even when i made it a 100% chance
Remove the first G.GAME.probabiliites.normal
did that but it still doesnt do anything
What is your code?
context.individual and context.destroy_card are never true at the same time
also the return is wrong
is there a way to check if a skipped booster was mega in a joker's calculate
or even just to check the pack's id
that's actually easier probably
thank you so much
makin a joker that upgrades whenever a mega pack is skipped...
context.booster.config.center.key
YIPPEE
took me a bit because it's not documented lol
Someone here has to know how to mod reverse brainstorm, right?
like brainstorm that copies the right card?
Yes
this #đ»ă»modding-dev message
but put G.jokers.cards[#G.jokers.cards] as the card (also check that it's not itself)
you need to return ret i think too
but maybe not
Is there something like G.GAME.blind.boss that is set only when you win a stake (during the VICTORY screen)? I'm trying to add a music using SMODS.Sound that plays only during that screen, but I'm not having success with G.GAME.won for example
is there any doccumentation for the different colors
np
what's the prefix for a tag? i tried t, but it didn't seem to work
on another note, what's the hex value of the common rarity?
This is all like a foreign language to me.
G.STATE == G.STATES.ROUND_EVAL?
ok
tag_ iirc
attempt to index nil value center (it's just context.booster.config.key)
thank you
oh yeah just saw that the center is passed directly
question, does the game stack overflow if i add an object's own center to its info_queue
yes
you need to check if not card.fake_card
what is card.fake_card 
smods creates a fake card when it adds a tooltip
so if you check that the tooltip is not making it's own tooltip
what if i want to let it make its own tooltip, but only so many times 
you might be able to check the current tooltip count?
just add the center to info_queue as many times as you want the tooltips
that'd also work yeah
truuue. i could do something like
for i = 1, [however many i want] do
if not card.fake_card then
info_queue[#info_queue + 1] = [card center]
end
end
yeah
Doesn't work, unfortunately. Unless I'm doing something wrong: SMODS.Sound({ vol = 0.6, pitch = 0.7, key = "music_win_theme", path = "win_theme.ogg", select_music_track = function() return (G.STATE == G.STATES.ROUND_EVAL) and 0 or false end, })
don't you need higher priority than 0 for music?
(I have no idea, I just automatically assumed that for when I added my music)
I think so, but I'm also adding the same condition to stop the current music that is also at 0 priority
why not just put it to 1 regardless?
Since it's neither stopping the previous track or starting the new one, I assume it's not working
I tried before, but doesn't hurt to try again
yeah, same thing
worth a shot tho
For reference, the current track that is playing is this one: SMODS.Sound({ vol = 0.6, pitch = 0.7, key = "music_ncorp_normal", path = "NCorpNormal.ogg", select_music_track = function() return (G.GAME.selected_back.name == 'Erratic Deck' and G.GAME.blind and not G.shop) and 0 or false end, sync = { pmost_music_shop_default = true, } })
are you sure that's the correct state?
does anyone know what functions/misc_functions.lua:818 refers to? trying to help diagnose a crash
depends entirely on their lovely patches; ask for their mods/lovely/dump/functions/misc_functions.lua
oh i read winning a round rather than winning a stake lol yeah that's not correct then
tbf that's a debugplus win, so it might be in a different state than expected
Is that a default debug console or is it some other mod?
looks like the debugplus console
thank you, I'll see if it helps
balatro no have debug console
winning properly does indeed give the proper state (though this state also gets hit constantly when winning other rounds lol)
Actually G.STATE == G.STATES.ROUND_EVAL works, it's just that the "Win this Run" button didn't really trigger it. I'd just had to win a round for real
It's for every round win, but it's a start
Thanks you two!
try using G.GAME.won đ
(though this funnily enough also doesn't seem to work with the debug "win this run" button)
Oh because win_game doesn't set that variable, and thunk normally manually sets it when calling that function
win_game()
G.GAME.won = true
is it? must be above my paygrade then
cuz I can't think of a reason why you wouldn't want win_game to set it
Yup, it's perfect lmao. I can't believe win this run was tricking me 
Thanks a lot đ
i assume mr bones
he probably just calls win_game() and there's something to check if the game has actually been won regarding mr bones
i'd have to check tho
I don't think so
or specifically for the debug mode win button
he only calls win_game when not game_over haha
i mean he aint wrong
arguably something that might want to be "fixed" in debugplus then đ€
debugplus just adds the default balatro debug menu plus some keybinds tho no?
so if it's like that in base game not sure why they'd change it
it adds a lot of buttons etc in the debug menu too
if they added the win game button and feature then yeah they should fix it but i think that's in the normal debug menu
including the amazing "win blind" button which is SOMEHOW not in the default debug menu
I mean "win game" button is by Thunk but
texture and mod id are still WIP because i'm mostly just fucking around but does this seem balanced?
ooo interesting idea
does purchasing booster packs count?
not as it's currently implemented, but it could
I mean that makes a big difference
i guess so since anything chip-based is more of an early-game joker than anything
texture and mod id are still WIP because i'm mostly just fucking around but does this seem balanced? (genuinely lol)
oh wait shit it needs to start at X1
hold on i know exactly what to do for this
is it possible to get the purchase price of a booster pack?
well, the playing card boosters are all the same price, right?
yes booster.cost
ty đ«Ą
(okay it now starts at X1 and increases by 0.25 each time the upgrade is triggered)
(for now the event is skipping a booster)
does anyone know what functions/misc_functions.lua:818 refers to? trying to help diagnose a crash that's being real nasty.
does the secret criteria change per run or is it random from a pool ooor
ooo changing per run could be cool yeah
I answered you like half an hour ago
because what the criteria is and can be definitely changes if it's balanced
depends on the lovely dump x2
ah, must of not seen that sorry
well i'm trying to find the balance between hard-to-discover trigger and hard-to-repeat trigger
i think gaining x0.5 might be more balanced depending what the secrets are
i think skipping a mega booster or something like that is a good idea
because it could be like canio or hit the road or hologram
i think some hard ones some easy ones, rlly just probably add all the base game things that trigger gaining x mult then go from there
mmm
but lower yorick's down a bit and other balance stuff like that
changing per run is rlly interesting tho
if it doesn't it might as well just be a joker that gains x0.5 mult when you skip a booster or w/e which is usually worth taking no matter what
early enough at least
card is inspired by https://en.wikipedia.org/wiki/Black_box
In science, computing, and engineering, a black box is a system which can be viewed in terms of its inputs and outputs (or transfer characteristics), without any knowledge of its internal workings. Its implementation is "opaque" (black). The term can be used to refer to many inner workings, such as those of a transistor, an engine, an algorithm,...
perhaps a more accurate implementation would be to hide the fact that it does xmult and xchips but
this has nothing to do with the trigger changing it's just a fun fact
mhm it's definitely a cool concept
but i think the trigger being hidden doesn't matter if it doesn't change
right
also dumb question is that orange colour you used for x0.5 built in?
yup!
it's attention
ah okok
shrug
oooo i like that plasma idea
yeag like the lavender
is rare an apt rarity for this one
actually i think that's built in somewhere lemme check
rare seems fine yeah esp for x0.5
i would think since it's xmult AND xchips ngl it could fit well if balala already had something between rare and legend
seeing as none of the vanilla jokers actually do xchips iirc
i think i've improved the texture a bit: i made the background and the text on the nameplate a bit lighter while leaving the joker itself the same
(dunno if this is the right place for texture discussion?)
it's not but the colour used for plasma is {0.8, 0.45, 0.85, 1}
what's this?
this guy
pretty cool joker ngl
oh yeah interesting concept
going insane
i'd expect silver to be shinier myself tbh
âïž
exponential chips đš
i love the xx_rainbow_xx though lol
is that a seal? ed? enhance?
i was thinking the jimbo should be a bit duller because it's stamped into the surface of the bar/card (see attached)
this is hilarious
ah that makes sense, i didn't see it at first but not sure how you'd make that more apparent visually
how would i make a consumable add perma-bonuses to selected cards
this cluster of popups reminds me of this mess i made accidentally
someone significantly more skilled than me could but i can't
i'm used to texturing for minecraft mods and i'm 100% not cut out for this
like perma bonus chips? look at how hiker does it, not sure about anything else
doing it anyway though because it's funny
lol i came from there too, artist in general also though
i had this one time
oh i hate it
i fixed it to just show the tag descriptions luckily
i think it's funnier if they stack but fair
the wall of info boxes was very funny at first and quickly got horrifying
it tends to organise them in really dumb ways when you start stacking them
yeah it's weird
like they spiral inwards or smth
pretty funny though
im not fixing this
yes it lists every edition available
me when absurd modlist
i just registered that that's monopoly
yes
well shit i just tried renaming everything in my code and it infexes field INIT (a nil value)
i think im done with this for tonight,..,
i just made the greatest thing ever
it's an aseprite script that applies the negative colour filter to your sprite when run
since it's not just inverted colours
and i'm about 80% sure it actually works
it looks right at least
genuinely confused actually i could kill a few minutes on this
i replaced all instances of ivylatro with the new mod name, like all of them
renamed the mod folder also even though that's probably not essential
id probably def you did
not sure what else it could be without digging
why do all the other vouchers look so cool negative
esp clearance/liquidation
i don't even have an init function
thats fair
i doubt i need anything it uses rn ngl
not using that atlas, nor localization stuff
don't use SMODS.INIT anymore
i literally looked at smods docs for the first time yesterday i've just been using balatro as code ref
How can I check if a run has already been won?
many such cases
YIPPEE i will do the texture in the morning
damn that easy, thanks