#💻・modding-dev
1 messages · Page 38 of 1
ok
I don't know how you've ended up with square brackets either
I wonder if the foil shader has a color config
If so you could totally copy the shader and change it to be a silver color
how are you still missing your commas
It's missing because squiggly lines
Your loc vars has a typo but you also aren’t using them anyway
where do i make it?
ok
And then cry
nah
imma just make sure that it works first
(definietly will not ask betmma for help)
any chance you guys know how to get all ability names of tarot cards in a currently opened pack?
feel like its smth to do w G.pack_cards.cards but im rarted
gonna need more than just a crash log my dude
💯
that sounds like it should contain the cards in the pack, you should be able to iterate over it and grab whatever you need
alright thanks man
any idea how they are stored - like a table or smth
perchance a for i,j in ipairs(G.pack_cards.cards) type thing
yeah looks good
lmfao
i got no clue w lua
so can i call methods on them
like uhhhh
G.pack_cards.cards[1].ability.name for example
cuz that shit aint workey
uhh can you send the code segment
cuz G.pack_cards.cards.1.ability.name would be bs
no checks rn so calling manually on an opened pack cuz debugging
oh
its for i, _ in pairs(G.pack_cards.cards) do
tables by themselves arent iterable, gotta use pairs on it to make it iterable
np
not even lua moment that acc makes sense
also you can cut down on a little bit of text by doing
for _, card in pairs(G.pack_cards.card) do
sendTraceMessage(card.ability.name)
end```
but as is works perfectly fine too
my script is done for my degenerate 200 hour in 2week friend
nah bro the "mr carter" log is for functionality
oh im talking about using the index vs using the value
npnp
don't you see the squiggley?
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH
still crashed
🔫
how are you calling this file
you mean what?
Stupidity Enhancments
oh wait
you are using a near month old build of 1.0
you probably have a version before editions were merged
update steamodded
so i have to redownload it
yes
what have you changed
hmmm this may be a bug
i literally put "foil" as my shader
speaking of mods
my stupidity jokers won't should up with the edition
have you made two mods with the same prefix?
drop your files in here
i have to make a shade of stup_foil
how so
a bug in the api
I mean you ultimately need to create a shader anyway
just have to wait for it to be pulled in to the main dev branch now
so wait for bug fix
I mean you need to develop your own shader anyway
the bug just stops base game shaders being used on custom editions
you can still use custom shaders
in your code editor
yes
for someone who is only just learning programming, I would probably avoid confusing yourself by trying to learn an alternative language right now
ok
shader code isn't the most intuitive
Just copy the foil shader in the game files
oh wait, did the edition api get pulled to the main branch?
Yes
which file
foil.fs
resources/shaders/foil.fs
ok
you'll need to throw it in assets/shaders in your mod folder
then put SMODS.Shader({key = "foil", path = "foil.fs"})
sick, ive been excited for that to be finished up
that'll stop your crash at least
calculation stuff is still a wip @versed violet , but the functionality for editions is all sorted
time to port all of my edition work to the latest edition
gotcha! I coded in some custom calculation stuff and I couldnt get the ui working properly with it so I understand the struggle haha
time to port my work to the latest version
if you hit any stumbling blocks, drop me a DM and I'm happy to help
I'll probably be heading to bed in the next 20 minutes but I can answer when I wake up tomorrow
Try finding the part that pertains to color?
got to get some more people with beautiful pages like this
thanks, I appreciate it!!
I've got 5 shaders so once I finish getting everything setup I'll have a full page
there are literallt r g b everywhere
honestly, trying to learn shader code now will just confuse you
I think?
it is all over the place and very maths based
i'll just copy it for now
shader code is 99% math
it also follows completely different syntax rules to lua which you're already struggling with
any chance anyones worked around a sleep/delay - ive automated opening a pack, and getting the info from it, but need some sort of delay in the middle to avoid nil error type shit
😭
My feeling too
if you wanna start learning how to code shaders theres a few good resources out there like the book of shaders
the balatro shader code is slightly different but its easy to spot the difference
I am not in the mood rn
@sly forge heya, about this change you made to challenge unlocks
This dude struggles to write basic lua syntax if he writes shader code his brain is going to dissolve and leak out of his ears
would you be able to add something that bypasses all_unlocked?
i specifically want my challenges to be unlocked via different methods regardless of all_unlocked so this is a bit of a bummer
yes
and now this
Oops! The game crashed:
main.lua:449: attempt to get length of local 'str' (a nil value)
Additional Context:
Balatro Version: 1.0.1f-FULL
Modded Version: 1.0.0-ALPHA-0626a-STEAMODDED
Love2D Version: 11.5.0
Stack Traceback
(3) Lua upvalue 'towidestring' at file 'main.lua:449'
Local variables:
str = nil
(*temporary) = number: 65001
(*temporary) = number: 0
(*temporary) = nil
(*temporary) = nil
(*temporary) = string: "Loader"
(*temporary) = string: " :: "
(*temporary) = string: "Error loading lovely library!"
(*temporary) = number: 1.43722e+09
(*temporary) = string: "attempt to get length of local 'str' (a nil value)"
(4) Lua upvalue 'chdir' at file 'main.lua:466'
Local variables:
path = nil
(5) Lua field 'setWorkingDirectory' at file 'main.lua:316'
Local variables:
path = nil
(6) main chunk of file 'main.lua' at line 6981
(7) global C function 'require'
(8) Love2D function at file 'boot.lua:323' (best guess)
Local variables:
c = table: 0x1b3ea1c8 {identity:false, version:11.5, accelerometerjoystick:true, modules:table: 0x1b3ea218 (more...)}
openedconsole = boolean: false
confok = boolean: true
conferr = nil
(9) global C function 'xpcall'
(10) Love2D function at file 'boot.lua:362' (best guess)
Local variables:
result = boolean: true
(11) global C function 'xpcall'
(12) Love2D function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '(Love2D Function)' (defined at line 355 of chunk [love "boot.lua"])
inerror = boolean: true
deferErrhand = Lua function '(Love2D Function)' (defined at line 348 of chunk [love "boot.lua"])
earlyinit = Lua function '(Love2D Function)' (defined at line 355 of chunk [love "boot.lua"])
show code
you need to put the SMODS.Shader outside of your edition
you can't create an object inside another object
also please name your shader just foil
before or after
I don't think it matters
wait im stupid
Oops! The game crashed:
main.lua:449: attempt to get length of local 'str' (a nil value)
Additional Context:
Balatro Version: 1.0.1f-FULL
Modded Version: 1.0.0-ALPHA-0626a-STEAMODDED
Love2D Version: 11.5.0
Stack Traceback
(3) Lua upvalue 'towidestring' at file 'main.lua:449'
Local variables:
str = nil
(*temporary) = number: 65001
(*temporary) = number: 0
(*temporary) = nil
(*temporary) = nil
(*temporary) = string: "Loader"
(*temporary) = string: " :: "
(*temporary) = string: "Error loading lovely library!"
(*temporary) = number: 1.43722e+09
(*temporary) = string: "attempt to get length of local 'str' (a nil value)"
(4) Lua upvalue 'chdir' at file 'main.lua:466'
Local variables:
path = nil
(5) Lua field 'setWorkingDirectory' at file 'main.lua:316'
Local variables:
path = nil
(6) main chunk of file 'main.lua' at line 6981
(7) global C function 'require'
(8) Love2D function at file 'boot.lua:323' (best guess)
Local variables:
c = table: 0x1215cb08 {identity:false, version:11.5, accelerometerjoystick:true, modules:table: 0x1215cb58 (more...)}
openedconsole = boolean: false
confok = boolean: true
conferr = nil
(9) global C function 'xpcall'
(10) Love2D function at file 'boot.lua:362' (best guess)
Local variables:
result = boolean: true
(11) global C function 'xpcall'
(12) Love2D function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '(Love2D Function)' (defined at line 355 of chunk [love "boot.lua"])
inerror = boolean: true
deferErrhand = Lua function '(Love2D Function)' (defined at line 348 of chunk [love "boot.lua"])
earlyinit = Lua function '(Love2D Function)' (defined at line 355 of chunk [love "boot.lua"])
I put the shader OUTSIDE
🤔
that's a lot of played cards
OH BETMMA
again, crash logs aren't much use without your code alongside
fear
SMODS.Shader
OH NO OH NO OH NONONO
you also need your shader = foil, in your edition
so why only first 5 highlighted cards are applied to tarots
also why this is flush house
i'd assume the highlighted cards were not updated when triggering all the cards at once
Oops! The game crashed:
main.lua:449: attempt to get length of local 'str' (a nil value)
Additional Context:
Balatro Version: 1.0.1f-FULL
Modded Version: 1.0.0-ALPHA-0626a-STEAMODDED
Love2D Version: 11.5.0
Stack Traceback
(3) Lua upvalue 'towidestring' at file 'main.lua:449'
Local variables:
str = nil
(*temporary) = number: 65001
(*temporary) = number: 0
(*temporary) = nil
(*temporary) = nil
(*temporary) = string: "Loader"
(*temporary) = string: " :: "
(*temporary) = string: "Error loading lovely library!"
(*temporary) = number: 1.43722e+09
(*temporary) = string: "attempt to get length of local 'str' (a nil value)"
(4) Lua upvalue 'chdir' at file 'main.lua:466'
Local variables:
path = nil
(5) Lua field 'setWorkingDirectory' at file 'main.lua:316'
Local variables:
path = nil
(6) main chunk of file 'main.lua' at line 6981
(7) global C function 'require'
(8) Love2D function at file 'boot.lua:323' (best guess)
Local variables:
c = table: 0x1215cb08 {identity:false, version:11.5, accelerometerjoystick:true, modules:table: 0x1215cb58 (more...)}
openedconsole = boolean: false
confok = boolean: true
conferr = nil
(9) global C function 'xpcall'
(10) Love2D function at file 'boot.lua:362' (best guess)
Local variables:
result = boolean: true
(11) global C function 'xpcall'
(12) Love2D function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '(Love2D Function)' (defined at line 355 of chunk [love "boot.lua"])
inerror = boolean: true
deferErrhand = Lua function '(Love2D Function)' (defined at line 348 of chunk [love "boot.lua"])
earlyinit = Lua function '(Love2D Function)' (defined at line 355 of chunk [love "boot.lua"])
i need ''
5oak checks specifically for 5 cards, you have 7oak
.
and there is a 3oak and a pair so it counts as Flush House
WHAT IT"S THERE?
I wonder why it chooses those cards though
pair of 7 is higher than pair of 4
and a flush is present in the hand
so, Flush House
Look carefully, you can do this!
should there be automatic hand type of >5 oak
I hate case sensitive
I suppose 5oak should just accept more than 5 being the same
so how to fix 🤔 this is my code ```local G_FUNCS_play_cards_from_highlighted_ref=G.FUNCS.play_cards_from_highlighted
G.FUNCS.play_cards_from_highlighted = function(e)
local flag=false
if used_voucher('forbidden_area') then
G.hand.config.highlighted_limit=999
mark_highlighted_cards()
for i=1,#G.jokers.cards do
local self=G.jokers.cards[i]
if self.ability.consumeable and not self.debuff then
flag=true
after_event(function()
local keep_on_use=self.config.center.keep_on_use
if not self.config.center.keep_on_use then
self.config.center.keep_on_use=function(center,card)return true end -- SMOD supports keep on use by setting this function
end
G.FUNCS.use_card({config={ref_table=self}})
self.config.center.keep_on_use=keep_on_use
after_event(function()
restore_highlighted_cards()
for i=1,#G.hand.cards do
if G.hand.cards[i].betmma_highlight_marked then
print(i,"index")
end
end
print(#G.hand.highlighted)
end)
end)
end
end
end
if flag then
after_event(function()
after_event(function() -- why??
print('end')
G_FUNCS_play_cards_from_highlighted_ref(e)
unmark_highlighted_cards()
G.hand.config.highlighted_limit=5
end)
end)
else
G_FUNCS_play_cards_from_highlighted_ref(e)
end
end```
I need some rest
for i=1,#G.hand.highlighted do
G.hand.highlighted[i].betmma_highlight_marked=true
end
end
function restore_highlighted_cards()
for i=1,#G.hand.cards do
if G.hand.cards[i].betmma_highlight_marked then
G.hand:add_to_highlighted(G.hand.cards[i])
end
end
end
function unmark_highlighted_cards()
for i=1,#G.hand.cards do
G.hand.cards[i].betmma_highlight_marked=false
end
end```
GN
gn
I mean I suppose it works because the game is coded around playing 5 cards
it's weird how it identifies that as a flush house though, the 3oak and pair aren't suited, but I guess because a flush exists in the hand it thinks they are?
wait no
how on earth does it get past this
That is the dumbest way of checking for four fingers ive ever seen
i remember that consumables in cryptid random deck can say "choose 9 cards" but you can only choose 5
it's not too bad
$0 makes sense 
Why in the world does hieroglyph spawn?
lucky card effect
try hooking a different part of the code, maybe
maybe you can hook calculate_joker when context.open_booster == true
since that happens completely after pack cards is populated
whats it doin up there
messed up 😭
also it drew the deck back card (displays how many cards left for each rank and suit when hovering) into hand
does anyone know what delta time is measured in
is it milliseconds
oh wtf its whole seconds i think
what version of steamodded are you using?
oh wait, you already got it in https://discord.com/channels/1116389027176787968/1209506360987877408
sorry for the ping!
oversaturated jimball
hes super ballin
chat, which looks better? https://cdn.discordapp.com/attachments/1064773321612341329/1255739792638083105/image.png?ex=667e3a51&is=667ce8d1&hm=87f4b11477ec728568a92a4030e7cae2bbe9214b4538d215ed75b8aadf855c0f& https://cdn.discordapp.com/attachments/1064773321612341329/1255740509171875914/image.png?ex=667e3afb&is=667ce97b&hm=b4f80ed7d3a4f16148fe08d2bd85a9c933f0057898033b3a91762c0aae8d8fa0&
i prefer the first one
how do i make a joker that adds mult when an ace is scored?
yeah me too
you can probably check the code from scholar
if anyone is intrested I published the console I have so far for debugplus
I'm probably going to change stuff more
I did something similar before. I think that text tracks the position of the topmost card, so if you move it the text moves too
Even if that card is destroyed
I have an example if you want
i prefer 1st too 👍
also, lookin nice
i'll check it out frfr once i release the first part of super auto balatro, probably
(the only thing i really wish for is running lua code 🙏 )
chat how come coordinates and width/height use different distances
x=1 =/= width=1
im going to cry
Maybe one is scaled/normalized and the other isn’t?
no, resizing the window doesnt affect either value
make sure your foil.fs is correctly placed in yourmod/assets/shaders/foil.fs
at least, that's where the path arg in SMODS.Shader searches...
i am back from voucher making
it is
hi, i need some help with a blind
so basically the effect will be that it creates a debuffed card if there's none (this part is already done) and then every turn it will spread the debuff to the adjacent cards (the part i need help for)
and for the spread part i need to find a function that happens after the card are drawn (every turn)
you could just use the function that draws cards and hook into the end
i already use it for other blinds so i'll just have to add it with everything else ?
That would probably work
my bad i thought you were talking about another function what's the name of the want you're talking about ?
try putting the shader first
ok
Oops! The game crashed:
main.lua:449: attempt to get length of local 'str' (a nil value)
Additional Context:
Balatro Version: 1.0.1f-FULL
Modded Version: 1.0.0-ALPHA-0626a-STEAMODDED
Love2D Version: 11.5.0
Stack Traceback
(3) Lua upvalue 'towidestring' at file 'main.lua:449'
Local variables:
str = nil
(*temporary) = number: 65001
(*temporary) = number: 0
(*temporary) = nil
(*temporary) = nil
(*temporary) = string: "Loader"
(*temporary) = string: " :: "
(*temporary) = string: "Error loading lovely library!"
(*temporary) = number: 1.43722e+09
(*temporary) = string: "attempt to get length of local 'str' (a nil value)"
(4) Lua upvalue 'chdir' at file 'main.lua:466'
Local variables:
path = nil
(5) Lua field 'setWorkingDirectory' at file 'main.lua:316'
Local variables:
path = nil
(6) main chunk of file 'main.lua' at line 6981
(7) global C function 'require'
(8) Love2D function at file 'boot.lua:323' (best guess)
Local variables:
c = table: 0x2676cb08 {identity:false, version:11.5, accelerometerjoystick:true, modules:table: 0x2676cb58 (more...)}
openedconsole = boolean: false
confok = boolean: true
conferr = nil
(9) global C function 'xpcall'
(10) Love2D function at file 'boot.lua:362' (best guess)
Local variables:
result = boolean: true
(11) global C function 'xpcall'
(12) Love2D function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '(Love2D Function)' (defined at line 355 of chunk [love "boot.lua"])
inerror = boolean: true
deferErrhand = Lua function '(Love2D Function)' (defined at line 348 of chunk [love "boot.lua"])
earlyinit = Lua function '(Love2D Function)' (defined at line 355 of chunk [love "boot.lua"])
tentacles 😈
it still doesn't work
i ain't doin all that
you must be doing something else wrong somewhere
i think it's the bug
can you screenshot the mod folder?
inside assets
..
it needs to be in a shaders folder...
you need a shaders folder
it is
???
aha
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH
still doesnt work
i changed foil.fs to foil.fs.lua
bro 😭
not the file
translation: i changed foil.fs.lua to foil.fs.lua.lua
do this
translation:
ok
("how")
🔫
you know you just destroyed your reverse right?
i destroyed yours
i don't have any
i stole it and you sliced it
now remove the .lua
no you didnt
it has to be a .fs file
you just typed them in the file name
it has to be a foil.fs with file type fs not lua
💀 💀 💀
skull indeed
ok i remove fs
im losing my marbles 😭 😭 😭
I'm losing mine
actually taking 100 white damage every tick rn
at least the mod is appropriately named
so true
DUDE YOU MADE ME LAUGH OUT LOUD AT WORK
Wtf is happening with dev chat today 💀
white?
can you three not ping me 😭
Waltuh, put your .lua extension away Waltuh
emotional damage
I'm dying
sorry i was actively rofl-ing
im crying
you removed the thing in the username, so no. /j
got there in the end
success
god
it's still in my bio and server pronouns
I lost more braincells here then at work
you have work??
^ this conversation summarized
that is NOT called work 😭

im still working
this guy is literally the definition of a balatro
i guess i have a job now
i should make a joker based on you
😭
🔫
i thought this was modding-dev
im waiting for blud to post his error message
this is a shitpostng channel now somehow
oh god get this off my screen
Fluff
try it
i did
although id be scared of "foil" clashing with some other stuff
"i did"
great bud
congrats 👏🏻
foil won't clash, it applies prefixes
yippey
now that's time to debug glsl code
although I've got a PR at the moment that will make this more consistent and require you to do shader = prefix_foil instead for example
but aure was confused about my change of atlas prefixes too
can you post your shader?
oh no photos have returned
buddy removes random stuff and it magically works
is the shader in the room with us?
what was line 56 out of interest?
is the photo the shader?
??? 😭😭
how did it even end up there lol
idk
rage-enduced keyboard smashing
they're all in the same folder that's not how mod structure works
it'll just load the first file
unless you tell it to also load the others
no
:{
look at how other mods do it
bye
That's coming up next hopefully
I was messing around in a vc last night and was like man, I wish I could eval code rn
I still am, the atlas prefix code doesn't even include shaders?
I hate how unreadable shader code is
Why are all the variables just single letters????
Oh maybe I had a moment and typed shader instead of edition
Either way, I was having trouble trying to set a custom atlas for editions as it would auto add the mod prefix to whatever was given as the atlas
that's consistent behavior though?
what does an edition's atlas do in the first place?
It sets the atlas for the collection display
I mean it’s totally unnecessary but I thought it would be nice for people to have the option
Is there any other way around it shoving the prefix on? Like if you wanted to display an edition with the Tarot atlas you can’t
the same way you otherwise would too
raw_atlas_key
Holographic needs to be called holo
Play around with the values in them
You in fact can
That looks gold to me
maybe a little darker
Nah its fine
Can i also see silver foil and bismuth polychrome?
soon
Theres a problem with nil
it doesn't have a shine compared to it's regular counterpart
I think negative uses 2 shaders
so I have to use a comma?
I dont know
Negative editions have their own shine added in draw
Maybe I can build in having multiple shaders in one edition for that functionality
Yeah try that
It will be at the bottom of my to do list though, I want to finish my work on alt textures and collection ui first
Now look at this
can you make masking layers with the shader?
idk
like can you make the shader a "shape"
Yes
Betmma sent one earlier, but foil is a shape, basically
how did they even do that
I am very new to coding shaders, but as far as I know it's mostly math
I feel like you could make silver grayer and darker
Still feels really blue
this is the minimal blue i can make
you could always reduce the alpha value tho right
Dude please use snipping tool
Its getting better i think
It’s hard to tell when we can see the literal rgb colours of your monitor
Kinda, yes
Oh someone already replied
I'm wondering like
what the limits are
in order to brainstorm some cool new effects
proof of other mods not existing
one of the ideas I had was like a "spooky fog" effect
but Iunno how that would be done because I'm WAY too stupid
Why has everyone collectively decided now is the time to suffer with shaders?
im not suffering
it's called a renaissance, king, get onboard
I told you this earlier today
you need to make a main file and load all the others in
or just slam them all together
this screenshot is not any different
Stupidity is the main file
tbh the only reason I am getting into modding is cuz I finished everything in vanilla and I wanted to code an edition shader at some point since the demo 😹
Maybe I should make a shader for my TWEWY mod too. I'm having difficulty coming up with an idea for the last brand's mechanical connection, and making a Rhinestone Edition or something might be a fun way to cap the mod off.
Just gotta figure out what effect it might have...
Maybe something like "x3 Mult if this is the third Rhinestone card triggered this hand"?
you don't have a stupidity file in this screenshot?
thats a folder
the same way you've made any other file
so make another lua file
mhmm
okay
now put your other files in a folder
and then you'll need to load them into your main file
there's some funny way of doing it that someone else will be able to explain better than I can as I haven't done it before
yeah that looks accurate
ok
phantom thieves does it like this if that doesn't work
those aren't your file names
spaces should be fine
can you show your file sturcture again?
SMODS.current_mod_path.."Stupidities S/Stupidity_Jokers.lua"
DOESN'T WORK
No need for caps...
it wonks
well the game doesnt crash
but no jokers, enhancements, tarots, and vouchers
show your code again
where have you copied this method from?
Add () at the end of NFS.load(...)
The () is at the end of the line, not "load"
you don't need any mod headers in your other files now
yeah get rid of those
OH
that should just be in your main file now
is there a way to get someone to do voucher art
if someone volunteers, someone volunteers
ok
did you at least try spriting yourself?
ye i did
Is somebody able to find out what this log means? I've been racking my brain and can't figure out why this mod suddenly doesn't want to launch for me
what's at that line in your file?
first file is the file in question. Called in the paperback.lua file, which is below that
is this a require issue
This is what is at that line in the crash report: PB_UTIL = require(SMODS.current_mod.path .. "/paperback-utils")
it seems like it
Is that a new thing in Steamodded?
Yeah it only started breaking yesterday morning. Was so confused
hopefully the nfs switch will fix it for you 🤞
Ok, so it fixed the crash, but now the jokers aren't showing up in the collection lol
I did that, and I get [SMODS paperback "paperback.lua"]:16: attempt to call a nil value, and that line is PB_UTIL = NFS.load(SMODS.current_mod.path .. "/paperback-utils")()
it needs .lua I think
Ok, now it's directing me to this line NFS.load(SMODS.current_mod.path .. "/" .. path)() -- name files "joker_<name>" so they get loaded automatically
path is this local path = key:gsub("_", "/", 1)
oh wait, I think I see the issue
Fixed it. Thank you for your help!
👍
more code pls
You’re missing a } after atlas = "shinier foil"
god keys with spaces in look AWFUL
atlas = "shinier foil" should be moved to after discovered = true,
ok
everything is indented correctly, to be fair
oh wait no it's not
why do you have hooks for apply to run and set edition
learn indentation
bruh
a lot of your issues become incredibly easy to identify of you do proper indentation
hell, vscode does it automatically for you, no?
set_edition makes sense since you want foil to become the upgraded foil, but you should make the other hook apply when you use the voucher (there’s probably some function for that…)
Oh and that set_edition hook has to check if your new voucher is redeemed
betmma told me to do it like this
Betmma has made 67 vouchers and I’ve made 0, so go with their advice
after you buy the voucher, yes
ok i'll set the voucher obtainment
that also isn't how you call set_edition
that's 👏 how 👏 betmma 👏 does it
then how do i call set_edition
set_edition("e_stup_silver_foil")
so i needed a e_stup
telling the creator of an APi how to use their API
im not
no just don't just the jank ass table shit that thunk used
it's only supported so we don't have to patch every set_edition reference in base game
Is there a built-in function to convert the number rank into the string for face cards and aces? This is the function I wrote:
function get_rank(rank)
if rank == 11 then
return "Jack"
elseif rank == 12 then
return "Queen"
elseif rank == 13 then
return "King"
elseif rank == 14 then
return "Ace"
else
return rank
end
end
whut
i can't play cryptid at the moment
You don’t need Cryptid
These are for vanilla
Set this up because I’m going to be on a lot of car rides over the next two days lol
ok
Sooo trying to show text via variable, and we're not sure what we're getting wrong? We've seen the structure (aka the x#1# or +#4# or whatev) anddd, we're not sure what we're getting wrong t make it not show
you need to define loc_vars
Not sure what's messing up here (probably a lot)
But hey when we hover over the card it doesn't show error anymore
It just crashes the game 👍
center.config.extra
center.config.extra added onto what's already there?
isnt it self.ability.extra.whatever or does smods do it like that
but yea do what myst said
if your vars dont change from 1.1 and 1.0, its functionally the same as what i said
Nah same crash for both
attempt to index field 'name' (a nil value)
name shouldn't be related to loc_vars
sorry name was a placeholder
it was ability / config
we should've specified 😭
GOT IT
changed to {center.ability.extra.rate, center.ability.extra.bus}
Welp slapped this from card.lua into this, anddd
playing a face card doesnt crash so yay that works
but then it has an issue with the self.ability.blah part... Says it's nil value.
change every self.ability. to card.ability.
Seems like things with that were working now but uh
a few edits later and now this errors coming up
functions/state_events.lua:692: 'for' limit must be a number
current code provided above
return card = card
instead of card = self?
tried that and same crash
guessing somethings f'd with the for loop, cuz the 'for limit' displays as nil when looking at the stack traceback
i think your calculate function is returning stuff when it shouldnt
that condition is really broad
yeahhh we realized that when discarding, it was triggering the effect too
we moved the return to be under the 'if faces == false then' statement with the adding calculation
still crashes but hey now it doesn't trigger on discard 👍
yea add more conditions to the first if condition
theres a list of contexts in #1209506514763522108 somewhere
refer to that
i think you wanna check for context.joker_main
yeah we trying to add some stuff to it but, the whole 'for limit' thing aint working
the issue isnt your for loop
its that youre returning a table in a context when you shouldnt be returning anything
its most likely the repetition context
WE DID IT WE DID IT YEAHHH---
We added a context.individual to the if loop and not only is it working but the JOKER GOT DA JUICE TOO BABY WOO-
now to figure out how to make its effect activate after play instead of on each individual card
after dinner-
What did u eat
context.individual procs on every individual card, as the name implies
use context.joker_main
had wings
will check that in sec
Does the atlas need to be before the joker?
I don’t think it matters, was just the first thing I thought of
It seems more like an issue with your image and where it is saved
there's 1x (pixel smoothing setting off) and 2x (pixel smoothing setting on)
nothing stops you from just using more pixels though
Gonna try it now
SMODS.Atlas {
key = 'my_joker',
path = 'my_joker.png',
px = 710,
py = 950
}
man the detail on these jokers are gonna go crazy
I wonder how the game will handle that
I tried with
SMODS.Atlas {
key = 'big_joker',
path = 'jokers.png',
px = 142,
py = 190,
}
the game handles it well
Balatro used to have 8x textures so i’m not surprised larger proportional textures work
oh that's news to me
Won’t they be downscaled and look the exact same though?
found a bug with stickers
How do I get a joker to trigger an effect when another joker is destroyed?
This joker works just fine when playing cards are destroyed, but it doesn't trigger when jokers are destroyed.
I've tested with Ankh, Sacrificial Dagger, and letting a Popcorn run out, and none of them triggered the effect
Aaah gotcha
...speaking of i should update my jokers to send that context
Okay it looks like remove_from_deck is called all the time.
Like, apparently leaving the shop causes everything in the shop to be removed from the deck
Yup
Creating or removing a card in all contexts calls add_to_deck and remove_from_deck
If you want destroy then hook a function related to the destruction process.
Like Card:start_dissolve or Card:shatter
Join the group asking @sly forge to add it to SMODS
I think having it be added to SMODS might be my best bet
Because start_dissolve is called too often (like when you sell a card) and shatter isn't called often enough
Betmma was doing it by checking the colors of start_dissolve
I think there’s also a card variable set when it’s destroyed by an effect
You see it sometimes
card.getting_sliced I think
Used by Madness and Dagger iirc
I think setting a local variable is a good way to distinguish between different cars removal effects
It stops jokers with setting blind abilities from getting them off after they're supposed to be axed.
Looks like that's inconsistent, too - it triggers when a joker is destroyed by dagger, but not when popcorn is destroyed by its own effect
I think for the time being I'm just going to reword it to explicitly only trigger when you destroy a playing card and drop the required number of cards down.
That’s what it currently does, I’m saying what it could be used for
Or a similar variable
Destroying playing cards is easier anyways
grrrrr why are my consumables getting reset to their config values when I click use.
trying so hard to not get spoonfed but i think im misunderstanding hooks. if i use a metatable then the variable for open_booster is initialised on launch and then doesn't get changed no matter the gamestate. basically im confused - ill keep looking into it tho
Moved all my mods out, it is a mod compatibility issue
the fun begins
gosh i just had the same issue
Surely not Cryptid again (clueless)
probably is

might be because of misprintize
It’s still wacky with custom consumables
I SWEAR TO GOD THAT STUPID DECK
oops
maybe i should have thought to add a check for if you're allowed to put that consumable in your slot
at least these test boosters are now boostering
There was some hardcoded change I needed for Ro-Balatro compat, see if that fixes D6 compat too
maybe loading them mid-run was causing issues
a hook is basically saving a function to some variable, then overwriting the function's namespace while calling the old function. basically, you're adding code to the beginning or end of the function
# Consumables lying to you
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = "function Card:use_consumeable(area, copier)"
position = "after"
payload = '''
if self.ability.set ~= "Gear" then --Ro-Balatro compat, I need a better system for this later
for k, v in pairs(G.P_CENTERS[self.config.center_key].config) do
self.ability[k] = v --surely nothing will go wrong
end
end'''
match_indent = true
Try adding D6 Side as a check
that just breaks any consumables that depend on state
If that works I’ll change it so only tarots and spectrals use this (planets use hand levels as their stats)
also "non-consumables" like this
I think this fix only matters for vanilla consumable types anyway
iirc it fixes issues where the state of misprinted consumables wasn’t reset before calculating the changed values
this is an example of a hook i do in gamblecore, the first line is saving the old function to a variable, then i overwrite the function, then call the old one in the return
because it was stored in the center table
can you not misprintize the values in ability directly? there should be no need to redo when used
as in, do it in set_ability
That would probably work
I will investigate when I get back, can’t test until tmrw night
take your time
Feel free to also make a PR with this patch @edgy reef
I have
Didnt you want to make them fused into pnly 2 vouchers?
no
Or are you doing the foul poly set and the holo negative set
Ok
holo to nil
Ye
In apply to run it should also go through the jokers
Lemme guess you didnt define shinier foil the atlas
You put the atlas in the voucher
The atlas is supposed to be in the top scope
like above the vouchers
Not really just not inside them
oh ok
you're also using set edition wrong still
how do i use it right?
i moved the atlases
I told you yesterday to just use it as set_editon("e_stup_shinier_foil")
i forgot the " didn't i
bruh
and replace whatever you have done
do i also remove =true
.
select it
copy it
paste it
have you ever used a computer before
yes this will change any foil playing card to your shinier foil now
ok
assuming the other parts are correct

