#💻・modding-dev
1 messages · Page 238 of 1
Lack of spacing is important there btw
mhm
which part?
so 2 * 10 = 20 not 12
and also, space it
i think inside the {X:mult...} {}, spaces are completely ignored
so you gotta space outside
{X:mult,C:white}X#1X{} Mult
probably that
'{C:mult}D+#1#{}Mult','{C:chips}+#2#{}Chips'```
:3 whats that D doing there
it doesnt really do anything asides from coloring the D red
also, you need spacing there
'{C:mult}+#1#{}Mult','{C:chips}+#2#{}Chips'```
{C:mult}+#1#{} Mult
i see, your code didnt show it :3
so something else might be the issue as well
print("hi")
--also, you need to add lua at this part
for X mult I just added an X, Instead of changing the values
..whats the issue
.extra.Xmult
all good
OKAY
it works
now i have another visual issue
it has the normal marks of + 10 +10 instead of the red block of X10
...thats because you have + instead of X
i assumed that, so if I just change the + to an x it'll work?
k
no no
{X:mult,C:white}
X represents the background of the text
C represents the color of the text
okay
s represents the size
lua '{C:mult,X:white}X#1# {}Mult','{C:chips,X:white}X#2# {}Chips'
bro lua aint working me LOL
'{C:mult,X:white}X#1# {}Mult','{C:chips,X:white}X#2# {}Chips'
nvm
figured it out
nice
How do I fix the X in X mult
{X:mult,C:white}
{X:mult,C:white} is what you wanna use for those things
X is the border/background thingy and C is just the text
right now I have this code (it's a patch) in SMODS utils.lua ```lua
if scoring_hand and SMODS.has_enhancement(card, 'm_glass') and card:can_calculate() then
local odds = card.ability.extra or G.P_CENTERS.m_glass.config.extra
local fragile = false
for k = 1, #G.jokers.cards do
local key = G.jokers.cards[k].config.center.key
if key == 'j_tecci_joker_tempered' then
odds = odds * G.jokers.cards[k].ability.extra
elseif key == 'j_tecci_joker_fragile' then
fragile = true
break
end
end
if fragile or pseudorandom('glass') < G.GAME.probabilities.normal/odds then
destroyed = true
end
end
Someone screenshotted all the colors the other day and I saved the image if you need @hasty thicket
I could just check for the blueprint's key itself and then check the joker to the right, and same for the brainstorm and then check the leftmost joker, but it just seems like there should be a better way than that
You dont need to copy any if it
its easier to copy bc my wifi bad for references
you can find that function in lovely's functions/misc_functions.lua
globals.lua is also good to look at, a lot of things (like the colors used in that function) are initialized there
I would definitely recommend extracting the base game files if you havent yet too
@verbal wyvern
the Chad Egg
Hanging Egg..
function loc_colour(_c,_default)
G.ARGS.LOC_COLOURS = G.ARGS.LOCS_COLOURS or {
red = G.C.RED,
mult = G.C.MULT,
blue = G.C.BLUE,
chips = G.C.CHIPS,
green = G.C.GREEN,
money = G.C.MONEY,
gold = G.C.GOLD,
attention = G.C.FILTER,
purple = G.C.PURPLE,
white = G.C.WHITE,
inactive = G.C.UI.TEXT_INACTIVE,
spades = G.C.SUITS.SPADES,
hearts = G.C.SUITS.HEARTS,
clubs = G.C.SUITS.CLUBS,
diamonds = G.C.SUITS.DIAMONDS,
tarot = G.C.SECONDARY_SET.TAROT,
planet = G.C.SECONDARY_SET.PLANET,
spectral = G.C.SECONDARY_SET.SPECTRAL,
edition = G.C.EDITION,
dark_edition = G.C.DARK_EDITION,
legendary = G.C.RARITY[4]
enhanced = G.C.SECONDARY_SET.ENHANCED,
}
for _, v in ipairs(SMODS.Rarity.obj_buffer) do
G.ARGS.LOC_COLOURS[v:lower()] = G.C.RARITY[v]
end
for _, v in ipairs(SMODS.ConsumableType.ctype_buffer) do
G.ARGS.LOC_COLOURS[v:lower()] = G.C.SECONDARY_SET[v]
end
for _, v in ipairs(SMODS.Suit.obj_buffer) do
G.ARGS.LOC_COLOURS[v:lower()] = G.C.SUITS[v]
end
return G.ARGS.LOC_COLOURS[_c] or _default or G.C.UI.TEXT_DARK
end
end
done
🙂
done ty
you misspelt G.C.RARITY in legendary
ty
I'm also hoping you didn't like actually just copy the function into your code but like just wrote it down as a note
this is just for reminder
Id just keep it in a txt document on your desktop tbh
Easily accessible and not in mod folder
lol
I just open the entire mods folder when developing
so I can easily look at SMODS and lovely code
im already in a workspace when working on mods, so it wouldnt be unreasonable to leave it within the mod imo
i just havea mod folder called balatro extras for mods
only way I could get even a little bit of intellisense for the SMODS API
Left most Jerker 😭😭
How grippy are the socks
redid the ENTIRE localization and renamed every instance of Joker into Jerker Jonker Jorker or Jonker
most are joker
bro replied to me
then pressed a button and replied again
considering shes gonna one day REVERSE the boss blind and make aces always wilds i would say unbelieveable
Does anyone know how the game handles the dark_edition color to change like it does?
It shifts between two colors, but where are those colors defined?
this is in update
Woah, thanks! I'm trying to make a dark_edition-like color and this is great help
SMODS.Gradient just needs you to provide the endpoint colors
[inside of joker code]
is m_molten fine if I reference my custom enhancement or its should be m_modprefix_molten?
the latter
thank you
Then just use the gradient as normal in loc_txt? Like text = {"{C:gradient}Colorful text{}"}
it doesn't get added into loc_colour by default
it's pretty simple to add it though
loc_colour('') -- initializes args in case they're not there yet
G.ARGS.LOC_COLOURS.my_gradient = SMODS.Gradients.modprefix_key
I see. Real simple implementation, then. And here I was making lovely patches and whatnot. I shoulda read the wiki lol. Thanks!
How do i get cards that mime can trigger in hand?
aight, time to figure out how to add extra booster packs to shops
check SMODS.add_booster_to_shop and SMODS.change_booster_limit
this is indeed what I found
How could I level up the played hand ? Can't find anything :c (pls ping me if you answer)
Uhh, anyone?
what's area?
im losing my braincells here 😭
error part is on v:set_ability
im trying to convert the card's enhancement into their "melted" version
no that's correct
maybe both are correct idk
whats the error
are you certain your key and mod prefix are correct?
ok Burnt and burnt moment
my god
😭
you only sent the molten one so i didnt know 😭
oh but also
can i ask why you put this inside a table?
oh its fine
if it works then its fine lol
i was just curious why you used a table instead of just "HA"
I would like to level up the played hand every 3 hands, and I coded that. The problem is when it should level up, it makes the game crash
I took the space joker's code, but it seems like I misunderstood something
just return level_up = true
-# you never need to return card = anything anymore
-# i mean, its useful if you want the message to show on other cards ig :3
Just sharing these two new jokers!
DAYUM
it's sad that this doesn't work
is there some return effect or something that you can use in context.final_scoring_step to like set the chips and mult to specific values?
the left Joker gives you random gold seals at a low hit rate. The right joker will make Unplayed Gold Seals trigger for xMult
instead of just like adding to the chips and mult that are already there
It worked, thanks !
My artist says thank you @tardy wind @red flower
(how do you wrote like that ? 🤔)
super cool !
you put ` on either side of the text
do pixel_size or display_size work with sizes greater than the default joker size? i'm trying to add a joker with a 76x76 sprite (not my art) but just can't seem to get it to work (or am i just using it wrong?)
there's no built-in effect but you can do this
return {
func = function()
mult = <specific value>
hand_chips = <specific value>
SMODS.calculate_effect({ message = 'some message' }, card)
end,
}
cute
they work for me, but if the atlas is configured correctly you might not need the pixel_size
the dimensions are still based on a 71x95 atlas even if the atlas you used has different dimensions
The duplicated sprite floats in the middle of the CardArea and gets transported to the Joker while I'm holding it, but then stays in place when I let the Joker go. Any help?
maybe you don't need the pixel_size, or you need to adjust it for the atlas size
hmm, okay
this joker is wider than normal
the sprite is 78x78 (1px border) and the actual area i want to use is 76x76
include the border btw
yeah fair
@frosty dock do you know?
How do you iterate the suits in game?
this worked omg, thank you lol i was stuck on this for days
well I'm copying from Cryptid except adapting to use SMODS, since it seemed like Cryptid wasn't
can you feed something directly to the info_queue without calling the center of something else?
I mean I assume you can and I just need to figure out how to structure it
that something being just a generic description?
does this mean that anything can use context.stay_flipped and context.debuff_hand for example? that'll be very useful to me if so
yeah
you can make a localization entry in Other and put something like { set = 'Other', key = 'the_key' } into your info_queue
https://github.com/TheOneGoofAli/TOGAPackBalatro/blob/01a4a1b3947b0c6541ea4d345fa795f6eddc4a43/togastuff.lua#L348 And you can pass vars to it.
thanks, I'll take a look into that
if your description needs variables, you can pass those as vars within that table
yeah
yoooo
Do Blinds use calculate now?
Hey John, I would like to apply a shader on a new booster pack I made. is there a method exposed in Smods to do this?
I think many objects have draw or you can define a new SMODS.DrawStep
yeah I think you can just use a draw function to do that
they will support it with this PR, but the old methods will continue to exist
Is that listed under utility functions? Thanks I will go look
thank you john smods
Did anything about handling debuffs changed, besides what we had discussed regarding can_calculate?
-# Although I think it should still be called, maybe as can_calculate(true)
currently, only context.debuff_card uses this, but of course other calculations can use it too
Is there an examlpe of how ot use DrawStep. I couldn't figure it out from the docs
uses what exactly
I don't think you need DrawStep
just a draw function
\
context.ignore_debuff to calculate otherwise-debuffed cards
also i think you just use draw function for that
omg
no more SMODS patching??
Right. When is that context called?
thank you mr jonathan "aurelius7309" steamodded
it is not
any context that has this property set will ignore debuffs
by calling can_calculate(true) in eval_card instead of can_calcuate()
I have definitely done something horribly wrong here
key = "description_holder",
loc_txt = {
name = "Effects:",
text = {
"sample text",
}
}
}```
I meant you should put a description under descriptions.Other in your localization file
it appears I have failed step 0: having a localization file
do you have an example of how to do that? I haven't messed with draw functions yet
you put the draw function inside SMODS.Booster
oops 🤣
Don't you worry pal I'm right there with you
time to check the wiki to figure out how localization files work
blind calc PR just dropped
in other news I'm about to have dinner
what are u gonna eat
is this real
:3
A card area
@quartz ravine example
diabolical² blinds please
trust
I'll take 3
aiko's new Joker
(fun fact this was the second bowl i ordered for the photo)
where is it defined
I'm gonna be making some wings tonight, bought 10 pounds of em
Above?
what is the default value for no enhancement since v.config.card == G.P_CENTERS.c_base is false when i played a default card
you should make that inside the function
Thanks!
Do jokers have a 'before draw' method? I have one joker which I woudl always like to have a specific edition applied to it
idk the answer to that but i think not next(SMODS.get_enhancements(card)) works for what you want
Nothing?
no but you can define a Draw Step for that
so true
shouldnt it be like, beating 10 challenge first...
no it should unlock alongside the challenge actually
oh
meow
:3
conversion is not working now for some reason 😭
you're not checking enhancements correctly
v.config.center.key == 'm_steel' is correct
v.config.card relates to the playing card prototype
-# what the fuck
Why is there nothing?
SMODS.create_card doesn't emplace into the area you give it
ok, thank you again 😭
you are right, but that's like the last thing I'm going to fix
But there should still be an area right? Just without the card?
it would not be visible. try with the card emplaced
I'm already done with the functionality, I just want the extra description to show up and tell you what every day's effect is, not just the current one
at least depending on the type of area, which you have not specified
How do i make it visible without the card? (There shouldnt be a card..)
I'm actually not sure what the default is there
what's supposed to be visible?
The card area?
what about it
a title card area with not cards has no visuals to display
but again you haven't specified a type
Whats this card areas type?
we are so back
Is that a type or a key?
how do i hide the decks name when it isnt unlocked
nah that's just how you refer to it
oh
the type is 'joker'
thank you N'
i dunno then, i have class tmr (yes, even in sunday), so im a bit frustrated rn :3
And that can hold all cards right?
I need something cooler than X2 Interest per round because that's literally just To the Moon
oh thats cool
yeah the type is just for the visuals
X2.01 interest per round
-# wheres the joker reference in the art.
why does the art look like a fnaf minigame, actually
😭
also I have fixed Brazilian Miku and improved Champion's Belt
question: why is Sunday on top of Monday
and is it a strat to get daily double in a run, then turn off the game until its the exact day you want
:3
like, hear me out
Because sunday is the first day of the week
play a round on Monday
Because I'm a filthy American and the weeks on our calendars start on Sunday
then leave the game until its Tuesday/Wednesday for shop
The week is a 's' sandwich
if you are using a planet card? wait until Thursday
:(
Just change the windows calendar bro
if you want to beat the blinds? wait until Saturday or Sunday
change the mult bg's colour based on the thing its multiplying
:3
LMFAOOOOOO
put in some effort man
balatro.
I was getting there. This was more of a functionality check
ah gotcha
would an eternal playing card always be in your hand, even if you discard/play it
weeks start on Sundays
🤔
actually?
in Catholic tradition anyways
no
the calculation uses os.date() so I mean people can play it however they want. I just thought the idea was hilarious
also playing it crashes the game lmao
its monday over here
as I just said, it's Catholic tradition. God created the world in six days then rested on the seventh
LUA why can't you just do this
-# yes i know you cant read it, but trust me im not gaslighting :3
At least in France as well
mhm, and my point still stands: thats lame
not in Brazil tho
Idk i read this as 'yea man the Americans were true it's sunday'
Clearly I'm quite fluent
WAKE ME UP
I could make it lock in to the effect of the day that you picked it up on, but I think the possibility of it being able to change is funny
WAKE ME UP INSIDE
it is
what if i optimize the run as well as possible with that joker
until i beat ante 8
:3
How would i create a list in lua? (Or vector in c++ terms)
-# aka more than 8 weeks
we only have {}, i think
Oops! All Tables
Its called table i believe
sprites
this was totally not a massive pain to get tooltips working properly
https://imgur.com/rNlfY5Q
You can currently play with Champion's Belt in Victin's Collection!
bumping
That option exists. Although I currently have it updating the day in the calculate function and not the load function, because trying to change the number of packs in the shop on day change when reloading the run crashed the game...
surely X2.5 Mult cant be that important 😭
so you have to do something that changes the context to update its effect
the description?
X2.5 all the time?
yes
yes
can you pass loc_vars?
is this legal? {X:#3#,C:white}
like the regular deck
or main_end?
not AFAIK
maybe
no
cool
use V instead
right
{B:1,C:white}
also any suggestions for Miku
V is for text color
B is for balling
uhhhhhh, what if its something like what Neato Jokers do (retrigger 2 and 7 or something two tiems), but instead its for black suits? :3
my brain ran out of idea juice already, sorry :(
Where are the keys to in-game suits stored
best modder of all time
goes to:
@fake it until you make it congrats!
could you help me create an UI element
either the values of SMODS.Suit.obj_buffer (in order) or the keys of SMODS.Suits (in no particular order)
make the hardcore button has fire...
I just want a menu that displays a single Joker and its description
i actually do
so I can screenshot it
So am i using it wrong then?
but I'm not sure how to do it
I think I can make it a mod and hide it in the configs of that mod
isnt it for i = 1, (something)?
but i could be wrong
im not that proficient with lua myself lol
what if I just said "no" to color
💔
That's still a color
yeah
make it transparent
that is by no means correct
so the user can see the inside of their monitor
SMODS.Suits is not a numeric array
How do i change size?
what the fuck is this function name dawg
the 7 is width and the 4 is height
Bro made an inventory system
Like me
Me fr

Bonana
speaking of UI, can I steal you descriptiondummy thing?
sure
X2 cash out would be way too powerful...
but X2 per remaining hand feels too weak
i stole your cardarea code so like
❤️ its called sharing
Double interest
if i wanted to store the number of times something haoppened would i just use a loc_var for that?
that's what it currently does, but that's literally just To the Moon
Grape 🍇
Gold equal to current hour.
Uhhh yeah
Make it give mult based on hands remaining
Xmult
Sounds good
Shoot the solar system
I want the effect to be money-related though 🤔
Xmult of money is broken
Hmmmm
and it's gotta be X2 something thematically
Money equal to 2x current hour
For every 50 dollar spent gain 1xmult
I think it’s grape
Maybe lower the money
Overspending
Lol
Yeah i think it’s balanced like that
this is the thing in question
That way you need to spend to get mult but you need to stack to get double interest
it's this joker lmao
My bad dawg
all good 🫡
I think you need a bit of coloring in the effect
I'm getting there...
It looks cool tho i love the idea
Thanks!
and yeah I'll do the formatting eventually, once I get the last effect sorted out
Do you have other jokers made ?
I’d love to take inspiration from you
If you don’t mind
yeah I have a full page of them made so far
Can i see ?
That’s so cool i love the idea
Maybe i should code my own enhancement
I never thought of that
\
Like your mod wasn’t hard enough
ONG THIS GUY IS MAKING DARK SOULS BALATRO
yeah, go for it!
in a seal calculate function, remove_playing_cards context, how do i make sure the card being destroyed is the one running the function? right now when any card is destroyed all of the cards in hand with the seal duplicate
Imagine rpg balatro
I have added funny color to description 🫡
Niceeee
I wish you can add colors to the joker’s name
Steamodded add this future please
Yeah I think coloured names in the main tooltip are supported in vanilla by default
DAMN
why this crash
I’m using this
'
Cool idea
But is x chips not equivalent to x mult
hmm well this resulted in a nil error on attempting to index field 'colours'
{B:3,C:white}
shhhhhhhhhh
I’ve always thought this when someone shows x chips
shhhhhhhhhhhhhhhhhhhhhhhhhhhhh
It'd technically be different in the case of Plasma deck.
Not exactly, for two reasons:
- Plasma Deck
- Affected by scoring order of flat +Chip and +Mult
thanks!
I understand what I did wrong...
well it doesn't crash anymore so I know the formatting's right, but it doesn't display the color either...
return {vars = {os.date("%A"), effect, colours = {color}}}
What's the best way to add a sound to a vanilla joker effect triggering? I've tried take_ownership of its calculate function with a copy of the original logic but it's returning twice for some reason (weirldy enough only return is twice. If I put the sound in the return, it plays twice, if I do it as play_sound before the return, only plays the once).
SMODS.Joker:take_ownership('j_trading',{
calculate = function(self, card, context)
if card.ability.name == 'Trading Card' and not context.blueprint and
G.GAME.current_round.discards_used <= 0 and type(context.full_hand) == 'table' and #context.full_hand == 1 then
play_sound('Spongebobatro_buymorecards')
ease_dollars(card.ability.extra)
return {
message = localize('$')..card.ability.extra,
colour = G.C.MONEY,
delay = 0.45,
remove = true,
card = card,
--sound = 'Spongebobatro_buymorecards'
}
end
end,
},
true)```
Actually, it can't just be returning twice, since it's giving me the $3 twice too, come to think of it.
do you still have B:3?
if so that's the third colour variable
Any way to prevent a consumable type from creating a new button on the collections page?
yeah this is 100% it, forgot it worked on a separate index
nvm, changing it to 1 crashes it
I assume I should just be feeding it the string I would be putting there normally?
really perplexed by this one... the joker is supposed to halve its mult at the end of every round, but for some reason it's halving for itself and every unplayed card?? every unplayed card is dividing it twice
well, the memory sure was burning at least
do consumables support setting their weight to make them rarer, or is that only a property of consumable rarities and hidden/soul mode?
Add and context.main_eval
Don't suppose that'd help in my case too? I did check, commenting out tge money give makes it not happen at all, so it's not the vanilla effect still applying.
thanks!
What is your effect supposed to do?
this crashes 🤔
{B:1,C:white}
return {vars = {os.date("%A"), effect, colours = {color}}}
wait I may be stupid
Does anyone know what are the internal variable names for all the different card enhancements?
It's the same as vanilla Trading Card ($3 for first discard being 1 card, which it destroys), I'm just wanting to add a sound to it.
nvm I got nothing
For some reason with the vanilla logic, it triggers twice.
Which, hey, I don't mind $6 from trading card, but, not looking to make my joker reskin pack a "balance mod" :p
attempt to compare number with nil
you want it to be like this
calculate = function(self, card, context)
if context.discard and G.GAME.current_round.discards_used <= 0 and #context.full_hand == 1 then
play_sound('Spongebobatro_buymorecards')
return {
dollars = card.ability.extra,
remove = true
}
end
end```
I'm pretty sure that would just work
whats the card area for cards held in hand
G.hand
Will make*
To store swords
To store chemicals
just like the affair apartment
Are we making meth ?
Sadly no
Breaking balatro (breaking bad reference)
How would I make some space between two card areas?
give one of them a restraining order on the other
omg im so dense
Having trouble getting this card counting function... functional. Am I missing anything obvious here? The message will not run even when three 7's are played. (Turning off the function check in calculate does play the message so the issue is with this helper function)
local result = 0
for i = 1, #context.scoring_hand do
if context.scoring_hand[i].base.value == countedRank then
result = result + 1
end
end
return result
end
...
calculate = function(self, card, context)
if context.joker_main then
if countEnhancedRankInHand(context, 7) >= 3 then
return {message = 'Active!'}
end
end
i was checking if the event was a hand being played and i was checking args.hand instead of args.type 😭
I think these are the values I need to be using?
Yes it did, thank you very much! for future reference, is there anywhere in the documentation with a list of contexts that can be utilized?
at the end of the calculate functions page under guides im pretty sure
they're almost all in here
How do I check if a card has a specific enhancement? I want a Joker to buff itself when my custom enhancement plays
SMODS.has_enhancement(card, key)
this was in fact the solution
what does the primary colour of a consumabletype do? the secondary colour changes the badge colour and the colour of the button in the collectables menu, but im not seeing the primary colour anywhere
how evil is this
Is this affected by Oops?
no
(sorry to be grammar police but in this case it'd be "losing" not "loosing")
lol
anyone aware of if this is possible?
Anyone
how do i apply an enhancement?
Honestly it's not evil
In doing 15 losses, you have about a 65% chance you'll unlock it. You're gonna do that naturally just trying to finish higher stakes, and you can even farm it if you want
Hello, good people. This is a bit of a bold question, but does anyone know where is the main menu created? Like, in the files, what lines of code create the main menu? The buttons and the logo is what I am looking for, mainly.
actually I'm gonna make it affected by Oops because that's fucking hilarious
card:set_ability(G.P_CENTERS["X"], nil, true)
Replace X with one of these values
pweaxe maybe?
I'm just going to lose on the first blind and repeat that over and over again
Look for the text "COLLECTION" in the en_us localization file and find the ID used in the code. Should be somewhere in UI_definitions.lua
Where is the enhancements in cards stored? (like card.ability or card.config something)
will check
card.ability.effect
Ok time for a question of my own
I'm making a seal that "eats" (destroys) Stone Cards in the played hand before they get scored. However, said Stone Cards still get scored, and then return to the deck in a half existant state, where they don't show up in the deck overview but still get drawn as invisible cards. How do I get them fully destroyed before they get calculated? This is my calculate function:
calculate = function (self, card, context)
-- Ensure the card has a current Seal Seal value
if card.ability["boingular_seal_current"] == nil then
card.ability["boingular_seal_current"] = 0
end
-- Before the hand is scored
if context.before then
-- Check for any stone cards in the deck
local ret = true
local stone_cards = {}
for i=1, #G.play.cards do
local card = G.play.cards[i]
if card.ability.effect == "Stone Card" then
ret = false
stone_cards[#stone_cards+1] = card
end
end
if ret then
return
end
-- Check if this Seal is going to eat a Stone Card this hand
local eating = false
-- Loop through the stone cards, dissolve them, and add to this Seal's mult
for i=1, #stone_cards do
local stone_card = stone_cards[i]
if not stone_card.eaten then
card.ability["boingular_seal_current"] = card.ability["boingular_seal_current"] + 1
stone_card.eaten = true
stone_card:start_dissolve()
eating = true
end
end
-- If the Seal is eating a Stone Card, say "Yummm! :3"
if eating then
return {
message = "Yummm! :3",
colour = G.C.UI.TEXT_INACTIVE
}
end
end
-- When the card is played
if context.main_scoring and context.cardarea == G.play then
return {
mult = self.config.base ^ card.ability["boingular_seal_current"]
}
end
end
(you can also just do card:set_ability("m_stone", nil, true), wrapping in P_CENTERS is not needed)
I'm mostly looking at this part of my code, during context.before:
-- Loop through the stone cards, dissolve them, and add to this Seal's mult
for i=1, #stone_cards do
local stone_card = stone_cards[i]
if not stone_card.eaten then
card.ability["boingular_seal_current"] = card.ability["boingular_seal_current"] + 1
stone_card.eaten = true
stone_card:start_dissolve()
eating = true
end
end
is my only solution for making a tarot or planet card rarer to just enable hidden like the soul does?
How would I make some space between two card areas?
give the surrounding nodes padding or insert a node between them with a fixed/minimum width
Which one is the better option?
how do i get the config of an enhancement is it card.ability.effect.config or?
And in my case, the surrounding nodes are the card areas right?
<@&1133519078540185692>
❌
For yall, dont click on this
whichever nodes you have around the object nodes you put the areas in
So the C Node?
man auto formatted ui code is cursed as fuck
yeas
I'm not sure object nodes can have padding
if this doesn't work, put a row node with minimum dimensions between the two object nodes
What do you mean minimum dimensions?
Hey, I'm a bit new to making mods for Balatro, and I'm struggling on making a joker that destroys the joker to the left side of it, and whenever it does it gains $5 in value. would anyone have tips for this? (Besides looking at the source code, I've tried and failed)
minw and minh
the fuck did i do
Is it possible to play two sounds at once using a calculate return table?
I.E. one on the effect on a playing card, and one on the joker that causes the effect?
fuck
What causes this?
This in question
ugh try making it a column instead
download more ram
👍
"They're the same picture."
THE FUCK
task failed successfully
isn't there a G.UIT.B node for spacing
also as it turns out there is not a check_for_unlock for losing a run
there is a box node
box nodes 😭
whats a function thats called when a run is lost
Hey y'all! I've been developing a texture pack for a while and today I decided to migrate from Steammodded to Malverk. I managed to get most things working except the following:
- Locked and undiscovered items (like jokers and vouchers)
- Card skins
- Other minor stuff, such as the default joker that shows in the center of the screen up when you start the game
Is there any way to make them work with Malverk or should I keep those as a "separate" mod using the Steammodded format?
Talking about these mostly
Understandable, thanks for the answer!
the card skins I recommend using SMODS.DeckSkin, and the launch joker is created before malverk kicks in
is checking if a card doesn't have an edition as simple as doing something like and not v.edition?
yes
-# unless you have that scuffed saturn build
How would i put that big area under?
by having a column node that has a row node with the top areas and another row node with the bottom area
I see. I'll just stick to the Steammodded method for now then and use Malverk for what I was having trouble with (soul sprite). Thanks again!
this code shpuld owrk right?
Wait no. I think I see the issue
context.other_card, not other_card
also wtf is that formatting
- everything you have in return tables doesn't belong there
Oh
:D
return tables in calculate functions are only for things like scoring effects
Uhh, where did the bottom area go?
nodes = { ... }, { ... }
how do i check the date
you might want to move that out one set of brackets
Like where specificlly?
this
I hate UI code
the way you set it out isn't helping
What do you mean
your code is indentation hell
How should it look like?
Where is the config for enhancements stored? How can i get them from the card its on?
I did it, got a crash
this is how I write UI code
guys im actually srs rn how would you check the date
it's in the bottom right of your screen 🙃
i am going to make you draw all of your purple seals exclusively on the waters
the e_negative edition is obviously for jokers, but what's the key for the negative playing card edition?
e_negative_playing_card
awesome, thanks i somehow didn't find that lol
should be os.date()
-# Note: it's not a separate edition, just a separate description
yeah, that's exactly what i needed though! this joker applies random editions to playing cards, but info_queue was adamant that the negative i wanted was the one that adds a joker slot
So like this?
that looks so much better
agreed, but i still get this crash?
-# and did i format it right?
you miss a set of brackets around the area3 object node
-# and if it was on a new line you'd see a bit better
I tend to start a new line for each set of nodes, unless it's only going to contain a single node (either text or object generally)
ERROR
What? Which?
😭
I just mean generally when I write UI stuff
Wrong reply, meant to reply to this
I guess what I'm asking is how do I properly destroy/shatter a played card in hand from another playing card's calculate function?
anyone know how i could score exactly 69 chips
23 x 3?
What? Which?
I can't be more specific than that
{}
so local bbb = {}?
With a card area, how do i set so there isnt a card limit?
(Of the joker type)
you mean the text at the bottom?
yes
i dont think you can without hooking or patching things, but i might be wrong
i fixed most of it, but now im getting an "assertion failed" error
How do i position this button correctly
remove this comma
in the remove_playing_cards context, how do i check if the card running the function is the one being destroyed?
how do i check if a deck is unlocked
enhancement keys have a m_ prefix
Oh okay
How do I only get the cards that will be scored in debuff_hand?
Like move it up
Or I guess more accurately how would I ensure that a played hand is an X of a kind (High Card, Pair, 3oaK, 4oaK, 5oaK, Flush Five, and any other hands that any other mods may add that require cards of the same rank throughout)
It works now!!! Thanks yall
?
As someone who wants to begin coding, would making my own mod be a good way to learn? Starting by making something simple and small
anything you find fun is a good way to learn
i recommend starting here https://github.com/Steamodded/smods/wiki/Your-First-Mod
Thank you!
hey n
hey
im evil
untrue
so this is an only boosters challenge
sounds hard
i mean
Yayay I'm so happy I got the Yume Reference Cards working. Now, how would I go about making them only appear when their respective world is active... Hmm...
violently bumping this
The 52 Cards:
ill change that to just a deck of 5 2s
-# this is the button code
🥳
i have made it so i can define a hardcore challenge the same as how i would define a normal challenge with Steamodded
so whats the difference between a normal challenge and a hardcore one anyway
awesome
look i even made it real
i wonder if there are any mods that make boss blinds permenant for every blind after
so by ante 8 youre dealing with 8 debuffs
lmao
by ante 8 you die
yeah that checks out
then you get verdant leaf and you have to sell a joker every single ante afterwards
someone should make that a deck and make you start out with directors cut
man if only someone i knew was making a mod specifically for decks
what's the easiest way to give consumable cards different weights?
put a rock on them or smth
Bump
in the remove_playing_cards calcuate context, how do i check if the card running the calculate function is the one being destroyed?
When I use the standard localize() function, such as for card effect messages, am I able to use multiple lines of text? Or is that not supported outside a proper UI box?
oh I suppose you mean when something else destroys the card right?
check whether the card is within the table then
fym the parenthesis is right there
G.PROFILES[1]
yea no i realized that the moment i sent it lmao
how do i get the percentage of collection
thats a pretty cool concept
last one of these four cards i need to implement is the devil's bedposts
ok FINALLY i got the revive seal working. now i just need to. texture the card that gives it to you. funnn
this would be so much easier if libresprite let you trace reference images
I wanna make something unlock when everything else is discovered
im thinking of changing how this joker works, actually.
instead of giving +1 hand size as a permanent buff, i might attach the +1 hand size buff to the joker itself. so it's like a juggler that gives up to +3 instead but you need to prime it
For building atlasdeck do those sprites have the same 1x and 2x dimensions as jokers?
remove the hand size it gives when it's removed
remove_from_deck iirc
Any ideas?,
Also for this one
check if each scoring card has the same rank????? idk that's probably the best thing to do
How do I get just the scoring cards? The cards variable is all played cards, scoring or not
there is a variable that holds the played hand
and for an added bonus, its in the context
There's no context in debuff_hand
scoring_hand maybe?
context.scoring_hand holds all played card object
This is in debuff_hand, which doesn't have context
ooooooh
I'm looking through hand[handname] to try to find how to get the cards from there
If it's possible
whats the difference between hand and handname
hand is a table and handname is a string
hand is a table of what?
the current hand
so every card held
This is the structure of hand
in that case how are hands defined?
for this one I'm pretty sure you can do card:start_dissolve() maybe
I already have that in the code
ah
question
so I have a Joker that, if you sell it, it creates the last Joker that was sold or destroyed, and this is how I save info on what the last Joker was
are both of these hooks necessary or can I just keep the cardarea one?
Can anyone help me understand why I'm getting this error on launch?
panicked at crates/lovely-core/src/lib.rs:364:25:
Failed to parse patch file at "C:\\Users\\Windows\\AppData\\Roaming\\Balatro\\Mods\\Disco\'s Vanilla+\\lovely.toml":
TOML parse error at line 1, column 1
|
1 |
| ^
missing field `manifest````
my lovely.toml has [manifest] on line 1 so I'm not sure what I'm missing
That's not how modding works
For Manifest in the toml you just want to have
[manifest] version = "1.0.0" dump_lua = true priority = 5
and you want to have your mod metadata in a separate .json file
And you don't do it using [script] entrypoint
It's all in the json
So how would I go about destroying a card from another card/seal's calculate function?
I've seed stuff about setting card.destroyed = true and then doing stuff in context.destroying_card but I'm not entirely sure how to put it all together
Okay, got it. Thank you.
what's the exact effect you're trying to do?
i feel like the start_dissolve one might be unnecessary but I just want some clarification to make sure
I have a Seal that consumes any Stone Cards in the played hand when played along with them, so a hand that has a High Card with the Seal and a Stone Card should destroy the Stone Card and not count it when playing, and then give a buff to the Seal. The issue is since I'm trying to destroy a card during context.before it's creating ghost cards as I'm destroying cards outside of the correct context.
hmmm, destroying other cards based on a cards modifiers isn't supported by default, you'd need to do some lovely patching to allow for that
Any idea why this doesn't work?
I'm still getting the same error... I created a .json with metadata and made lovely.toml
version = "1.0.0"
dump_lua = true
priority = 5```
Still crashing on launch with same error, TOML parse error at line 1 column 1
Injector version?
0.7.1
does anyone know how to take ownership of seals? this code doesnt seem to work
SMODS.Atlas({ key = 'Enhancers_owc', path = "Enhancers.png", px = 71, py = 95 })
SMODS.Seal:take_ownership('blue_seal', { atlas = 'Enhancers_owc' })
nvm I figured it out
psych the mod was disabled then when I tried to activate it I got the same error lol
Hey, I asked this yesterday. Any chance I could get some help on it?
soul_rate can change the weight to any float between 1 and 0- the closer you set it to 0, the rarer it'll be.
You'll also need to use soul_set to make sure it shows up in the correct booster packs (so make sure it matches your set!)
Oh, sorry, I've got it slightly wrong- you only need soul_rate.
is there any way to change the suit of all cards in the played hand when they're returning into deck?
every way i tried makes the change visually almost before even scoring the cards, even if the suit its detected as the former one
bump
Looks like something being caused by Splatro
that doesn't exactly narrow it down
just started doing this when i was testing consumables
more specifically the Pearl Drone joker
so i just had an idea for a joker - but i want to know if it's possible to say, interpose any sequence of events with a fake loading screen of variable length?
the idea i have in mind is a "sonic '06" joker, with the description of { "{X:mult,C:white}X3{} mult", "{C:mult}:)" }. and from the moment they buy it, it just randomly puts fake loading screens of random lengths (anywhere from 20 to 240 seconds) between actions (i'm thinking shop rerolls, opening boosters, exiting the shop, starting a round, ending a round, selling jokers - but most importantly, always when buying this joker)
with the idea being that i want the reaction of "...so it's just X3 mult? what's the downside?" hits buy, immediate 30-second loading screen "oh."
-# i am a sane and mentally sound person that can reasonably be trusted with mod design & development
i don't understand how you can read these crash logs but pop off what else does it say
honestly all the important bits are at the very bottom of the log lol
But it looks like a flaw in its remove_from_deck function or smthn
I don't know anything about this mod tho so I have no idea what it's actually trying to do here
right now it should be giving +1 consumable slot
the remove_from_deck reverts the extra slot and that's it
remove_from_deck = function(self, card, from_debuff)
G.consumeables.config.card_limit = G.consumeables.config.card_limit - card.ability.extra.slots
end,
Heyyyyyy
What the fuck
Man
I’m not a cake
I think I might be looking at it slightly wrong now, hmm
It's definitely the pearl drone joker tho
removing that joker's code does stop the crash
problem is that I want the joker to exist
well duh
removing its set_ability or add_to_deck or remove_from_deck or calculate functions do not stop the crash
removed all individually and removed them all and it still happened
oh ffs
Where would I add that to the lua file, specifically? And am I able to add this as a seperate mod or do I need to modify both mods specifically?
I think i know what I did now
the rarity is a string
it's supposed to be an integer
ew no github for the mod
oh my god that was it
what which mod
there is a github for it though
the code for this joker isn't on there yet
i'm working on an update right now
anyway I fixed it, the rarity was a string
instead of an integer
i'm a dumbass
creature bump
if you're overriding sprites use a texture pack
im making a texture pack
doesn't malverk have a system for it
idk what that is but steamodded has worked for everything so far
Try 'Blue' instead of 'blue_seal'
...no-one have any insight? 
or to my UI issue
-# or my custom legendary joker undiscovered description issue?
it's a mod
for managing texture packs
jerome youre a gem thank you
Hell yeah. Glad I could help
Does anyone know how to make it so my own cards only spawn when this other card is in play?
Use an in_pool function
is there a way to make an edition that can only appear on my custom consumable type?
Oh okay. Forgot that existed for a second.
Here's an example for basically what you're trying to do that I just so happened to have on hand lol
chat?
I'd say no
Oh cool!!! Thanks you.
Would you also happen to know how to use this to get certain Jokers to only appear in my custom booster?
I'm pretty certain you can use SMODS.Consumable:take_ownership to add this to the cards as an auxiliary mod. Like so:
SMODS.Consumable:take_ownership( 'modprefix_consumablekey', {
soul_rate = 0.5 -- Or whatever other value you want to put here
})
Replace the modprefix with the prefix specified in that mod's json (or their Steamodded header), and the consumablekey with the key of that consumable in that mod's code. Your own mod's badge will be added to that consumable by doing this- I'm not entirely sure how you can remove that, but it won't affect anything.
u sure??
i am trying to use SMODS.create_card and it just... wont work
If you apply a pool to each of the jokers you want to appear, you can specify the pool that they're in as the Booster's card pool
use = function(self, card, area, copier)
SMODS.create_card({set = 'Joker', key = 'j_lode_Lodestone', stickers = 'eternal', no_edition = true, area = 'G.jokers'})
end
I think you replied to the wrong person lol
I knew that, though. I had it appear in my custom booster, but I don't want them to appear in the shop or the jimbo booster.
Oh only in the boosters. Hmm that's a tough one. Probably some patch shenannigannery could work but I'm not exactly sure what
Hmm, it's not that big of a deal. I'll just have them appear very rarely for now.
Would I need to patch to guarantee a certain booster after a boss blind?
@wintry solar do you know ~~what purpose these graphics serve? (in the spectrals/tarots/planets asset)
and if they do have any purpose,~~ whether or not they have associated keys in malverk 
i imagine they don't atm
those are for undiscovered spectral, tarot, and planet cards respectively
rather those are just the background
ah - but since the locked graphic is in front, you don't really see, do you
... it isn't tho
oh is this in front of the locked graphic?
I said undiscovered not locked
ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
there is no locked graphic
So just to make sure, I would just have the lua file have this repeated a bunch in it for each consumable? I don't need anything else in it? Alongside other stuff for steammodded to detect the mod.
soul_rate = 0.9
})```
Thank you again for helping btw, I appreciate it :)
what's this in the same asset then? redundancy? 
probably in case there ended up being consumables which are locked
ahhh
but considering there aren't any of those in the base game it goes unused for now
Yeah, that should do it. Bear in mind if you don't have that yart mod enabled when this one is it will probably definitely crash the game, so make sure you disable them both at the same time.
Oh, and no problem. My expertise is solely in deckskins and consumables. I haven't even made a single Joker lmao
pls
it won't crash, it'll just fail and log that it couldn't find the key you gave it
Oh, that's nice
just making sure I'm doing it right, so the modprefix is what is labeled in the .json, and the consumable key would be the part labeled in this, yes?
key = "rfool",```
Yeah, that's right
yep
for the full key, there is also a c_ in front for consumables, but you don't need to provide it to take_ownership
And for soul_rate specifically, it's a safe assumption that all consumables start at 1?
Is there a doc or guide to get started with modding?