#💻・modding-dev
1 messages · Page 258 of 1
I’m curious now 
we were talking about this server is a cultist sect and how we need to consume specific entities in here, specifically this one guy named victin
How does one go about doing this?
Cult? What cult?
There’s no cult here
How is it currently triggering?
If you have atleast one each voucher gives X3 mult once.
But how did you code it
I have no idea what you’re doing
So you could have the Joker itself generate the xMult
But if you want to keep this
You can save the return if find_joker and iterate over it
Also it’s weird that it doesn’t need a key
Ok, thank you very much for offering 🙂
calculate = function(self, card, context)
if context.destroy_card and context.cardarea == G.play then
--it was a high card, we will eat 2's
if context.destroy_card:get_id() == 2 then
sendInfoMessage("This is a 2 " .. context.destroy_card:get_id(), self.key)
card.ability.extra = card.ability.extra + card.ability.extraGrowthRate
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.45,
func = function()
play_sound("Fox_yoshiEat", 1.05)
context.destroy_card:juice_up(0.3, 0.3);
return { remove = true, card=context.destroy_card }
end
}))
sendInfoMessage("we are going to destroy this card", self.key)
return { remove = true,card=context.destroy_card }
end
end
end
How?
I feel like this is coded incorrectly
You can have the Joker iterate over the CardArea to look for Vouchers, then return xMult, but make the message pop up under the Vouchers if that’s what you want
The only thing that wouldn’t quite be the same is the timing
interesting.
It does delete the cards, but my animation processes on the wrong card before deleting them. So if I played all 2's, it would jiggle the final card 4 times, but then delete them all
I meant like, it sounds like the wrong approach to implementing this effect
But you’re destroying cards in hand right?
was this bug present in fuckin...0319c
do i gott re update
I think so
ah fantastic, let me update then
what can i say, im a cool guy 😎
Are you cool enough to have your own mod
i just might be
What’s in it
still in progress but so far
ignore that its named nefarious pack rn
Any theme?
How would I do this one?
ngl dilatro sounds NSFW
nothing super concrete, just stuff i think would be cool that could more or elss fit the game
its my freaking name with balatro 😢
if you pronounce it "die" it sounds much better
its alright @manic rune when he first greeted me called me diddy
@frosty dock that perma_mult bug i showed you was a false alarm. apparently thats caused by some other mod i have installed???? possibly an old custom implementation of perma mult
im sorry 😭
itll always be funny to me dont worry
How would you check if a card is a stone card?
be called me*
I LOVE LEAVING IT ENTIRELY UP TO FATEE
Oh that would make sense
i could consume you in 3 and a half hours
SMODS.has_enhancement(insertcardhere, "m_stone") will return True if the chosen card does have the enhancement, including quantum ones
what values does it go between
0.5x and 3x
:3
i still need to start incorporating quantum
i just dont know where to really start
also the effect looks rly cool too
make this use misprint style text for the random mult
its not rlly that complex, you turn on the optional setting and you use context.check_enhancement to modify the cards before their enhancement affects are used
Also each observatory in the slots for some reason triggers the planets again.
i saw jt in card.lua yesterday and it looks very involved
how it displays the 0 to 23
will that let me retain the default variant so i coudl say, upgrade a card from holo as its default to a deluxe holo
I should look into quantum enhancements again. They caused some weird and unexpected errors in my code for a while
quantum?
its not that bad
Oh, yes I am
im not sure im happy with the slimy edition's current range, should i make the it go from x0.1 to x3 or from x0.5 to x2
quantum doesnt affect the initial enhancements, it only tells the game to apply effects that it wouldnt otherwise
oooo
does it display the next card youre gonna draw too
also im not sure if it works with editions
how often is it hitting either end of the range
gotcha gotcha
ill have to toy with it
it is called quantum enhancements, not editions
so
it hits numbers above 1 a lot more frequently than it hits number below 1
how quick does the image update for the jokers?
you could, for example, tell the game that it should check for steel cards held in hand and return m_gold = true to tell the game that this steel card should also have the effects of gold cards
do it so i can steal it from you bestie
like if I change the pos from {0,1} to {0,2} durring gameplay
in which situation? You mean when you change an image through code?
That should happen instantly
animated joker here i come
if you want to centralize it more then you could do a range from 0.5 to 2
but if you like it spinning around more then that works too
calculate = function(self, card, context)
if context.check_enhancement and context.other_card.base.id == 7 then
return {
m_lucky = true,
}
end
end
}```
its that shrimple
im gonna try x0.1 to x3
bunco has an animated joker you can use for reference!
I know it made my jokers that used is_face() crash, regardless of whether they relied on quantum enhancements in any way
i like the extreme values
but I fully assume that's solved at this point
yea i have a joker that changes texture once it reaches a certain point
i need to figure out how poeple have those..like small overlays ontop of their jokers
yeah you cant use most functions that read the card value
this is because it would cause an infinite loop
oh thats not too bad at all
instead of is_face cant you just return ranks 11,12,13
paradoleia
ah yea
which one
The Joker
it looks like a boss blind but bigger
oh that how it does the blind effect didn't even think about that
ui! I'd tell you to check my code for the abduction or active joker UI, but JoyousSprings and Jokerdisplay are very cleanly written mods that are way better to steal from, haha
i keep forgetting how really good N was with his ui
time to put the sherk movie in a joker
how do vanilla is_face() checks handle this than?
ehm is this copyright infringement? Mods? Mods? 😛
dont worry, yoll be getting a c&d soon yourself after i reached out to a few agencies..
well quantum enhancements dont exist in vanilla
thats an SMODS feature
well yea but para like he mentioned does the whole face thing
so quantum has to work with it dont it
you cant use functions whose results would be altered by enhancements
Is has_edition a function?
I know, but if it being active makes it impossible to use is_face(), that'd mean the vanilla code would need to be patched by SMODS to avoid that problem, right?
para wouldnt work because a face card could have stone and no longer be a face card
so its forbidden
is_edition()
thank you
i think the crashes have been patched, by just completely disabling the functions during the enhancement checking process
nil if it not an edition
i tried using :get_id and it would just never return anything,not even an error
Aaah okay, that makes sense. I'll look into it again soon. I've reworked all quantum enhancement-type jokers to be luckily more interesting, I'd say, but I'm sure new ideas'll pop up for it again in the future
The crashes are only if you use those functions within your quantum calculation
But they might have been patched, I don’t remember
At the time, they happened in any joker that called is_face() for me, regardless of whether they used quantum enhancement, but yeah, I assumed that'd no longer be the case now
That doesn’t sound right
i think ExtraCredit has a way to go around this by creating a new attribute for playing cards which they modify freely, but unfortunately its not really going to work when other mods are in the mix
otherwise you're just gonna have to not use functions and check the raw values of the card
context.other_card.config.center.key == "m_gold" as opposed to SMODS.has_enhancement(insertcardhere, "m_gold")
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play and context.other_card:is_edition('e_polychrome') then
return {
Xmult = card.ability.extra.Xmult,
message = "Meow!",
card = other_card
}
end
end
``` the game crashes, im guessing my formating is wrong (is_edition, a nil value)
I would not be surprised if part of the problem was me misimplementing things, haha. I'm not a good programmer and I understood SMODS way less when I worked with the quantum enhancements last month, after all
(context.other_card.edition or {}).key == 'e_polychrome'
local variable = …
nah local thunk = ...
Then maybe it makes sense but I don’t understand it
perfect thank you
I think the best people I know with UI are Eremel and N’, then maybe Myst and someone23832
Hi guys, did cryptid do some special magic to show Planet cards in their mod page?
So far, whatever types of stuff I have added just magically showed up in my mod page
Though idk how much UI did Myst make
Nevermind, I updated my steammodded and it appeared
noooooo someone already did the bad apple mv as a joker
I can create all the jokers using a loop and then just edit what I need in them. 
With "SMODS.Joker:take_ownership" for my jokers
development today
is that the giant rat that makes all of the rules?
im having trouble with this poker hand
if G.hand.cards == 1 and G.deck.cards == 0 and G.hand.highlighted == 1 and next(parts._highest) then
return { hand } end```
it just doesnt show when the requirements are met so i cant even really debug it
mmmm what do yucky cards do
:3
:3
Which 9 looks better?
right one
first id say
uuu divide straight away!
Probably right
im also ont he right side
⑨
@runic pecan I just found an fan animation of Calli and Gigi
Kronii and CC are also there
tututututu
god forbid i use crying emoji istg
😭
😭
😭
😭
release the 😭
nah thats crazy 😭
😭
😭
😭 🔪 🧅
😭
🟦🟦🟦🟦🟦
🟦🟦🟦🟦🟨
😭 🪦 😭
Was this meant for mobile
Looks like Marge Simpsons’ head looking down
what? 😭
how do i recreate the glass card's chance of destruction when played?
like how do i give a card a 1 in x chance of destroying at the same time glass cards do their thing
surely its possible without patching this time
😭
Look for the destroy_card context
In the wiki
update = function(self, card, context)
-- Only proceed if HP is 50% or lower to debuff a random joker
local health_percentage = card.ability.extra.HP / card.ability.extra.maxHP
if health_percentage <= to_big(0.5) then
local jokers = {}
-- Collect all jokers that aren't this one and aren't already debuffed
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] ~= card then
if not G.jokers.cards[i].debuff then
table.insert(jokers, G.jokers.cards[i])
end
end
end
-- Debuff a random joker from the list
if #jokers > 0 then
local debuffjoker = pseudorandom_element(jokers, pseudoseed('fuckan_debuff'))
if debuffjoker then
SMODS.debuff_card(debuffjoker, true, 'stopjoker')
SMODS.recalc_debuff(debuffjoker)
card.ability.extra.debuffed_jokers = card.ability.extra.debuffed_jokers or {}
table.insert(card.ability.extra.debuffed_jokers, debuffjoker)
print("[DEBUG] Debuffed Joker:", debuffjoker)
end
end
end
end,
im trying to just have this iterate over each joker (kinda like crimson heart, but without the fact it undebuffs and reselects with each hand played)
so that when you play 1 hand, one random joker is disabled, then you play another hand and nother one is, and so on and so forth
but i seem to just get to disable one joker and then it stops
what am i missing to make it interate over all held jokers?
I don’t think that’s how you’re supposed to do it
doing it outside of update made the debuffs disappear next round instead of persisting
Use calculate and if context.debuff_card
Oh if you want to make it permanent
I think you’ll need to add something else to the card object
i need them to persist until i reset it later down the line, i just havent implemented that yet
no, it has to carry over until i set so
Next round as in next Blind?
this is a card that has its own blind hp, below 50% means it debuffs 1 random joker per played hand until all are debuffed, once the first set is defeated it undebuffs all
card has health at the start, played hand chips impact said health
SMODS.debuff_card sets a permanent debuff until explicitly removed
Can’t other effects remove it?
From other mods?
well unless something prevents debuffs
And doesn’t this work the same way?
yeah it should
I'm just saying even if you using SMODS.debuff_card, you don't need to do it every frame
it'd be enough to set the debuff once and later remove it
There are very few things that need doing every frame
gotcha, so this will persist past rounds then normally with smods.debuff_card?
i know earlier when i tried it just reset my table and then started debuffing anew
instead of saving what was prev debuffed
ill give it another go however
or does this need to get backed by another layer
yeah there's no reason for it not to
the convenient thing about SMODS.set_debuff is that you can call it at any point in time to set or cancel the debuff as opposed to context.debuff_card only being called in certain timings
this currently only retriggers the lucky card the first time it successfully triggers, does anyone know if theres a way i can make it keep retriggering if it keeps successfully triggering?
alright rad, thank you
no
steamodded doesn't allow multiple layers of retriggers, especially not arbitrarily many
aight ty
imagine i come along with 3 oops and the game just freezes because it keeps trying to retrigger the lucky card
ah yea, smods.debuff_card works perfectly now, i mustve just been tired last night and did it incorrectly
thanks again
looks up at the 3 oops's i had for testing purposes 💀
is it possible to have a sticker have a "floaty" animation like the soul cards etc?
very true lmao
in cryptid arent there cards that retrigger all jokers, and a card that retriggers jokers to the left
why doesnt that crash the game
or is that exactly because of this failsafe
I wanted to have stickers like this? is that a thing u can do?
theres a finite end to that ig, if you have 3 oops's a lucky card is guaranteed to hit so there wouldn't be an end
hiya! where can i find the tool that removes the phantom black border from assets?
cause in cryptid the retrigger all is a 1/2 chance. but u can rig it to be a 2/2. if u get two of those
it wont crash
(but i assume now for sure its because it cant be retriggered twice by the same card)
does it retrigger itself?
there's no retriggers on retriggers
the most layers you'll get is a joker retriggering a joker that retriggers a playing card
you can retrigger any amount of times
but you can't retrigger those retriggers again
I see
...well, aside from playing cards.
that makes sense
if i have boredom retriggering chad, it won't do anything
just can't have like, nested retriggers ig is a way to say it
this massively changes how i play cryptid 💀
In essence, the question of “how many times do you want to retrigger this joker?” is only asked once
but boredom might retrigger the same card that chad retriggers, stacking for 3 total retriggers
you cant have the same joker ask it again
i get it
if a different joker comes and asks its okay then ofc
Yes
thanks for info, if i add retrigger effects I will keep that in mind
so uh back to the question I had before. Is it possible to have a sticker have a "floaty" animation like the soul cards etc?
Firch had made one
yes, by having a draw function on the sticker
would that be similar to how soul type consumables cards are done
IIRC it was also annoying to use
I haven’t tried it yet because I haven’t felt the need to
yeah
ty!
I remember Firch had it working in a specific way because that’s what they needed
Can someone explain why the card destruction effect of my Joker works on 2nd played hand as well (while I specifically set it to trigger on 1st hand of round)
if context.first_hand_drawn and not context.blueprint then
local eval = function() return G.GAME.current_round.hands_played == 0 end
juice_card_until(card, eval, true)
end
if context.destroying_card and not context.blueprint and card.ability.extra.joker_triggered == true then
card.ability.extra.joker_triggered = false
return true
end
if not card.debuff then
if context.cardarea == G.play and context.repetition and #context.full_hand == 1 and G.GAME.current_round.hands_played == 0 then
return {
message = localize('k_hnds_energized'),
colour = G.C.FILTER,
repetitions = card.ability.extra.repetitions,
card = card
}
end
end
if context.cardarea == G.play and G.GAME.current_round.hands_played == 0 and context.destroying_card and not context.destroying_card.debuff and not context.blueprint then
if pseudorandom('energized') < G.GAME.probabilities.normal / card.ability.extra.odds then
card.ability.extra.joker_triggered = true
end
return {
remove = true,
message = localize('k_hnds_zapped'),
colour = G.C.MULT,
delay = 1,
card = card
}
end
end```
(IIRC they asked a friend to code it, not sure)
it doesnt destroy cards on 3rd or 4th etc. hands
but on the 2nd does
for some reason
You’re using the same context in multiple places
Returning true from destroy card destroys the card
Oh hey Eremel wanted to ask a question
you don’t need if variable == true
What if I need the same context?
how I go about it?
I'm trying to use SMODS.blueprint_effect(card, blueprint_card, context), but it seems like blueprint_card is actually the card that's being blueprinted? as opposed to the blueprint/brainstorm joker?
combine your effects to be contained in one if statement that doesn't have multiple returns in the same branch
card is the blueprint, blueprint_card is the blueprinted card
Yeah that sounds correct
Clearly not confusing at all
I'm confused, why?
since context.blueprint_card is the blueprint/brainstorm, setting blueprint_card to the blueprinted card doesn't make any sense to me
You’re missing an end
... because you messed up your syntax
But also as aure said
If you nest if blocks
You’ll want to collect the data
Into a single return
(is there any documentation for how draw functions work)
if true then
if true then
if true then
...
end
...
end
end
if a then
if b then
…
end
end
Because when I wrote the function that’s the name that made sense to me
I hadn’t thought about other uses of that name
Ah. So it's the exact opposite of the vanilla naming schemes by accident
It should be fine when I finally finish the calc docs
would there be issues by just swapping them right now? 🤔
can we have a patch that scales on the entire Mods folder
I really do not like blueprint_card not being the actual... blueprint card
which changes all consumeables to consumables please
or like an example mod that uses a draw function
:3
oh dear
I mean it’s an internal function, the names can be whatever people want them to be
It doesn’t bother me
You can make a PR
How can I nest if I end the block with return{} end?
As I mentioned aure saying above
Collect the data into a single return
I know, I'm just asking if there would be any obvious issues with changing the names (afaik Lua doesn't support keyword arguments so should be fine)
2 different messages?
would that work?
no
Yes
wha
If you do it correctly
you can do
return{
message = "hi",
message = "hello",
}
???
If they’re not handled automatically
No
i thought you need calculate_effect for that one
You want an extra table with the second message
I'm hella confused rn x(
Return {
message = first,
extra = {
message = second
}
}```
Additional "steps", basically.
Just an extra return table
basically a recursive return
You can keep nesting them
can you do
return{
message = "1",
extra = {
message = "2",
extra = {
message = "3",
...
}
}
}
holy fuck
I use it for janky returns >:D
I have 2 separate effects and I need a different message to pop up when respective effect activates
How putting everything in one return{} would work
LMAO
Bepis right now
Read above
to collect all the xmult, xchips and chips into a collective var
600$ on furina
then return them all at once
😭
because i thought youcatnoatoneantaeon
god damn it
Where’s that cat from
i didnt think this was possible
(nichijou)
I guess I was thinking of a different black cat with a red cloth
now i wonder which
that cat
is there docs or examples of a use of the draw hook
can you also add like colors and delays to this too
i swear someone else has said this pfp reminded them of a not so good person
i think so
There was someone who used a black cat, possibly with a red cloth, as their avatar in the TvTropes forums
Maybe a decade ago at this point
I put everything in one return and nested ifs
joker doesnt work now
yeah ive seen that cat as a pfp before they were alright
?
Hello World!
is there docs or examples of a use of the draw hook
draw hook?
Did I miss something?
for stickers? hmm where are stickers and their shaders stored
its when you put additional code in an existing function
what i want to do is render the sticker but not exactly attached to the card itself
as if it was
a legendary or the soul card
OH
I don’t think there’s a context where both context.repetition and context.destroying_card are simultaneously true
hmm yeah i havent done anything with soul_pos
i have a feeling soul pos isnt a thing for stickers
id imagine youd have to do some custom code to implement that
The crash log's not entirely clear, but I think my custom cardareas are crashing the game on leaving the run. It seems that the cards table for those cardareas is missing. Is that an issue someone's got some insight into?
good luck 🫡
I told you my Joker has 2 different effects😭 there's no way I can avoid using the same context twice
I don’t understand this message
If the Jokers does different things in different contexts
Both retriggering and destruction uses the same context
Use different if blocks for them
well this is odd
That’s now how contexts work
They are separated in the code
And that’s the end of the story
the steamodded wiki should be pinned in this channel shouldnt it
What you need is to apply different effects in different contexts
If the effects are connected, you need to connect them
But not via contexts
I have no idea why this crashed, i think my atlas is correct?
can u post the code
SMODS.Atlas {
-- Key for code to find it with
key = "super_balatro_sweater",
-- The name of the file, for the code to pull the atlas from
path = "super_balatro_sweater.png",
-- Width of each sprite in 1x size
px = 71,
-- Height of each sprite in 1x size
py = 95
}
No they don’t
you want to shwo the code where the crash is happening as well!
i notice the vanilla code has something like this. is there a such thing as floating sprite i can access with smods? for a sticker
but also we need to see the code of the joker itself not just the atlas
Eremel, is there a specific point in the start_run code that I should set up cardareas? I'm getting crashes, and am currently setting them up with a hook of the Game:start_run() function
that is weird, bc thats the same code
base*
They meant that their Joker’s effect needs both contexts, but they don’t understand how contexts work
Wherever the default ones are set up, just patch in there
I patched mine where the vanilla ones are set up
thank youu
Yeah, doing that now, as well
wait, if i make a sticker, and add soul pos, will it automatically have a floating sprite
oh! i forgot to mention that the crash happens when i open my mod's "jokers" tab in the collection
Good afternoon, Eremel. Do you know how the SMODS.Mod function to debuff cards works?
Maybe
I do not
If soul sprites are a thing for stickers
hmmm i gotta look into soul_pos myself
Hmm, considering the keys match, I don't see why that'd crash. Are you loading all the files in properly? 🤔
I made an Enhancement that debuffs itself but it’s not undebuffing itself correctly
how would i check that?
Although using the Enhancement’s calculate function
it shouldnt CRASH though, itd just fall back on jimbo right?
not if the joker file loads, but the file that defines the atlas doesn't, right?
mm i suppose
but if you know anything about coding, your insight may be sharper than mine, so you may very well be right, haha
nah i started learning coding last week lmfao
im just using what i know from implementing felt manor last night
if you have a joker that never references an atlas it falls back on jimbo
oh fair, then fuck your insight, mine's perfect I'm literally seeing the matrix rn
so what should i do?
how about debuffing the joker for the current ante instead
Update SMODS
i think its not that useful when it is very likely to break on your first/second use
What file are you defining your atlas in? And which method for loading files are you using?
It destroys the card
hmmm itd be easier to diagnose if you just posted the .lua file in full so we can point out specific line numbers
send the 98% to me
{
"id": "supbal",
"name": "Super Balatro Sweater",
"author": ["orbytt"],
"description": "Adds some new jokers to balatro",
"prefix": "super_balatro_sweater",
"main_file": "super_balatro_sweater.lua",
"badge_colour": "c7638f",
"dependencies": [
"Steamodded (>=1.0.0~ALPHA-1225a)"
],
"version": "1.0.0" }
ok ill do that
or if you posted screenshots including the numbers
2%
:(
make me 34 custom cardareas that all can interact with each other and be displayed at the same time without overlapping
listen, i have an idea
what if
what is the name of the pool for playing cards
the card area below the consumable area that literally everyone uses
have pages instead
:3
so everyone can still use that area
good thing that you mentioned that, I think I figured out how to form a proper structure for my ifs blocks (i hope) and everything works now except card destruction, it doesnt happen:
if context.cardarea == G.play and context.repetition and #context.full_hand == 1 and G.GAME.current_round.hands_played == 0 then
if context.destroying_card and not context.destroying_card.debuff and not context.blueprint then
if pseudorandom('energized') < G.GAME.probabilities.normal / card.ability.extra.odds then
card.ability.extra.joker_triggered = true
return {
message = localize('k_hnds_zapped'),
colour = G.C.MULT,
}
end
end
return {
remove = true,
message = localize('k_hnds_energized'),
colour = G.C.FILTER,
repetitions = card.ability.extra.repetitions,
card = card
}
end
end
end```
these are the vanilla ones. which one is the right pool
spelling error in the atlas key
honestly this is soemthing ive considered, or making it so people can click a button and it just blacks your screen for a sec, and then changes your ui entirely to show cardareas (think of how windows can let you have virtual desktops or whatever, but in balala)
I've been considering making this for a while, haha
balatro vs baltro
oh
we would need everyone to collectively use that lib though
or figure out a way to somehow bundle up all card areas into one
I'd try and write in a way that would convince the smods team to make it part of SMODS 😛
-# idk if thats even possible
this would be the wave
i think that as long as you write it
since everyone already needs that
Bepis, I don't write great code, I just sound confident when I talk about it sometimes
but if it works, it works
yeah ur atlas seems fine, i dunno
especially when it comes to UI, haha
as they always say
if it works, it is by default great
^
anyone know what pool is used for playing cards? so i can have my sticker work on playing cards
what line?
if it works it works is good enough for Kino, but I prefer SMODS to be well written or not written by me so that I don't feel bad when it breaks 😛
(sorry im a bit dyslexic
the atlas definition in your joker
would it be funny
if i release a lib for adding pages to your jokers' description
:3
a good hack for that is to just ctrl-f a key and see if it finds the other uses. And many editors highlight all instances of the same text when one is selected, which is also a good way to check it!
is it just default? or back?
pro tip: ctrl + shift + F will find that instance in all files
-# and you can replace them all to something too
I’d like to have a button that can be held to add extra information
back refers to your deck, im pretty sure
oh, like joyousspring?
I think the only challenge is regenerating the UI
Does it have that?
that is what i thought as well
its actually not as complicated as you think
That’s what I thought
But I thought it was the dumb solution lol
nope youre a genius
Do you have this system working?
...i mean, how my jokers switch descriptions on the go uses just that
you can see how it regens the ui
-# didnt realize the first seconds were laggy
Ping sound
i think this is smoother
so yeah, dont worry, it definitely works
:3
Hmmm
Maybe I’ll use that for keyword descriptions
mhm
Do you have the code for it at hand?
...im lost
you can do what N' did, he added an info queue saying smt like
"Hold F to show smt smt"
I understand the part of the info_queue
To regenerate the UI
Do you create a keybind that detects if it’s hovering over a card
Then recreates it?
i'm so sorry, I sent you on a wild goose chase. There wasn't a spelling error, I just checked my screen recording, and I hit backspace the moment I opened the file without noticing, and created that error myself 😢
ice out here seeing ghosts
dumbest I've felt in literal years 🙂
my hands dont like listening to the order i tell keys to be pressed in so i often be mistyping
nope, it actually just increases a "page" var inside your joker, which generate_ui uses to figure out which description it should load
the code is all in my mod github's page
in jokers.lua, if you want to take a look :3
calculate = function (self, card, context)
if(context.final_scoring_step) then
sendDebugMessage(G.hand.cards[1]:get_id(), "FGLOGGER")
if #context.full_hand == 1 and G.GAME.current_round.hands_played == 0 and SMODS.has_enhancement(context.full_hand[1], "m_stone") then
sendDebugMessage("Worked", "FGLOGGER")
card.ability.extra.totalmult = card.ability.extra.totalmult + card.ability.extra.mult
card.ability.extra.durability = card.ability.extra.durability - 1
return {
message = card.ability.extra.totalmult,
colour = G.C.MULT,
delay = 0.45,
remove_card = context.full_hand[1]
}
end
end
end
This is where that error is occuring. Could someone tell me what's wrong with it?
Actually that looked too painful
and keybinds.lua too
im actually pretty proud that i got it working
during like
the first 2-3 weeks of modding lol
But generate_ui needs to be called again
mhm
thats where the :stop_hover() and :hover() comes in
All good :3
Here
But that’s what I said
This is the keybind I mentioned 😭
you could just use a func in your uielement config and a dirty flag if you don't want to solve it this ugly
🙏
anyone know which of these corresponds to playing cards?
wait, how would that work?
i have to assume default. but also that would be a very ambiguous/misleading name
if people dont answer, you can just test the pools yourself and find the answer
I’m too stupid to know how to do that
any UIE that has config.func defined will call G.FUNCS[config.func] every update frame with the e argument, which is the UIE
I think for unenhanced playing cards that’s it
you can feel free to manipulate the UIBox tree from within that function as needed
you can also store any amount of metadata in config
wouldnt it be a bit worse performance-wise though? since its running every frame, but im not sure since people always tell me not to use update unless absolutely necessary
cause if so this whole tangent was useless because this sticker will never show up randomly it only will ever be applied
it would be pretty bad if you didn't use a dirty flag
-# whats a dirty flag
it's a flag that dresses in latex in the bedroom
🇺🇸
-# huh??? 😭
one extra function call per update frame that does nothing but check a bool flag would not be a massive performance hit
i dont think so
Not in front of the kids (Bepis)
performance schmerformance if anyone is struggling tell them to buy a better pc
you would probably need to handle some conditions in the apply function itself
yes it does
YOU UNDERSTAND ME
surely that was PG-13
ALL OF MY JOKERS USE UPDATE :333
i wasted a lot of time on that 😭
a dirty flag for a cache or a regular operation is a flag that you can set as an indicator that something needs to be refreshed or regenerated
since using yours would mean that i will need to rewrite my generate_ui code
Yes, my mod has stickers that can only be applied to a specific type of consumable, and I didn't need to do anything to get that to work.
-# and uh, im still trying to push out updates as fast as possible
wait im pretty sure this isnt even the method to apply stickers. cause its a method of stickers
I don’t know where I would begin to implement Baliame’s method
So I don’t think I will
it's still worth keeping in mind because you don't always have an easy unhover-hover solution
what did you do? like call a function to add the sticker?
you would probably still need to use your own generate_ui function for the jokers
then use that update function for the ui
and tells it to load different descriptions depending on a var
-# im guessing
or do those consumables randomly have the sticker. I am making stickers that never show up naturally
That’s what loc_vars is for
let me check the code. I made it so that if you have certain jokers or vouchers, they can spawn with random stickers, but that would use the exact same logic you're looking for. They show up naturally only because I've hooked a function
i agree, the fact that uis actually have an "update"-like function built in to them is actually very nice
i will take note of that, thanks!
you wouldnt want your joker descriptions to be
"#1#"
and changes it everytime you want a new description right
-# i actually did that for the stickers which shows debuffs and buffs
I use
SMODS.Stickers['kino_extra_large']:apply(_card, true)
``` to apply it
I’d use main_end
i see, ty!
Which goes in loc_vars
:3 whats that
That’s how I made dynamically updating Jokers
oh
wait whats the convention for sticker prefixes here
so thats what they are for, like misprint?
is it just modid_sticker_name?
@manic rune
Not necessarily but it could be used for something like that
But they don’t regenerate automatically
nice!
Here it’s fine because they don’t need to
Since they only change once you hover away to select a card
true
but what if you use handy which allows you to play cards without having to get your mouse off the joker though
:3
[modid]_[stickername], yup
Skill issue
fair
that specific example might be slightly confusing because the sticker is called 'Extra Large', it's not part of some set called extra, haha
Well if I implement the rehover key, it would help
Baliame is still typing; I’m scared
same
coolio, ty
"you buffoon, thats not how you do that"
After Baliame is done with me:
hi, i have this code:
if context.buying_card and context.card.config.center.set == "Joker" and not context.card.edition and pseudorandom('possession') < G.GAME.probabilities.normal / card.ability.extra.odds then
context.card:set_edition{negative = true}
card_eval_status_text(card, 'extra', nil, nil, nil, { message = "Possessed!" })
end```
nah, when hes done with ME, since i was the one who used it 💔
im taking the bullet for you
:3
this triggers on every Joker, and also causes the buy price to increase while the Jokers are being purchased.
what did i do wrong? ^^
given that you have direct access somewhere to the UI nodes you can do like an empty row
-- Where the UI is defined
local node = {n = G.UIT.R, config = {align = "cm", func = "lazy_load_or_update_my_special_row", card = context.other_card, created = false}, nodes = {}}
then put your function in G.FUNCS
G.FUNCS.lazy_load_or_update_my_special_row = function(e)
-- Lazy loading: e.config.created = false initially
-- Dirty flag: We can use metadata from the node config (in this case, card). Set flag on the object being referenced.
if not e.config.created or e.config.card.ui_dirty then
-- Destroy all child nodes for the row. You can also update existing nodes in-place.
for _, child in ipairs(e.children) do child:remove() end
e.children = {}
-- Create some node that you want to add
local node = {n = G.UIT.T, config = {text = localize('k_omg_it_works_ex'), scale = 0.5, colour = G.C.BLACK}}
-- Add new nodes under the updated UIE node
e.UIBox:set_parent_child(node, e)
-- Recalculate UIBox sizes
e.UIBox:recalculate(true)
-- Unset lazy loading / dirty flag.
e.config.created = true
e.config.card.ui_dirty = false
end
end
What do you mean increasing the buy price?
Of Jokers in the shop?
OH YEAH, using func for this actually never crossed my mind
like, a joker that costs $6 is bought for $9
(or, whatever the Negative price would be)
thats actually much nicer though, hm
How to gain access to the correct UI nodes though
usually you would hook the corresponding create_UIBox_foo function
Oh right. Put the apply into an Event
is it weird how the cassette joker from bunco mod specifically triggers my generate_ui function
you can freely manipulate the balatro DOM there before it's parsed into a UIE
oh okie :D
mila mila mila (this is so scuffed)
cheers ^^
My issue is that I don’t understand it very well
i understand it some how....
You can also return the message you want
i wonder if even thunk still understands it
I think I’ll stick to the easy solution
nothing really wrong with that
hmmmmmm
wondering if its possible to use like the glossy voucher shader, but only have it render on certain parts of the joker to initate the gloss this album imitate
i think what baliame suggested is a more "all-rounded" solution to most ui problems that require refreshing the ui
You’d need to use multiple layers
Like soul sprite
Or write a custom shader
and uh, anything that requires update too, i suppose
the glossy shader already does this to some extent (the one that gives booster packs and whatnot the shiny look)
Definitely but I wouldn’t implement it unless I needed it
but i dont think its that necessary for what im doing
oh?
its definitely nice to keep it in mind though, i can see it being extremely useful for other cases
it's also arcane magic, so i can't explain how it does that
I think I’m gonna use it for keyword definitions
Try this
same, i will stick to my dirty code for now :3
shaders and ui are systems you less so understand and more so commune with through arcane ritual ❤️
It’s easier
but in theory if you apply some sort of tone mapping that pushes values away from 0.5 luminosity (lower if lower or higher if higher) to the output of it then it should get a similar result
shaders and UIs gotta be the end-game of balatro modding 💔
shaders are basically pure math with some extra things added on to make it "nicer"
ui is fine because its less annoying imo
i'm sort of good with shaders tbh
mmm the thing abt multiple layers is that the one above would move around like normal soul sprites wouldnt it?
UI is worse
IIRC thunk personally told me they like starting creating games by the UI
i love making ui and im so bad at making shaders
i mean, balatro ui looks incredibly nice
i can see why
i always make sure i have a good ui system near the start but first is like probably overkill
not over-the-top, its clean
Not if you code it correctly
no point making the ui if you cant get the actual gameplay to work
it looks nice to the eyes
what the hell are you doing here little man
its like, probably the perfect ui design localthunk couldve chosen
if that somehow makes sense
that's pretty obvious when playing Balatro, yeah, the game's success is largely UI-based, I'd say, because while the game itself is super fun, card games always rely on UI and feedback
its light on the eyes, which is pretty important for an addictive game like balatro
well, the thing is it kinda feels like thunk started making a UI library, and then tested it to the exact extent balatro needed it, and whatever balatro doesn't directly do in vanilla is incredibly buggy and hardly works lol
is a joker's return extra not a perfect "multiple return"? having some weird issues, especially with retriggers
mmm ill look at how soul_pos works and ask more later
Idk better ask someone who knows about it
You’d need a custom draw function
this is why i never work in love or lua because i hate them and im much better at making ui systems outside of love
But at that point it should be easier
yeyeye
how can i use debug plus to add a modded sticker
personally I wouldn't do soul sprite for an extra shader pass, the first shader pass already has all the information needed, and you can literally combine shader outputs by multiplying them together
fair point, but i find lua very straightforward for beginners
Also no one batted an eye at this
it's an approach for sure
we need to kill beginners so people stop making beginner languages and letting them become widespread
you might be able to use eval dp.hovered.<sticker-stuff>?
But that would require custom shader code AFAIK
it's probably even the correct one if you're making a commercial game
chill 😭
it would lol
beginner here and yeah kind of
Some people think UIs are fun, after all
I meant the part thunk told me personally lol
you can use uhh
i assume thunk talks to people sometimes, victin
use Ice's code to apply the sticker to your cards manually
i like starting with the ui very early so its definitely an understandable approach but i just think starting first isnt always the best idea in all situations
But why me
especially if youre trying to make something that you dont know if youll be able to
i've talked to reynad before on the merit of being on the bazaar discord and i don't fee like it's anything special ¯_(ツ)_/¯
then you sink a ton of time into making it look nice before you can actually test if your idea is feasible
i used to talk a lot to the slay the spire devs
...this is actually how my mod was born, if im gonna be honest 😭
Probably. For me, my issue philosophically was that what good is the UI for if there’s nothing for it to display
people forget that developers for the most part are just normal people
I doubt thunk would care, not like it was his plan to publish a game at all
well yes im speaking generally
"can you add stats to a joker, i wonder"
which all led to the creation of my mod
:3
sorry for all the questions: which is the localization for stickers here?
Thunk used to be more active here, but isn’t, so it could be surprising
completely offtopic to balatro but the idea for my game started out as trying to see if i could make stardew valley but realistic and i built from ther
how do i change the title logo like cardsauce?
eval SMODS.Stickers['your_sticker_key']:apply(the_card_you_want_to_change, true)
Other
thanks
thanks
are we summoning smodxodia
also misc.labels for the label
Oh you’re surprised by the SMODS people but not by thunk
well thats good cause i need help
Smodsopolis
i mean, ive certainly seen him talking in this server before
its more impressive if you see something happening before your eyes
after two mods im gonna start working on sfw mods now lol
uhh if you understand what i mean :3
im sorry, the other ones were nsfw?
As opposed to… NSFW mods?
only been 2 months since i was here too, actually
yeah a whole 2 of them
not posted here ofc
that's crazy
you lose
How many messages do I have
i don't even have the most messages here
-# (yet)
i came in 1/27 but i dont ask too amny questions i just break shit until it works
I’m surprised how many NSFW Balatro mods there are
i dont really chat that often here i just post stuff and dip most of the time
The yapper
...balustro
plus i do alot of searching
😭
most of the times questions are answered
i love socializing with this community
my inspiration
im only at 1k .... 💔
everyone is nice to talk to :3
i need to calm down
fuck you bepis
i like socializing with bepis, ice, aiko
and i try my best to help everyone when i can too
vic is neat too
i think that's shadowbulb? I'm not 100% sure
aw :(
🥺
big fan of bepis
you too icl
aure do you enjoy doing tech support?
ngl i feel intimidated by eremel but im sure hes cool
i feel like a child to that mans knowledge
john smods here feels like a celebrity in my eyes that im not worthy to speak to casually
should i be worried :3
:3c
you
you actually summed up how i feel about them as well 😭
john "john smods" smods
I LOVE tech surport cause i do it all the time
i think i might have already posted this
i like socializing with anyone that doesnt call me an overanticipated lost and absolutely traumatized eggplant found in the woods, so i like this server
theyre too freakin smart
apparently i do to some extent
else why would i be doing it haha
That’s extremely specific
I love doing tech support when I just tell people to read the manual
they naturally dont seem down to earth, if you ask me 💔
'read the docs' headass
the council of the mods
arrrgghhh
then they hit you with the "but i don't understand it"
aure seems very down to earth
41k messages jeez
aure is neat but just feels miles above me so i cant talk to him until im smarter
a lot of people just want you personally to explain it rather than them reading but i love reading manuals and stuff
(how do i get a card in my hand to pass to this function)
i havent got to talk with aure for a long time yet, but i still feel a sense of intimidation whenever i talk to him
i hate having to learn things through videos and stuff unless i really have to
simply because hes just that good 😭
lars is also cool
like, im INFERIOR compared to him
see this is why im a narcissist
video tutorials are the bane of my existence
😭
dont get intimidated by anyone even when they are better than me
you have no idea how much i hate this joker
you have no idea how much pain i had to suffer through
ur scary mr smods
you guys will feel a lot more comfortable talking to aure after seeing some of the smods "oopsies" lmfao
what would i use to check for the amount of a card played?
To be fair I think it’s common to prefer to talk to people than reading. I think in terms of explaining things to people it’s difficult when they refuse to try to read even if the manual is more accurate
#G.play.cards
it sure is annoying but I try to bring the patience for it 😭
its like, wtf im just a randm dude in a server with super nice nerds while im here just FUCKING ASKING HOW TO CHANGE THE SPLASH SCREEN
i need to sleep
whats funny is aure is almost a decade younger than me and i still just dont want to bother the guy
amount of cards played?
of a specific rank
i just love reading and doing things for myself rather than having to have another person involved even in video format
a lot of people and videos just do things too slowly also
thats called "i n t e l l i g e n c e"
a randomdude you say (wink wink)
introducing https://github.com/Steamodded/smods/issues/561
looking up videos on how to do 1 hyperspecific thing always treats me as if im a child who knows absolutely nothing about doing anything its really annoying
REAL
Or if you’re older than him
loop through "G.play.cards" and check rank with :get_id() and suit with is_suit() == [suit]
this sequence of events is insane
I mean a lot of people here are older than me
i just personally have come to accept that some people will always be better at some things than me even if i hate it and want to always beat everyone
bruh...
like half the chat is older than aure lmao
do not get me started on this
im older than aure
I mean I think it’s natural to not want to bother people
im 27 and aure is listed as 19 and im not that comfortable lmfao
why is this not working 😭
ye thats fair
why is it returning nil
that's actually just discord timestamps rounding up
im 19 aswell
Not 18 IIRC
I'm 18
i still cant tell whats wrong here
you freakin liar
what did you have to suffer through
im 19, 20 in december
I had noticed aure’s bio changed and wished them happy birthday
oh no this is dangerous territory
off by one error
we figured out dynatext
freedom!!!!
discord is rounding the amount of years incorrectly
I actually had a very similar error yesterday. What are you doing?
gonna explode
oh hey im december child as well, dec 20 here
i don't have a better solution that isn't manually changing it each year
trying to load my collection of my jokers
children everywhere :v
they were studying computer science in their mom's womb, so i think we should give them one year as credit
gotta mess with it one more time actually im not free 
the timestamp includes the day if you hover on it, so that would give it away
Me calculating my age:
shit fair enough
i dont think its fair getting a head start that early, aure
ive been interested in programming for like as long as ive had sentience im just not dedicated enough to learn or practice a lot of things like shaders and visual effects and stuff which is what i suck the most at
If it matters, it might have something to do with how atlases are loaded between vanilla and modded jokers. Vanilla jokers don't have an atlas by default. When set_sprites() is called, it manually sets the atlas for Jokers on them, so they have nil before them
lol tbf i was doing university-level math next to school at 15 so I can see where the head start argument is coming from
im a month older than you
its still crazy to think about people born in 06 and later to me
my little brother was born in 08 and he still feels lik an infant to me though hes a teenager now
😭 can you send me some braincells
I dont think it does bc i still cant find the problem
IMO a lot of savants or heavily successful people in any field had head starts. Talent doesn't exist, but being accommodated and developing a passion towards a specific interest early in life does help a lot to prioritze it within your adult responsibilties later
way