#💻・modding-dev
1 messages · Page 601 of 1
yeah i did
well
actually no i did it differently
but it works flawlessly as far as i can tell
No, you should hook Card:calculate_seal
Guys im tryna do cerimonial dagger as an enhancement but it's softlocking the event is not triggering just once, pls help
local my_pos = nil
for i = 1, #G.play.cards do
if G.play.cards[i] == card then
my_pos = i
break
end
end
if context.full_hand == 1 then return end
if context.cardarea == G.play and my_pos and G.play.cards[my_pos + 1] and not SMODS.is_eternal(G.play.cards[my_pos + 1], card) and not G.play.cards[my_pos + 1].getting_sliced then
local sliced_card = G.play.cards[my_pos + 1]
context.destroy_card = sliced_card
sliced_card.getting_sliced = true
G.E_MANAGER:add_event(Event({
func = function()
card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmult_mod
card:juice_up(0.8, 0.8)
sliced_card:start_dissolve({ HEX("57ecab") }, nil, 1.6)
play_sound('slice1', 0.96 + math.random() * 0.08)
end
}))
if context.individual then
return {
xmult = card.ability.extra.xmult
}
end
end
end```
you cant tell me to do something different if it works
im not gonna rip out perfectly fine code to do it the way you did it when nobodys gonna be able to tell the difference
you need to return true in the event
also you need a context check other than just the cardarea since this will trigger in a lot of unintended places i imagine
there are some other context checks
oh also you should do context.fullhand <= 1 not == 1
because. cryptid
missing a #
and yeah
that
also i dont see the point in doing the played hand size check like that, not exists for a reason
yeah you're right but i was tryna fix the softlock first
xmult is not triggering tho
yes, you need to use context.main_scoring for playing cards
in both?
both what
before return xmult and before the slice event i mean
you need to replace context.individual with thgat
and for the destroying of the card which context should i check other than g.play
probably use context.before
idk if that gets calculated for playing cards but its worth a shot
since using main_scoring for that will make it get retriggered
my mod does not fuck with talisman btw
i don't know how to code and i was getting a lot of comparing table with number errors
mods dont work with talisman by default
you need to do like a bunch of extra stuff because talisman turns a lot of numbers into tables
you can add an incompatibility thing in your json file
i guess i'll get into that
vanillaremade wiki has a thing about talisman all the way at the bottom
i'm making a huge content mod so i've been busy with a lot of stuff
i'm the only developer
tnx
well this seems easy enough except that i need to add to_big to every comparison
and i have like 50 jokers and a lot more
its more tedious than anything
yeah
good thing vscode allows you to search in all files so you can just search for < and >
didn't know that it'll be useful
when the e shop goes up to e
wow i just got an attempt to compare table with number crash
without talisman
and i just added the contexts and the <= 1
yeah thats probably because it should be #context.full_hand
because context.full_hand is a table of cards
okay
xmult is still not triggering with context.main_scoring tho
ok i just removed the context and it's working
jk it's triggering too early
ok fixed it finally
so true
the enhancement destroying the cards is causing this bug,,, how do i fix
Code?
key = "cazzimma",
atlas = "enhancements",
unlocked = true,
discovered = true,
pos = { x = 2, y = 0 },
config = { extra = { xmult = 1, xmult_mod = 0.2 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.xmult, card.ability.extra.xmult_mod } }
end,
calculate = function(self, card, context)
if context.cardarea == G.play then
local my_pos = nil
for i = 1, #G.play.cards do
if G.play.cards[i] == card then
my_pos = i
break
end
end
--if #context.full_hand <= 1 then return end
if context.before and context.cardarea == G.play and my_pos and G.play.cards[my_pos + 1] and not SMODS.is_eternal(G.play.cards[my_pos + 1], card) and not G.play.cards[my_pos + 1].getting_sliced then
local sliced_card = G.play.cards[my_pos + 1]
context.destroy_card = sliced_card
sliced_card.getting_sliced = true
G.E_MANAGER:add_event(Event({
func = function()
card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmult_mod
card:juice_up(0.8, 0.8)
sliced_card:start_dissolve({ HEX("57ecab") }, nil, 1.6)
play_sound('slice1', 0.96 + math.random() * 0.08)
return true
end
}))
end
if context.main_scoring then
return {
xmult = card.ability.extra.xmult
}
end
end
end
}```
set = pseudorandom_element({'Spectral', 'Planet'}, 'seed')
Use SMODS.destroy_cards(sliced_card, nil, true) instead of sliced_card:start_dissolve()
whats the name for buffoon set?
Joker
👌
it's still doing the same bug
Code?
key = "cazzimma",
atlas = "enhancements",
unlocked = true,
discovered = true,
pos = { x = 2, y = 0 },
config = { extra = { xmult = 1, xmult_mod = 0.2 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.xmult, card.ability.extra.xmult_mod } }
end,
calculate = function(self, card, context)
if context.cardarea == G.play then
local my_pos = nil
for i = 1, #G.play.cards do
if G.play.cards[i] == card then
my_pos = i
break
end
end
--if #context.full_hand <= 1 then return end
if context.before and context.cardarea == G.play and my_pos and G.play.cards[my_pos + 1] and not SMODS.is_eternal(G.play.cards[my_pos + 1], card) and not G.play.cards[my_pos + 1].getting_sliced then
local sliced_card = G.play.cards[my_pos + 1]
context.destroy_card = sliced_card
sliced_card.getting_sliced = true
G.E_MANAGER:add_event(Event({
func = function()
card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmult_mod
card:juice_up(0.8, 0.8)
SMODS.destroy_cards(sliced_card, nil, true)
play_sound('slice1', 0.96 + math.random() * 0.08)
return true
end
}))
end
if context.main_scoring then
return {
xmult = card.ability.extra.xmult
}
end
end
end
}```
Does this function work for other Booster Packs?
(omen globe effect)
mixing the pool of the booster pack
i think that doesn't randomize the pool inside the pack, it selects a random pool before and then sticks to that
like you'd have one pack with only jokers and one with only spectral ec
it does
i tested
i can share you a function that i used to randomize pools but it's probably garbage code (even tho it works for me)
that be great

my mod prefix is napoli so you'd need to change that possibly
this is an external function btw i just return G.GAME.modifiers.napoli_pool_shuffle_active = true when i need it
I just want to ask first if its possible to make this function have multiple sets as the first value:
cuz if its possible then it would work just with this piece of code
currently it works if I only type in 'Arcana'
What is the goal?
Make all packs be able to generate any consumable
full pool mix
basically
Hook CardArea:emplace and check if the area is G.pack_cards then set the card to a random consumable.
Hook?
like add to the main.lua?
Should I use an entire new piece of code and scrap what ive sent?
How can I change blind requirement when i use a deck ?
@daring fern if i continue destroying cards deck starts saying like 60/48, like if the cards were destroyed but still count in the deck and take phantom space in hand
G.GAME.blind_chips =
Wait, hold on
does SMODS.Booster:take_ownership_by_kind specifically works only on Arcana packs?
nvm
in calculate = function(self, back, context) ?
No, it just wont work on all booster packs if you take ownership of only those.
What is the goal?
i want that when i play with my deck the blind requirement is X0.1
ante_scaling = 0.1 in the config.
ok last stupid question: what's the set for Standard packs?
thank you!
I only know Joker, Planet, Tarot, Spectral
what playing cards are called?
Hi chat. Is there a way to do this but also with custom stickers?

trying to add a new consumable set
and the name shows up correctly
but not the badge color
stickers = {'modprefix_key'}
Base and Enhanced
thanks!
Yay! everything works now :D
I used "Playing Card"
and it includes both base and modified
?
I think L' really wanted deck of equilibrium to be funnier
🤫 its a suprise
This no worky
its like some king of erratic pack from hypernova (play hypernova)
why should I
i need to shill my mod
"Celestial"
Meanwhile there is a joker, 2 playing cards and a ??? in the pack.
its a funny deck
Showman taken to the next next level
Can I get some help here, please?
hey so I want to make a balalo mod but I have a whopping 5 minutes of experience with them (but I do have a lot of minecraft modding experience), basically I want the mod to
- greatly increase caps on hermit/temperance (like 3x)
- make all the spectrals have same chances, so soul would be just as common as aura
that's probably it I just wanna have more fun
and I have no idea how to do that, any help at all would be appreciated
hold on why is canio called caino in the code
epic prank
thunk moment
wait until you find out that the key for seltzer is selzer
and gluttenous_joker for gluttonous joker
no stop it
caino
I still dont know why the hell the color badge isnt correct for the damn consumable set
and that consumable is spelled "consumeable" literally everywhere
anyway I think I found where the values are (game.lua init_item_prototypes line 547 or so), but I tried doing
Game.P_CENTERS.c_hermit.config.extra = 100;
Game.P_CENTERS.c_temperance.config.extra = 100;
and it crashed saying P_CENTERS was null
G.P_CENTERS
Also consumable descriptions doesnt appear for the operator cards
also if you want to change the function of an existing card its usually better to use take_ownership https://github.com/Steamodded/smods/wiki/API-Documentation#taking-ownership
alr
IT WORKS
that was too easy
anyone know of a mod that has an effect that makes certain ranks count as other ranks i could take a look at the code for
multiplayer gradient deck
ortalab has index cards that do that
i havent looked at it but i can tell you that its probably very complicated
since the current system for checking ranks doesnt allow for it very easily
ok thanks. i think there is a hacky less complicated way to do it that would have bad interactions with any rank choosing joker
its probably easier if youre making a card count as only one different rank that replaces the normal one
but multiple ranks is like hard
the two effects im trying to make are King + Queen can be paired/3oak/4oak/5oak and maybe also letting all face cards do that but the latter might be biting off a little more than i can chew
Why do I get this crash?
key = "mirror",
shader = "cstorm_mirrorShader",
in_shop = true,
weight = 3,
extra_cost = 5,
badge_colour = G.C.CSTORM.GREY,
--sound = { sound = "cstorm_static1", vol = 0.7 },
calculate = function(self, card, context)
if card.debuff then
SMODS.debuff_card(card, "prevent_debuff", "source")
if self.ability.set == "Joker" then
local RNGesus = pseudorandom_element(G.jokers.cards, "mirrorReflect", not card.debuffed)
SMODS.debuff_card(RNGesus, true, "mirrorEdition")
end
end
end
}```
I genuinely cannot track down the problem
because self.ability doesnt exist
Everything looks like it should work
sorry to interrupt again but I think I found the code that needs changing, I just want to remove that big if not forced_key and soulable... I think? Either removing that makes it not appear at all or appear normally, can't tell
self is the edition prototype as defined in SMODS.Edition, card is the actual card object
How do I get the set then?
card.ability.set
actually screw this how can I change the 0.997s here to 0.5s?
pretty sure smods changes how this works from the base game
oke
since mods can add other hidden consumables
alr more code digging time
you should check lovely/dump from your mods folder
that has the code after lovely patches
if you do that every soulable card will have a 50% chance to be the soul
Okay and how do I make sure that the card from pseudorandom_element isn't debuffed?
what is it even supposed to do
i'm pretty sure you'd end up with a 99.968% chance to find the soul in any mega arcana pack
that's close enough to what I want (for testing at least)
so heres the tweaked version from lovely/dump, now how do I change the constants?
If the card with this edition would get debuffed, it instead reflects it on a different card
use lovely patches to reduce the 0.997s and v.soul_rate
alr ty
chat
the documentation in the multiplayer mod is a work of art
check the documentation of the cardsleeves github
So how would I make sure that the card from pseudorandom_element isn't debuffed?
theres documentation?
neat
was this worth the effort i put into it given it's a common food joker? yes someone could scale it using some other joker from some other mod and turn it into a shit ton of xmult. granted theres way better jokers to do that with but still it's what i'm telling myself
Pattern '0.997' on target 'functions/common_events.lua' for pattern patch from uncapped\lovely.toml resulted in no matches
and my lovely.toml file:
[manifest]
version = "0.1.0"
priority = 10000
[[patches]]
[patches.pattern]
target = 'functions/common_events.lua'
pattern = '0.997'
position = 'at'
payload = '0.5'
match_indent = true
anyone know how to fix?
the docs say you can only do it on whole lines which is an annoying restriction
but multiplayer also touches that exact line and I want multiplayer as well
go check in the lovely dump for how the line looks after multiplayer patches it, and then you can use that as your target
ykw thats a good point
yo pog it works
time to have some big fun
finally my first soul in 5 months (not a joke)
ante 6, looks about right
tho the blueprint/brainstorm/baron (was ecto-d) were completely natural
actually what if ecto didn't decrease hand size
How do you debuff a card with DebugPlus?
Joker or playing card?
Joker
Does anybody know where I can find the specifc card ids of all playing cards
It goes from 2 to 14 with 14 being ace and 2 being 2
Im trying to make a operator that takes the bitwise or between chips and mult, but it crashes on line 24 about trying to compare a table with a value even though im only putting in chips and mult into the function
i’m bored if any mod developers need help with joker ability ideas pls message me
-# ...are you using Talisman?
nah afaik
what's the crash
the crash was because you had a # there, which gives the length of the table
nah i added that cuz it was crashing but then i removed it when doin this fix
this modification causes every discarded card to draw two more cards when held in hand in any way; i just want it to draw cards when it itself is discarded
...
calculate = function(self, card, context)
if context.discard then
SMODS.draw_cards(card.ability.extra.card_draw)
return {
message = "+" .. tostring(card.ability.extra.card_draw) .. " Cards Drawn",
colour = G.C.BLUE
}
end
end
...
if context.discard and context.other_card == card
ty
is there a way to have it so you can change what suit a blind debuffs mid round
i know how to check for contexts in that regard ofc im just wondering how i can change the value and it actually Show ig
as adjusting blind.config.blind.debuff.suit or self.debuff.suit within the blind's calculate dont seem to work
Sorry I keep coming back to this, its just this 1 card giving me troubles at the moment. Since context.end_of_round does not go off until the end of a PVP and theres no cards if 1 person does all their cards 1st, I figured out I'd need to set an else if for if its the final hand and once thats done scoring. Would there be a way to do this??
I ask again, is there a way to create cards with modded stickers for challenges?
can a joker check that it actually destroyed a joker
when its trying to destroy a joker
you can maybe check in a later context
I guess N' will answer faster than me.
or an event
currently destroying it like this
and i want to like use it to make a counter go up if it destoys smth
like the issue is that the check for a joker being destroyed or not is exclusively done by what's destroying it in regular circumstances, so any joker that doesn't get destroyed is either because some modded shenanigans or the new smods context
actually, can i just check if something is eternal
that'd probs works
if card.ability.eternal then ... end
Do note that that only checks for the eternal sticker.
Not eternal-like effects.
I think smods added something like that
theres probably code in ceremonial dagger for that kinda stuff
yea found it
does anyone know why my tarot card image is missing
i defined the atlas properly and referenced said atlas in the declaration
and i have images in both the 1x and 2x folders
show your full atlas image, indicate which one is supposed to appear for the card, and then show the tarot card's full code
Trying to learn some stuff so I'm messing around with making weird jokers. Making one that has a 1/2 chance per scoring card to either make the card lucky, or if its already lucky to destroy it. The random chance to make it lucky is working properly, but I'm having trouble getting it to kill the lucky cards
Anyone have a code example of deleting a card after scoring? Or an idea of what that might look like
Essentially treating it like a glass card that has rolled the RNG to shatter after the hand is scored
have you checked the code for glass cards
Yeah I've looked at it but I might need to more
sixth sense scores a card before destroying it
and i assume your image file is named exactly clagiri.png in both the 1x and 2x folders?
So far I've been able to get by by either finding a directly related joker or frankensteining several parts of different jokers for whatever I'm trying to do
I'm knowledgeable on programming but totally new to anything lua
yes
For this specific joker I've been stealing from Midas Mask for the turning them lucky and was attempting to look at trading card/glass for the card removal
i actually used this image elsewhere
it's a placeholder for this one
and it works fine there
And 8 ball for random events triggered on scoring
strange
does anyone know how to apply eternal to a joker via a joker effect
card.ability.eternal = true adds the sticker onto it but does not give it sell or destroy immunity
Are you putting it on a joker that is not compatible with eternal?
Yes, cards don't count as having eternal if they are not eternal compatible.
Is there a quick way to test jokers that you're working on?
Yes, DebugPlus
Alright I've gotta figure that out
I wasn't doing it before because I've mostly been doing this recreationally but I wanted to make this joker I'm working on uncommon and I don't want to deal with actually finding his ass in my run
Plus he's weird and I want to test him against various situations
Idk what I did exactly but he now seems to annihilate every single lucky card both in hand and scored
what's the code
I think I've fixed that particular bug, but if it works the way I currently expect it to, it's still not quite right
context.destroy_card doesn't happen in context.before
oh wait it's indentation issues
Yeah really still trying to wrap my head around context stuff
i was wrong the identation is just weird, the problem is that context.desteoy_card already goes through each card so you don't need the loop
I'm not being very tidy atm I've just been throwing stuff around for funsies
also check for lucky enhancement by doing SMODS.has_enhancement(context.destroy_card, "m_lucky")
Gotcha
Is there any way for me to not kill cards that were turned lucky on this hand? I feel like I'd need to do some special coding for that
i would recommend browsing through this if you havent
https://github.com/nh6574/VanillaRemade/wiki
Yeah I've had that pulled up on another monitor
Oh that's you
I've been using that as my way of going about grabbing features that are already in the game from one joker or another
in context.before add a flag to the converted card like playing_card.transformed_into_lucky = true and then don't destroy it if it has that in context.destroy_card (also set it to nil so it can be destroyed later)
Sounds perfect
Flag the lucky cards that aren't from this hand?
Oh very true the condition only lasts for a second
Yeah that's probably a little neater
can i store a blueprint-ish effect forever on a joker, tryna make it so that on blind select all other jokers are destroyed and the joker gains the effects of those jokers
trying this
doesnt seem to be working tho
i.. dont really understand that code sowy
if possible, could you try to explain how that code works ?
my joker design is a bit diff so i would like to know heh

I have this code for destroying 1 card...how would I do 2 cards instead?
calculate = function(self, card, context)
if context.end_of_round and not context.game_over and context.main_eval then
local card_ = pseudorandom_element(G.hand.cards, 'seed')
SMODS.destroy_cards(card_, nil, true)
end
end
do that twice
so just copy paste it again?
me when trying to do it myself and failin
yup, indeed was that easy...well then-
I do have an issue that 2 different Jokers can delete the same playing card though, one of which gains mult when a playing card is destroyed. That card gains mult twice for a card being hit by deletion twice even though only 1 card gets deleted. Anything I can do there?
@daring fern ?
how would i set a music track for a consumable type?
why does this never give xmult
SMODS.Enhancement {
key = "mechanical",
name = "Mechanical",
pos = { x = 2, y = 0 },
config = {
extra = {
x_mult = 1,
x_mult_mod = 0.5
}
},
atlas = "enhancement",
any_suit = false,
replace_base_card = false,
no_rank = false,
no_suit = false,
always_scores = false,
weight = 5,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.x_mult, card.ability.extra.x_mult_mod } }
end,
calculate = function(self, card, context)
if context.discard and context.other_card == card then
card.ability.extra.x_mult = card.ability.extra.x_mult + card.ability.extra.x_mult_mod
return {
message = "Upgrade!",
colour = G.C.RED
}
end
if context.after and context.cardarea == G.play and card.ability.extra.x_mult ~= 1 then
card.ability.extra.x_mult = 1
return {
message = "Reset!",
colour = G.C.RED
}
end
end
}
do you ever return mult
it doesn't look like it
@urban wasp you'll need to add a context.joker_main part to your calculate
that's where you'll actually return your xmult.
...it's an enhancement...
main_scoring
context.individual and context.other_card == card
oh
main_scoring
well, I made the rare and valuable wrong in two different ways at once.
i don't think enhancements will even calculate context.individual on themselves
huh, so this enhancement is intended to add x_mult to... something? when a card that has this enhancement is discarded, and it resets at the end of the round
but what is actually doing the x_mult and when?
:<
Probably
i initially did it manually on context.individual and context.cardarea == g.play but this seemed to be able to do it automatically
What about it
talisman treats numbers as tables
so if you have it enabled, your thing wont work
That's dumb
lol u chose to install talisman
talisman has to treat numbers as tables in order to store numbers larger than lua's maximum floating point number limit
but you don't have that
in config?
you have extra
Trying to make a joker pick a random card from the non-played hand to delete but instead it goes on a murderous rampage and deletes everything from your hand
Tried to do it like this
context.destroy_card is calculated once for each card played or held in hand, and returning something during destroy_card destroys the card it's currently checking
for what you want to do, have it be in context.joker_main instead (or whatever timing you want it to destroy the card, maybe context.after)
ahhh why does it keep saying, could not find center.. how do i register my new enhancement so that my custom jokers can turn cards to that enhancement
you're probably using the wrong key
of course i was
please call me an idiot what did i do wrong in my sticker
there should be proper localization but it's just doing nothing
can i see the sticker code
hmm i never made a sticker but is the apply function correct
card.ability.transform_rounds is being set properly
wdym the original
is apply part of something else and im just overriding it by mistake
oh lmao
that would probably do it
i thought apply was for stuff i wanted to run that was blank by default not a function i was overriding
works now tho, thank you N 🙏
❤️
Trans cards in Balatro before GTA 6
Breuhh have you been here, like 60% of the devs here are trans
Anyone know how to make new boss blinds in balatro
what the specific blind does can be complex but the base is simple
the smods wiki has documentation on it
Yeah I wanna make a finisher blind that makes it so hands containing cards with a specfic suit won't be scored
the suit changes per hand
but I'm having a hard time making it
actually appear
-- Onyx
SMODS.Atlas({
key = "bl_final_onyx",
path = "onyxblind.png",
atlas_table = 'ANIMATION_ATLAS',
px = 34,
py = 34
})
SMODS.Blind {
key = "final_onyx",
atlas = 'bl_final_onyx',
pos = { x = 0, y = 0 },
vars = {suit='Spades'},
debuff = {suit='Spades'},
dollars = 8,
mult = 6,
boss = { showdown = true },
boss_colour = HEX("8a71e1"),
get_loc_debuff_text = function(self)
return G.GAME.blind.loc_debuff_text ..
(G.GAME.blind.only_hand and ' [' .. localize(G.GAME.blind.only_hand, 'poker_hands') .. ']' or '')
end,
calculate = function(self, blind, context)
if not blind.disabled then
if context.hand_drawn then
local valid_onyx_cards = {}
for _, playing_card in ipairs(G.playing_cards) do
if not SMODS.has_no_suit(playing_card) then
valid_onyx_cards[#valid_onyx_cards + 1] = playing_card
end
end
local onyx_card = pseudorandom_element(valid_onyx_cards, 'ameliorates_onyx')
if onyx_card then
debuff.suit = onyx_card.base.suit
end
end
end
end
}```
if context.first_hand_drawn or context.after then
blind.effect.suit = pseudorandom_element(SMODS.Suits, 'seed').key
end
if context.debuff_hand then
for k, v in pairs(context.full_hand) do
if v:is_suit(blind.effect.suit) then
return {debuff = true}
end
end
end
Damn thx
I am currently having problems on trying to make the actual boss blind show up
Can you play a sound when a joker is scored if theres no message? My current code is below and is not playing the sound for some reason when scoring. I tried just using the sound as well but that didnt work either
elseif context.joker_main then
return {
chips = card.ability.chips,
extra = {sound = 'DRY_CerobaAiegh'}
}
end
Hi, i'm triying do a joker that set a flag to true when is obtain (by the shop, booster pack or judgement) and set this flag to false when is destroyed (by sold or destroyed by joker or consumeables)
extra = {func = function() G.E_MANAGER:add_event(Event({func = function() play_sound('DRY_CerobaAiegh') return true end})) end}
add_to_deck and remove_from_deck
Anyone know how to fix this? I made sure the file containing the boss blind was loaded and everything yet the game doesn't seem to register it as a boss blind
would there be a way to play the sound after the joker finishes scoring itself? Right now it plays when the hand is played
I got the consumable descriptions to work but the badge color is still wrong
omg im so dumb
the badge color did show up just that it was too dark for me to notice so I thought it didnt work
how do i do the effect "+ 0" on the money counter
maybe just add a tiny tiny amount
Check the attention_text function used by ease_dollars.
the money is not at ease at all
How can I make a rank that gives +1 Mult instead of +1 Chip ?
Hook Card:get_chip_mult and Card:get_chip_bonus
How do I use that ?
would this work?
So what exactly am I missing?
I guess I'm keeping my Decks Unlocked then??? 
Even when I ignore the missing text, the Unlock-Condition Code doesn't work either;
Just Unlocks after winning any Run - Even when I specify Erratic Deck
It's using my Normal Vars and then inserts the Locked-Vars Value??
could anyone help translate this for my joker design ?
config = { extra = {hand = 1, cards_ned = 15, hand_max = 10}},
loc_vars = function(self, info_queue, card)
return { vars = {card.ability.extra.hand, card.ability.extra.cards_ned, card.ability.extra.hand_max } }
end,
calculate = function(self, card, context)
if context.main_eval then
card.ability.extra.hand = card.ability.extra.hand * (math.floor((#G.playing_cards) / card.ability.extra.cards_ned))
card.ability.extra.hand = math.min(card.ability.extra.hand, card.ability.extra.hand_max)
G.hand:change_size(card.ability.extra.hand)
end
end,
remove_from_deck = function(self, card, from_debuff)
G.hand:change_size(-card.ability.extra.hand)
end```
Hi, trying to make my joker add +1 hand size for every 15 cards in the deck, but right now it's broken and everytime i use it gives me 500+ hand size, not sure how the heck i f'ed up this bad, would like some help please !
For a win_deck unlock condition try
unlock_condition = {type = 'win_deck', deck = 'b_red'}
(don't forget to remove the check_for_unlock)
That worked for the Deck, Thanks 
probably you should use a "self.ability.'insert your ability name' = 25"
Still a little confused on the Vouchers now, tho xwx
What's the issue?
I copied the Example from VanillaRemade to Test things, it just doesn't work like the Example for me 
can you show the full code ?
SMODS.Voucher {
key = "mask_tragedy",
name = "SEMBY_mask_tragedy",
atlas = "SEMBY_vouchers",
pos = { x = 0, y = 1 },
requires = { 'v_SEMBY_mask_comedy' },
config = {
extra = {
percent = 0.15,
hand_size = 1
}
},
loc_vars = function(self, info_queue, card)
local percent = 100 * card.ability.extra.percent
SEMBY_Queue_Artist(card, info_queue)
return { vars = {
percent,
card.ability.extra.hand_size
} }
end,
redeem = function(self, card)
G.GAME.SEMBY_blind_mod = (G.GAME.SEMBY_blind_mod or 0.9) - card.ability.extra.percent
G.hand:change_size(-card.ability.extra.hand_size)
end,
-- Unlock Code:
unlocked = false,
locked_loc_vars = function(self, info_queue, card)
return { vars = { 25 } }
end,
check_for_unlock = function(self, args)
if args.type == 'blind_discoveries' then
local discovered_blinds = 0
for k, v in pairs(G.P_BLINDS) do
if v.discovered then
discovered_blinds = discovered_blinds + 1
end
end
return discovered_blinds >= 25
end
return false
end
}
do you also happen to have text description code for it ? the loc_txt if you want
because in general the nil might come from there so might as well see it first
I don't see why my Description would be the Issue here, The Unlock-Text isn't showing at all 
Well because right now it shows you didn't defined the #2#
look at your vars, there's only 25
I'm defining 25 for the UNLOCK TEXT
NOT for the Normal text xD
I want this:
Not that:
you can just remove #2# by -1 hand size then
or do { vars = { 25 , -1} }
whatever you prefer
????
I'm pretty sure you don't understand my issue here ^w^'
wasn't your issue being the -nil ?
oh
You are right ^^
supposed to be:
'Discover',
'{C:attention}25{} Blinds'
havent worked with unlocked stuff so no idea how to help here
okay i think know how
Huh?? 
you should include the key of the locked voucher in your vars and it should be something like
{ vars = { 25, key = self.key .. '_locked'}}
_locked is for the name of your voucher in the localization files with _locked at the end
that's an exemple but i do remember it's about self key
This is to display the locked description
Just add an unlock thing to the loc
oh, yeah probably better lol
it's G.jokers.cards
thx
But why is there a key for deck_locked_win and all that if it's just defined in there aaaa--
Alright I'll use that then , Thank you :)
-# Might as well bumping my issue..
whats the math in here trying to do
card.ability.extra.hand = card.ability.extra.hand * (math.floor((#G.playing_cards) / card.ability.extra.cards_ned))
card.ability.extra.hand = math.min(card.ability.extra.hand, card.ability.extra.hand_max)
G.hand:change_size(card.ability.extra.hand)
``` this
math.floor if i'm right is so that it rounds the number (so it doesn't end up as like 0.6 but 1 instead)
math.min is so card.ability.extra hand never gets higher than hand_max
so first calculating the number of hands in total then turning it down to hand_max if hand is too high
Hand = Hand * (Cards/15)
^ Mult?
"context.main_eval" also means it happens every hand
"G.hand:change_size()" is permanent, so it's constantly giving you handsize without ever reducing it
So you're basically doubling your hand-size each hand played
Well, the math.min reduces that to 10 every time
well i want to keep the change dynamic so that's why there's only context.main_eval and nothing else
but i didn't kne for G.hand:change_size(tho)
okay that explain why it gave me +500 hand size
Alright, I mean.. Yeah that would work - There's better contexts and all, but:
The first and fastest fix would be to:
G.hand:change_size(-card.ability.extra.hand)
card.ability.extra.hand = math.floor(#G.playing_cards / card.ability.extra.cards_ned)
card.ability.extra.hand = math.min(card.ability.extra.hand, card.ability.extra.hand_max)
G.hand:change_size(card.ability.extra.hand)
The context use may be wrong, one thing you could do is give the object a set_ability to have the initial handsize bonus from the cards, then you add a calculate context for card addition (I forgot its name) and if a threshold is achieved you increase the handsize bonus
seems so far the easiest fix yes, thanks !
so like, take account of the default cards in deck and then get a bonus from added cards ?
if context.playing_card_added or context.remove_playing_cards then
Would be the ones you could use, you could also just set it at the beginning of every blind and shop;
if context.setting_blind and not (context.blueprint_card or self).getting_sliced then
if context.starting_shop then
Up to preference really, it's not like 1 Hand Size Matters in am Tarot-Pack in the SHop - So you could get away with always just updating it at the start of every blind
Baiscally I and another guy both use the exact file copies of these mods and lovely but he gets a crash but I dont
pretty sure fantom's preview causes that crash
which is an issue because multiplayer has that built in
But only on their end?
I have no crashes
you probably have it disabled in multiplayed config
seems the easiest to do, playing card and removing playing cards would be the safer since in the other case you could probably abuse it when removing cards during the blind
thanks i appreciate th the lp
wait
if context.playing_card_added or context.remove_playing_cards then would then wouldn't then add the handsize directly until a card is added, so it wouldn't work directly
oh wait i could also just if context_setting blind in that case
And add_to_deck = function(self, card, from_debuff)
not sure if in that case it'll be necessary since it'll already change the handsize upon check, but i guess i better to do for safety anyways
It kinda depends on what ya' Aiming for - Should the Joker have a Dynamic Size like... If I draw Cards the Hand-Size shrinks in the Blind - Then you have to do something different x3
well the main goal was if you got to destroy 15 cardsi in your hand while playing then yeah you would lose a handsize, that's why it was context.main_eval so it always check, but the card adding and removing as well of setting blind could do the job in a probably less painful way xP
Then you're fine to continue~ 
as long it works without doing the weird instant crash, i'll be happy with that alreayd =w=b
i appreciate the help, thanks
-# also i swear, doing the easiest jokers concept sometimes seems the hardest to code
make a folder named localization in your mod folder, then you can have one lua file per language code in there and a default.lua to use as a fallback over en-us.lua since thats the normal fallback language
most information about localization is here https://github.com/Steamodded/smods/wiki/Localization
working
tryna make so that the for loop is how many jokers there are -1
for i=1, #G.jokers.cards-1
thx
clueless here tho, how would i do an exception if there is a different joker also present
how do i suppress the +num extra chips message from appearing in the ability box? i'm using card.ability.bonus
just dont use card.ability.bonus and count the amount of that enhancement in scoring
i was going to post a textwall
card.ability.bonus wont work since the game manually subtracts the bonus value in the enhancement's center when its removed
but ill do it after this issue is fixed cuz dont want to overshadow it ^
@daring fern you online?
Yes.
tryna do the code for making basically a fake card thing
but for my joker's thing instead
cuz its not the exact same 
eh jus gonna post it
post your textwall i got it
trying to do this, but im bad at understanding it so
calculate = function(self, card, context)
if context.setting_blind and not context.blueprint then
if SMODS.pseudorandom_probability(card, 'group_0_e2e11086', 1, card.ability.extra.odds, 'j_fox_singing') then
for i=0, #G.jokers.cards-1 do
local jokers = {}
for _, j in pairs(G.jokers.cards) do
if j ~= card then
jokers[#jokers + 1] = j
end
end
local sliced_joker = pseudorandom_element(jokers)
if sliced_joker then
card.ability.extra.currentJoker = sliced_joker.key
end
if card.ability.extra.currentJoker then
local key = card.ability.extra.currentJoker
G.modprefix_savedjokercards = G.modprefix_savedjokercards or {}
G.modprefix_savedjokercards[card.sort_id] = G.modprefix_savedjokercards[card.sort_id] or {}
if not G.modprefix_savedjokercards[card.sort_id][key] then
local old_ability = copy_table(card.ability)
local old_center = card.config.center
local old_center_key = card.config.center_key
card:set_ability(key, nil, 'quantum')
card:update(0.016)
G.modprefix_savedjokercards[card.sort_id][key] = SMODS.shallow_copy(card)
G.modprefix_savedjokercards[card.sort_id][key].ability = copy_table(G.modprefix_savedjokercards[card.sort_id][key].ability)
for i, v in ipairs({"T", "VT", "CT"}) do
G.modprefix_savedjokercards[card.sort_id][key][v] = copy_table(G.modprefix_savedjokercards[card.sort_id][key][v])
end
G.modprefix_savedjokercards[card.sort_id][key].config = SMODS.shallow_copy(G.modprefix_savedjokercards[card.sort_id][key].config)
card.ability = old_ability
card.config.center = old_center
card.config.center_key = old_center_key
SMODS.destroy_cards(sliced_joker)
end
return G.modprefix_savedjokercards[card.sort_id][key]:calculate_joker(context)
end
end
end
end
end
}
( only doing it for every blind rn cuz testing it firstly )
tryna store the effects of every joker it kills permanently
it kills the jokers fine
Firstly, move the fake joker calculation code of of the context check, Secondly, card.ability.extra.currentJoker should be a table of keys.
Also you need to change modprefix to your mod prefix.
Here's something neat you can do, if you got a boolean condition to check if it's either true or false, you don't need an if else block, you can set the value depending of a boolean alone
if context.joker_main then
e_chips = card.ability.extra.e_chips * (#G.jokers.cards * (next(SMODS.find_card("j_gj_pr")) and 2 or 1))
end
wdu mean by a table of keys
?
You would put the keys of the destroyed jokers in that table.
so basically just these two lines?
Forgot the end but yes
weird
i did remove the if smods.find
(the code i had previously)
Wait e_chips is a global and you don't return it?
hehe, during my modding process, i noticed that Negative Emperors can be used regardless of the consumable limit, if they're held
they don't do anything when used but that's silly :>
wdu mean by disss 
If I spawn a consumable into G.consumeables using SMODS.create_card and the cards end up not working properly (they don't move around correctly, and they don't have "Use" and "Sell" buttons), what is the most likely cause of this behavior?
I adapted the vanilla code for High Priestess and Emperor:
G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.4, func = function()
play_sound('timpani')
local make_spectral = pseudorandom('curt_rev_fool_spectral') > (1 - card.ability.extra.spectral_rate)
local t = {
set = make_spectral and 'Spectral' or 'curt_rev_tarot',
area = G.consumeables,
allow_duplicates = true,
key_append = 'curt_rev_fool',
}
local _card = SMODS.create_card(t)
_card:add_to_deck()
G.consumeables:emplace(card)
card:juice_up(0.3, 0.5)
return true end }))
just use SMODS.add_card if you're immediately emplacing and adding it and doing nothing else
You're emplacing card instead of _card
You would do table.insert(card.ability.extra.currentJoker, j.config.center.key) in the for loop.
that's it ?
No, you would put the fake joker calculation in a for loop that iterates over card.ability.extra.currentJoker
No, around the entire thing and use SMODS.merge_effects to merge the returns.
theres only 1 return ?
return G.fox_savedjokercards[card.sort_id][key]:calculate_joker(context)
i have some effects that should trigger when a tarot or planet card is used, but from testing it didnt trigger
is my code for the card usage detecting correct?
if context.using_consumeable and not context.blueprint then
if context.consumeable.ability.set == 'Planet' and (not (indexOf(card.ability.extra.activeTriggers, 'planetUse') == nil)) then activateEffect(card.ability.extra.activeEffects[indexOf(card.ability.extra.activeTriggers, 'planetUse')]) end
if context.consumeable.ability.set == 'Tarot' and (not (indexOf(card.ability.extra.activeTriggers, 'tarotUse') == nil)) then activateEffect(card.ability.extra.activeEffects[indexOf(card.ability.extra.activeTriggers, 'tarotUse')]) end
end
unless im misunderstanding ur meaning
the condition is to prevent it from triggering if activeTriggers does not contain the relevant key
what happened here 😭 (on latest smods)
indexOf is a function that returns the index of a value in a list, or if the value is not found in the list it will return nil
so that's why im checking it against nil
think i did this incorrectly
cuz it keeps saying bad arguement #1 to 'insert' (table expected, got nil)
@daring fern
Did you start a new run?
hold on
downgrading smods fixes this
Use ipairs
ipairs(card.ability.extra.currentJoker) ?
Yes.
new run added it same error
No, it's for i, v in ipairs(card.ability.extra.currentJoker) do
Remove the first for loop and everything below the second for loop.
What is line 345 in Mods/lovely/dump/card.lua?
the jokers i destroyed were sock in buskin, oops all 6s (x2), and armed and dangerous
Change local key = card.ability.extra.currentJoker to local key = v
o okais
didnt crash
but didnt copy the joker effects
@daring fern
probably SMODS.merge_effects
modding phones is a thing ?
#📜・modding-rules, rule 4
thx\
anyone knows how to retrigger discard effects?
or atleast how can i add retriggers to em
by default discard retriggers dont work, you would have to make a custom context
i know at least morefluff does this, you could look into that
aight, thanks
does anyone want help for joker ideas 🙏im bored pls
@daring fern 
Yes, you need to put the returns in a table then merge them.
could you explain further ?
returns being the for looped return G.fox_savedjokercards[card.sort_id][key]:calculate_joker(context) ?
Yes.
so doing smth like this ?
hacked lmao
No, put it in a local table.
<@&1133519078540185692>
Also you need to insert it into the table.
also holy shit discord actually doing smth for once
?
i think this is wrong
but maybe smth like this
Yes, you need to define the local outside the for loop.
Also you need to use calculate_joker
how would i do this ?
Move local mergetable = {} outside of the for loop.
how would i make something not show up in the collection until you've seen it for the first time
No, you should be returning.
Yes.
No, return the SMODS.merge_effects
not sure what to put in calculate_joker()
context
if context.selling_self and context.card.config.center.key == "j_para_jokerrune" and (something something doesn't work when it's eternal) then
Folks, does anyone know how to adjust UI in packs to give more space between card options?
context.card doesn't exist in context.selling_self
trying to make a joker that if sold with another joker in deck, destroys said joker to make a new one
ik its not crucial but would be look a litle better
@daring fern
if context.selling_self then
for k, v in pairs(SMODS.find_card('j_modprefix_key')) do
if not SMODS.is_eternal(v) then
SMODS.destroy_cards(v)
SMODS.add_card({key = 'j_modprefix_key'})
end
end
end
What about checking for eternal to ignore it?
@daring fern
can anyone fix https://github.com/Jayd-H/joker-forge/issues/424

ask the joker forge thread if anything
local effect = G.fox_savedjokercards[card.sort_id][key]:calculate_joker(context)
if effect then table.insert(mergetable, effect) end
thx it works fully now
wait how do i make it so that its specifically on start of boss blind
context.setting_blind and G.GAME.blind.boss
thx :3
i want to animate the soul sprite. what am i doing wrong?
does anyone know why the juice_up thingy isn't working?
Code?
It's card not self
thanks
Is there a way to get the current's hand score after scoring ? (not the total, just for the said hand)
idunno
(hand_chips * mult) i believe
like here
It's for the hand only no ? I mean like after the jokers triggered and everything
SMODS.calculate_round_score()
thanks i'll try that, and it's only for the current hand and not total right ?
Yes.
that's what final_scoring_step is here for
just trying to be sure, but thanks !
how in god's name do i retrigger this?
You would have to patch there so it returns nil, true
changing the soul pos in the prototype wont do anything, you need to change it on the sprite object
something like card.children.floating_sprite:set_sprite_pos({ x = num, y = num})
(i dont remember if the name is floating_sprite)
yes, i had that in the update function of the joker but it wont move in the collection
it should
that should work in the collection afaik
maybe use draw instead of update
i use drawsteps for this stuff
draw doesn't have dt. i dunno if that makes a difference
this SLEEVES code makes playing cards retrigger twice
even tho
i want it to either retrigger playing cards by itself or jokers with white deck
yup, it worked. thanks
I see a mod_mult() function used by The Flint, what does that do?
how to make cards permanently have 1 extra repetition?
same as hiker but with card.ability.perma_repetitions
ok thanks
it does some stuff so mult values are adjusted properly
very important with some recent smods features
basically use it when modifying scored mult directly
Here's why I ask:
yeah you would do mult = mod_mult(hand_chips/2)
I hooked add to card to my function, which runs smods.debuff_card, which runs card:set_debuff, which runs add to deck, creating stack overflow.
How would I mitigate this?
how to loop through every card in the deck?
for _, card in ipairs(G.playing_cards) do
--condition
end
how do i make a sound play when an edition triggers? i've tried this but it didn't work: return {xmult = value, sound = {sound = sound, per = 1, vol = 1}}
where sound is "hodge_trigger_slime_good" or "hodge_trigger_slime_bad" depending
both of which should be valid sounds
return {xmult = value, sound = 'modprefix_key'}
yeah no its not working idk what im doing wrong here
self.seal is a key not a table.
you mean...?
You're not checking if the seal triggers.
how do i make a joker change an enhancement's probabilities?
lucky cards?
custom enhancement
local oldcalcseal = Card.calculate_seal
function Card:calculate_seal(context)
local g, post = oldcalcseal(self, context)
if (g or post) and context.discard then
for i, v in ipairs(SMODS.find_card('j_modprefix_key')) do
SMODS.calculate_effect({message = localize('k_again_ex')}, v)
local _, postpost = oldcalcseal(self, context)
post = post or postpost
end
end
return g, post
end
context.identifier == "whatevr you put in your pseudorandom probability"
thanks
like this?
calculate = function(self, card, context)
if context.identifier == "elle_slime_card" then
return {
numerator = 3
}
end
end```
context.mod_probability and not context.blueprint_card and context.identifier == "elle_slime_card"
thanks
woaw
thanks
but the joker that i added 'return nil, true' to still dont show the 'again' message
is there a way to tell what booster you're currently in while in context context.skip_booster?
try to see what gets returned here
context.booster.kind
it's still doing nothing
calculate = function(self, card, context)
if context.mod_probability and not context.blueprint_card and context.identifier == "elle_slime_card" then
return {
numerator = 3
}
end
end```
wait lemme check my code
wait I am dumb it's not from pseudorandom probability it is from get_probability_vars
?
the context.identifier should be the string from your get_probability_vars
local numerator1, denominator1 = SMODS.get_probability_vars(card, 1, card.ability.seal.extra.odds1, "epik_face_hand")
example
if context.mod_probability and not context.blueprint_card and context.identifier == "epik_face_hand"
that's the same as before
hmm that is weird it works for me maybe try print(context.identifier) to see the value
there isn't can I see the code for setting up your probability?
i mean i put the print in the base of the calculate function
so it'd always go off
and every single context check gave nil
so it's not just my card
ok put the print inside the context.mod_probability
and only context.mod_probability no other contexts
it only prints when hovering over lucky cards
is it possible to change a rarity's badge text color
your card doesn't trigger the print?
nope
try glass cards just to be sure
ok it does for glass too
then there is something wrong with your probability setup for your card
i think it may have to do with
uhhhh
this 😭
-- Cryptid/Talisman Compatibility functions
function elle_prob(card,p_key,odds)
return pseudorandom(p_key) < (Cryptid and cry_prob(card.ability.cry_prob, odds, card.ability.cry_rigged) or G.GAME.probabilities.normal) / odds
end
function elle_prob_loc(card,odds)
return Cryptid and cry_prob(card.ability.cry_prob, odds, card.ability.cry_rigged) or G.GAME.probabilities.normal or 1
end```
dear god cryptid stuff
I don't touch cryptid at all
without the cryptid support it's essentially just
function elle_prob(card,p_key,odds)
return pseudorandom(p_key) < G.GAME.probabilities.normal / odds
end
function elle_prob_loc(card,odds)
return G.GAME.probabilities.normal or 1
end```
Yes, you would patch G.UIDEF.card_h_popup
Yes, you should be using SMODS.pseudorandom_probability
wait. question. does this work in edition calculates or not
is that the issue
or have i just screwed up some other way
what args does it take?
trigger_obj, seed, base_numerator, base_denominator, identifier, no_mod
what do those mean? i'm a bit confused by some of them 😭
SMODS.pseudorandom_probability(card, 'seed', numerator, denominator)
Yes.
ok
is elle_prob_loc okay as is? (it's how i get the numerator in loc_vars)
No, you should be using SMODS.get_probability_vars
ok
does anyone have an example of targetting a random card in hand
pseusorandom_element(G.hand.cards, "seed")
okay i've replaced all uses of probability in my mod with the correct method
it works now 
im a bit lost on what line i need to patch
badges[#badges + 1] = create_badge(((card.ability.name == 'Pluto' or card.ability.name == 'Ceres' or card.ability.name == 'Eris') and localize('k_dwarf_planet')) or (card.ability.name == 'Planet X' and localize('k_planet_q') or card_type), card_type_colour, card_type_text_colour, 1.2)
I have 2 Jokers that destroy playing cards, my problem is that both can hit the same playing card and one earns a bonus from said playing card being destroyed twice. Code for both is below, with a comment on what both are. Wanna make it so 3 cards are destroyed if possible, if not then destroy as many as possible
-- Destroyer
calculate = function(self, card, context)
if context.end_of_round and not context.game_over and context.main_eval then
local card_ = pseudorandom_element(G.hand.cards, 'seed')
SMODS.destroy_cards(card_, nil, true)
local card_ = pseudorandom_element(G.hand.cards, 'seed')
SMODS.destroy_cards(card_, nil, true)
end
end
-- Destroyer and Mult Gain
if context.joker_main and card.ability.extra.xmult > 1 then
return {
extra = {func = function() G.E_MANAGER:add_event(Event({func = function() play_sound('DRY_WyfoleDah') return true end})) end},
xmult = card.ability.extra.xmult
}
end
if context.end_of_round and not context.game_over and context.main_eval and not context.blueprint then
local card_ = pseudorandom_element(G.hand.cards, 'seed')
SMODS.destroy_cards(card_, nil, true)
end
end
Like this?
-# Sorry, I fell asleep.
key = "white_sleeve",
atlas = "white_sleeve",
pos = { x = 0, y = 0 },
unlocked = false,
discovered = false,
config = {repetitions = 1},
unlock_condition = { deck = "b_othe_white", stake = "stake_green" },
loc_vars = function(self)
local key, vars
if self.get_current_deck_key() == "b_othe_white" then
key = self.key .. "_white_alt"
else
key = self.key
end
return { key = key, vars = {self.config.repetitions}}
end,
calculate = function(self, sleeve, context)
if self.get_current_deck_key() == "b_othe_white" then
if context.retrigger_joker_check and context.other_card ~= card then
if not (context.other_card.edition) then
return {repetitions = self.config.repetitions}
end
end
else
if (context.repetition and context.cardarea == G.play) then
if not (context.other_card.edition or (next(SMODS.get_enhancements(context.other_card)) and not context.other_card:get_seal())) then
return {repetitions = self.config.repetitions}
end
end
end
end
}
SMODS.Atlas {
key = "white_sleeve",
path = "white_sleeve.png",
px = 71,
py = 95
}
``` this sleeve code for some reason whenever its paired with my WHITE DECK retriggers all cards twice and retriggers jokers
if self.get_current_deck_key() == "b_othe_white" then is there a r missing here? "b_other_white"?
is it triggering twice or is the normal state of the Chips & Mult just overwriting the code of the Joker?
hehe no
to clarify
yeah so as soon as the hand starts scoring, it switches the state of the Round Score back to before Cassette triggered. The Joker itself isn't triggering twice
the sleeve is supposed to retrigger jokers when used with the white deck
ah ok
The Round Score is overwriting Cassette
is there a way to not have that happen?
should latest smods not increment ante and show 0 when levelling up
BECAUSE SOMETHING AINT RIGHT
im not sure what the code would be, but instead of context.before the context needs to be the hand scoring
k
now i might be wrong i am new to this myself Im just giving an educated guess
if SMODS.pseudorandom_probability(card, 'rw_rotten', 1, card.ability.extra.odds) then
local target = pseudorandom_element(G.hand.cards, "seed")
SMODS.destroy_cards(target)
G.E_MANAGER:add_event(Event({
func = (function()
play_sound('tarot1', 1)
return true
end)
}))
card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mod_mult
return {
message = localize('k_upgrade_ex'),
card = self,
colour = G.C.IMPORTANT
}
end
end```
this entire block of code just does not run :[ it doesnt even crash it just does nothing
dont work
you dont have a calculate function
I want it to be before the cards score :( i cant find a way to do that
without the calculate function the joker's effects wont work
uhhhhhhhhhhh lemme do some digging and see if i cant provide any info
I gtg now :(
its inside of a calculate function
ill do the swapping in the normal scoring phase if you dont
is there a specific part of the code not running oor is it literally the whole thing
nothing except the bottom thing that returns mult is doing anything
try inputting context.scoring_hand[1] instead of context.before, and put it after the cardarea context. so something like this:
if context.cardarea == G.play and context.other_card == context.scoring_hand[1] then
K
you can look at the vanilla code for Hanging Chad, that's what I'm getting this from
and maybe try [0] instead of [1] if it doesn't activate before the first card of the hand
again, all educated guesses
what is the Joker attempting to do? I see the Game Over context but idk what it's for
so why is the game over context there? the only joker i can think of that would need that is that one base game joker
every other joker assumes that the game is continuing
otherwise im not educated enough to give any other guess
well i yoinked it from somewhere and i dont think mr. bones was that somewhere
and also this very similar header does work so idk
then idk, someone else will have to help unfortunately
that being said; does anyone have any advice for a Joker triggering that creates a Tag similar to the Rework tag from Cryptid?
I'm looking at the code for it but idk how much of it is Vanilla and how much is Cryptid
diet cola might have something
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)
}))```
the main issue is creating a unique tag, so it stays out of the tag pool that can pop up when you skip blinds
how can i generate a list of the keys of all the hand types
Can you ban editions in challenges?
baltro
G.handlist?
ah
this joker doesn't retrigger +chips or +mult joker effects like it should
i return to inquire once again why nothing in the if context.joker_main and context.main_eval and not context.blueprint then runs
try removing context.joker_main in the first if statement
tip: put a print("test") inside the main if statement just to see if it's passing (maybe this isn't needed in this scenario since you have a return with a message there)
it instantly crashed 🔥
no its like a full crash when i do that it doesnt even show the gray page with the text
oh, hold on im testing out something
i think you need to use a context different from joker_main and main_eval
these dont work for what youre trying to do
try it with context.before (will trigger before the hand plays) or context.after (will trigger after the hand plays)
whats your SMODS.ConsumableType look like
yay! now it just crashes due to my awful code rather than doing nothing
send crash log
are you doing your localisation text in that file or are you doing "proper" localisation
then i have no idea cuz i am not doing proper localisation
i just fixed it it was really easy
what would be the way to check the number of cards in hand for an if statement?
how do I remove all the stickers off a joker?
#G.hand.cards?
I have that now and its not working, I'm checking if its greater than 0 but still runs if it is, crashing the game
what context u using
if context.end_of_round and not context.game_over and context.main_eval and not context.blueprint and G.hand.cards > 0 then
local card_ = pseudorandom_element(G.hand.cards, 'seed')
SMODS.destroy_cards(card_, nil, true)
end
#G.hand.cards
Ahhhh, no clue there was a difference
# is how you get the length of a table in lua
length being the amount of things inside said table
that was a shit explanation im sorry
hip hip hooray
i have a feeling hotpot might have something related to removing stickers
SMODS.Consumable {
key = "lithium",
set = "xiferp_Element",
atlas = "Golden_Brick_Road",
cost = 3,
pos = { x = 16, y = 0 },
unlocked = true,
discovered = true,
can_use = function(self, card)
return true
end,
use = function(self, card, area, copier)
G.GAME.xiferp_alkimetal_chips = (G.GAME.xiferp_alkimetal_chips or 0) + 5
end,
loc_txt = {
name = 'Lithium',
text = {
'Adds +5 chips for the hand',
'after this is used, and adds one',
'new card to the deck',
},
},
calculate = function(self, card, context)
local alki_card = SMODS.add_card { set = "Base" }
G.GAME.blind:debuff_card(alki_card)
G.hand:sort()
SMODS.calculate_context({ playing_card_added = true, cards = { alki_card } })
end
}```
Upon playing this card, the game just snaps. Not even a reason for the crash, no log, just close.
maybe check that?
you cant assign variables in calculate
your calculate doesnt have a context check
?
Is it just "if cardarea=play then"?
It's supposed to buff the next hand and add a card
then dont put that in calculate?
why would the thing you do when you use the consumable not just go in use
because
actually you're right
is there a way to get custom text on challenges in the custom rules area
Last time I tried doing that it crashed on me so I just assumed it's not possible
Its just defining a variable it has no reason to crash
Defining a variable in there has made it crash for me before so idk
it totally is, maybe you were trying to access a local variable defined in a different calculate call
<@&1133519078540185692>
MURDER
That makes sense
I'm just stipid
Why is this still here 😭
how could i get the localization for a blind
[basically would it be infoqueuebithere i know this part = {key = "blind_key", set = "Other"}
or do blinds have their own set
nvm yeah blinds do have their own set LOL
im going crazy why does no sound play
okay guys i am dying over here
can someone draw a spectral card for me
i've tried to draw it like 3 times but i just can't
is value exactly 1
the rest of config is for like, other things that vanilla uses, i think
anyway its just good practice to use it, keeps it contained
okay but what i mean is why is it “good practice”
like i’ve used it for months but i’ve never known why exactly
so that it doesn't interfere with vanilla stuff
how do you do emult without talisman again
values in other fields didn't use to get saved
nowadays it's just recommended to not clash with vanilla fields, stickers, etc and so it doesn't keep the values when you change a card
i see
real uncs know
return { emult = # } didn't seem to be working
not sure if its supposed to be emult_mod now or 😭
there's no emult without talisman or cryptlib
-# for reference im just tryna remove the only thing i have that NEEDS talisman so i can work without dependences
you can always just like
wait theres not now
you can do mult = mult ^ num
Check Prism if you want an implementation that is also compatible with talisman
Had a joker that worked fine, then added another joker (which also works fine), but now the other joker crashes the game when hovered over
Crash message says "attempt to index field 'extra'" but I'm not sure where that would be
if its when its hovered over id guess it has smth to do with loc_vars for that joker
ah so yeah it probably doesnt recognize card.ability.extra.destroy then
did you define it in config or no
I'm confused why it worked fine earlier
Hovering over it as well as the general functionality
if you did maybe swap it out for self.config.destroy iirc
as for why the change uh
im not sure
;w;
without further context i couldnt say
*self.config.extra.destroy
sorry
np tho ^^
Is there a way to force a specific Joker order in the Collection?
Is there something like G.play.cards that specifically refers to cards that score and not just played cards
in calculate you have context.scoring_hand
I see
Makes sense I'll check it out
So within context.scoring_hand, G.play.cards would refer to scoring cards?
no
context.scoring_hand is a table of the scoring cards in various contexts like context.joker_main
(there's also context.full_hand which is equivalent to G.play.cards)
Okay I think I understand
So picking a random card out from specifically the scoring cards could work with this?
yes
So sometimes this code can hit the same playing card twice, any way to prevent that?
if context.end_of_round and not context.game_over and context.main_eval and #G.hand.cards > 0 then
local card_ = pseudorandom_element(G.hand.cards, 'seed')
SMODS.destroy_cards(card_, nil, true)
if #G.hand.cards > 0 then
local card_ = pseudorandom_element(G.hand.cards, 'seed')
SMODS.destroy_cards(card_, nil, true)
end
end
easiest is to copy the list of cards instead of using G.hand.cards directly and then remove the card that you destroyed first from the list
How would I go about that?
which part
All of this honestly, dont get how I'd do that
for copying you can do SMODS.shallow_copy(G.hand.cards) or just loop through the hand and add it to a new table


