#💻・modding-dev
1 messages · Page 340 of 1
Why did you nerf them though?
because otherwise there is NO reason to use them except eclusivelt strenghening them to a king plopping a red seal on and then running the same boring ass mime baron run
they also make reaching ante 39 absolutely a cakewalk
no skill required
you need to make it so negative cards give something when played too
Yes, but are you making it so that if your mod is present negative playing cards are bad?
its gonna be a config option that is turned on if my mod is alone, and immediatly turned off if included with other mods
atm
i dont really give a damm about other peoples mods just yet
sure
i want compatability eventually
but rn
they can
this is just for me and my buds lol
megative is an edition
scoring editions*
my b
most likely
my mods presence will make negative cards ALWAYS score (think like a stone card) and nerd their interactions with mime and baron in some way
I think negative playing cards are inherently a very Cryptid design. Hard to play design around due to in any card game, drawing more cards is always the most powerful thing you can do
thats likely why negative playing cards never made it to vanilla
but what if I'm playing UNO
they are busted
making them always score is a start
but making them less effective as steels or with baron will hopefully keep ante 39 an actual challenge
im also redoing the legendaries to make them scale much better in endgame so they stick around for longer
and are less busted earlues
ygo players willing to sacrifice half of their liver for draw +2 cards:
yeah
well i just ran a 100 wheel of fortune test
about 85 of the wheels hit foil holo, 9 hit poly 6 hit irid
thats pretty okay for me
heres the other thing
only way your getting negative cards in my mod is through an EXTREMELY lucky standard or ghost (which i reworked)
Turns up to 3 cards negative, -1 Discard
might nerf bro to 2 cards negative
i gotta play another game with him
anyway
either 1 in 2 chance to retrigger negative played cards or make negative played cards always score
you could make it so cards that copy neg cards wont receive the neg edition
see
now thats a good fucking idea
like death and cryptid wouldnt copy negative?
oooh shit
mhm
thats GREAT
i can leave mime and baron unchanged
and still buff them when played as well
ooooh
might make them slightly more prevalent in standards too then
i already have a joker that has a 1 in 10 chance to turn played cards negative as well lol
anyway
i
i go bed
night fellas
nighty
I'm finna be up like 30+ hours myself. I've been up since 3pm yesterday and it's 8an with a whole day and night ahead of me
trying to make a sixth sense -esque card but it creates a negative spectral on an 8 instead, but it crashes when playing an 8
Do context.destroy_card instead.
yeah i did but then the timing is wrong, it destroyes before the score is even counted
When do you want it to happen?
same time as sixth sense does
That's context.destroy_card
but the source code for it is incomprehensible
do this but don't use start_dissolve
return { remove = true }
does it play the dissolve animation too?
yes
how do i get it to target the 8?
context.destroy_card:get_id() == 8
What if negative playing cards give +0.5 hand size lol
It's absolutely cursed but actually kinda balanced
still falls under the problem of making negative playing cards worse for all mods too, and i think that should be avoided if possible
for a card, or for uis?
i need a button below where it says the ante
if the former then i suggest looking into how joyousspring does it
oh
try checking almanac then
the code is in its lovely patch
-# good luck btw

i see besties in chat rn
joyousspring mentioned
hi dilly
hi N =]
What do you mean by that
hi dilly
hi bepis!
I didn't read the whole 8 hours I missed so I might be missing context
some mods do utilize neg playing cards, like joyousspring (i think) and lcorp's apoc bird joker
Ah
if their mod were to nerf neg cards, then it would also affect those mods
thats not a good thing imo
Then just add a separate half-negative edition 🧠
(I understand the design problem at hand)
(I don't understand the design problem at hand)
funny bug, it generates now but i can place them everywhere
Multiple mods implementing the same idea with different levels of impact on gameplay
use SMODS.add_card
just make people not want to play your mod with others easy
wait it isnt SMODS.create_card?
Every time I see people making the same common mistakes I take another step closer toward making a balatro modding tutorial series
But docs 2.0 is a thing (?)
it is?
i'm trying to make my enhancement do something when played but it's triggering for every card instead of just itself
adding a context.other_card == card check just makes it not work at all
please
Another retina hater
oh my god please
i will absolutely link your series to the top of #1349064230825103441 too
i wanted to make one a few weeks, or months ago - but my pc is so trash 😭
its gettting better but it destroys tthe 8 + entire hand and creates 8 spectral cards
You need to check if context.cardarea == G.play
also create the card in another context, and dont put it in the return
yeah i put it there because i thoughtt it might lsolve the issue
Or use context.destroying_card
turns out the card thingy was working fine, but
it's not updating the /52 in the corner
it works, but i only summon incantations
wait sixth sense also only summons incantations
what does ur spectral collection look like rn?
everything unlocked
huh
damn idk then
restarted with the same seed and its fixed now
Negative in name only
it doesnt decrease when i destroy the card too
how do i update the card count after adding cards to the deck?
How are you making it negative?
nvmd i got it lol
Do you have other mods installed? That might be messing with planets?
nop
it actually affects the emperor too
they both use this
...hm
im gonna try something
nvm this doesnt work too, whats going on 😭
my the fool's code uses create_card instead of SMODS.create_card, i wonder if theres any difference between those
How can i make sure my joker only checks for hand amount in game but not the menu?
I need to have my code be done in the update function so keep that in mind lol
if you're just updating text, you don't actually need it to use update; you can just put the logic in loc_vars (assuming there's not a lot of logic)
I’m changing the art
oh, I see
oh hey
How do I check how many hands the player has
Most players have two hands
that's G.GAME.round_resets.hands
true!
I’m gonna start sobbing and I’m blaming you /j
Sorry, does this change based on if a player has played a hand?
Couldn't you just use SMODS.add_card?
i forgor
idk why i was using SMODS.create_card tbh, i think it was because i saw the add_joker and my head immediately said no since i thought it wasnt for that purpose :p
oh the current hands
that's G.GAME.current_round.hands_left
Thank you
how do you add a shader to a card (like invis)
wanna make a card of mine a lil shiny
l-l-l-looking in the source code??????
I'm simply allergic
you can put that in the draw function on your card
dang
spectral cards are added as sooon as the 8 is played, instead they should be added when the 8 is destroyed
how can i create a random tag 🤔
use events
G.P_CENTER_POOL.Tag should have all the tags in the game, try using that with pseudorandom_element or somethin
yahoo
boredom
yup
can you even die with that
I think it would be spelled resurrector
you could make it so that the card becomes eternal upon the first revival
probably
we did it
Every time it revives it eats 15 cards, game ends when your deck is gone
That works too
is there a way to tell how much blind size the joker increased without needing to have it though
i think its nice to have a way to tell somehow
Saves you from game over but 1 in 30 chance to game over at end of round
that might as well be a legendary joker 🥀
I mean
you could look at the blinds page and calculate it yourself
😭
it's just division
you're playing balala 😭
Saves you from death but 1 in 6 chance to become Gros Michel
-# who am i kidding, i literally got this
local t = pseudorandom_element(G.P_CENTER_POOLS.Tag, pseudoseed('htgfefrhjekrfr'))
add_tag(t)
i get an error "attempt to call method 'generate_UI'"? i'm probably doing something wrong
what about add_tag(Tag(t.key))
too slow
yeah i was thinking that it had something to do with key
I get this crash whenever I try to load the joker in the middle of a game.
can you show the code
i was about to
hmm i wonder what happens if i make orbital tag
uh
btw, i did leave out that } at the end, dw it is there in my code
shouldnt you use card instead of self?
Also update doesn't have context.
^
how do i get context then
Use calculate.
uhhhhhhh that's not right xD
but i need my code to work on update, as it runs each frame
i think i can loop through all visible hands then make it upgrade a random hand from that
arhrjghrkgejgegejgh
help, knowing the mod's prefix is fg and the enhancement is steel, how tf do I make this work?
whats FG.cards.steel_mult
also - you should probably go through G.playing_cards instead of G.deck.cards
we're so back (pun not intended)
ehh
thats still 8 free saves
2-3 if youre being practical ig
the punctuation
old comma 😭
A variable. I need all cards with said enhancement to have the same mult, and so I used an external variable that does not depend on the card.
first I can't spell, now I can't punctuate
damn I can't do anything
you can use G.GAME in which case, no?
something like G.GAME.fg_steel_mult should work just fine
I preffer having every variable used by the mod under its own list.
have you checked if FG.cards.steel_mult is saved when you re-enter the run
Is it possible to make a joker that acts the same as Showman but only when conditions are met?
and you can have a table in G.GAME, if thats what you prefer
Everything that is added by said mod is under FG.<something>
^
and also, whats the issue you are facing?
it doesn't even save idk what I am doing help
It should be.
so i think if you want to avoid the trouble of having to somehow figuring out a way to save that - you can put everything in G.GAME
By the way sorry to off topic but holy moly I could barely recognize you, how long have I been away from there?
G.GAME.FG as a table, then just add what you want in there
have it scale like ecto
not too long, but i certainly havent seen u for a while lol
how u been?
...fuck now I have to re-write the entirety of the mod to put everything in there...
oof
for the people
What if I don't have overwatch 2?
Awful, three Holomems graduated in one single week. But I lived.
it installs it
i agree with this xD
yeah i saw, gawr gura too right?
What if you don't have a launcher?
why are the holograms graduating
were too many cards added
OK, that got me a bit of chuckles.
hacks the mcdonalds in the pentagon
removes raevyn from balatro modding-dev
gifs are No More
never mind roffle blight is chill
jokes on you moderators, I've got png's!
they blocked tenor and giphy iirc
yeah
this is in an effort to make chat more chill or whatever, look in chill chat
ah
it's not tenor or giphy
L
get rid of all of those then try sending roffle blight
nada
hm
it's not that deep 😭
no more fun
i think so yeah
ack
NOT EVEN STICKERS
That's what they were talking about in #🍌・thunk-chat earlier
why
Because thunk is a diva
gbonna have to do it manual mode
Now I can’t post my Elmo wizard 😭
And he doesn't like gifs
that is what's banned already lmao
am i using other_card right or is it only used in repetition contexts?
There is a lot to unpack here lol
First, you wouldn’t return a set_edition call. Just leave it in the conditional on its own
Second, you might want to check for context.individual as well (or loop through context.scoring_hand in context.before)
what does context.individual check for?
I want to make my own deck. But like a standard deck of all 7s. How can I do that?
You would iterate over G.playing_cards and change the rank to 7 in apply.
So I’m very much a noob. what does that mean?
hi something 👋
Hello dilly
is this better?
it isnt returning when held in hand
Was there a context for card triggering when card is removed? Like for discards AND moving to deck at the end of the round
context.destroy_card?
i think you gotta just add a bunch of and's
I'm doing good-ish and you
ive had a very stressful time lately, but im trying my best
I hope you'll have an easier time soon. But it's good to hear you're trying your best :)
Yeah that I think, thanks
i hope so too
at least i have cool people in here to chat with 😎
anyone know how i can get the number of how many cards of a certain suit you have in hand
not something like context.individual, i need the number
run through G.hand.cards, check each card manually
could i get an example of what that line would look like please
not the most familar with lua
for _,v in ipairs(G.hand.cards) do
--do stuff to check v's suit here
end
im on phone rn so cant help much, sorry
thank you
bump, i want played stone cards to get upgraded editions (Foil -> Holo -> Poly)
Do you want it to stop at polychrome or keep going?
stopping at poly
ohh
Does a joker cause this effect or something else?
im planning to add another one that also includes negatives and does something, but for now this one will stop at polys
not that i know of
im using if statements to check the edition individually
I mean how are you trying to implement it
^^^
Do you just permanently want all stone cards to do this all the time?
as long as the joker is there yes
Ok so you do want this to be from a joker
Got it
What does it do right now
Does any part of it work?
i think i messed up a bit 😭
Is there no documentation for SMODS.ConsumableType?
Right now you're calling SMODS.has_enhancement with card, which refers to the joker. So you're checking if the joker has the stone enhancement
You need to pass in the played card instead
which is other_card?
how do i do this?
i tried this, nothing
Remove context.cardarea == G.play
crash
What is line 448?
this function
its related to smods' enhancement check
maybe its because im somehow checking has_enhancement wrongly?
okay it works, but not while checking other editions
adding the other two checks crashes the game with this message
e_holographic should be e_holo
Same for edition.holographic, should be edition.holo
oh damn
ill try it
it works!
i had to inverse the if statements so they wouldnt all trigger one after another
i forgot it was checking the card the entire time
this is the final code!
How hard do you think a palletizing shader would be to code. Just in general ignoring that I've never coded a mod let alone a shader
Specifically the idea is to snap the colors to the 256 color vga pallate
So 8 bit rgb I guess
uh, i guess you could go through the array of colours and select the closest one though that'd be pretty slow
this has probably been done before
like this? idk about 256
That's just quantization, right? I mean providing a pallete
Like this
the issue with that as written is that it calls an if a bunch of times which tends to be slow in shaders
*256, then cast to int (or round)
then /256
how would i make a deck that doubles all the cards at the start?
pretty much just duplicating each card at the beginning
nvm, just read few msg higher and that doesn't make sense
palette of 256 can be made easily by simply dividing the entire value of red, green, and blue into three pixels and then rounding it up
a
my sound crashes the game, i dont know why
SMODS.Sound {
key = "DoomHurt",
path = {['Hurt'] = 'hurt.ogg'}
}
-- skipping to where audio is played --
calculate = function(self, card, context)
if context.joker_main then
card.ability.extra.chips = (G.GAME.current_round.hands_left + 1) * 30
return {
chips = card.ability.extra.chips,
play_sound("Hurt")
}
end
end,
These ifs will get compiled to something like var x = dist < min_dist; min_dist = x * dist + (1 - x) * min_dist; and the loop is fine because it's uniform (and in fact comptime, which is even better). The biggest issue i can see is number of registers used (which this is Balatro, so who cares) and compile times due to length (see previous parentheses)
prefix?
Path should just be hurt.ogg you also should just do sound = "prefix_DoomHurt" in the return.
ah, thank you
my prefix is FFF, im doing FFF_Hurt, but i hear no noise
oh, wait, doomhurt
oops
Still no noise
this is what i have now
SMODS.Sound {
key = "DoomHurt",
path = "hurt.ogg"
}
-- once again skipping to when sound is played --
calculate = function(self, card, context)
if context.joker_main then
card.ability.extra.chips = (G.GAME.current_round.hands_left + 1) * 30
return {
chips = card.ability.extra.chips,
sound = "FFF_DoomHurt"
}
end
end,
"authentic" 8 bit rgb would require you to quantize red, green, and blue separately to one of 2^3, 2^3, or 2^2 values, respectively. Which would look something like (int)(red * 7) / 7 or (int)(blue * 3) / 3 (accounting for 0 as one of the quantized values)
From G.joker.cards[i], how can I get the edition (key) of any given card?
unless you plan on using a color palette in which case I have no idea how you'd find the nearest palette value on a per-pixel basis
G.jokers.cards[i].edition.key
i still need help :3
ty
I have no idea how sounds work but is the sound effect in the root folder of your project?
cause your path is just the filename
its in the right place
that's all I got lol
how can i show text on screen whenever you draw cards? just like the text below
Is it in root/assets/sounds?
yes
why is music pitch shifted and how much do i need to change it by to correct it?
You can just put pitch = 1 in your sound I think and it will do that for you.
yeah that works thanks
look like consumable
instant game over when obtained
<@&1133519078540185692> kill
how do i make a joker/consumable show a small thingy (such as consumable or enhancement) on the side
is there any other way to reset the game than holding the M key? i tried alt+f5 and doesnt seems to work
it's alt f4 not f5
yeah
yeah ofc
Use info_queue in loc_vars. For example, if I wanted to show a tooltip for Jimbo, i’d add this line:
info_queue[#info_queue+1] = G.P_CENTERS[‘j_joker’]
ty
joker's crashing when i try to juice it up, here's the error and code
i probably wrote the juice up function wrong, i low key just copied it from dna/invisible
joker itself works though
It’s your is_suit comparison that’s the issue. You don’t need the == true part of that
also i should mention it only crashes when a spade is in hand
removed the == true and still got the same error
I don’t think you’re passing in a value for your eval call either
I’d have to check my own code to see how you would do this but that’s definitely part of the issue, as v in eval is never defined
It's saying that v does not have the is_suit function.
chat is this fake news on newer smods versions? this never fires for me for some reason
my "full" code:
local isContextForOdds = context.before and context.cardarea == G.play
local isContextForVertex = context.final_scoring_step and context.cardarea ~= nil
local isContextForEdge = context.cardarea == G.play and context.repetition and not context.repetition_only
local isContextForFace1 = isContextForEdge
local isContextForFace2 = isContextForVertex
if isContextForOdds then
print("isContextForOdds")
end
"isContextForOdds" never gets logged
i think in that context cardarea refers to the object that triggers not the object that it affects like individual
oh yeah, i had this problem a little while ago. during before, context.cardarea is only ever G.jokers. the optionally enabled ones need to be optionally enabled. and even then i feel like it's something like context.other_cardarea...? but i feel like that's not right
huh?
That’s for enhancements only no?
i see, thanks
yeah, i just need to context to calculate roll my odds outcomes once because i need them a lot of times later, so i figured i'd use before for that
Tell me how to make the Joker appear only after you have certain jokers in your hand.
you can use before with jokers
ohhhh
no idea, this is at the top of the contexts docs for "Main Scoring Loop" so i thought it would apply anyway
i'll try cardarea = G.jokers
you can also drop the area check, i think it's only relevant for playing cards
does this ensure it's only running once?
Yeah not every context iterates over all cardareas
yes
i see
no - in my experience there are multiple calculate() fires that happen during context.before
not true because i use it
Tell me how to make the Joker appear only after you have certain jokers in your hand.
i mean i can just try in my usecase and report back
oh wait youre right lol
use context.main_eval
this fires only once? aight
also, bump
what am i doing wrong here? trying to add the bonus_dollars everytime card is held in hand, then get the dollars when scored
LMAO it fires a million times when just selecting a card
Tell me how to make the Joker appear only after you have certain jokers in your hand. Pls
context.final?
i'm dumb i can just ensure initialization by doing if blabla = nil then dostuff
Still no.
but im using that in my other held in hand enhancements and is working?
I mean if it's the same colors regardless then there's no need to overcomplicate it
how do you all have the balatro font in your code editor
context.final_scoring_step doesn’t happen in hand?
why is the better question
You can just pull it out of the exe if you want but I think they use monospace versions
but its working for in hand, idk why but it is, and i tried other things and they didnt
bump because it doesn't :D
what is your if statement for this
just context.main_eval - was i misunderstanding and i should add cardarea == G.jokers as well?
yeah just tried with final step and the code i sent rn and its working
what cardarea were you using before
i use context.before and context.main_eval and it fires once
G.play
oh so both, okay
yeah yeah
...does context.before and context.main_eval work?
is there a way to access driver_tally from another joker?
i'm trying 🧑🍳
context.main_eval is for when a context is called for multiple things so you only check the main trigger
i see, i misunderstood the whole context thing then, i thought only one is true at a time, but then again, someone smart at smods would make an enum instead of a table of booleans
i see
Why are you using an smods older than the release even?
Guys, how do I make the Joker match itself when I have certain jokers in my hand?
yes, just search the card with SMODS.find_card
no, that's true. main_eval is just extra info like cardarea
also its a vanilla thing
oh
not main_eval specifically but the context system
yeah that one's a
moment
what do you mean
anyways thanks it works perfectly with both now, only issue left is animation timings
doesnt that tell you if a card currently exists in a certain card area?
it gives you a list of cards so you get all the drivers license you have and check their tally
the double flipping looks weird, maybe need to do some variable delays here
i dont necessarily want to access an existing driver's license, i just need the tally of enhanced cards called driver_tally
where do you put the area?
And where are you trying to pull the tally from?
For example, I have in my hand 4 certain jokers and when they are in my hand, then to them spawns another who has in the conditions prescribed to have 4 of these ones
oh then no, you need to patch the part in update that does that but its just better to calculate it yourself when you need it
btw, did anything major break with the update or can i just update easily? how does this usually go for the modding people?
what update?
im on the latest commit all the time
That's what i was doing but i think im doing it wrong
if something breaks everyone would be complaining
it doesnt update ingame
lol
We're already up tp o
He stopped doing patch notes
yeah 1.1 is probably the one that will break stuff
yeah i know just big wet brain fart
Hehe
can i see the code
For example, I have in my hand 4 certain jokers and when they are in my hand, then to them spawns another who has in the conditions prescribed to have 4 of these ones
some people would profit from AI rephrasing their question tbh
SMODS.Joker {
key = "licenseplate",
config = {extra = {license_count = 0, scaling = 3, license_mult = 0}},
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
rarity = 2,
atlas = "EmeraldJokers",
pos = { x = 1, y = 4 },
cost = 6,
loc_vars = function(self, info_queue, card)
return { vars = {card.ability.extra.scaling, card.ability.extra.license_mult}}
end,
calculate = function(self, card, context)
if context.joker_main and card.ability.extra.license_count > 1 then
return {
mult = card.ability.extra.license_mult,
colour = G.C.MULT,
}
end
if not context.blueprint then
card.ability.license_count = 0
for k, v in pairs(G.playing_cards) do
if v.config.center ~= G.P_CENTERS.c_base then card.ability.license_count = card.ability.license_count + 1 end
end
card.ability.extra.license_mult = (card.ability.extra.license_count * card.ability.extra.scaling) or 0
if card.ability.extra.license_mult < 1 then
card.ability.extra.license_mult = 0
end
end
end
}
How to add a condition when there is one Joker, another Joker appears
do it like this
SMODS.Joker {
key = "licenseplate",
config = { extra = { license_count = 0, scaling = 3, license_mult = 0 } },
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
rarity = 2,
atlas = "EmeraldJokers",
pos = { x = 1, y = 4 },
cost = 6,
loc_vars = function(self, info_queue, card)
local count = 0
for k, v in pairs(G.playing_cards) do
if next(SMODS.get_enhancements(v)) then count = count + 1 end
end
return { vars = { card.ability.extra.scaling, count * card.ability.extra.scaling } }
end,
calculate = function(self, card, context)
if context.joker_main then
local count = 0
for k, v in pairs(G.playing_cards) do
if next(SMODS.get_enhancements(v)) then count = count + 1 end
end
return {
mult = count * card.ability.extra.scaling
}
end
end
}
Just put it in the add_to_deck?
what does the next() mean
ty btw, i just wanna understand the code
And how do you make a check if a certain joker is in hand?
gets you the next value in the table, so there I'm checking if the table is not empty
so if its not empty it returns true?
it returns the next value but that evaluates to true
If you want joker 2 to appear when you obtain joker one, put the create function in joker 1's add_to_deck
btw i just copied that from SMODS' license code
But seems like that's not what you want to do actually?
SMODS has rewrites for jokers?
i dont remember seeing driver's license in the example mods
oh wonderful
I want him to appear when there are four specific jokers.
My naive take on how to do that is add it to all 4 jokers add to deck to spawn joker 5, with the condition that the other 3 must be present
thats what i would do
That's what I'm asking, how to do it, example code or ready-made code
this was just way too overkill after looking at other mods...isn't one event with delays in between enough here?
like kino does it here:
G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.3, func = function()
i_card:juice_up(0.8, 0.5)
card:juice_up(0.8, 0.5)
card_eval_status_text(i_card, 'extra', nil, nil, nil,
{ message = localize('k_shazam'), colour = G.C.MULT })
i_card.flip()
delay(0.1)
SMODS.change_base(i_card, nil, 'Jack')
i_card.flip()
delay(0.23)
return true end }))
That's what I'm asking, how to do it, example code or ready-made code
this is how you can check if a joker exists
@red flower seeing the joker in collection crashes the game
Thanks, but if multiple jokers need to be checked?
No, SMODS.find_card
It's not my job to write your code for you ngl. I've never when added a single smods object besides some suits
oh yeah change the loops to G.playing_cards or {}
So I'm no more in a position to code it than you
it works for me, SMODS.find_card did not
weird it does the same thing practically
find_joker does not work with keys?
I want to show/update text whenever you select/draw cards, but idk how to detect those events and change the text, how can i do that?
im sad i didnt see this message sooner
where do you have the text
What is the correct way to write the appearance of the joker in add_to_deck ?
i dont know, it did for me
what is that?????
pinning certain cards to the top in my collection mod
can you summon them with the debug mod?
What is the correct way to write the appearance of the joker in add_to_deck ?
and scroll
im gonna need that link pretty please
i dont shill it as much as i probably should
thaaank you
definitely, this looks great
tyty
check this out
https://github.com/1RedOne/FickleFox/blob/master/src/jokers.lua#L1191
This is the function that's called when the joker appears, you would probably want to do something like this, but with 'add_to_deck'
Then when it is added, check for the other joker, and if there, then call SMODS.add_card({key = "j_golden"}) or whatever is the key of the joker you want to add
An animal focused, vanilla-friendly mod for Balatro - 1RedOne/FickleFox
how do you pin them?
do vanilla seals not have keys on them?
ctrl + click on em
beautiful
On screen, I'm using the attention_text function
It’s just the name of the seal like ”Red”
What do you mean
Do you mean an affix?
They don't have a prefix but they "have" a suffix
I mean what's the source of the text, a joker? a blind? a deck? some general thing?
That's the thing, I'm not 100% sure the seal's key is accessible from the seal table. It doesn't actually have the property key = 'key'
For example, most centers have their keys as a property in their tables, in addition to being indexed in those tables by those keys
Nop, just as a general thing, its a qol feature, so no jokers or deck required, thats why im also getting really confused
I don't think Seals are Centers
Ok then for selecting cards you can hook card:highlight
For drawing cards I think the easiest is hooking SMODS.calculate_context and checking context.hand_drawn
the seal key is just in card.seal
Okok, and how can i make it so attention_text doesnt dissapears?
Oh, weird. But thanks
It's too complicated and incomprehensible for me
And i also tried using the offset option, and for some reason, it moved the text slowly offscreen
and seal config stuff is in card.ability.seal iirc
sometimes offset does that idk why
i dont have the code with me rn sadly and I don't remember how attention text works. you can try just adding a dynatext object manually on screen
Do vanilla seals have easily accessible names or do I have to make them human readable?
I wonder if Custom Modifiers are possible yet. It would make making Pikmin flower overtime so much easier
I.E. usually objects delineate between a key and a readable name
is "Red" good enough for you?
No, I'd need it to be "Red Seal"
How does that work?
Nods
Usually you specify the key, the set, and the type of localization you want
Not sure if Seals also work like that
localize((type = 'name_text, key = card.seal, set = 'Seal'}) off the top of my head
or are seals in Other?
hi winter!
i have an enhancement that does something custom, and i want to have a joker do something when that triggers. how do i do this?
Seals are in other it looks like
i would check how attention text displays the text and copy that honestly, that should use dynatext im pretty sure
Programming joke name time
Ok, ill look into it, imma try using attention_text, and if it doesnt work, imma try dynatext, tysm for the help with the events
man i'm so bad at animation timing, whyyyy does this not flip to the back first ;(
play_sound("card1")
card:juice_up(0.3, 0.4)
card:flip()
callback(nil, card)
delay(0.5)
card:flip()
play_sound("card1")
delay(0.2)
is this all inside the same event
yes, i had it in two events before but then i saw this:#💻・modding-dev message
Idk what Kino is doing
I don't think running it all inside the same Event would work
Doesn't delay create an Event?
So by the time the delay Events are processed, the Event flipping the card has already finished
Yes
If you want a reference, check out Training Weights
before it kinda looked like this (from revo's vault)
G.E_MANAGER:add_event(Event({
trigger = "before",
delay = 0.5,
func = function()
if v.base.id > 13 then
v:flip()
play_sound("card1")
v:juice_up(0.3, 0.4)
assert(SMODS.modify_rank(v, -1))
elseif v.base.id < 13 then
v:flip()
play_sound("card1")
v:juice_up(0.3, 0.4)
assert(SMODS.modify_rank(v, 1))
elseif v.base.id == 13 then
v:flip()
play_sound("card1")
end
return true
end,
}))
G.E_MANAGER:add_event(Event({
trigger = "after",
delay = 1,
func = function()
v:flip()
v:juice_up(0.3, 0.4)
return true
end,
}))
Oh wait shit the loc key is actually 'red_seal' rather than just 'Red'
@zealous glen the thing is, i had both of these events in a function, and then i needed to call this function twice, but then it looked like this: #💻・modding-dev message
i badly need an await and promises in lua
Well that was mildly annoying:
what if you change the first before event to after
Can you tell me how to make a check for the presence of a certain joker in the hand?
SMODS.find_card
What's the next step?
reading the documentation https://github.com/Steamodded/smods/wiki/Utility
Learn coding instead of asking strangers to do it for you tbh
Strangely hostile response for a channel seemingly designed to ask strangers for help
Yes, but if you read their responses earlier. They're not trying to learn, they specifically want free code done for them
its kinda been the trend here lately i noticed
Why not just ignore them then?
people are angy cause they see the same questions asked over and over if people are fresh getting into this
i just dont respond alot of times myself
Here
I just ignore yeah but I can't say I don't agree with the sentiment
ive already said before i dont learn without taking code and then breaking it apart, i think asking for example code is a completely fine way to learn
they said 'example or ready made'
I guess we interpret what that means differently then
don't know why ur defending them, they use this channel as their google literally
everyone started somewhere, idk why it has to become some elitist aspect
I think that user has past behavior of asking for every step of code but that's the last I will say on this
B/c it's annoying to see people assume ill intent from strangers and if this user was actually a problem you'd ask server staff to talk to them
Okay, the first part I can Concede on. The second part, I cannot
Also this is true. They literally just want us to do it for them.
Does this have to be added to calculate?
I didn't test multiple Training Weights, but I wonder if they work
In the case of your effect it should be on add_to_deck, I think
Wough, timing card changes with effect text from jokers/consumables is annoying
this is what goku says before a fight
it's not elitist to ask for one second of searching either this discord or the wiki before asking here, sorry
i get asking searchable questions while ur already in some kind of discussion or as a follow up, but this is so far from it
#💻・modding-dev message
or this lol: #💻・modding-dev message
i get laziness, i get being a beginner, but then having this additional attitude like we are just their chatgpt window, nah
i'll try setting both events to "after" first
How would it look like in code, is there an example of some kind?
Like yeah I do understand the annoyance, it feels like talking to a brick wall, but it's way easier to just ignore or block someone
The main reason I point it out is because a lot of the times the poor communication can come from a bad grasp on the language from a non-native speaker, somebody really young, or somebody just anxious as hell and without having that assumption I just kinda block and move on
(which I have done here mind you)
It looks a bit awkward but it works. It might be fixable with a longer delay at the end of one calculation
I've just written the absolute worst loc vars code
For add_to_deck: https://github.com/Steamodded/examples/blob/d43316d97bc927f3de431dd84c0283d41e69761a/Mods/ExampleJokersMod/ModdedVanilla.lua#L183
Queen shit right here
share
thanks for the free code kiddo 😎
Okay wait this is hard to read and I don't need someone to parse this
ah shit its gone
i hate how blocking people works i wish it would just make the messages not appear altogether
Hello. I am having some trouble moving stuff to the localization file. Assuming the mod's prefix is fg, how should I work it out?
God yeah I wish
im so nosy i always click the message to see what was said anyway
same
Nah that's not bad
I get why they don't do it, b/c sometimes the lack of continuity of other people talking to the blocked person can cause more arguments and confusion, but like... I don't wanna see em
im just too lazy to block most times, i just ignore people
Maybe you could handle nil differently Idk maybe not
I don't think there's a place that explains how to localize ConsumableTypes? or am I missing something?
You have to do something specific for some reason but I don't know if it's explained anywhere, hold on
the objecttype page used loc_txt without explaining how to do it in loc files unlike other pages
The main thing to note is that at base, you need these boilerplate level references to your object type
tried
so 'k_[type_key' and 'k_[type_key]_cards'
my game crashes when i select my custom poker hand,,
And then you have to put your loc strings (if you're using localization files) in a table under descriptions named as the type key
i think you don't need the prefix here but i could be wrong
I tried without the prefix
crash log pretty please?
I wonder if it's because Consumable Types have jank keys
I think the consumeable type doesn't have sprefix but the consumable does
Yes that's what I'm getting at
That's how every mod defines the same Zodiac Consumable Type
Also I've got this working, the main thing I'm gonna have to figure out is how to to time the Stand attention text, and then probably splitting the loc into an alternate version if all three are in use to space it better
Hi :3
my guess is that you need to define the example poker hand
Has anyone made a Homestuck Extended Zodiac Consumable Types?
i have
i just didn't include it in the screenshot
Extended Zodiac no
Flint and steel--
Homestuck Zodiac there are three at least
Fair
i'm not sure the prefix is needed here, like just do key="flush_jess" maybe?
It's not working
still crashes
just looking at other code and a lot of them don't have it, sry
I personally don't vibe at all with the 'block and forget' mindset
remove self.joker_main
also the joker key starts with j_
like... it's fine when everyone's a stranger, but that never stays true for long in any sort of community
It's a public server, so by default everyone is a stranger to me unless we start to talk in DMs. If I don't like you and have to coexist with you, blocked, because it's the easiest way to solve conflict without making it other people's problems
did you look at the lovely dump to see what at cardarea.lua:192 is?
everyone is my friend here unless i have you blocked in which case you're my enemy
oh lol
how do i get blocked by u bestie
now how do i add enhancements to the example cards?
have some basic moral disagreement with me
hmmm, what is a moral thought u have
do u like dogs ill say i hate em ignoring my pfp
Uhh what are your throughts on Pinapple on Pizza
you need to do a lovely patch, let me get it for you
i dont care
i think theyre cute for the most part
i think its fine in rare instances but its not something i personally could have often
personally i prefer pepperoni, sausage, bacon, and then banana peppers =]
so was removing the prefix the solution? just curious
no
hm :D
i just had to make a new run lol
Just say you love memes
That will get 'en
and what do i do with this?
ill do you one better
fellas, i like caesar salads
I'm kinda basic, pepperoni and extra parmesan
you can copy this file, delete the other patches and put it in your mod
It's not working
order me 37 pizzas like this
it needs to be j_modprefix_key
but also returning true in add_to_deck doesn't do anything
i just had a really good caesar salad the other day
But fr through the most effective way to get blocked by me is to say some transmisognyistic stuff or other uninterrogated reactionary rhetoric. You'd be surprised how often this happens even in queer friendly servers
You also should use SMODS.find_card
this is true for me too
i have this place near me that gives a 'small' caesar salad which is isntead fuckin massive for like 8 bucks and i love it
i only got back into salads like last year and theyre so yummers
thats fair, i usually dont get involved myself and just leave a mental note about someone being mid
it works, ty
So what's it supposed to be
Okay so I fixed the display thing, now I just need to figure out some better timing
How will I use it if I don't understand it, that's why I'm asking for help, tell, show.
something like
if next(SMODS.find_card("j_mod prefix_key")) then
SMODS.add_card{key = "j_mod prefix_key2"}
end
I'd you have DebugPlus you can run eval dp.hovered.config.center.key in the console to get the key of the hovered card
Its the same as find_joker but uses key instead of name
update: this works perfectly, thanks
so cleeeaaaan - this is one joker done, four more to go and i have a mod
yeah i think because before events run immediately the card was just flipping and unflipping immediately
Wowwww! My artist just sent me the last card she was working on. Eldlich the Golden lord.
Oh my god I am in love!!!!
i will say the art for this is very cool
thank you thank you
cool as hell
also it synergizes with eldlich in my mod
Eldlich predates that guy by a long time (I think)!
eldlich is 2020? i think
I am in love with your mods config page and your jokers! I need to see how my Eldlich plays with yours!
modlich the golden lord
Whoa nice art alert. Oh and cool colors!
flesh house,, ,
works for flush flush five and straight flush too
Is that about Gold Cards
i want to eat these cards even if they are not consumables
do not consume the flesh
yummy flesh
are they all custom poker hands, or do you just modify the displayed name to say flesh insead of flush?
ok lol
I wrote it like this, the console gives an error
What's the error?
attempt to index field “center” (a nil value)
Are you hovering on your joker when running it?
No
do so
It doesn't work
?
I edited it, can you try that? Or show a screenshot of the code
Can I add a picture of my Joker without having to make an atlas?
unsure if and how i should fix this edge case but whatever, it looks funky
try next(SMODS.find_card("j_fut_lila")
but I don't really know why it doesn't work
where do you want to add that picture? and basically not really, AFAIK, you can look into SMODS.Sprite but the docs are outdated
you can always use native lua of course but why
idk, im just starting in this 😣😫
what do you want to do in general? just a retexture or a mod?
a mod
okay, and what would be the problem with using an atlas?
i dont understand things like pos and all that, im gonna searcha video and try learning
an atlas is just a sprite sheet, where like multiple joker images are in rows and columns, and then pos describes which row and column to pick for a specific joker
An atlas is a collection of images to make loading them into the game less costly. In order to know what part of the atlas to use, Balatro assumes it’s divided into equal rectangles. The rectangle at the top left is the 0th horizontally and 0th vertically
look at literally any mod to get an idea
yall know were to made a sprite easy? i have an idea but i need a page or software
ohh, okay. so its multiples jokers in one png?
start at the top here: https://discord.com/channels/1116389027176787968/1349064230825103441
programs can be aseprite, photoshop, anything that draws pixels
Most image editing software works. Aseprite is nice for pixel art, and you can compile it for free legally or buy it. Photopea is a browser-based solution that’s easy to use
whats the difference between 1x and 2x?
thx to all of you, you are great
2x is 1x but doubled in size
It's not working
You'll want to scale your 1x version with nearest neighbor scaling unless you actively want to go through the trouble of making truly higher res versions
I have no idea then, sorry!
btw, i was wondering this recently, has any mod done this? or is any asset in vanilla different in 2x?
I don’t see why any mod would do this when the 1x version could be higher resolution
And the 2x version could be the 1x doubled
no vanilla asset is different in 2x
what is the jokers medition?
it is literally just for pixel smoothing
69 by 93 with 1 pixel transparent border, so 71 by 95
How do I make a check for a joker in my hand and if there is one, add another?
How do I make a check for a joker in my hand and if there is one, add another?
does somebody knows the structure of context.hand_drawn?
you learn to read, sorry to be rude
I can tell you don't speak English well
Is it possible to color sprites using G.C colors?
I mean you'd need to use either love.draw functions directly or maybe shaders? That's my guess at least
maybe drawstep could do it
but I kinda doubt it, but I also have no idea what it's capable of
tbh love.draw isn't all that daunting, if needed, but idk how well it plays on the actual game canvas
I've used it myself, strangely, but only to write to files
I wanna make a custom card effect that has a colored outline of a card that expands outwards and fades out
And works on any card
yeah that sounds like an edition and this a shader to me
Would be much easier to do that yea.
Generally I don't think you need to touch love graphic APIs in this game at all unless it's very specific.
LocalThunk already built good tools around it.
I could probably make the actual card effect pretty easily, it's the color part that makes it complicated
tbh if it'd keep people from using lovely patches I wish it would be more common
as much I mean
So, to clarify I just see lovely patches as the least ideal way to do things because they tend to cause problems in large modpacks
yeah I feel like the whole "use lovely patches as a last resort" recommendation of mine has been lost to history
nothing against lovely
exactly
lovely is awful
so true
:p
Meanwhile I've just kinda started using lovely patches semi-frequently
I've got personal beef with the dev
hard not to
yeah I read a lot of lovely patches where I think "this could easily be a hook"
the man in the mirror is a bitch
I'm tempted to just post my lovely patches and see if they can be hookified
in a lot of cases patches are just plain faster but you need to consider compatibility
as a modpacker I do reccomend. It doesn't solve everything but it definitely helps with compatibility
in general I'm impressed that things are working as well as they have been
same
I manage to have 60+ mods, and it mostly work
jeez, that's wild to think about
like... I can and do play balatro like that, regularly
it;s the only way I play tbh
considering how much work it does at patchtime
unless I boot up a run on android in my spare time
I feel like these are the biggest offenders
it works on winlator
that's impressive af
and it ony takes a minute or to to patch, an order of magnitude longer than a real pc, but only slightly annoying
and that's with my huge modpack
I usually just do patches if 1) I have to basically rewrite the entire function to hook, 2) It's something inside an event or UI structure or 3) smods wants me to patch it