#💻・modding-dev
1 messages · Page 472 of 1
how
soul_pos = boolean and {x = number, y = number} or nil
oh awesome
by any chance is there a way to designate a soul atlas, if not that's fine just wanna know if it's a thing
what in this code is causing this to upgrade hundreds of times
not in the definition at least
im not sure where to even put my repetition check
it's not in a context
So I'm hooking create_card to replace planet cards as they're created, and my code is causing a crash I don't really understand
local create_card_ref = create_card
function create_card(...)
--pre
local result = create_card_ref(self, ...)
--post
if next(SMODS.find_card("j_givl_spaghettification", false)) and result.ability.set == "Planet" then
for _, value in ipairs(SMODS.find_card("j_givl_spaghettification", false)) do
if pseudorandom('j_givl_spaghettification') < G.GAME.probabilities.normal / value.ability.extra.odds then
return create_card("c_black_hole")
end
end
end
return result
end
Quick question: How can I tell if a card has no seal, no enhancement, and no edition?
what context should i even use, just joker_main? before?
...like this? this just makes it always play
SMODS.Sound({
key = "music_all",
path = "music_all.ogg",
select_music_track = function()
local count = #Cryptid.advanced_find_joker(nil, "crp_all", nil, nil, true)
if count ~= 0 then
return 1.7e308
else
return 0
end
end,
})
-# btw cryptid is a dependency which is why i'm using their function
create card doesn't take self
Return false instead of 0
ah
that black hole return is also wrong
what's the effect?
Where is the code that puts all of G.vouchers.cards in the run info vouchers?
not card.seal and not card.edition and not next(SMODS.get_enhancements(card))
upgrades if played hand is exactly two 2s
What's wrong with it?
thats not how you use create_card
Because it doesn't seem to be in G.UIDEF.used_vouchers.
context.before makes sense
How should I use it here?
I don't remember the arguments for create_card off the top of my head but also you probably shouldn't be using create_card inside create_card
my honest opinion is that create_card is one of those functions that you shouldn't mess with if you don't know what you're doing, but if you still want to do it try to learn what it does first
Is there another way I can replace the card with another as it's created?
Yes.
What's the intended effect?
If the joker succeeds its roll, the planet card will be a black hole. This applies anywhere, not just booster packs, hence why I'm not trying to modify the vanilla spawn chance.
^
I think you would hook Card:set_ability
Idk, @red flower told me to hook create_card but maybe this is suited to what I'm doing more specifically
i think it's a somewhat complicated effect
the thing that replaces planets with black hole is create_card usually
Is it possible for me to code the re-drawing of an already just scored card back into hand?
I ask because I want to make this joker idea of mine functional
Just curious, because if an already played/discarded card is untouchable in the code until the next round starts, im boned
it is possible
i think Victin did something like this
though they seem to be offline
How should I do it then? I just need a way to modify the type of the card. I would assume changing one of the args in pre would do that.
Yes, but I was looking how Entropy replaces cards with their inverts, and it seems to hook Card:set_ability.
create_card_ref.forced_key = "c_black_hole"?
No.
Why
local oldsetability = Card.set_ability
function Card:set_ability(center, initial, delay_sprites)
if conditions and self and self.config and self.config.center and center and center.set == "Planet" then center = G.P_CENTERS["c_black_hole"] end
return oldsetability(self, center, initial, delay_sprite)
end
```?
I'll give it a try. What's "conditions" do?
You replace it with checking for the joker and the pseudorandom check.
i tried patching mid line but it doesnt seem to work like this, what have i done wrong?
[[patches]]
[patches.pattern]
target = 'card.lua'
match_indent = true
position = 'after'
pattern = '''
(100-G.GAME.discount_percent)
'''
payload = '''
*G.GAME.grogoroth
'''
tried to patch self.cost = math.max(1, math.floor((self.base_cost + self.extra_cost + 0.5)*(100-G.GAME.discount_percent)/100))
You have to patch the entire line.
Or use regex I think.
so rewriting it? what an overwrite patch looks like if i may ask?
ive only ever added stuff in patches
[[patches]]
[patches.pattern]
target = 'card.lua'
match_indent = true
position = 'at'
pattern = '''
self.cost = math.max(1, math.floor((self.base_cost + self.extra_cost + 0.5)*(100-G.GAME.discount_percent)/100))
'''
payload = '''
self.cost = math.max(1, math.floor((self.base_cost + self.extra_cost + 0.5)*(100-G.GAME.discount_percent)*G.GAME.grogoroth/100))
'''
how would i check if the player has a consumable?
next(SMODS.find_card("c_whatever"))
would i just leave the brackets empty if it doesnt have to be a specific consumable?
Does the game allow jokers to change card suits when scoring cards?
tryna know for a joker i'm making
oh if you want any consumeable you can just do #G.consumeables.cards >= 1
for context im looking to check if the player has one and if it does itll destroy the consumable and give a random card an edition
actually i can just look at how tobi the corgi does it
and its soooo simple im rejoicing
can someone help me with this? it almost works in game, except the joker pops up with the message 'ERROR' and the effect doesn't work:
loc_vars = function(self,info_queue,card)
return {vars = {card.ability.extra.chips}}
end,
calculate = function(self,card,context)
if context.individual and context.cardarea == G.play and context.other_card:is_suit(card.ability.extra.suit) then
context.other_card.ability.perma_bonus = (context.other_card.ability.perma_bonus or 0) + card.ability.extra.chips
return{
chips = card.ability.extra.chips,
message = localize('k_added_ex'),
color = G.C.CHIPS
}
end
end,
Something's wrong. Even after removing most of the conditions it doesn't do anything.
local oldsetability = Card.set_ability
function Card:set_ability(center, initial, delay_sprites)
if self and self.config and self.config.center and self.ability and self.ability.set == "Planet" then
--for _, value in ipairs(SMODS.find_card("j_givl_spaghettification", false)) do
--if pseudorandom('j_givl_spaghettification') < G.GAME.probabilities.normal / value.ability.extra.odds then
center = G.P_CENTERS["c_black_hole"]
--end
--end
end
return oldsetability(self, center, initial, delay_sprite)
end```
Remove self.ability and self.ability.set == "Planet" and replace it with center and center.set == "Planet"
i have a card here that gives editions to playing cards before the hand is scored but it's not scoring the editions as part of the hand yet, does anyone know a fix?
Code?
yup
Move it out of the event.
bumping this
if jokers are unable to change suits then i guess imma think of a new effect
is assets = resources ?
i think you can
in the file hierarchy
bcs in base game is resources
No.
then where shall i put a "sounds" file?
assets/sounds
try looking at midas mask code
I did make some changes by looking at sigil but it ain't workin
i did this, i get a crash, shall i post the crash report?
Yes, and code?
Firstly, use pseudorandom, Secondly, put suit in card.ability.extra.suit
G.E_MANAGER:add_event(Event({func = function()
G.GAME.grogoroth = G.GAME.grogoroth * 2
play_sound("alllmer")
print("double")
for k, v in pairs(G.I.CARD) do
if v.set_cost then v:set_cost() end
end
return true end }))
Oops! The game crashed:
Thread error (Thread: 0x028ccd337e70)
Could not open file resources/sounds/alllmer.ogg. Does not exist.
stack traceback:
[C]: at 0x7ffef51f58a0
[C]: in function 'newSource'
engine/sound_manager.lua:63: in function 'PLAY_SOUND'
engine/sound_manager.lua:197: in main chunk
You need your mod prefix.
Yes.
thanks !
You must be new to modding to make an assumption like this
This is what I have atm
context end of round and context main eval dont suit together no?
It works now, thanks for all the help
if he's trying to changes suits within a played hand, context end of round kind ruins it
Kindaaa yeah lol
why isn't there a space here?
When I make a main.lua text doc is the type supposed to change?
if context.before
and not context.blueprint then
your color find stuff
G.E_MANAGER:add_event(Event({
func = function()
context.scoring_hand[1]:juice_up()
return true
end
}))
end
the juice up is just for juicy
the file extension should be .lua
it shouldn't be "main.lua.txt"
Its just main.lua but it says its a text doc
Do you have file extensions enabled?
enable file extensions in explorer (assuming you're using windows)
I think this should be right?
btw maybe is better to do the math.random before, like "colornum = math.random(1,4)", then do your "if colornum == 1 else if colornum == 2 etc"
i dont think you need "context.main_eval" at all
i may be wrong tho
File name extensions or just file extenstions
should be the same thing
Okok
still doesn't find it
That worked thank you
the line is play_sound("drx1_alllmer")
why cant i eval calculate using arrows
What is the SMODS.Sound definition?
wdym?
You need to do (to_big(50))
Did you not define an SMODS.Sound?
i need to?
still no
im sorry, never added sound 😔
so i need to do a smods.sound for each sound i wanna add?
alright, thanks !
one last little bugfix before bed hopefully; it works well but theres unintended behavior where the shop slots disappear the moment you sell it, which creates some annoying moments where you sell the joker to replace it with something else, and then that something else goes away. whats the fix for something like this?
what's a synonym for like a really really small hill
-# no not a mound
You can't have spaces in text with a background.
is there a workaround?
How could i randomize suits using pseudorandom
like could i just make a loc_var that's just " " and use that or
You set the colour again after the spaces.
i want the space to have that background though; i don't want it to be cut off
pseudorandom_element(SMODS.Suits, "seed").key
Perhaps you could have a character that is the same colour as the background?
this might work
ok this is kinda random but im just curious, is it possible to create a custom deck that forces the shop to have only jokers of one kind of rarity
to clarify here i mean like, rerolling to destroy it works fine i'd just like to change it so that if you sell it the items that were there previously dont vanish
it's possible but probably not easy
it's so close
mmm
Yes.
also you can very very very slightly see the m there lol
any idea how that would work or look, mind you i havent even touched making a custom deck, just kinda thinking for the future
Perhaps you would hook get_current_pool and check if that deck is enabled?
i'm looking to change a part of cryptid code when my mod is installed but i'm unsure on how to do it because most examples i've seen of lovely patching are on vanilla or smods functions. how do i tell lovely to look at a file in a different mod?
target = '=[SMODS modid "path/from/root.lua"]'
i cant find the steamodded guide for decks
why is it called back? i guess that confused me sorry
wait idk if thats what im looking for
so like
target = '=[SMODS Cryptid "lib/content.lua"]'
oh
i'm sobbing 😭
the switch-up is just too funny
i love the unintended humor
what's this?
heyy so i am working on my jokers that are kind of like certificate, and they work rly well finally but only problem is im realizing that the cards arent appearing in the deck / full deck. i can still draw them as if they are in the deck but i cant see them in there, any advice?
Code?
SMODS.Joker {
key = "KingSalmon",
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
rarity = "AC_Fish",
cost = 6,
atlas = "Jokers",
pos = { x = 4, y = 3 },
loc_txt = {
name = "King Salmon",
text = {
"Creates a {C:dark_edition}Holographic{}, {C:attention}King{}",
"with the {C:mult}Mult{} enhancement",
"at the start of every round"
}
},
loc_vars = function(self, info_queue, card)
info_queue[#info_queue + 1] = G.P_CENTERS.m_mult
return { vars = {} }
end,
calculate = function(self, card, context)
if context.first_hand_drawn then
local _card = SMODS.create_card { set = "Base", enhancement = "m_mult", rank = "King", edition = "e_holo", area = G.discard }
G.E_MANAGER:add_event(Event({
func = function()
G.hand:emplace(_card)
_card:start_materialize()
G.GAME.blind:debuff_card(_card)
G.hand:sort()
if context.blueprint_card then
context.blueprint_card:juice_up()
else
card:juice_up()
end
return true
end
}))
SMODS.calculate_context({
playing_card_added = true,
cards = { _card }
})
return nil, true
end
end,
Replace SMODS.create_card with SMODS.add_card
ohhh
ok well that worked but the card is showing up and scoring like its flipped?? so weird
Code?
its the same code, i just changed the word create to add
also its too big for me to send on discord which is annoying
hi there, this is my code for a boss that debuffs all cards but desactivates when a consumable is used or sold, but it doesn't work (doesn't crash, the debuff part works but not the disactivation part), can you guys give a little help ?
also the certificate example uses create card, so im surprised that doesnt just work
It's context.card.abililty.consumeable also it is context.using_consumeable also you don't have to check the set for context.using_consumeable
confused
Just started modding Balatro recently and I am enjoying it so far
you need to either escape the quotes inside of the target string or use ''' instead of "
ah
okay it work now
okay it doesn't work now
spawning a mythic joker doesn't change anything...
oh well hmm this is like thought to be in cryptid's code by the game right
so it doesn't find the rarity cuz it's not in cryptid
possibly? i'm not sure to be honest
if that is the case, how do i fix?
guys what's the G and where can I find the references
I've been seeing stuff like G.GAME but idk what they are
If you're on VSCode do Ctrl+shift+f and look for "self.GAME" iirc
nvm I found them in one of the luas in the exe
bump
i want a lovely injection example or docs? like smods
i finally realized something, the reason it causes a stack error is because 1 blueprint is multiplying its own blueprint power by the amount of blueprints there are in the chain, so instead of other_card being a blueprint, i need to check if other_card is a blueprint and check down the chain for the actual card to trigger that instead
i would just check the a lot infront of the blueprint, and if it's another blueprint, then add 1 to the slot to check?
i can do that with a for loop for the #G.jokers right?
Is it possible to make a joker that trigger its effect X times where X is calculated before the activation ? (but changes each round like a random value for example)
Like a Chad but for himself (giving +chips for example) and the number is random each times ?
Perform the calculation and set a value on the Joker itself in context.before (or context.setting_blind for round-specific randomization), then you'll have to nest the desired effects.
What does it mean ?
If a want to add a bonus it is usually a return that I use
But if I want to have the effect multiple times I cannot just return with "repetition" right ?
SMODS.Shader doesnt exist?
as far as i can tell all they take is a key and a path
gotcha
got an error saying attempt to index "shader"
Try adding your mod prefix to the shader value in edition?
yup needs prefix
pray for me
#💻・modding-dev message
bump (for yet another thing)
Probably by hooking Card:set_edition.
wtf there's no way thats how they do it for something like negative
Negative doesnt show up on regular playing cards
smods adds negative playing cards
as for that factoring under wof, wof is hardcoded to only give foil, holo or poly
huh... i havent seen them show up in card packs
That’s not what they meant
Yes, it uses the _no_neg parameter on poll_edition
well then....
This is what i get for making an edition that gives card limit 😭
the translations are messed up on non joker cards too...
yeah negative is pretty hardcoded
and i spent so long on that shader too...
the hard part about making a shader is making the shader
okay welll. i have no ideas, but surely one of you can think of something else to do for "scafold" cards
hello! i'm attempting to make a joker that is similar to 8 ball; does anyone have a recreation of its code that i could use?
ty!
yeah the card i'm trying to make is 8 ball but "8" -> "Spade" and "Tarot" -> "Code"
so that should be pretty easy
Basically 2 scaffold do 1 slot extra?
Yeah
But im looking to change it to something else entirely
How Easy is to make them scaffold? Because negative surclasses it if it's not super easy
Because anything negative-esque is broken/super hardcoded and requires extra work I don't want to do
They are less rare than negatives
is overriding internal logic (like saving to file and counting chips) available to modify from steamodded? i want to implement my idea at https://discord.com/channels/1116389027176787968/1389894638135148574 as a fun programming challenge, but im not sure if its possible with current modloaders (i could just modify sources and make binary patch, but its not that fun and flexible)
But they don't have any tags or cards to "make" something scaffold
You could do if you have 3+ scaffolds, every scaffold gives you mult or something
Ooh maybe
Check talisman mod, since talisman changes naneinf limit etc
oh, it already uses my idea in implementation, thanks for pointing to this mod
For my Joker, I just substitute any Negative playing cards for Foil cards when they are spawned, except when Cryptid is installed
does anyone know what the message should be for adding a code card? i know adding a tarot card is localize("k_plus_tarot"); is adding a code card localize("k_plus_code")?
(cryptid mod)
The stuff that Cryptid adds has the prefix cry_
ah
got it, cry_plus_code
one last thing: how might i add my custom joker at the beginning of the run (so i can test it easier)?
download debug plus
press 3 on your joker in the collection menu
ah gotcha
how do i make a retrigger joker like chad from cryptid? i looked at his code but he uses contexts that i can't find anywhere in patches etc.
i want to retrigger jokers of specific rarity
context.retrigger_joker?
its in smods
What’s the snippet for leveling up poker hands? (All hands in this case)
Bump
it's all in smods ;-;
No, it's context.retrigger_joker_check
:3
fuck
anyways, yeah, its context.retrigger_joker_check, context.other_card refers to the card its checking and returning repetitions = x will retrigger that joker by that amount of times i think
if context.retrigger_joker_check and context.other_card.config.center.rarity == rarity then return {repetitions = 1} end
Hi bepis
hi beria
Bump
hi
black hole
Talisman 🤮
just to be clear i wasnt being sarcastic lol
probably so the animation looks better or something
im gonna cry
anyways, thanks, yeah i thought that was sarcastic because of how weird that sounded 😭
how do i make this only trigger if the only scoring card is an ace? calculate = function(self, card, context) if context.individual and context.cardarea == G.play then local hand = context.full_hand if #hand == 1 and hand[1].base.value == 14 then return { mult = 5, card = self } end end end it's currently doing nothing
card = card not card = self also context.other_card:get_id() == 14
card.base.value is the rank key iirc, not the id
ok yeah that was it thank you very much!
How do I access my localization? I feel like I'm misinterpreting something because the localization page on smods wiki is not at all in depth
Also check for not SMODS.has_no_rank(context.other_card), else a Stone Ace will work, for example.
I just cannot make the decription show up
the key in loc needs to be j_modprefix_key
Do I need j_ on everything
via what context would i check for a blind being defeated/won
just the localization key
context.end_of_round
got it. in that case, how would i check for the blind's specific type?
card.base.id, and its rank and suit information in general, are always present. "Stone Card" is just some enhanced card that has such information hidden from the player, but it always still exists and can be accessed by code, even by accident.
i wanna check for essentially any type that isnt small blind or big blind
Yes, Card:get_id() accounts for that.
Oh ok
Docs?
G.GAME.blind:get_type()
also G.GAME.blind.boss for the boss blinds
the docs: https://github.com/Steamodded/smods/wiki
I was wondering if you were referring to some other document
I see
Still no description despite adding the j_ prefix
Code?
show more of the localization file too
Chat, question: Is there a way to grab the base of a card from one atlas and the soul layer from a different one?
in the definition, no
i said only j in the localization
thanks mate :D
Ohhhh


desc showing Xnil despite being declared already
you put mult instead of xmult
Okay, so I removed the j_ prefix from the joker code and kept it in the local
But I sitll get no desc
is your mod prefix correct
also while this is probably not the issue as smods removes it, i would recommend not adding the prefix manually to the keys
Idk what dod it
Did it
But it works now lol
I guess removing my mod prefix from the key was the solution
so um, random question, in a scale of 1-10 how hard is it to create a cardarea and a context?
and how would i do it?
thats way lower than what i expected
Idk about custom context tho
is there documentation for all the global game variables and stuff like this? i've been prodding at the steamodded documentation
Anyone maybe?
cardarea depends on what you want it to do
context 1
mostly no
theres this https://github.com/Steamodded/Wiki/pull/30
cardarea i just want it to hold jokers outside of where jokers are held, its for a joker that stores jokers, if that makes sense
and the context is well, for triggering the jokes there
Aiko made something similar
STEAL HIS CODE 🔥
/j
Ask for permission
Are we only supposed to use ogg files and not wav?
i dont even know who Aiko is lol
yes, ogg is preferred
but i'll see what they made and if it'd work for me i'll ask them to use their code
whats the mod they made it in?
ty :D
heya! question, anyone knows how to set cards rank to a random one?
Use math.random
Muhahahahahahaha
thanks
I swear to fucking god if this doesn’t work
GOD FUCKING DAMN IT
Maybe if I turn off highest priestess
These poker cards, they better level up
"FirstTry" :clueless:
I’m named after Lego Batman
“Attempt to compare number with table”
Last time I had this error was with Talisman installed
whats the code
if context.cardarea == G.play and context.scoring_name == 'Flush' and not context.blueprint then
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.4,
func = function()
play_sound('dd1_lovin')
card:juice_up(0.3, 0.5)
update_hand_text({ sound = 'button', volume = 0.7, pitch = 0.9, delay = 0 },
{ level = 'x' .. to_big(card.ability.extra.multiplier) })
for poker_hand_key, hand in pairs(G.GAME.hands) do
local current_level = hand.level or 1
local levels_to_add = math.max(0, math.floor(current_level * (card.ability.extra.multiplier - 1)))
if levels_to_add > 0 then
level_up_hand(card, poker_hand_key, true, levels_to_add)
end
end
update_hand_text({ sound = 'button', volume = 0.7, pitch = 1.1, delay = 0 },
{ mult = 0, chips = 0, handname = '', level = '' })
return true
end
}))
it can also disable bosses, they're meant to be character accurate to the real dark donald.
what do i do?
try wrapping all of them in to_big
So how does one make a custom color text?
Check text styling on the wiki
Oop yeah
The spring is so joyous
always
N have you participated on some yu gi oh esports or something, asking from curiosity
i have played in some online tournaments
Well i couldnt find anything on there
my highest is top 16
if context.cardarea == G.play and context.scoring_name == 'Flush' and not context.blueprint then
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.4,
func = function()
play_sound('dd1_lovin')
card:juice_up(0.3, 0.5)
update_hand_text({ sound = 'button', volume = 0.7, pitch = 0.9, delay = 0 },
{ level = 'x' .. to_big(card.ability.extra.multiplier) })
for poker_hand_key, hand in pairs(G.GAME.hands) do
local current_level = hand.level or 1
local levels_to_add = math.max(0, math.floor(current_level * (to_big(card.ability.extra.multiplier) - 1)))
if levels_to_add > 0 then
level_up_hand(card, poker_hand_key, true, levels_to_add)
end
end
update_hand_text({ sound = 'button', volume = 0.7, pitch = 1.1, delay = 0 },
{ mult = 0, chips = 0, handname = '', level = '' })
return true
end
}))
return {
message = localize('k_level_up'),
colour = G.C.MULT,
sound = "dd1_laugh",
card = card
}
end
these zeroes too
What do I do
to_big(0)
someone submitted this bug report
for some reason, it only happens when you have 5 cards above the hand size limit, and at least one temporary card
under these conditions, using immolate crashes the game
the culprit is this table.sort function
i can't figure out why this would crash the game though
usually that error means that there can be two sort orders for the same array iirc
do you add a playing_card to your temp cards
yeah there has to be temporary cards in your hand for the crash to happen
What
?
strangely the error doesn't happen if you TURN cards into the temporary edition with debugplus
just if they're created by an ephemeral
yeah, thats why i asked if you fill card.playing_card
should be like this
ohhh that second line is the one i'm missing
what the fuck
i see, it assigns every playing card a unique integer value for sorting
so when immolate calls table.sort the game sees cards with the same value and crashes
this is all from one flush.
you forgot the context check
like context.before or something
Average
like this?
if context.before and context.cardarea == G.play and context.scoring_name == 'Flush' and not context.blueprint then
yeah but remove the and context.cardarea == G.play
Help, animated atlas is not going
-- Atlas tm
SMODS.Atlas {
key = 'oscillator_atlas',
path = 'oscillator_joker.png',
px = 71,
py = 95,
atlas_table = "ANIMATION_ATLAS",
frames = 2
}
-- inside whatever joker
atlas = "oscillator_atlas",
pos = { y = 0},
also this doesnt work if it contains a flush
also how do i make it into "if it contains a flush"
instead of that do next(context.poker_hands["Flush"])
jokers cant have animation atlas
thanks!
Fps can be moved as a local variable inside the update function
was gonna 'fix' it with repeating events lmao
Mod 40 is the frames in animation
How do I make it so that it doesn’t show a small “lvl. 12” pop up at the end
Anytime it levels up all poker hands
It shows a random “Lvl. 12” at the end
Then it disappears
SMODS.smart_level_up_hand
how would i go about adding a specific extra card to the selection of a booster pack when it is opened?\
What line?
calculate = function(self, card, context)
if context.before and next(context.poker_hands["Flush"]) and not context.blueprint then
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.4,
func = function()
play_sound('dd1_makudonarudo')
card:juice_up(0.3, 0.5)
update_hand_text({ sound = 'button', volume = 0.7, pitch = 0.9, delay = 0 },
{ level = 'x' .. to_big(card.ability.extra.multiplier) })
for poker_hand_key, hand in pairs(G.GAME.hands) do
local current_level = hand.level or 1
local levels_to_add = math.max(0, math.floor(current_level * (to_big(card.ability.extra.multiplier) - 1)))
if levels_to_add > to_big(0) then
level_up_hand(card, poker_hand_key, true, levels_to_add)
end
end
update_hand_text({ sound = 'button', volume = 0.7, pitch = 1.1, delay = 0 },
{ mult = 0, chips = 0, handname = '', level = '' })
return true
end
}))
return {
message = localize('k_level_up_ex'),
colour = G.C.MULT,
card = card
}
end
replace level_up_hand?
whats the name for rare tag
tag_rare iirc
is there a way to check the specific type of a booster pack that has been opened?
Wrong chat
context.open_booster and context.card.config.center.kind == [kind] iirc
tried this and it error'd unfortnately
whats the error
Guys since the abandoned deck function is hardcoded, how can i make a deck spawn with ranks i want only?
You look at what abandoned deck does and do something similar
is this right
It's a hardcoded function and I can't figure out where the specific function is
How does one check whether a card is enhanced at all?
G.GAME.starting_params.no_faces
It's this
I tried #(SMODS.get_enhancements(context.other_card, false)) > 0 but it didn't work
idk what to tell you beyond look in the source code
next(SMODS.get_enhancements(context.other_card))
And that returns a boolean?
Sigh... Thanks anyways tho!
or nil upon no enhancements?
it returns the next enhancement or nil so it's like a boolean
@red flower how do you detect if the chips is higher than the mult
in the scoring
operator
hand_chips > mult ?
thans
to_big 
your mom's to_big
@red flower to make KQJ dissolve, and 8,9,10 (with change_base) into FCR (my custom ranks)?
Second question, should i do Prefix_F, prefix_C etc?
What’s the toilet paper for
- whats the question
- yes
Oops i didnt wrote the question "what function should i use?"
Like to make KQJ dissolve
joker? consumable?
The cards in the deck
for what
bump
Basically i want to turn AKQJ 10-2 into only A 10-2 and then turn 10,9,8 into FCR (custom)
i get that, for what? a joker? a consumable? a deck? a challenge?
Ohhh Sorry, i'm doing a custom deck
probably :start_dissolve()? never worked with decks much sorry
Oh okay, thanks anyways!!
config = {
extra = {
chips = 200,
xchips = 3
}
},
loc_vars = function(self, info_queue, card)
return {
vars = {
card.ability.extra.chips,
card.ability.extra.xchips
}
}
end,
calculate = function(self, card, context)
if context.joker_main and context.full_hand then
local hand_chips = context.poker_hands[context.scoring_name].chips or 0
local mult = context.poker_hands[context.scoring_name].mult or 1
if hand_chips > mult then
play_sound('tngt_neverforget', 1.2)
card:juice_up(0.5, 0.5)
return {
colour = G.C.CHIPS,
chips = card.ability.extra.chips,
xchips = card.ability.extra.xchips
}
else
card:juice_up(0.1, 0.1)
end
end
end
}
chips doesnt output
whats the intended effect
chips and xchips if chip counter number higher than the mult one
at the moment the joker triggers?
after calculating the cards i presume the easist
ok that doesnt do that
remove these
hand_chips and mult are global variables which represent the chips and mult at the time i think?
maybe
np!!!
who invited him
where'd bro come from
do i really need to have SMODS.optional_features.retrigger_joker = true for retrigger jokers to work? because without this it isn't retriggering anything
you do
help, my shit ain't doing stuff after all cards are scored and what not.
Am I stupid or is this shit lying to me?
and how fix
remove the cardarea check
I can't figure out change_base correctly
send code or explain what you need help with
yeah, calculate runs all the scoring beforehand
if you want proper timing you need to use events
alright!
Basically i have a deck with custom suits and custom ranks based on real italian decks
A 2-7 FCR instead of A 2-10 JQK
and i wanted to transform 8,9,10 into F, C, R and then remove KQJ
You are using modded ranks?
Code?
I'll upload It on github
So we can check it here
Rn i can't login with GitHub because of passkey issues
@bold sleet @daring fern Sorry if i upload like this
perishes
scream
:3
In my defense, it's my First mod
At least you do some proper formatting.
Sometimes, some other times it's a bit wonky
Depends if i'm coding on the go on my phone
erm
:)
---@diagnostic disable-next-line: lowercase-global
i have many in my codebase
i dont regret a thing
Thanks, i'll put it too
you can also disable the whole file by
---@diagnostic disable: lowercase-global
i think its better to use an uppercase global for convention but eh
oh i just open my mods folder when i work
also can you update links in JokerDisplay's wiki. it all has the wrong number
game seems to crash when I try to use this joker but it seems like it's not its fault
config = { extra = { Xmult_gain = 0.15, Xmult = 1 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.Xmult_gain, card.ability.extra.Xmult } }
end,
calculate = function(self, card, context)
if context.before and context.main_eval and not context.blueprint then
local enhanced = {}
for _, scored_card in ipairs(context.scoring_hand) do
if next(SMODS.has_enhancement("m_fnaf_pizza")) and not scored_card.debuff and not scored_card.vampired then
enhanced[#enhanced + 1] = scored_card
scored_card.vampired = true
SMODS.destroy_cards(scored_card)
G.E_MANAGER:add_event(Event({
func = function()
scored_card:juice_up()
scored_card.vampired = nil
return true
end
}))
end
end
if #enhanced > 0 then
card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_gain * #enhanced
return {
message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xmult } },
colour = G.C.MULT
}
end
end
if context.joker_main then
return {
xmult = card.ability.extra.Xmult
}
end
end,```
Also I'm trying to make a joker where it destroys a card with a specify Enhancement when scored
before the hand is played
I'm using Negate Texture Pack template as a base, but this doesn't seem to be working
SMODS.Atlas{key = "Seal", path = "Enhancers.png", px = 71, py = 95, prefix_config = { key = false } }
instead of if next(SMODS.has_enhancement("m_fnaf_pizza")), use if SMODS.has_enhancement(scored_card, "m_fnaf_pizza")
Hi jo, Sorry if i ping you again. I finally got into github , so it's https://github.com/Kuroeks/BBB
Tried to implement the code of telescope to detect if a planet card is associated with your most played hand but it doesn't proc the Xmult upgrade
The variables at the top get set to nil and 0 every time a context is calculated.
what should I set them to?
No, you should move them to in the if context.using_consumeable check.
Tried to move things around
added back the variables to the local variables i realized that
Did some fixes but it's still not working
main issue is making the game check the type of planet card used and whether it's associated with your most played hand
Have you tried printing some things?
No i haven't
imma have to check what command allows for me to print to a console
LOL
What i want to know is what is the correct way to check the key of a consumable used
since that is what gets printed out
the rank isnt showing the description
context.consumeable.config.center.key
It worked!! tysm
There is no ranks_plural localization category, only ranks
thank you!!!
So I'm a little confused... What is "juice_up" in the context of applying seals to a card? Is it the little wiggle it does?
Yes, it's just that little animation.
Appreciate it. I'm trying to figure out the ins and outs of consumables and how they apply certain statuses. Stuck (no pun intended) on stickers rn.
ohoho I finally have figured out stickers
@hexed stump So in this code snip, I've got code that applies a seal, then I'm trying to apply a perishable sticker, but it simply does nothing. I don't think I'm referencing the appropriate object, just not sure of the exact syntax to do so.
youre applying the sticker to the consumable
Ah, ok... Yeah, that sounds about right
I ccidentlly did that when I was first trying to apply stickers
card, in this case, is referencing the consumable card played
Yep
yes
So you'll want to specify the highlighted card instead
so instead of card, would I reference #G.hand.highlighted?
G.hand.highlighted[i]
[i] because of the for loop, which circles through all selected cards
exactly
# is for getting the number of items in an array.
\#
Okay I’m on my phone now though I’ve still gotta suffer through the keyboard for coding
hi N
hi D
how are you my friend buddy pal
Yeah I forgot about that markdown syntax, lmao
i am doing much better thankfully wbu
i always forget
hell yea, im very tired but im doing okay
wondering what i shall have for dinner tonight
went out and bought my little brother a wii power adapter causae he lost his
might this weekend go to another game shop and see if i can find anything good
@red flower @hexed stump Thanks a ton you two, been bashing my head against that for a bit now. Building the mod whilst also learning LUA and how to do all this at the same time is a bit of a challenge. This community is an absolute godsend.
Yeah everyone was nice and helpful when I started too
Real
It’s a very nice place
Those perishable stickers aren't ticking down, but that's a struggle for another day. Gotta go do the 'merica day thing.
we gotta start being meaner
Don’t quote me on this but I think you need to set a value for it
there's also card:set_perishable() iirc
That’s probably better for vanilla stickers
Hey N, remember when you helped me with the certificate like joker? for some reason, i just realized the cards are being added to my deck but i cant see them in my full deck screen
is there a reason for that, also sorry for bugging you so much haha
uhhh
i think i forgot to add that stuff when i switched to the smods function
let me test and fix it
oo ok ! thank you
What's the field for the mod that a center originates from?
is it just center.original_mod?
is the mod a string or is it the full mod object?
it's the full mod object
cool
.config.center.original_mod, yeah.
fixed!
wait what was the fix?
Hello dilly how are you
Hello Winter how are you
hi vic my friend how are you
im alright, livin best i can
hello hello!!!
Winteerrr
Doing challenges for my mod
And by doing, I mean thinking, because we put so little thought into them
Fan works or another one?
I’m doing ok. Glad to hear you’re alright :)
bump
for context, i'm patching into cryptid's lib/content.lua and making it so that if you have any of these rarities from my mod, the exotic music will also play. for some reason, exotic music doesn't play when any of these rarities are owned, and i'm stumped
Why not just hook SMODS.Sounds.cry_music_exotic.select_music_track?
you need to add it to G.playing_cards basically
i've never done a hook before, but that'll probably work. any documentation on how to hook something?
No.
In LUA, it is a very important concept to understand that everything is a variable and all variables may be edited in runtime. This includes functions. With modding other peoples' LUA files, like Klei's basegame code, you may find yourself wanting to run your code before or after the original fun...
Fanworks. I just finished up doing the 2.1.1 update for Cardsauce though
I tried to implement DNA's code into a joker but i'm trying to make it duplicate multiple cards in a hand, but it only does one even in a for loop
if you use return it exits out of the funtion
The copy return output or the return true when materializing a card?
did i do this wrong?
-- hook into the music_exotic select_music_track function thing to add more of my rarities
local original_select_music_track = SMODS.Sounds.music_exotic.select_music_track
SMODS.Sounds.music_exotic.select_music_track = function()
return (original_select_music_track and original_select_music_track())
or #Cryptid.advanced_find_joker(nil, "crp_exotic_2", nil, nil, true) ~= 0
or #Cryptid.advanced_find_joker(nil, "crp_mythic", nil, nil, true) ~= 0
or #Cryptid.advanced_find_joker(nil, "crp_exomythic", nil, nil, true) ~= 0
or #Cryptid.advanced_find_joker(nil, "crp_2exomythic4me", nil, nil, true) ~= 0
or #Cryptid.advanced_find_joker(nil, "crp_22exomythic4mecipe", nil, nil, true) ~= 0
or #Cryptid.advanced_find_joker(nil, "crp_exomythicepicawesomeuncommon2mexotic22exomythic4mecipe", nil, nil, true) ~= 0
end
Yes.
why is it crashing? what did i do wrong
It's SMODS.Sounds.cry_music_exotic.select_music_track not SMODS.Sounds.music_exotic.select_music_track
ah
So i'm guessing I should place it inside of where the copy is created?
No, move it outside of the for loop.
hmm can you explain this a little more? how would i add the card to g.play_cards after?
💪 got my code in separate files finally no more scrolling down 1500 lines to work on an unrelated thing
Is it possible to have stone cards also include their original card rank through a joker?
how do you create a custom info-queue? (rather than using a vanilla one)
Yes.
You would create a custom localization entry and refer to that.
that i figured
i'm using info_queue[#info_queue + 1] = {key = "mucho_tooltips_thecore", set = "Other"} in the loc_vars code of the joker (before the return) and the code itself in the localization is this one
return {
Other = {
mucho_tooltips_thecore = {
name = "...",
text = {{"..."},
{"..."}}}
}
}
yet this is what appears
how do i call specific tags in smodded, i want to make orbital tags with a joker but idk what to call for that
also negative tags maybe
i think it would be better if you check what i added in vanillaremade haha
ok will do !
local orbital = Tag("tag_orbital")
orbital:set_ability()
add_tag(orbital)
```?
and it would be the same for negatives?
Did this but it doesn't work at the moment
Yes, but tag_negative instead of tag_orbital
fixing it atm
Card:get_enhancement doesn't exist.
It would be SMODS.find_card instead of find_joker
got it
from_omega
Hooks shouldn't be in a joker.
What i now did was with a scoring hand, it will check for if a card is a stone card, but i haven't been able to find any good info from other mods about how to set the id of a card
No, it would be a hook of SMODS.has_no_rank
Like this?
No.
Oh?
looking at the documentation on SMODS atm i get what has_no_rank does now
I think this might work
No.
if you have a showdown blind with an in_pool, do you have to re-make the only appears on multiples of win antes restriction
local oldsmodshasnorank = SMODS.has_no_rank
function SMODS.has_no_rank(card)
if next(SMODS.find_card("j_modprefix_key")) and SMODS.has_enhancement(card, "m_stone") then return false end
return oldsmodshasnorank(card)
end
Did this
Ohhh gotcha
Is there an effective way to do alt win conditions for challenges?
does table.remove() accept a table named index instead of a position? (whoops)
no
Maybe check if you're in said challenge and if the condition is met call win_game()
shrug guess so?
hello!! i am aware that for multi-part jokers you can set where their Atlas sprite is independently but i was curious to know if for different parts of a joker sprite you could set their screen position differently? trying to have the effect of a joker that mostly sits flush with normal jokers but has things happening independent of it and am not sure how to achieve such an effect without seperately controlling the screen positions of the different parts,,,
guys, do you know if there's a way to make the perma_bonus to apply extra mult instead of chips?
Yes.
attempting to make a joker which either duplicates or destroys cards in played hand, chosen at random, and it just 9/10 times destroys every card?
is somethng off with the math here ive attempted so many times im refusing to believe its just that im just getting that luck every time
very occasionally it wont destroy one of the cards
i dont actually have the duplication set up yet but that shouldnt matter for this part
it seems to be a proper 1 in 2 if i only score one card so is the calculation maybe taking place more times than it should or something?
hi. i couldnt find anything so im asking here. where do i find the mods folder via SMODS?
---Simple function to check for any given chance.
---@param max number 1 in N chance, where N is `max`
---@return boolean success If the random chance succeeds
function FG.FUNCS.random_chance(max)
if pseudorandom('mila', G.GAME.probabilities.normal, max) <= G.GAME.probabilities.normal then
return true
else
return false
end
end
Possibly this function could help you?
Yes, it's triggering once for every scoring card.
cool will try 🙏
Uh... you can open it from balatro. Where it lists all the mods and stuff.
hold on
yea ik but im trying to get is programatically
Ah uh...
what do you need it programatically for?
starting a new löve thread with code from another file
ok wait this might not fix my issue, how would i get it to do the calculation for each card individually without messing with the math?
Change the context check to if context.before
OH wait i think i see
SMODS.MODS_DIR?
i thought there was like SMODS.current_mod.mod_dir or smtn no?
like
current_mod doesn't always exist/isn't always properly defined
i remember using smtn but i just cant remind myself of it
its in most cases
Also, a thread instead of an event? What kinda stuff are we getting into?
while smods is loaded obv
Do you want the current mods folder or do you want the Mods folder?
websockets and blocking functions
-# idk bruh 😭
the mod folder
-# i was mildly joking sry
good luck 😭
can't you like pass parameters to a love2d thread
you can just pass the current mod directory that way
yeah SMODS.MOD_DIR should work if you want the Mods folder
i need the mod directory to load the file 😭 (because smods.load_file runs the file afaik or am i dumb)
if you want the current mod's path there's SMODS.current_mod.path (current_mod is only defined the first time the file is ran)
ok this is an idea for a joker i have but im not sure if its possible so im asking here to get an idea
is it possible to detect if the first two cards played in a full house are smaller than the last three, then have an effect happen if that is true?
also there is an SMODS.https if you need it
THATS what i was searching for tysm
i already found a ws module thanks tho :)
Bump
I notice the error doesn't happen if I change the button function
But I have the function defined
Yes.
any idea what that would look like?
👉👈
No.
then how do u know its possible?
he just does
don't argue with the ways of mr poly bridge
he has all seeing knowledge
but only on if this are possible
gosh ok
You check if your hand is a full house, you check your cards, get the min and max rank, check if the first two cards are equal to the min, gg
ooo ok i like that approach, basically just checking the first 2 instead of all the cards twice kinda
I mean you specified "if the first two cards played in a full house is smaller than the last three"
yeah i just wasnt thinking that way,
how i would do it is like
If the two small cards can be anywhere else that's a bit more complex
get the max rank of the first two and get the min rank of the last 3 and compare them
youd only need to check 1 thing that way
hmmm so like compare the biggest rank of the first two to the smallest rank of the last three
in my head i think that works
does anyone know where custom challenges go in the mod folder?
thanks for the help, this joker will prob be the most complex one for me so i appreciate it
they're defined just like anything else like jokers and stuff, it's not a specific folder
yeah
hi
is it e_poly or e_polychrome
e_polychrome
thanks
Anyone know why my modded seal shows up as a stone card in the collection?
What's the code for your seal?
name = "Rabbit Hole",
key = "s_rabbit",
badge_colour = HEX("4F483F"),
config = { mult = 5, chips = 20, money = 1, x_mult = 1.5 },
loc_txt = {
-- Badge name (displayed on card description when seal is applied)
label = 'Rabbit Hole',
-- Tooltip description
name = 'Habbit Hole',
text = {
'Draw a {C:attention}7{} into',
'your hand when played'
}
},
loc_vars = function(self, info_queue)
return { vars = {self.config.mult, self.config.chips, self.config.money, self.config.x_mult, } }
end,
atlas = "Sigils",
pos = {x = 5, y = 0},
-- self - this seal prototype
-- card - card this seal is applied to
calculate = function(self, card, context)
-- main_scoring context is used whenever the card is scored
if context.main_scoring and context.cardarea == G.play then
SMODS.create_card(set == 'Playing Card', area == G.hand, no_edition == true, rank == '7')
end
end,
}```
Dawg
I reversed the axes
why name
Oh. I dont know

I want to have to Joker with an active ability, like how a "Use" button pops up for Consumables but on a Joker. Anyone know where I could start?
Hook G.UIDEF.use_and_sell_buttons
how qwould i go about making a joker not appear in the shop, judgmenet, or any other sources besides a specific joker spawning it
Now I need to do the other 19
(Which is really only like, 6 tangibly different things)
why aren't the jokers appearing as negative in the challenge?
it's edition = 'negative' instead
ah alright
anyone who's worked with UI before, can you help me find the problem in this code?
local use = {n = G.UIT.C, config = {align = "cr"},
nodes = { { n=G.UIT.C, config = {
ref_table = card,
align = "cr",
maxw = 1.25,
padding = 0.1,
r = 0.08,
minw = 1.25,
minh = (card.area and card.area.config.type == "joker") and 0 or 1,
hover = true,
shadow = true,
colour = G.C.UI.BACKGROUND_INACTIVE,
one_press = true,
button = "use_card",
func = "can_use_joker"
},
nodes = {
{ n = G.UIT.B, config = { w=0.1 ,h = 0.6} },
{ n = G.UIT.T, config = { text = localize("b_use"), colour = G.C.UI.TEXT_LIGHT, scale = 0.55, shadow = true }}
}
}
}
}
return {
n = G.UIT.ROOT,
config = {padding = 0, colour = G.C.CLEAR},
nodes = {
{ n = G.UIT.C, config = {padding = 0.15, align = "cl"}, nodes = {
{ n = G.UIT.R, config = {align = "cl"}, nodes = { sell } },
{ n = G.UIT.R, config = {align = "cl"}, nodes = { use } }
}},
}
}
If I comment out the definition for use, this code works fine. For context, I'm trying to add a "Use" button to Jokers
Can anyone tell me why this is spawning a card of a random rank
SMODS.add_card({set = 'Base', area = G.hand, no_edition = true, rank = '7'})
whats smods version
1.0.0-beta-0530b
update :3
colors dont work :(
Thanks
two questions:
- how might i generate a random rank?
- how might i create a joker that has to store five ranks and re-randomize them when a blind starts? (is there something similar that i could use as a base in cryptid?)
- use vanilla remade's code for random rank jokers (eg: mail in rebate)
- never sample from cryptid. use any other mod but cryptid
damn
bump
heyy so i am trying to make a joker that works kind of like faceless joker but instead of face cards, it works when steel cards are discarded, do i detect the steel cards being discarded using m_steel or is it something else? any advice for this
is it a hook or a patch
this is a hook
does sell local exist
sample vanilla remade
if there’s a behavior a vanilla joker does always sample vanilla remade
how does one refer to the shop rate of a (custom) consumable? [im doing voucher stuff/adjusting said rate for context lmao]
i see in the docs that it's G.GAME[key:lower() .. '_rate'] [in the ObjectType page]
but
say the key for the consumable is nix_consume,
would i do G.GAME[nix_consume:lower() .. '_rate']
or use the prefix additionaly
-# so wsh_nix_consume
or am i missing smth here
hm
it works if I comment out the local use definition
what's the crash
No, you would do G.GAME.nix_consume_rate.
OHHH
hang on, do I need to have can_use_joker defined somewhere in my code before I can use this? that might be what's causing it
does someone know which command is for getting the total value of chips scored from a played hand?
I was trying something like "card.ability.extra.chips = context.scoring_hand.chips" but I'm not sure if this would work...
Yes.
looks like it
i did i pretty much replaced the faceless stuff with steel stuff but nothing so thats why i am asking here
i see mb LOL,
that worked ty
alrighty thank you guys
local total = 0
for k, v in pairs(context.scoring_hand) do
total = total + v:get_chip_bonus()
end
can this also be applied to mult aswell?
Yes, but it would be get_chip_mult instead.
pls explain how.
It needs to be an ANIMATION_ATLAS
yay, more document reading
Noticed something weird with one of my UI buttons
The first time you click on it, it's all messed up
But the second time (and all times after), it works properly
Can't figure out why
u need to warm it up first
wha
u need to punch it until it works like an old tv
real
never seen that tho
how can i get a list of all ranks currently loaded?
not just all ranks available in the deck, but ALL ranks
Almost perfect
SMODS.Ranks
still getting crashes even after defining the can_use_joker function
oddly enough this happened with input boxes before
ty!
Ok, 2 issues now, but at least I avoid crashes.
Anyone know how to get both debuffs to work and to fix that ugly blind at the top left?
o
wat was the fix for it then
if its the same problem, then you want to force it to run :recalculate() again after its loaded
can i see the crash and the functions
recalculate?
yeah, basically making an ui reload itself
notepad++ spotted!!
you probably only need to use recalculate on it once
function:
-- "Can use" function for Jokers
function Card:can_use_joker(any_state, skip_check)
if not skip_check and ((G.play and #G.play.cards > 0) or
(G.CONTROLLER.locked) or
(G.GAME.STOP_USE and G.GAME.STOP_USE > 0)) then
return false
end
if G.STATE ~= G.STATES.HAND_PLAYED and G.STATE ~= G.STATES.DRAW_TO_HAND and G.STATE ~= G.STATES.PLAY_TAROT or any_state then
end
return false
end
I left the main section empty for now since I just want to make the button appear first
o
yea
what does your button code look like
try
calculate = function(self, blind, context)
if not blind.disabled then
if context.debuff_card and context.debuff_card.area ~= G.jokers and
(context.debuff_card:is_suit("Clubs") or context.debuff_card:is_suit("Spades")) then
blind.triggered = true
return {
debuff = true
}
end
end
end
taking a screenshot instead of sending the code because it's 50 lines and i don't want to flood chat
i have it patched into the ui
🤔 does it really need patching, i thought u can achieve the same with just hooks
it needs to be in G.FUNCS.can_use_joker specifically (also i would recommend adding your mod prefix to global functions specially if they have generic names like that)
I've gained the impression that patching is just safer
/more compatible
anyways, i think the func should be in G.UIT.B's config maybe?
ultimately i want the mod to interfere with as little things as possible
tru
so I would have a func in there that calls recalculate()?
so should the full definition be
G.FUNCS.can_use_joker() or
G.FUNCS.Card:can_use_joker()
mhm
okii
1
i have to go buy breakfast rq, if it still doesnt work uhhhhhh :3
worked, thank youu
working code.
you know how to fix this part?
(ignore the discord overlay.)
this looks like you- FUCK
Is it 17x17 or 34x34 for 1x?
alright last thing, the way it's formatted can I have a can_use and use function inside each specific card like for consumables, or do I need to place that inside the main section of this function?
i mean i havent read what youve done honestly
i didn't know if 34x34 was for 2x or 1x.
i have that in my mod tho so its possible
Would it not be like this
recalculate doesn't seem to be defined
wasn't it e.UIBox:recalculate() here or smth
weird, it should be defined
ohhh
i forgot idk
🤔 the text input code only needed me to use e:recalculate()
maybe its different for this
damn
func is called every frame
yea but it should only recalculate once
stack overflow implies that it broke via recursion or something
my guess was that recalculate called recalculate again when it defined func
but yeah it shouldnt reach there
o
so I tried putting e.UIBox:recalculate() in the original function and it didn't even give me like an error message it just closed my game
yeah theres some overflowing situation going on
The problem seemed to be that the values weren't being removed so when they were calculating they were also keeping the values of previous enhancements.
what do I write after card = ... , if I want the message to be shown under the joker ?
message_card = card?
how do you give a poker hand a specific amount of chips or mult
i have the opposite problem, i want the message to be under the card and not the joker
if im creating a joker via another joker (for example riff raff) how would i give that joker a specific edition?
you can add edition = "e_negative" inside SMODS.add_card
yeah like that SMODS.add_card{key = "j_xxxxx", edition = "e_negative"}
ohhh ok
if you have card = card, message_card = card then you want to remove them
if its the same context
else uhhh message_card = just any card you want it to be shown under
so if im adding just any random joker id do it like so?
yeah
looks like it