#đ»ă»modding-dev
1 messages · Page 149 of 1
I think it'd be possible to make a mod that patches ALL the other mods' code and replace number operations with Talisman bigints
I've seen people do some pretty advanced things with smod
The game source code is all in plane text
yeah lovely by itself is already arbitrary code execution
you still need to know the code to patch it though
I've suggested wildcard targets to be added into lovely for 0.8.0 so this would also be possible
lovely can never replace ALL integer operations with talisman bigints right
I've done byte code before it's a pain honestly
because it simply doesn't know what is a number and what is not
When I made a personal patch for Revanced
doesn't talisman already handle integer operations?
it's just comparisons anyway
I mean, for mods that don't support talisman and use regular numbers
you can patch number literals to be bigints
Only time I've seen byte code used is mostly for patching a binary
if lua can parse a number comparison, so can I
function test(lhs,rhs)
return lhs == rhs
end
how would you patch this
mind you, lhs can be a string, or nil, or whatever
same with rhs
I don't need to
if there's a number literal being passed in, I'll catch it elsewhere
table comparison always returns false
talis_int == talis_int returns false
no
pcall?
it has metamethods
I'm not saying that you shouldn't make this just saying that what you're making smod can probably already do and in a more simple to understand
metamethods can't override equality
[Lua question]
Is this break breaking out of the if statement or the for loop?
that's lua5.3
if can't be broken
LuaJIT has a special build flag to support overriding < and > with metamethods but not equality tests
even then you'll need to start replacing the luajit dll
I can think of a use case where you would need to check for equality on something that's a bignum anyways
but it does successfully overload comparison
it just can't compare numbers with tables
someone should make a mod to fix talisman saves
because i dont want to be the one to make TalismanFixer
sorry guys, ik i havent worked on it in months so maybe none of you still remember, but literally all of original sound got wiped along with my laptop's ssd. rest in pepperoni
yes i am giving up on talisman at the first sign of it being broken idc
I have a question
Is this wiki site (https://balatromods.miraheze.org/wiki/Main_Page) editable by anyone who wants to add their own mod?
the only thing left is the art, cuz i made it on my phone
that's Lua 5.3
Because it keeps telling me this
Anyone had this happen to them?
I am 100% sure it works, I've literally used __eq metamethods within balatro
literally all the jokers were functional, i judt had to finsibt eh FUCKIGN ART
gonna end it all now
i s2g
What is the lua equivalent of list.pop?
table.remove
I'll contribute in 9 years đ
How can a number be generated?
pcall, xpcall, #thing string.byte, right? What about the 3rd return value of debug.gethook?
balatro 6 will come out by then surely
wait no
balala 6
This is probably due to using a VPN of some sort, you can look for Miraheze support to ask for manual account creation
-# hi myst. S RANK ANBY IS FUCKING REAL?????
Otherwise, yes, you're free to add your own mod if it's released
-# like... qingyi???
out of those, the only one I've seen being relevant to at least one mod is #thing and that's easy to parse
-# RIGHT NOW LOOK AT SOCIALS
hold on sob
Oh, did I mention the necessity of patching ACEd save files for usage of old ints?
-# I MIGHT SKIP EVELYN
-# I AM HYPERVENTILATING
-# I KNOW YOU ARE
I dont have a vpn active and they never responded to my last email
being banned before even knowing of the service is somehow funny
okay gotcha. but this is a completely made-up problem
-# HEY HET WAITBA MINUTE FUCKING PLAYABLE PULCHRA??? WAIT WHAT
in CS, a lot of times it is the edge cases you miss that come back and bite you
Where can I find document explaining G.GAME.consumeable_buffer?
true
void foo(int* x,int *y){
*x = *y;
*x = *y;
}
Clearly there's no case where assigning to *x can make a difference, and nobody would mind if I removed the second assigment
the "clearly" is not sarcastic and actually it is true that you can strip the second assigment, but if you know C, you would say this instead
"There seems to be no case where assigning to *x can make a difference, except if somebody did int* x; x = (int*)&x;, in which case there is actually a difference. However strict aliasing prohibits such code from being valid, and all in all we can elide the second assignment"
how can I have different lua files for decks/jokers etc in my mod? is there an easy way?
if you make other lua files not loaded by the loader then you can load() the auxiliary files yourself
how
you would
love.filesystem.load("mods/custom/aux.lua")()
(I'm not sure if smods allows the extension to be lua)
thanks
love.filesystem.load is relative to the data directory, where settings.jkr resides
so this is how the game enables/disables HC colors. How would i implement this in to refresh/check/toggle it on game launch ?
assert(SMODS.load_file(âpathâ))()
thanks, i'll try it
... or is it? thing could be any expression and regex famously can't match parentheses
it can though?
again I wouldn't be trying to do this, I have no reason to. Talisman compat takes very little effort on the average mod's end
I'm just saying it's probably possible with Lovely given the addition of wildcard targets
this is where I like not being "minimalist". This effectively forces users to have the folder for a mod named a certain exact way
-# talisman does this
rip talisman
as soon as i can uninstall it im gonna this mod is cursed
baited into ruining my save file to try to make compat
eval G.PROFILES[G.SETTINGS.profile].career_stats.c_dollars_earned = to_number(G.PROFILES[G.SETTINGS.profile].career_stats.c_dollars_earned)
tis the only stat it actually invades
-# it was supposed to ignore it
either i dont load talisman and cant load or i load talisman and it saves over that
As someone who isnât fond of big number go brrrrr thinking, talisman changing money and hand levels to big nums is something Iâm not keen on
yep im never touchjng it again
cant be bothered to keep decent precautions for shit like this
me neither, its less fun if you're op
nd just arbitrarily change shit
overhauling how the entire game does math is a bit of a responsibility after all
if i cant trust that it wont break every five seconds im not usjng it
Only fun to be op after you've beaten the game
Which is why typically keeping mods off my main save
basically
I started modding because I got stuck in orange stake in red deck đ
I'm stuck on the hex deck
Game absolutely refuses to give me good joker cards for my run

any ideas to fix this?? watch the suit color tool tip on jokers. (also not sure why the cursor doesnt show in video)
It cannot match balanced parentheses without PCRE subroutines or balancing groups
In .NETâs regex flavor you can use balancing groups to match nested constructs.
fair enough
I still don't see the practical need for this, we don't need a more invasive Talisman, if anything it should get less invasive
I don't see the point in this either seems like smod but with extra steps
Wouldn't it be better to contribute to smod instead of making an entirely different system for people to learn?
we need conflicts = ['Talisman']
agree, not to mention a minimalist loader works for exactly the mods we have that only use lovely. For anything else the base game is too unmoddable to have any content mods without either one large coremod or separate API mods that land you straight in terrible user experience land
Like I'm not against the idea of new ways to mod the game a better mod loader would be great considering lovely injector doesn't like playing well with defender and other anti viruses
And no tell what other things it can trip inadvertently like anticheats since it's technically a game hack
But a clone of smod just more difficult seems pointless
lovely only content mod dont tempt me
i dont have to play nice with anyone else's bs then
byte patching can be used with smods or with aml
look, some slay the spire modding needs javassist's bytecode patching, so I'm making a patcher here as well
Not really the point I'm making what I'm saying is wouldn't it be easier just to contribute to smod. Like we have the games source code no reason to byte code the game that we can literally see what function does what
byte patcher is just a mod, not modloader
which is making smods like Windows, where every functionality is packed in there and sometimes many are bloat. I think modloaders should be like Linux where every functionality is its own mod. The obstacle is not too many mods, it is the lack of a manager like apt or pacman
this also helps with decoupling of different components
I like Linux too and would like to see more use it, but windows is more easier to understand for your average computer users than Linux is
I LOVE DEVS BEING ON WILDLY DIFFERENT ECOSYSTEMS AND NOTHING WORKING TOGETHER WOOOOO
skyrim with 4 different animation frameworks xdd
aml mods can be turned into smods mods with 5 lines of change
i will literally never use your modloader please stop advertising it to me
I'm not advertising it?
I'm saying my mods are not exclusive to the aml ""ecosystem""
no but
I feel like "5 lines of change" is more than "no lines need to be changed" making it exclusive
you know how theres already only like five mods that are baseline functional right now with smods and lovely and everything being CONSTANTLY CHANGING EVERY MINUTE
unless i'm misunderstanding
lets split that in two
I can write a python script to convert aml to smods later
your modloader gets two functional mods
smods gets three
players get a max of three mods
I'm not gonna say not make this I'm gonna say you should contribute more to smod
in the event that conversion is even possible, whats the chance of blind lucky success?
It would probably be better for future mods as a whole
never unless I use something smods outright doesn't support
i don't care how easy it is to do
I hook it up to MY IDE
players dont do it
I release both versions
no burden to downstream
the burden is everyone who has to deal with bug reports from Not Really A SMODS Mod Tee Hee causing 100s of issues because it doesnt use smods code
Should I use the event tech or just drag the highlighted part out of it?
sorry, nvm, I should keep it.
Is this adding a planet every frame?
javassist is a java patcher used in slay the spire modding which I used as an analogy, has nothing to do with my work
I just happen to have worked in sts modding before as well
Only per played hand, if I coded correctly.
no external dependencies
not java
not smods or aml
not even balatro
it's just a generic lua library
there are now 100 competing standards
Why should I use your standard over just using smods?
probably a good question to ask
I have this OCD which will make me irresistably spam PRs to smods and lovely to replace regex with CFG-based matching, make OOP BalatroGameInstance, make everything load on demand, etc.
This is really bad for me and unfortunately the only way for me to stay out of it is to not massively contribute to existing codebases.
if you are asking for a fair advertisement, it is probably the classic "good software design" features(that seem to be lacking in a lot of community projects; do note that I'm not implying this is objectively better, just that it more or less aligns with my ideas of good software)
decoupling, modularity, no feature bloat, full extensibility, no global pollusion, etc.
actually, unironically yes, if 100 is binary:
manual editing, smods, raw lovely, aml
yay no feature bloat and now every mod on the framework isnt compatible with each other bc they all implement the same things you're trying to not do
yeah i'm ngl
no feature bloat just means the mods will have to implement features which will just mean there needs to be a single mod that adds that feature and then other mods that use that mod making it a known dependency
which just means it's better for that single mod to be part of the original framework
that's the bane of the mods because tada they violated the single responsibility principle
I like the fact you didn't include balamod. It was never a standard
whatever im just blocking you
i dont know what response you expected to coming in here touting " I AM GOING TO DRAMATICALLY FRACTURE THE MODDING COMMUNITY BC I WANT TO "
I'm not trying to push my opinion, but the example I'm taking is that arch linux doesn't come with NetworkManager by default, even though literally every installation has it
god of course you use arch
isn't it literally because arch is supposed to be super barebones and have a bunch of modules you just add if you need them
See I get your point but Balatro isn't the kind of game to have an Arch Linux-inspired mod loader
arch is literally the thing i said earlier about dramatically different ecosystems
it's not built around modding and needs a lot of changes to achieve any sort of mod compatibility
no arch install is the same, hell if you ever actually want to do anything for people on arch bc being on arch tells you NOTHING about what that pc can do
I've been turning certain changes into optional features, so it's configurable towards what installed mods need in-place, but having to install 7 million add-ons just seems bad from a usability standpoint
Is it possible to rotate jokers upside-down?
something very barebones can work decently for a game that is mostly moddable on its own
which is why there are package managers -- if you need to install that many dependencies then something's very wrong
Yeah, the original framework is wack
that's fine but it's not a format I would want to maintain
yeah well the best package manager we have is github desktop
which is a problem I'll try to solve, alongside the lack of semver
I can't afford a server for a centralized mod repo however
mate nobody wants you to kill this community please
I think this is a classic case of if we ignore it it will go away
I mean yeah
Unless something major shifts, smods is already embedded in the community now
There would have to be something pretty dramatic to make people shift
which is not what htey're trying to emulate
good shot if you started working on this like a year ago
steamodded is literally the establishment now
mmm
This reminds me of Minecraft 1.13 the flattening
soemthign something down with the establishment
yeah i just dont wanna see the same bs happen here as in minecraft
doesn't minecraft still have like 3 different mod frameworks
that's not what I want to see either
forge fabric quilt
Just looking through I don't think you're supposed to replace the balatro file
can anyone name 1 mod for the most recent version of forge that isnt Create?
can anyone name 1 mod for fabric?
Forge, NeoForge, Fabric, Quilt...
who here wants to see the same happen to balatro?
0 people

Mekanism
the goat
I'm a Tinkers Construct freak personally... especially with the armor addon back then.
1.12.2 pack
I feel like 1.12 TC is better than modern versions but maybe it's just me
pretty sure it's mostly the same
Sky Factory 4
My only real experience with modded mc, but the most unforgettable one too
material effects got changed
as long as they made it worth to use the other materials and not just speedrun your way to cobalt and manyullyn, that's good
alright but yeah more ontopic i really think making "Balatro Fabric" is a dogshit ass idea
Maybe it's just me but I absolutely hate when literally anything get changed in videogames and when literally anything changed in UI design in any app whatsoever
except for bugfixes
minecraft could BARELY survive it
yeah, i'd rather not have to triple check every mod i want to hope it's supported for the modloader i'm using
balatro is way smaller
ramifications of something like this dont end at having clean code
AML's not going to release if that will happen
So then what's the point if it's not gonna be much different from the original but wiht a bunch of requirements for each mod because the function was removed from the base framework?
my take is that it just won't be relevant enough to get anyone to make mods for it
Just sounds like more work than anything
it will be like an "alternative frontend" -- you mod with one framework and your mod automatically works with both
so just a mod manager
simple: stdlib
I think when the justification for using this over smods was âI think itâs designed betterâ we can probably just let it drift around in a space where no one will look at it
also for some reason aml got into the conversation when it was all about byte patching which is literally ecosystem agnostic
Lots of people already have a hard enough time even installing lovely/smods and the mod of their choice, imagine them having to install all the dependencies and modify the game files too
it can work like linux and have a windows UX
smods is mostly a backend
it just also exposes APIs
and have hte dependencies pre-installed
I just canât see the populace picking up something that works that way
it's not used for its great frontend
Because no amount of windows UX shenanigans will skip over the fact that you still need to do extra work for each mod
and people won't switch to aml for a mediocre frontend with barely any backend
all the work is done by pacman
smods could exist in a way where all of its functionality is modularized
smods compatibility layer that's automatically installed if you install a smods mod
you just won't get me to maintain something organized that way
so... smods with extra steps?
smods with extra steps
but mods made for it need patching to work with smods
from what i gathered
Arch Linux with KDE Plasma is just like windows except for the backend
but the reason I like Arch Linux's design is it also works on a potato with only 128MB RAM
okay but Balatro doesn't
ok but it's NOT just like windows
it looks like windows but it's still arch linux and still needs you to download the dependencies and do extra work
for what is literally nothing
ebcause all you're doing is changing the back end to be omre complicated
Like I don't see waht hte benefits here are over just using smods
because Balatro is not a computer that needs a hyper optimized operating system
smods is objectively better if you play cryptid
I don't want to see a mods menu and have an API to add jokers if I'm only modding to fix a crash or smth so I make my own project
and I'm sharing it not in hopes of it being a competitor but just so that a hypothetical someone else won't also spend 10 hours trying to make the same thing
well that makes a lot more sense
the use case of that is literally what lovely only mods are
But you donât need smods to do that, you can just use a lovely patch
lovely patches can't expose APIs for other stuff without polluting globals
so... you're making a tool to align with your standards when the game itself doesn't adhere to them?
scope limiting makes sense when you're exposing a scripting API for a compiled game
most lovely mods put their "globals" in a table of their own anyways
me when i pollute globals:
how the hell do you intend to have an api that isnt global
fuck good is that
yeah so i'm pretty sure my entire mod got wiped out when my laptop broke
still gonna make it tho
I Just Have To ReCode Everything Again
This change is goated
Holy Shit Kill Me

ikr the old page sucked
name clashes can exist unknowingly
Anyway I don't want this to sound like me trying to defend my sometimes questionable beliefs or imposing it on other people and their projects, I'd close this conversation with some final words: Since it's futile trying to change the world to fix every past mistake, I just try to create an incomplete, but nicer parallel universe. It need not substitude or interfere with the original one, but at least I get the peace of mind while I'm in it.
Quick question: is this Doable?
yeah sure
There's code to handle jokers tilting from mouse over, maybe you can copy some rotation code from there
oh taht's fucking fantastic
Which file though... (Currently digging through moveable.lua)
hooking into Card.update seems to change the rotation only when the card isn't aligned to a card area
so probably need to get into CardArea:align_cards as well
Are u sure it was the entire laptop
Probably recover the files
fusion jokers has a joker that flips upside down
If the drive isn't damaged
reload the page
i want to add a layer on joker (to draw joker enhancement đ€Ș ) and current effect is, if not dragging the new layer fits perfectly, including card's tilt, but if dragging the new layer isn't lagging behind (fixed to cursor's position) and not rotating đ€ how to fix
Does the sidebar collapse properly? I noticed it wasnât doing links properly last night
it just does this now, no collapsing
the spacing looked weird so i decided against making it collapsible
đ€
...the ssd's fucked
There's still a possibility you can get an os to recognize it long enough to pull files from it
possible to make them spin?
-# don't mind the changed rarity badge, i have that in my testing mod for some reason
Try running a lite Linux distro off a USB
And see if u can get the OS to recognize it after booting into it
-# thac used to change the loc for "Jokers" to "Jonklers"
Ubuntu isn't lite but it has away to run the os without installing it
I mean any live usb should work
Ubuntu one that I could name off top my head
That and Linux mint
Just download the iso use a program like Rufus to flash it to a USB
Hell you could probably unironically use your phone to make a USB bootable now
sprite:draw_shader('dissolve', nil, nil, nil, self.children.center)
@violet void you should be good to contribute now
and do join the modding wiki discord server
myst you should join
Just join
How do you know
The password they sent doesn't work
you sure you got it right?
im copying it directly from the email along with the username
better to just write normally
found two bugs so far with pot of greed card
can't view deck with it in ur deck or the game crashes
peek deck crashes the game
guess this is the next thing I gotta fix
So that wasn't their discord server, I'm sending a new email and hopefully I'll manage to get in
pictured here the right leg
huh that's weird
I didn't change the text
all I did wasw change the sprite sheet
oml it is wrong in the main file

there we go fixed it
ok guess now I should work on making scape goat
need to find the function that makes random joker cards
Interesting chat about aml and bytecode patching. It reminds me that I've got a sketched out plan for semantic patches which are able to parse Lua syntax trees to do what they do, but it's been in the back burner for a while. In general I try to develop features that people need and that just hasn't been the case with regex.
There's an inherent fragility with text parsing that's always made me somewhat uncomfortable. This is improved by bettering pattern specificity but there's always an undercurrent of "I'm asking for n to happen rather than telling it to do n" if that makes any sense.
If I have the time this weekend I'll look into maybe using something like treesitter and its selector syntax to inject patches.
local _card = SMODS.create_card({ set = 'Joker', area = G.jokers, key = 'derek' })
would trhis create a random joker card?
no
what would be the best way to create a random joker from a consumable
like judgement?
you need a buffer if it requires to have room
would I need to do a local_vars and do a return { vars = { card and card.ability.
and give it judments ability
hello chat, im getting a crash when checking if a joker has any edition, says its attempting to index a nil value, but like, thats kinda the point of it so idk why its crashing
if G.jokers[i].cards.edition then --check if edition exists
if not G.jokers.cards[i].edition.negative then eligibleJokers[#eligibleJokers+1] = G.jokers.cards[i] end --if it does check if its negative and make it eligible
else
eligibleJokers[#eligibleJokers+1] = G.jokers.cards[i] end --no edition means it cant be negative so its eligible
end```
you're doing G.jokers[i].cards
đ„Ž
: Imagine a Space joker, but slightly better.
: Uh huh.
: And then a Constellation, but way more powerful.
: I'm listening.
: Now put them together-
do you know Magic: the Gathering
Heard of it, yeah
Ah I had made some custom fan HoloEN cards
Goddamnitwhydidntyoutellsooner
do you want to see them, or some of them
Let's just say some of them.
I guess i'll figure out the random card generation think some othewr time
time to break from coding lol
Iâm pretty sure thereâs a utility function thet does this let me find it
wdym accumulate?
I store the planets in card.ability.extra.bag_of_planet
As in {'c_earth','c_ceres',...}
yhyh
exactly! I always think text is always the form and the AST/bytecode is the content. Kind of like the view vs the model in MVC. On this topic, I'm currently working on my own programming language + computer, which takes on this problem by storing all the source code as preprocessed AST with metadata to minimize compile time. This allows you to customize the syntax much like how you customize the toolbar in browsers, meaning the same program can look like Java or Lua with just a skin change
I donât know why this function is still here, it should 100% be in utils
tales from the world of cross-mod patching: i just made Pokermon evolutions keep my Joker Stamps
i was tempted to ping you, lol (referring to metherul)
noice
JokerEvo so good they keep the stamp on evolution too đ
How do I do extra badge (other than mod and rarity) like pokermon type?
pokermon source code is kinda confusing.
After I think
I can send you one later
Though maybe Steamodded has a better system now
Actually let me try to send it now
for a Joker
Thank you.
sord
dahgar
knoife
quick question! not for anything im doing as of right now, but out of pure curiosity, is there a way for a joker's effect to check on unlocks/discoveries?
like an effect that only triggers once per save file, or an effect that grows depending on discovered jokers
that would be so OP đ
why does the boss pull back the cards đ
its like the boss is ripping the cards out of your hands and burning it on the spot đ
The cards tried to escape lmao
What {C:} should I use on any consumeable?
I'm currently using attention but doesn't look right.
try something diferent: Use X:attention,C:white
just for fun
Looks great
thats for spectrals tho
does anyone know the list of text formatting things?
thanks
Damn I'm working in pre calculate for cryptid main
hmm
Isnât cryptid being converted?
double check it, it might also be there in pre-better-calc
Yeah but we are waiting for refactoring to be done
how do I do a radom number between 1 and 4 inclusive?
I donât understand why youâd continue making stuff for the old version then when you can just make it for the new version and it doesnât need updating then?
Because
pseudorandom([any string as you like], 1, 4)
Idk how to work the refactor branch is cryptid
thanks
But what happens if I just try 5o call the calculate function
how do I remove a joker? i'm trying to look at dagger and madness but the code isn't making sense to me
this is what i get for learning godot instead of lua
A risky way is to just tell them to :start_dissolve().
How do context work
thanks, that worked!
Then how do I use a custom context temporarily
All I need is to run something though calculate function from add_to_deck function
Can you specify more?
Why can't my stupid brain understand this
i'm trying to make a joker that destroys all the other ones and makes new ones (for the silly) and that second part is working but the "destroy all others" isn't
It's a cryptid thing that for scalae to scale jokers it has to scale In calculate but right now it scales in addtodeck
also what are the arguments in create_card for?
Add to deck and calculate do completely different things though, I donât understand why youâd need them to interact?
add_to_deck defines things that would happen when this card/joker is added to your deck.
As far as I comprehended, you need to call card:calculate inside add_to_deck, is that right?
Yes I'm asking if I can do that
And in the argument context if I but something like scale
Can I do in calculate context.scale
Just use {key = value} and your calc func will receive a context where context.key is value.
In context
So card:calculate(self, card, {key = value})
Almost
card:calculate(card, {key = value})
Well, I try to do my best.
if G.jokers.cards[1] ~= self and (G.jokers.cards[i].area and G.jokers.cards[i].area == G.jokers) then
if G.jokers.cards[i] ~= self then
G.jokers.cards[i]:start_dissolve()
end
end
i think just turn if not into if and ~=
with the for loop obviously
Also contain all of that in if #G.joker.cards > 1 then
Also also, remember to check if the i-th joker is eternal or not. Pretty sure ceremonial dagger code has it.
ok
do y'all think a joker that disables the boss blind buff would be a rare?
Some, or all?
i did something and now it works perfectly
all
i moved destruction into the ending_shop context
How can I mute game/ set game speed with code
Because if all, it's just Chicot.
"Chicot, the most forgettable Legendary joker"
I need to store games speed aND sound settings set them to a value then them back to what they were
Ah yes, the weakest legendary
idk what to do with the Wraith then
Have you checked engine/sound_manager.lua ?
What if it was a weaker version of Chicot? It does the same thing, but every time a blind is selected, it switches plaecs with a random joker
Chicot with a downside? Maybe uncommon.
fair
SMODS.Joker {
key = 'wraith_jk',
loc_txt = {
name = 'Wraith',
text = {
"While in your deck, disables the boss blind buff."
}
},
unlocked = true,
discovered = true,
atlas = 'Jokers',
blueprint_compat = true,
rarity = 3,
pos = { x = 3, y = 0 }, -- Ajuste conforme necessĂĄrio
cost = 10,
config = {},
add_to_deck = function(self, card, from_debuff)
-- Desativa o buff do Boss Blind ao adicionar o Joker ao deck
if G.GAME.blind and G.GAME.blind.boss then
G.GAME.blind:disable()
print("[Wraith Joker] Boss Blind buff disabled (added to deck).")
end
end,
remove_from_deck = function(self, card, from_debuff)
-- Reativa o buff do Boss Blind ao remover o Joker do deck
if G.GAME.blind and G.GAME.blind.boss then
G.GAME.blind:set_blind()
print("[Wraith Joker] Boss Blind buff re-enabled (removed from deck).")
end
end
}
It is working, the thing is... If i sell it, the buff does not "come back"...
I thought it would be easer to bring the cards back after the victory was calculated
I have no idea how to make this work lmao
Do what
This joker is supposed to make the boss buff go away (and it does indeed go away) but, when i sell it, it should activate the buff again
but it just does not do that
The buff?
yh
What buff?
debuff:
"all spades cards do not score", "must play five cards" etc
.
.
Does Chicot reactivate the debuff when sold?
Chicot Bento
That means you'll also need to define a remove_from_deck function for your joker.
nvm, My eyes were confused.
yes it does
Yeah see what Chicot does when removed
that's the only thing i found in card.lua
Are you sure selling Chicot during a boss blind reenables it?
Maybe it's possible to hardcode it for vanilla Blinds but I'm not sure there's a general method to do it
that's the bug:
remove the remove_from_deck
Hello, I was wondering if someone could help me find the lua code to a card like ceremonial dagger or hologram joker. I am making a joker that gains Xmult every time a joker is destroyed (it itself is not destroying jokers)
WIP
I assume you have access to source?
If yes, open card.lua and ctrl + f to search for either of the jokers you just mentioned
no thats sorta what I was asking about im not exactly sure how to find the source code
that's the file ur looking for
yes
go to the lovely folder in mods/ and open the dump folder. That's what you should be looking for
OH, I see thank you
Hey, how do I get a pos of a joker?
if context.setting_blind then
local valid_jokers = {}
for i=1, #G.jokers.cards do
if G.jokers.cards[1] ~= self and (G.jokers[i].area and G.jokers.cards[1].area == G.jokers) then
valid_jokers[#valid_jokers + 1] = G.jokers.cards
end
end
I think that should work to calc the number of jokers... but i want to switch pos with the self joker and 1 random other
if #valid_jokers > 0 then
then idk what the game uses so i can check the pos, chose a random, etc
check out Paperback (@tepid crow)
because there's no built-in functionality for that
okay thank you
Why did I get tagged đ
how much knowledge of lua do i need to add say a single custom joker
do i need 2 be some kind of wizard
you've explained to me how you did it in Paperback
okay
Ah đđ»
Imma go ride a bike, if some1 help me out feel free to tag me so I see
Does anyone know a tutorial on modding balatro becasue I can find any
how do mods do these config tabs in the mod list?
i've made a config.lua file but idk how to make a config tab that shows it in the mod list
See https://github.com/Steamodded/smods/wiki/Mod-functions and https://github.com/Steamodded/smods/wiki/UI-Guide
phwoar what a beautiful config menu
how would i go about refreshing my smods config tab? ive already set it up so i have a button that changes the nodes inside the config tab, but the changes only apply after leaving and re entering the menu
Kid named lovely module. DebugPlus doesn't pollute any globals and has a public api. https://github.com/WilsontheWolf/DebugPlus/blob/master/docs/dev.md#api-basics
declaring something in the name of your mod counts as pollution because I seriously doubt you'd check if that name was already taken
okay so how do you solve it?
exports table gets recorded. Then aml.require()
aml checks for mod id duplication and errors out in that case
so you still have a name you need to check
nope; aml is not in global scope of the game
aml is only in the global scope of the mod code, which is isolated
sure but your require still needs to check for conflicts in names
more like they're checked when they're loaded(which happens regardless of require) but yes, the check happens once.
so if lovely paniced if more than one mod had the same require it would also be equivalent in making sure there isn;t conflicts
how do i check if a card has a certain enhancement? I want to make a Joker that retriggers wild cards twice
Is there an easy way to have enhanced cards destroy themselves like how Joker cards can destroy playing cards? I can't seem to figure out how to destroy them that allows for triggering jokers that trigger when cards are destroyed
i managed to do it with a context actally lol
Im trying to make a joker that opens the shop after skipping the blind. How would i make is so the big blind select isnt there
thanks though
if context.setting_blind then
local valid_jokers = {}
for i=1, #G.jokers.cards do
if G.jokers.cards[1] ~= self and (G.jokers[i].area and G.jokers.cards[1].area == G.jokers) then
valid_jokers[#valid_jokers + 1] = G.jokers.cards
end
end
if #valid_jokers > 0 then
local other_joker = pseudorandom_element(valid_jokers, pseudoseed('wraith_swap'))
local temp_pos = { x = self.pos.x, y = self.pos.y }
self.pos.x, self.pos.y = other_joker.pos.x, other_joker.pos.y
other_joker.pos.x, other_joker.pos.y = temp_pos.x, temp_pos.y
print("[Wraith Joker] Swapped places with Joker: " .. (other_joker.loc_txt and other_joker.loc_txt.name or "Unknown"))
else
print("[Wraith Joker] No valid Joker found to swap positions.")
end
end
Idk how to get a pos for other jokers, and I cannot find any git or doc talking about that... Any ideas?
I only started getting this error after changing to bettercalc
what are you swapping the positions for? you can just drag them around
It's a nerfed Chicot. It disables the boss debuff but swithces places randomly with other cards
hows that a downside?
Well, if u got blueprint or something it can be a mess
you can just mover them back though?
and it would suck to rearrange the cards every time
ik
I just don't want it to be the same as Chico but it makes sense with the ghost that it's based on (Phasmophobia mod)
But it is just chicot
im going back to old smods
whats at that line?
Only started happening when I tested this joker on new calc
works fine on old calc
it even had the same error after I removed juice_up so something weird is happening
have you got the no juice up crash?
Juice up nil method or something
what if card = card? That crash happened to me and that solved it
you dont need card = anything in new calc
Alright, thanks for the heads up, you saved me half an hour of errors since there are like ten card = card in my code
i downloaded smods 2 days ago, how do I know if I'm on old or new calc?
I mean sometimes you do (mostly in context.individual in my experience)
If your version is 1304 or lower/older, it's old-calc. Otherwise, it's new-calc.
yea
I think the only use of it is to juice the non-scoring card (which would be useful in individual contexts)
yeah basically juices the joker on playing card score
can use juice_card for that too
potato tomato
hi how would i go about adding a font to the game? i don't understand the documentation is asking me for
I am trying to destroy some cards held in hand and after checking the SMODS function it should be entering G.hand.cards right? But its not entering in my if
there's a bit of wonkiness there, I opted not to use destroying_card for areas other than G.play because it would break existing code including vanilla
you should use context.destroy_card
here is the code for the joker
if context.skip_blind then
--print("ran")
G.E_MANAGER:add_event(Event({
trigger = "after",
func = function()
G.STATE = G.STATES.SHOP
G.STATE_COMPLETE = false
return true
end,
}))
end
It works now, thanks!
Would it be possible to make items in the info_queue variable? I have this implementation right now but it's trying to find .copied_key in P_CENTERS which obv doesn't exist
G.P_CENTERS[copied_key]
why is the third arg center
The tutorial that got me into this used center there
oh joy
well the base class name is center so it could go either way
Hey man don't shoot the trainee
just making clear what the difference is
center in loc_vars is a cryptid thing, right?
cryptid does do that
Probs where the tutorial picked that up then
dumb question here, how do I check if a card played is a lucky card?
if SMODS.has_enhancement(insert_card_here, 'm_lucky') then
-# this is the smods version that accounts for quantum enhancements and not what the base game would use without smods
I'll try that. Brb
i should make a joker that makes grass cards also count as glass cards and vice versa
Grass Cards:
X2 Mult if outside
nah they gain chips while held in hand
you can watch grass grow in my mod
damn I wanted to watch paint dry tho
oh no wait there's a problem with this
smods does this....
wiping out the gained chips from the quantum Grass card :/
how does antimatter always show as negative even in the collection?
Changed where the card reference is being stored from the joker config to a G.GAME var since there shouldn't be a case where multiple Bootlegs don't share a target. How would I make that variable save so it doesn't break on reload?
i want to have a joker do that
good luck
Thank you
sorry i meant good luck scamming people
m
hello chat, i'm trying to make a deck texture pack, and it works mostly fine, except that if high contrast cards is enabled then the 2-10 cards use the normal HC textures instead of the modded ones, any idea what the problem could be? J-A are replaced by the modded ones just fine, its just 2-10 that aren't, and they all work correctly on LC.
key = atlas_key..'_lc',
px = 71,
py = 95,
path = atlas_path,
prefix_config = {key = false},
}
if atlas_path_hc then
SMODS.Atlas{
key = atlas_key..'_hc',
px = 71,
py = 95,
path = atlas_path_hc,
prefix_config = {key = false},
}
end
for _, suit in ipairs(suits) do
SMODS.DeckSkin{
key = suit.."_skin",
suit = suit:gsub("^%l", string.upper),
ranks = ranks,
lc_atlas = atlas_key..'_lc',
hc_atlas = (atlas_path_hc and atlas_key..'_hc') or atlas_key..'_lc',
loc_txt = {
['en-us'] = description
},
posStyle = 'deck'
}
end```
if it helps
Does anyone know how to create a deck with the latest Steammodded alpha?
Here's the documentation for creating decks if that helps https://github.com/Steamodded/smods/wiki/SMODS.Back
great wiki image, thanks
thank you john smods
(as a reminder, you can stop links from embedding by enclosing them in <angle brackets>)
I'm aware
cat
Why would I ever want that to not embed 
i offer no further resistance
Are there any developer utilities for balatro modding other than making warnings shut up by doing something along these linesif not SMODS then SMODS = {} end
do you mean in your code editor?
Yeah
there might be general lua ones?
I already use general lua ones, I just want to see if there are any other tools specifically for balatro
fr tho
I just consider the warning as friends at this point
I think @edgy reef was working on this? Can't find a repo for it or anything htough
If you're talking about warns as in "Lua diagnostics" then there's already built-in ways of handling most warns (adding workspaces specifically).
Unfortunately this doesn't work for everything because Lua assumed statically-typed code and Steamodded / Balatro source code are more dynamic typing.
I can get some typing and autocomplete support for SMODS but that only goes so far.
anyone know?
Do you want a joker to always have the negative shader?
pretty much
its always gonna spawn as negative (cant be bought) but i also want it to look negative in the collection
It can just be Negative in the collection
set_ability
and make it give itself the Negative edition
draw = function(self, card, layer)
card.children.center:draw_shader(ânegativeâ, nil, card.ARGS.send_to_shader)
end```
This will make it always have the shader applied
No, it's a different method
That way you donât need to force the edition (unless you want to ofc)
I mean he said he wanted to
Huh
(not in calcuate or anything, just in the SMODS.Joker for it)
which i guess is obvious from the calculate right under it
Try removing draw and using set_ability
set_ability used to have always having an Edition as example
That should 100% work
I was literally writing code that did this earlier, let me find it
like this?
like in the function's () ?
draw = function(self, card, layer)
card.children.center:draw_shader('negative',nil, card.ARGS.send_to_shader)
end
this 100% works
maybe I mobile typed it wrong before
is +1 discard per round and gain +3 chips when using a discard balanced for a vanilla rare joker
so set_ability = function(???) card:set_edition('e_negative', ???) end
seems weak
honestly might be more chips
+5 could work
I guess
with 5 discards thats +25chips scaling
+5 was what I was thinking
wee joker can do better with a little bit of work
thanks!
I have no idea why the version I typed on mobile didn't work đ€Ł
it's exactly the same, right?
oh is it the '?
yeah looks like it
thanks mobile
well, if you want it to actually always have the negative edition then that wasn't necessary ;P
actually kinda is bc i want it to show in collection as negative too
again
I believe it's just supposed to look negative
the set ability stuff works in collection too
it can have the Negative edition in the collection
mhm
set_ability is called whenever the card is created
but now you can make it a different edition đ
ok how'd you do that
when you get it in-game, in the collection, when you load a run
i mean yeah
like this
what if it instead gain +3 chips when a 3, or 9 is discarded
It has something to do with 3s
Does anybody know how I could get my custom G.GAME variables to save?
Easy enough change to code, too
They should save by default, unless those variables are tables in which Balatro helpfully wipes them out when you exit a run
If you're specifically trying to save cards, you could consider putting them in a hidden cardarea, because the game won't wipe out cards if they're in a cardarea
Any ideas how to fix? crashes when I try to testit
missing a comma after the second color = G.C.Chips
well that wouldn't fix it
idk thats what the problem was for me when i was having a simular crash is all
change your joker_main return to just chips = card.ability.extra.chips
on the other hand I can't really spot the issue
I think the new calc doesn't like get_id()
oh probably missing a card argument key (but try eremel's solution)
I believe its an error with that
https://github.com/Steamodded/smods/wiki/calculate_functions#step-3-returning-effects see here for what you should return
No the return is fine, but I've gotten a similar error every time I've tried to get id of a card that's not played
it's not
I'm pretty sure it has to do with one of your returns, not with :get_id
it is 100% the second return that uses chip_mod
I changed it and i got the same error
Is G.P_CENTERS.c_earth equivalent to G.P_CENTERS['c_earth']?
i think so
try throwing a message_card = card in the top return then
it seems the discard context doesn't correctly auto select the cards đ€
uh oh
That helped, thanks
hyperx is running a slightly outdated version of smods
it doesn't work for me either
it doesn't crash or it doesn't work and therefor crashes?
it crashes
says it doesn't have a card to display the message on
but the way the system works is that it's guaranteed to have a card
oop
wdym, I downloaded the newest
well we can both be right
if you downloaded newest 2 days ago, it is no longer latest after an update
(current latest is 1323b)
Why Does it not work? I just want to make it loose 25 instead of gaining
try lowercase m_lucky
also, I think your first return can be simplified to this?
return {
chips = card.ability.extra.chips
}
I was talking about your first return
well, it says "ERROR"
I don't think thats that I want
really???
the loc_txt???
i replaced the calc return
yh it just gives error
show the new version of your code
is that even a new screenshot? đ€
maybe I forgot the coma
chips = card.ability.extra.chips...
yup
I'm so confused what did you change đ
I changed the message and then control z (didnt change nothing hahaha)
I sent what u asked lmao
LMAOOOOO
but you didnt do the change he told you to do?
I changed, but nothing changed.
Alright, one more time. Change the
return {
chip_mod = ...,
message = ...
}```
into
```lua
return {
chips = card.ability.extra.chips
}
I'm just trying to use the easier to read, easier to change, and smaller in size formatting
chip_mod requires you to define your message, chips doesn't
ah
still ERROR
what version of smods do you have? đ€
hmm đ€
I don't think anything got fixed in the meantime
can you try updating anyway?
where is it saying error?
on top of the card
which card
that's your bottom return
etc
the top return is the chips the joker gives
that's the bottom return đ
forgor
I thought you were talking about the top return still lol
forgot it doesn't need card = card too
good catch by eremel
my bad đ
I'm assuming k_downgrade just isn't defined then?
đ
do you know how to define that?
no... but the thing is, I'm mainly learning by the ExampleJokersMod git, and there he uses this, and it's the only time he uses 'k_duplicated_ex'
but there's that.
ok I fixed with message = localize { type = 'variable', key = 'a_chips', vars = { card.ability.extra.chips } }, but it shows +25
What is the default value of blueprint_compat right now? I thought it was true yet just found out smods doc says false moments ago so I guess it'd be false but I want to make sure before making huge change to my mod.
It was false last time i tested it
false is the default
code says false
false
in case you weren't sure yet, I think it's false
why are you using card.ability.extra.chips instead of .chip_loss?
i tried both ways, but since I'm a moron i'll try again
that's alright I can be a moron too
what do you want the message to show?
-25, since :
card.ability.extra.chips = card.ability.extra.chips - card.ability.extra.chip_loss
oh see I'm a moron
than we
try -card.ability.extra.chip_loss in the localization?
you want the key to be a_chips_minus too iirc
i thought of that but since it showed a var i dindn't think it was possible đ
ooh that exists? that might just work without doing the -
iit is +-25 now đ đ đ đ đ đ đ
I'm trying to mod my first ever joker, there's 5 of them exactly
how do i add assets
fire
it works
perfect
if i change context.individual and context.other_card to context.poker_hands would it count only the played cards?
add and context.cardarea == G.play
k
if context.individual and context.other_card and SMODS.has_enhancement(context.other_card, 'm_lucky') and context.cardarea == G.play and not context.blueprint then
that's a big if
so my initial idea was:
When blind is selected,
sets money to $0
This joker gains X0.05
Mult per $1 lost
(Currently X1 Mult)
i know how to mod the xmult in
but i dont know how to set the money to 0 each blind selected
how would you make a deck using the ink and colors custom suits?
i just had a card replacing deck in mind and wanted to make it
No table saving huh. How helpful :/
check how wraith sets money to 0
is there any lua that has wraith in it
cant find it in moddedjoker
is it in card.lua?
yup
got it
Hi folks, how do I check if the card I'm selling is a planet?
set property
wait hold on
whats the full code for it
https://www.balaui.dev im using this and then ill mod the Atlas after
you know its weird idk how i did this, it took me like a day of intense research and quick bug fixing
but ive had some of the foundation already layed out by some other modders
not really a dev question, but I need some ideas for the Jinn joker...
-# Phasmophobia ghost
Ah, this is wrong because card.set will tell this joker's set, not the planet sold. How to access the card being sold?
calculate = function(self, card, context)
if context.selling_card and card.set == 'Planet' and not context.blueprint then
self.ability.extra.Xmult = self.ability.extra.Xmult + self.ability.extra.Xmult_gain
return {
message = 'Conquered!',
colour = G.C.CHIPS,
card = card
}
end
--the part of applying the xmult is working
end```
does something great when you have a spectral card in the consumables, is bad when you don't
great idea
i thought of doing something with spectral cuz of the lightning but never came across this
hello! i have an inquiry, is there a way for events to play in sequence, without allowing other events to play inbetween until theyre all finished? here the regular game events cut into the time heathcliff is supposed to be losing his mind, and one of the text boxes is completely missing because of it
this also happens if heathcliff's events are set to
blocking = false
change the trigger to before
