#💻・modding-dev
1 messages · Page 450 of 1
just substracting from hand_space (and making sure it doesnt go under 0) should work
but there are cards in hand when you draw the second time
what does that mean?
yeah but im editing the space before then
but this solution works better too
N' I checked the console and saw this
like so?
it means it missed the patch because it couldnt find the line
then how do I get it to find the spesific line
i would do hand_space = math.max(0, hand_space-1)
look at the lovely/dump and copy the whole line
awesome
this
Hello lovely devs
also for the chance effect would i hook or patch
cross my mod
does it lose the enhancement or just the effect?
enhancement
not sure what you meant by that but honestly how do I get the whole parts line thing?
should probably say that
I was trying to get he _4 one
i would do it in the same hook probably
so hook not patch
sorry, same patch
is it possible to have the house boss blind effect in a joker?
was it something like this?
realizing i can probably just ask this generally
does anyone know why this causes my framerate to hit rock bottom?
like it works, but only after like 8 minutes of powerpoint slides
(image 1: main file, image 2: patch)
i see i see
what you posted before looked right to me idk
then what would be the issue was it the regqx?
so in the cards ability extra i have odds, to calculate the chance i would do
if pseudorandom('glink nuggets') < G.GAME.probabilities.normal / card.ability.extra.odds then
can i see the patch
what is context.to_area
this is the code I had:
this does not need to be a regex patch
just use a pattern patch
the area the card is drawn to
i see
I did it but somehow the code that tricks the game that it's a four of a kind isn't working
how do i set the cards enhancement to nothing and display a message (and what message would i display if its about light)
is this a correct way to identify all the sealed cards? if not please send a correct argument cannot find anything in docs
i think it's v.seal
also whats the hand size global, need it for beaming overdraw fix
if v.seal then
thanks
G.hand.config.card_limit
and this?
to display a message you do SMODS.calculate_effect({ message = "your message"}, card)
for the other one idk
maybe card:set_ability("c_base")?
i need to have a for loop somewhere- actually wait can i just do i check to see if the amount of cards in hand is >= hand size?
Is there a way to make a card give a higher selection limit like some do in Cryptid?
-# i was gonna say Cybrid but I know that's wrong
CardArea.config.highlighted_limit = config.highlight_limit or 5
that didnt work
if you mean for play/discard then
like. play, discard, AND select
yeah that handles it
check the dump
but also you don't need to patch a whole function
just put it in your mod and then use it where you need it
my logic is sound right?
calculate = function(self, card, context)
if context.first_hand_drawn and not context.blueprint then
for _, v in ipairs(G.hand.cards) do
if v.ability.play_flipped ~= true then
v.ability.play_flipped = true
v:flip()
end
end
end
if context.individual and context.cardarea == G.play then
if context.other_card.ability.play_flipped then
return {
Xmult = card.ability.extra.xmult,
colour = G.C.PURPLE
}
end
end
-- Cleanup after scoring
if context.end_of_round then
for _, v in ipairs(G.hand.cards) do
if v.ability.play_flipped then
v.ability.play_flipped = nil
v:flip()
end
end
end
end
}
am i doing this right?
message needs to be supplied for the colour part
I'm trying to check
if i delete the color?
but I don't know where I can look in the dump
case sensitive?
itll still work, just the message wont be colored unless you supply your own
it worked
I've been trying to look in the dump
and I couldn't find anything
I'm freaking out
I thought te patch would work
but...
Now...
I need a direct link for the actual dump
I think I might be looking at the wrong dump
it's in your mods folder under lovely/dump
how do you disable cards sorting
i think you would need to patch where the buttons get created to add a function that disables them
my logic is sound? because its not working for some reason, still overdraws
I think the problem is probably the entire code itself
i made a prototype of a mod but when i load in the game it just doesnt do anything..? i have the lovely thing .dll in my mod folder but is there anything else i have to do
you're only checking before the loop so it will overdraw inside the loop
gonna ask again here - i never quite figured this out
oh wait no nvm i misread
patch to?
take your time
it might be because of event timing idk
oh my god.
-# i'll uhhhhh just wait until somecom is back 😭
search for {n=G.UIT.T, config={text = localize('k_suit'), scale = text_scale*0.7, colour = G.C.UI.TEXT_LIGHT}}
besides everything else works fine without the check so maybe ill just keep this as a bonus of beaming cards
operator_node_shit = function(e)
if e.children[1] and not e.children[1].config.is_thing then
print("Updating child...")
e.children[1]:remove()
e.children[1] = nil
e.UIBox:add_child{n=G.UIT.T, config={is_thing = true, text = "+", scale = 2, colour = G.C.BLUE, shadow = true}}
end
end
this is getting called correctly, but
it's yeeting the entire sidebar
thanks
can i see the full screenshot
any idea how to fix this?
Is it only copying one joker?
it's
- copying the costumed keys again ("j_hpfx_reprint" instead of "j_misprint")
- copying the IJIRAQ???
- i literally do not have the framerate to see if it can copy more than one (my game does not make it that far)
but since the fake misprint has to turn into ijiraq, it DID copy properly, as it turned into itself
It shouldn't be lagging because I copied about, 100 jokers, and there wasn't much lag.
Yes, but if the list has 2050 entries as it seems, that would cause lag probably.
@formal parrot so like, i want to put the position mult in my description, how do i put the position_mult into the loc_vars
and yet i cant get past 1 😭
which is why i was asking about the function, since i had to do that by hand i wanted to make sure i didnt mess it up
how can i get the effect clear and the message to line up?
Position mult c
?
c?
Typo
Put the clearing in an event.
No c
it is
No, it's not, remove the event.
oh yeah its my local function
wh- huh?
Hmmm , i think i know
you need to put the set_ability part in its own event
do tell
oh
Attender
The message from SMODS.calculate_effect is in an event itself, so you're putting an event in an event but the func is not in an event.
attender?
Wait bro
bruh
this is crashing with "attempt to index 'card' (a nil value)" - it's copied directly from the take_ownership function in game_object.lua, the only difference is the thing near the start which checks for the presence of a joker and checks whether the scored card is a king. looking at the stack trace it seems like the problem is with the get_id() bit, but i have no idea why that should be failing
SMODS.Enhancement:take_ownership('glass', {
calculate = function(self, card, context)
if (not (next(SMODS.find_card("j_scp_mediator")) and card.get_id() ~= 13)) and context.destroy_card and (context.cardarea == G.play) and (context.destroy_card == card) and (pseudorandom('glass') < G.GAME.probabilities.normal / card.ability.extra) then
card.glass_trigger = true
return { remove = true }
end
end,
}
)
ok but why in the world would it be adding that many
like this?
You just do the same in loc_vars
It seems you put self.config.center.key instead of self.config.center_key
card:get_id()
as in?
local mult = 0
—Your for ,
return { vars = {mult*i } }
end,```
your for?
The one in calculate
ill see if this fixes the lag
The for loop
this may look stupid but hear me out
Wait i’ll find an example
(You’re too smart for ts)
???????????????/
Replace G.playing_cards by G.jokers
G.jokers.cards
As the boss said ⬆️
thanks people
started a run, got supernova
triggered it
(there are 420 entries. the other 418 are ijiraq)
Perhaps it has something to do with how you are putting the keys in the table?
is there any way to make particles appear on the cards when getting shimmered
Yes.
like in the patch? or during the transformation?
Mr poly bridge 😭
can suits have a calculate?
Oh yeah, been meaning to ask @red flower, I've managed to create a toggleable cardarea thanks to you, called it G.mechanic_sprites
But there's a problem, if I place cards like Jokers into it via draw_card(G.play, G.mechanic_sprites, 90, 'up', nil),
I can't modify it or change it, such it changing its loc_txt or pos mid-calculation, and I haven't tested if Jokers added to it will carry out its effects as intended
Any insights?
No.
Its called draw step
Why😭
even more confusing
Its 7 lines maximum
i just want silly particles 😭
want to make a suit that gives 10x chips of what others give, so a two would give 20 chips, a 3 30 etc
can i at least wrap it in a function to call over and over for a bunch of other things
You can add a game object
Or a deck
Can you add new suits ? I think you can
i wouldnt use draw_card, i would emplace them manually
and they won't have effects unless you patch the area into the calculation pipeline
i dont understand the pos and loc_txt thing
whats a game object
Partner mod has these little card buddies that has different effects
Maybe you can code a game object similar to it
You would probably hook Card:get_chip_bonus()
For example, things like card.children.center:set_sprite_pos doesn't work if the Joker is in the new cardarea instead of G.jokers
i dont see why it wouldnt
Anything from jokers to cards is a game object
where? in ths smods.suit?
Unfortunately it didn't work for me, but since you pointed out to not use draw_card, maybe I've been adding Jokers wrong?
This is how I went about it
for i = 1, 1 do
local card = Card(G.play.T.x + G.play.T.w / 2, G.play.T.y, G.CARD_W, G.CARD_H,
nil,
G.P_CENTERS.j_fm_operator_panel)
card:start_materialize({G.C.SECONDARY_SET.Enhanced})
G.play:emplace(card)
draw_card(G.play, G.mechanic_sprites, 90, 'up', nil)
end
No.
@formal parrot what do i do with this
how do i make a simple config page
I have a Joker that changes its description when a card with a special sticker is scored
It's one of the interactions that won't go through if I put it in my new cardarea
You see the for in your calculate function?
Replace it with that one
local oldcardgetchipbonus = Card.get_chip_bonus
function Card:get_chip_bonus()
local g = oldcardgetchipbonus(self)
if self:is_suit("modprefix_key") then g = g * 10 end
return g
end
try changing Card(...) for SMODS.create_card{ key = "j_fm_operator_panel", area = G.play }
anyone?
visualization of what i mean with my question of "which one?"
idk if im doing this right
check jokerdisplay
👍
Good job
that one's is written by eremel
first google result for me
check jokerdisplays config code?
D:
yes
Eremel so good at Balatro codding he's adding typos too
yes
thunk arc
Kinda stupid
I should stop coding after a night of raiding
Eremel raided my house
wow im assuming
He took everything
I see the issue now, when I told you to replace SEALS.get_quantum_jokers(card) I meant replace it with copy_table(yourtable)
assuming what
-# 
wow
OHHHHHH I SEE
Eremel please document the rest smods functions i beg 🙏
whoa
something something unexpected symbol @formal parrot
for i = 1, 1 do
local card = SMODS.create_card{ key = "j_fm_operator_panel", area = G.play }
card:start_materialize({G.C.SECONDARY_SET.Enhanced})
G.play:emplace(card)
draw_card(G.play, G.mechanics_sprites, 90, 'up', nil)
end
The Joker for some reason appeared with a Foil edition before instantly crashing with an error attempt to upvalue 'to' (a nil value) that took place in functions/common_events.lua
truth nuke
how does one do this
numberator is kinda crazy
okay i fixed that but it's now going into an infinite loop when i select a glass card - seemingly get_id() has to check the card's enhancements to see if it's stone, which ends up calling this same calculate function recursively
Also you probably want to check that the key is the joker you want this to happen on, because this would probably happen on any joker, as long as the table exists.
Can i see the crash ?
oh yeah thats quantum enhancements
put the context check before eveything else
that looks like you're missing an end no
again?
wdym again
OH
i thought you have to do that inside config
lol
where would i put that? cause obv itd just be a if card config center key blabla
now what do i put in config
is this the girl from 100% orange juice
At the top, where you're checking if the table exists.
..pos_mult?
i shouldnt be drinking before this
YOU ARE DRINKING WATER
NOT SO WATER
I guess my hands just default to typing number 🤷♂️
Yes.
that worked thanks! now how would i change the cards description to say it gives 60 chips instead of 6?
test time then
Oh god it's getting worse
for i = 1, 1 do
local card = SMODS.create_card{ key = "j_fm_operator_panel", area = G.mechanic_sprites }
card:start_materialize({G.C.SECONDARY_SET.Enhanced})
G.play:emplace(card)
end
Hang on
try just SMODS.add_card{ key = "j_fm_operator_panel", area = G.mechanic_sprites } without the emplace
I'm a fucking idot
that will not have the animation tho
why isn't the patches working?
I did get patches to work to inject but it's not activating what I wanted:
I want to have the joker to convert the three of a kind into a four of a kind.
Wouldn't you hook evaluate_poker_hand for that?
It did put the Joker in the new cardarea, but like I said before, the interactions with the Joker (like changing its description or pos) aren't working
weird
I guess the new cardarea isn't technically a true G.jokers area
it shouldnt matter, my new areas work fine
Hmmm
with loc_vars and everything
i think i done goofed something up
Grup
gurp
likI tried.
or atleast Idid
how do I do that?
when does card.ability.extra.state get modified
...the costume isnt transforming
how does evaluate_poker_hand work when it's not.
Right inside the Operator Panel's calculate
calculate = function(self, card, context)
if context.joker_main then
for _, scoredCard in ipairs(context.scoring_hand) do
if scoredCard.ability.fm_scanner then
card.ability.extra.state = "scanner"
card:juice_up()
card.children.center:set_sprite_pos({ x = 3, y = 0 })
return {
message = "Scanned!",
sound = "fm_fallen_crypt_scanner",
colour = G.C.ORANGE
}
end
end
end
end
what is dictating the align here
Something like this:
oh well then yeah, like I said you need to patch it into the calculation pipeline for the effects
what are these??
Huh
Where do I start looking into that
Like where do I patch it into, what should the payload be, etc
Alright. I did try that but I couldn't locate "cry_exploit_override."
what did you mean by "this to happen on" here? like what is "this"
originally
alignment of the uibox
tm = top middle
cm = center middle
it's explained in one of the files
It's just the key of the hand.
then whys bro over here
idk whats the whole code
alright good to know
@lament agate send ss of loc_vars
let me try something
i stole it from better mouse and gamepad
its just a config menu
i think its what smods wiki tells you to do anyway
loc_vars = function(self, info_queue, card)
local position_mult = 0
if G.jokers.cards then
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card then
position_mult = i * card.ability.extra.base_mult
end
end
end
return { vars = { card.ability.extra.base_mult, card.ability.extra.base_mult + position_mult } }
end,
unlock
Jk
You’re kinda stupid
no idea, create_toggle might have the wrong default alignment for your case
angr
how chnage align
loc_vars = function(self, info_queue, card)
local position_mult = 0
if G.jokers.cards then
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card then
position_mult = i * card.ability.extra.base_mult
end
end
end
return { vars = { card.ability.extra.base_mult,position_mult } }
end,
unlock
IM TRYING
local variables reset every time calculate is called
oh
idk i dont have the code with me rn
No you get a cookie for trying 🍪
AY ITS DOWN EHRE NOW
this joker (aces score x1.5 mult) is mostly working, except that for some reason the joker itself is scoring an extra x1.5 after all the cards are scored? there's no context.joker_main in here so i've got no clue why it should be doing anything at that point?
gurp
save the Xmult to config.extra not to config
ty
Gurp
how do you add more picks in booster pack
while having jokers that give you it
for example now you can pick 2
Add_to_deck
or 3 in mega
Check cryptid
any way to make the toggle box look like my markup above
yeah which
Hang on
Is this patch patching into your own mod's files
Christ I am not prepared for this level of depth
Idk i don’t play cryptid , you do
like this?
it's patching into SMODS's src/utils
god dnmanit
No, init is cryptid specific.
Well I tried to make it somehow but... yeah.
oh then what would be for regular balatro mods?
update?
not putting it inside the joker
or how is it suppsoed to be correct?
@daring fern any idea?
this is probably getting into ui wizard territory but i jsut wany config descriptors 😭
outside the joker?
yes
thanks
so now I got this what's next?
I see
Yeah I was asking that since the patch didn't recognize anything
Do you just lump the entire SMODS src folder into your mod folder
So that's all for this code?
🙏
was there anything for like "current_hand" ?
no
fixed the transformation thing, but:
- it DOES store the key in the table properly,
- it doesnt become part of the joker
Lovely patches 😭
what version of lovely
yeah thats why im not doing it LMAO
gotta think of something else for spoonful joker
Lovely 0.6.0
update
guh
let me print check this first actually
What do you mean it doesnt become part of the joker?
ijiraq doesnt gain the effect
@daring fern what's next for this?
I end up doing this next
Did you define current_hand?
fibonacci turns into ijiraq, but ijiraq doesnt get fibonacci effect
not sure what you'd mean by that.
like assign to function?
like I just did on this image?
Did you define replacing_hand?
...no?
gonna run a print("test") to see if it reaches it
You need to define it.
how?
remind me
or elaborate
I'm asking How?
was I suppoed to like assign something?
or how I can define it?
like this?
replacing_hand = {}?
I feel like I'm crazy the way how it's going on.
Sorry about that
I just felt a bit lost or didn't quite understand.
hey gang how does one make a joker change the money per unused hand
I know how decks can do it but idk how to make that happen with jonklers
@red flower help me on this since obviously I didn't quite catch exactly.
seems complicated
or even understand what Something meant
and he didn't elaborate how it works or how it was done?
Cause honestly I'm almsot close
🤷
Got it updated to 0.8.0
No more of that lovely error, but still no interactions with Jokers in the new cardarea, despite the patch
I think part of the reason is because I didn't get the code for creating the new cardarea from you, it was from another person who made the cinema themed mod
Maybe something isn't lining up
since earlier I tried the cryptid code and I was lost to understand.
@hushed field
or is it reverie
Forgot, but it was from this
https://gist.github.com/dvrp0/c2581403576c4140e0224e47564e16c5
Yep it's reverie
I assume Reverie because while I do add a cardarea there, it's kinda specific in its behaviour
ah, yeah
Can anyone please help me how exactly what define meant for replacing_hand?
I have trouble trying to think what it is.
at this point
@daring fern I know I hate to ping but I just want to know or atleast maybe give a hint, how can I define that when I had it like put the replacing hand right next to the function.
I know I sorta freaked out
not knowing what you meant by that.
I'd even asked if this is what you meant.
wait was it actually this?
i mean it does seem above your knowledge level, no offense
that's what I'm afraid of
like I said before I will look into it after work to see if I can add a context for it to smods
Yeah cause honestly
I don't know exactyl what he meant by define for replacing hand
but i will need to have the code and the game with me to know how to do it
if you needed the code I'll rpovide it here or in DMS.
cause right now I need a break
nah, i mean the game's code
oh.
but yeah, honestly. it's actually a bit akward on how Something just usually straight up ignored what I'm asking about that if what I guessed was right.
and I actually felt embarrased for having a panic attack.
maybe he's busy and hasn't seen it yet
oh.
WHAT DID I DO 😭
hopefully cause honestly sometimes I just hate that just happens.
without having to know
what's going on.
so yeah, in a way sorry too.
it was sorta out-of-character of me to be somewhat thought I was being ignored without realizing since well.
I've tried to get it to work and yet it's not that simple
it is
Y'know what I'm gonna take a break now.
I don't know when he'll be responding
but yeah
probably best if I can take a break
each T node has to be in its own R node
😭
UI is sorcery
Howdy yall, apologies if this is a strange place to ask this, but I'm a complete beginner to Lua, and I'm currently learning using VSCode. I'm having an issue with creating comments in the VSCode editor, where comments seem to be displaying as a completely different syntax. As an example, pictured below is very simple text that should be displaying in the terminal whenever the program is run. However, upon actually running the program, I get the error in the second image. Would anyone be able to help me figure out what's happening?
HOLY SHIT
what are you using to run it
THAT WORKED FIRST TRY
just gotta do some tweaking and itll good good
then i can finally localize gurp
too small?
could you try doing a multiline comment, with --[[ like this ]]--
i'm running it all within VSCode. I just realized there's a Python Debugger that keeps coming up, would that have anything to do with it? My hunch is maybe it's reading it in Python, even though I'm trying to code in Lua
I think I'm good at sorcery
perfect
yeah thats what i was thinking
vscode doesnt run lua by default
the thing that is baffling me now is that I have the Python debugger extension uninstalled
idk why it's still popping up
Gurp
idk
thanks for the guidance, i'll try to figure this garbo out lol
for me, i'm trying to make a blueprint that copies the effect of the joker to the left and to the right, but i keep getting the error that "x is a nil value" on the "x.extra = y" line
am i supposed to be doing something else to add the second ability onto the first.
calculate = function(self, card, context)
local other_joker = nil
local other_other_joker = nil
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card then other_other_joker = G.jokers.cards[i - 1] end
end
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card then other_joker = G.jokers.cards[i + 1] end
end
local x = SMODS.blueprint_effect(card, other_other_joker, context)
local y = SMODS.blueprint_effect(card, other_joker, context)
x.extra = y
return x
end```
try return SMODS.merge_effects({x, y})
works perfectly, thank you
I actually managed to get it fucking working @red flower
local start_run_ref = Game.start_run
function Game:start_run(args)
-- Create the mechanic_sprites CardArea
self.fm_mechanic_sprites = CardArea(
0,
0,
self.CARD_W * 7,
self.CARD_H * 0.95,
{
card_limit = 5,
type = 'mechanic_sprites',
highlight_limit = 1,
}
)
Fatemaker.mechanic_sprites = G.fm_mechanic_sprites
G.mechanic_sprites = self.fm_mechanic_sprites
I changed jokers to mechanic_sprites in the type value
game crashes if i highlight over the object with this loc_var check
only if i do it from the main menu
is there another way of doing that check?
nil check G.GAME.blind
But now the current problem is that the Jokers are invisible in the new cardarea
for i = 1, 1 do
local card = SMODS.add_card{ key = "j_fm_operator_panel", area = G.mechanic_sprites }
card:start_materialize({G.C.SECONDARY_SET.Enhanced})
end
But I can confirm that in the background it works, it takes up space in the cardarea, and there is a return function that makes the Joker play a sound when I score a card with a special sticker
i think if you don't have a defined type it doesn't know how to display them
like 'mechanic_sprites' is not a defined type
i hook some functions for the 'extra_deck' type to work in my mod
I see I see
Hang on I'm still trying to dissect your mod, can you show me where you defined them
Is it still in extra_deck.lua
uhhh no idea :3
Damn
any way to even this space
This is a maze and a half
just looked it up, some of it is in there some is in general_ui.lua
i did this like half a year ago at this point
Gurp
Ogh man yeah that is a LOT of code
how would I dynamically update the weight of a booster pack?
increased width and it increased the margin
Like i've tried something like this but it requires you to reload
It’s got the wrong alignment
thats what ima tryna figure out
but this all looks aligned
You have columns with cl
those are for the text
here ill align them so you can see
ok i mean it kinda aligned
but i want the text to be aligned to the left
You need more nesting then
my disk has been filling up a bunch every time i relaunch balala
is that a concern?
Clear your logs friend
where
How can i get the current mod in a lovely patch
mods>lovely>logs?
I mean like SMODS.current_mod
also SO CLOSE
there's no current mod
you can do SMODS.find_mod("modid")[1]
cleared the logs but i dont think it should be taking up over 6 gigs of space
it didnt clear
how do i fix this 😭
It's claiming that SMODS is nil
weird what are you patching
main.lua and =[SMODS _ "src/loader.lua"], though i don't think it claimed the 2nd as nil
maybe the part in main.lua is before SMODS even loads
The 2nd claims mods is nil
maybe that's before mods are loaded lol
Is there another way? i'm trying to stop the lovely file from loading if somethings false.
no idea honestly
What are you trying to do, actually?
config menu with that little descriptor
I see. This thing was kinda problem for me too
did you copy the create_toggle and modify it like i did?
It was made before I added localization
honestly for my first ui thing i think i did a pretty good job
Looks good so far, yea
heres me glazing my module by putting your not mentally insane text inside (non-gurp)
i wonder if anyones done this before
Better make a bigger gap between title and desc
And btw my descriptions so long so I'm using popups for it
true, do i know how? no lol
experimenting with something
Depends on how you display this lines
If it's C you can add another R with minh = 0.05 for example, or set padding = 0.05 for this C
Up to you
shadow = true
active_colour and inactive_colour you can pss into create_toggle
SMODS.Operator {
key = "base",
func = function(chips, mult) return chips * mult end,
node_func = function(e)
local op = e.children[1]
op.config.text = "X"
op.config.text_drawable:set("X")
op.UIBox:recalculate()
op.config.colour = G.C.UI_MULT
end
}
- \✅ I didn't make new lovely files or all new lovely files have appropriate priority.

or all new lovely files have appropriate priority.
Damn, you got me
i know, but i need new colors
to make the color look not red they have to be slightly blue
I mean some sort of description for what the pr does and how it functions would be helpful
Otherwise I will let it rot for months
SMODS.Operator {
key = "balance",
func = function(chips, mult) local avg = (chips + mult) / 2 return avg * avg end,
node_func = function(e)
local op = e.children[1]
op.config.text = "X"
op.config.text_drawable:set("X")
op.UIBox:recalculate()
op.config.colour = -- plasma color
end
}
lol
will do but i work in 30 minutes
so
this looks nice
that will be. delayed for a bit
Then dont submit your PR if it’s not ready
forgot to say, but yeah the condition just doesnt fulfill
this also disables the effects of the costumes??
This part of PR also weird
Isn't this global change should be added separately and be tested?
images aren't loading 1s
yea i can remove that lol
i tripped on it so i thought it would be nice to add a check for it since doing SMODS:GameObject {...} is always wrong - you'd want SMODS.GameObject {...}
oop gtg
alright look at this, this looks ok right?
anyone know how to fix this??
Sorry super amatuer here. I am trying to get more joker data here and have a single card fetching funciton to do so. What attributes in the shop cards show joker description and cost of the card? If there's a central reference for the game state object I can read that, just don't know where to find it.
I made this code (on a seal) to change the seal's sprite if a certain joker is present, but instead it seems to be removing the cards sprite and only leaving the seal sprite without it being changed. how could i fix it? ```lua
if G.GAME and G.jokers and #G.jokers.cards > 0 then
for key,playing_card in ipairs(G.jokers.cards) do
if playing_card.config.center.key == "j_shoomimi" then
card.config.center.pos = { x = 7 , y = 0 }
break
else
card.config.center.pos = { x = 8 , y = 0 }
end
end
end
How does one retrigger a card until probabilities occur?
Yes, but where?
Also I already know when the probabilities trigger, I just don't know what to do to make it retrigger until that happens.
update: it's specifically that conditional that's checking for ijiraq that disables it
i remove it and it runs
other jokers still dont trigger though
BUT the effect of the saved joker does get copied properly
tldr: almost there! so...so close...
isnt there a retrigger function
also mr poly bridge is my first ui good
Yes, but that's for counting retriggers pre-calculation.
uhhh
I need to alter retrigger counts during calculation.
whats the end goal, lucky card?
No, any card or joker or anything that uses the new SMODS probability functions.
hmmm
Because that's how I'm checking that it has triggered.
wouldnt a while loop until the chance happens work?
Yes, it worked kind of but it didn't because it requires an initial retrigger.
I’m not sure what you’re looking for; also why can’t you look directly at the Card?
this?
no idea then
how would i detect when a wild card is scored
I am looking for all available metadata on a card in the shop. What i've shown here is an API layer that reads the gamestate. I admit I am uneducated here so I am not sure what you mean by look directly at the Card. Like fewer wrapper functions? or is there other gamestate/context to read from?
if context.individual and context.cardarea == G.play and SMODS.has_enhancement(context.other_card, "m_wild")
You are taking data from the card and saving it to a table, but you have the card
Naturally the card itself provides all information it has on its object
why would the abilities of the other jokers just not trigger anymore, though? the exceptions are completely busted too
would one be able to acess the dev menu using controller inputs? i mainly want to try with joycons but i have no experience with this sort of stuff
calculate on consumables is for having them held in hand right
Ah my mistake. Yeah, I am sending the data to a python bot over UDP so I just get a subset of the total gamestate. My main problem is I don't know what that Card object looks like
You can read the source code for the definition
hello chat of developers
I guess smods source?
Hello dilly
hi :D
hope you are well
Oh really
I am not but thank you. I hope you’re well
im sorry to hear that =[
damn hope you get to feeling better Victin, you're making my day better already
Ice has complimented your mod which has me interested 👀
is there a way i can have a constantly changing bool value that dictates if certain consumables, jokers, and booster packs are visible
like if they appear in shop
its s config
What are you using it for
to disable certain jokers, boosters, and consumables from appearing in shops
No problem
can someone tell me how to locate my joker.lua in my main.lua file?
You can make something like Cavendish or the Enhancement-gated Jokers
i know theres in_pool but how does it work, and can i connect it up to a truwe and false, like a in_pool = config.items
Don’t
Just check if it’s possible for the object to spawn
wdym
Ask yourself under what conditions would the object be unable to spawn
The write a function that verifies whether or not those conditions apply
he did? :0
i gotta see
i dont see it when i search my name so i will simply take your word for it
im glad he liked it though since he has an awesome mod
How would I make it so that Legendary jokers can appear in the shop? I tried overwriting all the rarities to switch their probabilities, but Legendary jokers aren't showing up, even though they should have a 70% chance of appearing.
SMODS.Rarity:take_ownership("Legendary", {
key = "Legendary",
loc_txt = {},
default_weight = 0.7,
badge_colour = HEX("b26cbb"),
get_weight = function(self, weight, object_type)
return weight
end,
})
@hushed field release the icy files
well, you know what they say
if the mod aint good enough
its gonna get iced
iirc legendary is just not considered in the card creation
hi N my goat
hii
how are you
is there a way to detect when a run has started
im commuting home so im great i hate work
N’ showin’g a level of emotion’ n’ever before seen’
what i always reply with hiii
i wanna create a copy of a config when a run stars
isnt there a run_start or something
Yes.
how
Maybe it’s the sleep deprivation getting to me
yea N always responds to me anyway with hii
Hook Game:start_run?
And the lack of nourishment
i made some delicious burgers yesterday, i can make u some vic
and i just connect that variable up to a function
what is run_start
Do you know how I would patch legendaries back in to the shop pool? I found this bit of code in the Smods repo that deals with it, but I don't think I understand how it works
# get_current_pool
[[patches]]
[patches.regex]
target = "functions/common_events.lua"
pattern = '''(?<indent>[\t ]*)local rarity = _rarity or pseudorandom\('rarity'\.\.G\.GAME\.round_resets\.ante\.\.\(_append or ''\)\) \n[\s\S]{12}rarity = \(_legendary and 4\) or \(rarity > 0\.95 and 3\) or \(rarity > 0\.7 and 2\) or 1'''
position = "at"
payload = '''
_rarity = (_legendary and 4) or (type(_rarity) == "number" and ((_rarity > 0.95 and 3) or (_rarity > 0.7 and 2) or 1)) or _rarity
_rarity = ({Common = 1, Uncommon = 2, Rare = 3, Legendary = 4})[_rarity] or _rarity
local rarity = _rarity or SMODS.poll_rarity("Joker", 'rarity'..G.GAME.round_resets.ante..(_append or ''))
'''
you would hook SMODS.poll_rarity probably
smoes
the next time someone comments on one of my typos im blocking them
i feel like jesse from minecraft story mode rn
from what
whomsoever
the guy from breaking bad is in minecraft?
I think it’s like Dangling Ropes but Minecraft
It has a plot, choices, and death
i mean i know what story mode is i know my videogames
oh ok
Me neither
the guy on screen
he looks confused
But also I expected you’d know but I thought it would be funny to compare it to Danganronpa
Especially because I don’t know how to write Dangling Ropes
Isn’t that from One Piece
100 lines > 1 piece
that's the grand line
i mean i know what story mode grand line is i know my videogames One Piece videogames
i dont know one piece sadly
how do you do sort of "while you have the joker" effects like juggler and drunkard
add_to_deck and remove_from_deck
Uhh Calliope Mori is in it
What do you mean “false”
i made a prototype of a mod but when i load in the game it just doesnt do anything..? i have the lovely thing .dll in my mod folder but is there anything else i have to do
配信リンク:https://lnk.to/mc_miraijima
『ONE PIECE』106巻公式テーマソング「未来島 ~Future Island~」PV絶賛公開中!
https://youtu.be/-Sb4wxbHh-4
7月3日(月)新宿ユニカビジョンで行われた世界最速配信LIVEの模様も公開中!
集英社ジャンプコミックス『ONE PIECE』巻百六「天...
Do you have a Mods button
i refuse to acknowledge future island's existence
i dont thats the issue
goodbye numberator
Why
Does lovely work
mori calliope
how do iiii check if it does work
Uhhh does a terminal pop up when you start the game
nothing pops up
I wonder if your antivirus deleted Lovely
hm
Or you put it in the wrong folder
it's supposed to be in the Mods folder right
Lovely, no
that one is meant to go in the same folder as Balatro.exe
Yes
lovely adds itself in Mods too
oh god i misread this so bad
put smods in fr
how do i fix this. (it's a seal btw)
whats the issue
and whats the end goal
args doesn't even exist
smods has a thing you can return to balance stuff
i don't remember what it was rn tho
balance
glink_nugget:balance()
return { balance = true }
im making a seal balance
yeah just return balance
ah alr
How can I overwrite part of SMODS? I want to change part of smods/src/utils.lua with a patch using Lovely, but I'm not sure what the target should be set to
okay something popped up when i opened the game... now wheres the mods button supposed to be
target = '=[SMODS _ "src/utils.lua"]'
wouldnt target just be =[SMODS
or something idk
yeah
see iw as right im learning
thank you!
i couldnt read if it risked my life
why is this the back of a card from the red deck?
If you didn't give the seal an atlas or a pos it will just use the red deck sprite.
?
why doesnt balala recognise my mod :(
did you define an SMODS.Atlas somewhere
Is it in the right place ?
It should be in %appadata%balatro/mods
id assume so
Your mod needs at least a .json file and a .lua file
is there a metadata file
there are both
Thats what we were trying to do today infact somethingcom515
maybe with calculate contexts?
Then it should load
hm
Yes, but that would retrigger all jokers that use that context.
Since you can’t use while to return
let me reopen balala
ahhhh yeh thats true
no weird still doesnt show up
can i make a seal play a different sound when it appears on standard packs?
might there be something wrong with the meta...??
id think not i basically did fill in the gaps :p
you can't have comments in a json
Yea this is being displayed as javascript iirc
your avatar doesn’t have a nose so I assume that’s a mouth
Hello flowwey how are you
retriggers are calculated before any scoring happens
so you'd have to predict the future
Wtf is all of this
What do you mean
do not ask me
i copied from one of the github pages
why did you copy all of it
🥴
I want a card to retrigger until it hits a probability check.
right below that there is a "template for copying"
Yes, but couldn't I fake a retrigger?
your own card or like a lucky card?
Any card or joker or anything that uses the new SMODS probability functions.
Idk what a fake retrigger would entail
oh then that's hard yeah
Is the probability constant
What do you mean?
is this the right way to do it
SMODS.create_card('Joker', rarity = 1)
}```
i cant tell
No.
Is it 1 default
You can define constant cariable
Variables I
It shouldn't be changing.
SMODS.add_card { set = 'Joker', rarity = 'Common' } to spawn a common joker regardless of space
just SMODS.add_card{ set = 'Joker', rarity = "Common"} and nothing else
Oops all 6s does that
oh damn im slow
you're on phone
You can sample a geometric distribution
Either directly or by simulation
phone user 😞
Somthing you there?
Is there an easy way to score hands held in hand as if they were played
You can same from any distribution starting from an uniform distribution
replace_hand = "Three of a Kind"
alright.
I think I have the idea now.
sorry if this is something frustrating but yeah.
How can i make an info quene of another joker?
append G.P_CENTERS.j_prefix_key
anyone know the weight of the jumbo and mega booster packs (not like actual weight like how often they appear)
so say it was a lucky card, you'd want it to give chips X times, where X is the amount of rolls it takes to pass the probability check?
Yes.
I think you'd have to do some cursed af post trigger logic and manually running future triggers
anyone knoiw
Check in game.lua of the vanilla source
what
Look at the game's code in the game.lua file
where
Mods/lovely/dump/game.lua
Search for "buffoon" or something, they're all next each other
found it jumbo is 1 and mega is 0.25
If using config_tab, kinda hardcoded. You may want to look for .extra_tabs to have different names for tabs.
i already have names for those
i wanted to call it "Other" since i have a tab for info
i'm using a copy of vanillaremade's brainstorm but i wanted to include another action when it copies, i assume i need to add it in the bottom section where it does calculate function but i dont understand where or how i'm supposed to slot it in (i want to set money to $0 when the copy triggers, which i have code for)
Put it in the if ret then
i dont really understand why it's unexpected symbol here cuz it displays as linking back to the start of the joker
You're missing an end
oh right thanks
How can I get the winning hand ?
I saw this questions was asked before but not the answer
I know I can get the context.after or context.end_of round but this doesnt garanty that G.play.cards (or scoring_hand) is the winning hand ?
how can i do text formatting outside of joker cards
like if i wanted to format standard ui text
when hand is played, save hand, when blind is won, last saved hand is winning hand
Yeah I was wondering if there was an other way
Thanks !
@daring fern mr poly bridge do you know of this?
I don't know UI
tried this
who needs a user interface
sad
cli balatro
cursed
What's the context of this
I assume you just put it in an extra tab of your mod?
trying to formatt text in the config screen
can you show the code
Are you creating nodes
If you’re creating nodes, you just create the nodes that the commands would create for you
you need to parse the string to make the text object I believe
is there a way to auto do it?
so i can spawn text that is basically a joker description
with text formatting
Maybe
Since Balatro does it automatically for Jokers
But idk
Usually I just do it manually
how does it work, does this spawn in a text object?
Looks like it returns a text object
So try replacing your {n = G.UIT.T etc line with that
Actually wait
I think you might need to parse it before passing it to that function
you might not need to
is there a way to get a joker to detect if there's another specific joker in hand?
you definitely do
it uses what loc_parse_string returns
damn
so it should look something like SMODS.localize_box(loc_parse_string("{C:red}hi{}"), { scale = 0.4 })
that seems to return the proper ui element
i should have known ive used it actually
Me when I have no access for SMODS and needs to do it manually: 
if you can't copy from smods, copy from vanilla
try putting it under nodes directly instead of a table inside nodes
anyone know how to fix this ples
I made this in wacky way. No Idea how, but it works
yeah it looks like the scale you pass gets multiplied by another scale
So I made a legendary joker in my mod and I couldn't get it in a soul from like 100 souls I opened is it never gunna appear in it or have I done something wrong
Does it appear in collection
thats normal
Yep
I used debug to get it and it works fine
Just not coming from the soul
Did you start a new run before using the soul
Can you send your joker definition
Wait no nvm just realised I made it common by accident
why in the intro is it displaying here 😭
again, do nodes = SMODS.localize_box etc etc
don't wrap it around {}
oh right
It looks like when I am using multiple context in a calculate(), it does not reach if i do not return anything
In my code I just want to store something
if context.final_scoring_step then
myVar = #context.full_hand
end
if context.final_scoring_step then
print(myVar)
end
What can I return in order for this to work ?
