#đ»ă»modding-dev
1 messages · Page 225 of 1
ITS NOT WORKING đ đ
why does this always set the edition to foil?
Okay so I have this in the code, now how do I make a run win instantly?
like in code
next(SMODS.find_mod('abcdef'))
Patience is a virtue
bump
counterpoint: 
How would I create a button that creates a popup. Im stuck on this.
(bump)
Fuck you're 
does anyone know why this doesnt work đ
you need to assign a button to it and create a corresponding entry to G.FUNCS that opens an overlay menu
plenty examples of this in smods and the game itself
is the " " the mod key
if you want to call it that, sure
ok
though it's called a mod ID normally
Are there examples in the example mod?
If not, where in smods.
why does this not work? (the .no_suit and .always_scores)
no
any button, really
take the mods button or the consumables button in the collection
hey john do you know why this isnt doing anything
yes
it's a regex patch
and you're giving it the raw string
oh okay
to make it work with regex, you would need to escape special characters
mr john how do i force the game to save properly
those properties are checked via center, you're setting them on card without changing the card's center
hey aure how are you doing
e.g. \( \) instead of ( )
there's multiple different functions for different things
What is this for?
oh hey someone actually asked
that's so nice of you, I can't believe it
I'm doing great, ty
I'm glad to hear that
im a fake ass bitch aure im sorry
it keeps track of the tab that was last selected so it can go back to there when you go to a different menu from inside of it
Do i need it?
no
if your overlay menu has tabs and can be reached by going back, you can have it
but not having it just amounts to always being thrown into the first tab and not whatever you last had selected
So, this should work?
What exactly do you mean, going back?
if there's a different menu that can be accessed from your menu
like from the additions tab in a mod menu
if you close an overlay menu it closes everything so you need logic to go back to the previous one
pressing back will send you back to the menu you came from
Ohh, thankis
Why does this only ever set the edition to foil?
So what exactly do i need?
this would break the enhancement center
you're not supposed to change stuff about the center, you're supposed to use set_ability to assign the card a different center
I'll have my drivers test next week but nothing much else for rn
either that or changing how calcing works for your effect to work
i've had mine for a bit
Good luck on the test
Also I saw this and I'm not ignoring it, I just don't know off the top of my head
I got a driverâs license then never drove
just automatic
I got it in 2019⊠đ
đ
i believe i first got mine around 2.5 years ago
There was nowhere to go in 2020
im ryo
uh oh
I think mine expired last year v_v
But, like, itâs not valid where I am now
the test is on automatic but I'll be driving on manual gearshift after for now lmao
Thatâs why I didnât renew it
Good luck đ€
it shouldn't
I drove automatic for my training and the exam
Whatâs that
i drive automatic
car game
okay so
I've had some lessons on manual which is why my license won't be restricted to automatic
why doesn't THIS work
[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = '''local stay_flipped = G.GAME and G.GAME.blind and G.GAME.blind:stay_flipped(to, card)'''
position = 'after'
match_indent = true
payload = '''
if G.GAME.modifiers.cherrysmod_allflipped and to == G.hand then
print "it should have worked but let's be real it probably didn't"
stay_flipped = true
end
'''
Wait you have restricted licenses?
no
Iâve never heard of such a thing
adult moment
License requiring specific gear type
i do not however have a motorcycle licence
we have such things here
patches can implant code into any part of the file right
Wait but you said ânoâ
if I went fully automatic during training and test, I would only be allowed to drive automatic
Unless you meant it to someone else
it's in game.lua around L2600 if you need specifically the run save
but I had some amount lessons on manual
is this an EU country thing?
Confused
or some weird state specific
oh
no I just misread that
I thought you were asking about my license being restricted
How would i create a tab in this.
-# Very proffesional UI code
you do. open balatro exe with winrar
not sure how other EU states do things tbh
okay
I remember during my exam I had a moment of tension because the person driving in front of me let their car die which prompted me to stop to not crash into them. But youâre not supposed to let the car die or stop during the exam. Still got my license tho
what do you mean let their car die?
uh what, no stopping?
Not turning off the engine
you wouldn't have needed to turn the engine off though?
If you mishandle the stick it turns off
oh stalling
Yes
ive always called it stalling the car
Idk the anglophone jargon
yeah fair enough lol
me neither lmao
i failed my first driving test cause i failed the parallel park, perfect score elsewise but its an instant fail if no parallel park
we get retries for that I think
i retried the next day and got it. it was just cause i was borrowing a friends truck for exam and had never driven it before so i didnt know how big it was
An actual truck or just a pickup
pickup lol
Makes sense
Thereâs also something thatâs a bit silly. For the first year of my license, any infraction is grounds for losing it. So the game theoretical optimal decision is to not drive for a year 

Then people lose driving skill practice during that year
WHAT THE FUCK
WHEN I RELOAD A SAVED CHALLENGE THE GAME JUST ACTS LIKE THERES NO CUSTOM RULES ? ??? ??
inside voices..
I know how dare lawmakers not know game theory
we have a 2 year probationary period
lmao
it is more strict on losing it like yours victin, but also you cant let people with learners permit practice in your car
Why does this only ever set the edition to foil?
learners permit 
I donât know if either of those are a thing in my country
Why doesnt this work
learners permit is you can drive, but only with fully licensed person in the car
You need to take a minimum number of hours in theoretical and practical classes
you have to have it for a year before you can get regular license
Then you take theoretical and practical exams
here no classroom time is required, you can just take test
Oh and there was something else too
the learners permit test that is, stated before that you need that for a year before you can take road test
A psychotechnical test IIRC
At least my countryâs system took less time
yeah we have those too, you basically complete your license at 17 but don't get the real license until you're 18
well most people get the learners test when they are young, so doesnt affect them much as they cant afford car or anything anyways during that time
The theoretical classes were pretty useless. I just used the time to read the textbook
here if you complete driving school, ie the classroom stuff and things, your insurance will be significantly cheaper
so its worth doing
theory classes are mandatory here
though they're also not that useful for the theory test
you just have to know all of the questions lmao
Nothing is being renderd, no crash
I mean acing the theoretical test just requires knowing the law*
Itâs not that hard
*I liedâit requires understanding the poorly written, multiple choice questions
that's the spirit
Really why are poorly written tests so common
i dont know if its true but ive heard they are written poorly/confusing to catch people who are skimming the questions
My issue isnât with the questions being tricky
They can be tricky but not poorly written
Like âA could mean Bâ even though realistically thatâs not what they meant
howq can i fix this crash
send the code

SMODS.Joker {
name = "mmj-beemario",
key = "beemario",
config = { extra = { retriggers = 2 } },
pos = { x = 0, y = 2 },
soul_pos = { x = 1, y = 2 },
rarity = "mariojoker",
order = 85,
cost = 20,
blueprint_compat = true,
immutable = true,
loc_vars = function(self, info_queue, center)
return { vars = { center.ability.extra.retriggers } }
end,
atlas = "marioatlas",
calculate = function(self, card, context)
if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= self then
return {
message = localize("k_again_ex"),
repetitions = card.ability.extra.retriggers,
card = card,
}
end
end,
cry_credits = {
idea = {
"MarioFan597"
},
art = {
"Linus Goof Balls",
"MarioFan597",
},
code = {
"SMG9000"
}
},
}
also this if needed
local gradient = SMODS.Gradient{
key = "mariogradient",
colours = {
HEX('E52521'),
HEX('43B047'),
HEX('049CD8'),
HEX('FBD000')
}
}
SMODS.Rarity{
key = "mariojoker",
badge_colour = gradient,
default_weight = 0,
pools = {
["Joker"] = true,
}
}
but yeah i have no idea why its crashing
it is in this if statement
if next(SMODS.find_mod('Beelatro')) then
end
<@&1133519078540185692>
GET OUT
Am i using this correctly? G.hand.highlighted[i]:set_ability(G.P_CENTERS.always_scores, nil, true)
Would need to add a variable to card.ability like aiko_highlighted
Or maybe reuse Bellâs
thanks mods : 3
Would need a small patch but I can give the patch to you
I do think this type of concept is very weak and pointless
ÂŻ_(ă)_/ÂŻ
Hello
@tall wharf anyways do you watch the Bell patch or are you implementing your own variable?
i already have like akyrs_forced_selection or something
the problem being it doesn't save the selection when i go back to main menu and come back
Hmmm how are you doing it?
i tried forcing save on card selection
Try using the Bellâs variable and see if that works
Or
Maybe the variable is saved
But you need to reselect the cards
Maybe Bell does it manually
Usually it saves everything in card.ability
right?
Is this the correct code for winning a run?
G.STATE_COMPLETE = true
Does it not save or does it not load properly?
it does not save
No
no, that's just for changing between states
if i click faster than the game could save
it does save
check the video for reference
Then how do I win a run using code?
i mean if i didn't send it before is because i dont know lol, I only made a game losing effect
Ah, then I feel like the issue would be optimizing how the game saves or delaying the user from leaving
Although they might be able to crash the game to leave anyways
Ah okay, but there G.STATE_COMPLETE is false, so I don't quite understand
No idea what that is
As they said, that variable is unrelated to what you want, at least directly
the other code set the state to the game over state and then it set state complete to false so it resolved the game over part
So what is?
Hmm but from what I see in the source code there is no winning state
Hmm the button there is described to only win the current blind, not what I'm after
I imagine that winning the game is related to winning the Blind
So see what happens when you win a Blind
You have a fair point
then it transitions to a shop state, just saw it in the code. But that's different sadly
Not always
When you win the game, it pops up a menu before you can proceed to the next shop
So thereâs something there
Can you use both color and size control tags in a description? I attempted to use them here but it results in no size change and just the inactive color
"a hovered {C:attention}booster pack{}",
"{C:inactive, s:0.5}This Joker changes seed progression{}"```
No space
Am i using this correctly? G.hand.highlighted[i]:set_ability(G.P_CENTERS.always_scores, nil, true)
That's what I meant with transition. Maybe I need to specify the MENU state and give it a menu?
I donât think so
Again the winning condition is already there
I imagine itâs connected to the Ante
!!! thank you
Youâre welcome
Also I just had a Joker art idea: either
J I M B O
J O K E R
or
G O ! G O !
J O K E R !
anything yet?
on Jimboâs teeth
I found that this state after winning a blind is called G.STATES.ROUND_EVAL. Maybe in the last boss fight that state changes. Again, I'm currently going through source code
OKAY SO
Ooo! That's a fun idea
I DONT KNOW WHY
BUT IM PRETTY SURE THAT
draw_card
HANDLES DRAWING CARDS TO THE SCREEN
AND NOT DRAWING CARDS TO YOUR HAND
I imagine itâs the same state all the time, it just interrupts it to displays the win conditions
đ
YOU CAN SEE WHY THIS CONFUSED ME.
Ah so youâve found that out

I canât even blame thunk
That would make sense
Blame the English language instead
Thereâs a few, but you can look into CardArea:draw_card_from
Where's that?
Thereâs also another function that takes both source and destination IIRC
cardarea.lua
Actually it might be CardArea:draw_card_to
Either/or

@latent portal also which cards are you drawing
just got to my pc, this worked
[[patches]]
[patches.pattern]
target = "cardarea.lua"
pattern = "local stay_flipped = G.GAME and G.GAME.blind and G.GAME.blind:stay_flipped(self, card)"
position = 'after'
match_indent = true
payload = '''
if self == G.hand then
stay_flipped = true
end
'''
Okay so, what I am now gonna try, is basically: I'm gonna set the winning ante to the current one, (win_ante) and then just go to the ROUND_EVAL state. Update you in a lil
just did this
thank u tho
i've been working with the wrong func the whole time đ


i hate English can we patch it out of the game
your wish is granted the balatro source code is now entirely in chinese
torre de babel indeed
yknow what
I just didnât expect it to be Chinese thatâs all
it wasnt worth it
lmao
this challenge fucking sucks đ
The sequel to la Casa de Papel
what challenge?
I think face-down cards are interesting in limited quantities
it works like the old gameboy games where you can have 99
Now whereâs the Balatro archetype
weege board deck that spells jimbo
all cards face down
it fucking sucks
weegee
if u get all the jimbo letters he comes out of the screen and becomes ur friend
K O N G
Am i using this correctly? G.hand.highlighted[i]:set_ability(G.P_CENTERS.always_scores, nil, true)
there is no always_scores center
gng, how can i do something when round ends, decrease extra variable by 3, add money and destroy the joker?
@tall wharfâs Maxwellâs Notebook
if you've made one, it needs prefixes
not asking for direct answer but at least for smods link where it's explained
if you haven't, set some other flag and hook SMODS.always_scores or use splash context
Probably in an end of round context or the function that computes end of round money
(bump)
How can I hook SMODS.always_scores to function properly without the use of enhancements?
i mean the event's or smth
basically how do i add player money, destroy joker that player has, decrease variable and do something when round ends
as 4 diff things
set a flag in the card's ability
shaders are a fuck
like _card.ability.my_always_scores = true
of course you can make an enhancement that always scores
like I said then you just need to add prefixes
either way CHALLENGE DONE YAY!!
accidentally laucnhed jackbox instead of balala
balatro jackbox gaming
new balatro multiplayer mode unlocked
did you add gender to balatro???
yes, gender suits
đ
listen. i couldnt think of better suit ideas.
this is an insane joker but it is an inside joke in this community
speaker
alright people 10 am santas coming!
god i loved elf
BLUETOOTH
huh
The one on the shelf? I hated that one! /j

it's an additive joker
ok
sort of like runner or wee joker
oh so its adding to itself?
Why are you using 'self' instead of 'card'
Replace self with card
do you know how to do a random number for mult?
Keep the self parameter, just change the usages to card
cause i cant find the misprint code
alr thanks man
it's supposed to be at ^30
not at ^10
how do i add money to the player ?
like gold joker?
basically yes
ok
you can find the gold joker code there
Can I see your whole file
nvm, I see your issue
in your return block you are returning '10', not 'card.ability.extra.e_mult_mod' for 'Emult_mod'
could someone like make a mod that just makes judgement a different colour than the other tarots
If I wanted to grab every booster pack in the game (included modded ones), do I just iterate through G.P_CENTERS and grab keys based on the prefix?
G.P_CENTER_POOLS.Booster
oh nope, found it
Yeah, sorry, slow on the draw there
The collection uses the pool
another question, how do i destroy a joker ?
nicer way is card:start_dissolve() but it depends on what you want to do
basically got a joker that gives player $12 at the end of the round
and it decreases by 3 every time
he ends the shop
how do i make it that you get extra money every time a card is sold
(when a specific joker is in hand)
theres a context for selling cards
and i want it to disappear when money gain equals 0
what's that context?
How can i add an effect for the joker when its scored
i'll see if i can figure the rest out myself this time
okay now send your whole file lol
alright will do
context.selling_card
What's a good mod with a custom card area I could go learn from?
Yeah, it needs to be e_mult in the return block, not e_mult_mod. that's my bad
joyousspring đ
if context.selling_card
kinda late
thamnks
as for earning money its ease_dollars(amount) unless someone comes along and tells me this is obsolete theres a smod functionalith for it
Im about visual effect
yes you can return dollars = amount
what the hell!!!
yknow it'd be really funny if this was the one time there wassn't
..god damnit
fair I guess ease_dollars is a strange name for a function that gives you money
well it helps you get dollars with ease so idk
Also, you need to increment e_mult instead of e_mult_mod
yee ````give_me_money()``` would work better đ„
get_that_bread()
pleasemoney()
Hihi :)
still the same
Do you ever see the Joker actually upgarde?
Please answer me. I cant found something like thin on the wiki
I mean like the upgrade message, does that ever show up
it doesn't show underneath the joker but on the cards played
How can i add animation for the joker whent its scores
what kind of animation
I can copy the code real quick and try to work through it
If you would be so kind as to copy and paste the code rather than send an image
key = 'gptm',
loc_txt = {
name = 'Gay People',
text = {
"{X:black,C:dark_edition,s:1.25}+^#2#{} Mult",
"per {C:attention}10{} played",
"{C:inactive}(Currently {C:dark_edition}^#2#{C:inactive} Mult)",
spriter('jesterjamz')
}
},
config = {extra = {e_mult = 0, e_mult_mod = 10} },
rarity = "cry_epic",
unlocked = true,
discovered = true,
blueprint_compat = false,
eternal_compat = true,
perishable_compat = false,
atlas = 'gaypeople',
pos = { x = 0, y = 0 },
cost = 10,
loc_vars = function(self, info_queue, center)
return {vars = {center.ability.extra.e_mult, center.ability.extra.e_mult_mod}}
end,
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play then
if context.other_card:get_id() == 10 then
card.ability.extra.e_mult = card.ability.extra.e_mult + card.ability.extra.e_mult_mod
return {
Emult_mod = card.ability.extra.e_mult,
card = context.other_card,
message = '+^' .. card.ability.extra.e_mult .. ' Mult'
}, true
end
end
end
}```
there
For example, like the Joker Stencil
like when it scores?
yea
how do I check what type of card a card is
card.ability.set
That's cause you sent the e_mult_mod as the second loc_vars parameter, when it should be e_mult
so it's #1# instead of #2#
In your case, yes
does anyone know if i can make an edition destroy different jokers/playing cards? c:
i'm asking the people who came up with the idea to clarify if the exponentiation applies to only if 10's are played or even with no 10's played
it's half and half
you should get one more ideas person to break the tie
jesterjamz sounds more sure
now how do i make custom suits
you hire a tailor
SMODS.Suit
Why is it not counted even though the number changes?
Wdym? I'm confused on why you have that string in your message block
Also you are comparing card.ability.extra.now to a string of an integer, when it is being assigned an integer in the context check below
I can't replace string with number?
Doing that will print that string literally
Unless things have changed in Steamodded recently and I do not know about that
ok it does work but i didn't update the initial amount of exponentional mult
because it's supposed to start at ^10
What exactly is the issue you are encountering, and what is the expected result?
Because the comment you left was a little ambiguous
omg dev from hit mod paperback

let's go
still struggling with trying to work this out in case anyone knows anything
i like paperback c:
It is expected that a random number (maph.random) will be calculated as a multiplier for chips, only a change in the number is observed
And it will change after each hand played.
So you want the number to be randomly generated after every hand played, correct?
Yea, between 2 selected numbers
Then you should be in context.after, not context.final_scoring_step
and probably remove the or context.ability.extra.now == "1" since it's comparing a number to a string. It will always be false
And I also have two other questions
Feel free to ask anything, that's what this channel is for
How to find out the first start of the game, and how to save the value after restarting?
If it is in the ability table (in config in the declaration) the game will save the value automatically
And what do you mean find out the first start of the game? Like what the value is when the run is first started?
I want to get a random value also when I first start the run
Yea
So that when you first pick up the Joker from the shop (or other means) it's a random value?
why is this error
Yea
Where do i need to use it?
Add it to the declaration. You know how loc_vars and calculate are defined. Add it in there, and then add the random number generator code from above into that function's body
I can try to find an example for you
Yea, please
In this one, I defined set_ability and did some assignments inside it
That will show up on the Joker's initial spawning in
Does that make sense?
Are you sure rarities start with a k in their key?
ye
Yeah I'm not sure, cause that's how Cryptid does its rarities
The struggle of needing to implement a new piece of UI and struggling to find where it can fucking fit
I added "set_ability", it works but it also doesn't multiply in the run
why
It doesn't do the xChips?
Yea
But i see a value in the joker description
is there a way to make it so you lose the game from a joker
What is the lightest identifying information for an instanced center? Its node id?
Try replacing the math.random call with pseudorandom('xChips', card.ability.extra.min, card.ability.extra.max). But also, you need to be using context.joker_main, not context.main_joker
crazy joker is looking... crazy...
I guess the better question, is it reasonable to use an entire card table as the key in a map?
Maybe problem was in the "context.main_joker"
Yeah, it was
hey guys hows this deck art look
evil mr. bones be like:
oh what
ok
how would i work this into my card?
it does "x5 mult, 1 in 50 chance per played card that you lose the game"
refer to the link I sent you, it just does this in the calculate fucntion
ok
What's the difference between mult = and mult_mod =? (Noob here)
yes
does it say that anywhere in the docs
this screams debug
https://github.com/Steamodded/examples/blob/master/Mods/DeckOf4s.lua something like this ig
no !!!!
thx so much
literally programmer's art
does most_played_poker_hand just never get used
whats going on
why did it default to high card
and why did the ui break :(
:(
i think it only updates when you beat a boss
why, just calculate it yourself
this is the code that updates it
Hey, @red flower
I was playing Yugioh with my son earlier today and he was shook when I used Monster Reborn to summon his Eldlich into my hand to use him. I thought you might appreciate that
into your hand?
Well onto my field! Eldlich is very cool, it was a blast to use him with my manadium cards
oh yeah monster reborn is cool, it's sad that it's not played that much anymore
sweet now it targets the right hand, but the ui still breaks sadly
its not though
is it real deal
its really real super real supreme
how does it break
see the video
it doesn't show the hand name or the level, and the chips/mult stay there
shiet
hold on let me test again just to make sure it's not just some weirdness from continuing a run
that code seems correct so I can't see how that would happen on your end
other than something like what you just said
{C:money}
peak, ty
Oh man, this is a fun joker!!
pawlatro
omg cuuuuuuuuute c:
hey whats the command to change a cards suit again
SMODS.change_base
Hihi chat! I'm almost done with my custom suit!!!
oh nice! c:
rn im working on a joker that forces the music to change
thats it nothing else LMAO
I'm working on a collection mod that adds a bunch of random ideas
what?
I'm trying to add a modicon but it's not showing up. Do I need anything more than this in the file?
This is literally that entire file so I'm wondering if I need anything else
literally Aikoyori's Shenanigans
nice
am i doing anything wrong?
i think they just added like context for start of shop
context.starting_shop
in newer versions of SMODS
two of my own Jokers use it :3
hey guys
im trying to make a bit of text display a tooltip when i hover over it
im doing it right and nothings happening
show your code
is there a {C} color like this ?
{C:attention}
ty
loc_txt = {
name = "DIY Deck",
text = {
"Start with a deck",
"full of {C:attention,T:cherrysmod_doodle_info}Doodle Cards{}"
}
},```
why dont they just call them yellow , green, orangeđ
But i have one problem... The value changes faster than the calculation goes, although it calculates correctly 
they still show error and i'm having a hard time figuring out why
And also changing the value has no visual effect
what does your cherrysmod_doodle_info look like in your localization?
descriptions = {
Other = {
cherrysmod_doodle_info = {
name = 'Doodle Card',
text = {
'Grants {C:chips}double chips{}',
'Has no suit',
},```
is Doodle an enhancement or an edition?
can you have Lucky Doodle Cards or Polychrome Doodle Cards or Lucky Polychrome Doodle Cards?
@latent portal
can anyone help me with figuring out what's wrong with my localization file
Doodle is a suit
It's a big old bodge
Where are the other two "}"?
so i may figure out why all of my card suits are showing ERROR
so you could hypothetically have a Lucky Doodle Card or a Stone Doodle Card?
so many errors, and yet i don't know how to deal with them...
The weirdest thing is, the tooltip works fine with the Doodle Cards themselves
But not for the deck
sorry if im being annoying about this
it's just that i'm really confused
the prefix IS correct
which is "puyo"
see
they're in the game!!!
What is it?
females
yes. i added a women suit to the game
This is a new suit?
yes
đ
show us the mtf king
BEHOLD my masterpiece
Listen. It was funny to me when I came up with it and I had to commit to the bit
crazy joker
no way
here's all of the suit
Weird all of my cuustom jokers appear in the shop even if I already have them in my jokers and don't have showman
sliced edition
What if it triggered three times and applied 0.95 xmult?
i think it should just trigger twice
no halving value
does anyone know how to make a joker call for different music when it spawns? im struggling so hard w/ this
noone cares about the retextures that take me hours to make đ

I love it triggering many times, but halving the result. So funny
I'll bet @earnest oracle knows how to do it!
look at jimball
What determines how long something a tag gives lasts? like how the juggle one gives +3 hand size for a round, what makes it only one round how can I increase that amount?
oh word
I have an idea for the joker
It will gain xmult equal to the current round, but if you don't win the round with this joker for one hand, the game is considered lost 
all or nothing joker
ok, I'm trying out your descriptions in my own codebase, and it's still not working
so that's extremely weird
heck i cant find where jimball calls for the myoosic . 3.
A challenge with this eternal joker from the start would also be interesting
uh
meet gaalighting
I FIGURED IT OUT
For SOME reason
w!!!
The mouse-over text can't reference entries labeled "Other"
That's such a silly joker effect
look at my boy, hes beautiful
Now... Do I work on my new ranks or do I add Jokers for the suit first?
jimball has the exact effect im looking for but i cant find anything to do with music in the misc joker lua-

SMODS.Sound({
key = "music_jimball",
path = "music_jimball.ogg",
sync = false,
pitch = 1,
select_music_track = function()
return next(find_joker("cry-Jimball"))
and Cryptid_config.Cryptid
and Cryptid_config.Cryptid.jimball_music
-- Lowering priority for edition Jimballs later
and 7
end,
})```
the music isn't handled by the Joker itself
Joker gains x0.5 mult per card in the deck but destroys a random card after each hand played 
wait what is the cryptid config stuff? my mod isn't cryptid . 3.
ignore that, that's for the copyrighted music settings that Cryptid adds
OHHHHHH gotcha
sorry im new to lua, i appreciate the help <3
daily reminder for everyone who wants their mod on the Balatro Mod Manager: https://github.com/skyline69/balatro-mod-index
btw now with mod updating support!! https://github.com/skyline69/balatro-mod-manager/releases/tag/v0.1.9 đđđ
woagh
i wanna inspect this a little closer, which .lua is this in?
Man you can spend a lot of time working on shaders. I am trying to make a sparkling effect like on Yugioh Secret / Ultra Rare cards and boy oh boy is it not easy
real, thats a beast im not ready to tackle yet X3
It's so interesting to write a mod for my things and play with them
sure, ask away
This is funny
ok so
im trying to get a tooltip to appear when i hover over text
but it REFUSES TO WORK
this is the important bit
and this is what it looks like in the default.lua loc file (+2 of these ---> })
What determines how long something a tag gives lasts? like how the juggle one gives +3 hand size for a round, what makes it only one round how can I increase that amount?
Take a look at @tall wharf 's mod, they got this working very well.
I haven't tried it myself
somebody gotta tell this joker he will be the only reason the score will catch fire
ugh, it's still not calling the music

why sounnds hard
I GOT IT
this is the stupidest fucking joker and it's caused me so much trouble oml
new joker created
who wants it
it costs 19 in the shop
that would make sense considering it is called the 19 dollar fortnite card
it is not called the anything but 19 dollar
fr
when you sell it, you should gain $0 because yes, you're giving it away
but it should emphisize in it's text, trolls, DON'T get blocked
true true
I bet it's because of how keys and prefixes work!
that borked me for like three hours till I finally asked Mr. Steammodded how it works
it wasn't asking for a key i had to declare the name of the joker even though i already had in the localization file.,.
ugh, that sucks!
let me show you my perfectly balanced and functional joker
lol!
big iron
this is all it does.
true
fr!
I have a sound I am adding to one of my jokers, and I think it is either being pitched up or played faster - is there a way to check / prevent this?
set it's pitch to 1 and turn off sync if it's a music track
but other than that idk
oh wait it might be because sound effects increase in pitch when your score goes up (?)
Like, in scoring as the flames come out the sound effects pitch up
ohh they do do that
Anyone know if there's a way to avoid that / disable it for a specific sound effect?
that i do not know sorry friend
return { pitch = 1 }
I will give this a go
That worked, thank you very much đ«Ą
you were correct đ
Well if I had tried it when you had said it, it would have worked so I'd call that a win
gng, can somebody slide me a classic joker sprite ?
How can i make a tag that gives something for longer than a round, like hand size, hands, discards, slots? (then remove after said time)
I wanted to add custom localization fields to a joker is patching init_localization and all that a dumb idea
as in more boxes in the description?
yeah you can use init_localization to add those to the localization file and the generate_ui function on the joker to actually add the boxes
i do both of those https://github.com/nh6574/JoyousSpring/blob/main/src/card_ui.lua
well not the extra boxes bit but something similar
aight đ
doing this does look like something that could easily part of SMODS I wonder if a PR for this would be nice
lads i did the funny https://discord.com/channels/1116389027176787968/1348461931631087647
.. why the hell can name be a table?
How would I be able to replace a function with lovely?
you want to completely replace it?
Yes ^^
if you're gonna completely rewrite it it'd be simpler to just redefine it in your lua code
Oh? How so?
you can just... write your version of the function with the same name
then the game just calls your version instead
it's fucked
Oh! Ok ^^ Thank you!
also, completely replacing a function is a big no-no for mod compatibility
Ahhh, fair
Balatro Modding Starter Pack, the copypasta :3
If you are new to modding, make sure that you understand the basics of LUA first before proceeding. There are a lot of good tutorials out there, so I won't link one here :)
For beginners, here are some links you should check out in order to familiarize yourself with what you are getting into:
- https://github.com/Steamodded/smods/wiki/Your-First-Mod
⊠This should give you some instructions, and it also serves as Steamodded's Documentation. Please read it :) - https://www.youtube.com/watch?v=Zp-4U5TlbxY&t=7s
⊠A Modding Tutorial video. It is a bit outdated, but generally does well at telling you what to do.
-# (Note: There are some parts in the video where they called cards "center". Don't do that, it's bad practice, they are cards.) - https://github.com/Steamodded/examples/blob/master/Mods/EditionExamples/EditionExamples.lua
⊠It's good practice to check out the example mods, as well as other mods too for reference.
Once again, remember to read the Documentation. There also other links which you might find useful, such as:
- https://github.com/ethangreen-dev/lovely-injector?tab=readme-ov-file#patches
⊠Patches. - https://discord.com/channels/1116389027176787968/1228149931257237664
⊠DebugPlus, a very useful mod for modding. - https://forums.kleientertainment.com/forums/topic/129557-tutorial-function-hooking-and-you/
⊠Hooks.
-# Sent: 10 times
Thank you! ^^
I love the counter lmfao
also, if i want to make it so that after a hand is played, a card in hand is destroyed, what would i need to do?
initially thought that context.destroying_card will work too, but it seems it doesn't
its impressive how fast it increases lol
context.destroy_card is the actual context, destroying_card is just a unique flag for scored cards
o
How can i make a tag give something for an ante instead of a round like hand size?
If this works for you you can "hook" the function. Here's an example:
local _some_balatro_function = some_balatro_function
function some_balatro_function(args)
local ret = _some_balatro_function(args)
if args.yourmod_flag then
ret.rig_wheel_of_fortune = true
end
return ret
end
oh init_localiztion refuses to parse the center if text isn't present
aight fine
thank you.
is there a way to force a boss blind using DebugPlus? I need to test a Joker in Amber Acorn
I just reroll until I get it
well, impractical to play, or skip/use Win Blind 23 times...
+1 Ante
aha yes
and then eval G.FUNCS.reroll_boss() neat
Have you tried just... pressing 3 on the boss blind in the collection
I mean... if the question is "how do I spawn X in" the answer is usually "press 3 on it in the collection screen"
wouldn't cross my mind
now you know đ
doesn't the continue run screen display your highest hand score?
hey gang is there a context for changing antes
has to be saved somewhere then
ohhhhhhhhhhhhh yeah
or would i have to do like if context.end_of_round and G.GAME.blind.boss
because i had this idea for a joker
Dumbbell
Gain $5 when you beat your highest hand score this run
(Score to beat: X chips)
I doubt there is one for ante changing specifically, but this one should probably work?
it works, my mod has some jokers which use this
hmm
Can the repetition thing in the return part affect the joker itself? Like I want it to get a 1/3 chance to retrigger itself, which grants Xmult. If so, how would it look like?
what the fuck do you want from me
u forgot to add 1
really
important
thing
'dont be afraid of asking questions'
on fucking god id never make anything if i wasnt asking random easy questions here
If its chip colours you are looking for: {C:chips}
If just blue: {C:blue}
dude, same.
thanks a bunch c:
there was blue all the time ??
my guess was right c:
Looking in the source files for balatro and the color location, yeah, there is actually a bunch. globals.lua
where should i report a smods bug? the highlighted lines crash if i am setting the edition of a negative card when it hasn't been added to an area and G.hand is nil (which i'm realizing as i type this that that is an incredibly niche situation which i can resolve myself, i was accidentally setting my card to be inherently negative in 2 places so it crashed when viewed in the collection)
We predicting some card packs
oh awesome ill take a gander!
one more question, how specifically do you get card values to description? I did it before but don't really understand it
wait thats so cool
In the object's loc_vars function, you return a table for the UI display, containing another table vars = {[value]}
The description reads the values inside the vars table by index when you use a tag like #1#, #2#, etc
Holy shit that's so cool
I need to learn how to make UI boxes that display cards like that, I got an Edition that works like a pocket discard pile so I need to learn how to do that
ohhhhhh i see, tysm!!
So at the bottom of loc_vars
return { vars = { 'test'} }
And then if your description is simply the string "#1#", it'll display the word 'test'
Because it's accessing and printing out the first value in the vars table to replace that 1 tag
ohhhhhhh
hmm, is there a way to get an addition to not be added to the collection? (specifically stickers if that matters)
i added something similar to the stake win stickers for my mod and don't want them showing up as if they were gameplay stickers
I believe I saw something in the docs to specifically hide something from the collection, lemme check
It's card and not center isn't it? Or is it interchangeable?
tis just a variable name so it wouldnt affect whether it works or not
typically it's called card though yeah
Okay yeah just set no_collection = true in the object definition
ah convenient thank you
Sorry, replying to you, not myself
that is very cool
is not.. :c
is there a command to force a joker to display a message?
that's pretty nice yeah
Do you have a crash log?
how's the text set up? might be a problem with that
You can do it through `SMODS.calculate_effect()' and pass in a message value
could you show me an example?
i understand better if its visualized
I usually have it set up like this so I think info_queue comes first yeah
info_queue[#info_queue+1] = {key = "artist_poul", set = "Other"}
return { vars = {G.GAME.probabilities.normal, card.ability.extra.enhance_chance} }
end```
But yeah, what kind of error are you seeing kawaii?
A crash? Is it showing nil values?
Certainly!
nil value
i see now! thank you!
np np
do you just wanna see the entire code? its not a very complicated joker
Sure
had the pleasure of digging itno generate_card_ui
I am still clueless on how any of this works i hate UI
hey gang how do i change the amount that rerolls implement by?
its prob super obvious im just stoopy
ohhh
it's supposed to give 5 chips whenever any other joker triggers c:
ok sneaky issue, you've ended the config table at the wrong spot
the only thing it should contain is your extra table
oh yeah
guh?
the config table currently contains your entire code
config is missing a }
add another brace before the comma
in other words, this needs to be moved up here
So the reason why it's not working is because it's looking for loc_vars where it expects it to be, but it wasn't currently where it's expected, so it just subs nil values
icicicicicic c:
feels nice to be able to help with stuff instead of needing help myself
hey it's a community, give and take is what it's all about, just pass it on! nwn
kinda what i love about this sorta stuff
big soup of knowledge
I've done custom UI for exactly two things and both times it's kinda wehh, I steal what code I can because I'm not a UI programmer
This one for example basically does something very similar to Jimbo's win/loss quotes
that joker just like me fr
Hell yeah tgirl hours
J I M B O 
J O K E R 

