#💻・modding-dev
1 messages · Page 214 of 1
Anyone?
$4
that'll work
how would you reccomend i remove every card in my deck and add a single ace of spades
Uhh anyone?
As a joker or as a tarot
Or as a deck
a deck
Why
the fuck you deck
How would that work? That wouldnt even get you through the first small blihnd
every time I've tried to use context.after and context.cardarea == G.play like the docs say, it never works (the print function is there so I can check to see what's not triggering. The print function doesn't appear)
that combination only occurs if you're a playing card modifier, like an enhancement
context.after doesn't really need an area check at all
yeah I tried just context.after and still nothing
what type of object is this and what is your steamodded version?
Joker and, this one
stuck again, its still counting for every card discarded instead of only aces
normally it's numbers 1-4 for common-legendary, but iirc with smods the strings "Common", "Uncommon" etc. also work
for custom rarities it needs to mod prefix
for some reason, this is triggering like 5 or 6 times at the end of the round, anyone know why it might be doing that?
-- calculate is where the scoring and effects of the joker are handled.
calculate = function(self, card, context)
-- context.after takes place after the hand is scored.
-- context.blueprint applies if the joker is a blueprint copy.
if context.end_of_round and not context.blueprint then
-- adds the gain variable to the base mult number.
card.ability.extra.money = card.ability.extra.money + card.ability.extra.gain
return {
-- another message, just prints the text.
message = "Upgrade!",
colour = G.C.CASH,
-- needed, can be changed to context.other_card to apply to another card.
card = card
}
end
end,
yeah, context.end_of_round is not a unique identifier for a context
what's that mean? (<---- incompetent)
this is probably the for loop isnt it
there are different context that trigger at end of round
if context.end_of_round and context.main_eval and not context.blueprint this triggers exactly once, for example
oooh
what would I want to use for a check after a hand is scored and totaled then?
what would if put if I want it to trigger at the end before the cash out?
AARRRRGGHH i hate this so much
that's what the code i sent does
why are you iterating the full hand
okay cool I'll just make the card do the totalling itself lmao
context.discard is already called once for each discarded card
you just need to operate on context.other_card
i want to die then
there's also context.final_scoring_step which happens later but can still affect scoring
i guess you could add a context after score is totaled
if this doesnt do it, i dont know what will
thanks
replace v with context.other_card
yeah i was gonna
yeah that didn't exactly work
rarity doesn't go in config
that's not what I said, and it's not valid syntax either
yeah i misunderstood then
you want your rarity out here
ok thanks
now to just make a playing card
and SMODS.Rarity = Rare is trying to set it to a variable called Rare, SMODS.Rarity = "Rare" is presumably what would work (I wouldn't know, I just use the number system)
yeah i'll go with the numbers
SMODS.Rarity is the rarity class, this is not what you're looking for when setting a rarity
you either do rarity = 3 or rarity = "Rare"
i just installed the latest version of smods and tested my mod -- i think mult cards are borked?
don't believe it's related to my mod, mult cards just don't add mult
i'll disable everything & try again
okay and now this doesn't show the print
all mods disabled, mult cards still don't add mult unfortunately
i'm guessing it's an smods bug
Yes, known smods bug
ok sick
get the dev version instead of release for a fix
idk why i didn't just get the dev version to begin with that's my bad 
I think they're waiting for 2 PRs for the next release? not sure
any like actual guide on how to start coding ?
https://github.com/Steamodded/smods/wiki/Your-First-Mod like ts is useless 😭
Have you taken a look at example mods?
welp nope
it's not a guide like i dont even know what to download to code in.
like the notepad wont be good for coding
💔
vs code works fine for me (windows)
okay, that's not exactly the fault of the steamodded docs
that's kinda their fault they didnt mention everything 💔
Bro 
i mean they are kinda right i can code in the notepad
easiest block of my life
@novel violet omg yme
stupid solutions work 
i mean they are making a guide for newbies who might not even know what programming is
omg aikoyori :3
aikoyori is kinda tryharding at his mod
You should know what programming is if you’re trying to make a mod. If you don’t, you learn
who are you to say that i am tryharding
SMODS will not teach you Lua
i do, but that's not the problem
i mean, it sure can teach you lua if you're me
they have to add a video or smth that will explain coding for childs
Same here but like
but you have to actually try instead of complaining that it won't do all the work for you
like how it works and smth
welp im trying to find if therse anything better than 'look and learn'
That’s because I dug into figuring out the functionality I wanted
it's entirely bait don't pay it any mind
DO YOU HAVE ANY GOALS FOR THIS
you're doing great aikoyori 
meh i just see ur jokesr everyday in dev and chat
ok what
Ok yeah I’m sick of this
we're on the same page 
Yup
so called "balanced multiplayer mod" when i give myself 10 blueprints with debugplus (the enemy would never see it coming)
Anyways how’s your mod going Yme? I haven’t seen much from ya lately lol
I haven't been posting very much because I haven't done much work hahaha
Oop-
school has been busy and motivation has been hard to find!
'who said i'm gonna play fair' ahh
but i'm working on a new joker right now
Yoooo
😭
you have like 13k messages here within like 2 months and a half
They’re passionate about showing off their work and I respect that highkey
good point
i think aiko likes balatro a little bit
i mean
ok i think i am happy with two of these
wtf lmao
new joker finished, now i just need to add texture
Huuuuuge
they look kinda peak
What does it do?
bro didnt even change the "JokerTemplate.png" 💔
u can't see shit
🔥
+$1 at end of round for every voucher owned; additionally, 1 in (vouchers owned * 2) chance to add an extra voucher to the shop
if no vouchers, 1 in 1 chance
is this an edition i see
Ooooooooo I actually really like that. I haven’t thought of playing around voucher count
flashbang edition
1 in (vouchers owner * 2) is crazy
The only voucher-related joker I have is Dark Room which is basically the invisible joker of vouchers lol
guaranteed 2 vouchers in shop when you have no vouchers would be huge to get a run online
fo sho
I've got a baseball card type joker, but it's triggering after each joker triggers their effects, instead of all in a row at the end. What context do I add for that? final_scoring_step?
i mean baseball card triggers its effect after each joker's effects too
It does??
Yep
but if you don't want that then i guess you can do final_scoring_step?
Oh, well its working fine then
Lmfao
yeah if you have spare trousers and a different uncommon before it the flat mult is applied after one x1.5 hit
so order actually matters
at least i can tell what joker it is :L
Golden shader?
😭
would love to know how doing shaders for editions works but shaders in general are fuckin scary man
oh damn thats sick
What happens if I consume one
Vagabond looks like 
poor bro
i just call the edition noire
The humble unaffected Hologram
like bro wtf does any of this mean 😭
copied 90% from thunk
Yeah shader work scares me
professional jokers
so like what i can gather from that one i posted is it does chromatic aberration
I'm terrified!
poor ai
😭
show that photograph joker to someone in 2009 and they'd make an entire urban legend out of it
welp i am
smile.jpg
Interesting
is there a way to make it so when i play a specific hand, a card permanantly gets more mult
I read a bit about metallic shaders but it seemed too complicated for what I wanted @_@
anyway time to once again throw hands at this mfer jimbo switch wish me luck 😭
Like Balatro doesn't have a 3D world to reflect off the Joker
let's try cryptid edition deck
evil jimbo
this code has been the root of all my woes for the past month or so
GOD
christ
or even is there a way for a joker to tell what cards have been played
no, i think the x_mult config value for editions is just broken in general
why tf does copy_joker return nil 😭 am i doing somethng wrong
😭

the last time I fucked up and gave my joker negative xmult the game happily gave me negative score
worse yet I can't just simply fix that, it would cause polychrome to give xmult twice
bro 😭
huh?
double 
Why would they give it twice?
because smods gives polychrome a calculate function
patch polychrome edition and change its config 
thats why you make it give you negative TWICE to give you a net positive 😎
real
unrelated but i am completely stumped with this mf i think im straight up gonna send the whole code and beg for help
i recommend just using a calculate function anyway, the timing would for xmult without jankass code that doesn't work with the fundamentals of better calc
yeah I was wondering the other day if we just remove the functionality of the config values auto applying
would probably make things easier to work with
unless someone wants to patch the vanilla editions for... whatever reason
I think I'm gonna send a new smods release rn, I've seen enough reports about mult cards
pls
gg
still need to come up with a release workflow, but this works for now
meanwhile
i;ve noticed that whenever a base game card adds mult it says "+4 mult" or whatever
whereas mine only say "+4"
how do i change this
show your code
change it all to just xmult = card.ability.extra.Xmult
i think i need a break
by all of it do you mean everything after "return{"?
yes
ok thanks
or be a chad like me and do it the old fashioned way
(listen to eremel not me)
balatro analogue horror
ok
So uhh. This happens. No crash.
Please note that i added frames = 21 in the atlas.
what kind of boss is that 😭
guys, I'm thinking about creating a balatro mod, I have no idea where to start, but on a scale of 1 to 10 how difficult is it to learn how to make a mod? How long can it take to learn?
SMODS.PokerHand {
key = 'tri_oak_pair',
mult = 7,
chips = 80,
l_mult = 3,
l_chips = 50,
visible = false,
example = {
{ 'S_9', true }, -- 9 of Spades, scores
{ 'H_9', true }, -- 9 of Hearts, scores
{ 'D_9', true }, -- 9 of Diamonds, scores
{ 'C_5', true }, -- 5 of Clubs, scores
{ 'S_5', true }, -- 5 of Spades, scores
{ 'H_5', true } -- 5 of Hearts, scores
},
loc_txt = {
name = "Tri-Oak Pair",
description = {
"A hand consisting of two separate three of a kinds."
}
},
evaluate = function(parts, hand)
if #hand < 6 then
return {} -- Ensure at least 6 cards are present
end
-- count da cards
local rank_counts = {}
for _, card in ipairs(hand) do
local rank = card:get_id()
rank_counts[rank] = (rank_counts[rank] or 0) + 1
end
-- tell me every rank so i can see whats appearing
print("Rank counts:")
for rank, count in pairs(rank_counts) do
print(string.format("Rank: %s, Count: %d", rank, count))
end
local three_of_a_kinds = {}
-- look for the 3oak pair
local first_three_of_a_kind = {}
local second_three_of_a_kind = {}
for rank, count in pairs(rank_counts) do
if count == 3 then
print(string.format("Found a three-of-a-kind for rank %s", rank))
-- Collect all cards of this rank (three-of-a-kind)
local temp_cards = {}
for _, card in ipairs(hand) do
if card:get_id() == rank then
table.insert(temp_cards, card)
end
end
if #first_three_of_a_kind == 0 then
first_three_of_a_kind = temp_cards
elseif #second_three_of_a_kind == 0 then
second_three_of_a_kind = temp_cards
end
end
end
-- Log the collected three-of-a-kinds
print("First three-of-a-kind:")
for _, card in ipairs(first_three_of_a_kind) do
print(string.format("Card: %s", card:get_id()))
end
print("Second three-of-a-kind:")
for _, card in ipairs(second_three_of_a_kind) do
print(string.format("Card: %s", card:get_id()))
end
-- see if we have both our 3oaks
if #first_three_of_a_kind == 3 and #second_three_of_a_kind == 3 then
print("Found two three-of-a-kinds, returning hand.")
return {first_three_of_a_kind, second_three_of_a_kind}
else
print("Did not find two three-of-a-kinds.")
end
return {}
end
}
ive made a few poker hands now, but for some odd reason its only scoring 3 of the cards while still returning the correct hand, am i just being stupid or am i missing something?
well ig thats one way to make chicot stronger
The torturing one.
how familiar are you with lua/coding in general
its not that bad if youre already capable of that
what is that supposed to mean and where even is that
maan
wait is calculate_joker(context) how you do copy effects or is there a new fancy way i aint heard of
Its on the collection.
And there is no sprite.
I know basic programming logic, but I've never used Lua
huh, might be that the undiscovered sprite logic is wrong? looks like it's using your atlas for the undiscovered blind when it shouldn't
https://github.com/Steamodded/smods/wiki
consult the SMODS wiki it will answer most things you'll ask
obligatory cat image
Any idea how to fix it?
i can try to investigate
And is my code wrong, or like thats often why its dissapearing
for now can you check if it displays normally when it's discovered?
I'll take a look thx
what do you mean by copy effects?
It is discovered. The blind is discovered but no sprite...
as in blueprint/brainstorm type effects
oh i just realized
your px and py are 0
would
return true
end,```
in a legendary joker allow that joker to spawn in the shop
follow along the Your First Mod section with the linked lua tutorials and example mods to look at
do you guys know i can permenantly add mult to a Joker after a specific hand is played?
Shouldnt it be that? First column and row
like runner?
yeah
local ret = SMODS.blueprint_effect(card, blueprint_card, context)
if ret then SMODS.calculate_effect(ret, card) end
no, the px and py in the atlas
that's the size of one sprite
what the hell is this sorcery
not the sprite position
is this documented or
thanks
are you gonna keep using that gif every time eremel
I've had a busy few days
the hell does blueprint_effect do now
it's a good gif!
no but fr this is huge
eremel this would be a banger pfp
I am stupid.
for blind chips it's normally 34x34
of course if you set the size to 0px, there will be no sprite
Yeah, I thought it was position...
I think that is my blind size.
classic moment of mixing concepts around (happens
That cuz I read the docs i mixed it up...
True
YOU ARE MY FUCKING HERO
THANK YOU
blessed be thou
wait
i tried to sell jimbo while i was bping it and the game died
okay so selling a joker when loading a saved run crashes the game if that joker is being targetted by my blueprint joker
uhm
interesting
wait i think i fixed it
very nice to see that variable text highlight color has been added, huge respect to the smods devs for the constant support and updates
New Joker!
Double Negative
After you defeat 2 Blinds, sell this Joker to create 2 Negative Tags
Do legendary jokers need their weight adjusted when you add them to the shop my wrist is getting tired from all these rerolls ;;
no idea, never tried to add a legendary to the shop
I see
Doesn't adding them to the pool just allow them to be spawned with the soul card? I've never had them appear in the shop
I'm wondering where to split lines then
yeah idk anymore
i tried to write similar code but it keeps crashing every time
seems to be different errors as well but didn't screenshot them all
kinda weird timing with scored card effects... no clue what's going on here
Shout outs to the one mention of anything close to what I'm doing being from like a year ago with no followups
THE experince ...
nice art on the two Jokers
hihi! suffering a little! trying to change the sprite of my Joker once a condition is met, but my current method adds the 2 of Hearts sprite over top, instead of doing what i want it to do
man just tried to make a single joker and the game crashes 💔
code:
SMODS.Joker {
key = 'wires',
loc_txt = {
name = 'Wires',
text = {
"Solves when idk"
}
},
config = { extra = { } },
rarity = 2,
atlas = 'KTaNE',
cost = 7,
pos = { x = 1, y = 0 },
solved_pos = { x = 2, y = 0 },
solved = false,
loc_vars = function(self, info_queue, card)
return { vars = { } }
end,
blueprint_compat = true,
calculate = function(self, card, context)
if context.joker_main then
card:set_sprites(self, card.config.card)
end
end,
set_sprites = function(self, card, front)
if not self.discovered and not card.params.bypass_discovery_center then
return
end
if card and card.children and card.children.center and card.children.center.set_sprite_pos and card.ability and card.ability.extra and card.ability.extra.solved_pos and card.ability.extra.unsolved_pos then
if self.atlas then
card.children.center.atlas = G.ASSET_ATLAS[self.atlas]
end
if solved then
card.children.center:set_sprite_pos(self.solved_pos)
else
card.children.center:set_sprite_pos(self.pos)
end
end
end
}```
I'm going to STRANGLE my co developer for making a legendary joker work like fucking micheal
oh and the swap is really cool
please help, this has taken several hours of today 😭
rly proud how it turned out visually yea :3
See the tape in Bunco maybe
or whatever AlrexX is doing
just a random thought im not even sure in but shouldnt there be a comma
no
wait was there a context specifically to check for blueprint effects or am i trippin
like it runs, but this is what it does
wait whta
Trying to get something to activate when a card is debuffed, but alas it does not
yes
sweet, the [0/2] i think was fine tho
NEW SFX!!
what was it called
beepeebeepboopoboo
hey guys, do you have any tips on how I would reference multiple money values in the text of a joker?
I was trying to make it pay out $5 sometimes and 20 dollars other times, and was able to get it thus using multiplication, but am having trouble making it show up as the card text
if I put money items in the extra field it seems like it defaults to the latter item
funky
(bump! @spring lantern sorry to ping you but i saw that you did what i want my Joker to do, and so want to know if you can help 😭)
context.blueprint?
might have to tone this down a little bit
Erm what the flip
<@&1133519078540185692>
yeah what even IS this error, i copied over what i needed from the runner joker code to the best of my ability so it should be fine
oooh
pew pew
In your config, add another variable called "bigger_money" and set that to 20
Then, when you're referencing that in loc_text, use #2# instead of #1*4#
loc_vars = function(self, info_queue, card)
return { vars = {card.ability.extra.money, card.ability.extra.bigger_money }}
end,```
Thanks 🧑🚀 🦥
I'm curious, where/how do people find/make fitting custom sfx for balatro?
is there a specific reason why you're changing the atlas?
@light gazelle hope this helps!
SMODS.sound
for me all the sprites are in the same atlas and i just change pos/soul_pos
trying it out 🧐
I mean, from a sound design perspective
would I have to change the calc dollar function aswell?
i suspected the atlas was wrong, because it was placing a playing card face, but it's probably not that
I know how to implement custom sounds, I'm just curious how people approach finding sounds for their mod
send your calculate function?
ok
or the entire joker to be more general
maybe also try saving solved_pos in config.extra
if bonus > 0 and G.GAME.current_round.hands_left > 4 then return card.ability.extra.bigger_money end if bonus > 0 and G.GAME.current_round.hands_left > 1 then return card.ability.extra.money end
and also the solved variable
would I need local bonus = card.ability.extra.bigger_money aswell?
or is the fact that extra money and the money variable have the same name mostly just a coincidence
okie ^^
you can just fuck around in a DAW until you get the sound you want, that's how i usually do it at least
thanks! trying
not if you're referencing card.ability.extra directly
i know it's looking for a straight and not three 7s but i haven't figured that out yet
alkso sorry i misremembered i do use set_sprite_pos
ah kay
your config is wrong
all those variables belong in the extra tablr
thanks! somehow didn't think to use a daw here, which is odd because i've definitely used fl for sound design before
you accidentally put the other ones in a separate table
thanks
so do i move cost and rarity into "extra"?
it's fun! modding this game for me is like another creative outlet
yes
generally speaking if you want your jokers to hold variables you put it inside the extra table
ok thanks
ohh, yeah
is it just atlas and pos to leave out of it
you need a set_sprites function
then in t5here you check if its already solved and set the sprite if so
basically same check
set_sprites runs when the card loads in
oh okayokay!!
this is how i used it
thanks!!
uhh I mean variables as in like things the joker should keep track of in a gameplag sense
also keep in mind that when you see your card in the collection it has no ability table (or at least it kept giving me errors thats why i check for it in my code)
you need to fix your loc_txt (this is the text template for the tooltip) and loc_vars (this is a function that rrturns what variables should be inserted into the tooltip template)
How can I check if I'm selling a specific set (joker, tarot, planet, ect)?
thank you for all of the help! it looks to work as intended
thanks for the assistance
if card.ability.set = 'WhateverSetYouWant'
or was it card.config.center.set i forgor
i think its ability
great, now the whole thing's just fucking ruined itself
do you need an explanation on how the tooltip text works
well yeah uh you kinda fucked up the syntax
extra = {mult = 7, chips = 7, chip_gain = 7}
you make a table by wrapping things in brackets
a config should br a table that contains another table called extra
so you write
config = {
extra = { mult = 7, chips = 7, chip_gain = 7 }
}```
it might be less frustrating if you take a brief look at a lua tutorial first
the reason why there's a table called extra inside a table called config is 
i think base game uses it for mult chips and other hardcoded things
and extra is used sometimes as a single value
it's really confusing
like some jokers will just have extra = 5
and im like wut
🤔
trying to work on a localization mod (renaming a bunch of things) and texture pack mod at the same time- which of these might be causing this?
i keep tryin to figure it out but i am having zero luck
do you have a joker that uses an atlas that's not in your files?
i haven't added any new jokers which is why i'm confused
did you write all the code yourself or did you use some prewritten stuff?
yeah that didn't change anything
for the localization mod i used the Balatro University localization, replaced the language lua file with the en-us one, and modified it myself, and i am currently going through and editing the other files to match what i need from it
one of the files might have some sort of joker
mebe to replace a texture with a localized one?
yeah i am digging through trying to see whats going on
missing a comma
okay so i confirmed by removing one of the two mods, that it's the texture mod causing this
this giant Joker thing is in fact, also a table
don't mean to interrupt but are there any steamodded methods to handle how the backs of jokers with abnormal ratios, such as square jokers
i can do it with lovely injections but i'd have to patch like three separate places so i'd figured i'd ask if this has been done before
yes i checked the wiki and i couldn't find anything on it specifically
you need commas to separate table values
i swear it's always the smallest of things i get tripped up by
oh my god im stupid
i forgot to put the jokers.png back in the files
problem solved
..should it still be doing this?
also do yall know how to make a joker remove a certain amount of chips from a played hand when triggered? I dunno what I should be doing to get it working
again double check your loctxt and locvar thingies
current code snippet:
calculate = function(self, card, context)
-- context.joker_main takes place when the joker is meant to score.
if context.joker_main then
return {
-- adds the number contained in the mult variable to the score.
Xmult_mod = card.ability.extra.Xmult,
chips_mod = - card.ability.extra.chips,
-- message is the text that appears when the joker scores.
-- localize is used to make sure the text works across multiple languages.
message = localize {
type = 'variable',
key = 'a_xmult',
vars = {
card.ability.extra.Xmult,
}
}
}
end
end
#1# is a placeholder that means replace it with the first value of the vars table returned from loc_var
#2# replaces it with the second and so on
ah that's it
maybe you can use this? G.GAME.current_round.current_hand.chips
lemme try it
replaced the 1 for some reason early on, idk why
do I need to set up a hook/patch to get the use button to show up on a Joker when it's highlighted?
no luck, does the same thing
i know how to check for a three of a kind, but is there a way to make sure it's one made of 7's?
add context.other_card:get_id() == 7
having a big issue with my localization mod- i'm not having any errors showing up in the lovely log thing, the language shows up and is selectable, but selecting it does not actually change any of the names in-game
anyone got any clue what might be causing this?
so if i use this with "(context.poker_hands['ThreeOfAKind'])" it'll only activate if it's 3 sevens?
mm no you need to understand how contexts work
ok
the gist is whenever a Joker is asked to calculate something the game will provide a context table that specifies the relevant state
right now your Hiker clone is checking for context.before and (..)
if you refer to the wiki this is the state where jokers are looking at the hand before scoring anything
at this stage context.other_card does not exist (this exists for other contexts where jokers are evaluating each card individually as they are scored)
now judging from your text this doesn't even need to check for a three of a kind it just checks whether you played three 7s? (exactly? or should it trigger if i play a four of a kind of 7s? maybe a full house of 7s and 9s? what do you want)
i'm trying to find the page i got the "context.before and.." from for research
basically just "does the hand have three or more 7 cards in it"?
in the wiki contexts are listed under the Calculate Functions section
then really no need to explicitly check for a three of a kind
if you look under the relevant section it tells you that in this context the game will provide a full_hand contect
its a list of all the cards that have been played
so what you'd do is go through this list, and check whether it is a 7 (use the get_id function) and count if it contains at least three 7s
should i also change this from "context.before and.." to a different part of scoring?
for reference full_hand is all the cards that were played and scoring_hand is the cards thay are actually scored
why?
do you have a need to have it trigger in a different step that's not before scoring
no
then the before thing is fine
k
unfortunately im still not finding whats going on here, ugh
which section is this/
ctrl f for context.before
ok
do you guys have any tips on how I would go about coding a check on whether a played poker hand contains certain ranks?
I'm having a bit of difficulty finding a good example to learn from in the documentation
look at the example mods
theres a reimplementation of Hiker
I mean
uhh
Runner
what file do I have to create to write the mod metadata?
local sevens = 0
for _,v in ipairs(context.full_hand) -- or context.scoring_hand if you don't want to count unscored cards
if v:get_id() == 7 then sevens = sevens + 1 end
end
if sevens >= 3 then
-- effect
end
all inside an appropriate context check of course
.lua file I think
that's for the old file header method
i made an aux function for this purpose
new metadata lives in a .json file
oh sorry you said ranks I misread that lol
why would you need anything before the braces
this is a template for the entire contents of a metadata file
yeah mb misread what you said
refer to what the john dude just posted
you have this as a json file in your mod subfolder, and then a lua file next to it that you specify as the main file
cool cool
what if I wanted to check for multiple different ranks?
like at least 1 ace, at least 1 king, etc.
i hate the unexpected symbol errors
what is the "unexpected symbol"
most of the time it's literally nothing
it's a syntax error
get a lua extension for your code editor and it'll point them out as they happen
ok
you'd set up different variables for each rank you want and check all of them at the end
so is this sufficent code to perform the effect?
would I need anything else to activate it or will this now trigger whenever the player plays a hand containing that stuff?
I guess I can go check rq
what kind of things might be stopping my localization from working in-game? it loads up, is visible and good in the Mods tab, shows up and is selectable in the Language section, but when i select it, none of the changed names & words actually change, and there aren't even any errors of any kind
could this be coming from messed-up syntax, or is it smth else
assuming an appropriate context check and disregarding that you're setting the edition incorrectly, yes
so, a while back I added a joker that gives you random tags, but if it ever creates orbital tag, it tries to upgrade a nil poker hand (I assume) and crashes the game, because it never sets the hand correctly
how would I get this to set properly?
ah I didn't have a context check
(for the edition, edition = 'e_negative' gives you a negative card)
card.edition.negative is just true if the joker is negative and doesn't exist otherwise
Good Evening friendos, I got my deck skin sorta' working but it's only working for the spades
it took me embarassingly long but I just realized you're aurelius on github
my brain just saw your name as john smods
yeah i probably should've started with simpler jokers as i'm very new to this
this isn't enough code, right?
trying to have something save the played hand and then increment a counter each time that same hand is played, it is, not doing that though
well
well yeah I gloss overed that part
yes
the current state of multirank cards is
i saw you mention trying to adapt the current algorithm
(i was the guy in that github issue if you dont rember)
i do
multirank cards when a straight walks in:
yeah that's the main concern
multirank cards are blocked by the lgbt agenda
wouldnt it be a homophobic agenda because its blocked by straights?
other than that it'd still be a lot of code changes and break basically every mod that touches ranks at all, but the rest shouldn't be particularly hard to implement
im sure its not as simple as a flush check where its either the suit or a wild card
like youd have to be like “okay how does this multirank card fit into the straight”
even with the current state of arbitrary branching of ranks, we've had a faulty straights algorithm until recently
what's generally the cause of a hard crash? I'm crashing out without a log
problem is trying to support arbitrary multi ranks + branching paths in the rank structure is a pain in the ass to handle generally so that it also doesn't try to mine crypto with large hand+rank+straight+whatever sizes
obviously there's the naïve approach of evaluating every possible combination of rank representations, but it's extremely inefficient as soon as you have multiple multirank cards
it's apparent that that's not good enough for our cause
true
What mod is this???
when i was making my mod i had a card that makes straights and i legit just had to be like “okay we are just going to focus on making descending straights unless you literally cannot”
because otherwise trying to make the best straight out of every possible combo would be rough
abomination
thoughts on the art?
holy peak
oooh that looks really good!
oughhh this is agony
Fire
i feel like it could be common ngl
if you have a chip generator then it works but like
could be an uncommon perhaps
x3 mult is a whole The Trio
X3 is pretty standard for uncommons with a lighter drawback/condition
we get x3 mult on a few uncommons with relatively meet-able conditions
i imagine you can end up with 0 chips if you dont have any chip generation
tried juggling with the idea of mapping the hand into multiple (card ID, rank) vertices with appropriate edges for mapping successors (and grandchildren for shortcut) but that's really fucking dense of a graph and this devolves into some variant of the longest path problem which blows up pretty fast
-80 chips is a huge liability to work around
thought x2 was
card sharp and blackboard are both x3
Anyone have any thoughts about why my deck skin is only applying to spades?
is blackboard uncommon?
still not entirely sure what to do with this, even after attempting to look into the game code
maybe -50 chips is more reasonable
is blackboard black
no it's green
oh

is there documentation anywhere for an example of a joker that makes another joker when a hand is played, but before it scores?
true, but it's pretty easy to have 50 chips in a hand, 80 chips without planets could take a decent chunk out of most hands
my main concern is ending up with 0 chips therefore 0 score
I wonder what happens if it makes your chips negative actually
need to test that now
context.before is triggered before scoring
take the exact balance aside, I'm not sure it fits the premise of a rare of being situationally very powerful
yeah it seems like more of an uncommon maybe?
about what I was expecting yea
most builds don't rely on building big chips
as for creating a Joker, try looking into the Utility Functions(?) section of the wiki and there's documentation for a function that creates cards
ah I think my issue is that I need to learn more about coding in lua period lol
well yeah thats a blocker if you want to write a mod in lua
unless you wanna grow your wee you're not gonna be making too many chips, so -50 chips is already a pretty big debuff unless you're like late game
i think it synergizes very well with plasma deck 
i've mostly been modifying the example smods jokers so far
-# sorry to keep interrupting but any of y'all that might know how to help with localization mods, please dm me because i don't wanna keep butting into pre-existing conversations
also yippie joker is a bit op
yeah sorry not familiar with editing things already in the game
take your average level 1 flush, about 75 chips. even if you have flat mult jokers you still lose a huge chunk of your score with -50, and with -80 you straight up score nothing
I really hope that it plays the Yippee sound whenever it activates
when o i i a e u cat joker
truee
can't
what should it do?
My joker was similar only it started with 0x and added +x0.5 when you discarded your most played hand.
When xMult is triggered, 1 in 3 chance to retrigger it
I love the idea of starting with x0 but I found that adding x0.5 was too strong, so I had to set it to start at x0.7 and increment by x0.15
I just wanted to mod Balatro and multiranks cards are mindblocking me with some bullshit competitive programming problem
gonna forward this to my random stuff server so I don't forget
I might rewrite it up so that it stays at x0 until 2 are discarded then increments at x0.15
dropped a pull request yesterday, just waiting for approval 👍
Anyone know how adding hand size works? I'm trying to make a seal that gives +1 hand size but since a lot of the documentation is regarding triggers during calculation and such I'm struggling to find how to do sort of passive effects like this
that would be G.hand:change_size(1) when you draw it and G.hand:change_size(-1) when it leaves your hand
i think
Ohh hmm okay
how do i make a slider option for my config gui? like a volume slider but with different mins and maxes
What value on stone cards represents their base rank of none/zero? their base.nominal value is still whatever the underlying card is for the purposes of sorting, and the "id" of stone cards seems to be a random sub-zero value which I assume has to do with the node IDs
Basically, I'm making Fibonacci hands, and since 0 is part of the fibonacci sequence, I want stone cards to count as 0 for those purposes, but for the sake of compatibility with any other mods that might have an enhancement that functionally has no rank/no base chips, I'm looking for a more universal solution
Is has_no_rank something you're looking for
src/utils.lua is a treasure trove
fundamentally it's .no_rank on the center itself
still having this issue, still can't figure out what to do about this
maybe I'll just have to exclude orbital tags, which I don't want to do
How can i access the hand type from a planet card?
i think it's card.config.hand_type?
I'm not super familiar with it, but I assume it just pulled the orbital tag usually from the list of hands so can't you just set the orbital tag yourself to select a random one from the list?
add_tag has no arguments and doesn't return the tag, as far as I can tell
so I'm not sure how to actually do anything to the tag once it's added or set anything on it
That didn't work, i'm trying to access it like this G.GAME.hands[context.card.config.hand_type].level but its returning nil.
is this under context.using_consumeable?
if so, it's context.consumeable.ability.hand_type
No, its under context.card.ability.set == "Planet" and context.selling_card. But let me try that.
how do i disable a specific rarity showing up in the shop with a config option? I know Cryptid does it with ContentSets but i don't see any documentation on that in the wiki
I'd also like to do this for ConsumableSets and Stickers
ah, when selling it
fundamentally in vanilla, it's just hardcoded
then it'd be context.card.ability.hand_type, I believe
fibonacci
Arguing whether to call it "Flush Fibonacci" in full or "Flush Fib"
Flush Fib is fun
rizzonacci
fibbin' archie
the fib I bring to the nacci
if i could get modded balatro on my phone i think i would officially lose all of my productivity
Flushbonacci
For the JoJo flavor, I could call it Golden Spin lmao
The 60 are DONE, I am freeeeeeeeee from my prison!
https://github.com/AstrumNativus/AzzysJokers/releases/tag/v1.2
surely someone else has dealt with tags before, right? I can't figure out any kind of solution to this
every other tag in the game works perfectly fine, but orbital tags always break when created
Oh! I actually was given something to combat this! Lemme dig it out
add_tag(Tag(selectedTag, 'Small'))
just assign a Blind to it
oh thank you so much i've been trying to figure this out for so long
Oh yeah, I have now contributed to Steammodded
Well I mean like a sentence in the wiki
every bit counts haha
Is there a context for payout?
how do I target smods with lovely? Trying to add "your own CardAreas for playing card evaluation"
target = '=[SMODS _ "src/utils.lua"]'
Ah, fancy
that's odd, it's still doing it?
Thank you mr smods
same for targetting files from other mods btw, just replace _ with the mod ID and the path between double quotes
lovely patching cryptid
full calculate function
Can someone tell me what I am doing wrong trying to render the suit color in my cards description?
It shows up like mult now. When I try to render it like this, as Ancient joker does, it crashes saying unknown global variable 'var's
return {
vars = {
{ localize(card.ability.polarity[1], 'suits_singular'), colours = { G.C.SUITS[card.ability.polarity[1]] } },
{ localize(card.ability.polarity[2], 'suits_singular'), colours = { G.C.SUITS[card.ability.polarity[2]] } }
}
}
[3] = "{C:inactive}(Currently rewarding {V:1}#1#{} and {V:2}#2#{}"
that's not how a vars table is supposed to be formatted
but why does it have a background 🤔
Error colors?
correct is vars = {var1, var2, colours = { colvar1, colvar2 } }
Ohhhh, ok thank you
it's possible that I messed something up in adding variable background colors. do let me know if something still behaves weirdly with the correct format
however I'm off to sleep now, so not today
text coloring seems completely functional on castle, which also uses V:, so that's odd
maybe a bizarre side effect of the odd vars table formatting? I don't know why that would ever happen if you're not targeting X: though
so far I haven't come across any issues with variable bg colors
How can i make a joker not appear in collection or pool?
What context do I use for the card being added to hand?
Is there a way to make the message appear on the top side of the joker/card? Instead of the bottom?
how do i change the shop_rate of a ConsumableType with the config or stop the ConsumableType from showing up altogether?
Oh yeah, it works great. Thanks guys!!
@frosty dock
Spade and Club-
Spad and clurb
in da clurb, we all fam
Why did you have to point that out to me lol
i wonder if in consumabletype you can declare a function that all consumables of that type will use
🤔
I was poking around the UX code, wondering how I might proc a background color change when a consumable card is used...
how do you make your main lua file have another lua file run? I've been trying to find what do but I'm very lost
assert(SMODS.load_file('path/to/file.lua'))(), check out the utility docs
where are those?
wait just the ones in the wiki?
ah yea there's the one, somehow I haven't noticed that till now
How do i create a joker thats not in the pool?
Like your own?
yea
link of what
To make a joker
Search up how to make a modded joker on YouTube and you should find a video
That’s a bit outdated
There’s a method you can define and make it return false
Check the wiki
I have a joker made, but i removed it from the pool because i want a different joker to make it. and that being the only method of getting that joker.
I want to make a mod for a hard challenge.
1 Jokers and 1 Consumables slots.
2 rows of random suits.
Clearance Sale, Magic Trick and Reroll Surplus.
Double the probability for Negative edition and the ability to find consumable cards with this edition in the shop.
Idk how to make the last thing with consumable cards and the negative edition.
The rest is already done.
i figured this out
I shoulda playtested a bit more thoroughly before releasing, I've got a Joker destroying cards under certain conditions
Exceeeeeept it's not totally destroying them, they're just kind of being turned invisible and that's an issue
use context.destroying_card, that's pretty much the only context you can destroy playing cards in without causing ghost cards
When I am applying a custom edition to a card, which one of these do I use?
key = "ghostRare",
loc_txt = {
name = "Ghost Rare",
label = "ghostRare",
text = {
"{C:chips}+#1#{} Dollars",
"{C:red}+#2#{} Mult"
}
},
discovered = true,
unlocked = true,
I tried this in my consumable. I am not sure if I need to use my mod prefix key here
card:set_edition({ghostRare = true}, true)
it made the game crash
right uhhhhhhhhhh how do I integrate that
this is incredibly busted and I don't care
what does your joker do
destroy scored debuffed cards and gain xmult
do something like
-- increase xmult here
end```
any idea why my localization is doing this? the code in-localization is just
m_bonus={
name="Bonus Card",
text={
"{C:chips}+30{} extra chips"
},
},
how would i get the chip value of a playing card
oh, and uh, chips that hikers give to cards too
thank
alright sick that seems to work, how would I modify it to fix another Joker?
This one destroys a random card held in hand
context.destroying_card only works for G.play (for some reason) so change it to
context.destroy_card == card.ability.extra.goatCard
anyone know deck stuff? It seems like just barely different enough from jokers to be really annoying for me to figure out
heya, currently fiddling around trying to make a blind that disables card held-in-hand effects (i.e. steel cards, gold cards, Baron, reserved parking, etc)
what'd be the best way to do this?
um, idk if this'll be helpful but try looking at mime code?
also my config file keeps on setting values to things i deleted from it a long time ago
how do i reset a config file >_<
I think you need to delete the file inside your mods/config folder that stores your config changes (or something like that)
wasnt that helpful
are you trying to disable the cards as a whole or just the abilities that trigger when held in hand
just the abilities
it'd probably be tricky to do so since it's not just one context that triggers hand abilities
and i don't know if you can "disable" an entire cardarea either
wow uh i fucked up
it didn't help >_< i think it might be the config table itself for my mod that might be f'ed up idk
guessing you destroyed a card in the wrong context and then added a joker in the wrong cardarea
I called draw_card on a joker
consequences of iterating over playing cards and calling the variable card
it's proving to be so far :/
alright I might put the kibosh on this blind idea for now. but if anyone has any ideas of how I can do it, definitely @ me and let me know!
never made a blind but what if you debuff all cards and re enable them inside press_play?
so cards in hand are debuffed
or modify_hand idk which ones is more appropriate
Guys how do i clear a ref_table i keep on getting this the entire time
return {
["things_added"]=false,
["rarities"]={
["bc_rarity"]=5,
["things_rarity"]=0.1,
["thing_rarity"]=0.1,
["drained_rarity"]=5,
},
["bc_rarity"]=1,
["papermario_only"]=true,
["things_rarity"]=1,
["bc_added"]=false,
["drained_rarity"]=6,
}
to clarify, i don't want the ["rarities"] table in my return because i already have 3 keys that are just like that
i also don't know what's writing this into the config file
Trying to find where exactly in the code makes it so that pinned cards can't be moved
so, im making a card that eats the first played card in hand. to find the first played card im using "if context.other_card == context.scoring_hand[1]" but it doesnt work... anybody know why?
Isn't it context.destroying_card?
How can I lovely patch an if statement around a piece of code, without replacing it? (without pattern = "at")
Youre right! worked the first time thanks a bunch
okay i figured it out i legit just set that part of the table to nil and it removed it les go
I'm trying to make a joker that can't be put in the rightmost spot, it'll instantly move to the leftmost if you do. Ideas?
Man I literally copied one of the built in shaders, renamed it and trying to use it as a shader and balatro crashes with
engine/sprite.lua:121: Shader uniform 'lines_offset' does not exist.
A common error is to define but not use the variable.
I think what I did for locked sticker could be of use.
happy to help
Seems slightly different, but probably quite helpful - can you show the code? 🙂 @unkempt thicket
I used a lovely patch, I believe what you want to do is in the Card:move function.
can't think of an easier fix than that, ty!
now that i can get all the info out of the shop i need to get the info out of the packs. but i cant seem to find anywhere where each card is added to the booster. can someone guide me to a direction?
Anyone know of a mod successfully using their own shaders? I can’t think of any and I need a working example to make my own I think
struggling to make an enhancement retrigger itself anyone got a reference
cryptid echo cards did not help and I don't know any other enhancements that retrigger?
so like chad? or like sock hack but as an enhancement?
Marie, maybe the red seal would be a good way to start? Or maybe you can return a repetition value in the scoring method for the card enhancement and it just works?
also that
Oh yeah cryptid echo cards! They have it working
hi
i know one
my own
cryptid echo cards are weird
I understand the pseudorandom stuff for the 1 in 2 but
using the same return as the echo card just
doesn't retrigger my card
https://github.com/MathIsFun0/Cryptid/blob/ea43625e5bad5f5ad42713e91297cf948c8bd397/items/misc.lua#L1826 maybe this line?
i mean won't echo just an upgrade
SICK
that line doesn't really do anything on its own
that just sets values for the 1 in 2 and the number of retriggers which is also 2
yeah i know that
the value is used in the return
return {
message = localize("k_again_ex"),
repetitions = card.ability.retriggers,
card = card,
}
but a return like this in context.repetition just doesn't work on my card
I have seen you all over the place here Aikoyori! I will try your mod!
aikoyori mentioned lets go
shaders resume tomorrow
what you need is the calculate function
Marie does your card config have retriggers in its config value?
i know what the calculate function is luigi
i appreciate the sanity check but
yes
i made sure of it
I've been development for a few days
many many times
I would think Lua would throw if it didn’t
Null safe this language is not
what you're whole calculate function? i just want to check something, im not saying you did anything wrong i just want to check
I am feeling the same way
it's identical to the echo card minus the probabilities
i also made this disgusting boss blind
i'm gonna try something
Wtf is that evilness
it's not even that bad
I'm aiming to kill baron build
I hope you guys don’t give local think any ideas
this is only bad in 1 situation and that is when all your hands are so good that you literally cannot throw
hi yme :D
so something along the lines of this?
calculate = function(self, card, context)
if
context.repetition
then
return {
message = localize("k_again_ex"),
repetitions = card.ability.retriggers,
card = card,
}
end
end,```
i hate chicot moment
thats evil
It’s only context repetition when it is repeating already though
how did you steal my code what
that's exactly what it is
that's what I said
but it works for the echo card???
I don't get it
HI BEPIS
hi yme
enhancements are weird
oh, i miss understood the code, ill read more of what cryptid did while i wait for someone to help me out with my stuff
editions code are weird
brainstorm moment
Small Blind
that's a placeholder asset
i know xD i just thought it was silly
that does sound like an interesting boss blind
X2 build requirements every time a joker moves
does it do the amber acorn thing though
it doesn't flip them
it sorts them and prevents you from moving them
it's more like pinning from Cryptid
most notably the one where you start with a pinned ceremonial dagger
anyway
it is pinned to the left side so it must always eat
pinned playing card
I should make a boss blind that debuffs all regularly scoring cards
I mean...
why comb through center_pools if you already have the center
card.config.center and the center you get from combing through center pools are the same table
cuz i didnt realize that lmao
rrrrrrrrr
context.repetitions does not mean what I thought it means. I thought that was only when it was already being repeated. Just like context.destroying_cards, it is named for when that window is called
i'm getting more localization crashes
are you trying to do editions or cards upgrades
i thiiiink you're looking for context.repetition_only ?
what's the crash
or something like that, i remember seeing it in docs
I do not know what this line crashing has to do with my enhancement
yep, I was totally wrong
it says cfg is nil
this only happens on the info queue for its corresponding tarot card
which uses the enhanced set and uses the right key I checked it like 20 times
and the localization entry works on the enhancement itself in the collection
the info queue just doesn't like it
tarot localization needs fallback values iirc
it doesn't use any variables
the localization does not need them and thus does not use them
not unless the enhancement has numbers in its description
which mine does not
i had that missing variable issue before with a seal and the crash was very different and I solved it, this crash is confusing me
because this line has nothing to do with the enhancement
it doesn't give chips its config is empty
Is there a way to tell if a card(joker) has been destroyed, and if so what card it was?
context.destroyed_card and then refer to it with context.card
very rough guess
sorry, i should be specific. Jokers
hey gang - i'm using voucher count as a variable in a Joker description (odds of an effect scale inversely with # of vouchers obtained) and when i hover over it in the collection in the menu, the game crashes >_< is there anything i can do to work around this
i mean reading this line, if it gets to cfg it means that specific_var is nil but and it crashes when trying to check the second condition because its trying to read out of a nil table
for the record it works perfectly ingame even with no vouchers
nil check G.vouchers and return 0 if its nil?
because in game G.vouchers is an initialized table but not when checking the collection?
isn't it normals
a guess here
I'm guessing as well
i think it doesnt reach that var when in the collection. i think it crashes on teh first if
because i would assume that outside of an active game G.vouchers is nil as it get initialized when starting a new run
that would indicate that cfg, which is a playing card judging from cfg.bonus, is a nil table
and I have no idea why there is supposed to be a playing card in this instance
when does it crash exactly? like at which point?
if G.vouchers and G.vouchers.cards
also you should move out the definition of the odds local outside of that if statement bcos if that if fails it defines a global variable odds
is there a way to check if a game has been restarted from the main menu?
if G.vouchers and G.vouchers.cards then```
the Game:start_run function is called with some params, i dont know which tho
lemme see
restarted or continued?
game start_run has a saveTable when continuing a run
when hovering over the tarot with info queue for the enhancement