#💻・modding-dev
1 messages · Page 45 of 1
Sounds like cardarea position isn't being reset.
no, it's just a logical or
it will always give the first one because even zero is truthy in lua
thanks
i was hoping there was some funny thing i could do
but i looked it up and i kinda can
math.max:
Does anyone know where the cardarea position is reset?
no no, we don't use such witchery in this household
what if it acted like a mini-investment tag instead of trying to add to a mult, like. you give 5 at every small blind and you get back 10 or 15 at the boss blind
does anyone know why cryptid mod keeps crashing
me when x > y and x or y
maybe someone would if you actually sent the crash log
yeah thats what i found online lol
ok i will
i rerolled in the shop
... wtf
idk man im very confused
I'm sorry that's in the cryptid folder?
yes
delete that cryptid folder (the one in mods), grab the download again and extract it right into your mods folder making sure it is not nested
I wouldn't bother cleaning that up
so, the github link says, "comes with the latest version of talisman and steammoded"
with the zip file
should i just extract cryptid?
just take the inner cryptid folder
huh, interesting that math did that
i actually didn't know that since I installed cryptid and talisman with git
interesting
Final visualization of Rouge Ribbon, featuring the Loop tooltip.
Actually, I figured out how to make it not clickable
The files in the folder should be extracted into the Mods folder
this is so sick
but isnt it spelt rogue
oh wait no
rouge the colour
3 in 1 blind
Guys where is ante chip requirement calculation code stored?
Because I want to modify the base of the ante
Ty 👍
ok wait what is a refresh?
Hey what are the different possible positions of a lovely payload?
Is it just at, after, and before?
Hands and discards go back, deck is redrawn
So you basically have to beat 3 boss blinds in one round
oh intresting
Also how do I inject something after a function ends, would this work?
imagine resetting hands and discards
pattern patches can only match one line
generally, its easier to put your code before somehting rather than behind something
but if you need to, you'll have to use a regex patch
Okay good to know
I think I can fix that
number_format is the function directly after the one I want
also if you just want your code to be run, you can use patches.copy to add it to the end of the file
There's more than that one patch but thank you
tie switch : 3
i thought my lovely patches were messing up the game code
but then i looked at the actual source
what the hell is the calculate joker function
how is it allowed to end like that
yes
i cant patch anything multiline without it breaking
couldn't you just write a hook if you want to catch it at the end
boutta start messing with stuff that shouldn't be messed with
not quite what im tryna do
start deleting UI elements 
im trying to patch in a whole lot of stuff
def a better way to do it
but i want to avoid using steamodded cos why not
crazy
its an SD card yeah
could add the base value of a previously played hand
(if it chooses your lvl 2 full house that you played already, it would add 65 chips and 6 mult to your played hand)
is it a one time thing?
Maybe “all hands are considered the same level as your highest level hand”
thats interesting too
in my ideal world it would keep track of what hands you played, like it would read the hand you played two turns ago
but i got no idea
i just like designing cool stuff
i got no idea what im doing either tbh
except im not good at designing anything too
sounds cool tho
How do you make/call a global function in this game
Alright got this shit working but I had to fork luasteam to add some stuff
trying to port handpreview / balalib (https://github.com/Toeler/Balatro-HandPreview/blob/main/Mods/BalaLib/BalaLib.lua) to steamodded 1.0.0 and having a bit of trouble - i did these changes by following https://github.com/Steamopollys/Steamodded/wiki/02.-Migration-guide:
- removed wrapping SMODS.INIT function
- replaced this code:
local balalib_mod = SMODS.findModByID("balalib")
local s_sprites = SMODS.Sprite:new("balalib_sprites", balalib_mod.path, "sprites.png", 32, 32, "asset_atli")
s_sprites:register()
with this:
SMODS.Atlas{
key = "balalib_sprites",
path = "sprites.png",
px = 32,
py = 32
}:register()
(i've also removed the SMODS.init block and findModByID instance from handpreview, which is calling balalib, but i'm pretty sure the error i'm getting is from balalib itself)
now when starting a run i get engine/sprite.lua:11: attempt to index field 'atlas' (a nil value)
i've seen others mention this error being caused by failure to register an atlas resource, but i'm creating and registering it in the same command here so i don't believe that's the case
Something is wrong here 😭
i hope this makes sense, let me know if there's any info i need to give
I've done something
anyone got a 1.0 mod that adds new ranks?
maybe add Cards and Packs to them so its more clear on what you're rerolling like
"Reroll Cards $5"
"Reroll Packs $10"
I literally just figured out how to modify the shop
Just make one (ez)
already on it
epic win?
it's good enough for what I need
epic win.
for anyone who somehow finds this, here's the rank ```lua
--- STEAMODDED HEADER
--- MOD_NAME: Rank Test
--- MOD_ID: RankTest
--- MOD_AUTHOR: [WilsontheWolf]
--- MOD_DESCRIPTION: Testing for ranks
------------MOD CODE -------------------------
SMODS.Rank {
key = 'Test',
card_key = 'TEST',
pos = { x = 12 },
nominal = 15,
face_nominal = 0.4,
shorthand = 'TEST',
straight_edge = true,
next = { '2' },
}
------------MOD CODE END----------------------
Also
moment
theres a method to set the suit but not the rank
ok am I missing something or doest the game just straight up not have a variable with all the ranks in it
SMODS.Ranks
I need to support the base game
I got this rn
oh also I have the jankiest card lookup because the game doesn't let me get this info easy
haven't tested it yet
and it doesn't work™️
okay it works but the order is all screwed up with steamodded
okay silly hack worked
new colors
Mega reroll might sound better than reroll-mega
Could also increase text size, should be able to fit all of it into the button.
@mellow sable hopefully i'm not being rude pinging you but you're the only other real instance of this error i've found from searching 🫠 if you have any advice i'd greatly appreciate it!
i'm totally stumped
i got this so many times in early cryptid dev and it had to do with not using the mod prefix in the atlas
oh, as in the mod directory? i did think it was odd that the sprite command contained the path but the atlas command didn't seem to call for it
the prefix defaults to the first four letters of your mod ID iirc
hmm...
but you can set it in the header
--- STEAMODDED HEADER
--- MOD_NAME: Cryptid
--- MOD_ID: Cryptid
--- PREFIX: cry
--- MOD_AUTHOR: [MathIsFun_, Balatro Discord]
--- MOD_DESCRIPTION: Adds unbalanced ideas to Balatro.
--- BADGE_COLOUR: 708b91
--- DEPENDENCIES: [Talisman]
--- VERSION: 0.4.2
as an example from my mod header
ooh lemme check for that, thank you!!
i assume you then just use G.ASSET_ATLAS["prefix-balalib_sprites"] instead of G.ASSET_ATLAS["balalib_sprites"] in Sprite() calls?
with prefix being whatever i set it to
underscore not dash
gotcha
so prefix_balalib_sprites
okay this is super useful info, i'm gonna make the changes
glad to help!
oh my gosh it works immediately, you've saved me
i really had no idea where to go haha
thanks again :D
yw
updated yet again
Blank spot? 🤔
for now
Truely a preview slot for the demo moment
Modded object previews would be fire for some mods ngl
for now it's be a negative rare joker, Mega Reroll rerolls the rare joker as well
how do make it show the description
Thank you, but I must thank Myst’s L Corp for the reference on how to make this happen
I have a second 3 in 1 blind planned, but it will take a bit more work
MathIsFun got it. If you can think of another way to express it, I’d consider it. Although now I can add tooltips to Blinds, I might add more, even if this one is currently hardcoded
I’m going to guess you didn’t put your mod’s prefix in the localization key
ohhh is that needed now?
Always has been
i added a prefix, still nothing
--- MOD_NAME: Mic's Mad Mod
--- MOD_ID: micstarots
--- MOD_AUTHOR: [I_am_Mic]
--- PREFIX: mic
--- MOD_DESCRIPTION: Work in Progress mod that adds a bunch of stuff
----------------------------------------------
------------MOD CODE -------------------------
SMODS.Enhancement {
name = "m_thirsty",
key = "thirsty",
badge_colour = HEX("ffd70d"),
config = { x_mult = 3, chips = -100},
loc_txt = {
-- Badge name (displayed on card description when seal is applied)
label = 'Thirsty Card',
-- Tooltip description
description = {
name = 'Thirsty Card',
text = {
'{X:mult,C:white} X#1# {} Mult,',
'{C:chips}-#2#{} Chips when scored.'
}
},
},
loc_vars = function(self, info_queue)
return { vars = {self.config.x_mult, self.config.chips,} }
end,
atlas = "thirsty_atlas",
pos = {x=0, y=0},
-- self - this seal prototype
-- card - card this seal is applied to
calculate = function(self, card, context)
-- repetition_only context is used for red seal retriggers
if not context.repetition_only and context.cardarea == G.play then
return {
mult = self.config.x_mult,
chips = self.config.chips,
}
end
end,
}
SMODS.Atlas {
key = "thirsty_atlas",
path = "thirstycard.png",
px = 71,
py = 95
}```
You don’t need to add one, though you can
The default one is made of the first four letters of your mod’s name
Also I think you used the wrong syntax to define it anyways
Usually keys will look like j_mics_joker_name for your mod
where can i find the appropriate keys for appropriate types of cards
okay okay, but if j_ is for jokers, what is it for modifiers, or consumables, editions etc
It’s almost always the first letter
So for those you said, m_, c_ and e_
Oh thanks markdown 🙃
name = "m_thirsty",
key = "m_mics_thirsty",
badge_colour = HEX("ffd70d"),
config = { x_mult = 3, chips = -100},
loc_txt = {
-- Badge name (displayed on card description when seal is applied)
label = 'Thirsty Card',
-- Tooltip description
description = {
name = 'Thirsty Card',
text = {
'{X:mult,C:white} X#1# {} Mult,',
'{C:chips}-#2#{} Chips when scored.'
}
},
},
loc_vars = function(self, info_queue)
return { vars = {self.config.x_mult, self.config.chips,} }
end,
atlas = "thirsty_atlas",
pos = {x=0, y=0},```
like this?
(i took this for an example mod for seals but i made so that its a modifier instead of a seal )
escape those underscores
menhancement
the API adds these prefixes automatically
So in this case your real key would be m_mics_m_mics_thirsty
so ill just put thirsty?
yeah
okay everything seems to work on the tarot card, its the enhanced card i dont know how to do
info_queue[#info_queue+1] = G.P_CENTERS.m_mics_thirsty
right here?
yep
same thing, but now it says UI error
okay now its just gone
what does your enhancement constructor look like now?
liek teh card itself??
the definition like SMODS.Enhancement { ...
name = "Thirsty card",
key = "thirsty",
badge_colour = HEX("ffd70d"),
config = { x_mult = 3, chips = -100},
loc_txt = {
-- Badge name (displayed on card description when seal is applied)
label = 'Thirsty Card',
-- Tooltip description
description = {
name = 'Thirsty Card',
text = {
'{X:mult,C:white} X#1# {} Mult,',
'but {C:chips}-#2#{} Chips ',
'when scored.'
}
},
},
loc_vars = function(self, info_queue)
return { vars = {self.config.x_mult, self.config.chips,} }
end,
atlas = "thirsty_atlas",
pos = {x=0, y=0},
-- self - this seal prototype
-- card - card this seal is applied to
calculate = function(self, card, context)
-- repetition_only context is used for red seal retriggers
if not context.repetition_only and context.cardarea == G.play then
return {
mult = self.config.x_mult,
chips = self.config.chips,
}
end
end,
}```
and the tarot?
set = "Tarot",
name = "The Mosquito",
key = "mosquito",
config = {
-- This will add a tooltip for seal when hovering on spectral.
-- `s` means seal (set), `seel` is mod prefix, `_seal` is added at the end automatically for all seals
mod_conv = 'm_mics_thirsty',
-- Tooltip args
tarot = {x_mult = 3, chips = -100},
-- How many cards can be selected.
max_highlighted = 1,
},
loc_vars = function(self, info_queue, center)
-- Handle creating a tooltip with seal args.
info_queue[#info_queue+1] = G.P_CENTERS.m_mic_thirsty
-- Description vars
return {vars = {center.ability.max_highlighted}}
end,
loc_txt = {
name = 'The Mosquito',
text = {
"Enhance {C:attention}#1#{} card",
"into a {C:attention}Thirsty Card{}"
}
},
cost = 3,
atlas = "mosquito_atlas",
pos = {x=0, y=0},
use = function(self, card, area, copier)
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.1,
func = function()
for i = 1, card.ability.max_highlighted do
local highlighted = G.hand.highlighted[i]
if highlighted then
highlighted:set_enhancement('m_mics_thirsty')
else
break
end
end
return true
end
}))
end
}```
if mod prefix is mic then set_enhancement call is wrong
key should be m_mic_thirsty
but it's unrelated to the tooltip
oh ye
there's no label and description for enhancements, it's just name and text at top level
tbf it's inconsistent and there should be no description subfield ever
ye that was super annoying to figure out for seals
Some things should have a separate label though
They need entries in different localisation tables
yeah, ive just based the seal mod, and instead of a spectral that gives a seal, its a tarot giving an enhancement
you shouldve checked cryptid
yeah but having name, text, label all directly in loc_txt is more straightforward
but whatever now
the label not being used in the main description is a bit redundant, but I think that's alright
issue added
i tried, but it dosent look anything ive seen from the steampollys wiki, it looks confusing
enhancement docs are still missing
Ah yeah that makes sense
thats just my goal right now, make a modded enhancement tarot card
description = {
name = 'Thirsty Card',
text = {
'{X:mult,C:white} X#1# {} Mult,',
'but {C:chips}-#2#{} Chips ',
'when scored.'
}
},
replace this with just the inside
name = 'Thirsty Card',
text = {
'{X:mult,C:white} X#1# {} Mult,',
'but {C:chips}-#2#{} Chips ',
'when scored.'
},
inside description or inside the loc_txt
You still have to hardcode Enhancement effects, right?
i thought its similar to coding seals
Yeah they’re not returned into the stack like others
in loc_txt
#💻・modding-dev message you can use eval_this
Yeah I’ve had that as well, I think it’s just an issue in the api we need to fix
it's inconsistent rn, seals are likely being changed to match the rest
alright got it
that worked, but the little description here is still gone
also idk if this is just my mod, every base enhancement cards here now has "+0 extra chips"
you can test by moving your mod out of mods folder
did you remove label part?
what steamodded version is this? I thought this was resolved
yeah
1.0.0
it just shows below the game version on main menu
mod_conv is wrong
you have mics, should be mic
for mod prefix
same with highlighted:set_enhancement call
yeah just update and it should be fixed
do i have to verify game intergrity? and where can i find the latest version
you don't need to verify file integrity
did you install using git or direct download?
with git, you just need to run git pull in command line to update, for direct download you basically just have to get rid of the old files and download the new ones the same way you did for the version you have
i installed it from someones link that someone sent here
alright
just download this again and replace your steamodded folder with these files
I do recommend using git as we still update frequently
will do
alright its gone
these are my only problems
thinking of a battery pack joker today…
it has 0 or 1 sell value but it would recharge all jokers that diminish over time (ice cream, popcorn, ramen, turtle bean, there’s probably another one i’m forgetting)
either that or it could be called free refill
thread on tutorialization via Jokers and Bosses: https://vxtwitter.com/localthunk/status/1813292941957615876
is there a way where i can make a card subtract chips instead of adding them when scoring?
aw dang
But you should be able to hook the function to edit its behaviour
Although I’m not sure what would be a good practice
Since other mods may not want that kind of behaviour
xchips is a thing
not natively tho
#1257660889520144446 has function for it
tho it's still in development and has a few issues
so nothing about subtracting chips?
x0.5 is the same as dividing by 2
idk why are you asking question about subtraction again
just checking
feel free to request minus chips function there
-mult works so idk why -chips wouldn't work
we need more chip love
I think vanilla doesn't accept it, but maybe since then Steamodded has added the functionality
It's not about difficulty
I think thunk didn't want that mechanic and made it impossible to avoid errors/corner cases
Testing the in-progress Tyrian Patriarch
dang
i guess halving the chips is good enough
(which im sure it is, maybe)
hi
you know how
when you quit out
like if you open a booster pack
and then quit out
and then go back to the run
it like saves as you start opening the booster pack
does anyone know what the name of that function is or where it might be
like when the game saves the state
so you can go back to it when you enter the run again
i tried making a thing write to a save file when the function save progress is called
but that doesnt seem to be often enough
I think it's just save_run
Any opinions on this?
I'm thinking whether or not to show which bosses, and how. I can show one Boss tooltip but I'm not sure how to do two
it looks like a really cool concept
for an ante 8 blind
Thanks
crimson dusk walked so tyrian patriarch could run
(also why is the song so sped up i kinda love it)
Thank you, Myst
Also depending on how I finish this, I can make it scalable rather than hardcoded
To make the video shorter
i mean i could too but i have no reason to
since multibosses are only for Crimsons and two other bosses that require hardcoding
Tyrian Patriarch selects them randomly, so the way to do it is probably 90% of the work to fully automate it. Also I could make a Joker out of this
Pinging you to ask about attention_text. Just curious how L Corp did it, since I want Tyrian Patriarch to say “Magnificent!” before you fight it
oh lol if you reset halfway through it doesn’t save the state 😅
alert_debuff
I imagine it’s the same in L Corp
wdym?
But it uses loc_debuff_text
the state of what
The multi Blind state
i don't store the blind state
Like, if you exit and reenter in Blind 2 of 3, it thinks it’s the last Blind
I didn’t mean to test this so Idk how Ribbon works. Maybe that one would have the same behaviour as L Corp, whatever that is
i think i only store original blind
oh noes : (
i thought that maybe the temporary cards like this could update slowly as it gets used up
Check out #1249486500811378718
this is just pop
(no corn)
bro got popped
😭
You can contribute to Aura if you want
aura wasn't exactly what i was envisioning, but i suppose i could anyway
It’s a simple thing to do actually, if you can make the different sprites I can throw it together
i guess make a spritesheet?
I mean, Aura also intends to track the state of different Jokers via the sprite
They discussed food Jokers before
yeah thats it
I just think they haven't done it yet
i was still scrolling into the thick of it
Yeah I’m not sure if aura wants them to be animated or not though
even if they only make keyframes, I think that would be of help
thast weird
Yeah, I just mean I’m not sure if their scope is for it to be animated and reduce, or just reduce
does jimball from cryptid use aura?
i forgot to make a backside
im thinking on adding lighter streaks to the pins to signify that it's been accessed before
I think it's the other way around
MathIsFun reused Jimball for Aura
oh wow
im actually really proud of this design
It's very good
Yeah, I programmed Jimball before Aura so I was able to reuse a lot of the logic for that
Although Aura is more complex now
how do i get current mod path?
SMODS.current_mod.path
tysm
you have to cache it somewhere
current_mod changes after your mod is loaded
local lang_path = SMODS.current_mod.path..'localization\\en-us.lua'
does this work then or nah
as long as it's defined outside a function should be fine
yea
^
It looks so nice, what’s it for?
fyi steamodded processes localization files by itself
nothing in particular, i cant make it work in game due to not knowing how to code it
i just like making card designs
That would totally be a good mechanic
Just saving stuff on cartriges
Idk what you would save but it would be cool
maybe you could save a hand that you played and you can load the SD to play it at any time
It could be like a new consumable type maybe
Interesting, although saving cards is finnicky
will this work tho?
also wait wdym
like if i have a file in a localization folder
itll just work
With Steamodded, yes
damn
like if its called smth like 'nuts'
itll show up in the options as seperate
and called nuts
i dont have steamodded installed so i cant test it myself easily
@frosty dock btw in antivirus section of getting started on wiki it's probably better to not show default path to steam library, and instead say to access via steam - balatro - properties - installed files (e.g. I don't have steam library on disk c)
but idk how often people do that so maybe it's easier with default path
Hey guys anything wrong you can spot here?
why the last patch?
Could you have that function anywhere?
I guess the alternative is doing NFS.load, which, fair
hm sure
I'm calling it here
I broke something and I can't tell what 😭
I think I found the culprit for my syntax error issues
https://gist.github.com/flakywanderer/04de5dd47c1705df2fb653fffcc53d33#file-ui_definitions-lua-L3436
There seems to be a missing newline (and I suspect why it isn't completely trashing the mod on the mod creator's side has something to do with newline platform differences)
steamodded overrides that btw
steamodded override is in main.lua if u want to see the exact code
hm is that Saturn mod, I remember something similar there
Yeah
Even when I manually write a patch to correct that, it still ends up doing something which causes other modded stuff to have error placeholder strings
Lovely is about as robust as a tower of popsicle sticks and wood glue
It's very early in development
so I assume it breaks a lot of stuff with steamodded
lovely patches give you freedom to do literally anything with the game
but with that freedom, compatibility of mods is very hard to achieve at times
but backs depend on the deck, so it would kinda have to be more like a mask? Unless you don't really care about that
this would introduce a new kind of card, marked cards
you can just see what they are even if they are face down
ehh maybe something else for that one
should be just paper, maybe with Joker signature and a date
well it's a photograph. the film needs to have a negative to develop
the backside of the picture is the black part, thats what the picture develops on
this one is humorous ...
ngl I havent seen a single photograph with a black back, but I'm not too much into that so idk the details of how they're made
i suppose it does matter on what was being referenced when photograph was made
but lots of camera film does it like that
the kind of film that i'm familiar with is fujifilm instax
something like this
thinking about the SD again. really cool potential
Question, isn't load already a keyword? How would I make this work?
what’s the question exactly
it's not a keyword, it's just a function in the global scope
you can still put a function named load on any table just fine
it's not a reserved keyword
Currently have it as this for testing, and just uses the default sprite rather than changing to this on load.
load = function(self, card, card_table, other_card)
card.children.center:set_sprite_pos({x=1,y=0})
end,
Tried putting in sendDebugMessage{'Loaded Card Test'} under the load function, got a crash, but, might be outdated steamodded, so I'll make sure to update and such before doing anything more with that.
how does one call a yes_pool_flag?
why are you doing sendDebugMessage{...}
that crashes because it's invalid syntax
these {} need to be ()
Have it in the joker table, on the same scope as rarity and atlas, and put any thing that triggers the flag as G.GAME.pool_flags.(pool flag name here) = true.
thanks👍
Alright, yeah, stupid mistake on my part, it is getting activated when loaded, so I suppose the issue might be with set_sprite_pos? Odd, because I have another one that changes it at the end of round which does work, and I just copied it from there.
I think set_ability should be sufficient, depending on what you want to do
yeah probably, the timing on load might not allow for that
It’s a bit weird because set_ability is called but later overwritten
But not completely
I know extra variables are overwritten
set_ability does not seem to be working on load, but it does work in the collection and upon picking it up.
Basically, the idea is a card which changes between the suits at the end of round, and changes the sprite to reflect that. It's working,, but upon exiting and reloading, it goes to the default sprite, rather than the sprite related to the suit.
The game uses set_ability to change some Sprite properties
Because set_ability is called on load
Since each card has to be recreated
Check out Aura to see how it handles Castle
Will take a look, probably making a stupid mistake somewhere, thanks.
Aura has it hooked into Game:start_run(), I'll see if I can work something out from there.
Balanced or broken?
square joker is 4
can anyone tell me whats wrong with is "if\sself.ability\.name\s\=\=\s\'Lucky\sCat\'\sand\scontext\.other\_card\.lucky\_trigger\sand\snot\scontext\.blueprint\sthen\s*self\.ability\.x\_mult\s\=\sself\.ability\.x\_mult\s+\sself\.ability\.extra"
its saying invalid escape
self.ability.x_mult = self.ability.x_mult + self.ability.extra```
its finding that bottom bit
why aren't you just using spaces
because its multi line
just use spaces for normal spaces
for newlines, use a newline followed by [\t ]* for indentation
\s* works i guess, but this is more readable
you also don't need to escape =
also it seems like this can be a regular pattern and doesn't need to be regex in the first place?
+ you do need to escape
lmao I thought that was part of the regex and it seemed weird
"if self\.ability\.name == \'Lucky Cat\' and context.other_card.lucky_trigger and not context.blueprint then\s*self\.ability\.x\_mult = self\.ability\.x\_mult \+ self\.ability\.extra"
this still doesnt work
am i dumb
wait i see it
nvm
do i need to escape .
and _
?
okay i dont
?
wait, lovely's pattern doesn't support multi-line matching?
dont think so
yeah it doesn't
there are the examples on lovely readme with some comments 🙃
sorry its still giving me problems
do i need to escape '
oops
'
quote marks
its giving me error if i do 'Lucky Cat'
damn it
\'Lucky Cat\'
or
'Lucky Cat'
it gives errors for both
what is the thing for newline?
is it just \n
yeah
you can use an actual newline if you use a multiline string
but an enter in a multi-line string should also work
'''first line
second line'''
ah ik why it was giving me problems
its cos i had the card.lua dump open
so it wasnt changing
or smth
idk how that works
can we still use the normal create_card?
sure, if you like to type out nil, nil, nil, nil
just asking to know if i need to go back and change all my code
It should just be an easier version to use.
you can remove the ( ) from functions?
I'd recommend changing if you use forced editions, else it doesn't really matter but is cleaner
yeah, if you're passing one argument and that argument is a string or table
i'll wait a bit before changing it, just to avoid false reports of people without updated Steamoddeds
oh wait does this stop the weird edition crash when it rolls editions twice and overwrites the first one with a blank edition?
it should, though I was never actually able to repro that crash
no_edition stops the forced edition roll on jokers, so there's no need for extra set_edition calls
also area is completely optional and determined from context
nice
I'm assuming the third example is creating a random tarot card that has the dum prefix in it's key?
key_append is a weird name tbh
it's used for the RNG seed
Oooh that's neat!
only true OGs remember create_card('Joker', G.jokers, nil, nil, nil, nil, 'j_jolly')
🔥
how do you remove blinds from pools?
ban them
I suppose that's a way, but I would like to "ban" them in certain decks instead of challenges
take owneership and change the in_pool maybe
do you guys ever have problems where you try to do something
and it doesnt work
like itll say some value is nil
so ill try print the value
to see if its nil
and itll be like table 3981
or whatever
clearly not nil
and then the rest of the code runs fine
that seems a u r misinterpeting the error
but only after printing
no i swear sometimes my code only works if im printing stuff
that shouldn't be feasible
i tried iterating over G.shop_booster
and it was like nah thats nil
and then i printed it and it was a table
i dont get it
tried to iterate over it again and it worked
its like my code is trying to be difficult on purpose
its like yeah you got an error here
so i investigate
and its goes nah i was just messing
Having some difficulty with a lovely patch
--Any Joker effects
if effects.jokers then
local extras = {mult = false, hand_chips = false}
if i == 1 then
if effects.jokers.chip_mod then
if effects.jokers.mult_mod then
effects.jokers.mult_mod = effects.jokers.mult_mod + effects.jokers.chip_mod / 2
else
effects.jokers.mult_mod = effects.jokers.chip_mod / 2
end
effects.jokers.chip_mod = 0
end
end
if effects.jokers.mult_mod then mult = mod_mult(mult + effects.jokers.mult_mod);extras.mult = true end
if effects.jokers.chip_mod then hand_chips = mod_chips(hand_chips + effects.jokers.chip_mod);extras.hand_chips = true end
if effects.jokers.Xmult_mod then mult = mod_mult(mult*effects.jokers.Xmult_mod);extras.mult = true end
update_hand_text({delay = 0}, {chips = extras.hand_chips and hand_chips, mult = extras.mult and mult})
card_eval_status_text(_card, 'jokers', nil, percent, nil, effects.jokers)
percent = percent+percent_delta
end
Here's what the patched code looks like - everything inside the i == 1 if statement is my patch, and everything else is the base game scoring code
What I'm trying to do is make it so that if your first joker would give chips, it instead gives half as much mult
Mechanically, this works. The value of effects.jokers.mult_mod is properly changed, and it has the desired effect.
However, when it displays the value in the text diamond under the card, it still uses the old chips value, even though effects.jokers.chips_mult should have been changed by that point (and I know it has been changed, since it calculated 0 chips properly)
What do I have to do to get it to display the right value there?
I think setting effects.jokers.chip_mod = 0 made card_eval_status_text think your effect was a chips effect (it checks in order, it can't handle both chip_mod and mult_mod I think)
try setting it to nil
is there a place i can download the .lau library for visual studios?
Lua?
yes
You might not be saving the changes before trying to print
why is all the code to do with ui so confusing lol
wtf are all these nodes
does anyone know where i put in a colour
cos apparently its trying to index colour but its nil
emboss = 0.05,
minh = 6,
r = 0.1,
minw = 10,
align = "cm",
padding = 0.2,
colour = G.C..BLUE
},```
is this not right?
Shouldn't it be G.C.BLUE?
it was
it was actually black but i changed it blue to send it here
so that mistake isnt in the code
which ik is weird lol
got it to work
its all good
could anyone send a ss of the talisman settings menu thing?
nvm
all good
anyone know if i can make it so
when the back func of a button is called
it goes to settings but with the chosen tab being a specific one
instead of just the game tab
in lua can i do a, b = b, a?
yep
awesome
finally got my thing working
i can now reroll for specific legendaries and editions
using the seeds
instead of how i was doing it before w having it open each pack and check lol
so much quicker
Uhh, I'm trying to do info_queue for j_joker, but it doesn't want to show its variable
any workarounds?
what did you add to info_queue exactly?
hm that's awkward
yeah it's really weird, everything else worked fine
vars for vanilla jokers get passed in from Card:generate_UIBox_ability_table() and don't get regenerated in generate_card_ui
ye that wont work, you need to do it this way
that does rely on this lovely patch
oooh, thanks!
I should probably import that to steamodded anyways
wait would that even work? didnt steamodded change the generate_card_ui to have card as last arg
or am I misremembering the function
Ig cryptid patch runs before steamodded
😭
the patch is now in steamodded
oh hey the bobm issue finally got fixed
yep
finally had time to make balloon sprites 🎉
does anyone know if i can change the colour for the tickboxes?
ive managed to change the colour of the clicky left right selectors
and also the colour of tabs?
ah
source code is surprisingly helpful
i think these should be G.C.RED
but how do i change them
i want to make them blue
but im not sure where the colour goes
theres multiple tabs and configs and i cant figure it out
managed to find the back button
you can just assign a new color table to G.C.RED
id rather not
i have trance and i use it all the time
but i wanted it to actually be the colour
damn
Translated the background shader to GLSL and trying to incorporate it into a web app for a Balatro utility now
thats cool as hell
I’m pretty sure you can just pass a colour into the create_tabs arguments
hmmm
oh, i already did that for the balatro joker mod website template
Huh, it seems that create tabs never passes the colour through to the buttons
Even though the first line of the function makes sure a colour is set

there's probably a default color set
Oh right! I forgot about that
I think the official balatro website also has it? Not sure
Do you think players would realize they can hover over blinds?
Yeah for sure, it just needs the button definition passing the colour argument
I agree, I might add the alert icon to Blinds with tooltips, if I figure out when is a good time to do that
Not too good at fragment shaders
Nah respect for anyone who even tries to use GLSL that language is real difficult
Take a closer look though, it’s hard to follow source code on mobile
yeah looking at shaders is kind of interesting
shaders make me want to pull my hair off
Shaders is just maths
100% justifiable
it looks like it sets the outline colour, then the inside colour, then the tabs as the contents
That's true but you need to know what math to do and how to write it
not sure how i squeeze the tab colour in
i made a shitty pixelation shader and i deem it good enough
Doing the math is the easy part
imagine being a developer that's bad at math
couldn't be me
Yeah you just need to send Args.colour into the buttons
Honestly, my frag shaders usually end up as "fuck around and find out" and result in a weird amalgamation of maths
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = "{n=G.UIT.R, config={align = "cm",padding = args.padding or 0.2, minw = args.minw or 7}, nodes="
position = "at"
payload = "{n=G.UIT.R, config={align = "cm",padding = args.padding or 0.2, minw = args.minw or 7, colour = args.tab_colour or G.C.RED}, nodes="
match_indent = true
overwrite = true```
this does not seem to work
it wants a new line apparently
i suck at these patches tho
That’s not what to do
I can write the patch in around 30 mins for you
i would really appreciate that
reward is kinda redundant
I agree but I'm using the vanilla function that creates the UI
I can try to remove that row from it
why doesn't it show the Plant?
[[patches]]
[patches.pattern]
target = 'functions/UI_definitions.lua'
pattern = '''tab_buttons[#tab_buttons+1] = UIBox_button({id = 'tab_but_'..(v.label or ''), ref_table = v, button = 'change_tab', label = {v.label}, minh = 0.8*args.scale, minw = 2.5*args.scale, col = true, choice = true, scale = args.text_scale, chosen = v.chosen, func = v.func, focus_args = {type = 'none'}})'''
position = 'at'
payload = '''tab_buttons[#tab_buttons+1] = UIBox_button({id = 'tab_but_'..(v.label or ''), ref_table = v, button = 'change_tab', label = {v.label}, minh = 0.8*args.scale, minw = 2.5*args.scale, col = true, choice = true, scale = args.text_scale, chosen = v.chosen, func = v.func, colour = args.colour, focus_args = {type = 'none'}})'''
match_indent = true
then wherever you need to change the tabs colour, just add a colour = G.C.BLUE for example to the function
thank you so much
I don't know why this isn't in the game already
maybe thunk just forgot, but because of the default colours he didnt realise
but this bit already exists
it just then isn't used anywhere else in the function
it's an easy patch though, so whatever
easy patch for some lol
Remove the rewards
I have a theory for why the Plant doesn't show its icon, so I'm going to test it. If that fails, I'm gonna pretend I don't see it
Nope, theory failed
Yes
That looks sick!
its beautiful
next is the lil arrow lol
Thanks! Though I'm mostly reusing the existing function, plus adding the sprite and removing the rewards
i was mostly joking lol
that bit doesnt bother me
the tabs themselves were so obnoxious
These are the Blinds I have at the moment. I might not keep all of them, but let me know what you think
[[patches]]
[patches.pattern]
target = 'engine/ui.lua'
pattern = '''love.graphics.polygon("fill", get_chosen_triangle_from_rect(self.layered_parallax.x, self.layered_parallax.y, self.VT.w*G.TILESIZE, self.VT.h*G.TILESIZE, self.config.chosen == 'vert'))'''
position = 'before'
payload = '''love.graphics.setColor(self.config.colour)'''
match_indent = true
there you go
Now with an alert icon!
Where are you setting tooltip blind 2?
Immediately before that code block
Is it the exact same structure as blind 1?
Yes
Oh
Those are different
You find the atlas from tooltip_blind but the ui thing is called tooltip_blind_1
Change this name
It overwrites the blind which is why it defaults to small blind
I'll verify in a minute
I'm changing something else but Idk where the error is because the file name isn't shown
Wait I got it
Thanks @wintry solar!
im thinking about adding a way to search for specific jokers w my mod instead of just legendaries
do you think have a text box to put in names for them is possible
or just having like an option cycle for rarities
or similar
I think it was feder who added a search box
its possible w just lovely right?
I guess so, yeah
cool
so far ive got a way of checking the next card in a specific queue
so i guess having a text box could work
Yeah, the game does even have a text field you could probably reuse
Its used for profile names and seeds
oh yeah you can put in a name for you profile
and seeds i completely forgot lol
right then thats next on the list
do you have any idea why canios name in the code is caino?
is that just a mistake or is there an actual reason for it

It was mispelt, and then fixed in the localization but not code
Yeah I noticed that at one point #💻・modding-dev message
You can see how feder did it, maybe
I don't remember them releasing the search box mod though
Now I only need to touch up the code and put the icon I already made
I'm thinking of going with this. I'm also considering changing the Chip background to fire, but that means I'd need to animate fire
Thank you!
the refresh thing is nice
is it possible to get them elsewhere
or just from these boss blinds
The multiblind code is based on Myst's L Corp, the colorful Showdown Blind background is from Bunco, and the theme is a reference to Kill 6 Billion demons
Currently only from this Boss, but I have a Joker with the refresh effect when sold
Are you trying to search the collection, or just your own stuff?
me?
Ywah
im rerolling seeds for specific jokers
at its just legendaries
but i want to make it so you can look for any joker in first booster pack
any edition
Ah I see
already got most of it done
I know someone wanted to be able to search the collection to make it easier to spawn jokers in DebugPlus
But I didn't feel like working with ui's
Tooltips I find a bit easier because you can imagine it in your head
The Blind tooltips were confusing to me though
I just wrote my own ui system instead of trying to figure out
's
but just doesnt make sense if you dont understand it
I'm sure it's not, it's thunk /j
fair enough lol
im not sure if this should go in here or #⚙・modding-general , but im having a really hard time figuring out how to make my joker actually do anything: ELI5, whats the best/easiest way to do it? im using steamodded and did try something, but nothing came of it 😭
Define a calculate function
i tried botching something from the source code to see if it'd do anything, but nada
This is how I create a Joker that refreshes Hands, Discards, and the deck when sold
oh it has to be in the joker table? that makes sense
The _generate_main_end is a function I defined to change the tooltip
I load this table into the Steamodded Joker constructor
interesting
The important line is SMODS.Joker(data)
im currently using the jokerAPI example thing to actually get a joker in the game
i do have one question though, what is the function actually doing here? like, what does mult_mod do?
The function that evaluates play collects these returns and applies them to the hand being played
oooh okay
Also end_calculate_context isn't necessary anymore
I think you probably want joker_main
so SMODS.joker_main(context) then?
ooh
okay, so then - whatever goes in there is what the joker will do? (sorry for being such a dumbass, i havent used lua much ever 😭 )
it isn't about lua tbh
dont think is quite what i was going for
It's more of familiarity with the source code
fair enough
you should unzip balatro.exe
i have, its how i got this 😭
anyone know how to disable this question mark?
good one, haven't really thought about messing with that
I can't even find where it's created :/
anyone got any idea how i align this?
prompt_text = "Enter Joker Name",
max_length = 21, -- delayed grat i think
text_scale = 0.4,
w = 2.5,
h = 0.4,
align = 'cm',
ref_table = Blueprint.SETTINGS.autoreroll,
ref_value = "searchForJoker",
}),```
this is wwhat my thing looks like
oops i pasted it twice
card:draw
i just got home and it's midnight so might not be accurate
isnt there like minw and maxw
idk if that's helpful in that situation tho
they're in ui.lua
still didn't do any UI stuff
thanks
but on top of my head [t/c/b][l/m/r]
New Showdown Boss Blind!
Tyrian Patriarch
Defeat two Bosses before playing this (1 refresh)
Let me know what you think!
i thought that would be it, so i tried tm and nothing changed
are they two random bosses?
Yes! Out of a whitelist
guh
So a priori no modded bosses (besides my own)
does The Needle give your hands back after beating it
sad
how is that structured? is it a row containing 2 columns or why does it look like that
sad
Water could be feasible, but Needle just makes it too hard IMO
im cooking i swear (this looks correct to me but i must be fucking up somewhere)
i don't see the issue if you got the taken hands back after beating it.
other_card isn't implied by individual
im creating tabs
and the tabs are tags and jokers
then in the jokers tab
theres just a table of nodes
which are all the ones you see in the image
but for some reason
the text input is there
yeah I'm asking how these nodes are organized, maybe they need to be restructured
put all the or shit in parentheses
uh
context.individual can be called from different areas, you need to gate for the correct one
before you do any other checks, that is
ok gn gonna start fixing my mods tomorrow
so, what would i do with it? put it in its own table?
hopefully before the autumn chui mod stream
nvm it's just precendence
put your chained ors in parentheses
You’d need to check your context is the appropriate one.
Here it might not matter too much
put them into parentheses, got a new error (i.e progress!)
🎉🎉
what is the config table on your joker?
yeah so your mult isn't inside extra
this is technically fine since that specific name is also transfered to card.ability, so card.ability.mult would work, but using extra is recommended
some values in config are directly copied to card.ability
oooh, okay
but extra is always copied fully
that does explain a lot 😭
💀
so, should i use card.ability.mult here then? just wanna make sure
i can have a go at it if you want
either that or change config to have an extra table
please 😭
so config = { mult = x, extra = {x = y} }?
Can the Balloon have a question mark?
config = { extra = { mult = x } }
yeah, otherwise you would have to make sure the value you're using actually gets copied to ability, only a fixed set of them do
