#💻・modding-dev
1 messages · Page 496 of 1
hi dilly
hi toma (again)
Hi bepis i hope you're well
wait did i alre
yeah i just do my test :3
dementia
I had such bad sleep im finally getting up
did you pass
about 2-3 hours ago
sorry
I was up every like 30-45 mins
fate mentioned
fate
I will decide bepis grade
4
Thats how many noses you will have in 6 days
who told you
How does one make when selecting blind, it replaces itself from a pool of jokers
Im the one doing it so i told myself
oh youre the client i see
set_ability shenanigans
Gulp
That would happen with set ability?
I thought you'd just check -
Alright you fixed it
i thought it was a given but just in case
if context.setting_blind then
local center = ... --do whatever to get the G.P_CENTERS[smt]
card:set_ability(center)
end
i guess this
actually, is it the center or just the key of the joker 🤔
See I do things wack I'd personally check the blind and then do the random and destroy and add card
hello!!! how does the in_pool(self, args) -> bool, { allow_duplicates = bool } work? i've been trying to make a deck where everything just appears many times but i can't figure it out :(( thanks for any help
how would i generate a planet card of a certain hand type?
Bepis so helpful
it shows this in my booster, how do i change it?
my bad, its just the key
how do people send a github link that points to a line 🤔
add group_name to your loc_txt
Idk but it makes me mad when I cant figure it out and I haven't asked either
Cause I see n and smt doing it i think
i know SMODS has a showman function for cards, but idk about decks
i did it, but it doesnt show
But idk how to point to a line
how did you do it
hook to SMODS.showman and make it return true when you are using that deck
same, i should ask how to later
do you by any chance have group_key in the booster's code
yes
remove it
playtesting my mod, and i sorted by suit, and i got? this? this is not sorted by suit??
is that a custom rank
Well it sure ain't a vanilla one silly
Ah tru
ig the rank nominal is incredibly high
i havent messed around with custom ranks before, so no clue on that one
probably what senfin said :3
ok, im trying to get any joker to calculate normally, and then calculate with a blueprint effect as part of a deck effect
i think i have to hook something, but I don't know where to look
smods.calculate_context or smods.calculate_joker?
the rank nominal is 15, i might lower it down to 12 so it behaves properly now ig
Is this not right
calculate = function(self, card, context)
if context.setting_blind then
local card = create_card("Food", G.jokers, nil, nil, nil, nil, nil, "dalgona")
card:add_to_deck()
G.jokers:emplace(card)
end
end
Use SMODS.add_card
Replace it where
Instead of using create card and emplace I believe add card does that itself
if context.setting_blind then
SMODS.add_card{key = "joker's key in here"}
end
(the progress was Ctrl c + Ctrl v)
Still had it
can you not use custom colors in X: ?
pretty sure you can
cause mine isnt
🤔
did you try using C: with that color first
god
my pc is so laggy rn
ITS JUST DISCORD 😭
Do I add anything to this or
just change the key part
one sec, im testing smt
So just this?
all my ijiraq cards use the C: version for their dynamic text
does X: need a C: to function? is that why?
I got a crash
That’s not a key
thats not a key
{X:color,C:color}
How would one make a key
so it needs C
The second bit overwrites the first
i dont know if it needs it but you cant nest them
ah you can always tell when the americans are out of work
man
...hm, kinda hoped this would work
can confirm (american)
bepis is this an everyjoker
I stand for the flag 🇺🇸 and kneel for the cross 🇫🇮
using a deck from tmd to see if i can easily make a deck work like a blueprint
Loop to #G.jokers.cards - 1
oh wait crap i didnt realize
Oh hang on
😭
yeah 😭
i copied blueprint's code from vanillaremade and just pasted it in there without thinking
sob
Erm im not even out of bed yet
expermenting with it in balaui
surely
there has to be a way to merge those backgrounds right
or even just only have the 1 be attention'd
I dont think you can in the text formatting but i might be wrong
...hm, this still didnt work
you would need to use main_end or something
im guessing its because card is a deck so it doesnt work?
not main_end againnnn...
might be
is there an easy way to comprehend main_end
*easi-er
sorry, but how would you check for deck keys? I can't quite understand the game code itself 😓
no
Is there a harder way to understand main end
misprint deck
:3 does anyone know the quick answer to this, im still, finicking with the deck's code
don't they go by deck names instead of keys
b_modprefix_key
OF COURSE IT WOULDNT WORK, I
in calculate? yes
they do
yeah im dumb, i just realized that
nvm i found them
wha
weird erotic deck
some might be different tho, you would have to ask eremel
this is how a deck adds xmult in "joker main style", so i assumed the contexts are different
-# dont mind the key, this is from too many decks mod
final scoring step is definitely a thing for decks because i use it for plasma
SMODS.merge_effects
OH MY GOD THANK YOU THANK YOU
my finicky approach would be to create a cardarea, patch it to use joker area's contexts, add a dummy joker in there just for the blueprint effect of the deck but i feel like thats probably dumb
;3
i think that's a fine solution
still not working, oddly
does it work with retriggers?
how are you using it
why doesnt this function trigger? i gave myself 4
and then debugged pomni in, no transformation
(btw this is hooked into SMODS.calculate_joker)
if its hooked to SMODS.calculate_joker then self here is pointing to SMODS i think
LOL
wait no its Card:calculate joker its hooked into i think
remove the func = function stuff
you forgot to return func
oh wait do i have to check if G.jokers exists first actually
or what N' said, yeah
decks use context.other_main
mhm, probably why SMODS.blueprint_effect doesnt work then since im passing decks' context to it
actually, wait, whats the difference betwen context.other_main and context.final_scoring_step
ok that didnt work
timings
can i see the entire hook
mmm one sec
use SMODS.blueprint_effect for cleaner code 👍
wait what
what exactly is that function?
you'd just change the if bit to use SMODS.merge_effects({ret, other_joker_ret}) for example
this worked for me
-# i should probably switch it to using SMODS.blueprint_effect first before sending to u, i copied blueprint's code lol
i also just found out context.no_blueprint existed, so thats something
it's only used for quantum enhancements and the eternal check
...hm, did i fuck up somewhere
its nicer looking, but for some reason it still refuses to work
should i not be hooking to card:calculate_joker?
mine doesnt work too, yeah
is there a way to make it so sold cards dont trigger the message containing the sell price under it?
this one still works though
so thats weird
i forgot about that
are you checking if ret is not nil
could you give me the code for this in the chat? i wanna test if it works on my end
🤔 do i need that
yes
you can do merge_effects({ret or {}, other_ret})
if ret is nil then it considers the array to be empty basically
did we not add a nil check?
tried that, no workie
oh yeah it works
local hookTo = Card.calculate_joker
function Card:calculate_joker(context)
local ret, trig = hookTo(self, context)
if self.ability and self.ability.set == "Joker" and self.config.center.rarity == 3 then
local other_joker = nil
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == self then other_joker = G.jokers.cards[i+1] end
end
local other_joker_ret = SMODS.blueprint_effect(self, other_joker, context)
return SMODS.merge_effects({ret or {}, other_joker_ret or {}}), trig
end
return ret, trig
end
here
not for that, I didn't want to use pairs because of order
no clue, having a nil check definitely worked though :3
srockw had a good suggestion of using pairs and saving the indexes but it was kinda complicated and i didnt want to do it :3
ah fair enough
srock is such a smarty pants
so true
YEAHHHHHHHHHHHHHH IT WORKS
GGGGGGGGGG
nice :3
CYAN DECK GONNA GO HARD
cyan deck is pretty boring though /s
Is there a way to prevent jokers from spawning in shop
Boutta go hard
in_pool
oh yeah rq, what is this for
i just found it while searching for SMODS.showman earlier
Allow straights like 3 2 Ace King Queen
ohhhh i see i see
in_pool = function(self, args)
return G.GAME.pool_flags.nic_dalgona
end,
Like this (or somewhat like this)
that should work, yeah
this should still work in this instance right
i mean ijiraq itself does it but the conditions arent # based
-# i have no clue what G.GAME.pool_flags is :3
-# shit
-# bepis it's literally flags for pools
I saw it from Cavendish
as long as its a bool value, it should work
Whats nic dalgona?
-# im sorry for being dumb
-# no you just overthought lmao youre fine
My mod id and dalgona
is it not working
no i havent tested im just making sure im not missing something obvious
:3
Check how Gros Michel is coded in VanillaRemade
test it and see if it crashes lmfao
true
I did
Though I want it to not appear in shop but be able to spawn from a certain joker
Is that possible or nah
Oh then just put return false in the in_pool func
i have something like that, but i just return false and make the joker add the card
sdm was faster
sadge
ok it works let's go
😛
Will that not appear in the shop?
return false means it wont appear in shop, booster, etc
it will not appear in any way
Aight
hence it being out of the pool
Thank you my goat
how does weight work? does it support decimals? do smaller values = less or more density in shops?
1200 usd immediately
im gonna have to edit all these fake jokers at some point to not be able to appear if their real counterparts in the ijiraq effect table
i disagree
idk if im the right person but i could peruse
ok so dusk? isnt supposed to do this
thats alot of aces
it's supposed to do the retrigger, then also copy your scored hand
is that the entire fucking deck
Yes and yes
thanks!
™
no it's flush five aces copied 5 times
per ace
i see
so intended effect is retrigger the hand and then duplicate it?
i actually do something saimilar for a duplicator joker minus the retrigger
one sec
whats the default value for like. idk tarot packs. like whats their normal weight so i can change the weight based off of them
alright bestie i dmed u
thank you bestie
usage example in which the rate of all boosters is set to 0, then the Standard pack one is reset to normal
Okay so I put the in_pool false, but the joker I want to create the in_pool false jokers are just making Jimbo's (cause default)
Actually it's probably cause the joker is trying to summon the pool of jokers, but when I make it return false it kinda negates itself
i also have this at the top of my main file
It's a joker that only spawn unavailable jokers?
it's your own pool of jokers?
friend got this error earlier and im not able to recreate it. any ideas?
Talisman moment
we love talisman
I just want it to act like how souls and legendary do it
thank u bestie i thought u was a wizard
Ah so an exclusive pool
And whats in it?
return args and args.source == "a string you choose" in in_pool
and then do SMODS.add_card { set = "setkey", key_append = "a string you choose"}
Thing is I want it so where when selecting blind with the first joker (base dalgona) turns into either of there 4 other dalgona, but I don't want the other 4 to appear anywhere
Kinda weird ik lmao
are they fundamentally different jokers or just different art?
Different jokers
I don't know how to do different art
I assume it's possible to have them have different art with different functionality
I'm okay when it comes to modding lmao
what code do you currently have?
hey folks, so my funny little booster packs aren't actually showing up in the game. so whats wrong with my code?
Well since I wanted to act like a "riff-raff" I only got this
SMODS.Joker{ -- Dalgona Base
key = "dalgonabase",
blueprint_compat = false,
eternal_compat = true,
unlocked = true,
discovered = true,
atlas = 'nicjokers',
rarity = 1,
cost = 4,
pos = {x = 2, y = 2},
config = { extra = {} },
pools = { Food = true },
loc_vars = function(self, info_queue, center)
return { vars = {} }
end,
calculate = function(self, card, context)
if context.setting_blind then
card:start_dissolve()
local card = create_card("Dalgona", G.Jokers, nil, nil, nil, nil, nil, 'dalgona')
card:add_to_deck()
G.jokers:emplace(card)
end
end
}
SMODS.ObjectType{ -- Pool Dalgona
key = "Dalgona",
cards = {
['j_nic_dalgonacircle'] = true,
['j_nic_dalgonatriangle'] = true,
['j_nic_dalgonastar'] = true,
['j_nic_dalgonaumbrella'] = true,
}
}
SMODS.Joker{ -- Dalgona Circle
key = "dalgonacircle",
blueprint_compat = false,
eternal_compat = true,
unlocked = true,
discovered = true,
atlas = 'nicjokers',
rarity = 1,
cost = 0,
pos = {x = 3, y = 2},
config = { extra = {} },
pools = { Food = true },
}
SMODS.Joker{ -- Dalgona Triangle
key = "dalgonatriangle",
blueprint_compat = false,
eternal_compat = true,
unlocked = true,
discovered = true,
atlas = 'nicjokers',
rarity = 1,
cost = 0,
pos = {x = 4, y = 2},
config = { extra = {} },
pools = { Food = true },
}
SMODS.Joker{ -- Dalgona Star
key = "dalgonastar",
blueprint_compat = false,
eternal_compat = true,
unlocked = true,
discovered = true,
atlas = 'nicjokers',
rarity = 1,
cost = 0,
pos = {x = 5, y = 2},
config = { extra = {} },
pools = { Food = true },
}
Didn't have enough space for umbrella but it's the same thing
so just spawn one of your custom jokers?
OHHHH makes sense lmao thanks
Yeah
calculate = function(self, card, context)
if context.setting_blind then
card:set_ability(pseudorandom_element(G.P_CENTER_POOLS.Dalgona, 'dalgona').key)
end
end```
this should do the trick
it might be G.P_CENTER_POOLS.modprefix_Dalgona
that'll just change the closed one to one of the open ones
objecttype doesnt add the prefix im pretty sure
but I'm not 100% on how object types work
how would i go about adding a card to the deck after beating a blind? (specifically a non boss blind)
Someone should give me $250,000 USD rn
ok
Personally I deserve it for being smart and sexy all the time
true!
Anyway good morning everyone
my queen it is yours
take it all
thats a shame i meant it in the bestie friend awesomeness way where you take all of my money

I'll take your money dilly
will i get a firm hand shake in return
hey folks x2
do it in context.end_of_round and context.game_over == false and context.main_eval and not context.beat_boss
i give you all my money, you write me a check for 3x that, i cash that, i give you the difference
you then give me back half, and ill give you 3/4 of mine which we then invest in stocks under my accounts, wait 5 years, i give you 4/8ths of that
and then we go to walgreens
Also @tall wharf also I'm under the impression that you made the new mod menu UI which looks really cool so you did an amazing job!!! I really like it ❤️
dude i just wanted a burger
burger machine broke
We got chicken sandwich tho
oh winter snookums bestie i have a query for you since you have shadered before
yes
deal, ill be there in 27
Yes snookums?
wait im sold
i did yea
👏 !!!!
so i have a shader which works beautifully on jokers, but massively fucks up playing cards visually
is there a way with an edition i can choose the set to display differently?
ie if its set joker then it shows the normal, but if set default or enhanced it shows another one?
aiko is amazing
guys, how do you use the is_suit function. im new to this
card:is_suit("Hearts") for example, it returns true or false
Yeah it shouldn't be too hard, you'd probably need to hook the edition draw step tho
tyty
wat if I want to subtract money
graaahhh everything is a hook i must implode
okay can uhm someone help me with this many thankses!! :]
ease_dollars(-number) or in calculate return { dollars = -number }
ty so much!!!!
like this below? it doesnt appear to be working (although i am semi proud that this is what i initially tried, minus the context.beat_boss part)
its worth noting that this is being added to a deck and not like a joker
if context.end_of_round and context.game_over == false and context.main_eval and not context.beat_boss then
local card = SMODS.create_card { set = "Base", rank = "votd_Extraterrestrial" }
G.deck:emplace(card)
table.insert(G.playing_cards, card)
end
end```
oh i forgot context.main_eval is not a thing yet for decks, remove that and add not context.individual and not context.repetition
-# it is on dev branch
It is in latest dev yeah
i know its cool
Thank you Eremel
🫡
eremel youre so cool can i have your autograph
speaking about that, is there an easy way to know when the ante changed with contexts? ive been doing beat_boss but that might not be good with mods that change blinds
I don't think so right now
You're awesome and you put in so much good work, esp since you're mostly working on your own recently. I don't think people appreciate it enough and I want you to know that I'm noticing all the progress you're making and every improvement to SMODS is a genuine treat ❤️
some ante change context would definitely be nice
winter didnt you have an ante context or am i insane
with some return value to change how much the ante will change by
I did yeah
probably
I hooked ante, money, hands, and discards to all send contexts whenever the values change
i have a lot of once per ante effects because yugioh haha
It's inherently pretty basic, like it doesn't differentiate why the ante change occurred, so I mostly just assume based on the sign of the mod
I'm sure if I was to look for greater mid compatibility I'd need to make it more full features
that doesn't appear to have worked either?
code below just to make sure i did it properly
if not context.individual and not context.repetition and context.game_over == false and context.main_eval and not context.beat_boss then
local card = SMODS.create_card { set = "Base", rank = "votd_Extraterrestrial" }
G.deck:emplace(card)
table.insert(G.playing_cards, card)
end
end
i meant replace context.main_eval, not context.end_of_round
ah okay im silly lemme do that
worked perfectly, thank you!
I think just a general "ante is changing" context would be fine tbh
also going back to this, thank you!
yea you do fantastic work and i hope you dont feel it is unappreciated
youre a smart fella and im glad to use what youve done
recently one of my jokers broke somehow? anyone see anything wrong with this code? the joker is supposed to apply Polychrome to a random joker when any booster pack is skipped.
key = 'rainbow',
loc_txt = {
name = '{C:silly_rainbowgradient}Rainbow Card{}',
text = {
'Applies {C:edition}Polychrome{} to a random Joker when any',
'{C:attention}Booster Pack{} is skipped',
},
},
atlas = 'rainbow',
pos = { x = 0, y = 0 },
rarity = 3,
cost = 7,
unlocked = true,
discovered = true,
pools = { ['SillyPool'] = true },
loc_vars = function(self, info_queue, card)
info_queue[#info_queue + 1] = G.P_CENTERS.e_polychrome
return { vars = { G.GAME.ecto_minus or 1 } }
end,
calculate = function(self, card, context)
if context.skipping_booster and not context.blueprint and not eligible_card == nil then
local editionless_jokers = SMODS.Edition:get_edition_cards(G.jokers, true)
if editionless_jokers[1] then
local eligible_card = pseudorandom_element(editionless_jokers, 'hex')
eligible_card:set_edition({ polychrome = true })
else
return {
message = 'No Eligible Jokers!'
}
end
end
end
}```
it doesn't give me a crash report, it just doesnt do what it's supposed to. it does nothing.
not eligible_card == nil is always false
oopsies
so set it to ~= instead?
i would remove it, i dont know what youre checking there
But yeah it's sometimes easy to miss esp when you're not actively following SMODS that it's both crowdsourced but also not maintained by a huge team of people, so it's a very impressive project keeping it up and trying to suit the needs of its various users
How would one card:set_ability a pool of jokers
berdly theme started playing in my head
wdym
hey folks x4 :]
You either transition the incel bird or get him away from me so help me god
It's the dalgona thing again, being indecisive so
Well I know it's currently changing to dalgonacircle
thanks, another common N' W (you have been given +1 sinkhole token of appreciation!)
But what do I change to do the group
didnt eremel send the code for that
Right
"why do they call it the restroom if the beds are over here?" 
My bad
hey folks x5
how do i make a joker that does kinda what the abstract joker does, but it's X2 mult for each specific joker you have but from a POOL of cards.
iterate over G.jokers.cards and count how many are in your pool
the config should be config = { extra = 2, choose = 1 }
still giving the same error
did you restart the run
Ough good lord I am thinking of the stupid weird bull that I pulled with one of my Stands where it underlying pretends to be a joker the whole time
It's probably SO fragile
It creates a hidden joker that's always in the last joker slot, and then masks the true numbers of jokers in the slot with a visible card count on the card area, so any check to #G.jokers.cards inherently shows "more" cards than you have
Why my info_queue make me crash ?
whats the crash
that
by the way by the way this isn't working. any ideas why
no idea, seems to be a common issue
oh decks dont have info_queue
okay!! many thanks
but how do I show what is the effect of the voucher ?
can i see the full crash
also have you checked vanillaremade?
will check in a second but by full crash you mean the stack traceback yeah?
yes
thx I forgot that T:v_voucher_name works too
can i see the code for the seal
key = 'mastersprinkler',
loc_txt = {
name = 'Master Sprinkler',
text = {
'{X:mult,C:white}X2{} Mult for each {C:gold}Grow A Garden{} Joker'
}
},
atlas = 'mastersprinkler',
pos = { x = 0, y = 0 },
rarity = 3,
cost = 6,
unlocked = true,
discovered = true,
pools = { ['SillyPool'] = true },
config = { extra = { Xmult = 15 } },
loc_vars = function(self, info_queue, center)
info_queue[#info_queue + 1] = { key = 'silly_growagarden', set = 'Other', vars = { "Master Sprinkler" } }
return { vars = { center.ability.extra.Xmult } }
end,
calculate = function(self, card, context)
if context.joker_main then
if G.jokers.cards[i].config.center.pools and G.jokers.cards[i].config.center.pools.GAGPool then
return {
card = card,
Xmult_mod = card.ability.extra.Xmult,
message = '+Wet!',
colour = G.C.MULT
}
end
end
end
}```
and the mod's prefix is seel?
nvm i fixed it
is there something wrong with this code, i broke it again
key = 'mastersprinkler',
loc_txt = {
name = 'Master Sprinkler',
text = {
'{C:mult}+5{} Mult for each {C:gold}Grow A Garden{} Joker'
}
},
atlas = 'mastersprinkler',
pos = { x = 0, y = 0 },
rarity = 3,
cost = 6,
unlocked = true,
discovered = true,
pools = { ['SillyPool'] = true },
config = { extra = { mult = 5 } },
loc_vars = function(self, info_queue, center)
info_queue[#info_queue + 1] = { key = 'silly_growagarden', set = 'Other', vars = { "Master Sprinkler" } }
return { vars = { center.ability.extra.mult } }
end,
calculate = function(self, card, context)
if context.joker_main then
return {
card = card,
mult = card.ability.extra.mult * G.jokers.cards[i].config.center.pools.GAGPool,
message = '+Wet Mutation',
colour = G.C.MULT
}
end
end
}```
does it crash
so what should i do instead
and card.config.center.pools doesnt always exist
im trying to make it give you +5 mult for every joker you have that's in a specific pool
like abstract joker but cooler
if context.joker_main then
local count = 0
for _, joker in ipairs(G.jokers.cards) do
if (joker.config.center.pools or {}).GAGPool then
count = count + 1
end
end
return { mult = card.ability.extra.mult * count }
end
thanks you
whats the code? do you have talisman?
you get 2 sinkhole token of appreciation now
nevermind i got it i put the mult = in the if statement without a return
yeah
it works now
ok so i dont have a local joker
how do i set that up
oh
G.jokers.cards
ok thanks
for _, G.jokers.cards in ipairs(G.joker.cards) do
this has red squigglys all over it
and it says the problem is "Malformed number."
oh thanks
this context for my Partner isn't correct:
if context.other_main and context.other_card and context.other_card.ability.set == "Tarot" then
what should it be? it should trigger similarly to Observatory, but for all Tarots
i've checked Obvservatory's code, but it doesn't seem relevant
how do i fetch the most played hand?
do what obelisk does
G.GAME.hands[context.scoring_name].played?
that gets how many times the current hand has been played
you loop through G.GAME.hands and get the most played
does nothing
ah so the for k,v in pairs(G.GAME.hands)
context.consumeable_used doesnt exist
key = 'mastersprinkler',
loc_txt = {
name = 'Master Sprinkler',
text = {
'{C:mult}+5{} Mult for each {C:gold}Grow A Garden{} Joker'
}
},
atlas = 'mastersprinkler',
pos = { x = 0, y = 0 },
rarity = 3,
cost = 6,
unlocked = true,
discovered = true,
pools = { ['SillyPool'] = true },
config = { extra = { mult = 5 } },
loc_vars = function(self, info_queue, center)
info_queue[#info_queue + 1] = { key = 'silly_growagarden', set = 'Other', vars = { "Master Sprinkler" } }
return { vars = { center.ability.extra.mult } }
end,
calculate = function(self, card, context)
if context.joker_main then
local count = 0
for _, joker in ipairs(G.jokers.cards) do
if (joker.config.center.pools or {}).GAGPool then
count = count + 1
end
end
return {
mult = card.ability.extra.mult * count,
message = '+Wet Mutation!',
colour = G.C.MULT
}
end
end
}```
what can i use instead?
context.using_consumeable
(bump)
is there no other way to fetch it? or would the loop work inside a SMODS.add_card()? (in a way to fetch the most played hand and give the player the respective planet card)
nvm i think i fixed
so i make a local variable that stores the respective key for the most played hand and then, after the loop has stored the key, give the player the respective planet card?
yes
gotcha
still does nothing
bro it's still broken 😦
key = 'mastersprinkler',
loc_txt = {
name = 'Master Sprinkler',
text = {
'{C:mult}+5{} Mult for each {C:gold}Grow A Garden{} Joker'
}
},
atlas = 'mastersprinkler',
pos = { x = 0, y = 0 },
rarity = 3,
cost = 6,
unlocked = true,
discovered = true,
pools = { ['SillyPool'] = true },
config = { extra = { mult = 5 }, },
loc_vars = function(self, info_queue, card)
info_queue[#info_queue + 1] = { key = 'silly_growagarden', set = 'Other', vars = { "Master Sprinkler" } }
return { vars = { card.ability.extra.mult } }
end,
calculate = function(self, card, context)
if context.joker_main then
local count = 0
for _, joker in ipairs(G.jokers.cards) do
if (joker.config.center.pools or {}).GAGPool then
count = count + 1
end
end
return {
mult = card.ability.extra.mult * count,
message = '+Wet Mutation!',
colour = G.C.MULT
}
end
end
}```
what's line 892
mult = card.ability.extra.mult * count,
did you restart the run before testing
i can
i'll check anyway thanks
n would this work
oh so thats what you meant by two loops
thank you
i need to check the corresponding planet card to a poker hand
also youre never updating playmorethan so you wont get the most played
3 tokens of sinkhole appreciation
what should i do then
i just did it for my mod
local planet
for _, center in pairs(G.P_CENTER_POOLS.Planet) do
if center.config.hand_type == handname then
planet = center.key
end
end
return planet
update it
so for every poker hand played after the start of the run i update it or
no, in the loop
obelisk only checks if a hand was played more than the current one
you dont want exactly that
you want to loop and get the most played
so you need a variable to keep track of the highest value
is making a partner easy
ok so I'm trying to make a seal which stops a card from being debuffed but it doesn't prevent a debuff at all, I've tried triggering it if the game is into a boss blind, or when it's drawn to hand, but nothing wants to work, here's my code
does balatro store the value of played hands for each poker hand or do i have to do it manually
what's the name of the value
i have a general idea of what i need to do
in that loop it's v.played
would this work
yes
no shot
you might not need the k != scoring_name part
unless you specifically dont want it to give the scoring hand
ill remove it
also playmorethan should start at -1
ethan?
chat who else hates the nonsensical names for certain functions
like we have press_play instead of play_hand
i think both make sense
press play seems very out of the blue for something that's always referred to as play_hand
i think the only time it is referred to as play hand is in-game and who knows when that was the phrase decided for the button
press_play is when you press play
I'd say press_play is pretty sensical tbh. It's when you press the play button, immediately before any other calculation occurs
G.GAME.current_round.discards_left = G.GAME.current_round.discards_left * 2?
I am once again
aboard an aircraft
Yay!
okay now what could hands possibly be
...
hands_left...
can you give consumables individual weight? like, make some consumables rarer than others in booster packs
not yet
Context: I tried making a chicken that gives you an egg at the end of the round
but if i dont it crashes
looks like bad event managing
did you forget a return true
yeah, I forgot that was the issue
lol
just thought it was a funny bug
happens to the worst of us (im the worst of us)
oh yeah what would happen if you have a card thats X2 discards and get drunkard, would drunkard give +2 discards or uh
and my hooks
oh you can have a custom soul card yeah
or you can do some jank pool manipulation
he means just not individual weights, souls have their own weight
Do soul and black hole have the same weight?
I think they're both set to 0.003
is there a context for when a discard is done/cards are getting drawn to hand after a discard?
there is context.pre_discard
it's context.drawing_cards, but it occurs any time you draw a card (after hand played, card limit change, etc)
does that count every hand drawn or only after a discard?
how could i make a card's description appear differently in the collection again?
That example would be any draw after your first discard. You might need to set an internal flag on whatever you're calculating to know when to use it
sounds too complicated
if card.area.config.type == "title" and return a key to a different localization?
ill do it the old annoying way
if context.pre_discard then card.ability.active = true end
if context.hand_drawn and card.ability.active then
card.ability.active = nil
-- do stuff here
end```
how do i give the player a random tag?
how do i use
set_badges = function(self, card, badges)
didn't realize that was the name of the cardarea specific to the collection, thanks!
how long did it take you to find that message
it was only sent like 15 hours ago
does #G.tags exist
wait do you think i scrolled for it?
no it just surprised me you'd know like "oh that guy said that like 15 hours ago"
im on this channel a lot
i know that yeah
how can i reference a variable in message =
just using #1# doesnt seem to work
No, it's G.GAME.tags
This loads the jokers fine. But the enhancers aint there. Whass wrog?
If I have a Roulette joker that I'm trying to see if I can get working. Essentially it:
- Bets (costs) $1 per card played [todo, but should work like "The Tooth"]
- Each hand it spins the wheel and selects a rank
- If that rank is in your hand it pays out 5x what you "bet".
I have it randomly choosing a rank, limited to cards in your deck. And I have it animating for 5 seconds to show the "spin", but I when the spin finishes how can I force it to show the card that was selected - Ideally right under the joker, kind of like what card_eval_status_text(card, 'extra', nil, nil, nil, {message = localize('something')}) would do, but when Ic all that from inside the event that stops the animation, it doesn't seem to display right then. It just updates the message and it shows after scoring
are you using localize or are you writing the message directly?
i used localize and then thought i could maybe do it directly
SMODS.calculate_effect({message = "message", instant = true}, card)
(localize('k_upgrade_ex') that is)
directly it would be message = "This card gives " .. mult.. " mult!" like that
for localize you need to have a localization key in v_dictionary
what should be in place of the ". . mult. ."
badges[#badges+1] = create_badge(localize('Item'), G.C.UI.TEXT_INACTIVE, G.C.BLACK, 1 )
end,``` why this no work
it shows "ERROR"
mult is the variable
.. is the operator for concatenation
oh okay
you probably don't have an Item key in the localization
remove the localize()
it aint work
it does
why do you need a message for xmult anyway
+X0.1 per card discarded this blind
when a discard is done it shows like how much xmult it has
message = localize { type = 'variable', key = 'a_xmult', vars = { xmult } }
from throwback
owh
is there a way i can wrap them so instead of one line they split into multiple lines?
wdym? having all three lines in a column? or splitting each line into multiple lines?
for some reason SMODS.add_card { set = 'Enhanced', enhancement = 'm_steel', area = G.hand } sometimes creates a card with no front (you can see how of those many I created, only 2 ended up like this)
How the skibidi do I make config with checkboxes I don't understand the docs
i mean like instead of making the letters smaller it wraps them around
very long string made for demonstration
->
very long string made
for demonstration
Oh I see, I'm meant to pass 'Base' or 'Playing Card' as set
Hello
Didn't get that
my mod has a pretty simple config tab that's just a bunch of checkboxes https://github.com/nh6574/JoyousSpring/blob/c0a24f9ba7e75f51d8ec09f22f12329c7a837cca/src/mod_info.lua#L216
THANK YOU
yeah, when i made it i realized that something like that could happen and I thought eremel fixed it but i guess not
well, at least it's an easy solution
no, you need to do it manually
you can try adding \n in the text
damn
dont you love UI
even if this worked it would take me longer to insert new line characters into my ~220 strings than just writing some function
<@&1133519078540185692>
kill kill kill
now you can make a function that inserts the new lines
can someone please help? I'm trying to make a seal which stops a card from being debuffed but it doesn't prevent a debuff at all, I've tried triggering it if the game is into a boss blind, or when it's drawn to hand, but nothing works, here's my code
hi srock
update = function(self, card)
if context.debuff_card == card then return { prevent_debuff = true } end
end
how do i get the chip value while scoring (not the total chips gotten during the blind)
there are no contexts in update
damn i was so close to being helpful
hand_chips
thanks goat
N you upset me
also we don't generally use update for anything
why!
i dont know how seals work
why dont they have apply and remove functions
cause i was typing this whole thing saying for the total score you can do hand_chips * mult and then just for the chips you could do hand_chips and then i was gonna say the mult too but i type too much instead of just giving the answer
ur too fast
i think if you're replying with the same thing but more clearly you should still do it
use calculate instead
calculate = function(self, card, context)
if context.debuff_card == card then
return { prevent_debuff = true }
end
end
😁
is this better N'
that makes more sense, but idk if it works with seals
i presume calculate would work here cuz its mentioned on the docs
i know calculate works
I did have an error with the previous code you sent, ill test this now
yea no harm in testin, if it works then we have a baller solution
if it works then of course it worked, im edward robinson
what if it doesnt
why does it appear as if i blocked myself
probably because idk shit, im edward robinson
you hate yourself
i do
but i like u which means it cancels out
my entire range of emotions can only be conveyed through anime gifs and they've taken that from me
it still doesn't "un"-debuff the card, and I would try to help but I'm still no good at this lmao
that's odd, it shouldnt allow the card to be debuffed in the first place
unless you're adding the seal to a debuffed card?
The thing activates when other card get sold. How do I specify it is only this card?
The thing doesn't even work. Says _poi_card is nil (or sometging else i don't remember) so someting is wrong there. (Did N' make the wiki page?)
Is this correct for making it not be in the shop?:
in_pool = function (self, args)
return { false }
end
nope, added the seals during small blind, come to a boss blind and debuffed
would that check if the card should be debuffed with the changes? if so then I'd assume so
it should be return false without the brackets
also no i wrote like 2 lines total in the wiki
oh for only this card it's context.selling_self
Ok.
But I'm pretty sure something is wrong with the thing that randomizes and sets an enhancement.
I thought prefixes had to be 3 chars
i don't think you can set card.ability.debuff, try card:set_debuff(false) maybe
taking a guess after looking at source stuff
that cant be the issue as the p_whatever is only the string as a seed
no it's in your set ability
send the code for the blind
So I've got to put card:set_debuff(false) under the context.debuff_card if statement? or do I need to return it?
under the if statement
update = function(self, card)
card.debuff = false
end
try this one first ^ but if it doesnt work, this one probably better
update = function(self, card)
if card.debuff then card:set_debuff(false) end
end
SMODS.current_mod.set_debuff = function(card)
if card:get_seal() == "modprefix_sealkey" then return 'prevent_debuff' end
end
could u not question mark my attempts to help w/ something k thx
When pulling out the collection/enhancements for my mod I get a stack overflow. Something is wrong with em but what?
vvv Logs
You have your own object as an info_queue so it loops
anyone?
(sorry N lol)
Yes! Thanks so much! This worked perfectly, I appreciate your help a lot!
in your fucking FACE @daring fern
sorry for ping riftbreaker
nws, worth the comeback
noted
this is the better approach
mr poly bridge react with this message
if you the uh
True
this guy gets it
well duh but whatever
how can i use the mult base value for a condition?
is it more efficient or something? I might be stupid
Yes.
You mean the mult like the one jokers give? if so just call mult (it's a global)
Guys listen to guru Somethingcom
oh thanks
Shit wrong response
update runs every frame, the other approach only goes when the game attempts to debuff cards
so yes very much more efficient
ohhhh damn yea
It's always better to avoid using update
how can i create a joker starting with an edition and a sticker
can someone lock in and tell me whats wrong here
Create a set_ability function and init your stuff inside
what code did you add that caused this crash
Any joker or a specific joker?
specific
crashes if i click cash out after beating it
did you start a new run
Can you go into your Mods/lovely/dump and show what's at functions/common_events line 2630?
............................................fuck
oh lol
when you start a new run, your boss gets added to G.GAME.bosses_used
and if it's not there, death
ah
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play and
G.GAME.current_round.card_picker_selection then
if context.other_card:get_id() == G.GAME.current_round.card_picker_selection.id and
context.other_card:is_suit(G.GAME.current_round.card_picker_selection.suit) then
return {
x_mult = card.ability.extra.x_mult,
x_chips = card.ability.extra.x_chips
}
end
end
end
how do i make it so that it counts for the unscored cards
instead of the played one
Change context.cardarea == G.play to context.cardarea == 'unscored'
thanks
@sonic cedar do you have any issues with floating sprites dissapearing when you have mutliple and a card has an edition?
Fairly certain I know what issue you're encountering here
yeah?
ive looked through the draw_shader function and all floating_sprite mentions and i cant find the fix
What are the additional sprites you're making, and where are you drawing them?
making additional soul sprites and drawing them in my cards draw function
Mhm
Centers are drawn before editions (including their custom draw functions) in the draw step order, whereas the floating_sprite DrawStep is after it
Every vanilla edition except foil draws its shader as completely opaque
So your additional sprites are getting drawn, then the edition gets drawn on top of it as an opaque layer, then the floating sprite is drawn
If you test the card with Foil, you're likely to actually see all the sprites you want, because it doesn't use the base pixels of the center child
how exactly does weight work for enhancements? i find it so weird because apparently the default is 5, but when its set to 1 i dont notice them being that much rarer and they still appear even if its set to -1 or something
ahh shit, do you know where i need to patch in that case
Easiest way to do it is to just make your own DrawStep for it and put it in the order later than the edition shader step
if i define the suit in the description, say #3#, would it show the color of the suit?
Additionally, soul layers support their own custom draw functions
You could likely implement that and draw the other sprites there instead in addition to the single one supported in vanilla
Since those will also get called later than the editions in the draw order
can you elaborate on this? i have no clue how to use this
ahh right, ill try a draw step ty!
Something like
set_ability = function(self, card, initial, delay_sprites)
card:set_edition...
onto your SMODS Joker object
Specifically, you store it in the soul_pos property on the center
self.config.center.soul_pos.draw(self, scale_mod, rotate_mod)```
How do you add a mod icon?
SMODS.Atlas{
key = "modicon",
path = "your_filename.png",
px = 34,
py = 34,
}
key has to be modicon
Nice
Thanks
we love ui
Lose
Lose
who's "we"
They're writing in french don't mind it
is there a way to customize jimbo's lil quip after getting a game over at all
-# like say if i made an instaloss mechanic the lil guy says "lol you died" instead of one of the default ones
Yes.
how so if i may ask
-# [i do NOT know how to mess with jimbo talking at all actually, i didn't see anything about it on the smods wiki but i may be blind]
It requires lovely patching.
Because I hope this will pass review and because a friend of mine made it, I'd recommend stealing code from this PR: https://github.com/Steamodded/smods/pull/745
love a good session of refactoring
does anyone know why this keeps crashing?
key = "onsightkanye",
path = "onsightkanye.ogg"
})
SMODS.Joker{
key = 'onsight',
loc_txt = {
name = 'ON SIGHT',
text = {
"{C:dark_edition}test{}",
}
},
atlas = 'Jokers',
rarity = 3,
cost = 3,
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = false,
perishable_compat = false,
pos = {x = 0, y = 0},
config = {
extra = {
Xmult = 4
}
},
calculate = function(self, card, context)
if context.joker_main then
return {
Xmult_mod = card.ability.extra.Xmult,
sound = "onsightkanye",
message = "ON SIGHT!"
}
end
end,
check_for_unlock = function(self, args)
unlock_card(self)
end,
}```
```Oops! The game crashed:
Thread error (Thread: 0x02453b0028a0)
Could not open file resources/sounds/onsightkanye.ogg. Does not exist. ```
Yes, you need your mod prefix.
Hey there! I'm new to modding Balatro and I wanted to make a test mod just to try the waters, and I wanted to ask something, is there a way to check the value of a discarded card?
What's being refactored here?
You mean the chip value?
Yep!
--- MOD_NAME: BoMod
--- MOD_ID: BoMod
--- MOD_AUTHOR: [BoNoise]
--- MOD_DESCRIPTION: A mod that adds some jokers to the game (my friends profile picture joker, and more)
--- PREFIX: xmpl```
xmpl right?
>sorry im new to this
In context.discard you would check context.other_card:get_chip_bonus()
Yes.
Oh thank ya! I'll try it!
For future proofing I'd suggest you change to using a json file for metadata since the string headers are legacy and could eventually be deprecated
like BoMod.json or something like that
Yeah. There's a page for the formatting on SMODS, Mod Metadata
It's very similar, just formatted slightly different
oh thanks i will do that
ortalab mythos cards, few effect adjustments too in here
Ooooooh neat
How do I i detect if I am in the shop at this current moment?
if G.STATE == G.STATES.SHOP
Also if I want to send a message above a card shosen by a pseudorandom elemtemt with the arary G.hand.cards
how can i get a joker to spawn a specific negative & eternal joker
and is G.deck.cards valid?
SMODS.add_card { key = 'j_prefix_key', edition = 'e_negative', stickers = { 'eternal' } }
thank you
in a run yes
G.deck.cards are the remaining cards in deck tho
If you want the full deck use G.playing_cards
you'd do return { message = "hi", message_card = some_card }
where some_card is the card you want the message to appear on
how do you add a seal to a playing card
card:set_seal("modprefix_key")
modprefix?
Yes.
but i want to give the played card a red seal
card:set_seal("Red")
It says it got a number instead of a table. Does that not create a table? And how do I make it not be a value/number?
Log?
how can i make a multiplicative chips joker? the way i have it set up now is making it not use the current value of chips to multiply by, but instead what it was when it first reached the scoring card, so any chips added between getting to the scoring card and calling 'hand_chips' is unnaccounted for
xchips = number
under lovely/log
oh so it does just exist
it didnt show up in the autocomplete so i assumed it wasnt a thing
pseudorandom_element returns 2 values, the 1st is the index and the 2nd is the value
oh right, well, dunno what the error is then
you can have the logs
Also remove the true in set_ability
That's only for its initial creation.
What is that line in the lovely dump?
it's saying you passed 52 to the first argument of pseudorandom_element
did you forget to save your code
wait how do I get the deck name? can i just do SMODS.back.key == "keykey"?
don't think
pretty sure i did
save it that is
G.GAME.selected_back.effect.center.key == "b_modprefix_key"
which line is 149 on your jokers.lua file
thank you very much!
right before the calculate funtion (I was wrong)
can you send the entire calculate function
it's G.playing_cards with an s at the end
aaa
its all a blur for me at this point
And now only the backfround is rendering until I play the card
in set_ability pass :set_ability(what you have, nil, true)
Did you remove the true?
No, that will make it not change the sprite.
that will change the sprites in an event
notice the nil
Yes.
When the card is created?
Did what I said not work
this
it has scary ?
Also pretty sure the "true" wasn't the problem
Just try it :set_ability('m_pot_poisonous', nil, true)
ocay
i conquered ui enough for me
Thats looks kinda bad
enough for me
I think you did fine
it's definitely not something i'd use over the vanilla way
i like it this way because my brain is odd and thats ok
It's be better to use approach more like React, smth like:
local text = BUI.T({ ... })
local row = BUI.R({ ... attributes }, text)
Make types for them
etc
not really, this has a lot of the things i dislike abt balatro ui still
i like my approach because it makes it readable for me
It's too bloated
It looks like from other engine or smth
Not web one (imo best implementation possible)
again this isnt something im releasing its just for me
Maybe I'll make own framework at some point, to make balatro UI easier
Anyone have any ideas in how i can do this? (I have to do it for both here and hovering over the deck)
For me or edward?
for you
oh ok cool
Once i get this done, I can do some CRAZY mods
btw, i can use photos in UI right?
Sprite

