#💻・modding-dev
1 messages · Page 692 of 1
still happens
can you post the full log
oh also remove the math.random thing
your booster also doesn't have that
it's a vanilla thing with the multiple artworks
yeah it's this
oh yeah i didn't notice that lmao
finally works now
just to make sure, you know the description can have multiple boxes, right?
POLTERWORX manages tetration right
how can i hide the pokerhands?
text = {
{ "box1" },
{ "box2" }
}
oh
your own or from vanilla/other mods
that simple
amulet
the vanilla one
long story short i plan adding tetration to my mod (but not stupidly overpowered just. balanced.)
hook SMODS.is_pokerhand_visible
poker_hand?
i dont remember
yeah use amulet
there's an explanation on higher operations in vanillaremade
question cant i just steal the tetrationmult/chips calculation from amulet and add it to my own mod
even if you did it wouldn't make sense without higher number limits
amulet is fine to depend on since the most popular mods require it
ok thanks:))
got polterworx to see how it manages tetration
AND WHY THE FUCK IS EVERYTHING IN 1 .LYA
WHY IS IT DOING THTA
because lua is annoying
idk jen things
they ran into the local variable limit that was funny
some other old mods are also one file like cardsleeves
ig i'm taking the tetrationmult function from Amulet
As N said, Jen's preference - supposed to change in the upcoming v1.0.0 update whenever it comes out
although i understand the concept of personal preference, sometimes some things are just wrong
Yeah no I had a heart attack the first time I saw it
hit the local variable limit btw
lmfao
Ey yo
Hiii, is there a way to trigger a joker everytime a listed probability happens? (ie. 20mult on lucky card, broken glass, tarot from 8ball, 1.5x on bloodstone etc)
You should be able to use context.pseudorandom_result? https://github.com/Steamodded/smods/wiki/Calculate-Functions#contextpseudorandom_result
should be context.result?
That's what you'd check if the probability succeeded, you'd use pseudorandom_result to see if it happened at all (otherwise you might accidentally trigger your joker on other contexts that use .result)
(though I don't think there's one, it's a good habit to get into)
so it should be like first line if context.pseudorandom_result then second line if context.result true? then
Sure. Or with an and
I've only ever done one mod and it got lots of dl so I never bothered learning more qwq
ahh right
but to check if the result is true is it actually context.result true?
You can do context.result == true, or context.result as shorthand
I'll try that thankss :3
oh also, is the method for adding images to jokers the same as smods old calc?
what I mean, this would work right?
my old mod was made on smods old calc and I have no idea why I did that, maybe something wasn't working on the new one
if card.area and card.area.config.collection then to check if the joker is in the collection.
thx
debugplus
amaze amaze
how do you display a card like that in the description
np
hmm
code?
is v a card object
no it's just a table of key, edition, table of stickers
ok
oh yeah
add card is
specifically for adding cards to their default areas and doing add_to_deck and emplacing and stuff automatically
uhhh
oh nvm
it's because of this
i didn't understand at first what you meant
it's the space to the left and right
yeah
Ok I need to resize stuff a bit but it works perfectly, thanks!
SMODS.Joker {
key = 'nightmareeyes',
atlas = 'mjm_CustomJokers',
pos = { x = 4, y = 0 },
rarity = 1,
blueprint_compat = true,
cost = 3,
config = { extra = { odds = 4, type = 'Pair' } },
loc_vars = function(self, info_queue, card)
local numerator, denominator = SMODS.get_probability_vars(card, 1, card.ability.extra.odds, 'j_mjm_nightmareeyes')
return { vars = { numerator, denominator } }
end,
calculate = function(self, card, context)
if context.joker_main and
context.scoring_name == card.ability.extra.type and
G.consumables and G.consumables.cards and G.consumables.config and G.consumables.config.card_limit and
#G.consumables.cards + (G.GAME.consumable_buffer or 0) < G.consumables.config.card_limit and
SMODS.pseudorandom_probability(card, 'j_mjm_nightmareeyes', 1, card.ability.extra.odds) then
G.GAME.consumable_buffer = (G.GAME.consumable_buffer or 0) + 1
return {
extra = {
message = localize('k_plus_spectral'),
message_card = card,
func = function()
G.E_MANAGER:add_event(Event({
func = function()
SMODS.add_card {
set = 'Spectral',
key_append = 'j_mjm_nightmareeyes'
}
G.GAME.consumable_buffer = 0
return true
end
}))
end
}
}
end
end
}```
i'd like to figure out why this isnt firing
if possible
i'm pretty sure everything in extra should be in the return itsself
noted; thanks much
how do I make a joker give 2 dollars when it's triggered but not on the joker scoring phase
trying to make this trigger per negative joker owned, how can i make this work? doesnt currently
Use ease_dollars(value)
oh I thought it was more complicated
it had that in a template I was following but it said ease_dollars(G.GAME.round_resets.blind_ante*2)
meant to sorta be like baseball card
and it will just say "+2" in yellow on the joker?
No it won't do that
You're doing stuff with hitting probabilities right?
Assuming you set up your calculate right, you should be able to just return dollars = value in your return table
like that?
You don't need the extra, the card = card, or the colour
am I tweaking or does extra actually do something
i've never heard of it but thast 2 messages now
and value should be whatever amount of dollars you're giving
extra essentially acts as, well, an extra return table
does anything in smods interact with it
oh wait do you mean like having 2 seperate effects?
kinda but you can also just SMODS.merge_effects instead
ah
SMODS.merge_effects is my favorite child
are you using any example mods for this
may i recommend new ones
https://github.com/nh6574/VanillaRemade has everything in vanilla remade in smods + an FAQ in the wiki
https://github.com/Steamodded/examples/tree/master/Mods i updated this one recently, it has a couple more examples and some more explanation
hold tab to see all the keybinds
Where do I find when cards get drawn to hand, so that I can patch it for my boss blind? I can't seem to find it
bump, currently doesnt do such a thing (i want it to function like baseball card)
its (card.edition and card.edition.negative)
or (card.edition and card.edition.key == "e_negative") works too iirc
what's the intended behavior?
I want to block drawing cards while in the boss blind because it doesn't use poker hands to win. It uses riddles
if context.drawing_cards then return { cards_to_draw = 0 } end?
pain
return { vars = {card and self.config.ee_mult or card.ability.extra.ee_mult, card and self.config.ee_mult_mod or card.ability.extra.ee_mult_mod } }
That works, thank you. I only need to render the play and discard buttons now and make them be active without a card being selected
what code do i use if i want a consumable to change the enhancement of selected cards
have you checked vanillaremade
check vanillaremade
loc_vars arguments are self, info_queue, card
thx
also card and self.config.ee_mult or card.ability.extra.ee_mult doesnt make sense, it should be the other way around
doing this also doesn't really matter since card always exists
so only self.config.ee_mult and self.config.ee_mult_mod?
it is giving me dollars when a listed probability happens, +8 permanent chips, and then it gives the chips on scoring, but the problem is, it is giving me 4 dollars instead of 2
always card.ability. etc
remove the ease dollars
also you don't need the colour in the returns, it does it automatically
the bottom one i mean
a a_
didn't realize that
also, I want blueprint to be able to copy the dollars, but not gain chips, but when I try to nest the ifs it says I don't "end" the first statement even if I do
SMODS.calculate_effect() is basically just a return in a calculate function but without returning right?
like the same effects are available as returning
things like message and dollars and all
can you show that code
yes
yea cause im realizing now that i can just calculate dollars instead of doing ease_dollars and a message
Whoever reworked G.FUNCS.get_poker_hand_info, it's amazing, thank you! :3
I already changed it D:
is there just a(n easier) way to make blueprint give the money, but not gain the chips?
can you paste your current code
nvm here
if context.pseudorandom_element and context.result then
if not context.blueprint then
card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chip_mod
end
return {
dollars = card.ability.extra.dollars,
message = not context.blueprint and localize("k_upgrade_ex") or nil,
colour = not context.blueprint and G.C.CHIPS or nil
}
end
my joker doesn't seem to ever increment my card.ability.extra.num_of_cards var. anybody know what i did wrong?
ahhh sorry I was testing
ohhh yeah!! lemme try it
what is it supposed to count
number of cards played that are not face cards
it's supposed to cycle through your played hand and only increment when a non-face card is played. if a face card is played, it resets to 0
G.playing_cards is all cards, cards played is context.full_hand or G.play.cards
now it just doesn't work qwq
I'll just make it blueprint incompatible
weird
i typo'd the context name lol
i let autocomplete handle it for me..
Why does this not make the play button blue (active)? The first if gets triggered, that isn't the problem
'win_game' was just for testing
Wait, I think I'm dumb
i will say, why are you patching and not just hooking the function
Also true
#📜・modding-rules rule 9
Okay, got the button working. Only problem with it is that when it gets clicked, it crashes because of G.FUNCS[self.config.button](self) in Balatro's function UIElement:click(). Can I add my own function to G.FUNCS or is there a better way to prevent that?
you can add your own funcs
I'm playing rn but I had the question, can you make a joker open a booster pack during a round?
or is it impossible to open a pack mid round?
would take a lot of work to implement it yourself, but i think if you make your mod depend on Spectrallib it'll take care of it for you?
damn qwq
I really don't want to add dependencies, so that joker idea goes to the bin
i wanted to add it to smods a long time ago but booster states are annoying
i think i do have the code for during a round somewhere
couldn't find it
bwehh it's oki
My crash logs say they Could not find center “NewEnhancer2” which is the key used for one of my enhancements. Can someone help?
We can't help you if we don't have the code that's crashing and what's the crash
here's the code for the enhancement and its respective tarot
does G.UIT.O support ref_table ref_value pairs?
???
?
It should be m_modprefix_key
i believe i did it correctly now
no
its purely for text
still doesnt work
you could make it work with func though
but thats a lot of recalculate calls
so i'd make sure you track that its actually changing to avoid that
i'll be doing that dw
it still says it could not find the center 'NewEnhancer2'
what did you do that caused this crash
Im trying to make a tarot card that changes enhancements
send the tarot code
its in this
you may have to fullscreen it
you need the m_
i did that
m_Uber_NewEnhancer2
hold on
here?
updated code
what line is the crash on
it doesnt say
error code
on line 251
you should update your lovely
there is no line 251
but I don't think that'll solve the issue
wait that's card.lua i'm dumb
how do i update lovely
google lovely injector
it's line 103
the key for the enhancement is incorrect somewhere
there are only 2 spots with the key
and both are typed correctly
it's missing the prefixes
one moment
Did you start a new run?
lines 102-105
I wanted to make like shop themed joker that when you sell it it'd give you a booster pack or something, what else could a bait or emergency shop joker do? I need ideas qwq
it can give you the tag for the booster pack maybe
no i had to do something
that sounds cool :D
I could try that
here's the code
Ok so i updated lovely and it didnt work
i got the code for you
how do i make a DynaText object?
wdym
to put in a G.UIT.O
ty
DynaText extends Moveable so it's like UIBox
ummm..... you cant 
what are you trying to do
bios in collection
you need Dynatext only if you want your text bounce, or switch between strings
you want multiline parsed text?
Depends on where you place it
because depends on position it needs to be parsed or it's already parsed
i should have an example in my mod
I was using localize before but now I always parse string every time
because i'm lazy
it's already parsed bc i used the code from joyousspring
i think nodes = nodes_from_localize should work
no i mean
localize basically returns array of arrays of text lines
but you need cover them into rows and then in column manually
uhhh
i love ui error
again, ui parsed only if it's inside G.localization.descriptions[<your_set>]
desc_lines is array of rows which you need cover into C
desc_lines?
I mean show your code so far
local bio = {}
localize({type="res_bio",set="elle_Resident",key="elle_r_elle_chloe",nodes=bio})
rowNode.nodes[#rowNode.nodes+1] =
{n = G.UIT.C, config = {padding = 0.1, r = 0.08, hover=true, shadow=true, colour = G.C.L_BLACK}, nodes = {
{n = G.UIT.C, config = {padding = 0.1, r = 0.08, emboss = 0.05, colour = G.C.BLACK}, nodes = {
{n=G.UIT.O, config = {object = c}}
}},
{n = G.UIT.C, config = {minw=4, maxw=4, h=G.CARD_H, padding = 0.1, r = 0.08, emboss = 0.05, colour = G.C.BLACK}, nodes = {
{n = G.UIT.R, config = {}, nodes = { {n = G.UIT.T, config = {scale = 0.3, colour = G.C.WHITE, text = "Bio"}} }},
{n = G.UIT.R, config = {}, nodes = bio},
}}
}}```
nope
?
localize return array of array of text lines
Which you need manually cover into R
And then all of them into C
_ _
that's why there's a loop after localize
it converts localize result to UI which you can use
default_col = G.C.UI.TEXT_LIGHT
yes
ty
now to figure out how to make it change for whatever card is in the corresponding collection area
maybe if i make the bio part a uibox object and G.UIT.O it in so i can swap it out
just rerender entire page, it's easier
oh true
haven't figured out the rerendering but
what do i do to rerender it?
-# https://github.com/ellestuff/ellejokers/blob/83ed3b45899ff07154b145b8d54fcf46afa98b00/lua/misc/resident.lua#L80-L184
here's it not rerendering
@primal robin any ideas?
i accidentally wrote "xonrwzr" while writing a context check and now i want contexts to be renamed to "xonrwzr" 😭
...actually i could, since you can name function args whatever you want
food for thought when i make the big one
you could in theory but idk why you'd want to 
i can't figure this out 😭
i can look at it tomorrow if it doesn't work by then but i never tried that before
i tried putting a G.OVERLAY_MENU:recalculate() at the end of G.FUNCS.SMODS_card_collection_page and it didn't do anything
ty
on that note
it's 3am, i'm going to bed
i was looking into how the potato patch tutorials do it and they just remake the overlay 😭
eep well
sleepy was the one that suggested recalculating the whole page
well
i'm not necessarily going to eep
just bed
can still chat from phone
but i won't be at my pc to test code stuff
fixed it and it works again but blueprint still gets the chips
does it scale or just the message
no message but it scales
no idea
if context.pseudorandom_result and context.result == true then
if not context.blueprint then
card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chip_mod
end
return {
dollars = card.ability.extra.dollars,
message = not context.blueprint and localize("k_upgrade_ex") or nil,
colour = not context.blueprint and G.C.CHIPS or nil
}
end
if context.joker_main then
return {
chips = card.ability.extra.chips,
}
end
end,```
how much is chip_mod?
config = { extra = { chips = 0, chip_mod = 4, dollars = 2} },
looks fine to me?
it's scaling properly
did you mean that it still scores chips?
oh wait
right
I'm gonna sell my joker and see if blueprint does some weird shi
I'm worried cuz my last mod blueprint would score by itself
right, it works fine LMAO
sorry ahah
How do you make a description glitch like misprint's +mult text
look at vanillaremade misprint
is it possible to trigger a joker’s art to change during its scoring?

card.children.center:set_sprite_pos({x = x, y = y})
try looking for it in steamodded docs before asking if that's it, lol
thank you!
dynatext isnt in there for some reason
needs to be fixed actually since it has non vanilla features
oh odd
most vanilla stuff isn't documented still even if it has changes
is there a way to detect the total amount of cards with a seal on deck?
kinda like for stone joker that counts all stone cards on deck
loop through all the cards and check each one
local count = 0
for k, v in pairs(G.playing_cards) do
if v:get_seal() then
count = count+1
end
end
Adds the Stone enhancement pop-up description to the side of the card's description when viewed.
You can add one for specific seals. Example, info_queue[#info_queue + 1] = G.P_SEALS.Red for the Red Seal.
^
this line of code doesn't seem to be working correctly as even when i set both the num and denom variables to both be 1 (1 in 1 chance), this if statement never seems to trigger. anybody know what i messed up?
You're setting red_light_triggered to false in every context.
ahh
i need to add it in to the loc_vars then i suppose
wait no, the line at the top local = red_light_triggered = false should only happen every time the joker goes off. if the probability hits, wouldn't the code read the "if context.after and red_light_triggered == true then" before it reads the false one?
unless the calculate = function at the top triggers more than once?
No, you should store the variable in config instead.
i was under the impression that all variables in the config need to also have a counterpart in loc_vars
is that not true?
Yes, you would only put it in loc_vars if you want to display it in the joker's description.
while my joker functions perfectly fine, ideally i'd want the card to change its sprite after it does its scoring animation. right now, it does it before the cards score. is there a better place i can put this line of code to make the sprite change line up better?
In an event
any chance you can link me to the documentation for events?
You would also need to put it in a func in the return.
so i’d create a func, and then run that func in the return?
return { func = function() ... end, message = "..." }
questiobn to modevchat
if a joker has multiple description boxes, does main_end goes on the topmost box or the bottommost box?
and if it's a former, is there a way to do the same but for the bottom box?
main_start/main_end go before/after everything. there's box_starts/box_ends to place things before/after the contents of any specific box
there's also element controls you can use to place things literally anywhere
question, that "1" means the first card? (the leftmost card)
would scoring_hand[1,3,5] work?
no thats not valid lua
What is the goal?
target the leftmost card, the middle card, and the right most card
{context.scoring_hand[1], context.scoring_hand[3], context.scoring_hand[5]} if you need a table to iterate through, but theres possibly a different way depending on what your trying to do
in order to do what?
retrigger them like with hanging chad
okay don't use a table then
if context.other_card == context.scoring_hand[1] or context.other_card == context.scoring_hand[3] or context.other_card == context.scoring_hand[5] then
-- stuff
end
thanks youu
if context.repetition and context.cardarea == G.play and ({[context.scoring_hand[1]]=1,[context.scoring_hand[math.ceil(#context.scoring_hand/2)]]=1,[context.scoring_hand[#context.scoring_hand]]=1})[context.other_card] then
return {repetitions = number}
end
wouldn
buh'
wouldn
omg
wouldn't that last chek always return nil
since the table is {[1] = card, [2] = card, [3] = card}[card]
those "or"
wouldn't that just make only one of the cards retrigger?
need brackets around them and then yeah that i'll work
no?
if its 1st card or its 3rd card or its 5th card
1st card passes first check
second fails all3
3rd fails first, passes 2nd
4th fails all 3
5th fais first 2, passes 3rd
Yes, but you shouldn't use that code because it wouldn't work if you play an amount of cards that is not 5.
yeah if you TRULY want to do "Retriggers every other card", then you shouldn't just check for position 1 3 and 5, because if you play two odd numbered hands in a row two cards will be retriggered consecutively
if it were me i would have a boolean flag that toggles on context.individual
oh wait I misread their sentence ;-;
i read they specificly wanted 1st, 3rd, and 5th lmao
I mean I did word it that way
no you didn't ;-;
use something's code
i was just giving an example!! D:
like if you play a flush with the joker that allows you to play flushes with 4 cards, and the first card doesn't score because it's a different suit
then it'd be something like the 2nd card and 4th card
oh
use full hand then
i honestly would just use individual
doesn't work with retriggers
but i thought the code in hanging chad already counted the first <---- scored hand
or does it not?
i forgor
hanging chad is scoring hand
not full hand
it's 6 am 😭
it can if you're smart about it
yeah! that's why I thought 1,3,5 would work
genuinely how is setting a flag in individual and then retriggering in repetition different from just doing the same check in repetition
you should be using the intended context though 😭
hanging chad would retrigger the first 10 of hearts here
what have I done
you can just context.other_card.rank%2 ~= 0 im pretty sure
since Card.rank is the position in the cardarea
I'll try your code first then I'll try the individual one I'm going to die
use somethings
not mine
where do I add le brackets?
this is good to use
somethingcoms code is already functional
and replace scoring_hand with full_hand if you want unscored cards to mess with it
ah! alright then (๑•﹏•)
learning is fun but coding has always been the bane of my existance
I only use gdscript bwehh
fair
i would not recommend (but also would its a good learning experience) getting into shaders then
hmm
is there a way I could make a card not score, but still count for poker hands
black seal
mod?
oh god I already got into shaders on godot ts was not fun but I could try
yes
oh no I was just give an idea for how to implement it xd
whatever the opposite is of the return that splash uses
oh I know how i'm impementing it
ah okay, thx
remove_from_hand = true in context.modify_scoring_hand
"I love coding but I hate havin to translate it back to english how do you guys do it"
went to get a ss and guh
heat abnormal breaking my game smh
time to do nothing and hope its a random bug
hmmm i could make wet soggy card edition
holy shit medicine mentioned
what would I need to put here for playing cards
Default and Enhanced
And do I need this if I'm doing set_sticker or does calling that bypass any checks
You would have to do card:add_sticker('modprefix_key', true) to bypass all checks.
that'll work then, thx
where can I find sticker data at for info queues?
{set = 'Other', key = 'modprefix_key'}
thx
Honestly I'm proud of my seal just because it's not actually a seal.
Like I genuinely feel clever for it.
i found a thing on the steammodded guide but i cant find it anymore and idk if im going crazy but was there a thinng where you can make text clickable to do an effect?
i want to make a joker with an activated ability but i cant find the thing anymore
like in a description
or do you mean a use button
either works
could have sworn theere was somekthing about it in descriptions but i cant find it anymore
but a use button would probably be better i reckon but probably i assume not as simple
take this code
just make sure you replace synthb_use_joker and synthb_can_use_joker with you own names
yeah ok thank you, should i put it in main.lua or its own file?
this will let you include can_use = function(self, card) and use = function(self, card) in your joker definitions
up to you
oh alright coools
you can't click joker descriptions lol
there is a way to add buttons to text but it wouldn't work there
i think ive had some form of hallucination then i vividly remember seeing it in the smods thing and thinking this is so coo l
vremade includes a tutorial on adding buttons
might have seen that
i see
yeah
well thank you for the code, im gonna go cook now
smods does add the button thing in descriptions so that's correct
or the smods UI Guide for buttons, but that only works on uis that dont disappear when you try to click them
i see
why is my mod not loading????'
i have it in my smods folder
it aint nested
what the fuck
in the smods folder?
theres supposed to be a message that pops up whenever you play a card, but it doesnt seem to show
wait no it does
it just doesnt play the sound
return a sound field instead, not play_sound
i have a joker that marks random cards to give 2x mult, how would i be able to apply a soul_pos sprite to said cards?
easiest way is a drawstep, check The Soul in vanillaremade and use the same logic for the marked cards
i should add a comment on how to create the sprite
my edition breaks when i try to view it in the main menu collection
read the crashlog
ik
G.hand doesnt exist
ik whats happening
i just dont get what context or other i should check before doing the effect
check that G.hand exists
okay done
ok i cant figure this out ive been on this for like 4 houts how would i get this to applythis sprite to all marked cards
do you have the code for what you tried
deleted because it wasnt working and i was getting annoyed
well i would recommend not doing that next time so its easier to help you
real
i feel nice today so let me write it for you
thanking you greatly
do you have the atlas for that sprite
SMODS.Atlas({
key = "marked",
path = "marked.png",
px = 71,
py = 95,
atlas_table = "ASSET_ATLAS"
})
i did assign the atlas correctly right?
oh and whats your prefix
yeah
baggutro
SMODS.DrawStep {
key = 'russian_marked',
order = 50,
func = function(card)
if card.ability.russian_marked then
if not G.baggutro_marked then
G.baggutro_marked = Sprite(0, 0, G.CARD_W, G.CARD_H, G.ASSET_ATLAS["baggutro_marked"], { x = 0, y = 0 })
end
local scale_mod = 0.05 + 0.05 * math.sin(1.8 * G.TIMERS.REAL) +
0.07 * math.sin((G.TIMERS.REAL - math.floor(G.TIMERS.REAL)) * math.pi * 14) *
(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL))) ^ 3
local rotate_mod = 0.1 * math.sin(1.219 * G.TIMERS.REAL) +
0.07 * math.sin((G.TIMERS.REAL) * math.pi * 5) * (1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL))) ^ 2
G.baggutro_marked.role.draw_major = card
G.baggutro_marked:draw_shader('dissolve', 0, nil, nil, card.children.center, scale_mod, rotate_mod, nil,
0.1 + 0.03 * math.sin(1.8 * G.TIMERS.REAL), nil, 0.6)
G.baggutro_marked:draw_shader('dissolve', nil, nil, nil, card.children.center, scale_mod, rotate_mod)
end
end,
conditions = { vortex = false, facing = 'front' },
}
and this goes in the same thing under my joker right?
it can go anywhere, its not tied to the joker
is there a way that i could set the name of a boss blind to a random other boss blind
errr nvm fixed it
still would like to be able to do this
patching
ui is incredibly hard coded
How could I get a random consumable?
like is there a poll function for them
also i meant like
chaning the name of my custom boss blind
to a random other boss blind
I know what you mean
out of all the modded objects, how hard are decks to mod on a scale of 1 to 10,.
is there not like a way to just grab the name of a random one
1-2
thats the easy part
the hard part is actually displaying
ok so like really easy
guys why is this info queue only showing the name of the thing I'm trying to have an info queue for but not the text box
everything is like 1-2
cant i just set the name to be the return of a function that does that
its the effect that matters
no
yeah fair
you are going to need patching
exept for ui
oh 😭
ui SUCKS
its not that bad
ik i was joking
like heres what it looks like in game
balatros ui is pretty good
now if your doing anything custom that's when things get tricky
does it need to change on the fly or does it pick on rolling the blind
i dont know how it can fetch the name but not the description
considering its a ultrakill refetence
im assuming its gonna say one blind until they play a hand
then switch to what it actually is
correct me if I'm wrong mations
i think using key in loc_vars and calling G.GAME.blind:set_text() should work
oh that's a function ;-;
okay nvm yeah no patching then
rolling the blind
ah then you just need the loc_vars thing
yeahh
balatros localize function is hard coded for valid sets ;-;
its cause i wanted to do something to do with ultrakills disintergration loop
and the idea that the name would change
to a random boss blind
welp
something like this?
okay i'll try something else
its possible, and honestly not that hard
lemme send you the code
i think I can just like use Other no?
its going to show the correct name on playing
the blind
ah
then yeah just using loc vars
and also play music too which ive done
yes, but then you have to duplicate your entries
patching into localize to accept your custom category is much easier
I got it to work but what is the code for the easier way
https://github.com/Foo54/SynthB/blob/main/lovely%2Finfo_queue.toml
delete lines 16 and 17, and change "MiscInfoQueue" into "aij_astral"
lovely
exactly
67....
what's the context for when a hand is drawn at start of blind or after scoring (not after discarding)
I think context.first_hand_drawn?
that's only at start or blind
not after scoring
also i'm doing this for a juice_card_until
there isn't one that excludes discarding
hand_drawn is for any drawing
nice
im so stuck 😭
what this means? 💔
The minimum ante a boss can appear at
im a bit stuck
loc_txt
look at my screenshot
im trying to do a more difficult version where it changes to a random boss blind and then changes back
Blind section in localization file if you use that
otherwise its just loc_txt, that works for everything
do you do the set_text thing i said
it surely does, it's in the localization file
ah I guess that does make sense
ts don't work :c``` calculate = function(self, blind, context)
after_play = function(self)
for i = 1, #G.play.cards do
local current_card = G.play.cards[i]
if pseudorandom('chomp_blind') < 0.25 then
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.2,
func = function()
attention_text({
text = "CHOMP!",
scale = 1.3,
hold = 1.4,
major = current_card,
backdrop_col = G.C.RED,
col = G.C.WHITE
})
play_sound('tarot1')
-- ts don't worjk :broken_heart:
current_card:start_dissolve()
return true
end
}))
end
end
end
end```
I'm sure there's an easier way to do this
after_play should not be in calculate
uh this is dumb but how do i actually have the mod actually show up 😭
Do you have a metadata .json properly set up?
i have it idk what mi supoused to ddo with it thp
OH WTF
ITS EMPTY NVM!
i probably just didnt save it
thanks!
a
Oh I didn’t see this
what is this supposed to do
a lot of this code can be replaced by newer stuff
after playing a hand in the boss blind, 1 in 4 chance for scored playing cards to be destroyed
if context.destroy_card and context.cardarea == G.play and SMODS.pseudorandom_probability(blind, "unique seed", 1, 4) then
return { remove = true }
end
you can add message = "CHOMP" to the return too
how so?
by adding message = "CHOMP" in the return
:sob;
I need to sleep more sorry ahah
I thought it said "you can add the message chomp on the return too"
wait it doesn't work, did I completely implement your code wrongly?
contexts are a calculate thing
please bare with me, I last modded for balatro like a year ago
so I change after_play with calculate?
yo so i lowkey just copy and pasted ts
how to
yk
im stupid 😭
{
"id": "Jimbo",
"name": "The Jimbo Jimbo Mod",
"author": ["Gordo", "Vekhi"],
"description": "geniuely just some bullshit.",
"prefix": "Jimbo",
"main_file": "JimboJimbo.lua",
"badge_colour": "c7638f",
"dependencies": [
"Steamodded (>=1.0.0~ALPHA-1225a)"
],
"version": "1.0.0"
}
calculate = function(self, blind, context) and then if context.after_play then
forget about after play lol
just the code i gave, and the blind.disable line
what's the issue
doesnt work ~_~
set_blind seems to be inside loc_vars
ohhhhhhhhhh
also that's not what i meant in loc_vars
it lowkey just doesnt come up
you need to return { key = "key for the other blind }
hello modding dev
does JimboJimbo.lua exist
i am making global variables and persistant variables for joker forge 2, currently, the persistant variables last until you close the game, does anyone know if it is easy to make it last between opening and closing balatro
set stuff on the profiles
Anyone has any idea why this 8 Ball won't be eternal, or runner rental (it's perish immune so this one makes sense) ? I'm clueless
how would i go about that or can you point me in the direction of docs
yes
ohhh it work snow
i was just testing if fit showed up first maybe i have to like actually add a something for it to work
can I see your mod fodler
the boss blind finally works but the chomp message appears on the blind icon instead of the cards
literally same as example jokers
add card = context.other_card into the return
turn on file extensions please
done 😭
and this is JimboJimbo.json?
can someone help me with this?
yup
okie
though then again blind icons may be too much
np
im trying to get this tarot card to work, but it cant find center "NewEnhancer2", can someone help me?
like this? it didn't work qwq
did you start a new game
ill do that real quick
thx
somethingcom told you that first 😭
trying to change the icon but it keeps defaulting back to this
i actually didnt see lol
does returning atlas actually do anything
you need to change the G.GAME.blind.children.animatedSprite
im still not sure how to properly change the atlas of a sprite but you can use :set_sprite_pos to set the position
this is fun but hard
How would I got about properly resizing a card? rn im doing this but it only affects the card, not stickers (and i assume not soul layer and any other layer that might exist)
I think its card.T.scale
oh yeah thx
np
That has to be one of the coolest things I've made, but it's not compatible with other mods so that kinda sucks lol
honestly if i have time later and im not lazy ill change the icon too
i dont think so
that is so cool!!!!
oh it should be message_card = context.destroy_card
How do I get if my overlay got closed or how do I block that it can be closed by pressing esc?
config = {no_esc = true}
if G.OVERLAY_MENU doesnt exist then its closed
Where do I put that config? In the G.UIT.ROOT config?
nicee
what was the statement toi return true if the card has a seal?
like this but for seals
how do i add time to a joker
what im trying to do is have a joker that does something after a set amount of time
use the update function
plus i would want a timer in the joker's description
update has the delta time as dt, which is the time since last frame (with speed up taken into account)
G.real_dt is the real one
thats going to need dynatext
for showing it in the description theres something in the vremade wiki
a text node works
oh yeah that exists now
so i've created an event here in the return function and this does delay the joker art change as i intended, however, now the message isn't showing up. where do i need to put the message code?
that always existed
i might be stupid
can you paste that here
return {
G.E_MANAGER:add_event(Event({
func = function()
card.children.center:set_sprite_pos({x = 1, y = 1})
return true
end,
message = "Red Light!",
}))
}
--- Adachi Rei
SMODS.Joker{
key = "adachirei",
atlas = "jokers",
pos = {x=9,y=1},
config = {
extra = {
cmult = 30,
chips = 0
}
},
cost = 4,
loc_vars = function(self, info_queue, card)
return {
main_start = {
{ n = G.UIT.T, config = { text = ' +', colour = G.C.CHIPS, scale = 0.32 } },
{n = G.UIT.T, config = {ref_table = card.ability.extra, ref_value = "chips", colour = G.C.CHIPS, scale = 1 } },
{ n = G.UIT.T, config = { text = ' chips', colour = G.C.CHIPS, scale = 0.32 } },
},
vars = {card.ability.extra.cmult}
}
end,
update = function(self, card, dt)
card.ability.extra.chips = math.floor(card.ability.extra.cmult * math.sin(love.timer.getTime())) + card.ability.extra.cmult
end,
calculate = function(self, card, context)
if context.joker_main then
return {
chips = card.ability.extra.chips
}
end
end,
}
the cards effect:
j_foobar_adachirei = {
name = "Adachi Rei",
text = {
"{s:0.7}+#1# * sin(time) + #1# chips"
}
},
G.E_MANAGER:add_event(Event({
func = function()
card.children.center:set_sprite_pos({ x = 1, y = 1 })
return true
end,
}))
return {
message = "Red Light!",
--[[
If you want it after the message:
func = function()
G.E_MANAGER:add_event(Event({
func = function()
card.children.center:set_sprite_pos({ x = 1, y = 1 })
return true
end,
}))
end
]]
}
@brittle yacht here's an example
i made an easier playing card adding function for people to use it 😭
SMODS.add_card{ set = "Base", suit = "S" } can replace a lot of that
mb 😭
perfect, thank you!
i used jokerforge for that one instead of doing work in class 😭
we can tell lol
jokerforge was made with syntax from ages ago sadly
where exactly is the time function btw
im confused
comments would be nice
wdym the time function
in update, it does some calculations based on the time
its not exactly what you want
but its the idea
how could i shuffle the played hand?
also, what exactly would i replace with SMODS.add_card{ set = "Base", suit = "S" }, in the code for MLK Joker
can I provide nil for rank or suit arguments in SMODS.change_base
yes
🔥
all of these blocks, and just replace S with the corresponding suit (you can use the letter or the full name)
this is a bit better
G.E_MANAGER:add_event(Event({
func = function()
SMODS.add_card{ set = "Base", suit = "S", key_append = self.key.. "create" } -- key_append is the seed
return true
end
}))
you will lose some of the animation but i would look at vanillaremade after to recreate it without doing all of this
these blocks didnt send the pic
also the return is kinda broken
thought twas some pwx code since it looked similar
this is old vanilla code
so replace the blocks in the image?
yeah
ight
i mean the four similar blocks
yeah
would this work as card shuffling code?
so i think i did something wrong, the game crashes when i discard but when i sell it works fine
oh and the playing function works too
no, it will be too late at that point in scoring
this seems like jokerforge jank, let me see
ight
would it be context.before
thats also too late, it would be press_play but that code wouldnt work because G.play doesnt exist
im not sure what the code for it would be
like this
oh thanks
oh the selling_self one needs area = G.deck in the add_cards
because it will add them to hand in the shop and stuff lol
ight cool
thanks N'
this is why WE love you
son 😭
if context.discard then
if context.other_card:is_suit("Spades") or context.other_card:is_suit("Clubs") then
G.E_MANAGER:add_event(Event({
func = function()
local added_cards = {}
added_cards[#added_cards + 1] = SMODS.add_card { set = "Base", suit = "S", key_append = self.key .. "create", area = G.deck }
added_cards[#added_cards + 1] = SMODS.add_card { set = "Base", suit = "C", key_append = self.key .. "create", area = G.deck }
SMODS.calculate_context({ playing_card_added = true, cards = added_cards })
return true
end
}))
return {
message = "+1 Spade",
extra = {
message = "+1 Club",
}
}
end
end
if context.individual and context.cardarea == G.play then
if context.other_card:is_suit("Hearts") or context.other_card:is_suit("Diamonds") then
G.E_MANAGER:add_event(Event({
func = function()
local added_cards = {}
added_cards[#added_cards + 1] = SMODS.add_card { set = "Base", suit = "S", key_append = self.key .. "create", area = G.deck }
added_cards[#added_cards + 1] = SMODS.add_card { set = "Base", suit = "C", key_append = self.key .. "create", area = G.deck }
SMODS.calculate_context({ playing_card_added = true, cards = added_cards })
return true
end
}))
return {
message = "+1 Spade",
extra = {
message = "+1 Club",
colour = G.C.GREEN
}
}
end
end
if context.selling_self then
G.E_MANAGER:add_event(Event({
func = function()
local added_cards = {}
added_cards[#added_cards + 1] = SMODS.add_card { set = "Base", suit = "D", key_append = self.key .. "create", area = G.deck }
added_cards[#added_cards + 1] = SMODS.add_card { set = "Base", suit = "H", key_append = self.key .. "create", area = G.deck }
added_cards[#added_cards + 1] = SMODS.add_card { set = "Base", suit = "S", key_append = self.key .. "create", area = G.deck }
added_cards[#added_cards + 1] = SMODS.add_card { set = "Base", suit = "C", key_append = self.key .. "create", area = G.deck }
SMODS.calculate_context({ playing_card_added = true, cards = added_cards })
return true
end
}))
return {
message = "+1 Diamond",
extra = {
message = "+1 Heart",
extra = {
message = "+1 Spade",
extra = {
message = "+1 Club",
}
}
}
}
end
end```
idk gng 😭
no message 
hm
how could I change the base chips a card scores
i dont knowwww
hook get_chip_bonus iirc
i tried changing card.base.nominal and this happened
each has a different effect, and plays different music parts of 8-3
yeah
if i can get the blind icon working
then it'll be amazing
frankly the best thing ever
whos frank
I tried if card.seal, if card.seal == true, if has_seal, if has_seal == true, idk, I'm so lost qwq
if card.seal then should work
have you tried without the seal check to see if it debuffs correctly
goo d idea brb
How do I make my own play button trigger context.press_play?
self.buttons = UIBox {
definition = create_UIBox_buttons(),
config = { align = "bm", offset = { x = 0, y = 0.3 }, major = G.hand, bond = 'Weak' }
}
end
if self.buttons and not self.buttons.states.visible and not self.deck_preview then
self.buttons.states.visible = true
end```
Here's the whole file, if needed
Just add SMODS.calculate_context({ press_play = true }) to button function.
okay its scoring right but won't display properly
you probably need to patch where it displays
yep
I don't understand where it needs to be...
idk how but I fixed but I didn't change anything
key = 'miniwage',
loc_txt = {
name = 'Minimum Wage Working Joker',
text = {
'After {C:attention}60 minutes,{} gain {C:gold}$7{}',
}
},
atlas = 'miniwage',
pos = { x = 0, y = 0 },
rarity = 1,
cost = 2,
blueprint_compat = false,
eternal_compat = true,
perishable_compat = true,
unlocked = true,
discovered = true,
pools = { ['shit'] = true, },
config = { start = 0, inblind = 0, time = 5, timecolor = copy_table(G.C.GREEN), extra = { dollars = 7 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.dollars } }
end,
update = function(self, card)
local time = 5 - (G.TIMERS.REAL - card.ability.start) * card.ability.inblind
if time <= 0 then
card.ability.timecolor[1] = G.C.RED[1]
card.ability.timecolor[2] = G.C.RED[2]
card.ability.timecolor[3] = G.C.RED[3]
card.ability.timecolor[4] = G.C.RED[4]
card.ability.time = "00:00"
else
card.ability.timecolor[1] = G.C.GREEN[1]
card.ability.timecolor[2] = G.C.GREEN[2]
card.ability.timecolor[3] = G.C.GREEN[3]
card.ability.timecolor[4] = G.C.RED[4]
card.ability.time = string.gsub(string.format("%.2f", time), "%.", ":")
end
if time == 0 then
return card.ability.extra.dollars
end
calculate = function(self, card, context)
if context.blueprint then return end
if context.add_to_deck then
card.children.timer = UIBox { definition = { n = G.UIT.ROOT,
config = { align = "cm", colour = { 0, 0, 0, 0 } },
nodes = {
{
n = G.UIT.O,
config = {
object = DynaText {
string = { {
ref_table = card.ability,
ref_value = "time" } },
scale = 1.2,
shadow = true,
colours = { card.ability.timecolor }
},
align = 'cm'
}
}
} }, config = { align = 'cm', major = card, parent = card } }
card.ability.start = G.TIMERS.REAL
card.ability.inblind = 1
return {
func = function()
G.E_MANAGER:add_event(Event({
trigger = 'immediate',
func = function()
return true
end
}))
end,
}
end
end
}```
what now
ignore time being 5 instead of 3600
Holy wall of code OwO
wrong spot lmao
WWW
Depending on when you want it to trigger in said function.
The moment it gets clicked. But what function? The create_UIBox_buttons() from definition = create_UIBox_buttons(),?
I guess it works now, I didn't change anything qwq
bump i lied
ignore error message the joker js doesnt do anything
why isn't this doing anything?
...the function that your button calls...
very important bump
...why are you return-ing in update?
If you just want to give money, either SMODS.calculate_effect({ dollars = card.ability.extra.dollars}, card) or ease_dollars(card.ability.extra.dollars).
Firstly, sorry for being so dumb earlier. Brain wasn't working correctly. Secondly, that doesn't fix my problem. My custom buttons don't retrigger... When I press them, they only work the first time. Also, sometimes they just don't load at all and I don't know what I can do to fix those. Tried some things, didn't work =/
🤷 I am not advanced enough to assist in such.
All good. Do you know someone that might be able to help?
Is there a LUA template that I could use to make my own mod?
uhhh you could reference vanillaremade, it has examples of how like every object in the game works
but idk about like a proper template
{s:0.7,X:zwp_pure_evil,C:white,E:1}Pure Evil{}
when this shows up in game, the "Pure Evil" part of it becomes one word instead of 2
and idk whats wrong with it
X doesn't work with spaces.
what lizzie said but there's also a blank template in the SMODS examples repo + more examples and the vanillaremade wiki has a step by step starting guide with an starter mod
BUMP
What is the goal?




