#💻・modding-dev
1 messages · Page 570 of 1
Posted about this earlier but i need help figuring out how to make a joker give money if the volume of music is set to a specific level
if anyone has any pointers to mods that do something related to the sound settings, let me know
I want to make a specific consumable effect a specific joker. How can i do that?
that seems to be all fine, i assume you have a "dollars" value defined in the joker's extra table. if it's not working, what's the issue?
need more details than that (primarily, what's the intended effect)
paperback does something very similar (the "Stick" jokers give a certain amount xmult for each Stick joker you currently own), you may want to reference that. iirc the functions that are related to that set are in the utilities folder -> misc_functions.lua
How could I make a boss and finisher be the only blinds to show up, effectively removing all other blinds from the pool?
step 1 is to hook the get_new_boss() function, if you want more help you'll have to explain what your goal is exactly
Guys, I'm still asking this question
But where do I place this sort of code
Does it go in lib or smth?
sorry for not seeing this, the effect of the joker is two things: giving xmult based on the music volume level, and giving $5 if the volume is set to a random value the joker specifies
that wasn't directed at you
this was
Plz?
it goes wherever code is loaded from in your mod, i.e. not in any other functions or object definitions
I'd just like to prevent any bosses other than one specific finisher and normal from spawning when a certain joker is owned. I know how to check if a certain joker is owned, but not the rest.
So in something like Terminus.lua?
I want the probabilities to say 1 in 4, why does it say 4 in nil?
#2# in #1# not #1# in #4#
oh my fault
ok yea hook get_new_boss(), check for if you have the joker, and if you do, check the ante. if it's divisible by 8, return the full name of the finisher blind (i.e. "bl_[mod prefix]_[blind key]". otherwise, return the full name of the regular blind.
if you don't have the joker, just return the old version of the function
#X# gets the X'th value in the vars table that you return in loc_vars. so #1# is turning into 4 because that's the odds variable you returned in vars, and #2# is turning into nil because you never returned a second value in vars
well that solved half of the problem
yea sure, i assume that's your main code file
as i just explained you need to return the numerator in loc_vars too
oh right i just remembered
if you want the probability to react to oops all 6s or any modded content that modifies probability, you need to interact with the smods probability API. check the release notes here for documentation on that https://github.com/Steamodded/smods/releases/tag/1.0.0-beta-0711a
the issue is that the joker never gives money at all
despite me doing a check for the volume level being equal to a value that changes every blind
how do i do that?
check the release notes here for documentation on that
(click the link i sent)
oh
yea i dunno tbh. if you take the randomness out of it and leave the level at 100, does it still not give any money? everything looks right to me
lemme try
ok yeah generating a random number makes it not work
setting the level the music volume will be compared into a set number makes it work
so something about math.random doesn't make it work at all
if there is a solution to make it to where generating a random number another way will make it work i gotta find it
tbh that doesn't make much sense; my hunch is maybe you just weren't checking the card's level properly? because you don't have a debug print for the card's level, but it is in the loc_vars. so i assume you don't have localization set up yet/it's set up improperly, because otherwise you'd see the value in the joker description and either match it properly or see that it's some weird decimal number or something
lemme check on that thank you for letting me know
tried to debug print it but nothing gets returned in the debug menu
cuz the description inside the joker does change
but the comparison never procs for the joker
This is how the loc_vars looks and the joker description too
what are you trying to do here
are you trying to change extra.level to be a random value or
yes i wanna set it to a random value between some value and 100
pseudorandom?
i’m too tired to look at if it was pseudorandom_probability or pseudorandom
i think it's psuedorandom
could this work?
i really shouldn’t be helping rn i need to sleep
try pseudorandom(“seed”, 1, odds)
imma try that, also go to sleep
get yo rest
i tried to convert pseudorandom to a number since it's a table
how do you make mod icons appear i believe this is common ball knowledge but idk 
thanks aikoyori'sshenanigans i understand it now
Hi i am trying to make a Joker that uses Current Money as a Xmult and failing, if anyone knows how im messin it up, grately appreaciated im dumb as bricks :D
G.GAME.dollars
i switched self.abillity.money to that
just realised i left out line numbers
G.GAME doesn't exist when the file is loaded.
could you explain with more detail, i am as stated, dumb as bricks
G.GAME doesn't exist until the game starts up, which is after your file is loaded.
okay
so
how do i make the joker have their x_mult be based of current money
because if it crashes before i can get to the file
return {mult = G.GAME.dollars*0.1}
where should i put this? /gen
i'm guessing around line 91
Yes.
okay, so like a hydra the errors won't die fix one and more will take it's place however main problem is gone so thank you.
main thing now is
is there a way to make it not say xnil here
and i mispelt guarantee
oops
I recently updated my steammoded after not doing so for a couple months, and now the mod i'm developing is not compatible since i was developing it on an older version of smods
i tried to fix my probability statements for some jokers but that doesn't seem to work
idk what to do to fix my mod at this point
the error doesn't say any lines of code from my mod that could be causing this error
This is the version i had for months before updating it to the recent release from 2 years ago
I don't know what was changed that broke my mod, but i think imma just specify in a release that it only runs on that version because idk if i have the energy to overhaul all of my code to work on the latest release
Do you have Talisman installed perchance?
oh i see
lemme get on that
it's an older version of talisman too i think
(In case you don't know already, Talisman makes it so you can't just write if x == 3 then ..., you'd need to write if to_big(x) == to_big(3) then ...) (I think)
Try to update then ‼️ :) Defo could cause issues
(This is specifically when x is one of the built-in values that Talisman changes, like Score, Dollars, etc.)
i used to_number for some stuff i think
for dollar bonus calcs i think
dunno the exact syntax, might work too
you should check the Talisman docs or somethin!
i will
also should i change my probability statements since i never updated them after that one update that fixes probability displays
No, == is fine.
updating talisman is working fine
i went ahead to update my pseudorandom stuff too from that one update
but now oops all 6s multiplies the probabilities by 4 instead of 2
for some reason
Replace G.GAME.probabilities.normal with 1
How would I make a card eternal without the eternal sticker?
if context.check_eternal then return {no_destroy = true} end
Beautiful, thank you
gotcha
like this?
Yes.
What's the variable that is used for ingame sound effect volume level?
How would I make it so you can't continue the run after a win, similarly to how losses do it by graying out the continue button
remove_save() seems to have worked
that's one option
yup, works just fine thankfully
How can I make an enhancement retrigger the adjacent cards?
You would have to use the mod calculate
how so?
if context.repetition and (context.cardarea == G.play or context.cardarea == 'unscored') and SMODS.pseudorandom_probability(card, 'electro_card', 1, card.ability.extra.odds) then
local retriggers = {}
local my_pos
for i, v in ipairs(context.full_hand) do
if v == context.other_card then
my_pos = i
end
if SMODS.has_enhancement(v, 'm_modprefix_key') then
if i > 1 then
retriggers[i-1] = (retriggers[i-1] or 0) + 1
end
if i < #context.full_hand then
retriggers[i+1] = (retriggers[i+1] or 0) + 1
end
end
end
if retriggers[my_pos] then
return {repetitions = retriggers[my_pos]}
end
end
```?
okay so, from what I see you made an array that stores the positions of the adjacent scoring cards relative to the electro card's position and at the end you made the repetitions activate in the adjacent cards from said array, am I right?
Yes.
but this retriggers the cards with the same enhancement
Obviously i would the remove the check if the adjacent card has said enhancement but the return retriggers the card that has the enhancement and not the adjacent cards
Could you send a video?
You don't want them to retrigger other cards with that enhancement?
aight, gimme a sec..
how can i make a card have absolutely no tilting from ambient or hover
Hook Sprite:draw_shader, and set _no_tilt to true?
oh ty
I wanna make that this enhancement retriggers the adjacent cards (and not the card with the enhancement itself):
That's what it does.
this turns out to be affecting every single joker if the specified joker is present
Yes, you would check context.other_card
well, not really...
You need to put that calculate function as your mod calculate function not the enhancement
as my mod, calculate function?
I'm not sure but what does this mean?
is there any info in the documentation about this?
SMODS.current_mod.calculate = function(self, context)
How can I make the fill-up Joker for a rarity pool something other than Jimbo?
Like if the Jokers run out of that pool, the Joker given by me will be the one always offered?
you would have to create an objecttype with all jokers of that rarity and then create them from that objecttype instead
Hook get_current_pool
oh get current pool handles defaults too? interesting
Thank you, I'll look into how to do that, unsure about hooks
Or is there a reference/source I could use?
vanillaremade has a thing about hooks
https://github.com/nh6574/VanillaRemade/wiki#whats-a-hook
Thank you!
alright but now the game gives me error cuz "card" from the pseudorandom probability doesn't exist, should I substitute it with something else?
replace it with self, would imagine
You need to change it to G.P_CENTERS.m_modprefix_key.config.extra.odds
ok so, I was NOT expecting the message on the deck but... I guess it works now!
deck is the default for anything without a defined message_card
<@&1133519078540185692>
kill
thanks mods
ah so I must put in the return a defined message, right?
If you wanted the message to be on the card it was retriggered by it would take a lot more work.
oh, I see
not really, right? you could just use similar logic to blueprint finding the card to the right
(actually wouldn't it just like to put a probability check in the calculate function of the enhancement and put a return message whenever the probability triggers?
No.
ah
how would I make it so you can pick up a specific joker from the shop, even if you don't have enough space for it
similarly to how negative does it
Hook G.FUNCS.check_for_buy_space
ty
wouldnt something like this work
calculate = function(self, card, context)
if context.repetition and context.cardarea == G.play then
for i = 1, #G.play.cards do
if G.play.cards[i] == card then my_pos = i end
end
if context.other_card == G.play.cards[my_pos-1] or context.other_card == G.play.cards[my_pos+1] and SMODS.pseudorandom_probability(card, "<seed>", 1, card.ability.extra.odds) then
return { repetitions = 1 }
end
end
end
why is it so close together wtf
No, you can't retrigger other cards from a card.
If you could, red seal would retrigger every playing card.
Hi, Xnil is confusing, i've seen it in a bunch of different posts from different versions, my code is below specifically for the joker with the xnil problem, when it triggers the right value appears underneath it too
What’s this for? There’s likely a cleaner way of doing this
you need to set the x_mult value in config to something
actually what is going on
so
why is it 0+G.GAME.dollars?
the joker gives mult based on the amount of money
divided by 10
the 0 was there incase it needed a number to just hav ea number
it's not really needed
most xmult starts at 1 is i think what they mean
no it starts at 0
it should probably be 1+
it's bad if you got no money
okay. im assuming your xnil issue is the jokers description showing currently xnil?
well anyway
yes
getting
the loc_vars just arent set up correctly
visuals
mhm
you dont have a card.ability.extra.x_mult
you have a card.ability.extra[1] with the same value as the nonexistent global x_mult so its just nil
o
you would just want to do the same calculation for the xmult effect in the loc_vars
vars = { (G.GAME.dollars or 0)*0.1 }
:O
oh it works
thank you
i did not really understand how loc_vars worked
now i do
thanks
you probably also dont need the config since you arent using it anywhere
ta
Quest joker of sorts, it allows you to go on an "alt path" when you are holding it.
I'm using this for it right now and it seems to be working fine
local old_check_for_buy_space = G.FUNCS.check_for_buy_space
function G.FUNCS.check_for_buy_space(card)
if
card.config and card.config.center and card.config.center.key == "j_tdec_photoquestion"
then
return true
end
return old_check_for_buy_space(card)
end
couldnt you just always make it spawn as negative or smth
I could but it would just look really bad
this feels cleaner
You can give it extra_slots_used = -1 in its config too
If it’s intended to not really take up a slot
would I still have to keep
add_to_deck = function(self, card, from_debuff)
G.jokers.config.card_limit = G.jokers.config.card_limit + 1
end,
remove_from_deck = function(self, card, from_debuff)
G.jokers.config.card_limit = G.jokers.config.card_limit - 1
end,
in that case
Otherwise it only has this negative like property when you already have full slots
No you can remove all that
going back to this,, may try to find a way to put the upgrade button on the left instead
how exactly could I make the screen continuously shake, if that is even possible
whats the correlation between sound filenames and keys
there isn't rly one afaik, keys aren't tied to filenames
sure, do you know of a list of keys for sounds somewhere
is there any way to skip having to actually redeem the vouchers
nope, sorry :p
i'm surprised the smods documentation doesn't have one tbh, since it has a whole page about text styling
whats the hands equivalent to ease_discard?
wdym
They are the same for vanilla sounds.
ease_hands_played
thnaks

im trying to make a blind autoredeem a voucher for purposes of not being limited to blind hooks, and im pretty sure it will be too flow ruining if i leave the animation in
how do i skip it and spawn a voucher as redeemed
Card.apply_to_run(nil, G.P_CENTERS.v_modprefix_key)
thanks
thanks eternally.
Why does the ... part keep triggering when I sell the Joker? It should only trigger when it's destroyed
if not context.selling_self and not context.blueprint then
card.ability.extra.destroyedstate = true
else
card.ability.extra.destroyedstate = false
end
if context.joker_main then
return {
mult = card.ability.extra.mult
}
end
end,
remove_from_deck = function(self, card, from_debuff)
if card.ability.extra.destroyedstate == true then
...
end
end```
because remove_from_deck happens after context.selling_self is calculated iirc
at least not at the same time
Can I put a context.selling_self inside remove_from_deck?
no, that would have the same issue as i just said
also context isnt passed into remove_from_deck anyway
so it would just crash from trying to index a nil value
Is there a context for card being destroyed and not sold?
you should just set the state here to false when selling it
and not set it back to true anywhere because thats pointless
Oh right, good point
Why this error appear explain please
Thank you!
you have 2 extra ends
you dont need an end for every single line of the if statement
which is what you presumably did
Thanks
if context.individual and context.cardarea == G.play then
if SMODS.pseudorandom_probability(card, 'jackpot', 1, card.ability.extra.odds) then
table.insert(card.ability.extra.cards_to_enhance, _card)
G.E_MANAGER:add_event(Event({
func = function()
card:juice_up()
return true
end
}))
end
end
if context.after then
for _, card in pairs(card.ability.extra.cards_to_enhance) do
card:set_ability(pseudorandom_element(G.P_CENTER_POOLS.Enhanced, 'jackpot1'), nil, true)```
how come cards that will becoe stone in the after context get defaced (turn blank) beforeafter even happens? how can i prevent this
does anyone know the shop rate of normal tarots?
four
Shop_rate=4
oh i thought it had to be between 0 and 1 okay
will i have to paste in the unmodified parts of calculation if i take ownership of a blind.
actually i will not answer since i dont know
key = "j_head",
stickers = card.stickers,
force_stickers = true,
edition = card.edition
}```
Transferring the edition works, but for some reason it doesn't work with stickers, any idea?
You don’t have to
so it doesnt overwrite the calculation part if i add it in?
Check invis or ankh code
What do you want to do exactly
Thank you!
this is leaving me confused.
Just checked, neither of them do anything with sitckers
They just copy the card itself
Use copy instead of doing every value manually
Try and find out
So I copy the card to have the sticker and the edition, and then change the copied Joker to the Joker I want?
s mods documentation is leaving me conflicted rn with what your saying
Oh You want to add a joker that has the same sticker as another joker
And edition
Hmmmm
Although actually stickers might not be important, I'm fine with just having the edition, and that part works
Can you do print of the stickers of one joker with .stickers in the console
Tho if it didn’t exist it would say nil
When I tried it didn't crash, it just didn't copy the sticker
difference between returning Xmult_mod and xmult?
how can I make a function for a voucher that makes the booster packs from the shop cost 1$ less?
xmult is xmult Xmult_mod is something else
Take ownership and set cost to cost-1
Xmult_mod has no automatic message or sound
how can I take the ownership?
you would hook card:set_cost for discounting specific stuff
ok thankyou
aight
this wont work for a voucher
because that just always changes the cost
When entering a shop
wdym
{
cardarea = G.jokers, -- G.hand, (G.deck and G.discard optionally enabled)
buying_card = true,
card = self -- the card being bought
}```"card = self -- the card being bought" is this meant to be used for juggler and other jokers like that or for a scaling joker for example
its just meant for jokers that trigger on buying another cards
for passive effects like juggler use add_to_deck since that triggers when the card is added in any way
And remove_from_deck to counter change
sure, i dont get how 'self' can refer to the card being bought though
well the context is calculated in the method for buying a card
and in that method, self is the card being purchased
👍
also if it says its the card being bought it probably actually is the card being bought
where can I see which G.GAME is for vouchers?
G.GAME.used_vouchers is the vouchers that have been purchased in the run
wait no
so it would be G.GAME.used_vouchers.<voucher key>

horse
but what would I put inside the check?
that's why I was asking for the G.GAME for boosters
wdym the G.GAME for boosters
inside the check how can I modify the cost of booster packs?
i mean idk, i imagine set cost returns a number so you could run the original function first and then try to subtract the output by 1 in the check
and if it doesnt then. idk
how to get the key of a shop item, because rn im using card.key but it seems to be unique between two mercurys for instance
card.config.center.key


local id = card.config.center.key
if not Table_contains(card.ability.extra.cards, id) then
card.ability.extra.cards[#card.ability.extra.cards+1] = id
card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_gain
return{
message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } }
}
end```it only scales once ::(
How to merge these if into one? As I understand it, if this is not done, the second if will not work
use SMODS.scale_card so you dont have to return
https://github.com/Steamodded/smods/discussions/919 this has some thing about it
alternatively you could replace the returns with SMODS.calculate_effect({<return table>}, card)
what does the entire calculate look like
earlier with an id of card.key it was scaling up every time i bought a card but the whole unique thing didnt work
its context.card, card is the joker itself
jesus yeah nvm!
how to get suit
.base.suit
whats the steamodded page for custom badges?
also for rank just use card:get_id()
id = context.card:get_id()..context.card.base.suitonly triggers once for first playing card, every one after that nothing
yeah because its also checking for the key i assume
which is the same for all base playing cards
if card.is_playing_card then
id = context.card:get_id()..context.card.base.suit
else
id = context.card.config.center.key
end
if not Table_contains(card.ability.extra.cards, id) then
card.ability.extra.cards[#card.ability.extra.cards+1] = id
end```shouldnt be
its intentional now i guess
does G.GAME.starting_deck_size get changed automatically or do i have to manually change it if i change the starting deck size?
when is it unnecessary to store a variable into config extra?
by that i mean put it in config = {} outside extra
generally stuff outside extra is only for values that are automatically used
from anything outside of extra only specific variable names get stored also
How to make any inscription appear when this is triggered (for example, reduce or downgrade)
Is anyone able to tell where to specify where achievement's names and descriptions go on loc file? Prefix a_ doesn't work either
smods wiki location doesn't work
How can i make a joker check if another joker is eternal, tried using the context and smods method but it doesn't work
theyre in the correct place
the key is wrong
achievements dont have a class prefix
I tried both with and without class prefix
that worked, thanks! 🫶🏽
guys
bump
context.other_joker and context.check_eternal are never calculated at the same time
context.check_eternal is for manipulating eternal properties in SMODS.is_eternal
oh i see
how can i check if another joker is eternal
also that trigger is supposed to be replaced with the card running the check
so card here
also other_card doesnt exist there
other_joker already is the card
i did this and got a crash
How to add an ability Xchips
what is the crash
Is this a joker code or something else?
try other_joker instead of other_card
If you meant to add a variable Xchips, it doesn't work.
yes
Can you show the full code
Like this?
im pretty sure it should be xchips with a lowercase x
hold on
this is all the scoring returns
@wheat jewel
Try other_joker instead of other_card
lemme try that
Why are you returning center in loc_vars btw
Shouldn’t you return card
i literally just told you to do that already 😭
Xmult works with big X
That's just the name of the parameter they chose
look at the image i sent
Mhm
Okay thanks
my badddd
it worked!
no, by default it searches jokers, consumables and vouchers
do i need to add the mod prefix for keys in scripts within the same mod
wdym by that
hiii srockw
For example if you’re adding a card with SMODS.add_card you’ll need to add the mode prefix like j_modprefix_jkey if it’s vanilla you’ll just type the vanilla key ,
So yes
is there a function to force-play a specific hand after the main hand has been drawn
I maybe found it blind:press_play() or G.func and smth there?
does anyone know what the variable for sound effects volume is called?
G.FUNCS.play_cards_from_highlighted()
yeah thanks I had figured it out while looking at the hook blind remake
Hey, folks. Is #1209506514763522108 the right place to make a "Recruitment" thread?
I'm currently looking for coders and wonder what is the better way to do it
Good start is recruiting yourself
people generally arent going to join you in anything if you havent made anything at all
I already made all required sprites for the mod
Mod is already out actually but only half of the content
I just need some of that coding magic to finish the rest
you should probably make a post for it in https://discord.com/channels/1116389027176787968/1209506514763522108 if you havent yet
that's what Im asking
if that's the right place to recruit folks
idk youll probably find people
but i meant like just a post for your mod in general so people will even find it in the first place
No code is magic 🪄
Generally if you have any problems you can ask here
I've invested my skill points into pixel art so I'm not very eager to learn coding especially after prior having multiple attempts at it
not my thing at all
especially when there's absolutely no adequate tutorial
for coding toddlers
it always like:
step 1 - here's how to make resprite mod
step 2 - here's how to make a simple mult joker
step 3 - ... there's no step 3, everything complex go figure yourself
Well there are definitely resources to help
Vanilla remade is a huge help for beginners and non beginners
It has a great wiki and shows you how to do a good few things by example
Also greetings farmer
Hello Dilly o/
this isn't removing the face cards from the deck in the challenge
Yeah VanillaRemade is a godsend
Yes and for good reason. I dont feel great when I have to spend hours to squeeze small drops of crucial info from some random ass resource just to make an X little thing for my mod
it's pure insanity
Try 13, 12, 11 maybe?
I haven't looked at how decks have cards set up yet but maybe those ids
vanillaRemade says otherwise
Oh ic
When it came out?
Abandoned deck in VanillaRemade:
https://github.com/nh6574/VanillaRemade/blob/main/src/backs.lua#L251
I dont remember when it came out but its been around for awhile
@red flower made it
Wiki is very detailed https://github.com/Steamodded/smods/wiki/SMODS.Challenge
i'm using the wiki
i just used VanillaRemade to find out how i need to format it
Hi N
hewwo
ah
yeah i was kind of weirded out that you put 'T' for mad world's "no_ranks" listing considering that you have Ten and Three
anybody know how to do the emojis like in tangents?
i went diggin through and couldnt find anything
@lament agate
lol
I think it’s with SMODS.Font
Careful Nxkoo I'm watching
- download font with emojis in it (i.e NotoEmoji)
- put that in your mods folder (Mods/assets/fonts)
- define the font in your main.lua like
SMODS.Font({
key = 'COCKS',
path = 'fonts/COCKS.ttf',
render_scale = 200, -- Base size in pixels (default: 200)
TEXT_HEIGHT_SCALE = 0.83, -- Line spacing (default: 0.83)
TEXT_OFFSET = {x = 0, y = 0}, -- Alignment tweak (default: {0,0})
FONTSCALE = 0.1, -- Scale multiplier (default: 0.1)
squish = 1, -- Horizontal stretch (default: 1)
DESCSCALE = 1 -- Description scale (default: 1)
})
- apply the font in your loc_txt or localization files (i.e {f:thefontkey})
loc_txt = {
name = "{f:custom_font}Dawg",
text = {
"I just lost my,",
"{f:COCKS}Dawg{}" -- Uses Balatro's default font index 5 (Noto JP)
}
}
Could anyone point me in the right direction for doing some cryptid compatibility?
im a GOOD modder
thanks twin
You're no longer new? They grow up so fast
AND NEW
sdiybt
tuff
i know
;3
it should be like this
(obviously remove the ace and ten)
I see
thank you
hah!
has an error!!! >:D
name = "{f:custom_font}Dawg",
text = {
"I just lost my,",
"{f:COCKS}Dawg{}" -- Uses Balatro's default font index 5 (Noto JP)
}
}```
missed an equal sign
what
i just put it in
yeah, why
VSC is so ahh
Blaming vsc is crazy
you probably put it in the wrong place and thats why it got confused
yes thats why you probably put it in the wrong place
because that shouldnt give an error

im SO sorry
bump
for
step 1: learn ui 😨

Might sound like a dumb question but where do I find assests?
is this your first time
I swear I saw them before
Game assets ?
Or mod assets
wait i might be geeked
you can extract the exe and it'll have the balatro folder with all the stuff inside
If you’re looking for the base game assets then >create a folder and extract the balatro.exe into it
What is saved = 'ph_mr_bones' for?
yeah that
And you’ll find them under resources folder
Nevermind, found it
Has localthunk said anything about 1.1 and old mod versions compatibility?
Someone know how to change the Jimbo on the Game Over Screen?
fair warning I am a bit of a dumbass, but I am trying to get this to work but I'm not sure how, I'm trying to make it so every time an ant is added to the deck it adds 0.5 xmult
so like abstract but ants?
if so have a look at https://github.com/nh6574/VanillaRemade/blob/main/src/jokers.lua
bump
kinda but there's only a few certain jokers that will trigger it
so abstract but specific i see
well you probably wont want to use add/remove_from_deck and instead just count the amount of eligible jokers in the calculate directly
so what would that look like?
JimboQuip?
Is that what it's called?
local amt = 0
for _, joker in ipairs(G.jokers.cards) do
if joker.config.center.key == "<key of an elegible joker>" then
amt = amt + 1
end
end
return { xmult = 1 + 0.5*amt }
Do you know if it's documented somewhere?
I believe it was somewhat documented in some release notes
alternatively you could get the count of each individual joker with #SMODS.find_card("<key>", true)
In the newest release it seems
removing cards directly from the deck (using SMODS.destroy_cards) makes new cards not show up in the deck, is there any way to fix it?
are you using context.destroy_card?
no
i want to destroy an amount of cards equal to the cards added to the deck
so i'm doing it during card_added
pretty sure your still supposed to use context.destroy_card in that case
idk what this means
then i'll store the amount of cards in the joker, right?
how would I make a specific blind show its name and text both as "???", but reveal them once you enter the blind?
Dynatxt
i tried making seprete lua files for jokers
never worked with that before actually
Did you use assert and SMODS.Load_file ?
To load them
Check misprint code
Im on phone
so you need the raw text
local files = {
"lib/smods.",
"items/joker/Button",
"items/joker/Swapbot"
}
for i, v in pairs(files) do
assert(SMODS.load_file(v..".lua"))()
end
oh yeah also Idk if you saw this in modding chat but I want to show you something we've been working on in a bit as a short snippet
Show me
Should work
but it crashes on start
Try ipairs instead of pairs
changed the context to destroy during context.destroy_card and didn't change anything
am i doing something wrong?
nope
Does the joker have a custom rarity
the event is there so that it doesn't destroy the cards immediately after adding (if you have your whole deck in hand you can't tell when/what gets destroyed)
that might be it
And if so is it loaded before the joker
What's the crash?
i knwo why
i just dont have a atls :P
or not
can i not add smods.atlas in ther joker.lua
bump
Why are you specifying atlas in atlas
How to make any inscription appear when this is triggered (for example, reduce or downgrade)
because my brain is dying trying to make this work
return {message = 'your message'} ?
anytime the joker would appear on screen the game crashed
Thanks
So I assume the atlas it's trying to access is undefined
Meaning the keys probably don't match
Is the pos defined correctly
It starts at 0,0 btw
I have absolutely 0 clue what I'm doing
also yeah i'll send u the snippet of the thing one momenf
What is the center of a custom consumable?
now only the second one shows up
nvm i was thinking of something else xd
If it's black it's probably out of the image
but its the same image and same size
?
the name is diffrent but the image itself is identical between the two
So the pos and the atlas should be the same
but i plan to later make them diffrent
thier the same while i get them funcitonly working
the correctly sidplaying joker is at 0,0
the other is at 1,0
how do i add a card button on the left of the card (like the use/sell buttons)
.xxxxx
y
y
y
how do you do stuff for retriggering jokers
enable the "retrigger_joker" optional feature, and then return repetitions = number during context.retrigger_joker_check (where "number" is the number of times you want to retrigger the joker)
during retrigger_joker_check, context.other_card is the joker being checked to potentially retrigger, context.other_context is the context that that joker triggered in, and context.other_ret is what that joker returned
bump
how do i do that first part
Why does SMODS.JimboQuip not work for me?
elaborate on "not work"
It just doesn't show up, no matter how high I put the rarity
anyone know how? i tried and i just ended up with this instead
bump
It just showed up but why is it not guaranteed when I set the rarity extremely high?
And how do I change the center to a custom center?
by any chance do you know if I can set an order for the achievements in the list?
you mean in-game?
yes
order of anything in-game is decided by the order in which the objects are created in your mod
for modded achievements, i'd assume that it's like other modded assets in that its order comes from the order they're initialized in code
I wanted to avoid making these achievements individually but I guess I can't order them this way even using ipairs ;-;
Can someone help me test my mod? I don't have anyone to test but myself :(
i made a mod, but it doesnt show up on the mods menu (still shows up on bmm)
what does your metadata file look like?
Yeah sounds like an invalid metadata
i filled everything correctly
can you show the file
Fingers crossed🤞 ✨
the art looks amazing so youll definitely get some attention i imagine
hope so
also shill your mod in #⚙・modding-general that helps a lot (assuming its already downloadable)
this is metadata
people shill their mods constantly when anyone asks for mod suggestions, its basically the standard lmao
also i should see some of the ideas if some of them look relatively simple to code
Sure lol
I tried another way and its still random, Im guessing its the way smods is looping them at this point
it seems to use pairs
maybe try using order?
errrr r r how would i manually call the blind defeat function? Because with my current setup i have multiple blinds that are supposed to appear instantly after one another
and defeat never triggers
G.GAME.blind:defeat()?
referencing endless entropy from entropy is probably a good idea
(i think? i've never actually seen it in action, but i'm pretty sure it's what you want)
awesome, it worked :D
isent in dms (in case u hav them muted)
is there any point to returning card = card in a joker?
No
How would I count seconds in a consumable?
how does defining a function as operation for scale_card work?
the whole "operation = function(..." goes inside the scale_card function call
it's like the function when you're adding an event, if you've done anything with that before
yeah i tried that and realized calling blind defeat fucks up everything, i'm just gonna try something else
you mean like this? what I did was basically in the update function where i made a button, for the config which changes the button's position i made it like this:
config = { align = 'cr', offset = { x = -3.3, y = -0.6 }, parent = card }
dw abt it i just squished them
nice!
I'm trying to make a joker subtract a maximum amount of money when a boss blind is defeated, and never set the player's money to a negative number. It works fine by itself, but if I have a duplicate of the same joker the second one always subtracts the same amount of money as the first, even if it puts the player's money in the negatives. Is there something obvious I'm missing here? I'm trying to use the money buffer thing but idk if I need to change it for subtracting money, or if it even helps at all. If there's a simple way to make only the first joker charge money that would work too. I'm also looking for a way to hide the "-money" message that pops up if possible. (card.ability.extra.deduction is the same number as card.ability.extra.dollars except it's negative)
How do I fix it so that it automatically gives the dollar every 10 seconds rather than when I interact with something?
if self.config.timer >= 10 then
self.config.timer = 0
return{
dollars = self.config.dollars
}
end
end,```
ease_dollars(amount)
Where does that go?
instead of the return i assume
Okay, that still does the same
it needs to be in an update function instead of a calculate function
then not the calculate function
the calculate function only runs when you interact with things
That works, thank y'all :3
How to check card for modded seal?
card.seal == "Name" doesnt work
use debugplus, hover over a card with the seal, and run eval dp.hovered.seal in the console to see what the string is. it's probably something of the form "modprefix_Name"
thanks
Those are usually it, yeah... my Seal^2 would be toga_sealseal, for example.
yae i find it
Making a joker that is basically the horse from Yahimod but its not working, it keeps crashing
local upd = Game.update
function Game:update(dt)
upd(self, dt)
if G.jokers then
for i = 1, #G.jokers.cards do
if G.jokers.cards[i].ability.name == 'j_fnaf_balloon_boy' then
local _bb = G.jokers.cards[i]
local _bbc = G.P_CENTERS.j_fnaf_balloon_boy
if _bb.ability.extra.round < _bb.ability.extra.maxround and _bb.ability.eternal ~= true then
_bb.ability.eternal = true
end
end
end
end
end
SMODS.Joker {
key = 'bb',
atlas = 'Joker',
pos = { x = 0, y = 0 },
rarity = 1,
cost = 3,
unlocked = true,
discovered = false,
blueprint_compat = false,
eternal_compat = false,
perishable_compat = false,
loc_vars = function(self, info_queue, card)
info_queue[#info_queue + 1] = { key = "fnaf_sprite_WIP", set = "Other" }
end,
add_to_deck = function(self, card, from_debuff)
SMODS.add_card('j_fnaf_balloon_boy')
card:start_dissolve({G.C.RED})
card = nil
end,
}
SMODS.Joker {
key = 'balloon_boy',
atlas = 'Joker',
pos = { x = 0, y = 0 },
rarity = 1,
cost = 3,
unlocked = true,
discovered = false,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = false,
no_collection = true,
config = { extra = { x_chips = 0.5, round = 0, maxround = 3}},
loc_vars = function(self, info_queue, card)
info_queue[#info_queue + 1] = { key = "fnaf_sprite_WIP", set = "Other" }
return { vars = { card.ability.extra.x_chips, center.ability.extra.round, center.ability.extra.maxround}}
end,
calculate = function(self, card, context)
if context.joker_main then
local bb_voice = math.random(1, 3)
return {
x_chips = card.ability.extra.x_chips,
func = function()
if (pseudorandom('fnaf_bb_voice') < 1 / 3) then
card:juice_up(0.1, 0.2)
if bb_voice == 1 then
play_sound('fnaf_bb_voice1')
elseif bb_voice == 2 then
play_sound('fnaf_bb_voice2')
elseif bb_voice == 3 then
play_sound('fnaf_bb_voice3')
end
end
end
}
end
if context.setting_blind and not context.blueprint then
card.ability.extra.round = card.ability.extra.round + 1
if card.ability.extra.round >= card.ability.extra.maxround then
card.ability.eternal = nil
end
end
end,
}
does anyone know why my joker's effect isn't working? it should make steel cards and slime cards act as both enhancements but nothing's happening
do you have quantum enhancements enabled
oh
also dont use SMODS.get_enhancements in context.check_enhancements
thats like
waiting for a stack overflow
i didn't know it was an optional feature
how should i check instead then
context.other_card.config.center.key == "m_steel" or context.other_card.config.center.key == "m_slime"
ty
yeah its a bit bad for performance because of how often the context is called so they made it an optional feature
How could I make a single joker less common within a given set? I've made them all one rarity, removed them from the pool, and only spawn them within a booster pack. I'd like one of them to spawn less often than others though, like the soul or black hole. I tried adding them to an ObjectType to spawn them from that instead, but when adding an entry in rarities for the one joker, the game ends up crashing, what could I be doing wrong?
oh i see the problem
i was looking for m_elle_slime but it was still stored as m_elle_slimed
bc i forgot to save me changing that
...i was also checking for stone cards instead of steel 😭
i may have stupid
is it possible to make certain boss blinds exclusive to a certain deck?
Yes, you would use the blind's in_pool for that
is there a shortcut for making a blind exclusive to decks from the same mod or do i have to put each one in manually?
Objects have their original mod stored so you could use that
Idk how you'd get to it for a deck though
check G.GAME.selected_back
how do i make it so that a stake has to be unlocked by gold stake
and also how do i make it so that showdown antes appear every 2 antes
so G.GAME.selected_back.config.center.pools.MOD_ID?
and i dont really know about pools well to awnser the second one.
something totally-ish different i need to know
how can i get an event to detect when you enter the shop?
i know i can just have it detect a global varible and have it be turned on somewhere else when the shop is entered
but is there an easier way to do so?
hey does the "name" field in the SMODS.joker call actually matter
since its going to be overwritten by localization/en-us
G.STATE == G.STATES.SHOP ?
only if you dont have a localization lua
also not true
the name field doesnt do anything
well, i think it gets saved to card.ability.name so you can use that instead of a key but that's just asking for mod conflicts
oh
you can do something funny which is name you joker showman or something to make it work like showman
could* since smods checks for the key now
Is there something for making a joker give exponent?
return { emult = # }
though beware you do need talisman
Forget that then, I'm not at that point, if I even ever get there
What is the variable for the game's sound effect volume
hey how do you get how much the current hand scored during a context.after trigger
you could technically do the current mult times the current chips and make that the score but then you also need to somehow account for the fat that the scoring operator can be changed
hm.
as per the 0827 release notes, SMODS.calculate_round_score() should be a fine replacement for hand_chips * mult that properly accounts for if the scoring calculation is different
so calling that in context.after will get the score that hand got?
i think so, yea
cool thx
yeah i use it so i can search for it later if i somehow forget the file name
oh cool
how do you get the current blind reqirement
What are these called?
I think G.GAME.blind.chips
not sure what's causing this issue
scoring parameters
And how do I get them?
like the numbers?
Yep
the variables should just be hand_chips and mult
yes to just read the numbers, hand_chips and mult (literally just like that, they're global values) work fine
not even capitalizing his global values, smh thunk, literally unplayable
I find it funny how it's hand_chips but not hand_mult
How can I make one card in an object type show up at a lower rate than the others? I've got this, which crashes.
rarities = {
key = "j_willatro_consciousness",
rate = 0.1
}
quick bump
They aren't strings, right?
without talisman they should just be numbers. with talisman they'll be the big number format
whats the context for all cards in the playing hand? i only see contexts for cards that score, but i want to trigger the ones that dont score too
context.full_hand
oh aight
well that also includes the cards that arent being played right?
im looking for the cards played, regardless if theyre scored or not
not the entire hand
I don't think it does
Here
huh
then why would my joker be doing that
SMODS.Joker {
key = "singularity",
blueprint_compat = true,
rarity = 4,
cost = 20,
atlas = 'nebula_atlas',
pos = {x=4,y=2},
config = {
x_mult = 1,
extra = { xmult = 1, xmult_gain = 0.1 }
},
loc_vars = function(self,info_queue,card)
return {
vars = {
card.ability.x_mult,
card.ability.extra.x_mult,
card.ability.extra.xmult_gain
}
}
end,
calculate = function(self, card, context)
if context.first_hand_drawn then
local eval = function() return G.GAME.current_round.hands_played == 0 and not G.RESET_JIGGLES end
juice_card_until(card, eval, true)
end
if context.full_hand and context.destroy_card and G.GAME.current_round.hands_played == 0 then
card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmult_gain
return {
remove = true,
xmult = card.ability.extra.xmult,
}
end
end
}
seems fine
how do i set the sell cost of a joker to a specific amount
you can modify card.sell_cost but it will get reset when calling set_cost so you either have to do some maths to make card.ability.extra_value the appropriate amount or hook card:set_cost
doing maths sounds easier tbh
nvmd
how do i hook card:set_cost but only for a specific joker
hook the function and then check if self.config.center_key is equal to you joker's key
ok
currently trying to make a joker not trigger if another copy of the same joker has been triggered beforehand, does anyone know what I'm doing wrong here? Also if anyone knows how to get rid of the message that pops up when the joker changes your money that would be nice to know as well
how do i do the hook?
bump
How do I check in which area a card is located?
so like this?
set cost doesnt return anything
oh
i would recommend looking at the original
good point lol
card.area
this is run after the vanilla code, right?
post_trigger doesnt exist in end_of_round directly
for the message try remove_default_message = true
correct
does the game have a variable for the sound effects ingame, i need to know cuz i cannot find it anywhere
how do i make a joker start with eternal
By the way, what's the difference between card and self?
in set_ability do card:set_eternal(true)
in what function
they're just argument names
The message thing worked, thank you! Is there anything else I can do to make only one copy of the joker trigger in this situation? Like maybe putting the post_trigger outside of end_of_round and disabling everything there?
For example in consumables
i wouldnt use post_trigger for that
set a global like G.GAME.modprefix_joker_used = true and then set it to false in a later context
self is the prototype object of the card in the functions of SMODS.Consumable (it is the SMODS.Consumable itself) while card is the specific card instance you're evaluating
self == card.config.center
Okay, got it
ty
How can i store the original rates of common, uncommon, and rare jokers without permanently altering them?
trying to make a joker, destory a joker and have other jokers of that rarity no longer appear in the shop for one shop visit
and have it reset at the end of the shop
if anyone could help me with this it'd help alot
nvm got it fixed
Anyone able to help with this crash message? It only happens when I add this into my ObjectType.
rarities = {
{ key = "j_willatro_consciousness", rate = 0.01 }
}
Nevermind, seems like I can only change the spawn rate of a rarity within an object type.
well now i cant even use the mod.
Which begs the question, how could I make a particular card of the same rarity as others spawn less frequently in packs, like soul or black hole?
what is a mode r
is there an easy way to get something like context.post_trigger on playing cards and editions too, or do i just have to inject my own calculate_context calls into the main scoring loop
how the hell am i meant to handle crossmodding
i tried to make a crossmod joker and it just ignores the dependencies flag i set, instantly running into a crash since OBVIOUSLY THE MOD ISNT THERE.
if next(SMODS.find_mod("mod key")) is true, then the mod exists. wrap your crossmod joker in an if statement checking for that
and take the other mod out of the dependencies folder, since you don't require the other mod
someone said to put the dependenciee flag into the joker object
interesting
what's the code
SMODS.Joker{
key = 'jimboGE',
dependencies = {"kino"},
loc_txt = {
name = "{C:wdylg_Gangster}Joker{}",
text = {"{C:red,s:1.1}+#1#{} Bullets",
"{C:attention}THIS IS NOT A MOVIE JOKER.{}"}
},
rarity = 3,
generate_ui = Kino.generate_info_ui,-- this is the part where it runs into a spike wall while CLEARLY ignoring the dependencies flag.
yeah that makes sense
the definition of the joker is obviously going to ignore dependencies
because those are not loaded yet when you run SMODS.Joker
anyway bump
i'm probably just gonna get started on a hook/patch but it would be nice to know if a system already exists for it
Bump
so returning a message from a playing card causes it to show up after the card's chip score, is there a way to make it only display the message and not the amount of chips?
any advice on how to make this work? trying to make it so every ant in the deck adds to the mult
I crash when starting the game
return {xmult = #SMODS.find_card('j_modprefix_key')}
removing cards directly from the deck (using SMODS.destroy_cards) makes new cards not show up in the deck, is there any way to fix it?
I recorded another moment where it happened.
Guys, is there a way to get 2x assets if I have the 1x copies?
The pixel image resizer kinda blurs the images...
Yes, you have to use Nearest Neighbor
can anyone tell me why my values arent resetting when i sell the joker? they get added just fine
G.GAME.trig is so they dont keep piling their passives on each other over and over
1st image is remove_from_deck, the other 3 are add_to_deck, and in order
nvm im just stupid
(this IS balatro related, im doing this for a convoluted blind) would anyone with love2d experience be able to explain why file is nil here?
i swear-
When I hover my consumable in collection I get this crash ??
No, it's because G.hand doesn't exist.
does name give you something
omg I am soo dumb
you probably want to use NFS instead of love.filesystem too
I need some sleep ig
Hey, someone has been getting this mysterious crash with this mod, does anyone know why this is the case?
yes, (for windows and in this case) it's "C:/Users/[user]/"
i dont know what that is...
it's basically the same thing
Bump
Code?
Thanks
swapping to that fixed ALL most of my issues lmao, ty!
Oops! The game crashed:
Syntax error: functions/common_events.lua:3429: 'end' expected (to close 'function' at line 473) near '<eof>'
A bad lovely patch has resulted in this crash.
Additional Context:
Balatro Version: 1.0.1o-FULL
Modded Version: 1.0.0~BETA-0913c-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.8.0
Platform: Windows
Stack Traceback
(3) C function 'function: 0x3ab7edc8'
(4) global C function 'require'
(5) main chunk of file 'main.lua' at line 892
(6) global C function 'require'
(7) LÖVE function at file 'boot.lua:323' (best guess)
Local variables:
c = table: 0x3ab857a0 {identity:false, version:11.5, accelerometerjoystick:true, modules:table: 0x3ab7f1f8, gammacorrect:false, title:Balatro, externalstorage:false (more...)}
openedconsole = boolean: false
confok = boolean: true
conferr = nil
(8) global C function 'xpcall'
(9) LÖVE function at file 'boot.lua:362' (best guess)
Local variables:
result = boolean: true
(10) global C function 'xpcall'
(11) LÖVE function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])
inerror = boolean: true
deferErrhand = Lua function '(LÖVE Function)' (defined at line 348 of chunk [love "boot.lua"])
earlyinit = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])
Whhat is this??
I just updated steamodded...
what should i do?
(card.edition or self.config).card_limit
do i put that before or after
oop wait
Thanks!
so how do i add a name to the edition
So what exactly is the bad lovely patch or smth?
Does it have to do with incompat with latest smods?
My current guess is a mod that is expecting an older smods version has a patch and that messes everything up, do the mods you have rn have compatibility with the newest smods release, and are all of them updated?
Since I have a developing mod...
Even a text takes delaying to send
Source code copied from jokerforge, can anyone find bugs

formatting jumpscare wtf
yeah jokerforge is like that
look i thought it was just bad and not also the worst indentation ever
how to imitate card:is_stone()
How do I make the game not go into a infinite loop and explode when two cards both mention eachother?
You mean from an info_queue?
yes
how to determine what type of booster is being skipped with context.skipping_booster
if not card.fake_card
context.booster.config.center.kind
thankyou
if context.skipping_booster then
local kind = context.booster.config.center.kind
it says center is nil
also, what should the output look like
context.booster.kind
so for a twist i wanted to make a chip version of the ceremonial dagger, however im getting an error about the curly bracket and im not exactly sure why
thx
looks like you never ended calculate
