#💻・modding-dev
1 messages · Page 301 of 1
ahh, okey
@wintry solar i messaged you btw
and i dont put the second half in the return right?
you dont need my print or anything no, just the sprite related stuff really
I've done this before. I'm pretty sure you can just do card.pos
oh i meant the sprite related stuff
Not at home to be able to look at the code rn though
probably, but this is what worked several months ago for me so did this
ok so this destroys every card in hand
-# issue
ive just got it thrown in my calc and thats it, mine is oriented around money so i just do this
-- **Instantly trigger Neglected state if money reaches 0**
if to_big(G.GAME.dollars) <= to_big(0) and not card.ability.extra.debuffed then
card.ability.extra.debuffed = true -- Mark as permanently debuffed
card:set_debuff(true) -- Apply debuff immediately
card.sell_cost = to_big(0) -- Set sell value to $0
-- Change texture instantly to Neglected version
local desiredx, desiredy = 1, 1 -- sets new points of atlas for new texture on neglection.
if card.children and card.children.center then
card.children.center:set_sprite_pos({ x = desiredx, y = desiredy })
else
print("Error: Unable to update Tamagotchi sprite.")
end
return {
message = "Neglected! Tamagotchi stops growing!{}",
}
end
i dont have a context.individual
destroying_card
Which card are you trying to remove specifically
Wrong reply.
so confusing
all played
question what are ways yall have seen credits shows (ie cryptids badges with the changing text)
ok it works
its crazy how "ing" can make such a difference
andd what is the card cchildren stuff?
It’s just a different flag, it’s not that crazy
hm
I use another shorter badge. I can dm you how I did it later when I get home (I'll prolly just call you)
i see
I wanna have something original lol
as far as i recall card children has the sprite objects
tis why I'm asking
I meant like how it looks
something like this then?
ah
This won’t have any visible effect
its just cut off
Before the return?
oh! would i seperate that and the return if i want it to happen at the same time?
is there a documentation on all of the animations? (like flip, dissolve, shatter, etc)
I mean if the code works it works, but it looks like the if statement right before the return doesn't end
You need an end after the return
You would probably be best off looking in card.lua
k
You should wrap the set sprites inside events too
homie im not a coder im learning
Otherwise it will change back and forth instantly

I thought that would go into the else
same
The else looks like it’s intended for the first if check, not the second
With the line that you have selected, tou need to have an end somewhere for that. Whether that be right before or after the return depends on how you want it to work
That would be a logic error then
Idk what they’re trying to do to comment on the logic
ohhh ic :3
No it’s just a syntax error, it’s pretty clear how the code is supposed to be if you actually read the conditions
what about this?
You are still missing an end
Actually
The way you have it, everything in the code is inside the context.jokermain
No. There is an ending bracket
Yea!
oh yipee!!!
basically every if should have an end
right, i was nesting the if statements oops
You can do that, they just need separate ends
i hope this works, i have an essay to write.,,
how would i play the dissolve animation to all played cards?
Cardarea equals g.play
Context.othercard.dissolve
Ghost cards.
.remove them afterward
hey it works besides the fact i got the x's mixed up!!
for some reason the sound isn't triggering anymore tho
Wait I'm pretty sure dissolve removes them itself
Look at the way that ritual dagger does it
I'd show it off, but I'm on mobile rn
how do i setup localisation for seals because the way ive seen other mods doing it just doesnt work
Remove ur mod prefix from Smods.seal
You don't need to define with the prefix.
It will automatically add it, unless you specify it not to (which you didnt)
im pretty sure i tried that and it showed up blank still but let me test
If it’s there it won’t add it again fyi
do you wanna destroy them too, or just play teh animation?
You may also need to add s_ to the localization
No.
seals don't have a letter prefix
the localisation doesnt show up with or without the entr_ prefix in the key, with or without _seal at the end of the loc key and with or withou s_ at the start of the loc key
Where are you putting the entry?
in Other
Is it in descriptions.other?
iirc seals are modprefix_key_seal
yes i tried that
It needs to be in descriptions.Other
this is why I don't use localization and just put the description directly into the smods object
the seal key rn is crimson and the localisation key is entr_crimson_seal
unless the mod prefix is not automatically prepended like it isnt for stickers but im pretty sure i tested that also
Alogn with misc.labels
You must have something set up wrong, the key is definitely correct
Maybe the extra label definition under desc.other is breaking it? I don't use loc files, and all my knowledge is from helping someone yesterday.
idk how i would have something setup wrong since theres no loc_txt in the seals definition and it works fine for every other thing including stickers
ok so i tested it, and the top line is only adding mult and not doing the other two things :(
i think i need a break this hurts my head
Can you show the full setup of your loc file
you want me to just post the whole thing?
Try just card.pos = {}.
Yea
Or actually it's cause post joker runs right afger
So it is doing it, just undoing it instantly
why is this giving me an error saying that ability is nil?
huh.,,
thats what i was gonna try
You need smth like this https://github.com/Steamodded/smods/wiki/Guide-‐-Event-Manager
oh im on that :3
that should work, as long as the context is correct
idk why it would be instant the editions stuff happens after.,,
because I do this
rn i have this
All jokers are calculated (calculated function ran), and the the return value is processed later
....
so can i have it in the return?

using an event is better
idk how events work so ig im not doing this today
bcos i got shiet to do unfortunately
I'm like 90% sure of you move h_size out of extra, and just put it in the config, the game will change the hand count for you, and you don't need the add/remove. No idea why ability isn't defined though.
no i tired that and it didnt work
this is how troubadour does it
oh wait im a bit stupid for a different reason
im setting hand size instead of hand count
i am dum
as I understand it, there's a queue (FIFO) of events that ensures things execute in the correct order
ok so now why is THIS telling me ability is nil?
use card not self
oh yeah
It’s for another day I have an essay due really soon and I’ve been procrastinating

Tyty :3
how do I properly format the info box? I want it to display the stats of another joker
i can't find jolly joker's effect in card.lua
the hand type and suit mult jokers are collectively gathered under their effect types
instead of their name
ty
Replace e_negative with the joker key? Possbily
well that was really simple, thanks
yes
you cooked
i will probably need to rework my other jokers at this pace, im familarizing with this pixel art stuff a bit too fast
this was the previous joker i made a week ago 😭
Asian fan?
"uh hello"
u got games on ur phone?
i've done that before lmao
you know the quick fix?
what do you type in debugplus to change the Ante to a specific one
depends what you are trying to do where you ended up doing that? lol
...destroy them...
when i did that i was trying to create them lol
if context.individual and context.cardarea == G.play then
if self.safe then
for _, card_in_play in ipairs(G.play.cards) do
card_in_play.ability.perma_mult = card_in_play.ability.perma_mult or 0
card_in_play.ability.perma_mult = card_in_play.ability.perma_mult + card.ability.extra.mult
end
else
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.4,
blockable = false,
func = function()
for _, card_in_play in ipairs(G.play.cards) do
G.play:remove_card(card_in_play)
card_in_play:remove()
card_in_play = nil
end
return true;
end
}))
end
end
take a look if you want
eval G.GAME.round_resets.blind_ante = number
heres a tarot i did that destroys cards if that helps
SMODS.Consumable{
key = 'Midas',
set = 'Tarot',
atlas = 'Jokers',
pos = {x = 4, y = 21},
loc_txt = {
name = 'Midas Touch',
text = {
'Select up to {C:attention}#1#{} cards and destroy them',
'Earn {C:money}$#2#{} for each card destroyed'
}
},
config = {
extra = {
cards = 3, -- configurable value (default to 3 cards)
money_per_card = 2, -- $2 per card destroyed
},
},
loc_vars = function(self, info_queue, center)
if center and center.ability and center.ability.extra then
return {vars = {center.ability.extra.cards, center.ability.extra.money_per_card}}
end
return {vars = {}}
end,
can_use = function(self, card)
return G and G.hand and G.hand.highlighted and card.ability and card.ability.extra and
card.ability.extra.cards and #G.hand.highlighted > 0 and #G.hand.highlighted <= card.ability.extra.cards
end,
use = function(self, card, area, copier)
-- Remove the selected cards in hand with redundancy
if G and G.hand and G.hand.highlighted then
local money_earned = 0
for _, selected_card in ipairs(G.hand.highlighted) do
selected_card:start_dissolve() -- Ensures visual effect of removal
-- Ensure jokers properly process the removed card
if selected_card.playing_card then
for j = 1, #G.jokers.cards do
eval_card(G.jokers.cards[j], {
cardarea = G.jokers,
remove_playing_cards = true,
removed = {selected_card}
})
end
end
-- Add money for each destroyed card
money_earned = money_earned + (card.ability.extra.money_per_card or 0)
end
-- Use ease_dollars to add the money earned
if money_earned > 0 then
ease_dollars(money_earned)
G.GAME.dollar_buffer = (G.GAME.dollar_buffer or 0) + money_earned
G.E_MANAGER:add_event(Event({func = (function()
G.GAME.dollar_buffer = 0
return true
end)}))
end
end
end,
}
anyway im trying to make a blind that ignores enhancements, editions, and seals ive got removing and restoring editions and seals but haven't got enhancements and its restoring them too early
SMODS.Blind {
loc_txt = {
name = 'The Truth',
text = { 'Ignores all seals, enhancements, and editions for cards' }
},
key = 'Truth',
name = 'The Truth',
config = {},
boss = { min = 1, max = 10, hardcore = true },
boss_colour = HEX("7f7373"),
atlas = "BlindChips",
pos = { x = 0, y = 2 },
dollars = 5,
press_play = function(self)
-- Store the original values before making changes
G.E_MANAGER:add_event(Event({
func = function()
for _, card in ipairs(G.play.cards) do
-- Save original values (to restore after scoring)
card._truth_backup = {
seal = card.seal,
edition = card.edition,
}
-- Wipe them
if card.ability then
card.seal = nil
card.edition = nil
end
end
return true
end
}))
-- After scoring, restore original values
G.E_MANAGER:add_event(Event({
func = function()
for _, card in ipairs(G.play.cards) do
-- Restore the original values
if card._truth_backup then
card.seal = card._truth_backup.seal
card.edition = card._truth_backup.edition
end
end
return true
end
}))
return true
end
}
how to get card enhancement for this?
I think it would be cleaner if you just told the calculation code not to run in that blind
how to do that?
question why does the showman glitch work
like what flags get fucked with to make it work
I think you should just be able to hook the relevant functions and not run the original during your blind
is this correct?
.dissolve()
``` maybe idk
:start_dissolve()
no, what do you want to do
destroy played cards
trying to play the dissolve animation
Destroying cards will automatically do that
remove should play the animation already
wait ".remove()" is all you need to destroy a card?
how to hook the relevant functions and not run them? (i haven't hooked anything)
I meant the { remove = true } part
:remove() can destroy a card but it doesn't play any animations and if you do it during scoring it can create ghost cards
ic
ok yeah just checked it does
ghost cards being this?
No its invisible cards in your hand that you cant select.
yeah it does that aswell
can't select them and the texture is f*cked
posted the code a bit under it if you want it
yay
thx
have more from when i did this myself
card area cards
i love this game
or the time i made the deck radioactive and it just constantly emitted green particles
you could play with that one but the deck would just emit green particles forever
is this any good and if so what rarity would it be?
so if you play a flush thats like 10 mult?
I think it means total times played for each card this run.
how do i set up a joker file system?
elaborate
like, where each joker is in a separate file under a folder that the main.lua pulls from
i tried to just copy Neato Jokers but it gave me an error
I would not reccomend having each joker in it's own file
imo that seems very inefficient
its a group made mod so its best if each joker has its own file so that we can work independently of eachother
ive got smth kinda similar with a joker with cards that gain mult every time they are played and we have it at rare
ah
y not use git
plenty of mods do it?
I haven't seen any but I haven't been looking
I would recommend having each joker in it's own file. But it's something up for your organizational preferences. But I really prefer the each joker as a separate file approach both for testing and the way it's friendly towards merges
with a shit ton of jokers scouring through one file for what you want is admittedly tiring
so having each joker in its own file lets you readily access whatever joker you need to mess with
ive got about 50 jokers and already its a emss to go through one file for each
Neato, Cryptid, i think Aikoyori does too
if i split it up itd be way easier
i know cryptid doesn't do that
cryptid doesn't
it does have different files for stuff but not 1 file for each joker
What's your current set up? Really, the way to read them is just a loop over the list of files. Or you can do what Kino does, which is what Ortalab does because I stole it from Eremel's Ortalab code, and have the joker keys in a specific file, so you can easily add and remove them without moving the files
not for jokers individually but it separates the code based on type
crtl f is useful here
ive got around 60
doesn't effect me much me
ctrl f is also slower than clicking one file and being directly in it
i have 60+ jokers and keep everything in the same file so i can reference my own code for how i did something while trying to code more stuff lol
plus i have jokers who reference other jokers which makes ctrl f not take me directly to the same shit
I mean, split screen is in most IDEs 😛
thats true, split screen my beloved
nah i want to see all the blank space in full
But it's honestly just personal preference, whatever way you go about it. I don't think there's any performance related arguments to make for either one. I've got 250 jokers, and that's a lot of files, but it's quite helpful in navigating everything for me. I'm sure ctrl f would also do, but I use Vsc's search for referencing other code, anyway. The best thing about it, for me, is honestly just that it tells me exactly which joker is the cause of a crash
@long urchin what's your current loading code?
main.lua:```lua
-- atlas definitions
SMODS.Atlas {
key = "roffers",
path = "Jokers.png",
px = 71,
py = 95,
}
SMODS.Atlas {
key = "rickers",
path = "Stickers.png",
px = 71,
py = 95,
}
SMODS.Atlas {
key = "reffs",
path = "Decks.png",
px = 71,
py = 95,
}
-- load common util funcs
assert(SMODS.load_file("globals.lua"))()
-- load all individual cards
local subdir = "cards"
local cards = NFS.getDirectoryItems(SMODS.current_mod.path .. subdir)
for _, filename in pairs(cards) do
assert(SMODS.load_file(subdir .. "/" .. filename))()
end
--favorite card calc
local igo = Game.init_game_object
function Game:init_game_object()
local ret = igo(self)
ret.current_round.most_played_card_amount = 0
return ret
end
function SMODS.current_mod.reset_game_globals(run_start)
if not run_start and G.playing_cards then
for _, c in pairs(G.playing_cards) do
if c.base.times_played > G.GAME.current_round.most_played_card_amount then
G.GAME.current_round.most_played_card_amount = c.base.times_played
end
end
if G.GAME.current_round.most_played_card_amount > 0 then
for _, c in pairs(G.playing_cards) do
if c.base.times_played == G.GAME.current_round.most_played_card_amount then
c:add_sticker('roff_favorite', true)
elseif c.ability.roff_favorite then
c.ability.roff_favorite = false
end
end
end
end
end
SMODS.current_mod.description_loc_vars = function()
return { background_colour = G.C.CLEAR, text_colour = G.C.WHITE, scale = 1.2 }
end```
it'd make updating it on github take longer tho cause theres a limit on how many files you can upload at once right?
ooh github backups for every joker does sound nice though
I think it's like 2 gigs at which a free git repo starts throwing up issues, and you're really not likely to reach that due to your code
not really cuz youd just import the individual joker files right? you wouldnt have to replace everything
my mod is at 25g so far
bump
also, I don't think there's a file count limit on git when you commit something
I've had free repos with projects that had 5000+ files and not have it be an issue
damn we got scammers in here lol
what error was popping up?
i mean i separate my types of additions at least
it sounds like your code is reading in metadata files.
how do i fix that
how to make context.end_of_round trigger only once in g.deck?
i have holes in my brain
I have no clue how that popped in there, but just add a check to see if the string ends in .lua
if not, just delete that file
"and not context.repeition" i think
girl thats a system file 😭
I checked the file type out, deleting the file can't work, it's a file mac systems create in a folder while it's open.
context.repetition is to see if any cards need to be retriggered, i don't think it's that
You'll wanna be safe and check for .lua regardless, because this crash could also be something a user can recreate, then
oh! just close the folder then
no ok jk
it's an issue with the loader
it's trying to load non-lua files when it shouldn't
just split the string at the . and check if the final 3 chars in the string are 'lua'
way i've been updating is just oh im releasing a new update just throwing the entire folder for the mod back in and release it lol
how do i get the chips and mult any given hand should gain when upgraded? or is that just stored in the planets and i gotta do it myself
im trying to figure out how to check the end of file names and the internet guides are not spelling the answer out like im a third grader how do i do that
doesn't that kinda defeat the whole purpose of using github?
lm see if i still do it in kino's code
https://www.lua.org/pil/20.1.html this dont make too much sense
i suppose the purpose here is just to host code
i think someone mentioned context.repitition?
yeah this
l_chips and l_mult
add context.main_eval
ok thanks
awesome thx
main_eval is favored over not repetition
i honestly only used github cause thats like the standard for balatro mods never used github for development before making a balatro mod lol
yeah fair, the norm for balatro mods is github anyway, so it makes sense from that perspective
I mean, I'm no star at github, but check out the desktop client. It'll not have you upload the files by hand onto the website, and it gives you good access to the simple version management features
that isn't working, may be due to it being a deck
i suppose, i have no experience working with decks
I've changed my loading system in Kino so I don't iterate over the files anymore, so I had to check a bit longer. But string.sub(string, 4) == '.lua' should work
i've made 2 decks but they are just decks that start you with a joker and then play absolutely normally
also, Kino's file loading isn't super neat (I do keep single files for consumables and other types, and I don't automatically load in helper files yet, or iterate through item types), but the code I copied from Ortalab for loading jokers by string has been a great change. Allows me to re-order the jokers in the collection however I want, and also disable any jokers by just commenting out their key from the file https://github.com/icyethics/Kino/blob/main/Kino.lua
a balatro mod for movie dorks. Contribute to icyethics/Kino development by creating an account on GitHub.
this resulted in this did i do it wrong
for _, filename in pairs(cards) and string.sub(string, 4) == '.lua' do
assert(SMODS.load_file(subdir .. "/" .. filename))()
end```
hmmmm sounds neato
string in this case should be the variable name. You're combining a for loop and and if statement there, haha
ah
string should be filename, and it should be an if statement inside your for loop
ok so
weird situation
it got one
the other two are from a different mod
there should be 16 jokers here
wait i think i may know
its cuz that file is called DVD.lua, its checking the 4th character specifically for that string and thats the only file that has character 4 beyond as .lua
how do you, make multiple badges, because this errors
programming more programming it always more programming
It should be +1 instead of +2
that literally changed nothing
What is line 73?
fixed it :D
how would i make a card always have a sticker?
like
a joker always has the eternal sticker
Could always force it on via update.
if not sticker
give sticker
end
i see
card:add_to_deck()
G.consumeables:emplace(card)
G.GAME.consumeable_buffer = 0
return{
message = 'Death',
colour = G.C.PURPLE,
card = card
}```
i have how but i would like to add a delay on the first part so it happens at the same time as the return, any clue how?
put it inside of an event, probably
Just use the ortalab loading instead of the jank folder reading one
It’s ezpz
how do i do that
i try to but then my joker doesn't do anything at all, i think i put it wrongly in the event created
if King == true and Queen == true and Jack == true then
if #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.8,
func = (function()
G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
local card = create_card (nil, G.consumeables, nil, nil, nil, nil, 'c_death', 'sup')
card:add_to_deck()
G.consumeables:emplace(card)
G.GAME.consumeable_buffer = 0
return true
end)
}))
return{
message = 'Death',
colour = G.C.PURPLE,
card = card
}
end
end
are you king, queen, and jack vars defined
yes, they're not the issue
try putting prints in places and check if it actually getting to where you think it is
when it's not in an event, it works, although the death tarot card is created when hand is played, but then the effect of the return procs after the hand is secured and put into discard pile
thats why i tried adding it into an event
so i could control a common delay (although im not sure itd work either, was from an answer of a previous message of mine advising me to do it)
"end)" the extra bracket?
the ) is for the ( of the opening of the function
there is no syntax error or the game would crash (as it did before i added it)
or they render invalid the event although i have no enough knowledge to detect it
again go though it and print every step and check where it going wrong
i dont know how it would help me as i already know the problem is my event, and i dont understand events to start with
i know the problem is the event, bcs before putting it into an event as is, it worked, and with the event it doesn't, because i dont know how to make a functional event to start with and i don't understand the documentation
G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.1,func = function()
-- caluations and changes
end
return true end }))
``` i have mind set up like this
Has anyone else made a Tag that applies multiple times?
seems to work! i don't really understand the syntax difference, but i'll take it as is, thanks !
does soul_pos not work on enhancements?
what do we think of this planet
design could be more exotic ig
unfortunately i am not an artist this was my best attempt
yeah i feel you there
Interesting
the gibberish in the card is in fact a real conscript i am currently teaching myself how to read/write
its never too late to pivot to obelisk
Never buy Obelisk
the biggest flaw gameplay wise is that it would rarely be taken, most people and builds are based on specific hands, and the least played hand can be any of them which could be highcard or flush straight, so too much of a risk to use unless you don't have any other choice, unless obelisk build
in theory its a great add but needs better variability, maybe levels up 2nd or 3rd most played hand a few times.
Can anyone check if they know how I can fix this real quick
Oops! The game crashed:
[SMODS _ "src/utils.lua"]:303: bad argument #1 to 'pairs' (table expected, got nil)
You need to figure out what passed a bad argument to that function
i could redraw it for you if youre not the happiest about it
nice mod by breeze
It's my joker card and I can't figure it how to fix it
Aren't there mods that add an in-game timer?
this seems like a lot but idk
now you're thinking with portals
wheaties
oh no that was just an idea, only go with one of those options, thats way too powerful, just keep game balance in mind and what would be weak
i mean i could make it upgrade by 3,2,1 levels, that seems pretty fair assuming you dont get it early game, i can probably make it not show up until you have a hand youve played a lot or smth
just a silly thought but
maybe you could upgrade the least (or 2nd (or 3rd)) played hand by how many times you used the planet
oh thats good
yeah maybe
maybe make it degrading, where the more you use it the less you get so it will either uprgrade your lowest played, 2nd most, or 3rd most, but it goes from 6 and lowers by 1 each time used until it stops at 1
update the graphic to have little people mining the planet :trol:
i dont wanna mess with the art too much because avalon is a preestablished fictional planet made by not me
lol
lol
wait i typed jokering
balatro brainrot i didnt mean to type that
lmao
There is probably a point where wider is better than taller, and I think this crossed it
graphic is a placeholder
but the effect is still a wip so
ante 1 0 heiroglyph:
I think just drop the 3rd least
this is good
yeah its neat
ok. upgrade least used by 5, upgrade second least used by 3
is that fair
im getting so many conflicting suggestions
what if ante went down by 0.1 every ~60 seconds youre scoring cards
silly idea i know
placeholder?? this looks amazing
"yo what ante did you make it to"
"13.2"
"what"
big things are happening at #💻・modding-dev
lol
Just came up a stupid way to detect if you have any chance joker:
- Save
G.GAME.probability.normalto a local variable; - Set
G.GAME.probability.normalto a very particular and peculiar value; for _,J in ipairs(G.jokers.cards) do
3a. Get the return table from J'sloc_varsfunction;
3b. Check if vars of the returned table contains a very particular and peculiar value;- Set
G.GAME.probability.normalback to its original value.
...Yes, I'm asking for a better method. Please help.
alternatively, dothat method but just check if the jokers values change when you change probability.normal
its an edited version of the blueprint background, i plan on making something original and different for it
What specifically are you trying to do with it
oh okay
does anyone know how to get those black bars to show up over the card for enhancements, as soul_pos does not function with enhancements
"...if you have any chance joker"
More specifically: any joker that has "1 in N chance" in its description.
youtube drama thumbnail enhancement..
lmao, the REDACTED enhancment
I'd recommend SMODS.Sticker.
just.. check the description for "chance"?
yeah i thought about doing so.. wait that actually better for what it does
What if they're not in en-us?
true
You can apply the sprite at a separate step
Pause the game; send the game to some person; that person decides; unpause the game
yeah im having trouble with that bit, not finding any documentation for set_sprites
Have a 1d table with a list of joker keys that you consider to be a chance joker. @runic pecan. Include any jokers from mods you want to support too
What mods do you have installed? NVM you said on joker
So it's like an ore dictionary
Show the code for your joker
Ye
What in the F did your joker do?
is there a reliable way i could go about making a tarot card that grabs the levels from the most played hand and the second most played hand
then divides the number by 2 and applies those levels and values normally to a hand?
as an example, you have full house which has 50 levels
you use tarot card, it sees you have 10 levels in 4 of a kind
it then divides the 50 levels of full house by 2 (25) and add those 25 to 4 of a kind while setting full house back down to 1 (including its chips and mult, while adding the respective chips and mult to 4 of a kind)
We're about to see....
Yes
assist me great vic
Sorry if I am disturbing you
You can check each hand to see which one is the most used
how can i get the context for a hand after its scoring
im trying to recreate a joker similar to flower pot but only with 3 hand colors
That is some Whitehole-level shenanigan, wow.
AFAIK flower pot uses context.joker_main
I guess your main bottleneck is to find the second-most played hand?
my main bottleneck has appeared to be in restoring the values properly
Oof, let me guess: you also got Talisman installed, didn't you?
sure so
do*
my mod is compat with and without talisman
which, has been a menace
as a showcase (ignore the text and the cryptid palceholder)
it does remove the levels visually, but the chips remain instead of resetting to their default values, or increasing for the respective hand it went to
the main way i would go about this is creating helper functions that check if talisman exists and use bignum functions otherwise use the built in one
shit, what is good recording software there is no words to describe this issue, i got set_sprite working a bit
well ive already got that, which is not my issue
obs
new clockwork deck graphic, pretty proud of how this came out
ik im asking lots of dumb questions but how can i get the length of the hand played so i can iterate thru it lol
any tips on what im doing wrong
bump
keep getting the error for the for loop for the suits
but im not too sure what to replace the context.scoring_hand with
anyone know how I can programmatically move a joker left/right in the order? Can't find it in the game code
SMODS.Suits is a list that contains all in-game suits. You should try that.
well im asking about iterating through the hand
is there documentation of smod anywhere
#context.scoring_hand
# is the length operator in lua which gets the length of whatever table you put after it
thank you
in my experience, it produces incorrect values when the table is key-based
yeah it ignores non-numeric keys
yeah it can be weird but itll be fine for scoring hand
but you can just do for i, v in pairs(table) in this context anyway
Now make it orange
shit video didnt work let me do that again
card.children.floating_sprite_vic_belt = Sprite(card.T.x, card.T.y, card.T.w, card.T.h,
G.ASSET_ATLAS[card.config.center.atlas], {
x = 5,
y = 0
})
card.children.floating_sprite_vic_belt.role.draw_major = card
card.children.floating_sprite_vic_belt.states.hover.can = false
card.children.floating_sprite_vic_belt.states.click.can = false
also i really need this because i do not want to have to look through balatro's source code constantly if i ever want to make mods
To move jokers left/right do I just iterate through G.jokers.cards and change their order?
even when i play a hand with 3 suits it isnt scoring my guess is im doing something wrong in the second for loop is there some lua syntax im fuckng up
yes
im not super familiar w lua lol
I've never touched Lua, I came from Java
me too LOL
^
Is there an easy way to add a full suit (2 - Ace) to a deck?
is there a default prefix for consumables like there is for jokers
eg how the key for a joker if using debugplus for example, would be "j_modprefix_jokername"
Yes
How would I create a Playing Card using SMODS.create_card?
Anyone familiar with set_sprites help me understand why the sprite will be set in the last place it was dragged to and not centered on the card
card.children.redacted = Sprite(card.T.x, card.T.y, card.T.w, card.T.h,
G.ASSET_ATLAS[card.config.center.atlas], {
x = 5,
y = 0
})
--card.children.redacted.role.draw_major = card
--card.children.redacted.role.role_type = 'Glued'
card.children.redacted.states.drag.can = false
card.children.redacted.states.hover.can = true
card.children.redacted.states.click.can = false
end```
You wouldn't
Then, how would I add a specific playing card to the deck?
create_playing_card
What's the most effective way to force a UI box to render below another if you can't guarantee the order they're created in?
draw_layer = 1
in the one that has to go above
Hmm, can I set to force one to go below?
never tried it
I'm creating something that's supposed to tuck behind the shop UI, and I don't want to risk redefining the shop UI because doing so would result in a reroll of the items in it
I could patch it, but I try to make patches a last resort
Joker still wont score and im not too sure why
So I've never modded a game before, but I had an idea for a joker and I'm not even sure how to go about making it. Basically it'll be like madness, but for food jokers only. I called it Hungry joker. Instead of a base Xmult added every time it destroys a joker it would take the value the food joker currently has. When the food gets sold, or in this case eaten it would be added to the Hungry joker. For example you could sell popcorn, ramen and ice cream, and it could have values such as: +16 mult, X1.29 mult, and +65 chips. I would probably exclude things like bean because that could get ridiculous. Any points on where I should start, or if that's even possible?
how do i update the pos value in a context
Might tweak it for balancing, so it can only "eat" a food joker once an ante or something, I'm not sure yet.
hi winter :D
My imaging is acting up in my mod does the file for my joker look right? i gave one ex of how I am doing it for files
has anyone tried modifying the colours used in start_dissolve? My testing doesn't appear to be doing anything
wdym, it doesn't change colors at all?
works for me, unless you're talking about something else
this is supposed to be blue :/
show where you define the atlas
what part of that
card:start_dissolve({COLOR})
What colors are you passing to it
something else might be messing with it
weird
What does the pepper_jokers atlas look like, and how do you register it
i figured it out
quick question how do i have a joker not be able to show up in shop if its an upgrade of another joker like cavendish?
define in_pool or add yes or no flags
nice, ty
i hate that it goes out the screen u.u
If you just care about vanilla Jokers and not modded Jokers it's possible
I've been trying to figure out how to move info queues down on some cases, best I did was make infoqueue switch sides based on the jokers position in the jokers area
I could try to help move it based on position, but Idk how you could do it dynamically
and by try I mean ping aure because they did it for collection Jokers IIRC
it's easy based on the card's position but i have to figure out how to do it based on the description box's position
and also make it look nice because i think on the top, bottom and right side would look ugly
🤯 I don't understand
cursed
ok ber
it jsut... ignores my arguments
What mods are installed?
It could be the case that one of them redefine the function in their own files
Ive had that issue with cryptid
none of them touch start dissolve, please stop acting like I don't know what I'm doing
I can still make this work without this though 🥳
You are asking for help in a public forum. Asking what mods you have is a very normal thing when vanilla features arent working.
My other 2 messages are not only for you to read, anyone who looks here and maybe searches for their issue of start_dissolve will see them, and know that those issues can occure.
even if they were just for him, something working immediately for 2 others and not himself would imply an error regarding his setup alone
bump
cool it works
context.card.base has some playing card specific values
Could also check what the card's area is
the joker displays the mult twice first from calulation and in red saying "+5 Mult" then again in gold "+5 Mult" why is that?
Are you removing a joker and replacing it with this one, or are you just specifically spawning this one
is the joker count correct? like the X/5
Ive had issues in the past where I "removed" a joker but all it did was delete the rendering, so it was still being calculated
yea the count for all joker is currently right but i just dont want when triggered to show up twice
its showing up two times rn
remove the message from your return table
Oh yea, mult has a message of itself. No need for your own, unless you want to replace the default one
this could probably look a bit better but its nicer
ok bet
Now how did you manage that because I must steal it
im still deciding how to patch it/hook it so it only works with my jokers (i think this function doesnt have the card info) but i just replaced this
Huh, interesting
Thanks!
I have a joker who's info does not like staying visible
Smh Eremel just read the docs 
I'm thinking of picking this up again
Just need to think of new mechanics I can focus on
Hey, um how would I change the probability for just one thing, say I want a joker to add better chance for lucky cards to trigger and only that
You would need to modify how the lucky card gets its probabilities
Like say, patch this to replace G.GAME.probabilities.normal with your own variable
alright, just curious then, what file is that in the 7zip
this effect looks okay or should I make the balanced text appear under the joker by default instead?
@zealous glen I think you were someone who was interested in this beign bundled
Huh?
Oh.
Card.lua
Line 1317
For mult, its the same file, line 1228
i think the joker should at least juice up
Should I work on Jokers for the Bells and Whistles suits? Or should I add Card Genders first?
oh it should definitely do that, I forget that the standard juice comes from the message
I'm not seeing the same code as the one you sent
What do you see?
hmm
cursed right aligned infotip
And are you looking in steammodded? because that code isnt from that. its from the base game
god dammit
1x moment
so true
yeah its card.lua from the 7zip of Balatro
Hit control+f and type Lucky Card
I think i might've formatted my file, and the line numbers are all outta wack
oh okay I found it that way
im trying to change the probabilities of glass cards breaking, can I do that with something similar to this?
how would i convert a joker's rarity to a value
@red flower I think I prefer it like this, thoughts?
ohh that looks nicer yeah
does anyone know how to make sure that the set_sprites stays in the same position as the main card
heres my most up to date code
set_sprites = function(self, card, front)
pos = get_front_spriteinfo(card)
card.children.redacted = Sprite(card.T.x, card.T.y, card.T.w, card.T.h, card.T.r,
G.ASSET_ATLAS[card.config.center.atlas], {
x = 5,
y = 0
},pos) or card.set
card.children.redacted.role.draw_major = card
card.children.redacted.states.drag.can = false
card.children.redacted.states.hover.can = false
card.children.redacted.states.click.can = false
return
end
Rarity in vanilla is already a value. 1,2,3,4. Mods on the other hand are strings
card.config.center.rarity
ok
Kinda though I had my patch for it (and I always use it at the same timing as Plasma)
trying to figure out how to do exponential mult
rn it displays +0 for total mult should be 100 and then it squares it but ERROR shows whe calcs but doesnt crash
Do you have talisman?
Yes talisman has built in exponential mult
ok bet
How do I get an unique ID for a joker? I see card has get_id() but that doesn't seem to be unique
I think you'd need to make one
how do i specifically make it do only modded seals
@daring fern does this look right for how I wrote the tailsman code? i have it impleted now for game but seems its not applying still
You don’t need to to_big() every number
no vanilla, just modded
There has to be some kind of unique id, considering jokers can be duped
Oh do you mean like the key?
Get a random seal key that has 2 underscores
It's not unique per instance of a card but it's unique for all of the same Joker
what?
card.config.center.key I believe is the easiest way to access it from a Card
Can you elaborate on this? Could I use the key to correctly identify any given joker in my hand?
elaborate please
help?
You can use Invisible Joker to duplicate a Joker; both would have the same key
hmm that won't do. While I have you, is there any way to go in the reverse direction? Get a card from it's key?
Get a pseudorandom_element of G.P_SEALS and check if the key has more than 1 underscore
i see.
You can create a card given a key, and you can count how many cards have a given key
so how would i do that
Could I get the card name from a key without creating a copy?
Yes
Cool. Happen to know the syntax for that? I appreicate all the help btw
how do i make a psuedorandom like that again
I think there's some argument to localize that would return the name associated with a given key in the current localization
I'm not sure which
because if i know how to make a card create only modded objects then i can do it for other desired object types like jokers and consumables
still giving an error without to_big on it
What’s the error?
when carolina reaper activates card literally says ERROR
localize({ type = 'name_text', set = card.set, key = card.key })
game doesnt crash
because
thank you
So I need both the key and the set
(only need this function for jokers)
The set would be Joker then
ah okay
why’d you reply to me
pseudorandom_element(G.P_SEALS, psuedoseed(‘seed’))
misclick
why are puyos killing god
anyone know why this shit aint workie?
effect should be: When buying a Joker leaves no empty Joker Slots, this Joker gains x0.25 Mult.
i dont know
so like this?
You need to check if it has 2 or more underscores
cause it aint workie rn
Why is this sticker not sticking?
yeah but how do i do that
Omg i love your pfp
thank you, i made it in emo maker 2000
card.ID is unique even for duplicate cards/jokers?
like, how do i tell the game to check for keys with 2 or more underscores
Try putting it in a while loop checking if pseudorandom:gsub("_","") < 2
what kind of loop would it be
how do I allow a card to show up again like showman does
In in_pool, return true, { allow_duplicates = true }.
where exactly do i put this loop
my code btw
how do i use this tho
like
make other cards do that
idk if im still not doing this right can someone help?
is this right for a deck?
Other cards? Not... sure about that, actually, oop. 💀
this channel is so dead
F
i don't think pseudorandom() exists yet at that point in runtime
i was wondering why it wasn't proccing and tried printing a pseudorandom() result to no effect
im pretty sure it should exist at that point
double stonk
then why does this not work? nothing is output into the console. not even an empty line. just no print at all
wait
it did it way later
what
is the pattern unique
no. it gets 2 matches
you might need to change the pattern then or change times to 2
well without the check for the pseudorandom value, it does it just fine. the pseudorandom check seems to be the weird point
wait no, it does it at the right time, i just wasn't paying attention 
still need an answer to this
i am just astronomically unlucky with it it seems
i have failed many 1 in 4s while testing lol
anyone have the link for the steammodded documentation talking about changing text colour in game?
or where is it in the documentation
is this right for a deck? trying to make it so it gives money based on the rarities of all your jokers
Contribute to Breezebuilder/Steamodded-Wiki development by creating an account on GitHub.
Is there a way to edit the draw layer of an existing UI element?
I'm trying to parse the UI code because I need to bring the shop UI front one layer, but it seems there's some nesting here I don't understand
Attempting to set my own UI to -1 or such doesn't seem to draw it behind the shop
i dont know if this works because im not on my pc but i would try
local choices = {}
for k, v in pairs(G.P_SEALS) do
if v.mod then
choices[#choices+1] = v.key
end
end
local random_seal = pseudorandom_element(choices, pseudoseed("seed"))
where would i put it
just before conv_card and then use random_seal inside set_seal
you can do it anywhere inside the for loop before the second event
ah, i see
hmmmmm
oh?? default implementation for +selection limit?
weird question. can it go below 5
Should.
so like this
yeah, hand limit is capped at 1 and discard at 0
i forgot to reply to the message, fuck
yes but "random_seal" shouldn't have quotes
discarding 0 cards...
yeah i figured that out immediatley
you are on that weak shit, behold. DISCARDING JOKERS
I assume the discard button being frozen if you manage to discard 0 cards is fixed in that case, then
implement this now
help
unironically trying to
behold my biblical angel and weep as your game crashes :3
Discard a chicot to draw a raised fist
what does this mean
That should go in a calculate, much like a Joker would have one.
so like this
behold.
SMODS.Back{
calculate = function(self, card, context)
...
end
}
thanks
i can pretty much do the same with enhancements and editions, right?
I've encountered scenarios in my own mod where, if the discard_cards_from_highlighted function is called with no selected cards, it freezes up and never lets you discard for that round again because there's no built-in case for that (for obvious reasons)
this but like, enhancments and editions
unless the discard button is completely disabled when you set the discard cap to 0, in which case this doesn't matter at all
the game has a check to see if you have cards highlighted built in, you must have called the function wrong
but yes, the buttons are disabled if the cap is 0
in this case the discard button was doing it, I was just deselecting specific cards before the function was called but after the button was pressed (which works fine outside of this case)
I think the issue is that the function seemingly sets a bunch of UI stuff, but if the check for highlighted cards fails, the function never resets those values iirc, it only does so if you have highlighted cards and the check is successful
I believe UI is rendered per-frame according to the the contents of the G.I table, in the following order:
G.I.NODEG.I.MOVEABLEG.I.UIBOXG.I.CARDAREAG.I.CARDG.I.UI_BOXG.I.ALERTG.I.POPUP
You can control which "layer" your UI element gets put into by settingconfig.instance_typeto a string of the table you want it to be placed within when it's created, by
config = {
instance_type = 'ALERT'
}
```To change the rendering order of a UI Element *after* it's been created, you'd have to remove it from the relevant `G.I` table and re-add it to another one, which would be messy and potentially require you to deal with some weird edge cases
ok so
interestingly, the discard pile has a limit of 500 and stops you discarding if its full
The apply shouldn't be there at all.
oh
the cardarea check is also redundant
this is probably going to crash for any modded rarity
does conv_card work for editions and and enhancements too
actually I'm not even sure this is true, I just know that if you discard, and the whole hand is deselected before the discard carries out, the discard button breaks
obviously this isn't really a bug because this only happens with absurd patching, but still
i believe this is correct
ok no it isnt
Ugh damn
UI layering is difficult
would this just be set_enhancement
self.config > card.ability ?
set_ability for enhancements
set_edition for editions
winter i have a very ambitious idea if you wanna help me commit balatrocities and wanna help me learn to code :3
There are also some sneaky tricks you can pull. If you set self.attention_text to any string on a UIBox element, it's rendered last within that layer - you could try putting your custom UI on the same layer as the shop, then setting attention_text on the shop HUD as needed?
i asked keku but they didn't know what to do besides pointing me in the direction of hooks
Gimme a second to show my fundamental problem. It's functionally really minor and it annoys me that the skills required to fix it are so big
so that means it would be G.P_ABILITY
no, enhancements are in G.P_CENTERS
so it would be this then
you need to check if the value is an enhancement or the list will have modded jokers and consumables too
also pls format the code : (
Here's the issue. I have a UI area in addition to the shop that is currently created during the voucher redeem screen, which means that it must be created after a shop already exists, and therefore layers overtop the shop. But the actual definition of it (and indeed the regular code for loading the shop) involves it appearing behind the so it looks like a little drawer
The main reason it's such an issue is because unlike all the other shop areas, this one persists across shops, so I have to do some weirder stuff than the rest of the UI which is always destroyed and then recreated with new cards
I reckon you can just set config.instance_type to 'MOVEABLE' or 'NODE' when you create the drawer, that should be enough
So it's probably easier to just create it as usual with the shop and keep it invisible until I need it, but I'm already running into issues with serialization of a new cardarea for save/load that it's displaying because it doesn't work like any of the regular cardareas in the game in that regard
silly question, cant you create it before the shop and hide it
formatted.
anyways, how would i check for that
i think it's v.set == 'Enhanced'
i am going insane
no you're not
yeah
alright.
There *is * a slight cost penalty for creating UIs with state.visible set false, since they're still added to the G.I table and iterated on every frame, but that UI looks like it would only have 4 or 5 nodes at most, so the performance impact would be pretty negligible.
Probably, yeah. It's not a super complex UI
Is the money being given tied to end of a round or something?
people play with jokerdisplay which creates 5 UIboxes per joker it's fine
Just try setting instance_type = 'MOVEABLE' on it first, i'm curious about the result
Lemme see.....4
shit i forgot to add config = { max_highlighted = 2 },
definition = G.UIDEF.morshu_save(),
config = {align='tmi', instance_type = 'NODE', offset = {x=7.3,y=G.ROOM.T.y+10}, major = G.hand, bond = 'Weak'}
}```
Just like this?
Any chance of cutting that number down a smidge? JokerDisplay does have a noticeable performance impact with more than 10 Jokers
is this right
nope i still can't use it
how can i get these juice_up()s to happen in sequence and not simultaneously 
the reason it's that way is that I found that deleting the boxes had some kind of memory leak so i opted for not doing that and hiding them
i will probably not come back to jokerdisplay for a long while tho
Now I just have to figure out why the game is being annoying and failing to recreate the UI on reload
any reason why this could be the case?
rope, bombs? you want it? its yours my friend, as long as you have enough rupees
Yep yep, that's the gag
It allows you to save a card that persists to the next shop
ha. ha.
You come back when you're a little
mmmmmmmmm
richer
actually, these timings are completely wrong altogether. it needs to be on the 'upgrade!', first the blueprint, then the other one.
do i have to use a func in the return table for this 
i don't think that anything is wrong...
what does this mean
The exponential mult still isnt working for some reason I have tailsman on and it just keeps crashing can anyone help?
ok so an event wrapper in the return table func is the closest to the correct timing i can get it, but for some reason it's 1 late
i don't understand how the event queue is achieving this.
does anyone know why it's not letting me use the card even though all the code is correct
any insight? left, how i changed blueprint - right, code for the joker to its right
so um, i wanted to ask, do people occasionally use llms to help them code? my college gives me access to one and idk if i should try to learn lua with it

as a tool for learning they work great, in my opinion. Its what ive used for other coding languages
As for generating code, not really
hm, okay ill give it a shot, as an artist im naturally repelled by them as far as image generation but i think using it to help learn a new skill isn't so bad
What is this supposed to do?
yea its great for shortcuts and learning, but its only good for shortcuts if you know what you are already doing, its not the best at solving problems past syntax. At least, i think.
essentially - if the joker being copied is going to put the return message on the card ala hiker, do not override the return message target or colour and juice_up() the joker on the message timing instead
but as you can see in the clip, it's 1 event late in the queue for some reason
i toyed around with it by asking a challenging mod for it to make, and it certanly generated code, as far as troubleshooting it, idk what im doing, but it was fun to toy around with and i think is only as useful as your skill level and comprehension of game mechanics :3
Arch Linux go brrr
.,,,, don't ask how complex one of my jokers is
linxus
how complex is one of your jokers
I'm trying to make a joker that actually just replaces the background with the entirety of mario 64, and gives you mult based on your stars and money on course clear
Doesn't help that the other laptop I was using to make Bali mods was my school pc but it died and I cant get my old trick to work that got lovely running on my new one
Rip school pc
The screen died
it'd also be cool if the mult carried over between runs, since mario 64 uses save files you can preserve that data
Now I'm setting up a Linux shit box to go back to making mods
I love making a system out of random parts laying around
This should all be handled for you, your code looks to over complicate it massively
wh
why. or rather, how? is this even possible?
it's because that wasn't happening, that i'm doing this.
It's a laptop I bought of a friend for 85 dollars
I think I overpaid lol
Holy shitbox lmao
downright dubious
Idk if it'll run balatro tbh
idk but its gonna be funny if i do ever get it to work, rn i have the emulator core and the .z64 sitting in my balatro mod X3
A potato sounds better 😭
Hopefully arch can give it all the horsepower it needs
i wish you the best of luck, ur gonna need it
my silly knows no bounds, i will become an expert lua coder for the bit
Lua is so wierd
balareo
batro
As someone whos first language was python
balalo :3
I’m not at my pc right now, but can you show me what the problem is without your take ownership being in place?
thanks a bunch :3
Python is weirder imo
Joker poker balala
jonlker ponkler
good lord it's my evil counterpart
Oh shit
Maybe my problem isn't Lua, but smods and balatro
A rival stand user???
Lua is still a weird language tho don't get me wrong
-# I know nothing about jojos
im cleo c:
this is what happens without my take_ownership() or the func return in the second joker:
ERM ACTUALLY ITS AN ENEMY STAND USER??? RIVALRY IS CHILDIKSH AND STAND USERS FACE A VERY REAL LIFE OR DEATH SCENEREO WHEN APPROACHED BY AN OPPONETNT

Can I see the joker code?
this scared me lmao, the text shifted my whole screen
all of the joker?
sorry a;lskgasdl;jg;alsdg
Just the calculate function
I’m astra :D
Rival stand user is acting like a Roffel chat member
how's this
I think it just needs no card = or if that doesn’t work change it to message_card =
The individual context should default messages onto the playing cards
without card =, the message defaults onto the joker.
but yes, message_card was my panacea, thanks 
and then of course, i just put that all in an extra table to prevent blueprint/brainstorm overriding the colour. very cool
If you are bothered about the colour, sure
wait what mod allows you to drag-click
does anyone know why i can't use my card?
does anyone know how to implement a booster pack?
steamodded documentation isn't saying much about how to put things in it
actually, question about extra.
if i returned the table
{
extra = { message = "Test B" },
message = "Test A"
}
which order do the messages appear in 
or does that not work like that 
it should be A then B
that was my thinking too 
i have a system in my mod that just appends a bunch of extras together and it works like that
you can nest extras...?
yes
oh my god
nesting extra tables is very useful
and that reminds me i need to account for that somehow while making my own extra nesting system
so how does balatro parse the return table then?
does it look through the table at everything but the extra, then recursively calls whatever handles the return table with the extra?
i can show you my code for that
please 🙏
it's pretty simple
https://github.com/nh6574/JoyousSpring/blob/ad8d37887e4f6cc7f4ab569e2667451e578f71d7/src/effects.lua#L483
the only thing this doesn't account for is returning something like true because I don't care about vanilla jokers
currently all it does it this, with the input being a list of effect return tables
-- Recursively create an extra table for each returned effect table
function PTASaka.recursive_extra(table_return_table, index)
local ret = table_return_table[index]
if index <= #table_return_table then
--local extra = PTASaka.get_extra_table_for_ret(ret, ret.extra)
ret.extra = PTASaka.recursive_extra(table_return_table, index + 1)
end
--if ret ~= nil and index == 1 then print(ret) end
return ret
end
the commented out line before setting ret.extra was my feeble attempt at handling existing extra tables (and failed)
anyway, did anyone prescribe nightmares
why is she negative 😭
still wondering about this
hi, i have kinda little experience with coding and im trying to make a joker mod, does someone have an idea how do i make my joker activate every time the score gain alternates between chips and mult?
because this shit is driving me up the wall
why do you NOT want to be used
have you given it a can_use?
like, this is the code.
you haven't given it a can_use
que
i based the code for cherry on top off of this alabell card and even this can be used without a can_use
shrug, i dont know much about consumables
this is pissing me off...
Why are you so adamant for not having a can_use?
The bare minimum it can be is
can_use = function() return true end
two of the seal-based consumables i made did not require it
i have nowhere to put it though
you can put it literally anywhere what
notice how theres 2 ends.
😭 you have 2 ends and no commas
how do you replicate blueprint-type functionality
and now it's always usable when i want it to act like the seal giving consumables
notice how cherry on top isn't usable yet, because i haven't selected any cards
when i select a card, it becomes usable
and it becomes unusable again when i select more than 2
and again, the game crashes when i try to use it.
full crashlog if anyone cares
note that i'm specifically trying to call modded enhancements
hey anyone what would be the game context for checking a player is using a tarot card?
ok im not an expert of anything, but i had similar problem but i was attempting to index a nil value, turned out to be related to the context
if context.using_consumeable and context.consumeable.ability.set == 'Tarot" then
thank you
u got it
does anyone know why it is mad at me and how to fix it? says it cant find the ifs
bump
First of all, I would merge the fisrt two for loop into for i,J in ipairs(G.jokers.cards) do if J == card then my_pos = i else jokers[#jokers+1] = J end end
calculate = function(self, card, context)
for i,J in ipairs(G.jokers.cards) do
if J == card then
my_pos = i
else
jokers[#jokers+1] = J
end
end
if context.setting_blind and not card.getting_sliced then
if #jokers > 0 then
if my_pos and G.jokers.cards[my_pos+1] and not card.getting_sliced and not G.jokers.cards[my_pos+1].ability.eternal and not G.jokers.cards[my_pos+1].getting_sliced then
if #G.jokers.cards <= G.jokers.config.card_limit then
local sliced_card = G.jokers.cards[my_pos+1]
local left_card = G.jokers.cards[my_pos-1]
sliced_card.getting_sliced = true
G.GAME.joker_buffer = G.GAME.joker_buffer - 1
G.E_MANAGER:add_event(Event({func = function()
card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_duplicated_ex')})
left_card:add_to_deck()
G.jokers:emplace(card)
else
card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_no_room_ex')})
end
else
card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_no_other_jokers')})
end
end
end
end
end
end
end
like this?
chat are we cooking
whats the second last one?
Yeah.
Secondly, since my_pos would never be nil, you don't need to put my_pos and in if condition.
I love it, I would either make it less rare or buff ashes
Tbh, I have no clue why it is there but thats also how ceremonial dagger does it
and i am scared to remove it
Thirdly, I'd recommend local joker_to_the_right = G.jokers.cards[my_pos+1] and do some nil check before operating on it.
Oh, that explains.

