#💻・modding-dev
1 messages · Page 242 of 1
EXPLOOOSION
dont you love when you basically have an entirely new calculation system to yourself because of how convoluted your mod is :3
to the point you need a gazillion functions to make them working
yipee
well this is a weird error for hovering over a consumable
no clue what im doing tbh LOL
Might be caused by a DynaText not having a colours table
context.using_comsumeable and context.consumeable are two different things
all of the functions in jokers.lua alone reached 1k4 lines
:3
what is DynaText, and what am I doing that's causing it to be called?
Also not sure if is_card is a function
the iscard i know worked for my spade suit
you could just use card.config.center.key == "c_earth" or something
but if it works then its fine
:3
this is the consumable definition if it helps at all
key = "p_reverse_phobos",
set = "Planet",
atlas = "Reverse_Tarots",
pos = {x = 0, y = 0},
loc_txt = {
name = "Phobos",
text={
"{S:0.8}({S:0.8,V:1}lvl.#1#{S:0.8}){} Level up",
"{C:attention}#2#",
"{C:mult}+#3#{} Mult and",
"{C:chips}+#4#{} chips",
},
},
config = {hand_type = 'reverse_parity'},
loc_vars = function(self, info_queue, center)
return {
vars = {G.GAME.hands["reverse_parity"].level,
"reverse_parity",
G.GAME.hands["reverse_parity"].mult,
G.GAME.hands["reverse_parity"].chips}
}
end,
can_use = function(self, card)
return true
end,
use = function(self, card, area, copier)
update_hand_text({sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3}, {handname="reverse_parity",chips = G.GAME.hands["reverse_parity"].chips, mult = G.GAME.hands["reverse_parity"].mult, level=G.GAME.hands["reverse_parity"].level})
level_up_hand(used_tarot, "reverse_parity")
update_hand_text({sound = 'button', volume = 0.7, pitch = 1.1, delay = 0}, {mult = 0, chips = 0, handname = '', level = ''})
end
}```
so close
i think you need to additionally return a colours table if you want to use V:
Oh shoot you're right
guuuuuhhhh
and also
is the S:0.8 meant to represent the size change?
it should be lowercase "s", if thats the case
DynaText objects are the special UIT.O alternatives to UIT.T that can bump and jiggle and update automatically. If it moves, it's a DynaText
:3 context.using_consumable.config.center.key
I copy/pasted this part from a base game description for a planet card
Oh I realize what I need to pass to V but I don't know how to. Because it's the color corresponding to the hand level
or rather, I don't know where it's stored
card should be context.consumeable
o
thought context.using_consumeable already refers to the consumable card being used, sorry
Nah it’s a joker checking on what consumable is being used
anyone have a clue where the hand level colors are stored?
…
globals.lua line 454, G.C.HAND_LEVELS
if context.using_consumeable and context.consumeable.config.center.key == "c_earth" then
probably that?
You beat me
:3 i was actually uncertain of my code a bit so i let you type for a few more seconds lol
i think that's correct
Damn mobile hindering my typing speed
im stoopid 😭
thanks 🙏
i was thinking about just making the button bust in flames but thats good too, damn
thank u for the help, Im just getting confused
Also I’m not sure if I should ask people to not call me jerome cuz that was just me being different on the “john blank” trend lmfao
😭
i was wondering if purple flame would look cooker
why did i have autocorrect installed in my hands
ourple
Max isn’t my name either 😭😭😭
Yeah I know
how about mus then
Just astra I beg 😭
soo i?
api for making a hardcore challenge?
max "i" maximus
so close
colours = {G.C.HAND_LEVELS[G.GAME.hands["reverse_parity"].level]}
Real
but at least it doesn't crash
i should probably learn special characters in strings
If you wanna you can use the Maximus planet cards as a reference. It’s definitely a bit weird to get right
like % ^ v smt smt
...i dont even know how i got the coloring function working almost seamlessly without learning that lmfao
Don't forget to cap it at 7, there are only 7 entries in the array
G.C.HAND_LEVELS[math.min(7, ...)]
ah, right
question: this will always be a number >= 0 right?
considering it picks the highest number
nice, just learnt that from a website
-# should have probably learnt that earlier, most of my functions had a "if >= 0 then = 0"
its a miracle my code even works at this point, considering how inexperienced i am with lua lmfao
If you look deep inside math.max, i'm almost certain that's exactly what it's doing too
hmmmmm
yeah but it would certainly look much nicer if i used math.max() the entire time 💔
wouldve brought this down by at least 50 lines or so, idk
and we're in business with the planet card now 🫡
however, it is 3:16 am now and I need some sleep
is there a way to get an array of all jokers, including modded ones?
yippee it works
MAAAAAN YOU CAIN'T HAVE SHIT IN DETROIT
angy tent time. this one will incrase Xmult for every Joker Sold, or Destroyed
Kinda like Fireplace but weaker Scaling and only on jokers lmao
Might have something else for holding onoto jokers too, like +mult per joker in hand
gwuh
big block of text
i guess there is no _removed isnt there
That gives me an idea
omg hi vicrtin
Humpty Dumpty Voucher that gives your rightmost Joker $2 sell value per round
omg hi aikoyori who plays aikoyori from aikoyori’s shenanigans by aikoyori
oh i think i got it working lol
Hi, I have a Steamodded question and was hoping someone could point me in the right direction
I'm making a custom joker and I need to pull the value for the blind target score (e.g. 300 for ante 1 small blind). How would I be able to do this?
so how to make this work for Destroyed Jokers? Selling works but destroyed isnt
Oh, apologies if I'm interrupting a conversation
your not sorry
G.GAME.blind.chips
thanks!
if it crashes don't forget to check if it's nil
if it's nil then you wouldn't be able to progress anyway, as it's naneinf, correct?
i wanna give the dagger a use lmao
nil =/= naneinf
It has No Value
just do if G.GAME.blind and G.GAME.blind.chips then whatever end
augh
oh its doing every sold card too bruh
not just jokers
i think you'll just have to hook on cards getting destroyed
dont know how to do that
context destroy card or remove cards Doesnt work
and cardarea G.jokers also didnt work
i dont understand this at all god i hate hopw this works. How is selling random Planett cards apart of Jokers??!?!?!??!?!?!?!?!?! and again No clue how to make destroyed cards do their thing
why isnt there a context.playing_card_removed
is G.hand.cards an array?
yes
so #G.hand.cards will give me the size of the array, correct?
sorry if it's a very basic question, I'm new to lua
yeah
ty
I need help
I, Genuienly cannot do thios
it's fake. there's only context.remove_playing_cards
wait no you have that
and it doesnt work
remove the area check
how3 so?
I think it’s card.ability.set == “Joker” for example
cause i just want this joker to grant x0.1 mult for each joker sold or destroyed and its not seeing the destroyed ones and its going for every sold card
Might be ”Jokers” or the set isn’t in ability
remove_playing_cards is only for playing cards, there isn't a context for destroying jokers
But this is the way to test what type of object something is
Paperback implement their own IIRC
how do I read a card's rank? is this correct?
If you want a reference
in selling_card you can check context.card.ability.set == 'Joker'
Not other_card?
G.hand.cards[i]:get_id() for a numerical value representing the rank, including negative values for cards that don't have a rank
appreciate it, thanks a lot
no
Okay Selling works, but is there anyway to get destroying? really wish there was a joker removed. wheres this paperback?
it is possible to make a blind to do All additive modifiers to Mult affect Chips instead or do i need a lot of patching?
peak pain again
Idk what you’re trying to do but maybe the new branch helps
new new calc: the newnewening
-# it adds Blind calc
like +4 Mult -> +4 Chips
Maybe with post triggers?
sell context
YA GOT ANY GRAPES???
quack quack quack
it also changes the internal structure of calculate context which is really fun for me
time for magic trick 4 ig
is context.destroy_card used for when I want to destroy a card or if I want an effect to trigger when a card is destroyed?
I don't get how to properly set the context or assign which card I want the game to destroy
right now the effect simply does nothing
my intention is to create a joker that destroys the highest card in your hand whenever you use a consumable
im just gonna have the card work with selling i suppose
what is the self.ability.name of these jokers?
you mean this?
i forgor to clarify the question 💀
i meant if pic is called Suit Mult then what is jolly/../... is in code
I'm not sure I understand what you're after
im trying to find the code when these jokers proc
if self.ability.effect == 'Suit Mult' in the calculate joker func
If I want to hook something that affect all created cards, which function should I target? I'm not sure I know exactly how the shop, boosters and everything differ in the way they spawn in cards
i thought this code is for greedy/lusty/.../.. jokers
oh, yeah, sorry, you're right. for jolly it's .ability.t_mult and .ability.t_chips
oh, i see it now, im finding it for an hour
thank you
is this card sufficiently yucky
imo you should make it moldy and also trigger peoples tripophobia 
this was, fucking just 10 lines.
💔
all because i decided to add debuffs whose name counts as other debuffs', but at the same time they can have specific effects blah blah blah
shouldnt have pulled myself into this hellhole
Can it give more than $1 with retriegers?
it goes after scoring
😭😭😭😭😭
Hi, I don't know if this is a frequently asked questions, but does anyone know if there's an actual guide to mod the game (I'm new to modding and I have no clue where to start from :D)
Ty 😁
okay, this is weird, im trying to do a deck with certain cards removed but its not working properly and debugging it shows that G.playing_cards is not including kings and 10s for some reason
11 jacks
12 Queen
13 King
14 Ace?
In your deck you have only 10 and king?
Huh
my idea is to remove kings as well, not 10s but funny that they doesnt show up either
are you running any other mods, or is it just that code and smods?
i think you'll have to hook into apply to run
hook?
nah, apply function does the same
I do think there's just the a no_ranks thing you can set with a deck, no?
or is that just for challenges?
<@&1133519078540185692>

eggsecuted
This code from abandoned?
i think i just copied some of the examples in the smods github and tried to do this
up
you're combining contexts! You can't be in the using consumeable context while you're in the destroy_card context!
No, then they'd still be combined!
huh
theres only one context happening at a time
you cant check for two contexts at once thatll never happen
ok
i think.
is there a function that I can use to destroy cards without a specific context?
so I keep the consumable context but still destroy the card
i had to patch that functionality in
pseudocode_testfunc({arrayofinfo})
if variable_A == true and variable_B == true then
Do thing
end
If I then do
pseudocode_testfunc({variable_A = true})
pseudocode_testfunc({variable_B = true})
Then there's no moment at which the function runs in which both are true at the same time. If I'd rewrite the function to look like this:
if variable_A == true then
if variable_B == true then
Do thing
end
end
then for Do thing to happen, both would still need to be true at the same time, they're just checked after each other, instead
variable A and variable B can be contexts?
I'm not sure what the proper syntax would be, but you could see if you calculate the effect of a destroy effect, I think. Something to keep in mind, though is that you don't need to have a G.hand present to use a consumeable, so you'd need to add some checks to avoid crashes regardless
i assume not
yup, true
okay, update to my issue, doing like the abandoned deck and set the remove_faces = true for the back's config, now it work as expected, but still weird
i'll keep that in mind
no, sorry, should've made it clear that those are really just names I picked to function as an example for the logic. None of that code would work in any real language, haha
by searching on card.lua for hanged man, immolate and trading card I still couldn't find the proper function to destroy a card
maybe I'm not looking deep enough
SMODS.calculate_context({ remove_playing_cards = true, removed = destroyed_cards }) is called whenever a consumable destroys
but that's not the code from the base game, that's in your lovely dumps. the base game is a bit more hacky
but this is a check, right?
this doesn't actually do anything?
will this work if insteaad remove :start_dissolve()?
or, hacky, it's less modular, but taht was fine for thunk's purposes, haha
wait no
fairly certain this gets you nothin but ghost cards
I'm not trying to trigger an effect when a consumable destroys cards, I'm trying to destroy a card when a consumable is used
you want me to try?
wait i misread entirely
ignore me
this is a confirmation of the cards being destroyed. The logic for card destruction on the consumeables is still handled by the consumables itself, iirc, let me check
okay, yep its working, how peculiar
down with the monarchy
maybe its related to how ipairs work, idk much about lua
I'd definitely ask eremel or aure for the best way to do this if they're around, because I know that I definitely had some problems pop up when I destroyed outside of the proper context. It was a bit of a wonky system, but I don't know how SMODS currently handles it because I haven't had to use it, haha
lmao
what the
big cards can't be bought in a booster pack if you have only 1 free slot left, which is the behaviour i want because they're meant to take up 2 slots, but you can still buy them from the shop with only one left, which leaves you with 5/4 jokers
do shops run different space checking logic to booster packs???
btw did this funny deck sprite
ok thanks
is it fine if I tag/dm them or it's better if I don't?
so what does this deck do
I'm not sure what they prefer honestly, hahaha, I just beg them for advice whenever I see them typing 😋
the same as the abandoned deck, just wanted to try to do it without looking at the abandoned deck's code (and i forgot also about the abandoned deck existing lol)
deck but no numbers
that would be funny too
the plant:
the mark:
ace count as number? like it count in todd
technically counts as 1, yea
nvm it's 14
i am. very confused by this
but yes still a number
Lobby deck
wow you only have like. 3 hands before you run out of cards
basically
but also GUARANTEED FOUR OF A KIND LETS GOO
maybe make copy for each card but it has not/negative(if work) base value for balance
do you know the function to add a copy?
copy_card iirc
Is there a document that lists all the coloured text available?
sad
lmao, wee joker with the Big edition is almost the size of a normal joker
almost, its still noticably smaller lol
thank you!
Man i should really finish my documentation of text styling
im making a little joke Joker and i wanted a little of fancy text!
If I want to increase the weight of a specific booster pack depending on the deck, is the easiest way to do that to take ownership? I guess I can define some globals I can edit to set the weight too
where does the game use edition colour again
It's used for the "You win" text, and i think also on the edition tooltip for jokers with editions
i think edition tooltip most of the time uses dark edition I'm not sure
ugh i can't figure out how to scale the floating sprite on a joker, i've managed to scale the joker main sprite with card.role.draw_major.T.w but i can't find any way of scaling the foating sprite that actually shows up
I have been struggling to take ownership of invisible joker for about an hour now only for me to realize I was spelling invisible wrong and that fixed it immediately
Sprites have T.scale if you haven't tried that, though there are situations where that gets overridden
the floating sprite is one of those situations
Also try VT.scale
doing T.scale on the main sprite actually does also scale the floating joker, but it doesn't scale the hitbox for clicking, hovering etc
nada
Can I make the deck display messages just like cards can? 🤔
man big jokers was funny in concept but this is acting a nightmare to program
is there an easy way to make an edition cause the card to retrigger whenever it's triggered?
Just checked the code - for vanilla jokers the draw scale is set by scale_mod on line 4513 in the Card:draw function of card.lua. You'll have to patch it with Lovely.
For SMODS, it's scale_mod on line 330 in SMODS.DrawStep of card_draw.lua
how would i create a random wild card????
lovely, now that the code induabitably runs to this specific section of the codeblock my ass
there should be a function that allows you to create a playing card, and if it asks you to specify the suit and rank, you can just have it pull from SMODS.Suits and SMODS.Ranks respectively with pseudorandom_element, then you can apply the enhancement with Card:set_ability(G.P_CENTERS.m_wild, nil, true)
hiya!
i've made two Joker sheets
my main script has an atlas, and Jokers that reference the first sheet
how can i create a second script, with a second atlas?
just define it with a different key
old deck?
abandoned deck? i was trying to do something like that by myself
What does this look like
an ice totem
ice road with an ice city at the end
the joker text being clouds is cool but id make it a little more visible
or not do whatever 🤷
If it's what I think it is, badges
I believe
snowy town with an ice road and the word "Joker" in the sky
i wanna create a card and i cant wahhhh
Ywah i dont think i have the capability of making an ice throne with like 12 pixels to spare
shoot yeah
ive been working on this and the patch im testing with doesn't seem to be doing anything?
it IS being patched into the code, it's just not doing anything??
someone help me
i think you can use this function? (not like edit this function specifically but im ss'ing so you can understand how it works and use it in your code)
im also unsure if SMODS has a function that does the same thing but better
well i cant find it
should be in common_events.lua
Hmm, I hadn't realised that SMODS overrides all joker card draw functions. If you remove Steamodded, I reckon that patch will work fine.. but that's probably not very helpful for your case, so apologies for misleading you.
oh what the
idk if this is because of the patch or smth else but with blueprint specifically the big edition creates a second floating sprite
and its not shaded with the same shader
i will try this
wait how do you patch smod code
is it the same as normal
you don't need to patch anything
SMODS provides utilities for this
you can either use a specific class' draw method or SMODS.DrawStep
I'm not sure if the duplicated sprite is a vanilla thing, but it exists because all children will be automatically drawn, but if you also manually draw them they're being drawn twice
either way you can just tell SMODS to not draw it the first time around
so if i give an edition a draw function, will that be called to draw the joker instead of the default drawing function?
Maybe. Idk if Editions have a draw function but they do have a shader
In any case, you can check the wiki (or just try)
problem is shaders seem to be bound to the original size of the joker so theyre not good for resizing
can someone give me the function
ok editions do not have a draw function. awesomeee
all this for like. 6 of 150 jokers
lol
I think you can resize the Joker inside the shader
I think that's what the scale parameter does
behold my new joker (sprite is just temporary)
theres a scale parameter? i just copied code from bunco because shaders scare me
i just want SOMEtHing to create a playing card thats it
create_playing_card?
what are the parameters
oh thats neat i like that
thx ^^
do ijust put it in the code?????
yes
actually I wonder if you even need a shader for this
you can just change the card's scale parameter directly
card.VT.scale IIRC
card.T.scale?
maybe im wrong
it's a function, you can look it up in the vanilla code
it should be something like create_playing_card({front = ..., center = ...}, area)
I tried it and it worked for me
what are the parameters yall i dont get the meaning
Actually using the hitbox display command the hitbox is smaller than the visual card, but I hardly notice it
Still, you also can manually increase the hitbox size
does that work with the floating sprites?
you can change card.T.scale and it will work
TRUE
im in the joke of it, everybody mults
yeah ive tried this before and the hitbox difference annoyed me too much, you said theres a way to resize the hitbox?
im in the bal of it, everybody tros
what the fuck is "skip_materialize"
i assume that if it's true it appears instantly
instead of appearing with an animation
From the cards, to the deck, to the queen, to the king
how would i do this?
oh shit
i may or may not have an idea for a boss blind...
The Rumble
hai sorry i'm back ^^
i've tried to add a second script, but that hasn't worked
i put it into items, but the game hasn't seen it
o wait
u made more fluff?
yeah
bepis. bepis what are you planning
cool mod :D
thanks!
this is the start of the script
boss with phases and ATTACKS
i don't know how to get my mod to see it
oh dear
if my mod's jokers are busted, then i will counter it with strong boss blinds
smiple...
imagine a blind that moves the window so a specific card is always at the center of your screen
i was thinking of a boss blind
that when you try to press Play Hand
it shifts the window so that your cursor is on Discard instead
:3
thats. mean
likely
but its not so fast that you can't move your mouse back to Play Hand
its there mostly to catch you off-guard
:3
the helpful Burnt Joker:
^^
(sorry, bump — does anyone have a solution?)
assert + load_file like usual
good sign
ya but like. what's the "usual"? i've never done this before
assert(SMODS.load_file(your_file_name.lua))()
what on earth does a 45 degree rotated tarot even do
and where do i put that?
in main.lua
does 45 degree rotated tarot stuff
if you put the file in a folder then it will be folder/your_file_name.lua instead
this is my code to do that easily :3
mhm
Is there a way to access the soul floating sprite draw function via SMODS?
from what im seeing in your picture, its likely assert(SMODS.load_file(items/BFDI2.lua))()
mhmhm :D
I can add shaders through card.children.floating_sprite:draw_shader() on the card draw function, but this occurs after the dissaolve shader is already drawn
probably this
This is exactly what I'm after, thanks!
hmm, getting "Attempt to concatenate a nil value" on line 12
assert(SMODS.load_file(allFolders[i].."/"..allFiles[allFolders[i]][12]..".lua"))()
WAIT NVM I SEE IT 😭
i need new glasses :P
wondered why it was index 12 :)))
hmm okay, new error
how do i change the mouseover hitbox size of a card? ive scaled the card up but the hitbox hasnt scaled with it so its kinda jank
well i still dont fucking know how to create a card, which shouldnt be this hard
...
if type(self.config.center.soul_pos.draw) == 'function' then
self.config.center.soul_pos.draw(self, scale_mod, rotate_mod)
...
This is interesting, if card.center.soul_pos.draw is a function then it executes that function
try create_playing_card({front = G.P_CARDS.H_2}, G.hand)
where does cryptid animate Jimball? i can't find the script that's in
what is the function when you press Play Hand called?
i want to hook smt to it to act as a "Turn" :3
-# playing one hand = 1 turn
G.FUNCS.play_cards_from_highlighted
anyone got any idea how i can do this?
looking to make this an animated Joker but i can't find how
shader
what if there was a joker that worked similarly to midas mask but with steel? itd have to be harder to activate than just any face cards in order to be balanced
but Cryptid does it without a shader?
check cryptid's code
i have 😭 i can't find it
Hey folks, I've started modding the game just yesterday and I've already created 4 joker cards, but today I hit a hurdle on a more complex card. Basically it acts as Baseball Card joker but with another string instead. Can anyone more familiar with the code tell me where my mistake is? The card currently works ingame, but the X mult does not calculate.
config = {
extra = 0.5, -- Multiplier for each Corote Joker
},
set_ability = function(self, card, initial, delay_sprites)
-- Ensure the multiplier value is set correctly
card.ability.extra = 0.5
end,
calculate = function(self, card, context)
if context.other_joker then
-- Check if the other joker's name contains "Corote" and it's not this card
if context.other_joker.name and string.match(context.other_joker.name, "Corote") and context.other_joker ~= card then
-- Add visual effect to the other joker
G.E_MANAGER:add_event(Event({
func = function()
context.other_joker:juice_up(0.5, 0.5)
return true
end
}))
-- Return multiplier bonus
return {
message = localize{type='variable',key='a_xmult',vars={card.ability.extra}},
Xmult_mod = card.ability.extra
}
end
end
end,
in_pool = function(self,wawa,wawa2)
return true
end
}```
welder joker: uncommon joker
Scored [rank] become steel
rank changes every round
would that be balanced? worth picking up?
Before I even start this, once this is up and running it will be able to work in game mode? Id hate to have to switch to desktop mode each time I hop on Balatro
I think that's fine
I'm assuming it'd work like The Idol, where it only picks ranks in your deck
hey does anyone know how to ban a voucher in a challenge? it isn't working quite right but im prob wording it wrong
seems balanced and good for if someones doing steel sstuff
i'm not super familiar with lua but i'm sure i could learn it in time with my experience in other more complex languages, but i come to question how would i get started making my own mod? i have an idea for a joker that "enhances" the joker to the right of it, similar to blueprint. by "enhance" i mean that it gives it a new ability or enhancees its ability even further, if anyone's ever played the Fargo Souls Mod in Terraria, it works pretty much exactly the same as the wizard enchantment in that mod (seeing as i would call the joker the Wizard Joker)
not entirely sure but it should be restrictions = { banned_cards = { { id = "v_key" } } } i think
oh it should be under banned cards?
i was doin this
im pretty sure yeah vouchers are cards afaik
i just snooped around the steamodded wiki and asked questions around here
goated info to know
thanks 🙏
yeah, i planned on pulling from mail-in rebate's code
I see
Time to try and find where the game stores the number of cards per row in collection view
because I want to make my custom planet card show up on the same page (and also ideally insert it in planetary order)
ok, but how would i directly add it to deck, and make it random?????
so this was in game_object.lua in the SMODS folder
was this towards me about the welding mask?
no that was me talking to myself
alright
sometimes it helps me think
its been 7hrs i think
do a pseudorandom_element on P_CARDS
do you happen to only have one Chemical card made rn
Yes
nvm this didn't work
thats probably why, it probably doesnt want to create duplicate cards
oh wait I didn't match the full line oops
But theres only the joker
mhm
Nopt the joker and the chemical
its always the Joker afterwards, right?
All locations where the word vampire shows up will be replaced with Werewolf? I hope that's how it works cuz that would be perfect with what I'm doing
After anything, yeah
We're in business
:3 Joker is probably the default placeholder for when there's no other card to search
had it happen to me when i only made 1 Relic for a Relic pack with 4 slots
now, can I get this thing to appear next to Saturn in order 🤔
this helped a lot ty c:
that is correct
can't you set a default object to objecttypes
you can make infinite Jimbos if you run out of any class of Joker to collect
same with any source that can't find more Jokers
2, 2, 4, 6, 10?
I hate that
i had it correct _ to a longass function before
all evens or all odds. Wasn't sure how to convey that aside from making it an example hand
does anyone know the key for the red seal?
😭
(bump?)
i don't know if that will work

Probably make the atlas an animated atlas
please elaborate, because my last braincel is fried
wozzat? :)
rebbd..,
splice that into a spritesheet
mhm, done that
then uhhhhhhhhhhhhhhhh
Then set the type to animated atlas
helllllppppp
will give that a go, thanks!!
You gotta have frames and atlas_table
P_CARDS is a table with the cards, pseudorandom_element gets a random element from a table
No problem!
...oh, thats new
it's completely undocumented, as per usual 😭
how do i write that
im tryna make it so this joker give +18 mult for every gold card in ur hand but it gives it for every scored gold card, what am i doing wrong?
if context.before then
card.ability.extra.gold_count = 0
for i = 1, #context.full_hand do
if context.full_hand[i].ability.name == "Gold Card" then
card.ability.extra.gold_count = card.ability.extra.gold_count + 1
end
end
end
if context.joker_main and context.full_hand == G.play.cards then
return {
mult = card.ability.extra.mult*card.ability.extra.gold_count,
card = context.other_card
}
end
end```
-# guess im throwing this away
check G.hand.cards instead
so I assume this is how the game decides the display order of the planets on the collection page
okayy ty
you can check my code for reference https://github.com/nh6574/JoyousSpring/blob/6b5733fd709410643dd201601b6d8f95d49334f0/src/effects.lua#L119
is there a way for me to insert my card into this order without having to change literally everything?
idk how to write that tho
oh -w- i never thought to check there 😭
but my function actually allows to have animated sprites through a function without making a new atlas soooo :3
i didn't think it was an atlas thing 😭😭😭 sorry
-# of course its JoyousSpring, the solution to all problems
n where did you steal the description dummy
How do i check the first card in a card area
dev branch poker_hands
displaying poker hands in the tooltips nicely
it is literally just a center but it does nothing but be a description dummy
G.<cardarea name>.cards[1]
so the docs say
frames: for animated sprites, you must provide the number of frames of the animation. Each row should contain one animation, with each column showing one frame.
still dont work, would it be if context.full_hand == G.hand.cards or if context.cardarea == G.hand.cards?
im highkey confused rn
Thanks
...uh, thats not how you do it
does that mean that my sheet has to have a row with 19 frames? [the animation has 19 frames]
How would i open the Debugplus cmd
lemme reread the docs rq
this is probably wonky, because pointer comparison

calculate = function(self, card, context)
if context.before then
card.ability.extra.gold_count = 0
for _,v in ipairs(G.hand.cards) do
if SMODS.has_enhancement(v, "m_gold") then
card.ability.extra.gold_count = card.ability.extra.gold_count + 1
end
end
end
if context.joker_main and context.full_hand == G.play.cards then
return {
mult = card.ability.extra.mult*card.ability.extra.gold_count,
card = context.other_card
}
end
end
Anyone?
i think it's /
Thats the american keyboard variant.
(bump? sorry ^^)
Like which key
to run commands, put "eval" first
EX:
eval print("hi mom")
like, idk if it'll work with this sheet
...i have no clue what you mean by that 😭
unless there's an easy way to do this, I might just not since it's purely aesthetic
just make a new sheet i think
Next to? ex 3 and 1
use my code...
ty kind soul 🙏 i still dont understand what is _,v in ipairs
the code is shit, but look at it for reference
you dont have to make a new spritesheet
for key, value in the table
hey goobers, is there any way to level down a hand?
in love2d community too?? 😭
The function that levels it up also levels it down!
thought thats a general lua question
game devs are more likely to be beginners i guess
i guess my thing is nicer
true
oh wonderful news!! im making a silly jonkler that levels down hands played :3
i was going to make it random like your thing but i was worried about messing up the seed
just realized for the thing that only animates one card
the table actually doesnt save through the run
The Arm is your friend
arm friend c:
hi
goodbye
how would i go about making a joker retrigger via an edition?
i give up
aikoyori did it
:3
idk why its so hard to create a card
idk how
but i fucking give up
is there any way to check if the score sets on fire?
8 fucking hrs
isnt that the Certificate joker thing
im so done
if score is greater than blind
i copied my code from that, its not that hard
sometimes we get stuck at those parts, but thats just something we have to overcome
i mean i literally sent a function that makes a random playing card
when you get it working then you will also learn how to get it work faster, making you a better coder overtime
soooo yeah, dont give up :3
i really think certificate's function is exactly what he needs, since it makes a random card and inserts it into the deck
-# if we dont talk about the seal
i still have a joker that isn't working right, but im just letting it breathe until i can figure out how to fix it's bugs
i rewrote most of my shit at least 4 times already
ever have a hand that you physically cannot score because it goes away when you select a card?
its tiring as hell, but at least i know it will help me in the future
in practice it's hilarious but it's a coin tossup that it crashes the game so i gotta patch it sooner or later

oh damn looks like aikoyoris shenanigans has a function that does what i originally wanted big jokers to do before deciding itd be too hard
maybe
hmm if i want to create a joker that gives +1 Ante on pickup how should i go about implementing that
oh does anyone have the context to check for a specific hand type?
hmm. so even after making a new atlas, it's throwing this error
hello chatters, fine day
[this]
checking scored chips is G.GAME.chips right?
yea, thats scored chips
just increases the ante by 1, put that in add_to_deck function of the joker
bet ty
hello didly
choclate chip cokies
bepis i thought u did it again
:3 hehe
Hi
ghost whats ur atlas code look like
is the config just {ante = 1}?
nop
atlas is this:
SMODS.Atlas {
key = "Puffball",
path = "Puffball.png",
px = 71,
py = 95,
atlas_table = "ANIMATION_ATLAS",
frames = 19
}```
config is just something you save for future use
Should work, yeah
8 FUCKING HOURS
joker is this [temp ability]:
SMODS.Joker {
key = 'puffball',
loc_txt = {
name = 'Puffball',
text = {
"Earn {C:money}$#1#{} for each",
"{C:blue}hand{} remaining",
"at the end of",
"the {C:attention}round{}"
}
},
config = { extra = { is_contestant = true, given_money = 2 } },
rarity = 2,
atlas = 'Puffball',
pos = { x = 0, y = 0 },
cost = 7,
blueprint_compat = false,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.given_money } }
end,
calc_dollar_bonus = function(self, card)
if G.GAME.current_round.hands_left > 0 then
return card.ability.extra.given_money * G.GAME.current_round.hands_left
end
end
}```
me too noober, me too
whats the command to send a message in the joker lua file again
getting the description pages working wasnt easy at all, so i can relate to your pain
And?
I'm taking a small break, but I have all the mechanics for the Yume Nikki World figured out
SMODS.calculate_effect({message = "wawa"}, card)
ah ok, found the merry andy part in the example mod
Try it, if theres an error we can help you, it will be faster.
there is
-# isnt this the error
-# 😭
i have my own code to add animated sprites so never touched those before :3
well then give ghost ur freaking code nerd
i meeeeeeeean i wouuuuuuld use that
i did
oh
just, i'd prefer-
i had a 'wait my code launched and didn't crash??' moment just to realize the joker im working on isn't loaded in LMAO
its mostly just for reference if anything
if it works it cant be shit
(she/her)
allg ^^
batro
i mean, true

yeah, usually using something already provided by mods is better
So uh, it should work. But can you show the lovely/dump/engine/sprite.lua:11
-# i would use it too if i knew its existence 💔
suresure
gotta get my github up tomorrow for wednesday's playtest bsr release
yipee
cant wait for everyone to marvel at how shit my mod actually is ❤️
finally, guys in 2 days i can release the beta for this cool mod called balatro star rail
bepis releasing the pepsi tomorrow
ive don a ton fo work on it
Do you have the animation in the both 1x and 2x?
will this work
root beer goated...
is there a way to automatically restart the game without having to exit out entirely?
PEPSIMAN!!!!
wwoooh wth you gonna do with that
It makes it easier to test changes to stuff like joker descriptions
this is too much
i think it was said that it would be really buggy for other mods before, so john debug pkus advised against it
if you mean just an easier way to restart for testing purposes you can throw this in your main file
SMODS.Keybind{
key_pressed = 'f5',
action = function(self)
SMODS.restart_game()
end,
}
and then just press f5
but otherwise i have no idea on not closing the game at all
ah, alrighty
oh o thught it was gonna be for a joker
adding a mandatory f5 keybind in my mod
Hold down 'm' for just about over a second
working instantly > holding for a second
its slower than just pinning the game to taskbar
this is a thing?? since when????
-# is that sarcasm
no
m
make a joker that makes a random key the restart game button, eventually itll land on left click
hello ice
am i the stupid tm?? i dont see the skissue ;w;
im crying
I CANT FUCKING BELEIVE THE CODE WAS IN THE MAIN CODE THE WHOLE TIME
i cant stress this enough, 8 HOURS TO COPY TWO LINES OF CODE
it happens, it took me awhile to get things started before
programming is just like that sometimes
i know for one joker of mine i had to leave it half functional for a cople of weeks before coming back to it
and then realizing it wasnt as hard to get
lets not talk about me getting the retrigger_joker wrong for 1 ENTIRE WEEK
some of mine are still half functional like the one im working on rn
:3
but i can finally sleep tonight!! :3
sometimes the secret is sleeping
unironically ive been stuck on problems, will sleep, and then my dream self will reveal the code to me
alright so i've found whereabouts the issue is
removing:
atlas_table = "ANIMATION_ATLAS",
frames = 19```
works
honestly so true
even just walking away can help
oh anyone got any pointers on this? if i must ill get loster in the sauster tho . 3.
doesn't that just make jt
not animate though
You sure theres 19 frames?
what's up. I'm immediately reminded of what thing it is this time that I forgot to do in my latest Kino update, haha. I'll make sure to add you to the credits proper when I have time
why does your filename in VSCode say [WIP]?
Do you have new lines?
i dont think the number of frames should cause the crash, since its just reading the png file and positioning the sprite
no
oh. OH IM STUPID STUPID
Then why 8 + 8 + 3?

its like if i set my sprite_pos to {x = 1000, y = 1000}
mfw working on the wrong file
oh im not too worried as long as i was able to help you out!
im just glad you didnt discover the secret malware >:D
that's what it was in the old atlas
it will just show nothing
i moved everything around in the new one
Cuz im not sure if you can have new lines.
You sure it is referencing the new atlas?
welcome to the stupid™️ club, enjoy your stay
yeah
And you have it in both 1x and 2x
yeah
i didnt even know atlas_table used frames in it, i was seeing aiko not use them but maybe its cause it was a diff situation
1X
I'm taking that
im sending it to my lady, shes an ornithologist as well so i think it fits
Probably
Nah I'm just being a good dude and passing it along to more people ❤️
thats my freaking goat right there
And 2x?
i cant find the code that changes the idol's selected card or mail-in rebate's selected rank, does anyone know how i can choose a random rank based on whats in the deck?
They are the same size...
i think how they work is choosing a random card in your deck
then takes the suit/rank from there, dunno
ok, before i have a mental breakdown, someone tell me how to put an ENHANCEMENT oon the created card
what? no
there are random selection functions
I forget the one to select a single item tho
wild more precisely
the two that you sent are, afamms
look for pseudorandom or pseudoshuffle
uhm. no
2X fills the screen
1X does not
i did pseudorandom_element(G.playing_cards for my joker
True, sure that they are the exact same name?
ya
waiwaiwai is this a nil value? this is what the arm is doing
i believe its set_ability
wild is probably some shit like g.p.centers.m_wild
its attemting to index a nil value on the top line
G.P_CENTERS.m_wild, pretty sure
config = { extra = {
rank = pseudorandom_element(G.playing_cards)
}
},```so this should select a random playing card in the deck and assign it to the variable rank?
it will probably crash
G.playing_cards doesn't exist outside a run
and you need to grab its rank too
what pseudorandom_element(G.playing_cards) does is picking out a random card from your deck
afterwards, you need to manually get its rank/suit for your joker to use
Bump
I know this joker is broken in terms of balance but it is also broken in terms of code and i dont know how to fix it
thats a nice 2 you got there
ye xd
im not really sure how to fix it, in fact i dont really know how i made that joker in the first place
too much trial and error
well until youve posted your code nobody will be able to help too much, so id prob start there
does anyone know why xchips is being considered a nil value here?
i declared it as 1 x-x
xChips in the config table doesnt exist, xChips_gain is duplicated
thanks discord
i really appreciate removing all tabs
its too big
well not that big
im having a weird texture issue, here i have my Joker sprites lined up nicely and for the square one you can see a thin line of pixels, even though there isnt any pixels present
POPIPO
are these type of Jokers supposed to be arranged differently/coded?
sorry, had to point that out
Vegetable Juice!
i don't have that problem i think
maybe because i use a python script to rescale my image
hmmm its not a big deal but just looks weird
hey chat quick question idk but debugplus is brokey and idk what happened
anyone else have weird keybinding issues?
is there a way to block custom planet cards from being created by blue seals? I'm making a bunch of planet cards build around unique effects for existing hand types, but the hand type config can't be empty or else it crashes, and if I set it to an existing hand type it overrides the vanilla planet for that hand type from appearing via blue seal
what is the sizes of the sprites in 2x and 1x?
scratch that another mod was interfering kek
nevermind
for checking if the score sets on fire it would be like this, right?
if context.after then
if G.GAME.chips > G.GAME.blind.chips then
return {
Xmult = card.ability.extra.Xmult,
message = localize { type = 'variable', key = 'a_Xmult', vars = { card.ability.extra.Xmult } },
message = 'X' .. card.ability.extra.Xmult,
colour = G.C.MULT
}
end
end
end,```
SMODS.Atlas{
key = 'Welder',
path = 'Welding Mask.png',
px = 71,
py = 95
}
function reset_weld_rank()
G.GAME.current_round.weld_card.rank = 'Ace'
local valid_weld_cards = {}
for k, v in ipairs(G.playing_cards) do
if v.ability.effect ~= 'Stone Card' then
valid_weld_cards[#valid_weld_cards+1] = v
end
end
if valid_weld_cards[1] then
local weld_card = pseudorandom_element(valid_weld_cards, pseudoseed('weld'..G.GAME.round_resets.ante))
G.GAME.current_round.weld_card.rank = weld_card.base.value
G.GAME.current_round.weld_card.id = weld_card.base.id
end
end
SMODS.Joker{
key = 'welder',
loc_txt = {
name = 'Welder Joker',
text = {
'Played {C:attention}#1#\'s{} become {C:attention}steel{},',
'rank changes every round'
}
},
atlas = 'Welder',
rarity = 1,
pos = {x = 0, y = 0},
config = { extra = {
rank = 'Ace'
}
},
loc_vars = function(self,info_queue,card)
return {vars = {card.ability.extra.rank}}
end,
calculate = function(self,card,context)
if context.end_of_round and context.game_over == false and context.main_eval then
reset_weld_rank()
end
end
}``` so i copied the code from the mail in rebate- would this work?
i think thatll just check if the player overall has scored more than the blind not if a specific hand has done so
but im not positive, itd be easiest to just check that in a round
ohh right
so how do i check for the number of chips scored in a hand?
imma try to find out, ty
They are missaligned by one pixel
Omg is it
I have glasses too but I pay extra attention
Wait so how do I have to shift them?
Or hyperfixate on certain things
You move the PoPiPo joker up by one pixel
Problem solved
just wondering, is there a way to make a joker unable to be destroyed, and to run code when something tries to destroy it?
someone help me please
this joker is frying my brain
create 3 wild cards when blind is selected, if a wild card is the highest scored card, x2 mult and gains x0.5 mult
thats the effect, error is here
what does line 53 of your code look like
ik, its a comparison
can you send a ss so i can see
its here
its up
yes but which line is 53
...is Talisman involved?
Use debug mode
Mod*
Hold tab and you’ll see the stuff you can do
Discover /summon / duplicate/copy
i seee! ty
line 53 of the code i sent
ugh wtf is gros michael doing this time
is it this?
if context.scoring_hand[i].config.center > card.ability.extra.highest_ranked then
or this?
if context.scoring_hand[card.ability.extra.high_id].config.center == G.P_CENTERS.m_wild then
first one
i think
its not working? /genq
The mod ?
no debug menu






