#💻・modding-dev
1 messages · Page 420 of 1
G.GAME.dilleridoos
G.GAME.quid

G.GAME.squid
its over they made balatro british
game.......squid........
thats it making joker that gives you 486 dollars on death (counts on mr bones)
How do I change the store's odds?
the store's what
like making the store give you all rares? i think thats like something you should do on the game.probabilities thing
like rarity probabilities
i have no idea actually
can you even do that
getting this crash when trying to play a hand
It's context.destroy_card not context.other_card
works perfectly thanks
I'm making a Joker that will give Xmult whenever a stone card triggers and has a 1/5 chance of destroying any triggered stone card improving the amount of Xmult gained for each triggered stone card but I can't make the Joker destroy any stone cards. This code feels like it should work so I'm wondering if there's a problem I'm missing?
none of my other jokers trigger either so i can't skip this one and come back to it later bc it's an overarching issue 🫠
config = { extra = {xmult = 0.5, min = 0.5, max = 2}},
loc_vars = function(self, info_queue, center)
return { vars = {center.ability.extra.xmult, center.ability.extra.min, center.ability.extra.max} }
end,
calculate = function(self, card, context)
card.ability.extra.xmult = card.ability.extra.xmult
if context.joker_main then
return {
xmult = card.ability.extra.xmult
}
end
if context.setting_blind then
xmult = pseudorandom('Craig', card.ability.extra.min, card.ability.extra.max)
end
end,
}
I dont think i did psuedorandom correct, all i need it to do is change x mult between 0.5 and 2 at the start of each round
you gotta return the xmult change iirc
Okay so the info queue only shows the title, no description
where in the localization file would i store the text for a custom consumable
I have a title and text
a custom consumabletype? descriptions.modprefix_key
depends on the consumable, but if you mean consumableTYPE then yeah what n said
isn't the card variable the joker? why are you doing context.destroy_card== card? i'm not an expert but that seems like a problem
the last one should start with c_
i see
c since it's a consumable
how would i have a joker give its effect when its added to the joker area and remove it when its removed from the joker area
add_to_deck and remove_from_deck?
aint that just to add and remove? like you can add a function to those?
yes
so if context.add_to_deck then?
example
they dont go in calculate
how can one use a joker to set money to 0?
would ease_dollars(-G.GAME.dollars, true) work, like wraith does?
Yes.
I was taking the destroy code from glass cards and tweaking it a bit so that might be why its not working
Is there a way to set an object types default area?
yeah because the card in that function is the glass card, you are interacting from a joker to a stone card, that's why context.destroy_card == card wouldn't work
ohh
i think you need to hook SMODS.create_card
it did not
is black hole just c_black_hole?
Code?
Yes.
There's no description, just a title
Line?
if context.other_card.lucky_trigger and not context.blueprint then
You aren't checking for a context.
how would I implement this? I can't find an example of destroying consumbles
what
config = { extra = {xmult = 0.5, min = 0.5, max = 2}},
loc_vars = function(self, info_queue, center)
return { vars = {center.ability.extra.xmult, center.ability.extra.min, center.ability.extra.max} }
end,
calculate = function(self, card, context)
card.ability.extra.xmult = card.ability.extra.xmult
if context.joker_main then
return {
xmult = card.ability.extra.xmult
}
end
if context.setting_blind then
return {
xmult = pseudorandom('Craig', card.ability.extra.min, card.ability.extra.max)
}
end
end,
}
i tried returning the xmult change but it just crashes and tells me about mult
You would loop through the consumables and :start_dissolve() all the planet cards.
Yeah it's the same as playing cards and jokers
How would I check specifically in hooks of remove_from_deck and add_to_deck if the card is being removed or added to G.jokers?
if card.area == G.jokers?
why do you have an xmult extra variable if you want it to be random? just have the pseudorandom do its thing in scoring?
is this written right
I think so.
its cause i want to make it random at the start of the round and that number would be the xmult for the round
how do you actually remove the ability for a card to work on with blueprint
can i see the crash?
game crashes when it gets added to deck
not context.blueprint
would these be hex colors or something like C:mult
or removed
do you mean changing already in game blueprint compatible cards?
nah for my custom ones
yeah just not context.blueprint on your calculate
👍
that will make it so blueprint doesn't copy that behaviour
what does this mean btw
are you saying there isnt a context that exists like that? how does lucky cat use it then?
sigh It still isn't triggering, what's wrong this time?
context.other_card doesn't always exist.
isnt this the talisman compat thing or am i thinking of something else
so i should just take that part out?
i think we need a context guide
or this i guess
bro idk either im new to this
No, you need to put if context.individual before it.
(or would it be better to and here)
try it without talisman enabled
ok
so is a context.value a boolean that is either true or false? or is it a table and it check if it exists or not and may hold information inside it?
No, you are trying to do mult when setting the blind.
dont work
The info queue not showing the description is driving me nutsss
then yeah it's the mult thing i mentioned earlier/what somecom mentioned now
mult doesn't exist outside of scoring.
so how would i set the xmult when the round starts
separate variable probably
context.before?
No.
Oh
ok ill try
is the item the tooltip is pulling from set up properly
set = "Chinese Food",
key = str,
vars = { card.ability.extra.effects[card.ability.immutable.mode] }
}```
is soul_rate only not nil when booster packs are opened?
It's set up properly, it should work
local str = "null"
if
card.ability.immutable.mode > 0
and card.ability.immutable.mode < 8
then
str = "effect"..tostring(card.ability.immutable.mode)
end
info_queue[#info_queue + 1] = {
set = "Chinese Food",
key = str,
vars = { card.ability.extra.effects[card.ability.immutable.mode] }
}
return {
vars = {
number_format(card.ability.extra.rounds_remaining),
number_format(card.ability.extra.effects[card.ability.immutable.mode])
}
}
end,```
or did i just order my code wrong
why does my game crash at the first if of both hooks?
local para_extra_slots = function(self)
return self.ability.para_negativesticker or self.config.center_key == "j_para_cooledwater"
end
local para_card_removal_old = Card.remove_from_deck
local para_card_addition_old = Card.add_to_deck
Card.remove_from_deck = function(self, card, from_debuff)
if para_extra_slots(self) and card.area == G.jokers then
G.jokers.config.card_limit = G.jokers.config.card_limit - 1
end
return para_card_removal_old(self, card, from_debuff)
end
Card.add_to_deck = function(self, card, from_debuff)
if para_extra_slots(self) and card.area == G.jokers then
G.jokers.config.card_limit = G.jokers.config.card_limit + 1
end
return para_card_addition_old(self, card, from_debuff)
end
it can be both
can you give me an example of a context that holds information?
context.destroy_card is the card to destroy
context.hand_drawn is the cards drawn
is the rate of soul and black hole hardcoded
(i think hand_drawn is wrong on the wiki)
i think so
damn
yeah it is, in create_card
alr i gotta rework some jokers then
okay umm somthing went wrong here
bump
my favorite joker is the king of diamonds
I don't understand the # notation used by talisman. For example, in e689#43 I think it's some kind of knuth up-arrow notation thing, so it means like e689 * 10 ^(43) 10 where ^(n) is n up-arrows. is that right?
no thats not it
in something like 1e3#12 you'd get 1eeeeeeeeeeee3 (thats 12 e's)
and what that means is essentially a power tower (so like 4e3#2 is 4 * 10^(10^3))
i think at least
the cryptid discord has something on this
https://discord.com/channels/1264429948970733782/1278426114578055200
that makes more sense
the source was unclear, but they talked a bunch about knuth arrows
config = { extra = {xmult = 0.5, min = 0.5, max = 2}},
loc_vars = function(self, info_queue, center)
return { vars = {center.ability.extra.xmult, center.ability.extra.min, center.ability.extra.max} }
end,
calculate = function(self, card, context)
tempxmult = 0
if context.setting_blind then
tempxmult = pseudorandom(card.ability.extra.min, card.ability.extra.max)
card.ability.extra.xmult = tempxmult
end
if context.joker_main then
card.ability.extra.xmult = tempxmult
return {
xmult = card.ability.extra.xmult
}
end
end,
}
im tryna change the xmult every round start but its just always at 0
How does one show UI like poker hands?
You mean like the examples? Or clicking the button to open the ui
teehee
I mean having a tab next to poker hands that has the same style but different list, also I would like examples if possible.
I know aiko has a ton of neat stuff ui wise, you might be able to take a gander at their stuff
Otherwise @red flower is a ui legend or in my belief @chrome widget is epic at it as well
Ough what huh
Hi bestie
I've been dragged from the depths hello
Want to take a gander at somethings query
Unfortunately I'm eepy in bed and have to get up to make dinner so likely not able to
This is okay be sure to give me a plate and all is well smiley face
local para_extra_slots = function(self)
return self.ability.para_negativesticker or self.config.center_key == "j_para_cooledwater"
end
local para_card_removal_old = Card.remove_from_deck
local para_card_addition_old = Card.add_to_deck
Card.remove_from_deck = function(self, card, from_debuff)
if para_extra_slots(self) and card.area == G.jokers then -- Crashes here
G.jokers.config.card_limit = G.jokers.config.card_limit - 1
end
return para_card_removal_old(self, card, from_debuff)
end
Card.add_to_deck = function(self, card, from_debuff)
if para_extra_slots(self) and card.area == G.jokers then -- And here too
G.jokers.config.card_limit = G.jokers.config.card_limit + 1
end
return para_card_addition_old(self, card, from_debuff)
end
why does this crash
does anyone have any solution to help me?
if context.joker_main then
card.ability.extra.xmult = tempxmult
return {
xmult = card.ability.extra.xmult
}
end```
try removing that second line
config = { extra = {xmult = 0.5, min = 0.5, max = 2}},
loc_vars = function(self, info_queue, center)
return { vars = {card.ability.extra.xmult, card.ability.extra.min, card.ability.extra.max} } -- it should be card and not center
end,
calculate = function(self, card, context)
local tempxmult = 0 -- Don't use global variables! Use local ones instead.
if context.setting_blind then
tempxmult = pseudorandom("seed",card.ability.extra.min, card.ability.extra.max) -- You didn't seed the pseudorandom, so it took the minimum as the seed, the max as the minimum, and nothing as the maximum
card.ability.extra.xmult = tempxmult
elseif context.joker_main then -- Better to use elseif than two separate ifs.
card.ability.extra.xmult = tempxmult
return {
xmult = card.ability.extra.xmult
}
end
end,
}
still remove the second line though, it's redundant/possibly harmful
how do i know when to use center or card?
how would one go about putting a variable in reminder text like this?
ive never used center honestly
oh
idk why its there just use card in loc_vars
loc_vars
ok thanks
bump
You can input specific_vars in an info queue.
how would i do loc_vars for something that isn't an object? this is just text that appears on the side of a card like this
what even is the crash
info_queue[#info_queue+1] = {..., specific_vars = {specific_vars}} I think.
yea that worked
it crashed cause i was using card so i changed it to center and it worked so thanks for the fix
bump
not entirely sure where I'm going wrong here; card.ability should exist
find_card returns a list of jokers not one joker
seems like next() here is giving you a tuple of an index and value and still not a joker
darn
im not sure though i didnt know next was a thing until just now
the blue text in the screenshot is part of line 31 (me printing next(card)) and it seems to show ability as a valid option
it might be printing it as a table of the index and the joker
o
can I return formatted text with loc_vars, for example if I do
{
loc_txt = {
text = { "#1#" }
}
loc_vars = function()
return { vars = { "{C:attention}lmao{}" } }
end
}
would the text be formatted, I'm not on my pc rn so just asking to make sure
I'll try find_card()[1]
dont think so
apparently that did it 
bump
How do I change the probability of rarities in the shop? Does anyone know?
No.
generally or under a specific condition?
thanks for the clarification
deck
the way I know is you basically hijack the function responsible for getting shop items and implement your own logic
maybe that or lovely injection, though I've never tried the latter
you could try taking ownership of common, uncommon, and rare and change get_weight
hmmm thats interesting, didn't know that
how would i check in remove_from_deck or add_to_deck if it's being removed/added from G.jokers specifically?
sorry i wasnt home until now
don't you have to return the key?
also is str a variable
It's been long enough of trying to figure this out so i ask again: can anyone tell why this just doesn't trigger?
joker_main and final_scoring_step aren't true at the same time
that definitely was an issue, and i fixed it (ty), but that isn't the only issue bc it still does nothing
what does this even do
"If the played hand is all the same Void buff, grant x2 mult",
"and chips but destroy a played card."
it seems like you're checking if the played card is an enhancement instead of has an enhancement
was gonna ask if that was an enhancement because why arent you using SMODS.has_enhancement()
making a joker that's pretty much just canio but for an enhancement, but this crash happens.
which line is line 984
wait nvm
show us the whole crash report
is there a way to increase the number of cards/choices in a booster pack
Yes.
where can i find that again?
Press CTRL + C on the crash.
it's the enhancement key thing again
world's most broken Tarot card ;u;
do you know how
I was going off of the work the other person for this mod did and it worked for them so i thought it would work here, too
Off by One from Cryptid
why are some of your playing cards also Jimbo
why are you looking for the enhancement context.destroy_card
wait weird, the text is different too ;u;
You have to do it manually because tarots don't usually apply editions.
tarots dont do editions you gotta do it urself
i need help
yeah what somecom said
grand
bro forgot the question
What would be the line of code to be able to put a sound that does not belong to balatro in the code?
local para_extra_slots = function(self)
return self.ability.para_negativesticker or self.config.center_key == "j_para_cooledwater"
end
local para_card_removal_old = Card.remove_from_deck
local para_card_addition_old = Card.add_to_deck
Card.remove_from_deck = function(self, card, from_debuff)
if para_extra_slots(self) and card.area == G.jokers then -- Crashes here
G.jokers.config.card_limit = G.jokers.config.card_limit - 1
end
return para_card_removal_old(self, card, from_debuff)
end
Card.add_to_deck = function(self, card, from_debuff)
if para_extra_slots(self) and card.area == G.jokers then -- And here too
G.jokers.config.card_limit = G.jokers.config.card_limit + 1
end
return para_card_addition_old(self, card, from_debuff)
end
why does this crash
SMODS.Sound?
I need a translator because I have bad English
thx
bring the cat back :(
How would I hook/patch create_card so that I can have a chance to replace a card with another?
https://github.com/Steamodded/smods/wiki/SMODS.Sound just for you
is this for every source of creating the given card?
Yes.
Not sure if it was brought up but every single time a calculate function is called, your three local variables are being reset
is this only created in stuff from your mod or is it something like a joker that can appear in the shop?
-# hi astra 
I'm trying to have a voucher have a chance to replace normal consumables with their synonym alternative.
tl;dr you should be storing them in your card's ability config and reset them after scoring
-# Hi toma 
-# how's development 
long ass sigh so i had it right abt that part earlier
always go with ur gut
i would assume you just hook SMODS.create_card and if the chance is right then you create a different card
hi smods sound
that is the wrong link
bye smods sound
-# It's good, just waiting on card arts still lmao
-# I also added a few more achievements in the meantime 
Yes, but some things don't use SMODS.create_card
also hook SMODS.add_card then? idk
No, some things use create_card
hook that as well then
Yes, but how?
is there an add_card in vanilla? if so you hook that too
The only thing I need to hook is create_card
i think create_card takes the same parameters as SMODS.create_card but in order rather than in a table
-# im missing like a card art (...i do the card art) and i need to figure out how to fix this double mult gain trigger and then fix the godforsaken ijiraq and THEN im done 
Double mult gain?
Yes.
you were there
you know exactly who im talking about
(chud joker gains xmult twice whenever the condition is fulfilled instead of once)
(2->200 instead of 2->20)
(no, adding not context.repetition did not make a difference)
so you'd check set to see if its a consumable (tarot spectral planet) then if the chance succeeds call the old create_card with a new key
What if it was created without forced_key?
you check the first parameter for "Tarot" "Spectral" or "Planet" then
As I have said I am trying to turn consumables into their synonym alternative, I need their key to do that.
hardcode all the consumables then
prefix is c
Anyone know why I get this message? Copying the code from bugerlar so not familar with it
I'm aware.
I don't understand?
your calculate parameters dont include card
this is my new error message
what's the new code
just adding card to calculate
Replace blind with card
why is blind there
how do you use xchips function
thank you
return {xchips = number}
Yes.
yes
and the color will be {X:blue,C:white} ?
Yes.
Is this okay?
Yes.
I changed the money value to equal 10 but it's still giving 4 dollars on round end, is he stupid??? 😭
thank you
this is the error
did you pick the right joker
Sorry for being real stupid, I tried replacing blind but now my joker does nothing.
send the full thing
oh thaaaaaaaaaaaat
CONTEXT.CARD 😭
leave the context
like from the shop? Yeah I didnt take the original golden joker
from the collection
your if statement has no end
wait
nvm I was just dumb lol
i am stupid
I was starting the run from a save not starting a new one
why is it discards
Something tells me they're not too educated on calculate contexts
🤏
yes 
The reason why i stopped using that way:
how do i apply this into a deck
I have never seen that crash report
where are your commas
okay go back
what exactly is it that you're trying to accomplish?
here's my plan
If talisman installed, gives ^4 Mult
how do you check if Talisman is installed
in a Joker
Which part needs commas this time?
the extra
did SMODS.find_mod() not work
Ah
find_mod("Talisman")?
You could just do if Talisman
mod id
native from smods?
Consumables have a 1 in 10 chance to be replaced by their synonym alternative
No, talisman has a global variable called Talisman
by synonym alternative do you mean a unique version per consumable or a unique version per consumable type
It is a different consumable type.
It doesn't crash, but it still does't work somehow
how do i get hand text while a hand is playing? i have an effect that levels up a hand during scoring and i need to reset the text to what it was before the level up text, so i need to get what's actually in the text beforehand
try changing scoringCard for scored_card
can you try that one more time i think i had an aneurysm
is there a context that covers when a card is created
so i can check for when a planet card is bought or created (added to consumable area)
is this your own planet or a basegame one
mb
the hand text that appears when youre about to play a poker hand / are playing a hand
leveling up a hand overrides where that text appears
so i want to reset the text to what it was before the level up was triggered
after its done leveling up
There is context.card_added which is when a card is added to deck at all.
context.card_added
so i need to know where the values for that text is stored so i can save it
this text? wdym "reset"
context.scoring_name?
same result: nothing
yes that
ill try to explain
select hand to play -> play hand -> level up hand (which changes that text since leveling up hands uses that space) -> set the text there back to the hand text of the hand that was played -> continue scoring
ooh good shout
how do i get the chips and mult values though
i can get its level easily enough too i think
is it supposed to give chips/mult? because you have to return it for that to work
actually i think theres global variables for the current chips/mult
let me try it
noted, but it isn't even destroying a card (which should be the part coded 100% properly)
Wait, couldn't you just use SMODS.smart_level_up_hand?
wait whats that
how could i make sure the played hand contains at least one spade before scoring? this doesn't work
You are trying to index a table by a card.
how do i apply this into a deck?
at which point?
oh my god yes exactly that lol
so often theres just already a built in function for the wackiest things i try to do lol
thanks
spade_list[context.scoring_hand[i]] = true
oh i got nothing for that 😭
im no good at destroy_card
the print directly above that never occurs, though
use the function get_weight instead and check if you're on a specific deck
also who would play that
Remove the card area check.
idk
ill be back after fixing the mult and chips, then
wait so is there not like a benefit to this deck is it just no rares
uuuuuuuh
hey, just wanted to ask if there is a way to make like a judgment type card with your own custom jokers? i am trying to make a consumable that creates a joker from a pool of my modded jokers but i cant seem to get it to work.. any advice?
replace resources with assets then
I'm still thinking about changing it but in the meantime it's like this.
fixed! then i used table.insert() instead of indexing and everything works perfectly!
why won't this draw the amount of cards I want?
pretty sure I just need to replace context.other_card.seal with something that actually checks the seal for this to work.
I'm just not sure what that would be
Damn when did this exist
where did you hear about cards_to_draw
the same error
because i don't think it exists
the serpent copied from there
it works when context is set to cards_to_draw
context.drawing_cards then?
and ig find a way to check if you discarded recently
Hi N!
cards_to_draw only works in drawing_cards yes
N has arrived
I moved the folder from sounds to resources and I get the same error.
hi n
a
hii
did you load the file
I think last month.
ok so this works but it keeps the level from the leveled up hand on the actual played hand
for example if i play a levl 1 3oak and it levels up flush it incorrectly shows a level 2 3oak
How is this done?
is SMODS.poll_seal a default but not SMODS.poll_edition?
I can't find the documentation for chips or mult...
i didnt read the whole conversation
does level_up = true not work?
Is there something specific I should be doing in order to make sure this still works
im leveling up a poker hand during play
ive checked the code and the function SMODS.smart_level_up_hand() seems to incorrectly assume the played hand and the hand that was leveled up are the same
what version of smods
so it displays wrong if they arent
I have never seen that function 😭
0521a
update
so am i able to just use card:set_edition(poll_edition)?
its not an update thing its literally in the code of the repo
i will update regardless though
I think?
that was fixed recently and it worked fine for me
local para_extra_slots = function(self)
return self.ability.para_negativesticker or self.config.center_key == "j_para_cooledwater"
end
local para_card_removal_old = Card.remove_from_deck
local para_card_addition_old = Card.add_to_deck
Card.remove_from_deck = function(self, card, from_debuff)
if para_extra_slots(self) and card.area == G.jokers then -- Crashes here
G.jokers.config.card_limit = G.jokers.config.card_limit - 1
end
return para_card_removal_old(self, card, from_debuff)
end
Card.add_to_deck = function(self, card, from_debuff)
if para_extra_slots(self) and card.area == G.jokers then -- And here too
G.jokers.config.card_limit = G.jokers.config.card_limit + 1
end
return para_card_addition_old(self, card, from_debuff)
end
why does this crash
found it
Sending your crash report woiuld help a lot
also i dont see this in the code
updated to version 0530b, issue persists
can i see your code
I think recent is 608a
yeah that's the function
i don't see it doing what you ssaid
i think
hand is the argument not the played hand
it gets the level of the hand its told to upgrade
and uses it for the played hand
after leveling up is done
hmm let me try it
can i get the blueprint that's copying my joker with context.blueprint?
whats happening is
play hand -> poker hand other than played hand is leveled -> it sets the hand text values back but keeps the level of the leveled hand -> scoring continues
context.blueprint_card
ty
the other values are re-set correctly just not the level
i can try sending like a video recording
ohhh i thought it was everything
yeah i might not have noticed that
yeah
if i play a straight and it levels up pair it still shows the straight at level 2
yep
like this?
same here
I'm figuring things out, idk what's still wrong but i know that the highlighted if section that isn't triggering
How do the tarot cards work in vanilla actually
Because I'm doubling all the values of the card and yet the selection limit is unchanged when you'd think it would have to change
alright at least its an smods issue and not something i did wrong lol
just had a revelation
what if i just put it in an event
hm from what i can tell the selection limit is indeed a config value so you should be able to change it
just to check are you looking for it in card.ability.extra or card.ability
the value i mean
Both
hm
hm
are you sure its context.card for the card being added
im not sure myself but it seems weird to me
what is context.card_added for here? when the consumable is added?
yea
when it's added to your hand the values are doubled
TBOI four souls mentioned!!!???
if I allow it to cover context.card.ability.consumeable it does double the values so I think so
Tho that also breaks things because it affects the base card
i used to homebrew four souls
made a balatro themed pack that never released
How would I check specifically in hooks of remove_from_deck and add_to_deck if the card is being removed or added to my joker slots?
ive spend probably over 100 bucks on four souls
i'm in four souls
i made era walk and holy greed
originally oops all 6s and charon from hades
to activate an effect when blueprint triggers my joker is it enough with context.blueprint?
blueprint copies all abilities automatically. instead, you call out when not to use context.blueprint
I FIXED ITTTTTTTTTTTTTTTT
MAIN_EVAL MY BELOVED
ty, best explanation

so for example
if context.before and not context.blueprint
[scaling effect]
end
if context.joker_main
[chips or mult or whatever, is copied by blueprint]
blueprint copies all calculate effects that are not under and not context.blueprint
yes what im trying to do is if a blueprint is copying my joker, on hand played it will erase the blueprint
shot in the dark here but try using context.card_added instead of context.card for the card being added?
and if not maybe context.self?
the doc is a bit unclear and the code doesnt help much
ohh common
ahh, in that case you would want if context.blueprint
nvm, i'm doing it right
I think context.card_added is a boolean
I'll give it a shot tho
yeah im not sure
it is context.card
I recorded the sound and nothing
ah nvm me then
yea
bump
when using the card_eval_status_text function, you'd use "context.blueprint or card" to target the blueprint if it's being copied, so specifying context.blueprint should work perfectly well
What can I try now?
add_to_deck = function(self,card)
(code here)
end,
The weird thing is that even if I allow for context.card.ability.consumeable, it still messes up the selection limit
And if I only do context.card.ability.extra, it works perfectly fine with my custom consumables, but the tarots break it
but if I do context.card.ability, neither works
hm
maybe for debugging add some print()s into the code
like have it print key and entry and see what it returns
just a sanity check
i know how to hook i don't know how to check if its being added to joker slots
oki
how would a joker be in any other slots? also you could just run an ipairs through G.jokers for if G.jokers[i] == card
does anytone know how to create a negative card with local card = create_card
add_to_deck evaluates in booster packs and various other locations
would checking for G.jokers.cards[this card] work
are you certain about that
I see
hm
add_to_deck() only triggers when its actually obtained
I found it, the issue is the highlighted if statement, it isn't true despite it's condition being true. I know that the key is correct for all 3, so what's wrong?
its printing all of the cards ability values which its supposed to
not any subtables though
importantly though max_highligted is changed from 2 to 4
does the card in question have subtables
it says that but it doesn't actually let you highlight any more or less than two
I also tested with one of mine (which I know do) and it said the same thing
I spend like 2 hours staring at Cryptid source code and yet I still have no idea how they got it to work 
you need to actually format the keys of your enhancements
they are, i made sure they are
weird
do you have debugplus
if so go in-game and have that card be the first in your consumables and run the following in the console
eval G.consumeables.cards[1].ability.max_highlighted
cryptid code is black magic
but it only lets you select 2
indeed
did you try adding your mod prefix
huh
huh
thats very strange
as in
m_modprefix_enhancement
it feels equally as weird that it isn't exploring any subtables at all despite the code calling for it
cheers lad
bump
That doesn't clear things up for me...
what is your mod's prefix
card:set_edition("e_negative", true)
hmmmm
also try
eval G.consumeables.cards[1].ability.consumeable.max_highlighted
is that also 4
That one is 2
okay thats probably the issue then
i think its getting the max selection from that
but its in a subtable
so if the subtables being broken is fixed it should work
Though when I change that one, it just doesn't let me use it at all
Also it affects the base card, meaning it stacks when i get the same consumable more than once, permanently
ooh does it
My first screenshot was an example of it
this one
-# (I don't know what a prefix is in this context)
whats in your json
mmmmmmmmmmm
i tried this and it does let me use it but indeed it messes up all copies of it
also just chaning the first value also doesnt change anything
so its not your end
as in its not just you
What do I do?
not sure what it is then
you dont need to load that folder
strange
which folder should be loaded?
actually
if I just force set it to 4 then it works fine
yeah
the sounds should be in assets/sounds and they get loaded automatically
How to do that without affecting any other instance of the card tho
checked the can_use() code and it actually just checks the ability.consumeable value which is the global one
so no way to do so without a patch i think
yeah it shouldnt be hard
line 1564 of card.lua i think is where you wanna start
oohhh, oki
and now?
message = localize("key")
okii
thank uu
idk what are you trying to do
that when the joker is activated, it makes a sound
can i see the code
idk why you define it twice
yes
never mind! 

the text works fine, I have the problem with the sound.
gonna try putting it in an event again
is NS your mod's prefix?
can i see assets/sounds?
your actual message key should be defined somewhere else
do you have a localization file
idk how to define messages without having a localization file
you could try doing message = "Text!"
PROGRESSSSSS, THANK YOU AND THE HYPERFIXATION
(It still doesn't trigger but now it actually does the first if statement properly)
the path is wrong, it should be "NS_banana.ogg"
okkkk
whats the calculate function look like
I already modified it, let's see if it works.
np
The prints are to see where it got to, i need to run it again bc i added a few prints i didn't have before
whats the intention of the destroy card part
shouldnt it be SMODS.add_to_deck? (someone can correct me here if im wrong)
destroying a card
turns out that that's the only issue now
like a random one?
yea
use SMODS.add_card instead
thanks for the correction N
would it be
if G.consumeables then
SMODS.add_card(j_yip_blue_card)
card:set_edition("e_negative", true)
return true
end
nop
SMODS.add_card{key="j_yip_blue_card", edition="e_negative"}
im on phone too
you fought hard
SMODS.calculate_effect({message = "smt"}, card)
also hu
hi
i retire
ok but color
can i still do color
you can put color in there, yeah
so i can calceffect this
yes
sick
hey, just wanted to ask if there is a way to make like a judgment type card with your own custom jokers? i am trying to make a consumable that creates a joker from a pool of my modded jokers but i cant seem to get it to work.. any advice?
maybe iterate through all jokers and make a table of the ones which have your prefix in their key
i would make an ObjectType
tap
ive unfortunately found more issues with it
if the hand is "???" from cards being face-down normally it changes to what the hand actually is once you play it, but with this function it still has it be "???" instead
when are you leveling up
reformatted is this allowed/correct
what context
context.before
yeah i think its still "???" at that time
so it would need to check what hand it actually is and not what the text says it is
i would report it as an issue in the smods repo
i'll do that then
im unsure how to randomize what card is picked but if its among your scored hand you should start with context.cardarea == G.play rather than the other context.destroy_card thing
I'll look into it tomorrow after work if nobody does it by then
unless of course the if still gives you the print message in which case it doesnt matter
actually gimme a bit i might be able to reformat this where you dont have to set the card variable to false before returning (which may be kicking you out of the context)
Has anyone ever told the spectral cards to just play nice when people are trying to modify them
Wondering if that usually works - to just yell at them until they work
Which function can I use to get the cards in the highlighted hand that will score when played?
like before they're played?
Yeah before theyre played
this is making me scared for when i gotta try and modify the spectrals to be nice in general (remove the negative parts of certain spectrals)
this didnt fix the double it just made it so i could watch it in real time
the messages go as follows
"x6.32 Mult", "x20 Mult", "x63.2 Mult", "x200 Mult"
(that 6.32 is due to the xmult gain being the square root of 10, 2*sqrt10 is 6.32)
Me trying to modify how many cards Aura or any of the seal spectrals can affect only to learn it's hardcoded
i gotta hope the destroy parts of familiar, grim, and incantation arent hardcoded
big smoke joker
if you make a legendary joker does it automatically do the normal soul sutff (not appear in shops, show up when you use soul) or do you have to code that
idk if i did this well or not
im trying to use :is_suit(suit) to see if a given card matches a suit but it doesnt seem work when a card is debuffed, what can i do to get around that?
yes
yes as in it does it automatically?
legendary, as a rarity, cant show up in shops
and it just gets a random legendary for soul
so yea
:is_suit(suit, true) iirc
ok ty
just take ownership silly :3
if only i knew how to do that
how would i check what the current deck is?
entire calc function because it's literally only when it comes to scoring probabilities
every other instance works properly
i had to do it for one of my jokers so i could rewrite wheel of fortune from scratch
don't use context in an event, save it to a local
bump
(ignore bugged hand size) doesn't crash now but it just doesn't show a message at all
no clue what variable the current deck is
G.GAME.selected_back iirc
and tags as well actually
have you checked vanillaremade
thats it yea tytyty
it has all of those im pretty sure
does vremade have localization files?
yes
anyone know why SMODS.calculate_effect isn't showing a message here?
i still actually dont know even with that
G.P_CENTERS["gold_seal"] would it just be this
why is your localize in parentheses
(the card)
force of habit, it doesn't change anything
G.P_SEALS["gold_seal"] ?
i think so
how do i turn a message into a file again
can you elaborate
i have a message on discord that i think may be too long to send here without burying smth so i wanna turn it into a file instead
should i just do that manually
ohh yeah no idea im bad at discord
Just put it in notepad
and then send the file
?
im doing that rn
cool
itty bitty bump
its a response to someone btw not an issue im having, though i do have an issue, how do i actually get poll_edition to work
Not sure what's happened
Used immolate
tried to check my deck
this happened
ill send the code i have in a sec after im done with the response
is it possible to get if a card is modified at all?
like edition, seal, and enhancements
AFAIK no without checking all of them
i need to get all 3 anyways
are edition and seal just SMODS.has_enhancement() but with edition and seal instead of enhancement
no, it's card.edition and card.seal
wait why don't we get quantum seals
what gives enhancements special treatment
yeah thats right
im checking ortalab's dev code
btw @red flower youve been like absurdly helpful for all my questions with modding i wanna say thank you a lot
in here
no problem!!
i wanna make sure the card created here has an edition
poll_edition("seed", nil, nil, true)
the second nil can be true if you don't want negatives
oh no im fine having negatives, does the last part being true guarantee that there is an edition?
yes
wait how do i get if a card has any enhancement again
next(SMODS.get_enhancements(card))
I had an idea that makes the destroying a card irrelevant, for the other parts ty!
-# (why was that in a text file though?)
whats the base edition and base seal?
felt it was too long to send as a regular message
np
ah lol
I lowkey think there'd be 25% less modders without N lol
that means 25% more questions 😭
VERY true
how come the tooltip text isn't showing?
if context.individual and context.cardarea == G.play then
local othercard = context.other_card
local rank = othercard:get_id()
if rank == 9 then
if context.repetition and (next(SMODS.get_enhancements(othercard)) or othercard.edition ~= "" or othercard.seal ~= "") then
return {
mult = card.ability.extra.nine,
repetitions = 1
}
would this cause all modified 9s to infinitely retrigger?
ignore the nil values i havent set up the info queue yet lol
i mean people are more likely to ask questions if there's someone actually answering them
it needs to be a center or a tag
specifically for decks?
or for tooltips i mean
thats so jank lol
why would it
also context.repetition and context.individual are mutually exclusive
How do i get a joker to discard a card in hand?
it looks for the keys in P_CENTERS or P_TAGS
aah
One of the larger problems is that alot of questions would be solved by just searching the discord
People like N or something answer the same questions like 5x or more a day lmfao
My ass hates repeating myself I dont got the patience N or something have
My suggestion to get around it is to make a dummy card object that doesn't appear in collections and reference that for your tooltip
a lot of questions would be solved by reading the docs!!
Thats true also
I get most of my info by reading docs or more importantly searching what I'm doing in the channel
Most of my answers have been acquired from both sources
the issue is that the docs are very weird to search around and you wont find what you need like 70% of the time
either that or looking up what you need wont show it
If you know the general thing you're looking for docs arent that hard to search imo
Is alr lol, ty!
Like when I was making consumables it was pretty self explanatory to look at that doc section
One of my mods does this actually
Damn 0 in 5
read the tooltip 😭
I think a lot of people exaggerate with this. At least 50% of the questions here are explained clearly by the docs
Most of the time people just don't know basic lua and they blame it on the docs not being a step by step tutorial
Nobody reads in 2011
Yea this 100%
(and vanillaremade is in the docs so I'm including it)
95%...

a lot of "how do i check for X" is stupid to find (without vremade) tho
98 right
as someone who did not in fact understand basic lua, asking dumb questions in here helped a lot
and SMODS has a lot of different stuff for different situations so there might not even be a vremade example of what you need to find

I didn't know a lick of Lua but my background in other coding languages big time backpacked me lol
Well thats the thing, asking a question you may find stupid is okay when people like N or something are here
Ive even encouraged it
Its mostly just I was saying I don't have the personal patience to answer the same questions over and over
Hell I'll answer questions with simple answers if I'm here
But its definitely a nuisance when you know the answer is in the docs
Dude so fucking real 
where is that
WHaaaaaaaaaaaaaat
probably animation stuff
Well for sound stuff that's fine
yeah that's fine
Erm why not math.exact
that is a number
Yes
math.just_give_me_a_number_man()
pseudorandom is only really for random mechanic values
About to make a discord mod to submit to the discord workshop to mod this server
is the card being sold for context.selling_card context.other_card?
mod this server but only for people competent enough to not embed fail when pasting tenor links
context.card
^ in the docs btw
Do we have context.win yet so I can just context.win everything
make one
If context.win then g.game.win = true then g.game.dollars = win
is getting a cards key just card.config.CENTER.key?
yes
all lowercase tho
if context.thinking_about_boobs then
print('hell yeah')
end
All you'd see in my console is alot of hell yeah
got it working
hell yeah
didnt understand the successor token reminder had to be an actual defined object
why is my game saying context is a nil value?
is there any info i can read about object types?
isnt that smods?
psyconolicals mention??
the smods docs
here's an example also
https://github.com/TheOneGoofAli/TOGAPackBalatro/blob/c8200fe8c893e478f1b6669c27c60c0693e45275/togastuff.lua#L130
there should be a context for when blueprint is copying brainstorm called context.yuri /j
thank you so much ur the best
there is no way in hell this card works on the first try
Because N has made so many prs I'd like to have context.N that does something i wont know until something works
where
oh girl you dont even know
im sorry im asking so many qyestions im new to lua and im trying to learn how to code on the spot
for the most part at least
is v:has_ability more broad than doing has_enhancement or has_edition (and can cover if a card has a certain sticker)?
((Scroll down to guess who))
you replaced the card reset function with context.end_of_round on the same spot, but it needs to go inside calculate
how do i check if a card has a certain edition?
this card gives +1 hand size if a 1/3 chance procs on played clubs, however for some reason it gives an extra card?? like, it goes 8/8 -> 7/8 (played card) -> 10/9 (after everything is done)
i thought card.edition == "e_foil" would work
card.edition.key
dont need those yet
no because that doesn't exist
if context.selling_card and context.other_card.config.center.key == "j_diet_cola" then
return {
func = function()
G.E_MANAGER:add_event(Event({
func = (function()
add_tag(Tag('tag_double'))
play_sound('generic1', 0.9 + math.random() * 0.1, 0.8)
play_sound('holo1', 1.2 + math.random() * 0.1, 0.4)
return true
end)
}))
end
}
end
why doesnt this make the joker give another double tag when diet colas are sold?
wait
im stupid
nvm
anyone know why G.hand:change_size() gives a random extra card when used in this dynamic way?
can you elaborate?
is there anything that does exist that can check if a card in a for loop has a sticker? (i already have for k, v in pairs(context.hand_drawn) do)
recording a video, one sec
I sent the wrong file😭 😭 😭 😭 😭 😭
im not sure, stickers are weird
im assuming around line 184
the joker is meant to increase hand size by 1, which it does fine, however it draws 2 cards, putting it over the max amount. it says 10/9, and i'd very much rather it be 9/9... it draws 1 card to replenish the played one, then for some reason draws an extra 2 more
ohhh maybe changing the size in an event inside the event?
that will probably not update the number tho
just changing the size updates the number from what i can tell
its the same way in the vremade to do list and it doesnt cause any problems there
if context.selling_card and context.card.config.center.key == "j_diet_cola" then
return {
func = function()
G.E_MANAGER:add_event(Event({
func = (function()
add_tag(Tag('tag_double'))
play_sound('generic1', 0.9 + math.random() * 0.1, 0.8)
play_sound('holo1', 1.2 + math.random() * 0.1, 0.4)
return true
end)
}))
end
}
end
why does this not make the joker give an extra double tag when diet colas are sold?
no it's not
this worked! (why did it work...)
it's a bit delayed but otherwise works perfectly
basically this puts the event in the queue after the event that draws a card after playing
but its under all of the other code not from the vremade
nice
from that point onwards its just ther same thuing
N' do you whats going on here
cause this is basically copied from vremade
wait, right i forgot there's one more thing i need to fix, celebrated too early
how can i multiply the chip count by 2?
the problem is that the syntax is all wrong
it's hard for me to see properly on mobile for me to point it out properly
return { xchips = 2 }
SMODS adds XChips
yeah all of that after the function is wrong
not the code itself (i havent read it) but the placement
ah, it wasn't in the docs lol, ty!
i dont see anything wrong honestly
does anyone know off hand where the menu ui is stored in the code
Which menu?
the new game menu i suppose
this
im tyring to make it so the PLAY button is greyed out if you have no successor tokens
probably functions/UI_definitions.lua
i would look for "seeded run" in the localization and then look for that key in the code
(or look at Galdur)
Using localization keys to weed out UI Elements (and by extension, menus themselves) is such a useful strategy
oh holy true
yeah this is huge info ty
is there a link you can send that explains how to order it correctly?\
no, you need to learn lua sadly
basically context doesn't exist outside calculate and anything you do with it outside of a joker doesn't do anything
ok so i have the drawn hand loop, how would i loop through played/discarded hand? is it just k, v in pairs(context.played_hand or context.discarded_hand)?
i feel like a bit of a dumbass for asking this but i'm struggling to make a joker that changes the background to black and yellow
i'm a bit lost on how to use define draw steps
new new new (new) plan
whats the idea for this joker
gains xmult when probabilities hit (I had to do this manually)
everything works except the Scoring type (think lucky card)
(Just lucky card)
(Glass works)
(It’s literally only lucky cards)
so Im testing this ver
cant you just use what lucky cat does
you’ll never guess what this is
bluh im struggling to wrap my head around how to manage like. values stored inside your save
and its hard to test because it feels like no matter what my deck is gonna return nil values
im dum
cant you just look at them through the save file editor
thats what I did for my custom save stuff
save file editor?
