#💻・modding-dev

1 messages · Page 450 of 1

hidden sable
#

well im only drawing beaming cards first

#

then im doing the math

red flower
#

just substracting from hand_space (and making sure it doesnt go under 0) should work

red flower
tired kestrel
#

what does that mean?

hidden sable
hidden sable
tired kestrel
hidden sable
#

like so?

red flower
tired kestrel
red flower
red flower
hidden sable
#

awesome

formal parrot
#

Hello lovely devs

hidden sable
#

also for the chance effect would i hook or patch

lament agate
#

cross my mod

red flower
hidden sable
tired kestrel
hidden sable
#

should probably say that

tired kestrel
red flower
hidden sable
red flower
#

sorry, same patch

lament agate
#

is it possible to have the house boss blind effect in a joker?

tired kestrel
#

was it something like this?

hidden sable
#

cant stand these lies

sonic cedar
#

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)

red flower
tired kestrel
hidden sable
#

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

red flower
lament agate
#

what is context.to_area

tired kestrel
#

this is the code I had:

gaunt thistle
#

just use a pattern patch

red flower
lament agate
tired kestrel
hidden sable
#

how do i set the cards enhancement to nothing and display a message (and what message would i display if its about light)

pastel torrent
#

is this a correct way to identify all the sealed cards? if not please send a correct argument cannot find anything in docs

red flower
#

i think it's v.seal

hidden sable
#

also whats the hand size global, need it for beaming overdraw fix

pastel torrent
#

thanks

red flower
red flower
#

to display a message you do SMODS.calculate_effect({ message = "your message"}, card)

#

for the other one idk

#

maybe card:set_ability("c_base")?

hidden sable
#

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?

gleaming yew
#

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

tall jewel
#

CardArea.config.highlighted_limit = config.highlight_limit or 5

hidden sable
#

that didnt work

red flower
gleaming yew
red flower
#

yeah that handles it

tired kestrel
#

did this even get included?

#

to what I'm patching?

red flower
#

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

tired kestrel
#

so like no need to have it patched?

#

the whole code?

hidden sable
#

my logic is sound right?

lament agate
#
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?

hidden sable
tired kestrel
lament agate
hidden sable
#

also isnt it just xmult

#

not Xmult

tired kestrel
#

but I don't know where I can look in the dump

lament agate
hidden sable
hidden sable
#

prolly

lament agate
#

it worked

tired kestrel
#

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

red flower
#

it's in your mods folder under lovely/dump

lament agate
#

how do you disable cards sorting

tired kestrel
#

ooooh

#

it got added there

#

which is great

#

but why is it not triggering

red flower
hidden sable
tired kestrel
vapid sable
#

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

red flower
tranquil gull
#

gonna ask again here - i never quite figured this out

red flower
hidden sable
red flower
#

it might be because of event timing idk

sonic cedar
tranquil gull
red flower
# lament agate patch to?

search for {n=G.UIT.T, config={text = localize('k_suit'), scale = text_scale*0.7, colour = G.C.UI.TEXT_LIGHT}}

hidden sable
#

besides everything else works fine without the check so maybe ill just keep this as a bonus of beaming cards

tranquil gull
# tranquil gull
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

lament agate
tranquil gull
lament agate
#

nice

#

i just want to see it lmao

tranquil gull
#

any idea how to fix this?

daring fern
sonic cedar
# daring fern Is it only copying one joker?

it's

  1. copying the costumed keys again ("j_hpfx_reprint" instead of "j_misprint")
  2. copying the IJIRAQ???
  3. 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

daring fern
#

Yes, but if the list has 2050 entries as it seems, that would cause lag probably.

lament agate
#

@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

sonic cedar
hidden sable
lament agate
formal parrot
#

Typo

hidden sable
daring fern
formal parrot
#

No c

hidden sable
daring fern
lament agate
hidden sable
formal parrot
hidden sable
#

thats an event

red flower
#

you need to put the set_ability part in its own event

lament agate
hidden sable
#

oh

formal parrot
#

Attender

daring fern
# hidden sable wh- huh?

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.

lament agate
formal parrot
#

Wait bro

lament agate
#

bruh

main minnow
#

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,
  }
)
sonic cedar
hidden sable
#

like this?

formal parrot
daring fern
lament agate
main minnow
#

thanks

formal parrot
#
        local mult = 0
     
            —Your for ,
        return { vars = {mult*i } }
    end,```
lament agate
#

your for?

formal parrot
#

The one in calculate

sonic cedar
formal parrot
#

The for loop

hidden sable
#

this may look stupid but hear me out

lament agate
#

ohhh

#

wait i still dont get it

#

HOLD ON

#

let me drink some water

formal parrot
#

Wait i’ll find an example

lament agate
#

sure

#

ill wait

formal parrot
#

(You’re too smart for ts)

lament agate
#

???????????????/

formal parrot
#

Replace G.playing_cards by G.jokers

red flower
#

G.jokers.cards

formal parrot
#

As the boss said ⬆️

lament agate
#

thanks people

sonic cedar
daring fern
hidden sable
#

is there any way to make particles appear on the cards when getting shimmered

formal parrot
sonic cedar
hidden sable
#

god dammit mr poly bridge

formal parrot
#

Mr poly bridge 😭

hidden sable
#

i know theres a particle function

#

but idfk how to use it

stiff quiver
#

can suits have a calculate?

merry raven
#

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?

daring fern
formal parrot
formal parrot
hidden sable
formal parrot
hidden sable
stiff quiver
# formal parrot Why😭

want to make a suit that gives 10x chips of what others give, so a two would give 20 chips, a 3 30 etc

hidden sable
#

can i at least wrap it in a function to call over and over for a bunch of other things

formal parrot
#

Or a deck

#

Can you add new suits ? I think you can

red flower
stiff quiver
formal parrot
#

Partner mod has these little card buddies that has different effects
Maybe you can code a game object similar to it

daring fern
merry raven
formal parrot
stiff quiver
merry raven
# red flower i dont see why it wouldnt

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
daring fern
lament agate
#

@formal parrot what do i do with this

hidden sable
#

how do i make a simple config page

merry raven
#

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

formal parrot
#

Replace it with that one

daring fern
# stiff quiver where? in ths smods.suit?
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
formal parrot
#

Like

#

Copy the one in calculate and put it there

red flower
hidden sable
sonic cedar
hidden sable
#

idk if im doing this right

red flower
formal parrot
hidden sable
#

what is jokerdisplay

formal parrot
#

Good job

red flower
red flower
hidden sable
#

check jokerdisplays config code?

wintry solar
#

D:

red flower
hidden sable
#

like ingame

maiden phoenix
#

Eremel so good at Balatro codding he's adding typos too

red flower
formal parrot
#

Kinda stupid

wintry solar
#

I should stop coding after a night of raiding

formal parrot
#

Raiding

#

…..who?

maiden phoenix
#

Eremel raided my house

red flower
#

wow im assuming

maiden phoenix
#

He took everything

daring fern
# sonic cedar thunk arc

I see the issue now, when I told you to replace SEALS.get_quantum_jokers(card) I meant replace it with copy_table(yourtable)

sonic cedar
formal parrot
#

Eremel please document the rest smods functions i beg 🙏

sonic cedar
lament agate
#

something something unexpected symbol @formal parrot

wintry solar
#

no u

#

I am slowly doing calculation docs

#

They are a laborious task

merry raven
# red flower try changing Card(...) for `SMODS.create_card{ key = "j_fm_operator_panel", area...
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

sonic cedar
hidden sable
tepid crow
main minnow
red flower
daring fern
# sonic cedar truth nuke

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.

formal parrot
red flower
tepid crow
lament agate
tepid crow
#

wdym again

lament agate
#

nevermind

#

i figured it out

#

im a fucking dumbass

hidden sable
#

i thought you have to do that inside config

#

lol

formal parrot
sonic cedar
lament agate
red flower
daring fern
formal parrot
#

😭😭

lament agate
#

..pos_mult?

formal parrot
#

Duh

#

Base_mult

lament agate
#

i shouldnt be drinking before this

formal parrot
#

YOU ARE DRINKING WATER

lament agate
lament agate
wintry solar
daring fern
formal parrot
#

Yeah that’s correct

#

Does it not work ?

stiff quiver
sonic cedar
merry raven
#

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

red flower
merry raven
#

I'm a fucking idot

red flower
#

that will not have the animation tho

tired kestrel
#

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.

daring fern
merry raven
red flower
#

weird

merry raven
#

I guess the new cardarea isn't technically a true G.jokers area

red flower
#

it shouldnt matter, my new areas work fine

merry raven
#

Hmmm

red flower
#

with loc_vars and everything

hidden sable
#

i think i done goofed something up

formal parrot
#

Grup

red flower
#

gurp

tired kestrel
#

or atleast Idid

#

how do I do that?

red flower
sonic cedar
tired kestrel
merry raven
# red flower when does card.ability.extra.state get modified

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
hidden sable
#

what is dictating the align here

daring fern
red flower
hidden sable
#

what are these??

merry raven
#

Huh
Where do I start looking into that
Like where do I patch it into, what should the payload be, etc

tired kestrel
sonic cedar
tired kestrel
#

originally

red flower
daring fern
red flower
tired kestrel
#

alright good to know

formal parrot
#

@lament agate send ss of loc_vars

tired kestrel
hidden sable
formal parrot
#

Shamelessly stealing

#

Lmao

hidden sable
#

i think its what smods wiki tells you to do anyway

lament agate
# formal parrot <@326686861450018817> send ss of loc_vars
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
formal parrot
red flower
snow vale
#

why aint this working?

#

it wont destroy

formal parrot
#
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
lament agate
red flower
lament agate
#

oh ffs

#

YOU CAN JUST TELL ME THAT

red flower
formal parrot
hidden sable
#

AY ITS DOWN EHRE NOW

main minnow
#

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?

snow vale
#

gurp

red flower
main minnow
#

ty

formal parrot
#

Gurp

lament agate
#

how do you add more picks in booster pack

#

while having jokers that give you it

#

for example now you can pick 2

formal parrot
#

Add_to_deck

lament agate
#

or 3 in mega

formal parrot
#

Check cryptid

hidden sable
#

any way to make the toggle box look like my markup above

lament agate
#

yeah which

merry raven
formal parrot
tired kestrel
#

like this?

red flower
lament agate
daring fern
tired kestrel
tired kestrel
#

update?

red flower
tired kestrel
#

or how is it suppsoed to be correct?

lament agate
hidden sable
daring fern
tired kestrel
red flower
lament agate
tired kestrel
red flower
#

thats it

#

idk if the hook itself is correct tho

merry raven
tired kestrel
#

So that's all for this code?

tired kestrel
#

was there anything for like "current_hand" ?

sonic cedar
# daring fern Yes.

fixed the transformation thing, but:

  1. it DOES store the key in the table properly,
  2. it doesnt become part of the joker
formal parrot
lament agate
#

gotta think of something else for spoonful joker

merry raven
red flower
lament agate
#

SIX????

#

WHATTTTT

merry raven
#

guh

sonic cedar
daring fern
sonic cedar
tired kestrel
#

I end up doing this next

daring fern
sonic cedar
tired kestrel
#

like assign to function?

tired kestrel
daring fern
tired kestrel
sonic cedar
daring fern
tired kestrel
#

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.

gilded narwhal
#

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

tired kestrel
#

@red flower help me on this since obviously I didn't quite catch exactly.

red flower
#

seems complicated

tired kestrel
#

or even understand what Something meant

tired kestrel
#

Cause honestly I'm almsot close

red flower
#

🤷

merry raven
# red flower update

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

tired kestrel
#

since earlier I tried the cryptid code and I was lost to understand.

red flower
#

or is it reverie

merry raven
#

Yep it's reverie

hushed field
#

I assume Reverie because while I do add a cardarea there, it's kinda specific in its behaviour

#

ah, yeah

tired kestrel
#

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.

tired kestrel
#

wait was it actually this?

red flower
#

no thats for talisman compatibility

#

nothing to do with what you want to do

tired kestrel
#

so I have to just give up?

#

just because he didn't specify on how to define it?

red flower
#

i mean it does seem above your knowledge level, no offense

tired kestrel
#

that's what I'm afraid of

red flower
#

like I said before I will look into it after work to see if I can add a context for it to smods

tired kestrel
#

Yeah cause honestly

#

I don't know exactyl what he meant by define for replacing hand

red flower
#

but i will need to have the code and the game with me to know how to do it

tired kestrel
#

cause right now I need a break

red flower
#

nah, i mean the game's code

tired kestrel
#

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.

red flower
#

maybe he's busy and hasn't seen it yet

tired kestrel
#

oh.

hidden sable
#

WHAT DID I DO 😭

tired kestrel
#

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

hidden sable
#

WHAT DID I DO AGAIN

#

the ui object that makes things go up and down is R right

red flower
#

R is a row yes

#

but you need to wrap it in a column

hidden sable
tired kestrel
#

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

red flower
hidden sable
red flower
#

UI is sorcery

stark viper
#

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?

hidden sable
#

HOLY SHIT

hidden sable
#

THAT WORKED FIRST TRY

#

just gotta do some tweaking and itll good good

#

then i can finally localize gurp

#

too small?

sour garden
stark viper
# red flower what are you using to run it

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

unkempt thicket
hidden sable
#

perfect

red flower
#

vscode doesnt run lua by default

stark viper
#

the thing that is baffling me now is that I have the Python debugger extension uninstalled

#

idk why it's still popping up

formal parrot
red flower
#

idk

stark viper
#

thanks for the guidance, i'll try to figure this garbo out lol

sour garden
#

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```
red flower
#

try return SMODS.merge_effects({x, y})

sour garden
#

works perfectly, thank you

merry raven
#

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

hidden sable
#

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?

red flower
#

nil check G.GAME.blind

merry raven
# merry raven I actually managed to get it fucking working <@390594268286418944> ``` local st...

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

red flower
#

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

merry raven
#

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

red flower
#

uhhh no idea :3

merry raven
#

Damn

hidden sable
#

any way to even this space

merry raven
#

This is a maze and a half

red flower
#

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

formal parrot
#

Gurp

merry raven
#

Ogh man yeah that is a LOT of code

gilded narwhal
#

how would I dynamically update the weight of a booster pack?

hidden sable
#

increased width and it increased the margin

gilded narwhal
wintry solar
hidden sable
#

but this all looks aligned

wintry solar
#

You have columns with cl

hidden sable
#

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

wintry solar
#

You need more nesting then

hidden sable
#

my disk has been filling up a bunch every time i relaunch balala

#

is that a concern?

wintry solar
#

Clear your logs friend

hidden sable
#

where

unkempt thicket
#

How can i get the current mod in a lovely patch

hidden sable
#

mods>lovely>logs?

unkempt thicket
#

I mean like SMODS.current_mod

hidden sable
#

also SO CLOSE

red flower
hidden sable
#

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 😭

unkempt thicket
red flower
#

weird what are you patching

hidden sable
unkempt thicket
#

main.lua and =[SMODS _ "src/loader.lua"], though i don't think it claimed the 2nd as nil

red flower
#

maybe the part in main.lua is before SMODS even loads

unkempt thicket
#

The 2nd claims mods is nil

red flower
#

maybe that's before mods are loaded lol

hidden sable
#

got it to work but

#

fix was this

unkempt thicket
red flower
#

no idea honestly

primal robin
hidden sable
primal robin
#

I see. This thing was kinda problem for me too

hidden sable
primal robin
#

No, it's much more complicated

#

But I'm using vanilla create_toggle

hidden sable
#

oh i just modified it

#

much easier imo

#

easily wrapped

hidden sable
#

i mean it works but

#

seems very

#

uneccesary

primal robin
#

It was made before I added localization

hidden sable
#

honestly for my first ui thing i think i did a pretty good job

primal robin
#

Looks good so far, yea

hidden sable
#

i wonder if anyones done this before

primal robin
#

Better make a bigger gap between title and desc

#

And btw my descriptions so long so I'm using popups for it

hidden sable
#

experimenting with something

primal robin
#

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

hidden sable
#

how do i give ui a shadow

#

like this 3d effect

primal robin
#

shadow = true

hidden sable
#

any color i use looks red

#

patch

primal robin
#

active_colour and inactive_colour you can pss into create_toggle

tranquil gull
#
    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
    }
primal robin
red flower
#

or all new lovely files have appropriate priority.

primal robin
#

Damn, you got me

hidden sable
#

to make the color look not red they have to be slightly blue

wintry solar
#

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

tranquil gull
#
    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

tranquil gull
#

so

hidden sable
#

this looks nice

tranquil gull
#

that will be. delayed for a bit

wintry solar
#

Then dont submit your PR if it’s not ready

tranquil gull
#

alr fair

#

lemme change it to a draft pr

sonic cedar
primal robin
#

This part of PR also weird

#

Isn't this global change should be added separately and be tested?

tranquil gull
#

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

hidden sable
#

alright look at this, this looks ok right?

primal robin
#

Shadow on text is questionable

#

Maybe it's just me, idk

hard mica
#

anyone know how to fix this??

iron burrow
#

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.

stiff quiver
#

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

hidden sable
#

give a tag instead

#

or jsut create a free one when you hit shop

daring fern
#

How does one retrigger a card until probabilities occur?

hidden sable
#

hook for detection?

#

or patch

daring fern
hidden sable
daring fern
#

Also I already know when the probabilities trigger, I just don't know what to do to make it retrigger until that happens.

sonic cedar
hidden sable
#

also mr poly bridge is my first ui good

daring fern
daring fern
hidden sable
#

whats the end goal, lucky card?

daring fern
daring fern
#

Because that's how I'm checking that it has triggered.

stiff quiver
#

wouldnt a while loop until the chance happens work?

hidden sable
#

is there a ui tick for making objects warp like this?

#

like wobble like cards

daring fern
zealous glen
hidden sable
real night
#

how would i detect when a wild card is scored

zealous glen
#

SMODS utility function

#

For Enhancements

iron burrow
daring fern
zealous glen
#

Naturally the card itself provides all information it has on its object

sonic cedar
rugged mantle
#

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

hidden sable
#

calculate on consumables is for having them held in hand right

iron burrow
zealous glen
modern kindle
#

hello chat of developers

iron burrow
zealous glen
zealous glen
#

Balatro

modern kindle
iron burrow
#

Oh really

zealous glen
modern kindle
#

im sorry to hear that =[

iron burrow
#

damn hope you get to feeling better Victin, you're making my day better already

zealous glen
hidden sable
#

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

zealous glen
#

Why does it need to be constantly changing

#

Can’t you evaluate dynamically

hidden sable
#

its s config

zealous glen
hidden sable
iron burrow
#

Wow sure enough the balatro source is super accessible

#

Thank you @zealous glen

zealous glen
#

No problem

dire marlin
#

can someone tell me how to locate my joker.lua in my main.lua file?

zealous glen
hidden sable
zealous glen
#

Just check if it’s possible for the object to spawn

zealous glen
#

The write a function that verifies whether or not those conditions apply

modern kindle
#

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

static dagger
#

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,
})
zealous glen
modern kindle
#

lmfao

#

feed my ego mr ice

zealous glen
#

call it iceden

#

icy papers

modern kindle
#

well, you know what they say

if the mod aint good enough

its gonna get iced

red flower
modern kindle
#

hi N my goat

red flower
#

hii

modern kindle
#

how are you

hidden sable
#

is there a way to detect when a run has started

red flower
#

im commuting home so im great i hate work

zealous glen
red flower
#

what i always reply with hiii

hidden sable
#

i wanna create a copy of a config when a run stars

modern kindle
#

isnt there a run_start or something

hidden sable
zealous glen
modern kindle
#

yea N always responds to me anyway with hii

daring fern
zealous glen
sonic cedar
#

twinning

modern kindle
#

i made some delicious burgers yesterday, i can make u some vic

hidden sable
hidden sable
#

what is run_start

static dagger
# red flower iirc legendary is just not considered in the card creation

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 ''))
'''
red flower
#

you would hook SMODS.poll_rarity probably

sonic cedar
#

smoes

red flower
#

the next time someone comments on one of my typos im blocking them

sonic cedar
#

i feel like jesse from minecraft story mode rn

red flower
#

from what

zealous glen
#

whomsoever

red flower
#

the guy from breaking bad is in minecraft?

zealous glen
#

I think it’s like Dangling Ropes but Minecraft

sonic cedar
zealous glen
#

It has a plot, choices, and death

red flower
#

i mean i know what story mode is i know my videogames

sonic cedar
#

oh ok

red flower
#

i meant that for victin

#

still dont know who jesse is

zealous glen
#

Me neither

sonic cedar
#

the guy on screen

red flower
#

he looks confused

zealous glen
#

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

red flower
#

it's like Hundred Line

#

it has choices

zealous glen
#

Isn’t that from One Piece

red flower
#

100 lines > 1 piece

sonic cedar
zealous glen
#

i mean i know what story mode grand line is i know my videogames One Piece videogames

red flower
#

i dont know one piece sadly

real night
#

how do you do sort of "while you have the joker" effects like juggler and drunkard

red flower
#

add_to_deck and remove_from_deck

zealous glen
#

What do you mean “false”

vapid sable
#

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

zealous glen
#

配信リンク:https://lnk.to/mc_miraijima

『ONE PIECE』106巻公式テーマソング「未来島 ~Future Island~」PV絶賛公開中!
https://youtu.be/-Sb4wxbHh-4
7月3日(月)新宿ユニカビジョンで行われた世界最速配信LIVEの模様も公開中!
集英社ジャンプコミックス『ONE PIECE』巻百六「天...

▶ Play video
sonic cedar
#

i refuse to acknowledge future island's existence

vapid sable
wintry solar
#

goodbye numberator

zealous glen
sonic cedar
vapid sable
#

how do iiii check if it does work

zealous glen
#

Uhhh does a terminal pop up when you start the game

vapid sable
#

nothing pops up

zealous glen
#

I wonder if your antivirus deleted Lovely

vapid sable
#

hm

zealous glen
#

Or you put it in the wrong folder

vapid sable
#

it's supposed to be in the Mods folder right

zealous glen
#

Lovely, no

vapid sable
#

by lovely you mean the version.dll right

#

this guy

normal crest
#

that one is meant to go in the same folder as Balatro.exe

zealous glen
#

Yes

hidden sable
#

lovely adds itself in Mods too

vapid sable
#

oh god i misread this so bad

hidden sable
near bay
#

how do i fix this. (it's a seal btw)

hidden sable
#

and whats the end goal

red flower
#

args doesn't even exist

normal crest
#

smods has a thing you can return to balance stuff

#

i don't remember what it was rn tho

zealous glen
#

balance

hidden sable
red flower
#

return { balance = true }

near bay
#

im making a seal balance

hidden sable
near bay
#

ah alr

static dagger
#

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

vapid sable
#

okay something popped up when i opened the game... now wheres the mods button supposed to be

red flower
hidden sable
#

or something idk

#

yeah

#

see iw as right im learning

static dagger
#

thank you!

vapid sable
near bay
#

why is this the back of a card from the red deck?

daring fern
vapid sable
#

why doesnt balala recognise my mod :(

normal crest
near bay
#

No

#

it worked :D

#

sorry for my mistake

formal parrot
#

It should be in %appadata%balatro/mods

vapid sable
formal parrot
#

Your mod needs at least a .json file and a .lua file

sonic cedar
vapid sable
formal parrot
#

Thats what we were trying to do today infact somethingcom515

sonic cedar
formal parrot
vapid sable
#

hm

daring fern
formal parrot
#

Since you can’t use while to return

vapid sable
#

let me reopen balala

sonic cedar
vapid sable
#

no weird still doesnt show up

near bay
#

can i make a seal play a different sound when it appears on standard packs?

vapid sable
#

might there be something wrong with the meta...??

#

id think not i basically did fill in the gaps :p

red flower
#

you can't have comments in a json

vapid sable
#

oh

#

:-

edgy reef
#

Yea this is being displayed as javascript iirc

zealous glen
zealous glen
normal crest
#

so you'd have to predict the future

formal parrot
zealous glen
vapid sable
#

i copied from one of the github pages

normal crest
#

why did you copy all of it

vapid sable
#

🥴

daring fern
normal crest
#

right below that there is a "template for copying"

daring fern
red flower
daring fern
normal crest
red flower
#

oh then that's hard yeah

vapid sable
#

yeah great still doesnt work :[

#

imma leave thatalone come back later

zealous glen
daring fern
real night
#

is this the right way to do it

                SMODS.create_card('Joker', rarity = 1)
            }```
#

i cant tell

formal parrot
#

You can define constant cariable

#

Variables I

zealous glen
formal parrot
#

Pretty sure its not

#

Since you can change it

daring fern
normal crest
red flower
formal parrot
#

Oops all 6s does that

red flower
#

oh damn im slow

normal crest
#

you're on phone

zealous glen
#

Either directly or by simulation

red flower
tired kestrel
#

Somthing you there?

normal crest
#

Is there an easy way to score hands held in hand as if they were played

tired kestrel
#

I need your guidence

#

what do you mean for the define

zealous glen
daring fern
tired kestrel
#

alright.

#

I think I have the idea now.

#

sorry if this is something frustrating but yeah.

unkempt thicket
#

How can i make an info quene of another joker?

normal crest
#

append G.P_CENTERS.j_prefix_key

plush depot
#

anyone know the weight of the jumbo and mega booster packs (not like actual weight like how often they appear)

wintry solar
wintry solar
#

I think you'd have to do some cursed af post trigger logic and manually running future triggers

normal crest
plush depot
#

what

normal crest
#

Look at the game's code in the game.lua file

plush depot
#

where

normal crest
#

Mods/lovely/dump/game.lua

#

Search for "buffoon" or something, they're all next each other

hidden sable
#

how can i change this text up here

#

for my mod

plush depot
#

found it jumbo is 1 and mega is 0.25

faint yacht
hidden sable
#

i already have names for those

#

i wanted to call it "Other" since i have a tab for info

faint yacht
#

Gotta do it via .extra_tabs then.

candid sleet
#

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)

candid sleet
#

i dont really understand why it's unexpected symbol here cuz it displays as linking back to the start of the joker

daring fern
candid sleet
#

oh right thanks

river apex
#

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 ?

hidden sable
#

how can i do text formatting outside of joker cards

#

like if i wanted to format standard ui text

hidden sable
river apex
#

Yeah I was wondering if there was an other way
Thanks !

hidden sable
daring fern
hidden sable
#

tried this

normal crest
#

who needs a user interface

hidden sable
normal crest
#

cli balatro

hidden sable
normal crest
#

I assume you just put it in an extra tab of your mod?

hidden sable
normal crest
#

can you show the code

zealous glen
hidden sable
#

its just this until about11

#

theres prolly a better way to do this

zealous glen
#

If you’re creating nodes, you just create the nodes that the commands would create for you

normal crest
#

you need to parse the string to make the text object I believe

hidden sable
#

so i can spawn text that is basically a joker description

#

with text formatting

zealous glen
#

Maybe

normal crest
#

Honestly try SMODS.localize_box { about1 } etc

#

Just found out that's a function

zealous glen
#

Since Balatro does it automatically for Jokers

#

But idk

#

Usually I just do it manually

hidden sable
normal crest
#

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

red flower
#

you might not need to

feral tree
#

is there a way to get a joker to detect if there's another specific joker in hand?

normal crest
#

it uses what loc_parse_string returns

red flower
#

damn

normal crest
#

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

red flower
hidden sable
primal robin
#

Me when I have no access for SMODS and needs to do it manually: water

normal crest
#

if you can't copy from smods, copy from vanilla

red flower
# hidden sable

try putting it under nodes directly instead of a table inside nodes

hidden sable
#

holy shit it worked

#

tiny af tho

hard mica
#

anyone know how to fix this ples

primal robin
#

I made this in wacky way. No Idea how, but it works

normal crest
drowsy heath
#

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

normal crest
#

Does it appear in collection

hidden sable
#

thats normal

drowsy heath
#

I used debug to get it and it works fine

#

Just not coming from the soul

normal crest
#

Did you start a new run before using the soul

drowsy heath
#

Which is weird

#

Yep

#

Using brainstorm to soul start over and over

normal crest
#

Can you send your joker definition

drowsy heath
#

Wait no nvm just realised I made it common by accident

normal crest
#

Lol

#

That'd do it

drowsy heath
#

I feel stupid now

#

Yep worked str8 away

hidden sable
#

this didnt work

#

is there a table.unpack?

primal robin
#

It's just unpack iirc

#

5.1 lua after all

hidden sable
#

why in the intro is it displaying here 😭

normal crest
#

don't wrap it around {}

hidden sable
#

oh right

river apex
#

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 ?