#💻・modding-dev
1 messages · Page 574 of 1
apparently bepis made a progress bar at some point, i could use that as reference
what I'm suggesting is that you pass the center and then on that other card you return the custom values when it detects it's on a tooltip
IT WORKS
oh god what are you doing
this will be beautiful
-- In Sophie's loc_vars
info_queue[#info_queue+1] = G.P_CENTERS["j_elle_fallen"]
-- in Fallen Angel's loc_vars
if card.fake_card then
return { vars = { <custom vars > } }
end
return { vars = { <default vars> } }
holy fuck bepis is amazing
true
but
what
what
the custom vars are set by sophie
why does calling a function in context.check_enhancement with quantum enhancements on cause a stack overflow?
and also this is in a patch bc this is behaviour i want in all upgradeable cards
i did ask if they were global!
i think i misunderstood the question at that point mb
and
again
i've figured out those vars already
in the patch
i just need to get them to show on the thing
i dont understand what you mean by figured it out
is there a way to hide both of these fields?
if it's not showing then you didn't figure it out?
my guess is check enhancement is triggering itself maybe?
because some functions call get_enhancements
in the patch i was able to make the config.extra table with the correct values
wdym hide
usually hide means not show
you could set them to 0 and store the real value in another var?
or set the blind requirement to 9999999
so it doesnt accidentily win
that wouldn't work lol
well i assume theyre doing a guessing game gimmick
back to this though
like straight up just hide them so they don't appear, the values should stay the same but the UI itself shouldn't appear
or not draw them
what if you directly called the uh localization string for the card?
loc_vars has a card argument
i've been trying to do that
also i don't want the current card's loc vars
i want the target card's loc_vars
with my own context table fed into it
hmm
i'll see what i can do
i genuinely can't tell what's so hard to understand about this 😭
it's weird you can't pass the vars directly
hey i found something maybe
info_queue[#1116390750314307698_queue + 1] = {set = 'Other', key = 'generic_extra_slots', vars = { card.ability.extra_slots_used }}
from functions/common_events
yeah at least for the Other set you can pass vars directly
-# thank god for grep lol
are jokers under other?
no jokers are under Joker
ok nvm wait
🤯
yeah but that's not working for them it seems
you can set config for anything afaik
no i mean in this format
ooh
i tried it with a vanilla joker and could just fine there
so probably try like
info_queue[#1116390750314307698_queue + 1] = { set = 'Jokers', key = "j_elle_fallen", config = { increase = card.ability.extra.increase } }
maybe
ice said it's bc modded jokers don't have loc_vars hardcoded in like vanilla ones do
makes sensw
because lol
also what is P_CENTER_POOLS.Consumable? is that just every consumable or?
probably?
apparently it is damn
No, because it doesn't exist.
That's G.P_CENTER_POOLS.Consumeables
am i doing something wrong? im trying to check if the hand has cards that have a specific enhancement from a list
oh
its the exact same
oh
["key"] = ... is the exact same as key = ... in practice
sometimes you just need to do the first if something has special characters
i still reccomend the latter it looks cleaner
fair fair
What type of object is this?
joker
Remove the card area check.
and replace with what
Nothing.
oh
also what effect are you going for exactly
giving the respective chips, mult, xmult or cash based on enhancement
you probably want to have a local variable counting up how much chips and mult to give
and use return at the end to add those
also stone gives 50 chips, not 30
Also context.card doesn't exist in context.final_scoring_step.
ur current code is extremely confusing tbh
Of what card?
cards in hand
like it seems like if there is a card of one enhancement then it just never checks any other one
why are u early breaking
then use context.individual if its a held in hand effect
got it
So you want it to copy the effect of the enhancements on the cards in hand?
and context.cardarea == G.hand
honestly im very new to balatro modding, but not lua
right so
kinda
yeah
in the loop, just have it add the chips and mult to a local var
kk
at the end, return { chips = chips_accumulator, mult = mult_accumulator }
and itll add it to the hand score
the break is to check if the hand has an enhanced card
but i think i got it wrong
oh and how do i check for the card being checked during the context.individual
context.other_card
kty
smthing like this?
you really dont need canttrigger tbh
i dont think anything happens if you return a table of zeroes
actuallyyy
if its per card
you can just straight up return config.ability.extra.handfunction[k]
fun
can set_ability take a card object instead of a center?
actually it seems like it cant nvm
im mashing w as hard as i can and cards are not changing enhancement
what would i use instead to turn a card into another one though (not copy_card since its not an existing card)
What do you mean it's not an existing card?
actually
i think i might. be stupid
if i have a card in a local variable, it should get properly discarded with the local variable right?
or would i have to :remove() it
okay i've pasted over everything that was in the target's G.P_CENTERS, which you'd think would do the same as just putting in the G.P_CENTERS but it doesn't???
No, it would still be in G.I.CARD
i see
yeah it still doesnt work, showing the full code in case theres something wrong
couldnt you just do
for key, boost in pairs(card.ability.extra.playfunction) do
if SMODS.has_enhancement(context.other_card, key) then return boost
end
end```
ye
but
problem
its just
that the hand check
never triggers
not even the print worked
okay i seriously don't know what the problem is
would this be a working buff for ankh?
for k, v in pairs(deletable_jokers) do
if v ~= chosen_joker and v ~= chosen_joker.config.center.id then
v:start_dissolve(nil, _first_dissolve)
_first_dissolve = true
end
end
try setting vars? ig
instead of config
*as well as config
remember, not including config makes it crash
i've explained this a dozen times
oh
unsurprisingly, still nil
and the joker still doesnt work properly
context.individual and context.final_scoring_step are never called at the same time
just use a for loop over the held in hand cards
k
why is this happening
local scr = SMODS.current_mod
-- condition stuff...
G.FUNCS.overlay_menu{
definition = create_UIBox_generic_options{
back_func = "scr_go_back",
contents = {
{n = G.UIT.C, config = {align = "cm", padding = 0.1}, nodes = {
create_text_input{
prompt_text = "...",
max_length = 12,
all_caps = true,
ref_table = scr.config,
ref_value = "left_keybind",
align = "cm",
callback = function()
SMODS.save_mod_config(scr)
end
},
{n = G.UIT.C, config = {align = "cm", padding = 0.05}, nodes = {
{n = G.UIT.T, config = {text = "Enter Left Keybind", scale = 0.5, align="cm"}}
}},
{n = G.UIT.R, config = {align = "cm", padding = 0.05}, nodes = {
{n = G.UIT.T, config = {text = keybind_text[1], scale = 0.2, align = "cm"}},
}},
{n = G.UIT.R, config = {align = "cm", padding = 0.05}, nodes = {
{n = G.UIT.T, config = {text = keybind_text[2], scale = 0.2, align = "cm"}},
}},
{n = G.UIT.R, config = {align = "cm", padding = 0.05}, nodes = {
{n = G.UIT.T, config = {text = keybind_text[3], scale = 0.2, align = "cm"}},
}},
{n = G.UIT.R, config = {align = "cm", padding = 0.05}, nodes = {
{n = G.UIT.T, config = {text = keybind_text[4], scale = 0.2, align = "cm"}},
}}}
}
}
}
}
actually losing it
oh yeah keybind_text is the table with the text thats outside of the box
nvm I give up how do i just hide this entire hud
put the text entry and the enter left keybind text in a row node together
dont do that the option button is there 😭
what parts do you want to hide

im on my pc now so i can look
i'm trying to hide this entire portion, i've been digging into ui def but i couldnt find this exactly
uhhh
{n = G.UIT.R, config = {align = "cm", padding = 0.05}, nodes = {
{n = G.UIT.T, config = {text = "Enter "..key.." Keybind", scale = 0.5, align="cm"}},
{n = G.UIT.T, config = {text = keybind_text[1], scale = 0.2, align = "cm"}},
{n = G.UIT.T, config = {text = keybind_text[2], scale = 0.2, align = "cm"}},
{n = G.UIT.T, config = {text = keybind_text[3], scale = 0.2, align = "cm"}},
{n = G.UIT.T, config = {text = keybind_text[4], scale = 0.2, align = "cm"}},
}},
i dont think thats what i said
huh
ohhhh the text entry
A new issue has happened for me, here's my main.lus and recent crash log
ah
sorry i cant read lol
it's all defined in create_UIBox_HUD
I'd really appreciate any help! 🙂
yeah that worked thx
your smods is like 8 months old lmao
also your balatro is old
1304a 💀
It's the only one I have now, since I had ported it to mobile a while ago before my computer broke
lovely is also really old
did your smods see the dinosaurs go extinct
oh
rule 4

people never read modding rules 3 and 4, to find out more google modding rule 3 4
also same with 6 and 7, you should google balatro 67
Dang it.
good lord theres pingas
even if it wasnt for that i dont help with old balatro versions for piracy reasons
found, thank you N
i recommend searching for the localization keys when youre looking for some ui thing
how can i make a probability affected by oops all 6s
read the part about probability changes
damn
not long until message 575757
Yeah
By the way, has LocalThunk said anything about whether 1.1 will break compatibility with old mods?
It'll probably break all mods
fun
I don't care about probably or I think or anything like that, I care about whether LocalThunk himself said anything
its just that smods and some lovely patches might not work anymore and thats it
thunk hasnt interacted with modding at all from what i know so i doubt he said anything
Yea smods is what most mods depends on and im pretty sure it'll break smods.
He very much knows modding exists and doesn't want to interact with modding in order to not be accused of stealing an idea for an official update from a mod
But surely he can talk to the smods people and see what breaks and what doesn't?
he could but idk what he considers interacting with modding
is nominator and denominator fixed or can they be changed?
any change he makes to the code will likely break some lovely patch somewhere for someone
Rip all my mods
rip debugplus
John Debugplus will have to put in some work then
And John Smods
And probably John Penumbra? (Ruby)
does the context.result change everytime nominator and denominator are changed or does it need to be called manually
context.result is for an entirely different thing
thats for the outcome of probabilities
<@&1133519078540185692>
what's the difference between my copied table and the original
do the values in the copied table have the same names
they should
i dont understand, you cant use multiple variables to
well
assign multiple keys to a table
because
where do i return this, its inside of a joker
the starting 3 values are bc my version of the table doesn't work without a set, and then i was told that to add custom info_queue values i need to use either vars or specific_vars
this is for loc_vars
also if a function returns 2 things then yes you can do that
wdym
this isn't inside a table
wait
you can return local variables inside a table
is it called inside calculate??
no????
it's inside a patch
i literally JUST said its for loc_vars
no either??
im genuiely confused
this is for loc_vars
get_probability_vars is, believe it or not, for getting the probability variables
ill just add a normal nominator and denominator and call the chance thing every single calculate call
and change the loc var
everytime
_ _
no?
literally just
read what it says
are we talking about different things 😭
no wonder i'm confused
because i've been asking for help with this single thing for almost a full 24 hours and made zero progress
a little
it's a function that returns a table
how do i fire the function to get that table
the game does that for you when you hover the joker
thats how the functions inside cards work
you dont call them, the game does in certain situations
calculate doesnt use loc_vars
then. change it in card.ability via calculate
right
look at vanillaremade
loc_vars is just for the text
vanillaremade uses the probability functions
smthing like this?
yeah
but if you want that then sure ig
what are you actually trying to do
basically mimicking a lucky card effect
have you looked at how lucky card works in vanillaremade
context.result is for checking the results of other probability rolls lol
how could i utilise a gradient from SMODS.Gradient as a custom colour here?
SMODS.Gradients.modprefix_key
i'm losing motivation entirely this is genuinely mentally draining,, ,
like if my key for the gradient is GG_C_power, what do i have to use?
SMODS.Gradient.GG_C_power?
what is your mod prefix
GG
what is the exact key
i normally just add GG_ to my keys, so the key for that gradient is GG_C_power
that's handled automatically you don't have to
oh, so i just get rid of it and use SMODS.Gradient to use the gradient?
the main reason you set a mod prefix is so it can add it automatically
wait you weren't doing that already
yea the key was "GG_C_power" 😔
SMODS.Gradient is the function to make it
the person above said SMODS.Gradients
with an s
which is probably a table
yea i used that to build the gradient, but as far as i can tell, it doesnt really document how i could use it
but im pretty sure im missing some important detail here
the same way you'd use any other colour
i thought it was automatically added or is that a different table
in a description?
it is
im very lost 🙏
^
im using it to change the colour of the power scoring calc
{C:modprefix_gradient_key}
yea
so in calculate?
this part of SMODS.Scoring_Parameter colour = SMODS.Gradients.GG_C_power
that should work like that yes
i tried it earlier and it seem to be stuck on red
didnt you say earlier you messed up the key
SMODS.Gradient { key = "GG_C_power", colours = { mix_colours(G.C.PURPLE, G.C.RED, 0.25), mix_colours(G.C.PURPLE, G.C.BLUE, 0.25), cycle = 20, interpolation = "trig" } }
discord cant format geez
have you tried removing the prefix
uh, not yet
then its probably not going to work of course
you make multiline codeblocks
like this
```like this```
the prefix is automatically removed for most things but idk for gradients
oh
you shouldnt add the prefix manually anyway
the past hour has taught me that i don't know how to hide UI elements properly
yea its more of a personal preference since i dont really want it to clash with other mods in case it happens to have the same name
it wont because smods adds the prefix
and you can do this
```lua
--now it has lua syntax highlighting```
oh does it?
yes
alright
yes thats what we meant by SMODS automatically adds it
yea i was a bit lost
for things like jokers its j_modprefix_key
smods does remove it if you add it manually to not double it
but idk if thats true for gradients too
it doesnt seem to since i used the prefix as the key and for SMODS.Gradients
one to one
and it works in other places?
it seems to be fine with jokers
When referring to custom Rarity, Gradient, Consumable or Suit colours added by SMODS, the key must be prefixed with the mod prefix.
then why are we looking at the gradient code
im assuming that means you dont need it in the definition, only when referring to it
because i was originally planning to change the colour of the scoring parameter, just was asking how i could make that possible after creating a gradient
if you need it when referring to it that means it must be added automatically when its made, no?
what is mix_colours?
no
i understand but if it works somewhere else then the problem is in the scoring code
do you define the gradient before the scoring_parameter?
its a function that combines colours, i just happened to see it in the discussion of the smods beta update
could that be the problem?
yes
oh so does it output a solid color?
yes
yea i think
darn
i have a feeling that I might have to patch this
what do you need
alr i will rearrange the code and get rid of dupe prefixes
any idea how to get a color that has a solid gradient where the color changes across the box instead of being over time
yippee im not crazy
shaders? idk lol
can u apply a shader onto a text background??
you can apply shaders to anything, idk how easy it is
it seems to be crashing right now
code + crash pls
mix_colours() my beloathed
is it possible to make a joker dissable the leftmost joker?
Everything is possible with the magic of coding✨
What specifically do you not know/understand about that?
i don't know how to dissable a joker
Card.set_debuff(true)
but you'd have to check for when the leftmost joker changes
^
hmm ok let me try
and undebuff/redebuff it
try looking if theres a context for jokers being reordered
or just update it in context.before so it gets updated before scoring
that could work
then again... how would you un debuff the prev card
in this case how do I make the localize work with my own voucher
Ima check rq if it is in the vouchers set
without it messing with boss blind effects
i was thinking about that
SMODS.recalc_debuff(card)
so that just resets the debuff to what it would be if the boss was active?
v_modprefix_tradingpacks
replace "modprefix" with your mod's actual prefix
oh wait do I need to also add the huh mod identifier thing
yea
thisis pai n
so it's working basically perfectly, it just doesn't show the joker the X'd out but ig that's fine
just another quick question how to also get a joker's sell value?
ah well I did the changes with the prefix and even set the custom voucher's set to Voucher but it crashes - it is probably not able to find and create it
is there anything wrong with this code or do I have to do it the old way
thats the voucher btw
Am I allowed to talk about developing mods to make the game playable on small Linux handhelds? In the handheld space it's referred to as porting (which goes against rule 4), but it's more just optimizing the game to run and look better on basically a tiny potato computer.
linux is technically a pc operating system so i think thats allowed? it sounds like a similar situation to steam deck modding
yea that's essentially what it is
That's probably not the cause of the crash, but I think you need to set up separate localize functions inside loc_vars for each voucher you added to voucher. Like self.config.voucher[1]
yea it's not porting if it already ran on Linux in the first place. you're just modding the game in a similar manner to e.g. diet melee, with the express purpose of making it run better on low-spec hardware
-# yay
ima try
sounds good, i'll type my question then
For reference, this is how Vanilla Remade does it (check Zodiac Deck) https://github.com/nh6574/VanillaRemade/blob/main/src/backs.lua
uhh how would i modify the score with context.main_scoring_step? For example if i straight up just wanted to halve it
I also had forgotten the prefix in the loc_text for the voucher
ima attempt both (should fix the text hovering at least)
Can someone help me out? This Joker is crashing the game and I'm not actually sure why since I mostly copied bloodstone's code for this particular section. (denominator section)
key = 'rewindjoker',
loc_txt = {
name = 'Rewind Joker',
text = {
}
},
rarity = 3,
cost = 10,
atlas = 'Jokers',
pos = { x = 0, y = 0 },
blueprint_compat = true,
perishable_compat = true,
eternal_compat = true,
config = { extra = { repetitions = 1, odds = 2 } },
loc_vars = function(self, info_queue, card)
local numerator, denominator = SMODS.get_probability_vars(card, 1, card.ability.extra.odds)
return { vars = { numerator, denominator, card.ability.extra.odds } }
end,
calculate = function(self, card, context)
if context.repetition and context.cardarea == G.play then
if next(SMODS.get_enhancements(context.other_card)) and SMODS.pseudorandom_probability(card, 1, card.ability.extra.odds) then
return {
message = "Rewind!",
repetitions = card.ability.extra.repetitions
}
end
end
end
}```
nvm im stupid i figured it out
Is there a way to make a card have two suits at the same time? Like hearts and spades or diamonds and clubs on one card
Your pseudorandom_probability call is missing the seed. It can be any string you want, but it is required to at least exist for the function to work.
SMODS.pseudorandom_probability(card, "Your Seed Here", 1, card.ability.extra.odds)
I've been making a mod and using patches to make the game look and run better on small Linux handhelds. one issue I've noticed though is that text seems to not have any anti-aliasing, which makes small text very hard to read. i've tried applying setDefaultFilter and setFilter to linear as much as I could, and while it works for most images (blind icon and cards were noticably more blurry), the text was still aliasing. I found out that a lot of text is rendered through Balatro's DynaText, which might have to do with it?
I also noticed if I set TILESIZE in globals.lua to a very low number, the text gets bigger and lower-resolution, and has clear blurring from its anti-aliasing. I'm wondering if perhaps something within this behavior is making the text render higher than it needs to? Even then though, wouldn't it still be anti-aliased when drawn on a small screen?
If anyone has any ideas of where to look or things to try, it'd be very much appreciated. Thanks!
probably because its the first line that checks a cards center
is it possible to get all the jokers created from a mod
and insert them into a pool after getting them
Something like this?
SMODS.get_probability(card, "DSTNY", 1, card.ability.extra.odds)
Loop through G.P_CENTER_POOLS.Joker and check the original_mod field in each of the cards
Sure.
will only work for cards already loaded though
I suppose it crashes me because of 'center' being corrupted when my mod's voucher is redeemed/created
idk why tho
kk
what does your voucher code look like
Yeah, it's still giving the error.
Wait, wait.
what
I just had to hover on it this time
alright i feel stupid now, how would I modify the final score in context.final_scoring_step
i thought i got it but nope
bump
Where is this located?
in lovely -> dump -> card.lua
like this? im calling it at the end of my jokers.lua file
wait
I haven't delved deep into that, but I don't think you can use "center" directly like that
if its your own mod then you should probably just manually do it
it is, im just too lazy to do it everytime 🤷♂️
Oh wait no. It's not "get_probablility". I was specifically talking about the line where you use pseudorandom_probability in your calculate function.
well the issue that I have is that I never called center at any point, I suppose that my voucher code somehow corrupts it
Are you trying to make half joker be normal sized?
no just a random deck giving 3 vouchers
bump2
Oh nvm, I misread it
Did you check card.lua directly from the Balatro code or after Steammodded modified it?
Because it could be pointing at a different line
By which I mean card.lua:279 might be a completely different line after Smods messes with it
It works, it's beautiful.
the main function is this one
actually
it has to be the voucher
I dont think it is anywhere else
as the error states 'center' specifically
It is, but by looking at which line is causing the crash in card.lua, it may shed light on what's wrong in the voucher
trying to make a deck skin. why does it want d_ranks? happens whenever i try to move over to the custom skin
But since Smods modifies card.lua, it adds and removes lines, so if you're checking card.lua directly from the balatro executable, it may give you something completely different
I think you can check the actual edited file inside the lovely folder?
well the voucher has this smods function could that be the issue
also yes I was checking the edited version
from the lovely folder
Ah. I see my mistake. Thank you, it works perfectly now.
It says that Palettes is supposed to be a list of tables. As in, it expects to have, for example palettes = {{key = "first palette"}, {key = "second palette"}, {"etc..."}}
This might mean even if you only have one palette in each deck skin, it still needs to be inside of palettes = {{}} instead of just palettes = {}
ohhhhhhh ok i see
You're welcome.
thank you. im a noob XD
bump3
unless youre trying to do smeared i dont know
No, I want a joker to "weld a spade" on played cards, meaning they're their original suit and spades
its only giving vanilla jokers
I think I found the issue so I attempted to just remove the table and keep it as one voucher that is the modded voucher and it works completely fine
ok i was looking at the wrong thing, how would i modify the score AFTER it gets totalled
I'm currently trying to make a joker turn into another one if a banana joker is picked up. It works if I copy the banana from my collection, but it doesn't work if I buy it in the shop. Is there something silly I'm doing wrong here?
if context.card_added and not context.blueprint then if next(SMODS.find_card("j_gros_michel")) or next(SMODS.find_card("j_cavendish")) then card:set_ability("j_badlatro_monk") return { message = "wawa" } end end
You mean the self.config.voucher was the issue?
its vouchers not voucher that I need
yes
what if you replace the "j_badlatro_monk" with G.P_CENTERS.j_badlatro_monk
aight thx Kiro for your help
Anyone know how I could do that?
Did you try using context.buying_card instead?
I want to trigger the change whenever the banana is added, even in packs, and I think card_added is supposed to do that?
This is answer in vremade wiki afaik
hook is_suit
use G.P_CENTER_POOLS, it'll have a subtable of all the jokers I think
still only works if I copy another banana in my joker slots with debugplus unfortunately
Is hooking similar to patching?
yes and no
what did i do wrong??
hooking is running your own code when a function runs
i believe j_modprefix_key
you take the original function and swap it out for your own function which is called instead
and then you run the original function you swapped out afterwards
oh
you can then run any code either before or after the original code runs
Try checking if context.card.config.center.key matches the keys you're checking for. That should be the card being added to your jokers.
same thing
Jimbo
Look in some examples, it should be easy
that seems to work, thank you!
You're welcome.
what are the "synonyms" of these values, if any (as in multiple names with the same effect)
im not sure then, modprefix and keys are case sensitive, only thing i did diffrently in a booster pack is return a table but iirc you can also return a card
x_chips xchips Xchips ?
How's making a shader guide going?
how would i find this
I’ve had some issues with life , i won’t be coding for a while
Vanilla remade readme links you to the wiki
its G.P_CENTER_POOLS.Joker
Oh, okay. Hope you're doing fine :)
Thanks man
i dont think there are any
oh
why does vanillaremade use Xmult for glass then and not x_mult
ohhh
its Xmult or x_mult
also what the fuck is t_chips and t_mult
yeah lol thats funny
surely not tetra chips
This code is crazy
t_mult is mult for like specific hand types or something like that
is that actually ever used
yes, by the hand type jokers
oh okay
what about h_size and d_size
are those just for jokers like juggler and drunkard
yeah
no
why would you want to
you can do a = b
that doesn't really do what i need it to
a = b and then b = nil would have the same effect i think
see the thing is
i don't know what the name of the thing I need to change it to is gonna be
What exactly are you trying to do?
What in the luajit2
I wanna make lists that contain the keys of every joker from each mod that adds them
but I want those lists to be named with the mod prefix
so the lists don't overlap with each other and make dupes
it'll work if I can append the mod prefix to the name of said list
That's already accounted for because every Joker's key already has its mod prefix appended to it.
wait whats repetitions, thats not used for anything right? unless theres something i cant think of rn
well no
but they're not split into separate tables
based on which mod they're in (i don't think)
how would I modify the score after it has already been totalled, if that's possible
yeah i cant find anything that uses it
how are you making the tables
secret 11th automatically triggered enhancement effect ⁉️ /j
Context.after?
going through G.P_CENTERS.Joker and getting the keys of every joker (only if they have a mod field, so this won't include vanillas) and getting the mod prefix out of them
i haven't actually done this yet cause without named lists to sort each mod group of jokers into I can't save the values in a robust manner that accounts for every possible mod
only thing i can think of that would use that is red seals
yeah nvm it's added by smods
context.after but put your code in an event which has blockable and blocking enabled
i forgot to reply to it
for seals i think
i dont understand why you cant save them to fields on the table with the modid
genuinely what could go wrong
Not sure how to influence the score directly is the thing, I'm trying to implement a mechanic for my boss that's similar to boss armor in other games. The equation itself should be relatively easy but I'm not sure how I can modify the score directly after chips and mult are done multiplying
ah
well I don't know how to save a table that has a string appended to its name
if I knew how to do that it would be easy
i wonder if it'll just let me concatenate
(it does not)
but I doubt it
i imagine vremade wouldve used it for red seals then though
also
seals arent centers
so that doesnt even work
hey wait a minute I added that
i mean like this
local joker_table = {}
for _, center in ipairs(G.P_CENTER_POOLS.Joker) do
if center.original_mod then
if not joker_table[center.original_mod.id] then
joker_table[center.original_mod.id] = {}
end
table.insert(joker_table[center.original_mod.id], center.key)
end
end
I think
what does it even do
OH
yeah no that would work
I forgot you can do that with the square brackets
ok
I'll try this after I eat but I also wanna ask how would I even modify the score in the first place? I tried looking around and I genuinely couldn't find anything for some reason
vremade wiki has answers for that :3
I don't know,,,
I added it together with perma_repetitions for permanent retriggers on specific playing cards
should've looked sooner
what in card_draw actually makes greyed/drawn cards render translucently in the deck view? i can't find it for some reason
repetitions is just for parity with other permanent effects
okay well then im going to guess and assume its like repetitions for enhancements
well it's retriggers
isn't G.GAME.chips the current total
retriggers on playing cards
you want the final hand score?
yes
the game adds it immediately, there's no intermediate step

get patching bucko
you need to modify hand_chips and/or mult or patch the part where it adds it
or well, maybe the score_parameter stuff has something for that
Get patching kiddo
this is quite random but I always feel like my mod will fall short in the end and when I spend 3 hours working on one feature I feel like I wasted them completely 
i figured it out, i was getting confused bc ranks aren't rendered translucently
they're rendered normally then with the greyed shader on top of them to give them the muted colours but not translucent
bumping this question of mine
is there a UIBox or something that's exactly the entire screen? i want to be able to draw some text in the top left corner of the screen regardless of menu transitions/whatever
I might take a look at how some boss blinds cap your hand's score, there's a chance I can implement my equation into that one way or another
honestly i might just change gears and try to draw it directly with love2d. i'm already futzing around with love2d shit for my final goal anyway
or i mean something i did was doing that
i mean i have accomplished this on accident by just making a uibox with the highest layer
noted
i think you could also use love.graphics
i love love.graphics
yes that's what i meant by "[changing] gears and [trying] to draw it directly with love2d"
istg i used the examples and they dont EVEN WORK FOR MY MOD........
god why do booster packs have to be hard for me
i in fact ignored the 2nd message
you probably need to add the modprefix to the pool name in your create_card call
what function do I hook for starting a run
yeah ur right
but problem
its using inject
instead of manually using keys
i don't follow
guess i gotta switch back to that then
that doesn't affect changing set = "CJModSet" to set = "modprefix_CJModSet" in the create_card call in your booster code
does anyone know what the value that holds the seed of a run is called?
Pools don't need to be prefixed
ah
it said its recommended to prefix them
usually you hook Game.init_game_object i think? note that the return value of that function is what becomes G.GAME, so if you want to do anything in G.GAME you need to run the referenced function first and save the return value to then edit it
i don't need to do anything in G.GAME here
I just need my code to run when a run starts
yea init_game_object should be right then
there's also Game.start_run, not sure what the distinction is
😑
ive never used init_game_object myself but i can confirm Game.start_run is what i use
game start run worked great
so that's 1/3rd of the idea
when I create a pool can I use a for loop inside it
wait nvm
there's an easier way than a for loop
Is there any way to set how long a perishable Joker lasts? I'm trying to create a joker that only lasts one round
new_card:set_perishable(true)
new_card.ability.perish_rounds = card.ability.extra.perish_rounds
(this just sets it to the default of 5)
just have the joker destroy itself in context.end_of_round
it's not the joker itself that goes away, but the cards it creates
it's a riff-raff style thing
ive tried putting a modded default for the booster and whaddayouknow, it defauts to joker
it feels like the game just doesnt recognize i loaded my jokers in
oh i see
you might be better off making a new sticker than trying to hijack perishable, because then that just debuffs the jokers instead of removing them
check Paperback, it has a very similar joker called "Ultra Rare" that gives the jokers a new "Temporary" sticker. paperback is under the MIT license so you should be able to just borrow the code for temporary
i don't mind them getting debuffed
does anyone know a solution??? please???
ok then
your issue is that the counter is in perish_tally, not perish_rounds
ooh, gotcha
Have you tried adding the pool directly inside your SMODS.Joker? Like:
pools ={["CJModSet"] = true,},
Hi, is it possible to get table of all existing contexts?
not without making it yourself
local tab = {}
for n, x in pairs(context) do
table.insert(tab, x)
end
it worked, ty!!
(
that gets all the values within a given context, not all the possible contexts
opening parenthesis
thats it
I dunno if there's a way to add them all at once outside of individually adding them to SMODS.Joker, but maybe try something like:
key = "CJModSet",
default = "j_four_fingers",
cards = {
["j_CJMod_keyOfTheJoker"] = true,
},
inject = function(self)
SMODS.ObjectType.inject(self)
self:inject_card(G.P_CENTERS.j_CJMod_keyOfTheJoker)
end,
})```
is keyOfTheJoker an actual value or is it a placeholder
placeholder for your joker
does break end the current iteration of a loop or the entire loop
i looked it up i shouldve done that to begin with it ends the entire loop
Based on general programming I would assume the entire loop
how would I make it end the current iteration of a loop then
for ... do
goto continue
::continue::
end
::continue:: should be at the bottom of the loop
A simple continue keyword would be nicer tho 😢
wait lua doesnt have a continue keyword
wtf
i havent needed to use it yet
but why does lua also just casually have a goto
Illusion of choice
Still figuring out a few things about my joker is there any way to filter stuff from add_card? I'm trying to specifically get an Uncommon Joker that's perishable, and working around it by using pseudorandom_element, but G.P_JOKER_RARITY_POOLS doesn't let you index by key and it's hard to check the rarity of the joker otherwise
A hook is written in lua and not in TOML's like patches, right?
Yes
yes
I need to alter the formula more but the boss armor works
hooks arent even in a seperate file.
Oh lol
In LUA, it is a very important concept to understand that everything is a variable and all variables may be edited in runtime. This includes functions. With modding other peoples' LUA files, like Klei's basegame code, you may find yourself wanting to run your code before or after the original fun...
how does defining a function for scale_card work again? i forget because the lsp doesnt have anything for it
oh
nvm i found it
One is impressed by Thy skills for they can’t go unnoticed
How do I update the text cards in full deck like driver's license? Doesn't seem like just the calculate script will make it
my skills clearly aren't enough to remove the required score and round score UI
🧱
Do you want the code for this
Hello winter
Hello!!!!
Why is everyone a M'
Seems to be a trend
I'm named this after the lovely N'
PLEASE
Loc_vars
I made a custom HP bar for my boss so the UI for those two is pointless
You can go the stupid dumb way and draw a rectangle over it with love.graphics
But that’s lazy
stop cooking please
So I need an extra variable tallying all of a specific card, and that script goes in loc_vars?
Just check vanilla remade bro 💔
probably would be bad practice too
100%
I’m lazy i do stuff like that sometimes
I need this boss to be dope as hell 
Then i look at my code and say why am i lazy and fix it
do booster packs have set_ability
Find out
Lazy programmer are (most the time) efficient programmer
ok the boss armor is 100% working
Sadly the updating doesn’t have an animation
Check
Bepis’s yggdrasil code
wait updating for what exactly? HP bar or the deduction
he has a progress bar for xp (animated )
ah
Make the bar larger so it looks like darksouls
I actually managed to make the HP bar with the help of bepis' progress bar code
amazing idea
He is my ui queen
bepis if youcan see this thank you for making the progress bar i love you you saved me about a week of sufferign

Btw i haven’t asked
What do you think of my abysmal shaders
calculate = function(self, card, context)
if context.post_trigger and context.other_card.area == G.jokers and context.other_card ~= card then
card.ability.extra.chips_count = card.ability.extra.chips_count + 1
G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.4, func = function()
attention_text({
text = localize('manifold_plus_1'),
scale = 1,
hold = 0.4,
major = card,
backdrop_colour = G.C.BLUE,
align = 'bm',
offset = {x = 0, y = -0.05*card.T.h},
silent = false
})
play_sound(sound, 0.8+percent*0.2, volume)
if not extra or not extra.no_juice then
card:juice_up(0.6, 0.1)
G.ROOM.jiggle = G.ROOM.jiggle + 0.7
end
return true end
}))
end
if context.joker_main then
return {
chips = card.ability.extra.e_chips * card.ability.extra.chips_count,
card = card
}
end
end
why does the event i'm calling here happen before the post_trigger joker effect? shouldn't it be after? i.e. POST trigger
I'd like to add the glitch shader to the final release for my tainted erratic deck because I think it fits very well, i couldnt find a use for others but they are still cool : )
yeah they’re quite weird
Do you want it to just be blank? Or would you want something like ???? or ---- where the score requirement usually is, since otherwise there would be open space
Winter is a shader wizard she can help with stuff that will blow your brain trying to figure out
Fun fact she helped me a lot to learn them
oh hehe thank uuuuu :cattoblush:
blank
the effects are evaluated after all calculate functions have been called
how would I get a booster to pull from a joker pool
+1 joker slot
sorry antimatter nobody invited you here
I imagine manual card creation wouldn't be good for this because it could make duplicates appear inside the pack?
or does it already handle dupes
since that also queues events, these events are queued after yours
hm
Okay gonna have to make some guesses since I'm in an airport and changing some stuff on the fly w/o testing but bear with me
there's the proper way to address that (using a func return and queuing the event in there, this will have it happen when this effect is getting evaluated) as well as a janky way (using a double event)
i tried double event and it gave all the popups at the very end
how would i do the first (proper) way?
ice_Bear.png
THANK YOU REGARDLESS
!!!!
check out this cool meme i found
image_4859.png
Did I hear shader help? OwO
return {
func = function()
G.E_MANAGER:add_event(...)
end,
}
ty for your help
np
Anyway... The example code in the wiki for hooking, can I just copy paste that to see what it does or would I need to change some things?
This code
function Card:add_to_deck(from_debuff)
local ret = card_add_to_deck_ref(self, from_debuff)
if not from_debuff and -- If the card wasn't added by being undebuffed
self.ability.set == "Joker" then -- and the card (`self` in this case) is a Joker
-- Adds it to the run's global table.
-- It is recommended (but optional) to preppend your mod's prefix to any global variable/field to prevent mod conflicts
G.GAME.vremade_joker_added_counter = (G.GAME.vremade_joker_added_counter or 0) + 1
end
return ret
end```
this just works as is
I make my variables stupid to not have to add mod prefix
can you link this actually if it's not too much of a hassle
/j
after i'm done with this boss I need to finish the t. nebula deck and move on to t. magic
This is the joker I am trying to create:
All or Nothin (which can be purchased for $5) starts off with a sell value of $50 and the sell value decreases by $2 per round, when its sell value reaches $0 it self destructs. Every round there is a 1 in 50 chance of it giving $500.
I have no idea what I am doing wrong, the sell value stays at $2 no matter what I do, any advice? I can provide screenshot of code
https://github.com/bepisfever/Yggdrasil/blob/main/code/level.lua should be somewhere here
ty!!
yea i get this
Damn, people's code is a really big treasure chest xD
https://github.com/bepisfever/Yggdrasil/blob/main/code/bepis_shenanigans.lua this file has all the functions maybe check this too
Legally stealing 🔥
one day someone will look in the tsunami code and find all the references
attempt to index local kill_me (a nil value)
Cryptid has some comments that are so funny too
This was in fact a bad idea
I love when my code backfires and shoots me in the leg
@robust marsh taking me a little longer than expected but im gettin there
I do this with W and backspace
dw at all, the fact that you're helping me with it in the first place is amazing
Do you want me to just blank out this whole section or just the round score box
only these two areas
@cursive gazelle I'm proud to announce..
LeBron of modding blinds
nowhere close to that but hoping to get there
Would this work to hook is_suit?
function Card:is_suit(suit, bypass_debuff, flush_calc)
-- Code before
local ret = card_is_suit_ref(self, suit, bypass_debuff, flush_calc)
-- Code after
return ret
end```
Ultrakill ost makes you a good coder
Duv makes some good shit
yes
crashed on opening collection for a booster pack i'm working on, anyone seen this one before?
i can't wait for hakita to drop the rest of the layer 8 ost
I know someone on Spotify who makes some cool stuff too, forgot the name 1 sec
i listen to a lot of fanmade ultrakill osts so i've likely heard of them
We got silksong before layer 8
it's truly over
yeah pack it up
Their name is AZALI
1.1 update cannot be taking this long 💔
he always felt like an enigma to me with the default pfp and random banger music
genuinely a goat
Use their music without consent in your mod
i had to take a break you know i just be lazy
Anyone know where is_suit is in the balatro code? I can't find it ._.
I don’t think it fits for balatro lol
i hate how good the tboi ost is for this mod
Fair enough honestly
maybe one day i'll have custom music for it
Pretty good actually
but not anytime soon
are you still doing the add spades to played card thing
I just started with it
My brother in christ fl studio is 300$ and i know your ass know nothing about making music
yeah, makes me feel even more bummed out because I know i can't just use it in the mod but oh well
evil ass beat i cooked up
I made this beat its so dope I’m gatekeeping it
here's a hook for it
local card_is_suit_ref = Card.is_suit
function Card:is_suit(suit, bypass_debuff, flush_calc)
local ret = card_is_suit_ref(self, suit, bypass_debuff, flush_calc)
if not ret and condition then
return true
end
return ret
end
self is the card being checked and suit is the suit it is checking for
so you just need to figure out if self has that spades thing and if suit is spades then return true
cause suit is whatever suit it's checking for iirc
Isn't that what I have already?
This far:
function Card:is_suit(suit, bypass_debuff, flush_calc)
-- Code before
print("Before :O")
local ret = card_is_suit_ref(self, suit, bypass_debuff, flush_calc)
-- Code after
print("After :3")
return ret
end```
well then yeah it is
And I appreciate that, thank you :3
i'm not sure what if not ret does
but mine has that and yours doesn't?
oh wait no I do know what that does
that makes it so if the suit check passes anyway, your code doesn't run
It isn't in the example in the wiki
cause your code wouldn't need to run if the suit check was already true
it's an optimisation thing I think
The only thing I don't get is how I would make it so that the joker makes the scored cards be suit x and spades
well
is_suit is ran with a suit argument
unlike get_id which returns the rank of the card
is_suit returns true if the card's suit matches the suit argument you put in
^
the card will still have its original suit
and it should still pass the original suit checks
So I would do if self:is_suit ~= "Spades" and 'joker check' then self:is_suit = "Spades"?
Isn't is_suit a function
running is_suit inside is_suit doesn't sound like a very good idea
I think you'd have to get the base suit of the card
by the actual value
So I'd use self:base_suit or what's it called instead?
Hello
card.base.suit
o/
At least on a carf
if self.base.suit and suit == "Spades" then
idk if self.base.suit is the right value but eastern said it
And I would do that before or after the original code?
I mean it worked when iterating over context.scoring_hand so probably
is it an effect granted by a joker or is it on the card
like an enhancement or smthn
I try make fusion from fusion mod.
but crash.
145 load this joker, but whast wrong
Right now I don't have the joker coded but I thought of not doing it like an enhancement. Like, make the card be both suits, it's original and spades
Make sure you install the up to date version of the FusionJokers mod
I don't know if you did or didn't get the right version, but it will cause issues if you didn't get the right version
Also, the crash is caused by the file jokers/unholyhell.lua. Something inside that file is causing the crash, which may be caused by the incorrect FusionJokers version, or something else.
The up to date version of FusionJokers is here https://github.com/wingedcatgirl/Fusion-Jokers
Where my joker
okay so a joker grants this effect right
Yes

