#💻・modding-dev
1 messages · Page 210 of 1
check 1x
1x is actually normal
so what I'm hearing is I can't have the cake and eat it too lmao
ok wait this is a different error actually
OH THANK GOD
check Jokers.png in the 2x
FUCKING NO MORE 2x spelling mistake😭
oh my god
what program did you make the images in
i see
make sure you export it as png for the future
krita my beloved
for pixel art like balatro its great
dont think its on mac
do you know how to turn the imgs inot png
yeah krita should work well enough as long as your careful with the exports
ye
when you are exporting the image from krita
down here
hit krita document and then type in png because like ten options show up
when saving the image in in krita i think you can just Save as > select .png > Save
that is true also
don't do that
average programming experience
yo anyway
yea
also thanks for telling me how to do it
much appreciated
👍
now to see if it works!
why I pulled up was to ask for assistance in something akin to "I want a joker to have a 50% chance to kill a card when it scores"
how the hell do I do that because I am out here suffering in the trenches
no sweat!
you sure you mean when scored, as in it becomes more likely with retriggers
yes
I am simplifying for clarity because the ideal would be 1/6 chance on each trigger but 50% is easier to convey
if context.individual and context.cardarea == G.play first of all
then do an rng check and if it passes then mark it for death
then kill it in i think its context.final_scoring_step
got that don't worry
so would that be "if context.final_scoring_step then
destroyed_card == scoring_card" or something akin
if worst comes to worst you can cmd+c into discord and download it from there because it will be uploaded as a png
although that is stupid
k
destroying cards is a little overcomplex but i think its like
card:start_dissolve then if context.destroying_card then into return { remove = true}
lets goooo
FUCKING FINALLY
LETS FUCKING GOOO
start_dissolve goes in context.final_scoring_step btw
after maybe 8 hours and not SEEING THOSE DUMB MISTAKES
MY LIFE IS COMPLETTETETTETETE
THANK YOU GUYS SO FUCKING MUCH😭
hell yeahhhhh
you all derserve a nobel prize award😭
can anybody point me in the right direction for like where to even start with modding at all?
like is there some kinda starter tutorial or something?
how do I mark it for death?
im so sorry for making you guys do all of that😭
use a local variable or smth
no worries
👍
hey np lad least i can do
ive had to get help here a number of times before and will need to do so in the future too
funny cat
should uh hopefully help you
hope you dont run into the problems i faced man
im way too tired
you all have a good night
gn!
https://github.com/Steamodded/smods/wiki/Your-First-Mod
https://github.com/Steamodded/smods/wiki
https://github.com/Steamodded/examples
A Balatro Modding Framework. Contribute to Steamodded/smods development by creating an account on GitHub.
A Balatro Modding Framework. Contribute to Steamodded/smods development by creating an account on GitHub.
thank you its 4 am im going to hit the bed in a few mins glad its all worked out for you
How do I go about increasing the rank of a card without having it loop around after ace? My current attempt is crashing and I have no idea why
ok so if I'm reading this right I go to my mods folder and create a new folder for my mod
and then I make a JSON file in the new mod folder with the mod metadata?
yup
should just be set the rank to whatever the next rank is unless its rank 14 (ace)
whats your code/crash?
It doesn't reach the "third check" print before it crashes but it does pass the other two
v:get_id() instead of v.get_id()
does the JSON need a specific filename?
i dont think so?
this definitely doesn't work for modded ranks
i don't think it works for non-modded ranks either
unless 2 is supposed to go to 4
Yeah it ended up upgrading twice but I fixed that part, it def doesn't work for modded ranks but I have no idea how to do that
ok so what do I put for the main_file in the metadata?
how would I get this effect to work? I'm currently using cryptids Gemini as a base, but there's some things I'm not sure how to do and some things I do know how to do
I do know = How to change the context to start of blind instead of end, Change the numbers so they increase by the new numbers
I do not know = How to make it select a random joker instead of leftmost, how to make the amount of jokers targeted based off a config var, how to make it randomly choose to give x1.25 or x0.75
whatever your main lua file's name is
your actual code will be in that lua file
you can name it whatever you want just make sure its in the same folder as the metadata file
so "<name>.lua"
ah alright
so it should look like this and then I put test.lua into the filename part of the metadata?
yes
its case-sensitive
Visual Studio for json editing? That's quite a choice
I will highly recommend Visual Studio Code for Balatro modding (or any variant of that IDE)
How to abrupt a sound during playing?
- for random joker you'd i think use `pseudorandom_element(G.jokers.cards, pseudoseed('seed'))
- make a table of all jokers, use it instead of G.jokers.cards, remove a joker from the table when its selected, then rerun the code for each joker it needs to select
- do an rng check, if it passes it gets 1.25x otherwise it gets 0.75x
ok now how tf do I add content
the wiki seems to just be code documentation and not any real examples of how to properly implement the code
i'm gonna crash out every time a new steamodded version comes out since that would mean i would have to put in extra work to make the code compatible with it
also theres yt tutorials
damn you were faster
the examples can give you direction though
already had it open lol
apparently so
also recommend looking at the source for other people's mods
can be incredibly helpful for understanding how their code translates to a functional joker
what I wanted to try was making a spectral
ouroboros - select 2 jokers, make the left joker eternal, and the right joker perishable
probably could be balanced better or changed a bit but I just wanted to try this idea
idk how difficult stickers would be though
or are they counted as seals?
Hey, does anyone here have any familiarity with the base pseudorandom code?
I have a bit
The vanilla pseudoseed function has an optional param for predict_seed, and without comments, I'm not certain if it means it's literally just returning the result of the next seed hash for the base key, or if it's something else entirely
if key == 'seed' then return math.random() end
if predict_seed then
local _pseed = pseudohash(key..(predict_seed or ''))
_pseed = math.abs(tonumber(string.format("%.13f", (2.134453429141+_pseed*1.72431234)%1)))
return (_pseed + (pseudohash(predict_seed) or 0))/2
end
if not G.GAME.pseudorandom[key] then
G.GAME.pseudorandom[key] = pseudohash(key..(G.GAME.pseudorandom.seed or ''))
end
G.GAME.pseudorandom[key] = math.abs(tonumber(string.format("%.13f", (2.134453429141+G.GAME.pseudorandom[key]*1.72431234)%1)))
return (G.GAME.pseudorandom[key] + (G.GAME.pseudorandom.hashed_seed or 0))/2
end```
b/c predict seed is not a boolean, it's being concatenated into a string, so it's supposed to just be another value that it also calls pseudohash on
And afailk, predict_seed is not actually used anywhere in the vanilla code
So I don't have anything I can blatantly steal from
looks liek get_first_legndary uses it
looks like you pass it the seed (?)
which makes sense since these 2 blocks are very similar
This certainly seems possible, and even moreso by the fact you're basing it off of an existing consumable type
I have ideas in mind on how you could implement it so if you need any assistance, I would be happy to provide
hmm, I see
ok so I saw these in the card.LUA file of the balatro source code
I'm assuming these are the functions that apply eternal and perishable to a joker when it appears in shop?
yeah I actually have no idea what I'm doing
That sounds correct, however you should be able to use those for your purposes
Hmm I think I understand it now. You would just pass in G.GAME.pseudorandom_seed as the predict_seed value, and it gives you then next seed result without actually setting the pseudorandom value with it in the pseudorandom table
Otherwise the code is identical
Nope, doesn't seem to work. foiled again
ok, so, I did a bit of work trying to get it closer to the desired effect, I seem to not be doing the var thing right, as line 38 is giving errors, at least, whenever the selected joker isn't Polymorphine itself
I'm going to bed now, so when you respond pls @ me so I can respond when I wake up (I wake up really late lmao)
gn everyone!
How to make a joker play certain sound when hovered by mouse?
VSCode users, how do you turn off the little tooltips that tell which contributors recently changed certain lines? Or at least move them?
Having the little buffer between lines rlly bugs me
maybe just add an event that plays a sound to the event manager whenever loc_vars gets triggered?
I found another way:
hey yall, does anyone know of a way to check if a joker has destroyed itself? im trying to make a joker that buffs itself when another joker gets destroyed, like if gros michel or cavendish die, or if ramen runs out
im trying to make sure it doesnt apply to selling the joker but im not fully sure how
patch the start_dissolve/remove_card function?
ill look through the source code, do you know which .lua file has these?
im pretty sure remove_card is in game.lua and start_dissolve is in card.lua
if you're not sure then you can use ctrl+shift+f (keybind to search through whole project in vscode) to try to search for it
aight thank you!
Homie made Doot
alternatively, I believe you can check for card.states.hover.is in the joker's update function
Save the last hover value each update, and then when it switches between true and false, you know hover has started or stopped
Which one looks better?
this is unbalanced, please nerf
OK! *lower the volume by 1%
i dont see the difference?
Current one marks the placing order;
Alternative one hides "JOKER" in go's.
This is called "Gomoku", it's like connect-four but five and no gravity and 19x19 grid.
i think i like the former one
the one with the letters on the stone
while that's going on i also would like more onions on this
you're slowly upgrading a card, but you're upgrading it by discarding it
so you cant actually use it during the blind you upgraded it
Looks kinda slow, but not a bad thing.
DNA/Trading card pace.
yeah it is intended to be slow
cuz if you play every blind, you will have decent chunk of upgraded cards
but also it eats 1 discard and the reward is delayed
update = function(self, card, dt)
if G.Jokers then
if #G.jokers.highlighted >= 1 then
card.ability.extra.msg = union_check(self, card, area)
else
card.ability.extra.msg = "No Jokers found"
end
end
end,
This seems to work fine within a consumable to work outside a run (Collection Menu) and within a run.
But if I apply it to a Joker card, it never seems to see G.Jokers as true.
Suggestions for another approach?
Oh man here's a fun one. I have a set of consumables that all have this "succeed" function attached to them that I created. Each card in the set calls this function whenever they meet a goal. This happens just fine in a vacuum, as they call "self:succeed(args)" locally. Now I'm trying to make a Spectral card that calls this function on one of these cards externally, which is causing the following crash. Any ideas?
In Consumables, I can use G.Jokers.
they shouldn't, G.jokers is case sensitive
self is the center not the card
how does "tagging" a card to be destroyed work? I am trying to have a joker that has a chance to destroy a card played, but I can't quite seem to figure out how to destroy the card. I see some post mentioning you have to tag the card first to be destroyed, but im not quite sure how i would do that
either
G.mxms_horoscope.highlighted[1].config.center:succeed(G.mxms_horoscope.highlighted[1])
``` or if you have the reference from the defintion
```lua
definition:succeed(G.mxms_horoscope.highlighted[1])``` should work
ah gotcha. plenty thanks
Just checked my consumables, one was using lowercase one wasnt.
And I copied the wrong one of course.
@manic rune Thanks
If I use SMODS.Joker:extend, can I change the prefix that'll be added before the key I set?
Like instead of j_[modpref]_[key] I want j_[modpref]_[extendpref]_[key].
Someone send help, crash dump on discarding dirt cards
(Dirt cards are the ones that permanently gain +4 Mult when discarded)
code?
no like the code that is crashing?
I literally sent the entire crash dump
I have no idea what I'm looking at.
I have exactly zero programming anything in this dork-ass head that has somehow managed to stay attached to my needlessly feeble shoulders.
tryna make a patch to increase playing slots from 5 to 6, will be affected by a joker but atm i just want to see if i can make it 6, and this is my first patch so idrk what i am doing that much
hey all, could someone help with what's wrong in this code? if the key of the joker being dissolved is in the list AND another joker is present i want that joker's xmult to multiply by 50, but not totally sure what's going on here. im not getting a crash either
couldn't send in a message, too long
https://github.com/Aikoyori/Balatro-Aikoyoris-Shenanigans/blob/main/lovely/selectionlimit.toml this is how i did it
Contribute to Aikoyori/Balatro-Aikoyoris-Shenanigans development by creating an account on GitHub.
im just trying to hook
im gonna assume theres more to this or something
custum variabled my belothed
the true dev printing experince
how are you selecting that fast?
I am working on a second joker, whats the proper pixel spacing so the second joker shows up from the sprite sheet? i would figure {x = 72, y = 0} since the size of jokers, but that doesn't seem to work. the second joker ends up not showing up in game at all
SO CLOSE
hey sorry for the ping, tried to figure this out today but couldnt figure out an earlier context that helped. on the brightside i got to clean up the code a lot lol
its only x = 1, y = 0
x = 1, its based on the atlas size
yeah what bepis said
think of the pos in SMODS.Joker, as like, uhh
x = 1, y = 0
=> x = 71 * 1
y = 95 * 0
Ah, so it goes off of cell size rather than pixel size essentially?
quick question; i've hooked into Card:start_dissolve
i want to get the key of the card being dissolved. how would i do that? im not exactly sure what start_dissolve is taking
local hook = Card.start_dissolve
function Card:start_dissolve(dissolve_colours, silent, dissolve_time_fac, no_juice)
local ret = hook(self, dissolve_colours, silent, dissolve_time_fac, no_juice)
safe_list = {"j_gros_michel", "j_egg", "j_ice_cream", "j_cavendish", "j_turtle_bean", "j_diet_cola", "j_popcorn", "j_selzer", "j_ramen"}
for index, value in ipairs(safe_list) do
if self.key == value and next(SMODS.find_card("j_skill_gluttony_joker")) then
joker_glut = (SMODS.find_card("j_skill_gluttony_joker"))[1]
joker_glut.ability.extra.Xmult = 10
end
end
return ret
end
my code looks like this
pretty sure it's self.ability.name
since "self" in this case points to the card
okay so its not pointing to the center
gotcha
nope, still doesnt seem to be working
ideally this should set the mult of the gluttony_joker to 10 when the card gets dissolved
the key would be self.config.center.key
no the name is not the key
since my code does that, am i cooked 💀
smods by default makes them the same iirc but vanilla jokers don't have the same key and name and mods can change the name
if i changed my list to be the names then would ability.name work? not going to do that but yeah
damn, im rlly cooked 😭
whats the uhh
i mean my base code is correct so all i have to do is just hook a different thing id hope
remove will be called always when removing
will remove trigger on selling as well?
wait
yes and retuning to the main menu
oh god
would there be any like. way to tell in the remove function if its being called on a sell or a main menu thing
this is what popcorn does
For selling, there’s a context for that
yeah i checked gros_michel and it also has this
Well, selling others
how do i change this entire highlighted part and not just the "ability" part
I think Paperback and Betmma’s had a solution for detecting when a card was destroyed
might check that out then
you can just do self.config.center_key
someone tell me there's something wrong with the boss
The Crasher
everything seems to be fine
:3
?????
jesus
wrong vid
The Wrong Video Picker
x4 is probably temp, and the (true) is temp until I can figure out how to make that look good, but how's this for an enhancement mechanic
luckily this logic is already built in with the pillar, only had to do a bit of jank to get it to not count playing it as playing it in the ante, and instantly destroying itself
you could do this with an internal flag too
you're right it probably would have been easier to just set a value on the card instead of using the pillar's logic
especially if the pillar stuff changes them before the effect is evaluated
it does, yeah
I don't know why I didn't think of that.
i'll probably refactor it later
I think I had to take ownership of the Pillar
you could also give it a visual change
To fix a bug introduced by another change I made
also, is it possible to send custom parameters for context.destroy_card's dissolve? I believe start_dissolve allows you to set stuff like dissolve time and dissolve color, but context.destroy_card just allows you to return remove = true
Otherwise Pillar would be debuffing cards played during it
tl; dr: this whole system is a bit janky IMO
it's not possible
welp. patch time
I do wanna create a particle effect for Stickers, but it doesn't support on_remove, on_apply and on_load like Editions do. What can I do? It does spawn particles but it's rapidly spawning them, creating a mass of particles that covers the entire card and lags the game
I could maybe make it so you can define a standard dissolve time and colour on the card that it would look at, that would probably be cleaner than trying to return the information I think
oh, could be nice
calculate = function(self, card, context)
safe_list = {"j_gros_michel", "j_egg", "j_ice_cream", "j_cavendish", "j_turtle_bean", "j_diet_cola", "j_popcorn", "j_selzer", "j_ramen"}
if context.removed and not context.blueprint then
for _, v in ipairs(context.removed) do
for _, value in ipairs(safe_list) do
if v.config.center.key == value then
if #context.selling_card > 0 then
for _, carde in context.selling_card do
if carde.config.center.key == v.config.center.key then
card.ability.extra.Xmult = card.ability.extra.Xmult
else
card.ability.extra.Xmult = card.ability.extra.Xmult*10
end
end
else
card.ability.extra.Xmult = card.ability.extra.Xmult*10
end
end
end
end
end
ive got this uh, beauty of a calculate function. doesnt seem to work though! am i just messing up the key values again because i feel like i am
you're combining different contexts
i gotta separate them then? maybe keep track in a variable in the function then
contexts are independent of one another, if you're check for context.removed you will never have context.selling_card
@wintry solar do i HAVE to manually define every keys table in an alttexture or should this have worked?
okay got you
calculate = function(self, card, context)
safe_list = {"j_gros_michel", "j_egg", "j_ice_cream", "j_cavendish", "j_turtle_bean", "j_diet_cola", "j_popcorn", "j_selzer", "j_ramen"}
if context.removed and not context.blueprint then
for _, v in ipairs(context.removed) do
for _, value in ipairs(safe_list) do
if v.config.center.key == value then
card.ability.extra.bonus = card.ability.extra.bonus*10
end
end
end
end
this still isnt working, am i just messing up fetching the cards key?
Thoughts on this joker? Its supposed to be in reference of the marksman gun from ultrakill. I am still working on my pixel art skills so its not the most prettiest of cards, but I think the main point gets across. Also does it seem balanced? I want it to be vanilla-esc
this looks like you are creating a list of keys manually in a convoluted way, can you explain it to me?
card:highlight(false)
funny story
the background is really well done feels exactly like ultrakill
i am creating the full list of joker keys manually once in a lua file as part of a table, in a pair with a boolean value, so that i do not have to manually define the keys twice in the alttexture with minor differences.
i am then making two tables based off that pairs list - one that contains all of the uncommented keys regardless of the state of the boolean and one that only contains the uncommented keys where the boolean was true.
then, i populate two different alttextures with the correct information, each pointing to their respective assets and supplying the table that had only all uncommented keys to one, then the table that had the filtered keys to the other (with the only keys being filtered out here being burglar, todo list & diet cola).
the result SHOULD have been two working alt texture blocks (not intended to be enabled together, but either/or) - one that replaces with all of the keys, from its asset and one that replaces with all but the 3 filterd keys, from its asset.
what i instead got was, the first one worked fine, as expected. the second one, for some unknown reason, would not replace DNA, hiker, baseball card, popcorn, seltzer and cavendish, but replaced all other jokers in its table normally from its asset as expected.
i have checked both tables that it creates and both are correct. the assets are correct. except for what it is not doing correctly, it is doing correctly. i don't understand why it's not replacing the specified jokers despite their keys being present.
I think yours stacks multiplicatively so it’s stronger
I pictured my joker working like baron but with gold cards, I might have worded it wrong
Bro made Gold cards Silver
I would word it like astrapboy’s probably
thats basically the same thing as how my joker works
tbh I don't really care too much if multiple mods use that idea lmao, it's not too sacred to me
My personal opinion is if either the flavor or the effect is different then it’s not a big deal if the other matches
another mod’s
(Silver is an extremely conductive metal, kinda like steel but also not like steel because silver is worlds better at conducting than steel)
I imagine it's because you're assigning them to the i position in the table, so when it hits a gap it will stop iterating because of how lua works. Use table.insert(table, key) instead and it should work
true, its not the most "unique" idea out there. the main thing im thinking to make my ever so slightly different is instead of doing the normal ding balatro does, whenever it procs a gold card it will do the ting sound from ultrakill. (not quite sure how possible that is, but thats a tomorrow me problem)
goodbye
The loops could be one
And you could maybe put the transformation into its own event followed by a delay
oh, the "delay = 0" part doesnt work?
That also exists but it’s not what I’m talking about
do i do this or put those outside the event part entirely
Outside
worked. thank you 
just don't have the delay on the set_ability
sooo this?
set ability out the event will work with the delay
yeah that makes sense, i think i understand it now, thanks
AFAIK delay creates a trivial Event that takes up time and doesn’t do anything else
I think it needs to be in an event or they gild before flipping
yeah it works now, i removed the delay part
the delay in the set ability throws the sprite change into an event, it should work fine
how would you go about making the green chance text? like the "1/3 chance"
i initially had the impression :set_ability just instantly changes the card's enhancement lol
it does
didnt know its an event of its own
What part
but it has an optional delay argument which will delay the visual change
hm
I pictured it looking similar to bloodstone, where the "1 in 3" in "1 in 3 chance" is a green
Oh hey I've been trying to figure out proper flipping and enhancement changes too
Bepis if you wouldn't mind could you send footage/your fixed code so I can reference it haha
So you want to make it green?
{C:green}
here
oh yeah, you see how the card pops up in the video?
the highlight functions are to make them look like that (fuck my grammar ❤️)
Siiiiiick
It also selects them
yes, but that shouldnt matter since its before scoring and immediately reverted after the events are done
Yeah I've been keeping an eye out of how people do their card effects and timing
There was one where the cards turn into gold at the same time they get scored
Was it you
uh, nop
Ah
Can a joker copy effects of more than one joker?
like blueprint style?
like blueprint, but any joker you have that fit some condition.
you can do SMODS.calculate_effect(SMODS.blueprint_effect(card, blueprint_card, context), card)
where you replace blueprint_card with whatever card you want to copy
And do a for loop through G.jokers.cards?
is there a more efficient way to do something the way poll_edition() works?
like let's say, i want something to occur with a 30% chance.
then if that doesn't happen, something with a 20% chance.
then further, another thing with a 10% chance. 
the thing in particular could be anything. in fact, this example could just be a function call on proc. function A, B, C, etc.
you could make a function of your own for that matter, i think?
do you want them to be independent of each other or overall theres a 60% chance?
independent, yes
either throw it all in a function or use an if-else chain
if first_prob_check then
-- do stuff
elseif second_prob_check then
-- do other stuff
elseif
-- etc
end```
i see. thanks!
Should I remove the "no discard" part or leave it there?
Also which rarity should this joker be?
if i were to put a card in a table, but that card in game has its enhancement changed, will the card in the table be invalidated?
I think the card in the table would also change.
do yall know how to check if you have completed a stake on any deck
i forgot how
wait no i never knew
Tsunami mod has an effect that changes depending of the stake sticker on Splash
thanks sdm
Or look up how the game draw stake sticker on the cards.
will this return the new cards whose enhancement has been changed?
oh, got it
although you probably don't even need to return anything here
why is this crashing?
(pre == joker card to be triggered, card == blueprint-like card)
oh that'll crash if the card doesnt return anyhting, hold on
try lua local ret = SMODS.blueprint_effect(card, blueprint_card, context) if ret then SMODS.calculate_effect(ret, card) end
bump
oh right whoops, i never responded to this.
i just basically want to know what importance the return value of calculate() has - like if i write return nil, true in a joker's calculate(), i actually have no idea what that's doing when it hits it and i feel like that might be important for any present or future functionality i may want to write
is there a way to juice up blind requirements to tell the player that it changes
it signals that the joker did something even though there are no effects to return. This is important for retriggers
calculate mostly would return a table, and the content of that table tells the game what to do.
if you return a table, that's any effects to be evaluated
leave it there, and i would honestly call this a legendary joker ngl
hand size 50 is crazy
i see
what's an example of a table i could return that would have some effect? are there any such base jokers whose code i could look at to further understand this?
...didn't see that the first time i saw this page
thanks
my joker turns cards into gold, and turn them back to normal at end of round
however, currently facing an issue where the gold cards dont get to trigger, and instead turned to normal cards immediately, is there a context for this?
Try putting the back transformation into return {func = …}
Just the part they turn back
Probably not in an Event
hm
so uh, this?
nop
it still reverts back to base cards before the gold cards effect triggers
should i be checking states for this one instead
huh
Maybe in an Event then
nope
a bit inexperienced about these stuff, does this make it so that if after is true then trigger = "after"?
ya
nice, thanks
nevermind i think G.C.SPECTRAL isnt a thing 💔
nvm its not that
wtf
am i being stupid or something
Isnt it like secondary_color.spectral or something
Check sixth sense joker
managed to did this, i had to put immediate events inside an after event
wym...
G.C.SECONDARY_SET.Spectral
SECONDARY_SET has text colors for all card types
oh wait
does locked_loc_vars not accept colours???
the colours table goes inside vars
FINALLY
Ah crap I forgor you had spectral named Bind..
Same consumable name across multiple mods sounds weird
sdm you dont have to change spectral names just because someone made it 💔
i havent even released it yet
Maybe but it still doesnt feel right to me even if I'm told to 😭
Unless I did it first then its the other's fault
I havent either
dang
So what do we race or something
it doesn't matter because smods mod prefixes
Oh no its not a coding problem
it just feels wrong
Yea
its probably gonna take a long time for me to update my mod, you'll def be first
But maybe there should be a way to, like, detect if the same name exists and then have Smods label them as "Bind (SDM)" and "Bind (elail)" or whatever your mods are called
Im not gonna race you Ill just change the name
Mod badges kinda do that already
true
noooooo dont waste your time editing the spriteeee
its fine anyways
Grip, maybe?
I'd say try to stay close to Bind to prevent an edit to the non-text part of the sprite
what about chain
Clasp
I called my spectral "Bind" because it makes one selected Joker card Eternal
as literal as can be
lol call it Pin
yeah but doesn't it only exist for that one challenge with the dagger?
still exists :p
In vanilla yea
Or Staple
Gonna call it "Goku trapped in the time chamber" problem solved 
Pinned but to the right when
Pinned to the right blueprint 
I think it does have a sprite sheet area designated for it, but that area is blank
Pinned letter cards
true
Oh evil
that's a good boss blind idea
Mfw the pinned letter is Y
I'll add it tonight
yarn
Ante 7:
yellow
oh god
yellow is too long?
yesterday
you can do more than five cards?
Yodeleiou
kid named card selection limit:
I know it can be increased, I just didn't know if the letter mod did that
I've done it with lovely patches
would be boring for it to only do <=5 letter words
exactly
is the puzzle randomized each time?
Also, IIRC there are some mods that allow stickers on cards. Would eternal glass never break?
no
would it not be fun if you have to spell the word thyme every time you play this
?
or do you just have a set of pre-determined puzzles
have you played wordle before
I have (and now I wonder if you do the high-contrast mode based on Balatro settings)
are you implying that the stuff listed there is previous hands?
and just tie it to the existing high-contrast setting
IIRC Wordle already has a colorblind mode so you can just use those colors
i still need to finish this for the mod manager
which is why I've been adding features recently
right
I was gonna make the puzzle blinds square
why did i forget
in my head all the letter related blinds should be written in kanji
i want to make a joker that stops food jokers from deteroriating, do I need a patch for this? I don't want to take ownership of the food jokers
this is truly cryptid moment
how hard is it to store another playing card's data into an enhancement
cant just use copy_card...
@analog spoke
ive not really worked on value-changing jokers like this before, but it seems like maybe on line 38 it thinks the card in card.ability.extra.good_value is the local card variable? so it's trying to find the ability.extra.good_value of the random joker. i think you can just rename the variable
How do I make an event and call for it?
Okay, i found how to do it, but i dont know where to begin with converting this calculate to an event, any help is appricated.
calculate = function(self, card, context)
if context.after then
local valid_suits = {}
for k, v in ipairs(G.playing_cards) do
if v.ability.effect ~= 'Stone Card' then
valid_suits[#valid_suits+1] = v
end
end
if valid_suits[1] then
local SuitPicked = pseudorandom_element(valid_suits, pseudoseed('Flote'..G.GAME.round_resets.ante))
card.ability.extra.ChangeSuit = SuitPicked.base.suit
for k, v in ipairs(context.scoring_hand) do
SMODS.change_base(v, card.ability.extra.ChangeSuit)
end
end
end
end,
G.E_MANAGER:add_event(Event({
trigger = "after",
func = function()
end
}))
wait
G.E_MANAGER:add_event(Event({
trigger = "after",
func = function(card, context, self)
local valid_suits = {}
for k, v in ipairs(G.playing_cards) do
if v.ability.effect ~= 'Stone Card' then
valid_suits[#valid_suits+1] = v
end
end
if valid_suits[1] then
local SuitPicked = pseudorandom_element(valid_suits, pseudoseed('Flote'..G.GAME.round_resets.ante))
card.ability.extra.ChangeSuit = SuitPicked.base.suit
for k, v in ipairs(context.scoring_hand) do
SMODS.change_base(v, card.ability.extra.ChangeSuit)
end
end
end
}))
}
would this work
sorry for covering what you asked
i didnt get to see ur name
Nah, I should be the one apologize for interupting.
i unlocked a new crash color
i aint seen pure black yet
heres the code
heres the crash log
i think i may of fixed it
okay, no crash but it doesnt change the suits now
do you have to call for the event or what
i think i need to return true
Would you describe what effect do you want this joker do?
nvm, I saw the loc_txt
"Every scored card switches suit after scoring",
"{C:inactive} (Only changes to suits in deck)",
heres all the code if you want it
Base on your code, each card has a chance to "switch" to the same suit, is that right?
And the probability will be proportional to the amount of cards with each suit, is that right?
I think thats how the code does it, i just have it chosing ones availible in the deck
it shares the code of Idol
I think you can access v.base.suit instead in your ipair(G.playing_cards) for loop.
ill try that, thanks
wait, im a bit lost, sorry, what am i replacing exactly, i know its the loop but i dont think i should be doing
for k, v in v.base.suit
Not like that lol
yea, but i still am new to lua a bit lol
This is the balatro code for suit changing tarot cards:
wait, sorry, where am i getting V from
Only SMODS.change_base needs to be wrapped inside Event.
ohh right
Or more precisely,
Also, use not SMODS.has_no_suit(v) instead of v.ability.effect ~= 'Stone Card' in case there are other modded suitless enhancement.
Closer, but wrap the G.E_MANAGER on SMODS.change_base instead of everything.
wait, should the G.E_Manager be in calculate?
What made you think it isn't?
i just didnt think it was tbh
it hasnt been in there the whole time tbh
so, that probably why it didnt work
let me test a few things and see if they work
Event manager is more like: "Hey, I need this function to run later -- but not immediately right now -- so put this on the schedule queue for me, please."
By the way, have you read this?
https://github.com/Steamodded/smods/wiki/Guide-‐-Event-Manager
Wait, hold on.
This code layout is going to change the entire deck's suits.
There, I rewrite a little:calculate = function(self, card, context) if context.after then local valid_suits = {} for k, v in ipairs(G.playing_cards) do if not SMODS.has_no_suit(v) then valid_suits[#valid_suits+1] = v.base.suit end end if valid_suits[1] then local SuitPicked = pseudorandom_element(valid_suits, pseudoseed('Flote'..G.GAME.round_resets.ante)) for k, v in ipairs(context.scoring_hand) do G.E_MANAGER:add_event(Event({ trigger = "after", func = function() SMODS.change_base(v, SuitPicked) return true end })) end end end end
Thank you, I’ll try it as soon as I can
And please remember, always tidy up the indentations.
Ive been meaning to tbh
im going INSANE BRO WHAT DO YOU MEAN WHY ARE YOU LIKE THIS AAAAAAAAAAAAAAAAAAAAAAAAAAAA
wait
yeah no i dont get it
it works now, thank you
ill see if i can add the little card flip animation in the future
thank you again
okay, sweet, now time to see if you can have custom color text
i know you can have a custom badge color
this was just working but i seperated the 2nd line into both 2 and the 3rd and now growth is nil
hi folks, is it possible for me to do a cry from my joker whenever I like? I see how I can do an acquire joker but I'm not sure how to make it emit sound.
i kinda forgot expo growth is... fast
-# why the heck is the blind's chips value inside 'G.GAME.blind.chips.array[1]'?
Talisman stuff
i love talisman compat
WOW, what mod gives you this terminal to interact with?
I am doing all of this with log statements
What the heck? I definitely have the file there
You are always so helpful, thank you!
is there something special about registering sounds if you want to play them using this method?
play_sound("e_metsu", 0.85)
ah, the problem is that play_sound depends on the prefix of my mod, which is set in either a conf or a .json file. My fix was to use change e_metsu to modPrefix_metsu
Time to send in a PR for that to the steammodded wiki! Thanks @earnest oracle for pointing out the error of my ways!
Has anyone had success with changing the background color outside of the context of opening a booster pack?
I thought it would be cool if a joker could change the background color while it is applying a special effect
I forget that's not actually mentioned in the wiki
haven't tried this, but I think you can just use ease_background_colour?
Yes
My mod and Bunco do it (I copied from Bunco
)
Also Trance
can hooks be written for functions that aren't methods for a class?
Yes
I guess I'd just omit any reference to a class that's made in the sample hook template then
how to use detailed tooltip in ui stuff
What do you mean
ah, ok, I had it set to center at first I think, but it was giving errors in the editor lol, let me try redoing it
like what should the detailed_tooltip field look like in config of a ui node
ik how to use tooltip but idk what's different in detailed_tooltip
does it have more options or something
smods wiki doesn't say much about it
One of the two booster packs I've made has 3 "color sets" as choices for background color switching when it's open, fwiw. 🦉
I don’t know I don’t think I’ve ever seen it :0
epic animated seal AND cool spectral AND cool effect,,,,
@royal ridge hello uhm regarding how i can hook onto the end round button would this be correct
regarding not just yet mod
that would probably work?
it didn't 😭
end round button still disabled
maybe priorities ain't right idk
ok it worked i just had to have my mod priority be 100
I think I misunderstood something here, lol, switching the name of either variable's name is giving a crash, one way causes the same crash one causes a new crash
here's what it looks like with both changes at once, which tbh I haven't tested yet, but I did test each individually
here's the most recent crash, from before I changed "card." into "center."
I'll rerun it with both now, just to get a new crash log
Your parameter in calculate is card2, rename each center to card2
ah ok! I'll try this
it works now! thank you!
I still need to get the random effects on it working, but it's no longer crashing when selecting another joker!
how does smods.drawstep work because i just keep getting errors about trying to use the field DrawStep (a nil value)
(i installed the latest dev version of smods)
I feel like I'm close to getting this working
*I would say I'm starting to get lua a bit more, but it's telling me a basic If is wrong 😭 *
nvm i actually didn't install it correctly ><
oh, errors are gone once I remove "then" lol
oh looks like r_num isn't the right thing 😭
changed to psuedo random, but not sure if I used it right
if pseudorandom('some_unique_key') < 0.5 then
else
end
ok! everything seems to be working now, only thing left in order to get the joker working as intended is to make it repeat based off how many jokers it's supposed to select
thats pretty neat
what if i have turtle bean and a hand of 12 silver seal cards
Thoughts?
need some shading on the bucket, but nice
i don't know if this really fits the style of tarot cards tho...
i think i just need to replace the color of the bucket with different ones tbh
so i can still shade but just with the tarot card colors
something like this but maybe less of the blinding background
You could have the brightest color as an outline for the bucket
ooh interesting idea
Wait that actually looks good
what if the ink seeps into the bottom of the tarot card a bit too
uhh smt like this idk
Hello, could someone explain to me what i must add to my sound=SMODS.Sound to make it the only thing that being played ?
-# open the curtain
do you mean, like, all the sounds and musics are turned off except for yours?
yes
final product?
hmmmm i think its a bit too black, id go for something in the middle of the tarot's yellow and the ink black (idk what im saying 🗣️)
...that one i actually dont know, never used sounds, sorry 😭
-# (why are there so many pm agents here)
which part of the of thing is too black?
this is so nice
are you thinking of replace = ?
yes
the part which is seeping into the tarot card, it looks a bit unnatural
how
ah gotcha, maybe this then
I tried but I didn't understood how it work
they added lsp definitions with the smods beta
thank you whoever did that
lets goooo
yeah i think it looks more natural that way
what the hell do you mean by that aikoyori
i saw that.

aikoyuri
yuri!?
yuri from ddlc
i used this to replace the main menu track
key = "opandorasbox_music_trippy1",
path = "opandorasbox_music_trippy1.ogg",
pitch = 1,
select_music_track = function()
return OpandorasBox_config.custom_music
and not (G.booster_pack_sparkles
or G.booster_pack_meteors
or G.booster_pack
or G.shop
or (G.GAME.blind and G.GAME.blind.boss))
end,
})```
but you can just use this iirc
```SMODS.Sound({
key = "opandorasbox_music_trippy1",
path = "opandorasbox_music_trippy1.ogg",
pitch = 1,
replace = "music1"
})```
i think what they want to do is literally turning off all sounds
except for the ones they choose to play
I will try
oh mb
honkai star rail
:3
yu
nayu
bocchi :D
whas a turtle bean,,,,
oh i forgor
its okay
it doesnt take the cards in your hand
it takes em from anywhere
whaaaat
Thank for the answer. Because of you I can play String Theocracy without anything bugging me
the power of polymorphine
(may need to cut back it's power a little lol)
honestly, I think all I need is to make it not work on itself, I think, but that also defeats a lot of the fun of it, maybe make it only work on the amount of affected jokers somehow?
I mean, I knew it would end up being powerful when used right, but
yall
why most of the mods require steammodded 1.0.0?
ever heard of summoning playing cards straight from the void
Hello, dear modding chat. I am attempting to make my silly stinky little joker create a modded joker when specific ranks are played and it crashed my humble balatro with a "for" error. Please help should it not be a bother :3
whats the crash log?
i fw the hsr mod
hell yeah
thanks :D
I'm a bit of a googoo gaga in terms of Lua so I don't really know what I'm doing in terms of the code
....hm, i would normally be assuming its the for loop but it seems right
What is the message part for?
its telling the joker to uhh
have a pop-up message below it
it shouldnt be the issue here
Ah okay👍
oh wait, wait wait
if context.before and context.cardarea == G.jokers and not context.blueprint then
...your code here, replace context.scoring_hand with G.play.cards
end
replace the whole block with that
put those inside
like this?
I'll try it now and report back
(fix the indentation of the if statement line btw, its just some visual stuff)
should I add another end at the end
nice
Thank you, Bepis Fever. I am in your debt
no its fine 😭
how would I get the "5 more uses" part to work? Additionally, how would I get it to work without being increased by misprintization (value increasing effects such as itself)?
5 more uses is 5 blinds/triggers btw
misprintization is refering to cryptid's value increase effect btw
I really chose a mad effect to start this mod off with huh 😭
for the uses a variable in config.extra should do the trick
after the joker takes its effect decrement it by 1 and check if it's less than 1. if so destroy of debuff the card. as for the crypid effect maybe the mod has some sort of check implemented(like blueprint_compat in the base game), but i have no idea myself
better get searching for something like that i suppose
is there a context (or combination of contexts, maybe) for cards drawn after playing a hand?
okay so i have a problem with crimson heart debuffing one of my jokers, which leads to a permanent hand size increase because the code that resets hand size after a hand is played doesn't run, kind of like a turtle bean type bug. anyone can think of a way to fix this?
context.hand_drawn
that's after discards too
this one?
You could maybe track the discard count and make sure it hasn’t changed
yes
though, you could probably add a context for when you play a hand and set a var to true from there?
oh true
i swear there was some context or something for when a joker gets debuffed
i cant find it
There isn’t
pretty sure there isnt
can't you use add_to_deck?
and remove_from_deck?
i guess
pretty sure they have a from_debuff argument
pretty sure that's how vanilla handles it as well
actually shit this is exactly what i was thinking of
perfect now i get to
my brain is becoming a mushy substance
yeah uhhhhhh
is there a way for the second psuedorandom roll to ignore the number which has already been rolled on top of there?
id prefer not having to put it in a loop 😭
remove the chosen card from allCards and then do the same thing again
hubba
yeah, thanks tho
np
this was my old code lmfao 😭
red
I've been struck with another issue...
I've specified this before my joker. I tried reading the Smods wiki and tried applying that
Whomever may be able to come to my aid, I would appreciate it greatly
i think you need the mod prefix too
oh! I hadn't even considered that
prefix_(sound name)
no quotations?
you still need those
so I put the quotations AROUND the sound name
It’s also sound = “key”
whuh where do I put that
oh wait, didnt realize you were running a function inside the return{}
is that unwise., gulp
probably inside the return (i never used sounds myself so blind firing here 😭)
return {
...
sound = "(your mod prefix)_comingout",
}
you can remove the play_sound
springly boobies 😭
4k
caught in 3k99
yeah first message i read upon clicking on the channel incredible
it didnt crash BUT it did not play the noise
whats the better wording for this
"temporarily turn into Glass cards for the round"?
never saw someone using "temporarily" in their mod before honestly 😭
but yeah, i think thats cleaner
maybe you can trim out the temporarily and keep it as "turn into Glass cards for the round"
probably just line break after the comma
this code is supposed to decrease a joker's xmult for each removed card from deck, and i wish to also make it visible(like how caino does it). the juice_up animation plays, but the return message does not. anybody know why?
it doesnt seem to be too correct with how balatro words its joker effects
i want my description to be more like them lol
wait isnt juice up blind for the blind chip
^^ ??
it is but it's there purely for debugging purposes
i see
ah okay
gulp., i can not offer aid then
done my fair share of xmult scaling jokers, this is how i always do it
wouldn't it be better to just ban the key?
the upgrade/downgrade message i mean
i can do that?
ITS WORKING! MY SOUNDS ARE WORKING! THANK YOU, BALATRO MOD DISCORD
i tried the same thing, it didnt work. so i resorted to a pure string message
didnt solve it
weird
it just does not play
is it possible to identify the mod that crashes ur game using log ?
50% of the time, yes
G.GAME.banned_keys i believe?
what are the 50%
if you have talisman then it usually becomes significantly harder to trace down the source of the crash
-# i think
i do
i am decently confident that that's what challenges use to ban cards
is it really necessary to use that though
im just selecting 2 random cards from my played hand
probably not them
but again, this SHOULDNT interfere with anything, should it?
although for banning of keys directly you probably wanna just fiddle with the pools themselves
depends on what allCards is
is it a copy of the table or a reference
like what in the world is this crash
.
this ^
do you have talisman on
yep
wait i just realized it, yeah, i think its the latter
happened to me too
i can delete it tho
ghghgh
talisman saves scoring related numbers as tables
because of the whole big number structure it uses
and other mod's cant access scores because of that or smth?
hold on i have just the piece of code u need
you sound like a father having EVERYTHING in his basement, waiting to be used 😭 (in a good way)
you can make your mod talisman compat but you need to create a dummy to_big() function like this and then wrap all your numbers in it which is a bit of a pain in the ass but what can you do
to_big is basically the talisman func that turns normal numbers into weird big number table things
so if it exists, it runs that, if not it defaults to just returning the same value so it still works without talisman
can i get some help please
ye
i've honestly not modded any game before so where do i start with this
