if context.end_of_round then
if context.main_eval then
if SMODS.last_hand_oneshot then
G.GAME.interest_amount = G.GAME.interest_amount * card.ability.extra.interest
end
end
end
end,```
also it still gave me $9 even though i didnt have the joker
#💻・modding-dev
1 messages · Page 701 of 1
im assuming you reset the run
oh, i see
no i tested the joker then sold it
well this is a permanent change
oh
if you want it to go back you need to reset it in remove_from_deck
It works, thanks
i will do a lil debuggin now thinking
first time i think
i have to make the joker dont trigger debuffed cards
check raised fist :3
i did it
the joker is supposed to triple the FINAL amount of interest gained at the end of round ONLY IF you win with fire effects
I DID MY FIRST SOLO DEBUGGIN, LETS GOOOO
calculate = function(self, card, context)
if context.end_of_round then
if context.main_eval then
if SMODS.last_hand_oneshot then
G.GAME.interest_amount = G.GAME.interest_amount * card.ability.extra.interest
end
end
end
end,
remove_from_deck = function(self, card, from_debuff)
G.GAME.interest_amount = G.GAME.interest_amount - card.ability.extra.interest
end,
and this is what i have
was only adding this
im doing calculations and that doesnt look right
with 20 dollars
20/5 = 4
4*3 = 12
NOT 36
or am i stupid
it should be 12 yeah
so why is it 36
again, are you resetting the run
sorry yeah mb hold on
if you want it to only happen for that round you should reset it in both remove_from_deck and in context.starting_shop (making sure you only do it once)
also the opposite of multiplication is division not subtraction lol
okay i played one with fire effects and got 6 (which is correct, i had 14)
and then i played one without fire effects and got 5 (which is correct, i had 25)
and then i played another one with fire effects and got 5 (which is incorrect, i had 36)
last one shoulda be 21, yeah?
if context.end_of_round then
if context.main_eval then
if SMODS.last_hand_oneshot then
G.GAME.interest_amount = G.GAME.interest_amount * card.ability.extra.interest
end
end
end
if context.starting_shop then
G.GAME.interest_amount = G.GAME.interest_amount / card.ability.extra.interest
end
end,
remove_from_deck = function(self, card, from_debuff)
G.GAME.interest_amount = G.GAME.interest_amount / card.ability.extra.interest
end,```
what did i do wrong this time
the problem is that you are always resetting the value
you only want to do it when you increase it
need a little help here:
calculate = function(self, card, context)
if context.main_scoring and context.cardarea == G.play then
if next(SMODS.get_enhancements(card)) then
return {
Xmult = 2
}
else
return {
mult = 15
}
end
end
end
what should happen is that enhanced cards should give X2 mult, but they give +15 for some reason..?
idk what im doing wrong
any idea why this won't modify the cards rank
it works if I call it manually with debugplus
replacing _card with dp.hovered
nvm problem solved
how can i make sure that the joker in the shop is selectable, but not in the joker cardarea? this is the original hook but i cant figure out how to make it work
function CardArea:add_to_highlighted(card, silent, ...)
if card.config.center.key == "j_Krypton_LiamCat" or card.config.center.key == "j_Krypton_UltimaJungle then
return nil
end
return StayTheStill(self, card, silent, ...)
end```
card.area and card.area == G.jokers
function CardArea:add_to_highlighted(card, silent, ...)
if card.config.center.key == "j_Krypton_LiamCat" or card.config.center.key == "j_Krypton_UltimaJungle" and card.area and card.area == G.jokers then
return nil
end
return StayTheStill(self, card, silent, ...)
end
like this?
yes
it doesnt seem to prevent the joker from being unselectable in the shop
what about self == G.jokers
```` if card.config.center.key == "j_Krypton_LiamCat" or card.config.center.key == "j_Krypton_UltimaJungle" and self == G.jokers then ``` like that?
what the equivilant for SMODS.Jokers for enhancements?
SMODS.Enhancements?
I have a doubt
there might not be one
I am doing a joker that gives -15 mult (Dont ask (Is balanced, i swear)) but i want to do it only if mult is more than 20
if mult > 15
iirc
mult and chips are global variables
SMODS.Enhancement.obj_table should exist
I think something like this but with a if and some things
sob
like, if mult > 20 return -15 mult
but i know is not just mult
because is a global variable
what is this
calculate = function()
if mult > 20 then return {mult = -15} end
end
thas all you need
I kinda knowed it
thats for making the default scoring use chips-mult
oh
not for subtracting mult in an effect
thanks
is there one for spectrals or consumables?
I need to get the loc_vars and use of another mods consumable
consumables should be the same
i need to do a joker trigger something after scoring a hand
like
before ending a hand but after all cards score
context.after
thanks
Is there a way to make played cards shuffle back into your deck? Thinking about making a joker that causes the first hand you play each round to be shuffled back in, but idk 🤔
Considering making this an enhancement effect instead
check aikoshen
kyofu all back
help
they can
so... whats happening?
btw, already proved that negative values can exist, a friend has this joker in his jokerforge mod
your wrapping values in tables
uhhh, i have to hard code them?
do mult = value and chips = value, not mult = {value} or {chips = value}
oki doki
not what I said
SMODS.Joker {
key = 'chaosquartet',
atlas = 'StarterPackJokers',
pos = { x = 6, y = 5 },
rarity = 3,
blueprint_compat = true,
cost = 2,
discovered = true,
config = {
extra = {
xmult = 2, mult = 15
}
},
calculate = function(self, card, context)
if context.cardarea == G.jokers and context.joker_main then
if playing_card:is_suit("Hearts") then
hearts = true
end
if playing_card:is_suit("Diamonds") then
diamonds = true
end
if playing_card:is_suit("Clubs") then
clubs = true
end
if playing_card:is_suit("Spades") then
spades = true
end
end
local all_suits = hearts and diamonds and clubs and spades
if all_suits and context.poker_hands["Four of a Kind"]then
return {
mult = card.ability.extra.mult,
Xmult = card.ability.extra.xmult
}
end
}
trying to make it so that it procs on four of a kind that is all 4 suits
Something like this can work?
please don't hardcode
but yes thats correct
oh context.after won't score
use context.final_scoring_step
look into vremade flowerpot
you got it boss!
oh its hand_chips
hand_chips = 79 ?
Question, I have a set of jokers i've made, and want to create a booster pack that only displays from those jokers- ( pool of 10 )
Is there a way to do this ToT, I tried making a global function to generate the card keys randomly and force them but- it works, but it doesn't account for the joker dupilcating so i want to ask if there's like a built in api for this or 
you can do that with context.stay_flipped now, should be in the docs
ty-

👍 will look into it
mult
thanks
sorry for asking, how i can see the amount of hands remaining?
probably is in a page but i cant find it
G.GAME.current_round.hands_left
got it "mostly" working thanks to you, but im debating whether I completely fix it (im trying to make it the first hand you play, but its only triggering on the first card) or if I should buff it so its every card you play
was already considering doing that
I mean I guess thats not necessarily a buff either, sometimes u wanna play trash to dig into ur good stuff
hmm
could also make it so cards with enhancements/editions shuffle, but not "useless" cards
hmmmm
this might be better as an enhancement after all
Actually, imma make it every card you play. I've decided 🔥
Anyway, thanks for the help!
Hikers best friend
thanks
How do you make initial release for your Mod in GitHub?
push the changes to the repo & then go to the repo on github & look where it says "create a new release"

Thank You
is there anyway to make a custom card destruction effect, like how glass shatters instead of the burning(?) animation that cards normally have when destroyed?
how can I get a consumable object of another mod to hook its functions
something like this but SMODS.Consumables doens't exist
okay this problem has been solved
keep getting this crash now
nvm fixed it
needed to use SMODS.Spectral
How would a give a Joker (from my mod) "another life", and when it's sold/destroyed, it comes back (only a certain amount of times)
if context.joker_type_destroyed and context.card == card then return {no_destroy = true} end
I've read that I can use {T:v_crystal_ball} to create a tooltip on text hover, but how can I create my own tooltip?
I didn't really get this
for a deck?
Joker.
that's not what you need then
how do i retrigger a joker?
is there a way i can make an enhancement make a card score no chips at all?
either replace the base card like stone and set the bonus to 0 or hook Card.get_chip_bonus
so i put this at the top of my main file?
SMODS.current_mod.optional_features = {
retrigger_joker = true
}
how do i make the description for a modded seal appear next to a consumable?
cant seem to figure it out
tried using SMODS.Seals.[seal] but that doesnt work
Why isn't this properly scoring?
nevermind im being stupid yet again
context.joker_main not context.main
How do I get the discovered consumables from the collection? Like, from my consumable type specifically
im trying to make a thing where it "revives" a joker if sold/destroyed, but the "Saved" message appears and THEN it destroys, so ig this happens too early, how can I make this happen later?
if (context.destroy_card and context.destroy_card == card) or context.selling_self then
if fv.walnut_stock and fv.walnut_stock > 0 then
card.getting_saved = true
return {
no_destroy = true,
message = "Saved!",
colour = G.C.FILTER,
func = function()
G.E_MANAGER:add_event(Event({ -- fx
trigger = 'immediate',
func = function() card:juice_up(0.8, 0.5); return true end
}))
G.E_MANAGER:add_event(Event({ -- delay/update
trigger = 'after',
delay = 0.6,
func = function()
fv.walnut_stock = fv.walnut_stock - 1
card_eval_status_text(card, 'extra', nil, nil, nil, {
message = "-1",
colour = G.C.FILTER
})
card.getting_saved = nil
if fv.walnut_stock <= 0 then
fv.walnut_stock_flag = false
for i, row in ipairs(card.ability.extra_rows) do
if row.key == "fv_walnut_stock" then
table.remove(card.ability.extra_rows, i)
break
end
end
end
return true
end
}))
end
}
end
end
also, how can I add a rarity badge, like how Jokers have, to a consumable?
appending centers to the info queue only works for centers; i think smods added an alternative solution for seals but i don't remember what it is
the vanilla way is like this
info_queue[#info_queue + 1] = { set = "Other", key = seal_key, specific_vars = seal_vars }
alternately i'm told appending G.P_SEALS[seal_key] works just like a center?
it does now, yeah
how could i go about making it so that a certain enhancement doesnt appear in the collection?
Add no_collection = true to your Enhancement
thank you!
.
if context.end_of_round then
if not SMODS.last_hand_oneshot and G.jokers and #G.jokers.cards < G.jokers.config.card_limit then
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.4,
func = function()
SMODS.add_card({ set = 'inv_food' })
card:juice_up(0.3, 0.5)
return true
end
}))
delay(0.6)
end
end
end,```
this creates one of each in the pool, why is that
its meant to create just 1 card from that pol
add context.main_eval
end of round is called a bunch of times
oh yeah
Does anyone have an example of using ref_table/ref_value in a UINode that doesn't define func or button?
I'm reading the UI guide and apparently ref_table can be passed to "UI nodes" (implying directly to the UI nodes themselves?)
nvm got it - the text in G.UIT.T can be ref_table[ref_value]
Does set_badge exist for them? Id guess thats the easiest way afaik
I don't know how I'd use that.
Well, create a badge with the rarity ig
and the object in G.UIT.O can be ref_table[ref_value], but this seems jank since the previous object isn't removed?
you need to :remove() it yeah, vanilla does this in a couple of places
Does it? Trying to look around and I'm not finding anything
or maybe my regex is inadequate
.
Does set_badges also work with jokers?
I mean that vanilla removes the objects that way to replace them but I think it just replaces object directly
yeah
ah, i see
Oh cool
Time to go back and update every single bunny joker to have the bunny badge through set_badges
ref_table is probably useful if you don't want to find the node itself to modify the object
that's a good point
I went with the mindset that ref_table[ref_value] is dynamic so I was concerned with this implementation
-# bump
how do i check if the player has high contrast cards enabled?
G.SETTINGS.colourblind_option?
Inferring from a search through the game code itself.
ah
-# hello..?
hi!
-# i meant to bump my question but
hello
😄
what would be the if statement for a seal that does something
ONLY IF the card under the seal is a face card
move the saved message after the function? or im stupid
One second, I'll take a look
idk how i'd move message = there
also i think i figured this out
Try moving the stuff in func before and outside the return table entirely
what stuff?
I'll show with a screenshot, but first can you edit that post so that the first ``` has a "lua" after it? for syntax highlighting
ok updated it
(and also remove func since it's become empty)
func is called after the rest of the arguments in the return table are processed
like this?
Yeah, this should destroy the card and then show the "Saved" message
my uh
loc_vars #1# doesnt work on my seal
return { vars = { card.ability.extra.mult } }
end,```
```config = { extra = { mult = 5 }, },```
card.ability.seal.extra.mult
thank u
...huh
making a blueprint joker that copies the effect of the last purchased joker, but the console keeps getting spammed with Found effect table with no assigned repetitions during repetition check
do i need to return a repetition with this? the joker works fine otherwise
anyone know where i can find blank joker art of stuff like cavendish, flower pot, turtle bean, etc
and if i want to do a check in an if statement about the card said seal is applied to?
it's not context.other_card:, right?
i wish i could tell you
but i have no idea
I'm not sure if this changes anything but that stuff is used in cookielatro.calculate_building_bonuses()
the calculate function is here
calculate = function(self, card, context)
local special_ret = cookielatro.calculate_building_bonuses(card, context)
if special_ret then return special_ret end
if context.individual and context.cardarea == G.play then
local fv = card.ability.extra.flavored_cookie_bonuses
local total_gain = card.ability.extra.chip_mod + (fv.a_chips_per or 0)
card.ability.extra.chips = card.ability.extra.chips + total_gain
return {
message = localize('k_upgrade_ex'),
colour = G.C.CHIPS,
card = card
}
end
if context.joker_main then
local ret = { chips = card.ability.extra.chips }
cookielatro.calculate_building_bonuses(card, context, ret)
return ret
end
end
and the calculate_building_bonuses looks like
you dont need the or {} it is fine to return nil
the warning is because you are returning something in the repetition context
bump
card
im so smart
oh wait
I'm beginning to realize that the destruction is probably not what you want
I'm fairly certain you're using the wrong context for destruction prevention, only this context and context.check_eternal uses no_destroy
but I'm not sure if it counts sold Jokers
so like this???
if context.cardarea == G.play and context.main_scoring and context.card:is_face() then
card, by itself
wait what?
context.destroy_card doesn't recognize no_destroy in the return table
but context.joker_type_destroyed does
so should i use this?
Yeah, try it out
just make sure to use context.card for comparing
(and again, I don't know if it counts sold Jokers - in which case your implementation will be a bit more involved)
so this?
if (context.joker_type_destroyed and context.card == card) or context.selling_self then
instead of
if (context.destroy_card and context.destroy_card == card) or context.selling_self then
or remove the selling_self too?
You might have to, it doesn't recognize no_destroy
(also my apologies for my uncertainty, I'm not familiar with this, I'm just reading off of documentation)
That's alright.
ah welp, it didnt change the outcome.
damn
Yeah destruction prevention with selling will require some additional implementation on your end - I can't really help with that because I personally suck at working with the technical stuff of object calculation, but there might be someone else who could help with that
Ah ok, thanks for trying anyways.
It's not impossible at all, but it'll require some hooks/patches (unless someone PRs Steamodded to add no_destroy for even more contexts)
That's unfortunate.
Atleast it's possible.
how do i change the VFX that happens when a card is destroyed, like how glass shatters?
how do you change the lang information of a card dynamically? i thought i knew how to do it but my implementation here doesnt seem to be working
Could anyone else help with this?
I'm trying to make a Joker "revive" after it's sold/destroyed,
I've tried [this](#💻・modding-dev message) code (but changed the if condition at the top to if context.destroy_card and context.destroy_card == card=)
But it resulted in [this](#💻・modding-dev message)
And the code is used [here](#💻・modding-dev message) if that helps.
you forgot the key = in the loc_vars
youre just returning an additional arbitrary value outside of vars currently
ah icic okay
LFG!!
it works
i did
it
im so big brain
i did soem hook (Card:destroy & Card:start_dissolve) and then it did the right order (*Destroy*, "Saved!", "-1") but didnt regen the card afterwards, so i just manually regenerated it and boom
@versed swan ^
That's awesome
Yea!! 2 hours of fixing wasn't tho, lol.
in localize('k_your_string'), where does the 'k_your_string' go in the localization file (I don't know if you want reply pings or not but if you don't I won't do this again)
you would have a k_your_string = "something" under misc.dictionary
Is the "k" needed?
honestly i'm pretty sure no
oh
i forget what it actually denotes
i know _ex at the end means the message has an exclamation point at the end of it
How do I keep fucking that up
its not even a standard lol
most of these are for consumable types
theres like
hell yeah, it works now
a bunch of random different letters before different stuff
which are deliberately not prefixed
if theres one thing i would want to know from thunk its what any of those letters means
i did figure out one of them (although it's a suffix)
b_ is button, ph_ is phrase, _ex is exclamation mark, _q is question mark
ml_ is multiline
what is a_ and k_ primarily
a_ is for displaying common effects such as +mult, +chips, +hand size + hands etc
mainly for messages returned by calculate or card_eval_status_text
a_ is for add, no?
fixed my Card:start_dissolve to support "slicing" jokers like Madness/Dagger
local card_dissolve_ref = Card.start_dissolve
function Card:start_dissolve(dissolve_colours, skip_no_count, delay, quit_after)
if self.ability and type(self.ability.extra) == 'table' and self.ability.extra.is_building then
local fv = self.ability.extra.flavored_cookie_bonuses
if fv and fv.walnut_stock and fv.walnut_stock > 0 then
cookielatro.trigger_walnut_save(self)
return
end
end
return card_dissolve_ref(self, dissolve_colours, skip_no_count, delay, quit_after)
end
now im pretty sure it'll save the joker from any type of destruction
I would guess it started as just add things and then thunk put some similar messages there and didn't want to change the prefix
Assuming this exist, it started as-is, and ended as-is
so, does not really matter which prefix/suffix you use, kinda
But I still believe that you need prefix everything
if it's a new question i would prefer not
Does anyone have any examples of how to useG.UIT.B? It feels quite unintuitive for me to use
it's a box thish purpose is do nothing and just fill a space
you don't have to use it
I personally don't use it at all because R/C with minw/minh does the job pretty well
I think it does a little more than that
it's just invalid layour right there
(text are wrapped in G.UIT.R)
this happens when you mess with element which act as row and element which act as column
So it's only intended to be used with G.UIT.Cs?
idk what's it intented for, I dont use it because no point
treat box nodes like text nodes, they need to be wrapped in a row/column
What is the varient of {C:chips}+#1# for mult?
mult is typically {C:mult}
please go learn basic lua syntax 😭
don't have 2 Joker = secionts
you want it to look like this
how can i change the "label" color of an enhancement? (the color of the background of the text)
SMODS.destroy_cards(card)
end```
Is this how you make a playing card destroy itself after scoring? because its not working and im not too sure why
look at like, sixth sense on vanillaremade
true, im forgor
text_colour iirc
i added that but i dont remember the exact name
it should be in api documentation
oh i read the text 😭
well it should also be documented there
Can someone help me like fix this first page
It's meant to be untouched by the added blinds but that doesn't seem to be the case
The second page is meant to mirror the first page, just with my mod's counterparts
why is it missing blinds 😭
They're on the second page
do you take ownership of the vanilla ones
Is that what makes them scrambled
Or is that what locks them in place
that's what I'm assuming scrambles them because I've never seen that before
I don't know since I didn't do the coding but I can send you the build and you can check for yourself if that's fine
ok

It's a test build so if you find anything incomplete or broken beyond the blind order that's why
How to set the blind req to a number? example: 10000 -> 1341
So you fixed it?
no, i removed that
yes
yes

Thanks, can you compress it and send it here since it's already done
Yes
idk if it's important for something else
tell this to your coder so they are aware and they can check where the issue in that code is exactly
I can just unzip the build I have now if it does break something
it will break this patch
Anyway so the issue did lie in taking ownership of the vanilla blinds
Is that correct
no
the mod doesn't do that actually
the issue is in the way that pool is made
@red flower reply to this when you have the time to help.
it includes vanilla blinds, but the way the blinds are injected into the pool is weird. i don't really have the energy to look deeper into it
please do not ping me for questions
with that said this is answered in the vanillaremade wiki
i think it is the weird pooling
Alright
you could have just told me instead of chewing me out. jeez.
It was for future reference
but still.
That wasn't even chewing you out it was a simple request
? i am telling you
it was a polite request lol
Given that reaction if they actually chewed you out you'd be crying on the floor lmao
bruh.
in what article?
search for G.GAME.blind.chips
ctrl+f > requirement
requiem
Requiement
Requirem
how do I make a custom button thing like the sell and use buttons?
Im tryna make one for a joker but I havent been able to find anything
vanillaremade wiki has a section on this too
ty!!
How does one use #context.full_hand without it being a nil value
if context.full_hand and #context.full_hand
Okay so I figured that part out
calculate = function(self, card, context)
if context.stay_flipped and context.from_area == G.play then
if context.full_hand and #context.full_hand == 1 then
retain(card, context)
return {
message = "wah"
}
end
end
end
This isn't returning the message tho
well i would actually say that's bad practice
you should check for the main context first
if that context has full_hand it wont be nil
joker_main?
Should probably mark the card in a context that has context.full_hand properly, then check for the same mark.
also what does retain do
there's a return for that
There is something that does that already?
yes
One of my enhancements uses it to go to the deck instead.
if context.stay_flipped and context.from_area == G.play then return { modify = { to_area = G.deck } } end
Oh I already did that then
local function retain(card, context)
G.E_MANAGER:add_event(Event({
func = function()
SMODS.calculate_effect ({ message = "Retained", colour = mythicalgradient }, context.other_card)
return true;
end
}))
return
{ modify = { to_area = G.hand } }
end```
that doesn't return in calculate
it should?
in calculate you're only retuning a message
your function is returning and discarding the value
It's not returning the message though
yes it is?
...the stay_flipped context doesn't get to have full_hand, so...
Apparently I can't read my own code because it's literally in the return in other instances
ah ok
but yeah you should save the amount of cards in hand in another context like ali said
...mark said cards is what I said.
Just gotta figure out how to do that
same difference
if context.after and #context.full_hand == 1 then
context.full_hand[1].ability.yoinky = true
end
if context.stay_flipped and context.from_area == G.play and context.other_card.ability.yoinky then
context.other_card.ability.yoinky = false
SMODS.calculate_effect ({ message = "Retained", colour = mythicalgradient }, context.other_card)
return { modify = { to_area = G.hand } }
end
should/could work. 🐇
oh
It now works
Thank you for the assistance
I made retain a local function just because it's easier to just reference it instead of copying and pasting the whole thing over and over again
return retain(card, context) then.
Exactly what I have been doing
except for the return part
because of course I can't read
Gets everyone from time to time.
Yes there is the aether bunny
so get this: this was not working for me because I disabled shadows in options
Incredible
Anyways, decided to read UI source code and determine actual properties of config values
theres a lot more, but kinda less documented https://github.com/frostice482/balatro-lsp/blob/master/engine/ui.lua#L186
Does anybody know how to get a list of nodes inside a UI element? I'm referencing an element with get_uie_by_id but I'm not sure how I can reference the nodes
element.nodes unsurprisingly doesn't work
it's element.children
what you see with nodes are simply prototype tables to tell the element how to construct itself
so instead of t.nodes[1].nodes[2], it's element.children[1].children[2]
So do I just chuck in another message = localize to have both the chips and mult or..?
Make them mult = and chips = and remove the message entirely
Didn't know I could do that, that's so much easier.
Only need to have that if you want a custom message over the default message
How do I a keep a new custom suit from being included in base game decks
Anybody know if UI text elements are exempt from get_uie_by_id()? I have a row element which I can access with the function, but trying to do it on a text element just doesn’t return anything
i get an element returned from "local dots," but not from "local cltxt"
no they shouldn't be
hmm
okay maybe they might then idk
I always wrap my text elements in rows or columns
@fading rivet
Google steammodded
yes
i jusut download dthe zip and put it under /Mods/?
and delete my old smods folder?
yes
how do i load another .lua file?
assert(SMODS.load_file('file.lua'))()
hihi ^u^ i'm back to trying to get Opus Magnum implemented
i have this code so far:
it's meant to render a canvas with a bunch of red lines, as a test
however, the canvas isn't showing up in my menu
[looks like this]
doing ambitious things like this always leads to me learning how to make games in new game engines :3
i learned Unity from KTaNE modding, eg
how can i make a joker that swaps chips and mult?
add swap = true to the return table
can it swaps then do the xchips at the same return table?
you can
ok thanks for that
if you want specifically xchips after, you would need to do something like return { swap = true, extra = { xchips = ... } }
How do I a keep a new custom suit from being included in base game decks like red deck and blue deck?
I have a set of cards that I'm currently transferring into their own Center, however there's this blinding cyan badge and I have not a single idea where it's coming from. I have to assume that it's some kind of smods thing?
Ohholyshit
Shinku sorry for pinging a message from 2025 but like did you figure that out?
I wish
I can send you what i got if you wish to look with me
I wanted to do fillers in Parallel Update but due to lack of knowledge and help, it was pretty much fruitless lol
Wait I literally have my other mod that has a custom Center and doesn't have a blinding cyan badge
Why am I not looking there
Yeah okay uh
Having a set_card_type_badge(self, card, badges) function seems to get rid of the blinding cyan one
i was about to say lol
Alright cool. Now i just need to figure out how to add a card that can go into the joker slots without actually counting as a joker but counts as a filler
what do you mean by not counting as a joker
,,, would that block a joker slot whilst also synergizing with stencil,?
So you know in decks of cards you have your standard 52 cards, the jokers, and then the extra cards
aka the filler cards
well no. I just want to keep them in the same slot area
IIRC the spacecraft from wormhole mod behave like this if you're willing to find where they are in the code https://github.com/Balatro-Potato-Patch/Wormhole/tree/main
that's really hard if you don't want them to count as being in the area
yeah i made that part lol
:O
i was about to suggest that if it was the same idea but it doesn't seem like it
the spaceship is still a joker in the area
So it'd increase the filler slot but not the joker slot. I gotta look and see what i did in the older version
That and see if it still works with the newest smods
Seems like I got kinda far?
Okay I see the issue already
It has no slot to go to
if you don't mind them still being treated as they are in the area you can just make them take 0 slots with the smods config and then just increase the number for the display
I think
uh... lemme see something rq
idk if it's debug plus or Parallel Update being like this rn
Is there a way to make it so a joker can be taken always, even if you wouldn't have room for it otherwise?
Hook G.FUNCS.check_for_buy_space and return true or make Joker not require a slot by having extra_slots_used defined as -1 in config.
local checkref = G.FUNCS.check_for_buy_space
function G.FUNCS.check_for_buy_space(card)
-- put your own condition here first.
return checkref(card)
end
I'm trying to make a tag, that, when applied adds a free consumable (of a specific set) of Rare (or specific) rarity from my mod. But, right now it's just giving me any rarity?
My consumable looks like:
SMODS.Consumable {
key = "milk_chocolate_cookie",
set = "cl_cookie",
atlas = "flavored_cookies",
pos = { x = 2, y = 1 },
rarity = 2,
weight = 0.25,
and I create the card like this
local card = SMODS.create_card {
set = "cl_cookie",
area = context.area,
skip_materialize = true,
key_append = "cookie_tag_" .. rarity_name,
rarity = rarity_name,
}
Why isn't it working..?
So would I just put if SMODS.find_card('joker') then? or
I just tried a different way by creating a list of every cookie that matches the rarity i want, then picking one at random (looping throughSMODS.Centers, and i even tried G.P_CENTERS too) but that didn't work either? it just hit the safeguard here..
local valid_cookies = {}
for k, v in pairs(SMODS.Centers) do
if v.set == "cl_cookie" and v.rarity == rarity_num then
table.insert(valid_cookies, k)
end
end
--safeguard
if #valid_cookies == 0 then
print('safeguard hit!')
return
end
Can someone help with this?
if SMODS.find_card('yourcardhere') then return true end
return checkref(card) -- if previous condition does not pass, execute original function.
-# anyone..?
Would this just go at the beginning of the lua file
I'm pretty sure it'd go in the hook.
I meant the hook itself
Yeah, I think something like this should work.
local checkref = G.FUNCS.check_for_buy_space
function G.FUNCS.check_for_buy_space(card)
if SMODS.find_card('yourcardhere') then return true end
return checkref(card)
end
got it
Ready your Jokers, prepare for @ Sock's big message. /silly
i'm not at a computer where i could test, but two things come to mind:
- (since it was not provided in the snippet) is
rarityspecified correctly? should be a string like"Rare" - i was reading the
SMODS.create_cardcode and it seems it outsources the bulk of the code to the vanillacreate_cardfunction, which i would not be surprised if it didn't handle consumable rarities correctly
sorry it's not very definitive advice
- rarity is right here. (image below)
- I don't quite get what you mean.
rarity_name...?
?
rarity in my message refers to the key, in rarity = rarity_name in the creation snippet you posted, sorry i was unclear
yes it could also be a number but i assumed it was a string since you were using .., i forgot lua allows concatenation with strings and numbers. both should work fine
ah. so then that's not it
oh! i managed to fix it lol
oh! what was the solution!
if youre using rarities for a consumable type they have to be defined as a new rarity iirc? so that automatically means the vanilla rarity numbers dont work
i just manually created a rarity pool and then used a loop to find the actual keys, then just create a random desired one within the found keys
-# whoops my msg took forever to send lol
oh probably why it wasnt working
nw! that's interesting, seems like a good fix :3 i'm curious to see if eris's solution works too, that sounds elegant
ill try that
oh it works.!
how would i add a badge for the rarity, like Jokers do?
you probably want to look at whatever code calls set_badges or whatever for a card and do something with that ig
or use extend and create a default set_card_type_badges for the consumable type which adds the consumable type and rarity badges
i'm getting "rendering" printed every frame, but my Canvas doesn't seem to be rendering
why must i turn my game into a house of LIES
i wanna loop through my consumables, does this not exist? it crashes on SMODS.Consumables as nil, what's the table ?
for _, v in pairs(SMODS.Consumables) do
if v.set == "cl_cookie" then
all center instances are stored in SMODS.Centers
o
what context would i use to check if a hand has ONLY a certain suit
breakthrough: rendering my canvas to a texture shows it's definitely there
woah
so how would i check if it's a consumable?
(if v is table[loop_index])
your current check just works
oh
you'd loop through the hand, and check if each card is the suit
there's no specific context for it
ohhh
ight i got that
hmm so it seems the issue is, the canvassprite isn't rendering in the UI
i don't know how to fix that
how do i color the badge?
oh
nvm
wait so i have the loop
but i dont think i did it right
for i = 1, #context.scoring_hand do
if context.other_card:is_suit(card.ability.extra.suit) then
hearts_check = true
break
end
end```
i havent teted
i need to add return aswel
if not context.scoring_hand[i]:is_suit(card.ability.extra.suit) then
and then do the effect if hearts_check is false
how do you make a pool of all available enhancement, seals, and edition? (including modded ones)
like having a joker count modded enhancements along with vanilla without specifically doing crossmod
is there any website that lets you preview balatro descriptions?
Like
{
"{C:attention}Attention!",
"Normal Text"
}
I have a joker that randomly applies enhancements and it works with modded enhancements off SMODS.poll_enhancement
I'm not sure how you filter out to only vanilla enhancements or modded enhancements with that, specifically. But by default if its an enhancement, it'll grab it
Not sure if thats what ur asking for
-# you should probably reply/ping them.
^ what I said
no i just want to have a pool that have every enhancement, seals, and edition in them
like how driver's license count cards with enhancements you have
oh
!!!!!!!!!!!!!!!!!!!!!!
i want to have that kind of effect but for it to also count modded enhancement
I GOT IT OMG
something like this maybe?
loop the deck and see for each card if thats true
or this
yeah that's my problem tho
they need the key of the enhancement to check for
meaning that if i want to loop through the cards and count the enhancements, i need to have a list containing the key of every enhancements available
i can do that with the vanilla stuff, the pool is limited
you can just check if the card has no enhancement
if it doesn't have no enhancement, then it has an enhancement
does get_enhancements only do vanilla stuff?
however my inquiry is how to include modded enhancement should the player have a mod that adds some
yeah but that doesnt tell me what enhancement it has
oh you need to know more about the enhancement iself
i believe the playing cards have a table on their object
where it stores enhancement and edition data so you can see like, if a modded edition/enhancement gives xmult or xchips or such
no it gets all enhancements on a card
how do i make a color gradient in G.C.MY_COLOR ?
and also to bring it back, this also should include seals and editions
and thus modded seals and editions
smods.gradient
G.C.something = SMODS.Gradient { .......
i could also just cop out and be one of those mods that have no support for modded enhancement or editions from other mods
and thus remain unpopular in modpack compilations as adding my mod would not provide content synergy value
how is your effect actually different from drivers license code wise for enhancements
because im reading it and it seems like you can just use the same code
itd better be well optimised
drivers license checks it on every single frame
it's so excessive
does vanillaremade fix stuff like that
actual vanilla code is Not Good for reference
yes thats like half of the point
vanilla but actually usable as a reference for good practices
i want to iterate through the played hand and get the key of every enhancement, seal, and edition each card have, and count the tally for each enhancement, seal, and edition individually
SMODS.get_enhancements returns a table of enhancement_key = true for each enhancement it has
so just iterate over it and copy the enhancements into another table
is the key returned a string or a centre
yes i wanted it to go under the UI thank you
user outerface
does SMODS have a get_seals and get_edition method as well or are those different
how do i damage a blind by a percentage
it doesnt appear to have get_seals and get_edition
hence my need for a pool of those
to iterate against
p sure smods supports blind size shrinkage
nvm i figured it out
Someone knows how to check if a card held in hand is an ace?
Salty ghost trying make canvassprite render so hard
card:get_id() == 14
yeahhhh see the problem is
no matter how high i set my drawstep's order, it renders under the UI
Are you using a card to render this thing on it?
Draw thing by using func is not a good idea because this callbacks fire in update stage, draw goes after
what should i do, then?
What you can do by using func hook element's draw function to draw thing, that's it
G.FUNCS.setup_transmut = function(e)
e.config.func = nil
local old_draw = e.draw_self
function e:draw_self(...)
old_draw(self, ...)
-- draw the thing here
end
end
is a context?
context.individual and context.cardarea == G.hand
well that did... something
it's moving, too ^^:;; weird
G.FUNCS.setup_transmutation_engine_rend = function(e)
e.config.func = nil
local draw_self_ref = e.draw_self
function e:draw_self(...)
draw_self_ref(self, ...)
local canvas = e.config.object.canvas
canvas:renderTo(function()
love.graphics.clear(0, 0, 0, 0)
love.graphics.setColor(1, 0, 0, 1)
love.graphics.rectangle("fill", 0, 0, 10, 10)
love.graphics.setColor(0, 1, 0, 1)
love.graphics.rectangle("fill", 0, 0, 20, 20)
love.graphics.setColor(0, 0, 1, 1)
love.graphics.rectangle("fill", 0, 0, 30, 30)
end)
if G.OVERLAY_MENU then
local obj = G.OVERLAY_MENU:get_UIE_by_ID("opusm_trans_canvas_obj")
if obj then
love.graphics.push()
love.graphics.origin()
G.opusm_transmutation_engine_sprite:draw_from(obj)
G.opusm_transmutation_engine_sprite.canvas:renderTo(love.graphics.clear, 0, 0, 0, 0)
love.graphics.pop()
end
end
end
end```
giving up for tonight 😭
so i've seen many people have this issue
how does one fix this
i have them defined
first of all dont keep all the vremade stuff there that's a bad idea
second of all, is your mod prefix correct and the key to your object also correct?
i think so
could you show the definitions (i.e. your metadata and the SMODS.Consumable etc for the paradox
what a crazy font + no colors
bro is using notepad
yeah
looking at paperback's loc and its defined exactly the same way i did
the crash is because you are using the wrong key for a consumable's set
yeah i already figured that out
still cant actually get it to show up though, its just ERROR
I just checked now, it doesn't work in booster packs
Probably need to hook Card:check_use() too.
Same thing?
just noticed this lol
Idk how to add it to this list of "and not", always that i add it it crashes or the joker stops working
Same check, probably, yeah.
did you save something in G.GAME that cant be saved
Do I put it in checkref too or do I make a second checkref
Separate local
local chkuseref = Card.check_use
function Card:check_use()
-- add condition here with 'return true'
return chkuseref(self)
end
uhh
Packs and Vouchers can't be redeemed/opened and all jokers can be bought, ignoring space requirements
I don't think that's supposed to happen
Should check if you are in a Booster Pack, too... SMODS.OPENED_BOOSTER.
Well I can't open a booster pack anymore so
As in, if SMODS.OPENED_BOOSTER and next(SMODS.find_card('aeiou')) then return true end.
Okay well now I'm in the booster pack
but I still can't select the card
Also, I can still buy everything in the shop, regardless of whether I have room or not
someone can help me?-
ough, not quite sure much then-
is there a variable message key for losing XMult
You probably have to manually make one if there isn't one
I'm just gonna remove both of them because they are causing... problematic behaviour
i have a joker that looses Xmult and it works
Good to know
just put the variable
i just forgot about ramen
like, the most forgetable joker to me
real
ramen is so unbelievably useless
base X2 Mult and it loses value
if it were common, i could see it being viable, but its uncommon
even seeing double or campfire are more recognizable, even if you consider them to be bad
campfire can be the main scoring if you build towards it
its not that bad, just niche
infinite money basically
and seeing double i think works with smeared
so if you dont have xMult, can work
but... back in the topic
idk how to recognize cards as aces
okay so get_seal returns the key of the seal
and card.seal returns the name of the seal
that's one third of the not working functionalities sorted
get_edition definitely doesn't exist in the sense that it doesn't return what edition the card has
b_celestin_paradox_cards = "Paradox Cards",
k_celestin_paradox = "Paradox",
},
labels = {
celestin_paradox = "Paradox",
},```
```SMODS.Atlas({
key = "paradox",
path = "paradox.png",
px = 71,
py = 95
})
SMODS.ConsumableType {
key = 'paradox',
default = 'c_celestin_laplace',
primary_colour = HEX('84ffe8'),
secondary_colour = HEX('D85D55'),
collection_rows = { 6, 6 },
shop_rate = 3
}
SMODS.Consumable {
key = 'laplace',
set = 'paradox',
atlas = 'paradox',
pos = { x = 0, y = 0 },
config = { max_highlighted = 3, suit_conv = 'celestin_Vortexes' },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.max_highlighted, localize(card.ability.suit_conv, 'suits_plural'), colours = { G.C.SUITS[card.ability.suit_conv] } } }
end,
}```
still showing ERROR and idk why
uhhh, sorry for being annoying with this but
i still cant make the joker dont trigger if aces are held in hand
ok i can help w that
local ace_found = false;
for _, _card in ipairs(G.hand.cards) do
if _card:get_id() == 14 then
ace_found = true;
end
end
if not ace_found then
-- trigger
end
put this in your context and put the actual joker trigger where the comment is
if its a regular joker trigger, should go in context.joker_main
i think i will send the code because the joker in reality has various "if not"
calculate = function(self, card, context)
if context.individual and context.cardarea == G.hand and not context.other_card:is_face() and not context.other_card.debuff and not context.end_of_round then
return {chips = context.other_card.base.nominal * 2}
end
the second like is really long-
ok just tell me the joker effect
numbered cards (2 to 10) give the double of their value as chips
yeah
i forgor
Numbered cards held in hand
why i forgot like... the whole joker trigger
is there a way to speed up a set of effects that use SMODS.upgrade_poker_hands
i have an effect that calls SMODS.upgrade_poker_hands in context.using_consumeable, but it doesn't lower the delay as more and more effects happen, causing it to take pretty long to finish the animation
calculate = function(self, card, context)
if context.individual and context.cardarea == G.hand and not context.end_of_round then
if card:get_id() > 1 and card:get_id() < 11 then
return { chips = card:get_id() * 2 }
end
end
end
there
that gives double their rank
if u want their nominal u can just change the return to
thanks
thanks
is a nominal the base +chips that a card of a certain rank gets?
yeah
Used in Card:get_chip_bonus, yeah.
something else that im wondering about is how you would add to a card's chip bonus with an enhancement
like how it says "+X extra chips" in the description when its been changed by either Bonus Card or Hiker
how would i go about changing the name that shows of the current hand? i tried just copying the code from yahimod's "Good Kitty" joker but it doesnt seem to be working for me 🤔
those two's effects stack into one description piece, but i dont know how to make a +chips effect stack into that description piece as well
like changing the name of a poker hand here?
So increase the +Chips of an Ace directly instead of adding the +X extra Chips?
yes!
i want the description to stack into the same description part as Hiker and Bonus Card
like instead of it showing +15 extra chips (from my enhancement) and +20 extra chips (from Hiker), it just says +35 extra chips
in context.evaluate_poker_hand, do
return { replace_display_name = "ABCDE" } with ABCDE being what you want it to say
...that might involve some stuff in generate_card_ui or SMODS.localize_perma_bonuses...
where would i find info about localize_perma_bonuses
src/utils.lua
no documentation?
yea
i assume that vremade doesn't delve into how the base game actually combines Hiker and Bonus Card's descriptions
that does work, however, im having a very specific problem:
the joker that ive made that applies this name-changing effect also levels up the hand type its changing the name of when played, and the level up changes the hand name back to normal
the game just adds both by default
yea idk how to help with that tbh
is there a way to actually use this in my enhancement's description
can you send the code it might be a bug
what does it do
have you tried using bonus in the config
it already uses bonus
if context.evaluate_poker_hand then
return {replace_display_name = "ABCDE"}
end
if context.before and next(context.poker_hands[card.ability.extra.type1]) then
level_up_hand_chips(card, card.ability.extra.type1, false, 2)
level_up_hand_chips(card, card.ability.extra.type2, true, 2)
end
if context.before and next(context.poker_hands[card.ability.extra.type2]) then
level_up_hand_chips(card, card.ability.extra.type1, true, 2)
level_up_hand_chips(card, card.ability.extra.type2, false, 2)
end
and the function
function level_up_hand_chips(card, hand, instant, amount)
amount = amount or 1
SMODS.upgrade_poker_hands({
hands = hand,
func = function(base, hand, parameter)
return base + G.GAME.hands[hand]['l_' .. parameter] * amount
end,
from = card,
instant = instant,
parameters = {"chips"}
})
return {replace_display_name = "ABCDE"}
end
i had it changing specifically for a certain hand type before but for testing purposes i just replaced the display name for all of them
also ignore the return at the bottom of the function i was throwing anything i could at the problem
what would i put in my enhancement's description in order to have the game put the bonus in the description though
I'm trying to make a joker that triggers all cards held in hand and this is the current code:
calculate = function(self, card, context)
if context.individual
and context.cardarea == G.hand
and context.other_card
and not context.other_card.debuff then
local bonus = FB.num(context.other_card:get_chip_bonus(), 0)
if bonus ~= 0 then
return {
chips = bonus,
colour = G.C.CHIPS,
card = context.other_card
}
end
end
end
and FB.num is:
FB.num = FB.num or function(value, fallback)
fallback = fallback or 0
if type(value) == 'number' then return value end
if type(value) == 'table' then
if type(value.to_number) == 'function' then
local ok, n = pcall(function() return value:to_number() end)
if ok and type(n) == 'number' then return n end
end
if type(value.toNumber) == 'function' then
local ok, n = pcall(function() return value:toNumber() end)
if ok and type(n) == 'number' then return n end
end
end
return fallback
end
the problem is that it triggers even after scoring
spent over an hour debugging and fixing to no avail
this is what it does with hiker
["m_CGN_Disease"] = {
["name"] = "Disease Card",
["text"] = {
"{C:chips}+#1#{} extra chips",
"{C:mult}+#2#{} Mult",
"Before a {C:attention}played hand{} scores, scoring {C:attention}Disease Cards{}",
"{C:green}spread{} to played and unenhanced cards",
},
},
this is the localization
SMODS.Enhancement{
key = "Disease",
atlas = "Disease",
pos = {x = 0, y = 0},
config = { bonus = 15,
mult = 2,
extra = {}
},
loc_vars = function(self,info_queue,card)
return {vars = {card.ability.bonus,
card.ability.mult
}}
end,
calculate = function(self,card,context)
end
}
this is the enhancement
it had 5 hiker triggers, meaning that +25 is exclusively Hiker
nope
Make sure those localization categories are all actually inside of misc
they are
Make sure misc isnt inside of something else (descriptions)
this wouldnt even work for my purposes because i was wanting to put a color code in the hand name and that doesnt seem to work
ah i see, smods explicitly removes the chips from there
the workaround should be easy give me a sec
mind if i send over the loc so you can check, using vremade as placeholders makes the file a little longer than i'd like
plus i cant count brackets
im on mobile so i cant really look at it properly
ah
i think its outside because misc has 4 brackets before it instead of the 2 im seeing everywhere else
generate_ui = function(self, info_queue, card, desc_nodes, specific_vars, full_UI_table)
if specific_vars and specific_vars.nominal_chips and not self.replace_base_card then
localize { type = 'other', key = 'card_chips', nodes = desc_nodes, vars = { specific_vars.nominal_chips } }
end
SMODS.Enhancement.super.generate_ui(self, info_queue, card, desc_nodes, specific_vars, full_UI_table)
if specific_vars and specific_vars.bonus_chips then
localize { type = 'other', key = 'card_extra_chips', nodes = desc_nodes, vars = { SMODS.signed(specific_vars.bonus_chips) } }
end
SMODS.localize_perma_bonuses(specific_vars, desc_nodes)
end
this in the enhancement should work
and you need to remove the chips from your description
alr
it works, ty
although, the +x extra chips shows up after my enhancement's description
not sure if theres a way to fix that or not
try putting the SMODS.Enhancement.super.generate_ui after the if
generate_ui = function(self, info_queue, card, desc_nodes, specific_vars, full_UI_table)
if specific_vars and specific_vars.nominal_chips and not self.replace_base_card then
localize { type = 'other', key = 'card_chips', nodes = desc_nodes, vars = { specific_vars.nominal_chips } }
end
if specific_vars and specific_vars.bonus_chips then
localize { type = 'other', key = 'card_extra_chips', nodes = desc_nodes, vars = { SMODS.signed(specific_vars.bonus_chips) } }
end
SMODS.Enhancement.super.generate_ui(self, info_queue, card, desc_nodes, specific_vars, full_UI_table)
SMODS.localize_perma_bonuses(specific_vars, desc_nodes)
end
so this?
yes
still shows up after
its fine tho
also im realizing that i have to do this for +mult too once i add a perma +mult effect
right, cause this only needs a workaround because smods created the issue to begin with
and smods doesnt do that for perma +mult
For the life of me I can't figure out why this isn't working
local gfcfbs = G.FUNCS.check_for_buy_space
G.FUNCS.check_for_buy_space = function(card)
if
(card.ability and card.ability.spaceless == 'yes')
then
return true
end
return gfcfbs(card)
end
It either, does nothing, makes every card selectable, or crashes the game
yeah the name thing is a bug, but the color code is not something the api lets you do yet
N' do you think that it'll be possible to get the +extra chips to show up before the description?
cause if its possible I do want to try to get it working, but i wouldn't be surprised if its not possible
is it passing the condition
is card.ability.spaceless == 'yes'
it should be
have you added a print to see
where would I add the print
well then its not yes
also if you want it to take no space there's an smods feature for that
there is?
config = { extra_slots_used = -1 }
yes
I would prefer not having that, is there a way to hide that?
i dont think so
how are you setting card.ability.spaceless
In the same place where you give the key, cost and calculate within SMODS.Joker
config = { spaceless = 'yes' }
why yes as a string tho
or card.config.center.spaceless == 'yes' in the if
fucking
Cryptid I swear I am going to strangle you to death for being impossible to understand
Cryptid is one of the worst sources for code
yeah
Find something better, anything
everyone using cryptid is one of the reasons i made vremade
Btw is Ruby working on Cryptid 2 or no one knows?
I see
okay so I can now buy from the shop
Now... I also need booster packs too
local csc = G.FUNCS.can_select_card
G.FUNCS.can_select_card = function(card)
if
(card.config.center.spaceless == 'yes')
then
return true
end
return csc(card)
end```
This doesn't work because the game crashes for 'center' being a nil value, but including card.config.center, makes it so it doesn't work
can_select_card doesnt return a boolean, it changes the button
this is my thing for that
basically you need
e.config.colour = G.C.GREEN
e.config.button = 'use_card'
So I just add it to this?
yeah
local csc = G.FUNCS.can_select_card
G.FUNCS.can_select_card = function(card)
if
(card.config.center and card.config.center.spaceless == 'yes')
then
e.config.colour = G.C.GREEN
e.config.button = 'use_card'
end
return csc(card)
end```
So it's like this now, but it still doesn't work
oh wait
does it have to be function(e)
card is e.config.ref_table
So replace card with e.config.ref_table?
G.FUNCS.can_select_card = function(e)
local card = e.config.ref_table
-- your code with no changes
end
afetr that you must be fine
sleepy do you know how to translate this to balatro shaders
that's the field I suck
but now im trying to port this yugioh one to the game
Every card is gaining 'can_use'
ask cass or someone else who can do this
Kinda crazy that SMODS doesnt provide api for can_select
code?
G.FUNCS.can_select_card = function(e)
local card = e.config.ref_table
local csc = G.FUNCS.can_select_card
G.FUNCS.can_select_card = function(e)
if
(card.config.center.spaceless == 'yes')
then
e.config.colour = G.C.GREEN
e.config.button = 'use_card'
end
return csc(e)
end
end
the return seems nested
move it down one end?
why is there another can_select_card inside
oh I didn't notice that
local csc = G.FUNCS.can_select_card
G.FUNCS.can_select_card = function(e)
local card = e.config.ref_table
if
(card.config.center.spaceless == 'yes')
then
e.config.colour = G.C.GREEN
e.config.button = 'use_card'
return
end
return csc(e)
end
