#💻・modding-dev
1 messages · Page 75 of 1
I'm not sure what's the process for grabbing images is (or how to work with it), but the center should have enough info to pull the images u need
cus atlas (or lack thereof) + pos/soul_pos
yeah it should
but handling other things like scale is easier with an actual card
but Ig there isn't that many jokers like wee?
so maybe it's fine
I... have almost 1000 jokers in game
I should be able to create the card from what's in G.P_CENTERS
and then go from there
the one minecraft modpack but for balatro
divine journey i think
first time a steamodded mod has been loaded without a mod header
(yes prefix and main_file are required, don't fight me)
@frosty dock sorry to bother you, but is there a simple way to create a card object from G.P_CENTERS?
you can define it directly using Card()
I need to do it iteratively though, what parameters do I need?
for a joker specifically
I'd use SMODS.create_card
Card(X, Y, W, H, card, center, params)
fair but that creates redundancy in the params when you can just do SMODS.create_card{key=center.key}
it ends up calling the Card constructor anyways of course, but it's easier
x and y shouldn't be relevant for you
W = G.CARD_W
H = G.CARD_H
card is irrelevant
center is the things you're iterating over
params are irrelevant
you should start documenting misc functions
there's lots of things i should start doing actually
🤷
huh, I thought this crash was because I was using vanillia create_card wrong
my code so far
the indendation is pretty screwed up, my b
hm
does JimbosPack fully override create_card?
because the stack trace looks like it does
oh ok i see the issue there
it hooks it as "oldfunc"
basically randomness doesn't work outside of a run because there's no seed, which shouldn't be an issue normally because there's no randomness with forced keys
yet here the random var is generated regardless, even though it's only used in a case where there is no forced key
@nocturne garnet thing to fix
I get the same crash even if I remove Jimbo's pack
same with if I remove betmma's
what's in your common_events.lua at line 2619? mine isn't even reachable if there's a forced_key
but then I start getting errors from smods itself
oh wait nvm i see, it's this
should be avoidable by waiting until the game object is initialized though
how'd I do that? And does that mean that it needs a run to start to do its thing?
no, a game object is initialized as soon as the main menu is entered
you'd just need to change what function your hooking onto
also wtf is happening with your indentation coonie
here it is fixed
I was lazy wth copy-pasting, lol
after main_menu should do probably, otherwise just use the card constructor idk
it's a lot better, but not fixed lol
probably better anyways if it's prone to breaking with other mods
well I use a text editor not an ide, so I have to do it manually
formatters exist outside of ides
yes, but not in xed I guess
at least not a functional one
I have "auto indent" on, it does nothing
might not support Lua
I presume that replaces part of the first line, but I'll admit I'm enough of a noob to still not know exactly where to put it and how to format it
yeah I'd just opt for the card constructor at this point
card constructor
still getting the same error
this is roughly correct, right?
I'd put x y as 0s and card params as nil but I'll check the error rn
what's line 262 in card.lua in ur lovely dump
instead of hooking into post inject you should probably hook into something else and loop over G.P_CENTERS
yeah, aure suggested after main_menu
idk exactly how to format that though
also realized I forgot to fix the param for the sprite function, not like it works anyway yet without the card object
SMODS.Joker.post_inject_class = function(self)
VV
function Game:main_menu(change_context)
main_menuRef(self, change_context)```
also your current card constructor is passing a number as a card argument when it rlly should be nil instead
fixed that
no longer crashes, now I just gotta debug the image function
still outputting blank images
here's my code currently
and also, the cards are all spawned on the top left of the screen when the game starts, I'm sure that's easy to fix
thats because where x = 0, y = 0 is
you can just add tempcard:remove() at the bottom of the loop to dispose of the cards once ur done with them
yeah I thought it'd be something easy like that
found a solution for now, if silent = true then the original version of set_edition() runs regardless of rules
this would allow for duplicates to have editions but the original cards wouldn't have editions anyway
got jumpscared by it actually working
congo rats
woah
that mod is familiar
how do you add reminder text? like when stone joker reminds you of stone cards
use infoqueue in loc_vars
one example (ignore the vars those are unrelated)
like this?
looks good
you can also define it as {set = <set>, key = <key>, specific_vars = {<vars>}} to pull entries that arent centers/to put specific variables in the descriptions
is there an example i can look at 😅
i'm having a hard time visualizing this
wait i'ma try something
instead of g.p_centers you make a table of data for info queue to use
i have this now
you didnt have to change it lol
just telling u about options
vanilla uses just g.p_centers for pack info queues
oh, okay... when i add it to my description how would i do it? because this probably isn't it
T: is basically the deck equivalent to info_queue
oh, that makes a lot more sense
words with T: bring up an item description when you mouse over them
that's very good to know, i can hide easter eggs 
wait, T is specific to decks?
how would you mouse over a word in a joker description
oh i didn't think about that
i'm starting to realize my head is fogged, i'm just doing that comes to thought
its not that its specific to decks, its just decks are like the one thing in the game that use it
yeah exactly
cuz decks are the only things that have a description you can hover over in the base game
the stakes underneath:
truueee
i don't understand, so am i telling the game what to show based on the variable i use?
thunk put anything that could be tooltipped in the full description though
those specific_vars might be the vars for the tooltip but don't quote me on that
?
what? no
like what vars do in localization
they replace the #1# stuff
(again I'm just guessing that that's what specific_vars does, maybe I'm wrong)
😭
i honetly don't know what i'm doing anymore
nah you just misspelt loc_vars
WHAT IT WORKS NOW
thank you and to everyone who told me how to do it lol
YES!!!
YES
Guys, is there something like get_id() but for suits?
basically, a function that would return a string with the suit's name
i mean there's Card:is_suit(suit) which returns a boolean (true if Card belongs to the suit suit)
I think that wouldn't work :/
I'm trying to store played cards' suits and ranks into a table stored in a joker
you could have it store a different value depending on which suit it is, im not too sure
card.base.suit iirc?
will try
darn it beck to not knowing how to show pinned :(
I’m not sure the key for pinned is just pinned
There are no sticker configs (in vanilla code anyways).
You'd have to do info_queue[#info_queue+1] = {key = "pinned_left", set = "Other"}
Or info_queue[#info_queue+1] = {key = "pinned", set = "Other"}
holy cow i'm learning so much about loc_vars
thank you 
also i think hex has a lot better theming now :)
im having this strange bug where it can be used at times it shouldn't, even though i have max_highlight
add a can_use function to the card and make it return true only if 0 < G.hand.highlighted < 5
(0 < G.hand.highlighted < 5 wouldnt be valid)
is there a way for context.open_boosters to only impact boosters opened in the shop? dont want boosters from skips to impact
thank you so much!!!
this is what i ended up doing with your information
you could exclude skip context, like if not
or don't trigger if you're outside the shop
Is there a way to print variables to check their values in a given moment in game?
if you're looking to check it's as easy at if X = Y then but if you need to print it depends on the context you're talking about
I'm storing variables in these two tables, rank{} and suit{}. I suspect they're not storing the values properly, so I'm trying to find a way to see what's being stored
I'm making a joker that's supposed to give +10 chips and +6 mult to clubs cards, and it does do that, but the joker doesnt wobble when it activates, and it also doesnt work with wild cards or smeared joker. if someone could help me fix that, that'd be great!
heres my code (ignore the comments, theyre leftovers from the template i used)
(also im gonna have to do something verey soon so i might not be able to respond to replies right away)
context.other_card:is_suit("Clubs")
for wobbles you should check scholar, considering he does a similar effect
how do i look at the decompiled game code? ive been told to do it by multiple other places but i still dont know how to do it
open balatro.exe using an archive viewer like winrar or 7zip
dang, its that easy?
it's that easy
also there are copies of some files at Mods/lovely/dump
(generally they're the important ones)
lovely dump = the version of the files the game was using the last time it was launched
modified by lovely
for wobbling, just call card:juice_up
I'd disagree, because imo the most important ones are engine/ which aren't touched by any mod yet to my knowledge
true
steamodded itself touches most of them https://github.com/search?q=repo%3ASteamopollys%2FSteamodded+language%3Atoml+%2Ftarget\s*%3D\s*['"]%2Bengine%2F&type=code
hm
if you remove the repo:Steamopollys/Steamodded part from the query, you can see some other mods that also do it
Finally, Ghost Deck is truly based.
Are ya gonna do something for Ankh as well, or no?
47 copries of one joker
I would probably do something like.
Make a Perishable copy of one random Joker.
[Also no longer removes Negative from the copy.]
do you/anyone know of any modded jokers that don't trigger outside of shop? so i can read the code and understand how it works
What you trying to do
naw i think it plays into the idea of making a a good joker stronger by having two... though if i think of a change i'll most certainly do something because this isn't off my radar.
👀 i like this!
I have it set so when a card/voucher/booster is bought the xmult increases, however, when i skip and receive a booster pack the xmult also increasem which i dont want happening
personal opinion here, i think that's a cool interaction
i dont mind it to be honest cos its definitely worse than actually going to a shop but now am also curious how to make it only trigger in shop
Maybe you could check if the pack was bought? I wouldn't know how to do that tho
how do i make tabs for my config like cartomancer mod does?
also i want my mod to have a built in wiki in the config menu, so when you hover over an option it tells you what it does.
gosh configs are so hard 😭
When you click on a mod in the ingame modlist it already shows what it adds
can anyone help me add new joker ?
very nice! i was thinking of doing similar to ectoplasm, where the random joker becomes negative but also eternal.
that'd
not give ectoplasm a downside tho
i think that's easily abusable but works for higher power mods
most people are fine with the decreased hand size
like imagine you have stencil joker
you just sell everything else once you get ectoplasm
from that point onward ankhs and invisible jokers are your #1 priority
oi lad is our current version steam loader 1.0.0-ALPHA-0721a
don't those remove negative from the copy tho?
i mean sure, making a joker eternal is more situational of a downside than losing hand size
ok but if you make a joker eternal instead of -1 hand size
nothing's stopping you from just
getting another ectoplasm
to me at least, -1 hand size in exchange for turning a joker negative feels like a fair trade
...i suppose i just have a problem with the penalty ramping up the more ectoplasms you get
just makes it feel like localthunk is going
"NO. You are having TOO MUCH FUN."
It’s called balance?
Just replace ectoplasm with insense from Mika's
it dow=es the same thing and costs $50 to use (even if you don't have the cash) and goes up every use
losing hand size can be inreconsiliable, this is a balance that doesn;t feel bad
i think that's why i don't like the fact that it's a quadratic punishment; you'd get to 0 hand size and lose, whether it ramps up or not.
you can look at the joker example from steamoded bare bone examples
i loook at them but some wont even load
other are too much too see
literally a lot
I check D6 joker and have no idea where to go
it just feels like you're putting unnecessary limiters on a card that is placed alongside other insanely valuable consumeables that don't punish you for seeing too many of them in the same run
bad example
it's not normal jokers
FAIR
it would be like immolate burning one additional card every time you saw it
this is why I far prefer incense
it still has theramping punishment but it's a mich fairer one
or every aura past the first being half as likely to apply an edition to the card
it's not the idea of it having a cost that i hate
it's just the cost of hand size is so irreconcilable, on top of it being one of the only spectral cards to have a stacking cost mechanic
@brisk rose which mod should I look at mate
so i would be fine with a halfway of negative, eternal, and maybe -1 hand size... or, like... cuts your money in half. because after all, it's not always a guarantee that the card that ectoplasm will hit is one you want to keep long-term.
or even one that will stick around long-term
because imagine ectoplasm hitting a food joker
one reason why I don't keep food jokers around usually
or mr. bones
that'd still be useful if you plan to keep him
an extra joker slot is an extra joker slot
yeah, definititely
being locked into a particular joker isn't always a good thing
it's one of the more manageable stickers, definitely
but it is still something of a downside
why does card = self crash my game?
it seems like the "self" used in the calculate function is not a proper card
so you have to search through G.jokers.cards
for a value with an ability.name equal to self.name
then set the card key to that value
so make ability and self the same as card?
no, like... here, lemme grab my own code for you
local joker = nil
for k, v in pairs(G.jokers.cards) do
if v.ability.name == self.name then
joker = v
break
end
end
return {
x_mult = card.ability.extra,
colour = G.C.MULT,
card = joker
}
something like that
yes, that is flawed in that it only triggers on the leftmost card when you have multiple, but...
if card = card doesn't work, then that will.
holy shit that worked
HOW???
it's like saying 1 = 1
yeah, duh
why does this work???
okay uh
here's what i think is happening
calculate has a variable called "card"
(self, card, context)
and you're putting that value into the list that you're returning
with a key of the same name
so it prevents card from not being card in this context?
self is not a card in smods
its a center
every vanilla self would be a smods card
oh, this is very good to know, so that's why card replaces self
and center is used as well
???
not sure if center is actually used, to me it looks more like a sideeffect of how smods api is programmed
(the function is run within the center)
center is the one executing the function, as opposed to vanilla where its the specific card entity doing it
is there a recourse to see how the smods api works? i've been trying to find it but i've just been stuck to looking at other mods
smods wiki is a bit outdated but generally a good source, lovely dumps and smods code are better at seeing how it all works in practice though
for example this is the code within card.calculate_joker
smods takes the card's center and makes it do the calculate method using card's self and context
because its obj:calculate and not obj.calculate the calculate's self is the obj, not the card thats being passed into it
so that's why if card.ability.name == "your joker" then isn't needed
i’ve been out of the loop of balatro modding since early this year, has steamodded had any major changes to its API?
really got an itch to start making stuff for balatro again, but wanna make sure my existing stuff will at least ‘work’ 😭
it did change quite a bit
early this year? very
☹️
there's lots of examples for stuff though
you can find example mods in steamodded source code
oh yeah i’ve used those before, with varying degrees of success
and you can read wiki for docs (though not everything is documented)
the ones with the numbers yeah
cool, cool
seems a lot more finished from before, neat
should hopefully be pretty easy to get back into it
thank you 
np
I think that what I'm doing with the canvases is stopping the game from loading, but nothing I try helps
so, doing a slightly different method for getting the iages, going from @dense jasper 's code and doing s lot of work on my end, I was able to get that working and even overlaying the souls. However, no matter what I do, it hangs indefinitily right before the main menu
messages sent kinda out of order
where do I find the vanilla atlas sheets?
like find them in code, or physically in the games files?
i wanted to modify them for the google translate thing so ig physically
unzip the exe
in the resources folder
unfortunately im on a mac
hmm... download the exe in a vm :P lol there's probasbly a way
maybe the mac binary is just a zip too?
yeah you should just try unzipping it on mac as well, might work, might not
part of the problem is also i'm not familiar with code n stuff and theres a lot of folders
try 7zip or sth, extracting on mac is most likely possible
also rotaeno colab jumpscare
lmaoo
but yeah im sure there are mac users that have done so
i give up for now, don't know enough to do anything
you just want the vanilla assets?
thanks!
better not be malware
this mod is gonna take like 50 years to make for me lmao
Art for all the decks I've made so far
this guy is currently trying to make ai llms play balatro, not very successful so far but pretty entertaining
my first balatro mod was a very deterministic random seed balatro ai
granted it was mid and only ever got to ante 4, exclusively because i accidentally left in a bug where it would purchase every card it saw in the shop
oh I've heard of teej
he's gonna have a blast if he hasn't done balatro modding yet /s
He is familar with lua though
that's what i said when i started modding balatro and i still endured the suffering
I wasn't familar with lua but I didn't tocuh the ui so I'm sitll okay
it's gonna take him awhile to even get a working model of what actions the LLM can choose and how to properly execute those actions
mayb help him idk
although i haven't worked with an LLM in ever so
is he going to mod the game or use some other way of interacting with it (like screenshots and mouse clicks)
maybe when im at home and he's still working on it
looks like a mod from the screenshot
LLMs are.... very non deterministic, so good luck interfacing with it with code
hes loading a lua file via steamodded so
I have interacted with llms with code and they sure are not detemrinsitc
yup
aceually I did work with an LLM once
untrue, source: been using llms for a year locally
now that i think about it
oh he made an auto reload
neat
I should send him DebugPlus's watch command
or steal his watch command
depending which is better
if i still have my old code for my balatro "ai" i could probably just send him snippets if he needs them
or rather he could just like join here lol
but if he's doing fine he's probably gonna be ok
I should join the stream after my class
yeah I think some of the smaller local models can be deterministic, so I was speaking a bit too broadly
I mean setting the heat to 0 or whatever makes them detemrinsitc doesn't it?
I wonder if he knows about https://discord.com/channels/1116389027176787968/1224090711759130735
Actually I’m pretty sure it’s not ported to Steamodded 1.0
don't make the man use python smh
In that case the replay part of Ankh could probably be modified to accept actions on the fly
oh probably yeah
would rather the game was in python because I have a tiny bit of experience in it and it feels more natrural
preformance be damned
or rather he could just look at the ankh source and see your methods
because.... I am very sure it'd have none to speak of
reminds me of the idea I had once to make a modular pokemon fangame in python where you could supply your own assets and iwell... it'd basicallly be an engine for pokemon fangames
I would rather not use python
never tried doing it, and i'm sure it's an awful idea
it's not like lua is famously fast or anything
no, but I presume there's a reason it's used for games a fair bit more than python
It's much easier to embed
that
fair enough
love2d (internally) is rust right? or is that just lovely
love2d is cpp lovely is rust
it's cpp
I guess the difference between an interpreted language and a jit language isn;t gonna be much, especially because python can be jit or even aot compiled apperently
but it's using luajit for it's lua runtime which is c
and yeah I know love2d itself is cpp
see, I know.... very little about the technical side of languages and all that
I'm just pleasently surprised I was able to figure out how to overlay a cards soul sprite if it has one on the main sprite without asking for help here (and without having to make the card object)
for this #1292331049883533322
and then ofc @dense jasper took my hacky implementation (which to be fair was built on their code as a base which coulsn't do that part yet) and made it actually work without hanging the game and not being super nessy and full of unnessacary nonsense
Lua math is surprisingly quick
interesting
Math will probably refute what I'm saying but Lua's math performance is probably why mods like Cryptid work so well
I've considered exposing some native math functions via Lovely but it's not really necessary
Lua is actually a pretty fast language for what it does
But the great thing about Lua is, if you need speed, you can use the C API
Yeah, and the FFI layer is pretty simple
I do wish that Lua had preemptive multithreading
Yeah, me too. It’s one of the biggest downsides to Lua tbh.
I wonder if there would be any value in Lovely spawning a separate compute process entirely for score calculation.
That way the game isn't as likely to die
I feel like it might just create more problems?
absolutely
Also, the mods that crash the game are definitely not well optimised from the ones I’ve seen 💀
Yeah if Balatro was written in something like Python we would be seeing much more lag with Cryptid 
I thought of this but it would probably need like a rewrite of the ui or a bunch of patching stuff together
Although there are ways you can go much faster - the speed improvements from Brainstorm switching to FFI is a good example
Theoretically you could write a program to run all of Balatro’s calculations in FFI, but that wouldn’t be practical
also good luck supporting mods
compute time isn't even the limiting factor atm so
afaik you can override Lua's math operators
nope!
only for non numbers
yikes
otherwise people wouldn’t need to make Talisman compat
adding 2 numbers together completely ignores metatables yeah
what an annoying limitation
This is going to require a complete refactor of Immolate lol (for when we add it to Brainstorm)
i feel like the whole "math is quick" thing would go down the drain if you checked for a metatable whenever you did an operation
but what do i know about stuff that low
and like I said, Lua math is super fast
I think that we could solve a lot of problems if we simply deleted math
Sorry MathIsFun we need to kill you
From MathIsFun to MathIsNotFun

new mod that removes any string related to mathematics
Call it MathIsDone_
can I get all text in a uibox
Damn it the blind goal is "A gigantic amount" and I only got "A huge amount" ...
other than by hooking the uibox constructor?
pefereably
then idk
recursively iterate over the children checking if their n is G.UIT.T?
oh wait
you mean all text contained in a uibox
not getting all text in every uibox
yes
if you do this, might also need to check for n == G.UIT.O and that the object is a DynaText instance
how can i use create_card or SMODS.create_card to make cards with a specific enhancement
playing cards i mean
cant seem to make it work
Think you just need to set the enhancement afterwards
local function stealText(table)
local text = ""
if table.config and table.config.text then text = text .. table.config.text
elseif table.nodes then text = text .. stealText(table.nodes)
else
for k,v in ipairs(table) do
text = text .. stealText(v)
end
end
return text
end
local card = test
card:hover()
local tab = card.ability_UIBox_table.main
card:stop_hover()
local fin = ""
for k,v in ipairs(tab) do
fin = fin .. stealText(v) .. "\n"
end
return fin
like a thief in the night...
if you can't beat them, join em... context i couldn't get rid of the vanilla message so i mead it a feature
Guys, how can I make a joker check +mult and xmult added to score by other jokers that triggered before?
Is it possible without lovely patches?
Can I rerun the calculations of other jokers in a joker?
Sorry, I'm a little in over my head here
what are you trying to do here?
I'm trying to implement this. The idea is to take an already calculated joker, grab the amount of Xmult it aded, multiply it by 0.1 and have Integral use this value during its own calculation
Uhh I would check how cryptid exponetia does it
Will do, thanks
Damn, it's basically the same thing lol
dunno why i didnt think of that ty
how would i select a random joker?
nvm got it working
Is there a way to use a custom sprite (that the shader still gets applied to ofc) for a given edition? I have an idea for #1292971421349445785 (not at all my project but it'd be cool to contribute) where the pokemon is shiny if the card is negative
Relatedly, how would i have to edit an image so that the negative shader turns it back to normal?
Figured I would make this for everyone https://gist.github.com/WilsontheWolf/87475e6ac25857d8a7c73d3cf81f972a
I presume most of it is just something like this in the calculate function:
card.atlas=[sprite for negative]
End
I had a similar effect for ultimate pianist/last hope from my unfinished mod but for that I brute forced it until it looked right on the edition viewer posted by stupid
It would make sense to look inside the actual shader to see how it does colors
tbh this would probably require a lot of effort but why not turn pokemon into soul_pos?
then they wouldn't need editing for negatives
Hmm, not a bad idea
for actual change, I'd add a hook to set edition so it sets edition and then trigger's the joker's set_sprites if that joker has a pokemon tag
I guess that'd be less busy when than adding something to every joker
tbh silly idea but I'd just make it so when a pokemon joker is created, it runs the actual shiny check
Has anyone made a code editor yet that can edit code with code?
1/4096
Like it's an obvious idea but the closest thing I know to it is just writing a script separately and feeding it what you have
tbh, if there's that much redundant code, why not write it in a more automated way
Idk i guess technically every text editor has that. Regexes are Turing complete afterall
so that it generates all the redundant bits and you just need to specify the unique bits
I mean yeah you'd need a generate_code.py or something too do it how I'd be happy with. The reason being I hate navigating mod files where people do automate it themselves
no I mean like
I'd much rather have normal smods.Joker definitions for every joker, etc, etc in the final product
programming the mod in a way so it generates smods jokers procedurally
Yes people do that
And I hate the how it is to navigate the file after
I mean you could make a table that represents all the unique parts of each joker and then iterate over it to fill in the missing redundant code fields procedurally
so the initial table looks like a set of smods jokers
Again I understand. I've seen mods with that structure
I have an aesthetician preference for anods.joker objects being drag and drop modular
With everything being in one place
~~remember, I made #1271500476457812120 ~~
Jestobiology did do something like that and I had to feed it into chatgpt to get bare joker definitions to add
Because lazy
And wasn't yet trying to code again
Ideally I hope for either everything in very few files or everything neatly separated so browsing isn't hell
(although actually making every object separated involves convoluted loading setups)
xdd
Yeah every joker definition being its own file is a trend in not sure about
But browsing is still nice at least
It does come with the small benefit of feeling nice that you're making big progress on a mod update (this is 80% cosmetic + cleanup and 20% rebalances, legit nothing new yet
).
I mean I usually just use global search to browse
but I agree it's nice structurally
And here I am using xed she is I truly needed to do a global search if have to use grep in the terminal, lol
Actually that night not be true. Xed might have more support for project-like features than I use one give it credit for
That’s so hacky, why not just add an exception to draw?
Classes are your best friend.
-# well, metatables 
Perhaps worth noting at the end that you can also create your own queues to dump your own events in that way you’ll never block someone else’s events
what's so hacky about using the second layer the game already provides?
like any resources to start learning how to make mods
reading smods wiki and looking at smods example mods is a good starting point i think
why does this say juice up is a nil value?
do you have the full error? I'm guessing it's because the first argument doesn't have a juice_up function defined though
yeah, it says it lies with commonevents
yeah so self:juice_up(...) doesn't exist
pass card instead of self
self is card.config.center iirc
@mellow sable retrigger question, if I've got a joker that copies an effect, like blueprint, how am I getting any text to appear under my joker rather than the copied card?
Look at how I patched blueprint (or how old blueprint works in Cryptid)
I don’t fully remember what changes I made lol
I don't get messages appearing under blueprint though
they appear under the copied card
I saw it as well without Cryptid
It's likely a context.blueprint_card oversight.
I know that's used to point to Blueprint/Brainstorm or the card being copied.
Which would change any text eval to show up on that card.
Hello all sorry if im in the wrong place or anything. I've got an idea for a mod but have 0 idea of where to start the whole process. I'm familiar with lua scripting and general programming (largely python) and could figure out how to get stuff rolling once I know how to start digging around.
Is there some place with a 101 intro into pulling source code and explaining the injectors for those trying to create mods?
i saw someone say i should add self:juice_up to a joker to get it to wobble, but idk where to add it in the code, as when I try to the game crashes.
and while I'm at it, blueprint is saying my joker is incompatable with it, when it's a simple +chips and mult per card joker. do I have to manually set up blueprint compatibility or?
wait, i just tried blueprint with it, and it actually worked?? despite it saying it was incompatible???
change blueprint_compat to true
try card:juice_up instead
i tried that but it's still not working. I think im putting it in the wrong place
here's a snippet of my code, (where card:juice_up currently is is just to visualise where ive tried to put it individually. i never put it in both places at the same time)
where does one get the spritesheet for the jokers
It’s after the return here
still crashes, no matter if i say card or self
ah
nope, crashes still
whats the crash?
its here, only difference being i only have the top-most card:juice_up and have added a () to the end of it
oh it might not like having a juice_up after the return
and even if it did it would never run
ok, now i'm back to square one.
where should I put it?
i have put it above the return before, and it crashes
can you just send the full code?
ah sorry i meant card:juice_up()
...ok when i said it works i just meant it didnt crash on start up, apperently.
now, if i use card:juice_up(), nothing changes, and if i use self:juice_up(), the game crashes when it's triggered.
by any chance does it juice up immediatly after pressing play hand?
can you send the current code?
yep, didnt notice that before.
yeah you need to make an event then
ok, how do i do that?
I don't have access to stuff rn
wilson posted a lovely guide to the event manager this morning
nice, was it in this chat or somewhere else?
yeah this one
Why does it crash with '<name>' expected near '5' ?
that is not how for statements are formatted
ahhhh, figured out the blueprint message issues
Odd question, and apologies if it's dumb, but I understand that the Priority system means that mods with a higher priority are loaded after those with a lower priority, yes? Would I still be able to detect that e.g. a certain mod is installed?
If you're curious about the use case, i'm wondering if I can detect if Jen's Almanac is installed and add some Token Cards to match with Tags I also wanna add. it's not a super huge issue i'm just curious if it was possible
for steamodded the smallest priority is loaded first and then the one's with higher priority get loaded. So if you have a smaller priority then Jen's, all of Jen's stuff shoul;d be loaded then
yeah, it loads them from -inf -> +inf
you can still check if a mod exists using SMODS.Mods[id], and check if it's loaded with .can_load, even if you load before the other mod does
(iirc)
I see
Unfrotuatnly for you jen has inf priority
Like I said it's not a big issue (I'm still spriting aha) so if it doesn't work i'm not too miffed
^ that's the safe way to check
mod id is just jen
Who needs safety? 
no but the help is appreciated
I love having my mod crash when jen's almanaic is not installed
without having looked at the internal stuff though, I'm pretty sure priority is for injection order and that the mods are loaded all at the same time
lovely and steamodded both have priroties
I thought steamodded first collected all the mods, then loaded them in order of priority
it does
and lovely priority being a completely separate thing
yeah but the priority isn't for assigning whether the mods are present or not, thats all done before the priority kicks in
yeah that's what I meant with "collecting all the mods"
oh yeah sorry I was thinking in cases where you want to detemrine if an object was regiusteered
like if you want to take ownership
ah yeah, in that case you'd need a higher priority
or if you're using a type thats defined in that mod
only if you want to directly interface with that mod yeah
Is there a legitimate reason to do this?
Idk I'd ask jen
Surely not right?
Jen said he doesn't want any other mods to build off of almanac
I mean you nifht wabt to have a higher priority if you modify quite a few other mods stuff but inf is not nessicary
setting priority to inf is definitely a way to do that, I guess
I mean we could just fork the almanac
That’s kinda cringe lol
Also Jens almanac source code isn’t publicly accessible anymore to my knowledge, which goes against the modding rules…
you can just join the cryptid discord and look at it so 🤷
I think publicly means this server
But he does post download links in the channel I think
as far as I'm aware that's not good enough
i think publicly means publicly
being able to download the source code is 100% good enough though
A server he controls is not public by definition
In theory he did ban whoever he wants
^
well maybe thatll be a problem if he ever started doing that lol
Wait it is the cryptid server not his
he has admin there so
it's not his server, no
But still
I'd argue that as long as it's not an exe/obscured code (e.g. lovely's exe), the files itself being available for download are "public" enough
Maybe I'm misremembering something else, but I swear the code had to be accessable on github.
if its a zip u cant preview before downloading
that sort of infers the github thing then
That's a decent point, though not exclusive to jen
Who ever said it was exclusive to Jen?
Fair
I'd still say that those are "available and viewable", but I'm not enforcing the rules
I also prefer people putting their code on github, makes it easier for me too
you're missing the point though
This is why the gpl should be required
the whole idea of source code being viewable is so that there are no bad actors.
Or some copyleft license
Yes, that's how I interpret it too
A lot of mods also have copied code from the game
sure, but I'm neither the person enforcing that rule, nor the person breaking your interpretation of that rule
It is, everyone just either forgot or didn't know about the license so we have a bunch of mods that have "other" licenses.
Altho idk what would actually happen with liscence conflicts like this
I never said you were..?
Yeah that's what I thought it's implicit
Because you're using the modding api and code from a gplv3 project, your project is technically gplv3
Yeah
Though I guess the gpl doesn't really prevent Jen trolling addons
It just makes it unenforceable
so is ankh's code? 🤔
No, it doesn't
yeah that's why anhk doesn't have a thread here
Wait, no ankh does
that's also true
I mean, the rule doesn't say that code needs to be on github
it's not a closed source
you can download and see the code
well
unless Im misunderstanding it
I'm just trying to say you're talking to wrong guy, I'm not the person you need to convince
The rule does leave a little lax inerpretation
it depends on how the mods see it i guess
I usually interpret it as publicly viewable source code before download
but you can get viruses, etc from even just downloading a file. (0-click ios exploit, for example)
That is also my interpretation of similar clauses
Something you can clone from a git and see what it actually has in it
Before you do that
Well not if its an actual zip AFAIK. That's why you shouldn't hide known file extensions
Technically every steamodded mod is "open source" code though
As in it isn't obfuscated
right but u cant blame people for not knowing about stuff like that
there are a lot of poeple who try to mod the game who are not at all "technologically savvy"
well, some projects like #1276894022656462910 I dont feel comfortable posting on github, as it's 1-1 ported balatro source code
so that means its breaking the rule?
No. It's Windows's defaults fault
Well that isn't a mod to the game
and some projects like #1290310126921711716 are too small to be really considered a project
it is something you download from this server, which is the point of concern?
Well, kind of...?
Do not redistribute the Balatro source code.
Tbh that's... fine AFAIK. Lots of mods use parts of balatro code directly
last time I checked on github, there was a github project with the entire balatro source code, that was a fun find
Yeah there's that
yeah that is not allowed lol
But like. I think it means no pirating the actual game
It does, but It also extends to not shipping parts of the game as other things.
then I guess steamodded that overrides vanilla games functions is even worse 😭
It's a grey area. I don't think your project, or steamodded is disallowed.
I think I am out of the loop
it should be within the rules, as it is game's source code. within modding section
it's as if I only posted a snippet of it raw
because instead of having it in zip files, I can just post it in separate messages
I think it's fine in the context of balatro, but if you were to then advertise it as seperate from Balatro you might have problems.
I'm not advertising it for anything other than balatro tbh
No exactly
I think that's a good point tbh
I think it's a good idea to put the code on github though, and just referece balatro where necessary.
Yeah I don't usually like downloading mods directly from discord especially if they update it that way because like.. it seems horribly inefficient too. I'm the type of guy who would wanna push every thing once i'm done with it and have it be rolling when adding new features then just making releases only
Tbh making my own mod pack benefited me in that way just as much as being able to distribute it
I should really tell people how to clone it instead of only distributing it as a zip (and now Dim's manager)
It (manager) is far from perfect but it's good enough for me
I'm fairly certain the rule is just "don't obfuscate your code"
posting it as a zip directly doesn't matter, as long as you can still see all the code inside
(which is why Ankh is like. technically legal)
Jens almanac isn't shared in this server so I don't think the server mod rules apply to it. Also the rules just specify that the source has to be vieeable which it is
it is - #1262697083438235729 message
Oh well the zip is shared here so it's accessible by the peolem here
honestly i have no clue how he isn't able to manage github repos for his mods but
whatevs
yeah idk
I have a feeling its something to do with the whole "no one make addons"
rases problems though. Zips can't really be examined until downloaded, which could introduce viruses if it was a file posing as a zip.
I mean they are about as easy to check for viruses as a githuv repo
Possibly easier Becuase they can't change very easily where a repo can be changed at any moment
ironic since the consumables in the mod are taken from TheAutumnCircus
which idk if he has asked Lyman for permission to use the art. definitely don't see anything crediting him tho
Yeah attribution apparently is a requirement of the gpl when used properly. Though for code snippets I feel it's pretty optional in practice. The images though should be credited at least to the original project
I mean I left Lyman and itafayder in the mod authors for defused as well as everyone listed in that "expansion" which feels sufficient
i mean, here credit is needed because you're building on top of FusionJokers
same should be applied to Almanac's ThAC consumables
True though not exactly how I would word it v/ think about it
Commit history ?
Oh really…?
That’s very ironic…
I can overwrite commit history and also one commit could do a bunch of work that in one commit that makes it hard to tell if malware was added or not, (and that's even if you chrkc the commit history)
Hard, but not impossible
Nothings perfect but there’s no point trying to argue that discord is just as safe as GitHub.
I mean if your using githbu releases it's litterally the same as it's just an uploaded zip
I still think GitHub is much safer overall.
I've decided how to nerf wee joker, and this nerf will make wee joker more interactive and targets it's dependency on retriggers.
not the wee joker
Don't worry, it will still be overpowered but not instantly run winning when you get any form of retriggers.
I'm too afraid to nerf it any farther, the masses will eat me alive
I guess rare shouldn't mean anything /hj
What 😂
Rare shouldn't be the reason you can win a game as your only joker, have you seen the chips only run?
It is the best source of chips right now without question in my mind
but why? modding is a community effort, and doing stuff like this goes against that I feel like
jen's almanac itself builds off cryptid, then why aren't other mods allowed to build off it
That reminds me, I should put something up saying anyone can use my code
I agree! I was just giving context for the conversation
Building around a specific rank isn't easy imo. Idk my perspective is skewed. I have plenty of more consistent sources of chips and with the deck I play with usually have to play til ante 10 to win
The idea of just playing vanilla with a rebalamcing mod isn't part of my universe
But I'm sure it makes sense in that context
it's unfortunate that an add-on mod doesn't want any other mods as add-ons
Exactly
I'd be flattered if anyone wants to build off DeFused
This is like. impossible levels of lame imo
not saying it's that big of a deal but like. cmon man
That's why it's all optional, I'm making this mod for three types of people, those who want buffed vanilla content to compare to mods, those who want a new vanilla experience and those who desire a balanced experience. The config allows for all three of these wants to be met.
Personally i stand with the three of the desires i mentioned, but the one I stand with most is a balanced experience.
The change to wee joker is played 2's instead of scored 2's, removal of one synergy to hopefully add many others.
Hmm. Interesting
Only really synergies with poker hands under 5 cards
So not for me, but for at the very least all those brain rotters and mercurisns out there
I'm going to take this as a compliment? 😂
Neutral connotation tbh on the specifics. But complementing your grasp of GameDesign™️
I'm a proud brain rotter
Flusher all the way
flushing skibidi toilet till I sigma
Gotta have my Iuppiters
tbh that kinda makes me want to make something that builds off jens almanac bcos its like a challenge
Me reading this
so i want to get into modding
but chrome is deleting lovely injector whenever i try installing it
anyone know how i can get around this?
It should give you an option to continue the download
btw how do I get Cryptid to work with Proton?
I need to find the location to drop Cryptid and things like that
yeah i don't see it anywhere, it's just "delete from history" and "learn why chrome blocks some downloads"
Odd
try using a different browser - I know for sure that firefox works
never thought trying to mod in Kitchen Tiles would end up being this much of a hassle /j
ok this allowed me to get as far as getting the zip file in my downloads this time so that's good
ok onto step 2
ok i just allow this, right?
either that or disable windows defender completely yeah
there's a whole section about win defender if you scroll down a bit in the guide
a console looking thing popped up while the game was open, did i do it right?
that's the command prompt, it allows lovely, steamodded and other mods to actually output stuff
alright
having that open means lovely is working at least
now i just put steamodded-main in the mods folder, right?
AND THERE WE GO
so uh
now what?
does this mean i get to make kitchen tiles now?
What kitchen tile
Kitchen Tiles
"Stone Cards are considered Spades (suit changes every round)"
(preferably i'd want to go with how ancient joker determines the chosen suit)
how hard would this be to code?
as a starting joker?
That is so intense
Not too bad. You would have to monkeypatch/wrap/hook a function though
If this is your first time creating a balatro mod, I suggest reading https://github.com/Steamopollys/Steamodded/wiki/01.-Getting-started
trying to figure out how to add a joker rn
you absolutely do
the mod won't show up in the list
Do you have all the "-"s after and at the end?
Also idk if you have every thing for a header. I can't recal. It looks a bit sparse though
oh i did several things wrong i think
judging by that message
because i uh
understood none of that ;-;
I fixed the typo
Might be more comprehensible now
Basically just copy the exact header formatting from any 1.0 mod, including the stuff with all the dashes
does anyone know why my other half of the config isn't showing? i'm using the config from cardsleeves as a base
it's outside of the return statement and after it, I think
shouldn't be, lets find out
yeah I think I was looking at it wrong
the left side needs to be in a column node
nodes within nodes table need to be the same type to align the way you want them to
your first one is G.UIT.R (row), and the other one is G.UIT.C (column)
they need to be both either row or a column
:0 settings i like them but hate to make them cuz it just doesn't work lmao
No afaik
G.UIT.B is the most disappointing node to ever exist
IIRC u can’t give it children
hello i would like to decompile balatro to know the names of the states and actions so i can add a "press space" for next round
i get this when i run balamod with -d flag.
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PathNotFoundException: Cannot open file, path = '/home/user/.local/share/Steam/steamapps/libraryfolders.vdf' (OS Error: No such file or directory, errno = 2)
i am working in linux.
first of all balatro is not compiled until runtime
do you just want to look at the game's source?
yes
oh ok
you can view the contents of the exe using 7zip or a similar program
i use a file explorer extension
forget what its called
oh ok that should be faster thanks
w11 has native 7z explorer support hehe
oh sick
so do i like rename the exe as 7zip?
TC4Shell
no need
nope, you can just right click on it and hit open archive
on linux you probably do?
also
you rename it to just .zip
and open as an archive
oh linux
k good to know
huh? I mean no.... you just rigfht click and open with archive manager
or any number of other ways probably
oh I misremembered then. I think you have to rename on mac
so i found the cash_out function and i would like to know why simply calling G.FUNCS.cash_out() doesn't work?
i just want a SPACE keypress to trigger a cashout
It's much more complicated than you think
hmm interesting how so
You can find my implementation in https://discord.com/channels/1116389027176787968/1270746376312979456
oh thank you this is indeed super handy!
G.FUNCS table is used for functions that are run by interacting with UI elements (clicking, typing)
you can find exact place of it being used if you search G.FUNCS[ across all files
how do you scan across all files?
"i beat balatro with only scaling/mult/chips jokers!!!"
Do you guys think we can make a mod that reduce/skip animations even further?
nopeus unsafe is good enough
I haven't tried that, but the animations I have in mind are like these:
- cards flying in before title load
- main menu buttons flying in from bottom
- new cards unlocking
- the single card transition going in/out of runs
- blinds/cash-out/shop popping in/out from below screen
Mostly UI flying around
the only thing i can imagine speeding up the game would be to run batches of frames at once and only draw on the last one
which would speed up ui
and everything else
but like 3 times the speed for half the framerate is pretty bad
Yeah I don't think I know the UI stuff well enough to understand the technicality of this
FRAMECOUNTER = 0
local numFramesPerFrame = 3
local oldupd = love.update
function love.update(...)
for i = 1, numFramesPerFrame do
FRAMECOUNTER = FRAMECOUNTER + 1
oldupd(...)
end
end
local olddraw = love.draw
function love.draw(...)
if FRAMECOUNTER%numFramesPerFrame == 0 then
olddraw(...)
end
end
something like this ig
pretty sure animations are controlled by dt (delta time), otherwise having higher FPS would speed up the game
well yeah
that'd run 3 frames at the same dt as 1 frame so effectively 3 times the speed
although you could just run 1 frame at 3 times the dt
with little difference
yup
so you'll just be losing performance
there's a reason nopeus doesn't do it 🤷
So at best we can only speed it up, not skip them entirely
you can skip them
function Moveable:hard_set_VT() does that
every Moveable UI element has T and VT
T is "real" location/rotation of the element
and VT is "visual"
VT eases into T over time
which is the core of animations with this UI engine
that's what I do in cartomancer for jokers zoom
small difference is that CardArea has hard_set_cards that does it for me
So... memorable...
This makes a lot more sense lol, this is what happens when you try to look at someone else's code without understanding it 😅
you can search UIT = to see what's in the table
in source code
would help understand UI stuff a bit more
Oh yes this Will be so helpful 
Thank you so much!
Now I need to know if it's possible to give a description of a config by hovering your mouse other the toggle
You can have a description below a config option
Yeah but I want to write a lot for each one 😅
Kind of like a built in wiki
you can
I don't remember how but it's an option
Veeery memorable
iirc galdur has that so you can see there
that joker is memorable
Galdur and CardSleeves both have the description below the config I'm pretty sure
Oh no... too much memories
Is this a mod?
You could also hook the hover function I suppose
isn't info on hover?
Are you talking about the config menu?
damn
like this
strange that I remember there being a hover tooltip but that must be some mandella




