#💻・modding-dev
1 messages · Page 260 of 1
just remade the art to make it comepletely different
and yeah boom thats pretty good
it DOES look good.
And I can tell that you still put your own personal twist on it, though, I personally think you should go for it as long as the joker does not do exactly the same thing, and if it does, maybe just say that you got the idea from Crypton?
Cryptdi
idk man art is a scary thing
Hmm okay
Ill credit to cryptid for the art reference
But ill make the ability different
I'm really not sure how your mod is referencing cryptid but if it's like, a weaker version of the circular pie in latin you could keep the aesthetics and the design but have it be like a slice of pie
Genius
Okay ill make a slice of pie instead
🔥
i think that'd be neater if you're going for the reference angle than completely copying the sprite
how can i change the enhancement of a card? like theres card:set_seal and card:set_edition but no card:set_enhancement
set_ability
oh wait yeah i just found that
WARN - [♥] Pattern 'mult = mod_mult(mult + effects[ii].mult)' on target 'functions/state_events.lua' for pattern patch from SurtrMod\lovely\boss_blind_switch.toml resulted in no matches
why it is resulted in no matches for some reason?
sanity check is to make sure it's not being modified by a different patch before yours
time to suffer again 😭
Is there anyway to make vouchers in the consumable slots not calculate?
Pi
For reasons that escape me, attempting to hook G.FUNCS.evaluate_play results in an indefinite hang
G.FUNCS.evaluate_play = function(e)
local ret = ref_evaluate_play(e)
G.E_MANAGER:add_event(Event({
trigger = 'immediate',
func = function()
if math.floor(hand_chips*mult) >= G.GAME.blind.chips then
G.GAME.chip_novas = G.GAME.chip_novas + 1
check_for_unlock({type = 'chip_nova', total_novas = G.GAME.chip_novas})
end
return true
end
}))
return ret
end```
It just hangs here after scoring?
WHOOP found the problem. It was in another function entirely lol
I fixed this by hooking calculate.
how do I debug this crash lmfao
For some reason my blind UI vanishes between waves 💀
Getting this crash when trying to view the Achievements tab in-game for my mod
These are the two Achievements I've added:
I suspect the issue lies somewhere in Game:update()
because currently I'm setting the new blind in Game:update_hand_played()
it's probably some STATE transition thing I need to figure out
Hmm now I'm trying out how to determine if you played a card that was face down
It seems like the facing and ability.wheel_flipped properties are both set before any of the regular hand contexts are fired
Is it possible to make a showman but for vouchers?
You'll probably have to do some edits to default vouchers to make sure voucher copies work properly, but it's not impossible with a lovely patch probably
Is setting ref_evaluate_play to G.FUNCS.evaluate_play and then putting that inside of G.FUNCS.evaluate_play itself intentional, and wouldn't that cause infinite recursion? Or am I dumb
That's intentional and wouldn't cause recursion
It's saving the existing function saved in the key, then overwriting it, and then calling the original within the function body. It's essentially the same as calling an the base of an overidden method in more properly OOP languages
Oh I think I see, its originally bound to the vanilla Balatro function, and then you make your own and call the original, kind of like using super()
Yep, basically
Neat
But no the reason for the hang was bcause I had also overridden the end_round function, but the event I queued inside it didn't return true
If you don't intentionally return true from events, they play indefinitely
I see, good to know
I'm a little unfamiliar with Lua, but I like how its structured, its so easy to navigate when it's basically just a bunch of functions lol
Anyone have any ideas? I'm really confused
I half feel like I need a localization file for this and it's crashing because it's not finding one
Is there a index for all the color codes in this format like {X:mult,C:white} X#1# {} Mult for loc_text it would be nice to know ones for like money, chips, etc
misc_functions.lua function name loc_colour
That function indexes shorthands for colors stored in the G.C table (colors)
Is it not also what the C:white and stuff reference?
If you want an image for easier reference I made this a bit ago
Is there a way to force jimbos voice to be half the speed and pitch?
when does Card:set_debuff( actually get run? If I made it so that certain bosses only had a chance to debuff, when would that RNG be rolled?
when the card is drawn, or when the boss blind is selected?
sexy
a joker a day keeps the depression at bay!
thus i begin to mod my fourth joker ever
adding all my buddies as jokers to start
then once im comfortable
doing an ACTUAL good mod that reworks the legendary jokers significantly
The legendary joker rework sounds interesting
We'll be watching your progress intently
do sticker effects not calculate anymore when a Joker is disabled?
because in an earlier version of smods they did and now they do
i mean you could.. but why
some dont do anything if redeemed multiple times
Because I have a joker that creates a copy of vouchers to the consumable slots.
mess with in_pool and allow_duplicates maybe? idk
what function displays the text here?
bc its set by G.FUNCS.evaluate_play once you click Play Hand but i cant figure out what does beforehand
crash upon starting a run, any deck breaks it, no sleeve, white stake
ok
thanks very helpful
is this cause of a mod youre creating?
no but i was directed here after i posted the crash in #⚙・modding-general
Am cooking rn
PARSE_HIGHLIGHTED GOTCHA
hi
I'd suggest you to disable all the mods you have, and then re-enable each mod one-by-one.
it turned out cryptid was outdated
How does one achieve this?
Good to know, thanks for following up with this
My first thought would be using resource pack, with an extra sound file that meets your requirement.
Or using SMODS.Sound to make some replacement.
How do I replace the sounds?
My presumption is that you could lovely patch this function
in card_character.lua
or just call play_sound directly with your own pitch and volume values
wtf jimbo has 11 voices
jimbo is a talented vocalist
actually gorgous
whoa this looks amazing
I wanna override the played poker hand, and I'm doing so by changing the played hand text and then setting the chips and mult to the new poker hand values, but when it gets past the before context it forcibly sets the chips and mult back to the original values, is there any way to make them stay that way without exiting the before context?
thunk spitting fax
This is the current code in the before context
I don't know how I'd make it not reset to the original values, the text stays changed, but not the actual chip and mult values
I also wanna find a way to increment the played count for the new poker hand and reverse the played count for the original poker hand
I don't understand how I would use this.
can poker hand set score value directly
How?
very important to what i wanna do
Oh you're asking a question
An example would be:SMODS.Sound{ key = 'new_voice1', path = 'new_voice1.ogg', replace = 'voice1' }
Or you can use the method metherul suggested #💻・modding-dev message
just mod_chips / mult and update the texr accordingy;
Read message and watch video
It resets the chips / mult to the original hand value
Is there a way to check if the cards in your full deck have changed in any way? I'd want to avoid running a function that iterates through the deck every frame 
I also tried chip_mod and mult_mod and it still did the same thing
hmmmm
Dynamic description for joker 
You can set local variables to be strings
That's how triggers on [hand] works in descriptions
Yeh
You can put an empty string in the description and then change the string in the joker logic
Yea i thought about it
Can I set the description as a local table?
The description local variables are put in within the string so probably not
You can try it if you want to
For dynamic description I need to use the same as for values from vars?
Yeah
Oke
Just with strings instead of numbers
is there a way of setting the number of chips directly?
hand_chips = mod_chips(chips) I think.
I'm not certain though.
I just checked and it should work.
Still trying to figure this out
I'm not sure about the exact details, because this is a pretty specific idea you're implementing, but I reckon you may need to hook or patch the eval code, as I suspect the actual base chips and mult are set a bit later, so get overridden. Let me check when boss blinds change that
grand ^^ will try
If not doing it in the before context, is it possible to do it without taking joker or card order into account? If not just override which poker hand is being played in general? I know Cryptid has some cards that can override poker hand played
I just checked, the evaluate_play function sets the poker hand only after the before context is called. You could create a function that does the exact same thing as Blind:modify_hand, and just inject that to run before the blind function does
I have no clue how cryptid approaches it, sorry
omg ghost
haiiiii :D
whats good king
Guard.
<@&1133519078540185692>
I have no idea where to even start making the function actually change the hand properties
just another day in balatro discord
lmfao
:P
prepare for trouble and make it double, huh
<@&1133519078540185692>
I have a feeling it's spreading immediately to all DMs, and immediately takes over accounts somehow
And that person fell for it
true
i once got hacked by some steam giftcard link
it sent it to all my dms and servers
you should join the serveer
I will not be joining the server [=
join my server for free oiled up jimbos rn!!!
Blind:modify_hand exists already, so I'd say, just make a function that does exactly that, but isn't on the blind, haha. Or maybe, now that I think about it, just call that function? 🤔
imma make a blackhole joker
I tried calling that function, didn't do anything
post this gif every time you ping the mods from now on
That function hooks into the evaluate_play function, which is where the stuff it returns is actually referenced
oh yeah, just looked at it again, won't do anything if the blind isn't the flint, haha
i have that gif somehow saved
getting this error, what does it mean?
but as I said, just copy that implementation into a global function, and inject it to run right before when the blind version of it gets called
b1 doesnt exist
aware
or create a context that gets called there
but i don't know what that implies
I'd like to avoid making new functions because localthunk's base game code is complete alien speak to me
send code
The code is likely referencing a base game file, and doesn't reference back to their own file directly
well, the exception wasn't thrown in my code, but okay
ohh
SMODS.Joker {
key = 'goo',
config = { extra = { chips = 200 } },
rarity = 2,
atlas = 'Phanta',
pos = { x = 1, y = 9 },
cost = 7,
blueprint_compat = false,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.added_xmult, card.ability.extra.current_xmult } }
end,
calculate = function(self, card, context)
if context.joker_main then
hand_chips = mod_chips(chips)
end
end
}```
Something in their file is trying to reference something in a base game file and the base game file is the one that got confused
ah wait is it because i forgot a localisation entry
sjdkfgn waitwait
no i see it -w-
chips
fsdngdjkgnkdf this code is garbage, sorry 😭
Hmm, maybe someone that's actually good with coding can set it up then, haha, I don't know how I'd do it without making a function or a new context
I just need to find a way to apply chips and mult independently from jokers or cards
How so
ig thats first joker ever made by ai
ah, so the chip setting code worked, but it didn't display that on the left
ai?
ai.
I'm trying to brute force a poker hand to be considered a different poker hand, by changing the hand text and adding the difference between the original poker hand and the replacement poker hand in chips and mult
ai? why?
what is 'why' supposted to mean
update_hand_text({delay = 0}, {chips = hand_chips})
There’s a function that computes what poker hand the hand is supposed to be. I think you can just hook it to use your desired poker hand
like. why is ai better than making it yourself
conditionally of course
And doing so in the before context isn't actually possible because after the before context it resets the chips and mult to be the original poker hand value
when did i say that it is better.
If it's evaluate_hand or modify_hand I don't think I'm gonna be able to use those
If you do it correctly it should work
you implied that when you used AI instead of making it yourself
wait
cheers ^^
That would be incredibly difficult if not impossible, good luck
Someone has done it before IIRC
i saw someone make that in a different game
so it might be possible
I think someone else was trying to do something similar yesterday
That's not really how game programming works, but alright
You could make randomized effects pulled from a list in a single joker when it's acquired but I think that's about it
perfect, that works, thanks!! :D
true
That’s procedural generation ;P
Anyways, what functions, this doesn't really give me much to work off of
I don’t know off the top of my head. I’d read the scoring pipeline and see where poker hand is calculated
I know it’s called when you highlight cards
And it calls something like get_flush for the different poker hands
There's two functions that I've seen that directly modify the played hand but they are self referential and I can't really hook into them easily
You don’t want to modify the played hand, you want to change the poker hand type as it’s calculated
It returns a table containing every hand contained in your hand
So you can just add the entire hand to the correct place in that table
Or replace the output
I might be stupid, and I probably am, but I can't even like, comprehend how I'm going to do that
It's a miracle I've gotten 5 jokers to work so far
how do i put 3 layers on a joker
like soul_pos for the second one
but how with the third?
?
jokers that are generated in the game with code
???????
like
a joker that gets created randomly
with random effects and art
like it got ai generated
- which context its effect triggers
- which kind of effect it has
Randomly generating combinations
You mean like that?
o i i a
i looked into cryptid mod
i saw it used
soul_pos.extra
i tried that too but it doesnt work
Cryptid adds its own third layer to be handled automatically
they have extra code
ohh
"คุณพี่กำลังทำอะไร"
i want to add more soul layer to joker
Tbh I had thought of that, and know how to do so. But it doesn't fit into the mod I'm currently working on so I haven't touched that since.
n shit
yea
Like those online character creator stuff
like a mix and match
You don’t need DrawSteps if it’s for a single Joker
single joker?
They meant diff arts for diff effects.
i might need it on multiple jokers
Then it’s probably better to add a new DrawStep
good thing this exists
Currently I only have it on two
i can now go search how people do it
Thank you
Is this Thai sus?
hey chatters
working on a specratl card
any good pixel artists here know how to like
"de-smooth" the pixels? when i try to double the size of the background it turns all smooth and blurry
not sus
Nearest neighbor scaling
that on krita?
What is it then 🤔
Probably
just asking what i want to do
in this case make a third layer of soulpos
interesting
I reckon it’s in most popular relevant art softwares
i just googled pixel art scaler tbh
I DID IT, BY GOD I DID IT
i use this one https://lospec.com/pixel-art-scaler/
thank youuuuu
peak lemmie try
SETTING G.GAME.new_poker_hand CHANGES THE HAND CHIPS AND MULT
I guarantee there's a setting to not use interpolation
so thats how u change the chips?
without joker?
Specifically to override the played hand, nothing else
ohhh
Seems like it
what is vortex in drawstep?
spoken like someone who never touched gimp
I exclusively use Gimp
my condolences
Gimp 3 is great if you haven't updated, by the way
ohh over here
nearest neighbor worked im kissing you mentally rn
lmao
force of habit to say RC
gotta put the finishing touches on it tho
not quite done
but by god thank you
SMODS.DrawStep{
key = 'shs_thirdsoul_pos',
order = 59,
func = function(card, layer)
end
}
a bit confusing
how should i proceed
do i say that
if card.ability.soul_pos.extra then
something like that
You've got two different pixel sizes in this. Work and edit the 1x asset, then scale up when you're completely finished
yep, plan on doing that in the future lol
2x is so hard to edit
what is going on 😭
@paper zealot this is day three for me king
If you're using Steamodded, there's also functions like sendDebugMessage, sendInfoMessage and sendWarnMessage to format the logs consistently
https://github.com/Steamodded/smods/wiki/Logging
good morning everyone
hello
how do i fix thiss
:3 whats that
watchu doing here?
math deck preparation
ITS FUCKING DONE!
Ghost: Convert up to 5 selected cards to become Negative
-1 Discard
literally did the entire fucking thing by hand actually took me 4 hours
i dont know
I'm going to add math deck
my code just broke randomly
-# wdym u dont know
thoughts chat?
art is so gorgeous
what's up with 2px border
wdym
i think the background is too busy
like all i was tryin to do is make a extra soul layer on my card
and my game just broke randomly
i removed all my drawstep stuff
and it is still broken
the background is too much
i do agree, i kinda wish it was less
but the ghost sprite looks really cute
one pixel looked weird tbh
huh
i think you should make them all 2 pixels
if that's the case
it originally looked like this
try removing pieces of your code to identify the problem
@long sun omg it's u
i dont have anything much to work with here, sorry
i removed everything already
thats definitely too much 💔
dfjkngjkdnfjkgndfngjd!!!! awhhhhh!!!!
not my art
i do not claim it as mine
was tempted to make Ghost a tarot / spectral card, but i decided to make tarots / spectrals around ghosts ^^
okay
Is it possible to adjust pitch and volume in return?
i think i actually did it
removed the border
see how he looks kinda like
thin tho
are you using layers
mhm
heres bro by himself
is this how i do it
i think he's a bit dented
should i just 2x border him
hes mentally challenged
-# im getting a crash rn, it says the colour is wrong
the other side too
Still has mixels. The top left corner is mixels, and the ghost is vertically offset by 1/2 pixel from the rest of the pixel grid
oh thats ass one sec
bro i
i dont know what that means
😭
in essence you're not using consistent pixel size
some pixels are smaller than the rest
If you scoot the ghost down by 1, then resize the image down by half, it'll be good
yeah bc i originally started on the 2x template on accident
scale it down 😭
gotcha
i cant scale bro any smaller 😭
quick question, even though ive seen there is the option to influence reroll costs, i havent really seen the option to force a reroll, does anyone know where i could start looking into it?
Making sure to use no (or "nearest neighbour") interpolation
yepyep
What is the next() function/Where is its definition?
fixed lol
This is probably from missing brackets in a node definition, or a text/DynaText object without a colour
this is bg btw
...im actually not sure what that means 😭
all i did was putting a new rarity key in my joker
thats weird
orrrr does it not require the mod prefix
and its just 3stars?
Blind idea:
Discard unselected cards instead of selected card
this better you think? removed the white accent in the background
I think I might need a hook or patch to make it work though
Definitely an improvement. Also looks like the middle layer between the ghost and the background is offset by 1 pixel, both horizontally and vertically
And I expect it’s definitely one people will mess up out of instinctual motion
what an eye. good catch
in my opinion your biggest issue here is mixeling, which means mixing different pixel sizes
in other words, you're drawing on a 2x version of the card with a 1px brush
Look close at the little gaps between the middle layer and the background, you can see inconsistency where half pixels are peeking through
so heres the thing
There’s also some missing pixels on the top left corner
alright so hsr_3stars is definitely the correct key
i just dont know whats with the colour crash
your gonna kill me for this one lol
😭
ooooooh fuck
Colour is just the first parameter of a UI that gets accessed, it shows up whenever a UI is malformed or has invalid parameters
heard you like half pixels
mhm, i know that
I think they’re working with a badge
but whats the cause 💔
Because it’s a custom rarity
yeah
So it needs a badge color
Just a matter of shuffling things around until it all aligns, then scale down to 1x so that it can't be a problem anymore
true true
problem for tomorrow me
man i havent even coded ts yet
shouldnt be too bad tho
thanks for all the art advice @paper zealot
i have
never touched a pencil let alone a pixel in my life!
Learning new skills is always worthwhile, keep at it
Crayon-only run
you too thanks btw
yessir
I also basically started doing art by editing Balatro Jokers
its peak
pixel art is fun
im a programmer by name and school so i was like i might as well try doing the art as well right
i should def get into pixel art at one point too
my Joker's crashing when i play a hand, does anyone know why?
SMODS.Joker {
key = 'apollosbracelet',
config = { extra = { } },
rarity = 2,
atlas = 'Phanta',
pos = { x = 4, y = 10 },
cost = 6,
blueprint_compat = true,
calculate = function(self, card, context)
if context.joker_main then
local temp_chips = hand_chips
hand_chips = mod_chips(hand_mult)
hand_mult = mod_chips(temp_chips)
update_hand_text({delay = 0}, {chips = hand_chips, mult = hand_mult})
return { message = localize("swapped"), colour = G.C.FILTER, card = card }
end
end
}```
You don’t need to implement swapping
Just return swap = true I think
It’s vanilla
whar!!
If not this check the wiki
was it used in vanilla?
Not in any release I’m aware of
The old Gold Seal code is still in the game too, at least partially
oh? what did it do before?
Returned a played card to the hand
Wait that's kinda busted
It was very weak in the demo because
The only way to get it was on a random card
So it was absolutely useless
Oh 😭
Is there a way to get current tags?
finished the third legendary joker for Kino. Only 7 more to go
calculate = function(self, card, context)
if context.joker_main and (context.poker_hands['Three of a Kind']) then
return{
dollars = 8
}
end
if context.cardarea == G.play and (context.poker_hands['Three of a Kind']) and context.destroy_card then
return{
remove = true
}
end
end
``` I have simple problem, here the game is checking for a 3 of a kind but it also checks 4 of a kind, and it still gives money and destroys the card, etc but i want to be only 3 of a kind
poker_hands is used to check if a hand contains that hand type. context.scoring_name == 'Three of a Kind' checks is the scoring hand is 3 of a kind only
Oh I did not know that!
Also Ice!!!
exciting news but I got someone to do all the descriptions for me!
and they actually got some good experience
Which joker context variable checks all five cards used for a play, regardless of if they score? full_hand or scoring_hand?
full!
for some reason when i use the chips xchips etc. effects in the before context the effects get overwritten immediately after
oh, very nice! Always great when people wanna help!
you can't add or change score during the before context
What would get all cards in play in that case? like played as hand and also the cards that you didn't use
depends on the goal
Or just the ones you don't use
depends very heavily on what you wanna do
something like this
you're going to want to add a new context that triggers before main joker scoring, but after before scoring, so that the hand setting doesn't override it
How could one achieve this?
doesn't this seem like a Triboulet sidegrade
My main worry is more so that it's just straight up stronger, honestly, haha
Anyone knows how SMODS configs work? I'm getting attempt to index field 'current_mod' (a nil value) trying to access SMODS.current_mod.config.language
For reference here's my config.lua
return {
["language"] = "en"
}```
And here's where I try to access it
SMODS.current_mod.config_tab = function()
return {n = G.UIT.ROOT, config = {align = "cm"}, nodes = {
create_option_cycle({
label = "Language",
scale = 0.8,
w = 6,
options = {"English", "Japanese", "French"},
opt_callback = 'rh_update_language',
ref_value = 'language',
current_option = SMODS.current_mod.config.language, -- This is where it crashes
})
}}
end```
where are you calling this from?
My main mod file
SMODS.add_card({ key = "j_eof" }) Will this create that Joker?
As in, the one that has the mod name, nothing external or anything
Remember you need to add your mod prefix as well
j_something_eof is probably more like what you're looking for
okay okay ill try that
It's literally the first function of my file as well
I'm on the latest SMODS, maybe it has something to do with it?
I figured it out, it's G.GAME.tags
Ok so yeah it's just my bad, SMODS.current_mod only exists on loading which makes sense why it would die then
You can save SMODS.current_mod in a variable
Yeah I got that after fumbling around a bit
Now the config tab doesn't crash! just need to learn how to actually save, hopefully it won't be too difficult
Did you make a config.lua?
Is there any wiki on Balatro sources? About what is there and how it works.
I did yes
Normally it should save automatically
using tetration on a joker about 4 card hands is nice lol
square joker supreme
Good schmorning chat
mornighn
hi dilly :D
Apparently not but I'm probably doing something wrong either way
What you adding as rarity
Higher that legendary?
me when i'm ...
no never mind, not finishing that joke
My only instinct looking at that is that it might be capitalization?
Hi ice
I always write my hex codes in lower case, but I don't know if love2d or balatro's code cares about it
yo yo dill
yeah but
balatro source code uses lowercase
so i dont think thats the problem
it used both fr 😭
we love inconsistency in our code 🗣️
teh age old addage of working...
I'm not able to check the code at the moment, but have you tried providing just a string instead of the colour table?
oh, let me try that
all other badge_colour arguments work with HEX(), does rarity parse it differently?
jo
ker
aaaand nope
is that RandomJoker
yes i LOOVE SELF INSERTS!!!! YEAHHHH!!!
we love self inserts... ✊
Is k_3stars defined in a localization file somewhere?
hey hold on actually what's the traceback
no, its hsr_3stars
Might just need to be k_3stars or k_hsr_3stars depending on timing
that's useful info
...
-# what the fuck
no, like
if i want to get the rarity to use in my jokers, i use hsr_3stars
but for anything else its k_hsr_3stars??
I'm speaking a bit out of my depth, just looking at the smods game_object.lua file now
ah, right
wait lemme crash again
-# ignore that ONE mod please :3
nah we're not going to ignore Marge Simpson's Joker Pack
what the hell is that 😭
i cant figure this out
i remember the episode when Marge played poker
im trying to use drawstep to get another layer
but drawstep documentation dont tell me much
doesnt seem to be it
does everyone know where the function of displaying the thingy in the red circle in SMODS?
im trying to find it for like hours now
they mean the function handling that
but im pretty sure thats in the balatro source code
not smods
i'll look into this in a little bit
how do i use drawstep ahh
thanks 🙏
from my guess somehow colour isn't being passed??? somehow????
not so much a you issue i think
i made sure that the rarity file is loaded BEFORE the joker file too
let me try finding this pain 😭
also
wild thing
make sure to run your mod entirely by itself, too (and with dependencies, obviously)
true true
could also happen via a weird compatibility crack
i have the custom decks for testing my jokers
how would i create a joker that creates a temporary playing card for every scoring played card?
but im pretty sure they shouldn't interfere with the rarities 💔
i will do that just to be sure though
You also tried k_3stars? I'm not sure exactly when the process_loc_text function is called, but it's possible that it happens before the hsr_ prefix is added onto the key
Seemed unlikely but wanted to check just in case
I'll stop offering bad advice now and wait for someone more experienced with SMODS to weigh in
they are not bad advices at all, dw :3
none ofthe localization stuff should mess with colours unless there's literally colours encoded in the text
Man, i hate this syntax
stringcalls
of course lua has stringcalls
print "Hello world!"
Yeah, it's a lua thing. Valid for function calls with only a single string, or a single table
It's also why function_to_call{ 1, 2, 3 } is valid, which I'm also not a big fan of
Useless trivia: Python 2 supported this syntax for print explicitly through the interpreter, but turned print into a standard function in Py3 requiring parentheses like any other
all i did was change 1 line of perkeo (line 275)
you shouldn't name that var "card"
Holy comments, Batman
yeah, its in the example jokers mod, lol
i mean hey, comments are good
very useful to be honest
comments are very useful
especially for when you take a rest from your mod for like a few weeks
then come back
Or, if your working on a mod with others
bro i take a break for a day and i dont know what i did
or if youre a stupid idiot like me!!!
so my comments are there to remind me
same.
thats why i always have comments next to the functions
now i gotta figure out how to fix this darn it
setting up a small new mod and god I've just straight up forgotten the basics. Here I go reading the basic tutorials again, haha
Does perkeo not work in context.before?
i just throw my shit mid code
me too, but i think some of my functions lack that
i guess not
I theoretically wanna go through all my code and format it as readable as possible, but also, anyone that goes through that effort is a better person tha n me because laziness hits me immediately
-# i mean, if other people were to make content based on my mod FOR SOME REASON, then i already provided every function they will need :3
A set of glass jokers, in stained glass
One tracks the idol card rank to turn cards into glass,
another retriggers glass (while also reapplying the glass break risks, so be careful!)
the final card increases or decreases its own permanent mult bonus based on glass cards breaking or not
That art is gorgeous, holy hell
What I'm doing is basically the same thing but it doesn't crash it just doesn't duplicate anything.
it crashes for me when it has nothing to do
perkeo fires on 'ending_shop'
i feel you
i just have really leaned into 'as long as i understand it'
but hopefully comments help a little
Thank you, I did terrible paper sketches then my wife went wild on the idea and made these ❤️
i genuinely feel sorry and grateful for those who are helping me with the Rarity crash
💔
this is one project where i did it from the beginning because i will soon make a git that other people will be adding stuff too
Is there any way to access the sprite of a sticker? I want to rescale my sticker to be half the size
i want my code to be able to be torn apart or used by others once I lose interest in Kino. Theoretically I'd want someone to be able to think 'oh, let's maintain that abandoned movie mod' without ever having to have me involved, haha
It still doesn't duplicate anything.
i wish i could help, ive only added some colors for the title screen and i have added them into the g.c table
You're sure it's due to that one SMODS Rarity addition? Does it not happen if it's removed?
when i use the vanilla rarities, it doesnt crash
What is your full question?
its the specific joker with that custom rarity that crashes whenever i try to hover my mouse on it
terrible mindset, its either your creation or nobody gets it 😎
if you cant read my code then you dont deserve to use it
totally a fair logic
lmao
My mindset is I will enjoy writing it, but I will put it online and hope others find it and can learn from it.
Write tools to be used by you, but be worthy of thousands of users.
I blog about programming and managing giant environments, so I will write up a multi part series on learning lua and shaders when I am done here
is there a way to output to DebugPlus' console?
sendInfoMessage(" Your message " .. someVariable, self.key)
eval (code)
grand, thanks ^^
im a big print enjoyer
Hm, okay, so it's definitely caused by the UI handler failing on an invalid UIElement, most likely the rarity badge. No idea why that would be the case though
same, prints are cool
I wanna make an all-2s deck, how'd I get started?
i had a real fun bug i enconutered yesterday where i would crash with my mod but only on gold stake
which was an interesting discovery
Aside from being 13×4 2s, it'll also start with Wee and Hack
i fucking hate having to ask this, but what were to steps again to make a new mod readable by Balatro? I thought it was just a json file and the mere existence of a lua
SMODS Rarity assigns G.C.RARITY[self.key] = self.badge_colour, you could check the contents of RARITY to see if the key is the same as with what you're expecting them to be
Have a json file like this
"id": "foxsGarden",
"name": "Pawlatro",
"display_name": "Pawlatro",
"author": ["FoxDeploy"],
"description": "A collection of fun and balanced animal themed jokers and tarot cards.",
"prefix": "Fox",
"main_file": "config.lua",
"priority": 1,
"badge_colour": "0011EC",
"badge_text_colour": "FBA105",
"version": "0.0.2",
"dependencies": [
"Steamodded (>=1.0.0~ALPHA-1206c)"
]
}
``` @hushed field then also a `lua` file in the same dir, named the value for what you have in `main_file`
config.lua as the main_file seems unusual, but otherwise yep
That's what I have. I guess I'll have some dumb spelling error appear somewhere that's just breaking things, haha
......
what the fuck is this fix
i deleted the lovely folder
then i run balatro again, it works now
"Fox" as the prefix might also be a little short, i think that's meant to be a unique identifier
well its just the... uh, localization now
so in the SMODS.Joker, im supposed to use "hsr_3stars", but i guess thats not the same in localization
what the hell is this consistency :3
it was an error in the json somewhere, but I can't see where it is. Scheduling an appointment for a severe dyslexia diagnosis now, I guess 😢
You need to check for G.consumeables.cards[1]
oh
-# thats dumb
ahhh
its k_hsr_3stars in the localization file, but its hsr_3stars when you are setting the rarity
💔
print goes into the console by default
so just print(string)
you can use SMODS' logger or debugplus-specific logger too
The K is just the mod creator's shortening thingy, right?
commenting to help people using the search function if they run into this issue: accidental space at the start of the version number
Minor spelling mistake: 
like this?
No, change if context.before then to if context.before and G.consumeables.cards[1] then
ahhh i see
goog gob
Why when you have too many cards into your deck you draw a full hand of ghost cards?
That’s not why you draw ghost cards AFAIK
You draw them because you put them into your deck
Which made it big
u can spend on seele instead :3
err
its G.consumeables.cards[1]
Whoops, I meant G.consumeables.cards[1]
you still need the .cards :3
oke
How do I prevent ghost cards?
once again... i love crashes
i have no idea how this happened
im going to slam my head into a brick wall
Well you need to identify what’s creating them. You’re probably moving or destroying cards when you shouldn’t
This creates a reference to a card that doesn’t exist
It looks like you didn't change it back when you did this.
I have a joker that creates 2 negative copies of random cards in hand and play?
trash..,,, :3
trash :3
im getting a weird crash and i cant figure out whatss causing it.,,
trash 
anyone wanna take a quick looky?
what are you doing here
is it possible to add a new run configuration option
like another check box to "New Run" that allows me to enable the functionality im working on
idk :3
if not ill just figure it out manually
man im going to have to build so much myself
im not making a conventional mod
I used immolate and it crashed the game.
Also I reloaded the game and the cards came back.
how would you check all of the scoring cards youve played in a hand?
Deck Preview pages
context.scoring_hand I think.
this is cool
hi tardis
hi!
this is what happens if two mods use the same consumeable type key, apparently
...i mean, it fits
why... why the hell does the spawning of vouchers in the shop work like that? I assumed they were just gonna be card objects
oh yeah since it's just create_card("Zodiac"
but one of the packs for them causes cards to be drawn, the other mod does not
the theme fits, not the functionality :3
anyways, now I have to rekey every reference to them lol
How does one copy a card from hand and play into hand without creating ghost cards?
Is there any way to access the sprite of a sticker? I want to rescale my sticker to be half the size
if i want to make a texture animated, do i have to put the frames on a seperate atlas to the non-animated textures for the same card type?
i guess this is how I would render the sticker. But I have no idea how to use the draw method.
I assume something like creating a sprite object
is there a context that's triggered once per joker whenever a hand is discarded?
does anyone know how to work around this? kinda confused on why it's only updating after set events are done
cuz context.discard is triggered individually for each discarded card
wait nvm
nvm again it still has the same issue
What the frick? I'm just trying to play my new challenge.
boss blind think he asriel 💀
🗣️
why would you want that
money
money
fair
seriously though
i don't know why it isn't updating textures
since animated sprites should bypass events like how the boss blind sprite is still animated
pokemon cards
oh
i figured it out
i just had to move it out of the other runtime timer that i put in there sigh
somtimes you can forget your own code
That's not what's causing the problem...
Maybe look at how burnt joker does it
REAL
Wait... Is it the game update that screwed things up?
no i just saw that
anyone have an example of how to use this? for stickers
or a way to access the stickers sprite without a draw method may work too
How could I make it so when I change the edition when context.card_added it costs how much it would cost normally?
like when it's created from a tarot or sm?
wait no im stupid
ignore
💀
Where is this
I remember having issues with shared sprites because of SMODS’ inject timing
why is your mod prefix so long 😭
i can ctrl f it later
is this not a good place to put it
hihi! is there a way to destroy all cards held in hand?
or, cards held in hand, in general?
like the cards that aren't played?
ya
I'm pretty sure it'd just be if context.destroy_card and context.cardarea == G.hand then and you just return {remove = true}
could i potentially even use an event here? to wait until the asset_atlas entry exists?
idk
how does the idol decide its ranks?
it picks a random card in the deck and uses that
that i know
in terms of actual code, I can whip something up rq
Or crashing?
local card = pseudorandom_element(G.deck.cards, pseudoseed("idol")) picks a random card, and then you can get the rank from the card with card.base.value for the text or card:get_id() for the number
mmm would i put this in the extra table?
edge case: what if ur deck has 7 ranks or less
fallback rank is 5
nah it'd be in the calculate function
mm
how did you fix it?

omg hi blueprint
blueprint my goat
finally
based
god of hyperdeath: its the end isnt it
also god of hyperdeath: 600 chips to win
the thing is, you have to gain a score of 600 (or whatever the score is) or over in one hand to win, there's 6 phases too
what do the "attacks" do?
deduct health
if a card has no more health then it dies
i haven't seen other mods do this
(probably because i don't look up mods lol)
im just glad im able to get my own way of displaying custom animated sprites
card max health is assigned depending on the rank of the card
I can't remember which mod, but there's definitely one that does it, but not at all in the same way. I love the sound effects, btw, it really makes it all look very polished and impactful
i barely know what im doing but being able to add what's basically cutscene to my mod is going to bring it up a dimension
because i can also apply these to jokers 
ok this finally is a custom draw function for my sticker that works. now please does anyone know how to scale the damn sprite
i just want it to be half the size
the third and fourth arguments of the sprite constructor are width and height respectively
changing them seems to not change the display at all
i will try again
i just set it to 0 and it shows the same as normal
i assume defining sprite in draw in the first place is wrong already anyways
tbh I'm not sure about creating sprites in draw functions, usually this isn't wanted
yea
but you can try messing with the scale of the sprite directly i guess
I tried creating it outside the function (still inside the sticker), that crashes the game tho (i assume it tries to access the atlas before it exists)
nothing is working between all the variables here
unfortunate
might be that it's basing it on the other_obj (the center sprite)
might have to put an option to remove flashing lights
im worried of that yea
are you just making the asriel fight a boss blind
yeah
after looking at the code it does. so my solution is this:
it does work
it also seems like a terrible idea
I support it's really cool
Is this possible or do I have to give some money back?
how would i check all of the scoring cards played in hand?
G.TIMERS.REAL
what is the above variable?
can i use it to make procedural animation/movement
context.scoring_hand I think.
may you give me an example? a bit confused on where to put it and how to use it
also how would i copy playing cards for the blind
all right, time to lock in and figure out my blind wave issue
ok i think this one thing ive added to the mod is mostly polished and done
The video is pure black on my end
tag, you're it
yeah I can see it
fine for me too
when blinds
snaz needs better interwebs
in the future
whats with the second of delay between the last card scoring and the tag moving
you cant see it but its the score being tallied
ah
i recorded it that way because discord upload limit
yeaj
i remember when discord made the limit equal to 50
for everybody
but it lasted just 1 day
smh
anyone know?
I thought since this server is level 3 in boosts you can upload up to 100 Mb
help please?
So this checks if the first card in scoring is a 2 if it is all scored cards give +4 mult ```lua
if context.individual and context.cardarea == G.play and context.scoring_hand[1]:get_id() == 2 then
return {
mult = 4
}
end
there's definitely either a state variable I'm missing that I need to modify, or a function that I need to prevent from being called
ur right
I'm gonna keep hunting for it myself, but in the meantime does anybody know what function removes/changes the shop/blind UI? since they're in the same spot, at least visually
This is how Cryptid the spectral does it ```lua
G.E_MANAGER:add_event(Event({
func = function()
local _first_dissolve = nil
local new_cards = {}
for i = 1, self.ability.extra do
G.playing_card = (G.playing_card and G.playing_card + 1) or 1
local _card = copy_card(G.hand.highlighted[1], nil, nil, G.playing_card)
_card:add_to_deck()
G.deck.config.card_limit = G.deck.config.card_limit + 1
table.insert(G.playing_cards, _card)
G.hand:emplace(_card)
_card:start_materialize(nil, _first_dissolve)
_first_dissolve = true
new_cards[#new_cards+1] = _card
end
playing_card_joker_effects(new_cards)
return true
end
}))
card.lua
thanks
I think I fixed this by copying the cryptid code.
