#💻・modding-dev
1 messages · Page 516 of 1
Where can I enable it?
Yeah, lack of documentation is pretty annoying
I just looked here and apparently perma bonuses support negative values so just set the perma_bonus such that the bonus cancels the base chip values i guess?
Yay it works thanks 🥳
Where do I get the base chip value from?
thanks!
card.base.nominal
So it looks like that works, but I'd rather have it not add the chips at all than add them and subtract them again
hmm, maybe have the joker go through the played cards, set card.ability.extra.give_no_chips = true
then hook Card.get_chip_bonus so that if card.ability.extra.give_no_chips then return 0 otherwise call the original function
That's kind of what I was thinking I would do
yeah i cant think of a better solution
rest in peach s' cursor 20?? - 2025
i swear obs working properly is like a wheel of fortune 1 in 4
-# me when I change cursor type with a Joker
how do I make a specific consumable rarer in the shop (not impossible to find)
"Nope!"
"Nope!"
"Nope!"
"Nope!"
"Nope!"
"Nope!"
"Nope!"
"Nope!"
"Nope!"
"Nope!"
consumables don't seem to have an individual shop rate unfortunately; what's your use case?
hey so is this where we post errors?
making a minecraft-themed joker that upgrades via ore consumables, want stuff like diamonds to be rarer
ye
oh i thought you meant for your own mod
no
that goes in #⚙・modding-general
hm, i see. you might want to just make a couple of different ConsumableTypes with different shop rates but have the same visual appearance, although then that gives them separate boxes in the collection. the other route is probably a lovely patch or hook of some sort into the shop code, which is kinda messy imo
I would like to add rarity to consumables in my library where I would hook shop?
i have no clue tbh, i was just brainstorming when i said that
oh 😔
my lib is almost done
implementing scaling modifiers caused a lot of problems which I had to fix
how would I make an overlay pulse on a random consumable like the soul? looked at vremade and it doesn't show how to customize the overlay image
look at hologram for how to do it and the soul for how the effect is coded
This crashes, which seems weird, right? local playing_card = pseudorandom_element(G.playing_cards, 'ugly')
whats the crash
it says it's expecting a table but recieving nil
oh, wait no it's crashing on local random_enhancement = pseudorandom_element(enhancement_pool, 'edit_card_enhancement')
also made a consumable hidden so that it cant be shown in shop (i want it to only be spawnable via another consumable which creates 2 of the hidden one's type) and it wont be created by the spawner consumable, is there a fix or do I just have to make it unhidden
SMODS.Joker {
key = "ugliest_joker",
unlocked = true,
discovered = false,
atlas = "ModeJokers",
rarity = 2,
pools = {
dank = true
},
config = { extra = {
count = 2
}},
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
cost = 6,
pos = { x = 8, y = 0 },
loc_vars = function (self, info_queue, card)
return { vars = {card.ability.extra.count}}
end,
calculate = function(self, card, context)
if context.setting_blind then
G.E_MANAGER:add_event(Event({
func = function()
for i = 1, (math.min(card.ability.extra.count, #G.playing_cards, 2)) do
local playing_card = pseudorandom_element(G.playing_cards, 'ugly')
local random_enhancement = pseudorandom_element(enhancement_pool, 'edit_card_enhancement')
playing_card:set_ability(random_enhancement)
end
return true
end
}))
end
end
}```
line 289 is the local random_enhancement line
so copy the soul pulsing code and put it inside soul_pos = {}?
in the card that spawns it set key_append = "some_unique_string" and in the consumable's in_pool check for args and args.source == "some_unique_string" and unhide it
yeah, in the draw function
enhancement_pool doesnt exist
right, im stupit, hang on
i dont have an in_pool for the hidden consumable
make one=
there's a function to poll a random enhancement
oh?
ah
is it in_pool or pools{}
in_pool
the game is crashing when I look at the card, here's the code
you wouldnt use G.shared_soul there because that's the soul sprite
but also I have literally no idea about graphics code so I can't help more on this sorry lol
would anyone here be so kind as to tell me what i would actually use
oh youre trying to do the soul sprite thing?
ye
well the graphics code there is specifically if you want the unique animation that the floating sprite of the soul does
i copied it from vremade and the game crashed
code
you can just remove the draw function if you want the normal floaty
like legendaries and stuff have
i don want the normal floaty
i want pulsing
@red flower My sticker code is crashing specifically when viewing in the collection trying to index jokers. Is there a good way to disable all the code if its just viewing in the collection?
SMODS.Sticker {
key = "now_playing",
atlas = "ModeJokers", pos = {x = 9, y = 4},
should_apply = false,
rate = 0,
badge_colour = HEX '577379',
apply = function (self, card, val)
card.ability[self.key] = val
if card.ability[self.key] then
G.jokers.config.card_limit = G.jokers.config.card_limit + 1
card:set_cost()
else
G.jokers.config.card_limit = G.jokers.config.card_limit - 1
end
end
}```
how do i check for args and args.source
Hello again friends, I come with a request to help me make a slight overhaul of a joker i made
greetings chum, i accept thy request
Thank you quite much. To begin, I have the source code here for you to work with
whatre ya tryna do
Right now, this joker creates a negative death card for each hand played
that sounds incredibly unbalanced and I love it
and hopefully with this overhaul i can balance it
nooooooooo ðŸ˜
I'd like for it instead to check for a single card discarded, destroy said card, and then create the negative death card
i think that should be possible-ish
exactly!
i made a joker that upgrades by x0.25 mult per discarded card
hit the road if it was good
have you looked in vremade
Is there a way to ban a card enhancement? I know I can ban its tarot card, but I also want to ensure it doesn't show up in packs, from incantation/familiar/grim, etc.
vanillaremade
vanilla remade
oh right
holy bible for modding
hit the road if it was appropriate on stream
Vanilla Remade is a mod that features all of the vanilla jokers, decks, consumables, etc. recreated as an SMODS mod
FOR REAL
smods wiki is the 10 commandments
where can i get it?
i never download it tbh i just open it in my browser when i need it
because then its also like
same
always up to date
I have it downloaded and in my VSCode workspace because then I don't have to exit and I can also search through it much easier
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.choose, card.ability.extra } }
end,
weight = 0.9,
cost = 4,
kind = "BTCTPack",
create_card = function(self, card, i)
ease_background_colour(HEX("ffffff"))
return SMODS.create_card({
set = "Batrocities",
area = G.pack_cards,
skip_materialize = true,
soulable = false,
})
end,
select_card = 'jokers',
in_pool = function() return true end
}
Why does it just crash my game?
then how does the other pack work
weight = 0.6,
cost = 4,
kind = "ShapePack",
create_card = function(self, card, i)
ease_background_colour(HEX("cc3b49"))
return SMODS.create_card({
set = "Shape",
area = G.pack_cards,
skip_materialize = true,
soulable = false,
})
end,
select_card = 'jokers',
in_pool = function() return true end
}
then how does this pack work?
ok
other mods are often going to have like
confusing shit
since ease_background_colour isnt a function that exists i assume they just made it themselves so its easier
ah ok thanks
holy synergy
is it still possible you could make those tweaks for me? I don't really know how to implement the code from vremade without it breaking stuff
sure
tysm!!
how can i make my own color using hex code?
Is there a way to ban a card enhancement? I know I can ban its tarot card, but I also want to ensure it doesn't show up in packs, from incantation/familiar/grim, etc.
you can just put HEX("<some color code>") directly into the pack colours or define a colour somewhere like in the image
Oh ok thanks
thought i show here if someone has a question on how i did stuff
have you tried adding the key to G.GAME.banned_keys yet?
this should work
Yeah, I tried adding 'm_bonus' but it just ignores that
tysm!!!!!
no prob
you shouldnt really be afraid to break stuff imo
fucking around and breaking shit is where you learn a lot of stuff
like what you can and cant do
but i have ptsd from seeing the funny "Oops! The game crashed."
Yeah, at least give it a try, and if you get an error and can't figure it out then post here
which is also how i learned a lot of stuff
i meant like crashes and stuff
Yep, I've seen lots of crashes
they happen a lot when you make mods
You won't figure out how to prevent crashes if you don't crash the game a few times
If you're doing something that messes with save data then you might want to backup your save, but other than that you should be fine
can i make it so that a consumable type only spawns if a certain joker is present
yes
the syntax errors are red yeah?
yeah they are
well i'm not seeing any
something on line 65 in your code is up
I have a smol question- is it possible to prevent money (or any number really) from being updated at all?
Like, losing money from the Ox, or gaining money from the end of a blind, none of that gets removed or added, and have the money be treated as effectively 0 since the money is frozen.
yeah i'm looking at line 65 but nothing seems wrong
you forgot an end stickmin
calculate = function(self, card, context)
if context.cardarea == G.jokers and context.joker_main then
local created_consumable = true
G.E_MANAGER:add_event(Event({
func = function()
if #context.full_hand == 1 and G.GAME.current_round.hands_played == 0 then
SMODS.add_card { set = 'Tarot', key = 'c_death', edition = 'e_negative', key_append = 'joker_forge_tarot' }
end
return {
remove = true
}
end
}))
-- another counting loop
local death_count = 0 -- number of Death cards
if G.consumeables then -- check if consumables exist
for _, c in ipairs(G.consumeables.cards) do -- check every consumable
if c.config.center.key == "c_death" then -- if the key is c_death, then it is a Death card
death_count = death_count + 1 -- increment count by 1
end
end
end
return {
xmult = (1 + 0.2 * death_count), -- again, 1 + 0.1 * death_count
message = created_consumable and localize('k_plus_tarot') or nil
}
end
end
}
fixed it
ah, of course
oh cool
im dum
(it was the end to the func function in the event)
ok cool
always format your code, and if it doesnt then that means you are missing a bracket or an end or something
in vs code just right click a selection and hit format selection, or format document
can i not put if statement inside of return?
nevermind it doesn't work
it just didn't crash
what is it not doing right
it's now completely broken what
it doesn't destroy the one card discarded and it doesn't create a negative death
i think the code to spawn the tarot is probably broken, it doesnt look like anything ive seen before
also get rid of G.GAME.current_round.hands_played == 0 thats like completely unrelated to what youre doing idk why he put that there
also yeah
that consumable creation code is
something else
doing context checks in the event???
what
also joker_main??
mb, copied it from sixth sense cuz esz wanted it to be first hand played
sorry @charred widget
sixth sense removes cards ðŸ˜
also its
discards
when discarding a single card
i think
no its hands
How do I detect the amount of a certain suit being destroyed
yeah i did want it to destroy a single card discarded
if self.config and self.config.func and (((self.config.button_UIE or self.config.button) and self.config.func ~= 'set_button_pip') or self.config.insta_func) then G.FUNCS[self.config.func](self) end
for what reasons might this line be causing this crash?
and not necessarily the first discard
oh mb
okay let me cook something up
ok thanks you
also i will be putting everyone helping me in a special thanks section in the mod
bump
again sry about botching the joker
hey it's no big deal
thats so wholesome of you
i quite literally couldn't have done this without their help
Hmmm
Idk if anyone knows this, but what should I look at if there's a place that all of Balatro points to for updating dollars?
Like ease_dollars() but, i dunno if modifying that function with a hook (if im using that term properly) is going to help with preventing money being updated
yes
unless something it's updating G.GAME.dollars directly
How do I detect #context.removed for suits
ease_background_colour = function(self)
ease_colour(G.C.DYN_UI.MAIN, HEX("cc3b49"))
end,
is this correct?
What mod are you making? Is it random jokers for fun or is there a theme?
I plan on adding a Joker that freezes your money, so I need to figure out a way if that Joker is present, just don't ease_dollars() at all
funny you should mention that, your pfp gives you a hint
context.removed is a list of cards, you would iterate through it and count the suits
Lol, is it a Pokermon addon? Or maybe a standalone Pokemon mod?
It doesnt change color
not really, it's just my own pokemon themed mod, mostly legendaries
Oh, cool!
and a majority of them don't have effects yet, so if you have any ideas throw them at me
Which ones are you planning to implement?
So like this
(We should probably head over to #⚙・modding-general actually)
aighty
Actually this detecting the amount and if it includes a heart
if that's what you want to do then yes that's correct
you dont need card = card
I've now also kinda realized that even if I'm able to prevent the money from being updated, how the hell could I tell the game that I technically have zero dollars? Preventing money from being updated could be super OP so it has to be balanced out by not being able to buy stuff from the shop
I want to do it for every heart
-# besides, that's exactly how it works in the game of the Joker's origin lol
then instead of returning in the middle of the loop, keep a counter and then at the end return the dollar amount multiplied by that counter
How would that be done
Why doesnt it change color?
how can I make boosters act like showman is applied (specifically consumable cards already in the consumable slot can spawn)
calculate = function(self, card, context)
if context.discard and #context.full_hand == 1 then
if #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
G.E_MANAGER:add_event(Event({
func = function()
SMODS.add_card({
key = "c_death",
key_append = "idk" --you can put like anything here, allows for finding the source of the card creation so make it something intuitive
})
G.GAME.consumeable_buffer = 0
return true
end
}))
SMODS.calculate_effect({ message = localize("k_plus_tarot"), colour = G.C.purple }) --message can be anything, this is just the +1 tarot text
end
return {
remove = true
}
end
end
this should work if i did it correctly
alright cool
I think the best approach for this; while it may be hacky as all hell, I could have it so that I could hook into a couple of functions, one for updating money, another to ensure that your actual money is set to 0, and one more for the money rendering thingyabob
So the Freezer Joker would store the current amount of money and silently sets your money to 0, and force the game to render the money as the Freezer's stored value rather than your actual money and once the Joker is destroyed in any way, the Joker silently gives it back to you
bump
why does the background not change?
it crashed when i discarded a single card
i forgot, you need both ease_colour (to change ui edges) and ease_background_colour_blind (to change background swirl)
Oh ok thanks
i cant figure this one out tbh
idk where card would be nil
we may need get this peer reviewed
mayhaps!
how do I permanently subtract the amount of joker slots by 1 and check if there is at least one joker slot open in a consumable
@vernal path sorry to ping you out of the blue but me and Eris are having a hard time figuring out a crash
if its a custom consumeable you need to use moprefix,
use = function(self, card, area, copier)
if #G.jokers.cards < G.jokers.config.card_limit then
G.jokers.config.card_limit = G.jokers.config.card_limit - 1
end
end
as shrimple as that
can you post the full lovely log or at least the full crash report so i can see where it's indexing the card?
oh
lmao ðŸ˜
and also the current full joker code
(bump)
try commenting out line 68, by adding -- to the beginning of the line
its crashing there, which is strange and i think may be a symptom of something else but im not really in programming mode rn
weird af
it was just the message
i just did the exact same message as the vanillaremade cartomancer
ok so its not crashing anymore but there are still two problems
oh i think the middle arg is supposed to be the scoring card
and i forgot the xmult
yeah 3 args
give me a moment
thats what i figured
yeah exactly what i was about to mention
just gotta pass in the tarot being created as the second arg
i dont know how to do skip tags, this just crashed my game
apply = function(self, tag, context)
if context.type == 'new_blind_choice' then
local lock = tag.ID
G.CONTROLLER.locks[lock] = true
tag:yep('+', G.C.SECONDARY_SET.Spectral, function()
local booster = SMODS.create_card { key = 'p_btct_booster_SGeo_1', area = G.play }
booster.T.x = G.play.T.x + G.play.T.w / 2 - G.CARD_W * 1.27 / 2
booster.T.y = G.play.T.y + G.play.T.h / 2 - G.CARD_H * 1.27 / 2
booster.T.w = G.CARD_W * 1.27
booster.T.h = G.CARD_H * 1.27
booster.cost = 0
booster.from_tag = true
G.FUNCS.use_card({ config = { ref_table = booster } })
booster:start_materialize()
G.CONTROLLER.locks[lock] = nil
return true
end)
tag.triggered = true
return true
end
end
}
calculate = function(self, card, context)
if context.discard and #context.full_hand == 1 then
G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
G.E_MANAGER:add_event(Event({
func = function()
SMODS.add_card({
key = "c_death",
edition = "e_negative"
key_append = "idk" --you can put like anything here, allows for finding the source of the card creation so make it something intuitive
})
return true
end
}))
--SMODS.calculate_effect({ message = localize("k_plus_tarot"), colour = G.C.purple }) --commented out because it killed everything
end
return {
remove = true
}
if context.joker_main then
local death_count = 0
if G.consumeables then
for _, c in ipairs(G.consumeables.cards) do
if c.config.center.key == "c_death" then
death_count = death_count + 1
end
end
end
return {
xmult = 1 + death_count * card.ability.extra.x_mult_inc
}
end
aight cool
also i would change the description to also use the xmult gain as a variable
because thats easier and also how vanilla jokers are phrased
and uh
you have 2 variables in the config that do nothing
thats ASS
-1 joker slot is a HUGE price
the effect would have to be insane
idk what though
calculate = function(self, card, context)
if context.discard and #context.full_hand == 1 then
G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
G.E_MANAGER:add_event(Event({
func = function()
SMODS.add_card({
key = "c_death",
edition = "e_negative"
key_append = "idk" --you can put like anything here, allows for finding the source of the card creation so make it something intuitive
})
return true
end
}))
--SMODS.calculate_effect({ message = localize("k_plus_tarot"), colour = G.C.purple }) --commented out because it killed everything
end
return {
remove = true,
message = localize("k_plus_tarot")
}
if context.joker_main then
local death_count = 0
if G.consumeables then
for _, c in ipairs(G.consumeables.cards) do
if c.config.center.key == "c_death" then
death_count = death_count + 1
end
end
end
return {
xmult = 1 + death_count * card.ability.extra.x_mult_inc
}
end
if u still want the message
$50 and +1 consumable slot as well then
at least i think u can return message there
put ```lua instead at the top so it does lua stuff```
oh neat didnt know that
crashed
bump - if anyone has a very custom generate_ui() on their joker and is willing to let me take a peek, so i can get an idea as to how i can write my own,, please let me know.
i know that @hushed field has a few, but i haven't seen them here in a while
there actually was a syntax error, the curly bracket at the very top was red but i fixed it mysefl
add an end
look at JoyousSpring, i think its jokers has custom joker ui
because i forgot to end the context check
How would I make my own kind of Consumable Set and give it its own tab
can you put a toggle to enable and disable a file from loading in your mod?
thank you
look at ConsumableType
just comment out the lines
if you want to stop something from loading
well i want it to be toggleable
thats why
dont worry, its not for these
oh like a config?
for the person playing the mod or you
players
yep
which line would that be?
fair
after the xmult gets returned
docs on config menus
joyousspring starts its generate ui function with SMODS.Center.generate_ui() which creates the normal joker tooltip, and then appends onto that/alters accordingly.
i'm talking about writing one entirely from scratch using UI code starting from the generate_ui() call in the joker without using SMODS.Center.generate_ui() like balatro goes kino's 2001 joker
can anyone figure out why the game is crashing when I select this card
i think its SMODS.add_card and not SMODS:add_card
idk if i did it right because it still crashed
probably undo whatever you did at that bracket before
ohhh, ok then i dont know of any other mods that do what I think you want (other than the one u mentioned) sry
but that ends up as a syntax error at the very beginning
the bracket turns red
besides syntax errors, I have one quick question: Do you want to give xmult based on the number of deaths you have (like 1 + deaths * 1.2) or do you want them to give xmult like observatory?
bro thats what i was talking about
oh
that was the bracket i put in to fix it
i thought you removed something
do i need to load my config using config.lua?
btw i probably put an end in the wrong spot
I forget, is it title that I need to fix this
after the return table gets closed
config.lua is where u set up the basic structure and options
just a second end before the last one
alribght
in misc.dictionary, you need a "b_{consumable type}_cards" = "{consumable type} Cards"
why is this crashing the game
when does it crash
that line
when I use the consumable, this is in use = function()
Eris it crashed again
augh
and its the same crash log the last two times
it's been saying stuff about line 62 and line 59
do what i just sent here
that is a big issue that i missed
this?
yeah
ok
??
same thing?
yep
it's saying something about lines 28, 59, and 62
wait
hold on
whatever this means
1: do you have talisman installed
2: someone correct me if im wrong, but i believe that to_big returns a table
How could I edit this so it shows a joker?
G.deck.cards[#G.deck.cards] and {n = G.UIT.O, config = {align = "cm", object = Card(0,0, 0.5*G.CARD_W, 0.5*G.CARD_H, G.P_CARDS[G.deck.cards[#G.deck.cards].config.card_key], G.P_CENTERS['c_base'])}} or nil,
to_big = to_big or function(x) return x end:
the line 28 thing might be that it should be info_queue and not info
"it" being?
oh my god wait i have to replace all the info with info_queue
athough it still worked with info in my loc_vars functions lmao
huh
wait so replace all of the instances of "info" with "info_queue"
i mean apparently if what i hear now is correct that shouldnt be the issue
i mean if u want to be consistent with other mods then yeah i guess
but you should still do that probably yeah
yeah my mod shows the tooltip correctly and my code looks like this
gonna change it tho
alright changed all the instances of "info" into "info_queue" aaaaaaaaaaaaaaaaaaaaand it crashed again
same logs
"expected [to close '{' at line 59] near 'key_append'
yeah atp go to bed
yo i think i fixed it
yo cool
yes i have talisman
i missed the comma omg
DOESN'T CRASH
i knew i shouldnt be doing this so late
what kinda error do u get?
ladies and gentlemen we may be back
we all have been there
attempt to index field consumeables
How do I check if a specific joker has a stake sticker? I wanna use it as a joker unlock condition
me when my coding is so shit it takes hours to fix:
its G.consumeables not G.GAME.consumeables
we went on an adventure
thx
also featuring an hour of trying to find a missing comma
rate the trade
yo btw read this
this link may have some useful info regarding a more useful VSCode setup
https://github.com/nh6574/VanillaRemade/wiki
the vscode setup stuff is on the smods wiki
oh
is this a better upside to curse
well this has the lsp setup info as well
oh nvm i mixed up the wikis
entropy has this and its still just decent
so yes???
what if it makes a negative tag (which i dunno how to do)
huh, maybe instead of 2 random spectrals u get like some number of vouchers or something
idk how to give vouchers
maybe a negative rare jonkler
is there a way to add another box to put cards in? like jokers, consumables, make another one
idk lol
cryptid does it
no it doesnt??
as in a new card area?
cryptid doesnt add any card areas
i thought it did
its been done before i think but i dont know how to do it nor which mods do so
multiplayer does it
thanks everyone
thats all i can think of
also no cryptid doesn't do it i don't think
i think ur thinking of new consmable types lol
no i saw a video of cryptid i think and it had jokers consumables and another thing
oh ur thinking of merging consumables with playing cards
hammerspace does that
makes all playing cards a random consumable
no it was another slot type thing
??? i dont know what kinda cryptid u've been seeing
probably just another mod since a lot of cryptid content creators feel the need to install 3 trillion other mods
I know Maximus does it for sure with its Horoscope cards
no explanation or anything... i'll figure it out, though. thanks
i mean if you have questions about it feel free to ask
are you referring to other functions and variables in the files? because just copying and pasting doesn't work, it crashes
(obviously replaicng the name of your mod with my own)
i am making some progress.
my game keeps crashing when i play my mod w multiplayer
it doesnt like G.GAME.consumeables
any fix to this?
yeah, i think you can just cut all of that
:3
no fix?
G.GAME.consumeables is not a thing i dont think
hmmmm
but last i tried, the cards that checked it did nothing
is set = "Consumeables" valid
i have it on a joker that makes a random consumable at start of round
yes
How would I get a random tarot card key?
pseudorandom_element(G.P_CENTER_POOLS.Tarot, "seed").key
diabolical joker fusion idea
Thx!
I need to hook Card:flip() so a joker can gain mult every time a card flips but I don't know how to do that correctly
local oldcardflip = Card.flip
function Card:flip()
if G.STAGE == G.STAGES.RUN then
SMODS.calculate_context({modprefix_card_flipped = true, card = self})
end
return oldcardflip(self)
end
``` Then use `context.modprefix_card_flipped`
yea that's the best way to do it
although Card:flip() doesn't actually return anything, so you should be able to just call oldcardflip(self) without returning it
No.
Balatro crashes when I select a deck. Did I not update to the new version of steammodded or something?
bump
I think that means something is calling a context on the main menu.
would that happen to be the function you hooked for me earlier?
Perhaps, but I updated the message to fix it.
"or card.ability.extra.xmult" in case high card is played, works or nah?
local total_xmult = (card.ability.extra.stockpile * card.ability.extra.xmult) or card.ability.extra.xmult
How do i make sure high card would score xmult?
```lua
-- Stockpile xmult for each played card
if context.individual and context.cardarea == G.play then
card.ability.extra.stockpile = card.ability.extra.stockpile * 2
local total_xmult = (card.ability.extra.stockpile * card.ability.extra.xmult) or card.ability.extra.xmult
if context.other_card == context.scoring_hand[#context.scoring_hand] then
card:juice_up(0.5, 0.5)
play_sound('holo1', 1, 0.5)
return {
xmult = total_xmult
}
end
return {
message = "Stockpiling X" .. total_xmult .. "!",
colour = G.C.RED,
card = card
}
end```
How does SMODS.destroy_cards work? I'm trying to destroy a joker but the documentation is kinda unclear
you give it the card and it destroys the card
what's unclear
all it says is
Destroys any type of cards given to the function appropriately, with respect to further calculations if called during the scoring loop.
cards - Can be an individual Card object, or a table of Card objects.
im not sure where i would put the key of the card
well, you wouldn't
it takes a card object or a table of card objects, not keys
how do i specify a card object then?
it would be easier if you tell me what you want to do and where
im trying to make a consumable that destroys one specific joker and replaces it with another
so far all i have is for i = 1, #G.jokers.highlighted do G.E_MANAGER:add_event(Event({ trigger = 'after', delay = 0.1, func = function() if G.jokers.highlighted[i] == card then SMODS.destroy_cards({cards = "j_rwn_rylen"}) SMODS.add_card({ set = "Joker", key = "rowan"}) end return true end })) end
im certain im missing something just dont know what
well, first G.jokers.highlighted[i] will probably never be equal to card because card is the consumable
oh
you want to check if G.jokers.highlighted[i].config.center.key == "j_rwn_rylen" and then do SMODS.destroy_cards(G.jokers.highlighted[i])
bump
have you looked at vremade
me fr
return {level_up = true, level_up_hand = "High Card"}
Context for specific played card
so this might be a dumb question but i cant find anywhere that lists all of the conditions for the event manager
does this work?
-- if played hand is a high card, level up hand to 60, then set not_played to false, so that played hand does not get leveled up again
if context.before and context.scoring_name == "High Card" and card.ability.extra.not_played and not context.blueprint then
card.ability.extra.not_played = false
return {
level_up = 60,
level_up_hand = 'High Card',
message = localize('k_level_up_ex')
}
end
CURRENT PRIORITY: Making sure Spinel gives xmult on a high card.
Chosen solution: I MADE SPINEL UPGRADE HIGH CARD BY 60 LEVELS.
Yes, but level_up_hand is not needed because it will always be high card.
I was gonna make it so that it will only level up high card once
But i decided that it’ll always do it, so instead I’ll just set the level up to 6 instead of 60.
What function would I have to hook in order to keep a played card in hand?
bunp
code is also up there
ty

here's my current hook for my joker that is supposed to make 1 card always draw, but it doesn't work. Am I missing something with draw_card()'s normal implementation?
local drawn_cards = draw_card
function draw_card(from, to, percent, dir, sort, card, delay, mute, stay_flipped, vol, discarded_only)
local has_headliner_fix = false
local headliner_fix = nil
for _, j in pairs(G.jokers.cards) do
if j.key == "headliner_fix" then
headliner_fix = j
has_headliner_fix = true
end
end
if has_headliner_fix and headliner_fix and headliner_fix.ability.extra.pinned_card then
card = headliner_fix.ability.extra.pinned_card
end
return drawn_cards(from, to, percent, dir, sort, card, delay, mute, stay_flipped, vol, discarded_only)
end```
You can't store cards inside of other cards.
damn
is there any way to make this happen? Or do I have to do some crazy work around.
What is the goal?
A joker pins one card to the hand so it will always draw, even after play or discard
this is the joker's calculate function, although if you cant store a card in another card its kinda a moot point. lua calculate = function(self, card, context) if context.individual and context.cardarea == G.play and not context.blueprint then if (#context.full_hand == 1 and G.GAME.current_round.hands_played == 0) then card.ability.extra.pinned_card = context.other_card end end if context.end_of_round then card.ability.extra.pinned_card = nil end end
Yes, you can't store a card, but you can store a cards sort_id
where would sort_id fit into draw_card()? Would it have something to do with the sort parameter, and is it looking for a table or something?
No, you would store the cards sort_id, and you would iterate over G.I.CARD to find the card again.
i see
local upd = Game.update
local btct_DEvil_dt = 0
function Game:update(dt)
upd(self, dt)
local btct_DEvil_dt = 0
local DEvilobj = G.P_CENTERS.b_btct_DEvil
DEvilobj.pos.x = 0
DEvilobj.pos.y = 0
if G.P_CENTERS.b_btct_DEvil and btct_DEvil_dt > 0.1 then
if math.fmod(btct.ticks,12) == 0 then
local DEvilobj = G.P_CENTERS.b_btct_DEvil
if DEvilobj.pos.x > 30 then
DEvilobj.pos.x = 0
else
DEvilobj.pos.x = DEvilobj.pos.x + 1
end
end
end
end
im not very sure how to animate can someone help me?
okay, this is the current hook function, and i think its probably almost there although it crashes trying to call a table value, of which i assume from is supposed to be a function or something
local drawn_cards = draw_card
function draw_card(from, to, percent, dir, sort, card, delay, mute, stay_flipped, vol, discarded_only)
local headliner_fix = SMODS.find_card("j_mode_headliner_fix")[1]
if headliner_fix and headliner_fix.ability.extra.pinned_card then
print(headliner_fix.ability.extra.pinned_card)
for _, c in G.I.CARD do
if c.sort_id == headliner_fix.ability.extra.pinned_card then
from = c
end
end
end
return drawn_cards(from, to, percent, dir, sort, card, delay, mute, stay_flipped, vol, discarded_only)
end``` I really wish there was some way to tell actually what type its expecting :/ in any case, am I supposed to replace `card` instead? And what type is it looking for?
No, it's ipairs(G.I.CARD)
Also from is a card area, not a card.
what function creates the description box of jokers (the one that runs generate_card_ui)?
It works! Except it is flipped, which is probably the default behavior except that I'd rather it not be flipped.
there's a param called "stay_flipped", but ive tried setting that to false. maybe i should try true tho
It's called by function Card:generate_UIBox_unlock_table(hidden), function Card:generate_UIBox_ability_table(vars_only), function create_UIBox_detailed_tooltip(_center), and function buildModtag(mod). i might be missing one tho
you can search for implementations of a function by highlighting it and right clicking and clicking find implementations
Last deck for our mod yay
ooh

ic, thanks
anyone know why its having a syntax error when i place end here, i was looking at code for paya for help to create an enchancement and im unsure why its not launching or booting properly
all stay_flipped does is that it stops it from unflipping when you play it. Is there anyway to flip it back around?
if you hover over the red squigglies, does it say anything
oh actually
i dont think you need an end
oh woah
your btct_DEvil_dt is always 0
ah i see thanks
Code?
end is only used for code blocks that use keywords, like if or for or while. if it doesnt start with those then you dont need end
it crashed
i see
local drawn_cards = draw_card
function draw_card(from, to, percent, dir, sort, card, delay, mute, stay_flipped, vol, discarded_only)
local headliner_fix = SMODS.find_card("j_mode_headliner_fix")[1]
if headliner_fix and headliner_fix.ability.extra.pinned_card then
print(headliner_fix.ability.extra.pinned_card)
for _, c in ipairs(G.I.CARD) do
if c.sort_id == headliner_fix.ability.extra.pinned_card then
card = c
end
end
end
return drawn_cards(from, to, percent, dir, sort, card, delay, mute, stay_flipped, vol, discarded_only)
end```
i guess im confused on why its crashing
i think you need an atlas probably
im not sure what that means sorry
How often does the pinned card get changed?
once per round
what location do i use for a played hand
Then you should probably hook CardArea:shuffle()
Full hand or scoring hand?
like, how you would define the key or the pos, you need to define the atlas, so the game knows which atlas to use
scoring hand
Do you have the atlas in both 1x and 2x?
how can i make it so it updates?
context.scoring_hand
again, there is no atlas = "whatever",, which you need to define
Yes, do you have enhancement wigglytuff.png file in both the 1x and 2x folders?
i do
No, objects don't require an atlas.
uhhhhhhh
It will just use the default one if it is not provided.
so i need an equals sign here
no, thats for in the object
yeah but i'm trying to make a joker that turns kings into queens and i cant find the area
What does the file structure look like?
i need some way to single out the cards in the played hand, not make something happens when its played
What is the goal?
--- STEAMODDED HEADER
--- MOD_NAME: Baileytro Mod Pack
--- MOD_ID: BaeModPack1
--- MOD_AUTHOR: [Mafubark]
--- MOD_DESCRIPTION: Mod pack that contains injoke jokers, and other things, such as new editions for jokers.
--- MOD_VERSION: 1.0.0
SMODS.Atlas{
key = 'Unegi Khard',
unlocked = true,
discovered = true,
path = 'Unegi Khard.png',
px = 71,
py = 95}
SMODS.Atlas { key = "Wigglytuff Tarot", path = "Tuff Tarot.png", px = 71, py = 95 }
-- Enhancement atlas
SMODS.Atlas { key = "Wigglytuff Card", path = "enchancement wigglytuff.png", px = 71, py = 95 }
SMODS.Joker{
key = 'Unegi Khard',
loc_txt = {
name = 'Unegi Khard',
text = {
"{C:chips}+#1#{} Chips and {C:money}-$#2#{} if",
"the sum of all scored cards",
"is exactly 14"
}
},
config = { extra = { money = 10, chips = 14, handsum = 0, current_dollars = 0 } },
loc_vars = function(self, info_queue, card)
return {vars = {card.ability.extra.chips, card.ability.extra.money, card.ability.extra.handsum}}
end,
atlas ='Unegi Khard',
pos = {x = 0, y = 0},
rarity = 1 ,
cost = 3 ,
calculate = function(self, card, context)
if context.before then
local temp_handsum = 0
for i=1, #context.scoring_hand do
temp_handsum = temp_handsum + context.scoring_hand[i].base.nominal
end
card.ability.extra.handsum = temp_handsum
card.ability.extra.current_dollars = dollars
sendInfoMessage("Handsum: " .. card.ability.extra.handsum, "MyInfoLogger")
if card.ability.extra.handsum == 14 then
return {
message = 'Unegi Kha!',
colour = G.C.CHIPS
}
end
end
if context.joker_main and card.ability.extra.handsum == 14 then
return {
chip_mod = card.ability.extra.chips,
message = localize { type = 'variable', key = 'a_chips', vars = { card.ability.extra.chips } }
}
end
if context.after and card.ability.extra.handsum == 14 then
return {
dollars = -card.ability.extra.money
}
end
end
}
SMODS.Enhancement {
name = "Wigglytuff Card",
key = 'Wigglytuff Card',
pos = { x = 1, y = 0 },
replace_base_card = true,
no_rank = true,
no_suit = true,
config = {x_mult= 0.5, bonus = 25}
}
No, I meant what do the 1x and 2x folders look like?
oh
to make played kings turn into queens
its in an assests folder and then 1x and 2x
Then you would use context.full_hand
doesn't shuffle() just yk, randomize the location of each card? How would that unflip the card here? shouldn't I hook one of the functions actually used in the function, like sort() or emplace()? Although i can't seem to find definitions for those functions, so that might be a little challenging
Have you tried removing the spaces?
no
yeah you really shouldn't have spaces in file names if they are supposed to be loaded by a program
why is that
screws with things
i see
Wait no, the problem is you put enchancement instead of enhancement
oh my goodness
No, I mean for putting the card at the top of the deck.
my error was a typo thats funny
ill fix the spaces as well
thanks all (i dont know coding at all and this is very difficult, but i wanna make balatro mods), and i dont really have a lot of folks in my life who know code so much appericated
im having some issues with cryptid can yall help me out if its not any trouble
long story short the mod isnt saving my runs
bump
Remove local btct_DEvil_dt = 0 inside the hook.
Oh ok thanks
so uhhhh can someone help me with this
im trying to make played kings turn into queens
if context.other_card:get_id() == 13 then
return{
assert(SMODS.change_base(card, nil, 'Queen'))
}
end
end```
if context.before then
for k, v in pairs(context.full_hand) do
if v:get_id() == 13 then
SMODS.change_base(v, nil, "Queen")
end
end
end
what are k and v in this context
k is the index of the card in the table and v is the card.
awesome sauce thanks
wait how is this supposed to work? What am i even doing here lmao
local shuffle = CardArea.shuffle
function CardArea.shuffle(self, _seed)
local headliner_fix = SMODS.find_card("j_mode_headliner_fix")[1]
if headliner_fix and headliner_fix.ability.extra.pinned_card then
for i, c in ipairs(self) do
if c.sort_id == headliner_fix.ability.extra.pinned_card then
local original_card = self[1]
self[1] = c
self[i] = original_card
end
end
end
CardArea:shuffle(_seed)
end```
You would just replace checking if the seal is blue for checking if the cards sort_id matches the one you stored.
This does not work, and I don't know why: lua local oldshuffle = CardArea.shuffle function CardArea:shuffle(_seed) local headliner_fix = SMODS.find_card("j_mode_headliner_fix")[1] local g = oldshuffle(self, _seed) if self == G.deck and headliner_fix and headliner_fix.ability.extra.pinned_card then local priorities = {} local otherones = {} for k, v in pairs(self.cards) do if v.sort_id == headliner_fix.ability.extra.pinned_card then table.insert(priorities, v) else table.insert(otherones, v) end end for _, card in ipairs(priorities) do table.insert(otherones, card) end self.cards = otherones self:set_ranks() end return g end
It's not seeing the pinned card despite the fact that the joker is definitely saving it
like, headliner_fix.ability.extra.pinned_card is returning nil and I dont know why
still dont work
How are you setting the pinned card?
Also is the key correct?
local upd = Game.update
local btct_DEvil_dt = 0
function Game:update(dt)
upd(self, dt)
local DEvilobj = G.P_CENTERS.b_btct_DEvil
DEvilobj.pos.x = 0
if G.P_CENTERS.b_btct_DEvil and btct_DEvil_dt > 0.1 then
if math.fmod(btct.ticks,12) == 0 then
local DEvilobj = G.P_CENTERS.b_btct_DEvil
if DEvilobj.pos.x > 30 then
DEvilobj.pos.x = 0
else
DEvilobj.pos.x = DEvilobj.pos.x + 1
end
end
end
end
this still doesnt work? is there any other code i need to do?
SMODS.Joker { -- Headliner Fix
key = "headliner_fix",
unlocked = true,
discovered = false,
atlas = "ModeJokers",
rarity = 3,
pools = {
dank = true
},
config = { extra = { pinned_card = nil}},
blueprint_compat = false,
eternal_compat = true,
perishable_compat = true,
cost = 8,
pos = { x = 0, y = 0 },
loc_vars = function (self, info_queue, card)
end,
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play and not context.blueprint then
if (#context.full_hand == 1 and G.GAME.current_round.hands_played == 0) then
card.ability.extra.pinned_card = context.other_card.sort_id
print(card.ability.extra.pinned_card)
end
end
if context.end_of_round then
card.ability.extra.pinned_card = nil
end
end
}```
yes?
Yes, because CardArea:shuffle() happens at the end of the round.
Oh, well yeah thats why I said its a joker that pins it and posted the joker code in the first place.
you need to increase btct_DEvil_dt too dawg
I swear its supposed to be there, i have it inside the else statement is that right?
btct_DEvil_dt = btct_DEvil_dt + dt directly in the hook.
or G.real_dt if you dont want the animation to be affected by game speed
Ah i see thanks
Ill just use the other cause i think its funnier stopping cause of calculations
ok so now it just crashes cause of btct on this line if math.fmod(btct.ticks,12) == 0 then
btct doesnt exist
what should i set it to? a number? a string?
ah ok thanks
local btct = {ticks = (12)}
local upd = Game.update
local btct_DEvil_dt = 0
function Game:update(dt)
upd(self, dt)
local DEvilobj = G.P_CENTERS.b_btct_DEvil
DEvilobj.pos.x = 0
btct_DEvil_dt = btct_DEvil_dt + dt
if G.P_CENTERS.b_btct_DEvil and btct_DEvil_dt > 0.1 then
if math.fmod(btct.ticks,12) == 0 then
local DEvilobj = G.P_CENTERS.b_btct_DEvil
if DEvilobj.pos.x > 30 then
DEvilobj.pos.x = 0
else
DEvilobj.pos.x = DEvilobj.pos.x + 1
end
end
end
end
like this?
Cause it dont work
whats the purpose of that math.fmod line?
Idk got it from a mod?
you dont need it
local upd = Game.update
local btct_DEvil_dt = 0
function Game:update(dt)
upd(self, dt)
local DEvilobj = G.P_CENTERS.b_btct_DEvil
btct_DEvil_dt = btct_DEvil_dt + dt
if DEvilobj and btct_DEvil_dt > 0.1 then
if DEvilobj.pos.x > 30 then
DEvilobj.pos.x = 0
else
DEvilobj.pos.x = DEvilobj.pos.x + 1
end
end
end
this is all you need
-# im lazy to fix the indentation on discord, so you do it yourself
small question: why does the edition name give me error even if I put a label?
Oh ok thanks
idk much about this but have you tried adding label = "..." in the enhancement
i mean edition
doesn't the doc say that you don't put the "e_" prefix?
at least for the label I mean
I tried like this but it still gives me error
hm
im sorry but i havent made an edition before, so i have no clue on this one ðŸ˜
i would probably suggest checking other mods that have added an edition and do what they did
good luck, sorry for not being able to help
so, it changes whenever i change into it but not constantly? how can i fix this?
-# sorry idk how to do anims
changes whenever i change into it?
oh yeah, you want to reduce btct_DEvil_dt by 0.1 too
local upd = Game.update
local btct_DEvil_dt = 0
function Game:update(dt)
upd(self, dt)
local DEvilobj = G.P_CENTERS.b_btct_DEvil
btct_DEvil_dt = btct_DEvil_dt + dt
if DEvilobj and btct_DEvil_dt > 0.1 then
btct_DEvil_dt = btct_DEvil_dt - 0.1
if DEvilobj.pos.x > 30 then
DEvilobj.pos.x = 0
else
DEvilobj.pos.x = DEvilobj.pos.x + 1
end
end
end
cause cryptid does it with glowing deck so idk
HOLY SHIT I JUST FIGURED IT OUT
Misc for some reason MUST be outside of "descriptions"
are you sure they dont have any other code besides that
congrats
:3
the code for where animation happens i think is very long but the code mentioning glowing deck is not
Someone must mention this in the doc btw
give me a ss
ignore the amount of tabs
woops i guess i didnt see
would i just copy paste that and change names?
yes
local btct = {ticks = (1)}
local upd = Game.update
local btct_DEvil_dt = 0
function Game:update(dt)
upd(self, dt)
local DEvilobj = G.P_CENTERS.b_btct_DEvil
btct_DEvil_dt = btct_DEvil_dt + dt
if DEvilobj and btct_DEvil_dt > 0.1 then
btct_DEvil_dt = btct_DEvil_dt - 0.1
if DEvilobj.pos.x > 30 then
DEvilobj.pos.x = 0
else
DEvilobj.pos.x = DEvilobj.pos.x + 1
end
end
end
for k, v in pairs(G.I.CARD) do
if v.children.back and v.children.back.atlas.name == "btct_DEvil" then
v.children.back:set_sprite_pos(G.P_CENTERS.b_btct_DEvil.pos or G.P_CENTERS["b_red"].pos)
end
end
still doesnt work?
ah i see thanks but it still doesnt work 
might have to postpone animations for now, it works its just not updating constantly
can you take a ss of the atlas
it should be "btct_DEvilAtlas" then
oh i keep the btct
cause i just changed the atlas to make it different from the actual deck
still nope
let me know if you still need help with this! I think I did that by messing around with info_queue, not with generate_ui
what do you want to do?
keep in mind not calling the original generate_ui just leaves you with an empty box without the name or description so it doesn't start it from scratch, you would still do the same stuff I do in my mod
if you need to generate an entirely different UI you would need to hook/patch other functions
where did you change it
seems like it should work if you change it properly
Same lua file of decks
i know, which part of the code did you change it though
On the back.atlas.name
It now says v.children.back.atlas.name == "btct_DEvilAtlas" then
ah, i see
Yes, it would be v.children.back.atlas == G.ASSET_ATLAS["btct_DEvilAtlas"] then
I see thanks ill try tomorrow cause i havent slept yet lol ðŸ˜
Guys, where i can find info about the contexts things?
Is it possible to check for specific jokers? Like if I wanted to specifically check if Ride the Bus was in hand
SMODS.find_card([key]) should return a table of all jokers owned with the given key
and you can do next(SMODS.find_card([key])) to check if there are any.
next(SMODS.find_card('j_ride_the_bus')), in this case.
shouldnt table.clone make it so whatever i do to new_effect wont affect ExtraEffects?
Sweet!
It depends on the table you're copying. If the table you're copying has any nested tables then those will still reference the original table.
Recursively call the function if the given value is a table... but also ensure that it doesn't end up in an infinite loop either.
It looks like the Balatro source code already has a copy_table() function, have you tried that?
It's recursive, so like Ali said it should work in your case
smt like this, i assume?
I had my own recursive "go through" recursive function, but it is no longer present as of 1.8.x as the Joker that used it has been changed.
balatro modders making a fifteenth copy table function
oh interesting, i will check that later
-# tbh, mine wasn't a "copy" table, just find numbers and increase them.
not to be overly critical but wouldn't this be one off since argument 1 (target) is not in tables_to_merge
okay tbh that is overly critical my bad
Actually, makes sense
can i replace the game's background shader with a custom one ?
key = 'back',
order = 0,
func = function(self)
if self.area and self.area.config.type == 'deck' then
self.children.back:draw(G.C.WHITE)
return
end
local use_delta = false
if self.config
and self.config.edition
and self.config.edition.key == 'delta'
then
use_delta = true
elseif rawget(self, '_absolute_deck') then
use_delta = true
end
if use_delta then
self.children.back:draw_shader('aao_p_delta')
if not sxeif.delta_overlay_sprite then
sxeif.delta_overlay_sprite = Sprite(
0, 0,
G.CARD_W, G.CARD_H,
G.ASSET_ATLAS['aao_p_soul'],
{ x = 0, y = 0 }
)
end
sxeif.delta_overlay_sprite.role.draw_major = self
sxeif.delta_overlay_sprite:draw_shader(
'dissolve',
nil, nil, nil,
self.children.back
)
else
self.children.back:draw_shader('dissolve')
end
end,
conditions = {
vortex = false,
facing = 'back',
},
}```
@hushed field this is how i draw shader and sprite on back
_absolute_deck is my variable to attach the buttons
I see! Let me parse it all in a sec, after I finish a call for work, haha
aao_p is my mod prefix
sorry for 0 commments it's not a finishedd product and i'm working alone so
How could I edit this so it shows a joker?
G.deck.cards[#G.deck.cards] and {n = G.UIT.O, config = {align = "cm", object = Card(0,0, 0.5*G.CARD_W, 0.5*G.CARD_H, G.P_CARDS[G.deck.cards[#G.deck.cards].config.card_key], G.P_CENTERS['c_base'])}} or nil,
Replace the Card in object
For example try G.P_CENTERS['j_joker']
instead of c_base
Oh wait, I thought I would need to replace everything, thank you
you would make the p_cards part nil as well iirc
unless you want the joker to also be a playing card lol
No, I don’t think it should be one lol
Thanks again
I just realized it should be a consumeable, whats the prefix for a consumable, unless I use its key if its a custom one like what im doing
c_
Oh... woops hehe....
one last question for now, how would I make this two description boxes?
loc_txt = {
["name"] = "Pliers",
["text"] = {
[1] = "You {C:mult}tear{} out a tooth. The {C:mult}pain{} dulls your {C:mult}focus{}. {X:chips,C:white}X0.5{} chips for the rest of this {C:mult}Ante.{}",
[2] = "Summons the following Pulled Tooth:"
}
},
are these both they key and order that you tested this with? And the issue was that the png you were drawing disappeared immediately, right?
no this works just fine , tho if i remove the facing ="back" from condition and put it in the if to draw something diffrent is the face , it won't work
can i apply stickers on playing cards ? or do i need to patch it btw
Yes, they work out of the box, stickers are really just sprites
but the way stickers work is that they just draw a sprite using the drawstep
great that helps
Why are you using back and front as keys, though? Is there a reason as far as editions go that make it necessary to overwrite the whole step?
can i make a new gameobject or something that i can apply to both jokers and playing card
yeah, but again, I'm not sure why you'd actually go about it that way. If you add a new game object, you're back at having to mess with drawsteps again, anyway
lol ,i just want to escape it
From what I understand, you can just set this up using a new key and a slightly higher order, I don't really see why you'd need a new gameobject, or dummy sticker.
is there an order for edition shader ?
I think you're just making it more complex by using the specific 'back' and 'front' keys
yes, but I'm also not sure you'd need to use that
so just use one draxstep
okay sure
Just so I'm sure I'm understanding, you're just needing to make it so there's a png on the back of a card if it has a specific edition applied, right?
that's all you wanna do?
on the back and front
when it's facing front the front png gets drawn and when on the back the back one gets drawn instead
same process, two separate drawsteps. Shouldn't be more difficult than just doing either
i see
All that needs is a new drawstep for each side with a priority between 0 and 10. It should be as easy as just applying the png as a child object
btw do i need to do patches to mess with some joker variables ? , like increasing or decreasing
ope
oh yeah
Well, depends
The way I do it, no, but my system can't interact with vanilla cards. Cryptid's does do some patching, iirc, but just minor stuff. The main issue is figuring out how you wanna deal with the design elements and storing the values.
thanks for the help ice i'll let you know how it went
do you recommend i just look into cryptid's code or just figure it out myself
https://github.com/icyethics/Kino/blob/v0.10_dev/items/Enhancements/superhero.lua
btw, this is for my superhero enhancement, which places a sprite on the top of the card. Would work the same for the back, but it would need to have some strings swapped around
Basically none of that code is necessary in your case, as it's all just to make the sprite have a shadow and hover
i see
depends on what your exact needs are. I suspect Ruby might have reworked it quite a bit since I last looked at it, but I'm personally not a fan of how Cryptid does it. I do recommend checking that code, though, because the way the system works is by hardcoding values that you don't wanna manipulate, so a lot of the vanilla values are in there
oh that's how they do it
It's the most freely compatible way to set that up. Will still mess up some modded jokers, but it works unless there's exception. The issue you get with it is that is that the value manipulation messes with the core way scaling jokers and timed jokers work
Cryptid's fine with changing that, but it's something to consider. Part of why I changed how my system approaches it, though the cost of that is that it can't deal with jokers from other mods
i see
i think i have an idea , i'll have to look at the code and judge tho
i'll get to fixing the drawstep
thanks again ice , your help is very appreciated
I'd see if Ruby has insights in the value manipulation stuff. I think it's a decent system that Cryptid uses, but I'd hate to see that be the default that all mods use 😛
I loathe how it messes with timed jokers, probabilities and stacked values, haha
i have so many tabs open its insane lmao
loc_txt = {
["name"] = "Pliers",
["text"] = {
{
"You {C:mult}tear{} out a tooth. The {C:mult}pain{} dulls your {C:mult}focus{}. {X:chips,C:white}X0.5{} chips for the rest of this {C:mult}Ante.{}"
},
{
"Summons the following Pulled Tooth:"
}
}
},
Good schmorning chat
hi willy
yo dillster
im doing well ty
hbu
Im just waking up but it feeling alright
Got myself paid so im chillin
Gonna spend like 150 to buy my gf a controller and elden ring cause she wants to do that together
let's goo
Thank you
She's been struggling in nightreign but I figure maybe doing the base game together will help teach her how to freaking roll
I also might buy Detroit become human and until dawn myself
Both have been on my list for awhile
is card.ability.h_size used for anything? 
juggler and merry andy
I am making a challenge mod where you can't level up hands, so I am trying to ban anything that can do that. But I seem to be unable to figure out how to ban blue seals
and also I can't figure out how to ban specific skip tags
skip tags should be pretty easy, a lot of vanilla challenges do that
you just add a banned_tags table to restrictions
What about blue seals?
I would hook SMODS.poll_seal
all the challenges that force certain enhancements in your deck just ban EVERYTHING that creates or changes enhancements so you would have to do some shenanigans i imagine
there's also a PR I made to smods to manipulate pools but that's not merged yet
What does this mean?
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...
you would change how the function works so it doesn't return blue seals
how can i make a joker retrigger other jokers
i can only return { repetitions = 1 } from context.repetitions if i want repetitions to work, right?
is context.cardarea == G.jokers valid for context.repetitions?
oh, it must be, otherwise red seal joker implementations wouldn't work~
Can someone help me get my label working, i know there was a way to do it without a localization file
SMODS.ConsumableType({
key="Flesh",
primary_colour = G.C.RED,
label = 'Painful',
secondary_colour = G.C.RED,
loc_text = {
label = 'Painful',
collection = 'The horrors', -- label for the button to access the collection
undiscovered = { -- description for undiscovered cards in the collection
name = 'Unknown',
text = { 'Sacrifices need to be made.' },
},
},
collection_rows = { 6, 6 }
})
you need to enable the optional feature too
ok, before I try to figure out hooking is there a way I can paste the liste of restrictions I wrote to get a sanity check to see if I forgot a way a hand can be leveled up?
it's name not label
wait i thought hooking was some hard shit is it literally just changing a function just like a variable ðŸ˜
yeah in lua functions are first class objects or whatever nerds call it
wont hooking mess with other mods trying to hook the same function?
It still shows up as error, or is the name supposed to be outside of the loc_txt
Yeah I do only want to ban blue seals in the challenge not in the rest of the game
no, when you hook something it also stores all previous hooks because they're basically part of the function now
you would check if you're in your challenge in the hook
me when people don't trust my advise
sanity check, context.other_card.config.center.key would be the key of the other joker being looked at during context.retrigger_joker_check, right?
yes
when its inside or outside the loc_txt, it still shows ERROR
can i see
oh yes, 1s
What is the best way to paste my restrictions table for a sanity check?
code im assuming
what i would do is add a check to poll_seal (and optionally poll_enhancement and poll_edition) to only roll things that arent in G.GAME.banned_keys
wait, 1s, i think i made a mistake
yes
SMODS.ConsumableType({
key="Sacrifices",
primary_colour = G.C.RED,
secondary_colour = G.C.RED,
name = 'Sacrifices',
loc_text = {
name = 'Sacrifices',
collection = 'Sacrifices', -- label for the button to access the collection
undiscovered = { -- description for undiscovered cards in the collection
name = 'Unknown',
text = { 'Sacrifices need to be made.' },
},
},
collection_rows = { 6, 6 }
})
loc_txt
Before I try to figure out blue seals, did I ban every other way of upgrading hands?
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
What why
because
if nothing in a pool can spawn
itll spawn the default card instead when it tries to spawn
which for planets is pluto
Basically the gane doesn't check all cards individually but in pools, so when it tries to spawn a Planet it will do that
is there a better way to ban all planets?
ok, so I get rid of all the planet cards in my banned list and then where do I add G.Game.planet_rate=0 ?
you would need to do it in a hook or patch in Game:start_run i think
OR wait to see if this gets merged and do it in apply()
https://github.com/Steamodded/smods/pull/846
ok, so I need to figure out hot to do a hook for planet cards and for blue seals. idk why I thought this would be an easy mod to start out with
planet cards doesnt need a hook i think
just do the same as jokerless
but with planets
I'm having trouble with "SMODS.is_eternal". Whenever I try to use it the game crashes, saying "is_eternal" is a nil value. Is there a global fix, or do I have to fix each instance individually?
sadly challenges are pretty hardcoded
so (right now) you need to do stuff in hooks
that's why i did that PR yesterday
what version of smods
oh right this must have been changed with context.probability changes 
what am i doing wrong here
how do i change this call
Oh my god PLEAAAAASE
Ah, that makes sense
I’d be able to get rid of so many patches with this
1.0.0-beta-0614a, would updating fix it?
yes
ok, i'm going to fiddle for a bit but I am sure I will be back with more questions. Thanks everyone for your help
jokerless is hardcoded, you would need to patch here (not necessarily in the same place it can be later)
thx
what arguments does SMODS.poll_enhancement actually take?
the ones in the docs :3
where is it in the docs...
ah