#💻・modding-dev

1 messages · Page 203 of 1

strong jacinth
#

Probably that

broken cliff
#

ye handname is nil somehow

neat plover
worthy stirrup
#

Im working with Malverk but it causes a crash, it mentions ipairs, but i dont see the issue, it works fine when i remove this code

AltTexture({
  key = 'Blind', -- the key of the texture
  set = 'Blind', -- define the object type that you are retexturing, see wiki for full list of types
  path = 'BlindChips.png', -- the filename of your spritesheet, saved in assets/1x AND assets/2x
  loc_txt = { -- [NYI] Localization text for tooltips displayed in the texture selection screen - can be added to a localization file under [descriptions][alt_texture]
    name = 'Blinds',
    text = {''}
  }
})
neat plover
#

agin

broken cliff
worthy stirrup
#

no... it works if the text is empty

strong jacinth
#

It doesn't work...

#

Strange

broken cliff
#

bcuz it has nothing to iterate over

worthy stirrup
#

it works, the other ones work just fine

broken cliff
#

thats what ipairs does
it iterates over a table

#

if theres nothing to iterate over it will ignore you

manic rune
#

sounds like my dad

worthy stirrup
#

bro, i am telling you, it works fine if its empty.

manic rune
#

he ignored me because i didnt have a table :(

broken cliff
#

its js a table with no keys and values

neat plover
strong jacinth
#

Just try

worthy stirrup
#

okay... but why does all the other ones with {''} work

broken cliff
#

for example?

worthy stirrup
#
AltTexture({
  key = 'Chips', -- the key of the texture
  set = 'Stake', -- define the object type that you are retexturing, see wiki for full list of types
  path = 'chips.png', -- the filename of your spritesheet, saved in assets/1x AND assets/2x
  loc_txt = { -- [NYI] Localization text for tooltips displayed in the texture selection screen - can be added to a localization file under [descriptions][alt_texture]
    name = 'Chips',
    text = {''}
  }
})
neat plover
#

how would get the rank of a destroyed card?

worthy stirrup
#

i put text into the text, still crashes

manic rune
broken cliff
#

text normally has 2-3 lines

worthy stirrup
#

the text isnt the issue.

broken cliff
#

u can js also remove text = [''} all together

broken cliff
#

i still have yet to see the error logs

worthy stirrup
#

then just... ask for them?

broken cliff
#

what is at line 151

worthy stirrup
#

thats malverks mod, not mine

strong jacinth
#

You can still look whats on line 151?

worthy stirrup
#

its just the word end.

neat plover
strong jacinth
#

Can you show with line numbers? (Like from 145 to 155 or sum)

red flower
broken cliff
#

latest version of malverk, ur atlas might be Broken

worthy stirrup
#

got it working.

broken cliff
#

gg

worthy stirrup
#

i needed frames=

strong jacinth
#

N'

#

Could you maybe help me? I get a strange error while copying code from the smods example mod

red flower
#

whats the error

kindred heron
red flower
#

is that something

kindred heron
#

Idk you tell me

#

Oh you mean from omori

#

Yes

manic rune
#

did someone get pushed down the stairs

strong jacinth
# red flower whats the error
SMODS.PokerHand {
    key = 'Royal Flush',
    chips = 110,
    mult = 9,
    l_chips = 40,
    l_mult = 4,
    example = {
        { 'S_A',    true },
        { 'S_K',    true },
        { 'S_Q',    true },
        { 'S_J',    true },
        { 'S_T',    true },
    },
    loc_txt = {
        ['en-us'] = {
            name = 'Royal Flush',
            description = {
                '5 cards in a row (consecutive ranks) with',
                'all cards sharing the same suit',
                'made of only Aces, tens, and face cards'
            }
        }
    },
    evaluate = function(parts, hand)
        if next(parts._flush) and next(parts._straight) then
            local _strush = SMODS.merge_lists(parts._flush, parts._straight)
            local royal = true
            for j = 1, #_strush do
                local rank = SMODS.Ranks[_strush[j].base.value]
                royal = royal and (rank.key == 'Ace' or rank.key == '10' or rank.face)
            end
            if royal then return {_strush} end
        end
    end,
}

SMODS.Atlas { key = 'vulcan', path = 'vulcan.png', px = 71, py = 95 }

SMODS.Consumable {
    set = 'Planet',
    key = 'vulcan',
    --! `h_` prefix was removed
    config = { hand_type = 'ex_royal_flush_Royal Flush' },
    pos = {x = 0, y = 0 },
    atlas = 'vulcan',
    set_card_type_badge = function(self, card, badges)
        badges[1] = create_badge(localize('k_planet_q'), get_type_colour(self or card.config, card), nil, 1.2)
    end,
    process_loc_text = function(self)
        --use another planet's loc txt instead
        local target_text = G.localization.descriptions[self.set]['c_mercury'].text
        SMODS.Consumable.process_loc_text(self)
        G.localization.descriptions[self.set][self.key].text = target_text
    end,
    generate_ui = 0,
    loc_txt = {
        ['en-us'] = {
            name = 'Vulcan'
        }
    }
}
kindred heron
#

Error jumpscare

strong jacinth
#

(My code that i copied and the error)

strong jacinth
kindred heron
#

Yk

#

Destroying cards sucks

#

I still can't do it

tall wharf
#

chat am i cooking

broken cliff
kindred heron
worthy stirrup
#

Whatss the key for the Sticker for Malverk

worthy stirrup
#

nvm

runic pecan
strong jacinth
worthy stirrup
#

but now i need to figure out what the key is for the little stake stickers

red flower
strong jacinth
#

This is mine

kindred heron
#

Oh my god

red flower
#

latest

strong jacinth
red flower
#

27d

#

yes

kindred heron
#

Does destroy_card work on the new version?

red flower
#

yes

strong jacinth
red flower
#

git

tall wharf
red flower
# red flower git

i dont think yours is that outdated for it to matter tho the problem might be somewhere else

sturdy compass
manic rune
#

it gives +4 mult on high card

sturdy compass
#

LMFAOOOOOO

manic rune
#

if im not wrong

tall wharf
#

if hand contains a high card

manic rune
#

💔

kindred heron
#

It no wrok

#
    calculate = function(self, card, context)
        if context.individual then
            if context.cardarea == G.play then
                if context.other_card:get_id() <= 6 then
                    card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_gain
                end
            end
        end
        if context.joker_main then
            if context.destroy_card and context.cardarea == G.play then
                if context.other_card:get_id() <= 6 then
                    return {
                        remove = true
                    }
                end
            end
            return {
                card = card,
                Xmult_mod = card.ability.extra.Xmult,
                message = 'X' .. card.ability.extra.Xmult,
                colour = G.C.MULT
            }
        end
    end


#

There has to be an individual and other_card for it to work and increase mult

red flower
#

context.destroy_card doesn't happen at the same time as joker_main, same problem as before

#

put that if outside of joker_main

kindred heron
#

Ok but i wanna only destroy cards in a range

#

If cards are 6 or less in rank

red flower
#

ok

#

and what's your problem with my answer?

kindred heron
#

I feel like if putting the return outside its gonna delete everything

red flower
#

it's not

strong jacinth
red flower
#

no

strong jacinth
#

I updated smods

red flower
#

what version of lovely do you have

#

what other mods do you have installed

strong jacinth
#

0.7.1

#

Löve is 11.5.0

strong jacinth
#

Thats the only one

red flower
#

idk then, i literally copied the poker hand and it worked

#

i dont think it's the consumable

kindred heron
#

Now it says other_hand is a nil

strong jacinth
red flower
#

are you booting up the same run

#

@ eldzey

strong jacinth
#

Yeah

red flower
#

have you tried a new one

kindred heron
#

I will try for you

red flower
#

it wasnt directed at you sorry

#

the destroying_card thing was

kindred heron
#

Its ok

strong jacinth
#

FINALLY

#

LETS GO

kindred heron
red flower
#

let me try it myself

kindred heron
#

I wanna put that thing in an individual

#

Dude

#

I wish i can just rip the cards apart with my hand

kindred heron
# red flower let me try it myself
        if context.individual then
            if context.cardarea  g.PlAy ThEn
                If CoNtExT.oThEr_CaRd:GeT_iD() <= 6 tHeN
                    cArD.aBiLiTy.ExTrA.xMuLt = CaRd.AbIlItY.eXtRa.XmUlT + cArD.aBiLiTy.ExTrA.xMuLt_GaIn
                EnD
            eNd
        EnD
        iF cOnTeXt.JoKeR_mAiN tHeN
            rEtUrN {
                cArD = cArD,
                xMuLt_MoD = cArD.aBiLiTy.ExTrA.xMuLt,
                MeSsAgE = 'x' .. CaRd.AbIlItY.eXtRa.XmUlT,
                cOlOuR = g.C.mUlT
            }
        eNd
        If CoNtExT.dEsTrOyInG_cArD aNd CoNtExT.cArDaReA  G.play then
            if context.other_card:get_id() <= 6 then
                return {
                    remove = true
                }
            end
        end
    end```
red flower
#

this works perfectly

#

what version of smods do you have

#

oh just read your code

kindred heron
#

Smods-main is the file name

red flower
#

do what i posted

strong jacinth
#

Now this

#

With debug plus

red flower
kindred heron
kindred heron
#

Will copy your code and see

red flower
#

probably not the issue but you should update smods and balatro

#
if context.destroy_card and context.cardarea == G.play then
    if context.destroying_card:get_id() <= 6 then
        return {
          remove = true
        }
    end
end
kindred heron
#

I feel like balatro isn't worth updating

#

It only new cosmatic cards

red flower
#

not my problem, smods might break if you don't

strong jacinth
tall wharf
#

which function do i hook for x chips

manic rune
#

isnt xchips already in smods

kindred heron
crisp coral
#

it is

kindred heron
#

But sure ill update

tall wharf
#

like

#

is there not get_chip_x_mult or something

strong jacinth
#

With debugplus

tall wharf
#

i guess not

manic rune
#

i actually never checked that, sorry 💀

crystal perch
tall wharf
#

ill hook myself then

crystal perch
#

like did it work without debug plus

strong jacinth
kindred heron
#

THANK YOU

crystal perch
kindred heron
#

Now i can create the stupidest joker this community has ever seen

#

"Dis-honesty"

#

Joker that kills you

red flower
#

dark honest

kindred heron
#

Mine will take you by surprise

kindred heron
#

I will show footage when im done making it

crystal perch
#

shit happens 🤷‍♀️

#

there's probably some patch or function in another one of the mods that messes with planet cards in a way unexpected by debug plus

strong jacinth
#

Oh

#

Its when i spawn in my own planet card

crystal perch
#

your planet card might be broken

strong jacinth
#

Or even for that matter scroll into the same planet card page

crystal perch
#

then it's a rendering issue

#

it's trying to draw something that crashes the game

strong jacinth
#
SMODS.Atlas { key = 'vulcan', path = 'vulcan.png', px = 71, py = 95 }

SMODS.Consumable {
    set = 'Planet',
    key = 'Vulcan',
    --! `h_` prefix was removed
    config = { hand_type = 'ex_royal_flush_Royal Flush' },
    pos = {x = 0, y = 0 },
    atlas = 'vulcan',
    set_card_type_badge = function(self, card, badges)
        badges[1] = create_badge(localize('k_planet_q'), get_type_colour(self or card.config, card), nil, 1.2)
    end,
    process_loc_text = function(self)
        --use another planet's loc txt instead
        local target_text = G.localization.descriptions[self.set]['c_mercury'].text
        SMODS.Consumable.process_loc_text(self)
        G.localization.descriptions[self.set][self.key].text = target_text
    end,
    generate_ui = 0,
    loc_txt = {
        ['en-us'] = {
            name = 'Vulcan'
        }
    }
}
#

This is my code

#

And this is the error

crystal perch
#

try temporarily removing the badges function?

#

including the create badge

#

like just comment it out or cut it

tall wharf
#

can u pass string in loc vars

strong jacinth
#

I removed this:

set_card_type_badge = function(self, card, badges)
        badges[1] = create_badge(localize('k_planet_q'), get_type_colour(self or card.config, card), nil, 1.2)
    end,
#

But still, same crash

crystal perch
tall wharf
#

no i am asking

#

wtf

crystal perch
#

yeah i'm not sure if you can

#

i've only ever done it through calling a localisation file

tall wharf
#

i am fucking asking because i wanna pass letter to the string

crystal perch
#

shrug emoji

strong jacinth
red flower
crystal perch
#

right?

strong jacinth
#

Yes

#

I took the code from the Smods example

#

Mod

crystal perch
#

it's hard for me to read the structure i'm on my phone let me pull it up on my computer

strong jacinth
#

Yea, no problem

red flower
strong jacinth
crystal perch
#

are you sure it's formatted like config = { hand_type = 'ex_royal_flush_Royal Flush' }

#

like with the space and all

strong jacinth
#

config = { hand_type = 'ex_royal_flush_Royal Flush' },

#

Pasted directly

crystal perch
#

alright i'll take your word for it then

#

did you define royal flush earlier in your code

#

like in the example mod

#
SMODS.PokerHand {
    key = 'Royal Flush',
    chips = 110,
    mult = 9,
    l_chips = 40,
    l_mult = 4,
    example = {
        { 'S_A',    true },
        { 'S_K',    true },
        { 'S_Q',    true },
        { 'S_J',    true },
        { 'S_T',    true },
    },
    loc_txt = {
        ['en-us'] = {
            name = 'Royal Flush',
            description = {
                '5 cards in a row (consecutive ranks) with',
                'all cards sharing the same suit',
                'made of only Aces, tens, and face cards'
            }
        }
    },
    evaluate = function(parts, hand)
        if next(parts._flush) and next(parts._straight) then
            local _strush = SMODS.merge_lists(parts._flush, parts._straight)
            local royal = true
            for j = 1, #_strush do
                local rank = SMODS.Ranks[_strush[j].base.value]
                royal = royal and (rank.key == 'Ace' or rank.key == '10' or rank.face)
            end
            if royal then return {_strush} end
        end
    end,
}
strong jacinth
#

Yes

crystal perch
#

so this is just a straight up copy paste then

strong jacinth
#

Yes

crystal perch
#

did you grab the assets then as well?

red flower
#

the example mod works for me

crystal perch
#

like for the textures

strong jacinth
#

Yes

#

I got it in 1x and 2x

crystal perch
#

change the key from 'Vulcan' to 'vulcan'

#

keys are case sensitive

#

i had a similar problem the other day where i didn't notice i capitalised something by mistake so hopefully that's all there is

strong jacinth
#

Still no

crystal perch
#

same error?

high stag
#

There's a way to make it so a joker can't appear in the shop right

strong jacinth
red flower
#

can you post the code again

crystal perch
#

honestly just delete the code and re-install the example mod

#

you do have steammodded installed right 😭

strong jacinth
#
SMODS.PokerHand {
    key = 'RoyalFlush',
    chips = 110,
    mult = 9,
    l_chips = 40,
    l_mult = 4,
    example = {
        { 'S_A',    true },
        { 'S_K',    true },
        { 'S_Q',    true },
        { 'S_J',    true },
        { 'S_T',    true },
    },
    loc_txt = {
        ['en-us'] = {
            name = 'Royal Flush',
            description = {
                '5 cards in a row (consecutive ranks) with',
                'all cards sharing the same suit',
                'made of only Aces, tens, and face cards'
            }
        }
    },
    evaluate = function(parts, hand)
        if next(parts._flush) and next(parts._straight) then
            local _strush = SMODS.merge_lists(parts._flush, parts._straight)
            local royal = true
            for j = 1, #_strush do
                local rank = SMODS.Ranks[_strush[j].base.value]
                royal = royal and (rank.key == 'Ace' or rank.key == '10' or rank.face)
            end
            if royal then return {_strush} end
        end
    end,
}

SMODS.Atlas { key = 'vulcan', path = 'vulcan.png', px = 71, py = 95 }

SMODS.Consumable {
    set = 'Planet',
    key = 'vulcan',
    --! `h_` prefix was removed
    pos = {x = 0, y = 0 },
    atlas = 'vulcan',
    process_loc_text = function(self)
        --use another planet's loc txt instead
        local target_text = G.localization.descriptions[self.set]['c_mercury'].text
        SMODS.Consumable.process_loc_text(self)
        G.localization.descriptions[self.set][self.key].text = target_text
    end,
    generate_ui = 0,
    loc_txt = {
        ['en-us'] = {
            name = 'Vulcan'
        }
    }
}
red flower
#

put the config back in

crystal perch
#

where's the steamodded header?

strong jacinth
#

Up at the top

crystal perch
#

alright

strong jacinth
#

This is just from my mod, i c&pd it in

crystal perch
#

put the config and set_card_type_badge in

#

like just re-copy and paste

kindred heron
#

Chat is this good?

red flower
#

no

crystal perch
#

dog water

#

unusable

kindred heron
#

Lol

strong jacinth
#

Nah

kindred heron
#

Intentional

quasi bison
#

how do I make a mod that replaces the main theme?

kindred heron
#

I want to makwe a stupid joker

#

And i will show you guys a stupid joker

strong jacinth
#

Fck that, imma delete the hand. How do i create a blind

crystal perch
crystal perch
#

hopping to another thing because you couldn't fix one thing is a surefire way of not learning

strong jacinth
#

Well, yeah. But it worked on N's machine

#

Not on mine

#

Same code

crystal perch
crystal perch
strong jacinth
#

I re copy and pasted everything

crystal perch
#

how about you don't copy paste the code and grab the entire lua file itself

#

just slam it in your project

#

not in the main.lua, but in its own lua

red flower
#

how's your folder organized

#

maybe that's the problem

crystal perch
#

i mean really the only things i can think of is folder organization problems or the steamodded header being different

red flower
#

yeah and that's going to be a thing no matter what kind of mod you want to make

strong jacinth
crystal perch
#

mhm

#

just paste the RoyalFlush.lua into the same folder as your main.lua and see if it works

kindred heron
kindred heron
#

The best of both worlds

red flower
# strong jacinth

hmmm I don't remember how the old header works but maybe the problem is naming it main

#

i think it need to be the same name as the mod id

kindred heron
red flower
#

oh ok

crystal perch
kindred heron
#

It works fine

crystal perch
#

yeah they can be named whatever

#

unless you want to point to a specific file from a different file, but it shouldn't matter within the file itself

strong jacinth
#

It works now

crystal perch
#

yeah it was probably the steamodded header then

#

because that defined some values that could have been different!

red flower
#

i would recommend learning the json one tho

crystal perch
#

or or you could have just copy and pasted it wrong 🤷‍♀️

strong jacinth
#

I dont know the difference

crystal perch
tall wharf
crystal perch
#

it should've been config = { hand_type = 'crjk_Royal Flush' },

strong jacinth
#

Oooooh

red flower
#

god

strong jacinth
#

Now it all makes sense

crystal perch
strong jacinth
#

What mod(s) create custom tarot cards

crystal perch
#

there's documentation for that on the steamodded wiki

strong jacinth
#

Thanks

warm harness
#

Hallo it's me again. Do modded jokers with the legendary rarity behave the same as vanilla legendaries? as in, will it only appear via the soul spectral card

red flower
#

AFAIK yes

warm harness
#

Ooo okie thanks!

#

Thanks to everybody who replied to me before this too btw you guys respond so fast and make my modding journey so much easier

tall wharf
#

i fixed it

rough furnace
#

does anyone know what the res property on the config of G.UIT.C nodes does?

wintry solar
#

Something to do with drawing shapes I think

rough furnace
#

ok I'll just ignore it for now

wind arch
#

welp i cant make good ui but i can make functional ui

sturdy compass
tall wharf
#

Java Swing my behated

#

the thought might catch people off guard

wind arch
#

only issue rn is its just freezing on setup for some reason when i try putting actual mods in..

sturdy compass
crystal perch
#

balatrodle....

quasi bison
#

are there any example mods?

#

or templates

crystal perch
quasi bison
#

ty

crystal perch
#

and/or just look in the extracted game files

strong jacinth
#

Yo

#

How do I check for the amount of discards left?

#

Like whats the variable

tall wharf
sturdy compass
#

boooooooooooo

tall wharf
#

i just wanted to test self destructs stickers

crystal perch
strong jacinth
crystal perch
#

no

#

base game joker

tall wharf
#

it's pretty good

crystal perch
tall wharf
strong jacinth
crystal perch
#

in card.lua

tall wharf
#

card.lua

strong jacinth
crystal perch
#

yeah no one does it sucks

zealous glen
tall wharf
#

who out there be naming their mod Delayed Gratification

#

I'll be first

crystal perch
#

fire mod name tbh

zealous glen
#

I think it's a bad Joker name

tall wharf
#

mod is 3gb but it includes AI model

strong jacinth
#

Yes, but if the mod is going to be as useful as the joker, the name wont save it...

zealous glen
#

Just you wait until you become gratified

minor furnace
zealous glen
maiden river
#

does anyone know how to pick a random card to add to the main menu? I have a card showing up but it's technically supposed to be random and it's just this one every time

maiden river
#

although there is a chance that I just have horrible luck

strong jacinth
#

So uh, this crashes...

zealous glen
strong jacinth
tall wharf
#

i don't think you return like that

maiden river
# zealous glen how are you doing it
local main_menu_ref = Game.main_menu
Game.main_menu = function(change_context)
    local ret = main_menu_ref(change_context)
    -- adds a James to the main menu
    local newcard = SMODS.create_card({
        set = "Joker",
        area = G.title_top,
        rarity = "fvb_personality"
    })
    -- recenter the title
    G.title_top.T.w = G.title_top.T.w * 1.7675
    G.title_top.T.x = G.title_top.T.x - 0.8
    newcard:start_materialize({ G.C.WHITE, G.C.SECONDARY_SET.Personality }, true, 2.5)
    G.title_top:emplace(newcard)
    -- make the card look the same way as the title screen Ace of Spades
    newcard.T.w = newcard.T.w * 1.1 * 1.2
    newcard.T.h = newcard.T.h * 1.1 * 1.2
    -- make the title screen use different background colors
    G.SPLASH_BACK:define_draw_steps({ {
        shader = 'splash',
        send = {
            { name = 'time',       ref_table = G.TIMERS, ref_value = 'REAL_SHADER' },
            { name = 'vort_speed', val = 0.4 },
            { name = 'colour_1',   ref_table = G.C,      ref_value = 'FVB_PR' },
            { name = 'colour_2',   ref_table = G.C,      ref_value = 'FVB_SC' },
        }
    } })

    newcard.no_ui = true

    return ret
end```
#

stolen from maximus balatrojoker (hi astra)

zealous glen
sturdy compass
# strong jacinth

That entire thing doesn't look right. Instead of calculate you should be doing add_to_deck and remove_from_deck

sturdy compass
maiden river
#

they call me the burglar

minor furnace
#

they call me the drink

tall wharf
#

please read the documentation

sturdy compass
#

Oh wait it's a consumable

#

then it should be use

#

lmao

tall wharf
#

what is brother calculating on consumables

zealous glen
sturdy compass
maiden river
zealous glen
#

I don't think the usual seed tools would work since you're not in a run

maiden river
#

guess I'm cooked 😔

#

oh well, always spike is fine

zealous glen
#

See if you can access the real world time

#

I had tried it before but I failed

#

I mean the game has a table of timers

#

G.TIMERS

warm harness
#

hi, how do i display a message on my joker while a card is scored during a repetition? Because the message command displays it on the scored card and not the joker

zealous glen
#

It even has G.TIMERS.REAL

warm harness
#

Okie thanks i'll try that

maiden river
warm harness
#

Thank you!

zealous glen
#

you can check @warm harness the wiki for things like this

zealous glen
maiden river
wintry solar
#

card = card doesn’t do anything

zealous glen
#

then why do I put it on my jokers balatrojoker

sturdy compass
#

I should really get rid of the card = card in my calc returns now

wintry solar
#

Because you’re stuck in old calc land 🙃

zealous glen
#

-# actually I think most of these are from vanilla

wintry solar
#

It’ll only ever do something if there isn’t a card the game is using to calculate the effects on, which I don’t think ever happens

sturdy compass
#

Btw Eremel since you're here I wanna know how you made Scenic Route cuz I wanna do some messing with Straight code and I am very lost, even after looking at your hook

wintry solar
#

Flowey wrote scenic route

sturdy compass
#

Ah dammit

wintry solar
#

Let me look at it though

wintry solar
maiden river
#

every time I make a card without any assistance I feel like a supergenius

wintry solar
sturdy compass
#

Basically the tl;dr is I made a similar hook that copies the SMODS get_straight override, added this (along with the initial variable declaration), and nothing else. All 5-card hands calculate as a straight with it 😭

crystal perch
#

quick question i want to make a joker that buffs itself on Small Blind and Big Blind like Madness but this context doesn't seem to work as it buffs itself on Boss Blinds too, despite and not context.blind_boss being included

maiden river
crystal perch
#

let me test that

crystal perch
#

balatro brain rot

crystal perch
zealous glen
crystal perch
#

let me try spacing it out

wintry solar
sturdy compass
#

Oh I see

wintry solar
crystal perch
wintry solar
sturdy compass
#

Now I'm even confused as to how get_straight works than before LMAO

wintry solar
#

I believe it goes through the ranks and looks for matches in your hand but I haven’t really looked into it much

sturdy compass
#

back to the drawing board then (or someone who actually fully knows how it does things)

wintry solar
#

Aure would know, he wrote the smods implementation

sturdy compass
#

I asked aure yesterday and even he said he wasn't sure of it lmao

red flower
#

hey thats me

sturdy compass
#

I honestly can't even blame him 😭

red flower
#

I think he meant he wasn't sure the original is the best one

#

not that he didn't know how it works

wind arch
#

in lovely for patch priorities does lower value = higher priority or lower priority

red flower
#

lower loads first

wind arch
#

👍

#

is there any more advanced logging for lovely and/or smods? the game seems to keep freezing indefinitely during the injection phase but im not seeing much info on why

sturdy compass
red flower
wind arch
#

oh where's the thread at

wind arch
#

thanks

strong jacinth
#

Why

#

I wanna add discards

wind arch
#

hm actually considering its failing here for example maybe i should ask smods

strong jacinth
#

Not mess with decl

sturdy compass
# strong jacinth What

I didn't realize it was a consumable. What you actually want is use instead of calculate

#

and also you don't want to return it

strong jacinth
maiden river
#

so when jokers enter/leave your held jokers for example

strong jacinth
#

Oooh, that makes more sence, but thanks

sturdy compass
#

Please look here

#

it was sent earlier but I think you may have missed it

wind arch
#

er actually whats the steamodded thread called if there is one

wind arch
#

thanks

maiden river
#

we love steammodded

kindred heron
#

Can you create custom decks?

maiden river
#

yes

sturdy compass
#

yes

maiden river
#

it's in the docks

#

docks?

#

docs

sturdy compass
#

yo dock

kindred heron
#

Dock

maiden river
#

I'm docking your pay

strong jacinth
normal crest
strong jacinth
#

And didnt read the rest...

kindred heron
#

Ok but SMODS.decks only has the thing for custom friends of jimbo skins

maiden river
#

it

#

whoops early enter

normal crest
#

But in my case it looks like a very tiny memory leak that just adds up

sturdy compass
#

Damn you beat me

maiden river
#

I win

#

what's the prize

sturdy compass
#

self worth

maiden river
#

wow!

neat plover
#

anyone know how to access hand size

sturdy compass
#

For what purpose?

normal crest
#

G.hand.config.card_limit

neat plover
#

to add more hand size

maiden river
#

oh

sturdy compass
#

then yeah srock's suggestion is what you want

normal crest
#

G.hand:change_size(1) to add one to it

neat plover
#

thanks!

maiden river
#

beat me to it 😒

tall wharf
#

is this how i do it

normal crest
#

I win, what's the prize

wind arch
maiden river
normal crest
tall wharf
#

really is this whole thing correct

neat plover
tall wharf
#

i am trying to set mult to the current chips / current mult

#

directly

sturdy compass
#

you could just do mult = handchips/mult

wind arch
normal crest
#

hand_chips

sturdy compass
#

right

#

I always forget the underscore lol

maiden river
#

yeah what astra/srockw said
-# beat me to it again. the fiends!

tall wharf
#

it no worky

sturdy compass
#

guh

old bane
#

how do ppl do the small text in discord tf

maiden river
#

-#

sturdy compass
#

-# like this

wind arch
#

basically it seems this is just kinda happening when i try loading mods in this setup. im wondering if with how ive set this modpack system up theres something going wrong where the mods are expecting a different directory than i actually have them in

maiden river
#

-# extremely detailed instructions

normal crest
#

it's markdown

tall wharf
#

-# pwease hewp

manic rune
#

-# good morning everyone

wind arch
#

i have at least found the steamodded debugger tool though

old bane
#

-# nuh uh

wintry solar
normal crest
tall wharf
#

here is the function that still does not work

#

oh maybe i have to update hand text

#

😔

#

i forgot

wind arch
#

hmm wait hold on let me test a few other things

#

i might have another idea on how to narrow down this issue

hushed field
#

if I want to load files with metadata, structured like the localization files, is the loading process for that the same as it generally is with lua, or is there some love2d/smods stuff I should account for?

crystal perch
#

how do i make the joker message use the config variables, like in the description

#

using #3# doesn't work

tall tangle
#

I have come up with the next batch of Smash Bros Joker ideas.

#

(I am doing them in order)

strong jacinth
#

This doesnt work

crystal perch
#

the balatro font

strong jacinth
strong jacinth
crystal perch
#

download m6x11plus onto your machine, then change the editor font family in your vscode settings

keen coral
#

are these the proper context checks for a DNA-like scenario in which the played card is a singular "x" card? the joker doesn't do anything when the card is played. i referenced DNA for the first few contexts and The Idol for the other.card contexts.

keen coral
crystal perch
#

did you download the font

strong jacinth
#

Yes

crystal perch
#

did you enter it like i did

strong jacinth
#

Yes

crystal perch
#

are you sure you installed it properly

#

like check fonts

#

if you did then just restart vsc

strong jacinth
crystal perch
#

just restart vsc then

strong jacinth
#

What font size do you use

crystal perch
#

18

keen coral
# old bane what is cm_card

a custom variable that functions similarly to The Idol's variables for my joker's purpose. i got it fully functioning this morning, so i don't think it's that.

lethal mural
#

how do i do something like with driver's license/cloud nine? (i'm trying to tally total face cards here)

normal crest
lethal mural
#

is there a certain context i should be using because what i have now crashes "trying to index self"

strong jacinth
normal crest
#

In the use function, also in your loc_txt, text should be an array of strimgs

old bane
keen coral
tall tangle
#

@old bane I came up with the next batch of Smash Bros jokers if you wanna see 😂

strong jacinth
#

So like this?

normal crest
#

No, just ease_discards(card
ability.extra.discards)

neat plover
#

will this work?

normal crest
old bane
neat plover
#

i know that

tall tangle
#

crams you in a thread

strong jacinth
normal crest
#

No

#

I mean in loc_txt, text should be an array, not just a string

normal crest
neat plover
#

oh the context is way off, but yeah it kinda works

strong jacinth
#

Wait, how does the SMODS.Consumable's can_use() work again

hasty ravine
#

Is there a way to get the bought card type for context.buying_card? I want this effect to happen only when Joker cards are bought

red flower
#

context.card.ability.set

strong jacinth
#

Me or saph?

red flower
#

saph

red flower
hasty ravine
#

Thank you!

red flower
strong jacinth
#

Can i do like can_use(self, card) = true?

red flower
#

no, it's a function

#

can_use = function(self, card) return true end

red flower
#

ease_discard

strong jacinth
#

How was the localization function, or something like that

#

Like to display the "Nope" for the wheel of fortune

red flower
#

localize

#

localize("k_nope_ex")

strong jacinth
#

With the square?

red flower
strong jacinth
#

Im pretty sure there was a easier way, like localize(C_Color_Purple, "Nope")

wind arch
frosty dock
#

using a tarot isn't integrated with calculation, but you can still use SMODS.calculate_effect

strong jacinth
#

So there is no easier way, kinda like i described?

frosty dock
#

there is

wintry solar
#

Where do you want the text?

strong jacinth
#

At the tarot card

wintry solar
#

Then use SMODS.calculate_effect

strong jacinth
wintry solar
#

Yes

strong jacinth
#

Where

#

I cant find it

wintry solar
#

The calculate page

spring lantern
#

noit sure why i'm getting this crash, did i do something wrong in the event?

wintry solar
#

:add_event

spring lantern
#

oh my god

#

thanks

strong jacinth
#

No crash, just no

wintry solar
#

That’s not using calc effect

frosty dock
#

yeah you need to use the function manually

strong jacinth
#

Whats the effect im looking for called?

frosty dock
#

you want to put the table you're trying to return into calc effect instead

strong jacinth
#

SMODS.calculate_effect({effects}, card)

#

Whats the effect called

frosty dock
#

just read

kindred heron
#

Making a deck that reduces the joker spot by 1
how do i do that

#

Wait

#

Oh nvm i did it

strong jacinth
neat plover
#

lets say i want to set hand size to a variable, how ould i be able to do that?

minor magnet
#

is there a way to view modded achievements in game after unlocking them?

frosty dock
tall wharf
#

is there a context for after discarding

strong jacinth
#
                    text = localize('k_nope_ex'),
                    scale = 1.3, 
                    hold = 1.4,
                    major = used_tarot,
                    backdrop_colour = G.C.SECONDARY_SET.Tarot,
                    align = (G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.SPECTRAL_PACK) and 'tm' or 'cm',
                    offset = {x = 0, y = (G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.SPECTRAL_PACK) and -0.2 or 0},
                    silent = true
                    })```
frosty dock
#

that's specifically not using calc effect...

kindred heron
#

Im laughing my ass out rn

strong jacinth
#

Thats why

frosty dock
#

the base game code works of course, but it's redundant

strong jacinth
frosty dock
#

any valid localization key

#

of course you're also free to not localize something at all and just pass a string directly

#

however i don't recommend it

kindred heron
#

Why?

strong jacinth
tall wharf
#

is this correct

frosty dock
tall wharf
#

i want to put the discarded cards back to deck when you have 0 discards left

frosty dock
frosty dock
strong jacinth
tall wharf
frosty dock
strong jacinth
#

Doesn't it work?

tall wharf
granite bane
#

is there an alternative to is_suit( that get's the cards actual suit?

Like, regardless of wild or the smear joker

frosty dock
#

dictionary entries exist by themselves, so you have to use a different method

strong jacinth
#

Oh, how do I create a text, like the k_nope_ex? (and how do i include it into the main.lua)

frosty dock
#

just read the page i sent?

granite bane
#

"H" or "Hearts"

frosty dock
#

Hearts

hushed field
#

I keep bumping my head against it without finding a proper solve. If I have a bunch of metadata in a similar format as the localization files, what's the proper way to make that accessible?

frosty dock
#

what are you trying to do with it?

#

you're being really really vague

hushed field
#

haha, yeah, fair. I have a bunch of data on actors and movie budgets set up in a table, that I want to have accessible in the game

frosty dock
#

is it localized?

hushed field
#

set up like this, but I've been diving into what the proper way to load stuff like this in is

frosty dock
#

oh i see

hushed field
#

none of the data in there is player-facing

frosty dock
#

you can use SMODS.load_file for that

#

like local data = assert(SMODS.load_file('path/to/movies.lua'))()

tall wharf
#

figured it out

#

context.discard runs when you still have your last discard

strong jacinth
#

How do i load a file?

#

Like a localization file

frosty dock
#

localization files are processed automatically by smods

#

use SMODS.load_file for anything else

strong jacinth
#

and how do i create a thing like k_nope_ex (I dont understand the syntax)

frosty dock
#

did you read the wiki page?

hushed field
frosty dock
#

you then confirm it exists and call the chunk

west mason
#

how can i make an edition detect the card its been applied to is being removed?

tall wharf
#

there we go

strong jacinth
#

Yea

frosty dock
#

did you read the part of the wiki page that is about localization files?

strong jacinth
#

Yeah

frosty dock
#

in order to be able to use it like localize('k_your_new_key'), you do something like

return {
  misc = {
    dictionary = {
      k_your_new_key = 'Bruh!',
    },
  },
}
hushed field
frosty dock
#

but then you also have to call it differently

strong jacinth
#

Oh, yeah

frosty dock
#

localize { type = 'variable', key = 'a_other_key', vars = {'a', 'b', 'c'} }

strong jacinth
#

And is it needed?

minor magnet
#

how do joker unlocks work hellp

frosty dock
#

there's different prefixes used there, I'm not exactly sure what each of them means

hushed field
#

ay, everything's working now. Thanks for the help John! 😄

rapid stag
#

alright, basic lua question because i'm dumb - if i have an array of strings, how can i pick a random one from said string array? basically, i'm asking my_string_array[#what goes here?#]

normal crest
#

Thank you John!!

frosty dock
#

call me Aure 🙄

strong jacinth
minor magnet
hushed field
#

Haha, sorry 😛 Thanks for the help, Aure

tall wharf
#

mr john steamodded

frosty dock
hushed field
#

look if it's your display name i'm going to use it 😛

frosty dock
#

fair enough lmao

minor magnet
frosty dock
tall wharf
#

Mr. Jonathan "aure__" Steamodded

frosty dock
#

it's swapping out made-up names for each other so it's not like i can be mad or anything

strong jacinth
#

It says error.

#

So the square, but error

frosty dock
#

no it says gullible

strong jacinth
#

no

rapid stag
frosty dock
#

it does until you show me your code

strong jacinth
frosty dock
#

can i see where that localization file is

strong jacinth
frosty dock
#

i should change that to where the placeholder isn't a valid file name

minor magnet
#

can someone help me understand how joker unlocks work

strong jacinth
minor magnet
#

im trying so hard to get the descriptions to show up correctly

normal crest
minor magnet
#

the normal ones

#

and all variables in them are nil

#

i want them to display the achievement description for their unlock

normal crest
#

you need to use locked_loc_vars to send variables to the locked description

minor magnet
#

omg thank you so much

#

but

frosty dock
minor magnet
#

how do i get the correct text to show up

#

i want the achievement text not the joker one

normal crest
#

in your localization file add an unlock key which is just a list of strings that will show when locked

#

to the joker itself

frosty dock
#

so congrats, this change is dedicated to you

normal crest
#

next to name and text

strong jacinth
frosty dock
#

there's a huge list right there of the values you're able to use

#

it says right there it can be any of these language keys or the key of a language you've created

strong jacinth
#

Sorry

#

Im just to tired to be coding, yet i still do it

#

For some reason...

tall wharf
#

why does my shit keep not working waaa

graceful magnet
#

would a Joker be able to make use of some of the other contexts, like the Tag context for activating on the start of a shop?

red flower
#

there's a starting_shop context now

#

I think it's not on the wiki yet?

sullen fern
#

ah, right. i was working on this.

frosty dock
tepid crow
#

wait who added the starting_shop context lmao

frosty dock
tepid crow
#

that's the exact same timing as a context I had to add manually 😭

red flower
#

the shop utils are very cool

edgy reef
#

😭

sullen fern
frosty dock
#

if it's not working, you need to enable the optional feature for joker retriggers

#

(another thing that needs to be documented)

graceful magnet
#

is there an update I have to get for the starting_shop context and stuff?

red flower
#

just the latest smods if you're behind

sullen fern
tall wharf
#

mr john aure smods what happened to my code

#

does not do anythinmg

frosty dock
tall wharf
#

😭

#

spit it back out damnit

frosty dock
#

ew vanilla suit logic

#

tastes awful

sullen fern
tall wharf
#

😭

frosty dock
#

just SMODS.change_base

tall wharf
#

nothing is printing

frosty dock
#

also I don't think context.after hits G.play unless you're a playing card modifier

red flower
#

Is there an easy way to filter the pool to only get my jokers when using SMODS.create_card or do I need to create a custom objecttype? right now I'm hooking get_current_pool and removing anything without my mod's prefix

tall wharf
#

ah

#

alright

sullen fern
chrome widget
#

Out of curiosity, has anyone else encountered a bug with Verdant Leaf with SMODS? Or have I induced a failure in Verdant Leaf behavior myself. It simply just doesn't debuff cards for me anymore

red flower
#

No, I want to have a way to create them in code

frosty dock
#

oh mkay

red flower
#

Like I'm making a booster rn

frosty dock
#

I think you need an ObjectType then

red flower
#

well time to refactor my code then

normal crest
#

I think you can easily make your pool by looping through SMODS.Centers and filtering set == 'Joker' and mod.id == 'yourid'

red flower
#

I'll try that ty

normal crest
#

good luck

chrome widget
#

Okay, huh

frosty dock
#

the return needs to be outside the for loop

tepid crow
tepid crow
#

what is that indentation

normal crest
#

it is pain to look at

#

but it does look like now the return is outside the loop at least

tepid crow
#

true

#

hate that I have to manually parse the ends though

tall wharf
tepid crow
#

hah, that's nice

#

not sure if it's very powerful though...

sullen fern
#

i saved my changes, and

tepid crow
#

fixing your indentation might help you spot the issue 😭

sullen fern
#

there's literally nothing there thoughj

#

what does it mean by "unexpected symbol near "}""

normal crest
#

syntax error

sullen fern
#

oh

normal crest
#

what's near line 207 in doilus.lua

sullen fern
normal crest
#

you might be missing an end for your calculate function, but it's hard to tell with the indentation

sullen fern
#

+nil times 💔

#

and the game crashes when i try to use it 💔

#

because it's nil 💔

hushed field
#

If I want every joker to basically always check a property of its neighbor, is the best approach to just do that in update, or is there a function to latch onto that handles the repositioning of jokers? I'm doing it in update now, and it works, but it feels inefficient to be checking information that isn't changing most of the time in the update function

sullen fern
#

i think what's wrong with this is that i haven't set num as a local var

normal crest
strong jacinth
#

How do you create a rairity

#

If its not that complicated

normal crest
#

but tbh putting it in update will have a negligible impact in performance

strong jacinth
#

Wait I mean consumable

dapper sun
#

how do i make a joker that does something if another joker is present?

strong jacinth
#

Like custom consumable, not a Tarot and not a spectral

hushed field
normal crest
#

i think steel joker loops through the entire deck every update call

#

and checks if they're steel

dapper sun
#

damn

hushed field
#

Yeah, I've got some jokers that still do that, rather than just do it in loc_vars, haha

normal crest
#

if you can't find a better way, leaving it in update is probably fine

sullen fern
#

why is it still +nil

kindred heron
#

Okay, so here it checks for the ids (aka the played cards) to see if its rand is 6 or under
if it is then it increases the Xmult by Xmult_gain, which is 0.15
the problem is that when it happens instead of going from X1 mult to X1.15 mult it just goes like X1.2 Mult
and if there is a blueprint or brainstorm it doubles like wtf

hushed field
#

But my jokers are checking to see if the movie jokers they neighbour share an actor, and if they don't, they're debuffed. So reordering the jokers should update it too, and I don't think loc_vars is a guarantee in that case

sullen fern
#

what's going on here...

kindred heron
#

I think

#

Actually

normal crest
#

return { vars = { 0 } } and in loc_txt #1#, since it's the first valuue

sullen fern
#

so it would be 1 = num

#

then

hushed field
sullen fern
hushed field
# sullen fern

if the error reports that there is a bracket missing, you're missing a bracket. Just match the colours to find out which one isn't closed

hushed field
normal crest
sullen fern
#

ok yeah i did it backwards

normal crest
#

IF you wanted to do it so explicitly it'd be [1] = num

#

but you don't have to

sullen fern
#

num = 1

sullen fern
#

wait i got loc_vars confused with config

normal crest
#

as for it doing 1.2 instead of 1.15, make sure to start a new run

sullen fern
sullen fern
#

mmm

#

still +nil...

#

what am i doing wrong

kindred heron
hushed field
#

And in this case, you're also no longer passing any info through loc_vars, so there wouldn't be anything to index

sullen fern
normal crest
#

...

hushed field
#

i really recommend you take a look at the example mod jokers, and how they pass info along to their loc_txt. 'num = 1' in this case should just be 1

#

I'd look into what the config is for as well, and how it allows you to not need to redefine variables in multiple spots across your code

bold canopy
#

Hi all. I've unsuccessfully tried on my own to update a mod that's recently started crashing. Any help is appreciated.

dapper sun
#

how do i make a joker equip when a joker (including self) is gained?

sullen fern
#

the joker itself still doesn't work

minor magnet
#
if next(find_joker("j_greedy_joker")) and 
next(find_joker("j_lusty_joker")) and 
next(find_joker("j_wrathful_joker")) and 
next(find_joker("j_gluttenous_joker")) then
    check_for_unlock({ type = "colorful_jonk" })```
#

where would i put this

#

like in general

dapper sun
# sullen fern

num is a local variable, but you're trying to reference it outside of its defined scope

sullen fern
#

how so

dreamy thunder
#

i think if you add it right under calculate it would work

#

not sure though

minor magnet
dreamy thunder
minor magnet
#

okok

dreamy thunder
#

local num = 0

#

outside of if

dapper sun
dreamy thunder
#

but it still should work like that from what i know

sullen fern
#

very little

dapper sun
#

you should probably follow a tutorial on the basics,,

#

or take reference from the example jokers

#

and how they use variables

sullen fern
#

i myself am very stubborn when it comes to coding in languages i have no knowledge of

#

i just wanna make the funny jonklers....

dapper sun
#

what other languages do you know then?

sullen fern
#

to be honest i don't code that much

obtuse bronze
#

hi sorry to interrupt, but just wondering, how does one go about changing some of the names of the vanilla jokers for a reskin/texture mod? ik you'll have to get like, a localisation file n stuff, but i am gonna be real idk what im doing at all (EDIT: NVM I GOT IT)

sullen fern
#

i'm not going to count scratch

#

since while it IS coding

dreamy thunder
#
function bonuscards()
    local bonuscardammount = 0
    if G.playing_cards then
        for _, v in pairs(G.playing_cards) do
            if SMODS.has_enhancement(v, 'm_(enhancement)') then
                bonuscardammount = bonuscardammount + 1
            end
        end
        return bonuscardammount 
    end
    return 0
end ```

you could use something like this to check for bonus cards
#

its more efficent

minor magnet
#

patched this in, anyone has any idea why it doesn't work?

normal crest
#

find_joker works off joker names

#

you want to use SMODS.find_card

minor magnet
#

oh

#

ill try

dapper sun
dreamy thunder
#

there was a video tutorial somewhere as well

normal crest
#

for help with syntax you really just want a helpful IDE

#

that will highlight errors and warnings

quasi bison
#

is having multiple source files as simple as including them in the main file?

strong jacinth
#

Yo

sullen fern
dreamy thunder
#

i personally use vscode

minor magnet
#

patched into card.lua

strong jacinth
#

How do I create a consumable type

#

Kinda like a Tarot, but not a tarot

minor magnet
#

no wait i get it

dreamy thunder
#

check here

sullen fern
dreamy thunder
#

you could download some lua extension

quasi bison
#

speaking of vscode

#

is it possible to make vscode recognize SMODS ?

sullen fern
#

isnt there a smods specific plugin for vscode

dreamy thunder
#

i think there is but i dont really know

sullen fern
#

ah, much better.

clear epoch
#

why would you need a smods plugin though

tall wharf
normal crest
edgy reef
normal crest
#

and then format your code with crtl shift i

clear epoch
tall wharf
wise jungle
#

sorry for barging in but i am absolutely stumped and not sure what did i do wrong
I basically am making a silly mod where it grabs every single mult, Xmult, and chips from other joker cards and basically adds them to the card, like some weird blueprint thingy
i made this for loop for it, and logically i think it should've worked, especially when i checked on how each joker is made in Balatro's code, but it just doesn't wanna DO IT

sullen fern
#

work with vscode

wise jungle
clear epoch
#

so like

sullen fern
clear epoch
#

and k takes the reference for each joker you have

normal crest
#

what?

sullen fern
#

i pressed ctrl shift i and this appeared

normal crest
#

that's always there

wise jungle
normal crest
#

if ctrl shift i doesn't do it, just right click anywhere on the text and click the format document option

clear epoch
sullen fern
#

what did ctrl shift i do

normal crest
#

it's the shortcut for "format document"

sullen fern
#

ohhh i see what formatting the document does

normal crest
#

it probably made your file a lot longer, which is why you noticed the preview on the top right

wise jungle
chrome widget
#

hmmm yeah, verdant leaf appears to be broken for some reason.......

clear epoch
#

so can't help with that one, sorry