#💻・modding-dev
1 messages · Page 163 of 1
SMODS.create_card({ key = 'j_<mod_prefix>_phj_moe' })
j_{the key name of your joker} like j_madness or j_rocket
ohhhh
@weak gate ^
whats the -- for in that case
You may want to have this site pulled up while you attempt this:
@weak gate I edited it in case you didn't see it, if you want to add the card directly just use add_card instead of create_card
Maybe read up the basic syntax section
lua is both simple and infuriating at the same time. i love/hate it
once a codebase is big enough, you really want a compiler to check everything before you run it yep
after the second line would
if context.other_joker.config.key and containsString('Meeb') then
be on the right track
i know its the general right track but idk
that does not look correct, what are you trying to achieve
all jokers with 'meeb' in their key?
yeah i didnt think so lol
and yeah
that are any of the jokers u have
baseball card except for a specific set of jokers
mult scales with how many u currently have
string.find(context.other_joker.config.key, 'Meeb')
thank you so much
does it matter if meeb is the entire key or is within it with other text
I am not entirely sure what you were trying to say to be honest
its ok
it will check if the string on the left has the string on the right somewhere
it is probably case sensitive
yeah meeb is the second word in the names
In the name or the key
both
what does the joker key look like
replace that space with an underscore, keys shouldn't have spaces.
ohh ok thx
generally in anything programming wise, keys are one word.
And string.find is case sensitive, so it has to be exactly 'meeb' not 'Meeb'
what is this, my singing monsters?
yeah lol
oh lol
my friend and i making a mod based on it
since were fans of it and ethereal just sounded like a balatro mod name
nice
is there a mod somewhere that has X chips in a Joker?
Cryptic I believe
is that a feature of cryptid or is that a feature of talisman?
that I wouldnt know, sorry
its a talisman feature
The code I use for xchips is:
message = "X"..card.ability.extra.x_chips.." Chips",
colour = G.C.CHIPS,
x_chips = card.ability.extra.x_chips
}```
where card.ability.extra.x_chips is the amount to multiply chips by
and this goes in a newcalc calculate function to complete it
balatwoke has been created
I am aware that the message is a bad and hacky way of doing it
im afraid youre too late
worst news of my life
well they're distinct enough
true
woke can continue
hell yeah tbh i love the idea
isn't this what talisman does for Xchips tho?
if effects.jokers.Xchip_mod then hand_chips = mod_chips(hand_chips*effects.jokers.Xchip_mod);extras.hand_chips = true end
so like can't I just use Xchip_mod if i have talisman>
all credits to @loud citrus lol
I tried using Xchip_mod but it wouldnt work
It displayed the text but chips werent multiplied for some reason
x_chips works??
hey, any good tutorials to get me started making collab mods?
It's true
what's a newcalc calculate function tho
its a calculate function using the newcalc steamodded
aka, newest version of steamodded
it'll be defined as calculate = function(self, card, context)
on your joker, enhancement, etc etc etc
oh wait wrong question i meant how does x_chips end up multiplying the chip amount?
is it also a newcalc function
yeah talisman newcalc stuff
How do you do that code text?
` (your text here) `
So to declare a variable in lua do I just write out its name and what its equal to?
example:
dog_points = 0
how do I make a joker that scales like fortune teller? like every time a tarot card is used increase a variable
and totally unrelated how do I apply xmult again?
(as in how do I apply xmult comma again, not how do I apply xmult multiple times)
Xmult_mod
so you'll usually want one variable to store how much mult total you have, and then another variable to store how much mult you gain whenever you upgrade it.
Then, when you program the condition for when you upgrade the card, you do:
return{
// message code and others
card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_gain
}
and then you do
if context.joker_main then
return {
mult_mod = card.ability.extra.mult
}
end
or something similar
also is there a hot reload
ok thanks
it does seem to really be that simple
what context are you doing this in
i'm doing this, self.ability.extra.xmult is set fine but the xmult_mod isn't doing anything
is it case sensitive?
context.main_scoring and context.cardarea == G.play
as it's on an enhancement
Yes, Xmult_mod
ok yeah it is case sensitive
it works now
but it's displaying a blank message, how do i fix that?
yes, the X is capital in Xmult_mod
you have to return the message parameter
is something like message = none (or whatever none is in Lua) acceptable?
oh mine is on a joker, would it be joker_main then?
look at the joker calculation wiki page to make sure!
No
so how do i make it not display a message
message = localize { type = "variable", key = "a_xmult", vars = { card.ability.extra.xmult } },
Do not use self
use card, self will crash
i changed it to use card and
that's in the loc_vars thing, ```lua
return {vars = { card.ability.extra.xmult }}
can you attach the lua file
SMODS.Joker {
key = "fortnuteguy",
name = "Whatever",
atlas = "lbm_atlas",
cost = 5,
unlocked = true,
discoverable = true,
blueprint_compat = false,
pos = {x = 0, y = 0},
config = {xmult = 1},
ability = {name = "fortuneguy", extra = {xmult = 1}},
rarity = 3,
loc_vars = function(self, info_queue, card)
return {vars = { self.ability.extra.xmult }}
end,
loc_txt = {
name = ":3",
text = {
"Gives +0.25xmult per Tarot",
"card used",
"(currently #1#)"
}
},
calculate = function(self, card, context)
if context.using_consumeable then
if (context.consumeable.ability.set == "Tarot") then
self.ability.extra.xmult = self.ability.extra.xmult + 0.25;
end
end
if context.joker_main then
print(self.ability.extra.xmult)
return {Xmult_mod = self.ability.extra.xmult, message = localize { type = "variable", key = "a_xmult", vars = { self.ability.extra.xmult } },}
end
end
}
i changed it back to self so it stopped crashing
just replace all self. with card.
nice !!
what would the context be for after scoring is finished?
if context.after and context.cardarea == G.play then
Is it possible to make a new hand type with a joker mod?
im trying to get this text color and background, i tried {C:white}{X:mult} but that didn't work
{X:mult,C:white}
nvm checked docs lol
if i want to get the info about the jokers and packs available in the shop where would i start looking?
this one is for the scott the woz discord server 🔥
Scott the woz is peak
how would I make a joker check if there are 2 of the same card played at once?
ive watched scott for years i cant tell what this is referencing
weegeefett is a discord mod in the stw discord
I want all my jokers to run a bit of code after the hand is played, print('hi') for example. How to do that?
he said there should be a joker that scales like fortune teller but with xmult instead
context.after
Ah, apologies - I want all of them to run the same code, if possible I don't want to paste the same code block in all jokers' context.affter
don't think there's a way to do that
make a function
anyways how would I go about doing this?
Oh, right, pasting
if context.after then commonfunction() end
seems pretty good
only the highest quality jokers for my mod
i plan on making it trigger if you play 2 of the same card at once, so how do I detect that
like is there a list of cards i can go through
what do you mean by “2 of the same card”
like if you played 2 aces of spades
detect them in a hand of multiple cards, or explicitly just two cards played?
compare some_card.base
detect them in a hand of multiple cards
like this would trigger
this wouldn't
how do i get a joker that does the shaking animation (or the juice up animation) every time a Spade card is scored?
card:juice_up
i know that, but whenever i put that in context.individual it only juices up once
i checked loyalty, juice_card_until(self, eval, true) (i wouldn't trust this because i am stupid)
can you send the full joker code?
also i'd still like to know if there's a "hot reload" so i don't have to restart the game every time i edit my code
hold m
hey real quick, is there documentation for stuff like ipairs(hand)? i cant find anything in the SMODS docs so im assuming thats a balatro specific function? i guess im just asking if theres any other documentation i should know about
that's lua thing
oooh okay
you need to know a bit of lua
i mean ive used lua before, its just not something i use often, my apologies
beyond that, is there any docs for the structure of tables? or like a way to read them?
Are there any checks to see if a card has an ability to always score, like Stone Card or modded cards with always_scores = true
base game just checks if the card is stone 😭
maybe look at the lovely dump and see what you got?
first time lua user over here proud to admit i spent like 25 minutes trying to figure out why something didn't work only to realise the not equal operator is ~= instead of != 🗣️
why would they do that 🥀🥀🥀🥀
TRUE
INDEX STARTS AT 1
doesnt lua use ! for something specific? idk, never trust a guy that counts from 1 instead of 0
WHY DOES INDEX START AT ONE 🥀🥀🥀
AND I CODE JS BACKEND
so if i want to split my mod into several files (i.e. jokers.lua decks.lua etc) what would i need to do in main.lua to prepare that?
how do i get what suit a card is
look at how MTJ does it, i found that it is easy to understand
because lua is the checks notes third worst programming language
what i did in my code
assert(SMODS.load_file("./modules/atlasses.lua"))()
assert(SMODS.load_file("./modules/hooks.lua"))()
assert(SMODS.load_file("./modules/sounds.lua"))()
assert(SMODS.load_file("./modules/misc.lua"))()
assert(SMODS.load_file("./modules/consumables.lua"))()
assert(SMODS.load_file("./modules/stickers.lua"))()
assert(SMODS.load_file("./modules/blinds.lua"))()
assert(SMODS.load_file("./modules/cards.lua"))()
assert(SMODS.load_file("./modules/ui.lua"))()
assert(SMODS.load_file("./modules/jokers.lua"))()
assert(SMODS.load_file("./modules/pokerhands.lua"))()
wheres brainfuck ranked
(number 2 is javascript, number 1 is java)
number 0 best
greal
for ours we have them in a contents folder then list all of the files and then assert them from the list
i probably hate it for the wrong reasons but hearing 'java bad' after a horrid computer science class in high school feels so vindicating
Iused C for with no documentation no nothing just sheer willpower Horrible language fuck C all my homies hate C
jenku i will ask politely for you to help me with my mod
this is the balatro equivalent to hi wanna collab
You should not i have been doing this for 3 days at most
#1333809003829923900 message is this what you want in your mod
whaddya need
im at about 2ish weeks now
i cant properly colab though
am working on own project
explosion
💥💥💥
cross mod content is always fun
yooo veteran
it does not feel like its been that long
I've been making the aikoyori shenanigans for a month
i gave up on quadruple thirteeen straight flush for now
basically it's just 4 sets of King thru Ace Straight Flush
guys would it be funny to add Potassium-40 as a joker
update bumping this up to 2nd. there's no fucking continue.
omg really?
yeah
actually yeah ive run into this before
i will say in blind defence of lua
for i,v in ipairs is a joy to use
Fair
also i dont know what continue is
well ipairs in lua works the same as enumerate in python
you can put something like ```py
for i in data:
if i == ["placeholder"]: continue
...
^1.15 Mult
1 in 1,250,000,000 chance the card is destroyed at the end of the round
"continue" makes the loop skip that iteration
the cars
its like break but it moves to the top of the loop instead of after it
i had to add in a special if statement 😭
you know as an upgrade to cavendish
why do you hate java so much
i tried to code a minecraft mod
anyways this works now
thats op as hell
I've been doing silly things with the game
X5 is wild 😭
real
lul
you remember this?
you are not gonna be able to dig thru that
what de fuck lmao9
So, like Ruby's next
^2 Chips
github search:
vscode folder search:
if im in the update shop event how can i get the list of jokers on sale?
just press . and use github vscode to do it
G.shop_jokers.cards
thanks
you can get that anywhere actually
but its gonna be null when the player is in game?
yes
ok, makes sense
i mean you can get it from any execution point
what do you mean by that?
i'm analyzing jimball to see how it changes the music when you obtain it
this one i know kinda
ive got this
oh for those who haven't played cryptid, jimball plays funky town when you have it
I did that earlier today. I made my mod defer to their Cryptid.food table if it exists, and also checked the variables they added to see which ones I needed to account for (namely, Xchips and Emult)
you could get it in say joker calculation
*mx
but at that point it would be null, which makes sense
sorry strange pencil person
ok thanks
not particularly balatro-like
you seem like a good ressource i might ask more quesitons, while you're here
i hate number go up
if your context is opened_booster it wouldn't be
fuck you, -10 chips
nope
things an evil balatro player would say:
joker that gains +10 chips when you play your most played hands and loses 20 when you don't
right, makes sense, but in my case im trying to make a mod that just read the current states of the game so i can use it to overlay over a twitch stream
Opposite of obelisk
joker that gains x0.5 mult every time you get Nope!d
wheel of hope
your -10 chips is nothing
_ _
jimball 
how do challenge names work in localization...? none of these are working
c_pencil_permamouth = "Ride or Die"
@wind turtle -10 chips for you
oh is there a prefix for challenges
not sure if you're aware but you can add custom font characters
bunco does that
i could yeah but i decided to draw
how do i check if you have a certain joker?
i mean instead of just rotating the 8
so it doesn't look lopsided
That reminds me, the last joker I want to make needs an unlock condition (which is gonna be to have three other jokers from my mod at once.) And I need to look into how to make those work.
ok yeah you're right
SMODS.find_card
and is it [mod_id]_[card_id] or [mod_id]-[card_id]
Underscore
thanks
brainstorm jumpscare
Sorry for late reply but uhhh
My Joker essentially clones a Pair to four cards, but it will also clone Stone Cards and other modded cards with always_score on which is unintentional, so I dunno how I'm gonna go about mitigating it
so i did SMODS.find_card("lbm_goldenfreddy") and it's triggering in menus?
(i'm trying to change the music to TlT fnaf song)
There's no not card.always_scores or something right
where are you putting it?
i mean could you check if the card has always_score? is that like a thing thats possible or am i stupid
that won't necessarily work correctly
try context.poker_hands["Pair"][1]
I did do this but what does [1] do
if there's multiple pairs for whatever reason it will only select the first one
maybe
i don't know but i saw it in G.FUNCS.get_poker_hand_info
the game sets scoring_hand to that at some point
In my case if I play a Pair alongside always-scoring cards like Stone Cards, the Stone Cards get affected too
My aim is to remove the always-scoring card interactions
so i assume that G.shop_jokers.cards[1] is a class of some sort, can i just do .name on it to get the name or is there a special ritual for it to work?
right
the suggestion i made should only include the cards that make the pair
its a card object
that doesnt help me much
what are you trying to do with it
i want to get the description and name
is there a way to modify the probabilities of each rarity spawning in a shop?
i do not know how to deal with that
it would probably be a mess because of how descriptions can include other descriptions
you cant just manually exclude cards with the always_scores ability because they might be part of the pair
if i can get the key i can just go get teh desc freom somewhere else correct?
idk
chat
but if you fetch it directly from the table its loc vars will still be the placeholders
what if
actually definitely yes because it has to be stored somewhere
rhythm game in balatro
do not know where tho
right now it either always plays the song or never plays itg
play rhythm heaven and if you get a superb you get ^10 mult until the next boss blind
and i thought this was powerful
crazy mod
well that's unconditional
this is if you can get a superb on like. remix 8 ds or something really hard
my joker has x6 mult
^10 is 3.3 ^2s
but it disables one random other joker
yeah well MYYYYYY joker gives x20 for every A, 9, 8, or 7
:crimson_heart:
it's actually ±√10 ☝️🤓
(because of the bite of 87 of course)
ok i can't read
it's definitely positive ☝️🤓
x^10 is ((x^5)^2) actually
yes it is
where did 3.3 come from
log₂(10)
also square chip doesn't do x^5
oh ok I'm probably stupid but shouldn't 3.16^2 = 10
3.16227766017^2
but also thats the wrong calculation
that would be to verify that (x^3.16)^3.16=3^10
ok what are we even arguing about
anyone know?
you would need to add the j_ prefix and your mod prefix
ohhhhhh
the number of square chips that a rhythm joker is equivalent to
i wouldnt have thought of the j_ prefix, thanks
obviously it should be ^2,016 because that was when the last game released
ok can you fill me in what it does again I'm very lost
😥
rhythm joker gives ^10
square chip gives ^2
hm
ok it finally works
so what's the argument here because that sounds straightforward
you said it's √10, i said it's log₂(10)
how do i check what hand was just played?
oh
context.scoring_name
ty
also thx @spring osprey for reminding me that pringles exist 😋
so how many Square chips does it take for them to be equal to Rhythm joker
ok let me think for a bit I'm dumb
ok for some reason golden freddy is broken now
ok you're correct

ok something's very wrong here so lemme just try Remaking this shit
So umm…
Is it any different from “contains a Pair”?
When one of them is debuffed (thus not scoring).
Imma see myself out.
is there?
how many of the x would you have to multiply itself to be equal to y would be log base x of y
has to be same suit too
flush pair let's go
probably have to lovely patch
Oops, didn’t see that.
Do I need do something other than declaring a SMODS.Joker to create a joker?
Don't know if I'm just getting unlucky with my custom joker pulls or if they're not in the game fully yet.
so why isn't this working
i just got a crazy idea
I'll implement it in secret tonight :>
probably not as crazy as the wordle idea but still kinda crazy
it's getting triggered but it's not adding the mult/xmult
making the thing popup in heiroglyphics or smth?
fuck it im just changing golden freddy to +1,987 mult for every A, 9, 8, or 7
no
that would actually probs be easier tho
@storm kraken
oh
too broken
theres a symbol for the needlr
golden freddy nerf 💔
used to be x20
hes a legendary itll be fine *waves hand*
wait
thats barely 2 mult
bri'ish people notation
css is awesome
also he plays the living tombstone five nights at freddy's while you have him
im bad at web design
this would be context.scoring_name == "Full House" correct?
fair
this is what it looks like on desktop
idk it does keep refreshing as i move
so aiko when will we get phryexian letter support for the letter deck (just jokeing)
we do a little hfnwnxkjrnfosifiejncjf
I'll probably add a hook so mods can add their own word list and associated poker hands detection
calculate = function(self, card, context)
if context.cardarea == G.play and context.scoring_name == 'Full House' then
if pseudorandom('fuller') < G.GAME.probabilities.normal / card.ability.extra.odds then
return {
Xmult_mod = card.ability.extra.x_mult,
message = 'X' .. card.ability.extra.x_mult,
colour = G.C.MULT
}
end
end
end
``` for some reason when running this it works how i expect it too but then afterwards it deselects all the cards and destroys them
idk what i did to do that
yes, it ignores eternal
it's totally intentional
Completely Balanced™️
also segfault my beloved
is there a way to add dollars to an end of round? as in, add bonus dollars for a round without it being tied to a joker's calc_dollar_bonus
I also learned one of my jokers can destroy eternal cards today. Decided that I was going to let it happen, but I made it less likely than other jokers.
imo eternal jokers are supposed to be eternal until the end of the run
commitment
that feels like it should be uncommon at best
really just feels like a downgrade of riff‐raff
@wind turtle idea: analgyph deck
gain a uranus when boss blind defeated
so true
this idea is fire 🔥🔥🔥🔥
in the hole
even better if analgyph and anaglyph randomly switch places in the deck selection screen
oh I hate that. It's perfect
it should give an ass tag instead
the next tag is removed
now that's just uncecassary
it's so ass
instead of doubling the next tag
you just don't get to use it at all
it's ass so
i might be stupid but how do i cycle through the jokers i the shop, i cant seem to figure out the actual way, i keep getting errors or a bunch of shop_joker not instanciated during load and then freeze
the joke i mean
oh
that error message is a vanilla balatro bug
alright
to avoid freezing you might have to wrap something in an event
I'm still looking for cross mod content
Should it be
Retrigger all steel cards with Diamond suit held in hand. or
Retrigger all steel cards held in hand with Diamond suit.?
2
hm?
wait, both sound ok
"Retrigger all Diamond Steel cards held in hand"
Got it (Kronk face)
i might just be stoopid and forgot to call the ref.................
is this how you guys would phrase this?
"Pockettes"?
the other jokers in my mod are based on canonically tiny ladies
where could i find the code that determines the probabilities that the rarities use?
(i.e. what defines common jokers appearing as often as they do, uncommon as they do, etc)
get_current_pool in common_events.lua
Why not just "+1 joker slots per Occupant in this house"?
fair enough
feels like this ends up working the same as cryptid's negative joker
What if there are a series of Pockettes between two Dollhouses? Are they gonna be recognized as Occupants of both "buildings"?
This sounds more like a counterpoint against my "+1 joker slots per Occupant in this house" idea.
good question
no, I'll probably want to make sure they only count as being occupied by one. Split the line in half
does it matter which building?
not really
I guess "treated as Negative" is the best solution because negative doesn't happen twice
Or give them an effect called "housed" which works the same as Negative (+1 joker slot, that is)?
so what kind of code would i have to patch in to check for my voucher's existence if im trying to modify the probabilities of rarities?
You mean like a debug message to confurm whether it's in the pool or not?
no i mean like
it checks if my voucher is there and then modifies that 'probability > x and #' stuff
cus thats the idea im thinking to implement my vouchers
here's the vouchers
(they're by the guy at the top of the image but im the one implementing them for them)
youd probably need to use a lovely patch
check observatory to see how having a voucher is checked
where do i find that
also add a T3 voucher that increases epic spawnrate
back.lua is real confusing
I assume you already worked out the rarity part?
everythiong is very confusing my guy
observatory isn't there goofy
just bumping my question here im still confused
for the uncommon one i want it to check for something like 'rarity > 0.4 and 2'
which is roughly double the chance
though itd actually be something like > .45
so do rarity > (redeemed and 0.45 or 0.7) and 2
If me, I'd put the generated rarity number through a continuous increasing function before (_legendary and 4) line, so I don't need to bother with specific numbers like 0.95 and 0.7
do i need to do anything to change that 'redeemed'?
yeah replace it with what you found for observatory
so this
yeah
but yknow, with the right key
ofc
i will be back tomorrow to bang my head more against the figuring out the jokers in the shop
cause like it dont work
where can I go to see a SMODS unlock_condition implementation?
is the position right for replacing code?
Not sure if this is it but this is what I first found.
ok so
with no vouchers the chances are 70% common 25% uncommon 5% rare
with one the chances are 45% common 50% uncommon 5% rare
with both its 45% common 35% uncommon 20% rare
If only smods can do something like local rate_Rare = 0.05 local rate_Uncommon = 0.25 rarity = (_legendary and 4) or (rarity>1-rate_Rare and 3) or (rarity>1-rate_Rare-rateUncommon and 2) or...
me right now
i could also have two vouchers be 30% 50% 20%
i feel thats truer to the intention of the vouchers
But no, we don't talk about debugging source code, no no no~
how can i spawn vouchers in to test
May I ask what do you want your joker to do in the shop?
the method i use to spawn jokers (hitting 3 on collection) isnt working
i just want to read the shop state, im trying to make a mod that communicate with twitch to make an overlay for the viewer
thing is, it can give you Any joker
like you could get 4 legendaries
Keep gambling!
What info do you want to be communicated with twitch?
So you want to access jokers on the shelf.
nvm i figured it out
yes
(itll spawn one in the shop if youre in it)
Let me see what I can find...
Yeah nah doesn't really work lmao
thanks
Sorry for uber late reply I went out fo r abit
i think you have…other problems
Yeah
The variable you'll need to iter through is called G.shop_jokers.cards.
May I assume you already know that?
No worries it's my Joker's effect, if a Pair or High Card is played, it will evenly split them into two, cloning them but halving their ranks
but when i try to do that i get errors or no data
adding cards to the played hand generally doesn't work
Oh they just spawn in the middle of the screen like that and then added to the deck
or data but further down the line, which i guess im not binding on the right event?
Maybe it'll work if I explicitly make it only work when there is only 2 cards played for Pair and 1 card for High Card? I dunno
yup, the problem is getting the data out of that properly, like i can get data in the update_shop event, but it tends to show up 3 or 4 events deep
The inconsistency of source code's indentations is gonna be the end of me.
LOL
I mean it functionally already does this
where is this G object documented
unrelated question sorry
so... my vouchers, upon testing, seem to not actually affect anything
my code looks pretty solid, so i dont really know's up
Did you checked if G.shop_jokers then before the iteration?
is that the source code lol?
Are you looking at the dump or the vanilla code
It shouldn't look like that to begin with since smods overrides that
Also, that's targeting jokers, not vouchers.
Extracted from the executable.
are you allowed to say how to do that in here
yes
Right click -> 7zip -> Extract
if I recall correctly
(for context ive rerolled several times and its been mostly commons, which checks out for their normal 70% chance spawn rate but not for 30% spawns)
ty i appreciate the help
also this is what happens if you spawn a lot of overstock+'s
what I'm looking for, is like, when I have an unlock_condition in my joker, how should it be formatted
I think the payload needs to be like if G.GAME.used_vouchers.v_deal_premi then rarity = (numbers with top shelf and premium) elseif G.GAME.used_vouchers.v_deal_topsh then rarity = (numbers with top shelf) else rarity = (vanilla numbers) end
SMODS doc: "make sure to implement an unlock condition."
Me: "So how do I implement an unlock condition?
SMODS doc: *shrug
reading the code explains the code
oh im sure it does
its just
this is the documentation
(ive had my mild annoyances with this too)
The real problem is where to find and read it.
Pretty sure all the classes that has unlocked working also has check_for_unlock in documentation.
Class-specific documentation
Dude. DUDE. WTF.
Basically just return true if the object should be unlocked (there's a lot, and I mean a lot of default args for this).
Nvm, G.P_LOCKED is changing during the iteration. while loop is safer.
Don't ask any questions about LocalThunk's code quality, ever
So by the look of function check_for_unlock(args) I assume this is already within the range of smods patches/overrides...
Now the question is: where to find them?
How would I go about always having an enhancement active on a joker? Like it always comes with it? RN it only appears when I start the blind
What in the Wingdings ahh font is that
honestly it looks more like some Middle Eastern language than Wingdings
Doesn't look like Hebrew but similar in formation
I remember days ago someone else has the same problem as you. (And they solved it)
Let me find which one is it rq...
oh that'd be great, thanks! I've been trying to search but couldn't quite find
Isnt it beautiful
from what I can tell, it seems to be unlock_condition = { type = 'string', extra = 3}
where type is the name of a stat in the G.PROFILES[G.SETTINGS.profile].career_stats table and extra is what that stat needs to be set to.
So now all I need to do is figure out where to generate a new career_stat, and how to define it.
What you cant read that, it’s clearly chocolate die
I see that part, but who is able to decipher the hieroglyphs of a font on there?
me
you don't need to use vanilla args, you can give any unlockable object a custom check_for_unlock function
and any other MTG nerd who got bored and wanted to learn it
hey, thanks for the help, i've almost got this working. the jokers i want for my deck spawn when i start the game but they can be dragged anywhere on screen and also don't function properly
SMODS.Back{
name = "Shortcut Deck",
key = "shortcut_deck",
loc_txt = {
name = "Shortcut Deck",
text = {
"Start run with a {C:attention}Shortcut{}",
"and a {C:attention}Four Fingers{}."
}
},
pos = {x = 0, y = 3},
apply = function()
G.E_MANAGER:add_event(Event({
func = function()
SMODS.create_card({
set = "Joker",
area = G.jokers,
key = "j_shortcut"
})
SMODS.create_card({
set = "Joker",
area = G.jokers,
key = "j_four_fingers"
})
return true
end
}))
end
}```
this seems like it should work to me but i can't find any examples of decks that add jokers
so idk whats up
nvm got it working
add_card is the correct function
cool :)
Just found what I was talking about, but it turns out just to be shaders. Sorry.
ahh
ah
Chat, is this wording good enough or needs some rework?
maybe more like 'whose rank matches the first played card'?
or keep the with for the 2nd part
"Played cards with Diamond suit whose rank matches with the first played card gives X2 Mult when scored." ?
@runic pecan
Each played Diamond gives x2 mult when scored if its rank matches the first played card this hand, is how I'd word it
so i tried to do an add_to_deck function for the whole enhancement thing but now the card is just using the enhancement description and in the consumable field??? fsr???
dont mind the graphic its just a placeholder empty frame to test if the enhancement is applied or not
Use add_joker instead
let me catch up on what happened whilst I was asleep
people recommending using mult_mod and Xmult_mod on new calc
😭
x_mult_modular 
surely we must put _mod because we are modding 
@wintry solar does returning level_up work in more context thanks to new calc?
Oh awesome I need to replace some horrors
i use mult_mod :3
If the display is still jank let me know
Also does repetitions uses "Again!" as a default message? If not it would be nice
Yea I'll let you know
Autumn please tell me that you’re adding custom messages
It does
you can put anything on the message
It keeps getting better 👍
(for Transfusion which converts chips to mult, it uses chips_mod and mult_mod and just says a Converted! message)
It's redundant to use message if you want the default one
What a relief
:3
So I don't need to use card = card too?
eremel i made a new card layer
Correct
Awesome
i think i can handle returning the right thing in calculate 
whats your card layer
:?
when i do lovely patch i felt like i was performing surgery on code
you are
i mean it makes sense
hee hee hoo hoo
i came from modding that one hit 3d block game
where they did the surgery you just insert the tubes
they look great
funky
i can't get this song out of my head
are they "technically stickers" or did you do it Properly
No it’s done properly
I am using table.insert(card.ability.extra.occupants, G.jokers.cards[z[i]].ability.name), so why is it displaying the affected jokers' keys instead of their names?
pog
I might make a card modifier api to handle it all at some point
https://youtu.be/PWbRleMGagU I'm going to make a joker based on this song i like how it sounds
ヨルシカ - 雨とカプチーノ
Yorushika - Rain with Cappuccino
作詞作曲、編曲(Words and Music): n-buna
Vocal: suis
2nd Full Album 「エルマ」 2019年8月28日(水)発売
初回盤はエルマの書く日記帳仕様。
https://sp.universal-music.co.jp/yorushika/elma/
曲目
01 車窓
02 憂一乗
03 夕凪、某、花惑い
04 雨とカプチーノ
05 湖の街
06 神様のダンス
07 雨晴るる
08 歩く
09 心に穴が空いた
10 森の教会
11 声
12 エイミー
13 海底、月明かり
14 ノーチラス
ダウンロード、ストリーミング、アルバム予約等
h...
letsfuckinggooooooo
:3
I need to finish ortalab first though
can we have a mod where we can have poker hands for 6oak
and so on up to configurable amount of 100
darn if I don't use card = card the joker doesn't juice_up tho
What are you returning?
Huh it should do
Also h_mult
From a joker or playing card?
joker
Wait what do you mean? Doesn’t it juice up when the message plays?
The joker is a context.individual G.hand one, when I return just h_mult, the playing card does show the mult and juice up. If I add card = card the joker juice up but if I don't it doesn't
It's the same for the repetitions one btw
Do the repetitions give the message?
I didnt have time to try I have a meeting soon sorry
How interested would one be in a stone card only plasma deck challenge?
I’ll take a look at the message stuff later when I’m on my pc
could anyone tell me why this isnt aligned to the middle
return {n=G.UIT.ROOT, config = {align = "cm", minh = G.ROOM.T.h*0.25, padding = 0.0, r = 0.1, colour = G.C.GREY}, nodes = {
{n = G.UIT.R, config = { align = "cm", minw = G.ROOM.T.w*0.25 }, nodes = {
create_toggle{ label = localize("start_with_chameleon"), info = localize("start_with_chameleon_desc"), active_colour = CrazyStairs.badge_colour, ref_table = CrazyStairs.config, ref_value = "start_with_chameleon" },
}},
}}
end```
It is?
Toggles have some weird width stuff
Is the highlighted part correct to replace the content of the for loop?
So I need my Joker to give either Meteor or Charm or Ethereal Tag. What should I use? Math random?
all equal chances
33/33/33
add_tag(Tag(tag_name))```
Btw does the game code or SMODS have a failsafe if Orbital Tag is the one picked at random from the tag pool?
just make the background wider and nobody will notice it's not perfectly centered 🤫
I think it does...?
like this?
Tag(tag_name)
Yeah I think it definitely does
ah ic ic
You have to set G.orbital_hand before adding the tag then make it nil afterward
Can I replace the first part with the second part?
Got it working, even when sold.
Almost. The former will send a log and move on if something fails, the latter will crash the game if something fails
your pseudorandom_element arguments are wrong
it's the items first, then the seed
yeah, I figured it out already! :D
I looked at the base game code
what is juice_up?
makes card wiggle
Is everything correct here?
Ive tried making my card jiggle when activated
but it crashes the game now
I did this instead (it works now)
btw is there a list of colors?
like this G.C.BLUE
I don't know the full spectrum of possible chioces availible
same question for formatting colors
like {C:white}{}
for example
On vscode do shift+ctrl+f and look for BLUE = hex(
(Or ctrl+shift+f I forgor)
Yes its ctrl+shift+f
look for where exactly?
I believe it should handle it all for you without needing this
Really? I need to test it later
Ctrl+shift+f lets you look across all files, if you drag n drop the Balatro folder in VSCode you can look for it
like this?
it now gives me 1k errors
Wrong Balatro folder
How do I determine if context.blind is a boss blind and whether it's disabled?
There's a variable for it, look up the Rocket joker code
this one?
Extract the Balatro.exe and it should be it, sorry it wasnt clear
I want a tag to be triggered when context.setting_blind (Entering a blind).
Found it. G.GAME.blind.boss
How do I make this Tag go away after triggered?
And how do I make it not be triggered if there are other boss-disabling jokers like Chicot or Luchador?
Nvm
Yea was about to send you the link
It now looks like this. Is this correct?
Oh, wait, forgot tag.triggered = true
Alright. Now how do I detect if a boss blind is disabled or not?
Look up Chicot code, it checks that too
Found it. context.blind.disabled
Bad news: it didn't disable any boss blind.
how would i go about making a joker that makes two ranks be counted as the same?
Not currently feasible
not in any good way except hardcoding everything
and not working with any other mod
im currently making a website to host custom challenges that can be played via a single click, kind of like inspecting a weapon on cs2, although i need a better name for it... any ideas?
Jimbo's Casino of Doom
also really cool stuff!
sheesh, thats cool
How does it work
I'm planning on the next batch,
does any of these look like in need of tweaking?
websockets
challenges are just stored as a table so i can just parse some json into it
I've added a custom center type but the only thing is that they are discovered as soon as they are created rather than when bought
Whats the solution? I tried bypass_discovery_ui but the center is automatically discovered in the collections too when I open the pack
discovered = false not working, either?
"Spray Gold paint onto the scord hand" should be "Spray Gold Paint on scored cards if played hand contains a Two Pairs. 1 in 4 chance to add a Gold Seal to an unsealed [playing card] <-- this part here needs to be specified more, since i actually dont know whether it chooses a card from your hand, deck, or played hand)
by default discovered is set to false and it gets turned to true as soon as I open the pack
"If played hand contains a Two Pairs, retrigger Steel Cards held in hand per played and scored King"
this is the code if it makes a difference
"Metal cards" includes Gold and Steel.
oh i see
you should probably specify that though
like, retrigger Steel and Gold cards instead
I'm adding them to info_queue
that works then
you should just put the "Prevents Death no matter what." to "Prevents Death", since that means it will activate unconditionally when you die
Is there a flow chart about hand type containing?
Like having an arrow from Full House to Two Pairs.
You know what, I'm not waiting for an answer. Imma draw it myself.
Why doesn’t everything point to high card?
So sad I can't react to a react
I read it as it being implied
Straight can contain a Pair in Balatro
Flush can also contain all of the oaks
With 4fing, ig
why doesn't this work
this chart is "must contain" though, not "can contain"
I mean "guarantees to contain"
more precisely, I get this error
It's breaking inside SMODS.insert_pool
So since Four of a kind doesn't contain a Two Pairs,
I'll need to change "per scored Kings in played hand."
to "twice if scored hand contains Kings"
best joker ive ever made
Is there a way i can receive more context or something like intellisense? im trying to start out by looking at modded joker examples but im kinda lost since i just have to guess which methods and variables work with which. Maybe this also just has to do with my lack of understanding of lua
v is an instance of the Card class here, so any properties and methods defined on Card (in card.lua) will work with it
there's also LSP definition files in the works for steamodded
its apparently entering here
ah yes i also guessed that :), just wish there was a way my editor would actually tell me that it was xd. But i guess LSP definition files would do something like that when they are finished?
they should
what's the function to check which slot a joker is in?
or the variable
if it's a variable
wdym which slot
They prob mean pos
position in the joker area
ye
The vanilla way is to iterate over each card and find yours, idk if SMODS.find_card returns an index
(it doesn't)
Look at Ceremonial Dagger calculate code for an example
does anyone know how the partial hide works? (Only description with "Undiscovered" as name)
I only found the full hide
yeah but i cant seem to make it work correctly. if you're available tonight im gonna try again
is this the right way to add a voucher to the vouchers area? When I tried, it added it to the joker area for some reason
SMODS.add_card({
set = "Voucher",
key = "v_grabber",
})
I just noticed that I actually have never seen your code. Would you put a screenshot of your joker’s calculate function here so we can have a look?
what are the text color codes for the suits?
https://github.com/PILIX123/TwitchOverlay
line 35 to be more exact of where im trying to do the things
back to making CI/CD pipelines at work
You mean this part?
What do you mean by vouchers area?
As in bottom left corner of the shop?
yes
It depends.
add area = G.shop_vouchers, into the braket
so how would i use them in a joker, like C:SO_1[Hearts]?
Just {C:hearts}.
lower case, with s.
Nope, still added it to the joker area. Does it need to be in a specific context?
thank you!
You mean SMODS.add_card({ set = "Voucher", key = "v_grabber", area = G.shop_vouchers })doesn't work?
would this be too strong?
correct. doesn't work. adds voucher to joker area.
Huh.
Then I have no idea.
Sorry.
oh sick, flower pot synergy
personally i think it's fine
It's a little OP. I'd make it Rare or really expensive.
Then maybe you'll need to do it the old fashion way...?
game.lua, around line 3100, btw
it's kinda really hard to activate ive seen
it's basically a flower pot sidegrade but it makes the cards more useful
keep in mind flower pot is also uncommon and just gives 3x mult if you got all 4 suits
flower pot is also notoriously useless
X5 is better than X3, I guess
but it doesn't activate before scoring
see that part was left out
changing "played cards" to "scored cards"
If you mean context.after, then you need to say
"become Polychrome after scored"
Also you missed a comma after Club card
a Spades card -> Spade card
fixed
aren't those full stops
make it a Rare joker then its good to go
Those are commas.
In which I especially appreciate that garb used oxford comma.
must be the low quality
everything good now?
and a Spades card -> and Spade card
okay
should it be scoring cards or scored cards
scoring, since it's active instead of passive
my english qualification is being tested here lmfao
im not passing peer review
do i need to make any more changes??
I mean, Flower Pot's description is right there for you to copy...?
yes
ye i did copy flower pot for the first part
the last part i was joking about
and the numerous typos
What this part of invis joker's code does?
Build a joker pool to choose from when copy, by the looks of it.
Oh, and the second and third line is for jiggling.
And where's your attempt at iterating through G.shop_jokers.cards?
So I guess there's no rental_compat, then?
i didnt commit it, but i was doing something along the lines of
if G.shop_jokers ~= nil then
print(G.shop_jokers.cards)
end```
but like it was giving me errors, or just infinite log
which means im doing something wrong because theres clearly a way to get it only once
Tryif G.shop_jokers then for i=1, #G.shop_jokers.cards do print(G.shop_jokers.cards[i].center.key) end end
there's <sticker>_compat for every SMODS.Sticker, so I think that also works for rental
Hmm, I'm trying to change how stone cards work when a Joker is present but this setup is definitely not right, but I don't know what setup would be right here
ill try that later when i get home
pinned it in a different conversation so i dont loose it ill update you tonnight at like 7-8pm US estern
So this is Space Joker's code. Why there's no 1 in 4 chance memntioned anywhere? Only this wierd pseudorandom stuff that I find on every probability joker
how do I set up chances?
I couldnt find anything on smods wiki
So "this wierd pseudorandom stuff" is a real number ranges from 0 to 1;
and G.GAME.probabilities.normal is usually 1 (unless Oops all 6's is around);
and the joker's ability.extra is 4.
1 in 2 chance?
ah
thats actually useful to know, i might not use it ever but it makes reading the code better
why it compares: pseudorandom('space') < G.GAME.probabilities.normal/self.ability.extra
what it checks for
They really should put this in SMODS doc, isn't it?
i mean trying to document an entire game that was made by one indie without any mods in head is kinda hard you know
isaac modders be like:
nah, I'd do
checks if the pseudorandom value, which is always gonna be between 0 and 1, is smaller than the probability of hitting, which means that it did hit
heya, is there an example mod or a beginner tutorial that I can use to familiarize myself with making mods?
pseudorandom is a value between 0 and 1 with the seed "space"
G.GAME.probabilities.normal is the nominator which is a game value that can be modified by say "Oops all 6s"
Self.ability.extra is the value used a denominator
So imagine a stream of spectrum,
the left end is 0 and the right end is 1.
The middle point would be 0.5, a fifth from the right is 0.8, etc.
so lets say, base case is that space man is 1/4 chance, it checks that the the random value is less then 0.25
?
with oops all 6s it would modify the numerator value in this case to 2 correct?
Yea it would multiply it by 2
G.GAME.probabilities.normal will be 1, the space man has a 1/4 chance so Self.ability.extra is 4
1/4 = .25
then it takes a random value between 0 and 1 and checks if that value is less than .25
Then imagine there's a mark at a quarter from the left, aka 0.25
sorry to necro my question but is there an example mod or a beginner tutorial that I can use to familiarize myself with making mods?
why it checks if it's less than .25
Is there a list of functions and attributes and stuff, like card.ability.extra.Xmult?
tyy
because thats how math works /lh
