#💻・modding-dev
1 messages · Page 244 of 1
anyone? ;v;
increasing the 4 to 8 also increases the denominator of the odds by the same amount (something like 4/100 to 8/108). that's not double the odds, so the game compensates
if you have two items in a pool, one with a weight of 4, one with a weight of 6, obviously the first one has a 4/(4+6) chance of being selected (so 0.4)
if you doubled the weight to 8, it becomes 8/(8+6), so 8/14 (0.57)
(I don't know the actual denominator offhand btw)
so doublign the weight doesnt double the chance of seeing that card
or edition
or whatnot
ig thunk just didnt find it worth it to figure out how to make it exact
i figure theres some mathematical complexities that are beyond me
it also sets its own config as 9.6/4 and then sets the rate to the config value * 4
which is funny
this is still the case, btw - if anyone has any further insight
my primary suspect is a steamodded update, i'm on the latest(?) release, 0312b
i ended up just using a localisation file
its probably basic algebra but i cant be bothered
is this hook being done incorrectly? in essence i'd like to add permanent mult to a card if it's enhanced after already being enhanced previously. for example, a bonus card being enhanced again would give it permanent +4 mult, but for some reason i'm not even reaching my print statement. have i formatted this wrong?
4th times the charm, is there a way to get an array of all jokers, including modded ones?
also you also need to pass self to set_ability_ref
so local set_ability_ref = Card.set_ability(self)?
;v;
idk if there's a nicer way but you can iterate through G.P_CENTERS and check if they're jokers or the key starts with j_
no, when you call it inside the function
set_ability_ref(self, center,initial, delay_sprites)
oh yeah, wasn't it also misspelled as Caino in the frontend during the demo as well? xD
Caino
Caño
hmm, crashed
ty, also do you know if theres a shim file/way to get intellisense for steamodded?
oh, it's Card:set_ability = function(...)
the new steamodded versions come with it for most stuff
it doesn't seem to like that
i think you can also just add self
oh I've never done it that way
so either
function Card:set_ability(...)
or
Card.set_ability = function(self, ...)
anyone know why poll_edition just refuses to work here?
card:set_edition(poll_edition("Sage", 1, true, true, {"e_foil", "e_holo", "e_polychrome", "e_cry_astral", "e_cry_mosaic", "e_cry_gold"}), true)
isn't it SMODS.poll_edition or something
oh, it's just not giving the joker
any editions
the function isn't
does set_ability not let you give a card an edition?
this stopped the crash!
i think that one is vanilla
now i just need to figure out how to make the function actually work, pretty sure i messed something up in if self.ability and self.ability.set == "Enhanced" and center.effect == "Enhance" then
joyous I need halppp
set_ability isn't letting me set the card edition
oh wait I forgor that needs to be a string again
omg joyous
it still isn't workinggggg
it's midnight so im going to sleep, have to go to the office tomorrow🙄
gn n
gnnn
you could also just have it pick from a set list and apply it i guess but that doesn't do the chance
i don't know how poll edition works
guys
set_edition should be correct but idk why it doesn't work
is it worth my time hunting down mod compatibility problems
no
thank you for giving me the answer I wanted to hear
unless it's with joyousspring
so true
how complex is it to add custom colors for text?
easy
should I just patch it in with the others, or is there an easier way
there
ah I see, thanks
alrighty, it's just an incompatibility with set_ability
if I set it to do it when it calculates, it suddenly works
well
set_ability is probably too early
I had it right before the calculate code
should I set it to after?
if anyone wants to be a coder for a small undertale/deltarune balatro mod and needs an ideas guy and an artist
let me know i guess
no, i mean early timing wise
maybe the card can't have an edition yet at that point
ah
why is ability marked as nil?
are these all I need for the booster
yeah, I think that's what it is
it works if I do it on add_to_deck
i think that's also called when the card doesn't have an ability yet
am i referencing the joker incorrectly?
probably
it's specifically line 9, which i accidentally cropped out - but it's the line just under the if statement check for "j_hnds_perfectionist", so i'm unsure what's happening there
oh
i assume it's something with how i referenced the joker's variable? was that done incorrectly? (G.P_CENTERS["j_hnds_perfectionist"].ability.extra.mult)
IT'S GLORIOUS
I FINALLY HAVE MY SIXTH JOKER WORKING 😭
card.config moment?
how do i make my card show "x1.5 Mult" when scoring instead of just "x1.5"
wdym
don't mind me
guh why is making booster packs so hard
SMODS.Booster{
key = "letter_pack_2",
set = "Booster",
loc_txt = {
name = "Letter Pack",
group_name = "Alphabet Card",
text={
"Choose {C:attention}#1#{} of up to",
"{C:attention}#2#{C:attention} Alphabets{} cards to",
"keep for later use",
},
},
config = { extra = 3, choose = 1 },
loc_vars = function(self, info_queue, card)
return {
vars = {
card.ability.choose,
card.ability.extra,
},
}
end,
atlas = 'aikoyoriBoosterPack', pos = { x = 1, y = 0 },
group_key = "k_alphabets",
cost = 4,
select_card = 'consumeables',
weight = 1,
kind = "letter_pack",
create_card = function (self, card, i)
return create_card("Alphabet", G.pack_cards, nil, nil, true, true, nil, "_letter")
end,
in_pool = function(self, args)
return G.GAME.letters_enabled
end,
}
this is my stupid code
lol
So i think the problem is in my Set
What do I put
inplace of "alphabet"
or like
How am I supposed to make it only have my modded jokers
you will probably need a list of your Jokers
wdym
you'll need to have a list of your mod's joker somewhere
Like this? What should be in there, their names, their keys?
prefix?
what does your list look like
anyone know where I would start, to make an edition that makes a card scale when scored? the wiki just has examples for static chips and mult, and says "if you want anything else DIY"
shaders are a bit difficult
well, for the shader I'm just copying part of the shader that makes the background swirl
also you'll need to use calculate just like usual but change card. ability to card.edition
im about to scratch my eyes out
Ive been trying to do this booster shit for hours
i might just give up
man I'm about to make a new booster pack type soon
There is next to no documentation thats actually helpful, ive tried scrolling back months of old messages
Im tried kitbashing others code
take a break
genuinely, come back to it later with a fresh mind
how do i make my joker show "x1.5 Mult" when scoring instead of just "x1.5"
what is your code dawg
calculate = function(self, card, context)
if context.joker_main then
return {
card = card,
Xmult_mod = card.ability.extra.Xmult,
message = 'X' .. card.ability.extra.Xmult,
colour = G.C.MULT
which version of steamodded are you using
"1.0.0~ALPHA-1326a-STEAMODDED"
what exactly do jokers do in terms of movement when returning a message? juice_up() doesn't get the exact way they do it in vanilla, and i can't return a value like normal in this scenario
that's really old
why are you still using that version
no clue tbh, update just fixes my issue though?
beautiful thanks
where do I look for square joker's ability?
card. lua
balatro archive in the card.lua
so is it this thing?
I can't figure out what to put around it since it's sharing space with a bunch of other things
like... this is like trying to follow a reddit thread
no i believe this is just the localization for it
look for the calculate function
that's specifically the part where it upgrades when you play 4 cards
the part where it actually scores those chips is elsewhere. because 
should I look in card.lua for that or where?
that's also in card.lua it's just in a different part of it
like both of these things are "the calculate function"
oh mb
this bit?
that's the part where it scores, yes
I'm trying to make an edition that makes playing cards scale
I know some basic LUA from WoW addons, where can I learn more about Balatro modding? I have a few ideas I wanna test out.
hm, hiker is definitely your best bet
this is where i started: https://github.com/Steamodded/smods/wiki/API-Documentation
and this youtube video has a pretty decent setup for how to make a modded joker: https://www.youtube.com/watch?v=Zp-4U5TlbxY
STEAMODDED 1.0.0
A tutorial on how to make a modded Joker.
https://github.com/art-muncher/Example-Mod -- EXAMPLE MOD
https://github.com/Steamopollys/Steamodded -- STEAMODDED
https://github.com/WilsontheWolf/DebugPlus -- DEBUGPLUS
-----------------------------------------------------...
Thank you, I’ll check em out.
this is exactly where I started lol
is it okay to have a comma after the last item in a list, before the close bracket?
yes
thanks
what does get_edition_cards accept?
example mods just shows "G.jokers, true"
can I change "jokers" to "playing cards" somehow?
Im going to sleep now, BUT PLEASE SOMEONE HELP ME UNDERSTAND YHOW TO MAKE A BOOSTER PACK WITH MY JOKERS!!!!
pls 😭
get_edition_cards takes any CardArea... so perhaps checking both the hand, play area, and deck?
just spitballing
somehow I suspect local eligible_jokers = SMODS.Edition:get_edition_cards(G.hand, G.play, true) won't work
since whatever "true" is probably needs to be true or false
also I have no idea what the area for being inside the deck is called
I mean... can I do it like this?
cool where do I put the or
your best bet is to handle each one and then either merge them into one table or again do them one by one
well what if I make it an or
mmm nope
you know if you're willing to not use that function you could do something with G.playing_cards
that's just a normal list, though
looks like i'm not being of much help here, sorry
for k, v in pairs(G.playing_cards) do
if v.edition then
--your code! v is the card object
end
end
something like that, probably
what is k?
key?
I should mention that the only other game I've ever modded is Darkest Dungeon
and I guess a little bit of Terraria
essentially yeah, key in the table
shouldn't be much need to use it though
no you're misunderstanding
also, where'd you find this?
the for loop defines k and v
k is the key, or index
so in this case itd go sequentially 1, 2, 3, 4...
v is the value inside the table
in the case of this, a card object
wrote it on a whim
it's how k and v are defined
hold on let me comment a little
for k, v in pairs(G.playing_cards) do --Iterating over every playing card, k is the key, v is the object
if v.edition then --Does the playing card we are currently on have an edition? If so...
--Run this! Eg. v.edition.negative = true
end
end
The badge color is still the default grey when I check it. Is there something I'm missing? Sorry if it's obvious, im brand new to coding
I had to.
i should also reccomend you look into lua itself as a language a little! it's got quite a bit of its own rules you'll need to learn
uh okay
just one question though
is if v.edition then not supposed to be if v.edition true then?
then how do I make it false?
if not v.edition then
so that'll restrict it to cards that don't have an edition?
if v.edition is nil, or false, then not v.edition will return as true
mhm
but if (smt) == true then is more specific than if (smt) then, since it specifies that (smt) has to be true (the boolean value)
if (smt) then will always return true if its a value that's not nil or false
ah okay
it's the difference between true and truthy
so it's like
"if apple": the apple might be rotten or half-eaten or there might be more than one apple
"if apple = true": it has to be the platonic ideal of a single apple
Is there an Add to shop function at all?
do u understand tables yet :3
check tags, probably (the uncommon, rare ones)
more like
if box - Does the box contain ANYTHING? (or, not false or nil)?
if box == true - Does the box contain the value true?
okay
ah, so tables are constructed like this:
local newtable = {1,5,9}
print(newtable[1]) --it would print 1 in this case
print(newtable[2]) --it would print 5 in this case, think of the "2" as choosing the second value of the table
--[[
as for "key" and "value", you can think of "key" as the 1,2 in newtable[1], newtable[2] i declared up there, while "value" is what the key in the table has
but you can also set custom keys to your table, like:
]]
local newTable = {
["hi"] = 5
}
print(newTable["hi"]) --this will print 5, as it finds the value with the key "hi" in newTable
--for loops are often used to run through a table, like:
local table = {
["hello"] = "waza"
["wassup"] = {"hello"} --tables can also have other tables in it
}
for k,v in pairs(table) do
print(k) --this will print the key, so either "hello" or "wassup", the order is random
print(v) --this will print "waza" or the table {"hello"}, the order is the same as the above
end
bad practice, but you shouldnt name a table "table" lol :3
ohh
there are also other functions related to table, like table.insert(x,y), but you should do some research on that yourself
it's like matrices
kind of, yeah
I... failed that chapter in high school
tables are just a bunch of key value pairs
its all good, tables are simple to understand :3
tables are full of values assigned to a specific key
does anybody know?
so when you call the key in the table, it will get you that value
I'm good at spreadsheets though
sometimes the keys are increasing integers so you can treat it like an array
mhm, in that case you can use
for i,v in ipairs() do
end
instead, which will go from the lowest to the highest key in that table (poor wording choice)
an example would be to use this in G.hand.cards, going from the leftmost card to the rightmost card
for _,card in ipairs(G.hand.cards) do
print(card)
end
and you will see that this loop goes through all the cards in the order from left to right
the "i" and "v" part in for loops can be changed to whatever you want (the naming)
@manic rune
helo
thing of note here since i just remembered thanks to this; unlike quite a few types, tables do not print in a human-readable manner in the console
how often do modders use git
i dont use source control for solo projects which may be my downfall
its actually kinda readable, though definitely hard to read sometimes if you print something with a shit ton of values inside it (cards, for example)
personally I just put old versions of things into zipped folders 😓
if it's a collabrative project i do use git though
i havent even set up my git
:3
in fact, never touched it in my life
except to download mods
i keep it in a file in my mod lol
big mistake imo
i dont blame you
i learned the importance of backing up my code when i lost my website
to a vps wipe
i actually accidentally deleted a function with 300 lines before
because i forget to
but luckily i posted my mod to gg drive
-# because of a certain accident
so i just ctrl + c, ctrl + v it :3
Google drive version control 😭😭😭😭😭
if it works, it works
what's poll_edition and what four things is it looking for? I can't find it on the wiki
the only reason i commit on collabs is so the other person can see my work
i will not commit otherwise
im fuckin weird like that
my mod is so convoluted i probably, accidentally made a whole lib just for it rn
am i still weird for just modding it as a love2D project and releasing the diffs
does PC version support controller
Yes
I'll test my mod with a controller then
i know this because an earlier version of Leg Day had a 52 card big hand
but yeah it even pretty easily hotswaps
it's all good and crossplatform like that
are you skipping leg day
you CAN'T skip leg day it's in the rules
i thought it was a funny joke
Debuffed
Leg Day
bullshitlatro
oh wait you were talking about THIS console
i was talking about the standard love2D one
woops
whats the food
please use error() to make a funny message
what did chicot ever do to you
i mean i already have this
the t is silent that's why
go insane, it's fun
i mean how do you know that
I'M NOT BRITISH
Well then the question is what is "You"
at least i think i made jens almanac player sweat a bit
well, as soon as i can, im finishing the shit out of this jokerino
anyways wanna know what pisses me off about LOVE
yeah?
the wiki displays functions that don't even exist in stable
you'd think it'd at least have a BETA flair
i love inexistant functions, yipee!!!
but no i had to find out the hard way the love.event.restart isn't a thing in LOVE 11.5 and my import save data function couldn't be perfect
well actually
jf i masked it with a loading screen it could maybe work without me restarting
hmm
i don't know
well try
still mad that seemingly the only way to transfer it is to directly invoke robocopy using os.execute thanks to limits of LOVE filesystem functions
Hello! I'm trying to get into Balatro modding but am struggling severely to make the simple joker I want to make, if anybody could assist me with my spaghetti code it would be super apricated :)
How could one change the temperance and hermit cap?
im making a joker that enhances cards held in hand into an enhancement when that same enhancement is scored
how do i pick a random card held in hand to enhance?
only mod ik off the top of my head that does this is ortalab but i couldnt find anything
pseudorandom_element should do that
For example
pseudorandom_element(G.hand.cards, pseudoseed('power_surge_destroy'))
hmmm
how do you debuff cards? card:set_debuff isn't making it not score
is there a table I can reference that is just all of the tarot cards?
SMODS.debuff_card(c, true, "debuff_source")
(replace c with your card, and debuff_source with a source that will also be used to undebuff the card later)
and then to undebuff you do
SMODS.debuff_card(c, false, "debuff_source")
Hihi. Gonna try and get the Yume Nikki World done today
where do yall learn the math to move, rotate stuff and allat for shader...
shi looks like dark magic 💔
I mean the basic transformations are already handled by the game
Unless you want something less basic
yeah, math.sin and all that stuff
I don’t understand
Do you want to do something simple or not?
The game already handles rotations, scaling, translations,
So the basic theory is all linear algebra
aaand whatever those are, my brain cant even comprehend what they are for 💔
What I find difficult is knowing what math to do, not necessarily how to do it
These are just formulas though
The formulas you just Google
my school doesnt seem to be teaching anything related to this 💔
I learned linear algebra in university
and this on Google
❤️
right, so its mostly googling formulas aaand
learning those linear algebra thingies?
maybe i will watch some shader tutorials on top of that, thanks :D
The first four videos of this might help https://youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab&si=a-aQWa2DPIUwpWqF
is it possible to debuff consumables? does anyone know?
Debuff, yes, does it do anything though?
I think it would prevent Observatory from working, maybe, on SMODS
Not sure the vanilla behaviour of debuffed Comsumables
@manic rune 3blue1brown is a great math educator on YouTube, but there are others. Let me know if you want more resources
print("hello world")
oh, thats really nice of you, thanks :D
hello chat i am wondering if anyone can help with a little issue im having (just started modding earlier today), im trying to make a joker which ummmm gives lots of Xmult per card held in hand but it seems like context.main_scoring doesnt work, i think the only way i could get it to work was with context.individual but that seems to score the cards again at the end of the round
(ignore the cost)
oh it also worked when i removed context.main_scoring altogether but then it scored twice
Sin, Cos and Tan are pretty fundamental functions, I'm surprised you haven't been taught those in school (yet? hopefully). Trigonometry is handy in many areas of life.
In programming terms, they're periodic functions that take in an angle argument and output the size of one of the 3 sides of a "unit" triangle
https://www.mathsisfun.com/algebra/trig-interactive-unit-circle.html
Sine, Cosine and Tangent ... in a Circle or on a Graph. ... Sine, Cosine and Tangent (often shortened to sin, cos and tan) are each a ratio of sides of a right angled triangle
i know how to use sin, cos, tan to solve math problems
but uhh
dunno what they are for
my school doesnt teach anything about that at all
mostly just formulas surround that
nah, not mostly, just
I think learning about linear algebra rotations will help visualize it
Because sin and cos cycle smoothly between -1 and +1, they can be used to convert a time value that is constantly increasing into a periodic value that's constantly smoothly changing
The right side of that interactive link shows the plot of the functions and how they change over "time"
Tan is wacky and generally only used for triangle calculations, but cos and sin are often used in game animation and shaders
sin, cos, and tan are all computed from ratios on triangles
and specifically each angle is associated with a ratio
which allows you to recover a circle
but IIRC it was linear algebra that helped me visualize trigonometric functions more
even though I had already learned how to compute them geometrically in school
try plotting y = sinx
(with straightedge and compass)
Personally I don't think that's helpful because it's reversing the order
you can see that as x goes up y oscillates between -1 and 1
We computing the graph of sine by knowing how to compute sine
There are infinite functions that oscillate between -1 and 1 but only one of them is sine
I can explain it if you want
have you used a compass
it's a weird shader language where you define the length of a vector that way
i guess thats because i primarily learnt coding through roblox, so i only knew about vector2 and vector3
Anyone who knows how to make booster packs, help would be amazing
wait until you learn about vector∞ 
which ∞
???
functions themselves are infinite-dimensional vectors
i think im gonna have a mental breakdown learning this
It wouldn't work for the joke if I used aleph or omega notation
In fairness we can't represent infinite-dimensional vectors for real inside computers (except symbolically)
im terribly sorry for sounding dumb
it's the opacity
aka transparency
so if its 0.5 then it will be see-through?
yea
like, red-tinted glass or something
mm i see
i assume any value higher than 1 doesnt mean anything?
Well, actually, opacity is the opposite of transparency
the more opaque the less transparent
since 1 is full-on visible
and vice-versa
I think RGB are also normalized to the 0–1 interval
you can also use DebugPlus to watch the shader live
or use an online shader tool
As a Color3.fromRGB() user, seeing rgb values be from 0~1 sickens me 😭
😭😭😭😭😭
you don't know glsl
everything is 0 to 1
I'm reminded of this meme
Hey #MathTwitter! Here's a little something inspired by @matthematician's "is-it-a-sandwich" activity and #HoagieHomies everywhere. 🥪
What makes a number, a NUMBER?
Would love to hear your thoughts! 🙂 https://t.co/Wa1aquja62
more like ew
does u_time increase overtime
-# im somewhere else rn, so im manifesting the code in my mind
mood
I think I'd say everything is a number except sin(x) and 2 + 3x, maybe
Id disclude the matrices and the grid, as well as infinity as:
Matricies - More than 1 number, more of a class.
Infinity - A concept.
"Complex numbers" and 2D vectors/matrices are essentially the same
Complex numbers do have complex multiplication which dips into 2-by-2 matrices
Infinity is an element of the extended number line
Yeah but it behaves too weirdly to be considered an actual "number" in my book
I don't think it's weird, it just needs to be specified by the context
I don't think it's too different from reusing number notation across different algebraic structures
Yeah, any specific infinity i consider a number, but its moreso just an "x" situation
how do i uhh make this black part of the gradient disappear
more like how do i make a seamless gradient, tbh
I think that corresponds to (0.0,0.0,0.0,1.0)
if you want a horizontal gradient, I'd do a convex combination depending on the x axis
A convex combination of a and b is an expression of the form aθ + b(1-θ) where 0 <= θ <= 1
Hence when θ = 0, the expression evaluate to b
:3
and when θ = 1, it evaluates to a
Theta reference
:3
you change the third value in vec4 to 1
you can think of θ as the Doctor Ratio between how much the expression is a or b
dr ratio...
did the explanation help
:3 im very sorry to say that my brain barely comprehends that
what part did you struggle with
how to use it, or some part of the definition
i actually want to ask some simple (MAYBE) questions first, is it possible to get this gradient reversed?
like, instead of B -> R, its R - > B
yes
so you're using st.x to compute the gradient
I believe st.x varies from 0 to 1
mhm
so you want to obtain a quantity that varies from 1 to 0
if you imagine a point moving from 0 to 1, can you visualize a quantity that decreases from 1 to 0
you don't need to know how to describe it mathematically, just visually

thankssss
It's difficult to learn how to translate geometric intuition into math and back again
this is a simple example, in the grand scheme of things
yes
1-st.x
mhm, the solution didnt come as obvious to me for some reason
during my convex optimization class me and a friend spent the whole semester bashing our head against this
i envy whoever can just naturally do this
I don't think it's obvious how to translate from geometry to math and vice-versa
it's a skill
some people learn it more easily
@manic rune now try 1-x*x
or whatever multiplication notation is
or even (1-x)*(1-x)
challenge where your money is converted in real time
from local currency to dollars
your money in bank account represents your in game money
buying in game items deducts real money
you cannot gain money
So happy all of y'all are learning shaders. Who's going to write the tutorial that I can use? ❤️
stupid
Im pretty sure someone made a mod that actually charges your credit card (isnt available for public use, obviously)
well actually stupid made the example shaders, idk if they wrote the tutorial
I've written a small guideline for var names for myself just so I can stay consistent. Though consistency is needed because I have a bunch of things that check the formatting of variable names to see if they should do things
I should take a look at this soon. Once I've finished some legendary jokers I'm going to be shader-pilled I guess
then you "shader-pill" me as Zs and NorthernLion would say
im gonna have a stroke learning shader
can i just blueprint whoever already knows shaders please
💔
Mods? Are we allowed to talk about this???
see
???
this is exactly why i quit modding for 1 month
💔

i know the kind of person you are now.
Taking a break can help too
also I think the struggle with shaders for me are that I don't know what math to use to get the effect I want, and some specific technical details
I wanna implement a feature into Kino that gives jokers a slight change to have Alt art, so I can have a future The Batman Joker sometimes just be that image
Does he know?
You don't need a shader for that
😭
But I want it to be modular so I can just add {alt-art-pos} to jokers. Wouldn't take any real effort but I'd need to commit to alt art assets, haha
card on card violence
Aaaa
When making an effect similar to Lusty Joker, I can't seem to get it to count all scoring cards. Only played cards, or all cards in hand regardless if they scored. Is there a context I'm missing or do I need to just check for scoring logic myself?
that would be context.scoring_hand
#context.scoring_hand will return the number of scoring cards, i think
hmm
using that seems to count cards in hand regardless if they are scored or not
huh
can you show your code?
Yeah I'm guessing I've done something really stupid or misinterpreting something. "is_even" is my own function does what it sounds like
hey my cardTable is trying to reference a joker i already renamed
do i just throw my modpack out and put it back in like a computer tech
https://gyazo.com/f570f2d50f0e74ba960fe7502ea23bca video of effect resolving as i described, but not as desired
Heya, I'm trying to make my Jokers to have a rarity like 'Miku', but the 'Common' Rarity still being there, just an extra tag I suppose? How would I go and do that?
if context.cardarea == G.play and context.individual
also if you just check if the ID is even, you're including queens (12) and aces (14)
My function accounts for face cards and aces, you can even see in the video that they don't resolve. Thanks for the heads up though, i'll try the context listed here
yeah just wanted to make sure you were aware. mb I didn't actually see the video
hmmm provided context doesn't account for steel cards scoring from hand. Hmm, might leave this card for now :/
been awake too long 😅
That’s one very bad apple
ok i'm just dipping my toes into modding and trying to understand the basics, are all the jokers and their effects just defined in card.lua?
yes
but here's the kicker
real
ok another question, where are the joker sprites defined?
like which sprite corresponds to each joker
i can't find that in card.lua
its in game
P_CENTERS has the sprite pos for all the jokers in their corresponding table
(unintended)
no clue what you're cooking but you go girl
i mean
they are pretty rare anyway
same sort of deal as spectrals
I'm adding a joker
how balanced is this
1 in 1 for aces or 1 in 11?
if its 1 in 11 then its probably fine
Hand must contain 9
ignored, only goes for 5-10s
oh yeah its fine
ok one more question, say i wanted to add a sprite on top of a joker that was purely visual, would i do this by adding an enhancement that does nothing, adding a sprite to soul_pos or some other way?
cant wait to spell out pi
or e
check out SMODS.DrawStep
i should probably rewrite the description if you thought it applied to aces though
can anyone help im learning to mod balatro and keep getting the failed to collect file data for atlas
or just add another line ig
what mod is this?
name is auspice, not out yet
ahhh okay, i was wondering because i searched for it!
and nothing came up
looks cool!
all the stuff for the release is like nearly done actually unless we decide to add more stuff before that which probably wouldnt take too much longer anyway
can someone help me im learning to mod and keep getting this error
your image file probably either has the wrong name or doesnt exist in both the 1x and 2x folders
ive checked that still after renaming and changing the code to match still same error
Is there a way to make certain jokers show in a different category in the collection?
as in, place them in the tarot category? Or a fully custom category?
Fully custom.
omg real
@verbal wyvern it continues
Is this one just an 8 vers of Cloud 9
The words Joke make me assume its gonna take away money or something
how would i make a tarot card rarer than the others
i don't fully understand how this works ngl but i'll look for some example mods that use it
idk why, i find it so funny that public transport is there
chariot
oh, are these modern day versions of the tarot cards?
oh yea, i can see that too
it makes sense to choose public transport, but i do love the idea of the opposite of public transit being chariots, rather than just cars
:>
Madotsuki - Hands played 1 minute apart from each other grant 1.25x Chips
Knife - +1 Mult. Every destroyed Playing Card grants +1 Mult. Destroy each hand played every 1 minute.
Lightswitch - 1 in 64 chance to grant +64 Mult.
Traffic Accident - Playing during a red light grants x1.25 Mult. Playing during a green light grants x0.5 Mult. Lights change every 1 minute.
Kalimba Channel - KALIMBA!!!
Numbers World - Grants a random mult every round.
Joker Ideas for Yume Nikki World
holy yume nikki
Good schmorning chat
good afternoon dilbert
dang its already afternoon for you
i done slept thru ur day
only 0815 here :D
timezones, how do they work? haha
wait till you see what i did with the 8 ball
it's 2 here, finished with work already on my end 😛
i mean hey at least its time to just vibe then
i gotta figure out what i want to do today, ive been slacking mod wise and only fixed some things yesterday, not alot of huge content
ideas are looming though...
SMODS.Atlas{
key = 'welder',
path = 'Jokers.png',
px = 71,
py = 95
}
SMODS.Joker{
key = 'welder',
loc_txt = {
name = 'Welder Joker',
text = {
'All played {C:attention}#1#s{} become',
'{C:attention}Steel{} cards when scored,',
'rank changes every round'
}
},
atlas = 'Banker',
rarity = 1,
pos = {x = 0, y = 0},
config = { extra = {
rank = 'Ace'
}
},
loc_vars = function(self,info_queue,card)
return {vars = {card.ability.extra.rank}}
end,
calculate = function(self,card,context)
if context.end_of_round and context.game_over == false and context.main_eval then
message = "i weld"
end
end
}``` so what did i do wrong chat? Error shows up when i use DebugPlus to discover the card
What do we think of these?
your atlas' key and the atlas string in the joker declaration don't match
tI know nothing about Yume Nikki, so the flavour is lost on me, but I assume these are effects that can happen during the a blind, if you're in that specific world? I think the lightswitch's odds might be too low for them to ever be something you take into account, and are practically never relevant, but it might be fun to just get super lucky and win a blind you'd lose by getting +64 mult
Oh no. They don't just happen in a specific world, they're Jokers that you can only obtain in that world. Though that does give me an idea for later jokers... Hmm... The lightswitch is a reference to the Uboa event, which has a random chance of 1 in 64, but I'm probably gonna change it to something more reasonable. Like 1 in 6.
I think I might change it to 1 in 6 chance to grant +6 Mult and a 1 in 4 chance to grant +4 mult.
i'm probably doing something incredibly wrong here
you have two = signs after the calculate
crazy how that is still valid syntax 
I get why you're doing it that way, but the vanilla way of writing jokers doesn't translate properly to SMODS!
or if your card is a joker, for that matter. you already know that
ah, makes sense
ah, "extra" isn't also doing what i think it's doing
which means i probably am using the wrong thing here
you haven't actually defined extra, so it can't actually check the extra table to see if there's a value called money
you're still missing a config for this joker
How do you add the little banners at the bottom of the Joker?, for example: [coded by ____]
config = { extra = { money = 5 }}, i assume?
you don't have a config
hm, doesn't work
Dear everyone. If I ever successully get the calculate logic right on an edition the first time without crashing the game, You will know I have been replaced by a robot
on line 38 this time
yeah no your calculate function just has bad logic
whoops
you're using context.other_card without checking for what context you're in
(you also don't need to check if the card is debuffed)
hi folks, is there a way to tell by looking at card. if i am a joker or not?
<card>.ability.set == 'Joker'
i assume then i surround it all with if context.cardarea == G.play... then... end?
...
How would I change the pivot point of a card?
-# oh i didn't see this bit in the docs
this is my first attempt at doing multiple jokers in one lua file. Is this right?
71 x 95
px and py should be the size of one sprite
and the pos for each joker should be based on that size
{ x = 0, y = 0} for the top leftmost sprite
and can anyone help me for some reason my sprites arnt being put onto the joker
{ x = 1, y = 0 } for the one to the right of that, etc.
the pos isn't in terms of pixels
y = 0 -> 0 * 95```
basically
:3 dont ask why it looks ugly
hello bepis
my sprites are not being put on the jokers for some reason pls help
"Atlas"
if I wanna add ui elements to the screen, do I just add them to G.GAME.[myvariable]?
i do it directly on G but idk if that's the best practice
i thought I was finally confident enough to add this feature but i'm not feeling confident writing this code, haha
whatchu adding
G.GAME is for anything specific to your run and needs to be saved
UI elements probably don't fit that description
Ok so I fixed it and did a run with the welder and I'm not seeing the message. Am I calling the command wrong or is there something wrong with the context?
UI function stuff usually goes under G.FUNCS or G.UIDEF (or literally anywhere else if you're calling it directly)
you're not returning it
you're just setting a global variable message
return { message = '...' }
Ah
I thought the function was called message
So putting that in will give a little ui message like Gros Michel's "safe!" right?
nvm i think im cooking
hello hello
I'm adding a voucher that makes it so the confection consumeable can stack in your inventory, so I'm making it so that if you have the voucher, and get more than 1 confection, your consumeable slot gets a Snackbag card, which opens a cardarea in the famed middle right of the screen section, when highlighted, containing your confections. I just want the cardarea to look similar to card info ui, though Maybe I should drop that
sounds cool
im going to put stuff in the middle right too just to be cool like everyone else
can someone tell me what im doing wrong here, i want to check if two either 2 kings/jacks(or 1 king & jack) are played, if true then create judgement and the fool
its not crashing, just isnt working!
Hey guys, I made an edition that plays similarly to hiker, I am trying to add a loc_vars to show the current chip growth that has happened, since jokers and things won't show their +Chips like a playing card will
But it crashes in the edition code saying that it can't index card.ability
key = "secretRare",
loc_txt = {
name = "Secret Rare",
label = "secretRare",
text = {
"Gains {X:chips,C:white}+ #1# chips{} when scored",
"{s:Inactive}Currently {X:chips,C:white}+ #2# chips{}"
}
},
discovered = true,
unlocked = true,
shader = 'secretRare',
config = {
chipGrowthRateSelf = 5,
chipGrowthRateOther = 2,
chips = 5
},
in_shop = true,
weight = 80,
extra_cost = 4,
-- disable_base_shader=true,
apply_to_float = true, --false,
loc_vars = function(self, card, context)
return {
vars = {
self.config.chipGrowthRateSelf,
card.ability.perma_bonus}
}
end,```
I'm just not sure how to actually position UI elements on the screen, haha. I've got it working as a regular cardarea, so I might keep it visually at that until I figure out how to do the UI neatly. The main thing I think helps by adding actual UI is that I don't have to worry about it overlapping with other mods' custom cardarea, because I can make it clear mine is temporary, and also put it on the very top layer
im not entirely sure of this bc I've never made an edition but i think for tooltips the card is a fake card
face_card_count resets to 0 after each card is checked
Ahh that makes a lot of sense. I guess it would not be possible then to display the accrued chips bonus. It would just be a little treat / surprise
you need to do a loop over context.scoring_hand in another context like context.before
so instead of individual, should i put context.scoring_hand?
sorry im really bad at like...text instructions :)
calculate = function(self, card, context)
if context.before and context.main_eval then
local face_card_count = 0
for _, pcard in ipairs(context.scoring_hand) do
local id = pcard:get_id()
if id == 11 or id == 13 then
face_card_count = face_card_count + 1
end
end
if face_card_count >= 2 and (#G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit) then
G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
G.E_MANAGER:add_event(Event({
func = function()
SMODS.add_card({ key = "c_fool" })
SMODS.add_card({ key = "c_judgement" })
G.GAME.consumeable_buffer = 0
card_eval_status_text(
context.blueprint_card or new_card,
'extra', nil, nil, nil,
{ message = localize('k_plus_tarot'), colour = G.C.PURPLE }
)
return true
end
}))
end
end
end
you do charitable work thank you
with SMODS.add_card there isnt a point for loc_vars for info_queue for c_fool right?
since that was in my old code ^
you still need that if you want the tooltip
it might be the card_eval_status_text, try removing that
one second
or change context.blueprint_card or new_card to context.blueprint_card or card
amazing
i have read the docs
can confirm i was stupid for not reading the docs
(it works now and all my questions have been answered)
oh yeah i guess i have to figure out how odds work now
this works perfectly, thank you!
does Oops just work with everything
at this point i have to credit you 😭 you are my saving grace
whats the key of steel cards?
there's a global variable for the base odds so as long as you use that then yes
'm_steel'
ah, where is it in the docs?
that's vanilla functionality so it's not documented
G.GAME.probabilities.normal
gosh
whats the context for card scoring? like if i want to modify a played card whats the context for that
wait i assume this is the numerator, right?
yes
How would I change the pivot point of a card?
Like where the card goes after I release it
do i need like #1# to make this work?
you need to return them in loc_vars https://github.com/Steamodded/smods/wiki/Localization#loc_vars
to add something like Miku&Friends theyre called Badges right?
whats the command to get a card's rank?
:get_id()
with whatever card you're checking before the colon
colour = G.C.MONEY, what are the available options for this?
is there like a list of them all?
yes, in globals.lua
does anyone know where ASSET_ATLAS is defined in the source code?
config = { extra = {
rank = 14,
mult = 300
}
},
loc_vars = function(self,info_queue,card)
return {vars = {card.ability.extra.rank}}
end,
calculate = function(self,card,context)
if context.before then
local welded = {}
for k, v in ipairs(context.scoring_hand) do
if v:get_id() == card.ability.extra.rank then
welded[#welded+1] = v
v:set_ability(G.P_CENTERS.m_steel, nil, true)
G.E_MANAGER:add_event(Event({
func = function()
v:juice_up()
return true
end
}))
end
end
if #welded > 0 then
return {
message = localize('k_steel'),
colour = G.C.SECONDARY_SET.Enhanced,
card = self
}
end
end```why isnt this steeling aces?
i used the code from midas mask but its not working :V
Chat are there any good resources to look at how the seed system works for balatro?
Bump
how to fix the card.ability.extra.perm_hand_count = G.GAME.current_round.hands_left so that the perm_hand_count will not have a nil value
one is card.ability.extra.perm_hand_count, while the other is card.ability.perm_hand_count
thank you
ah, i'm trying to get the odds text to dynamically update with Oops like the vanilla jokers, but it doesn't seem to work
i have tried to put GAME.probabilities into the config but it does spit out an error if i do so
Don’t return your extra value
Return the variable you want to return
The calculate function on consumeables doesn't work exactly like the joker one, right?
I'm pretty sure it does
I didn't really do anything different for my consumables
No
Don’t do that
Just return the variable
so when you're adding Oops compat, you want to start using G.GAME.probabilities.normal for the numerator in your odds
lemme send an example
.
there is already oops compat
oops works
i want it to update with the description text
yeah
Oh, really? That makes this all a whole lot easier. I've currently got my custom consumeable set up to create tags, but I wanna switch over to them having the same functionality as those tags, but remaining in their card area until they're used
return it in your loc vars
Also to stop the player from stacking their uses
Just return the variable
loc_vars = function(self, info_queue, card)
return { vars = {(G.GAME.probabilities.normal or 1), card.ability.extra.odds}}
end,
No need for the second one
At least they’re not currently using it
yeah
yeah
tbh I have a similar thing going on with my consumables
except you can't sell or use them 
that was me lmao
ayy!
...that was you??
like
earlier
I SWEAR TO GOD IT WASNT YOU SENDING THE IMAGE 💔
IM NOT GOING TO THE ASYLUM
perhaps you should look around and see where you are
then, take your meds, i cant leave until you do
nope it's only me 😭
WHAT
I dunno who else you were talking about
I mean, someone could've sent an image involving the gameplay
but I'm the only dev rn
couldve been you just didnt see his name if he was the poster
could always do an image search otherwise
I should try your mod soon, honestly. I enjoy the look but I somehow decided I wanna play Friends vs Friends before trying it so I can understand when you're being clever, haha
LMAO I wish I was more clever 😭
ah i guess if there's nothing clever there I can just play it tonight 😛
true!
the second I learn how to use shaders it's over tho
there's gonna be so much content added
a new weapon I'm adding does involve a shader, so I need to know how to make them not ass 😭
all I have for now is Green
Green
Green
Green
Green
the green is fine, but I also want to make a fire shader
and that's going to need to be better than just Orange
Colour Inaccurate - Suit Conditions are ignored
I wish 😭
A really bright and reflective orange
it's supposed to be a poison effect
Bump
hihi! what does this error mean?
uhh, would be easier if we can se the code
SMODS.Atlas {
key = "TB",
path = "Trouble Brewing.png",
px = 71,
py = 95
}
SMODS.current_mod.optional_features = { cardareas = { unscored = true } }
function count_enhancements()
if not G.playing_cards then return 0 end
local enhancement_tally = 0
for k, v in pairs(G.playing_cards) do
if next(SMODS.get_enhancements(v)) then enhancement_tally = enhancement_tally + 1 end
end
return enhancement_tally
end
SMODS.Joker {
key = 'washerwoman',
loc_txt = {
name = 'Washerwoman',
text = {
"When acquired,",
"do nothing"
}
},
config = { extra = { is_character = true, is_good_character = true, is_townsfolk_character = true } },
rarity = 2,
atlas = 'TB',
pos = { x = 0, y = 0 },
cost = 7,
loc_vars = function(self, info_queue, card)
return { vars = { } }
end,
blueprint_compat = false,
perishable_compat = true,
calculate = function(self, card, context)
end
}```
does your filename have a space in it?
yep
Have you made sure there are "Trouble Brewing.png" in both 1x and 2x folders?
AHA WAIT NO I KNOW WHAT I DID WRONG 😭😭😭😭
😭😭😭😭😭😭😭 i don't even have the atlas image -w-
sorry!!
just forgot to export it, is all 🤡
is there anything wrong with this? why am i getting attempt to index field 'atlas' (a nil value)
😭
Where does the Cryptid main menu card being defined
Try adding atlas_table = 'ASSET_ATLAS' in the atlas
same thing
didn't add it bc it's supposed to be predetermined to asset_atlas iirc
OHHH
i know what could be the reason
what does the message = localize('x') do? like how does it work?
nvm 😭
there's a part in your localization files called dictionary
it pulls values from there
the only thing i can do to make it work is by typing in 'k_gold', but i searched through all the game files and couldnt find an establishment of that name so idk where it even gets it from
it makes translating your mods easier
Is this about Mafia/Werewolf?
it's Blood on the Clocktower :D
similar to those two, but everyone has a unique ability
(well, in most scripts)
(Farmer, Legion, etc. can appear several times)
Idk anything about it but I’ve seen a YouTube channel that makes videos about it
could be Good Times Society too, haha
I don't remember if Victin was into Dropout content
oh uhm, a fun difference between it and games like Mafia is, some characters are good, but have negative abilities, and some evil characters aren't the main target
No
dropout 🗣️ 🗣️ 🗣️
ah neat ^^
damn, only 630 inscritos
They’re a game designer so they’ve made custom roles
scripts
Whatever the Joker equivalent is