#💻・modding-dev
1 messages · Page 239 of 1
if you're using steamodded the steamodded wiki is a good place to start.
also check out https://discord.com/channels/1116389027176787968/1349064230825103441
soul_rate is meant to be used for rare cards like the soul that have a chance to replace any card of a given set in booster packs
I was looking to make some of the consumables from some mods rarer
Ah... is there another way to change the likelihood of seeing certain cards in a booster pack?
Oh, shoot. I just realized this probably only affects booster packs.
hmm
John aura
cards affected by soul_rate are "hidden" and can't be found outside of booster packs
if you want rarities, you'd have to add rarities to a consumable type
Does someone have some simple code that I could look at for reference to help me when creating my own mod? I’m just now getting into coding
that includes assigning a rarity to every consumable of that type
when will you stop 😭
tbh find a simple mod and skim through that. or the steammodded wiki is probably good too
so barring that, there's no realistic way to change how often a specific card spawns? damn.
sanity check: is discovered a valid boolean i can expect to find inside a joker's table?
like this isn't the exact structure, but something like card.discovered
When you tell me to
yeah but if you wanna know if a joker is discovered you need to check the save file instead i'm pretty sure
the discovered boolean in a joker only defines if it is discovered by default or not
without rarities, there is no middle ground between the default rate and only being able to spawn in booster packs at a fixed rate
this is due to pools not being weighted
damn
please stop calling me john aura
ok aura smods
Agh, I'm real sorry this turned out to be a dead end...
john skibidi
i think there is a way to do something similar though
well i'm asking for a patch of generate_card_ui()
how can i check the save file to see if the joker is discovered
nvm, i can just check against card_type in that function
SDM0's stuff has a deck that makes his modded jokers appear more often
surely you can do the inverse?
Is it pronounced "S-mods", or "Smods"? 🤔
nah you're good man, we tried lmao
S-mods
ssmods sounds like a food
like smores
laurel
but stupid
no it's clearly white and gold
it might actually be green needle
i'm movin the needle
Okay john
another thing which is simpler than giving rarities to every card of a type would be to have separate consumable types, they would have controllable shop rates
however booster packs would have to explicitly combine them at some ratio
@verbal wyvern the remakes continue
🥳 🥳 🥳
The chad chad 😭
YIPPEE
how do i destroy a card from another card's seal?
we're getting closer
rejected Joker for Ortalab: "Predictability" (Chaos Theory)
I still think mythos cards are the coolest looking thing
How is it done with Jokers? When a Joker destroys a card in the played hand what's the logic flow look like for that?
Is there an example somewhere?
each card in the played hand is checked by every joker and by itself to see whether it should be destroyed
Whoa
I know there is "press_play(self)" but what do i use for discards?
ooh is the shader modified?
looks really good
I can only wish I can draw this well
how do i check if every card in the deck is identical
if you figure out destroying cards in seals lemme know cause i am also trying and failing lol
im trying to check each cards ability table with the first one but that isnt working
im barley into coding for this game (or at all) but can there be line breaks in the title of cards
asking for this
i can 100% shorten it to PetroDraconic Apocalypse but i want the bit in so bad
the reference
What's the most effective way to start to implement unlock conditions? You basically just define check_for_unlock() functions on the joker and return true if you want it to be unlocked? My only curiousity is when check_for_unlocked() is fired, because I see a bunch of instances where vanilla code manually sends an argument for the unlock from somewhere, but I'd rather it be relatively standalone
Also, does locked_loc_vars and the locked card description target a specific key different from the main one?
Oop, I see it. "unlock"
not in vanilla but you could mod it in
idk I think Bunco does it tho
I know there is "press_play(self)" but what do i use for discards?
Welp, it seemed to work!!
idk but I do know there's a discard_cards_from_highlighted
and I imagine the discard equivalent calls that function
Does anyone know the function for destroying a random joker card?
Is there any functional difference between G.P_CENTERS and SMODS.Centers?
SMODS.Centers doesn't have vanilla centers
But does G.P_CENTERS have all modded centers?
Are there contexts for before held in hand cards trigger and after?
i'm using 3 celestial objects in my mod but i'm not sure if they've been used in another mod
they are heliosphere, hills cloud, and oort cloud
Do playing cards have these suit/rank strings as keys somewhere on their tables (this is from the Poker Hand example), or do I have to construct them manually from suit and rank?
Hmm... I'll probably have to construct it anyway to make sure I account for editions/enhancements/seals as well too
How to make a random Joker be discarded by a modded joker
So, the Negative edition doesn't simple invert the colors, does it?
resources/shaders/negative
idk how to read shaders
but it looks like it does a lil more
ah
man then I need to figure out how to apply that shader manually
I wanted to make an inverted version of Photograph that actually matched the Negative shader, but that seems beyond my current skillset, so I'll just stick with inverting the colors
Is there a way I could add chips or mult with a consumable or is that stupid?
Trying to think about how it would work
Doing a color negative is close enough in combination with the negative shader. AFAIK the reason why Negative isn't a direct inverse is to avoid how often inverted joker makeup (becoming black instead of white with emphasized lips) vaguely looks like blackface caricatures
I did a negative swap for a joker to do this effect with it being a negative, because part of the effect involves swapping its edition to negative for a portion. The last one is what the negative sprite actually looks like
Like yeah the colors aren't exact, but white for example is basically a direct inverse, and the other colors get close, aside from the negative lamppost being more yellow than the original green, and the yellow staying bluish
Are there contexts for before held in hand cards trigger and after?
Doing what hiker does should work
i peek in here and immediately see comedy
I meant more like directly adding to the score but since you would be using the consumable outside of calculation that probably doesn't make sense
I think that's possible in some capacity.
is there a context for on hand level up? trying to see if i can mod something in that like doubles the effect of planet cards basically
okay there can be comedy in a serious effect let me LIVE my psychic powers throw the furniture around
fair... :3
truth be told, i think it'd be funnier if it was one line
itd be funnier but also i think more annoying than one large block? might be less annoying iunno
much to be considered,,,,, will be asking the boys in the lab about this
is there a way for a joker to check if it's in your joker build? and not in the collection tab/a joker pack etc
actually, wait i know how
add to deck/remove from deck
manually flag it
if card.area == G.jokers
(possibly not 100% accurate, but you get the picture)
is it possible to check if other mods are installed?
looked but didnt see anything in docs
Yes, example:if (SMODS.Mods["CardSleeves"] or {}).can_load then
next(SMODS.find_mod('mod_name'))
Hey all, looking for some guidance. I'm trying to add new decks with my mod and have some things I need to test out. I was finally able to get the game to recognize that my mod is active but the decks aren't showing up. I have them in a file deck.lua, what do I need to put in my main.lua to register them in the game? Thanks in advance
At the top of your main.lua, you would insert the below function so that it loads that file. Works as well for other items, just change the path to the corresponding .lua file
assert(SMODS.load_file('items/deck.lua'))()
Thanks, I'm still not seeing my decks added to the collection so I assume there must be something wrong with deck.lua
?
Is your deck.lua code correct? Usually, if something is wrong with a line from that file, it usually just stop loading that file altogether, making the rest of the file not load.
A screenshot of the code can also allow us to help out as well
target = '=[SMODS _ "src/utils.lua"]'
this is the proper lovely syntax to inject into another mod correct?
omg hi
what the flip
:D
Are there contexts for before held in hand cards trigger and after(at the end of rounc)?
the second one is context.end_of_round and context.cardarea == G.jokers
the first one is context.before and context.cardarea == G.jokers, i Think. this will take place before any scoring at all
how would i go rendering shaders on the UI
for example i want to have fire on my hardcore challenge UI
Anyone have a fully in depth, step by step, way to create a booster pack and add my custom jokers into the pack? Looked through the wiki and kinda got fully stumped, especially when looking at other mods that add packs for example and most are doing consumables only
How can i make this trigger the end of round enhancements as well? I know how to but i need a context to set the vaules back as well.
what mod?
just started modding today.... is this even possible to do.
yes
hydro...?
Genshin Impact???
how to make the tooltip properly?
capital O in Other
Can’t have shit in detroit
is there a way i can like, reassign the tags at the end of a vanilla planet card's tooltip? like for example, dwarf planet on pluto
make challenge where all playing cards are debuffed as if you're always playing verdant leaf
chicot is also debuffed
set_card_type_badge = function(self, card, badges)
badges[1] = create_badge(localize('k_akyrs_constellation'), get_type_colour(self or card.config, card), nil, 1.2)
end,
ok i buffed the hibana to be hardcore
my brain is fried tryna make something without prior knowledge of lua 💔
did you put it in loc_vars
let's say i wanted to replace earth's k_planet badge with k_planet_q, how would i do that 
i just deleted that part of the code cuz i dont even know how to make it retrigger in the first place
you change the k_akyrs_constellation to your key
i cant really find a good guide for making mods online
bump
time to violently explode
...wait, how do i refer to the card 
i am basically painting over all the planet cards with other things
and basically beneath the curtain, i want to change the "planet?" label at the bottom of planet x's tooltip, as well as the "dwarf planet" label under pluto, ceres and eris to the standard "planet" label
& change neptune's "planet" label to the "dwarf planet" label
does that make sense 
you'll have to take ownership
thought i might. what do i do once i've done that
you set card type badge in take ownership i believe
...i see
.
im trying to add emojis to balala
so set_card_type_badge() is a normal function inside card? or
pretty much
how do you make a canio that targets a specific enhancement rather than face cards
pretty sure you can just overwrite vanilla strings by redefining them in your own localization files?
so that'd be
k_dwarf_planet="Dwarf Planet",
and
k_planet_q="Planet?",
yes. but i am trying to change what has what k_ thing
ah, okay then yeah in that case taking ownership makes more sense
...SMODS.Consumable returns the created consumable, right?
can someone explain the whole "take ownership" of a joker thing? If i start with SMODS.Joker, and say i wanted to change the functionality of Canio to make him ^MULT, how would I go about this?
not the ^MULT thing, ill grab that from cryptd, somehow
just the
take ownership of our dear white jester
SMODS.Joker:take_ownership('caino', { -- your changes here })
https://github.com/Steamodded/smods/wiki/API-Documentation
hey sorry i haven't been able to help im doing some exam
all good 
peak exam items
ok back to codinmg
...didn't work 
i think it's c_neptune
wiki says class prefix isn't required though
i'll try it, but
i see
do you know how to change the colour that {C:planet} is
What is this
difficulty for the challenge
Looks like more I hold this idea, the worse situation become https://discord.com/channels/1116389027176787968/1327631393857208382
😭
I AM SORRY
IT STARTED FROM @manic rune SAYING MY CHALLENGES ARE TOO EASY
Stakes: exists
Btw for this mod I was planning make a SCROLLBAR
comically complicated ability
Damn, if tanke into account that developing mod for "more controls" takes so much time, how much time I need to make basically API mod for this big chunk of game where single available way to do something is apply patch 
😭
Also in my plans was make smth like OST manager, basically Trance mod but for music

@primal robin I'm sorry for breaking your idea entirely
how to localize this properly
bl_modprefix_distorted_fate
If I have my cardarea: local a = CardArea(1, 1, 2, 3)
What does the 1, 1 do?
x y of the area
So position?
yes
its still error for some reason
what's the key of the bling
also yes you don't need loc vars for this
so it be bl_modprefix_keyblind?
like what did you set as the key
cat on the keyboard ❤️
the line G.playing_card = (G.playing_card and G.playing_card + 1) or 1 shows up a lot in the code, but I haven't really been able to spot it's use. What functions use the information stored in G.playing_card?
oh the copy card function, of course
damn i gotta scrap the black hole seal cause it just makes ghost cards 😔
what's the intended effect?
if played, after scoring, destroy other scored cards and add their values to the black hole card's
Oh, that's pretty doable, I reckon. I assume seal logic works similar to enhancements (I haven't touched seals yet), but you can check out the way I've implemented demonic cards! Those sacrifice all non-demonic cards in a scoring hand
I think the code for that is just in the demonic.lua for the enhancement, and in the lovely.toml for the patch
ah yea
Well I definitely use a small patch, haha
i dont quite understand patching but i will give it a shot
The patch you need to do for this is going to be really small, so i wouldn't worry too much about it! It's the level of patch that's probably a good introduction to it 😄
i hope i manage to get it implemented, i'd hate to scrap the poverty card lmao
It's entirely doable, you'll definitely manage!
ok so im looking through the lovely.toml and what im getting is, target, pattern and position decide where the code is added in, and then payload is the actual code you insert
this seems simple
ish
Destruction logic was a bit confusing to me at first, but it makes a lot of sense once you realize that you basically only want to destroy cards through contexts, and never call card:dissolve() yourself
yes. If you want, you can try to just patch in some debug or print statements, just to see how it works
the lovely dump contains the code with all patches included, so you can also check there if you're code isn't doing what you're expecting it to do
though now i need to consider what will actually happen if multiple black hole cards are played together
do they just collapse and destroy the entire hand for absolutely no benefit? lmao
i assume for detecting a seal it would be something like SMODS.has_seal(card, 's_boplatro_blackhole')?
I haven't done anything with seals, but if that function is in the documentation, then I assume so, yes
how do i make a mod that customises the starting deck? ive copied the absolute deck example but it doesnt seem to work
in all honsty i kinda just assumed that if it has a has_enhancement() itll probably have one for seals
can someone send me the 2x base balatro folder? i lost the original and i really need a fresh one and steams verify files thing aint workin
nvm
im dumb
7zip was open lol
should a joker that reads 'you cannot draw cards' overrule or be overruled by the serpents effect?
the words never and always are in a bit of a stalemate, so I'm trying to figure out whether it's going to make more sense for a boss blind or a joker to take precedence
make them negate eachother maybe?
considering Burgular overrides The Needle?
idk
i would say it negates serpent yeah
Burgular can give you + hands on a Needle blind
so i think jokers always take precedence
hey while im here is anyone good at pixel art and such?
having a weird issue with my hologram reskin with GIMP
I was going to make a case for that relating to the order of operations when it comes to changing the number of hands you have left, but I think the feeling still holds that the joker'd overrule the boss blind
chicot does, anyway 😛
i don't use gimp, but i have some knowledge of pixels. what's the issue?
nothing wild but
here look
so
we got bro here
we got the holorgram card here
in game though? nothing shows up on holorgam card
and to test this i put a big fat smiley face on my holoram soul and only the smile showed up right
i think it has something to do with transparent pixels not like
properly rendering?
any advide?
i mean bro is certantly here
Oh my god they're all mewing
is it exported to both the x1 and x2 file? and the layers are properly exported as well?
The virgin Vagabond vs chad Baron
not my original work lmfao. im just going through and changing all instances of "joker" to "jorker" stuff like "egg" etc
just making a big texturepack for me and my friends that combines all my favorite balatro texturepacks lmfao
i know
comical placement of those two
egg
egg
x2 is REALLY fuzzy rn cause original file was x1
i tried to upscale it and it just looks like garbage in game
you gotta make sure you're upscaling with nearest neighbour algorithm
anything else sucks with pixel art
that's probably part of the issue somewhere
no cause 2x only kicks into effect with pixel smoothing
and worst part?
i deleted the 2x folder lol
before i messed with the image it WORKED in game with only a 1x folder
in fact watch this
downloading the orignal texture unedited it looks like this
quick question, are you working on a file of another texture pack?
isnt that legendere jokers
oh, i see
just doin shit
just to be sure :3
oh sweet, love the name changes
the mod is just gonna rework the legendaries right
and i changed the nameplates
making them slightly better for late game
and i wanted to use his art
and he is fine with merging mods as long as i credit yadda yadda
the texture pack with the mogging jokers is just like
also, is the name changed legendere jokers texture pack a separate mod?
a merge of all the funniest textures i could find for balatro
or is it fused with your textures too
as of now no
oof
when i release the mod with the changed mechanics yeah
his art
my name changes
my new functionality
etc
kinda hoped it is, i really like the changes but i dont think they fit with mewing jokers 💔
LMAO
they dont
this texture sheet again
is for my friends
who dont wanna insytall the modloader
non distributed just me and them lol
icic
but the hologram card is now getting fucked up
like i think i know why as well man
its fucking gimp going out and just
not handling translucent pixels wll or smth
oof
thats annoying
you should probably switch to krita imo
its free, and i find it better than gimp
oh myg od im stupid
ill give it a whirl
im doing
has_blackhole_card = true
if not has_blackhole_card then
first_blackhole = i
end
my genius
it frightens me
💔
ugh thats annoying
gimp changes the colorformat
so i gotta go thru
and remake this whole fuckin shit again
oof
ayy i got the black hole card to destroy the other cards!
now i just gotta figure out how to increase the values
it even properly synergises with revive
in fact thats. thats kinda terrifying
Looks Kinda Fire
a card that absorbs all other cards values by destroying them, and a card that duplicates when destroyed
thankya
🥀
again he did the actual pixel art i literally just changed their nameplates
still Fire
gl with ur exams
i got no clue how i added a different page
I think holograms soul just needs to be slightly transparent
I dislike how these look but idk what to change abt them
🤷♂️
ah
I haven’t bothered looking at that
i just want to give this page some flare that's all
ty tho
i guess I'll have to figure it out myself
yeah i saw something along the lines of flame handler
flame handler must be the coolest job to have as a tron-guy in the balatro code
maybe i should switch out stars for sprites
also i think love2d doesn't support coloured fonts?
like i tried using emoji fonts
sometimes i have a stroke reading through my own code
but it didn't do anything
I don’t think the difficulty rating feels properly attached to the name of the challenge
the difficulty rating reminds me of osu ngl
maybe i should encapsulate the challenge button inside the translucent box
That would help
I also think some spacing between each challenge chunk would do the trick too
also i could try to make the flame go up in case of hard difficulty
that would be so cool
how would you average ranks using the smods rank api
i mean i could manually make an order but that seems annoying
what text formatting is used for greyed out text?
C:grey
thanks lol
C:inactive actually
do i win the longest info box competition
No
didnt think so
Not even close
tl:dr joker incoming
Nah I think bepis wins that category very easily
JESUS
true
bepis has PAGES of descriptions
@manic rune show them
Tldr is just a load of random crap that isn’t important
what does that even do??
lol
whats the easiest way to get the total values of a card? like total chips/mult/etc including edition+enhancement+seal
you recursively sum it up™
damn
Maybe i planned too many
i've spread my joker sheets up, just for my own sanity, haha
is that 50x50
Huh
jokers
Its 71 x 95
yeah but how many of them per row / column
40
oh
So basically like in the hundreds
1600 jokers
How would i create a table that has cards?
you create a table and you create card and insert?
Is it as simple as:
local t = {}
t.insert("Gold")
local card
for i, v in t do
if v[i] == "Gold" then
card = SMODS.create_card(set = "mycustomset", area = area3, key = v)
area3:emplace(card)
i = i + 1
elseif v[i] == "Steel" then
card = SMODS.create_card(set = "mycustomset", area = area3, key = v)
area3:emplace(card)
end
end
Like would this work
-# (Im not really familiar with the lua syntax)
What are you trying to do? Randomly add gold or steel playing cards?
Not even close..
all that... just for a fraction of my power
is there really no easy way of getting the total chip, mult and xmult values of a card other than just summing up every single attribute that controls them
How would this even look on a card
crazy ahh fire
pages????
pages, yes.
This game aint balatro anymore
Would this work? or is it to bad to wokr
😭
oh, but mind you
i even intended to add light cones
which is just another layer of equipment
this shit
aka page 5
:3
to add a seal to all cards for a back, is it just this in func=function()
G.playing_cards[i]:set_seal(G.P_SEALS.Red, nil, true)
end```
?
thats not how you run a for loop
im getting some issues but cant figure out whats wrong
for i = 1, #G.playing_cards
i got it from the examples page
and i think you can just do
for i,v in ipairs(G.playing_cards do
and use v instead of G.playing_cards[i]
ah alr ill try that
also, if it still doesnt work then check if this is correct later, i never touched seals before but
tends to keep his keys at lowercase
Also I think SMODS has an util function to add a seal
Would this work?
-# another way of saying buymp
oh alr missed that, ill have a look ty
:3
area3 is a newely defined card area
💔
Nvm they use set_seal too, the util is for poll behavior sorry
h stands for hand, for example "Shoot the Moon" uses h_mult in their returned values
You dont know?
Gold cards uses h_dollars and steel cards h_x_mult iirc too
Do you know SDM?
Eeehh my best bet would be to look at card creating consumable code such as the Incantation spectral card or the create_playing_cards func
ok instead of G.P_SEALS.Red i just added rank='Red' to config and used config.rank and it worked perfectly
ok so does card.base.nominal + card.ability.bonus + card.ability.perma_bonus + (card.ability.seal.chips or 0) + (card.edition.chips or 0) account for all ways a card earns chips when played (without jokers)?
or am i missing some random obscure way a card can have extra chips
Is SMODS.consumable_type documented
the mochiy pop one font lol
I want a consumable, that you cant use? Would that be a consumable or like what type?
https://github.com/Steamodded/smods/wiki/SMODS.ObjectType is this what ur looking for
its listed as a subclass
i think
But like how would i create a lets say a card with the object tyupe?
Do you want to make a new consumable (a tarot, planet, spectral) or a new consumable type?
create a consumable and set the set attribute to the key of the custom type, i think?
If it's a consumable I recommend looking at this:
https://github.com/Steamodded/smods/wiki/SMODS.Consumable
(I love failing copy paste)
A custom type of card, that cant be "used"
How would i do that
create a new type of consumeable and make it so 'can_use = function()' returns false
Do i need to hook or?
no
it's just the function just like the one that tarot cards use when you haven't selected a legal number of cards
@wintry solar how about this one
though you'd hook or patch if you want the use button to not be there, i think
Whats primary and secondary color?
you would need to hook to Card:highlight, yeah
secondary colour is what colour the box that shows the card type is, like on tarot cards theres the purple box that says "Tarot"
i honestly have no clue about primary
That looks much better
gave it some room for the arrow to breathe
Hihi!!!
hi 🥕
I’d maybe put the green identifier on the bottom row
I'm almost done with my first world!!
why is rules saying the joker
Idk what to add after it tbh
This is the longest I've ever worked on a project without abandoning it
whats hand_chips, and mult
you are referring to a variable which doesnt exist
im pretty sure
vars in plasma deck
i dunno how plasma deck looks like, but you need to refer to whatever is inside it
you cant just call mult
like, you know how you need to call card.ability.extra[something]?
They do exist
You should return chips = and mult =
Unless you are purposefully not wanting a message
In which case it should be chip_mod iirc
How can i make this trigger the end of round enhancements as well? I know how to but I need a context to set the values back as well.
chip_mod worked, thank you
wha
💔 what kind of knowledge is this
the inconsistency is killing me
They’re the global values for what your chops and mult are at during calculation
so i have a card and its ability.seal.chips = 270, but when i hover over the card, according to the tooptip it's still 0?? like im doing print(card.ability.seal) and the chips is showing up as 0, but when i do eval G.hand.cards[1].ability.seal it shows 270 chips like it should
why is it doing that
I have a query
I’m trying to make a joker that gains mult whenever a card changes suits, is that possible to do within balatros source code? If so, how would I go about doing that?
why are people changing source code directly 😭
Could I please have some e assistance if that is ok?
Does anyone know how to destroy cards? im trying to make a custom boss blind
drawn_to_hand = function(self, card)
card:destroy()
end,
Are you using steamodded?
Yes
What do you mean by "within balatro's source code"?
I mean. Is there a way for balatro to detect if a suit changes, and then store that variable for use in my joker
it does have the table, what the hell
oh wait nevermind, ipairs stuff
silly me
Because it's the easiers you can do to modify game
I think smods is at the stage where its code is easier to write than vanilla
probably, but the first step of installing lovely+steamodded is still pretty big
yeah I guess
i dont know why i even struggled at this simple task :3
I has a question
description PAGES and still using info_queue is crazy ngl
look at how legendere jokers do it
are banned keys only checked at the start of the run, or can you update those dynamically?
The first one is for me
and the second is Legendere
wait
they are both the same
bruh
there we gio
-# notepad????
It’s a LUA
and I could use notepad to change it
If there’s another app I could have been using that’d make this easier then
please do tell me I’m very stupid
ok Ty
I’m downloading it rn
Oh I should also probably tell you like
How it’s breaking
Whenever one of the cards load in
It just says that the Atlas is nil
helo
ok so if doing card.ability.seal in the loc_vars of a seal doesn't actually give the card's real seal values after theyve been modified, then how do i access that information
Okay so uhm
What do I do now
:3 i actually never touched stuff regarding replacing arts of existing jokers before, so its weird it doesnt work
Hi I'm posting here because I don't know where to ask for requests so my idea was a quality of life that would prevent moving the cards after submitting a hand so that it would keep the order given by the player instead of reorganizing based on color or value. I don't know how to code personally and I don't know how difficult it can be to do but I hope my idea can interest someone except if it has already been done and in this case I would like to have the name 😅 . thanks in any case
WHAT HAPPENED HERE
spelling ig or key
damn i love triboulet
i have told you that the mod called Cartomancer exists
3 times...
I tried but didn't work
what didn't work
It keeps reorganizing
I am stupid but not that stupid
there's a toggle that says "Sort Hand" next to the cards
if you turn that off i think it does what you want it to
okay yea i did something wrong here
somethign is HORRIBLY wrong here
i can send you the rar
itself
oh
ok
Malverk is the mod that provides Texture Pack API
im assuming, since it also fucked up BlueStorm by replacing Blueprint/Brainstorm art with something else
where do I do I turn it off
😭
I don't have that
did you install Cartomancer
did you install the latest version of cartomancer
yes
show mods page
nop, i was talkign to Hirame, but hm
can you go in it
can you show me these files
click on the mod
gghghg
no, its not that, dont worry 😭
found it thank you (again)
i was about to punch the table
im confused
slamming my head against the wall
sorry
And Drunkard for TRIB
im making a custom boss blind that has an effect when you discard, i know there is press_play, but what do i use for discards?
wtf
np you helped me after all
calculation exists for blind now
i think
no not yet
-# damn
@frosty dock is still ironing out bugs i think
icic
pluh
yeah it's not merged yet
i see :3
show me le sprite
yepp
Also uh
Should probably say spoilers for the game I made these cards for
Rabbit hole
Catalyst and Yomi are like endgame stuff whoop
But anyways yea this is the file
and the code?
this is their code
i think you should do what legendere does
okok
as in vertical™️
wha
this is their code
that one is the nexus one
so it should work
ok just
how to modify the blind requirement when a hand is played
stack the pngs
i'll try the malverk version
?
and see what the code is
G.GAME.blind.chips and don't forget to G.GAME.blind.chip_text
i think the code for the malverk version of legendere is different
does anyone know any mods that add custom face card skins into the friends of jimbo menu? im trying to figure out how using the github guide but itd help to see a reference
all the ones i can find just replace existing ones
thank you :D
Maybe I can check the existing cards that change suit? Idk
I'm extracting the real time-ification part of my mod into a separate mod and I can't think of a good name for it
alright I'm giving shops a 30 second timer now that you said that
Should I make a mod that ties the price of Egg to your local egg prices and every frame updates to inflation?
12 jokers left and I'm officially through all the art assets I've made
crashing the economy to save my balatro run
Toki
yeah but actually
name it john
Toki means Time
john balatro
and is also BA character
Before I started Kino, my hobby gamedev project was a monopoly-like that tracked the stock market of a certain period to base a lot of it's things off, and if I ever finish that my dream is for that game to become super big because the current economic downturn makes certain builsd OP ❤️
my confusion just keeps growing
this seal is gaining chips. when its scored after having absorbed cards in the past, it does add the correct amout of chips to the score. so WHY does the tooltip still say +0 chips
on a more serious note I was planning to make Shiroko turn cards in the shop free but timers extend to the shop as well
what config value does gold cards use?
why is it on a timer 😭😭😭😭
funn
I reckon it's always printing the else statement for loc vars
balatro but go fast
I do not mean to be annoying but like . I am stuck
but why? ive tried printing card.ability.seal and it's not nil so the if statement should be returning true right
handy becomes mandatory
💔
I'm not entirely sure how the loc vars function checks that. But you can check Kino's code for the way sci-fi cards return their loc_vars, because that should also properly pass through the current info!
i have
im looking at m3gan.lua because that appears to be a sci-fi card, and its literally just return { vars = { card.ability.extra.lower_by } }
Oh no I mean the enhancement called Sci-Fi!
ah i see lol
. How would I view balatro’s source code again
your mod has. so much content
the game executable is actually a zip file
you can unzip balatro.exe and you'll see the source code
ok this looks simple
…lets say. Hypothetically. I am stupid and don’t know how to find balatros zip file
Where would it be again
I recommend looking at Mods/lovely/dump for the code
I see
That will have the patches made by SMODS too
Thank you
Im making a custom blind that destroys your cards when you draw them but i cant make it work tho, does anyone know how to fix that? (also my code:)
drawn_to_hand = function(self, card)
card:destroy()
end,
Also you can find the balatro exe by clicking browse local files on steam
hm, i put print("fail") in the else statement and thats not printing
I've got a job that allows me to spend a lot of time just working on it, and I'm a bit overzealous 😛
ima just try what you did and see what happens
but by using a check statement to pass through info, you can check if there's an upgrade that exists, or else pass on the base number
Browse local files
we love steamapps common!!
are you really a real mod developer if you dont have a shortcut to steamapps common on your desktop
What can I use to figure out which deck the run is using
%appdata%/.minecraft type shit
G.GAME.selected_back iirc
I've got the balatro mod folder pinned in my file explorer haha
thx
this isnt working i geuninely just think the card variable is wrong somehow
what does config look like
how do you destroy cards? I cant find anything about that
It might finally be time for me to separate out my main into different files...
:3
what are you doing
also try having just the card.ability.seal.chips stuff without all the card and or self.config... stuff
the print is returning {seal = {mult=0,chips=0,x_mult=0,money=0}}
what does config look like @next timber
What is a “badge” exactly btw
what doesn't work
then it should just be card.ability.chips without the .seal in between?
real mod developers memorize the path in its entirety
like try ```lua
return {
vars = {
card.ability.chips,
card.ability.mult,
card.ability.x_mult,
card.ability.money
}
}
C:\Program Files (x86)\Steam\steamapps\common\
Hmm... Do I wait until before or after the Custom Modifier API is made to make Effects?
I just checked the wiki and when did they change the name of the last argument in loc_varsfrom center to card?
not that it makes any difference, but it's interesting
I’m browsing the source code in an attempt to locate where it changes suits, but I can’t find the parameters where it identifies “the world”?
why are you using notepad to code
…
these boys
😭
I see
she's js built different
I'm sorry but like
nope
you're debuffing yourselves
What is a better coding software
vs code
visual studio code
they just show nil instead of 0 now
it has colours
Yeah I use visual studio code
ok thank you
vs code (i use nvim on arch btw)
vscode ftw
that's weird
😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭
this code is in a seal
But still my question stands, where does balatro define the suit-changing tarot cards? (World, Stars, Clubs, etc)
should.. be in cards.lua?
it's in cards.lua in use_consumeable
for i=1, #G.hand.highlighted do
G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.1,func = function() G.hand.highlighted[i]:change_suit(self.ability.consumeable.suit_conv);return true end }))
end
else```
Thank you
all of the suit-changing tarot cards are done here, not referenced by name
generally, all of the consumeable effects will be in that function
i genuinely just think loc_vars is being passed a fake card or some other card that isnt the actual card for some reason. because i can use eval to check the card's actual values and they're working correctly, it's just that the seal can't seem to see them
better question, why did they take a picture with their phone instead of taking a screenshot
maybe lua return { vars = { card.ability.seal.chips, card.ability.seal.mult, card.ability.seal.x_mult, card.ability.seal.money } } then? I'm certain you don't need to do all of the card and [] or self.config.[] stuff, and knowing lua it might cause some weird stuff
id bet my life rn that this is just gonna be returning 0, 0, 1, 0 but ill try
This is the modern way of doing it, stop sitting in the past god
I mean that's what you want to happen, no? That's what you set the values to in config, so that's what they should be
like you can't just do lua local value = 1 print(value) and expect it to print 2
no? in the original screenshot i included the calculate which changes the value when the card is played alongside other cards
lemme send it again hang on
and i know the number is going up correctly because in the main_scoring context i can get it to give the increased number of chips
so if i were to do this, would it add 4 to my joker every time (by calling hanafuda_mult with my new joker)? or is that not how it works
wait wait wait nvm
are you overriding Card:change_suit??
im trying to make it so that whenever card:change_suit is ran, a variable is stored
but it might not work now that im thinking about it moar
okay let's back up for a sec
instead of what you're doing to implement your idea can i ask what you're trying to make exactly
a joker that triggers when a card changes suit?
mm okay there's gonna be multiple parts to this
i thought so
First: To get a Joker to run its effects, its calculate function needs to be called with an appropriate context (which is just a table of variables containing relevant state of the game)
i'd assume the appropriate context is whenever a consumable is triggered?
you would need a hook
unless there is another aspect of balatro that causes suits to be changed, idk
Unfortunately, a card changing its suit is not something the base game cares about so the game will not call any calculation functions when a suit is changed, so your Jokers will never know about this event
that is why i was thinking that I add this line, so balatro can tell when the suit is changed
you could try to adapt the event called when a consumeable is used but that'd be clunky and would break if someone modded in a dif. source of suit changing
You'd need code that explicitly calls the calculate functions with appropriate context
maybe you could patch it to call the calculate function and add your own context to it?
SMODS.calculate_context is the handy function that calls calculate for all the Jokers currently owned
I seee
what's the correct syntax if I want to add a random edition/seal/enhancement to a card when it scores?
sorry if I'm interrupting
so making up some names, the line that'd handle this would look something like
SMODS.calculate_context({ change_suit = true, changed_card = self }
then in the Joker's calculate function you can check for context.change_suit
Where would I put this calculate context function within my code?
now how to get this line of code into the game is another matter
lovely.toml right?
you'd put it into Card:change_suit but it's generally advised to not replace an entire function of your own because it would not play nice with other mods that want to do things to that function
there's two ways to do this: Lovely patches (if you need to inject the code into an arbitrary location or completely modify the function) or hooking the function (if all you need is your code to run before or after everything else in the function)
generally if you can the latter is simpler
well yeah but that's different
how so
in the first screenshot you have .readBuffs[card]
in that second screenshot you have .readBuffs(card)
lmao
Hi how can I hook the function? Thank you a lot for your help by
btw
Hooking would look like this
-- This takes the function defined in the vanilla game and stores it into a variable for later reference
local _card_change_suit = Card:change_suit
-- We redefine the original function...
function Card:change_suit(new_suit)
-- Then call the stored reference to the original function so it still works
_card_change_suit(self, new_suit)
-- Then do whatever we want after (or before if you want)
SMODS.calculate_context( ... )
end
I had this dream of making a Yugioh style Ghost Rare filter shader, but now that I have looked at it really closely, it looks like the card game has special artwork for ghost rares that contribute to the hologram/ 3d effect.
I could get the color shifting working but it doesn't look as cool as I thought it would
question, does SMODS.change_base work for this
since its what most mods use to change the suits of cards
I have no clue
but if SMODS.change_base runs Card:change_suit then it should be fine
What if I added nightmare variants of Jokers...?
this would all be included here, right? (ignore the steammodded comment text, im using it as a template)
the context should be right but I have no clue where the set_edition, set_ability or set_seal are from. Did you define these functions yourself, and why isn't the card being passed into them? How does it know which card to do it to?
also I feel like you should be using pseudorandom_element for these
it does not
looks like it calls card:set_base
where exactly would i put the hook again?
@remote shell
Oh is that something that already exists?
-# they added corrupted versions of jokers, fyi
Oh. Fair enough
- I tried copypasting from certificate's calculate function, for the edition and ability I have no idea where to look for the methods (honestly not evene sure the set_seal one even works);
- Should I syntax it as
other_card:set_sealinstead? - I don't know what
pseudorandom_elementdoes, can you explain it to me?
oh wait nvm i see
NOT THE SMALLANT FONT 😭
the what
I have read through the calculate page on the steamodded git a couple times but couldn't find anything regarding changing a card's type
yeah you wouldn't find them there
figured
Oh cool. Nightmare Jokers would be similar but like. They also serve as a Yume Nikki reference
I only know how to set the edition which is something like ```lua
context.other_card:set_edition({ negative = true}, true)

