#💻・modding-dev
1 messages · Page 66 of 1
brother you gotta fix that indentation
also, you have the exact same issue as last time
btw guys what does this mean
You messed up a for loop I think
but it's not looped?
actually, could you try updating your steamodded?
I've been away for a while, with steamodded is there supoort for the new "Customize deck"? menu?
ok
also whats the key for x mult?
after the newest smods update my lovely patch isnt being applied for some reason despite the update not changing the line im trying to replace with pattern
apparently the order of injection changed????
#1278062228679168082 message looks like the answer is 'kinda'
i fear it may work to well...
make it uncommon or rare
oh i just haven't given it a rarity lmao
honestly with this many retriggers it could be legendary tbh
like imagine that with triboulet etc.
seems more in line for cryptid tbh
yeah
It might be an idea to do some custom hand text similar to black hole? Just to make the action a little quicker
Or you could even have it just juice up once, and then have the hand text on the side cycle through as it does currently, but the player can still perform actions.
the showcase is for the joker, klubi exists for a while now
anyone know where in crypid's code i can find the register of "G.GAME.modifiers.cry_big_showdown"
or is it only used for crypid's final bosses?
this is still happening and it's kind of frustrating me at some point, how would i craft a lovcely patch to actually digure out what's going on since my own attempts do not seem to work
whats the key = a_mult for x_mult?
IIRC it was like a_xmult
ok
lmk if it works
?
hmm xmult money joker
yep
cool idea :D
and it works perfectly to
if it works, it works 🤷♂️
yep
Can I see this code because I have no idea how you’ve “made your own”
did you try putting a print right before there btw?
That was the idea with the lovely patch but I don't know how they work enough to make one that actually does anything
oh no, you don't need to make it that complicated
you can just open the cryptid file in your preferred editor (notepad++ or whatever is fine)
find these lines:
if forced_key and not G.GAME.banned_keys[forced_key] then
center = G.P_CENTERS[forced_key]
_type = (center.set ~= 'Default' and center.set or _type)
else
local _pool, _pool_key = get_current_pool(_type, _rarity, legendary, key_append)
center = pseudorandom_element(_pool, pseudoseed(_pool_key))
local it = 1
while center == 'UNAVAILABLE' do
it = it + 1
center = pseudorandom_element(_pool, pseudoseed(_pool_key..'_resample'..it))
end
-- <- and put a print on this line
center = G.P_CENTERS[center]
end
It would be better to do sendDebugMessage(tprint(_pool)) for debugging purposes
I think the right way to print is using sendInfoMessage(center, "Samario")
printing the pool might also be interesting yeah
We already know the center is nil though
center gets redefined after the line I commented on
_type is "Joker", unless it gets redefined somewhere
Yeah I feel like it might not be a joker type causing the crash though
INFO - [G] 2024-09-08 13:18:35 :: INFO :: Samario :: j_lobc_whitenight
INFO - [G] 2024-09-08 13:18:35 :: INFO :: Samario :: c_cere_ceres_spectral
INFO - [G] 2024-09-08 13:18:35 :: INFO :: Samario :: l_coll_card_2
INFO - [G] line not found
INFO - [G] file not found: main.lua: No such file or directory
INFO - [G] file not found: main.lua: No such file or directory
INFO - [G] line not found
INFO - [G] file not found: main.lua: No such file or directory
INFO - [G] file not found: main.lua: No such file or directory
INFO - [G] 2024-09-08 13:18:35 :: ERROR :: StackTrace :: Oops! The game crashed
[SMODS BetmmaAbilities "Betmma_Abilities.lua"]:98: attempt to index local 'center' (a nil value)
i think it might be collectors' cards????
i need to roll more toconfirm
yeah the next crash log mentioned l_coll_magnetic
so it's definitely collectors' cards
new mod? "flame debuff", just testing on how to manupilate the flame :D
what is this supposed to show
no flame :>
There wouldn’t be a flame there anyway though
then just focus on the high card pickture
There’s no target either for context
basically, i broke the flame, it will never show up
lmao
And this actually applies the xmult?
Huh I didn’t realise jokers could just read from the config like that
funny
same way enhancements work
how do i make a deck
Steammodded has a example
ok
G.deck.cards[1] will give the next card youre gonna draw right?
as for how it should work tho
mmmm
i'd say it can spawn food jokers once the player gets enough money
Add a Use Function to it, On Use: Remove $3, add a random Negative "Unhealthy" Food Joker to the pool
Burger, Fries, Milkshake, etc
is there a way to not let them be in shop
Uh... idk exactly the coding side, I've been working on other stuff
ok then
:3
and if not how can i get the next card ill draw
ok this doesnt work
nevermind
help i can't big mac
Burger already exists
where
is there a context that happens earlier than context.before?
where burger
#1247703015222149120 message nope, would need to add it yourself
where exactly earlier than before are you imagining?
so im trying to add steel cards into the hand in before but they arent triggering once the hand is scored
can I see the code you have to add the cards?
dna creates new cards ig?
dna works cuz it does cardarea:emplace instantly
draw_card creates an event
at least that's what I think is happening
yeah I thought it would be event shenanigans
is there an steamodded atlas key reference? I can't find any. My seals and the soul aren't working with the "centers" key
im replacing the exsisting, not trying to make new ones
smol body lol
so update on magic trick:
the one big roadblock I have rn are retriggers
once I figure out proper retrigger calc that unifies joker retrigger api with vanilla card retriggers, the only thing left before the first release would be patching the rest of calculate events into card area api
the only other roadblock is my cardarea api being a bit jank but that's more of a me problem
how would i be able to check if the player is playing a pair (its NOT for a joker)
i think ive figured it out? rn the only thing that im not really happy with is that unifying card retriggers and joker retriggers makes retrigger jokers unretriggerable, so i should probably code a recursive retrigger check
after that i'll just need to implement the new retrigger check into smods' calculate joker and the places where the game checks playing cards and i'd be practically done with the framework
looking to make something only happen if a card is retriggered
like specifically not the first trigger, only if its triggered more than once
patching whatever you want into/right beside the if reps[j] ~= 1 then in state_events.lua should do the trick
reps[j] ~= 1 in those places is "if not the first trigger"
does anyone have trouble with the add_joker function? i'm stuck working out why it doesnt work
anyone know a "if pair is played then" outside a joker? cuz i cannot get my head around it
is that a vanilla function?
Don't remember ever seeing it.
it's defined under common_events
it's used in like 5 places
it's used for debug spawning jokers and consumables and also seems some kind of sandbox thing
The only time it's actually used outside of debug is start_run for challenges.
Else is just debug commands and sandbox function.
also with the "balanced" text flashing on the screen when playing plasma, how do i change it to wil? just changeing "balanced" to anything else doesn't work?
guys i'm trying to make a voucher that is tarot merchant but for another type of cards but i'm confused when i look at the game code
found this and don't know if it's what i'm supposed to use
first value increases the rate
second is for display
if you encounter case like this, search for the voucher name in all folders
there should be a code piece which handles it
Ctrl+shift+F
okay thx
i'll come back to you if i find something (or if i don't)
okay found this
i'm looking at the wiki and i'm a bit lost
idk which function i should use, the same as the vanilla game ?
next step is to search where tarot_rate is being used
its always a bit of a rabbit hole
oh wait, you asked a different thing
there should be a method for redeeming voucher
oh okay thx
so if i want to put it with my own type i have to just replace the tarot_rate with [type]_rate ?
ok how do I open a menu?
I try running lua G.FUNCS.overlay_menu(create_UIBox_generic_options({ contents = {{ n = G.UIT.R, nodes = {create_tabs({ snap_to_nav = true, colour = G.C.BOOSTER, })} }} })) but it crashes with engine/moveable.lua:278: attempt to index local 'self' (a nil value)
well for that you search what tarot_rate actually does
¯_(ツ)_/¯
I think there's :align_to_main or something?
:align_to_major()
it's a variable
so it means i have to make mine
no like where it's being used
or where the parent table is being used
I assume steamodded might have pool shop rate setting somewhere
you can probably find how cryptid does it with their code vouchers
hm
ok so yeah
it's using consumable type lowercase name + _rate
in the G.GAME table
so if i make it the same way they did but while using the tarots values (which are the same but i don't want them (my cards) to start appear but appear more often) it should work right ?
overlay_menu seems to call this so I shouldn't, and also steamodded doesn't seem to use it so I'm not sure
the button seems to create it this way
wait I might be stupid
ok no
wait yes
forgot the object with deinition
return G.FUNCS.overlay_menu({
definition = create_UIBox_generic_options({
contents = {{
n = G.UIT.R,
nodes = {create_tabs({
snap_to_nav = true,
colour = G.C.BOOSTER
})}
}}
})
})
Thoughts
I think that's nice for auto updated code but idk how it will work for updating assets
you can manually reload assets rn
pressing M will do it
this is more purpose made cause you can't just reload any file without it breaking
it basically needs no side effects (or the ability to undo them when rerun) and the game is already loaded when it does it's thing
Ah nice
I know there was something that like crashed it when you tried to reload sometimes
Idk if that was a mod specific thing when reloading
Yeah this is probably more for testing specific stuff designed to be reloaded
I plan to make some modes for making a few things easier
most noteably, the ability to just do the tab thing, (like SMODS conifg_tab prop) and it renders the ui (instead of the crazy amount of code that it needs right now to do it)
I want to see if I can reload jokers mid game, but I doubt SMODS will play nice
Maybe I'll add a mode to watch a specific asset and reload when it's updated automatically
they might be too big to watch efficently
I can't use filesystem events to check for modififcation so I'm just constantly reading the file and comparing
welp figured it out, steamodded prepended something to the front of the joker key i gave it, so add_joker couldn't find the joker in P_CENTERS when i tried to reference it
so instead of j_snoresville_joker_name it became j_snor_j_snoresville_joker_name
exciting.
Yeah it's the first 4 letters of your mod name
I think to fix it you have to give it a prefix or just use j_snor
I'll have to evolve with the times ig
Wait, give it a prefix? How do I do that?
It's in your mod header
lemme grab an example
--- PREFIX: example```
you would add PREFIX: into your header and then whatever you want the prefix to be.
ie
--- PREFIX: snore
then that makes your jokers j_snore_joker_name
Excellent, thanks
hey I'm trying to have it so my Joker mod take played Heart cards, how do i call for the suit of the cards?
make sure they have diffrent ids?
Just an example
today I learned that fractional atlas pos values work completely normally
maybe for a cool animation
also interesting for placeholder sprites, which is where I saw them being used
I need help understanding an error I got when trying to put in the mod I was working on
never mind, found the stupid error
incredible
cryptid in 2027
real
this will be cryptid in 2027
Ok, so I have this idea for a mod that gives specific jokers propper backs (for effects like the acorn).
and I have all the sprites for ir already made.
I have never made a balatro mod before, so my question is, how do i setup whatever i need to make mods, and what do i do to have the backs be replaced wiht this. (I assume the code would be as simple as checking if the joker is one of the specials, if it's flipped, and what deck is used)
You’re probably going to have to hook Card:set_sprites to change the sprite used by the back of the card
been thinking about how to make balatro utilize more memory because of how greedy retriggers can get
all i can really imagine is storing the data using the C memory functions, but idk how you're going to do that with lua data structs (like how do you store a lua function in C and then load it back into lua from that)
and i don't even know C so 
ffi apparently makes it easy but w/e
i just can't be bothered so if anybody else has any ideas
i literaly have no idea what you are talking about, i dont even know what softwarte to use to make mods
mods can be made using anything that can edit text files
so even the basic windows notepad can do the job
although a more specialized tool is preferred
i use vsc with a few extensions
i use notepad++
i use vscode, 🤷♂️
i only got one, which extentions do you use?
I used notepad++ until I accidentally copy-pasted what was basically a 0-width space and broke my code which took me about 1-1.5 hours to figure out. Switched to VS code after that for editing, but still use notepad++ to search through the game files.
i still use vscode for the gamefiles, just opening them using winrar :)
mainly luals and the one for love
well
actually idk
i think i installed a modified version of luals that's meant for love
hmm alrighto's
pairs is an iterator function
k is the index v is the value, but you can set those to anything you want
e.g. for ind, val in pairs(blahblahtable) do
okay thx it's a bit clearer now
btw what i'm trying to do is basically ectoplasm without the -1 hand size (not really but you get the idea)
huh ?
huh
ok so
a table is organized like so:
{
a = 1,
b = 3,
ll = "hello"
}
using a for loop with pairs, you can loop through and go through whatever code you put inside that for loop with k and v representing every key/value pair in the table
so like, k will be "a", v would be 1, it'd run through the code, then it'll go back, k becomes "b", v becomes 3, runs through the code again, etc
Why don’t you search the files through vscode ?
oh okay thx
cause I don't have the game files open in VScode
If you slide your mod folder into VSC it will show you all the files/folders inside
my balatro workspace in vscode is so chaotic
i even close all tabs when i am done 💀
I tend to go with just my mods folder because lovely dumps are most of what I need
lovely when there's a file that's unmodified or I accidentally edit the dump and I lose my changes
;-;
I noticed bunco doesn't have a defined prefix
or if it does I wouldn't know
if I wanted to reference an edition from bunco
let's say glitter for example
if the key for glitter was just glitter (haven't checked)
would I do either:
bunco_glitter
or
glitter
because it doesn't have a prefix?
if there's no defined, it'd the first four characters from the id
so e_bunc_glitter
bunc_glitter
ah kk
is the e_ needed?
I have been doing for example
cry_astral
it's for the edition
just fine
AH ok
yee ok so I've been doing something to trim that
and I forgot

it's usually formatted as [item type]_[mod id]_[original key]
👍 thanks both of you ^-^
oh yeah I added the e because you were mentioning the edition
please don't tell me you're using thunks cursed way of set_edition
Nah lol I'm not
What i'm doing right now is setting up a table for a consumable that randomizes the edition of a random joker and I'm trying to add support for cryptid and bunco lol
you only need specific editions rather than all?
Yee, I have a few editions I don't want being used
Negative being one of them for example
fair enough
for soul_rate that is just rate at which it appears in the spectral packs right?
and if so is 1 the default rate of everything (except The Soul)?
with lower number being lower chance and cap being 1?
or wai tsomeone said it's 0.3%
is default
In addition, how do I get my editions to appear naturally? I don't think they are.
how does one avoid this w/o hardcoding in specific vars
Loc_vars?
how do i get them for info_queue
What are you trying to do?
I need to do true random now and I do not know how to do that :V
the idea is that the info_queue is for the item that unlocks other items and the info_queue shows the description of the item it will unlock upon use
for balatroAP
almost anything can end up there, which is why im trying to find a solution that isn't just hardcoding specific_vars
what I'm thinking I could do: check if the card has a loc_vars - if it does, create a copy, run the loc_vars on it then remove - otherwise fallback to a function that mimics vanilla's ui table chunk
Is there anywhere that has documentation?
like for an edition, what is normal weight
is a higher or lower number more common
Higher = more common
I've decided that this is a problem for future me to solve as balatroAP already has enough new features for now
cryptid does this by hardcoding the config values
(mostly because of misprint magic I thi)
Is 1 the normal weight?
1 means its guaranteed iirc
so 2 would be more than guaranteed?
Confused on how higher works then
or do you mean
0-1 range
cause I saw someone have 6 on their weight
also I've kinda been brute forcing stuff, is there a good way to debug stuff? like spawning things on command etc.?
:v
I got it from the github lol there's no instructions on it
So I was kinda just going maybe it's `
or /
lol
Lul nope
only mentions how to open the console with /
and shift + / for log previews
for editions / booster packs / whatever other weighted pools, the meaning of a weight depends fully on the other weights (it's a literal weight). soul_rate is a fixed chance of replacing any one eligible item in a booster pack. For that one, 0 is never and 1 is guaranteed
kk, and for weights it's just relative to existing. Is there documentation on all pre-existing weights for editions?
I don't think it's been added to the edition docs. Not at my PC but I'll check one sec
Where are the docs I've been kinda flying blind
foil, holo, poly and negative are 20, 14, 3, 3 respectively
docs are at https://github.com/Steamopollys/Steamodded/wiki
<3
Yeah was going to say it should be in the edition docs
They have a base 4% chance of appearing, weighted accordingly, but you can modify the weight using the get_weight function if you want it to vary throughout the game, this will extend outside of the 4% range
yeah it's in the docs, I just wasn't sure if it was
hmm hermit seems to bug the hell out if you give it editions that modify it's numbers
lol
Seems to blanket modify every hermit for having 1 hermit edition'd
Ight cool
that'd be the edition's implementation's fault
That would be cryptid + jens lol
Yeah oversaturated when put on hermit makes all hermits function as $40 max
(glitched also has the same issue)
i'mma report that rq
ye thats basically what i plan to do
modding compat layer (mostly for futureproofing), then hardcode config values
When I was thinking about weights I often thought poly was 1 
Might need to tweak some values then
why is learning C easier than compiling C
its literally C youd think after what 50 years i wouldnt have to build a compiler myself
Well, adding "Cash out" button keybind is a little bit trickier task than I expect 
yeah im pretty sure that specific button you just like.. cant hit
G.FUNCS.cash_out({config = {}}) works, but it crashes if you call it when the cashout button isnt already there on the screen
If you call this function before event sets round money then money will be desynced
can't you make it an event that only calls the cash out when the button exists?
iirc events loop until returning true
I want to make complete cash out stage skip now
the issue is that theres apparently no way to check if the button exists
i tried for like 2 hours
actually yes
just pcall the function
or check what it does inside and that might help, but this is easiest
Button has id actually, but it can't be selected by get_UIE_by_ID somewhat
^
again refer to what the cash out function does if you want to do it properly, else just pcall it
My plan is:
- check is button present
- if yes, just call cash out function
- if not, skip stage completely, set money properly, cash out and go to shop
what does that mean?
if G.STATE == G.STATES.ROUND_EVAL and G.round_eval then
if G.GAME.current_round.dollars >= 1 then
G.FUNCS.cash_out({config = {}})
G.GAME.current_round.dollars = 0
end
end
this is what i did
maybe it works
maybe it doesn't
... but?
yeah idk why that doesnt work
It always nil
could that be because it's being created only after trying to find it?
it's in an event with a delay of 0.5
i remember running a script that checked every single \get_UIE_by_id function to see if any of them had a cash_out_button and i think 2 of them did
which is so weird
that is kinda weird actually
it would happen even after button is already there, and you use a keybind to find it
I wait until full eval stage, and press keybind. No button found
is that even how major works?
doesn't it need to be G.round_eval = UIBox{...} for that?
last time I used UI code major was basically only alignment stuff
major is basically parent
Commented code adds UIBox as a parent so it will work
But for some unknown reason he made it like this
I get that, but if the parent doesn't know of its child's existence, you can't find it using get_UIE_by_id
oh I see
didnt realise commented code
actually
it seems to be like it wasn't going to do that
the code just creates UIBox
that isnt stored anywhere
so unless UIBox does some magic to make the parent aware of its child (I couldnt find anything in my quick search)
but still exists in memory and gets displayed... maybe try and find the code that removes this element again? 🤔
I think its removed through the cashout function?
the button passes itself to the cash out function when you press it
nvm actually
it's not being used anywhere
the passed value
nvm
it does
only this 1 line
it almost is, but it's not reeeally used for anything
and basically impossible to access from the outside...
which is why just doing G.FUNCS.cash_out({config={}}) works
real..
doesnt that keep the button, though?
nope
button removes itself when you press it iirc
doesn't that result in a visual glitch, or at least a memory leak? 🤔
it hasn't ever caused any issues for me
point is to use hotkey to not press it
Wait. Actually, we don't need this button. We need to check is this button created or not.
oh good point that's weird
normally when i call that code the button does destroy itself
rly?
yeah
is it possible that it is actually inside round_eval somewhere
and cash_out would set round_eval to nil which would kill the button?
it's possible that this crashes if you hit the button in the 0.5 seconds that G.round_eval exists and the button doesn't btw
but I assume it didn't cash out everything
well if it works it works
after all you can always just... not press the keybind unless the button is already there
actually
explain that to the user 😭
why not just check if the event queue is empty
New plan:
- When
add_round_eval_rowcalled, we setG.GAME.current_round.dollarsimmidiately, not waiting event. - If keybind pressed before button is created, we speed up game by x100, and complete cash out stage, then set speed to normal
- After button creating, set
is_cashout_button_created = trueglobally - If keybind pressed after button is created, just call cash out function as normal
it's never empty
oh
I guess you can check 1+
ye
but what if some mod adds something that also adds an event like that
not very robust
true
you could hook add_round_eval_row and add a custom event that only fires after?
oh yea I managed to get a crash
needed to press much earlier
unless this function gets called multiple times, then you'd probably want to hook the function that calls add_round_eval_row
this is what I had to do for my code
G.E_MANAGER:add_event(Event({
delay = 0.01, -- because Events suck
blockable = true,
trigger = 'after',
func = function()
...
return true
end
}))
how did you even manage that?!
You don't want to know
that's so weird lol
does it also look good when not skipping animations/on lower speed?
On lower speed works fine
With skip animation i'll check rn
With unsafe works fine
Yea, all looks cool
4 patches for cash out button omg
And 3 patches for all other part of mod

Correction: 5 patches. Because I also need to prevent button to work when skipped
how does the soul pos thingy work?
cus im tryna use it for an enhancement on a card
and no luck :(
I think? it's only supported on jokers by default?
I know cryptid has a consumable that has a soul sprite, but I'm assuming they had to patch stuff for that
im looking at the lovely dump, and technically it should just work
from card:draw
the big IF statement there checks if center has soul_pos
if self.edition or self.seal or self.ability.eternal or self.ability.rental or self.ability.perishable or self.sticker or self.ability.set == 'Spectral' or self.debuff or self.greyed or self.ability.name == 'The Soul' or self.ability.set == 'Voucher' or self.ability.set == 'Booster' or self.config.center.soul_pos or self.config.center.demo then
incredible
I always wonder why check for that and then still have each check separately inside of it
it's basically 😭
if condition1 or condition2 then
if condition 1 and ... then
do smth
end
if condition 2 and ... then
do smth
end
end```
thunk moment
because cryptid already patched that line i just wrote my overlays below everything
yeah thats what i mean, i assumed that was enough?
¯_(ツ)_/¯
wait
debug
i think i might have been silly
no nvm i wasn't
okay
this should be displaying one of two things, an ace of hearts, or a question mark
and its using the correct atlas
and soul pos is there
soul_pos is taken from the enhanced card's center
would the enhancement not be the center?
yeah enhancement would be the center theoretically
what is the difference
this feels like a it was different at one point but was changed
oh i saw this one once
wasn't experienced enough yet so i spent a while trying to figure out wtf was different
hey! uh idk if this is the right channel but i want to make a Balatro mod but i've literally never before, is there a good starting point like a guide or something anywhere or do i just need to try and figure out what the other mods do right and then f around and find out from there?
reading the steamodded wiki will let you know some of the things you can do (it's not complete so if you have questions feel free to ask) and looking at some parts of the games source code is useful. other mods are also a good resource to see how they do similar things to what you are trying to do
alr, thx!
ok i have a working balatro mod now
it's barebones (as in literally just the mod options) but it works
you started with the options page?
yea
ik this is a dumb question but how do i set a custom icon?
i went through all of talisman's .lua code (it's the smallest mod with an icon i know) and didn't notice anything relating to it
iirc it's an atlas with key = 'modicon'
alr, i'll try that
...although i have no clue what an atlas is but whatever
time to find out what those are
Atlas are used to refer to a spritesheet so that other SMOD object can refer to it with atlas, picking the corresponding sprite with pos
crap just realized why the bones are there
i used the cryptid icon as a base bc of icon size
welp time to edit it
new icon les go
polished the sprite generally and reworked the bones
in case you're wondering what i'm gonna use this critter for, that's a good question
idk the answer
how can one make it so a joker can onyl destroy certin consumable cards
What compressor should you use to decompress and compress the game exe?
you can just use 7zip to open the game files
you can also "drag them back in" using 7zip
ok
if you want a programmatic way to do it, I have no clue
winrar also worked for me
Here's its effect (I just changed it)
Love this
You could take ownership of specific consumable cards’ sell button “func”— that checks if the button can be clicked, add check if you own a specific joker etc
i feel like there's a disconnect between the question and the answer
additive or multiplicative
also how do i fix
Is it possible to contact someone on Github? I cannot find them on the Balatro discord or anywhere else.
If it's related to a project, making an issue is possible. Otherwise, they might use their email in their commits and you can try that
The repo doesn't show an Issue tab, I'll see if I can find a commit of theirs
Yeah you can git clone the repo and then check the git log
Thing is... their repo is a fork of mine, and they haven't done anything on it.
Who's the user?
From: Lyn <101982826+Lynekiboo@users.noreply.github.com>
seems like they have their email hidden
So I guess it's rip
I mean, seems like they want to translate it into french?
Yes, but i'm scared they'll just put everything 1:1 into french rather than using a localization method, wasting energy
I don't know how's their knowledge of balatro modding
well your localization.lua does not exactly support multiple languages
True, that I want to tell to them too, say I'd help them and update the localization of the mod
guys i need some help, this used to work and now it doesn't and i'm pretty sure it's the regex
(and i'm injecting here)
I don't think you should be escaping the regex terms?
what ?
why do you have \\s+
maybe it was a really old version of lovely?
I'm pretty sure you don't escape regex sequences in the latest version
lovely updated ?
last update was like 3 months ago idk
oh so no it's still is the same version :/
it's not lovely's fault
don't escape your regex sequences
no \\ unless you're looking for a backslash
use https://regex101.com/ and select the Rust flavour if you want to test it out
i forgot how to use the site
what does that even mean
i'm bad at regex, and i don't understand how this stupid website works
just replace all the \\ with a \ on the pattern line and you're probably good
i'm pretty everything isn't supposed to turn bright red
it's for bl_kais_hatchet
[[patches]]
[patches.regex]
target = 'functions/state_events.lua'
pattern = '''
(?<indent>[\t ]*)for i=1, #G\.jokers\.cards do
[\t ]*--calculate the joker after hand played effects
[\t ]*local effects = eval_card\(G\.jokers\.cards\[i\], \{cardarea = G\.jokers, full_hand = G\.play\.cards, scoring_hand = scoring_hand, scoring_name = text, poker_hands = poker_hands, after = true\}\)
[\t ]*if effects\.jokers then
[\t ]*card_eval_status_text\(G\.jokers\.cards\[i\], 'jokers', nil, percent, nil, effects\.jokers\)
[\t ]*percent = percent \+ percent_delta
[\t ]*end
[\t ]*end'''
position = 'after'
line_prepend = '$indent'
payload = '''
-- your code
'''```
not sure why are you using \s
both that and \n are not necessary as they make the pattern unreadable
this is the game code your patch is trying to replace
so you just copy that
i don't want to replace it i want to inject after that
this is just useful to quickly confirm it works, without having to start up the game every time
i still need help 'cause regex is clearly not for me
i give up i understand literally nothing and nothing works too
it just annoys me
thx for your help guys tho
dont say that, lol
it's not that complicated, you just need to take like 1-2 hours to look into how it works
try this one instead?
[[patches]]
[patches.regex]
target = 'functions/state_events.lua'
pattern = '''
(?<indent>[\t ]*)for i=1, #G\.jokers\.cards do
[\t ]*--calculate the joker after hand played effects
[\t ]*local effects = eval_card\(G\.jokers\.cards\[i\], \{cardarea = G\.jokers, full_hand = G\.play\.cards, scoring_hand = scoring_hand, scoring_name = text, poker_hands = poker_hands, after = true, callback = function\(card, ret\) effects = \{jokers = ret\}
[\t ]*if effects\.jokers then
[\t ]*card_eval_status_text\(card, 'jokers', nil, percent, nil, effects\.jokers\)
[\t ]*percent = percent \+ percent_delta
[\t ]*end
[\t ]*end
[\n\t ]*\}\) end'''
position = 'after'
payload = '''--test'''
I read a very good regex explanation but it's in my native language so I can't really recommend it
what's your native language ?
oh yeah can't read that
gonna try
i can only read two things english and french
huh
at least the --test is here
oh wait
wow I hate the lovely that modifies this part
I modified my regex, can you try again @bitter sand?
test isn't there
it is
but it doesn't append the --test anymore?
yup
(i have some other mods so it's 400 lines further)
(and i tried without the other mods, still no test)
could you copy and paste that for me? 🤔
the code ?
the dump you just took a screenshot of yes
for i=1, #G.jokers.cards do
--calculate the joker after hand played effects
local effects = eval_card(G.jokers.cards[i], {cardarea = G.jokers, full_hand = G.play.cards, scoring_hand = scoring_hand, scoring_name = text, poker_hands = poker_hands, after = true, callback = function(card, ret) effects = {jokers = ret}
if effects.jokers then
card_eval_status_text(card, 'jokers', nil, percent, nil, effects.jokers)
percent = percent + percent_delta
end
end
... that's a match
I'm assuming you already double checked whether you correctly copy-pasted the code I edited?
oof
we never know
you changed the message ?
yes
nothing
last thing I got is that your system is using some weird \n\r stuff
shouldnt matter unless its in the patch itself
you'd think so right
[[patches]]
[patches.regex]
target = 'functions/state_events.lua'
pattern = '''(?<indent>[\t ]*)for i=1, #G\.jokers\.cards do
[\t ]*--calculate the joker after hand played effects
[\t ]*local effects = eval_card\(G\.jokers\.cards\[i\], \{cardarea = G\.jokers, full_hand = G\.play\.cards, scoring_hand = scoring_hand, scoring_name = text, poker_hands = poker_hands, after = true, callback = function\(card, ret\) effects = \{jokers = ret\}
[\t ]*if effects\.jokers then
[\t ]*card_eval_status_text\(card, 'jokers', nil, percent, nil, effects\.jokers\)
[\t ]*percent = percent \+ percent_delta
[\t ]*end
[\t ]*end
\s*\}\) end'''
position = 'after'
payload = '''--test'''
try this one anyway
nothing
Weird. Dunno then, sorry
it's okay
here's the file I use in case you want to try
Also, you could consider inserting in a different spot instead? Lot less code to match in your regex
it's not gonna change anything ?
Possibly the timing of stuff, but I don't think by a lot. You'll have to try it out to see though
okay i'll try that later
does debugplus have a feature that can change the boss blind to whatever you pick because i dont wanna reroll for 10 years every time
yes
oh my bad i read it wrong sorry
💀
it does
oh really ?
how does one modify a joker sprite and hitbox to be smaller and centered? (like with square and half joker)
There is documentation of the code to create jokers?
just noticed it's the same place i injected Ivory Skull
i'm gonna try something
is this going to work or i forgot something ?
is there a way to make a joker that could edit the wheel of fortune (and only the wheel of fortune)'s odds or is the wheel/aura/ankh/[what was he thinking] code truly unrecoverable
okay now it works
steammodded has a example joker with usefull info on how to create a joker, use atlas, and have the joker does many different things (using base game jokers)
im trying to make a blind and i need to get the amount of points a hand will score
how can i do that
i am no real coder and i've personally haven't made a boss but all i could find is blind:disabled so maybe you could try to reverse engineer to will?
or you could have a look at how other's did it?
i tried to look at how cryptid did the tax but it was no help
maybe try a blind spesific mod?
like, i'd like to get rid of this large empty gap beneath this sprite here
the base code has hardcoded the square joker hitbox to be different and for it to render in the center so i can't do that unfortunately
You can set the scale of a Joker like Square Joker in set_ability, here's an example with one of mine
tyty
;o
i got it working, thanks a bunch!
I'm trying to do Lovely patches again (after I completely failed last time), and I'm trying to add a tracker of the previous hand's score. This is what I have right now.
version = "1.0.0"
dump_lua = true
priority = 0
# function Game:init_game_object()
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = '''last_tarot_planet = nil,'''
position = "after"
payload = '''prev_hand_score = 0,'''
match_indent = true
# G.FUNCS.evaulate_play = function(e)
[[patches]]
[patches.pattern]
target = "state_events.lua"
pattern = '''delay(0.8)'''
position = "after"
payload = '''G.GAME.prev_hand_score = hand_chips*mult'''
match_indent = true```
I have no idea if this is actually doing anything or not. When I try to call G.GAME.prev_hand_score, it gives me ERROR, which I assume means that it doesn't exist. What am I doing wrong?
how could I get the required chips for the current bind once a round starts?
G.GAME.blind.chips I think?
(there's also G.ARGS.score_intensity.required_score but you probably should not be using that)
why not? out of curiosity
Basically:
G.ARGS.score_intensity.required_scoreseems to always directly copy the value ofG.GAME.blind.chips, so changingrequired_scoredoes nothing, and will get overwritten by the value ofblind.chips- I don't really know what the time frame is for
G.ARGS.score_intensity.required_scoregetting defined or undefined - it might not exist when you want it to, or still exist when you don't expect it to
So why did I mention it? Dunno, thought it was interesting. I had to use it recently to change the intensity of the flames when you reach the required score
oh cool, thanks :)
is there a way to figure out how long it will take for the animations of counting up a hand's score will take? I'm trying to scale up a number over that whole sequence. is there a way to do this? like with an ease event maybe?
DebugPlus can track the number of events in the scoring queue, how that works might be helpful for you
also sort of depends on if you want it to be real seconds time-based or trigger based?
what is that?
Balanced
so your goal in Tainted Green Deck is to spend as less as possible? interesting
would Rebate just not work for TBlack Deck?
these look very fun
i have a pretty complicated idea and im not sure what the best way to approach it would be
i want to make a mod that generates new random jokers when you open a special pack, like random name and effect and everything
i cant tell if its better to have it be one joker that's given random stuff after its created or to try and generate new jokers every time its necessary
ive tried both and ran into different problems
what do people here think
namely if its one joker i cant figure out how to change its text and function after it's been created, and declaring a joker within a function to make multiple jokers just doesnt seem to work
using steamodded btw
You could move it to your scoring slot during a discard if you want that money
But otherwise just store it in utility
Is it possible to differentiate whether a joker card is hovered in the joker card area or collection?
I'm gonna try an area check
Yea that worked
its possible but checking for specifically collection is annoying
G.your_collection isnt a card area but rather a set of card areas
but i would advise against checking for specifically G.jokers because \('v')/
me when I have jokers in G.consumeables
me when I have jokers in my deck (I don't know the game code version)
:)
that's right
that's what i can get behind
deck is specifically the cards that you havent drawn or played yet
G.jokers - jokers
G.consumeables - consumables
G.hand - held cards
G.play - played cards
G.deck - remaining deck
G.discard - discarded cards
there's also G.playing_cards but its not an actual card area, but rather just the list of all playing cards (so everything in hand, play, deck and discard)
my beloved
Should have won the Jolly Open to make Math work on consumable joker calculation 
i understood some of the words that you said
currently have a mod that makes math work on stuff outside of G.jokers but it unintentionally turned into retrigger api rewrite the mod so atm im stumped at one retrigger thing but once i get that sorted i should be able to get it out
Math is the main developer of cryptid
Jolly Open is a cryptid contest where the person with the highest score could add something to cryptid (I think)
making math work outside of G.jokers is the easy part and if it werent for my huge ego pushing for the more ambitious implementations i'd have it out weeks ago
like the only parts hard about getting math outside of G.jokers are 1) its tedious 2) it requires mods to bend themselves to support it if they do any of their own math
the moment that got me stumped is that i have a retrigger calc function and now i need to translate a tree of nested joker_repeatitions into a thunk-like reps (or just a way to read it recursively w/o hardcoding it into having a specific depth)
hope this infographic explains what im dealing with here atm
you're trying to get the number of nodes from a tree?
i could just accept that card retriggers become unretriggerable as a result of retrigger unification but there's no fun in that
not really a number but rather a list and not just a list but a list accurately describing the retrigger order
so like hanging chad that has a red seal would generate a list like
[effect -> hanging chad -> hanging chad -> (red seal) hanging chad -> hanging chad]
this specific list isnt that hard to make real but i want a solution that would theoretically handle any depth of retrigger checks
probably needs to be recursive
ye atm what i have is already recursive, i just need to figure out how to translate it from a tree to a list
or something fun with a stack, but I've always preferred recursion
perhaps i could make it so instead of returning a tree the retrigger calc already returns a list so when the function receives a list it just has to create its own list based on the lists it has
so something like this?

Sir, sir, more discards please!
wait
this is me testing for adding decks as possible retriggerer sources (need to figure out the text when the deck is empty) but what about a joker that retriggers the deck effect
sell this joker to get ✨ triple tag ✨
i mean that's how a retrigerred card effect from the deck would look like if there was an effect happening there
in vanilla it would be displayed at the bottom but im working on all the weird stuff to look more or less correct
Imagine a card that retriggers abilities in hand but also in the deck 😄
might need to tweak the scale a bit but i got it to work
:)
need to figure out how to portray discard effects and then it'll all be awesome
perhaps i could draw the discard effect message above the deck but offset enough to where its obvious that its not from the deck
although idk how i should handle deck/discard calc
solution A) i code deck/discard calcs as separate contexts, severely limiting their potential
solution B) i code deck/discard as a part of the general calculate_joker/eval_card but make the calc fail if the card's center doesn't have a specific flag/function to check compatibility with deck/discard calcs, which would make this mod even more unoptimized
i think i'll go with option B because it's just more fun
how would i be able to check for the ante? this looks like it would work but it doesn't? even if i put the 8 between ' '?
G.GAME.round_resets.ante
hmm thanks
G.GAME.round_resets.ante >= G.GAME.win_ante
if you're trying to find out if the player on/after the final ante, you should check against g.game.win_ante because the final ante is a variable
Does main_end only contains one line or I'm missing something in my nodes?
need to be in two separate row nodes
Like main_end = {...},{...} ?
n = G.UIT.R, ...
does regex allow midline patching? i can't recall if it does or not
next question xd, how does the game select the showdown?
find the get_new_boss function
huh? from what game file? blinds doesn't have it 🤔
ye
that's usually what u use regex for
either mid line patching or multi line patching
functions/common_events
you should probably figure out a way to search through all gamefiles at once, both notepad++ and vs-code can do it
hmm
ty
there's no way to hide a button inside UIBox automatically?
like UIBox has func in definition to hide itself, but if I try to add func to a button, it crashes on code in engine/ui.lua that tries to get G.FUNCS[<func>]
is there a context for a boss blind function that triggers after all jokers are finished scoring but before score is added up and added to round score
basically plasma deck's trigger?
pretty much
I vaguely recall someone asking a very similar question recently, unless that was you 🤔
anyway, I don't think one currently exists - should be very easy to make one though
ur using UIBox_button?
How would I even go about doing that
yeah
I have UIBox that disappears on setting1 toggle
and inside UIBox I have 4 nodes, 2 of which I want to disappear on setting2 toggle
didn't manage to figure it out so I just released without option to hide 2 button nodes
the only reasonable solution to this is to remove UIBox and create it again with buttons (that's what I do for zoom slider), but I cba, since it has to be inside config menu from a toggle option
Can’t u just use the button property of a regular node?
You can use func property inside of that.
that's what I do for slider yeah
I basically have option to toggle those buttons
and I want to have an option that will toggle Show/Hide buttons
The back button in galdur toggles off on the first page, perhaps they might help as a reference?
maybe if I feel like this is worth the effort (as in someone actually needs this)
so far I only wanted to add this since it seemed useful
but I personally would just have those always on. I don't see why would I have zoom without other visibility options
I'm new to modding and I have (attempted) to make a joker that gives *4 mult if the played hand has all enhanced cards.
The joker exists, but does not give mult (ever)
Any ideas??
if context.joker_main then
local add_xmult = true
for k, v in ipairs(context.scoring_hand) do
if v.ability.effect ~= nil then
add_xmult = false
end
end
if add_xmult then
return {
message = localize{type='variable', key='a_xmult',vars = {card.ability.extra.xmult}},
Xmult_mod = card.ability.extra.xmult,
card = card
}
end
end
end```
Each card has an ability effect no matter what, try checking if ~= "Base" instead
if you would like to change all small & big blinds into BOSS blinds now you can 🤷♂️ https://github.com/Minirebel/blindboss
thats it cya now
Also it should probably be ...effect == "Base" so that if there's one non-enhanced card it will be false
that worked, thank you
root_capture:
(you can set root_capture as a named capture group and with at position it will replace that capture)
I assume that's all you'd need?
When i use my mod in the game the text says what I want it to (being '100 mult') but when the Joker gets played it give Xnil Mult, how would i fix this
can you show your jokers calculate function
calculate = function(self, card, context)
if context.joker_main then
return {
Xmult_mod = card.ability.extra.Xmult,
message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xmult } }
}
end
end
strange, codewise it all checks out
can you send the code for your entire joker?
also if you use 3 ` before and after your messages its a bit easier to read
its the key above tab
if you changed the code for your joker to have Xmult in the config after that run was started
then starting a new run should fix it
provided everything else works
do you have a config for it?
there should be something like this with your joker
but with Xmult instead of the things inside the extra
I think math changed them to work that way when retrigger API was merged but I haven’t looked at them properly since that
I know that before that, outside of the supported config options you just had to manually do everything
Edition calc died in better calc
i just went the patching route for now
tried to see how other mods did it and theyre using patching
how could i check if for example if the hook is active?
print something
?
also mine for not making it clear :>
do you probably check the name/key of the blind
idk why i phrased it like that lol
you can probably do that
but0 idk how to check the name or key ._. thats kinda the deeper question lol
i tried somethings like this
wait
i think i found smth-
nvm
I don’t think you want to be hooking get type for that
oh- okays
You want the function that sets the blind
this one?
That would be it yeah
Hook it, check what blind is being set and change the colours accordingly
👍
Also for reference you don’t need rgba values for your colours, use the HEX formula that’s in the files
Well the game will convert a hex code for you without any jank rounding that’ll change the colour slightly
i mean i think i'd rather have it like this so i can also have the opacity changed
feels like it should work
is this patch a must to enable cards to give negative mult🤔
i think other mods have such cards
why not test?
this patch works but maybe there's a more elegant way
hmm alr, wel i am not ya guy for that srry
smth keeps going wrong with the if
This might be a stupid question but is there a way to reload the game to see the changes I make to the code without having to restart it every time
uhhh wait is negative mult a cryptid thing???
if true then
simple
no talismancompat is my function 
Isn’t negative mult supported by default?
no vanilla eval_card only assigns ret.mult if get_chip_mult > 0. and vanilla game doesn't have permanent mult as there is only perma_bonus but no perma_mult in vanilla card.ability
Oh is this for a hiker type effect?
yeah
turned out i didn;t have to hook anything- just add G.GAME.blind.name == "..." as a IF
is there a function like modify_hand that triggers after all the cards and joker effects got triggered and if there isnt can i make one
at this point it should probably be incorporated into steamodded lmao
too many people asking for it
so i have to make one myself?
