#💻・modding-dev
1 messages · Page 60 of 1
I think that one is stat related
Could always lovely inject your own G.GAME spectral count similar to tarot
ok no i tested it, replacing G.GAME.consumeable_usage_total.tarot with G.GAME.consumeable_usage_total.spectral just works
oh never mind then, neat!
Ah ok lol
why is my joker so small?
You probably have 1x sized sprites in the 2x flder.
wee joker
When using context.open_booster , can i instead specify a specific type of booster?
Well, either the information needs to be passed to the context or you need to verify what type of booster it inside the calculation function
The might be doable depending on how the timing works, since Boosters have their own state, but modded Boosters have their own state, you perhaps something similar could work
Yes, would I need to remake the whole sprite or is there a program to just make it… bigger?
there are 3 different types i would need to look for, normal, jumbo and mega, which complicates things more
I think there's a few programs around that do it for you, I think there's one in Cryptid? I haven't touched any myself, in a lot of art programs, ou can also export at 200%, and ideally use nearest neighbor scaling if you can.
Found the post I was thinking of with some programs you could look at.
https://discord.com/channels/1116389027176787968/1269501493690503192
Perfect thank you
If you don’t mind me asking where did you learn so much about Balatro coding, I’ve seen you made a guide for making mods also
What’s the effect you’re trying to achieve?
Using a Spectral card increases the joker's XMult. Skipping Spectral packs resets Jokers XMult to 1x (or reduces XMult in some way)
Then why does the size matter?
I also don’t think the downside is needed
I guess it doesn't, im not sure how to check for a type of booster. Im looking through the game files, not exactly sure what im looking for
In your case you could just check the current state and see if it’s the Spectral Pack state probably
I'm pretty sure it's just G.STATE == G.STATES.SPECTRAL_PACK
Outside of timing issues this should work
Question: can controllers drag cards?
Ok, and I like the idea of the downside bc opening a Spectral pack becomes a more intense gamble, you might have to take things that hurt your build or get penalized the problem is there are times where you literally HAVE to skip so maybe a downside is uneeded idk its just a fun idea
The other two issues is Ghost Deck and the voucher that adds Spectrals to Arcana packs. Having either of those helps mitigate the downside significantly. But maybe thats not a bad thing
Yes
Not really an issue
I sometimes play with a controller and i actually noticed certain mods (Fusion and Evolution Jokers) cannot evolve or fuse unless using a mouse
I think its worth considering a little bc I have the XMult sitting at a whopping +0.5x per Spectral card used. My thought was to have players greed there way into making terrible choices. Weighing a new type of risk.
That feels too low
I was thinking anywhere between 0.5x to 1x
What do you think
I think 0.75X with downsides would be 👍 Gives cards like Seance, Sixth Sense more utility too.
Opening one Mega Spectral Pack would give you +1.5X but you HAVE to take whatever nonsense is inside lol
After I finish this Joker I will have 6 Completed, then my wife will put some art together for them. And then I think thats good enough to release a little mini Jokers Pack 🔥
They feel rare enough I think X1
Really?? I mean, i get your probable mindset was to compare availability of Playing cards for Hologram vs availability of Spectral cards for this Joker. Idk. I will code it for +1X and test it from there 👍 You're probably right.
how do you apply code to editions? this doesn't work
calculate = function(self, context)
if context.edition or (context.cardarea == G.play and self.playing_card) then
ease_dollars(self.config.money)
card_eval_status_text(self, 'dollars', self.config.money)
end
end
this is what my money edition does
edition calculation is a little scuffed iirc
oh hey it's powered by immolate
it turns out in LOVE you can just load DLL files and... run code from them
so we fully Immolated Brainstorm
this did not appear to work
did it just not do anything?
correct
does your edition load okay?
yea, it loads in game and applies to cards just fine
it's hardcoded to not work with custom consumable types :P
and idk how I'm going to work with in_pool
try changing money in your config to p_dollars
ignore the calculate function
I think I built p_dollars into standard evaluation
that works, does there happen to be one for x_chips or will I have to add that myself?
Is there a way to permanently add mult to a card, like how Hiker permanently adds chips?
i'm trying to port a custom hand to the new steamodded format and having some trouble... playing the hand works great, but playing any non-scoring cards along with the hand immediately crashes the game in G.FUNCS.evaluate_play trying to sort the scoring_hand table:
i'll make a commit of my current file and upload it somewhere
specifically, i'm testing making a 3/4 card hand (get_smallfib function) with one unscored card played
fixed the issue :D
we love self inserts
did support for multi rank cards get added?
I'm making mod's config pages in steamodded
menu, why can't I creat text at last page?
text needs to be in a text node
if it's just text w/o any configs, it would probably make more sense to put it into a custom tab instead of config
still not displaying, i compared with steamo ui, but no reason found
how can i put it into a custom tab?
text nodes need a defined scale
total xmult is missing 
SMODS.current_mod.extra_tabs = function()
it needs to return a table of label and tab_definition_function
or a table of such tables if it's multiple custom tabs
oh that is the poin! I was stupid to delete it.
so i'm trying to fix this version of reshuffled as an experiment, since the planet retextures aren't loading in and i'm not sure what to do since putting in sprite_planet:register() didn't seem to be the answer
or planets register, that didn't either
hey uuh- iguess my game doesn't want to be modded anymore?
I feel like complete rewrite would be the better thing to do
antivirus deleted version.dll
what do you mean by that?
unless you're trying to make it work for smods 0.9.8, rewriting it to follow 1.0.0 format would be better
nope, the directory
alright
ahhhh that's why
yeah i think the mod hasn't been updated in a while
dangit, its not downloading even if i am allowing it
pretty sure crim is waiting on official mod tools or something
who knows maybe that's localthunk's second card
smods 1.0.0 is backwards compatible with 0.9.8 but making things use the 1.0.0 methods instead of relying on backcompat is more reliable
wierd though because the other consumables work and they're all on the same spritesheet
it's JUST planets for some reason
everything else works fine somehow
also one last thing, where can i get the docs for 1.0.0's code
thank you
so how do i replace the 8bitdeck.png with 8bitdeck-PAC.png?
just raw_key = true
below the code?
as one of the elements of the table
so SMODS.Atlas { key = "cards_1", path = "8BitDeck-PAC.png", px = 71, py = 95, raw_key = true }
nope, still doesn't seem to work, the cards are still the same
and yes the mod is on, i checked
oh its because the key for the cards is not the file name
@lethal belfry try swapping the key to cards_1 like this
open the game as an archive, go to game.lua and they're at line 1014
ahhh, there you are
some entries will need to have a bunch of extra stuff in their tables bcos they're different
for example the blind chips are not asset_atlas and instead are animation_atlas
animated ones yeah, THAT'S in the guide
The art for one of my Jokers would ideally have the card bigger than 71x95. Is this possible? Anything i need to keep in mind when implementing it?
it'll need an atlas with px*py bigger than 71x95
but it works! i made a mod! i am happy
Thats all? I figured there were some kind of sizing rules id need to follow without breaking something
if i want to update steammodded do i just replace "steammodded-main" in mods?
do you want it to appear bigger than the other cards?
or do i need to do something else?
yes
ahhh i could do that
hmm nice
wouldnt using a bigger atlas achieve that?
but yeah you can resize in code
it may or may not have crashed? :)
ah
Yes, I want to put a card case around a regular sized joker it, like a sleeve for trading cards
you need to resize it in the code then
card.T.w = G.CARD_W*size```
like how wee_joker works
Oh ok
it shows this on top
what is inside steamodded folder
the entire folder
have you dropped anything else in here?
not in the steammodded file no
did you update from 0.9.8?
.
yayyyy i know how to do a retexture now!
iirc for the playing cards there should be a way of adding custom textures that doesn't override the vanilla ones
what do you mean?
it was in development, but it was heavily unfinished and removed now
I'm thinking of rewriting it as it's own thing tbh
1.0.0-alpha-0807c also brb i gtg for dinner
unfortunate
well nevermind-- i'm still not that good at modding
still got no idea what went wrong with it
what's the problem
it is crashing
and what's the crash
nevermind i found it! it was a single comma
💥
This is a crash from my example jokers mod that's in the examples folder, and I have no idea why it'd be even registering as a mod here. Did you move it out of the example mods folder, by any chance?
Or, if you used the example mod as a base for your mod, you might want to try changing the prefix at the top?
maybe this old mod just... isn't gonna work with this new version of mod loader and the game
at least i got my thing working
what isn't working?
i tried to recode reshuffled from 0.9.8 to 1.0.0 alpha but it still seems to have some errors
not sure if due to my lack of knowledge about modding or just 1.0.1f making things weird for prior mods
but what specifically isnt working
all planet cards, some spectral cards, and the blinds though i'm pretty sure i just messed up something about animated sprites there
if you wanna see, here's the zip for it. i worked on the mod but it's not mine
alr i am back, could anyone help me with updating steammodded :>
whatever the case it doesn't seem to do anything, deleted or not
for planes and spectrals they need an atlas for Planet and Spectral respectively
the .lovelyignore turns the mod on and off
what really? okay lemme try that then
op wow you were right
now all that's left is the blind chips
key = "blind_chips",
path = "RS-BlindChips.png",
px = 34,
py = 34,
raw_key = true,
asset_table = 'ANIMATION_ATLAS',
frames = 21```
not sure what's wrong here though
it's atlas table... not asset...
oh apparently you should use prefix_config = { key = false }, instead of raw_key = true too
i found the crash, it was my own wrong doing 🤦♂️
yeah someone told me to do that before
only some minor issues with the mod... seals aren't loading and soul's top layer isn't working
which i have no idea what atlas key those would be
🤷♂️
I can take a look a little later if no-one has helped
got to go feed the family now though!
well good luck on that!
Question, does Familiar, Grim, Incantation, Sigil, and Ouija get replaced for you?
i fixed it, they all get replaced now
only those two things
don't change textures for me
also i am going to slepp. it is 12:30am
Odd. Those 5 spectrals don't want to get replaced at all for me, and I assumed it was a symptom of SMODS taking ownership over those 5, as well as Strength from the tarots.
Other than that, I've looked around for the seal/soul issue as well, and don't know what it is. But I assume it's the same issue, because the seals and soul sprite also use the centers atlas.
Rest well.
yeah might be something to do with steamodded just being in alpha, maybe they overlooked seals and soul
they aren't the biggest sprites
i am having a stroke trying to understand altases, anybody got tips?
Which part is confusing?
i am trying to make my first own joker
or mod in general
and i just cannot wrap my head around the atlas
like why does this happen?!
i know it fialed to collect the png but why would it crash then >_<
Likely incorrect atlas names/positions, it doesn't have anything to load.
It should be in the assets folder, and then the 1x and 2x folders should have a .png of your sprite with the same exact name, with 2x being two times the size of 1x.
the x and y values are the positions of the atlas cells not the px coordinates. that's not really explained anywhere and took me a while to figure it out
so i was correct, atlas is for sprites
alright
Yep the atlas basically tells the game to load that spritesheet
Did you set the atlas key as Spectral?
is it ok to have the files like this? assets > 1x + 2x > type of thing (aka if joker or tarrot in future) > png's
Yeah, and all the other spectrals do get replaced.
Huh strange
No, everything needs to be directly in 1x/2x,
You can probably do nested folders, it just seems a bit odd when you can just put all your sprites on one sprite sheet
Really? Thought it wouldn't be found like that, but yeah, just make them all separated into 71 by 95 spaces, you can look at any of the base game textures to see how they do it.
I would assume as long as you get the path correct it’ll work
Here's a grid I use to line things up in an atlas easily.
Oh, like if it was "joker/shard1.png" kind of thing? Would make sense.
dangit, so no folder in 1x or 2x? :I
i'll try smth like that :)
:OOOO
151 pages
dangit-
i tried to look at it once i unlocked it and i crashed :)
hmm atlas is a nil value
folders inside 1x or 2x should be no issue
but this worked :D
oh-
it kinda worked tho
all i did is add: atlas=nil,
Why would you do that
You need to tell it to use your atlas
hmm okey
What blank joker template?
its exactly the same as what it is called
i think it actually is for a older version-?
This thing? #1227289111862448290 message
yea that thing
Extremely outdated, yeah.
also it appears that the "next()" doesn't like to work "(table expected, got boolean)"
Show the full line?
Try capitalizing Pair?
alright
didn't work
idk if it is handy but when i hover over the text inside the brackets i get this message
Show the crash screen?
Just the entire crash screen.
next(context.poker_hands) == ‘Pair’
Or next(context.poker_hands['Pair']), it's completely on me, apparently I fixed that in my version of the vanilla examples mod but forgot to upload it to the PR?
yeah it's that one
wow thanks
@frosty dock Made a quick PR for whenever you feel like merging it.
whots a pr?
hmm oki
@wintry solar have you got any experience using shaders with UI elements?
look at how flames shader is applied
Oh I assumed that was just a sprite
Yeah that's not what I want, I'm talking about a UI element.
I don't know too much about how ui elements work, but that might not be possible
I don't think a sprite over the top would be enough.
Because I want to pass in transparency of the UI element.
to create a blur effect.
It is possible, it's just whether I would have to rewirte a massive chunk of the game's ui engine or not.
ye I mean within the current engine, lol
what exactly are you trying to do tho
if ui element is static you can probably create blur effect by applying shader to the entire screen
I'm trying to make a Joker that applies an effect to a playing card if it is played immediately after it is drawn. In my head, that would require me to have a specific variable on the card itself that applies only to this joker effect. Is there a way to give playing cards an extra variable for this situation?
I want to add a blur shader to a UI element that has a translucent background.
ah
i.e. glass-morphism
I mean I could probably lobotomise a sprite and use that as the background -- with the shader applied.
and then have an invisible UI element node on top of that.
it won't work if you apply shader to the sprite
Because shader will only receive pixels of the sprite
I can just pass the pixels from behind the sprite I think
I don't think that's easily doable
I mean hm
might be doable cuz sprite receives screen pos as well
I mean shader
Yeah exactly
but I haven't really worked with shaders that much, I think there should be a way to pass the main canvas into shader
like what?
Doesn't the game have a particle shader?
It has particles
But I’m thinking of making cards emit colored particles
I couldn’t find an easy illustration of what I want, but Hearthstone had them. These are more smoky than anything, but something like this https://www.youtube.com/shorts/BQRahXBNs9U
Stream: https://www.twitch.tv/markmckz
Twitter: https://twitter.com/markmckz
Discord: https://discord.gg/Mup3kRj
Decklists: https://outof.cards/members/markmckz/decks
#Hearthstone #MarkMcKz
I feel like your best bet is to just use the love2d particle system?
It has like teal(?) particles coming from the card in the bottom right
Aren’t those the square ones Balatro uses?
You can customize it
Can you control the color of each pixel of the particle?
hm like these?
been trying to actually get my own sprite to show but:
What's your pos set to?
That would access the second horizontal slot at the very top of your atlas, which I assume is empty.
i have no idea what that means :,)
Double checking, I saw the mvan prefix, did you actually read through the example joker mod and look at the atlas?
i read most of the text in the example
ooh
i see the pickture now
i litterally just put them on a row
Yeah.
?
Other corner 😭
?
i'll try to put them next to eachother tmr
You could maybe look at this post. https://discord.com/channels/1116389027176787968/1269501493690503192
When you make your first batch of Jokers in individual files then realize you have to learn how to combine them into one file ☠️
I was under the impression that I could just leave them separated but Nope! Back to the damn drawing board.
You just need to load them.
rip
I mean i want to publish/release the jokers (soon) but they currently load in multiple mod folders, they need to be combined into one file. Which means i have to reformat everything
I was under the impression i could just place them all in one folder and be done but lol nope
Not that simple
actually, i removed the "pos" and it actually showed
so i think imma keep it seperete picktures instead of one big sprite
I think you might be murdering the code from the sounds of what you've been doing, can you show the code?
When it’s not present it defaults to SMODS.Joker’s pos, which is {x=0, y=0}
Alright, it's a lot better, I was expecting a lot of remnants from the very outdated joker template.
hmm
you can use SMODS.load_file('folder/filename.lua')()
i did actually copy it from the steammodded
but i tought the template could help in some parts
but it being outdated just doesn't make it helpfull
hmm alrighty
Yeah, looks like it should be completely fine. I do think just having everything on the same atlas is a lot more convenient, otherwise you're going to have to make another atlas for each individual joker instead of just setting pos = {x = 1, y = 0} and so on, but it is up to you.
i'll look at how to make a atlas tmr, but i could technically make a new text file for all the atlases couldn't i? xD
but gtg now gn!
I'm not aware of whether you can apply a shader to a ui element or not, but would having a sprite in an object and applying the shader to that not work?
thats possible with shaders, but it would have to be screen shader, not like edition (if you want it to spread more around the card
tho I'm not that good yet to create smth like that

Is there a way for a Joker to detect when Wheel of Fortune properly activates? I know there's a using_consumeable context and I could probably check if Wheel is USED, but I specifically wanna check for when it's successful.
sadge </3
Or take ownership
oh, also, while I'm here
how do I force a Joker to use a specific shader, like Hologram has?
cuz when I put this at the bottom of my mod file, it works, but also seems to cause a bunch of small visual bugs, like all the Buy and Sell buttons being behind other cards
I thought shaders could draw outside of the card. I think that’s what I understood from what @wintry solar told me
It won’t help with your issue but use keys not names
Or is that like an Enhancement
I think it should probably still use keys but I’m not sure how they work quite yet
There really needs to be a draw function in SMODS
to do what?
So center have a more convenient way to draw shaders onto themselves like Invis Joker.
It should just be one lovely inject into the section that Invis Joker does it.
is there any roundabout way to do it anyway?
Of course
You can still just hook the function but unless you additionally specify when through the draw layer you risk visual glitches.
Alright, so how would I improve the code I posted above then?
Sorry if I'm asking too many questions or anythin', Lua is just still very new to me lol
Double checked the context stuff, apparently context.using_consumeable also sends the consumeable card itself as context.consumeable, so you could have if context.using_consumeable and context.consumeable.ability.name == "The Wheel of Fortune" then to check for the wheel.
That's not what I was asking about but I appreciate it
in future its better if u copy and paste the code in chat, it makes it easier for people to help. U can surround the code withto syntax highlight it
omg
Just remembered you asking this, though reading it again, does say properly activates, which I missed.
function Card:draw(layer)
local card_draw_ret_val = card_draw_ref(self)
if self.ability.name == 'j_csil_undertaleswitch' then
self.children.center:draw_shader('voucher', nil, self.ARGS.send_to_shader)
end
return card_draw_ret_val
end```
like this?
you'll want to use lovely injection
yeah :D
let's gooo
but yeah you'll want to use lovely injection, so you can inject specifically into the right place inside the draw func
I've only done work within the actual SMODS classes, so I have never done any Lovely injection, is there a guide/tutorial for doing that
most of what I learned has been through using the search feature within this discord lol
nope
i'll write an example rq
alright I really appreciate it <3
# lovely.toml
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = "if self.ability.name == 'Invisible Joker' and (self.config.center.discovered or self.bypass_discovery_center) then"
position = "before"
payload = '''
if self.ability.name == 'j_csil_undertaleswitch' then
self.children.center:draw_shader('voucher', nil, self.ARGS.send_to_shader)
end
'''
match_indent = true
overwrite = false
ah thank you thank you!!
where would I put this exactly? Within my main script or do I need to make another script specifically for injections
seperate file called lovely.toml
did I do it right? it doesn't seem to be working
oh oopsie
j_csil_undertaleswitch should be the name of your joker
like "Invisible Joker"
hmmm that didn't seem to work either..
i'm confused because the code makes sense to my brain so i dunno what the issue would be
This worked right?
Yeah it did apply the voucher shader to the card, all things considered
Ok maybe I'm wrong with the switching to the name thing.
j_csil_undertaleswitch is probably correct. Although I'm not sure why invis is not j_invisible etc
if you remove the if statement does every card become shaded?
nope
if I change j_csil_undertaleswitch to any other joker that doesn't work either
so I assume it's just not actually being injected at all
Oh you can check if it's being injected through the console
unless you have other mods that inject stuff installed
in which case you'll have to go to your mod directory, locate lovely, go to dumps, card.lua and search for the code you injected.
yeah it's not showing up in the console and I don't see my code in the dump
however uhhh... is it supposed to inject to GAME.LUA and not CARD.LUA?
because I'm not seeing the og code we're supposed to be targeting in there
What is "juiced_up" method
oh my god sorry yeah
im tired 😭
0OSDNFA[IOSDNFOASDNF SORRY 😭
undertale is now real
YAY!!!
makes the cards do a funny wiggle
great, how do I make a mod that disables it
Because my game is crashing because god knows how some combination of mods managed to break the method nil
you can just Reduce Motion in settings, I don't think you need a mod for that
Alright let me try that
why do moding channels dont show up by default for me in the server? stumbled via search, are there other hidden channels with cool stuff? havent used discord in a whiiile
maybe instead of breaking your game more, try fixing ur game 🥲 👍
And... nope that does not work
what's on line 1465 of your common_events dump file?/
Where would that be?
Mods/lovely/dumps/functions
can you check the line?
function juice_card(card)
G.E_MANAGER:add_event(Event({
trigger = 'immediate',
func = (function() card:juice_up(0.7);return true end)
}))
end
Here's the range
they can, if it's a shader applied to entire canvas, it wont be an edition shader
if you just create edition shader that returns vec4(1., 0., 0., 1.) for every coordinate, you will see the limits of shaders applied to a sprite
looks like one of your mods is changing the function to one that crashes
That sounds... about right, yeah.
What mod do you think does that?
Anyone got a simple solution to wrapping text in UI elements?
I know you can use multiple lines in localization, but I don't think that works if the object isn't expect it.
Doesn’t Lua accept \n?
yeah but it looks weird due to the way balatro calculates text scaling
it'll be one that uses lovely, so your list to check through is bunco, lob corp, sdm_0's stuff, virtues and ceres. I'd probably start looking at virutes, I haven't seen any of the others cause this crash
Can’t you pass {s:number}?
I made a function to split the string roughly in half
Alright
can you?
yeah that'll chang ethe scale
I don’t know, may you?
There's definately a better way though
Because in other parts thunk's used multi-line loc-vars
Nope that crashes
the dud :)
Ah yes I'll make the game harder on myself
I also added a Challenge where you get an eternal one of these
because funny teehee
what did you do?
Play a Club
{S:num} isnt working
lowercase s
does it work when passing it into loc like G.localization.misc.dictionary["x"] = x ?
yeah, I tried with both
this works for me
oh it might be different text bodies
I only see it working in descriptions
Disabled and checked all of them
still crashes
Nope
Might try to redownload lovely
The crash, very specifically, triggers when I play a Club card that is, itself, probably triggering something else
Oh well
Time to switch pcs
try to isolate which mod is causing it
depends what you want
https://discord.com/channels/1116389027176787968/1274157879674409062 was requested by a lot of cryptid players
you also need talisman if you don't already have that for cryptid
https://discord.com/channels/1116389027176787968/1270516504470880357 Galdur is best mod 2024
it came bundled with cryptid yeah
can second galdur, i need to look at doing more controller fixes but on mouse it's 10/10
I click on thread this is the first thing I see: 😭
it's fine :)
its old image from aud i think
it was just first thing i saw when i clicked on the gald thread
it's not super great yet, i need to make it so it doesn't focus empty zones still
and probably add a quick start bind to x button
i also wanna see if i can make it easier to navigate to the bottom row from the deck zone... right now you have to focus a deck on the right side and then go down in order to get to the play button
I haven't looked at any controller support at all tbf
can you disable certain elements from it?
I have to somehow figure out a way to make a nice looking ui for all of immolates filters for the brainstorm overhall
that's going to be fun
yes i think so
but u can do like "focus" something
you define specific focusable elements with the focus_args {} dictionary from what i've found, but the issue is i just stuck it in the builder so it applies to every slot even unpopulated
there's a lot of configuration u can do, controller support is pretty easy iirc
this is just what i found from trawling through the source code lol i'm still very inexperienced at this
if you have any suggestions on this i'd really appreciate it 😄 https://github.com/Eremel/Galdur/pull/3
i only started modding this game like this week so i'm still missing a lot of knowledge
yeah I got to all the args when I was trawling through to make a UI guide and just left them alone for now
got it, looks nice allthough misses the previews of like 20% cryptid's decks
wait what, it shouldn't do
what version of cryptid are you using?
oh I fixed that in a different place 🙃
there we go, if you download from source it'll have cryptid compat fixed
eeeh its weird it scrolls only if you hold the button for about .7 seconds and does so rapidly, no reaciton if you just tap the arrow kays
keys*
as well as crashes the whole game if arrow is held when you have 0 consumables
There is reaction if you tap the arrow keys
This doesn't happen to me, perhaps it's a mod compat issue.
I'll take a look at some point.
yeah me being on macos could be the reason, quite likely
wow it actually works now
this is crazy
like this has to be the quickest bugfix at least in balatro history
6 minutes from the bugreport (without even tagging the dev) to the fix being up on github
I don't think it's a Lovely bug
Oh well
Time to fully delete everything and full redownload everything
you could try updating smods
but I don't think that function was changed
Some 40-50 times
I just had to move a patch from my local copy of cryptid to galdur, surprised noone ever mentioned it before
this is not the first game I've bandage fixed to death and back
i have a talent to break things within minutes of interacting with them so yeah my bad
Is there a way to have a Joker that requires you to have a certain type of card, like Stone, Glass, and Lucky Cat do? It's probably in the source code, but I have no clue where to look
this has no right to look this good
alr, so a atlas is 71 pixels high and 95 pixels wide?
just a question, do i need to resize it for the 2x?
you need the 2x version and the 1x version
alr
ok ok, i am getting the hang of this!
:D
if you want your card in landscape orientation, sure
normally it's the other way around
i think i went the wrong way in that message
giving my self a headace trying to read my own messages
a question: does the y axis count from top down or from down up?
should be top down
I think top down
yeah
alr, it feels weird but sure :) thanks
y being top down is normal for 2d games from my experience
i know but it feels wrong that 0 is the first line, thats what i ment
yea it's 0-indexed
0 being the first is normal
it actually caught me off guard when it wasn't for balatro stuff (ig it's a lua thing)
it is reading order
yeah lua is 1-indexed because fuck you i guess
Yea screw Lua for that
uh oh
Did you put your x1 sprites in the x2 folders?
1 index is good wym 😭
Who hurt you?
0 index literally only exists because C arrays
If you're being held at gunpoint, blink twice.... wait
1 index is the most natural thing
do you call FIRST element of the array ZEROETH
y'all only think 0 index is good because you're used to it
when you were just starting out, it was confusing
it was not confusing to me
yeatho i am not sure if i put them into the right folder? imma switch them and have a look
What an argument
the 1x and the 2x were right-
me when I can't 0[array]
it is an argument
TRUE
it is a layer of mental overhead you need to keep
dangit, now i fr broke my own mod 💀
i'm already used to for (int i = 0; i++; i <= n)
C arrays are only like that because index is not an index in its natural meaning, it's an offset
both are just conventions, we should establish negative 1-indexed arrays instead
i < n 
hush
://OFFBYONE
anyone that know why this happens?
nvm, i doubled the values and got this
i'll try to halve the original value
it worked?? kinda?
What I need to pass to SMODS.save_mod_config() to make it work? I'm passing SMODS.current_mod, but looks like it did nothing
when are you calling it and for what reason?
SMODS.current_mod only exists while the mod first loads. if you want to refer to it later, you need to save it in a variable or use your mod ID
Already saved
Because after restart config table is empty
then you might not be using it correctly, i need more context
are you looking at mod.config or SETTINGS.current?
hm alright
is there a file named like your mod ID in the config folder in the save directory (not mods folder)?
when is that init settings function called?
Inside SMODS.INIT.TwitchBlinds()
init functions are a remnant of steamodded 0.9.8 and your code will run through a compatibility layer if you're still using it
don't
mod config is not supported by that compat layer because it didn't exist in 0.9.8 (specifically it assumes there is no config file to load, and if it does exist, it doesn't comply with the required format)
just put the code directly in your mod file
This thing removed. Still config table is empty. Steamodded 1.0.0-APLHA-0720c
So i need to update?
update first, then if the issue persists we can talk
👍
follow this to make sure it's protected, then reinstall lovely off github
reinstall both?
just follow the instructions in that section and reinstall lovely
btw, anyone know how to fix this?
This is just incorrectly sized sprites. Each sprite in the 1x folder should be in a 71 by 95 pixel space, while in the 2x, they should be double that, each card should take up a 142 by 190 space.
I did that but i wanted to add more space so i doubled the sprite size and added extra jokers inside
Did you double the actual image itself, or something in the code?
Nope
Your code should stay at 71 by 95, and your .png should be increased by a multiple of that. If you have 5 jokers, you multiply the 71 by 5 for 5 per row, and if you want more colums, you multiply the 91, so a (71x5) by (91x3) atlas would give you a 5 by 3 grid of jokers, or 15 sprites.
I actually kept the code the same, but the sprite i made bigger like this, top left is original and by doubling the size the red erea got added, which wouldn't matter cuz using the x and y
Can you send the .png?
Yea gimme a second
1x
That needs to be doubled again for 1x.
If this is supposed to be a 4 by 4 grid, take 71, multiply it by 4, that's your width, and your height is 95 multiplied by 4 as well.
hmm ok, will do!
Then, for 2x, you double those values.
alrighties
thanks!
it worked :o nice!
:>
all cards finally show normally now xD
now to add functionallaty :D
why do i have -2 joker slots on a negative deck? literally every single joker is negative but i cant even buy any more of them
cryptid and betmma mods; is that a known bug / interaction? i have NO idea what caused this
you guys are EVIL
;-;
oops your lovely crashed!!
also, #1219749193204371456, not here
i solved this issue by going on an adventure and exploiting the very fabric of reality to obtain infinite wealth then reroll for unlimited antimatter. maybe the problems you have are your blessings after all...
debuffed negatives cease to add joker slots
If you debuff an already negative joker does it mess up too?
Could do with selling something like a negative joker after increasing its value somehow
gatito
Usually negative and joker have their first letter capitalized, also maybe put "negative joker" on a third line, looks a bit funky. It's an original effect tho.
Also most of the time only keyword highligted, without "Joker" word
oops, for some reason I thought they were uncapitalized but I guess I misread localization </3
also is there a way to make a Joker as "compatible" with blueprint? because it functionally works with blueprint, but the tooltip for Blueprint still says "uncompatible"
yes, there's a little flag in the joker object
"little flag" 
Property
they know what i mean lol
blueprint_compat = true to your Joker object
Bless
This apply to perishable and eternal too, tho they default to true unlike blueprint
why is it that my custom jokers are appearing in shop when I have them in my hand without Showman?
I think that happens if you spawned in the joker?
oh that makes sense because I did lol
Didn't realize shop checks if it's bought instead of spawn
I thought it would just check current hand
I was just thinking back and realised that what I said is wrong
because the game already draws the base layer, it is possible to draw beyond the base card by using vertex shader to scale up the "canvas" for the fragment shader
I dunno why I didn't think of that yesterday 😭
I was just thinking of how the game draws shadow, and it's basically the same, but before the base layer, not after
Is there a way to have a changing suit in a Joker, like Castle and Ancient Joker?
Yeah, you can either have it as a variable in your joker, or make a new function like the two that change castle and ancient joker for your joker.
It's called reset_castle_card in game.lua, or ancient/mail/idol instead of castle, and called in state_events.lua or game.lua, so you'd need 2 Lovely patches/hooks to make sure it's called.
If you wanna go the variable in joker route, you could take a look at my mod for an example, https://github.com/someone23832/Virtues/blob/main/Virtues.lua,
Decadence, at the very bottom, takes the 4 base suits in a variable list, and shuffles them around into an order upon being picked up, which it then repeats that pattern for the rest of the run.
Won't guarantee it's the best example, but it's the only example I know of at the moment.
Using this to ping since it's been a little bit since you asked the question.
Taking this one step at a time, how do you get the {V:1} thing to work?
The V stands for variable, which it takes a color that's passed from colours = {} in the loc_vars. Mine basically gives the color G.C.SUITS["Spades"], with the string being the variable that changes.
Thanks, after I changed that everything else fell into place pretty easily afterwards!
Good to hear.
Unrelated, whenever I try to use the Sigil Spectral card, this error message happens. I don't know what's causing it, but is this a common occurrence with an easy fix?
Possibly try updating steamodded?
I'm on 1.0.0 Alpha, is that not the latest version?
You're on 0806a, which means you're on a version that was made August 6th. There's updates nearly daily, and there's been a few separate updates even today. It's the nature of being in alpha.
Updated to the newest version, now gotta find another Sigil card...
Probably won't be for a while
You could use DebugPlus.
Is there a way to spawn a Spectral card with the Debug Menu?
I thought it was just Jokers
You can spawn most things with DebugPlus specifically, it's a mod that adds a ton of extra debug features. Here's both the discord and github so that you don't have to search.
https://discord.com/channels/1116389027176787968/1228149931257237664
https://github.com/WilsontheWolf/DebugPlus/tree/master
Omg this is gonna be so useful
I'm on the newest patch, and pressing the Card Colours button in Options crashes the game
That button shouldn't still exist, did you just replace the Steamodded files, or did you delete the old ones before copying over?
I replaced them
Try deleting and copying the new one. Also, the debug menu mod probably isn't necessary if you've switched over to DebugPlus.
I mean, I'm not gonna use that button anyway (I pressed it on accident), so it shouldn't be a big deal, right?
There's a pretty large chance of you running into other unexplainable bugs if you don't delete before replacing, though.
...Fine
Yeah, dev can be a hassle at times, but there's not much to be done about it often.
Random other question: Is there a way to restart the game from within the game? On the previous patch, checking and unchecking my mod and then pressing back would always restart the game, but that doesn't seem to work anymore
I think you might be able to hold Q?
Doesn't seem to work
Yeah, did have a thought that it may have been taken out.
I don't think there's an easy way, but don't quote me on that, because there might be, and I just haven't found it either.
you can hold M
?
🤷♂️
Are you trying to return locvars?
i don't even know what i am doing, just trying to add fusion to my mod
smods jokers is a 0.9.8 thing? I see it is only a part of 0.9.8 compat in steamodded, and in 1.0.0 SMODS.Centers should be used
but also if tophalf is a joker key, it's missing the mod prefix
for it to be a proper key
so: SMODS.Centers.tophalf?
also what is a mod prefix?
sorry if i am asking very stupid things
easiest way to see it is look console when game starts up
oh wait that got removed
uhm
if you didn't set it anywhere, it's just first 4 letters of your mod name
hmm ok
also key should be fully lowercase
yeah
alr
not really what I meant tho
I meant that for SMODS.Centers.<key>.
so key would be mini_tophalf
or if that doesn't work j_mini_tophalf
huh no
what are you trying to do
are you adding a new joker
or are you trying to edit existing one
rn
because I thought it was the latter
right now i have 4 jokers, (4 shards) which i want to be able to fuse together into 2 parts, a top half and a bottom half, and those 2 i want to be able to fuse together into a fragile joker (the final fuse)
yea and what are you trying to do right now?
i am trying to get shard 1 + 2 to be fusable into the top half
same with the bottom half but then shards 3 and 4 will be used
or this
that one i tought i had to change it to work better with 1.0.0
huh
but i might also be making it for 0.9.8 idk 🤷♂️ i am just trying to make my first mod
i am using the fusion code from jestobiology
since i got the tip to look how they did it
I have no clue how that works, but seems like the code you have is for 0.9.8
ok then i am making it for 0.9.8 ig, tho i am on 1.0.0, maybe thats why its not working?
well I'm not sure why are you defining calculate function outside the joker definition?
I have to go, and since I'm not familiar with fusions mod I can't really help you
I don’t think fusion has been updated yet
You’re using 1.0 aren’t you?
they are
^
yea :/
then I'd suggest basing your code off 1.0 mods, not 0.9.8 mods, your code is a mess
helloo
hi!
start with something simple like just adding your jokers in the game, then think about fusions and such
thats what i was thinking, i just added all jokers in, with config to enable and disable certain parts and it seems to be working 👍
i did disable the halves for now
since there is no use without fusion
also made settings, but they don't do anything yet- (ty talisman)
My favorite spectral card, Mini-Rebellion
if you're using steamodded, you should just use steamodded config menu
^
The only reason I even have a menu like this is because some of my mods are lovely mods
I think @rough furnace was working on lovely mods being able to have steamodded configs, right?
hmm yea ok-
i have a similar thing in the upcoming version of archipelago, but its a button that redirects to smods' configs from the "connect to server" screen
thanks!
Yeah, but I didn’t want a Steamodded dependency for some
tbh config menu + custom tabs seem like a thing that should have an example mod
it could be adaptive!
and i assume is that vanilla is disabling everything?
no...
you put whatever settings you need
VanillaMode is an example
because it is used in the Incantation mod
hmm okeys
you have your own settings, that should be added to the config.lua
and to access those settings you use the config variable ^
what do you want in your config?
me?
yes
idk, iguess everything?
what?
i.. don't know?
I'm just trying to work out why you're adding a config
What do you need to configure?
i want to enable and disable certain features :>
which features
rn its just the jokers
I wouldn't worry about adding a config at this stage then
Hmmm… do you know how to do that?
how does one make new stakes?
You can look at the SMODS.Stake in game_object.lua to see what parameters it needs
thanks ❤️
if you have any questions, give me a shout
well that part is pretty simple yeah
you just.. increase this
Yeah I've been messing around but haven't made much progress yet due to being busy with work and stuff
But if you want to take it for a spin my wip code is here https://github.com/WilsontheWolf/DebugPlus/blob/dev/smods.lua
Basically you can disbake smods default conifg handling, have it load a page and handle saving yourself.
That page should also be able to be put into the games config
Oh I was also messing with making talisman work with smkds config. It had some weird behaviour, which is why I didn't make a PR, but just overriding smods confiy save and load like I do in DebugPlus should make it work
there is no documentation for seals in steamodded yet, right?
ok here's the question
I'd like to add a new seal into the game, I saw the SMODS.Seal function inside game_object.lua but it isn't showed how to use it (like for other functions that re-add the vanilla objects (like SMODS.Suit))
here I stand corrected by the example_mods
I withdraw my question with shame
I've decided to have the stupid idea of turning balatro into a text based python game
It won't have seeds because seeds are hard but it'll let me test my stupid mod ideas I constantly come up with without having to figure out the mod install (it'll also let me play shitty balatro in class)
Is there a way to get the most played poker hand with a single function? We noticed there's G.GAME.current_round.most_played_poker_hand, but that always sends back High Card instead of anything else, even after playing a few flushes.
Also hoping for the inverse too, of the least played poker hand (although we guess that'll be with like, a for loop somehow...)
Tips?
Currently all I've done is made some progress on the class that holds the values for the different playing cards
I use a list to hold each variable, which is
[Number/value, suit, face card check, ace check, chips, mult, xmult, enhancement, edition, seal, debuff checker, displayed text]
Anything I'm missing?
-- Find true most played hand and display it
local _handname, _played, _order = 'High Card', -1, 100
for k, v in pairs(G.GAME.hands) do
if v.played > _played or (v.played == _played and _order > v.order) then
_played = v.played
_handname = k
end
end
Taken directly from the game
Thank you!!! Will implement this when we can :)
Was this in game.lua?
Does anyone have something that can tell me how the seeds in balatro work? I'm genuinely curious
Yes, somewhere xd
But if no hands played, it returns 4oak instead of high card
Idk why
because it priotises order if the values are equal
Oh Steamodded supports seals @wintry solar ?
Since when?
edition calc is still jank though
I think boosters was the last addition
but I could be wrong
Oh I thought Seals were broken before Boosters
oh maybe the got fixed after that
they definitely work though
balloons are seal objects
Do you have a simple seal I can reference? I was thinking of implementing an effect as an Enhancement but figured as a Seal it would maybe be more useful
SMODS.Seal({
key = "red_balloon",
atlas = "balloons",
balloon = true,
pos = { x = 0, y = 0 },
badge_colour = HEX("E31414"),
sound = {sound = 'balloon_inflate', per = 1.2, vol = 0.4},
weight = 0,
config = {extra = {balloon_mult = 4, chance_to_float_away = 4}, spawn_key = "c_balloon_red_balloon"},
loc_txt = {},
loc_vars = function(self, info_queue, card)
return {vars = {self.config.extra.balloon_mult * Balloons.modifiers.values, G.GAME.probabilities.normal * Balloons.modifiers.num, self.config.extra.chance_to_float_away * Balloons.modifiers.denom}}
end,
calculate = function(self, card, context)
if context.cardarea and context.cardarea == G.play and not context.repetition and not context.individual then
return {
message = localize({type = 'variable', key = 'a_mult', vars = {self.config.extra.balloon_mult * Balloons.modifiers.values}}),
mult = self.config.extra.balloon_mult * Balloons.modifiers.values,
colour = G.C.MULT,
func = check_floated_away(self, card)
}
end
end
})
there's some extra stuff in here that's not relevant
but the important stuff is here
oh it supports in_pool to
they're internally called balloons in the base game? that's hilarious
no this is from my balloons mod
I realized one of the effects I had in mind since the demo is a bit superfluous now
It was a Burnt Enhancement, based on the old Burnt Joker, which would give discarded cards a chance to generate a Tarot
But that’s like a worse Purple Seal
There’s still benefits to having it but I don’t think enough
The effect I think would work better as a Seal than as an Enhancement is one that creates a temporary copy of a scored card in your hand.
The demo had Gold Seals with a similar effect—keeping the card in your hand—but they were largely considered really bad because it was too difficult to obtain them at all
I really want to use the Burnt Enhancement but I’m not sure what to do with it
Vouchers? Tags?
yeah
TIL
it's just not written up on the wiki yet, iirc they're getting close to official alpha/beta releases being put out instead of just rolling main branch updates
hello, how do i make a custom booster please ?
If it’s not in the wiki try finding a mod with custom boosters
or ask @wintry solar
I havent done any booster stuff
but generally I recommend looking through game_object to get an idea of what you need to include, and also look at mods with them in
okay thx
is there a mod that adds more features to test things?
like i can open a tarrot pack on command?
or add seals to a spesific card/joker?
closest thing I think is debug+
thanks!
i do have quite the fhew questions like how do i add my own enhancement?
and how do i check if a glass card got shattered or not?
look at glass joker in source code
i may have found it?
glass joker is bugged tho 😭
rip
more specifically, the context.remove_playing_cards portion of it is bugged
doesn't actually do anything for some reason
^ this part is fine
alr! thanks :D
it appears it is not fine?
i cannot just replace: if context.before and next(context.poker_hands['Pair']) with if G.hand.highlighted[i].ability.name == 'glass card'
then it is a nil value?
you still need to check the context
wait did i write that right? i want the joker to scale when glass breaks
isnt that glass joker
iguess so yea
guys please
?
my brain cannot wrap around alla this ._.
isn't there a template or sum 👉 👈
?
Can someone help me figure out how to overwrite descriptions for Jokers, Consumables, or other items in the game? I got a error when I tried to do that.
(see #1276085451530174484 )
Error: functions/misc_functions.lua.1872: bad argument #1 to 'ipairs' (table expected, got nil)
Odd question, would it be possible to take ownership of a single playing card rank/suit? Something like taking ownership of H_4 through SMODS.Centers, maybe?
Ok, so i have all of my Jokers coded and I just touched up the last of my artwork. Six Jokers coded and drawn! Now i just need to figure out how to organize everything into one folder so i can release it soon. Holy Christ this process has been consuming, fun, but consuming. Anyways, all of my jokers are stored in individual files, I need to get them all together but seeing as to how other mods store their Jokers together is honestly a bit confusing.
Is there a way i can leave all my files separated?
single files for each joker sounds a bit excessive, if there's grouping I usually see it done into some kind of categories
you can use SMODS.load_file to load any files you need, however you decide to split things
for an example of dynamic file loading (as in all files in a certain folder in your mod), you could look at cryptid (Cryptid.lua, starting at line 394)
The way other mods handle its files vary so much, so it is making understanding what i can/need to do as a first time modder, a bit tougher.
Ty for that suggestion! I'll take a look at Cryptid
I also should probably avoid using a spritesheet, i have a joker that is 81x135 so I'm not sure how i would go about using a spritesheet with that one.
The way other mods handle its files vary so much, so it is making understanding what i can/need to do as a first time modder, a bit tougher.
My advice is don't worry about what other people do. Everyone has their own style guidelines and formatting rules.
A lot of people are winging it haha, and a lot of their decisions on structure, method, etc are all due to the specific requirements of their project.
anyone know how to take ownership of the vanilla seals with SMODS.Seal:take_ownership()? no matter what key i provide it says that the object doesn't exist so i can't take ownership of it
i've tried red, red_seal, s_red, s_red_seal, Red, Red_seal, s_Red, and s_Red_seal
If you want I can show you how I have mine organized
I have one file for each Joker and other objects
Though hooks tend to be together
Lovely injections are a bit sketchy but still
Yeah, for sure, any chance i have to learn about this more, im down 🙂