#💻・modding-dev
1 messages · Page 292 of 1
how the FUCK do localization files work
what's your issue
have you peeked the vanilla localization files?
...
1 second
ok so still confused but differently this time
how do they work for card sleeves
@tepid crow do you know anyone who knows cards sleeves
found the page in the wiki this is very silly
wait was this a cardsleeves question all along? 😭
Anyone know whats causing this crash, i get it quite a lot...
yeah update smods
aure too fast for me
first time I see this emoji
on mobile it doesn't show me
🙂↕️
whats the most recent stable smods update?
all isee is unsatble betas
they're all unstable betas
it's unstable betas all the way down
this one should work though https://github.com/Steamodded/smods/releases/latest
also uh i think I've fixed quantum enhancements now
I'm not fully confident there isn't some jank interaction I missed, but it seems to work fine
what was broken about them?
upon updating smods i cannot even start a run now lol
yes
yeah pretty much
update cryptid I think
But QE were introducing a lot of lag up to causing the game to run out of memory
ok having a function in a card's ability table causes the game to crash, noted
for reference, this was an infinite loop that didn't cause a stack overflow due to being based on events
how do i get the score for the played hand?
It did cause the game to crash for me and other people
I'm not saying it didn't crash
I'm saying it didn't cause a stack overflow
basically the quantum enhancement calculation calls set_ability for each extra enhancement, which calls into remove_from_deck, which adds an event calling G.GAME.blind:set_blind(nil, true, nil)
which recalculates debuffs on all cards
are you making a cardsleeve btw?
yes
which caused another round of quantum enhancement calculations on those playing cards
by the way how aure you are
I'm doing good but I'm kinda busy atm
good luck, let me know if you have any questions besides the wiki 🫡
how do i ban playing cards similar to the abandoned sleeve and checkered sleeve
check the code for those sleeves
i am and its all gibberish
abandoned sets a game modifier, checkered goes through the deck during apply and modifies it
oohhh
there's a new context on card creation (and modification) you need to handle
interesting
The Code for some reason Glitches with 4 fingers, like if I play 4 Heart cards and one spade (which doesn't score), the upgrade doesn't trigger and the heart cards aren't destroyed and I'm not sure why
I forgot to include the code for the destruction of the cards but I'm assuming it isn't necessary since it's just the activating of the upgrade that's not working
how do i get the score of the just-played hand?
does anyone know the context used for increasing hand size, like juggler does
just increase the hand size
ease_hand iirc
no
wouldnt that permanently add to it?
Minecraft: Lua Edition
G.hand:change_size(mod)
G.hand == nil
yea you have to remove from it when you no longer want it
no
hm okay, would that go into the calculate?
for a joker that would be in add_to_deck and remove_from_deck
assuming you'd want it to work like juggler
yeah! so for doubling hand size it would be
G.hand:change_size(G.hand.size * 2)?
It would be something like
G.hand.config.card_limit iirc
i'm trying to extend the UIBox class, but it's not appearing the same way as a UI box.
do you just have to make a class and init the base class?
Blind_Tracker = UIBox:extend()
function Blind_Tracker:init(args)
UIBox.init(self,args)
end
also this would technically triple the hand size because the mod is what you are adding
hm, i dont think it is cause that didnt work in game...
do you have debugplus
yeah
Sorry for not responding, had a physics quiz lol. I didn't save the original code that I tried, but I was using context.playing_card_added. I think it was something like
for k, v in pairs(context.cards) do
cards:convert_suit('Hearts')
end
However, I'm pretty sure that context.cards doesn't refer to the actual card added in this context and I couldn't find anything that does.
Nah that looks like Balatro
ah my b
in a blind
yea
hm, thats what i had before
lemme see your code
oh
how do i look at g.game properly?
Ah, that's because vanilla is inconsistent about it
yep
Yeah that's why I made a lovely patch to just change the suit when the card is added. So far I just have it automatically turn all playing cards added to hearts. Don't know how I should set up the if...then since I'm very new to this and don't have a lot of experience with lua (made a very basic tboi mod once is about all I got).
What do you mean?
I don't think you should need a patch, still
What would you do instead?
Idk
Either do something slightly different
or try to find the latest cards added
or hook/patch add to deck
nvmd i got it it was just eval G.GAME in debugplus
I'll try messing with it a bit more
It would definitely be better / easier if I could get the joker to just do it
Update I saved the code to the wrong file it works fine nvm
Is there an easy way to directly change how much money remaining hands give you, like the green deck does? I've hit a bit of a roadblock figuring it out
I know it's possible just to check the remaining hands but I'd prefer to do it the other way
@glad osprey okay so i want it to double whatever to hand size is at tany moment, not just double what the hand size was when it was aquired, so i put it in an update and presumably it crashed my game at e31 hand szie
i mean its not that important add_to_deck will more than work!
am i missing something with trying to make the Blind_Tracker class polymorphic here?
-- This works
self.HUD_blind_tracker = UIBox{definition=def,config={major = G.ROOM_ATTACH, align = 'cm',offset={x=0, y=-6.105}}}
-- This does not
self.HUD_blind_tracker = Blind_Tracker{definition=def, config={major = G.ROOM_ATTACH, align = 'cm',offset={x=0, y=-6.105}}}
You’re missing this:
mk
I can't find an example of in_pool in usage so I'm left to assume this is valid
cool, how would I go about calling a game over
for a remove_from_deck
man learning how to make jokers is nottt easy!!
I recommend making a smaller mod first
working rn on the nevernamed pack so, im just trying to tackle some "simple" jokers we put onto the spreadsheet
ive had coding experience elsewhere but ive not got experience with lua tho it feels a bit similar to python
ah you're also working with survival
yah
yee
im rlly excited for u guys to see the effects we've written based on nevernameds' art
we also have nevernamed workin with us on that front :p
I've seen some of the ones survival shared
I got a bit envious ;P I want to see them for inspiration but I don't want to see them so I can't make similar things
I also had animated one of nevernamed's arts as a test
soo how do i make it so the mod desc background doesn't burn my eyes?
why is it white
im unsure j yet if we're going to want more people on the project but i would tbh dm survival bc its a lot of jokers yk what i mean?
thats what im sayin
if youre interested i mean to join the process
how do i change it
normally it's not white
what have i done
SMODS.current_mod.description_loc_vars = function()
return { background_colour = G.C.CLEAR, text_colour = G.C.WHITE, scale = 1.2 }
end
so I would undo whatever you did to make it white
it is
is there any way to make mod profiles 😭 i always turn off all my other mods while i run nevernamed to debug
?
do u use the localization file for it
that's without using loc yeah
what do you mean use the localization file for it
i like how the mod id is just Roffle
I don't know if I can be relied upon but I could try to help answer questions at least. And you can reference my code if you need to
Roffle
I had asked if nevernamed wanted some Jokers coded in but they wanted them to stay together
how do i get the chips of the hand you just played after scoring?
Ty dude, yeah, its a journey rn for myself -- and honestly me and survival came into it hoping to learn.
There's a few rules we have set for the mod which is 1) No asset / Joker other than Nevernamed's work, any other asset would have to be like minor effects and sounds and stuff, and then its to just respect the art that we've been given which is to mean proper credit is there for nevernamed
I think the idea is to genuinely make a giant expansion of balatro itself with all the jokers and ideas planned
Which yk.. takes a lot of work 😭 but im excited anyway
I think discussing Joker ideas might be interesting
As I said I liked the ones that (survival?) came up with
I think my favorite one was Atom
Hey, can someone help me real quick? I've been trying to create a custom deck for my Balatro mod, but it's just not working
Here's the code btw
key = 'DeckPik1',
path = 'Decks.png',
px = 71,
py = 95
})
local function register_deck()
local carludeck = {
name = "Carlu Deck",
slug = "carlu_deck",
config = {
extra = {
starting_hand_size = 10,
starting_money = 6,
discards_per_round = 0,
starting_jokers = {}
}
},
unlocked = true,
discovered = true,
atlas = 'DeckPik1',
pos = {x = 0, y = 0}
}
SMODS.Decks:add(carludeck)```
How do you hook functions? I checked out the klei forum thing that's been posted a few times here but I'm still kind of confused tbh... I want to hook add_to_deck to make it so cards added are converted to hearts.
As far as I know smods.decks isn't the way to go anyway
Isn't it smods.Back?
I dunno, it's what the tutorial I was following told me
then again, the tutorial is old
Why not use context.playing_card_added and, after checking if context.cards is a table, iterate over any cards and set the suit to Hearts?
context.cards is being wack tho
It's acting like a boolean in that context
the SMODS page for the context.playing_card_added does also mention how sometimes cards is true instead of giving the card.
At least from my understanding
Idk im not good at this lol
What does the thing in the middle look pike
orange
orange
Awesome
makes me crave an orange rn tbh
cuz this doesn't work
It's me again guys, the deck now appears, but it still isn't working with the properties I set, any clues as to why?
SMODS.Atlas({
key = 'DeckPik1',
path = 'Decks.png',
px = 71,
py = 95
})
-- Create and register the deck
local carludeck = SMODS.Back({
key = "pik_carlu",
loc_txt = {
name = "Carlu Deck",
text = {
"Start with {C:attention}10 cards{} in hand",
"Start with {C:money}$6{}",
"{C:red}No discards{} per round"
}
},
config = {
extra = {
starting_hand_size = 10,
starting_money = 6,
discards_per_round = 0
}
},
discovered = true,
unlocked = true,
atlas = 'DeckPik1',
pos = {x = 0, y = 0}
})
carludeck:register()
print("[PIKAJOKERS] Deck successfully registered!")```
How would I get the number of cards in the deck? Would I get the length of the number of items in G.hand.cards?
#G.playing_cards
how do you view messages sent via sendTraceMessage?
Quick question for modding is there an easy way to set up the base game If i wanted to make a mod?
and G.hand.cards is the number of cards in the held area (Not selected)?
using DebugPlus, change your log type in the mod config
How do you get a joker to do something when sold? I tried looking at the invisible Joker code and I don't understand in the slightest...
context.selling_self in calculate function
Oh I see ty!
How do I make my joker show up in shops, booster packs, etc.?
Do I need to specify pools it's in or is it automatically added to them?
If you're not using a custom rarity, all of that will be handled for you
You can also add a "spawn condition" if you want (like how glass joker only shows up when you have at least 1 glass card)
But that part is optional
So if I just put it in as rarity = 2 then it'll spawn in shops at the same rate as uncommons
?
Yeah
anyone have examples of code for a custom booster pack?
i think it’s about time i start implimenting stuff like editions and enhancments
It isn't doing what I thought it would- First part works but whenever I sell the joker it always just says Invalid Joker no matter where I put it
first thing that came to my mind was wee cards
it's workingggggggggghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
https://cdn.steamusercontent.com/ugc/16432616703695928/2B598801344738DFC759C89C050056FFF7181DBA/
time to actally get some modding done
consumables can have a ‘calculate’ function right?
what the hell am i doing wrong
is there a way, in a joker's calculate(), to see when another joker is triggered?
i have a joker that i want to make another joker do a thing immediately after the other joker being triggered
self is not the joker card, you need card instead
context.post_trigger
i see. i thought post_trigger was for that specific joker that calculate() is for
but you mean to tell me that context.post_trigger is called on other jokers when a joker is triggered?
thank you!
i have it enabled. so if i return a table from the joker that's processing the post_trigger, does it do the message on that joker?
i mean i guess i can also just do SMODS.calculate_effect() too
Oh ok I see ty
I tried it and now it's making non-existent jokers??
Just made this guy. Thoughts?
why does this freeze when i start a run
i just re-read the code, you can't just copy a joker by calling add_to_deck, you need to use copy_card or make a new one
card:set_base creates the create_card/modify_playing_card context (it's very prone to recursive issues)
didnt work what
how'd you get that 7?
stremgtj
question, do i HAVE to call SMODS.Sound:register_global() when i have sound assets or are they loaded without my having to do so
that's a weird way to write that in lua, does that work?
no
hard to gauge how good it is but it might be more like a rare
change it to ~= haha
That's fair. I also wasn't able to gauge it so I made it uncommon lmao
it was not equal prior
I didn't have to call that for the music I used in my mod
okay I do wanna mention
assert(smods.change_base crashed when i tried to do it
i see 
how can i edit the buttons that appear on cards, like the use and sell buttons?
and it worked without the assert
requires lovely patch im pretty sure
thats fine with me
not a == b => (not a) == b
still no
if you wanna remove buttons, SDM0's stuff bakery cards remove the use button
i have an example https://github.com/nh6574/JoyousSpring/blob/afd2ccbcfc78f34f7d15a559bbf60f94de97afb9/src/general_ui.lua#L307
how could i let the use button show up as well as the select button?
print out both and see what they look like (preferably including their type)
as in, let the player use a card that can be used on the hand or something similar
i don't follow
for all packs, when selecting a card you can press "select" to add it to your consumables, or you can press "use" to use it on the cards present, but my booster doesn't show the "use" button on cards
oh im pretty sure thats a setting in the booster but i dont remember what rn
Ohhh Ok Ty
hm, alright
can you use hex colors for ease_background_colour?
perfect, thanks
hey how do i check if a card is being retiggerd
check context.post_trigger or smt
You've done a good job
i want to punch someone rn
anyone know the args for start_dissolve()?
literally the line above it
though I don't like how math names stuff like that
it doesn't tell me the name of the function if I didnt already know it
here
i name mine hookTo 💔
I think this is cool
maximus i think april fools might have already been over
as long as you follow it with the full function name you're all good haha
I am cringe and I am free
Totally unrelated but how to I change the atlas pos of a card (cuz this doesn't work)
did that help you figure it out btw @glad osprey?
anyone know how to get the use button on consumables in a booster pack?
fair enough haha
what are you trying to do
(prolly could look at cryptids double sided)
figured it out!
im looking at another mod to try and learn how to do something and im curious whether this is something the mod adds or if this is in the base code? card.config.ref_table
This was a good tip, ty
what is the size of consumables
trying to make a Joker that absorbs the accumulated values of other jokers, but it returned an error that I thought I'd accounted for
i just learned the importance of playtesting lol
my pna joker was so buggy
looks like i fixed it tho
it's cause you have it be left_joker.Xmult and not left_joker.ability.extra.Xmult
same for all the other ones too
also for right_joker specifically you have them be left_joker in the adding part
oops pff
when it's supposed to be card.ability.extra.Xmult = card.ability.extra.Xmult + right_joker.ability.extra.Xmult
i love how half of modding is just "idk, see how this other person did it" LMAO
i may not know how to do much but i know of examples that show how to do it lol
Yahoo!
-# why is there an extra card area
nerd
bump
Maximus has a new card type that utilizes it :)
wdym, like the sprite size, the size of the array that holds consumables, how to get the limit of consumables you can have, or something else?
sprite size
i thought it would be like tetris where you can just store an extra card for later
usually they're 71 by 95 images, though there is like a few pixels or so on the sides that are empty space
ok thx
Nope! If you're curious tho feel free to look into it https://balatromods.miraheze.org/wiki/Maximus/Horoscope_Cards
Horoscope Cards are a type of consumable added by the Maximus mod. These cards act like quests, where they present the player with a task and rewards them for completing...
for tarot cards there's 4 pixels on each side that are empty and one pixel on both the top and bottom that are empty
how do you have a website O_O
This is not mine, it's the Balatro Modding wiki lmao
okay first problem fixed, new problem arisen, I need to make it ignore when extra isn't a table
oh lmao
well i'm getting errors unless i do it so
so a 63x93?
essentially yes
how can i control the pitch of a sound played via calculate() return table/SMODS.calculate_effects()?
but i would still keep the extra space to keep it in line with the style of balatro
got it thx
you can probably use the type() function in lua? idk the syntax tho so you'll have to look it up
i like how it's like chaos from hades
wonder if i'd be able to make my own page on the wiki
Idk man 🤷🏻♂️
sweet
ive made a custom CardArea, but when i try to add a card to it the number of cards increases but the card never visually shows up, how can i make a card actually appear in the area?
I finally found what was killing my calculate functions dear god
this is how im defining it if it helps at all
i need to finish the occlupanid card sprites and then i can get to work on making custom editions and enhancments
HUGE
had a random challenge that i made months ago buried in my mod that was overwriting back_trigger_effect😭
oh my goodness 
wondering what im doing wrong but honestly i think im not understanding where to find things in the documentation
would u guys mind if i shared my crash log here and maybe someone could give me an idea of what im doing particularly wrong 😭
That's plenty fine
anyone have advice on where to start with modding?
thank you
is there a way to have a deck change the starting ante? other than just starting with hieroglyph
You could probably set G.GAME.round_resets.blind_ante to a number when the deck is applied.
i'm making something that's sort of like hiker, but mult - and it basically gives permanent +1 mult per card enhancement, edition and seal (so if all 3, +3)
but is adding permanent mult to a card even possible 
or i could notice this page in the wiki
thanks
how can i give a custom card type a default CardArea?
you can add any card to any card area
what is the best way to add a new challenge? i tried adding it to the challenges file in the Balatro folder but that didn't seem to work
Probably making a mod.
remind me how to check if a card has an edition or enhancement? ...although i think seal is stored differently, too. isn't it card.seal?
card.seal is for seals card.edition is for editions and you can use SMODS.has_enhancement() for enhancements.
Rehash.
...how can i write a hash # in a joker description?
i tried escaping it, but it causes a crash
for some reason this isn't getting any XMult from vanilla XMult scaling Jokers despite Xmult being the variable used by vanilla Jokers. It works with my modded Jokers though.
...please don't tell me i have to use a main_end for it 
Input it through loc_vars
...i guess that's one way of doing it
🤔 Use the # to print the #
literally like???
oh okay it's much worse, I broke the whole thing
What jokers are you testing with?
Hologram, Constellation, Lucky Cat
it picks up XMult from Cavendish
All of those jokers use card.ability.x_mult
Cavendish uses card.ability.extra.Xmult
ahh
from game.lua right?
Yes.
Alright yep got it working sweet

except now i've run into the problem of has_enhancement() only checks for the specific key you pass into the second arg, if you pass nothing, instead of returning true for any enhancement, it seems to just alwys return false? which gives false negatives when a card has an enhancement
and get_enhancements() returns a table with keys, so # would be useless
is there really no simply way of querying whether or not a card just has any enhancement
next(get_enhancements(...))?
...huh? 
free nitro
if get_enhancements returns a table with keys, next grabs the "first" value (according to pairs)
ohhhh. so i can do if next(get_enhancements(...)) then and it would enter the condition if there is any enhancement
all you need to do at that point is make sure it isn't nil, which I believe is implicitly done by an if-block in lua
I believe so, yes
please double check
works
😄
how do yall make sure the line breaks in text are consistent, do you like count the characters or smth
you know
i dont know
you never realise how difficult something is until you try to do it
true
i thought m7's bow was harder than the fan
-# it wasnt
like, not even close 🥀
does anything think adding solitaire into balatro was easy
no.
If it's not here, then where???
i just want to push the Balatro's engine's limit
did you check the list of tables in the pool first
You mean this thing?
no as in you check with the debug console
As in eval G.P_CENTER_POOLS? Not yet.
Update: Just checked, nothing out of what I expected.
This sprite is ass. Session terminated.
as in the pool doesn't even exist?
Yeah.
I mean the console already stated it's nil.
Like, this pools feature is very recent.
I'm sure I've seen versions of smods wiki prior to containing that one.
how do i render different font in text lol
wtf is this 😭
this shit ain't a fan it's a mt fuji with that curvature 😭😭😭
sounds like a lot of pixel but it isn't
-# tf u mean u dont have tingyun
-# i don't remember rolling for her
bricked account ngl 😭
shes free in a lot of events 😭
I DON'T PLAY IT THAT MUCH ANYMORE I DON'T KNOW ABOUT SHIT
i have my own it's ok
mine has Acheron and Fu Xuan
besides i can probably just ask a friend to borrow their account
i still have their account on my hoyolab app
bepis do u want it i really have no idea what to do with it
i already have an account lol
idk what they were cooking tbh
-# what the fuck is that
😭 thats crazy
your friend doesnt roll ANY signature light cone???
i stole someone's account
hmmm
i forgor my uid but the name is HelenaKirara
i also forgor hoyolab login so
cant see my uid
ok compare that to the genshin
i still have no clue
i quit hsr in like 1.2 when they gave me bailu 3 times in a row as my 50/50 loss
715969252
i think my friend got like
C30 Qiqi or something at this point
i forgot the genshin terms
it is c ok
19 more to go
who up starring they rail
wtf is this 😭
Try seeing how Kino does it
schneider from reverse1999
It makes me think of Ruby from Rwby if she were an orb
yeah
It seemed interesting but I never played it
I'm at their github right now, which isle file should I look at?
has anyone done a custom page rank playing card before ?
in a arcane tarrot deck there is a "page" rank
so its "page -> knight -> queen -> king"
Search for movie genres
Maybe focus on a theme
Or something that makes it unique
I saw that, and the method it uses isn't going to be more helpful for my case than just manually build up a table for all the pools I'll need.
And it didn't use the pools parameter in question.
There is. It's called "shenanigans".
😭😭😭😭
I mean you ltrly named your mod "aikoyori's shenanigans"
I'm trying to rename it 😭😭
Aaaand my question on this pools parameter is still not answered.
hmmm
Make 3D things in Love2D 
Mood
Scrabble Shenanigans
Feat. Minecraft
versus Math: The Movie: The Game
i guess
I think that’s what you need to do though
Aikoyori’s quest to learn shaders
I’m hoping when I implement new systems it will help my mod stand out a bit more
chat i am terrible at art
Incorrect
i need to be more original dude the leftmost joker of this list is literally just burnt joker 2
what does the happy blueprint do
Anyone know what I could be doing wrong with my use of SMODS.Sound ? I keep getting a thread error when its about to play the sound. Code: (Just the important bits)
//initialization
SMODS.Sound( key='metalpipe', path= 'metalpipe.ogg')
//my attempt to play the sound
play_sound('PIPE_metalpipe') (my prefix is PIPE)
File is in mod\assets\sounds\metalpipe.ogg
dont you need the prefix on the key and file name too
well thats what i did atleast
anyways how does one make a consumable destroy itself
specifically after a round
nvm found it
retriggers all jokers 2 times with a chance of creating a negative rare joker at the end of a round
basically just boredom
hmmm, you mean in the SMODS.Sound section right? I just added it and I am still getting a thread error for some reason. :/
ive got it setup like this
i believe you don't put prefixes when you're defining the sound
well it still works so im not gonna touch it since id probably break something
I figured it out. I had it in the wrong mod folder for some reason. Thats what I get for trying to work on this at 5am instead of sleeping
I clicked on the wrong "assets" file tab in windows explorer and didn't bother checking if it was the right one 
i'm trying to make a joker that does something when cards are destroyed, using context.remove_playing_cards. immolate isn't working correctly with it though.
bot
<@&1133519078540185692>
<@&1133519078540185692>
point and laugh at this user!
anyone know why my cryptid isnt working please help im asking in both channels becuase i really cant figure it out
Ok so i did some digging
i found that this was the line causing the error
so i commented out that function
not sure if that will ause problems down the line bt right now it works
ok it caused a problem as soon as i started the first blind
ok I dont understand it. I changed "flags" to "flaags" and now it partially wokrks but stil crashes but at a different point. Confused
ok i had another crash in utilis.lua, so i also commented that out now it works
ill update withscreenshots of what i did in a minute, and ill let you know if it crashes again
please only use this chat for modding development questions
sorry man im so tired i thought i was in the modding chat lol
then why did you tell the modding chat to look at what you were sending here
noone cares
becuase i sent it here and then i blanked cause i saw my prevois messages here and just kept on writing without thinking mb
aight my b
@manic rune what's new since penacony
thank you
i told u to update cryptid
an entirely new world, new char path (remembrance, its all about summoning another ally basically)
and of course
hp inflation
jingliu is dogshit now ❤️
I tried to I have the most recent update
wtf happened to meta
did you download from the code button as i mentioneD???
its quite literally mandatory to roll every single new char
else you will fall behind
gacha be gachaing
Yes it was just an smods file
ran out of art juice
cryptid
i said download cryptid from the code button
SMODS fixes the vanilla bugs with spectrals not triggering destroy effects, right?
Yeah I did that also
IDK, but there doesnt seem to be any problems with my disabling some parts of it
did you?
update cryptid and update smods as well
i think cryptid wants you to use the smods version provided with it
hi
Ive spent more time reading the smods docs than my actual school books
hello
you are
well yeah that is if you use the current release build
current dev build uses latest smods
haya you are so pro
Is it an absolute necessary to load SMODS.Atlas code before any other object that uses said atlas?
nvm, not relative anymore.
how can i make a joker only appear if you have a specific suit in your deck?
in_pool
Use in_pool = function(self, args),
return true if you find any card:is_suit("Suit key") though G.playing_cards.
does context.consumeable.ability.set no longer work for telling what kind of consumable is being used?
It should work.
hmm
weird
this is inside a blind's calc
and i think it will duplicate cards instead of destroying them if the blind is defeated for some reason
.
wait nvm
realized its remove, not destroy
ghh
nop, it still duplicates
thats odd
for some reason thats oddly comical
it works when i replace it with return true, but not return {remove = true}, hm
odd
why does destroying card have to be so difficult
the person who guesses what this joker does gets to choose the obscure reference i have to turn into a joker next
what are you trynna do?
Reference not known, however;
Big forehead

AW ORANGE SLICES
I could mess up an orange rn
If scoring hand has 4 unique suits, do (?), then enters Rest
-# not sure if the suits all need to be in 1 hand or its saved
Increases (?) by 1 for each scored card, and im assuming after a certain number of cards scored, she will stop resting
At the end of round, probably create Slices of Life for each empty consumable slot?
+150 chips +15 mult x2 mult if played cards have all base suits (once per round)
while resting gain x0.1 mult per scored Hearts
at the end of the round fill consumable slots with a slice of life
don't mind me
youre THAT close actually
do i get to pick stupid ass reference
How do i create something similar to Ortalabs index card?
What are you trying to do?
The same but suits
So it can act as multiple suits?
Yes. you can change suit with the same ui
y'all know what the pool flag for lucky cards is? i have a joker that interacts with them so i want it to appear when you do have at least one like lucky cat
You would have to hook is_suit.
Oh. But what about the ui? Like the Use button for tarrot cards.
I'm not sure.
When for _,J in ipairs(G.jokers.cards or {}) do, is it J.center.config.key or just J.key?
whats the correct string of code for this...
J.config.center.key, iirc
It would be context.consumeable.config.center.key instead of context.card.ability.key
Uhh, how do i do that. (I have never patched my own thing before)
TY!!!
how do i move child with parent
I'm trying to let a blind destroy one card after scoring
But using dissolve with custom color
there's a build in context for that! You'll wanna look into the destroy_card context
Set major of the child to the parent, and the relevant bond types like config.xy_bond to "Strong"
Yeah I tried that! But you cant change the destroying effect
ah, the custom colour I don't know how to set up, I've never considered doing that. I think the easiest solution is to patch the context so that you can pass along a dissolve color
Destroying directly with :start_dissolve creates ghost card so I cant use that either
Unless i can emulate the vanilla balatro destroying card effect
thank
oh, you definitely can. The ghost cards come from you not removing the indexes from G.playing_cards. But it's generally not smart to work outside of the context, due to triggered effects
patching the context would be the better solution, I reckon
Oh thank you so much for that info! Imma try that first before patching
i'm kinda surprised there isn't actually a default way to pass along a dissolve colour in smods at this point, haha
I tend to avoid patching because i dont know if i should patch the vanilla function or smods function
maybe im just dyslexic cuz damn
Yeah, I'm gonna make a feature request real quick
so it wont create any more banans at this point
what happened here
even if one dies or gets sold
I had an idea for a mechanic but I’m not sure how I’d integrate it 🤔
i dont understand all the joker_buffer calculations there, what are you trying to do with those?
check if you have room for another joker if another is added
Is it Perkeo smoking a fat Doobie?
The idea is basically putting the effect of some Consumeables on a playing card so that if you play the card it triggers the effect
Mainly Grim, Familiar, and Incantation
So it destroys the card and adds more cards into your deck
isnt that the same as adding 1 to the condition?
math might be able to help you there
usually it's easier to check if #G.jokers.cards < G.jokers.config.card_limit
at least thats how i do it
No other effects need to know the true number of Jokers
is this correct 😭
good morning everyone
i was using riff raff as refrence
And you're wondering about how to make that work, game design-wise?
But since Jokers are created in Events, the buffer represents the difference between calculation time and animation time
It’s the same thing with the dollar buffer
makes sense
Or the Consumeable buffer
Game design-wise
tbh i dont really understand what the buffer does
It does what I said
like the diffrence in jokers
[…] [T]he buffer represents the difference between calculation time and animation time
The difference of the quantity being buffered
Here it’s the number of Jokers
It sounds like a mechanic you kinda want to be a whole broader archetype, or the legendary equivalent to something like a Seal, I'd say
you can have a list of consumables that work with this effect and and then it will be pretty simple to implement too
so the number of jokers being created or destroyed
I agree. My issue is that while I think it’s an interesting mechanic, I don’t want to make my entire mod around it, but I think that choosing what effect a playing card has is important
The number of Jokers
I feel like I’d have to hard-code them to make them work
i think therell be a way to automatically do a consumables use effect but idk if you can find a list of consumables that will work without just hardcoding it
I can make Consumeables automatically use an effect
The issue is handling the requirements
The Star wouldn’t do anything without selected cards
TIL Jack Black has ADHD
Have you seen the Jack Black baby
yeah thats why youll just have to blacklist some or hardcode them to have new effects
Right now I’m more worried about choosing which effect you want
I was just going to choose a few
if you only have a few effects tooo theres less choices to make around which consumables you want to have on your cards
i removed all the buffer stuff and it works
But it would break with other effects
That might not do it. Try using set_alignment or set_role, something like
akyrs_drag_storage:set_alignment({
major = self,
bond = "Strong"
})
Good schmorning chat
Hi vic
I'm okay, just opened my eyes to this world in the realm of awake
How are you
@hushed field opinions 🤔
I’m okay too
Though i'm unclear on the structure of your UI from that screenshot
right, but as far as i can tell i was doing what i needed for the buffer and it wasnt working
What was your issue before
i think it's because you were increasing the buffer before checking space, that's why i was confused
My instinct with that kind of stuff is to make the choice something that's based on the inherent qualities of the played card. Number of other played cards, or its suit, or rank, etc. It's gonna depend as well on whether you'd want to choose the effect when you play it or when you get it
I was thinking when you get it
The main idea is that you know what you’ll get
it would only create 3 bananas then stop
regardless of how many there were
once it hit 3 it stopped
I feel like it was what N’ said
does this sound way too risky
Yes
what should i change it to
I would change it so you can affect the probability in some manner
whar
:?
Because I wouldn’t want the player to feel bad for getting a bad result
I think having some options like from a Booster Pack would be interesting, but I don’t want to make a literal Booster Pack, I think
alr
I'd remove the loss of money
I might copy this after Aiko gets it right
its already a risking destroying the joker
That too
But I’d remove destroying the Joker
its supposed to be like that
Or again make it able to be removed
is it supposed to act as a debuff idk how you get it
You asked if it’s risky and what you should change to
after defeating the boss blind the associated joker gives 2 pieces of oranges
People are giving their opinions
what does the associated joker do?
The sell effect is part of the buff in the risk because you can’t opt to get rid of it without being punished
In this case, I'd make it a voucher that allows these cards to spawn
should i just make it Small blind instead of BIg blind
But I don’t think I want them to be purchasable 😭
Doesn’t address the issue
If you don't want them to be purchasable, how are they supposed to be obtained then? Or you mean that they shouldn't themselves show up in the shop?
I don’t think they should themselves show up in the shop
^
than you can just make the voucher only make them spawn in boosters, no?
It’s slightly less risky but it doesn’t address the issue still
Originally I was thinking of maybe associated it with a Joker effect, or maybe some object that opens an otherwise unobtainable pack, like a Consumable or a Tag
Like maybe the Joker creates the Tag sometimes, and the Tag opens a Booster pack state, and there you can teach the effect to a card?
i feel like the chance of losing money is a bit too much considering i sell stuff to get money
seems a bit counterintuitive to lose more money just because you don't want them to take up consumable slots
Seems convoluted 😭
but like what's wrong with this 😭 ```lua
for i = 1, #G.jokers.cards do
local joker = G.jokers.cards[i]
G.E_MANAGER:add_event(Event {
trigger = 'after',
delay = 0.15,
func = function()
local _pool, _pool_key = get_current_pool('Joker', joker.config.center.rarity, nil, '_ritual'..i)
local center = pseudorandom_element(_pool, pseudoseed(_pool_key))
local it = 1
while center == 'UNAVAILABLE' do
it = it + 1
center = pseudorandom_element(_pool, pseudoseed(_pool_key .. '_resample' .. it))
end
joker:set_ability(G.P_CENTERS[center])
return true
end
})
end
it's supposed to turn each joker into a random joker of the same rarity but it keeps giving like rares
even though I give it joker.config.center.rarity
like if I use this on hack (uncommon) it gives a dna (rare) ???
idk if this will work ever
I was originally using SMODS.add_card to make a temporary card then copy_card it but that gives the same issues
OH MY GOD
it's because
get_current_pool does like weights and shit
(type(_rarity) == "number" and ((_rarity > 0.95 and 3) or (_rarity > 0.7 and 2) or 1))
thats kindve the thing i wanted it to do
so inputting config.center.rarity will just like always give rare
Lose money = consumable slot or keep the money and lose some deck fixing
or leveling
or actually just consumabless
plus its tied to a joker
How could one put a custom info_queue on a card if it has more than 2 seals?
You're hooking Card.drag? Is this for your Solitaire mod, trying to drag a stack of cards together?
custom info_queues can be made by doing like info_queue[#info_queue + 1] = { key = "something_something", set = "Other" }
and then localize it in descriptions = { Other = { something_something = blah blah
you're correct
No, I meant on any joker or card or consumable.
I haven't tested it, but my instinct is that if you just set the parent and major of each card to the card that it's dropped onto, then the child cards should be carried along with their parents automatically
Chat, I need some reword advice.
there it is
I don't think you understand if a joker or card or consumable that my mod does not own, has more than 2 seals I want to display how many of each seal it has.
oh nvm i see what you mean
you should patch into common events using lovely if you want it on any arbitrary card
I think you may need to patch it
wait I know where the code that generates that stuff is lemme find it
version = "1.0.0"
dump_lua = true
priority = -1
[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = 'for _, v in ipairs(info_queue) do'
position = "before"
payload = 'if (Entropy.FlipsideInversions[_c.key] or (_c.ability and Entropy.FlipsideInversions[_c.ability.name])) and HasFlipside() then info_queue[#info_queue+1] = {key = "inversion_allowed", set = "Other"} end'
match_indent = true
something like this
is your issue how to add the tooltip or how to count the seals?
ill try ig
The tooltip.
I don't know if this is the best way but you can patch generate_card_ui in common_events.lua (lines 2747-3231), check if it has more than 2 seals and then add another thing to the info queue
you could also probably just, fill your consumable slots before every boss blind..
How do I input the number of seals and their names?
How do i do a conditional hook?
What do you mean?
just do the edition check inside the hook
and only run the code if the check passes
what should i do next
dart monkey
dart monkey
the zero zero zero dart monkey
real ones miss this
Content sets are working. Gonna set them up through a config for now. I should see if I can come up with an easy way to just allow all content from a certain mod through 🤔
Ooookay, how do i hook?
why is one of my jokers not in its rarity pool
What’s your issue
that's why it keeps giving me jimbo
Depends on your needs, but yeah, you could with some fiddling around
because that rarity only has 2 jokers and one of them is just. not in the pool
- define a new function which is equal to the original function
nvm I know why
say i wanted to hook uhhh
so that's just gonna be annoying until I add more jokers
Have you seen my Butcher Vanity Joker?
yes. plenty
i added my mod prefix because i don't know i don't want it to break anything
What did you think of it :0
^q^
in this case G.FUNCS.can_play = function(e)
now you write the code that you want to run inside that function
and then once you're done, you run the function you defined up here
in this case, tsun_canplay(e) with its original arguments
you can move around this line to define when your hook code runs compared to the original function code
i'm going off an example that someone donated to me so i'm not 100% on all of this
but this method has worked for me pretty much every time
hello ive decided to mess around and wanted to make jokers, where is a good start to make one
there's a video guide somewhere
and the steamodded example mods
I was told to ask the discord for help
my only issue is how im going to add the joker textures itself
It's just... I feel like something is wrong with the sentences I typed, that's all.
hi chat
ive this code thats meant to change a joker into another joker
toConvert[i]:set_ability(G.P_CENTERS[j_joker]), where toConvert[i] is a joker and j_joker is a placeholder for now, but it's giving me the crash
card.lua:255: attempt to index local 'center' (a nil value)
for some reason, any idea what's causing it?
you wanna just use the joker's key here, not the actual center
set_ability("j_joker") should work
aaah that does indeed
i tried that earlier but the key i fed it must not have been a string
thanks lad
first you need to actually get the sprites
the center is fine to use
i'd recommend using the vanilla joker sheet as a base and applying your sprites on top of it so you guarantee the spacing is correct
and then you need to define an atlas
that's the easy part
Oof, figuring out how to do UI for this cardset mod is going to be real tricky. I think the best approach will be to add a button on the deck select and pick the sets from there, somehow
I think you’re right. I believe it should read “effects”
Realizing I should probably set up a tool that creates a lua file that just contains a cardset object for a selected mod, with all keys in there. That'd make editing ones a lot easier
Maybe try using copy_card. That’s what I did for a Consumeable yesterday
@paper zealot how would i unbind the major do i just set it to nil
I think you can set it to self
I think you'd set it back to self if you didn't want it to be attached
ah
i dont think thats quite what i need for what im doing but thanks anyway
even if it was sunk cost fallacy wouldnt let me at this point lol
There must have been milliseconds of difference between our messages, haha
You want to make it become a Joker that’s not one you have, right?
SMODS.Atlas {
key = "ModJokers",
path = "filename.png",
px = 71,
py = 95,
}
example atlas i just grabbed, place this near the top of your mod code
the path is the name of the file containing your jokers, which should be under your mod's folder/assets/1x/filename.png in this case
the atlas key is what you write in a joker under the atlas argument telling the game which sheet to use, in this case atlas = "ModJokers"
the px and py are the width and height of each sprite for tiling
on the joker you also have the pos value, which is written as pos = {x = 0, y = 0}
x = 0 and y = 0 is the top left corner of your sprite, add 1 to the x to go right by one, add 1 to the y to go down by one
you should also upscale your sprites by 2x and place them in /assets/2x/filename.png, these double sized sprites are used when the pixel art smoothing setting is enabled
oh yeah and if you wanna do the legendary floating head thing, define a soul_pos like the pos value and place the second layer as a joker in your spritesheet
Me projecting the desire to play my mod into your mind:
any joker of equal rarity
maybe copy_card() actually could help with that now that i think about it but ive already made a function that generates random jokers and the lot
You don’t need to make that function, it already exists
Anyways, see my example above
I create Earth, copy it, then remove it
That way I can turn any Consumeable into Earth
wait it does
wheres the example
There’s the vanilla create_card and SMODS’ SMODS.create_card
It’s in the wiki
:set_ability("c_earth") would also work without needing to create a dummy card, though
I’m not sure it would
lol good for you I literally just went through this for like 2 hours
my joker that does it like that works, I haven't ran into bugs relating to it yet, haha
lemme get the code
N’ showed me a video of it seeming to work
But reading the code I wasn’t sure if only setting the ability was enough
copy_card does more than that so I felt like there must’ve been a reason
I should probably make a non legendary joker
me when i realize ive just spent the last few hours coding something that already exists
it's for seals, editions, etc.
Before that
It copies the ability table too
local rarity_key = get_rarity_key(joker)
local _pool, _pool_key = get_current_pool('Joker', rarity_key, nil, '_ritual'..i)
local center = pseudorandom_element(_pool, pseudoseed(_pool_key))
local it = 1
while center == 'UNAVAILABLE' do
it = it + 1
center = pseudorandom_element(_pool, pseudoseed(_pool_key .. '_resample' .. it))
end
joker:set_ability(G.P_CENTERS[center])
``` @ivory coral and for `get_rarity_key` it's ```lua
function get_rarity_key(joker)
local _rarity = joker.config.center.rarity
_rarity = (type(_rarity) == "number" and ({ "Common", "Uncommon", "Rare", "Legendary" })[_rarity]) or _rarity
return _rarity
end
And I think it sets sprites too
First step, read the wiki ;P
Second step, search vanilla code that does something similar
The game already creates Jokers, so…
yeah, that's true. I think it'll potentially have issues with cards that do sprite manipulations, but even then, I haven't run into problems. Half joker and legendaries are also properly converted by just using set_ability
What about wee
what about wee?
Wee will probably be the offender, yeah
creating a random joker of another joker's rarity is annoying because if you just give it config.center.rarity it thinks the vanilla rarities (numbers) are weights so you have to turn them into strings yourself
my coworker calls the switch the wii and it drives me insane
"im playing mario for the wii"
which one
my coworker calls us wii when he's discussing our activities
Did you see the new Mario Kart for the Wii?
im blind to anything above 60 dollars
knowing nintendo, Mario Kart Wii and new mario Kart wii could've been two separate games
Mario Kart Arcana Force XXIII — The World
I wonder how much it’ll cost in euros
I have a Swiitch I haven’t touched in years 🤔
I'm gonna set up a thread for this unfinished card set mod, because that way people can intercept me doing dumb fucking code before I try and make this a new api mod people should definitely make their mod compatible with
i have a switch controller and no switch 🥲
i have a ps5 controller and no ps5
btw, N, I'd love if you could check the code and see if there's anything you'd do different, or that might cause issues. Because ideally, this mod would be a great JoyousSpring addition, haha
alright my own way does actually work now so i'll stick with it
in the future i'll be smarter about it
let me know when its up and ill check it out
hmm anyone know why when using copy_card the copy has the wrong playing card Back
and how to avoid it lol
thats a vanilla bug, i think it sets a default back
ahhh gotcha
#1358087455126847589 I'm not really here to work on it for the rest of the weekend, but this skeleton for it is working
I might still figure out today how to have it output a file with all keys properly formatted for a given mod, but who knows if I get that working, haha
help lmao
Reactivate.
?
i needed to change max width too it seems
i tried tweaking that but i guess it already hit the max width cap
got it working tho
thats fun
why is it not changing the text?
im sure the target is right, and it definitely detects card.ability.break_meter too, since i put a print in there to check
you should use ref_table and ref_value instead probably
yeah im experimenting with that rn
no clue whats ref_value supposed to be aiming at though
like, i know its gonna be using ref_table, but where am i supposed to set break_meter on the card for ref_value to check
you can do ref_table = card.ability, ref_value = "break_meter_text" and just update the text alongside the value
how would one check what jokers the player has
