#💻・modding-dev
1 messages · Page 293 of 1
iterate through G.jokers.cards? or do you want to find a specific one
Is this solitaire ?
no its clearly yugioh
No yu gi oh is more horizontal
im trying to see how many gros michels you have
table length
(lie)
isnt it the same as #table
that doesnt work with non-arrays i dont think
oh
Thats so many pixels
yeah #table only works with arrays
what r the odds of the progress bar being conveniently placed in ui_definition
andddd nope, not in there
found it
shouldve thought of checking game.lua first
...probably best that i read love.graphics documentation somewhere first
what are you trynna make, Bepis?
making a progress bar on top of a card
this one
I'm trying to modify the hand size with a tarot card, but I can't find the hand size function anywhere on the documentation, so can someone tell me what is it?
oooh, that's really digging into just straight up love2d features, huh. I'm gonna ask you a shitton of questions once You've figured out how to make it work 😛
theres no ui function made for this sadly
do NOT bet on me when it comes to ui, i will probably forget everything when i got it working 😭
shouldnt be that hard tho
what could possibly go wrong
hahaha. I was looking into using sliders for progress bars but it wasn't very successful to set up. I wanted a progress bar on the bottom of cards for timing related things
-# when i got it working, i should probably make an UI function to make progress bars easier somehow
I don't care who it is, whenever I see someone do cool ui stuff I'm going to try and make them think the best thing to do is make all their features an smods pr that makes ui a million times easier for me, haha
oh yeah, i thought of using sliders too, but its probably best that i actually figure out how to make an actual progress bar and not just a workaround ❤️
true true, i will try, would be pretty insane if i got something from me added to smods when i have only been on this platform for a month 😭
aiko can you add ultrakill to balatro
problem is that it all gets combined for some reason when i drag
it all got bunched up into a single pile
@paper zealot 😭
hey is there a way to add badges to a modded deck? there's no create_badges function available in SMODS.Back but it still shows the mod badge in-game so there's gotta be a method to add your own badges regardless right
You could reuse the vanilla UI I think
Is there a way to remove/hide a custom suit from the customize deck page? Or change the cards displayed to something other than the face cards?
I think so
I fell back asleep so good schmorning part 2
i added solitaire in balatro for real
Morning dilly
Hi winter :D
:3
How is your Saturday
Eating leftover Chinese food, being hot, and getting ready to do more mod work
Attractive lmao, it's not super warm yet where I live
Lmao
I am attractive all times of year, which is why I wear skirts in the middle of winter despite many, many people suggesting it might be colder than wearing pants
I remember when I was younger I didn't often care to bundle unless it was unusually cold
These days I haven't really had much of a winter
I think it snowed only a handful of times here in Chicago, and nothin serious either
The one time I went to Chicago the "windy city" thing really was true so it was unnecessarily chilled in summer because of constant wind
How can i use SMODS.Gradient for UI?
Come here again we can meet up :D
Lmao
But yea it's usually got some good breeze around here and I'm all for it
Unfortunately I don't have much reason to go to Chicago most times 😔
can anyone see an error in my code? my game crashes on selling my joker
I went there for a bowling tournament years ago
im cooked...
I'm really good at bowling if the objective is to do very poorly
Add the prefixes for consumable and your mod, if you haven't set prefix settings to exclude them
I was a semi-pro bowler as a kid until my bowling club burned down. I haven't bowled a day in my life since...
c_[modprefix]_nanamitool
so 'c_-prefix-_-consumable key-'
Come on over friend we'll go bowl, it's just a short travel from the Netherlands
ttyyyy
I used to be a nationally competitive youth bowler until I left high school, then I stopped and had no real reason to continue
I've only been bowling twice in my life so I am not very good
Billiards however
I have a shot
At the peak of my alcoholism era I could probably beat you..
These days not so much
Is there not a single claymation movie in Kino yet? 🤔
The most objectively terrifying fact about me was that I was a jock in high school
Do you not have nightmare before Christmas isn't that kinda considered
I was one of those drifters
Where i kinda just fit in with a little bit of everybody
I can't currently imagine the jock winter though
I do not, though I'll definitely add it at some point. I wanna make Oogie Boogie a boss blind as well
Ren has been telling me to add Kubo and the Two Strings as well, but I wanna find a mechanical angle for music-themed things first
I mean shoot if you'd get into music themed things the sound of music, singing in the rain, Mary poppins
Fiddler on the roof was good too
Sound of music is in, Singing in the rain I scrapped because the effect wasn't fun enough to warrant it being in, and Mary Poppins I haven't seen yet so I only have vague notions of what that one is about, haha. Sound of Music is one of the more complicated jokers in the mod, for sure
This is large and in charge
Have you tried increasing the offset?
Maybe scale it by card size
Hi again vic
You could try to hack one with column nodes
Hello again dilly
:)
You’re very nice
My friends would mostly disagree but I am glad you think so :D
Oh while I'm here have we figured out a way to move specifically infoqueues but nit the main description yet
I should figure out if there are more flavour-gaps. I don't think I have a good angle on what to do with most sports movies.
Maybe I should make that the first custom seal, and have it be a seal that retriggers like red seal, but can be incremented somehow. So that I have a concept for 'training' that isn't fully overlapping the general buffing of playing cards
You could incorporate an aspect like perishable, just make it so after the tally ends that's when the training is over
As opposed to when it's debuffed
Hi there, just starting my first mod. I'm trying to understand contexts and the calculate function, and I see a lot of detail about different contexts but doesn't really explain cardarea, could someone help me understand how cardarea works?
Is it like the location of the card whose calculate function is being run?
Nope, but close! It's the location of the card who's being evaluated, which may trigger a calculate function. In context.individual, for example, each individual card is being checked, both in the played hand, and held in hand. So you specify the cardarea to make sure it doesn't trigger on cards held in hand for example. Or to not trigger on cards in play. Or probably, more realistic, you specify something like context.cardarea == G.play to only do something if it's a card that's in play and being scored
hm, trying to understand, let me know if I'm super off-track. So at some point in the scoring loop Balatro looks at every single card, both in play and in hand, and calls calcucate on each joker, passing in a context with individual set to true, but with different values for cardarea?
or like how often is calculate called cause it seems like the answer is A Lot
a lot
and every single card has a calculate function, not just jokers?
yes, also blinds and decks and you can enable cards in deck to also have them for example
(not all vanilla objects have those tho or they have just 1 big calculate)
Yes!
Oh yeah I'm having an issue that I want to run by some people
Do Root UI nodes organize nodes in a row?
If you wanna see, you can make a joker that does nothing but just print out the current contexts, just to illustrate, but it's a whole lot, yeah
In the lovely console or you can install DebugPlus to show it on screen
I think so but I'm not sure honestly, why?
I'm just getting some weird results with a UI box where things using column nodes are organizng child nodes in rows instead of columns, and trying to parent them under a column node results in no change in behavior
:3
for it to work properly you need to have row nodes inside the column node are you doing that?
So this is what it results in visually right now
The first two text nodes are parented under row nodes
And then each of the Stored/Available nodes are under column nodes
I said to make the displacement proportional to the card size
I don’t know what unit 0.5 is in
Yeah you need to switch between both types
If you want a column you need to do:
Column:
Row1:
Text
Row2:
Text
Row3:
Text
Text inside a column still organizes in a row IIRC
looks the same
That’s how the red background for xMult works
Well usually it only has a single text node
Okay let me get my bearings here, the main issue is the Available/Stored nodes, so let me outline what it's currently doing:
- Row
- Text ("REFRIGERATOR STORAGE")
- Row
- TEXT ("STORED JOKERS N/N")
- Column
- Column
- Text
- Row
- Column
- Row
- Text ("ACTION")
- Row
- Object (Cardarea)
- Row
- Column
- Text ("Close")```
So the issue is the two sequential column nodes in the tree?
is it possible to add a consumable that is neither Tarot nor Spectral? or should I just make it a Spectral card
I'm trying to create a joker that has a chance to spawn a specific custom consumable
You can create new consumable types
I think the issue is the text under the column not being in a row node
Okay yes, that works (barring weird height issues)
I also want to be able to center the title if possible
you can probably give the row node over it a minw
Yeah yeah I need help with UI shit 😔
There's a reason I avoided ui programming at my last job
Ye I just had to give it a placeholder atlas since I use individual ones in my mod
I usually just name them dilly_[something]
Okay I will give you that I am good at certain shit but organizing UI is not one of them. Gender affirming to be called goddess tho
I've been working with UI recently as well; does anyone know the G.C.color versions for SMODS.Gradient.
I pray to the Ui goddesses, hoping for the random adjustment I made to offsets to actually work out
UI Goddess: "no"
I've found myself here, is there a property I can change here to prevent my consumable type from having a collections menu?
can I just make create_UIBox_your_collection nil or something
idk
you can kinda tell that it's like stacked together
and when you release it it does this
I've made some cool UI stuff in the last few days. I'm working on a new currency type right now.
huh, thats neat as hell
Hmm yeah, setting a minw to the row nodes does not appear to be centering the items in the box
oh
uh
i think might know why it feels weird
the card is on the bottom layer lmao
so it is shown BEHIND the UI
now i just need to set the offset correct.ly
Ported the Red Hand to 1.0. (Credits to Gappie for the soul sprite art)
why he comin at me
This was the original version (blood, gore)
context.remove_playing_cards for playing cards, for other cards there's none
what type of card
none
welp
check out how Paperback or Betmma do it, maybe
-# I think this is technically the second version
did you check Galdur
This is sick
this?
I give it a little kiss every time it gets close ❤️
whatever handles this
Thank you
wheres the page that tells me how to kidnap jonklers
I think this is neat
i can't find the part of the game's code that handles glass cards breaking
ohh
how so
i don't know where the fuck it is i'm checking every corner of the lovely dump
this?
It's in state_events
but what do you want
i need the part where the game decides whether or not a glass card breaks
I imagine SMODS overwrites it
It does
easier to check the dump
i'm chgecking the dump
If I store a cardarea in a joker's extra table, will its value be serialized on saving? I'm attempting to do just this, but upon load, it's telling me stored_jokers is nil
Ahem it's alien Abduction, not kidnapping
Is there a smods wiki for unlock_condition?
There may be ways for it to be stored, but in my experience, it does not
I assume this is some underlying thing about values and references?
idk what you expected me to do with this
but all it has is release info
I think cards are only saved if they're in a CardArea
I thought you wanted the mod with Joker kidnapping abduction
im trying to kidnap the banan
try one of Kino's UFO Jokers
So what's the most effective way to break down saving a card within another card?
Just copy the entire ability table? Will that serialize?
what do you want to save it for?
this part of the code is gone in my version of smods
which i updated today
I'm doing a thing for Dilly. The Joker is a fridge that stored food items
When it stores them, it removes them from regular play
I'm not sure. I think the save system can max out on table depth? I don't understand enough about it to a tell you why. I solved it by storing card references on jokers that can 'store' other jokers, and have them be stored in a cardarea I instantiate at run start
I think the easiest way to do that is to create a CardArea
I've done this
i always have the latest smods
I'm attempting to save a cardarea as part of the extra table
Seemingly doesn't work
Can't you just save the key to the CardArea
Only Asteroid City abducts jokers, atm
where is that in your code
Main issue is that I need the state of the food jokers at the time, they all have scaling values
There is a file in src called Abduction.lua
Are they saved if the jokers are in an arbitrary cardarea?
i think all card areas under G are saved
So then that provides another issue I suppose
Yeah, if it's not under the G, it becomes an issue
i meant the smods take owership
you can just put it in G
I guess I can set the arbitrary cardareas to be G.fridge_jokers_[nodeID]?
okay so i guess the version of smods in the mod index is out of date for whatever fucking reason 😭
no
Winter, I'd check Kino's abduction code as well, tbh. I have this mechanic basically implemented, except I don't render the cardarea visually, but that's the easiest part
set it to G.YOURMODKEY_fridge_jokers_[nodeID]
I don't render them visually either yeah
I have a CardArea that's currently only rendered for debug purposes
Not even when the fridge is opened?
:(
No, I create individual cardareas for each display card and render a copy of the card instead
i dont think this ubduction is what i need
The biggest question is whether cards in the fridge need to mechanically exist, or whether their values should just be stored. In the second scenario, you don't actually need to have a continuous card area
i need to do smods take ownership
Because you can store card objects on a joker, and that will be saved properly, iirc
discrete cardareas
The reason it's best to have them mechanically exist is because it also processes the joker calculations for stored jokers since the're removed from G.jokers
oop mb
I'd have to create and assign new jokers each time I wanted to do that otherwise
me fr
you need the stored ones to still work?
like while they're stored?
Yea, the idea is the fridge doubles the values of each stored food card
Yeah. Stored jokers
- don't expire
- don't count against your joker count
- still calculate as normal
oh then you need to patch those areas into the smods calculation stuff
Fairly certain I don't
Why not just access all the cards from the fridge joker and pass in all calculations it receives to them?
It receives the same contexts that they would
you can do that but it's more complicated than what i just said lol
but if the Fridge is meant to Blueprint them that's another story
Patching is inherently less stable
It technically works with vanilla jokers. Would break anything position dependant that other mods might add 🤔
Any changes in SMODS code requires the patch to be fixed, and the code is less isolated
Patching in a new cardarea has a specifically marked target in the smods code
Blueprinting also soves the issue of them expiring to be fair
patching calculation areas is built into smods, they provide a comment for you to target
so it doesn't break on updates
That's how the inconspicuous cardarea here works
Patching also doesn't account for an arbitary number of new, arbitrary card areas, resulting from duplicate fridges
thats true but do you need an area for each?
Don't make individual card areas per fridge. Just mark which jokers are in which fridge in a general area
I think that's not a good solution
Because cards cease to exist between loads
So any references become nil
"mark" not store
I tried to do basically what you're proposing for Kino's alien Abduction mechanic, by having each abductor create a card area stored on the joker, but it proved to be a real struggle to get it to work properly with loading and manipulating the cards in the cardarea
Anyways, just creating a CardArea and outsourcing the process by Blueprinting should be enough
I don't think I ran into this issue, but I'm gonna make sure to check when I get back home after the weekend
If the fridge displays fake cards, I do think you can technically solve this by storing the cards in a table on the joker, not even in a cardarea, and calculate the stored cards
But if cards don't serialize correctly, then it would make loading/reloading a pain
Someone else has that mechanic working, iirc, but I'm not sure who it was. Let me check
IMO it sounds like the play here is to just create a cardarea per joker, with a unique ID for the node, and then just use/access it as usual. Although I can patch a new collective fridge cardarea, that would make the code for the fridge less portable, and probably introduce unexpected bugs. A unique cardarea in the global table would (afaik) serialize the cards within as expected, and also leave the result of calculation up to the fridge joker, which is the goal
have you tested
Rather than them just being calculated as normal cards
because afaik they do so
So far attempting to serialize just a cardarea has resulted in pain
I am
Kàeda had a card store cards as just values, and I think the values are able to be manipulated
I do this in a lovely patch and my permanently scaling Zodiacs work well
self.ca_vic_zodiac = CardArea(
G.TILE_W - 6*G.CARD_W - 2.95, -1.1*G.jokers.T.h,
G.jokers.T.w, G.jokers.T.h,
{ type = "joker", card_limit = 12, highlighted_limit = 0 }
)
where I'm pretty sure self is G
so is there a way to add a custom context
yes
I'm guessing I can just put it in context.(Context name)
what do you mean
so i kidnapped gros michel
you need to call SMODS.calculate_context{modprefix_context_name = true, modprefix_other_info = ...}
you can ignore the modprefix but i would advise not to
and im giving it a context for when it dies
docs?
no
source: N' made it up
true
source: I made it up that N' made it up
fuck
its like vibe coding
time to go read smods code
Source:
I've heard that yesterday for the first time
yes
I don't think it should be in the event
how do i put certain cards above others 😭
I think you need to render the back cards first
let me know if you figure this out because i need it too
it looks off
wwww
wwww
i was able to avoid patches yet again
I repeat this ;P
Hmm
Creating a new cardarea on load results in an issue because the card on reload is the string MANUAL_REPLACE
So saving cards directly on the joker like you suggested Victin also doesn't work as you might expect
am i losing it
I didn't suggest that
I suggested creating a CardArea in G
I suggested that. If Kàeda is online sometimes, I'll check how they did it, because for them it was working
I'm trying a couple other things, now doing the global thing like you suggested
where's a card's suit stored? is it .base.suit or something similar?
What are you trying to do?
convert a card to the suit of the card left of it
ah so you want to see the base suit to circumvent stone and wild cards?
i'm using SMODS.change_base() but just need to access the suit of the card
yeah
so close
what would be the best way to change the scoring requirements for blinds? i just need to change the scoring for all blinds by a set multiplier
well i might just make those not work with this card
😭
but i'll still need to access the suit of the card
I think base.suit would work, but there might be a more official smods way to get it that's slipping my mind currently
alright, thank you!
You can also check to see how SMODS.change_base() is implemented, because the place where it changes the suit, is also where you'd grab it from
10/10 game, can't believe nobody's thought of this before
todo:
add double click feature...
Hmm, storing the cardarea in the global table results in one of those "not instantiated on load" errors
i am not looking forward to that that's for sure
how can you check a card's seal?
peak
That has to do with the way card-areas are loaded in. I solved it by loading them in through a patch instead of a hook, but I can't tell you exactly why that solves it
That one seems strange. Because even the SMODS patching route would involve the globaly stored card area being serialized and deserialized in advance, no?
I think it's just a timing issue
smods should add a joker destroyed context
I had to add one myself yeah
can anyone make sense of this
You should also consider extending and using a child "class" of Card (make SolitaireCard or whatever) for these minigames, to avoid having to add more hooks to very expensive and frequently-called functions like Card:drag. Since Card:drag is called multiple times per-frame on whatever you're dragging and all its child nodes, it adds up real fast
if only any of the people who added it made a PR
i just had to take own gros michel and then add a context for its death
Me on my way to copy these hooks and add them to Card
to be fair mine only works for one jerker
and my soultuion is not the bes one lol
If you want I could add a PR for various things, like my created/destroyed contexts and my insert cardarea at specified index changes
it would make life better for the rest of us lol
I already added an added to deck context
but added to deck no worker on jimbos
but really I'm plotting it and it makes no sense 😭
makes sense
I would maybe make a HyperCard class
A HyperCard is a "card and (nothing or hypercard)"
explain me to me please
Because unless I put it wrong on Desmos it shouldn't work
???
Why would you need that?
that's how you access crafting mode
solitaire games often let you double click to make an automatic action
im assuming
Ooh, I forgot about that
Also also, not sure if you've mentioned it earlier, but usually in Solitaire you draw 3 cards at a time from the reserve pile, where yours is drawing every card. Yours is a lot easier, is that a deliberate choice?
aiko please
I'm sorry I'm just not that smart
v_v
can someone walk me through the SMODS.add_card() function? I'm passing in the key of the consumable I want to create and add to the consumables area, but I get this error
is there some registration step I'm missing on my consumable?
what's your mod prefix
what did you put in desmos
so the x is time right
yes
I'm not sure what a mod prefix is, is that a step I missed?
what's your mod id
the key should be 'c_yourModPrefix_Fish'
c for consumable, then the mod prefix you set in your metadata file, then the key for the card
im starting to have regions within regions in my loc file lol
Are all cards random? Or is it always made possible
ok how does it look like right now
random
Aw, aight
actually I did add some vertical movement but I think you can ignore that
I'm trying to figure out how ease_num works so that I can time the vertical movement
Booster reroll button
Did you hook/patch the next round and the reroll button?
ok so
And how do you pay with chips
try changing the numbers to some random value and see if the changes are reflected
That plot looks wrong. There shouldn't be a discontinuity because (4*0.5^3) == (1 - ((-2 * 0.5 + 2)^3) / 2) == 0.5
which numbers though
It's a new currency, and chips is the temp art
Ooh, makes more sense
that was my reaction to it too
But did you hook/patch the next round and the reroll button?
This looks a bit better so I wonder if this is what I was trying to do
how do you get a card's edition?
is it not just card.edition
it might be lol
commited to a project, feeling good
(x/2 - 1 % 2) - 1 should then be the same as (x/2 % 2)
W
I figured out what I was doing wrong in Desmos
This successfully created the card, and the card works, but there's no text or name
okay, are you defining the name and description somewhere?
sorry for all the (probably trivial) questions
nah its fine
are you defining the name and description in the localization file with the wrong or correct keys
I do not have a localization file, I will go look into that
Okay now I just have to figure out how to avoid memory leaks here
Everything else works
when i changed the colors of the name on this card it added extra spacing between the words, how could I counteract the extra space?
Leaking memory just means more memory surely
Does func in the return table require a return true?
Does anyone know how to specify that a card is being removed/added to the deck specifically because the game is being exited or loaded?
The one used by context.joker_main and the like.
What do you need that for
remove_from_deck runs when you exit to the main menu, for example. I need to know how to avoid running some code in that case
How did you change the name
I need the joker to clear the cardarea it's using from the global table if and only if it's regularly removed from the deck. If I remove the card area universally, it'll mean the cardarea won't be loaded upon reloading the game even though the joker will
don't {}
fwiw, I use the if G.STAGE == G.STAGES.RUN and not G.screenwipe check to ensure that something happens only during active gameplay.
That'll work!!
the gap is still there
I wonder if you could do it in an event
how did you add this feature
also try writing the name without spaces
its in my localization file
i just added custom colors
it acts the exact same as {C:attention} or {C:mult} would
just a different color
That's not what I asked
I don't think colored names are supported in vanilla
Maybe SMODS added it
idk then try this
👋 I don't really know how to do... any of this? I know it's possible to check when a boss blind is, and I know it's possible to add negative to a random joker, but is it possible to make Jokers Eternal?
it did reduce the gap, now its slightly smaller than a normal space but it works for me
how would I make a joker that selects a random rank, but every copy of the joker has the same rank? i want to make a joker that clones itself but if you play the randomly selected rank it destroys all of them
SMODS.Stickers['eternal']:apply(card, true) should work, just change card to your variable
Okay, thanks!
you could store the rank in a global variable and only update the variable if it its currently nil
otherwise just read it
i mean i want it to change every blind selected but thats a start
Like Castle etc.
Check the Castle example in the example mods
do all copies of castle you have use the same suit?
just curious since i've been messing around with custom consumable types before, but is there default smods behavior for, instead of making a new "consumable types" submenu, just slotting the new consumable type in and adjusting the layout slightly if there's only one new type in the mod? (like this visual mockup i've made?)
there's totally room for it, so it surprised me that smods instantly resorts to throwing them all into a sub-menu even when there's only one new type
when the player uses multiple mods:
well yeah if there's more than 1 new type, then it's time for the submenu
I'm just wondering how easy it would be to have a special condition for only one new consumable type that more neatly fits it into the menu, since the submenu is a bit of a pain for quick navigation
I reckon they opted for consistency and just always put it behind a submenu
I think it's better to have a consistent ui rather than one that changes depending on installs
and looking at this, I have no idea why the blinds button is twice the size of the others
oh you know what, blinds is bigger so it matches the height of the left column
but then there's the "other" button now, which unbalances it once again
i have a joker with a chance to destroy cards after a hand is played, but when the cards are destroyed there are empty spaces left in the deck
the way I see it, it's already changing every time you add/remove a mod with new consumable types, I feel like it wouldn't hurt much to make consumables a bit easier to access in this menu if there's only one new type
but, that's just how I see it
use the built-in feature to automatically destroy cards
what function is that?
it's a bit unintuitive at first, but you're going to want to use the context.destroy_card context, which triggers for every card in the played hand (iirc?)
if you then return { remove = true } for any of these cards, those cards are destroyed correctly without leaving ghosts
It's important to note that the most likely reason for ghost/invisible cards is due to event timing and lost references
so the simplest calculate function involving this would be:
calculate = function(self, card, context)
if context.destroy_card and context.cardarea == G.play then
return { remove = true }
end
end```
which just destroys all scored cards
you can make that simpler btw
All of calculation runs before animations are played, which means even if you destroy a card at animation timing, it may have references pointing to it still
context.destroying_card is unique to played cards
ah, yeah I suppose so
so this works now?
the wiki lists it alongside a G.play check
wait so how can i make a joker destory cards?
like wheat said
yeah the wiki is based off the old context iirc
remove is false by default so you don't have to return anything in that case I believe, but that should work
I'm not sure animated Jokers are supported. I know people have done them, but they were sensitive/prone to crashing. That is, using only vanilla tools. MathIsFun had a homecooked solution. There was also a SMODS PR to add official support for them
is your pfp the Foster's Home for Imaginary Friends' character?
damn i havent thought about fosters in awhile
it's an amimated consumable
so no animated consumables???
not yet anyways
Might be a problem with my formatting, but I'm trying to make a joker that debuffs face cards and adds mult based on the amount of face cards in deck,
Tallying the face cards work, but when I add the line to debuff it too, only the debuff line seems to work, why is that?
once the cards are debuffed, they're no longer considered face cards
doesn't this tally them first?
ohhhh, alrighty then
pointer in cryptid for example just does it by modifying the pos attribute of the card in G.P_CENTERS

you cantr eat me eating the jimball what the freak
there's no way a victin bee should be able to eat dilly while dilly is eating the jimball fly
the victin bee does it anyways
can SMODS.Rarity use shop_rate or is it something else?
Is there a way to tell what blind has been selected in the blind selected context
G.GAME.blind:get_type() == "Blind Type"?
Is there a way to decouple the rotation of a uibox to its parent?
I've managed to be able to manually apply the x and y positions, but for whatever reason I can't seem to get the rotation to become independent of the parent
is there a way to tell what the current ante is and what the current round is?
G.GAME.round
G.GAME.round_resets.ante
Bit of a late reply I left to get some food, no I didn't patch the buttons themselves or used and 'at' pattern for them.
whats the proper way to set the edition in SMODS.add_card?
e_nagative?
🤦 thanks
I think it’s either all or nothing. Not sure you can do it individually
Maybe you can try to just apply the inverse rotation though
The weirdness is just that I'm not really getting anything when it comes to trying to manually set the rotation myself
But I can do it with x and y pos
Not really sure why they're treated differently
Are you doing T.r or VT.r?
both
Is this for a soul sprite
jumbo jokerdisplay
I suppose maybe it just is that 0 rotation is the inherited one
im trying to use G.playing_cards in a blind's in_pool function, but it's giving me an error that it's nil?
I mean this looks right to me
does it work if you add a nil check or is it always nil
The best I can get is setting the r_bond to weak, but it still nudges a little bit when you move the card
isnt it just better to not make the uibox a child of the card
it is
if it's not a child of the card it's inherently more work to store it somewhere else
i just store a million things directly in G
it's only nil for the first ante, but that does mean the blind can't appear ante 1 even if the condition is met
which sucks because i do in fact have a deck where the condition is met immediately
oh hang on its not always ante 1?? it might just be the first run of the session??
its late i dont wanna deal with this im going to bed
lol
Hmm is there a way to manually hide the joker description box...
there is! Card:remove_ui()
Which is not used very much in vanilla
okay so does anyone know any weird bugs with pixel smoothing? this is my jonklers with 2x assets (and yes my 2x asset file is double the size of the 1x)
doodel
The second coming of strangepencil
also my custom consumables in a different atlas display just fine with pixel smoothing on and off
never mind, my asset files were massive lmao
how do i make a consumable play sound when used
this is for the command scrolls by the way
i want them to play the command on the scroll
eg. you use the march of mobility and it plays "pata pata pata pon"
i also want a little popup to appear saying the specfic drum being played
i know its possible but like how do i do it
i know how to play a sound.
and i know how to make a message appear.
but can i do it both at the same time
i mean i probably can
The more I learn about how this game works the more interesting it is
REAL!!!!!
How (un)balanced is this draft?
im assuming wildcard is more rare than legendary if so i think the rarity(lower rarity) / odds should be a bit better
either lower the rarity or change the odds imo
How do I make a joker always have the eternal sticker? Kind of like cube from cryptid, but I can't find it in its code
To get one, you need 1x of each previous rarity of that Agent.
how make sleeve that turns all playing cards six
still too hard to get imo and not worth the time
What about cranking it down to 1/20 or 1/10
up to you honestly also consider it with oops all 6! @glass scaffold
thats a good range to test it out but remember
Yeah, that's the biggest thing.
And then you have Seeded via Cryptid.
make stuff thats YOU find fun to play and im sure
other people will like it
havent tried the cryptid mod but yeah
u catch my drift
hello, i recently finished making a recolor for the suits in the game. could anyone help inform me on how i might change the text color for suits to match my recolor, like the ones on jokers?
Whats a good rarity name for something thats a better legendary but has a niche downside
gold or crystal
gold bcus its valuable but brittle
crystal bcus like that but not
alternatively, Gilded
gold on the outside but is not entirely clean or perfect within
how do i use smods create card to create a playing card
no
im guessing i have to use the vanilla create card thing
yes
cool
how could i add a consumable type to arcana packs? as in, there's a chance of them showing up like how omen globe works?
how does the create card thing work
i am an idiot
what are you trying to do with it
create a glass face card
does anyone know where in the source code i can view the calculations for the jokers?
im working my way through it now
card.lua
reading the sorce code be takin a minute
it's my first time ever modding a game and i'm trying to find examples of what i'm trying to do. I've looked at others' mods but i can't find what i'm looking for so i
i'm going straight to the source code
gl hf
i have been looking at this code for 20 minutes and this fucking tilde was the issue i hate this job
what even is a card center
everything thats movable
I'm in pain again
How does someone make a custom rarity
Like I know this part:
SMODS.Rarity({
key = "Test",
loc_txt = {},
badge_colour = HEX("FFFFFF"),
default_weight = 0.003,
pools = { ["Joker"] = true },
get_weight = function(self, weight, object_type)
end,
})
But the function for that rarity is making my mind blank out
I also asked people in #⚙・modding-general
what are you looking for
when i hook something the code gets run after the og function right?
ah sweet
can you help me with this, im trying to get the joker to create a glass face card when sold during a boss blind
is copy_table a nested copy?
what part doesn't work
I.E. does it copy to the full depth of the table or is there a limit?
i need to know if im doing the right context check
and im creating the card properly
it should be just context.selling_self and G.GAME.blind.boss (get_type boss also works)
for creating a card you need to probably do pseudorandom_element to replace 'A_H' for face rank + random suit
you can also do center = G P_CENTERS.m_glass i think instead of set_edition
bump
also i think the second argument of create_playing_card needs to be the area (G.hand) or it won't emplace properly
I'll try this later
Thx
for what
Hey guys, when you make your own legendary card, will it automatically spawn via the soul card?
How do other people normally handle legendary cards that are added via a mod?
I was debating on whether just making it be rare because it is quite powerful
the answer to the first question is yes
why r u beatin me 🥀
shes breaking
my baguette
since it just immediately clears when i render the bar
hm
well surely it cant affect performance that much
I’m getting close to releasing my mod, and now I’m getting the dreaded end of project slump
i run jokerdisplay in update it's ok
😭😭😭😭
my mod isn't even close to done
chess deck
i mightve
fucked up the game horribly
like, straight up split the game in half
thats certainly something
ask for it one more time and no more chess deck
it's actually getting annoying
maybe i should just
stick to the uis already provided by balatro instead
🥀
im scared of accidentally creating multiple dimensions in my balatro
Making a series of jokers that use an affection system akin to that of a dating game
Should I
A. Change the values on the joker based on how high/low the affection is
B. Evolve that joker when it reaches max lowest/highest affection
C. Mix both
D. This idea sucks i hate you
Im serious...
i think C is good
hmm
can i use the func provided in an UI's config to change its size?
or would i still need to use update
you should be able to change the UI on the fly but you're getting into hard UI territory so idk
Not super familiar with modding balatro yet
what's the context to detect a hand level up?
i want to detect all hands leveling up except two pair
I don't think there's one but you can make your own
:p
do NOT have the knowledge for that
it updates whenever ref_value changes, so its pretty nice
I don't have the code at hand rn but it would probably be a simple hook of level_up_hand and calling SMODS.calculate_context{level_up_hand = hand_key}
ic
Oops! The game crashed:
Syntax error: card.lua:5457: 'end' expected (to close 'function' at line 875) near '<eof>'
Additional Context:
Balatro Version: 1.0.1n-FULL
Modded Version: 1.0.0~BETA-0404a-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.7.1
Platform: Windows
Stack Traceback
(3) C function 'function: 0x2132cf38'
(4) global C function 'require'
(5) main chunk of file 'main.lua' at line 888
(6) global C function 'require'
(7) LÖVE function at file 'boot.lua:323' (best guess)
Local variables:
c = table: 0x2132a5a8 {identity:false, version:11.5, accelerometerjoystick:true, modules:table: 0x2132a5f8, gammacorrect:false, title:Balatro, externalstorage:false (more...)}
openedconsole = boolean: false
confok = boolean: true
conferr = nil
(8) global C function 'xpcall'
(9) LÖVE function at file 'boot.lua:362' (best guess)
Local variables:
result = boolean: true
(10) global C function 'xpcall'
(11) LÖVE function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])
inerror = boolean: true
deferErrhand = Lua function '(LÖVE Function)' (defined at line 348 of chunk [love "boot.lua"])
earlyinit = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])
what the bar for
new mechanic my jokers use
just updated steamodded and this happened
some attacks will build up a BREAK bar on a playing card
i will try to pr this thing after i polished it lol
not sure if its up to smod's standards though
i dont even know what id want a progress bar for
i think itd be neat to display cards becoming active
well it would find quite a few niche uses
One of them wouldve probably been past me
yuppp
how could i add a consumable type to arcana packs? as in, there's a chance of them showing up like how omen globe works? i tried a patch in the same way omen globe does it and it does nothing
decided to go an extre mile for break characters
else i think they wouldnt be too unique compared to the current characters :p
grahh work pls
I don't get what the break bar represents tbh
my current concept for it rn is that currently, some characters have attacks which target cards already, right?
so my idea is: "attacking" a card with a break character will increases its break bar
and when it reaches max, do some unique stuff
- debuffs the card for current ante
the way the base game has omen globe do it is super simple, no clue why my patch won't do anything
Oh, so the card actually breaks
mhm
I thought it was the card's progress towards breaking the boss
nop :p
where im going with this is that i want break chars to be more on the strategic side, you would need to figure out what cards you want to break
so you wouldnt go straight for your best cards immediately
but at the same time, mindlessly using bad cards will cause your deck to be flooded with debuffed cards later on
i think it would be fun
anyone who's done custom consumables ever figured this out?
Are you looking at the lovely dump
no, should i check there? it's not like there's a crash or anything
Yes, when making patches always look at the lovely dump
One to look for what line you want to modify, since steamodded patches may modify it before you
Two to see if it actually applied properly
Propel.
it seems to have been done correctly
you're not actually excluding the other cases when yours triggers
So what I assume is happening is that your card is immediately being overwritten by a spectral or tarot
SMODS reworks vanilla booster packs to use SMODS.Booster's create_card function.
So patching the Card:open function will do nothing.
should i add spider solitaire next
well that's annoying lol
so i should patch the SMODS rework instead?
You can hook the create_card function and take ownership.
seems like this is where smods changed it
so would a simple hook work then?
Actually this would be scuffed, just patch lmfao
lol alright, how would one patch an smods file
How could I put a badge for each unique seal on a card?
Is there a way to use a texture larger than 71 x 95 for a Joker?
how could i work around this?
lua logic isn't my forte
nevermind, i got it!
You would set the atlas px and py to the width and height of the sprite.
Thanks
would having an ipairs within an ipairs like this make the function not work?
suits['1']?
currently trying to make flower pot type effect with suits other than the standard 4
ah sorry
hmmm
i could use a local variable to set the card's base suit before the second i, v
wait then i wouldnt even need the second
Ehhhhhh
you know you can just change the "i,v" part right
oh you can?
i,v are just names
no clue you could
aint no way 😭
i actually dont know why its wrong
or i assume the value isnt the same at all?
Is this on the config of a UIElement? Context pls
couldn't you also use the badge function?
yeah
not the same, its an UI that appears when you are hovering on an UI
ohhh my mistake
i tried changing "title" with "name", didnt seem to work either
pretty sure its just how i set the value thats wrong now
Oh, detailed_tooltip is suited to cards.
function create_UIBox_detailed_tooltip(_center)
local full_UI_table = {
main = {},
info = {},
type = {},
name = 'done',
badges = badges or {}
}
local desc = generate_card_ui(_center, full_UI_table, nil, _center.set, nil)
return {n=G.UIT.ROOT, config={align = "cm", colour = G.C.CLEAR}, nodes={
{n=G.UIT.R, config={align = "cm", colour = lighten(G.C.JOKER_GREY, 0.5), r = 0.1, padding = 0.05, emboss = 0.05}, nodes={
info_tip_from_rows(desc.info[1], desc.info[1].name),
}}
}}
end
Check generate_card_ui for how it'll be interpreted
Try providing detailed_tooltip.set and detailed_tooltip.key to pull it from the localization files
It eventually ends up at
full_UI_table.name = localize{type = 'name', set = _c.set, key = _c.key, nodes = full_UI_table.name}
``` where `_c` is `detailed_tooltip`
(not sure if SMODS changes all this)
Alternatively instead of using detailed_tooltip you can provide an entirely custom UI to h_popup
is there an easy way to put a voucher next to existing ones in the collection? (for third levels of vouchers like how cryptid does it)
do i go with smt like this?
i remember set can be nil, but im not sure if thats true
:p
Theoretically can you make a consumable start a blind that isnt in the actual blind line up of the ante
Basically that one cryptid code consumable but instead of a shop its a blind
what's a simple and efficient way of incrementing across letters of the alphabet? 
What do you mean?
if 1 = A, 2 = B, 3 = C and so on,
if var = 'A'
var = var + 1 would be 'B'
😭
i have a function for this 😭😭😭😭
ooh
python ord()
You could have a table of all letters, then it would be letters[i]
this was my first thought, but i was wondering if anyone had something better
or if that is just the best way to do that
seems like i hallucinated cryptid ever having tier 3 vouchers not in their own section lol
thats wrong
How do I check if the current blind is a boss blind, im using steamodded
Why is it jokerInfo.loc_vars?
loc_vars = function(self,info_queue,card)
info_queue[#info_queue + 1] =...
end
ah!
it was from one of the cardsauce devs
and their code is formatted weeeird
ty though!
wait shit
is there a variable or is it more complicated than that
G.GAME.blind.boss
ty
:DDD
Oh right i should probably add tooltips to my stuff
also its kinda funny to me how localthunk coded flower pot
Try update_hand_text({sound = 'button', volume = 0.7, pitch = 1.1, delay = 0}, {mult = 0, chips = 0, handname = '', level = ''})
I was boutta say. The text isn't being updated back to neutral
ye this is the second card im making so i know next to nothing lol
so this probably was something unused in vanilla
also i guess the fact its two pair isnt appearing either
but i love it
whats meant to be unused
How would I then make it show the upgrade text instead of blank
maybe it was used for an early rental tag?
i don't think i've seen the -$ sign
maybe
but then localthunk decided to have it be before scoring so it can affect interest and be harder
i couldve sworn ive seen it from something, cause i also implemented it into one of my cards..
i cant recall for the life of me though
well yeah, it exists in code but not in any actual cards
well thats the thing, i couldve sworn i saw it in a card
but its possible i just read the code and imagined it in a dream
attempt too index field game (a nil value)
where are you using it
You could convert to the ASCII value and back again.
string.char(97) == "a"
string.byte("a") == 97
oooh
where does it need too be
you should be using it somewhere like here, where you establish the context in which an effect triggers. for context, this triggers at the end of the round while a variable is less than another variable
in vanilla there's no jokers that do that (idk about other effects)
im prob just imagining shit then, many such cases for me
only jokers and green deck affect the cash out screen
and TECHNICALLY seed money / money tree
@manic rune
you return message
would anyone know why these UIBoxes have the grey-ish border around them?
local uiDef = UIBox{definition=
{n=G.UIT.ROOT, config={align = "cm"}, nodes={
{n=G.UIT.O, config={maxh=0.5,minw=2,object = sprite,align = "cm"}
}}}, config={align="cm"}
}
sprite_node = {n=G.UIT.C, config={align = "cm",},nodes={
{n=G.UIT.O, config={id='tracker_'..type,align = "cm", object=uiDef}
}}}
that's the function that makes each "sprite_node", which is a UIBox
ideally i'm trying to make them completely transparent
anyone know how too make text slightly float
good evening
it's not even noon yet
:3
try changing the background color to G.C.CLEAR
doesnt every text box already do that
i want the shadow but idk how
I try to add lovely, steamodded. Then use balatro-mobile-maker to port to ios. Có ai có thể giúp tôi sửa lỗi này không?
thats a weird looking pc
huh_cat.mp3
something like this?
local uiDef = UIBox{definition=
{n=G.UIT.ROOT, config={align = "cm"}, nodes={
{n=G.UIT.O, config={maxh=0.5,minw=2,object = sprite,align="cm",colour=G.C.CLEAR}
}}}, config={align="cm"}
}
not sure if its in that node
it didn't work but i'm still looking on how to change the color
sadly no one is allowed to help you here, BUT https://discord.gg/henk8q4c
hey, can anyone else confirm whether or not attempting to add to wild card's info_queue has weird and unexpected results?