#💻・modding-dev
1 messages · Page 402 of 1
what is sol?
sol is the key to enhancement
like sunlight card? sounds like that
pretty much
yeah, i wanted first to make it so it can also be any rank (or a unique rank) but outside of the fact i don't know how to do this, it would have also probably made the card a bit too powerful
and thanks !
i love to see when people combine concepts of things
You probably don't know it, but there is an "omnirank" enchancement.
sun cards
yeah that was the thing lol
I will forever react to whatever stupid bullshit I come across in english servers and is in spanish.
that is why i was asking xd
try put the flag for dialects too
I don't know dialects, sorry
-# aranés at most, and I only know it exists. I don't know how it works.
-# note: catalán, gallego, etc are not being counted as dialects
i dont know what aranés is xd
I believe it is spoken in 'el valle de Arán' or something. No clue. I am a math guy.
-# well, programming guy, actually
oh then im talking about slangs(?)
Not quite.
I am not certain if they qualify as entire languages.
If they don't, they are between being a dialect and being a language.
oh i see aranes is pre-spanish
Again, I am not the guy who knows about these things.
No.
and only talking in spain nowdays
ok
bump
luck on it
back to trying to help peeps with balatro modding because I ran out of shit to mod in the game that doesn't take a bajillion years.
haven't touched deck skins in my life.
That would require me to well, know how to make pixelart.
do you know anything about the other issue at least
here you go, from card.lua. how invisible joker works.
am i really the only person that's run into this issue? 
Hooking functions and stuff?
what?
i'm not hooking anything or changing how invisible joker works at all
it was just like this by itself
invisible joker copied a custom joker and didn't immediately switch to its atlas, instead remaining on the default atlas
i can't answer your question because i'm not really trying to do anything
Let me check with my balatro copy
invisible joker is just being weird
the joker it copied? it doesn't really mess with any of the draw stuff if that's what you mean. it's set up no differently than any of my other jokers. specifies an atlas and a position. then when i want to change it to a different sprite, i adjust the x or y in the position table and then call set_sprite_pos() with it.
i don't see how that can make invisible joker not switch to the correct atlas right away
no hecking idea, tbh
is this with latest smods release or latest dev?
i did make a change to copy_card but it should only be for the card back
latest dev, yes
does it do this with the release?
yes.
i also confirmed that it does this with a different custom joker that never at any point changes its sprite. literally just specifies atlas and position and nothing else related to that
weird
but that also fixes on loading the run
do you have any other mods?
with all but the minimum inactive
your files are cursed

should i just patch a draw call after emplace in invis code
I wonder if it’s a malverk issue
tried with the texture pack off - the weird thing is that opening the malverk ui fixes the sprite
...wait, invis doesn't change itself, it makes a new card. so it isn't trying to go from one atlas to another. it's just making a copy of the card object. that's even more confusing that it does this
i don't get it.
Just gave this a go but seemingly no dice. Here's my derivative
SMODS.DrawStep { -- Derived from Ortalab
key = 'footprint',
order = 35,
func = function(self)
if SMODS.has_enhancement(self, 'm_mxms_footprint') then
G.shared_stickers['mxms_footprint'].draw_major = self
G.shared_stickers['mxms_footprint']:draw_shader('dissolve', nil, nil, nil, self.children.center)
end
end,
conditions = { facing = 'front' },
}
I tried your method of creating a Sprite variable in the DrawStep too but it yielded the same result
I am still struggling 😭 (This is continuation of me trying to make active abilitys on cards I just havent been able to work on it for 2 days)
how does your code look like
ahh icic, i implemented this to my mod too, lemme cross-ref
hell yea
first thing i noticed is that this should be G.C.WHITE
another thing i noticed is that you didnt clean up use_button ui properly (this is what you should do, im p sure)
Try making sure the conditions are the same
i was thinking why i was getting the same 4 spectrals over and over, but this crashes if it's other than those 4
Added the vortex = false condition and nothing changed 
oh, also
Can you show the code for creating the sprite?
im pretty sure this will make your custom button not even showing up
Sure thing
SMODS.Atlas { -- Main Modifiers/Backs Atlas
key = 'Modifiers',
path = "Modifiers.png",
px = 71,
py = 95,
inject = function(self) -- Derived from Grim
self.full_path = (self.mod and self.mod.path or SMODS.path) .. 'assets/' .. G.SETTINGS.GRAPHICS.texture_scaling .. 'x/' .. self.path
local file_data = assert(NFS.newFileData(self.full_path), ('Failed to collect file data for Atlas %s'):format(self.key))
self.image_data = assert(love.image.newImageData(file_data), ('Failed to initialize image data for Atlas %s'):format(self.key))
self.image = love.graphics.newImage(self.image_data, { mipmaps = true, dpiscale = G.SETTINGS.GRAPHICS.texture_scaling })
G[self.atlas_table][self.key_noloc or self.key] = self
G.shared_stickers['mxms_footprint'] = Sprite(0, 0, G.CARD_W, G.CARD_H, G[self.atlas_table][self.key_noloc or self.key], { x = 0, y = 4 })
end
}
I had a print at the end of the inject function and it went off just fine. No other error messages either
its still crashing but this prolly saved me future work once the crashing is fixed 😭
so you might want to have
local ret = card_highlight_ref(self, is_highlighted)
at the top first, then return it below
i hate brackets 😭
So I know that adjusting hand size via joker is typically done via a function when the joker is added or removed
I want to have a joker add hand size based on how many jokers of a certain set are in play (sort of like how baseball card triggers per Uncommon)
what context and functions would I need to utilize? could I do it at round start like how Burglar adds hands? Or would it be better to do it at the end of each hand score count, for if someone sells one of the other Jokers during the round?
is my SMODS outdated or am i doing something wrong
probably outdated
1404g???????????????????????
yeah very outdated lol
YES
can you make me some cookies :3
lmao
LMAO
sure :3
banger
is there a context for when jokers are removed from deck yet
Try getting rid of this inject function and just making the sprite in the drawstep like my version did
I always feel conflicted when i get a new crash. is this me having fixed the old crash to discover new crashes, or have I made it worse.
I did already try that and it gave the same results, but I'll try it again
you could try having some if statement checks in calculate without contexts to increase/decrease hand-size, theres context.card_added for when jokers are added but none for checking when jokers are removed (afaik), so
hopefully someone will correct me :3
my (probably jank) intuition would be to have a list compare the list of jokers previously to the list of jokers now after a card has been sold and to see if its been changed ?
bump
Aha there we go. Plenty thanks
just out of curiousity how old is that version
Now to figure out how to make it not stay in place on hover cuz this just looks odd
Probably a few months
It’ll need the right args passing to draw shader
I'm referencing the drawstep code for seals and stickers rn and it doesn't look like they have different args?
Huh
Huh indeed
This is the main line I'm looking at since I'm pretty sure that's the actual sprite while the second one is for the shine
is anyone familiar with the plasma deck balancing code? i have this and it works but visually has no effect. what functions does plasma use for juice?
this is plasma but only for chips?
adds mult to chips
You can just return balance = true if you want to balance the mult and chips
i mean the visuals, like the balanced text etc.
thank you
Aha found it! Forgot this little bit here
its pointing to line 61 (function line)
actually. its the local ret line
What is that line supposed to be for
hook (?)
yeah that's not how hooks work
😭
^
in the function
anything below local ret = ... means the code runs after everything in the initial function has already been run, which means your buttons wont be overridden
gotcha
Before the function too is wrong
why does this only create the fallback card?
though that also creates the 4 cards i commented
okay it didn't crash on start up but when i clicked new run. pointing to line 62 which is
😭
honestly ur doing much better than me when i first started, N' can confirm
keep going :3
i cant you were always amazing
move this up here
if you place it there, it will always remove the buttons sob
oh wait, not there
uhh inside the if statements to create the new buttons
:3
why is my description empty?
higlighted ????
ive looked through my code and I dont see that typo on my end but also highlighted isnt looking like a word anymore
your localization is set up wrong
its not even the variable causeing the crash im just 😭 i think im going insane
one could say
even crashing out
insane? i was insane once
can you show me the new code again
I like havent changed anythign ive just been looking at higlighted in the crash log 😭
this is how the description look in the localization file
name = 'Skater Cookie',
text = {
'{C:chips}+#1#{} Chips, {C:mult}X#2#{} Mult',
'Gain {C:chips}+#3#{} Chips for each card played,',
'and {C:mult}X#4#{} Mult at end of round.',
'{C:inactive}(Currently {C:chips}+#5#{}{C:inactive} Chips, {C:mult}X#6#{}{C:inactive} Mult{}'
},
},```
i do fix the typo of highlighted in my code
im going to rewrite the entirety of balatro to fix this. - artist who came to front just to air his greivances
😭
did you fix caino too
oh shit i never thought of making balatro jokers irl < has a deck of cards im customizing
in my defense I started the project before i played balatro i just love cards
anyways, do the fixes i told you :3
uhh i gotta go do something rq ill be back in like 5
the joker's key is CRB_skater?
-# but also, i dont recommend having uppercase letters in keys, i still cant remember why but someone told me so
i fixed it somehow
anyways, i'm so not enthusiastic about somehow implementing an element type system
that is indeed his sell value
how would i make it so that this code plays a different sound effect if it has a certain edition?
I am back 😎
elaborate
im hooked
im going to have beef with this goddang button
What is that line in the dump?
You need to set the reference to Card.highlight then you just return ret
does anyone know why opening this booster pack crashes the game?
check the line its pointing to. I think you called a function that wants a table?
that page has 57 lines
What card is it supposed to contain
its supposed to contain jokers of the "sahur" type
I mean Functions/common_events.lua
chat how do you check what a different joker returns
thats like a lovely file
And have you actually created that type?
not a file of my mod
like i want to check not just when the joker to the left triggers, but specifically what it's doing
yup, every joker has
e.g. i want to check if a joker to its left is returning a +mult, +gold, or +chip,
how would i do that
The error is coming from that line, so even though it's not in your mod, something about your mod is causing that line to throw an exception. Looking at that file can help you understand where the issue is coming from.
Better yet, if you showed the whole stack trace of your error, we could see the function that you're calling and pinpoint the exact line in your file that's causing the error
Now probably it's just that you've set up something wrong with your set
I’m 99% sure it’s an issue with trying to create a card of the custom set but I don’t have access to my source code rn
But it would be good practice to learn to read the stack trace
Do you mean it's an issue on SMODS end?
No
Ok that's what I thought
My guess is that the set just isn’t a thing
But I haven’t done any custom sets for anything so I’m not 109%
Did you create the ObjectType
colour error..
I did find one color in my code but i fixed it but the crash did not change at all
Is creating a new objecttype the best way to create a subset of jokers? I've never done anything like that
you know how the other crash was because you needed to nest a node in brackets? this one is likely the opposite
To my knowledge that's the best way to create a custom pool of jokers
i dont eben know what to say. brackets man
i see these two crashes a lot lol
wdymbt?
To create a custom set that you can spawn using create_card, as an example, declaring the pool in the joker definiton is not enough
You have to also define an SMODS.ObjectType which should be on the wiki
ohhhh
ok ik what you're talking about
hold on let me try that
yup! it was that
In create_card you have set = "sahur". set is for a type of card, like Joker or Tarot or Spectral. My understanding is that if you want to make "sahur" a set, you need to create an ObjectType that represents this whole new type of card (even though they'll still just act like jokers)
hey, im making a joker that when sold halves the number of chips required by the boss blind, is there a variable i can access or way i can change the visible chips required? i've got the joker functioning fine, but i'd like to give a more clear visual cue for the player
G.GAME.blind.chip_text = number_format(G.GAME.blind.chips)
Thank you
To update the texr
You can also G.GAME.blind:wiggle() to make it move
Tho it's not very visible
any tips 😭 i only see one where the brackets can be removed but then i get the nest a node crash again
idk i would need to see the code
i'm trying to make a spectral card that applies a custom seal but i'm getting this error (i didn't code the seal stuff yet it's just visuals)
im pretty sure the root shouldn't be nested
the one i told you that needs the brackets is the C node
modprefix_soul_seal
In set_seal ^
smthn like this?
?
here i mean in the screenshot i sent before
i never looked at the earlier part of the code
😭
this is one too deep haha
okay now i understand 😭 I need like. youtube red arrows to point for me LMAO
ABSOLUTE W (ignore the fact its bright yellow. i vastly misunderstood the colour crash 😭)
the sell button kinda died i guess but i think having my own sets precedence in excitement
(also i kinda predicted that it would vanish but I have an idea on how to fix)
how do i make a planet card show up after playing the hand type, similar to the vanilla ones that use a secret hand
In the planet config set softlock = true
is this all i need then, excluding the stuff that goes in the localization file
You're missing a position for the sprite
lemme double check if my other cards that have an atlas of just one card needed a position in order to work
yeah in that case you don't need it
hi srockw how are u doing
Super cool people in chat rn
hi n I'm super boredd
no u
i worked so hard on my 4 jokers, only for them to be too op 😭
awww thats sad
U da super cool
I hope you are well :D
make another 100 bad ones to compensate
But they work, which is the most important part
these are commons!
make more common commons
and i haven't even implemented the element system
Good news and bad news
i didn't knew these 4 will stack up the score too much, it's around 12k if positioned properly
okay guys I'm new to modding and I need to know if I'm stupid rq
lol
hit us. you can't be worse than me cough
The only one thst feels really strong to me is skater cookie
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play and not context.blueprint then
card.ability.extra.sum = ( card.ability.extra.sum + context.other_card:get_id() )
return {
card = self
}
end
if context.joker_main then
card.ability.extra.root = ( card.ability.extra.sum % 9 )
if card.ability.extra.root == 0 then
return {
mult_mod = card.ability.extra.nine,
card = self
}
else
return { card = self }
end
end
end``` whenever I try to score this
I get this
card = self is the issue
which one
ok now it doesn't crash on scoring
and the reason it wasn't scoring was because I somehow wrote mod_mult in the return instead of mult
can I use context.pre_joker safely to trigger something after context.individual but before context.joker_main
I think pre_joker is for editions
I need to trigger an upgrade after iterating through the scoring hand with context.individual so it can't go in context.before
The scoring hand is available during context.before
Unless you want to do something whenever a card scores?
but then I'd have to iterate through it manually instead of using other_card
What's the problem with that?
I don't know lua syntax
its an opportunity to learn then
for k, v in pairs(context.scoring_hand) do
end
I assume v is value here
i usually substitute v for playing_card
makes it a bit more obvious what it's referring to
is k the loop index or suit
i use pcard because im lazy
i use v cus I'm lazy
k is either the name of the value or the index.
Also that'd be the case if using ipairs
Pairs just loops thru all the keys regardless of if they're numbers or not
nvm i always use ipairs instead, which i think is better if you know your list is integer-indexed
yep it is
I can just lua for index, playing_card in pairs(context.scoring_hand) do card.ability.extra.sum = card.ability.extra.sum + playing_card:get_id() end right
is there a way to use create_card to make a joker without it showing up? just save it to a variable for use in the code later? if not, is there a way to immediately and silently delete the joker afterwards?
why does lua not have +=
why would you even use that
card.states.visible = false
if you want a sum of ranks and not of IDs i would use playing_card.base.nominal
to not write the variable twice?
Are there any good guides for modding balatro and where to get started and stuff
yeah check the pinned post in #⚙・modding-general
It looks pretty and nice
are we pretending like the python +=, -=, *=, and /= operators aren't super useful and improve code legibility
python is even missing ++
☝️🤓 , erm those are from C
python has them now, also C is archaic and i don't like it
grrrr low-level languages
i would use python more if it didn't make whitespace part of the syntax
i've only really every used python </3
anyways. how to make the buttons.... better (same size. etc.)
And center the text 😭
uhh cant you just copy my code lol
I tried 😭
I lied. I have used HTML and CSS. none of whihc is helping me comprehend this UI shinanigans LMAO
if context.before and context.cardarea == G.play and not context.blueprint then
for index, playing_card in pairs(context.scoring_hand) do
card.ability.extra.sum = card.ability.extra.sum + playing_card:get_id()
end
card.ability.extra.root = ( card.ability.extra.sum % 9 )
card.ability.extra.sum = 0
if card.ability.extra.root == 0 then
card.ability.extra.root = 1
card.ability.extra.final_mult = card.ability.extra.final_mult + card.ability.extra.nine
return {
message = 'Upgraded!',
colour = G.C.MULT,
card = card
}
end
end```
is my loop set up wrong
hey, im trying to get the entire description of a joker to change when a condition is met, but i wouldnt know how to update the text, is there a function or variable to change to accomplish this?
you're overriding the sum immediately after calculating it
oh nevermind
that's intended to reset it for next time
okay okay turns out i missed a node in there, the sell button is looking more normal
why are you asking if it's wrong? are you getting an error?
it doesn't trigger the upgrade when I play a 9 high card
return a localization key in loc_vars
are you setting the sum to 0 before the loop
do you use context.main_eval for xmult gain? i want a joker's xmult to gain to trigger outside of scoring, and if a global variable is a certain value
you'd upgrade the joker when you modify the global variable
it's initialised to 0 and set to 0 after the loop but I'll try moving it to before
i'm trying to make this seal give x9 mult when there are 0 hands left and the score is less than the blind requires, whenever i hover over the card it crashes
either by creating your own context or manually looping thru the jokers owned and checking if it's the one
make sure to get a new copy of your seal if you've modified the config
wdym get a new copy of your seal
Start a new run?
re-apply the seal or apply it to a different card
tried this and it still crashes
is it the same crash
line 937 is in loc_vars btw
forgot to mention
yeah
It needs to be card.ability.seal.extra.Xmult
thank u so so much
how do I get the current amount of money the player has?
(G.GAME.dollars + (G.GAME.dollar_buffer or 0))
thunk writes it as though the buffer might not exist, so usually people do nil handling
what is the key for blackhole
c_black_hole
awsolme
how do I compare the money to a number? because when I do something like" (G.GAME.dollars + (G.GAME.dollar_buffer or 0)) <= 0" the game just crashes
(to_big(G.GAME.dollars) + (to_big(G.GAME.dollar_buffer) or to_big(0))) <= to_big(0)?
do you have talisman
yeah.
still crashes :(
Log?
I will also send code real quick
ok but im modifying it through an ownership, so is it still possible?
is k_planet_q the default badge for planet cards?
Hi, im currently trying to fix my friends mess of code. its supposed to upgrade the joker with a +1 mult increase when diamond suit cards are scored and also destroy them after scoring
I might need help with this
why are there so many comments
I dont know where my friend got them.
card.ability.extra.suit
this reads like someone who's writing code to be read by someone who knows nothing about programming
its missing from the is_suit
actually reading through this maybe you just scrap the code and rewrite it
none of this does what it says it does
yeah
wtf's going on with the remove_from_deck
idk 😭
does the game crash when you sell this joker?
probably
i'd have to imagine so considering card.ability.extra.discard_size isn't real
😭 bro what was my friend trying to do
give diamonds the upgrade message on scoring and crash the game on sell
notably the diamonds don't actually do anything other than show a message cause mult is 0
also thats a five dollar common with no econ capabilities wtf
card crashes when i hover over it w/ message saying 'colours' is nil
you're not returning a color in loc_vars
you need that for {V:1} i think
its the examplejokers mod
i know because mine still has comments from it 😭
get rid of them
if it aint broke dont fix it
they're probably not even right though???
besides it helps with switch n shit /sys
ah, thx
not everything is context.joker_main
that makes sense
(assuming you're changing the comments to be correct instead of just always context.joker_main)
that never confused us lol. its like the one thing we got right away 😭
ok I started rewriting that entire code and I need some help. each scored diamond card should give the joker a +1 mult and after that it destroys them
oh wait damn
you haven't destroyed other_card yet but other than that it looks like it should work
oh wait context.other_card doesn't always exist
that looks like it will crash yeah
put the first if in an if context.individual and context.cardarea == G.play then
like that?
yes
please deindent the one line inside it though
it doesn't matter but it looks bad
currently trying to make a joker that modifies lucky card trigger probabilities and i'm not sure of the best way to go about it - i'm guessing i'd need to somehow override the default Card:get_p_dollars() and Card:get_chip_mult() functions within the custom joker definition?
take ownership of lucky cards and check if you have the joker: if so, change the lucky card probabilities
im pretty sure lucky cards are hardcoded
thats stupid
unless that changed recently you would need to patch
seal works now but i was wondering if it could only trigger the x9 mult for just the first scored card that has the seal, not every scored card with the seal
use a profile variable to test if the seal's been triggered this round and reset it when blind is selected
i'm a little confused on what you mean, this seal is meant to give x9 mult on the last scored hand if a scored card has the seal and the score is not met, that condition should trigger the x9 mult
essentially:
--pseudocode
if not sealtrigger and current card has seal and it should trigger then
sealtrigger = true
do the x9 mult thing
if blind select then
sealtrigger = false
How do I make the played cards destroy itself?
para_consumefood = function(card)
G.E_MANAGER:add_event(Event({
func = function()
play_sound('tarot1')
card.T.r = -0.2
card:juice_up(0.3, 0.4)
card.states.drag.is = true
card.children.center.pinch.x = true
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.3,
blockable = false,
func = function()
card:remove()
return true
end
}))
return true
end
}))
end
this is for food jokers but i would assume you could just input other_card instead
idk i haven't tested it
this returns nil whether it's card or center
okay so it worked one time and then when i did it on the next blind the mult didn't trigger
yeah that isn't where you'd put the blind select
try a hook?
card is nil but when i change it to center the whole colours is nil
i figured it out but thank you for the help
i made a custom rpc and i made soultrigger a global variable and when the rpc checks for blind select that's where i updated soultrigger to be false, it just works now for some reason
where do I put context.destroy_card?
you want to destroy all diamonds?
it goes in its own if like this
(ignore the other parts of the context that's just part of the joker i screenshotted)
actually context.cardaea == G.play would be smth for you to use if you only want to destroy diamonds played
yeah I want only played diamond cards to be destroyed
if context.destroy_card and context.cardarea == G.play and [condition to isolate diamonds cards] then
after that its return { remove = true }?
if the conditions are set right, it should destroy only the diamonds cards in the played hand (though it will also destroy any unscored diamonds cards in played hand)
lemme double check the cardarea for scoring cards (you just want to destroy scoring cards right?)
yes
replace other_card for destroy_card
printing any information out of a table (with lovely?) returns nil, its driving me crazy does anyone know anything about it
like
for k, v in pairs(context.scoring_hand) do
if v.edition then
print(v.edition)
prints nil
also tried edition_type
and i should say returns not just prints, checking for the editions just pretends like they dont have any
if it destroys unscoring cards try the cardarea G.scoring or some variation of that (i forget what variation actually works)
what is the goal with this?
how can i make a joker do its own effect multiple times?
(and make it so if it gets retriggered then it does that effect multiple times)
as for right now, i just want the console to print the edition of played cards
looks fine to me, where are you checking
looks like its checking the scoring hand
ah
if context.cardarea == G.jokers then
if context.before then
if next(context.poker_hands['Pair']) then
does anyone know how i can do this?
id assume something to with a bunch of retriggering
is there a simple way to replace the title screen texture? ive followed the example mod for deck skins but a quick glance through the documentation doesnt show an easy way to change the title screen texture
calculate = function(self, card, context)
if context.cardarea == G.jokers then
if context.before then
if next(context.poker_hands['Pair']) then
for k, v in pairs(context.scoring_hand) do
print(v.edition)
print(v.edition_type)
both nil
weird, it should work
i think i saw somewhere it was a lovely bug but 
are you sure they have an edition lol?
pretty sure :p
ill run a quick test
pair, one has an edition (foil)
so it should, before scoring, detect a pair and iterate through those 2 cards, find the one with the foil edition, and print its edition
the first thing, v.edition is probably a bool
but both just return nil
i did find a workaround though
very jank code, it hurts me, but
calculate = function(self, card, context)
if context.cardarea == G.jokers then
if context.before then
if next(context.poker_hands['Pair']) then
local edition_one
local edition_two
for k, v in pairs(context.scoring_hand) do
print(context.scoring_hand)
if v.edition then
if(v.edition.holo) then
print("holo")
end
if(v.edition.foil) then
print("foil")
end
if(v.edition.negative) then
print("negative")
end
if(v.edition.polychrome) then
print("polychrome")
end
v.edition is a table
that does the trick
good to know
probably, it does store the correct value but lovely's print function just cant handle tables at all
oh maybe lovely doesnt print tables? you should try debugplus
same conclusion, ill give it a try
why does this only create the backup card?
does context.after literally do it after all scoring
yea
like after the round total chips are added
i thought it was after everything but at least before it put the cards back in your deck
it's after scoring the chips, why?
idk
lol
is there a way that i can have a joker return mult = naneinf or the like without the score turning into fake infinity?
like virus cards are going back into the deck before doing their conversion animation
reasking now that im back
can i call a joker's xmult upgrade using a global that's only modified in a take_ownership, or would i have to do something else? (global in question is highlighted)
it should be before that i think but it depends on the event timing
can't you add a context call after that global?
you're asking me like i'd kno-OH I SHOULD ADD THIS IMAGE IN
important image i straight up just left out
everything except the xmult gain works perfectly
i mean like
G.GAME.chudhit = G.GAME.chudhit + 1
SMODS.calculate_context{chudhit = true}
and then use context.chudhit
card.config.center.key tho
I'm making a joker that gives a card that has a random enhancement, seal, and edition when blind is selected and while I've gotten edition and seal working it keeps returning an error for enhancement and I'm wondering if it's because of my "set_enhancement" line. Is that the problem or am I missing something?
set_ability
thank you
instead of card.key
yes
bump?
is there any way to force it to happen at the right time?
why is it set to true if it's integers?
wont that clash?
probably but im bad at animation timings sorry
bump
i would love to know if theres a way to do it with mods instead of editing the png inside the exe
thank you
didnt work :(
what. is happening to the consumable slots
bump (and yes i have changed it back to center)
do you have -4 consumable slots without negatives
nope
any smart people can help out with this strange error report we got
the screenshot is me trying to diagnose the issue
did i mess anything up (overrides and main file respectively)
i'm trying to make it so a seal does x9 for the first scored card that has the seal and does x9 mult if the score is less than the blind requirement
it does the x9 mult in final scoring step but it doesn't get the final round score
guys
how should i draw an N instead of a J for my joker
can i get a list of the cards i currently i have in hand?
no like whats the font
just feel it
is there a way that i can have a joker return mult = naneinf or the like without the score turning into fake infinity?
-# asking again
whats the goal here
is this intended with or without talisman
do you really need to set mult to naneinf?
is this look good
with talisman
and you can turn it upside down and it looks the same
yes
no i mean the N
why are you setting mult to naneinf
my mod is literally called shitposting
fair enough
🙏 🙏 🙏 🙏 🙏
are you not able to just have an if statement for whatever level of talisman and then have the mult be the max for whatever level it is?
i'm not sure how to do that, is all
do you know how big omeganum is
like this is my current code
SMODS.Joker {
key = "gamblecore",
config = { immutable = { numerator = 1, denominator = 255 } },
rarity = 2,
atlas = "crp_placeholders",
pos = { x = 3, y = 0 },
cost = 5,
blueprint_compat = true,
demicolon_compat = true,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.immutable.numerator, card.ability.immutable.denominator } }
end,
calculate = function(self, card, context)
if (context.joker_main) or context.forcetrigger then
if pseudorandom(card.ability.immutable.numerator, card.ability.immutable.denominator) then
return {
mult = math.huge
}
end
end
end,
crp_credits = {
idea = { "Unknown" },
code = { "Glitchkat10" }
}
}
but math.huge = fake infinity
do i need to?
its big enough that it'd be faster just to set to naneinf
yeah but like how
not like that matters if nobody knows how to set it to naneinf
naneinf is, by definition, not a number
yeah
im very much not familiar with lua, where in here is the x position? I need to move the texture a bit to the right
local balala = "balala"
G.SPLASH_LOGO = Sprite(0, 0,
13/333*389*SC_scale,
13/333*389*SC_scale*(G.ASSET_ATLAS[balala].py/G.ASSET_ATLAS[balala].px),
G.ASSET_ATLAS[balala], {x=0.0,y=0})
so you cant exactly do that
that dont make much sense, like:
omeganun = naneinf + 1
i may be blind
if its going in a mod it can go here
ah true
omeganum is massive
which number of exponential is?
i’m not really asking how big it is tbf
oh makes sense now
what should he do
i dont want to look like im spamming but idk what other way i could use to get an answer
the noker
so it's a matrix?
where did it go 😭
its a table
unlock the voucher first then you can know
idk how to translate matriz
why do you need a list?
walltext xd
for what? what is the goal?
i read that down worry @wind steppe
thank you 🙏
basically, create a copy of a random card but without enhancements and/or seals
joker poker
anytime
is that the aerial tramway emoji
it is an aerial tram
im just gonna go take my test and bump my earlier issue later
does that replace a suit or is it a new one
no its a simple reskin i made rq
wait i cannot read
yes it replaces a suit
is this good wording or should i change it?
-4 mult when a blind is beaten. After reaching -40 mult, instead give +100 mult
imo is better for that effect.
alr
You definitely need to specify when the mult is subtracted, hence why I added "when a blind is beaten"
Then you also need the current mult counter at the bottom
how do i make that count
bumping this cause I just got back
you have 6/2 slots used
it dosent feel like it
how come my injection (left) isnt working on this script (right)? none of the print() functions go off when i try to trigger it by using a planet card
i think it's functions/common_events
bump
thats right ty
https://www.youtube.com/watch?v=_CdaHAP1sCw&t=237s learn from this
Welcome to the Balatro Modding 101 tutorial.
In this beginner-friendly guide, I'll walk you through the steps to get started with modding in Balatro. Whether you're looking to install mods created by others or dive into making your very first mod, I've got you covered!
Links!:
https://github.com/Steamodded/smods - Steamodded
https://github.com...
That timestamp talks about the text part and such.
does anyone know why this line crashes? self.ability.extra.mult = self.ability.extra.mult_mod * math.floor(math.abs(to_big(G.GAME.dollars) + (to_big(G.GAME.dollar_buffer) or to_big(0))) / self.ability.extra.dollars)
figured it out lol and context.cardarea == G.play was messing it up
what's the maximum width of a joker description in vanilla
try spamming a bunch of "E" in the description
smods imposes no limit though
so probably infinite
Is there anyone who could help me with my problem?
whats the problem
I'm trying to use (to_big(G.GAME.dollars) + (to_big(G.GAME.dollar_buffer) or to_big(0))), in a equation, but the game crashes with this error every time: functions/commonevents.lua:1091: attempt to compare number with table
ion feel like watching that
uhhhhhh idk
🫤
is there a line of code that destroys a playing card?
during scoring or outside of scoring?
i was attempting to make a joker that would destroy all cards in hand at the end of the round
SMODS.destroy_cards(card) probably works
okay thanks ill try that
you need to be using the latest smods release tho
okay cool ill check that
what should the joker do
for every time a message with the letter e in it shows up, +1 chip
how would i add to this joker the ability that when winning a boss blind it destroys 2 cards in your deck?
jenius
joker code so big i gotta make it a .txt
also if possible how would i optimize that code to be less massive

yes all the areas you're checking always exist so you dont need to nil check
also returning just { mult = bonus } is shorter
in calculate
in loc_vars you only need to check for one of them not all
if your current score is at e1 or above, have a 50/50 chance to destroy this joker and give a legendary joker, or to destroy this joker and gain 333$ (E but backwards)
i like the chips one
Anyone have an idea on how I might be able to randomize all scored cards into random suits and ranks?
every ace, queen, ten, nine, eight, seven, five, three of hearts or spades gives a +4 or whatever mult
one has an e
but theres no one cards
Oh
ace has an e regardless
hmmm try checking the spectral cards file in the source code for sigil for the random suit part
I got too caught up counting 
ill do this
and the Ouiji spectral card has the random rank function
could someone experienced with the G.GAME.dollars function please help me?
Thanks
yup
bump
it's not a function but it's not a problem with G.GAME.dollars, it's a problem with Talisman
i would ask in the talisman thread or the cryptid server honestly
could you provide a link to the talisman thread, pretty-please
idk if it's still active honestly
https://discord.com/channels/1116389027176787968/1241172556849876993
rate the card
E
🇪
balettero
hi sooji
yo
i made 2 new jokers that dont work yet cuz im too lazy to make them work
Noker and E
meanwhile i nerfed all my jokers
Is there some built-in way to do xchips?
why
im probably being stupid but how do i make a joker trigger every time a card with a specific suit is scored?
broken is fuyn
Thanks!
i keep seeing this word, what is it?
what word
talisman
oh
increases score requirements and screws up all of your mods
deleted my message because i was completely wrong
i think its either a coding thing like vsc or its a injector like lovely
sorry for my dumbass braindead response
no
it's fine it's not documented
this is talisman
ah
talisman is a regular mod
also (im still probably being blind) but is there a way to quickly restart the game (not a run, the whole game for whenever i'm testing)?
hold m or alt+f5
alt f5
alright ty
here are the nerfed values of my current jokers
bumping this
why doesnt the mult gain trigger?
(lmk if more context is needed)
where's the wiki page for decks :[ i cant find it
it's SMODS.Back
okay thanks you!!!
i need to hire someone to code for me cuz im too lazy but im broke so
if context.individual and context.cardarea == G.play and not context.blueprint then
if context.other_card:is_suit('Hearts', true) or context.other_card:is_suit('Diamonds', true) then
card.ability.extra.final_mult = card.ability.extra.final_mult + card.ability.extra.mult_count
return {
message = 'Upgraded!',
colour = G.C.MULT,
card = card
}
elseif ( context.other_card:is_suit('Spades', true) or context.other_card:is_suit('Clubs', true) ) and (card.ability.extra.final_mult > 1) then
card.ability.extra.final_mult = card.ability.extra.final_mult - card.ability.extra.mult_count
return {
message = 'Downgraded!',
colour = G.C.MULT,
card = card
}
end
end```
how do I reference the joker itself in the return block?
this results in the messages appearing over the card being scored
(card = self makes it crash)

not sure where to ask for help for this, but tl;dr i'm making a music mod, right?
most of it is working. however, it's meant to be used in conjunction with another mod, which adds its own custom track
well if you need help with developing a mod this just might be the right channel /lh
anyone know whats up with get_current_pool?
specifically the UNAVAILABLE and ", Joker4"
and that one custom track clashes with the rest of the music mod, so i opted to replace that mod's track from within my own mod
however, i have not been successful in doing so. here's a screenshot of what remains from my latest attempt
i'm aware some mods can check for the existence of other mods to basically work in tandem
how do i replace another mod's assets conditionally?
How do I check if another mod is present and as a result make something specific happen because of it?
the way the pool works is that it sets keys to unavailable when they're not in the pool, it's a way to not mess up randomness
the Joker4 is the string that appends to the seed depending on what called it iirc
my achievements aren't working, and aren't unlocking at all
here's my code for one of them:
-# comments added to show... stuff?
SMODS.Achievement{
key="touch_grass",
atlas="achieve",
hidden_text = true,
pos={x=1,y=0},
hidden_pos={x=0,y=0},
unlock_condition = function(self,args)
-- check for achievement unlocking (not in here cause it doesn't work either way)
return true -- just here to test if it works
end
}
if next(SMODS.find_mod("modid")) then
What if I'm not using smods 😬
(rawdogging it with lovely)
idk
~~or use steamodded
~~
(and check that there's not a .lovelyignore)
left code is from my mod, right side is from the other mod, the game launches no issues, it just simply continues to use the original mod's source music
which one loads first
pokermon's prefix is poke
check your path, it's just ".png"
Priority on the other is set to 0, mine is set to 2, so if I got this correct, Pokermon should be loading first
yep, that fixed it... thanks
then yeah fix the prefix
how is it appended, gcp seems to return the table itself but the joker[number] part isn't part of that table(? i think)
look at get_next_tag_key in the code
i see, thank you
okay this is getting even more weird
i set it up to check the args type and it got to the if statement but didn't unlock it???
if args.type == "touch_grass" then
print("wait what we're supposed to unlock it")
return true
end
and it printed, but it doesn't show as unlocked in the game...
Yeah you know what fair enough, why be stubborn when I can just do that 😅
was check_for_unlock called
yes
Is it called "smods" for the purposes of doing
local SMODS = require("smods")
i have no idea
where
SMODS.Joker{
key="grass_joker",
rarity=1,
cost=3,
atlas="grass",
pos={x=0,y=0},
loc_vars = function(self,info_queue,card) -- it's in the loc_vars to check when it's hovered
SparkLatro.touched_grass = true
check_for_unlock({type="touch_grass"})
end,
}
im unsure as to why this is happening... but it seems to crash when i do this,
however with context.repition it doesnt crash, and instead tries to retrigger the card
do i have to add a loc_vars thing?
is this balanced for a seven dollar uncommon
-# reply ping if needed (sorry if not)
because other_card doesn't exist in every context, do a stricter context check
so if i add context.repetition, and do repetitions = card.ability.extra.Xmult it should work right?
i was researching 😭
because when i try that it just retriggers the card
all good. some people may need reply pings and some may not, so mb
yeah thats what context.repetition does
of course it does, you're returning repetitions lol
use context.individual
and context.card_area == G.play
that's already there
context.debuff_card
return { debuff = true }
this is new territory for me
yo ok so ive tried to patch the smods Mods box thing by editing like 3 functions but clicking on the search bar moves all the mods. is there anything ive missed and im being really dumb or is this some other kinda error?
I wanted to add a search bar
how does the touched_grass bit work
did i miss something? or did i mess up on the second loop?
remove context.individual in the second condition
when the loc_vars are displayed (aka on hover) (also there don't need to be any vars), it runs that function (obviously) so i just put the check_for_unlock in it
also im not sure if debuff_card uses other_card, let me check
!!
it doesn't
i wasnt sure if context.debuff_card has .other_card or not...
replace other_card for debuff_card too
the loc_txt is formatted wrong
how do i add a custom secondary textbox to a joker, like the ones that explain what modifiers do?
hi guys can someone tell me how to make consumable
is there a way to use a custom joker message from the localization file?
i have a problem with the 'key' and 'atlas'
that doesnt seem to have done anything... am i missing something in the config bit?
thx king
localize("key")
if so what would i add to that to make it work
can i see the code
where should i put the key of message in the localization file?
CFU might not be able to run in locvars but ill look at how it works to make sure
this does it when blind is selected btw
oh
dictionary
if you want it in another timing use SMODS.debuff_card
yeah that seems to have been the case,,, thanks
well it is printing when i check the unlock
its not super important, as long as they are debuffed works for me
someone came here yesterday asking for help with making a deck and they used the nebula deck example on this mod, why all the apply stuff? can't you just put the vouchers in config, or am I misunderstanding the purpose of that mod
oh well nvm then
add ur mod prefix to the beginning of ur unlock args maybe
how would i format it :[
idk i didnt do those :3
i will check
i usually do both the config and the function versions
oh i see
yeah it looks like here you only have the recreation of the config functionality
which is confusing people
yeah i will change it then
loc_txt = {
name = "blah",
text = {
"line 1",
"line 2"
}
}
that didn't work
it also sent it with the prefix attached only
i have several question like what is
primary_colour = G.C.SET.Tarot,
secondary_colour = G.C.SECONDARY_SET.Tarot,
collection_rows = { 5, 6 },
that's for defining a new type of consumable
ignore that yeah
i will write a comment
i forgor the main one that is
default = 'c_vremade_fool',
you know how when you run out of jokers to get in balatro the game starts to spawn just the +4 mult one
that's what default does
are you making a new type of consumable or are you making a tarot
oh then you use that yeah
want to make my own one with specific things (like code card in cryptid)
here are the docs for it https://github.com/Steamodded/smods/wiki/SMODS.ObjectType
i wanted to use the derek mod to do this but he kept using the joker atlas
you truly are THE helper
i added the prefix, and checked for if it was sending with the prefix too
if args.type=="touch_grass" then -- check if it's unlocking w/o the prefix
print("Came without the prefix")
return true
end
if args.type == "touch_grass" or args.type == "SPL_touch_grass" then
print("unlocked with the prefix") -- this is where it's going to
return true
end
one last thing, what is the "badge" ?
badge is the text that appears under a card when you hover over it
like the rarity badge
oh okay, that where people write their name to say that this is their joker right ?
no no
yk how the rarity of a joker is just a little bubble of text under the descrption that says "Common" or blah blah
that part is in the metadate file
Those are called badges
card:set_edition('e_foil') where card is the playing card ofc
how do i make a deck add a joker
i tried this and it didnt work :[
I was making a joker mod but it dosen't appear
Did I mess something or what? Cuz i need help
you have to put it inside an event
what are the 'nil,nil,nil' thing ? like why do we need to do it ?
like what
the first thing goes in a separate file in your mod folder
with the .json extension
the main.lua?
From SMODS.Joker and below goes to your main.lua
the stuff above goes to a json file in your mod folder
the id stuff goes in a .json file and the smods.joker and atlas in the lua file?
probably parameters that come whenever defining create_card()
there are some parameters you don't need for certain card creations
G.E_MANAGER:add_event(Event{
func = function()
-- add your joker here
return true
end
})
To check if i understood
yes
got it
I'll ask something else if something goes up kay? It's my first joker just cuz i thought of doing it
soupsies
wouldn't the consummables fcked up if i use the color of the tarot card of smth ?
Are you trying to create a specific joker?
whose key is absentia?
if so you want to type j_modprefix_absentia
in what cases you use return? like when upgrading or retrigger?
oh okay!!
you use return when you want your joker to provide feedback to the user
prefix fixed, this finally got it working! thank you! I need to be careful regarding mod IDs and prefixes
in the most general terms possible

like how, an example pls
what do you want to do exactly?
what did this return as
any time you want your joker to show a message (like Again! or Upgrade!)
how would i make the joker destroy itself?
learn, im not doing anything really, just want to met myself in this
the args.type was "SPL_touch_grass" so it was returning with the prefix
i have this for food jokers
para_consumefood = function(card)
G.E_MANAGER:add_event(Event({
func = function()
play_sound('tarot1')
card.T.r = -0.2
card:juice_up(0.3, 0.4)
card.states.drag.is = true
card.children.center.pinch.x = true
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.3,
blockable = false,
func = function()
card:remove()
return true
end
}))
return true
end
}))
end
card:start_dissolve()
oh okokok i get it, that can be used to upgrade another things or just in self?
inside a joker's calculate function you can do smt like
if context.joker_main then
return { mult = 4 }
end
as the simplest example, which will just be a +4 mult joker
worked!!! many thankses :]
return on its own can only score or show messages
if you want to do anything else you'll put it before return in calculate
so that will adding score?
No, it can also run functions and remove cards.
and nothing unlocked?
context.before or what before?
Can you show me the achievement setup again
oh my bad xd
mhm
uh i am reading that....
why does my joker not appear? there shouldn't be any issues
SMODS.Joker{ -- Malanga Fritter implementation
key = 'malangafritter',
config = { extra = {
hands = 5
}},
pools = { ["Food"] = true },
rarity = 3,
cost = 7,
blueprint_compat = false,
eternal_compat = false,
perishable_compat = false,
loc_vars = function(self,info_queue,card)
return {vars = {card.ability.extra.chips, card.ability.extra.chip_loss}}
end,
calculate = function(self, card, context)
if context.before and context.cardarea == G.play and not context.blueprint then
if context.full_hand[1]:get_edition() == "e_base" then
context.full_hand[1]:set_edition('e_negative')
card.ability.extra.hands = card.ability.extra.hands - 1
return {
message = localize('para_k_transformed'),
colour = G.C.ATTENTION
}
end
elseif context.after and card.ability.extra.hands <= 0 and not context.blueprint then
para_consumefood(card)
return {
message = localize('k_eaten_ex'),
colour = G.C.ATTENTION
}
end
end
}
its not wrong its usually just incomplete or vague
oh nvm im just blind
so, if i want a joker to upgrade himself, the code that does that should be in return?
usually not
just change card.ability.extra.whatever before the return
what will be the common sense?
You should not be putting code in a return unless it is in a func
what do you mean by that?
