#💻・modding-dev
1 messages · Page 106 of 1
update smods
ok so small problem
spades are considered clubs, I only want diamonds to be considered clubs and spades
change the and to an or?
i.e. (suit == spades or suit == clubs)
sorry if this is a shitty suggestion
nope
yeah
no clue sorry
id idn't even need to do this btw i just called it normally with -1
if next(SMODS.find_card('j_dnm_blacktie')) and self.base.suit == 'Diamonds' and (suit == 'Spades' or suit == 'Clubs') then should work
oki doki
its slightly different
Hey can anyone please lmk how I make it so that it updates every blind instead of giving me 16 hands every blind
set_ability only gets called when you get the joker
?
so just reassign to card.ability.extra probs in both calculate and loc_vars
thats 10 days behind current build
that's a full 10 days out of date
god dammit
And also just general reference because usually the calculate function doesn't override the original, is there a way to change that?
Guess I am meant to update it every second
it overrides the original so long as you're returning something in the same contexts it uses
context.setting_blind and context.joker_main don't occur together
so that does nothing
me waiting for the day smods has auto update capabilities
I would just remove context.joker_main then?
yeah
kid named BMM (soon™️):
why doesnt it become the right file
do you have the extension preview enabled in file explorer?
Thats a main.lua.txt file
that text file still has .txt at the end which would explain why its a text document
So uh...
yeah ik i named it like that to try to make it a lua but it didnt work
what
Go into your windows file explorer options and find that setting
kid named vscode:
Alternatively, Win+R > rundll32.exe shell32.dll,Options_RunDLL 0 / control.exe folders
ahh thank you that worked
Well I'm not a big fan of telling people "hey, run this code you dont understand in the slightest!"
Mostly because it doesn't actually teach them anything
all ik is that wont delete system 32 lol
Tossing my two cents in with options, take all with a pinch of salt. ¯_(ツ)_/¯
now the question do i open the lua file in something like visual studie or?
VSCode or Notepad++ can work. Hell, even basic Notepad will do.
(dw ik that)
Or (hear me out) the obviously easiest option would be to switch to Arch...
/s
arch users when they let everyone know they use arch btw
That's such an Archetype.
why it ain't workin'?
This still just gives 3 hands
imma throw my blue eyes archetype decj to yo head
chip
huh?
me stoopid
also it's advisory to always use the card arg's ability table instead of self.config because it allows for card values to be changed
this way it always uses the default value of the prototype
which usually isn't what you want or need
i stupid
trying to make a Joker that functions like splash, how on earth am I supposed to do that
patch in functionality where splash is checked for
pokermon has a joker that behaves like splash (magikarp)
ah
Mystic summit rework (32 discards for the whole run, not counting discard gains)
3
5
3
X3 mult when 0 discards remaining
3️⃣
thing is not doing the thing
Does the order of this matter?
yes
Damn
function params are ordered
you're lucky you weren't around for steamodded 0.9.8
SMODS.Joker:new(name, slug, config, spritePos, loc_txt, rarity, cost, unlocked, discovered, blueprint_compat, eternal_compat, effect, atlas, soul_pos)
aure, what do you think to building in some way of adding free rerolls to smods? they currently require a patch and I could foresee some clobber if people do it badly
i see nothing wrong with that
Okay so this works but also doesn't override the original burglar, it just does the 16 + 3 hands instead of just 16
add return {} or something in the calculate
if you don't return anything, it'll keep going into the original code
Hey I'm fairly new to all of this modding stuff, but I wanted to make a Joker that functions similar to Spare Trousers, but for Flushes, and all it seems to do when I specify a hand for it to detect is crash the game when that hand is played, so I was wondering if there's some cohesive guide somewhere on how to do stuff like this since the Steammodded Wiki stuff isn't super clear on how any of this works. Or if someone could point me to where the specific joker functions are stored in the source code so I can maybe copy and modify the code for Spare Trousers? Any help is appreciated as I haven't been able to accomplish much aside from making a Joker that either does nothing or just crashes the game a lot in the last few hours.
Gotcha
assuming you already extracted the source code, you can just search for 'Spare Trousers' and you'll find the code quite easily
OKAY that works good
Well I extracted the exe, I was wondering what lua file the jokers were in or if they're somewhere else
it's not nicely in one place, joker metadata like cost, rarity, etc. are in game.lua while calculation code is in card.lua
with visual studio code you can do global search
I think I understand how to make a joker/consumeable create a Joker, but how to I make it where its only jokers of a specific rarity
when adapted to steamodded, it should look something like this
calculate = function(self, card, context)
if context.before and next(context.poker_hands['Flush']) and not context.blueprint then
card.ability.mult = card.ability.mult + card.ability.extra
return {
message = localize('k_upgrade_ex'),
colour = G.C.RED,
card = card
}
end
if context.joker_main and card.ability.mult > 0 then
return {
message = localize{type='variable',key='a_mult',vars={card.ability.mult}},
mult_mod = card.ability.mult
}
end
end
Well this looks a lot more complicated than the code I had so clearly I was doing something wrong
How could I get a # in a joker's description? ive tried escaping it, but it just errors out
This does seem to still crash the game, I think it's coming from the + card.ability.extra, unless it's something earlier in my code that's screwing it up
this is assuming the same config structure that spare trousers has
okay so im either really dumb or something but i coppied a template to test something out for my first joker but idk why it doesnt show up (sorry for the bad sc idk how to put it into chat better)
if you have a different config, you have to change these accordingly
Gotcha
Thanks for your help, this has gotten me much farther already
I changed + card.ability.extra to +2 and it literally works perfectly
Insane, thank you so much
you could also add extra = 2 to the config but sure
local jokers_to_create = math.min(2, G.jokers.config.card_limit - (#G.jokers.cards + G.GAME.joker_buffer))
G.GAME.joker_buffer = G.GAME.joker_buffer + jokers_to_create
G.E_MANAGER:add_event(Event({
func = function()
for i = 1, jokers_to_create do
local card = create_card('Joker', G.jokers, nil, 0, nil, nil, nil, 'rif')
card:add_to_deck()
G.jokers:emplace(card)
card:start_materialize()
G.GAME.joker_buffer = 0
end
return true
end}))
card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_plus_joker'), colour = G.C.BLUE})
end```
I found this in riff-raff code, the fourth value in create_card is for the rarity
more argument order jank
that one doesn't work how you think it would
it doesn't actually take a rarity index like elsewhere
it takes a chance roll for a rarity
yes
anything up to 0.7 is common, above 0.7 but up to 0.95 is uncommon, above 0.95 is rare
Did I cook here?
SMODS.create_card should provide a better system for that tbh
ty for the info
hold on does that mean there's a 5% to get a rare joker in the shop
yes
thats awfully low
how can i get if the player is currently in a blind without using context
i'm using my custom use() function i added to my "active" jokers lol
i need it to know whether the player is in a blind or not before doing stuff
G.GAME.blind.in_blind iirc
might need to check G.GAME.blind exists first to be sure, not sure if that's necessary
is there something that checks if they're not in the select screen then
select screen or shop
i did do that tho
G.GAME and G.GAME.blind and G.GAME.blind.in_blind just skips it for some reason
WAIT
NEVERMIND
where did you put that tho
OH MY GOD
NEVERMIND IGNORE ME I'M SO STUPID
I MEANT TO CHECK IF THEY WEREN'T IN A BLIND NOT IF THEY WERE
lmao
😭
Okay so my custom joker is actually working well, the last thing I need is for the flavor text to accurately report the mult amount, and I'm having trouble figuring out how exactly I get that information into the text field
#1# and then locvars
i.e. ur loc_txt in the text part will be like
"Has +#1# mult"
#1# will grab the first value in loc_vars which you can set to whatever config variable has that mult
see https://github.com/Steamopollys/Steamodded/blob/main/example_mods/Mods/ExampleJokersMod/ModdedVanilla.lua for some examples
goddammit i broke the charging again on my jokers
whyyyy
maybe it's bc they're set to 1 rn
yyyup that's probably it
hm
Man Google search really is borked, I couldn't find this at all no matter how much searching I did
I suppose this'll do
my cards hate me
😭
i can't even ask how to fix this it's MY own fucking custom 1/1 gameplay mechanic
dobd
sobs*
OH MY GOD
I FIGURED IT OUT
ISAAC?
yeah!
it's very wip, a lot of cards don't have textures yet, i think i'm onto 10 jokers now?
all of them (gfuel especially) are very high effort
my idea was to make a mod that doesn't feel like just another just like. balatro mod. i wanted it to feel like the binding of isaac had its own place in balatro without thinking inside the smaller box of balatro gameplay loop sorta
anyway my issue was that i forgot to fix all of the init_logic shit to be global when i changed them LMFAO
insta add lol
hehe
thank
i'm working rn on iv bag
it's almost ready
it's basically you trade 1 hand for 0-3 discards
it's only for the round though
ok cool i fixed it!
thats an awesome idea
i'm the only mod that has "active" jokers though to my knowledge
they have charge bars that work with the battery functionality
if only my mod would show up between the rest cuz idk why that no work
make sure its in its own folder
but yeah, this is what it looks like with battery next to it (left is iv bag, right is the battery)
ik it's confusing, i don't really have a better placeholder
unfortunately i'm just 1 person and god decided to make me good at music, which is ironically the one thing in balatro that you can't really replace
not that i didn't try
Playing with the new suit/rank fun
i think i need to add a blood bank foley sound though when you use iv bag
i need to remember what iv bag even sounds like
i think it has sound
if it doesn't i need to rember blood machines
oh i found it
do i need to do more idk what i need more
wait what's the folder in?
i meant what's in the folder for it
it should just be the mod stuff
if it crashes btw u might have to disable some other mods
i don't remember if cryptid still crashes it or not 😅
wdym?
...if it's not loading, you don't have a header for Steamodded to read.
do i need more then this?
oh ur mod
yeah lol
yeah dw man it works
you are missing the end header
----------------------------------------------
------------MOD CODE END----------------------
place this at the bottom of ur file
OJH
WAIT NO I FIGURED IT OUT
sorry this is something they don't really um. tell you
you need to set your atlas to xmpl_Mythos instead inside of your joker
you need the prefix
and also that bottom end header if you don't have it already
thats why mine wasnt working 🤦🏽♂️
in the end I used the json
lol
yeah i wasn't sure either
btw dw @scenic sphinx literally nobody told me for like 4 hours why shit wasn't working until i found out about prefixes
Weird, I don't have that for mine and I'm still using the legacy header... and my mod still loads just fine.
oh
wait what
ok then i have no idea
lmfao
is it the inconsistent space for "STEAMMODDED HEADER"?
May be.
huh i dont get it lol
that's just another good practice honestly but also if ur gonna add sounds it helps to know about prefixes
haha kinda funny people think that's required for some reason
or anything remotely advanced past mult lmfao
it does nothing, steamo just had early example mods that way and it stuck, idk
oh alright
for now i just want it to show up in the mod list lol
i really recommend using json metadata files at this point tho
prefixes are kind of managed for you too unless you're doing more technical stuff
I just learnt that now but it seems it was not the case, I still dont know why it wouldn't work lol
fixed it still doesnt show up
smods says headers is deprecated, might as well use the json too
the author must be in square brackets
OHHHH
but you should use json regardless
idk
lol
take this template and fill it in
okidoki
what's the um. file name?
oh nevermind
wait is this thing case sensitive?
do i put it in my header or where do i put it
no
make a file in ur directory i think called whatever ur mod file is called.json
for me it's wrenbind.json
ahh and put that in
at least that's what i'm assuming
let's see
yeah
this is what mine looks like
then u can just remove all of ur headers and stuff entirely
just make sure main_file is ur main code file
thats some high priority
u should see cryptid's
...lol
like i'm not joking her btw the binding of jimbo will be the next cryptid of balatro mods
i'm not planning on making this low-effort, unlike the mod for my friend that i'm doing when he's done spriting LMFAO
this is honestly just a fun project to learn a new language (i was INSANELY new to lua when I started this) and it's been really really fun
also just to like
derust
it's been a while since i've done a big programming project
last one i did was like 5 months ago and i did a fullstack on aws and everything
oh you've changed your name
oh!
yes i did sorry
😭
my music stuff is under hyperpup so i changed it globally to be hyperpup but my oc is wrench
same here, I knew 0 about lua before
so this should be okay?
remove the comma after dependencies
now i know slightly more than 0
shitty documentation writer forgot that you can't have empty commas in json
it's case sensitive
you need a badge_colour from what I remember
thiiis one right here
nope
or maybe it defaults
yeah dw fixed it
kewlll
ok iv bag implemented
time to scour the isaac wiki for a new active item to implement
one of these days i'll do do d6 and ed6 and finally start character decksp
good thing that's not today!
ig i'm streaming dev now lol
lost should start with the joker that makes sure you dont lose once lol
haven't figured out holy mantle yet
i think it'll prevent one blind death per room
maybe?
but like
you'll still have to finish the blind
it'll give u one more hand and discard to try
i think
but also all character decks start with an eternal negative active item based on the ones in isaac
i could do pills rn
hmmm
whats the forgotten gonna be
you start with a negative eternal bone
btw if ur a spriter i actually need someone who can do pixel art for jimbo
i'm not very good at anything that isn't typography...
a yes id call myself one lol
(ik it needs allot of work)
am i stupid? (thats the dependencies that was in the latest cryptid + jen modpack so it should work)
this could help idk
oh wait ur so right
unfortunately i'm loading stuff like cryptid so it's probably for the better anyway LMFAO
yeah true
was WAY too big for one file
goodluck actually finding em
i did lol
you can look at ortalab too
you underestimate my power
nah it's alr
i'm using the cryptid loading system
makes more sense anyway
I might be slightly biased but it has a better loading system than cryptids
shrugs i'm not reprogramming my mod
ty game modding for making me feel dumb asf
"Steamodded (>=1.0.0~ALPHA-1216c)"
aha ty that worked now the crashes begin
like is aseprite not supported as a file option cuz tf does it mean
Is there a way to change the value of for example Chips for enhancements?
Like, it gives + chips depending on the number of cards in the deck.
ah yes another crash i dont get (sorry that im asking so many questions)
Where can I find a repository of information on how to get started with modding? I might start fiddling with balatro modding on the side, seems fun
Try to read a png, not an aseprite file
Radical 
do you have the atlas in the 1x and 2x folder?
Balatro probably can't open and read .aseprite files.
thats already fixed
you need to update it in the code too
yes should it be only in one
Doesn't look like it.
oh yeah makes sense
yeah sorry mate didnt understand what you meant
so help?
FINALLY IT WORKS
congrats
now only know why i cant open the debugger or just how i do it
Debug mode you hold TAB
Can I see the spritesheet?
m-hm..?
We deleting suits
this is it lol just a single thing
New suit™️
Guess what time it is... Luigi Picture Poker time
no clue, idk what the soul pos thing is, as I don't have it in my jonclers
Hey last thing from me, anyone know the easiest way to destroy cards upon playing them, or for the case of what I'm trying to do, destroy a whole hand?
during context.destroying_card return true
Where would I put that in the code exactly
yeah i think thats for legendery jokers cuz its like an overlay
in the calculate function
like in my joker i have
if context.destroying_card and not context.destroying_card.ability.eternal and context.destroying_card:get_id() ~= 7 and pseudorandom('eaten') < G.GAME.probabilities.normal/card.ability.extra.odds then
return true
end
... a lot of ands in there
yeah soul_pos is the hovery bit; if you don't use that (i.e. your joker is mundane and not hovery) you can leave it out entirely
yeah deleted it it works now
im very happy everything works
okay not yet
it says it gives me the score and doesnt lol
i think i got. pills working?
i'm literally not bothered enough to define them seperately, i'
i'm basically going to just define id-given effects at the start of every run for each id of the pills and save it
oh my god wait this is such a huge project
lmfao
WHAT DOES THIS THING WANT FROM MEEEE
okay so is there a reason it isnt working like making the chips actually happen
a sec...
take your time lol
I use card.
alrighty
it was from a template lol
Fair.
center gets the card itself
I use templates most of the times.
then what is this self or card funny thing
i don't even use self bc it has literally never worked
Same problem as the other guy, probably.
true as fuck probably
I use card.
anyway center is how the original game refers to it
and i have to use center sometimes
ah
i.e. with charged jokers, in order to change the position of the current extra atlas drawing the overlay, you have to do self.config.center.pos.extra.x
and also for my custom use() function as well
My question still stands: How can you modify a value in an enhancement?
oh dude that's above my pay grade i haven't done that shit yet
my shit's too advanced for steamodded half the time 😭
i've had to make so many patches of my own i basically have my own mod engine here
in calculate? because self definitely works for the center in there
iunno brb
My first idea was to get the whole deck (partly for testing purposes), but tht gives out an error when loading because there is no deck.
idk what to do.
jelp
it's implicitly given via center:calculate(card, context) so if it isn't working then that's a severe luajit bug
either that or for some reason it's not called as a method
but i highly doubt that
who knows but it should definitely work
YALL FINNALY
no i know it's center:calculate
i don't remember what i was bringing up here
oh u meant in self lmfao
self sometimes is buggy for me sometimes
iunno
Any highly skilled dumbass programmer out there that can solve this for me?
itz gonna be something stupid
Look at ortalab
i would but honestly i'm only interested in my mod 😅
i know that's really shitty but like
i finally achieved happines
Or just a way to do the thing.
real
there is no happiness in programming there is only satisfaction
and when shit works it feels better than sex to me
When shit works my brain goes "ah, finally. Time to move onto the next thing!"
yeah pretty much
willing to bet the reason this doesn't work is bc i left something out from the cryptid code
sex whats that?
but that means you know a solution for my problem
no i don't but i'm not stupid unfortunately and could figure it out relatively fast
undefined function or variable or something idk
i wish i was stupid though
being smart is a fucking burden
meanwhile i guess i'm done being a burnout loser
all ik is it is the reason i live
i figured it out i'm just stupid
i try
Hey does debugplus give you vouchers?
Or like are you able to get vouchers easily
Yes
You have to be in a shop
Pressing 3 will add it to the voucher slot
Same thing works with booster packs
For the localization file... what's the naming layout for Booster Packs?
Gotcha
why wont it go away
oh nvm so I think whats happening is it's checking for a boss blind before it actually gets redeemed
That's problematic
I got this to work today 
tbh idk how does jimball do it
cursed balatro images
spritesheet that rapidly swaps images
hey does anyone that works with vouchers a lot know how to make a voucher apply a passive effect like this? (gives 1 hand when boss blind is defeated)
what is that for cursed joker destroy it
you would never use a gif for an animation in game development
ahh makes sense
Holo: X.5we lyn adi de oyu ek
(50% of Hologram's text, I think)
Shoot, whilst moving stuff from main script to localization file, I forgot the key where I was supposed to put the definition. 💀
I find it interesting that Hologram uses the same effect as legendary jokers do
yeah I was using the hologram sprite as a test sprite
this isn't a joker I'm adding btw, just testing some Steamodded API I'm working on
the reason why this happens is because ||all the cards act as wild and stone cards... and every other enhancement||
THATS where stencil joker went
what can i say except i hate it
is just cursed
does the game store your last played hand for you or do i have to track that myself? asking bc im trying to make a card that works like this
Gotta store it yourself.
can i store it like, agnostic of having the card?
or i suppose it wouldnt matter, since no matter what its starting from zero
how would i like
track/change something every second or so?
i want a card to be animated basically
so its changing the position of the card every second
looks like it !
bump
actually, it seems better if i made it a function
since its not really an effect of the joker
just how it looks
orrr wait
maybe just an unblockable event
extremely new to modding and lua in general (sorry) and i have no clue on how to make this both not crash the game on startup and properly work i know its (probably) something to do with functions
play_sound needs the string with the mod's prefix in front.
As example, my prefix is toga and the sound I want to play is dorime.ogg with key set as dorime: play_sound('toga_dorime')
good to know
does lua even let you make that kind of distinction? I thought they only had "number" on offer
wait really? can i just make it 0.5 or whatever then
should be able to yeah
I think in my stuff I've got a mix of 0.1 and 0.2 delays, maybe a 0.4
4, 0.4, 4.57e-3, 0.3e12, 5e+20 are all valid numbers for Lua.
kk !
also
G.E_MANAGER:add_event(idiot_event){
blocking = false,
blockable = false,
delay = 1,
pause_force = true,
no_delete = true,
trigger = "after",
func = function()
if pos == { x = 0, y = 0 } then
pos = { x = 1, y = 0 }
else
pos = { x = 0, y = 0 }
end
end,
},```
this is my ramshackled line of code to try and make it change pictures each second
and obviously the game is crashing on launch
Joker, ye?
Atlas has two images for this Joker, yes?
In the update function of the Joker, use
card.children.center:set_sprite_pos({x = math.random(0, 1), y = math.random(0, 1)})
if you really want to change the image every single frame.
NOT every single frame lmao
it was everyyy
im checking
30 one hundredths of a second
or 35 unimportant
though i did use this from the github template and i copied it differently than was shown
event = Event {
blockable = false,
blocking = false,
pause_force = true,
no_delete = true,
trigger = "after",
delay = 5,
func = function()
print("Hi mom!")
event.start_timer = false
end
}
G.E_MANAGER:add_event(event)```
what it gave
The delay implies 5 seconds before the func executes.
yeah no that seems fine, i'll just set it lower
problem is, when i place this into the code, "local event" at the top doesnt actually do anything
And it executes once.
Would this work? The actual voucher code is pretty much blank but would this have the effect I want it to?
These are in trigger_effect for the deck btw
I'm not as well versed in this, so I may be talking out of my ass. Best to relegate this to someone who knows better of events... but you still may find the function I've sent useful regardless.
alright !! thanks for trying at least
this joker does almost nothing helpful and its the most complicated one ive made LMAO
how would one check which hand type is the highest listed scoring hand type in a played hand?
scoring_name?
im still trying to navigate my way around the documentation
where can i find the game's localization files? for the life of me i cannot figure out what the localization key is for xmult
Hey so if I'm not wrong it's not possible to use loc_vars on a blind ownership to replace the description as of now, correct?
Because I'm pretty sure it only accepts vars when on a blind
i got that prefix junk figured out but i still cant tell when (and how) to fire it off instead of startup when it's nil
just do SMODS.Sound:register_global()
it does all of this shit automatically and then all you do is type in your prefix in the file name
also you need to set a prefix in your metadata
my prefix is wrenbind.
i can call literally any sound in my assets/sounds folder by putting in the prefix_name (minus the extension)
i.e. "wrenbind_pills1"
um but
you are doing a lot of things wrong what are you even trying to do here
you know what's causing the crash?
context doesn't exist on a global level
you need to create a joker and then on calculate do
function calculate(self,card,context)
if (context.poker_hands["full house"]) then
play_sound("crabrave_fullhouse")
end
end
again im very new and i just thought that would work L_L
i'd look at the example jokers mod in the steamodded folder
i'm not making a joker
what are you trying to do
_ _
like you play full house and it goes "the player has... nuuhfullhaus"
um
thats just what it sounds like
probably this function evaluate_poker_hand(hand)
you have like
no idea how to do anything with steamodded though
i would start somewhere else
yeah sorry
no it's ok i'm just trying to be helpful
i'd try to make a joker or two first and learn patching before you try something like this /gen
especially if you're not familiar with lua
i threw myself into a huge project head-first but i had some elementary lua experience, even then it helps that i started with jokers. my entire codebase has completely shifted over the course of like. 2 weeks
if you ever need help, there'll be people here to help you, it's just that, yeah, this is a pretty big um. project whether you realize it or not 😭
ty for telling me this before i tried brute forcing this like a big dummy
no that's fair
listen i've been brute forcing shit all week
my entire mod is like. i have to basically invent my own game shit at this point because nothing i want to do is even supported by balatro itself, letalone steamodded or lovely
so i get the feeling
how do you make a joker retrigger itself
-# and ideally without immediately entering an infinite loop, yes
uhm youre gonna have to specify then
do you want it to retrigger once?
chance based?
once per each previous joker trigger this hand
i'm basically copying the storm mechanic out of mtg
(legendary joker :v)
yes, though it isn't counting in the way i'm expecting it to
if (context.post_trigger and context.other_joker ~= card) then
card.ability.extra.stormcount = card.ability.extra.stormcount + 1
sendDebugMessage('[Minty] Storm count: '..card.ability.extra.stormcount)
end
what exactly is it doing?
the storm count is increasing higher than i think it should be, but then the joker doesn't retrigger itself
here's the whole calculate actually
calculate = function(self, card, context)
if context.joker_main and context.scoring_hand then
sendDebugMessage('[Minty] Stormy Xmult')
return {
message = localize {
type = 'variable',
key = 'a_xmult',
vars = { card.ability.extra.Xmult }
},
colour = G.C.RED,
Xmult_mod = card.ability.extra.xmult,
card = card
}
end
if context.retrigger_joker_check and not context.retrigger_joker and context.other_card == self and card.ability.extra.stormcount >= 1 then
sendDebugMessage('[Minty] Stormy repetitions')
local storm = card.ability.extra.stormcount
card.ability.extra.stormcount = 0
return {
message = localize("k_storm_ex"),
repetitions = storm,
card = card,
}
end
if (context.post_trigger and context.other_joker ~= card) then
card.ability.extra.stormcount = card.ability.extra.stormcount + 1
sendDebugMessage('[Minty] Storm count: '..card.ability.extra.stormcount)
end
end
this may not help at all, but shouldnt the thing that checks for stormcount be BEFORE the thing that uses it ?
i dont know if order matters like that
since its based on when a thing happens
is it sending the repetitions debug message?
hmm
i'll double-check, but i recall it not triggering xmult at all when that part was below the storm count part
and no, the repetitions debug message is never sending
right, so the main problem is with the if statement then
yeah
but i copied that context out of cryptid's chad, so in principle it should be right?
as long as the contexts arent cryptid made or something lol
no clue what that mod does, its black magic
okay, moving the xmult part down didn't change anything at all
and switching to a different joker to test seems to have avoided the issue with the count increasing too fast so i think that's actually an issue with the other joker
i see
if i were you, try isolating the parts of the if statement
like, take 1 part of it out
see if it works
if it does, add the part back and remove a different one
go down the line just brute force bug testing
how do i scale up the poker hand text
i tried something in the UI definitions but didn't work
I'll try that again i guess
stopping for the night bc nasty headache but this is proving to be really fun and a good excuse to learn lua
(the other one doesnt work yet lol)
hm
disabling context.other_card == self lets it retrigger, but it does it wrong
it goes joker A, joker B (retrigger), Stormy (retrigger twice)
i don't want it to retrigger the other jokers. that's what that check was for. but i still want it to retrigger at all
inter esting
have you tried everything else? or is it only that thats causing a problem
currently that's the only issue i'm seeing
probably the only problem anyways
yeah
im mostly out of my league here lol but
knowing that thats the problem is helpful
explain to me like im 5 what context.other_card == self is supposed to detect
sometimes saying code outwards helps
it's supposed to detect which card it's trying to retrigger
since i only want it retriggering itself
in chad it was context.other_card ~= self which is presumably because chad wanted the opposite of that
so right now, what seems to be the problem, is that when it checks what the "other_card" is its not itself
even when it should be
hm. sudden hunch. this is going to either fix everything or crash immediately
both options equally awesome
well! i don't know what i thought self referred to, but i changed it to card and it now works perfectly
though it's echoing Storm! every time and ideally it would only do that once
but eh. that's a minor detail
woohoo ! glad i could help(?)
trying to figure out how to make a joker's image swap between another every second or so, this is what i have so far:
G.E_MANAGER:add_event(Event({
blockable = false,
blocking = false,
pause_force = true,
no_delete = true,
trigger = "after",
delay = 1,
func = function()
if pos == { x = 0, y = 0 } then
pos = { x = 1, y = 0 }
sendDebugMessage('check1')
else
pos = { x = 0, y = 0 }
sendDebugMessage('check2')
end
end
})),```
its constantly displaying "check2"
so its clearly not switching
but i assume its just not repeating the event
Hey guys I need help
I'm trying to make it so that a blind's challenge is that every discard costs 3 discards instead of 1
But from what I see the only things that steamodded allows with blinds is stuff like debuffs and things that happen when cards are drawn to hand
Actually hold on
Lemme see if I can get this lovely patch to work
Nope
Does anyone who knows what they're doing see anything obvious that I'm missing?
Or am I going about this all wrong
hey I just installed the latest steamodded and suddenly my mod is no longer being detected properly. Any idea why?
dependencies format changed
ah what to?
Something like:
"dependencies": [
"Steamodded (>=1.0.0~ALPHA-1203b)"
]```
i forget the exact details but it's on the smods wiki
Stickman jokers ? :0
Thats fire
Call the mod "Flipnote Jokers"
holy shit yomi hustle mod
Wassup chat
How do I set up a scaling joker?
Currently I'm working with this
SMODS.Joker{
key = 'profren',
loc_txt = {
name = 'Prof. Renderer',
text = {
'{X:chips,C:white}+#1#{} Chips per',
'Spectral Card used this run'
}
},
atlas = "Jokers",
pos = {x = 0, y = 0},
config = {
extra = {
chips = 10
}
},
loc_vars = function(self,info_queue,center)
return {vars = {center.ability.extra.chips}}
end,
calculate = function(self,card,context)
if context.joker_main then
return {
card = card,
chip_mod = card.ability.extra.chips,
message = '+' .. card.ability.extra.chips .. ' Chips',
colour = G.C.CHIPS
}
end
end
}
the game does not keep track of spectrals used unlike tarots
actually i fucking lied
elseif card.config.center.set == 'Spectral' then G.GAME.consumeable_usage_total.spectral = G.GAME.consumeable_usage_total.spectral + 1
lmao
it tracks all consumables
And this I would have to put under context.consumables...? Or is it a different context
context.joker_main
just change where you have card.ability.extra.chips to card.ability.extra.chips * G.GAME.consumeable_usage_total.spectral
Okay so this is what I have so far. Obviously I need to add the current chip count
SMODS.Joker{
key = 'profren',
loc_txt = {
name = 'Prof. Renderer',
text = {
'{C:chips}+#1#{} Chips per',
'{C:attention}Spectral Card{} used this run',
'(Currently {C:chips}+#2#{})'
}
},
atlas = "Jokers",
pos = {x = 0, y = 0},
config = {
extra = {
chips = 10
}
},
loc_vars = function(self,info_queue,center)
return {vars = {center.ability.extra.chips}}
end,
calculate = function(self,card,context)
if context.joker_main then
return {
card = card,
chip_mod = card.ability.extra.chips * G.GAME.consumeable_usage_total.spectral,
message = '+' .. card.ability.extra.chips * G.GAME.consumeable_usage_total.spectral .. ' Chips',
colour = G.C.CHIPS
}
elseif card.config.center.set == 'Spectral' then G.GAME.consumeable_usage_total.spectral = G.GAME.consumeable_usage_total.spectral + 1
end
end
}
oh, put it in the vars return of loc vars too
you don#t need the bit where you're checking for a spectral
that does nothing
loc_vars = function(self,info_queue,center)
return {vars = {center.ability.extra.chips,center.ability.extra.chips * G.GAME.consumeable_usage_total.spectral}}
end,
Like that?
Edit: not like that, gives an attempt to index a nil value error
And I assume I'd need another context to show that you upgraded your chips upon using a spectral card as well (context.consumables?)
The good people must know far and wide of the turn based kusoge

^
After the *, yeah?
Alright, cool. So then for the upgrade text upon using a spectral card, that would be in a different context using similar formatting to context.joker_main? Or is it all in context.joker_main?
Yeah, so is it like, context.consumables or something like that?
i'm trying to make an avatar mod, when trying to make a fire enhancement i am prompted with this error
[SMODS _ "src/loader.lua"]:528: [SMODS Avatar "main.lua"]:25: '}' expected (to close '{' at line 23) near 'loc_txt'```
this is my code in main.lua
--- STEAMODDED HEADER
--- MOD_NAME: Avatar
--- MOD_ID: Avatar
--- PREFIX: avatar
--- MOD_AUTHOR: [Koenveck]
--- MOD_DESCRIPTION: Adds avatar cards.
--- BADGE_COLOUR: 708b91
--- DEPENDENCIES: [Steamodded>=1.0.0~ALPHA-1216c]
--- VERSION: 0.0.1
--- PRIORITY: 0
----------------------------------------------
------------MOD CODE -------------------------
SMODS.Atlas{
key = 'Enhancements',
path = 'avatar_enhanc.png',
px = 71,
py=95
}
SMODS.Enhancements{
key = "fire"
loc_txt = {
name = 'Fire card',
text = 'This card has been enhanced with fire'
},
atlas = 'Enhancements',
pos = {x=0, y=0}
}
🤦♂️
Yeah it's easy to miss a comma, I myself got hung up by it until I noticed it
now i get a crash because i attempt to call field enhancements [a nil value] surely its another stupid error but i dont know how to fix it
calculate = function(self,card,context)
if context.joker_main then
return {
card = card,
chip_mod = card.ability.extra.chips * G.GAME.consumeable_usage_total.spectral,
message = '+' .. card.ability.extra.chips * G.GAME.consumeable_usage_total.spectral .. ' Chips',
colour = G.C.CHIPS
}
end
if context.using_consumeable then
return {
card = card,
}
end
end
I'm getting myself confused about context.using_consumeable after looking at the wiki, does it use the same metadata as context.joker_main or is it just a boolean?
you want ```lua
if context.using_consumeable and context.consumeable.config.center.set == 'Spectral' then
-- code to do your message upgrade here
end
And inside that code is just the same return {...} as context.joker_main, correct?
if (context.using_consumeable and context.consumeable == "The Wheel of Fortune") or context.reroll_shop then
-- random bullshit go!
end
jelp, sh*t not working
could be context.consumeable.ability.name == "The Wheel of Fortune"
and when i change .Enhancements to .Joker it says bad argument #1 to 'pairs' (table expected, got string)
your loc_txt text is meant to be an array of strings
not a string
Alright, I'll leave it at there and maybe after the holidays I'll work on it a little more. This is what I've got so far
thx that brings me a little further how should i change it so its a table
because i thought i already had them in a table and now im lost
oh wait never mind
Hey guys! I'm new to modding and coding in general, I was wondering how I could make texture packs for balatro, and it seems like i keep having errors, can anyone here help me with it?
^the main folder
Help, I'd rather do this sooner than later.
. _ _ . _ _ .
add "dump_loc": true into your metadata json (or --- DUMP_LOCALIZATION in your file header if you have one and run the game once with no other mods, then remove the flag
rename the default.lua file in your mod's localization folder to en-us.lua and add your strings there with the corresponding keys whenever you add something and remove all your loc_txt
Alright.
still having problems with this
https://cdn.discordapp.com/attachments/1320812745750483067/1321083105804681226/Balatro_2024-12-24_13-51-08.mp4?ex=676bf204&is=676aa084&hm=1122f2cf8fea19cd12a7f21cb4184a1f1ffda6d70b02101a055406c4fdf80ca0&
I am having this issue where my joker gets triggered when it shouldn't (it should only trigger when a card gets retriggered) and I don't know how to fix it. help me
SMODS.Joker { -- Midspin
key = 'midspin',
rarity = 2,
cost = 6,
atlas = "adofai-jokers-1",
pos = { x = 4 , y = 0},
config = { extra = { mult = 0 , mult_gain = 3 , times_fired = 0 , timse_to_fire = 0} },
loc_vars = function(self, info_queue, card)
return { vars = {
card.ability.extra.mult,
card.ability.extra.mult_gain,
card.ability.extra.times_fired,
card.ability.extra.times_to_fire
} }
end,
calculate = function(self, card, context)
if context.before then
card.ability.extra.times_fired = 0
card.ability.extra.times_to_fire = #context.full_hand
end
if context.repetition and card.ability.extra.times_fired < card.ability.extra.times_to_fire and context.other_card == "Joker" then
card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_gain
card.ability.extra.times_fired = card.ability.extra.times_fired + 1
card_eval_status_text(card, 'extra', nil, nil, nil, {message = "Upgrade!"})
end
if context.joker_main then
return {
mult_mod = card.ability.extra.mult,
message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } }
}
end
end
}
missing a boss disabler joker for common rarity now
"Disables every Blind that is not a Boss Blind"
(literally useless)
does it work like Madness where it disables the boss whether or not a joker is destroyed
wouldnt that just be a Chicot but better
yes thats why I was wondering, wording should be changed to "if a joker is destroyed, disable boss blind"
or something
its written like Sacrifical Dagger
it's consistent with vanilla wording
madness is "gain mult and destroy joker"
fair enough, "and disable boss blind" just looked like it happens either way
the implied rule is to do the latter only if the former succeeds
you can see this in other places too, e.g. Sixth Sense
If you have two of them, the first one destroys the card and if you still consider the hand to be a single six (even though it's already destroyed), destroying it would fail so no spectral
and it works with Bunco
That worked, ty
if not context.blueprint then card.ability.extra.used = true end
ease_discard(card.ability.extra.d_size)
card_eval_status_text(card, 'extra', nil, nil, nil, {message = "+1 Discard"}, G.C.RED)
end```
in this case, what if I want to localize "+1 discard" though, how would I add these strings
you can put it in misc.dictionary and just put the key through localize, plenty examples of this in vanilla
i'm trying to draw a card face down, what's my mistake?
draw_card(G.deck,G.hand, 0, "down", true, G.deck[1], 0.07, false, true)
hey, how would one try to make a card that functions like this? im kinda stumped trying to get the last played card in a usable way, or at all frankly lol
i will try this in a moment and get back to you, thank you so much! in the active of learning both lua and this games codebase so im still learning the limits of what i can and cant do
any help is appreciated
how do i make
{C:green}#2#{} in #3#{}
everything green instead of just #2#{} (only way i can come up with is putting the {C:green} in front of every word but there must be a better way)
that works thanks
please?
didn't work
nope
yeah i was trying to go off of that
it didnt work :9
p sure im already doing that
no it's drawing the cards but face up
ohhhh nvm its supposed to be g.deck.cards
nvm it's still not working what do i do help
Where does one find all these definitions?
is there anyway to force only a specific chance-based thing to have higher chances? say, if i wanted a joker to always make wheel of fortune always trigger, would that be possible?
in the balatro source code
just unzip the exe like a zip file and put its contents somewhere convenient to reference
How do I prevent a joker from triggering when looking for card retriggers and not joker re-triggers?
(Like, the joker should trigger when a playing card is triggered and not when any given joker is triggered)
duplicare uses (context.individual and context.cardarea == G.play)
are you looking for all triggers or only retriggers?
Retriggers of cards only.
For some reason it also fires when a joker gets triggered (i.e. upgraded because of x or y reason)
i would try (context.repetition and context.cardarea == G.play) then
I'll try it.
Nope.
The joker gets triggered when a joker gets upgraded
Which isn't supposed to happen...
I just need to filter out joker triggers while in the repetition phase thing.
so, how do I do jus that?
i feel like something in here would do it https://github.com/Steamopollys/Steamodded/wiki/Guide-‐-Joker-Calculation#card-evaluation
but i'm not quite grasping what
context.other_card maybe could work, but I don't know what values it can take.
Bump, I sent this pretty late so not many ppl were awake 😭
Ive done that but i get a lot of files none of which seem to have any definitions, might just be blind
What file can i find them in
And how would i do that?
Anyone knows this?
could it be something to do with context.repetition_only?
Checing, but probably it won't work...
*I still don't know exactly when those contexts become true
Now it just does nothing.
repetitions is just when repetition happens, repetition.only is related to seals? but i know it can fuck up jokers
It does not work, aw
how does the naming conventions for take ownership work, the example says 'joker' as an example, but does it mean the name or j_(joker's name)
repetition only simply does nothing, or at least when testing it. with my joker™️
where can i find the code for the glass card enhancement within source code
try searching for "glass" or m_glass
How can alternative localizations for SMODS.Center be given? The Wiki doesn't give any examples of it anymore
You’re going to need to lovely patch into evaluate play, jokers don’t have any information for how many times cards trigger
me when I don't know how to do that at all
Then either go and learn or pick a different effect
go learn where
reading
smooth flat brain
its unfixable 😔
Hey I need some help with some stuff.
How do I make a voucher give a passive effect that activates throughout your run that isn't just increasing some value?
Is there a way to change the description of a blind with take_ownership?
Is there a way for a blind to activate something on discard instead of on played hand? I'm trying to make the water make discards cost 3 discards instead of 1 on T. Red deck
when looking for glass, i only get results for glass joker, when looking for m_glass i only get results for challanges
Well sh*t then...
This was the patch I tried to use for the third point
[patches.pattern]
target = 'functions/state_events.lua'
pattern = '''if G.GAME.modifiers.discard_cost then
ease_dollars(-G.GAME.modifiers.discard_cost)
end
ease_discard(-1)'''
position = 'at'
match_indent = true
payload = '''
if G.GAME.modifiers.discard_cost then
ease_dollars(-G.GAME.modifiers.discard_cost)
end
if G.GAME.selected_back.effect.config.ttr_red and (G.GAME.blind.config.blind.key == bl_water and not G.GAME.blind_disabled) then
ease_discard(-3)
else
ease_discard(-1)
end'''```
I mean, looking for m_glass also returns game.lua to me
and looking for Glass Card returns card.lua among others
okay so im dropping the rng chance to retrigger last played card because for the life of me i cant figure it out
i am trying a different gimmick that might be a better nod to the source material and ironically might be easier despite it sounding a lot harder... however, im having a hard time storing the ID of cards (as in, the "10" part of a "10 of Spades") in a readable format for the card logic. context.other_card:get_id() just gives nil so I can't do anything off of that
anyone know a proper way to do that?
for context, this is what im trying to do:
this line appears in the console, but only once, which tells me like, there is a value being stored, but lua doesnt know how to print it out raw so it shows nil. i think thats whats happening because its not constantly reassigning it like the code implies it would
okay, ive gotten to the point that first_card is assigned to something usable, but the retrigger criteria never activates, nor does the criteria to assign second_card. any advice?
Hey gang where are all the G.GAME stuff defined?
Or are they just globals that get changed as needed and they aren't really defined anywhere
Game:init_game_object()
oh my god it's you
yes hello its me
okay NOW its doing everything except actually retriggering. its printing my debug to say it is is but it is not
@mellow sable how did you make it so jokers were selectable for double sided cards?
looking through the buyuse ref isn't showing much
sorry for the sudden ping, you're the only person who's done the exact thing i'm trying to my knowledge
ohhhh
nevermind sorry for bothering 😭
i think i found it
it has to be in context.retrigger for the retrigger to work
you're in my domain now
-# i'm not actually that good at this
yeah i figured it out
im still learning the rules of this codebase
unlike yomi it is very orderly and i cant get away with nonsense 
there's one rule and it's spelled consumeable internally, not consumable
amazing
that's it
anyways this rules im so happy i got it working
SPLASH HAS A USECASE LETS GO
yeah sorry splash that was mean
you want a use case i made a whole mod just for it
fusing splash with every joker
also
pfft
holy shit
yomi hustle balatro mod
you damn right
lemme join your party
ive got ninja working already, its basically a weaker jimball but slightly different, mostly because Cryptid is a guilty pleasure for me rather than a regular driver
(the joke is redwave spam)
so naturally wizard should "spam" chips and mult in an orderly fashion because people think wizard is a projectile zoner
someone had a really good idea for wiz actually that i currently have NO idea how id do
oh rly
the idea was like Certificate but instead of a seal it adds an enhancement called "Hovering" to a random card
what's it do
lol
and Hovering cards ignore restrictions like boss blinds that debuff suits
or the pillar
oh that's easy
oh shit real?
i could probably do that yeah
👀 i mean... i wont say no but also tell me the process while youre at it so i can learn
makes sense, gimme a sec
and we use github commonly around here
sure
you dont have to use a license but your code has to be open and viewable to others
alriight
why are you lovely patching it and taking ownership of it
wouldn't you only need to take ownership of it to change how it works?
How would i make a enhancement that turns into another enhancement when used, i made like everything and i assume i have to do something in the calculate function but i cant find any examples or documentation of this already being done before
Well I tried just ownership and it still removed all the discard, so the patch was the only way I was able to remove it's function
Although
Hold on
Is there a checklist to verify if a mod should load or not? A mod I was working on is no longer even showing up in the in-game menu for some reason, and I can't figure out why...
i had this issue once
I wish I could say I knew why
but one day it just
stopped happening
so maybe update steamodded, i don't know
I updated it yesterday I think
update it again
Are you using a header or json?
every other mod I've got active (JokerDisplay, Card Sleeves, DebugPlus, Talisman, Drafting, Blueprint, Cryptid) seem to be working
json
does it need a specific name?
{
"id": "rift_packs",
"name": "Rift Packs",
"display_name": "Packs from the Rift",
"author": ["rft50", "Rithaniel"],
"description": "",
"prefix": "rift",
"main_file": "main.lua",
"priority": 0,
"badge_colour": "",
"badge_text_colour": "",
"version": "0.0.1",
"dependencies": [
{
"id": "Steamodded"
}
]
}
The dependencies are formatted incorrectly
YES (idk how to change the text because it doesn't work the same way as it does with cards)
Cool or nah
what's invalid about the dependency?
"dependencies": [
"Steamodded (>=1.*)", // Allows any version past a 1.0.0 stable version (but disallows 1.0.0 beta versions)
"Lovely (>=0.6)", // Allows all versions past 0.6.0 stable, including future beta versions and major version breaks
"SomeMod (==1.0.*)", // Allows all versions past 1.0.0 stable that are 1.0.x (1.1 and later are disallowed)
"SomeOtherMod (==1.0.0~)", // Allows 1.0.0 versions of any revision, beta or not.
"Balatro (==1.0.1m)", // Allows only the specified version and revision.
"OneMoreMod (>>1.0~g) (<<2)", // << and >> are used for versions strictly less/greater than the specified one.
"IRanOutOfIdeas (==1.*~)", // Combination of wildcard symbols. All 1.x versions are allowed, including beta.
"Talisman | TalismanReplacement" // Multiple different mods can be used to fulfill this dependency. May want to use `provides` instead
], // ! All mods in the list must be installed and loaded (and must fulfill version requirements), else this mod will not load.
ah that's why... when I started poking at this they were formatted differently
yup that was it, thanks!
Hey does anyone know how to change the description of a blind? I've tried loc_vars and that doesn't work
seems the same as any other item
https://github.com/wingedcatgirl/MintysSillyMod/blob/main/localization/en-us.lua#L50 localization file
https://github.com/wingedcatgirl/MintysSillyMod/blob/39eccfdf1dc3e3e6bb36e50fd259fb90b4198132/blinds/thenip.lua#L3 or loc_txt
... also loc_txt is a different thing from loc_vars
You can still use the keys in loc vars
I mean this doesn't work
Wait is it supposed to be bl_water instead of just water
what do the primary and secondary colors of a pack mean?
possibly!
i would test that
Nah that still doesn't work
The reason I don't think it's possible is because normally key is the thing you use to replace the desc
Unless
I do return vars = {key = 'bl_water_red'} or smth like that
if I put it like that, it's probably unsupported or I forgot
how would i make a joker destroy all scored cards of a specific enhancement after scoring has finished?
i’d presume take what vampire does, and replace its Xmult function with how you would delete a card
im not sure on the code of it, but i can say that
right... where can i find how vampire works then
like is there source code available
card.lua, search for vampire
assumed so, just havent found the method to do it somehow
zip up the .exe and then unzip it, i presume theres instructions on steammodded
(literally just copy the Balatro.exe, zip it, and unzip it somewhere)