#⚙・modding-general
1 messages · Page 15 of 1
I tried copying the entire thing, but it throws error at self for some reason
It doesn't need to be in the init function, maybe that's it?
It is even worse outside the init function
Could you push your changes to github? I'll take a look
pushed
The function is in the wrong place
This works (but I removed the other jokers and sprites just for testing)
Does anyone know the name of context of drawing card from deck?
Why isn't this X6
It's not my mod, I don't know
X6 would be perfect for the devilish joker ngl
Is there even a context like that?
So, I want to get started into modding, is there one modloader that is easier than the other to mod on ? (from what I've seen most mods are on Steamodded ?)
this is what I'm trying to achieve
nice catch, iwll change
Steamodded
Can custom jokers be made eternal/compatible with blueprint in SteamModded? I have two jokers I have made a mod with in SteamModded but can't seem to make blueprint compatible or eternal compatible despite the variables for both being set to "true".
with eternal compatibility you can just check a field when declaring the initial items
i forgot the exact field, ill go look for it in a second
also yeehaw
its eternal_compat
as for blueprint there's an entire context for blueprint allowing you to omit certain pieces of code from being copied by blueprint
a random planet is weak enough to give it 1/3
i was thinking about that
wasnt sure the odds to try for since you do get a good bit of discards on certain decks
eh, its probably more fun as 1/3
besides, there are enough 1/4 rolls already
I already have eternal_compat and blueprint_compat initialized as true for the jokers, but how to make sure they can be applied?
im not really sure how you would check for that myself, to be quite frank
i didnt even know about blueprint compat either lmao

The relevant initiation code for the jokers:
--[[SMODS.Joker:new(
name, slug,
config,
spritePos, loc_txt,
rarity, cost, unlocked, discovered, blueprint_compat, eternal_compat
)
]]
--
local jokers = {
unlucky_crow = SMODS.Joker:new(
"Unlucky Crow",
"",
{extra = {x_mult = 1 , x_mult_add = 0.1}},
{},"",
2, 6, true, true, true, true
),
lucky_swallow = SMODS.Joker:new(
"Lucky Swallow",
"",
{extra = {x_mult = 1 , x_mult_add = 0.1}},
{},"",
2, 6, true, true, true, true
)
}
iirc i think custom jokers are a little buggy with blueprint at least in regards to the tooltip being displayed?
i mean this should be correct
there is a bug in steamodded, the function that injects joker data doesn't inject blueprint_compat/eternal_compat
so it defaults to false
I just tested this and this is the case for me
Blueprint says its incompatible, but it works anyway
had this issue too, fixed it locally, too lazy to do a pull request though 
so does that mean you have to declare them manually for each one if its not declared?
or does it mean you cant init the jokers at start up to have different eternal_compat/blueprint_compat values
not sure if I understand you correctly
SMODS.Joker has the necessary fields, it's just that they aren't used in SMODS.injectJokers()
adding them somewhere around lines 60-70 in joker.lua (where the other SMODS.Joker fields are used) fixes the issue, at least for blueprint_compat (didn't test eternal_compat properly yet)
Oh I getcha
Is there a reason why when I install a mod (specifically Jelly's mod pack) there's either no text in the description of a card, or it reads error where the name of a card/joker should be? Did I install something incorrectly
Hey guys, for those of you who are familiar with SMODS and Balamod, is there a way to inject a customized function to the game that does not use either (in function definition), if they don't contain any code that uses dependent function?
I am asking because I am currently working on a quite generic function that allows you to add your own card backs to the game, and after getting most of the thing sorted out I realized that it basically didn't use anything from SMOD or Balamod to work, only edits stuff related to G. I currently wrote the function as SMODS.INIT in order for it to load, I wonder if anybody knows any alternatives
just so that this can be used by both mods with minimal compatibility issues
Yes, but you'd need to call your function from within one of the existing game logic functions
won't that be worse since I have to edit the game itself?
No. If you're using balamod you can inject a call to your custom function using the inject function
laziness wins again
also hi tails i remember you from uc
so is it possible for me to write it as a global function like function myfunction() and use stuff like SMOD to call it?
You would add that function call to SMODS.INIT.ModName function iirc
so theoretically I can do something like
...
end
(another file)
SMODS.INIT.CallMyFunction()
myfunction()
end```
am I right?
then where should I place this function
It shouldn’t matter
in the same directory of all SMODS?
In your mod
yw
btw, is there anything in G that I can use to store some return value from SMODS.INIT.somefunction?
or I can just define a new one
Define a new one
I'd like to get into modding but I was wondering if there was some documentation on Steamodded and the Balatro environment, specifically in regards to the structure of some of their global variables like G (which I assume is the game object) and SMODS (and how it interacts with G)
i dont think theres any good official docs yet, best bet is looking at what someone else did and start from there
but a lot of coding examples can be found in the games source code
As for SMODS (the global object for all things steamodded), you can have a look at the loader's source code and docs here. When it comes to the game itself, you can extract the game's executable (Balatro.exe) with 7-zip as it's an SFX, and have a look at the source code from there
local thunk did a good job with his coding
another useful place to start is simply other mods, this should show what functions might be important to hook into
no one has really made an effort to document these, so that's your best bet for now
Does anyone maybe know where jokers like "Drunkard" edit the discards / the Hands?
Can't seem to find anything...
Ooohh, is it just in Card:add_to_deck()
If there is a h_size or d_size on a joker it will just do this?
if self.ability.h_size ~= 0 then
G.hand:change_size(self.ability.h_size)
end
if self.ability.d_size > 0 then
G.GAME.round_resets.discards = G.GAME.round_resets.discards + self.ability.d_size
ease_discard(self.ability.d_size)
end```
Nevermind, h_size is the amound of cards youre holding
Is it possible to rewrite a function or something like that that already is in the base game with Steamodded?
You can redefine the function entirely in the mod, but that'll cause potential issues with any other mods that are modifying the same function.
You can add code to the front or end of a function and have it still be compatible. An example with overriding the base costs:
-- Handle cost increase
local set_costref = Card.set_cost
function Card.set_cost(self)
set_costref(self)
-- Jokers for Hire
if G.GAME.starting_params.mmc_for_hire and (self.ability.set == 'Joker' or string.find(self.ability.name, 'Buffoon')) then
-- Multiply cost exponentially with counter
self.cost = self.cost * 2 ^ for_hire_counter
end
end
Since it still calls the base function in the reference part, it won't mess with other mods
It's probably a good habit to store the original function's return and then return it at the end, even if it doesn't matter in some cases.
is there a way to debug with terminals so I can use some good old prints?
You can run the game in the command line with balatro --console
how do i do that on windows?
^tried a few variations but so far no luck
Open the command line and navigate to the directory where the game is stored
cd C:/path/to/Balatro/folder
yeah within the folder i couldn't really call balatro --console or run balatro --console or anything along the line
you likely need to call .\Balatro.exe --console
oh you are right, thx!!
I finally made this joker's functionality with a lot of help and support, it took us two custom sets of contexts to get here...
Nice man !
Does it work on reload save ?
It shouldn't reset it's xmult value when you reenter the save if that's what you're asking, yeah
That was what I was asking 😉
the boss blind activates this?
boss blinds activate face down cards, so yeah
with the fish you can always play blindly and with each hand X-Ray will basically recieve and store x1 mult
that's an op joker ngl
yeah but also very situational
Could also add an effect like "drawn face down card are flipped back up"
you pick it and hope to get the right blinds (or additionally you can specifically reroll blinds for yourself)
I get what you mean, but that kinda ruins all the fun with these blinds imo
basically disables them
literally a joker that says "disable every blind" is in the game
though yours is a common x)
yeah but it doesn't add anything besides that
I thought you meant that it will both have multiplier and disable the flipping?
Yup that's what I meant
I still think that this is less fun and kinda more op
Hello! Im Oscar, first time modder here though I'm still trying to understand all the things I'm seeing in the files, have coded other things but never a mod. I have a little question, does Balatro use a specific rich text formatting or did the creator just code it himself? (dont know if its a stupid question) , can i see anywhere some rules for it?
Hope u have a good day/night/evening y'all.
Really cool concept, but seems either useless 90% of the time or really damn good against that one boss
I think maybe the concept of face down cards should be explored more it's a cool idea
Ok there are a few that make your cards face down actually, 2-3 bosses I think
The multipliyer stays even after boss blind, it is not resetted
so if you got for example the fish at like ante 3, you can pretty much get x3 or more multiplier for the rest of the game
Ohhh that makes it way better lol, situational but at least you can make the best of it, though it would HURT to fight the fish and then get this in the shop after lol
Oh yeah 😭
As multiple people mentioned earlier, you can kinda brute-force your way to increase mult by rerolling bosses
meh, it's clearly not broken, I think it's good as a common joker
reroling blind is not free
I cant wait to download 1000 different balatro mods to see what happens
(my computer couldnt handle it lets be honest, I cant even record without slideshow mode)
surely nothing will go wrong
Me thinking about adding as many custom jokers as possible once Ortalab is done + ReShuffled
Surely the game will be balanced with this many jokers
Surely
surely having 1000 different jokers in the game without any form of balance whatsoever wont backfire
and surely they wont conflict with eachother
i do try to balance my stuff thank you very much
Well with 1000 mods not all will be
Why does HE get to call it while I don't ? >.<
(It prints nil)
I'm just trying to show the seed even though it's not setted
can you really call taking money and triggering The Wheel of Fortune every blind "balanced"
yes 
I wonder what will happen with different tarot changing mods
Is this too strong for an uncommon? 🤔
needing to get the 4 lucky cards in deck AND draw them AND have them trigger is hard enough
4 lucky cards triggering in 1 hand has a less than 1% chance
Yes, but I also have 2 other Jokers in my mod, one of them retriggers all lucky cards and another gives +1 to all odds whenever a lucky card does not trigger, resetting every round. That makes the odds a lot better
okay, but you still have to find the jokers in shop after the fact
basically im saying i think its fine
Yea I agree
hello there peeps. I'm pretty new to Balatro and enjoying the game. I was wondering if there was any way to somehow copy over the files for the mesmerizing backgrounds to make a live wallpaper?
its not that strong
but its cool
the backgrounds are made with custom shaders, so it's not really one thing on loop
ah dang. thanks anyways
np
is there a function in the game that tells you what stake the run is on?
you can always tell by looking at the stake near the blind score. I suppose you can also kind of read it from there
the stake is stored in G.GAME.stake as a number, 1 being white stake etc.
Blueprint doesn't copy Credit Card joker 😭
ty
yeah, i wrote a function that appends every card back file (as long as you use the right prefix) to the OG file all together
i will put it in modding chat shortly
hello hi
%appdata%\Balatro is where the save file is located iirc
is profile just stats? or is it also unlocks
i forgor what meta is and profile should be your stats i think
do you know if it matters in what order
Hey guys I've put the cardback injection mod in a thread in the modding. Any feedback is welcomed!!
Hi, I made a custom rare joker that gives x3 mult if played hand contains (at least) one scoring 8 and one scoring 9. Do you think it's balanced?
yeah, seems okay
can someone create a Balatro programming language and call it Buffoon
btw, is there a way to add custom sounds with steamodded or otherwise? I see that play_sound will always look for sounds in the resources/sounds directory and so it won't work if I give it an absolute path to the sound file in my mod's folder. I suppose it would work if I were to manually copy the sound file to the game's archive, but it would not be maintainable that way.
Is there a way to copy the files there when the game loads, or to let play_sound work with a different path altogether, or something to that effect?
someone please make the custom joker in nl's new video 'the toker (joker smoking weed) +420 chips for high card'
https://youtu.be/f2avcqXqBF0?feature=shared&t=3798
Wishlist Balatro on Steam: https://store.steampowered.com/app/2379780/Balatro/
This video came from my stream on March 13th, 2024. Catch me live from 9AM-2PM PT every weekday here: http://twitch.tv/Northernlion
If you enjoyed the video, please consider hitting the Like button. It helps me out a lot!
-------------------------------------------...
Stuntman 2
I imagine that the joker will look something like this
if anyone knows how to disable finisher blind bosses or change the number of winning ante i will appreciate it. mostly editing the decompiled code myself
Changing winning ante is easy. G.GAME.win_ante = 10 or whatever
How would one approach making a custom edition?
I got to this point
which is basically copied set_edition function with a few words changed & rearranged
Jellymod has custom editions so you could see how they do it
does it? can't find anything in its code
(aside from huge edition-related chunks of code ripped from the game and modified(?))
its readme also doesn't mention having custom editions
rework because i wasn't happy with the other effect
Does this debuff the first non-debuffed joker or just the leftmost?
clever idea: like a weaker version of the final boss one but weaker
Does anyone know how to remove the exlamation mark from modded unlocked jokers?
an idea for a boss : jokers can only trigger 1 time, would be difficult to implement tho
just wanna put this here before i sleep: has there been any attempts to make jokers that has the same debuff effect as boss blinds? For example, to force player play 5 hands or it will not score, and prompt the user the same way as boss would do on screen. I've been looking into blind.lua but it felt quite challenging because i'm not sure how much of the above i described can be directly borrowed from the blind code without using blind datastructure
for The Psychic (and similar), the game checks if the hand would be debuffed when it is played (line 608 in state_events)
so maybe that's a place to start
btw base game jokers only affect one thing
huh?
just a design point to keep in mind of
this affects two things
- played cards with [x] values
- played club cards
I kinda wanted it to be "Affects circles in both suits and numbers", but that description would be confusing I think
Or do I need to make reward the same for both sides? (suit and number)
I'll note that "card of X suit gives +8 mult" already exists as an uncommon, and that's without any chips bonus.
oh yeah damn
Maybe I should do something like "+3 mult for circle in each card" and it will give:
+3 mult for Club
+2 mult for 8
+1 mult for Q, 10, 9, 6
if you think about it hearts have two circles
if you think about it everything is a circle
Just imagine the meta of switching your localisation every hand to maximise your score
wait does localization modify things like numbers?
also if you think about it, it calculates circles of icons, not the text
Yeah I actually checked and it doesn't. Mostly wondered about the Q but that's the same in all lanagues too.
what language does not use the normal counting
depending on the font it can have a circle or not
Yup I know
damn wild cards will probably ruin this idea
why ?
or any other thing that makes one suit count as other
ah yup, you'll have to check the base card if that's possible
Is that possible tho?
idk I didn't get too much into that
I mean I can probably check a vampire or something for that
Pretty easily, just check .base.suit directly instead of :is_suit.
usual modding shit
me fr
if you do this remember to also check for Stone Card
What is the check for that?
self/card.ability.effect == 'Stone Card'
Probably want context.other_card.ability.effect for the stone card check I'd think
yup, that is currently checking whether the joker itself is a stone card
?
it is ~= not ==
ohh
nvm I misread
(but I playtested and it worked correctly even with self check lol)
because the joker is never a stone card lol
hm
so 6 and 9 are +1 mult and 8 is +2 mult ? also queen I guess
"each loop"?
yep, and clubs count too!
oh suits count
that's cool. Not sure how this should be worded but I think I prefer the short description
Maybe I should do "Each circle in suit and number of played card"
number is suit
sorry for necro but could you please elaborate on where the card.lua file is, and how to access it?
figured it out, used balamod to decompile the game
you could just open balatro.exe in any archiver like 7zip
oh
is there a list of all the internal card/pack names somewhere I can reference for creating decks?
game.lua
+mult when playing exactly 8 cards
and, uh, would I expect that to be somewhere in the game files, because I am not seeing that anywhere in them, not in the game files or in the compdata (on linux). Is that dependent on Balamod perhaps?
also idk why it is game.lua
it is actually under localization files
if you're looking for names
they asked for internal names which are present in game.lua
ah didn't realize they were looking for internal names, my bad
did I miss that piece of direction (to unzip Balatro.exe) in some guide somewhere?
thank you for clearing this up!
whenever you play a card, 1 in 2 chance to increase its rank by 1 (ace becomes 2)
I made this for now, need to test this and probably will increase xmult
that is interesting too
maybe like "X2, -X0.1 whenever you enchance a card"
so it isnt worthless once you find it when you have like 3 enchanced cards
X2, X-0.1 for every enhanced card in your whole deck maybe then?
since it's similar to vampire
this is more like ramen I think
either 3x or 2x but only cares about enchancements after purchase
hmm no I kinda want to also count the cards you already have
alr
2x is low for removing a lot of your deck improvement options
could even try 4x tbh
but if youre going the -0.1x per card then 3x
I like to combine balancing with design
MISTER BEEEAAAST
???
I was thinking a blue multiplier could be fun but wasn’t sure what would trigger it. Maybe +.1 per straight flush played? First mod on this though so it may take a bit
Is that description scuffed? Other jokers like vampire don't tell you about what is joker's base mult and simply show current mult
vampire can't go back, this can
Yeah
But I think that the very first line is confusing
like it tells you that it is X2 mult while it (most of the time) isn't
(also I should stitch together first two lines)
Yeah I think it works without the starting line. X2 is at the bottom
thing is, the (Currently X[mult] Mult) (should) autoupdate
so it might be good to list base xmult
Could do “base x2” after the condition between the dynamic number
I think it should read
X2 Mult, -X0.1 Mult for each Enhanced Card in full deck
The "loses" here makes it sound like it permanently decrements
oh yeah
absolutely crazy with blueprint
yeah now it works correctly I think
Incredible
It'd be fun to make joker that has bad xmult
Yeah I'm thinking about one
I'll see what I come up with
fixed, 4/7 sprited jokers done
so I have cassette, mosaic and nuke
Nuke could do something around destroying cards
something something "After scoring played hand is destroyed, upgrade played hand by 2 levels"
There’s one in Ortalab mod that can do that
tryin something new
epilepsy warning btw
Wouldn't this remove all your cards after playing like 12 hands 🤔
probably overpowered
yeah but you can either:
- play high card
- play something and then sell the card
- have a constant source of cards (?)
also is there an eternal tag on regular cards?
destroying cards is often a benefit
Maybe you could make it that the first hand of each round gets destroyed instead?
so you buy this, destroy all your bad cards, sell it
and then you lose because your deck is emptied lol
that's fair, yeah
you can just leave 20 cards and play your exact hand 4 times each round
never actually got a chance to play highcard run but always wanted to
kinda think it should not work with hands containing less than 3 scoring cards, there is no risk/reward with high card
maybe not last but 2nd ?
feels like oneshotting enemies won't scale this at all :/
this seems really broken, just play a bunch of flushes from all but one suit for a few rounds and sell, flushes are now more likely and super high leveled
thinking about it, it looks broken on some 5 cards hands too yeah
what effect will go well with "destroy all played cards"?
oh wait
what if it also did some kind of reset on levels when sold?
perharps it could save its buffs and then remove them
that could be interesting, because then it could be a huge buff that then later becomes a huge burden you have to work around. Almost feels thematically like a nuclear fallout too.
played cards or scored cards? big difference
I think played would be better
oh and the last part is if you lose the joker in general right?
yeah its unclear, instead you should do smth like "lose all gained levels when destroyed"
I did this for now
How do I download the mod thing for balatro without windows saying no
you can disable security of windows
Is this legit..?
I want to make sure because windows keeps saying it's a virus
yes
you can say "keep on my device" to windows defender if you're fast enough
so no need to completely disable windows defender if ya don't want to
you drop the Balatro.exe on the Steamodded exe
oh
drag & drop
Yeah I went there too
20minutes getting it to work bcause I'm stupid
I used powershell installer because of this 😅
noice
block achievements
yup*
?
but you have an achievement enabler
i don't see why not
though some mods are incompatible with each other
mainly JellyMod
which one is more popular steamodded or balamod?
most mods are Steamodded
How do I get every card at hand in SMODS.end_calculate_context(context)?
or played cards in the same context
hey does anyone know how hard it is to make a mod for balatro?
depends
on what?
on your knowledge of programming and on what mod you want to make
i have a fair amount of programming knowledge, i'm a little rusty though
Does anyone know?
loop through G.hand.cards i believe
I need to get cards when they are already scored
yes that
local text,disp_text,poker_hands,scoring_hand,non_loc_disp_text = G.FUNCS.get_poker_hand_info(G.play.cards)
I was just looking at this line
how do I download mods?

ouch got beaten to it 😛
It triggers before the score for some reason
Alternatively, maybe there's context for cards getting away after they scored?
are you implementing a feature where cards are destroyed after played and scored?
yep
context.after is that
I want to do something similar actually
i don't remember if scoring_hand is passed through during context.after
answer: it is
boop
does anybody know which part of the code handles the debuff hint for the psychic blind?
wtf windows detecting a trojan in the steammodded????
I was looking into Blind:get_loc_debuff_text() but I don't think that is the right function
ignore
also I have no idea what it destroys
but if you aren't comfortable with that, install using Lovely
the break prevents the loop from running more than once
isn't this what you want with break?
oh oops
I copied that from other thing and forgot to remove it

it still destroys cards before scoring
they still count tho
you might need to do it in an event for it to work properly, look at hanged man for reference
It doesn't detect it..
looking at it right now
I mean it does the right thing
it destroys the cards correctly
but timings aren't quite right
so I don't see how hanged man could help me in this situation
i just figured it would be useful
should I play mods on my unlock all profile?
yeah I used it to reference start_dissolve() thingy
back to the beginning of conversation huh? :D
.
yeah will try now
I didn't test it yet because instantly switched to context.scoring_hand
where is the modding folder located at?
%appdata% I think
This turned into some kind of thanos snap, removing cards from all over the place and then resulting in error lmao
if you want the timing to be different, use an event
theres no event for card removal, an event basically just times stuff in the game
like you can put whatever you want into an event
and have it trigger after x seconds
theres a lot of examples of it in Card:use_consumeable
oh no that's probably not what I want
Can I add fields to the card structure?
I thought I could use a function that makes cards disappear and make a context out of it
Wait, isn't that card_emplace?
i thought emplace was used to put cards into a cardarea
I think it is used for card movements in general
...or maybe not lol
yeah I think it is for cardarea only
which function do I need lol
it was so funny playing hand and then getting literal ash instead of cards
I'm downloading every mod I can find 
So , i wanna make a mod where it plays a sound depending on the Poker Hand you pull.
Any resources/guides on what modloader to use/ how to use? (sorry, really new at making mods )
Also, i've no clue about lua, i do know c/#/++, python , java , js.
look for play_sound
I think the problem is you are deleting stuff midway through loop
like you are iterating through a list and you start taking stuff away while iterating
might be better if you record all the cards and delete them at end of hand
I'm trying different approach and want to find the function that moves cards when it's done scoring
But I have no idea where to find it honestly
instead of going directly into G.hand.cards
My first thought was to find play button, see which function that activates and so on
but I'm stuck
maybe try creating a table that puts card object from G.hand.cards in?
and then iterate through the table for dissolve?
is G.hand refers to lower part or upper?
Is such thing even exists?
can't find that in source
maybe G.playing_cards?
are we talkin about hand deletion
oh you too are suffering The Phantom Card issue?
What???????
YES
YES I DO
help!

i wish i knew
let me actually read what youre goin for and see if i can offer some insight and we can pool our brainpower together
I REALLY need to know what's the function for moving cards off the screen after they scored
or if it uses draw_card
is there any mod out there that adds joker stickers into the gameplay?
so here's the snippet i used that almost works?
if self.ability.name == 'Fortuno' and not context.blueprint and G.GAME.current_round.hands_played == 0 then
if context.other_card:is_face() or context.other_card:get_id() == 14 then
return nil
end
local card_to_destroy = context.other_card or nil
card_to_destroy.getting_sliced = true
G.E_MANAGER:add_event(Event({func = function()
(context.blueprint_card or self):juice_up(0.8, 0.8)
card_to_destroy:start_dissolve({G.C.RED}, nil, 1.6)
return true end }))
ease_dollars(self.ability.extra.dollars)
return {
message = localize('$')..self.ability.extra.dollars,
colour = G.C.MONEY,
delay = 0.45,
remove = true,
card = self
}
end```
important thing to mention
this is all under function Card:calculate_joker(context) local ret_val = calculate_jokerref(self, context) if self.ability.set == "Joker" and not self.debuff then if context.individual then if context.cardarea == G.play then
so im using context individual here, which does score them before deleting them!
What's the "almost" part behind this?
so one of the folks playing my mod posted this screenshot
🥺
OKAY OKAY
which is strange because i recall it not acting like this? at least with one
how to find this god damn function
two i can understand, and im not sure how to prevent that but!
any ideas?
for discard?
er
for destroying
for cards going brrrr off the screen
when they scored
OH
this will solve it I swear
context.end_of_round?
that's for end of the round I suppose
lmao
cards go brr every time you play them
not only at the end
if you're talking about the little shuffle animation that happens after you played a winning hand
well actually if you don't care about visual effect
you can just do the deletion at the end of round since it's not going to be replayable within the round anyways
do let me know if you get it working
ill need to figure out why fortuno is borked as well
im thinking about something along the same line as well
no, like if you play a card,
then it does things like mults,
and then when it finally scores
they get removed from the screen and then after that you get next cards from the deck
I know the function for getting cards from the deck, it's the emplace thing
but for thing before that?...
so after the hand discards but before the "draw" step
hmm...
discards or plays yes
you might need to have it be checked at two different spots then
with another effect that makes you play 5 cards at a time
try getting discarding to work
what is x-playing joker?
it's a reference to the tv series "High Card"
if i understand this correctly, whenever you get this (presumably temporary) joker from something else, you have infinite (small) hands until your deck runs out?
right, but i want to make it so that you must play 5 cards at a time
so that you only have 6 cards and 5 goes away, meaning that you cant save for big combo
making the infinite hand a lot more balanced (I think)
and my idea is that with X-Playing Joker you can play a high card and transform to use that particular card's ability
kinda fitting for my card tho
Added to the modding suggestions list: #1210670452716994600 message
looking forward to working on this stuff! thanks for blazing a trail.
wew
yeah get used to that
this is how i learned about Negative cards and the ???? hand
well it might be one of the stronger joker among 52 jokers this card can transform into
also meaning that you kind of have to draw spade 2 at hand 1
hey im here for it
so the tv-series(anime series) is basically saying that you can use each card's ability by "playing" it
christ that is wordy
only recently got the custom card back working, so ideally it's gonna be a deck specific joker with 52 transformations that won't appear in shop
I know! but it's actually probably the minimal words to describe what it does
it throws away all discard, adds infinite hand, temporarily limits hand size and gives you psychic debuff (not in text yet)
but I'm trying to find a way to make the debuff happen without changing the blind you are currently on
how put code for selecting hand stage?
my intended effect did not work, and when i play a hand it crashes, probably suggesting that it is not triggered until calculation stage
I wonder where these type of code fit
every modded item in any game based on an anime has to be wordy its in our blood
(i swear i disabled ping
)
thank you!!
Why not make hand+1 instead of 6, if you have 7hand size it's a nerf
context.other_card```
triggers only scored cards, but not played, how to fix?
yeah the og design comes from the fact that the gun has 6 bullets
context.individual only triggers with scored cards
Hmmm I see
really struggling with the selecting hand alert right now
stuff like Vampire and Midas Mask loops through full hand via a loop
for k, v in ipairs(context.full_hand) do
...
end
does SMODS have something that does stuff during game state selecting hand?
i don't think so

ty!
am I stupid?
Making a list with played cards and then incinerating all cards from list at the end of the round
but I think I did the loop wrong?
for i = 1, #trashlist do
trashlist[i]:start_dissolve()
end```
this part
insert v not k
now this works I think
but it gets dissolved many times for same cards
is there any check I can use for that
i believe it's because you're adding the same card for every step the game calculates
tried this
try using the same context checks as Vampire
any of you guys created a new blind to replace the boss? i disabled all but the wall.. but the wall as boss after ante 8 is insane. i want some slower scaling
any idea how I access this from the function it calls ?
(the name of the var is "args")
you can set it to 1.5
args.contents[2]
you are right, but cannot find the wall configs, i see the disable parameter in blinds.lua
but idont see the whole boss in there
Yeah okay, I figured it out, it's nil because of the G.GAME.seeded and current_seed or nil
im leaning towards a more traditional gameplay
iirc it's in game.lua no ?
@rare shell @dusky reef I think I figured this out?
if you do get it to work, make sure to also try it with multiple copies of it
oh yeah true
thanks guys now the wall is doable for more friendly normie gameplay .. but still have a problem. the wall is the only boss allowed but its overwritten by finisher bosses
multiple copies seem to work fine, what should I expect to not work?
interesting. i didnt know lua indexed at 1 for the first entry in a list.
omg sorry for pings im new to discord. (i usually just voice w friends)
rate my build
don't worry about pings lol
yeah everything in lua starts with 1 I think
🥴
So idk if hands_left can ever be negative. But it might make it more compatible with other mods and potential game changes if you perform your check on < 1 instead of == 0
I hate that it doesn't have things like +=
besides that it looks good
just more so to check if it didnt try running the deletion code again after the card was already deleted by an earlier copy, its a problem i ran into
so you just delete all the cards at end of round here?
i guess that gets around my issue of having them deleted as the card is scored
All the cards that were played at the end
aye
Hmm, what if this didn't delete cards multiple times because I used local value for table?
instead of config value which is connected to each joker
look at local trashlist = {} here
another thing i would try testing
actually nevermind
yeah I switched to ability right now
or should I revert that
actually
yeah okay
try testing it with glass cards
see if anything funky happens if they break
the second potential loop would still re-hydrate your trashlist from the context object. I would sooner suspect that dissolving the card removes it from context.full_hand
easy test. log context.full_hand after your second loop
i was trying to think of a way that you would some how alter a card that would be put on the trashlist here and glass is the only thing that comes to mind
I'll try
anyway I think I can just make a nil condition
if that will happen
but still wondering if that will mess things up
to prevent calling dissolution on a nil? id be surprised if nils are allowed in the hand which is what youre hydrating your trashlist from
id imagine that would make it horrendous to deal with the hand. youd have to nilcheck every object every time... i dont think you need to worry about that
I think the point here is that card can disappear before I remove it
sorry idk if im being helpful. good luck with your mod!
right, but your reference is collected from the hand. so you have a reference to the object. your reference should keep the underlying object from being garbage collected... i dont think another thread can nil it
eh idk lua. maybe
god this is so annoying to debug
did you see my modding suggestion? imagine how much that is gonna suck. Im going to be nagging here for help often! 🙂
but think of the fun!
would this work to disable verdant leaf and other finishers ?
function Blind:get_type() if self.name == "Small Blind" then return 'Small' elseif self.name == "Big Blind" then return 'Big' elseif self.name and self.name ~= '' then return 'The Wall' end end
I'll check it in a second
oh no guys help
I just made the boss blind effect work, but I run into a problem that when i lose to this effect and restart a game the debuff does not go away
you have a small bug here. theres no fallthrough condition for when none of your paths match. youll want to return some default value, otherwise you put out nils
where should i put safety code to prevent this?
i reverted then, thanks. im gonna keep looking why the game calls the finishers on final ante
and attempt to disable them all /replace them by the wall
i can get the wall to be for ante 7 but 8 its always verdant or crimson etc
function Blind:get_type()
local type_map = {
["Small Blind"] = 'Small',
["Big Blind"] = 'Big'
}
return type_map[self.name] or 'The Wall'
end
would this work for your purposes?
@hidden pollen okay so I checked your idea and I kinda like that, it's like two fortune-tellers game
Yeaaaah. its going to be very hard to do. but it will be awesome
i think I can do it
If you're going to do it for real, I wish you luck!
thanks!
should i replace this codeblock with that?
function Blind:get_type() if self.name == "Small Blind" then return 'Small' elseif self.name == "Big Blind" then return 'Big' elseif self.name and self.name ~= '' then return 'Boss' end end
thats my suggestion yeah.
it just fixes your small bug about not defaulting
nothing crazy
what is the function to increase level of hand?
I can't find planet cards for some reason
i moved max ante to 2.
and after finishing ante one i go back to ante 1 again with this code
`
function Blind:get_type()
local type_map = {
["Small Blind"] = 'Small',
["Big Blind"] = 'Big'
}
return type_map[self.name] or 'The Wall'`
Interesting? Not sure how the game determines ante so im no help to you!
Is there a mod in the works that makes the game have a higher integer limit? We dunno if that'd be possible by like, having it be a double double value but
Also is there one for a "baby mode endless" just, so we can crush it lol
you were already a lot of helps, thanks
Okay
why does doing this :
local Orginal_Game_start_run = Game.start_run
function Game.start_run(args)
Orginal_Game_start_run(args)
end```
Just remake a new game >.<
if you click continue
i assume start_run literally means start a new run
it literally calls the same function but when I do not redefine it it loads the continue and when I redefine it it makes a new game
Does the original function have a return value?
No clue then 👎
local Orginal_Game_start_run = Game.start_run
function Game.start_run(args)
return Orginal_Game_start_run(args)
end
``` doing this still resets the run if you hit continue
my gosh
I could still always redefine every other function that calls the G.Game.seeded but it's a real hassle
I'm pretty sure it's because the location/environment it gets executed in is different that the base game
how about a tutorial on how to add custom jokers? haha
you need to change the dot on the second line to a colon, and add an additional argument at the start called self to the third line
local Orginal_Game_start_run = Game.start_run
function Game:start_run(args)
return Orginal_Game_start_run(self,args)
end
Look at the example mod on steamodded, as well as other joker mods
like so ?
exactly
Okay, so for the ";" I understand but what does the self do ?
(it works btw thank you very much)
it's part of lua's oop functionality, the colon is just sugar for making the first argument self
Game is a class. Classes are containers for a bunch of state.
when you do . on a class (with a : ) you are acessing something on that class. when you call a function on a class, the language will automatically give you a reference to the class.
if you want, you can pass a different reference. or call the method without initializing the class by giving it an instance manually.
thank you guys I fixed what I wanted to do
Won't it create a conflict with mods that also modify this function to do it this way?
how do you guys debug anything? If I launch balatro --console, no print statement shows up. Also it says that it failed to connect to steamodded's debug server so I can't use that either apparently
i use what is provided in debug folder of steamodded
basically drag the python script into the mod folder and run from there works for me
woah I made selling reverting the levels gained first try
ah I see, I didn't realize it was a python script. Thank you
I just inject into card:remove_from_deck and then check for the ability name, I don't think there's a context for it
does anybody know how to do a full reset manually when starting a new run?
has anyone managed to add a shop before the first ante??
I am running into a problem where I set and reset debuff just fine from one run, but when I restart a new run the debuff is automatically applied, and also not via the statement I wrote (didn't trigger the print I had before I set the debuff)
I suspect this debuff is leaked into some carried over data and I wonder how we can force a restart fresh and pure
why would it ?
Am I doing this right?
That's not how I did it, but I think it could work 🤔
It doesn't 😅
I was making remove = true before
but it triggered whenever anything was destroyed
you don't need a context for this, you can just do it directly in remove from deck
You forgot to check if the joker has been added to the deck as well
with if self.added_to_deck then
Because this function also gets called in the shop I believe
does Balatro have steam workshop support?
Is that good?
(still doesn't work)
Why do you check for G.playing_cards ~= nil?
doing some testing, it doesnt seem to add the two vouchers, only one
{dollars = 1000000, joker_slot = 9999, voucher = 'v_overstock_norm', voucher = 'v_overstock_plus'}
but still no luck
context.blueprint_card should be self right?
I'm not sure then 👎
it has "or", so it works anyway
it works when sold
but not when destroyed (I'm destroying the card using Hex)
i didnt even think about spectral cards
Anyone already tried to create a joker that modifies the effect of tarots/spectrals ? I feel like it wouldn't be too hard to implement an alternative effect but I'm not sure if a card can have two different localizations
Someone did inverse tarots or something like that iirc
Tried to destroy joker using Ceremonial Dagger, still nothing
It is time to use play_sound!
thinking about doing something along these lines btw.
(yeah it would be insanely broken, should be rare)
you would probably have to hardcode that
yeah by doing some stuff with next(find_joker('Trick or Treat')) in Card:use_consumeable
guys any way of randomizing the color of the ante bosses? at least for one boss?
I'll see what I can do. I have many other jokers to implement anyway
probably easy yes
boss_colour = HEX('8a59a5')},
how to add logic to make it random between all the other colors i can find there
so one can mimic other bosses colors
@strong falcon if self.added_to_deck condition was preventing the trigger
Oh, weird
are you like modifying the source code or doing a mod ?
source code.
welp gl with that
my modifications are fairly simple.
why play_sound is the most reliable debug tool, post №1924
oh is it a bad thing?
yeah now everything works as it should
learning about sendDebugMessage() saved my life quite a few times ngl
I probably no longer need context.selling_self tho since it also triggers that
imo, would be simpler to just use Steamodded for these kind of things but you're always welcome to try
but are you implying its harder or prohibited? english not first language
I think it's harder yes
doesnt steammoded is crash prone tho?
not hard to do, but hard to distribute
never crashed with it unless my mod did something unintended
but you could always try to have a table of hex and choose randomly one with lua
same
should work
how would that work? adding all the code to a .lua ? i dont understand steammoded
how does it know what to replace
I think it just executes the lua code you write so you can replace, add things etc
if everyone modified the .exe it would be impossible to have multiple mod at the same time
right, will take a look. in any case if you feel like help me make a blind boss have a random hex i am intersted. thank you
me getting 100 ectos and making every joker negative
Perkeo goes brrr
How do i change the main files of the game can i just make a card.lua and it will override?
finally
nice!
it is actually not very op despite the idea of infinite hand is kinda crazy
because if you play an invalid hand you won't get the hand back
This is going to cause so many problems 😔
idk how it would be possible but i would love a joker that can copy the effects of two jokers you select
pareidolia quadruples all listed probabilities?
hm.. seems tricky UI wise
Yes it does
I love the idea
or not since its not a value
Yes it does
It is stored inside an extra valuable inside the game code
And everything within a jokers ability config gets doubled
oh shit that might be good for something im trying to do
perfectly balanced effect indeed. Well it actually would be balanced in normal runs, then you have perkeo territory
like what i was talking about with two jokers in one was just me wondering how fast you can reach inf with as little jokers as possible
without perkeo and steels
currently its at 9 but maybe this new joker will help
shampack did it with a spectral but thats for balamod so thats a rip
Well you can always add a joker that gives you naninf
thats boring though
the point is just use modded jokers that might have an actual use
instead of just using jokers to cheat
Yeah yeah I'm kidding
x)
tho it would be only balanced joker
for it to be interesting
and what would you define balanced ?
something that has an actual effect instead of just giving free score
like even though triboulet has x32 in 1 card its still has an effect
Just make it so the adjacent jokers retrigger or something lol
ok x1e300 mult whenever you play a card with a suit
you can play stone cards and not get the bonus
Totally balanced obviously
just have it where if you play a pair, win the game
Sounds about like what people been suggesting here
I mean I just use the debug menu and hit the win button if I want to win
don't need any jokers
Although the point isn't to win the game, it's to get inf
has anyone been able to make the clown offer more free rerolls? changing the rerolls to 3 works only the first time. following blinds have 1 again
how do i use mods?
might have been a silly question, but does SMOD not support both chips and mult increase at the same time, just like Scholar Joker did?
Steamodded, drag the Balatro.exe on top of the injector and release mouse
I've try to do that but it seems to only pick up the first of the two, depending on how I order them
blueprint + tnirpeulb combo joker?
nvm i was stupid
what do you guys think?
Is this a reference to another game or something?
Interesting that it does the cerulean bell effect
can someone help me get steammodded working?
I think its High Card (Its an anime) reference
though its been a while since Ive seen the anime
there's a playing card anime with custom cards?
Ikr
Sign me up
Basically theres a kingdom divided into 4 areas (the 4 suits) and people have some type of card (I forgor name) that gives them abilities when they say "play"
And the main character has a 2, meaning the worst card :kek:
2 of clubs: Reshape metal in contact.
When a card is played: turn it into a steel card. (Midas Mask but Steel)
Definitely off topic at this point, but I rlly liked what I watched
I mean it's still relating to the mod
fair ig
Definitely a mod I would enjoy
where do i have to go to get help with modding
joker that instantly throws your computer away
We should make a mods with the discord mods
Add everyone with the joker role as a joker
drspectred: sets score to naneinf
I remember when we had that Idea like last demo
sounds about right
Crimson's plans:
- Finish College Work for the week
(If I have time today. If not then this will be tomorrow's stuff)
-
Finish up V1.0 of the DNDG texture pack
- Concept up potential add-on pack
-
Work a bit on Kollection
-
Work a bit on archived
-
Check in on Ortalab
shadowbulb: instantly triggers the last posted thing in #1200105253559873707
ShadowBulb: Starts WWIV
ShadowBulb (RARE): when blind selected, 1 in 3 chance to duplicate a random joker
Regardless of if there’s room or not
it should be able to dupe itself
i use small blind big and a custom huge one. how is ante value calculated? i have 0.5 , 1 and 2. respectively
but first blind is 150. 2nd 300 and third 600 but then 2 ante is 400,800,1600
and third is : 1400, 2800, 5600
maybe 1/4 so slightly more balanced BUT still 100% with 2 oops all 6s
the point isnt balance
It pulls from a list, then uses a formula for endless
If you ctrl f 300 in the code you should be able to find it
yeah i assigned 0.5 , 1 and 2 for the blinds but cant find relation in thoae numbers
i dont want to play tye qhole 10 antes to know how much it will be
0.5x, 1x, or 2x that base value of 300
i want to calculate it
if you go to the blind menu in the collection it shows the base scaling
i know but the first 400 where it comes from and how to predict next ones
WOAH
godsend
Math can you help in https://discord.com/channels/1116389027176787968/1217867725532041369
I suck at tachnology smh
oh but if i change it it stills shows only base values
i tought it would scale with the configs i have
but know i understand where the 400 comes from
i dont think any more people are getting that role at this point
That was given out I think up to around the end of 2023 by localthunk to people he thought were cool. Haven’t seen anyone new get the role in several months
i think the last was murph
but yeah local has better things to do than give random people roles
I think with the game’s release he’s gotten a lot busier
I think last was airhater
Its not like to many people are spending hours a day doing something thats never been done before, and if they are, they most likely have the joker role
alright i want more antes. for longer gameplays. but scaling goes to hell. where can i change the base costs?
, not in the word
