#💻・modding-dev
1 messages · Page 187 of 1
You can't, stone cards have no rank
Stone cards explicitly say they have no rank or suit. Not that they have a rank of 0. It's the same reason five stone cards isn't a Flush
they exist outside of a rank
makes sense
I thought the argument was that Q and Q are two ranks
@solar eagle @foggy carbon
It contains 2 cards that have a rank
queen and queen, no?
but that rank is the same
Ergo, 2 ranks
they're the same rank
Joker never said they have to be different
^
As I said, I think most people would interpret it as the ranks needing to be different (as in, the set of ranks) and this is evidence my prediction is correct ;P
2 different ranks and 2 different suits
Yeah, and I'm saying the effect would be clearer if it said "different"
that way it's extra clear
I won't, probably
I read it as different, just wasnt sure whether a card could provide for both suits and ranks as you selected 5 cards 🤣
how could we make it so the game randomly selects a seal (either in vanilla or any added in mods) for use in a command like this, replacing "Red"?
trigger = "after",
delay = 0.1,
func = function()
if highlighted then
highlighted:set_seal("Red") --placeholder for right now, will replace it with call for random seal soon
end
return true
end,
}))```
I think if people interpret otherwise they're being a bit unreasonable
Vanilla text uses the word "single" or "matching" for poker hand descriptions (if the fandom is to be believed)
use SMODS.poll_seal
Not what the source code reads
same or different rank, same suit (implied different?)
Yeah if you wanted to be as explicit as possible you'd either say "different" or "unique" on your joker
but writing descriptions is really hard
and making them fit nicely is also hard
I think those descriptions encourage the use of different
my strategy is to write it as best i can, open balatro, find the justification is off, then spend a bunch of time fixing it lol
My point was just that there's room for confusion, even though you should know the answer if you think about it for a couple of seconds
well, we inserted that wrong... ;P
highlighted:set_seal(SMODS.poll_seal( guaranteed = true) ) --placeholder for right now, will replace it with call for random seal soon
same suit, hence one suit
speaking of which, should this be uncommon or rare? and does the description make sense
also different ranks, hence two (or more) ranks
this is justified better
for every $3 gained is a bit vague
i was thinking of something along the lines of "for every $3 of sell value it had"
but that's a bit long
that will be easier
TRUE
yeah if you remove joker you can fit what I said
based mod
I still think it's fine with just "gained"
it's vague tho, $3 gained when, yeah it's clear to us it's from selling the egg, but it could cause confusion
now i just gotta justify the text
How can I make card count as all ranks for joker effects
I mean it's your joker in the end. I'm just not really understanding why you dont want to make it easier to read
I think the spacing is fine tbh, one thing is, sell value is C:attention ingame
Are you close to the char limit?
Not like thunk's really consistent with highlights lets be honest
oooh noted
is there any other joker that mentions sell value
i dont think so
and swash
swashbuckler and dagger have it not colored
thank you localthunk
egg and gift card do
consistency my beloved
I vote for it to be colored
I think with dagger it highlights double instead
I mean you should just emphasize the words that are important, not what has been emphasized by other jokers
- The format of the text is nice IMO;
- I think the text is already very clear, as evidenced by other people getting it straight away (and you too);
- I think people can play the game to find out how things work.
i guess it has to do with whether or not it's the main mechanic?
Yea
But I don't even think 3 is very relevant because 2
so like swash and dagger are +mult, gift card and egg are just money makers
Ill leave it unhighlighted since the $3 is the more important bit
how do i make a joker that functions off of hands and discards (like mystic with the +15 mult for no discards, or dusk for retriggering all cards on last hand)
.
You can't
it also affects sell value specifically
sorry to nag, uh, what's the proper syntax for this?
Not without toil and a lot of work
Shit
and it wouldn't be compatible with most things
I changed an effect of mine to turn cards into face cards to circumvent that
poll seal accepts a table
I mean, just because you can figure out what a joker does after thinking about it for a sec, doesn't mean it's a good description
Can I make it count as every rank for everything but pokerhands?
This idea. Now they're Face cards and have all suits
Same issue still
Fuck
same for this
I don't see what's the issue with it if it's understood and succint
I think I'd swap those rarities
Formatting, clarity, brevity, consistency, etc. all go into wording with different weights
The current wording scores highly in all, and I think adding "different" detracts more from the other scores than it adds to clarity
Could I possibly make cards cycle though all ranks when scoring
can someone explain how the Sound thing works? the code i have doesn’t seem to play any sounds at all
I don't think so
It depends what you mean by that
apparently, even if you are replacing only one suit, you still need to include the entire deck image. It's working now
I think it depends on the setting
Did you use the Deck Skin Template?
I used the vanilla game's assets, then edited the image, and copied the lua from another deck skin mod
which mod
you need a message for the sound to be played
i thought it did messages automatically for those though?
Understandable. I think the clarity is worth the brevity (and other people agreed)
also me saying you can't code something and people rushing to their keyboards to "uhm acktually" me until I said this ;P
yeah you're using the automatic message which already has a sound
if you want a custom sound you need a custom message
ohhhhhh
thanks eremel
I seem to have managed to get an approximate screen position by doing this?
local scale = G.TILESCALE * G.TILESIZE * G.CANV_SCALE
local x_pos = ((center.VT.x + center.VT.w / 2) + (center.VT.w * center.VT.scale / 2)) * scale
local y_pos = ((center.VT.y + center.VT.h / 2) + (center.VT.h * center.VT.scale / 2)) * scale
local start_pos = {
x = x_pos,
y = y_pos,
}```
which is something vaguely close to the transformations the game applies to sprites before drawing them to scale them with the other aspect stuff
question! is there an SMODS.poll_seal(args) equivalent for editions?
yes and no
it's poll_edition() but doesn't have a table because it just uses the base game function
I think the 3 lines it has are already too long, and IMO the formatting is important for clarity. I don't think the base game values it, but I prefer to avoid line breaks inside of a concept. The description dedicates the first line to the action the player needs to take, the second to the condition, and the third for the payoff
The fact that all ranks is not possible is shit
Well it is possible
Well you're welcome to code it in and make a PR
Just a pain, and mod incompatibility is high
With compatability
this is currently doing uh. Nothing. in regards to adding edition. what are we doing wrong?
trigger = "after",
delay = 0.1,
func = function()
if highlighted then
highlighted:set_seal(poll_edition()) --placeholder for right now, will replace it with call for random seal soon
end
return true
end,
}))```
well 2 problems
- you need the arguments for the function
- you're using it in set seal
You're... Setting an edition by using set seal?
this behaviour feels a bit odd
how difficult would it be to make it replace the sound of the default message if specified
okay, not like that, clearly.
highlighted:set_edition(poll_edition{guaranteed = true})
Are there just 4 different people using this discord account
Or are you representing all 4 of you
long story and we're not about to give a partial life biography while we're trying to fix a bug. there's a time and a place for that, this seems like neither, y'know? ;P
I had the same question actually
not too difficult but I'm not sure I like the idea of modifying the default messages and would rather the custom sounds go with custom messages
poll_edition doesn't take a table as an argument
it takes 5 different arguments
What does suit do that rank cant?
is there a way to check if cards can currently be highlighted/selected?
cause i know this can happen either during a blind
or when opening a tarot/spectral pack
actually i think i can test something
you can check for #G.hand.cards
if its >0, you can select cards in your hand
Heyo, I'm probably gonna start the process of breaking up my horribly large main.lua into smaller files for maintainability, but I have no clue where to start with that. Anyone have any pointers?
looking at poll_edition and its calls in vanilla, we're honestly wondering if it'd be easier to like. Make a custom function, at this point. what we want is like "take every edition in the game, and select one at random with even odds for each. argument for "do you want negative included in this".
for _,v in pairs(NFS.getDirectoryItems(path)) do
assert(SMODS.load_file('src/'..v))()
end```
is what i use
then you make a folder src in ur main mod folder and dump lua files there
why would you recreate a function that already exists @grim remnant
Found it in a mod and it works
something like this
If you do this the loading order of files will depend on the user's filesystem order i'm pretty sure
which could potentially cause issues depending on how you structured it
Yea
joker_name is just so the messages I'm printing display a "name" instead of a key
I havent run into any though
and will show items in different order for other people if they have a different order
in the collection I mean
I'm guessing you can't return multiple values
my system is to have one lua file for each type of object
that way order is always the same
that will work but your file will get really big, which if it's fine with you go ahead
message = localize{type = 'variable', key = 'a_chips', sound = "hpfx_thumbsup", vars = {card.ability.extra.chips}, colour = G.C.CHIPS}
it doesnt appear to be working, did i do somerhing wrong?
I wanna go even further and make a file for each object (as opposed to object type) so not sure how that would work out for me
sound doesn't go inside localize
the sound and colour don't go in localize, they're seperate parts of the return table
i see i see
the main thing is just that, looking at the actual common_events.lua, the original function both only considers the vanilla foil/holo/poly/neg, and also inherently weights how often those can show up. we want it to account for all possible editions, including ones from other mods, and to pick entirely at even odds.
I'm pretty sure the lobotomy corp mod does that, you can check it out to see if you like it that way
that's how we got it done in Paperback, but we ended up defining our custom order for each object type
G.GAME.dollars is considered a table now, so how would i do this if G.GAME.dollars > number then ?
poll_edition is rewritten in smods to allow for modded editions, if you really want to ignore weightings set by mod creators I suppose you can just pick a random element from the center table
I wouldn't recommend it though
wait, is there already a SMODS.poll_edition, or are we misinterpreting?? that... wasn't on the doc.
the talisman 2.0.2 backcompatible version would be if to_big(G.GAME.dollars) > to_big(number) then
ah
it's lovely patched i assume
if you don't care for that, you only need to to_big the number
what Eremel said is that poll_edition takes into account modded editions too
it's just completely rewritten because the game already had a poll function for editions, it didn't for enhancements and seals which is why they're SMODS.poll_...
so like this then?
you have removed your chips and mult values now though
you need to add them back in with chip_mod and mult_mod
because its a custom message right
yeah
nice
guess that makes sense. only question is what exactly do we set the "key" of poll_edition to. we assume mods, no_neg, guaranteed is true, false, true, right?
set it to nil i'd assume
I almost just asked a stupid question
it's documented here
actually, I misunderstood, the key is your randomization seed
So what I'm seeing is I need to make a list and maintain it?
Returning a value stops the function correct
yes
got it
Damn
I was replying to SMG
oh lmao
Trying to find a workaround to all ranks
what are you trying to do?
Have a card be all ranks
I was thinking returning all rank values
But you can't do that
that will be really difficult because usually cards ingame check for :get_id which returns a single number
you'd need a lot of patching to accomplish that
I'll and I'm trying to think how
Ihave to somehow turn all numbers into all numbers
all my jokers are individual files (though I'm using single luas for each consumable type), and it really helps keep things readable (and I like seeing immediately which joker caused an error in the crash report). But yeah, it does make it so the display is based on file order
Oh yes crash reports are really useful if each object is a different file
yep, that's exactly why I'm doing this lol
are you having trouble with it?
Is there a way to just summon one specific vanilla joker with a modded one
a la "on activate, create Joker"
you won't be able to do this
Part of what I really like about it is that it makes it quite easy to set up WIP jokers and keep them separate, and easily load them in and out
It does make me wonder if the order value each joker has is just entirely arbitrary
My idea for a solution is patching every instance of card:get_id() == x with card:is_rank(x)
more-or-less functional, but the odds aren't all even yet. how best to go about that?
highlighted:set_edition(poll_edition(nil, nil, true, true))
But I want other mod compat
Ideally SMODS would do that tbh
make your mod popular enough so that people want to add compat, that's how talisman does it
Better Calc 2.0 adding that as the function making everyone change it
Yeah that'd be ideal imo
Steamodded is still in alpha so the API is subject to change
we're so back
@orchid thunder People were discussing multi ranks in the Github again today
I have mentioned it before, but I think it's worth releasing an incomplete version of the feature
Because I think the main setback is computing Straights efficiently
I suspect it's a kind of cursed problem
changing how ranks are acquired would break almost every mod
oh is_rank wouldn't actaully
nvm
would it tho? you wouldn't get rid of get_id
when better_calc
I can see how straight calculation can be a problem tho
for poll_edition(options_), how can we make it so it just. sets every weight it grabbed to be equal? SMODS.Edition's doc is a bit unclear in this regard.
poll_edition automatically weighs each edition
if there's a list of all editions available through smods you could probably just pseudorandom_element it
SMODS.Editions I'd assume
don't think so
are there any plans to at least make a test branch of this
not from me
@frosty dock the people yearn for multi ranks
G.P_CENTER_POOLS.Edition
SMODS.Editions should also work fyi
I recommend polling Editions with the built-in
they want to make everything an equal chance
oh right, editions don't use a buffer like everything else
In that case I recommend not making everything have an equal chance
Why not
I insist on straights being the first thing to figure out of that and not the last
If it's what they want
is there a way to reliably trigger a certain effect when a card changes enhancement with quantum enhancements enabled? it seems like it triggers at times when it shouldn't (probably bc of how quantum enhancements work internally?)
Mods can add Editions that are only supposed to exist in certain conditions
we're trying to make it so everything has the same odds, so, the exact same weight. unless our luck has been TERRIBLE, there's no reason for us to get 7 foils, 1 holo, and 0 polys if they're all even automatically...
So not in a pool and/or with 0 weight
It's also up to the mod's developer whether to take that into account if they want IMO
This is for cross mod compatibility
it being automatically weighted does not mean it's even odds
making editions have a get_current_pool function is something I have planned to do for a while
I think if a modder made an Edition with a weight of 0, that is never in any pool, there's a reason
AKA me with Disenhancements and auxiliary Jokers
you could also argue that, for example, you can make a really good joker that can give those exclusive editions regardless
The Editions aren't exclusive because they're good
They're exclusive because the game crashes otherwise
for example
In my case, Disenhancements are Enhancements with negative effects, so getting one is a downside
and auxiliary Jokers only exist to make other effects work, so having them around might do nothing at best or crash at worst
-# well, maybe they could end up working if the implementation is sufficiently robust, but they're not expected to
uh, can we at least get an answer for how to automatically weight everything to 1 for rn and figure out cross-mod edge-cases later?
- Why?
- Do other people agree?
if your edition can crash when being set from an unexpected context then that's another issue
It's not if it's only meant to be generated under specific conditions
if another mod violates them, that's on the other mod
or applied to certain types of cards
we feel like trying to figure out cross-mod edge cases of "oh, do NOT use this mod's specific edition, that crashes things" is kinda losing the forest for the trees. we just want this to stop giving so many foils. ^^;
- because it's a big enough breaking change as is that I don't think it's reasonable to ship as an incomplete feature
if you blanket apply random editions irrespective of how the designer of them made them, the crashes are on you
The vanilla Editions have weights to them, so Foil is more likely than others
Fair enough
- idk but I won't be the one to implement it without figuring out straights first
What does it break exactly?
now to actually solve this, make an array of all the vanilla editions and use pseudorandom_element on it instead
Actually, I had this for Enhancements
local function select_random_enhancement_by_weight(func, key, default)
local function func_(v)
return true
end
local func__ = func or func_
local available_enhancements = get_current_pool("Enhanced")
local options_ = {}
for k, v in ipairs(available_enhancements) do
if func__(v) then
options_[#options_ + 1] = v
end
end
if not #options_ or #options_ == 0 then
options_[1] = default or 'm_bonus'
end
return SMODS.poll_enhancement {
key = key,
guaranteed = true,
options = options_
}
end
IIRC you could ask for it to ignore weights
but I'm building the pool manually
I got an error of to big returning as nil, is this right usage?
well, yeah. we're trying to figure out how to remove those weights, beyond just going. { e_foil = 1, e_holo = 1, e_poly = 1 } for _options, since that obviously ignores any possible extra editions that mods add
If it works as I remember it should be an option to SMODS.poll_edition
it changes internals quite drastically, so it probably whiffs a good few patches. other than that, other mods not using it would obviously lead to unexpected behavior
SMODS doesn't have poll_edition
You can go through all registered editions and add them into a table to pass as _options.
have already tried SMODS.poll_edition and it doesn't exist. at least not yet but that is so wildly out of my jurisdiction
Cause it's poll_edition, an override of a vanilla function
It's on the wiki
even if SMODS.poll_edition did exist it would just be a wrapper for poll_edition
which is probably worht doing for consistency's sake
uhhh how do we do that.
That's fair, but in terms of breaking it's relatively minor
get the current Edition pool, then pass it to poll_edition with normalized weights if the weight was nonzero
Maybe they don't have an Edition pool, so just do the latter
function poll_vanilla_edition(seed)
local pool = { 'e_foil', 'e_holo', 'e_polychrome', 'e_negative' }
local edition = pseudorandom_element(pool, pseudoseed(seed))
end
something like this would just do it, it really isnt that complex, of course this is only for vanilla editions, if you wanted to include modded ones it's more complex
i didn't return it there but you get the point
Even if you don't want to do it personally, I think it's worth discussing if other people think it's worth adding it without Straights as it's a highly requested feature, and partially adding it now breaks less things than fully adding it later
I mean for vanilal editions that's not necessary
we mean, the goal is to include modded ones too if they exist.
The example in the wiki handles them
They do not want them to be weighed!
Read the wiki
The wiki says doing that just includes them and respects weights
there is literally an example in the wiki of them being balanced
Try reading again
I posted it here
you just add a table of options with custom weights ezpz
-# you can actually do it in any of the poll functions
But that still wouldn't do what they want no?
now where to get the table
we mean, is there a way to include modded editions in that automatically, too?
They want modded editions to be included
they just need to build the options table
So loop through G.P_CENTER_POOLS.Edition
and cehck if their weight is > 0 or if they have an in_pool function
and exclude e_base
it'd be weight > 0 or tagged as in_shop
that's what I asked
since apparently neither get_current_pool('Editions') nor SMODS.Editions would help
unless I'm wrong about the former
editions don't have a pool return
it'd be G.P_CENTER_POOLS.Edition
like srock said
well this is currently doing. Nothing at all.
trigger = "after",
delay = 0.1,
func = function()
if highlighted then
highlighted:set_edition(poll_edition(pseudorandom('acePentacles'), nil, true, true,
{
e_foil = 1,
e_holo = 1,
e_polychrome = 1
-- add modded editions somewhere
}))
end
return true
end,
}))```
we haven't added the for loop for modded editions yet but we mean. the fact that the table seemingly gives nothing at all kinda takes priority here we feel
I got an error of to big returning as nil, is this right usage?
(also probably set the pseudorandom wrong tbf but given it worked just before adding this table idk what to make of that)
did you define to_big somewhere else
if I wanted to make a Blueprint-like card, where would I want to put this stuff?
is there a way to make my VSCode detect smods for debugging?
that would be because the wiki example isn't actually correct 🙃
poll_edition(pseudorandom('acePentacles'), nil, true, true,
{
{name = 'e_foil', weight = 1,},
{name = 'e_holo', weight = 1,},
{name = 'e_polychrome', weight = 1,}
-- add modded editions somewhere
})

Oopsi
tfw making a mod
No i based it off of this #💻・modding-dev message
Where is this discussion?
for whatever reason it's not giving foils? which. no idea why that is
issues
OKAY NO ACTUALLY WE WERE JUST HAVING IMMENSE UNLUCK
you need to put this somewhere before in case talisman is not installed
to_big = to_big or function(num)
return num
end
thanks
alright. uh. now how do we for loop through all the modded editions (that aren't weight = 0) so we can insert them into the table with weight = 1.
Here
the wiki says how to get the weight IIRC
like, for i = 1, #G.P_CENTER_POOLS.Edition do???
(this doesn't check for if weight is > 0 but w/e i'm just trying to figure out the syntax. god we hate for loops)
is there a way to link my github-uploaded version of the mod to balatro? or will i have to do what i was doing before? (duplicating the changed mod files and uploading those) asking because it gets tedious, and i wish i could push what i just updated the code to github without having to just copy over the local files (for standpoint context im using github desktop)
any reason you're not using your mod folder in Mods as your local repo
....because i didnt know i could do that...
and im guessing that it'll do exactly that?
yep
you should clone your repo in your mods folder and you're pretty much good to go
hey chat, im making a playing card texture pack and the pack itself works fine it seems but specifically when i go to customize cards and select it the game crashes
[SMODS _ "src/utils.lua"]:1071 attempt to index local 'rank' (a nil value)```
Also the code after defining the variables
```SMODS.Atlas{
key = atlas_key..'_lc',
px = 71,
py = 95,
path = atlas_path,
prefix_config = {key = false},
}
if atlas_path_hc then
SMODS.Atlas{
key = atlas_key..'_hc',
px = 71,
py = 95,
path = atlas_path_hc,
prefix_config = {key = false},
}
end
for _, suit in ipairs(suits) do
SMODS.DeckSkin{
key = suit.."_skin",
suit = suit:gsub("^%l", string.upper),
ranks = ranks,
lc_atlas = atlas_key..'_lc',
hc_atlas = (atlas_path_hc and atlas_key..'_hc') or atlas_key..'_lc',
loc_txt = {
['en-us'] = description
},
posStyle = 'deck'
}
end```
well whaddya knoww
how would i set that up then
(asking someone who knows for sure so i dont risk accidentally breaking something)
first, if you're afraid of breaking something make a backup of your already functional repo somewhere else
done
since you're using github desktop you can click on file at the top left and select clone repository
at the bottom pick the path for it
should just be Balatro/Mods
and all the stuff before it ofc
the path being the ba-yeah
which would just be the one im editing right
I'd personally say uncommon simply due to the fact that getting both Egg (much less multiple) and this joker at once is likely going to require rngesus to smile upon you
this joker only appears if u have egg
and this i feel should be a rare due to how quickly it would scale
this assumes the repo in github is the most updated version of it
oh nvm then keep it where it is
my bad
well yeah i had just uploaded it
then you're done after you cloned it into your mods folder
now you just work on that local repo
hey real fast is there any code for getting the current ante level, to check and see if a certian ante has been reached for a example.
G.GAME.round_resets.ante
for some reason SMODS.Ranks[r] is nil
what is r
what is your ranks, it's probably malformed
local ranks = {"Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", 'Jack', 'Queen', "King", "Ace"}
i assume you mean the mod code
yeah that is indeed malformed, the numbered ranks just have a string of that number as key
ah darn
i copied it over from another mod so i thought that couldnt be it
thought i broke it until i realized i was on main THANK YOU very much kind soul
glad to help
every single time we've tried to write a for loop has been wrought with friction and this is no exception.
cheers both of you that was it
so it's entering the conditionals correctly, but the sprite is not being set properly, nor is the extra.suit field being set
print(card.base.suit)
if card.ability[self.key] then
if card.base.suit == "Hearts" then
card.ability[self.key].extra.suit = "Heart"
card:set_sprite_pos({x = 3, y = 5})
elseif card.base.suit == "Clubs" then
card.childrenability[self.key].extra.suit = "Club"
card:set_sprite_pos({x = 4, y = 5})
elseif card.base.suit == "Diamonds" then
card.ability[self.key].extra.suit = "Diamond"
card:set_sprite_pos({x = 5, y = 5})
elseif card.base.suit == "Spades" then
card.ability[self.key].extra.suit = "Spade"
card:set_sprite_pos({x = 6, y = 5})
end
end
end```
I have a sneaking suspicion I'm using the wrong function
i think it's time to take a step back and actually learn lua
you can use the Deck Skin Template included in the example mods
that's how i would write it. but yeah you need to learn some lua basics
local editions = {}
for _, e in ipairs(G.P_CENTER_POOLS.Edition) do
if e.weight > 0 and (not e.in_pool or e:in_pool({})) then editions[#editions+1] = { name = e.key, weight = 1 } end
end
-- use editions as an argument to poll_edition
should also check for in_pool
i did a similarly different thing, for what it looks like your trying to do
and in_shop that Eremel mentioned
I don't think that exists for Editions
otherwise you could just do get_current_pool
it's a center isn't it? I thought all centers had it
fair enough
well the wiki doesn't mention in_pool
omg youre right i forgot about those
in_pool is global to all objects that work with pools
and poll_edition doesn't even take into account the existence of in_pool
I may be struggling to find where in the documentation it says how to use this properly
How do I include the info box for a Sticker in an info_queue?
this is how I did it, lol
alright, how did it screw up this time
what am I looking at
yeah maybe i should have thought of allowing sticker objects to be passed directly into info_queue
paperclip would be your sticker
that never happened when the other objects got that support
this is just a function that returns the object to be inserted to info_queue
needed cus our stickers apply their config table to the cards
i mean it's more or less what we made generate_card_ui do for sticker badges too
but really it should be made possible to just pass the sticker in and handle it on the other end
ah I thought that was the loc_vars for the object
what's if sticker.loc_vars for
checking if the sticker has a loc_vars field defined
what if it doesn't
then there are no variables to send to the localization, so it's useless
so you only need the set and the key
yeah I guess I should've started with that
I assumed you had config in your card that you watned to show
none
okay the sticker works but not the edition
How do I add an Edition to the queue?
G.P_CENTERS.e_foil should do it
oh not ….Edition.…
No no, that was for the pools
meet the waterfall
Almost there
How do I display the Playing Card Negative Edition tooltip
instead of the Joker Negative Edition tooltip?
I cannot for the life of me figure out what the correct way to set the sprite on the fly is
key = "omnirank",
atlas = "New_Enhance",
pos = {x = 3, y = 5},
loc_txt={
name="Omnirank Card",
text = {
"Can be used",
"as any rank",
"for #1# suit"
}
},
config = {
extra = {suit = nil}
},
replace_base_card = true,
loc_vars = function(self, info_queue, center)
if center.ability[self.key] then
return {vars = {center.ability[self.key].extra.suit}}
else
return {vars = {nil}}
end
end,
set_sprites = function(self, card, front)
print(card.base.suit)
if card.ability[self.key] then
print("test")
if card.base.suit == "Hearts" then
print("test")
card.ability[self.key].extra.suit = "Heart"
card:set_sprite_pos({x = 3, y = 5})
elseif card.base.suit == "Clubs" then
card.childrenability[self.key].extra.suit = "Club"
card:set_sprite_pos({x = 4, y = 5})
elseif card.base.suit == "Diamonds" then
card.ability[self.key].extra.suit = "Diamond"
card:set_sprite_pos({x = 5, y = 5})
elseif card.base.suit == "Spades" then
card.ability[self.key].extra.suit = "Spade"
card:set_sprite_pos({x = 6, y = 5})
end
end
end
}```
but clearly this isn't it
probably self should be card
not sure what you're using self for so it's unclear
@frosty dock what about this?
that's something smods adds, try { set = 'Edition', key = 'e_negative_playing_card', vars = { 1 } }
how do I get the current scored chips and mult?
That's what I was thinking
Seems like there should be a better way tho
absolutely stuck. yes we looked up for loops. yes we looked up local variables. yes we stared at them really, really hard. no it did not help.
it crashed
self.key returns the key of the enhancement, m_reverse_omnirank
this is what smods does apparently
ask in the Steamodded thread or aure
if you're not gonna do it, at least show interest
I don't think that's the right way to access it, as I don't think self will be available
it's usually something like card.config.center.key
I don't remember the specifics
I did it this way for my custom sticker, I'm sure that that part works
@minor furnace that [self.key] thing was only for that sticker where you needed to apply config to the card
Enhancements apply their config automatically in card.ability
ah
my game crashes when this is called, is there a fix?
there wasn't any the game closed
Still crashes
I'm thinking message should not be a table
what is the crash log?
tried moving local editions being defined and got a different, still game-crashing error on using the consumable.
looks like editions don't necessarily have the weight field
try (e.weight and e.weight > 0)
so the idea is that you always have the ace at the start of a blind, without it affectinng your regular hand. nice
does temporary correctly destroy a card that was played?
finally, it works more-or-less as intended. thank goodness.
what can i do instead of this, it seems to work without the message but i would also like to keep the message.
message should be a string
remove the {}
oh or did you mean
fun
so I have this, but it's not triggering
use hand_chips and mult instead
just like so?
yup
finished the art for my first custom joker, courier joker 🙂
yea, it still crashes. I think it's because it's getting the length of an empty table?
it's still not triggering unfortunately
yes
Still no crahs log?
correct
are you sure it's that line? can it be something else?
are you able to get the lovely log? It would be in Mods > lovely > log
yes, it only crashes when thats true
where are you returning that
calulate fuction in a joker
may i see it?
alright so now it triggers and I fixed it getting stuck playing the sound eternally, now the issue is that it doesn't actually change the chips or mult values
oh what if you replace the message for "hello"
there might be an invalid character in the string
that worked
What’s the full message?
so what charaters are invald in these quotes You can’t stop the bridge between our worlds from coming, but it would be fun to watch you try!, At the end of the day, it’s just chaos, chaos, chaos!, You can run, but I’ll still be in your nightmares! (not sure if the last two have any)
I would guess at the apostrophe being a funny one
that would make sense the ones i know that work dont have those
wait one of them do, but no comas i'll try comas first
Trying to use G.localization.descriptions.Mod[id] for my mod metadata but I'm not sure how to go about it, not familiar with how localization stuff works.
Bill Cipher is that you?
yea, lol. also it was apostrophe
this?
this triggers but this doesn't perform the mult = hand_chips step at all, and I don't really get why
Aw hell, thank you
it likely just doesnt update the text
yep okay adding some update_hand_texts worked
your mod is called Joyous Spring. Is there already an Ash Blossom?
It is done 
added an .ogg file to a folder in my workspace through my file manager, but it's not popping up?
When I played Master Duel she was my pet. And a friend said in response to this, "Edgy anime boy with smol frilly cute girl, checks out"
try reresfhing it
you mean like click the refresh thing right
i did and nothing happened
i just set it up not long ago
it's the same one
the lua file
and then where i am
FIXED it it just
wasnt updating for some reason
so i jsut did it again
(like thrice)
so what's the method to destroy cards?
are you making a binding of issac balatro mod? 👀
tried to apply the same logic to this one but for some reason this one isnt returning sound? do i have to localize it?
a mod with binding of isaac in it, yes, but they wont be the whole mod
Im very interested in this!
no that should work fine, it doesn't crash?
well thats cool
there's a mod progress page here
https://discord.com/channels/1116389027176787968/1335324781528092672
no it just doesnt play the sound
do eval play_sound('hpfx_gulp') in the debugplus console
ok
well that's why it doesnt work 🤣
OK WELL HOLD ON
wait does
the key have to match the
file name
cause it doesnt..
I've been at it trying to set a sprite for like 5 hours and have not gotten any closer to figuring out how the function is supposed to work
youve gotta be kidding me
prefix my friend
whatever is in the key of the sound, you need to add your modprefix to it when you call it in your return
huh
no
ourgh
I literally only need to change the sprite the enhancement uses based on the original suit of the card, and the rest of the implementation is relatively straightforward
those look cool
Thanks! I decided to go very silly with this concept lol
essentially, they will be able to act as any rank
Currently working on a twitch integrated mod that uses follow / sub counts to give you Chips and Mult. does ANYONE know of a good / legit Twitch lib for lua? Otherwise I'm gonna have to make a seperate app to feed the values into the mod 😮
someone's asking about the same thing in Steamodded
maybe look at twitch blinds? havent used it myself but i know they have some sort of integration
but thats a shot in the dark
this is the real part I need help with. I feel comfortable in my ability to patch the hand function and the effects of the jokers this impacts, it's literally just the sprite that's causing me grief
how are you planning on patching the hand function?
I was basically going to have it iterate through every possible rank for each of the cards of this type in the hand, and then select the highest resulting hand
good luck 🙃
conceptually, it's simple. In practice, we'll see how bad it is when I look at the function
I imagine looking at how it handles wild cards will give me some sort of insight
not really
well
I'll cross that bridge when I get there, I guess
would love to solve the visual issue first though
do you know what function I would even use to set the sprite like that?
WAIT is it because it's untracked how do i track it
what's line 895
alr I'm running into this error after installing Talisman and changing my injections to handle it. It definitely has to to with the following patch, but the why is what's getting me, as a very similar (almost identical) check worked just fine before I started trying to handle Talisman
Looking at the code, it might actually be easier for me to write to loop over the rank possibilities either inside of get_poker_hand_info() around evalueate_poker_hand(), or inside of evaluate_play() around get_poker_hand_info()
instead of editing evaluate_poker_hand() function directly
oh wait
oh no
I think I might need to write a recursive function because I don't know how many of these cards will be in the hand
does anyone know how to item weight so this doesnt happen
or is it just because i debugged her in
It’s cuz u debugged
ok phew
I'm making a Joker where it will split a played High Card or Pair into equal pairs but with half the ranks
But I do want to destroy the original card before it gets split and I'm not sure where to place the card destruction line, the playCard:start_dissolve() you see there is creating ghost cards
i think if you wanna destroy cards you have to use context.destroy_card or context.destroying_card (idk which one but both work i think) and then make it so that when you want a card to be destroyed you have to have it return something
anyone know if its possible to detect if a specific joker (photograph, for example) is in your joker area
The start_dissolve function destroys a card with an animation. It’s actually quite useful
wait so it's like context.individual and i can just use context.other_card?
next(SMODS.find_card(‘j_photograph’)) (using your example of photograph)
I do want the animation but I need to fix the ghost cards issue
sweet thank you
np
You can manually flag the card like the destruction context does and it should pick it up
I haven’t tested it but I don’t see why it wouldn’t work
nope, in your if context.destroy_card and blah blah then the card is context.destroy_card
gonna try changing the sound to see if the file's the issue
bump maybe?
so the upper if statement works currently, but the bottom one doesn't, what's up with that?
so does steamodded modify the resources folder balatro has cause i feel like that's the only reason itd be looking for it in there
the sfx i mean
How do I do that
Do I just do if context.destroying_card and return true or something
polychrome, I'm just an idiot 
Is there a way to skip the splash screens? Could speed up mod prototyping...
if you have DebugPlus pressing (ctrl +) l instantly loads into the game and (ctrl +) b instantly starts a new run
also the l keybind can be used for some basic save scumming as it works in a run
Oh, DebugPlus is kind of a requirement for much modding, too. Thank you for making it!
I'm about ready to just make this four different enhancements and call it a day
So I made a joker that retriggers 7s 7 times but it doesn't do the wiggle thing, how would I make it wiggle?
remember, some of the most famous and beloved games are held together with nonsense like that, we love our coconut.jpg
real
the only reason I don't want to do it that way is that it'll clutter up the enhancements page
and be slightly less convenient to code around
what's your code
not even entirely sure how I'd implement this in a safe manner, any ideas?
I will get back to you on that
it's ugly, but it works
G.hand.highlighted[i]:set_ability("m_reverse_heart_omnirank")
elseif G.hand.highlighted[i].base.suit == "Clubs" then
G.hand.highlighted[i]:set_ability("m_reverse_clubs_omnirank")
elseif G.hand.highlighted[i].base.suit == "Diamonds" then
G.hand.highlighted[i]:set_ability("m_reverse_diamond_omnirank")
elseif G.hand.highlighted[i].base.suit == "Spades" then
G.hand.highlighted[i]:set_ability("m_reverse_spade_omnirank")
end````
probably in update check if added to deck and then check a stored value for # of jokers/slots given, then calculate and if different add the difference. Then in remove_from_deck remove that stored value from consumables
I'm mainly worried about it clashing with gaining consumable slots through other means, like vouchers
you should be able to set the sprite with card.children.center:set_sprite_pos (might be a little different for playing cards)
new to this, my joker won't appear. why?
common
actually the rarity should default to common
yeah I was able to get mine in the shop with no rarity set
mb, I accidently said shop
If I care about letting the enhancement be used to unlock Brainstorm, I need to keep everything contained within evaluate_poker_hand(), or else also edit Brainstorm's unlock condition
the game doesn't accept it as a mod in the mods tab
Is anyone who's currently in chat confident in their Talisman knowledge?
is it there but with an error?
It just isn't there, only the mods I regularly use show up
do you have a header or json metadata?
sanity check theres no space after the --- STEAMODDED HEADER
there wasn't any spaces
whats the logs look like?
Beautiful
how can we make can_use on a consumable be just. Always. trying to make a hermit/temperance-esque consumable here
the lovely tab that appears when I boot the game?
yeah or the log file in Mods > lovely > log
booting it just now:INFO - [♥] Lovely 0.7.1
INFO - [♥] Game directory is at "C:\Program Files (x86)\Steam\steamapps\common\Balatro"
INFO - [♥] Writing logs to "C:\Users\phony\AppData\Roaming\Balatro\Mods\lovely\log"
INFO - [♥] Using mod directory at "C:\Users\phony\AppData\Roaming\Balatro\Mods"
INFO - [♥] Found .lovelyignore in 'Multiplayer-beta-0.1.7.9', skipping it.
WARN - [♥] Unknown key patches.47.?.match_indent found in patch file at "C:\Users\phony\AppData\Roaming\Balatro\Mods\smods-old-calc\lovely\fixes.toml", ignoring it
INFO - [♥] Cleaning up dumps directory at "C:\Users\phony\AppData\Roaming\Balatro\Mods\lovely\dump"
INFO - [♥] Initialization complete in 95ms
INFO - [♥] Applied 1 patch to 'conf.lua'
INFO - [♥] Applied 23 patches to 'main.lua'
INFO - [♥] Applied 12 patches to 'engine/controller.lua'
INFO - [♥] Applied 11 patches to 'back.lua'
INFO - [♥] Applied 5 patches to 'tag.lua'
INFO - [♥] Applied 1 patch to 'engine/moveable.lua'
INFO - [♥] Applied 2 patches to 'engine/sprite.lua'
INFO - [♥] Applied 2 patches to 'engine/animatedsprite.lua'
INFO - [♥] Applied 41 patches to 'functions/misc_functions.lua'
INFO - [♥] Applied 29 patches to 'game.lua'
INFO - [♥] Applied 3 patches to 'globals.lua'
INFO - [♥] Applied 3 patches to 'engine/ui.lua'
INFO - [♥] Applied 75 patches to 'functions/UI_definitions.lua'
WARN - [♥] Pattern 'end\n end\n\n }) end\n' on target 'functions/state_events.lua' for pattern patch from smods-old-calc\lovely\back.toml resulted in no matches
INFO - [♥] Applied 58 patches to 'functions/state_events.lua'
WARN - [♥] Regex '(?<indent>[\t ]*)if G\.F_NO_ACHIEVEMENTS then return end\n\n[\s\S]{4}--\|FROM LOCAL SETTINGS FILE' on target 'functions/common_events.lua' for regex patch from smods-old-calc\lovely\achievements.toml resulted in no matches
there should be more after that
oh
why is this seemingly unreachable?
"test" is never printing
INFO - [G] 2025-02-20 23:07:51 :: WARN :: Loader :: Mod file main.lua is missing required header component: author
Your author is malformed
needs [] brackets around it
oh
okay so I'm making a deck that destroys a card then adds a card every hand
I cant make it actually delete the card, so I get 53/52 in the deck
how do i get this fixed? I've already tried putting
return {
remove = true,
}
end```
like, everywhere
That worked, thanks
i'm at such a loss here lol. seemingly something in context.end_of_round and context.cardarea == G.jokers is just returning false but... why could that possibly happen lol?
try printing context
like, print(context) somewhere? or eval'ing that? (debugplus is awesome as hell btw)
we're fairly confident that we set the for loop up right, but we cannot tell where the heck our syntax error is??
Now i am getting the error "Failed to collect file data for Atlas total_Jokers"
`SMODS.Atlas{
key = 'Jokers',
path = 'Jokers.png',
px = 71,
py = 95
}
SMODS.Joker{
key = 'piggy_bank',
loc_txt = {
name = 'Piggy Bank',
text = {
'Earn {C:money}$1{} at end of round',
'for every {C:attention}face{} card',
'that gets destroyed'
}
},
atlas = 'Jokers',
pos = {x = 0, y = 0}
}
------------MOD CODE END----------------------`
print context above the if statment
Uhg why th does the createtextinput function count zeros as Os???
It's very frustrating to work with
Are there any common fixes for this?
what should i try and look for there? it throws out a huge table
okay, we figured out the for loop (🎉💥🎊), the only issue is uh. The instant cash gain didn't work for whatever reason. how do we give Instant Money?
calc_dollar_bonus = function(self, card)
local bonus = card.ability.extra.money
if bonus > 0 then return bonus
end
end
end```
please I beg of you use an IDE that can tell you where syntax errors are 🙏
To give instant money use ease_dollars(amount of money)
For example ease_dollars(5) gives $5
just found out shift-0 works
calc_dollar_bonus is for money that gets added to the end of round screen
can't you also return { dollars = (amount) }?
my toxic pc using trait is "why use many program when one program do trick". The All Solving Notepad++
consumables can't
ohh, alright
and consumables can't do this either i don't think
could be wrong
wait maybe it doesn't 😭
Please make your "one program do trick" Visual Studio Code, at least
fixed lol - might be my stupidest modding moment. i set the calculate function's params to self, context, card instead of self, card, context... so every single time i tried referencing context it thought i meant this card 😭
god i was so convinced my entire structure had somehow fucked up
Can't figure out my issue
It's crashing the game
oh
is there a way to detect if the player is using a specific deck skin?
im trying to make a joker that has a chance to give money if hte first hand is a single stone card and then destroys the card, but the code i have just does nothing. anyone that knows what's going on?
oh oops
i did G.GAME.probabilities instead of G.GAME.probabilities.normal
I think it would have crashed if that was the issue
I don't think context.before has a context.other_card, ever
so that's why it doesn't
oh ok
you can access the other card by doing context.full_hand[1]
Since you guarantee that there is only one
thanks
Also you can just return { dollars = card.ability.extra.dollars }
and I don't think your removing part of the code will run
or rather, do anything
for destroying cards you want to use the context.destroy_card context
how do i use that? i tried a couple things with it a bit ago but i didn't understand how to use it
in context.destroy_card you can return { remove = true } and the card will be destroyed after scoring is finished
much like how glass cards break
you will want to do smt like if context.destroy_card and context.cardarea == G.play
Eta: recursive function nearly complete, I just need to find a means to compare the outputs of two different calls to evaluate_poker_hand()
is there not a context for entering the shop? there is for ending the shop and rerolling the shop
oof
why not...
I can provide you with a lovely patch I made for it if you want
oh that would be nice to have
I guess no base game effects are dependent on it
wouldn't end_of_round do that? or is that before the payout section
that's before payout
dang
I specifically wanna do stuff to the shop items themselves
when do the "free X joker in shop" tags trigger
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0
# Before any of these values are modified we store them for later use
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = "if not shop_exists then"
position = "before"
match_indent = true
payload = '''
local paperback_load_jokers = G.load_shop_jokers
local paperback_load_vouchers = G.load_shop_vouchers
local paperback_load_boosters = G.load_shop_booster
'''
# After the shop is created, trigger a new context for entering shop, which
# includes information about what items were created
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = "G.CONTROLLER:snap_to({node = G.shop:get_UIE_by_ID('next_round_button')})"
position = "before"
match_indent = true
payload = '''
SMODS.calculate_context({
paperback = {
entering_shop = true,
create_jokers = not paperback_load_jokers,
create_vouchers = not paperback_load_vouchers,
create_boosters = not paperback_load_boosters
}
})
'''
change it however you feel like it, paperback is the mod id and is used a lot to prevent any conflicts
the create_x variables mean "was X just spawned in the shop (true) or was it loaded from the save file (false)"
tags have their own contexts from what I see, I'm making one of those as we speak lol
rip
should probably create a tooltip for digital roots
Zero Escape mention???
thanks! so it'd just be if context.entering_shop right?
oh god, roots
with the way it is written there it'd be if context.paperback and context.paperback.entering_shop but if you rewrite it to remove that paperback table you can do that
ah I see
this is art
there are 999 spoilers on the cards ||the Queen is the q door, and the 5 card does have an upside-down Kanny behind Junpei||
thank you for spoiler tagging I actually have not played the games yet 💀 I do plan to though
I chose clubs because high contrast is a similar blue to the LEDs on the bracelets
I'm gonna lose it
?
is this the right place to figure out why i can't get the brainstorm mod to work?
I hope you have friends who have impressed upon you the importance of playing the DS version
I have the context.destroy_card, I have the remove = true, this is like endlessly rerolling the shop for that 1 Joker you're desperate for
this channel is more for help with making mods
but what's your issue exactly?
this all looks wrong
are you making a custom deck?
not toally sure? i have the lovely injector installed, i have the most current version of steam modded, and the brainstorm mod loads. However every time i hit ctl a for the mod too reroll it crashes immediately
where would be the right channel for advice?
could you send a screenshot of the crash?
yeah 😔 I'm frankensteining the grim/incantation/etc code trying to get it to do something right
It makes the card just fine, it even "destroys" the card from the played hand, it just also leaves a void card in the deck, hence 53/52
yeah that's the problem with manually destroying cards like that
Also you don't have to add a check for the name of your deck
there a function I'm supposed to be running instead?
in reality all you need to destroy cards is
if context.destroy_card then
return { remove = true }
end
that will destroy every single card
that should be your entire calculate function to start with
then you can start filtering cards out
uhh I'm not familiar with MacOS, you should send this crash log to #⚙・modding-general
and hope someone else can help you out
aight, thank you
I really need to get in the habit of looking at the dump files any time I want to write a patch
and not the base game files
i agree
you agree that I need to do that?
yes
yeah
1v1 boss blind no discards legendaries only
I am in luck, it appears that get_poker_hands_info() remains untouched
1 3 3 7?
yea
leet final destination is a crazy concept
that's Melee FD specifically, isn't it
Melee's the 1v1 no items fox only final destination game
why is it when I try to do the Blue Seal effect, I get this error?
yeah
so true
ty
Genuinely Ultimate is the best game in the series
when calling card_eval_status_text pass card (or whatever you named your 2nd parameter in the calculate function) instead of self
progress has been made, I have created an infinite loop of nothing but printing checks 
I wish they added the like, 9 stages from the series that aren't in Ultimate
the only one I know off the top of my head is Pokefloats
WHY DID THEY NOT ADD POKEFLOATS
I'm still very happy with the state of the game though
and they gave us the funny plant gang so all is right in the world
Pokefloats
Pac-Maze
Ice Mountain (Melee)
Jungle Hijinx
That one Starfox stage from Wii U that's like, an entire battle
Rainbow Road 3DS
Mushroomy Kingdom
Those are the ones I know of off the top of my head
honestly i think ultimate still had a lot of missed potential character-wise
anything could have been better than byleth
hmm, why wouldn't this set all items in shop to $0?
because the switch isnt powerful enough to run a gamecube stage
genuinely newcomers-wise i think ultimate is one of the worst
I kinda liked byleth though
you say that as if Alear would've been better
they fumbled so fucking hard
Look at what the set_cost function actually does (spoiler: it calculates the cost of the card, doesn't set it to whatever you want)
90% of the DLC was fucking swords
but this is unrelated to current discussion i will step away
*anything fire emblem
ah
also you should've gotten rid of the paperback thing in the context
k rool and inkling were peak though
and was anyone else?
Sora
uhhh
sora sucked
Pro tip, set v.ability.couponed = true and then call set_cost, they will all be free
As much as I love Kingdom Hearts, I do not enjoy playing Sora in Smash
I would've preferred Roxas but recognize Sora was always gonna be first
yeah I'll figure it out, I'm just testing it right now
still salty about the sora reveal trailer
thank you!
(just learned that btw) Lol
such a lame predictable final character. pretending to push boundaries while picking the safest character in existence
sora should not have been last. if anything it should have been steve and have the order swapped around
predictable doesn't necessarily mean bad
it is very telling to me that the only playable indie rep in smash is minecraft, which is literally the least indie "indie" game of all time
do not get me started on steve 💀
Is there a better way of making a joker do something every hand other than making it check if played hand contains a high card?
oh my god sora haters 
wait come again
I'm a Sora defender
I generally don't consider Minecraft to be indie anymore
what's your code?
give me Hat Kid
but it sounds like what you want is if context.joker_main
I was writing a function for my omnirank cards, once upon a time here
I made a joker that upgrades/does something every hand by making it do the thing of "if played hand contains a high card" and I wanted to know if that was the only way or if there were better ways
Good to know
can also do context.before and context.main_eval or replace before with after
if you want it to happen before/after the hand is scored
anywho, I'll ask again, if there's a way to detect if the player is using a specific deck skin
for example, runner in the base game uses context.before (to upgrade)
Interesting
if there isn't by default. you can definitely write a patch for it
but I have to imagine there's a field for it somewhere
I should probably make it do the buffing itself after it does the giving the mult part tbh
How come my code repeats twice?
The way I balanced it is by making it steal some of your money each time it buffs itself
That is a good question
if context.individual and context.cardarea == G.play and context.other_card.seal then
if pseudoseed('rgmc_chickenpox') > (G.GAME.probabilities.normal * card.ability.extra.chance) / card.ability.extra.denom then
local temp_hand, finished = {}, false
for i = 1, #G.hand.cards do temp_hand[#temp_hand + 1] = G.hand.cards[i] end
pseudoshuffle(temp_hand, pseudoseed('rgmc_chickenpox'))
for i = 1, #temp_hand do
if temp_hand[i] ~= context.other_card and temp_hand[i].seal == nil then
temp_hand[i]:set_seal(context.other_card.seal, true, true)
G.E_MANAGER:add_event(Event({trigger = 'immediate', func = function()
play_sound('tarot2', 0.76, 0.4)
temp_hand[i]:juice_up(0.5, 0.7)
return true end }))
break
end
end
end
end
end```
That I am not sure I'm qualified to answer tbh
looks like it's stored there
in G.SETTINGS.CUSTOM_DECK
It's the joker calculate code that calculates twice for some reason
and each suit has its own skin
yeah this is right. Found it in globals.lua too
how did you get this console looking thing
context.individual gets called once for every scored card
Ohhhh
Am I safe to directly affect card_limit instead of using the :change_size() functions? 
...even booster packs sometimes are a card. You just need to point to the right one.
hm
At least, that's what I think. 🍞
which version of Lua is Balatro written in (namely, can I do a % operator?)
lua 5.1
so barely able to do % lol
% works in my experience
odd todd and even steven use it to find if a card is odd/even, and I used similar functionality for one of my own jokers
I fear I have cooked (currently untested)
if next(current_hand["Flush Five"]) then return current_hand
elseif next(best_hand["Flush Five"]) then return best_hand
elseif next(current_hand["Flush House"]) then return current_hand
elseif next(best_hand["Flush House"]) then return best_hand
elseif next(current_hand["Five of a Kind"]) then return current_hand
elseif next(best_hand["Five of a Kind"]) then return best_hand
elseif next(current_hand["Straight Flush"]) then return current_hand
elseif next(best_hand["Straight Flush"]) then return best_hand
elseif next(current_hand["Four of a Kind"]) then return current_hand
elseif next(best_hand["Four of a Kind"]) then return best_hand
elseif next(current_hand["Full House"]) then return current_hand
elseif next(best_hand["Full House"]) then return best_hand
elseif next(current_hand["Flush"]) then return current_hand
elseif next(best_hand["Flush"]) then return best_hand
elseif next(current_hand["Straight"]) then return current_hand
elseif next(best_hand["Straight"]) then return best_hand
elseif next(current_hand["Three of a Kind"]) then return current_hand
elseif next(best_hand["Three of a Kind"]) then return best_hand
elseif next(current_hand["Two Pair"]) then return current_hand
elseif next(best_hand["Two Pair"]) then return best_hand
elseif next(current_hand["Pair"]) then return current_hand
elseif next(best_hand["Pair"]) then return best_hand
elseif next(current_hand["High Card"]) then return current_hand
elseif next(best_hand["High Card"]) then return best_hand
end
end```
Also clearly poker hands are sorted already ingame
The run info menu has them sorted
So you just need to find a way to access that order
i've done worse to get this guy working
I presume it's comparing base mult and base chips tho
there is 100% a better way to do this, but I needed to compare the outputs of two different calls to evaluate_poker_hand()
sounds like something he would actually do
uses black hole
it doesnt work like that lol
Compare base chips and mult
Of the hand
black hole is excluded as it's technically a spectral card
Hands are stored in G.GAME.hands
unfortunate
basically, if you upgrade a full house, it will upgrade high card, pairs, two pairs, three of a kind i suppose?
my brother wanted to make, like, a joker that would make it so all relevant hands' scores would be added together before the cards were scored.
yeah that's about right
sounds like you took the same concept in a different direction
would it crash if u use a planet card from another mod 😭
no it would just only upgrade high card
I needed to compare two of these things against each other
loop through context.poker_hands call level_up_hand on each key
i see
I just made sure as a fallback to always upgrade high card anyways
how does it handle the triple-hand planets from Cryptid?
me when I make a mod that allows playing 0 cards:
Add skip button to balatro
For context, this is real code written by the real dev of this game
skip turn (zero benefit)
at that point, you should probably hard-code so that it will only work for certain planet cards 😭
there's zero way it crashes, it will just always fall back to high card so it retains at least some functionality
i don’t know how to tell you this
for those keybinds