#💻・modding-dev
1 messages · Page 217 of 1
unlucky
X101 mult is crazy tho
Like i can only use this now and i’ll clear LMFAO
Anyways thanks guys i’ll tune it down a little
Love yall

getting this error, do you know why?
the line:
card_eval_status_text(context.blueprint_card or card, "extra", nil, nil, nil, {
message = localize{ type='variable', key='a_xmult', vars={number_format(to_big(card.ability.extra.current_xmult))}}
})```
talisman
ah i see
:)))
might steal
it's not ready yet but it's getting somewhere!
ya anyway
bit of a dilemma
either change what i'm doing with that line, or try to get Talisman to work again
help why are the booster pack game states hardcoded for each booster type what if i wanna check for a modded booster pack 😭
bro i just wanna add cool music to my booster pack why does this have to be so hard
how do I correctly upgrade the randomly selected card to a gold card
few seconds, I'll draft mock code
enhancement, not edition
what is talisman
Anyone else getting a crash from smods when proccing sixth sense? (Currently happening when I only have lovely & smods loaded, nothing else)
big number mod
number go bigger mod
oh uh. suddenly Talisman works again?? wh??
talisman
if you want stuff to work without talisman, you can do something like this in your main file or anywhere really
to_big = to_big or function(value)
return value
end
imagine needing talisman for your mod
my mod doesnt need talisman but it is compatible with it
so if to_big doesn't exist it gets replaced with a dummy function that just returns the same value
select_music_track = function(self)
if G.STATE == G.STATES.SMODS_BOOSTER_OPENED and SMODS.OPENED_BOOSTER.config.center.key == "your_booster_key" then
return 1000 --idk how high this number should be, but 1000 should be enough
end
end
This should work (I think?)
You can swap the key check for kind if there's multiple booster this musing should play for (as long as they're all the same).
thanks!!
Actually is booster_obj better?
so kind would be like group_key?
For every face card scored with sock and buskin and pareidolia
Just created the perfect synergy for just testing the mod LOL
still not sure what's up with this.
i mean that takes up more slots now at least lmao
Lmfao yeah
Add a blueprint and a brainstorm and you’re done
Fuck it add red seal kings aswell
i have 0 progress on my mod cause i’m lazy !
Slacker
Joking

I love you
and i dont really wanna figure out how to do all the stuff i have to do.,
my girlfriend wouldn’t approve of this so i’ll say i think you’re a nice person
Yeyyyyy
and i still have to even create all of the ideas lol
only know rank 0 ideas rn
I'm unsure if anyone answered my question, so I replied my question. I looked at other mods and some have this exact functionality, but have to create their own for it to work (Cryptid, Balatro +, etc). Just wondering how I go about to make my own
Steal their homework and change it up a bit
Damn
idk about no duplicates but you can define a table of keys like this and then pick a pseudorandom element from there
In that pool, those are all keys for each joker, correct?
well what does it want me to do? not call for an enhancement and just... not have one?
yeah, these are from my own mod but you can just add any joker you want
remember they must be written like j_modprefix_key
theres probably a better way of wording this
set_enhancement is not a function that exists
that would be set_ability
ok
also neither of these have any business being inside a return table
neither does the former make sense at all
what i'm trying to do is pick a random card and then enhance it, how would i actually do this?
pseudorandom_element(context.scoring_hand, pseudoseed('something_unique')):set_ability('m_gold')
outside of any return table
ah ok
but wtf is that usage of or
idk
stuff is evaluated inside out
so 'Flush' or 'Straight Flush' happens first and just evaluates to 'Flush' because that is not nil or false
lucky for you, every straight flush contains a flush so it makes absolutely zero difference
ok
having to speed up the song i made to then slow it down again because for some reason music in balatro uses 0.7 pitch and if i dont do that then the songs desync is just like

just don't make your music sync with vanilla 
it's a booster pack song tho so it just sounds weird when it desyncs 🥲
hi sorry, quick question
this returns true for every card in the deck:
if v.ability.name ~= G.P_CENTERS.c_base then enhancement_tally = enhancement_tally + 1 end
what-a-wrong with my code? :(
v.ability.name is a string and G.P_CENTERS.c_base is a table
they are never equal
oh kay, thanks :D
how do i check if a card isn't "normal", then?
like, if it's unenhanced?
you're trying to check if a card is enhanced though?
how do i make the card move a little bit when it gets enhanced? like the jokers do when giving mult
if next(SMODS.get_enhancements(v)) then works for that
ah kay, thanks!!
this accounts for quantum enhancements stuff, to check for a base enhancement you can do v.ability.set == 'Enhanced'
Sorry for probably the most basic question, could probably look it up somewhere in the wiki, but am too lazy to, but I had a look at your lucky legends mod and saw that you have the Jokers.lua file and a localisation file. How are you able to link the two files together, and also figure out how to link the correct description with the correct joker with no key?
localization files are loaded automatically by steamodded
every joker must have a key, that's what you refer to in the localization file including any prefixes
it's seamless baby
My brain is being fried at the moment with all this information. If I see this correctly, for @spring lantern's lucky legends mod, I read this for the localization file:
j_l6_luckylegends _dex
j_ means its a joker card. Change it to 'p' for booster pack, etc
l6_luckylegends is the mod prefix from the json file
_dex is the key name to link to the joker in the jokers.lua
Am I assuming this correctly?
Do you have 1x and 2x textures?
i still require help making my legendary deck render thingy
the card always becomes gold at the very beginning of scoring (before it;s even been scored)
can it be made to turn gold at the end of scoring, when the message comes up?
Yeah
move it into a func in your return table
is the path correct?
Is your folder and images right?
Like the names
Check the property just to make sure
yeah that's caused an error relating to basically every single bracket in it now
In my opinion I think you could slightly rework how this joker works to fit the game more. The way its presented now just makes unnecary rules when in the end, playing spade is the best option. what you could rather do instead is make each part random, ex. "Played cards give the following: {RandomSuit} and {RandomSuit} {RandomifFaceCardorNOt} {RandomMult}. Changes every round". that way it will lower the words and make things more compact, plus it gives it a more uncommon vibe, which is a decent advantage, but at a cost. but the concept overall seems cool
then fix it-?
if you don't know the syntax well enough, you need to learn it
ok
local atlas_key uses Format: 'PREFIX_KEY'. So if your steamodded prefix is crew, try changing it to 'crew_atlas'
In the calculate function for a joker, how do I check if there is room in the joker slots? I have a joker that gives a random joker upon reaching a boss blind, but I need to do a quick check if there is enough joker slots to summon one joker.
#G.jokers.cards + G.GAME.joker_buffer < G.jokers.config.card_limit
would anyone with coding knowledge be able to make a mod essentially fixes this problem ? https://discord.com/channels/1264429948970733782/1347141566690492499 maybe like a system wide patch that changes all added buttons to prompts or something
SDM did their own #1228825966940393483 message but with other mods like cryptid that have 2 buttons it doesnt really work
hey anybody know whats up with this? im trying to add a joker that adds 2 times the value of the first selected card to the mult... shouldn't this work?
i could try somthing like that
how would i go about adding a card to the deck at then end of a round?
Anyone know how to make a random number generate on blind select / on round end? I know context.setting_blind can be used as part of a joker/card, but I want it to activate everytime a round starts, not only when a certain thing is in play.
the way I do global effects that activate on contexts is just hooking SMODS.calculate_context
either that or hook into the same function setting_blind is called in
does anyone know if there's a function the game calls at the start of the shop phase? and which if so?
Did not realise that was an option. Will have a play around with that.
Bit of a pickle (And with 20 hours of no sleep, powered by coffee), trying to figure out, during calculating, it randomly picks a joker card from a custom pool I have, make it so it appears after selecting the boss blind. Currently, it gives an error when selecting the blind, which is most likely lying in here
They are keys I believe.
then you need to use
SMODS.add_card({key=new_joker})
you don't need emplace or add_to_deck
oh and delete copy_card too, keep the pseudorandom_element part
How do I print to console the names of the jokers that are currently in my hand
I've been trying for so long for something so basic 😭
So something like this?
for _, card in ipairs(G.jokers.cards) do
print(card.config.center.key)
end
I don't really remember how to get the actual names (I think for vanilla jokers it's card.ability.name?)
Thank you i've spent too long trying to figure out the most basic stuff
part of the process I guess
Thanks, got it to work
Now I'm getting this error upon opening the game with the SMODS.calculate_context added to my .lua.
Same error when using different contexts, or calling other functions.
does anyone know if there's a way to give a deck design the same reflective shader spectral cards have?
I've got a basic deck made and as part of its bonuses, it gives you a spectral card, the deck design is also based on the spectral cards
m looking at the SMODS.DrawStep wiki, but it's not got a whole lot in it
actually, can you even apply shaders to deck backs?
through drawstep yeah
do you know how I'd go about that?
look at the code for center and back
what you want to do is add step with order >0 and <10 that draws the edition shader on the back of the card if it's your deck
conditions vortex = false and facing = 'back'
whenever I try and call SMODS.DrawStep, the game crashes and it says it's a nil value
is there support for conditionally preventing a consumable item from being sold?
you could apply eternal to it, and then remove it afterwards
I assume so, seeing as there are eternal jokers that can't be sold in the base game, the code might work with consumables too
did you update your smods
how do i access the "allow_duplicates" field for consumabletypes?
without any mods, the default behavior of eternal consumables is can't sell, can use, destroyed upon use
drawstep is beta>=0302 iirc
it's on the most recent version yea
how does your SMODS.DrawStep call look like?
lemme see if vscode saved it, I kinda removed it already and was trying something else
SMODS.DrawStep {
key = 'back',
order = 5,
func = function(self)
local overlay = G.C.WHITE
if self.area and self.area.config.type == 'deck' and self.rank == 16 then
self.children.back:draw_shader('booster')
end
end,
conditions = { Wdeck = true, facing = 'back' },
}
already have the shader booster loaded, and the deck it's trying to be applied to is referenced as Wdeck in the code
let me like actually make sure steamodded is up to date rq
does anyone know how fields like {0,0,0,1} work as a colour?
like what does each integer get translated to?
red, green, blue, alpha (from 0-1)
ALPHA ok that's what i was missing
Wdeck is not a valid condition and would always translate as true
also your shader wouldn't apply to flipped cards outside of the deck
thank you
I only want it to apply to the backs of cards anyway, and alrighty
lemme try something more simple rq
as in it would apply to face down in deck, but not face down anywhere else bcos ur shader is drawn only on deck cards
ah alrighty
also it would only draw on cards with rank 16?
I am very tired
i don't quite understand the conditions there
but ye that's very wrong
neither do I 
ope
well uhm
shader works (?)
it's currently applying to every card in the game though which is less good
also shader works as in it doesn't crash, still doesn't look right
conditions should include facing back, and the function should check if the viewed deck/selected deck is your deck
I'm getting closer
shader only applies to the back of cards now, I just need it to only apply to the one deck
G.GAME.selected_back and G.GAME.viewed_back
these are the two things responsible for back rendering iirc
and each card stores which one of the two they're using through card.back (a string thats either "selected_back" or "viewed_back")
these two redirect to the protocenter of the deck
is there a way I can have a challenge not have anyother jokers in the shop
how do you write shaders 😭😭😭😭
I've got 0 clue, I'm having trouble just getting the prebuilt shaders working in the right way
ask localthunk
I'm kinda stuck
I dunno how to get it to only apply to my deck, been searching around for what I need to use and can't find anything
I'm trying to make the background color turn yellow for a couple of seconds, then turn back to normal, but ease_background_colour_blind is just making it so the background doesn't change, does anyone have any idea how to fix this?
this is what I've got so far for the shader, but it still applies to the back of every card
SMODS.DrawStep {
key = 'Wdeck',
order = 5,
func = function(self)
if self.area and self.area.config.type == 'deck' then
self.children.back:draw_shader('voucher')
end
end,
conditions = {facing = 'back'}
},
been searching for what to add to the if statement to make it only apply to the one specific deck but so far I've not found what I need
@pseudo cape
nevermind, I forgot to put trigger = 'after'
I think I misinterpreted this when I read it first
on an unrelated note I'll probably be opening a repo for magictrickAPI (my mod that makes jokers playable)
it's very unfinished but I'd rather have it out there so others could help
makes jokers playable?
rewrites some of the calc logic to make sure joker effects fire off when jokers are in playing card fields
ooh cool!
rn i got it to a state where it
- doesn't crash on playing a joker
- handles all non-scoring evals between jokers/playing cards
- handles jokers in playing card areas during scoring
there's a new context for playing jokers but if the joker doesn't respond to it the game will try to force a joker_main calc instead
that's kinda cool
now I'm imagining a reverse balatro
you start with 52 jokers, and you have to buy playing cards in the shop to put in the joker slots and that counts as what would normally be your played hand
rn jokers are always scoring suitless/rankless cards, but I plan on extending the API to allow jokers to define their suits/ranks/other stuff
if lusty joker isn't hearts then what is
true
do you know what I'm missing here? I feel like I'm getting super close to getting it working but something just isn't working right
SMODS.DrawStep {
key = 'spectral',
order = 5,
func = function(self)
-- if self.area and self.area.config.type == 'deck' then
if G.GAME.selected_back == 'Wdeck' then
self.children.back:draw_shader('foil')
end
if G.GAME.viewed_back == 'Wdeck' then
self.children.back:draw_shader('foil')
end
-- end
end,
conditions = {facing = 'back'}
},
G.GAME backs arent strings but redirect to their center table
also I'd recommend checking G.GAME[self.back] instead
the way your code is written right now would turn all card backs shiny if your deck is selected or viewed in general
rather than that specific card back being the deck
how do I know/set where my deck is on the table it references?
SMODS.Back is your table
What you need to check is the key
So G.GAME[self.back].key == "mykey"
oooh
key being "b_modprefix_thingyouwroteintothekeyfieldofthesmodsback"
I am working on a joker card show in the image. How can I do the random probabilities, first of all, and how do I increase the numerator of the chances so that it increase for every scored 7?
pseudorandom('insert any string here') < (G.GAME.probabilities.normal / card.ability.extra.odds)where card.ability.extra.odds is a stat that you set in the joker's config = { extra = {} }- if you want it to be affected by other jokers that effects probabilities, do
pseudorandom('insert any string here') < ((G.GAME.probabilities.normal + card.ability.extra.numerator) / card.ability.extra.odds)instead. Then, you'll increase thatnumeratorvariable every time a 7 is scored
I’m going to keep being annoying, ultimately im trying to collect all data available each hand played and store visited,I’m stuck now on poker hand level right now and I’m sure I’ll have many more to come
okeokeokeokeoke
got it working in the game itself, just not in the menu
now to see if I can get it working in the menus without bugging out
I also need to switch the shader to the correct one, does anyone know what shader is used by the spectral cards?
it be work in menus
time to just try shaders till I find the right one
the shader also seems to hover over the card itself, and it rotates when you move the mouse over it, I think because it's trying to act like a normal card/joker even when it's on the deck
this is the third time I've seen deck that starts with a special cards that creates a joker
i mean definitely
hey it's my first deck it's not meant to be complicated
(I say after spending 5 hours trying to get a shader working)
time to watch more acerola
😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭
please stop making procedurally generated water
is there a way to quick restart balatro to apply code changes? or do you have to just close and open it every time
if you've got the debug mod you could try pasting the code snippet into the game, assuming it's just like testing to find something or something simple
i think someone told me to hold M
that's what I've been using to find variable names I should've known because I wrote them myself 
Also, how do I make it so that if it triggers different effects, the joker gives the corresponding effect? For example, I triggered the "Earn $7" effect and trigger the "Gain X0.14 Mult" effect in-game. I want to trigger only those effect, but in different scenarios, it could also be "Retrigger Scored Cards" and "+77 Chips per 7". In my mind, I can only think of doing a bunch of IF ELSE statements
are you making a genshin impact mod
methinks my mod manager didn't like that
do you have your code files open
if so you should close them and then try the M trick again
I'd rather spend the extra 2 seconds reopening the game, easier for me than closing all my code windows
context.retrigger is true for only
retriggers i think
still are you making a genshin mod because that description be looking very long
Nah, someone wanted sevens to be useful since its the weakest in vanilla, so they gave me multiple ideas for it and I decided to just put them together
shaders :>
ah
so my yona joker is finally useful
ooooh pretty
I really like the onyx agate
How does it work? Can't seem to find it anywhere in the wiki, so I might need an example of it if possible
retrigger all 2 and 7 twice
Those animated tooltips are super impressive fr
tbf n gave me the code that shows card area in the info queue
Oh I see I see
and i made a util function out of it
how would I go about updating the mult mid-play? I am trying to create a joker that lowers by 5 mult every hand played, but I can't seem to update the mult variable at all
show code
this is what i have at the exact moment while trying to figure it out
that's not how you do it
there are like 3 things wrong with that code
first of all you put the card.ability.extra.mult BEFORE the return
you also use = to assign values and not ==
good evening everyone
why are you returning tables with mult indexes
relatable...
i originally was going to do just =, but then this would pop up
you don't put it in the brackets
still shows same thing even without brackets
no you don't put the thing in that line
When I need to do the retrigger all cards from a probability chance, how do I make it so that it doesn't do the probability chances for each individual card (Example: Retrigger the first card, but not the second card), but retrigger the entire hand?
From what I understand at the moment, everytime it goes through each card, its repeating the probability check, causing different outcomes, which is not what I want
please look at this code for example https://github.com/Aikoyori/Balatro-Aikoyoris-Shenanigans/blob/1359e49ce4460c08bb785ddccc5a48cec1ac563a/modules/jokers.lua#L422
i know it's the worst example
hold on here's a better one https://github.com/Aikoyori/Balatro-Aikoyoris-Shenanigans/blob/1359e49ce4460c08bb785ddccc5a48cec1ac563a/modules/jokers.lua#L657
if context.before then
for i, _card in ipairs(G.play.cards) do
card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.extra
end
return {
message = localize("k_akyrs_2fa_generate")
}
end
if context.joker_main then
return {
chips = card.ability.extra.chips
}
end
if context.end_of_round and context.cardarea == G.jokers then
return {
message = localize("k_akyrs_2fa_reset"),
func = function ()
card.ability.extra.chips = 0
end
}
end
you don't put it in the table 😭
Calculate the chance in context.before, apply it in context.repetition and reset it in context.after
hello n how do i actually use the current value of joker if it was being changed by a different function altogether
wdym
i have this code https://github.com/Aikoyori/Balatro-Aikoyoris-Shenanigans/blob/1359e49ce4460c08bb785ddccc5a48cec1ac563a/modules/hooks/scoring.lua#L16
that changes the joker value directly
it doesn't use the up to date current value of the value i want it to update when it's calculating
I'll come back in like 3 hours or so
afaik it should, are you sure it's updating correctly on trigger_external? i wouldn't use ability.name to check for the card because I think that doesn't work for modded jokers, I would use config.center.key
your bluetooth device is ready to pair
it is updating correctly i believe
joker display displays the up to date value
maybe i should actually put those code in an event
smods has proper example mods
Currently trying to get a random number to change everytime a round ends, but when I add in the following code, it creates a crash in steammodded utils (screenshot). Anyone know a solution / a better way to generate random numbers every round? - same error happens with context.ending shop or blind select.
calculate = function(self, card, context)
if context.end_of_round then
local rand4 = math.random(1, 289)
end
end
} ```
yes
I can see the vision, but would it get given the updated probability during the context.before state from a context.individual and context.cardarea == G.play state?
The image is what my code is at the moment. The image shows the main probability of the joker card being increased everytime it finds a scored 7. This is during the scoring state (afaik). Like increasing it to 3/5 if two '7' scored.
Hi! I'm interested in making a Balatro mod-- where would I get started?
do i send the balatro modding tutorial video again for the 4th time 😭
always resend
yeah uh, wiat
STEAMODDED 1.0.0
A tutorial on how to make a modded Joker.
https://github.com/art-muncher/Example-Mod -- EXAMPLE MOD
https://github.com/Steamopollys/Steamodded -- STEAMODDED
https://github.com/WilsontheWolf/DebugPlus -- DEBUGPLUS
-----------------------------------------------------...
this is a bit outdated, but generally does well at telling you what to do
Oh I didn't know that existed. I looked and couldn't find it tbh.
oh ok maybe when you use the function in update() it already went through all the calculations
I would try hooking SMODS.calculate_context and doing what you're doing there in context.before
in addition to this, highly suggests reading the code from example mods
Gotcha. Thanks guys!
you can check the number of 7s in context.before using context.scoring_hand
im gonna save this and just send immediately whenever someone is new to modding
efficiency...
I'm pretty sure that's not how calculate_context works
i wish we had a bot that people could just !mod and then it would send the messages for you
if you just want to grab a random number, either use math.random() (random number which is different even when you play the same seed), or use pseudorandom() (random number which remains consistent if you play the same seed)
I have the mod working with math.random, but it only picks a random number when I load the game and then keeps that number until you restart the game. I'm looking to have a new random number chosen each round, so I'm trying to get it to regen the number at some point after scoring.
just calling math.random() again will regen it
oh, i think you can use context.end_of_round for that?
or the context that procs when you enter a blind (im not sure if that exists)
I think they said before they weren't using a joker, it was a global effect
So specifically I'm randomising a setting, so it's not on a joker / anything that is read repeatedly. The game seems to read it once on start-up and then never again so even putting a new math.random in doesn't get the code read.
setting_blind
i have this dumb and inefficient idea, but you can use a loop and just check whenever round changes 😭
you can hook calculate_context and check for setting_blind and update your number there
I don't recommend math.random tho I would use pseudorandom
a
you would also need to save it in G.GAME and not a local variable
i wonder if its possible to code a progress bar
what about the progress bar when smods loads
doesnt that come with balatro itself
well then the code is there
my IT's pc with pirated balatro has it ❤️
true, i will take a look at it later
Using the context.scoring_hand, how can I compare it so that everytime it finds a 7, it increases the probability? This most likely uses the FOR statement. I am looking at the flower pot joker and it looks similar, but I am unsure how to make it work for my case
check G.hand and G.play (its the played hand)
or you can just do G.playing_cards if you are checking every 7 in your deck
no, context.scoring_hand is correct
oh, i taomssdomio misread that 😭
i thought they meant how to check the hands, uhhh
go through the scoring hand with a for loop, then use :get_id() == 7
for _, card in ipairs(context.scoring_hand) do
-- what you were doing in context.individual
end
why did you point at that 😭
💔 not so sigma N'
i was deadass thinking about adding a "Weakness Meter" to playing cards to uhhh differentiate break dps from others
I am assuming this is what you mean
Hmm, haven't touched G.GAME yet, but will give it a go. Thanks for the new angle!
In terms of psuedorandom, I did start with that, but found math.random just instantly gave an integer number which worked better ('quicker') for the table look-up after. I got a functioning result with it to publish, it just wasn't quite my vision for the mod.
that would be cool
well, im HAPPY hsr v1.0 didnt add any good break dps yet so i wont have to waste days getting that working 😭
change the if condition for just card:get_id() == 7
that can wait for bsr v1.1 i guess
You can just multiply and floor the pseudorandom number
Yea, that's what I'll do
math.floor(pseudorandom("seed", min, max))
i think you can do that
anyway im going back to sleep i literally just opened discord to check my mods thread
oh lmfao, sleep well N'
sleep well, thanks for helping
for enhancements, where am i looking at for the box that goes under the normal text box? im making some enhancements and im not sure where i find that
Thanks for the help, I too am off to sleep, just thought I'd post here again for some ideas to mull over and try tomorrow
i never realized its "chips" and "Mult", ruined my day
😭
Wait can you use psuedorandom to have it be random dependant on the combination of played cards?
its cause chips arent important..
set_badges?
question for the people. if you were to want descriptions during a live stream from a balatro streamer, when would you like the data to refresh. like following which input/action from the streamer should the descriptions be updated?
Like audio descriptions? I'd guess on mouse click (excluding card selection), so click on play/discard it says what cards are affected and hand played / eventually score.
Would also suggest joker/card descriptions in shop and boss blind on selection.
I think there was an add-on that displayed joker effects on twitch so you could read them without the streamer hovering over them. Though if this is for audio transcription it'd probably be a mess to hook onto streamer actions if they are rerolling shop a bunch and dragging jokers around to re-order them.
im gonna tweak the mult does go up, put in a print command and nothing printed
the print command was for the xmult value
no like overlays https://discord.com/channels/1116389027176787968/1343474630916182037
sorry question wasnt clear
as far as i know, im the only one working on the twtich add on, at least from what i googled and looked for before starting this project
could you insert the print back in?
like so?
and does the joker fully work aside from the print command?
i don't see why it wouldn't be working, maybe try making the joker output a message instead
its an enhancement
for each other moss card you play it gives +0.1x mult
my bad i even read enhancement idk why i thought joker
printing shows absolutely nothing in debug console, it doesnt even bother running the code
in both debug plus and lovely console?
if you end up replying to this either reply here with a ping or reply in my thread https://discord.com/channels/1116389027176787968/1343474630916182037
At the moment, I have most of the joker functionality working. Its just that whenever it triggers the $7 effect, it doesn't allow the XMult to trigger, pretty much making the Xmult useless. The +77 chip also is meant to be triggered if it won the probability chance. Image is my code. I may need to change something, but am dum
yeah
okay so! ive made a little sprite for the jack of spades. plan on adding more but before i do i wanna see how it looks in game. so! how does one input the sprite from a sprite sheet such as this (not this one ofc as it doesnt have the sprited jack of spades) into the game? i heard there was a small amount of code work involved
(i used this sprite sheet as a ref for making the sprite. so the sheet still has every other card, just the jack has been changed)
I would’ve helped you get your mod stuff set up but I just got off my pc for the night 😭
T~T
If you don’t find anyone by tomorrow and you catch me online, ping me and I’d be happy to help out
i swear to god the sprites for the face cards flipping for different suits makes me shiver
Ig queens are the only ones that don’t flip
Same
i wonder how hard it is to figure out ngl
I’d recommend going through this page that I just remembered exists if you wanna take the dive https://github.com/Steamodded/smods/wiki/Your-First-Mod
allready am :3
Hell yeah
After you've read that page, check out this to see some vanilla Jokers remade using the SMODS API https://github.com/Steamodded/examples/blob/master/Mods/ExampleJokersMod/ModdedVanilla.lua
Was a out to ask if that was a thing so we all aligned
jokers are a bit different to face card reskins no?
They’re just doing a texture pack so I don’t think they need that lol
oh wait
oh I completely missed that part and thought you were just posting that as a general advice for all modders

Yeah lmao
im bad at coding, but i might genuinely be okay for once
Yeah it’s a relatively simple process for a DeckSkin
Just an atlas and a huge object telling the game what goes where
this is a 2x res file right?
Yes
how would one get a 1x from that?
First off you should create your atlas in that file
That’s basically the thing that partitions the designated image file into parts that the game can use
trying to figure out what exactly an atlas is and how to create one
and is there anything in particular i should be calling the 1x and 2x sprite sheets?
You were actually looking at the page for it here lol
Nope! As long as they’re in their respective folders, the Atlas should take care of the rest
and this is what i have so far
need to figure out px/py
cause im unsure if thats the entire sprite sheet or just a single sprite
because if so thats the default value for the vanilla card sprites
Ok so you’ve already gone wildly off the rails 😅
Gimme a sec, lemme lay it out for ya rq
or is it this >->
No that’s just for applying an atlas
bump so it doesnt get buried ig
An atlas is structured like a list of sorts. The list is composed of items that give it properties. It looks something like this:
SMODS.Atlas {
key = --Whatever you want to call the atlas,
px = 71, --This is the width of a single card sprite
py = 95, --This is the height of a single card sprite
path = --This is the filename of your sprite sheet. It does NOT need to be the full path
}
For the path, in your case, just lunejack.png will do
Kinda stuck with this error
okay now that ive written this out. i need to put the applying atlas code somewhere too?
context.cardarea == G.jokers does not identify a context
it happens all the time
it should all be inside the context.joker_main check I assume
Not quite. Now you need to make an SMODS.DeckSkin object which is set up somewhat similarly to how an Atlas is. I recommend checking out that page to see what goes where https://github.com/Steamodded/smods/wiki/SMODS.DeckSkin
But wouldn't a "Return" stop the entire function all together? If you haven't seen, the card effect is the image
okay so this is a new .lua file inside the same folder as the created atlas right?
No, same file as the one you made the atlas in
oh huge
You should be working in one lua file for this whole project
after finishing that ( i havent ofc) will that be all?
Basically yeah
I’m not insanely well versed in how DeckSkins are properly done but I do know that it is what you want. Positive of it
So I apologize if any help I give from here on is a bit shaky
im just looking at this and dying lmao
Yeah lmao
yes, but you can have multiple effects in one return table
Oh hey loc_txt is on the DeckSkin parameters twice lol
no
one is in palettes
though it looks like some of these are different contexts and you just need to check from them correctly
what would a default even be? does your stuff not have a name
i have no clue where a loc_txt file would be saved on my pc. let alone if i even have one. surely theres an english one somewhere
You wouldn’t need a file
oh then just en-us would work then
Not even, you can just straight up put text there
That's the issue. I can't have them in the same return table because if they are, that removes half of the functionality of the joker. For instance, it could give money and retriggers only, or money, gain mult and give chips. Its just getting the mult to activate during joker_main and chips if the probability is a success
you don't need to return the table the moment it is defined
in this case both the 1 in 5 and the 1 in 8 want to happen in joker_main
So something like appending multiple data into a table and use that table to return afterwards, correct?
the 1 in 7 looks like context.cardarea == G.play and context.individual, while the 1 in 10 is context.cardarea == G.play and context.repetition, though you'd want to determine the chance roll for this before hand if it shouldn't be an individual chance for each card, i.e. save the result somewhere during context.before
not sure what you mean by appending but yes
Appending as in like grabbing data from a variable and insert it into the table
alright sure
I just saw you're using context.pre_joker in there. that should only be used for editions
Also giving the xmult, obviously
minor nitpick but is should be scoring 7 in played hand
increase the probabilities of the following chances by 1 when a played 7 is scored
After reading what mine was, actually kinda confused someone that didn't know what it did. Thanks
i made my first balatro mod, did i do a great job?
what is the mod
i made a deck with 10 red steel poly kings
My original issue might not make sense so here is the summary:
What works
- The joker gives $5
- The joker gains Xmult
- The joker can retrigger
- Probability resets upon finishing the scoring of current played hand
What doesn't work
- The joker doesn't grant chips upon successfully winning probability chance
- The joker doesn't use the Xmult during joker_main
The image shows the code for the one that doesn't work. If needed, I can provide another screenshot of something else if it helps
If you're on one of the latest smods replace "Xmult_mod" by "Xmult"
Also the way you coded it, if one joker_main triggers, the others wont be checked
If that's the case, how would I manage to get it to work? I assume something like appending data into a table for each one, then on the last bit, use the return function for the table?
not me having just tried to explain that
Sorry, fried brain for the past few hours. From this and also the Australia Cyclone thats happening atm
if context.joker_main then
local ret = {}
ret.x_mult = card.ability.extra.Xmult
if pseudorandom('greek') < ... then
ret.dollars = card.ability.extra.moneyget
end
if pseudorandom('greek') < ... then
ret.chips = card.ability.extra.chipget
end
return ret
end
something like this
Is it just me or does anyone else have an irrational hatred towards Lua?
Like not being able to concisely construct a table in a language about tables kinda sucks
wdym
I think it's okay. It's a bit like JavaScript
I was about to message here and thank @frosty dock for the help as it worked, but wasn't expecting that statement when I come back
Being able to set properties of a table on the fly is a great feature, I think!
It's very malleable
Like in python for example you can just make a list with generator, e.g. [ i**2 + 1 for i in range(16) ]. Here you init a table first and make an ugly loop which is supposed to fill it
Like I can just say table.thing = 1 and it'll do that :}
okay fair, but I don't think it's that bad, it's just a couple more characters to do effectively the same thing
also
and the fact there's no in-house solution to concat two tables
Lua is really good at what it aims to do, but sometimes those aims are a little quirky. Building an entire language around dictionary lookups and making it fast is absolutely amazing. It does have a weird mix of surprising syntactic sugar (.access, :init()) AND a surprising lack of syntactic sugar (No index_of? No deep_copy? No += ?!)
like it's procedural but unlike C it's ugly procedural
how do you like a lazy infinite table
local t = setmetatable({}, {__index = function(t, k) if type(k) == 'number' then return k^2+1 end end })
(it's just a function in disguise)
Or are functions just tables in disguise? 🤔
all is table
(╯°□°)╯︵ ┻━┻
TABLE IS YOU
wtf what did you do to Jason
MANKIND IS DEAD
BLOOD IS FUEL
WALL IS STOP
TABLE IS YOU
isn't there an esolang that does this
there's also a baba esolang, but that's not what i mean
oh I didn't see what you were replying to
Previously: security engineer at Square, co-author of HackLang, put the 's' in https at Facebook. Maker of CTFs.
Nothing will surpass JDSL
wtf
trying to make it that if played hand is not least played hand, xmult increases. currently, the card says the xmult is increasing (even when it shouldnt), but it is also always returning error, does anyone have any ideas on what the code should look like?
oh no
with enough banging your head against a wall, anything is possible
now to clean up the card
:D
sorry guys i was busy
and the code cause holy is it messy
I wrote this monstrocity yesterday, it's like triple the LoC that were before for custom atlas layout
how do you guys change the mod badge text like cryptid does
i think you have to hook into it
is there anyway to actively track the money through scoring?
i surprisingly have simplified it enough :D
im trying to make a joker that divides the score by the money the player has, but it seems to be taking the money at the start of the hand rather than the end of the hand
i tried using context.final_scoring_step but it still seems to be taking the money at the start of the hand
using G.GAME.dollars
ew, a smods 0.9.8 mod
yeah i realised im using an older version of smods
and instead of updating smods i just ended up figuring it out myself lmao
it also doesn't DeckSkin, it just replaces the base versions of the cards
so less choice
please don't 😭
I mean what you do is substitute one sprite for a custom one, what my code does is create a skin pack (can be swapped in collabs menu) which has 6 different variants, for all 4 suits
it wont ever be public dw. its just for personal use between me and my partner :D
much more than me. and also just a better coder lmao
that's fine so long as you're not planning to use any other mods
yea i should test to see if it breaks the other mods i normally use
it doesnt break :D
what are they
I'd still recommend using DeckSkin over whatever the hell you are using right now since it's more descriptive and modular
ignore balatro multiplayer and smods main. everything else works here
ig but id only ever wanna do a couple of the face cards tbh. so in reality i dont need to go much further
oh you have literally no reason to be using the old APIs
if someone can throw me an example of DeckSkin so i can begin to understand what any of it actually means then go ahead, ill look through it and change it T~T
your steamodded is like 2 months out of date from current
honestly just wanna change the sprites of the face cards. thats all. nothin else lmao
It's simpler than you think. You just load a png as an atlas and then make a singular DeckSkin in like ranks mode or something
DeckSkins have however gotten an update since then
rip deckskins
https://github.com/Steamodded/examples/tree/master/Mods/DeckSkinTemplate this is a simple example using the new DeckSkin API
it replaces the header at the top of the lua file. you don't need to switch to it
whoever thought gray text on purple background looks good is wrong
like it's genuinely hard to read, why would you do this
i don't think it's hard to read but you have a point
it kinda is when zoomed out
so what should it be changed to
I guess like a lighter shade, idk lol
Maybe make it generic white but transculent if engine supports that, idk how that would look
i guess that works?
yeah
yeah that's it in HSI grayscale
People underappreciate managing mods with git
ong
like You literally install everything with git clone [url] and then just use git pull to update without having to download a zip ech time
but I guess terminal scary or something...
you can also be like me and get github desktop so you don't even have to use the terminal :3
who the fuck uses github desktop
me
Heavens, please grant me a flamethrower; I need to emplace just upon this world
damn bro chill im sorry 😭
I mean the github-desktop, not you
nooo i wanna press buttons not write text
Like I just don't get why are so many people afraid to write three words
It's literally like a discord bot except local
maybe for just pulling a mod it's fine but me i'm tryna do version control for my projects
I think the main issue with command line git is that it’s difficult/impossible to write long commits
i like having all the info readily accessible
So having to switch to a text editor, write, then use the file as a commit message can be annoying
You can commit without -m and it opens up a text editor
If I’m on Linux I don’t like vi or vim
It opens a text editor for you, you don't need to copy anything
export EDITOR=/bin/editor-of-choice
tada
I’d rather it open a normal text editor
multiple -m:
You can open a normal text editor with this
But also I mostly use command line git and use the commit message file as
-F?
I think that was the command
That's literally the same thing
I think handling patched commits can also be annoying
Well
Only the complicated patches
If it’s the “add” or “don’t add” patches then it’s easy
Like you literally just git commit and it spins up literally this except it's a generic text editor
okay but it's there already
ion gotta type a command to pull up an external program
it's just there
You still need to click buttons
Typing on keyboard is more convenient than a clicky-clicky gui
it's just 1 button it ain't the end of the world
why do other people's preferences bother you so much
i mean graphs are cool i guess
i do like having access to the commit history in a list like this without opening my browser
I think a graph is easier to follow than this
i don't really work with branches a lot of the time so for me it's enough
but if there was multiple branches then yeah it would get messy
you could also manage git from VSCode
git log
Maybe git log --oneline
think i'm just too normie for all this command shit and i rather just click le button and do the thing
save my programming brainpower for the actual code of the project yk
Stop thinking you are too normie
Commands are normie too smh
You just type words to a thing
And a thing does what you want
I like a bit more buttons but not necessarily too many
VSCode GitHub extension is good
oh damn i might need this
I’m still getting use to it
I think PyCharm’s was slightly different
also vscode sucks
dw, I also prefer git UI, I learned git through UI (from Intellij IDEA), and while yeah I learned to use some commands later, I still prefer UI for convenience
I had a professor who would do everything from the command line, including edit videos
bro what 😭
hi
i use vscode git thing
do you recommend
damn that's like the first person I heard to use https://tools.suckless.org/blind/ unironically
Same professor, from across the room, to a friend working on a project for another professor’s class: “your numerical model for the solar system is wrong”
yes
edit videos as in just use ffmpeg to trim it? 
I think trim, mirror, and rotate or play backwards
brain explode emoji
just use movie maker at that point daym 😭
oh yeah also why do so many frontends to ffmpeg exist
Or it was showing that the person in the video was behind glass and drawing on it
I only know about 1 which I use
lossless cut
like "convert format to format" is literally just ffmpeg -i file.mkv file.mp3 and that's it
my goofy ass looking up mp4 to mp3 converter online:
Trimming is of similar complexity
easier to preview and choose timestamps then click export
than copy timestamp into console
like why should I bother
By the way, they spotted this because the ration of the distance between planets or the Sun was wrong
Also I'm that insane person that watches youtube through mpv
what’s mpv
I didn’t have to do that project, but it was funny to watch from the outside because the professor that assigned it effectively chose a bad science article for students to replicate, so they had to fix the errors in it
so youu can just mpv 'https://youtube.com/watch?v=aksjdhasjkdh27 and it plays it
supports buffering and even video parts
i'm using gitlens :3
pull request bug maybe
Me not committing my changes for my mod:
that looks unnecessarily complex
“that looks unnecessarily simple” — someone about CLI git
simple is good

IM TALKING ABOUT THE FUCKING BLIND ATLAS, NOT THE BLIND ITSELF!!1111111
OH.

im sorry
98% of balatro players are blind

im in the 3%
And also one of the reasons I use mpv is that it just plays audio right in the terminal
like look at this
so peak
Also to reply to this. When you are clueless about git or version control (which is like majority of people who aren't developers) then it doesn't look so simple.
Non-technical people are used to auto updates - e.g. when you have a steam game, it will just update automatically as soon as there's something new. No need to download zip files. No need to learn this new git thing and using console to run commands. No need to even check if there's an update.
And yeah, there are tools that can already run commands for you, but they aren't that wide spread, and it's still a few more button to push, which you shouldn't have to.
but you can just add an entry to crontab
?
actually though, if talking about linux balatro you can just hook it in AppRun
so someone who never heard about git, never did any version control. would see balatro modding and be like:
yup, git clone here, crontab there, git pull to update things yup, all very simple and intuitive
thas what im sayin
I recently hooked ACPI to sleep on laptop lid close only if system update isn't running, you can't do that with "convenience"
🐧
Took like 3 minutes
i dont think most people really care about doing specific things like that
Yeah but if you get used to it you can just do it without hesitation which is what I'm getting at
what's the best way I can make a script that goes into each of my mods and automatically does "git pull" if it has a .git folder?
on windows?
yes
windows cmd supports IF so 
perkeo buff
does windows support posix sh?
Real convenience is not needing to roll your own brittle solution to this problem at all, and to have it handled by your OS
(and if a script like this already does exist can you point me in the direction of it)
could probably do like
FOR /d %%f IN (*) DO (
cd %%f
if exist .git\ (
git pull
)
cd ../
)
"real convenience is not thinking, but letting corporations think for you and pay them money for it!"
oh my god is that stupxd on git hub
copied a script I made the other day for cleaning up some files
Yes, that is almost the textbook definition of convenience. Not needing to fix your own self-created problems because someone else has considered them decades prior and fixed them for you
holy shit windows shell is ass
i get brutally killed
Problem is that not every problem has a pre-built solution, and if you only rely on convenience you will be less satisfied
actually I get why people don't want to use shell now, damn
it's kinda ass yeah, but I'm just happy it at the very least supports conditional statements
funny because IIRC git uses like a minimal unix environment because windows terminal is nonexistent
yeah
tbf I think you can do a bit more with powershell, but I never really learned that either
alse here I am standing, realizing I probably needed a different query to get a GNU find tldr
never had the need
IMO even if use non-posix-compliant shell for user interaction, at least use fish
At least fish has actual features and isn't microsoft branded bash
like pressing F1 while typing a command actually opens its manpage which is first funny but also genuinely useful
this is like the only time I actually use F1
or alt-s which adds/removes sudo to last/current command
Or interactive autocompletion
now compare that to powershell and weep
power in powershell stands for electrocution because that's as much torture as you get by working with powershell
all this is doing is writing out the command and not actually doing it
Do call git pull
oh exec is call in windows
while on linux you can just
for subdir in ~/.config/love/Mods/*/.git; do git -C $subdir pull&; done
also does it async
update: turns out I was using this wrong, and it was in fact actually working lmao
thank you for the useful script, I will definitely be using it!
how do I make a custom rarity, the wiki's documentation information is really scarce
does this seem right to yall
replace context.individual with context.main_scoring and the effect arg doesn't exist anymore (but you're not using it so that's fine ig), rest looks good
SMODS.Rarity {
loc_txt = {
name = 'rarity_name'
},
badge_colour = 'COLOR_IN_HEX',
default_weight = value (affects how often this rarity appears in shop)
}
unclear on what the exact values for the weights are though
How does one make a joker only trigger on a card once regardless of retriggers?
@random sleet, are Sand Cards part of your mod?
No they’re ortalab
Oh okay, because the Sand Joker only upgrades once regardless of retriggers.
I’m pretty sure it says per played cards rather than scored right?
Yep
So could you help this guy out with how to make a Joker trigger on play not on score?
Look at sandstone joker
Okay.
Without more detail on what the intended effect is I can’t really provide much more help
It is supposed to give mult and chips at the earliest part in the scoring.
Per card?
No, only at the start.
So a joker that adds some chips and mult before the cards are scored?
Basically yes.
You’ll have to inject your own context for that, we don’t have one supported
How would one go about doing that?
ball so hard
remind me what the proper use of calculate_effect is
im stuck can someone help me ive been trying to solve this error
probably an error from exotic jokers
ye ive check my code and referenced some popular mods but it still wouldnt work
oh, its your mod?
Cryptid doesn't show up in the mod list lol
omg im so stupid i forgot to add a description 💀
what are the variables for checking deck size and adding money and such
what is a pool, its not documented in the steamodded documentation
a pool is a list of objects available
i know its like a objects that can be picked from but how do i make one
thanks
meow
deck size is #G.deck.cards and for adding money you use ease_dollars
how do i add hands and it also shows the "+1" pop up thingy in the Hands counter too
ease_hands_played i believe
henlo good peploe. Is there a way to like, support modded jokers and entries for this?
i think you can refer to your modded jokers there too
G.P_CENTERS.j_(your mod syntax)_(stuff)
could be wrong tho
should be the same, yeah
are you able to change the scale of playing cards
like how wee joker is just on a playing card
Uh... try making the sprite itself smaller in the atlas.
that's the boring way
I don't remember rn but I think dimserene's pack edits that too, maybe you can ask them
this here lemme try this
i hate autofill.
i think i might just be stupid
probably, that's what zamos was saying anyway
i suspect something is wrong with this here, any tips
colours should be G.C.GREEN and G.C.RED unless those are variables
you should uhh do something to remove the yellow line from SMODS
i forgot what its called
:(
but its just a visual thing, so you can just ignore that
i mean i would prefer if the lines would say me that something actually is wrong instead of just unnessearily try to catch my attention like modern youtube thumbnails 
spelling problem
Ctrl + Shift + M
idk why it does that.
it does that because you don't have smods in your workspace
i assume you do something like this?
(ignore everything, except for the "Lua.workspace.library" part)
can only find a git hub file, not something related to .vscode
you can just open your mods folder in full
that is not in your mods folder
I'm saying you can open the Mods folder instead of just the BalatroMod folder in vscode and then smods will be in your workspace
If you right-click on that left panel, you can add additional folders to the workspace with this:
how do I render unlock condition text for custom decks 💀
custom unlock condition text?
win the previous deck shown in any difficulty
as least based on vanilla
basically custom text
Ok, why does it say there is a nil value despite there objectively not being a nil value?
because it doesn't render vanilla
I've tried multiple stuff, from just unlock, to unlock containing just text, to unlock containing name and text
💀 painge
why do you need custom unlock text?
just set the unlock stuff properly and it should work
unlocked = false,
unlock_condition = {type = 'win_deck', deck = 'b_red'},
already
Soo how do i add money?
wait
i have no clue how to use the ease_dollars
unlock_condition is a separate variable?
not in the config 😭
damn, I got trolled by vanilla
ease_dollars(amount)
you say that like vanilla has the unlock condition in the config ..., config = {}, unlock_condition = {type = 'win_deck', deck = 'b_black'}
I saw the text in vanilla as unlock_condition staying inside config
for some fcking reason
this is my very first mod minus VietnameseBalatro and LocFixer tho
those don't count because they're all localization-related
okay so, i want it to be at the end end where you get your money, and to be the total number of your deck
can someone say where i do find "ref_table" in the documentation?
is this happening because of a localization file or because of a localization function?
oh if you're doing it in calculate you can return { dollars = amount } and it will have better timing
context.starting_shop?
I think she* wants it to be on the cashout screen?
i added a loc-text in this case, but it doesnt seem to have something to do with that at all
she*
as for the total number of cards in deck, #G.playing_cards
yeah
on cashout screen isn't a context that exists
Try to reproduce the error with the minimal amount of code, that should help you narrow it down; if you still cant figure it out then, feel free to post that small amount here in chat
use this instead of calculate
i mean, i am a beginner, this is pretty much as minimal as i can have it.
Btw where do i find ref_table in the documentation?
what's the code? 🤔
I love misspelling emojis and then pressing enter
it finds "nil" in ref_table, and i need to put something in it i guess
it's used in different places throughout game code to mark a "reference table"
i think im dum
that's a function signature, not a definition
a function signature has the name, arguments, and return type(s)
so you want something like
calc_dollar_bonus = function(self, card)
return amount
end
...this is a (custom) undiscovered legendary. i remember before when i added custom legendaries, it had the standard undiscovered legendary text "Find this Joker from the Soul card" but now it's the standard joker undiscovered joker text? how do i fix this?
also @wintry solar, does this undiscovered joker graphic have a key for malverk replacement or like locked jokers, is that also not planned? answered: as of writing, it's a planned future malverk feature 
ok so i commented a bunch of stuff in and it fixed the crash at the start
now it crashes when i hover over the booster 
oh right, i was also asking if anyone knew what function gets called at the start of a shop phase